title: multirow position not correct, how to fix it?

text: I have three figures to be put in a way subfig1 -------subfig3 subfig2 And `height(subfig3)=height(subfig1)+height(subfig2)`, so that the top of subfig3 is aligned with the top of subfig1, and the bottom of subfig3 is aligned with the bottom of subfig2.               \begin{table}[h]     \centering     \begin{tabular}{cc}     \includegraphics[width=4cm]{subfig1.png} &     \multirow{2}{*}{\includegraphics[width=8cm]{subfig3.png}} \\     \includegraphics[width=4cm]{subfig2.png}     \end{tabular}     \end{table}      But I found the position of subfig3 is too low, it is not centered. What am I missing here?


title: How to add some items to TeXstudio toolbar

text: How to add some own items to TeXstudio toolbar? I have in mind Left/Right brackets section in the Structure panel toolbar. I would like to add something like \bigl(, \Biggr[ and so on? I have the Linux version (Lubuntu 13.04).


title: Can't add fixed column types to tabularx columns with different widths

text: Trying to introduce a ratio between the `X`-column types of `tabularx` not 1:1. I now encountered the problem that my third column type `p{11ex}` is no longer accepted. I don't know why.               \documentclass[11pt,a4paper,english]{article}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{babel}     \usepackage{tabularx}          \begin{document}     \begin{tabularx}{\textwidth}{{>{\hsize=.5\hsize}X>{\hsize=1.5\hsize}X}p{11ex}}     the quick brown fox jumped & over the lazy dog a few times to pad & out the sentence \\     \end{tabularx}     \end{document}


title: Table caption without the word "table"

text: Whenever I put               \begin{table}     \begin{tabular}     ...     \end{tabular}     \caption{My great table}     \end{table}      It would end up with the name "Table 1: My great table". I don't want the prefix "Table 1:". Is there a way to suppress it?


title: To have underline in two lines?

text: Command               \underline{bla bla ... bla}      The content overflows like so at the moment ![enter image description here](http://i.stack.imgur.com/vuo3n.png) **How can you have underline without overflow to the margin?**


title: Nature of MetaFont Output: raster or vector?

text: I read that MetaFont defines vector fonts. Elsewhere it says it produces raster output. What kind of font does MetaFont really produce?


title: Mapping a bibliography key using biblatex with bibtex backend

text: I want to use the shorthand key to define custom citation keys, but Mendeley does not allow setting it. Therefore I would like to map from some other unused field (ie shorttitle) to shorthand. If using the `biber` backend this can be done using the following code:               \DeclareSourcemap{\maps[datatype=bibtex]{     \map{       \step[fieldsource=shorttitle]       \step[fieldset=shorthand, origfieldval]     }     }     }      However this does not work with the `bibtex` backend (my version of Fedora does not provide `biber`) I had a look at               \DeclareFieldInputHandler{shorttitle}{shorthand=\NewValue{}}      but that just prints out the text at the beginning of the document MWE:               \documentclass{article}     \usepackage{filecontents}     \usepackage[backend=bibtex8,style=alphabetic]{biblatex}     \addbibresource{\jobname.bib}     \begin{filecontents}{\jobname.bib}     @article{key1,     author = {Author, John},     title  = {Title},     journal =  {A Journal},     year = 2012,     shorttitle={Key1-shorttitle},     }     @article{key2,     author = {Author2, John},     title  = {Title},     journal =  {A Journal},     year = 2012,     shorthand = {Key2-shorthand},     }     \end{filecontents}          \DeclareFieldInputHandler{shorttitle}{shorthand=\NewValue{}}          \begin{document}     \nocite{*}     \printbibliography     \end{document}


title: I get this error: pdflatex.exe: A connection attempt failed because

text: Good day all. I am getting this error: > pdflatex.exe: A connection attempt failed because the connected party did > not properly respond after a period of time, or established connection > failed because connected host has failed to respond. pdflatex.exe: Data: > connect failed in tcp_connect() which makes my code take very long to compile, although it seems to compile correctly. I am compiling with pdflatex. Has anyone experienced the same problem? My script:               \documentclass[paper=a4]{article} % A4 paper and 11pt font size     \usepackage[english]{babel} % English language/hyphenation     \usepackage{amsmath,amsfonts,amsthm} % Math packages     \usepackage{graphicx}          \begin{document}     \begin{titlepage}     \thispagestyle{empty}     \end{titlepage}     \setcounter{page}{1}     \newpage     \section*{Introduction}     The purpose of this project is to     \subsection*{Problem}     The system to be analysed through the duration of this project is a two-car train, interconnected with a spring, as shown in Figure 1:\\     \newline     \begin{figure}[h!]      \centering       \includegraphics[scale=0.5]{System1.png}      \caption{two-car train, interconnected with a spring}      \end{figure}      \newline      It was initially proposed to use the absolute displacements of the carts as state variables, but it turns out that this results in the system becoming unobservable. The choice was thus made to choose the state variables:\\      \begin{align}     x =      \begin{bmatrix}     \Delta \\     v_1 \\     v_2      \end{bmatrix}      \end{align}      where $v_1=\dot{z_1}$ and $v_2=\dot{z_2}$ are the speeds of cars 1 and 2, respectively.\\     Note that we are dealing with a third order system, as we have 3 state variables.      \newline      The state equation of the system is given by:\\      \begin{figure}[h!]       \centering       \includegraphics[width=0.5\textwidth]{state_eqn.png}      \end{figure}      \newpage     and the observation equation by:\\      \begin{figure}[h!]       \centering       \includegraphics[scale=0.1]{obs_eqn.png}      \end{figure}      \newline     We thus have a single input single output (SISO) system with the voltage going to the motor of the first car as the input and the speed of the first car as the output.\\          We now substitute the following constants into the dynamics matrix A, the input matrix B and the observation matrix C:\\     \begin{center}     $M_1=M_2=1kg$\\     $K=40N/m$\\     $k=2Vs$\\     $R=100\Omega$\\     $r=2cm$\\     \end{center}     We then get the following matrices:\\      \begin{align}     A =      \begin{bmatrix}     0 & -1 & 1 \\     40 & -0.01 & 0 \\     -40 & 0 & 0      \end{bmatrix}\\      \end{align}           \begin{align}     B =      \begin{bmatrix}     0\\     0.01\\     0\\      \end{bmatrix}      \end{align}      \begin{align}     C =      \begin{bmatrix}     0 & 1 & 0\\     \end{bmatrix}      \end{align}          \subsection*{Controllability and observability}     Before we start the analysis, it will be useful to confirm that the system at hand is indeed controllable and observable.\\     \newline     To be controllable, the rank of the controllability test matrix, defined by\\      \begin{align}     Q =      \begin{bmatrix}     B & AB & A^{2}B     \end{bmatrix}      \end{align}     has to be of the same order as the system. To be observable, the rank of the observability test matrix, defined by\\      \begin{align}     N =      \begin{bmatrix}     C' & A'C' & A'^{2}C'     \end{bmatrix}      \end{align}     has to be of the same rank as that of the system. Computing matrices Q and N and using the rank() function in MATLAB shows that the ranks of both matrices are 3, and thus equal to the order of the system. We now know that the system is controllable and observable and can thus use the tools at our disposal to design a controller for this system.     \section*{Question A}     Assuming all states are measured for feedback purposes, we will now determine the gain matrix           \end{document}


title: Can I define a command with optional argument coming after the mandatory ones?

text: Is it possible to define new commands having the following form:               \command{<marg>}[<oarg>]      I have seen commands of this form in the `fontspec` package. But not sure how to achieve this.


title: Silence file inclusion messages?

text: The question seems so natural, that I would have expected it to be well researched. But, I could not find any resources. In compiling my source, I get notified on 249 file inclusions. This clutter makes it difficult to see more urgent problems. Any way of silencing these messages?


title: How to draw grids of geometric shapes with Tikz?

text: I want to draw an image like the following: ![alt text](http://i.stack.imgur.com/TcwPS.png) I did this using the following Tikz code:               \documentclass[a4paper]{article}     \usepackage{tikz}     \usepgflibrary{shapes.geometric}          \begin{document}     \begin{tikzpicture}       [hexagon/.style={regular polygon, regular polygon sides=6,         draw, minimum size=1cm, anchor=center}]            \foreach \x in {0,...,2}         \node at (\x, 5) [hexagon]{};       \foreach \x in {0,...,3}         \node at (\x-0.5, 4.12) [hexagon]{};       \foreach \x in {0,...,4}         \node at (\x-1, 3.25) [hexagon]{};       \foreach \x in {0,...,3}         \node at (\x-.5, 2.38) [hexagon]{};       \foreach \x in {0,...,2}         \node at (\x, 1.52) [hexagon]{};          \end{tikzpicture}     \end{document}      Is there a better way to code this, using fewer manually-calculated approximations in Tikz? Also, as can be seen, the lines overlap in a weird inexact way. Can I avoid that too?


title: Modifying \autoref to behave (somewhat) like \vref

text: I would like to modify the \autoref command in the following way: if the \autoref command and the label are on the same page, it behaves like \autoref* (i.e., no hyperlink). Else, it behaves usually. Thanks, Vishnu


title: polutonikogreek with lmodern 12pt

text: Within a document in `ngerman` or `english`, I'd like to have some Greek text using `babel`'s `polutonikogreek`. It seems there are two options for including greek text:               \textgreek{mikra'iti mouse~ion}      which seems good for single words and short passages, and for longer passages               \selectlanguage{polutonikogreek} mikra'iti mouse~ion      Using my standard setup (cf. below) including `\documentclass[12pt]{article}`, both options produce ugly pixelated output, technically speaking, it uses a Type 3 font, which doesn't happen for normal text: ![pixelated greek](http://i.stack.imgur.com/mAL4w.png) This problem doesn't appear when using 10pt, in this case, a Type 1 font is used. **How do I get Type 1 fonts for`polutonikogreek` in 12Pt (and other sizes)?** Here's my setup / a MWE:               \documentclass[12pt]{article}     \usepackage[polutonikogreek,english]{babel}     \usepackage[T1]{fontenc}     \usepackage{lmodern}          \begin{document}          \textgreek{mikra'iti mouse~ion}          \selectlanguage{polutonikogreek} mikra'iti mouse~ion          \end{document}      I use pdfTeX 1.40.11 by MiKTeX 2.9 Interestingly, this issue appears even in a manual for the `greek` option in `babel`, so it doesn't seem to be trivial. Then again, the manual is from 1997. P.S.: You'll notice there's also an issue with the circumflex accent, but I thought I'd post this as a separate question once this one's solved.


title: How do you change the font when using fncychap?

text: I am using `fncychap` and would like to use a different font for the chapter label than the rest of the document. Is there any easy and general way?


title: Is it possible have the PDF bookmark level go deeper that the table of contents depth?

text: Is it possible to make the bookmarks in the PDF go a level deeper that the table of contents goes? I'm using KOMA-script, `scrreprt` if that matters. If the table of contents displays two levels:               1. Level 1         1.1. Level 2     2. Level 1         2.1. Level 2      Is it then possible to make the PDF bookmarks to display:               1. Level 1         1.1. Level 2             1.1.1 Level 3     2. Level 1      The bottom line is that I want them to have independent level depths, if that's possible.


title: Are there good resources for converting TeX type files to spoken word?

text: For a variety of reasons I am very interested in having audio versions of various texts. In some cases I can get these texts in LaTeX format (with equations). Obviously I can use "normal" text-to-speech programs for reading ascii plain text or pdf/ps OCR produced ascii. Unfortunately this renders the mathematics nearly unintelligible. Are there are any programs or packages specifically designed for rendering either TeX code generally, or math-oriented TeX code specifically, into text- to-speech friendly forms?


title: Left-align {align} environment

text: I have a problem writing my report in LaTeX. I dearly need this block of equations to be aligned on the left side of the page, in fact I want all my equations to be left-aligned and have the option of centering, right-aligning specific {align} blocks. How do I do this? The following code is right- centered and parts of my equation is actually out of the page..               \begin{align}     u(x+\Delta x, t) = u(x,t) +\frac{\partial u(x,t)}{\partial x}\Delta x +\frac{\partial u(x,t)}{\partial t}(t-t) + \frac12\frac{\partial^2 u(x,t)}{\partial x^2}(\Delta x)^2 \\+ \frac{\partial^2u(x,t)}{\partial x\partial y}(t-t)(\Delta x)^2 + \frac12\frac{\partial u(x,t)}{\partial^2t}(t-t)^2 +(...)\Delta x^3 +(...)\Delta x^4 \intertext{Seeing powers of t dropping in expansion around $x\pm\Delta x$}\\     u(x-\Delta x, t) = u(x,t) -\frac{\partial u(x,t)}{\partial x}\Delta x +  \frac12\frac{\partial^2 u(x,t)}{\partial x^2}(\Delta x)^2 -(...)\Delta x^3 +(...)\Delta x^4\\     \left[\frac12\frac{\partial^2 u(x,t)}{\partial x^2}(\Delta x)^2+ \frac12\frac{\partial^2 u(x,t)}{\partial x^2}(\Delta x)^2\right] = u(x-\Delta x, t) + u(x+\Delta x, t) - u(x,t) - u(x,t) + O(\Delta x^4)     \intertext{Odd powers of $\Delta x$ cancelling eachother}\\     \frac{\partial^2 u(x,t)}{\partial x^2} = \frac{u(x-\Delta x, t) + u(x+\Delta x, t) - 2u(x,t)}{\Delta x^2} + O(\Delta x^2)     \end{align}      Is there a way to indent a copy-paste autoamtically in here without spacing each line with 4 whitespaces? That isn't working because the browser is keeping the formatting of my copy-paste so some lines can't be indented unless I do each line by hand. This looks ugly, very ugly.


title: Hyphenation of bibliographies with multiple languages using xelatex,xgreek and biblatex

text: I am trying to use XeLaTeX to produce a document written in Greek that includes both English and Greek bibliography. i am using for this purpose a combination of xgreek, biblatex packages and biber. The problem that I have is that xelatex seems to ignore the hyphenation field in the bib. Here is an example of the style file i am using:               \RequirePackage{xltxtra}  % loads fixltx2e, etex, xunicode, fontspec     \RequirePackage{xgreek}   % for greek documents     \RequirePackage[language=greek,backend=biber,     bibencoding=utf8,natbib=true,bibstyle=authoryear,     citestyle=authoryear,babel=hyphen]{biblatex}      and here is an example of the bibliography:               @article{Ritchie_07,     Author = {Bob Ritchie and Esamaddin Khorwatt},     Journal = {The English Accounting Review},     Hyphenation = {english},     Language = {english},     Pages = {39--59},     Title = {The attitude of Libyan auditors to inherent control risk assessment},     Volume = {39},     Year = {2007}}      The problem is that I can have either hyphenation of greek bibliographies and not english, or vice-versa. I can't have both. I am using MikTeX 2.8. Any feedback will be greatly appreciated


title: How to use each of the following operators defined in pst-tools?

text: I cannot find any documentation explaining how to use each of the following operators defined in `pst-tools`. ![enter image description here](http://i.stack.imgur.com/i1pFv.png) Could you give practical examples (such as simplifying vector addition               \pnode(2,2){A}     \pscircle(A){2}     \pstVerb{/xyxyadd {3 2 roll add 3 1 roll add exch} bind def}%     \pnode(!2 60 PtoC N-A.x N-A.y xyxyadd){B}      that is equal to `\nodexn{(A)+(2;60)}{B}` where `\pnode(2,2){A}`) for each operator? I believe that the given answer will be useful for most of us. ## Edit: The real scenario is to apply complex number addition to simplify method 5 and method 6 in the following answer.


title: Manual bibliography, separated or multiple parts

text: I'm creating a manual bibliography, but it needs to be divided into sections. The solutions I thought might be applicable:   * Add `\textbx{"Literary works"}`, `\textbx{"Web references"}`, etc. between `\bibitem{}` items. This does not work, since an error is reported.   * Insert separate bibliographies and label them accordingly (which I don't know how to do). Any help / other suggestions appreciated.


title: looping in tabular

text: I am curious to know why the following failed. A similar thread is on comp.text.tex unanswered. Of course, other manipulations of `\whileexpr` work, but why does this fail?               \documentclass{article}     \makeatletter     \def\whileexpr#1\do#2{%       #1#2\expandafter\@iden\else\expandafter\@gobble\fi       {\whileexpr#1\do{#2}}%     }     \newcount\colnum     \newcommand\generaterow[2]{%       \colnum\z@       \whileexpr\ifnum\colnum<#2\relax\do{%         #1\advance\colnum\@ne\the\colnum\relax       }%     }     \makeatother          \begin{document}     % Test (worked):     \generaterow{x}{3}% -> x1x2x3          % Failed:     \begin{tabular}{|*{4}{c|}}       \hline       x\generaterow{&}{3}\\\hline     \end{tabular}          \end{document}


title: Creating a line of given length with variable number of "snags" equally separated (TikZ)?

text: I want to achieve the following in TikZ: ![enter image description here](http://i.stack.imgur.com/7W1qU.png) To get the exact width of the line I have no issues with - the problem lies in adding an arbitrary number of snags along the line which are equally distanced apart. I would also like to be able to add text between the snags (like 0, 1, 2, ..., but that's just an example) And I don't want to add and position the snags manually because I believe TikZ will do a much better job for me. But how?


title: List (at run time) the macros that are currently defined

text: TeX of course knows at any time what control words and symbols are defined. Is it possible to access this information, for example at the end of a run? _Edit: the answer for pdfTeX is no, since the list of control sequence names is only stored in the string pool, which is not accessible from the TeX run. The answer for XeTeX is currently yes, because of a bug (see my answer). The answer in LuaTeX is probably yes, but it would be great to have an actual implementation._ I will thus have to do what I planned differently (for this, the `cmdtrack` package should help). What I wanted to use the list of macros for is essentially a duplicate of this question: expanding some macros inside the LaTeXsource.


title: Chapter number on page header is not updated in LaTeX document

text: I have a small technical problem but I have been unable to find a solution to it so far. In my thesis document, the chapter numbers that are displayed on page headers are not updated. It keeps on showing "Chapter 1. Some_Chapter_Name" as header. The reason I don't understand is that the chapter numbers on the first page of each chapter is properly incremented but not as page headers for next pages. Any help will be much appreciated. I am attaching the complete style code for my LaTeX document later on. I believe this is the relevant section to the problem: **=============== SHORTER VERSION =================**               % Set up the document     \documentclass[a4paper, 11pt, oneside]{Thesis}  % Use the "Thesis" style, based on the ECS Thesis style by Steve Gunn          %% Chapter Heading ---------------     \renewcommand{\chaptermark}[1]{\btypeout{\thechapter\space #1}\markboth{\@chapapp\ \thechapter\ #1}{\@chapapp\ \thechapter\ #1}}               \usepackage{amsmath,amsfonts,amssymb,amscd,amsthm,xspace}     \theoremstyle{plain}     \newtheorem{example}{Example}[chapter]     \newtheorem{theorem}{Theorem}[chapter]     \newtheorem{corollary}[theorem]{Corollary}     \newtheorem{lemma}[theorem]{Lemma}     \newtheorem{proposition}[theorem]{Proposition}     \newtheorem{axiom}[theorem]{Axiom}     \theoremstyle{definition}     \newtheorem{definition}[theorem]{Definition}     \theoremstyle{remark}     \newtheorem{remark}[theorem]{Remark}     \usepackage[centerlast,small,sc]{caption}     \setlength{\captionmargin}{20pt}          \usepackage{graphicx}     \usepackage{epstopdf}     \usepackage[scriptsize]{subfigure}     \usepackage{booktabs}     \usepackage{rotating}     \usepackage{listings}     \usepackage{lstpatch}     \usepackage{lscape}     \usepackage{longtable}     \usepackage{supertabular}     \usepackage{algorithmic}     \usepackage{algorithm}          \usepackage[pdfpagemode={UseOutlines},bookmarks=true,bookmarksopen=true,        bookmarksopenlevel=0,bookmarksnumbered=true,hypertexnames=false,        colorlinks,linkcolor={blue},citecolor={blue},urlcolor={red},        pdfstartview={FitV},unicode,breaklinks=true,        plainpages=false,pdfpagelabels,         pagebackref]{hyperref}      The Thesis template and an example document can be found on http://www.sunilpatel.co.uk/thesis-template/.


title: Own Section command working numbered and unnumbered

text: I use the following command to have section headings with subtitles               \newcommand{\Section}[2]{\section[#1]{#1\\\small »#2«}}      But now I only can have numbered sections because the * doesn't work for my own command. How can I have my command working both ways, with and without the asterisks?


title: Speed of LaTeX compilation: Linux versus Windows 7

text: Is it everybody's experience that LaTeX documents compile much more slowly on Windows 7 than on Linux generally, all things being equal? Is speed of compilation affected by the LaTeX editor I use, or Tex distribution? System: Win 7 32/64-bit | Xubuntu 11.04 32-bit | Kubuntu 64-bit Editor of choice: TexWorks


title: Pass keyval string option to babel

text: How to pass a keyval string option given to my package to babel? I load my package with               \usepackage[languages={ngerman,english}]{mylang}      In package mylang I want to handle this optional languages parameter and hand it over to babel. If the option is missing I want to define a default value. My attempt:               \usepackage{kvoptions}     \DeclareStringOption{languages}[english,ngerman]      But how to go on from there? I think the default value is set correctly but how to hand it over to babel now? Do I need to run the default process option routine? For a non keyval value I would use               \DeclareOption{languages}{\PassOptionsToPackage{\CurrentOption}{babel}}     \DeclareOption*{\OptionNotUsed}


title: Including same PDF image many times: how to optimize?

text: I am include (with `graphicx`’s `\includegraphics`) the same small PDF vector graphics many many times in my LaTeX file, always at the same size. I then compile my document with `pdflatex`. While the size of the resulting PDF file is not an issue, it seems from the log file and my timing experiments that processing the PDF graphics so many times takes a lot of time, making my compilation slow. It seems something could be done, especially as the resulting object is always used at the same size. So, what can I do to help `pdflatex` go faster?


title: apsr.bst - Volume in bold but without number

text: I try to change a bst-file (American Political Science Review). At the moment the output looks like: > Rose, Gideon. 1998. “Neoclassical Realism and Theories of Foreign Policy.” > _World Politics_ 51(1):144–172. but I need it like this: > Rose, Gideon. 1998. “Neoclassical Realism and Theories of Foreign Policy.” > _World Politics_ **51** :144–172. So without the number, but the volume bold. The function in the bst file should be the following I think:               FUNCTION {format.vol.num.pages}     { volume field.or.null       number empty$         'skip$         { "(" number * ")" * *           volume empty$         { "there's a number but no volume in " cite$ * warning$ }         'skip$           if$         }       if$       pages empty$         'skip$         { duplicate$ empty$         { pop$ format.pages }         { ":" * pages n.dashify * }           if$         }       if$     }      How do I change that in order to get the second example?


title: Section titles, hyphenation, manual line breaks - and how to avoid them

text: I have several section titles in my document that are getting hyphenated, which is quite ugly. I am now looking for some way to avoid the hyphenation, which is is somewhat related to this question, but unfortunately my titles have to be centered (so `raggedright` is not an option), and adding `\sloppy` to my `titlesec` definition of the subsection format didn't help:               \newcommand{\trailthesubsection}[1]{\MakeUppercase{#1} (\thesubsection)}     \titleformat{\subsection}         {\normalfont\fontsize{15pt}{16pt}\bfseries\sffamily\sloppy} % <- "sloppy" didn't help.         {}         {0pt}         {\filcenter\trailthesubsection}      I _could_ , of course, set manual linebreaks - but in order _not_ to destroy the layout of my TOC in the process, I would have to use the optional parameter to the section commands:               \subsection[Could do this but it is not nice]{Could do this\\ but it is not nice}      Isn't there some way to suppress hyphenation for a given text (e.g. by some command in the `\titleformat`), or to suppress manually-set linebreaks in the TOC?


title: Can I make write18 send command lines to Cygwin bash instead of Windows command interpreter?

text: I am using Windows 7, Cygwin (CYGWIN_NT-6.6-WOW64), and MiKTeX 2.9. I am trying to compile a document of a friend of mine who has written a specific document class file (.cls), a class that is able to run Python code from the document LaTeX source (.tex) and include its output in the document (maybe along with the Python code). I want (in a sense, I need) to write my own documents using that class. My friend works on Linux, and I try to compile his document from a Cygwin terminal by using `pdflatex --enable-write18 thedocumentfile.tex` (indeed, my command line is `PATH=.:$PATH pdflatex --enable-write18 thedocumentfile.tex`). If I search for `latex` packages in my Cygwin Setup, I only find `texlive- collection` ones, not installed, so I guess `pdflatex` is calling a latex-to- PDF compiler version in a MiKTeX 2.9 package called `miktex-pdftex-base-2.9`. I think this is what I want, just one LaTeX distribution (MiKTeX) installed in my machine. But compilation fails because command lines passed as arguments to `\write18` are written to be interpreted by a `bash`, but my compilation attempts send them to a Windows command interpreter. I don't know if it is possible to instruct my compiler not to pass command lines to the Windows interpreter, but to the `bash` shell of Cygwin. I hope it will. Does anybody know how?


title: How to TeX like this

text: This page is what I am referring to. I have often wondered how journals TeX their articles like this, and the trick that I have tried in the past of saving the pdf and looking at the info with Preview (on a Mac) doesn't provide me with any additional information.


title: Short harvard citation?

text: I need to cite the following way: The first 3 Letters of the author + the year. Example: > Kemper 2009 --> [Kem09] But I don't have any clue how to do that!


title: How to color my (custom) lines/rules in a table contained by mdframed?

text: As a follow up to my recent question: Now I'd like to put some color on to that line/rule. In the MWE below, `\arrayrulecolor{blue}\mycline{1-1}` throws an error (`undefined control sequence` with respect to `\arrayrulecolor`). How can I make `\mycline` accept a color?               % \PassOptionsToPackage{table}{xcolor}          \documentclass[a4paper]{article}          % \usepackage{booktabs}     % \usepackage{array}           \newlength{\mycustomlength}      \settowidth\mycustomlength{blaaaaaaaa}          \makeatletter     \def\mycline#1{\expandafter\my@cline\@cline#1\@nil}          \def\my@cline#1\leaders#2\hfill{%     #1\hfill\leaders#2\hskip\mycustomlength\hfill\kern\z@}     \makeatother          %%%%%%%%%%%%%%%%%%%%%%%%          \usepackage[framemethod=TikZ, xcolor=RGB,table]{mdframed}          % \usepackage[RGB]{xcolor}     \definecolor{mycolor}{RGB}{0,111,222}          \mdfsetup{skipabove=\topskip,skipbelow=\topskip, nobreak=true, innertopmargin=0.5\baselineskip, innerbottommargin=0.5\baselineskip, frametitleaboveskip=3pt, frametitlebelowskip=2pt, skipabove=\topskip,skipbelow=\topskip}          \mdfdefinestyle{my_style}{%          linecolor=mycolor,middlelinewidth=0.7pt, frametitlebackgroundcolor=mycolor}          \usepackage{tabularx}          \usepackage{multirow}          %------------------------------------          \begin{document}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \begin{mdframed}[style=my_style,frametitle=\color{white}{OOO}]          \begin{tabularx}{\textwidth}{@{}*{1}{|p{\mycustomlength}|}*{1}{X}@{}}          \textbf{AAAAAA} & \\     \mycline{1-1}     %%%\arrayrulecolor{blue}\mycline{1-1}     % \cline{1-1}     aaaaaaaaa & \textbf{aaaa} \\     aaaa & \textbf{aa} \\     \\     \textbf{BBBB} & \\     % \rule{\mycustomlength}{0.4pt}     % & \\     % \\     % \cline{1-1}     \mycline{1-1}     bbb & bbbbbbbbb \textbf{b} \\     bbbbb & \textbf{B} \\               \end{tabularx}     % \end{tabulary}          \end{mdframed}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          % \lipsum          \end{document}      Cf. also:   * Clash among packages? and   * How to use table in mdframed? Note that _in theory_ `mdframed` should load `xcolor` which in turn should load `colortbl` _(cf. the resp. documentation files)_. But there seem multiple ways of calling these packages; and apart from _how_ they are called/loaded the order in which they are called/loaded also matters...


title: Page-specific \nomlabelwidth in nomenclature

text: In order to keep symbols and descriptions in a nomenclature with the `nomencl` package vertically aligned, `\nomlabelwidth` has to be set to the maximal symbol width. This has effect on the whole nomenclature layout. Is it possible to adjust the nomenclature description width, i.e. the horizontal spacing between symbols and descriptions, individually for each page of the nomenclature? In the following MWE, how can the symbol width be enlarged only on the right page for symbol `YYYYYYYYY` , so that the descriptions are vertically aligned?               \documentclass{scrbook}          \usepackage[ngerman]{babel}      \usepackage[T1]{fontenc}     \usepackage[ansinew]{inputenc}     \usepackage{nomencl}          \makenomenclature          \setlength{\textheight}{5cm}     \setlength{\nomlabelwidth}{2cm}     \renewcommand{\nomname}{}          \begin{document}          \nomenclature{AAAA}{Description ...}%     \nomenclature{BBBB}{Description ...}%     \nomenclature{CCCC}{Description ...}%     \nomenclature{DDDD}{Description ...}%          \nomenclature{XXX}{Description ...}%     \nomenclature{YYYYYYYY}{Description ...}%     \nomenclature{ZZZ}{Description ...}%          \printnomenclature          \end{document}      ![enter image description here](http://i.stack.imgur.com/UIa1t.png)


title: How to color the font of a single row in a table, while using a paragraph column?

text: I tried to color the text of the headers of my tables. Sadly it doesn't work properly as soon as you use it with paragraph columns. Below is my MWE presented. The `header` in the first table is as I want it to be. Unfortunately the table is too long, so I need a paragraph column for the right column. But when I use this, I get problems with the layout (see second table in picture). Can anyone tell me, why this happens and/or how to correct it?               \documentclass{article}          \usepackage{array}     \usepackage{xcolor}          \makeatletter          \newcommand*{\@rowstyle}{}          \newcommand*{\rowstyle}[1]{% sets the style of the next row       \gdef\@rowstyle{#1}%       \@rowstyle\ignorespaces%     }          \newcolumntype{=}{% resets the row style       >{\gdef\@rowstyle{}}%     }          \newcolumntype{+}{% adds the current row style to the next column       >{\@rowstyle}%     }          \makeatother          \begin{document}          \begin{tabular}{=l +l}       \rowstyle{\color{red}}     Kategorie & Behandelte Frage(n) \\     \bfseries Usability & Ist das System einfach und intuitiv zu bedienen?\\     \bfseries Adaptability & Kann man das System an die eigenen Prozesse anpassen? Gibt es     eigene Workflows und Felder?\\     \end{tabular}          \vspace{25pt}          \begin{tabular}{=l +p{9cm}}       \rowstyle{\color{red}}     Kategorie & Behandelte Frage(n) \\     \bfseries Usability & Ist das System einfach und intuitiv zu bedienen?\\     \bfseries Adaptability & Kann man das System an die eigenen Prozesse anpassen? Gibt es     eigene Workflows und Felder?\\     \end{tabular}          \end{document}      ![MWE with 2 Tables](http://i.stack.imgur.com/Ga7wc.png)


title: Why does coordinate (X) [midway] doesn’t work, while coordinate [midway] (X) is fine?

text: Why doesn’t the `coordinate` see the options if they are behind the name? With `nodes` it makes no difference wether the options follow or precede the name.               \documentclass{article}     \usepackage{tikz}          \begin{document}     \begin{tikzpicture}         \draw (0,3) -- ++(5,0) node (A) [midway] (A) {};         \draw (0,2) -- ++(5,0) node (B) [midway] {};         \draw (0,1) -- ++(5,0) coordinate [midway] (C);         \draw (0,0) -- ++(5,0) coordinate (D) [midway];         \foreach \C in {A,B,C}             \fill (\C) [green!70!black] circle [radius=1pt] node [above] {\C\ is ok};         \fill (D) [red!70!black] circle [radius=1pt] node [above] {D is not};         \fill (2.5,0) [green!70!black] circle [radius=1pt] node [above] {D};     \end{tikzpicture}     \end{document}      ![coordinate options](http://i.stack.imgur.com/NQw1r.png) The point `D` should be in the middle of the line as the others but it seems like the `coordinate` can’t see the `midway` option. I guess the reason is the way how TikZ parses a coordinate (starting with `coor…` ending with `…)`?) but I wonder if this is a bug and should be reported …


title: I want to put bar over a alphabet, but outside in math mode. how do I do it?

text: I am trying to write bar symbol with some alphabets inside \begin{equation} \end{equation} like this,               \begin{equation}          H \bar{k}           \end{equation}      I have more than one alphabet to give bar. I've showed only one though. It shows a lot of error as it is in out of math mode. How do I give bar in this equation mode?


title: Appendix changes sections and figures numbering

text: I don't know how to face a strange behavior caused by the appendix package. I'm using KOMA-Script book class and many other packages (see here: http://pastie.org/1728702) When I add an appendix (not the package, the `\appendix` command or the appendix block) at the end of the document, figures and sections get a final dot. For example > Fig 5.4.: > > 5.1. Section title > > 5.1.1. Subsection title Has anyone already experienced this problem?


title: How can I prevent LaTeX from breaking words and wrapping them to the next line?

text: I want to have my entire document fully justified but without the words being broken up and hyphenated at the end of a line if it is too long. I have come across the `\raggedright` argument which prevents the hyphenation, but I'm not sure how to then justify the text.


title: Beamer: uncovering itemize so the first slide shows no items at all

text: How can I achieve in `beamer` that the first slide of each frame is void (that is, only displays the frametitle)? Suppose I have the following frame:               \frame{\frametitle{Title}     \begin{itemize}     \item<1-> A     \item<2-> B     \end{itemize}     }      Now I want to achieve that on the first slide only the title is displayed and the overlays already specified are accordingly shifted by one (without changing the overlay numbers already specified). The background is that I have already specified many overlays. Adding +1 to all overlay numbers manually would be a nuisance. Hence I want to tell beamer at the beginning of each frame that it shall pause one slide before starting with the already existing overlays.


title: How to specify left and right node of a tikz-qtree

text: I'm drawing a binary tree using `tikz-qtree`. In my binary tree the order of children is **important** , so I need distinguish which edge is the left one and the right one. In my sample code I can't distinguish if the node 1 is left or right. There is a way to specify this?               \documentclass[demo]{article}     \usepackage{tikz,tikz-qtree}     \begin{document}     \begin{figure}[ht]\begin{center}\begin{tikzpicture}[grow'=up]     \Tree [.\node(8){8};             [.\node(5){5};                    [.\node(3){3};                       \node(1){1}; ]                     \node(6){6}; ]                   \node(12){12}; ]     \end{tikzpicture}\end{center}\end{figure}     \end{document}      ![enter image description here](http://i.stack.imgur.com/oJ8tp.png)


title: LaTeX Presentation Cubic transition effect

text: I have seen some presentations that use a kind of cubic effect when moving between pages. For instance, suppose you have a cube and every page is a side of the cube, then when moving from page one to page two, the page is changed with 3d effect of turning the cube from edge to edge. I know the presentation is typeset in LaTeX but I don't know this feature is LaTeX relevant or not.   How can I have that 3d effect in LaTeX presentation?


title: fancy verbatim - bold letters for the first 4 columns

text: I am writing a book on Python and IPython. I want to insert in this book code listings of Python and IPython. For the code itself I have no problem customizing listings for my intents. Including code from IPython is a bit more tricky. I would like to make the `In [x]:` and `Out [x]:` of IPython in bold. For that I used so far the package `fancyvrb`, like that:               \begin{ipython}     \textbf{In [20]:} FirstQ*2     \textbf{Out[20]:} ['Jan', 'Feb', 'Mar', 'Jan', 'Feb', 'Mar']          \textbf{In [21]:} SomeList=[0]*6          \textbf{In [22]:} SomeList     \textbf{Out[22]:} [0, 0, 0, 0, 0, 0]     \end{ipython}      However it's a bit annoying to type the `\textbf` everytime for all the `In`'s and `Out`'s. Can some one point a way in which I can define that first X columns in a verbatim environment are made in bold ? I also tried with listings that:               \lstset{classoffset=0,             morekeywords={In, Out,27},keywordstyle=\textbf,         classoffset=1             }     \begin{lstlisting}     In [27]: x=2     \end{lstlisting}      but only the words In and Out are made in Bold not the number and the brackets ... Maybe I am asking the wrong question also ? Any insights on that will be welcomed ...


title: Number on all pages of table of content

text: I have this issue with a LaTeX document: I want to have page numbers on every page of the `Table of Content`. In my case the ToC is displayed across two pages because of many chapters in the text, but the first page of the ToC does not show a page number (the second page does). I generate the ToC like this:               \newpage     \pagestyle{plain}     \setcounter{page}{5}     \tableofcontents


title: minipage within fullwidth

text: I'm using Marco Daniel's `fullwidth` package, detailed in this answer. I want all of my text in `fullwidth` to be inseparable (and to begin and end with long black lines), so I am currently doing the following:               \documentclass[11pt,a4paper]{memoir}          \usepackage[outermargin=-4cm,]{fullwidth}          \begin{document}          \begin{minipage}{\linewidth}     \begin{fullwidth}[width=\linewidth+4cm]     \medskip          This is very long, but because it is in the fullwidth environment,     it extends into the full length of the page     before a line break occurs.          \medskip     \end{fullwidth}     \end{minipage}          \end{document}      This works, but it does give me the following warnings: > " fullwidth uses option nobreak Warning: \def on input line 15" > > "Package fullwidth Warning: The environment is empty (fullwidth) on input > line 15." along with an > "Overfull \hbox"... These warning do not occur when I remove the `minipage` command. What is causing these warning, and how can I get rid of them? Also, can I define a macro so that whenever I just write `\begin{fullwidth}`, LaTeX will automatically do `\begin{minipage}{\linewidth} \begin{fullwidth}[width=\linewidth+4cm] \medskip`? UPDATE: @cmhughes provided a perfect solution to the "define a macro" question. However, his use of the `nobreak` option in `fullwidth` instead of using `minipage` doesn't work. Here's the gist of the problem with it: If I use `[leftmargin = -4cm]` OR `[outermargin = -4cm]`, then the `fullwidth` text extends into the correct margin (the outer margin) on odd pages, and the incorrect margin (the inner margin) on even pages. If I use `[rightmargin = -4cm]` OR `[innermargin = -4cm]`, then the `fullwidth` text extends into the correct margin (the outer margin) on even pages, and the incorrect margin (the inner margin) on odd pages. Herein lies the problem: the `nobreak` option messes up relative positioning, so that `outermargin` and `innermargin` only behave like `leftmargin` and `rightmargin`. Please read the comments on his answer for a more detailed discussion. As of now, I'm looking for something that can fix the warnings given by using `minipage`, or that can use the `nobreak` option correctly...


title: Names with Apostrophes in Bibtex

text: I am putting together a paper, and an author in the citations has a name with an apostrophe. When I compile the pdf, the apostrophe is dropped, rendering the name from D'Urso to DUrso. How do I force BibTex to respect the apostrophe?               @article{HPdura,         author = "B D’Urso",         title = "title",         year = "year",         journal = "Journal",         volume = "volume",          Pages  = "pages",     }      which gives in the .BBL               \bibitem{HPdura}      B.~D’Urso, Title, Journal Volume (year) pages.      which gives in the PDF               B. DUrso, title, Journal volume (year) pages.


title: Allow/force word wrapping at ideographic spaces

text: I am making a set of flashcards to help me practice my kanji, and the format I want is quite simple: On the front, I'll have the character, and on the back I will have its meanings and readings (with _on_ -readings and _kun_ -readings on separate lines). I'm using a very nice document class `flacards` for that, and that works well. The problem is that some cards are going to have a _lot_ of readings; so many that the list has to wrap. Right now, it's just breaking when the next character doesn't fit (four last lines in image): ![undesirable word wrapping](http://i.stack.imgur.com/5Lt7e.png) The spaces between each reading is U+3000 IDEOGRAPHIC SPACE ( ), and I would like XeLaTeX to treat that character as a space for word wrapping, so it doesn't break the line in the middle of a reading. In other words, the result should look closer to this (manually constructed example): ![desirable word wrapping](http://i.stack.imgur.com/29M0o.png) ...but it must satisfy these criteria:   * No manual wrapping (if the card gets wider, the line must reflow automatically)   * Spaces that get removed for wrapping must _not_ be rendered (in the image above, they are)   * Spaces rendered between individual entries must have exactly the same width as the ideographic space would (even if the font is changed), but it does not have to be an actual ideographic space character in the resulting PDF (however, it would be preferable to have the correct character in there) The exact entry format is not fixed and may be changed if desirable, as long as the desired spacing is achieved. MWE:               \PassOptionsToPackage{a4paper}{geometry}     \documentclass[frontgrid,backgrid]{flacards}     \usepackage{xeCJK}     \setCJKmainfont{MS Gothic}     \renewcommand{\cardtextstylef}{\Huge}     \renewcommand{\cardtextstyleb}{}     \begin{document}     \card{明}{bright, clear\\ メイ　ミョウ\\ あ（かり）　あか（るい）　あか（るむ）　あか（らむ）　あき（らか）　あ（ける）　-あ（け）　あ（く）　あ（くる）　あ（かす）}     \end{document}


title: Is it possible to use \index{\command} inside a \DeclareDocumentCommand?

text: So I've been writing a book of sorts where I've used `xparse` to create some commands and environments. Now, when the thing is almost done, I realised a index would be great to have! One of the environments I've created takes an argument and gives a nice little box with a argument as title. All of these boxes uses the form `foo: bar` as titles, and i want to index `bar`. I realised `xstring` could help me and tested `\index{\StrBehind{foo: bar}{:}}` which works without a hassle (see MWE), but when i declare the command               \DeclareDocumentCommand \cutindex {m}{\index{\StrBehind{#1}{:}}}      I get the error               ! Argument of \reserved@a has an extra }.     ---Mumbo which is better to read from MWE---     ! Paragraph ended before \reserved@a was complete.      I've also tried using a temporay command to save the string, but this does not work either.               \newcommand{\tempor}{}     \DeclareDocumentCommand \cutindex {m}{     \renewcommand{\tempor}{\StrBehind{#1}{:}}     \index{\tempor}     }      I've come to the conclusion that `\index{\command}` does indeed work in ordinary text, but not in `\DeclareDOcumentCommand` (or `\newcommand`). Is it possible to bypass this restriction somehow? MWE:               \documentclass{article}     \usepackage{xstring}     \usepackage{makeidx}     \usepackage{xparse}          \DeclareDocumentCommand \cutindex {m}{\index{\StrBehind{#1}{:}}}          \makeindex          \begin{document}     This works! \index{\StrBehind{Foo: Bar}{:}}          This does not work! \cutindex{Bar: Foo}          \printindex     \end{document}


title: How to improve simple macros to leave the surrounding text justification undisturbed

text: I have prepared a series of macros in order to simplify the incorporation of pictures into long documents. All of them are based onthe MWE below. However I have just noticed that the text following the pictures is no longer justified properly on the right margin. What is the good way to correct this? Obviously I would like the macros calling pictures to be neutral regarding the surrounding text.               \documentclass [draft]{article}     \usepackage{lipsum}     \usepackage[draft]{graphicx}      \newcommand{\ThreePicturesThreeCaptions}[7]{%     %Usage[7 arguments]{file1}{caption1}{file2}{caption2}{file3}{caption3}{global-caption}     \centering     \begin{figure}[htbp]     \centering     \begin{minipage}[b]{.3\textwidth}     \centering     \includegraphics[width=.98\linewidth] {#1}\caption {#2}     \end{minipage}     \begin{minipage}[b]{.3\textwidth}%     \centering     \includegraphics[width=.98\linewidth]{#3}\caption {#4}     \end{minipage}     \begin{minipage}[b]{.3\textwidth}     \centering     \includegraphics[width=.98\linewidth]{#5}\caption {#6}     \end{minipage}     \caption{#7}     \end{figure}     \raggedright     }%          \begin{document}     \lipsum[1]     \ThreePicturesThreeCaptions {144415-0009.jpg}{contacts \#22}{144615-0012.jpg}{contacts  \#16}{143207-0005.jpg}{\label{Quadrax}quadrax}{\label{ThreePictures}Typical picture layout generated for a laboratory report}     \lipsum[1]     \end{document}


title: Reverse order of fields "note" and "url" for entry types "electronic" and "article" (biblatex)

text: I use biblatex for the table of contents with:               \usepackage[bibstyle=authoryear, autocite=footnote, citestyle=authoryear-icomp, backend=biber]{biblatex}      I have several entries with fields `url` and `note`. (e.g. the types `electronic` (a.k.a. alias type `online`) or type `article` contain an `url` field). In the PDF output the `note` field always comes before the `url`, however I would like to have it the other way around, that is, the `url` first followed by `note`. For example:               @ELECTRONIC{Lorey2008,       author = {Isabell Lorey},       year = {2008},       title = {Kritik und Kategorie},       note = {Last retrieval at May 21, 2012.},       url = {http://eipcp.net/transversal/0806/lorey/de}     }      Prints in PDF as: > Lorey, Isabell (2008). Kritik und Kategorie. Last retrieval at May 21, 2012. > URL: http://eipcp.net/transversal/0806/lorey/de. However I want it to be: > Lorey, Isabell (2008). Kritik und Kategorie. URL: > http://eipcp.net/transversal/0806/lorey/de. Last retrieval at May 21, 2012.


title: The use of enumerated options

text: I am not sure what would be the `best-practice` approach to type setting an observation that has an `enumerate` list. For instance, consider:               \documentclass{article}     \usepackage{enumitem}     \begin{document}     A bunch of text here. Obsevations     \begin{enumerate}     \item     \item     ...     \end{enumerate}     \end{document}        1. Should I set it up as shown in the MWE?   2. Should I bring it down and:              \noindent Observations:     \begin{enumerate}     \item     \end{enumerate}        3. Should I keep it as the MWE but add `:` after observations?   4. Maybe this should be inline? I am too sure on how this would or should be handled. Is there a universal or a few standard approaches? * * * Maybe an image of what it could look like will help (this is option 2): ![enter image description here](http://i.stack.imgur.com/9c2da.png)


title: pdflscape fails to rotate page containing only a float

text: I'm using `pdflscape` to place some landscape pages in a long portrait document, because it contains some very wide floats. However, when a float is so big that it needs its own page, it is no longer rotated correctly: The following code:               \documentclass{article}     \usepackage{pdflscape}     \usepackage{lipsum}          \begin{document}     \lipsum[1-4]          \begin{landscape}     \lipsum[5-6]          \begin{figure}     \lipsum[7-8]     \caption{Some text, rotated correctly.}     \end{figure}          \begin{figure}     \lipsum[9-12]     \caption{Some more text, wrong side up.}     \end{figure}          \end{landscape}          \end{document}      Produces that output: ![PDF output](http://i.stack.imgur.com/twuEs.png) How can I correctly rotate float-only pages?


title: The first character uppercase

text: How can I typeset this in LaTeX: ![](http://i1299.photobucket.com/albums/ag69/Vu_Dang_Tung/Untitled_zps8f97fd28.png)


title: How to expandafter an environment?

text: I have the following problem: I want to create a beamer presentation and introduced a new environment using `xparse`. The environment has one optional argument (+ two mandatory). Now I want to create an overlay effect such that on frame 1 the optioal argument is of a value and on frame 2 it should be not there. I thought of something like               \begin{MyEnv}{...}\alt<2->{}{[a]} ...      This leads not to the expected behavior as `\alt` is evaluated after the environment is opened. I thought of adding `\expandafter` before the `\begin{MyEnv}` but that did not help. Below is a minimal working example. One idea was to use the empty string to indicate that no argumnt is given. This is critical as the argument seems to be incorrctly expanded. There ia a second question about the described problem.               \documentclass[a4paper,10pt]{article}     \usepackage{xparse}     \NewDocumentEnvironment{MyEnv}{m O{x}}{Start (#1, #2)\par}{\par End}     \newcommand{\argument}{[o]}     \begin{document}     \begin{MyEnv}{a}     OK     \end{MyEnv}          \begin{MyEnv}{a}[b]     OK     \end{MyEnv}          \begin{MyEnv}{a}\argument{}     Not OK (should be a,o)     \end{MyEnv}     \end{document}


title: Accessing the Fancy /es/ Ligature Without Lua-/Xe-Latex

text: ![enter image description here](http://i.stack.imgur.com/1qNWR.png) This is in LuaLaTeX with `fontspec` and `\setmainfont{EB Garamond}`. The first is rendered for `\emph{es}` and the second separates the letters with `\emph{e\mbox{}s}`. I find the former ligature very attractive in text. Now I often use `\usepackage{ebgaramond}` to use the same font, but it no longer produces this ligature. Is there a way to access this ligature manually?


title: Clash amsthm and hyperref

text: The program below shows a problem with `hyperref` and `amsthm`. Not really a problem for me, since I don't use `amsthm` anyway so I just threw it out, but still it took me quite some time to figure it out. At the office I didn't have this problem, by the way. I use TeXworks and pdfLaTeX, and updated all packages involved to the latest versions. Hope this is enough info to get the problem fixed.               \documentclass{article}     \usepackage{amsthm}     \usepackage{hyperref}     \begin{document}     hi     \end{document}      This leads to the error:               This is pdfTeX, Version 3.1415926-1.40.11 (MiKTeX 2.9)          ....  irrelevant output deleted   ....          ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\00miktex\hyperref.cfg")     (C:\Users\Rob\AppData\Roaming\MiKTeX\2.9\tex\latex\url\url.sty)     ! Undefined control sequence.     <argument> ...}}[]}\fi \@tempa }\fi \dth@everypar                                                        ={\@minipagefalse \global ...     l.7379 }{}


title: add text in the middle of the cover page

text: I found this code in the "cld-mkiv.pdf" manual writing by Hans Hagen. I would like to put some text in the middle of the cover page but i don't know how. I think that i need to define a overlay.               \starttext          \startluacode      local todimen, random = number.todimen, math.random     context.startTEXpage()     local paperwidth = tex.dimen.paperwidth     local paperheight = tex.dimen.paperheight     local nofsteps = 25     local firstcolor = "cyan"     local secondcolor = "white"     context.definelayer(     { "titlepage" },      )     context.setuplayer(     { "titlepage" },     {     width = todimen(paperwidth),     height = todimen(paperheight),     }     )     context.setlayerframed(     { "titlepage" },     { offset = "-5pt" },     {     width = todimen(paperwidth),     height = todimen(paperheight),     background = "color",     backgroundcolor = firstcolor,     backgroundoffset = "10pt",     frame = "off",     },     ""     )     local settings = {     frame = "off",     background = "color",     backgroundcolor = secondcolor,     foregroundcolor = firstcolor,     foregroundstyle = "type",     }          for i=1, nofsteps do     for j=1, nofsteps do     context.setlayerframed(     { "titlepage" },     {     x = todimen((i-1) * paperwidth /nofsteps),     y = todimen((j-1) * paperheight/nofsteps),     rotation = random(360),     },     settings,     "CLD"     )     end     end                    context.tightlayer(     { "titlepage" }     )                 context.stopTEXpage()     return true                    \stopluacode                    \stoptext


title: TeX Live issue after update - `fmtutil.cnf` not found

text: I recently updated TeX Live to following version               TeX 3.1415926 (TeX Live 2013/Arch Linux)      and cannot compile any file anymore, it fails with error               $ pdflatex blab.tex      This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Arch Linux)      restricted \write18 enabled.     ---! /var/lib/texmf/web2c/pdftex/pdflatex.fmt doesn't match pdftex.pool     (Fatal format file error; I'm stymied)      After some research, I found out I am supposed to run `fmtutil --all`, but it also fails with error               $ fmtutil --all     /usr/bin/fmtutil: line 395: /usr/share/texmf/texconfig/tcfmgr: No such file or directory     fmtutil: config file `fmtutil.cnf' not found.      I tried some fixing to no avail: `texhash`, `texconfig rehash` do not change anything, and `kpsewhich fmtutil.cnf` yields `/etc/texmf/web2c/fmtutil.cnf`, as it is apparently supposed to.


title: Infinite Loop in Babel with Rotating Sidewaystable

text: I don't know whether this is a babel or a rotating bug, and I have filed a report with Debian (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=710031), but perhaps someone knows a workaround. The following code results in an infinite loop:               \documentclass[12pt,twoside,openany]{book}     \usepackage[USenglish]{babel}     \usepackage{rotating}          \tracingall          \begin{document}          \begin{sidewaystable}[htbp]\footnotesize     \centering{     \caption{\textbf{babel and sidewaystable}}     \begin{tabular*}{\textwidth}{l l}     Hello &   World \\     \end{tabular*}     }     \end{sidewaystable}          \end{document}      If you turn "sidewaystable" into "table" it works just fine. I encountered one other error with babel after upgrading recently, namely an infinite loop with nicefrac. Any insight, advice? Running with `\listfiles` I get the following.               **File List:**     book.cls    2007/10/19 v1.4h Standard LaTeX document class     bk12.clo    2007/10/19 v1.4h Standard LaTeX file (size option)     babel.sty    2008/07/08 v3.8m The Babel package     english.ldf    2012/08/20 v3.3p English support from the babel system     rotating.sty    2009/03/28 v2.16a rotated objects in LaTeX     graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)     keyval.sty    1999/03/16 v1.13 key=value parser (DPC)     graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)     trig.sty    1999/03/16 v1.09 sin cos tan (DPC)     graphics.cfg    2010/04/23 v1.9 graphics configuration of TeX Live     pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX     infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)     ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)     ifthen.sty    2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)     supp-pdf.mkii     pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)     ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)     ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)     epstopdf-base.sty    2010/02/09 v2.5 Base part for package epstopdf     grfext.sty    2010/08/19 v1.1 Manage graphics extensions (HO)     kvdefinekeys.sty    2011/04/07 v1.3 Define keys (HO)     kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)     kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO)     etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)     epstopdf-sys.cfg    2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live


title: .eps file not generated using epslatex

text: I am trying to do a plot using `epslatex` interface of gnuplot where I am using latex command for labelling the y-axis and then include the plot in another TeX file. I am writing the following steps but somehow the `.eps` file is not generated, only the `.tex` file is generated. Please help.               reset     set terminal epslatex     set term postscript colour enhanced      set term postscript eps enhanced 26     set output "pb_sp_I=6.tex"               set style data lines     set size 1,1     set origin 0,0     set multiplot     set size 1,1     set origin 0,0     set log          set xlabel "t" font "Times-Roman,30"     set ylabel "$P_t(\\ell)$"           set format y  "10^{%L}"     set format x  "10^{%L}"          set xr [0.1:10000]     set yr [0.000001:1.2]           p 'sp_I=6.out' u 1:2 w l title 'I=6' lc 1 lw 2, 1800/x**1.5 lw 2 title 't^{-1.5}', 1.7/x**0.5 lw 2 title 't^{-0.5}'      I removed the line               set term postscript eps enhanced      and it is now producing 2 files, `pb_sp_I=6.eps` and `pb_sp_I=6.tex`. Then I converted EPS to PDF. I included the `.tex` file above in another `.tex` file, say `a.tex`, by writing the following :               \begin{center}     \input{pb_sp_I=6.tex}     \end{center}      Then I compile a.tex using the command :               pdflatex a.tex      But the output contains the figure file only with the axes, tics, lines but the y-axis labeling in latex (`$P_t(\\\ell)$`) is not there. Please advise if I am missing something.


title: Using Counters in foreach, animate

text: I´m trying to create an animation of rectangles approximating the area below a curve (x^2). I´ve tried to use a counter to specify the lenght of the rectangles but Latex won`t let me use \divide or \multiply on counters in \foreach. Is there a way to do something like               \frac{1}{\then}      to use in               \foreach \x in {0,1\divide\then,...,1}      What I´ve tried so far:               \documentclass[10pt]{scrartcl}     %%%               \usepackage{geometry}     \usepackage[T1]{fontenc}     \usepackage{amsmath}     \usepackage{color}     \usepackage{tikz}     \usepackage{ifthen}     \usepackage{animate}     \usetikzlibrary{shapes, arrows, shadows,trees, decorations.markings,      positioning, patterns, plotmarks,              matrix,decorations.pathmorphing,backgrounds,fit,shapes.symbols,chains, 3D,      calc}               \geometry{a4paper,left=20mm,right=20mm, top=15mm, bottom=5mm }          \definecolor{mred}{rgb}{0.8,0,0}           %        %     \newcounter{n}     \setcounter{n}{01}          %          \begin{document}          \begin{center}     \begin{animateinline}[loop,poster = first, controls]{1}     \whiledo{\then < 4}{     \begin{tikzpicture}[scale=6]                     \draw[->] (-0.1,0) -- (1,0)node[above right]{$x$};                     \draw[->] (0,-0.1) -- (0,1)node[above right]{$y$};                     \draw[style=help lines, step=0.2] (-0.01,-0.01) grid (1,1);                     \draw[domain=-0.1:1, smooth, very thick] plot(\x,{\x*\x});                     \foreach \x/\xtext in {0.2,0.4,0.6/0.6,0.8/0.8,1/1}                                                 \draw[shift={(\x,0)},scale=1/6] (0pt,2pt) -- (0pt,-2pt)node[below] {\small{$\xtext$}};                     \foreach \y/\ytext in {0.2,0.4,0.6/0.6,0.8/0.8,1/1}                                                 \draw[shift={(0,\y)},scale=1/6] (2pt,0pt) -- (-2pt,0pt)node[left] {\small{$\ytext$}};                          \foreach \x in {0,0.\then,...,1}                                              \draw[thick, mred] (\x,0) rectangle (\x+1\divide\then,\x^2);                             \node[below] at (0.5,-0.1) {$n=$\then};                                  \end{tikzpicture}        \stepcounter{n}     \ifthenelse{\then < 4}{\newframe}     {\end{animateinline}\relax     }}     \end{center}          \end{document}


title: `listings` and `sidecap` - Side captions for listings

text: I am using the package `sidecap` for captions which appear left or right of a picture/table, like so:               \documentclass[a4paper,twoside,11pt,openright]{scrbook}          \usepackage{graphicx}                \usepackage[wide]{sidecap}                                           \usepackage[font=footnotesize,         format=plain,         labelfont={bf,sf},         textfont={it},         width=10pt]{caption}          \newcommand{\fig}[4]{         \begin{SCfigure}           \centering                 \includegraphics[width=\textwidth]{#1}           \caption[#2]{#3}           \label{fig:#4}         \end{SCfigure}     }      And the, within the document:               \begin{document}     \fig{background_flickr.png}{Flickr geotagging functionality}{Flickr geotagging functionality. By navigating and panning on a map, the user can place an image or video and specify the desired level of spatial granularity.}{background_flickr}     \end{document}      Which yields: ![enter image description here](http://i.stack.imgur.com/uuRlW.png) I am also using the package `listings` for code, and the settings look like this:               \usepackage{listings}     \lstset{        backgroundcolor=\color{lightgray},        extendedchars=true,        basicstyle=\footnotesize\ttfamily,        xleftmargin=20pt,        showstringspaces=false,        showspaces=false,        numbers=left,        numberstyle=\footnotesize,        tabsize=2,        breaklines=true,        showtabs=false,        captionpos=tb     }      Inserting a code listing like this               \begin{lstlisting}[caption={[JSON Example]A basic JSON example}, label=src:DataTwitterAPIJSON]     {         "firstName": "John",         "lastName": "Smith",         "age": 25,         "address": {             "streetAddress": "21 2nd Street",             "city": "New York",             "state": "NY",             "postalCode": 10021         },         "phoneNumbers": [             {                 "type": "home",                 "number": "212 555-1234"             },             {                 "type": "fax",                 "number": "646 555-4567"             }         ]     }     \end{lstlisting}      yields: ![enter image description here](http://i.stack.imgur.com/N2yIy.png) There are two problems: First of all, the caption does not get displayed correctly at all (seems to be very narrow). Secondly, I need it to be on the left of the listing on left pages and on the right of the listing on right pages (like the normal `sidecap` behavior above). I suspect that the "narrow" look somehow comes from the `sidecap` package. Is there no way to not only use `sidecap` for figures and tables but also for listings?


title: The date doesn't appear properly in the \date{} command

text: Instead of using \today , I have used \date{} command to specify another date.But it doesn't appear , it generates some other output like "[3cm]" in the place of date.Here is the title page's code:               \documentclass[12pt,twoside,a4paper]{book}     \usepackage[margin=1in,bindingoffset=0in,centering,headheight=0.3in,heightrounded]{geometry}     \usepackage{graphicx}     \usepackage[explicit]{titlesec}     \usepackage{microtype}     \usepackage{afterpage}     \usepackage{tikz}     \usetikzlibrary{shapes.misc,arrows}     \newcommand{\HRule}{\rule{\linewidth}{0.5mm}}          \begin{document}     \begin{titlepage}      \centering      \includegraphics[scale=0.25]{pec_emblem}\\[0.5cm]           {\LARGE\scshape PONDICHERRY ENGINEERING COLLEGE\\[1.5cm]}      {\Large\scshape CASE TOOLS LABORATORY\\[0.5cm]}      {\large\scshape SOFTWARE REQUIREMENTS SPECIFICATION\\[0.5cm]}           \HRule \\[0.4cm]      {\huge\bfseries WEB BLOG\\[0.4cm]}      \HRule \\[1.5cm]           \begin{minipage}{0.4\textwidth}      \begin{flushleft} \large       \emph{Author:}\\       \textsc{Subham Soni}      \end{flushleft}      \end{minipage}      ~      \begin{minipage}{0.4\textwidth}      \begin{flushright} \large      \emph{Supervisor:}\\      \textsc{Mr.M. Thirumaran}      \end{flushright}      \end{minipage}\\[4cm]           {\Large \date{January 10, 2014} [3cm]}      \vfill     \end{titlepage}     \restoregeometry          \end{document}      The output I get, is shown in the picture:![enter image description here](http://i.stack.imgur.com/WyGYm.png)


title: Mapping source code to page numbers in output

text: Is there a way to find out (from Tex) the page number corresponding to a particular location in the source file? Using a macro in the file at that location is fine. My motivation is that I'd like to (eventually) get a system working for partial compilation for Beamer presentations. Since I typically only change one or two frames between compilations, it's pretty inefficient that the entire document is recompiled every time (modulo tricks like conditional compilation, which help a bit). If I know which pages correspond to each frame, it should be possible to splice together an older compiled version with the new content. EDIT: Sorry, I should have been more specific. I don't want any output in the pdf, rather I want to get it some other way (through a log file probably) so that I can access it from an external program.


title: Beamer: How to uncover content precisely once, in the current slide?

text: Although not explicit in the `beamer` manual, I figure that `<+>` overlay specification means "the current slide only". I am now in the process of composing a fairly complicated slide show with `beamer` and I am stuck with the exact semantics of `<+>`. Here is my attempt, which seems to work great for ordinary text, but messes up stuff after that:               \PassOptionsToPackage{usenames,dvipsnames}{xcolor}     \documentclass{beamer}     \usepackage{listings,tikz}     \lstset{             basicstyle=\scriptsize\ttfamily,              tabsize=2,                              extendedchars=true,                    breaklines=true,                      keywordstyle=\color{RoyalBlue}\textbf,             commentstyle=\color{ForestGreen},             stringstyle=\color{WildStrawberry}\ttfamily,              escapechar=`      }           \newcommand\M[1]{\tikz[overlay,remember picture]{\node[yshift=0.7ex](#1){};}}      \newcommand\PC[1]{\tikz[overlay,remember picture]{\node[circle,inner sep=2pt,fill=red!50] at (#1) {};}}           \begin{document}      \begin{frame}[fragile]\frametitle{Program}     \begin{lstlisting}[language=pascal]     Program My;     VAR       one, two: Integer;     Begin `\M{pc1}`         one := 1; `\M{pc2}`         two := 2; `\M{pc3}`         one := one + two; `\M{pc4}`         two := two + one; `\M{pc5}`     end. `\M{pc6}`     \end{lstlisting}     \uncover<+>{One}%     \uncover<+>{Two}%     \uncover<+>{Three}%     \uncover<+>{Four}%     \begin{uncoverenv}<+->\PC{pc1}\end{uncoverenv}%     \begin{uncoverenv}<+->\PC{pc2}\end{uncoverenv}%     \begin{uncoverenv}<+->\PC{pc3}\end{uncoverenv}%     \begin{uncoverenv}<+>\PC{pc4}\end{uncoverenv}% Note that we use <+> here, not <+->     \begin{uncoverenv}<+->\PC{pc5}\end{uncoverenv}%     \begin{uncoverenv}<+->\PC{pc6}\end{uncoverenv}%     \uncover<+->{After}%     \end{frame}     \end{document}      Here is what I get (see the attached animated gif)   * Texts "one", "two", etc. are shown as expected; one per slide.   * Program counters 1-3 show as expected, from the current slide till the end.   * Program counter 4 shows and disappears (as expected?)   * Program counters 5-6 never show up. ![enter image description here](http://i.stack.imgur.com/CSEbo.gif) A similar problem occurs with hard coded numbers, e.g., with the following input:               \PassOptionsToPackage{usenames,dvipsnames}{xcolor}     \documentclass{beamer}     \usepackage{listings,tikz}     \lstset{           basicstyle=\scriptsize\ttfamily,            tabsize=2,                            extendedchars=true,                  breaklines=true,                    keywordstyle=\color{RoyalBlue}\textbf,           commentstyle=\color{ForestGreen},           stringstyle=\color{WildStrawberry}\ttfamily,            escapechar=`     }          \newcommand\M[1]{\tikz[overlay,remember picture]{\node[yshift=0.7ex](#1){};}}     \newcommand\PC[1]{\tikz[overlay,remember picture]{\node[inner sep=1pt,circle,radius=2pt,fill=red!50] at (#1) {};}}          \begin{document}     \begin{frame}[fragile]\frametitle{Program}     \begin{lstlisting}[language=pascal]     Program My;     VAR       one, two: Integer;     Begin `\M{pc1}`         one := 1; `\M{pc2}`         two := 2; `\M{pc3}`         one := one + two; `\M{pc4}`         two := two + one; `\M{pc5}`     end. `\M{pc6}`     \end{lstlisting}     \uncover<+>{One}%     \uncover<+>{Two}%     \uncover<+>{Three}%     \uncover<+>{Four}%     \uncover<5-6>{\PC{pc1}}     \uncover<6-6>{\PC{pc2}}     \uncover<7-7>{\PC{pc3}}     \uncover<8-8>{\PC{pc4}}     \uncover<9>{\PC{pc5}}     \uncover<10>{\PC{pc6}}     \uncover<11>{After}%     \end{frame}     \end{document}      The output looks like this: ![enter image description here](http://i.stack.imgur.com/8VPPl.gif) However, and **this is really strange** , the problem is not there when I use the ordinary `<+->` overlay specification, as explained in the `beamer` manual. That is, if I write               \PassOptionsToPackage{usenames,dvipsnames}{xcolor}     \documentclass{beamer}     \usepackage{listings,tikz}     \lstset{           basicstyle=\scriptsize\ttfamily,            tabsize=2,                            extendedchars=true,                  breaklines=true,                    keywordstyle=\color{RoyalBlue}\textbf,           commentstyle=\color{ForestGreen},           stringstyle=\color{WildStrawberry}\ttfamily,            escapechar=`     }          \newcommand\M[1]{\tikz[overlay,remember picture]{\node[yshift=0.7ex](#1){};}}     \newcommand\PC[1]{\tikz[overlay,remember picture]{\node[inner sep=1pt,circle,radius=2pt,fill=red!50] at (#1) {};}}          \begin{document}     \begin{frame}[fragile]\frametitle{Program}     \begin{lstlisting}[language=pascal]     Program My;     VAR       one, two: Integer;     Begin `\M{pc1}`         one := 1; `\M{pc2}`         two := 2; `\M{pc3}`         one := one + two; `\M{pc4}`         two := two + one; `\M{pc5}`     end. `\M{pc6}`     \end{lstlisting}     \uncover<+>{One}%     \uncover<+>{Two}%     \uncover<+>{Three}%     \uncover<+>{Four}%     \uncover<+->{\PC{pc1}}     \uncover<+->{\PC{pc2}}     \uncover<+->{\PC{pc3}}     \uncover<+->{\PC{pc4}}     \uncover<+->{\PC{pc5}}     \uncover<+->{\PC{pc6}}     \uncover<11>{After}%     \end{frame}     \end{document}      I obtain: ![enter image description here](http://i.stack.imgur.com/2cmRF.gif)


title: Print year after journal in references

text: I am using `natbib` to create my bibliography. The current references look like this: > Chakravarty, S. and C. Holden (1995). "An Integrated Model of Market and > Limit Orders." Journal of Financial Intermediation, 4, 213-241. The journal requires the references to be have year after the journal volume number, ie. > Chakravarty, S. and C. Holden. "An Integrated Model of Market and Limit > Orders." Journal of Financial Intermediation, 4 (1995), 213-241. Any ideas on how to do this? * * *               \begin{filecontents*}{\jobname.bib}     @ARTICLE{Chakravartyholden95,       author = {Sugato Chakravarty and Craig Holden},       title = {An Integrated Model of Market and Limit Orders},       journal = {Journal of Financial Intermediation},       year = {1995},       volume = {4},       pages = {213-241},     }     \end{filecontents*}     \documentclass[a4paper,12pt]{article}     \usepackage[longnamesfirst]{natbib}     \bibpunct{(}{)}{;}{a}{}{,}     \begin{document}     \bibliography{\jobname}      \end{document}


title: Error in compiling using color package

text: I am preparing my dissertation. I am using pdfLaTeX. Document compiles fine, until I try to use `\usepackage[dvipsnames,usenames]{color}` . Everything shuts down. I can access the `\usepackage[dvipsnames,usenames]{color}` in other documents, but for the life of me can't figure out what is conflicting here. My preamble is               \documentclass[12pt,oneside,letterpaper]{report}     \usepackage{mathrsfs}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{amsfonts}     \usepackage{graphics}     \usepackage{graphicx}     \usepackage{subfigure}     \usepackage[subfigure, titles]{tocloft}     \usepackage{multirow}     \usepackage{doublespace}     \usepackage{citesort}        \usepackage{colonequals}         \usepackage{fancyhdr}     \usepackage{verbatim}     \usepackage{thesis}     \usepackage{listings}     \usepackage{float}     \usepackage{mathdots}          \usepackage[dvipsnames,usenames]{color}


title: graphic in tcblisting

text: I'm using the package tcolorbox to create a file with examples Latex, I have reviewed the options tcblisting environment and use these:   * text outside listing   * listing outside text   * listing above text   * text above listing But sometimes I want to show the example does not fit as I desire, and this comes my question: can you use an option to add a graphic instead of formatted text?. Something like "graphic" option from package "showexpl". regards, Pablo EDIT: Like this ![enter image description here](http://i.stack.imgur.com/hwSYe.png)


title: Error when typing Matrix and Binomial coefficients

text: New guy here, I am just trying to study LaTeX from the very beginning. I am using TexShop on a Mac, and now I am reading _George Grätzer's Short Course_. Here's my question, when I type Binomial coefficients or Matrices in TexShop, I get an error. What's my problem? This is my code               \documentclass[11pt, oneside]{article}           \usepackage{geometry}                            \geometry{letterpaper}                               %\geometry{landscape}                            %\usepackage[parfill]{parskip}                \usepackage{graphicx}                                                %convert eps --> pdf in  pdflatex            \usepackage{amssymb}          \title{Brief Article}     \author{The Author}     %\date{}                                      \begin{document}     \maketitle     %\section{}     %\subsection{}               \[        \binom{ \frac{n^{2} - 1}{2} }{n + 1}     \]           \[                      \begin{matrix}                        a + b + c & uv    & x - y & 27\\                        a + b     & u + v & z     & 134                      \end{matrix}     \]               \end{document}


title: Size of labels on this figure smaller than size of mathmodes. How can I repair them?

text: This is my figure which I drawed in Geogebra.               \documentclass[12pt]{article}     \usepackage{amsmath}     \usepackage{pgf,tikz}     \usetikzlibrary{arrows}     \pagestyle{empty}     \begin{document}     This is some text with $S$, $A$, $B$, $C$     \begin{center}     \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]     \clip(-0.5,-0.5) rectangle (10,7.5);     \draw [line width=1.2pt,dash pattern=on 2pt off 2pt] (3,3)-- (0,0);     \draw [line width=1.2pt] (0,0)-- (6,0);     \draw [line width=1.2pt] (6,0)-- (9,3);     \draw [line width=1.2pt,dash pattern=on 2pt off 2pt] (9,3)-- (3,3);     \draw [line width=1.2pt,dash pattern=on 2pt off 2pt] (3,3)-- (1.5,7);     \draw [line width=1.2pt,dash pattern=on 2pt off 2pt] (1.5,7)-- (1.5,1.5);     \draw [line width=1.2pt] (1.5,7)-- (0,0);     \draw [line width=1.2pt] (1.5,7)-- (9,3);     \draw [line width=1.2pt, ,dash pattern=on 2pt off 2pt] (2.25,5)-- (9,3);     \draw [line width=1.2pt,dash pattern=on 2pt off 2pt] (2.25,5)-- (2.25,2.25);     \draw [line width=1.2pt,dash pattern=on 2pt off 2pt] (2.25,2.25)-- (9,3);     \draw [line width=1.2pt] (1.5,7)-- (6,0);     \begin{scriptsize}     \draw [fill=black] (0,0) circle (1.5pt);     \draw[color=black] (-0.13,-0.13) node {$B$};     \draw [fill=black] (3,3) circle (1.5pt);     \draw[color=black] (3.06,3.19) node {$A$};     \draw [fill=black] (6,0) circle (1.5pt);     \draw[color=black] (6.08,-0.15) node {$D$};     \draw [fill=black] (9,3) circle (1.5pt);     \draw[color=black] (9.16,3.05) node {$C$};     \draw [fill=black] (1.5,1.5) circle (1.5pt);     \draw[color=black] (1.55,1.34) node {$H$};     \draw [fill=black] (1.5,7) circle (1.5pt);     \draw[color=black] (1.54,7.22) node {$S$};     \draw [fill=black] (2.25,5) circle (1.5pt);     \draw[color=black] (2.3,5.28) node {$F$};     \draw [fill=black] (2.25,2.25) circle (1.5pt);     \draw[color=black] (2.26,2.04) node {$G$};     \end{scriptsize}     \end{tikzpicture}     \end{center}     \end{document}      ![enter image description here](http://i.stack.imgur.com/ukdg4.jpg) The size of labels $S$, $A$, $B$, ... in the figure is smaller than size of mathmodes $S$, $A$, $B$, ...outside the figure. How can I repair it?


title: Looking for a 'high level' Graphics editor for Mac. Then convert diagram to TiKZ code.

text: I am trying to make a large assortment of VERY basic graphs for including in my documents. (squares with the sides labeled, circles, etc...). It seems the TiKZ package is what I want to use. Does anyone know of a point and click type editor for a Macintosh I can use to generate code for TiKZ. I found I can do this with geogebra, but it does not seem suited for what I am trying to do.


title: biblatex: separate maxnames for authors and editors

text: I am using biblatex/biber and would like to have separate `maxnames` values for author and editor lists. What is the cleanest way to do this?


title: How can I make text from the first line align with an image?

text: I'm writing a letter and I want to use an image as the first letter (A la olde time book Initials). See the below screenshot of what I've thrown together so far. What I would like to do is have the text in the first line, align with the bottom of the image, so the only text in line with the image is "tefan, long has my search gone on...". In the past I've found it quite difficult to move text that is on the top line without changing the header spacing, but in this scenario that would also move the image and defeat the purpose.               \documentclass[12pt]{letter}          \usepackage{yfonts,color, graphicx}     \usepackage{wrapfig}          \graphicspath{{Images/}}          \begin{document}          \begin{wrapfigure}[6]{l}{0pt}       \vspace{-20pt}         \includegraphics[width=0.2\textwidth]{Snakewborder.png}       \vspace{-20pt}     \end{wrapfigure}          tefan, long ago...          \end{document}      If anyone has any recommendations please send them my way. Thanks! ![Snake Letter Image](http://i.stack.imgur.com/YLdzA.png)


title: Modify \eqref command

text: I want to edit the `\eqref` command so that \eqref will produce Eq. (1), for example, instead of (1). Of course, I could define               \newcommand{\reff}{Eq.~\eqref}      but then I lose my editor's ability to present a list of former labelled equations when encountering the `\eqref` command (I am using Inlage). So I was wondering if it's possible to refer to a previous command definition, without re-defining it, and just append the changes. something in the form               \renewcommand{\eqref}{Eq.~[old_\eqref definition]}      Hope it's clear.


title: Where does `=2plus 43minus` come from?

text: I am running latex2rtf on a document and have discovered that many of my BiBTex-generated references being with the sequence `=2plus 43minus`, like this:               =2plus 43minus 4 {American Bar Association}, \ldblquote Metadata ethics opinions around the {U.S.}\rdblquote  2013. [Online]. Available:  http://www.americanbar.org/groups/departments\\s\\do5({\fs16 o})ffices/legal\\s\\do5({\fs16 t})echnology\\s\\do5({\fs16 r})esources/resources/charts\\s\\do5({\fs16 f})yis/metadatachart.html =0pt\par      Well, that's pretty weird. So I did a Google Search for =2plus 43minus and found this kind of artifact on a variety of sites --- and even published PDFs:   * http://www.roosh.org/mm/wiapp/node13.html   * http://people.scs.carleton.ca/~toda/doc/albany/albany.html   * http://www.carrsq.qut.edu.au/documents/publication_079.pdf Any idea what's causing this? I am using `\documentclass{article}` and `\bibliographystyle{IEEEtran}`. The obvious short example does not generate the problem.


title: \resizebox and pdftricks: Argument of \next has an extra }

text: I used `\resizebox` to resize my tabular environments. Since I have to get rid of postscript stuff in order to use `xelatex`, I am experimenting with `pdftricks`. But it seems to be impossible to use `\resizebox` outside of the `pdfdisplay` environment. Is there anything I can do about this?               \documentclass{minimal}     \usepackage{graphicx}     \usepackage{pdftricks}          \begin{psinputs}          \end{psinputs}          \begin{document}          \resizebox{\linewidth}{!}{     \begin{pdfdisplay}     \begin{tabular}{lll}     xx & xx     \end{tabular}     \end{pdfdisplay}     }          \end{document}      Edit: OK, here is another problem: The code below works with the `book` class, but does not work with the `scrbook` class. I guess this is due to the textarea size set within `scrbook`. I could not figure out a way to do this properly (maybe by loading `typearea` in the include section), but hacked `pdftricks` instead to call the documentclass `scrbook`. This works but ....               \documentclass{book}     %\documentclass{scrbook}          \usepackage{graphicx}          \usepackage{pdftricks}          \begin{psinputs}       \usepackage{graphicx}       \usepackage{tree-dvips}     \end{psinputs}               \begin{document}          This is some text and the figure should be the size of the text not larger and not smaller.     \begin{figure}[h]       \begin{pdfdisplay}         \resizebox{\linewidth}{!}{           \begin{tabular}{@{}ccccc@{}}             \multicolumn{5}{c}{\node{sign}{sign}}\\[5ex]             \multicolumn{2}{c}{\node{root}{root}} &        & \node{word}{word}       & \node{phrase}{phrase}\\[3ex]             \node{noun}{noun-root} & \multicolumn{2}{c}{\node{verb}{verb-root}}  &  & \node{hp}{headed-phrase} \\[3ex]             & \node{iv}{intransitive-verb} & \multicolumn{2}{c}{\node{tv}{transitive-verb}}            & \node{hap}{head-complement-phrase}\\[3ex]             & \node{siv}{strict-intr-verb}                 & \node{stv}{strict-transitive-verb} & \node{dv}{ditransitive-verb} \\[3ex]             & \node{schlaf}{schlaf-}           & \node{lieb}{lieb-}                  & \node{geb}{geb-}\\             & (`to sleep') & (`to love') & (`to give')\\           \end{tabular}           \nodeconnect{sign}{root}\nodeconnect{sign}{word}\nodeconnect{sign}{phrase}%           \nodeconnect{root}{noun}\nodeconnect{root}{verb}\nodeconnect{phrase}{hp}%           \nodeconnect{hp}{hap}%           \nodeconnect{verb}{iv}\nodeconnect{verb}{tv}\nodeconnect{tv}{stv}\nodeconnect{tv}{dv}%           \nodeconnect{iv}{siv}%                       {\makedash{4pt}%                         \nodeconnect{siv}{schlaf}\nodeconnect{stv}{lieb}\nodeconnect{dv}{geb}%                       }%         }       \end{pdfdisplay}     \end{figure}          This is some text and the figure should be the size of the text not larger and not smaller.          \end{document}


title: CheckBox (from hyperref) - tick by default

text: This may seem basic, but is there a way to make checkboxes ticked automatically? E.g.               \documentclass{minimal}     \usepackage{hyperref}          \begin{document}     \begin{Form}          \CheckBox[name=ch1]{Yes}          \end{Form}     \end{document}      giving ![enter image description here](http://i.stack.imgur.com/AQtYK.png) I'd like the above to be checked by default. Then in the `.pdf` one can uncheck it by clicking on the box as required. I'm reading the hyperref manual and under `6.2 Forms optional parameters` it lists the option with default as `checked boolean false` - I'm not sure how to pass this into `\begin{Form}` with a new default. If there's an alternative method not involving `hyperref` I'm open to that also. Am using EMACS & Auctex. If this is possible and there's some simpler way I could have looked it up (e.g. show/modify defaults for `Form` environment) up would be grateful for any pointers.


title: Change font for units with \unit (In LyX, \unittwo)

text: Using the command (defined in units.sty) `\unit[value]{dimensions}`, the dimensions are set using `\mathrm`. I am working on a presentation that uses the standard Beamer sans serif font (can't remember name), which means that whenever I use the `\unit` command, the dimensions stand out because of a different font. Is there a way to redefine what font to use for the dimensions? By the way, I am using LyX, so the `\unit` command is invoked by calling `\unittwo` and then inserting value in first box and dimensions in second box. I can't seem to find a way to change the font, except by avoiding the `\unit` commands altogether. I was looking for something like (in the preamble) `\newcommand{\unit}{\sffamily\unit}` but that doesn't work. (I am very inexperienced with using `newcommand`)


title: Hint for an "environment variable problem" when creating fonts with mktexpk

text: When piloting `pdflatex` from another program and having to take care of environment variables, I encounter the following error:               kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 1+0/600 --dpi 600 ifsym10      /usr/local/texlive/2013/texmf-dist/web2c/mktexdir: line 35: cd: /Users/colas/Library/Application: No such file or directory     mktexpk: /usr/local/texlive/2013/texmf-dist/web2c/mktexdir ./Library/texlive/2013/texmf-var/fonts/pk/ljfour/public/ifsym failed.     kpathsea: Appending font creation commands to missfont.log.      Maybe someone who knows how `mktexpk` works could help me. I think the problem comes from a absent environment variable. Here is the corresponding file               #!/bin/sh     # mkinstalldirs (now mktexdir) -- make directory hierarchy.     # Author: Noah Friedman <friedman@prep.ai.mit.edu>, created: 1993-05-16.     # Public domain.     #      # Modified for sticky directory creation, --help, --version, more,     # by Thomas Esser, Karl Berry, Olaf Weber, et al.          version='$Id: mktexdir 18383 2010-05-20 18:31:24Z karl $'     usage="Usage: $0 DIRS...       Create each DIR, including any missing leading directories."     mt_max_args=$#          # Common code for all scripts.     : ${MT_TEXMFMAIN=`kpsewhich --expand-path='$TEXMFMAIN'`}     : ${MT_MKTEX_OPT=`kpsewhich --format='web2c files' mktex.opt`}     test -n "$MT_MKTEX_OPT" || MT_MKTEX_OPT="$MT_TEXMFMAIN/web2c/mktex.opt"     if test ! -f "$MT_MKTEX_OPT"; then       echo "$0: Cannot find mktex.opt; check your installation." >&2       exit 1     fi          . "$MT_MKTEX_OPT"          test -n "$MT_MKTEXDIR_OPT" && . "$MT_MKTEXDIR_OPT"          test -z "$MT_APPEND_MASK" && MT_APPEND_MASK="="          errstatus=0          for file     do        case $file in          /*) cd /;;                ###########################################          *) cd $KPSE_DOT;;         ###### <- THIS IS LINE 35 !!!!! ###########        esac                        ###########################################        OLDIFS=$IFS; IFS=/; set fnord `echo "./$file"`; IFS=$OLDIFS; shift             pathcomp=        for d        do          test -z "$d" && continue          pathcomp="$pathcomp$d"               if test ! -d "./$pathcomp"; then             mkdir "./$pathcomp" || { errstatus=$?; break; }             chmod `kpsestat ${MT_APPEND_MASK} "$pathcomp"/..` "./$pathcomp"          fi               pathcomp="$pathcomp/"        done     done          exit $errstatus      I launch `pdflatex` programmatically and then `pdflatex` launches automatically `mktexpk`. The only environment variable I pass to `pdflatex` is: `PATH = /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/texbin:`.


title: Move short keywords to the left of the text in box, not marginpar/marginnote

text: I am trying to create a command that moves (short) keywords to the left side of the text. They should be "right" aligned" with a fixed separation between the keyword and the text. The command below does what I want, but only if the text is indented or not - not with a combination, e.g. after the start of a new section. Can I check whether the note is in an indented paragaph `\hspace{\parindent}` and issue conditionally? Or is there a better approach? I don't want to use the `marginnote` package (or the `marginpar` in general) for this.               \documentclass{scrartcl}          \newcommand{\parnote}[1]{%     \begingroup     \setlength{\fboxsep}{0pt}         \hspace*{0pt}\llap{%             \framebox[2cm][r]{% normally use makebox                 #1%     %           \hspace{\parindent}%                 \hspace{8pt}%             }%         }%     \endgroup     \ignorespaces     }          \begin{document}          \section{Dummy}          \parnote{Keyword 1} This paragraph has no indent.          \bigskip          \parnote{Other Word} This paragraph has an indent.          \end{document}      ![enter image description here](http://i.stack.imgur.com/0y1DO.png)


title: Can a transformation be made to apply to the rest of the commands in a TikZ picture?

text: One nice feature of TikZ is that you can apply a coordinate transformation in the middle of a `\draw` command (or `\path`, etc.) and it will automatically apply to the rest of whatever is in the command. I'd like to be able to use a command inside a `tikzpicture` that similarly applies a transformation automatically to all subsequent `\draw` commands, i.e., that lasts across semicolons. For instance, consider the following working example:               \documentclass{minimal}     \usepackage{tikz}          \begin{document}     \begin{center}     \begin{tikzpicture}[scale=1.5]         \foreach \n in {1,...,5}         {             \draw[thick,->] (-1.5,0) -- (4.5,0) node[right] {$x$};             [yshift=-1cm];         }     \end{tikzpicture}     \end{center}     %     %     \rule{0pt}{2cm}     %     %     \begin{center}     \begin{tikzpicture}[scale=1.5]         \foreach \n in {0cm,1cm,...,4cm}         {             \draw[yshift=\n, thick, ->] (-1.5,0) -- (4.5,0) node[right] {$x$};         }     \end{tikzpicture}     \end{center}     \end{document}      ![enter image description here](http://i.stack.imgur.com/Q3ncs.png) The second picture gives the result I want; the first picture is the style of code I would like to use for it. Is there a way to do this?


title: hyperref with the backref=page option

text: I encountered an issue when using the `backref=page` option of the hyperref package together with the natbib package with the options `square,sort&compress,numbers`.   If the natbib package compresses a range of references, the middle references does not show the backreference after compiling (latex,bibtex,latex,latex). See the following short example:               \documentclass{article}       \usepackage[square,sort&compress,numbers]{natbib}       \usepackage[backref=page]{hyperref}          \begin{document}       \cite{foo,bar,hole}          \begin{thebibliography}{ab}       \bibitem{foo} foo          \bibitem{bar} bar          \bibitem{hole} hole          \end{thebibliography}       \end{document}


title: LyX Layout for TrueType Fonts

text: I'm trying to create a Layout for user manuals for a couple of software applications we made. One important aspect of the layout is that it must use TrueType fonts. In my .lyx documents, I found a "\use_non_text_fonts true" line, and I added to my layout, but it doesn't work. Where and how I must declare this?


title: Formatting new list of definitions with tocloft

text: Using the `tocloft` package in LaTeX, I created a List of Definitions. From the package documentation and some online examples I came up with:               \newcommand{\listdefinitionname}{My list of definitions}     \newlistof{definition}{def}{\listdefinitionname}     \newcommand{\definition}[1]{%     \refstepcounter{definition}     \par\noindent\textbf{TheDefinition \thedefinition. #1}     \addcontentsline{def}{definition}     {\protect\numberline{\thechapter.\thedefinition}#1}\par}      ...               \listofdefinition        1. In the "My list of definitions" that is created, for all definitions, the first letter of a definition name superposes the last digit in the definition number. How can I fix this?    2. The numbering seems to be wrong. If I try `\newlistof[chapter]{definition}{def}{\listdefinitionname}`, the definitions throughout 5 chapters are numbered smth like 1.1.1.1,.. 3.3.3.8.. etc. I would like to obtain the numbering from the List of figures, chapternumber.figurenumber, where figurenumber starts with 1 for every new chapter.   3. `\listoffigures` issues a list of figures, indented by about 1 cm from the left. With `\listofdefinition` the entries begin right at the left margin. How can I get the List of figures formatting for the list of definitions?


title: Bad interaction between alltt package and babel with the italian option

text: Given the following MWE:               \documentclass{article}     \usepackage[italian]{babel}          \usepackage{alltt}               \begin{document}     \begin{alltt}         \(\sb{1,1}\)     \end{alltt}     \end{document}      I get the error:               TeX capacity exceeded, sorry [main memory size=5000000].     ,->\leavevmode \kern \z@                               \char `\,     l.9 \(\sb{1,1                  }\)      Changing `\usepackage[italian]{babel}` to `\usepackage[english]{babel}` fixes the issue (but it's not what I need). I have a suspect that it may be due to babel's shorthands however I have no idea about which shorthands are defined by the `italian` option nor which one might be causing the problem.


title: In Lyx find a word and replace with ERT

text: In Lyx how do I find and replace words with latex code (ERT)?