title: TikZ datavisualization example fails

text: While trying an example from the datavisualization section of the current `TikZ` manual I get a strange error message. On my system I have the current MikTeX 2.9 and installed the CVS version of `TikZ` (CVS 2012-05-18 from texample.net) according to this question: How to install a current version of TikZ? Now the first part of the following MWE fails, whereas the second part runs nicely and I do not have any idea why.               \listfiles     \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{datavisualization}          \begin{document}          \begin{tikzpicture}       \datavisualization [school book axes, visualize as smooth line]          data [format=function] {          var x : interval [-2:2];          func y = \value x*\value x + 1;          };     \end{tikzpicture}          \begin{tikzpicture}       \datavisualization [school book axes, visualize as smooth line]         data {         x, y         -1.5, 2.25         -1, 1         -.5, .25         0, 0         .5, .25         1, 1         1.5, 2.25         };     \end{tikzpicture}          \end{document}      The error message I receive from `pdflatex` or `lualatex` is               ! Package pgf Error: Unknown data format 'function'.          See the pgf package documentation for explanation.     Type  H <return>  for immediate help.      ...          l.10      data [format=function]      It works nicely, when the first `tikzpicture` environment is commented out and lists what I think are the current files from `TikZ`:                article.cls    2007/10/19 v1.4h Standard LaTeX document class       size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)         tikz.sty    2012/05/14 v2.10-cvs (rcs-revision 1.99)          pgf.sty    2008/01/15 v2.10-cvs (rcs-revision 1.12)       pgfrcs.sty    2010/11/07 v2.10-cvs (rcs-revision 1.25)     everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS)       pgfrcs.code.tex      pgfcore.sty    2010/04/11 v2.10-cvs (rcs-revision 1.7)     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    2007/01/18 v1.5 graphics configuration of teTeX/TeXLive       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)     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)     luatex-loader.sty    2010/03/09 v0.4 Lua module loader (HO)       pgfsys.sty    2012/03/30 v2.10-cvs (rcs-revision 1.38)       pgfsys.code.tex     pgfsyssoftpath.code.tex    2008/07/18  (rcs-revision 1.7)     pgfsysprotocol.code.tex    2006/10/16  (rcs-revision 1.4)       xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)        color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive      pgfcore.code.tex     pgfcomp-version-0-65.sty    2007/07/03 v2.10-cvs (rcs-revision 1.7)     pgfcomp-version-1-18.sty    2007/07/23 v2.10-cvs (rcs-revision 1.1)       pgffor.sty    2012/01/09 v2.10-cvs (rcs-revision 1.21)      pgfkeys.sty      pgfkeys.code.tex      pgfmath.sty      pgfmath.code.tex       pgffor.code.tex         tikz.code.tex     supp-pdf.mkii      What further steps should I take to debug this problem?


title: pgfplot - ylabel on the right

text: as much as I know, the following code should have the y axis label on the right:               \documentclass{article}     \usepackage{pgfplots}     \pgfplotsset{compat=1.4}      \usepackage{tikz}     \begin{document}     \begin{figure}     \begin{tikzpicture}       \pgfplotstableread{Example.txt} \mytable       \begin{axis} [ ytick pos=right,                      ylabel near ticks,                      ylabel={Bla}, ]         \addplot table [x index=0, y index=1] {\mytable};       \end{axis}     \end{tikzpicture}     \end{figure}     \end{document}      where 'Example.txt' is just 0 2 1 2 2 2 3 2 4 1 (With line breaks, they just don't appear here) Unfortunately the y-label still appears on the left. What did I make wrong? Thanks, Juhui


title: What is "\\" called?

text: I’ve seen it take arguments, and apparently there’s a starred version, but I can’t find any documentation because it is ungooglable!


title: Drawing a Markov chain - How do I update the value of a variable in TikZ?

text: I would like to plot a simulation of a Markov process in R^2. Basically, I want to draw a line that starts at (x_0,y_0)=(0,2) and then follow this rule: For each i=1,...,10, the line will go through (i,y_{i-1}+1) with probability 1/2 and (i,y_{i-1}-1) with probability 1/2. So I designed the following TikZ code to draw this figure:               \begin{tikzpicture}[scale=0.6]       \coordinate[label=left:$2$] (0) at (0,2){};       \pgfmathsetmacro{\z}{2};       \newcounter{c};       \setcounter{c}{0};       \pgfmathdeclarerandomlist{dir}{{-1}{1}};            \foreach \i in {1,2,...,10}{         \pgfmathrandomitem{\d}{dir};         \pgfmathsetmacro{\y}{\z+\d};         \pgfmathsetmacro{\x}{\i};              \coordinate (\i) at (\x,\y){};         \pgfmathtruncatemacro{\p}{\i-1};         \draw[red] (\p)--(\i);         \pgfmathsetmacro{\z}{\y};       }       \draw[dashed,thick] (\l)--(20,2);     \end{tikzpicture}      First, we draw a coordinate at (0,2). Then, we choose `\d` uniformly at random from {-1,1} and draw a coordinate at `(1,2+\d)` and we set `\z` to be `2+\d`. Then we choose `\d` again at random from {-1,1} and draw a coordinate at `(2,\z+\d)`, and so on... However, this does not give what the picture should look like. In fact, the updating process with `\z` and `\y` does not seem to occur, and I don't know why.


title: How do you install a module in Lyx?

text: How do you install a module in Lyx? I find this site is not helpful enough: http://wiki.lyx.org/Layouts/Modules


title: Is there a simple way to draw a straight line from one coffin handle to another?

text: I want to know whether there is a simple way to draw a straight line from one coffin handle to another.


title: list of symbols with nomencl

text: How to create both list of abbreviations and list of nomenclature using nomencl package? i found this old question but it doent really help me. I have the problem that i have a nomencl package already in my work and used it very often and now i want to do a list of symbols as well. I need 3 columns: Symbol, unit and discription. Hope someone can help me. Lea here my code in a very short way:               \documentclass[ headsepline, plainheadsepline, frontsize=12bp, toc= listof, listof= chapterentry, DIV = calc]{scrreprt}               % Deutsche Sprache     \usepackage [T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[ngerman]{babel}     \usepackage{textcomp}     \DeclareUnicodeCharacter{20AC}{\texteuro}     \usepackage[german=guillemets]{csquotes}     \usepackage{blindtext}          \usepackage{url}          % Graphiken einbinden     \usepackage{graphicx}               % Tabellen schoen machen     \usepackage{booktabs}     \usepackage{multirow}          % Mathematik     \usepackage{mathtools}     \usepackage{amsmath,amssymb}          % Schriften     \usepackage[T1]{fontenc}     \usepackage{lmodern}          % Schriftauszeichnung     \newcommand{\BegriffNeu}[1]{\textbf{#1}}     \newcommand{\Wichtig}[1]{\textit{#1}}          % --- Abkürzungsverzeichnis: ----------------------------     % START % Näheres siehe http://my.opera.com/timomeinen/blog/show.dml/68644     \usepackage{nomencl}     % Befehl umbenennen in abk     \let\abk\nomenclature     % Deutsche Überschrift     \renewcommand{\nomname}{Abkürzungsverzeichnis}     % Punkte zw. Abkürzung und Erklärung     \setlength{\nomlabelwidth}{.20\hsize}     \renewcommand{\nomlabel}[1]{#1 \dotfill}     % Zeilenabstände verkleinern     \setlength{\nomitemsep}{-\parsep}     \makenomenclature     %--------------------------------------------------------          \newcommand{\minitabelle}[2]{     \begin{tabular}{c}     \hline      #1 \\      \hline      #2 \\      \hline      \end{tabular}           }          \usepackage{natbib}     \usepackage[german]{varioref}          \usepackage{scrpage2}     \clearscrheadfoot     \pagestyle{scrheadings}     \ohead [\pagemark]{\pagemark}     \pagenumbering{arabic}     \ihead{\headmark}     \lofoot{Bachelorarbeit "In humanen Fluiden nachweisbare Krankheiten", Lea Schröder}          \renewcommand{\sfdefault}{phv}          \renewcommand{\familydefault}{\sfdefault}          \usepackage[onehalfspacing]{setspace}          \usepackage{geometry}     \usepackage{todonotes}          \usepackage{hyperref}      \begin{document}     \pagenumbering{Roman}     \tableofcontents     \printnomenclature          %here is my work done ;) but now i just put in some words ;)     etc.\abk{etc.}{et cetera}          usw.\abk{usw.}{und so weiter}          ASB\abk{ASB}{Arbeiter Samariter Bund}          DRK\abk{DRK}{Deutsches Rotes Kreuz}          q.e.d.\abk{q.e.d.}{quot erat demunstrandum}     \cleardoublepage     \pagenumbering{arabic}     \listoffigures     \listoftables     \addcontentsline{toc}{part}{Literaturverzeichnis}     \end{document}


title: How can I draw a chessboard missing two diagonally opposite corner squares?

text: How can I draw of a mutilated chessboard, i.e. missing two diagonally opposed corner squares? Using the `chessboard` package, I can only draw a full chessboard... ![enter image description here](http://i.stack.imgur.com/QpEE1.jpg)


title: pageref to label in last page in resume.cls

text: I am using the class resume.cls for writing my curriculum. I would like to use as page numbers the text "page k out of n", but I seem not to be able to get a reference to the last page.   * If I add a simple label 'lastone' at the end of the resume and use \pageref{lastone} the reference stays undefined no matter how many times I compile the source.   * If I use the package 'lastpage' I get an error related to a missing curly brace (which disappears as soon as I do not include that package).   * If I use the package 'zref-lastpage' and refer to the last one with \zpageref{LastPage}, I get an error related to an undefined macro. Is there any way I can have a reference to the last page in order to insert its page number? This is an example (you need to download the .cls file because I could not find a way to attach files).               \documentclass[margin,line]{resume}          \usepackage{zref-lastpage}     \usepackage{fancybox}          \makeatletter \renewcommand{\@evenfoot}%                                                                                {\normalsize\slshape CV di Tizio \hfil \upshape pag. {\thepage} di \zpageref{LastPage}} % \pageref{ultima}} % \zpageref{LastPage}}                                   \renewcommand{\@oddfoot}{\@evenfoot} \makeatother          \begin{document}     \name{\Large Tizio -- \it Curriculum Vitae et Studiorum}          \begin{resume}     \pagenumbering{arabic}          \section{\mysidestyle Informazioni\\ personali}\vspace{2mm}\label{informazioni-personali}     This is me          % ENDING                                                                                bye          \label{ultima}\end{resume}     \end{document}


title: Winedit problem with biblatex (cygwin1.dll)

text: I have a strange bug occurring when I compile my tex file with pdftexify in winedt 8.2 (I have a win7 64bit machine) First, I have set biber.exe in the Winedt `execution modes` screen. All the packages are up to date on Miktex 2.9. I load the `biblatex` package in my preamble as               \usepackage[backend=biber,citestyle=authoryear,isbn=false,        backref=false,maxcitenames=3,maxbibnames=99,doi=false,url=false,        uniquename=false,firstinits=true,bibstyle=authoryear]{biblatex}      Also, I have downloaded the latest biber executable from `http://biblatex- biber.sourceforge.net/` and put it on `C:\Program Files\MiKTeX 2.9\miktex\bin\x64\biber.exe` When I compile with pdflatex I get > impossible to run the program because you do not have cygwin1.dll etc _(I > translated from French)_ Any ideas on what do do?


title: Environment to write lines in a screenplay fashion?

text: Assuming that one is writing a scientific document and at some point is interested in writing a couple of lines, ex.   * Player: Hi! How are you?   * NPC: Nice, thanks! in a screenplay fashion. Is there some nice way/environment in order to achieve that?


title: Symbol for "defined to be logically equivalent" (:⇔)

text: Is there a way to typeset the symbol ":⇔" **correctly** in LaTeX (i.e. with the right alignment and spacing)? I know that using `:\Leftrightarrow` or `:\Longleftrightarrow` gets me the symbol I'm looking for (more or less), but the spacing doesn't look right to me. Constructions using `\iff` or `\colon` didn't really seem to do the trick, either. Do I have to define such a symbol myself (if so: how?), or is there a package proving this? Unfortunately, I did not find anything myself (especially because I don't know what to search for exactly; I got the description "defined to be logically equivalent" from Wikipedia, since I didn't even know the correct name).


title: Greek capital letters with Latin Modern and TeX

text: Copying the plain TeX format, my formatting file contains the lines               \font\tenrm="[lmroman10-regular.otf]:mapping=tex-text"     \textfont0=\tenrm     \def\rm{\fam0 \tenrm}      to load a unicode font. However, as mentioned in Can I typeset greek letters in text mode using Latin Modern Fonts?, the Latin Modern fonts don't include the Greek capital letters, so `$\Pi$` doesn't display the capital letter Pi. How can I fix this in (Xe-)TeX?


title: lstlisting in a box?

text: My problem is that I am trying to write a document with coloured sections for examples. Examples can contain code listings. Somehow I can't seem to combine a background colouring with a listing, or even verbatim. An example of what I tried is this:               \colorbox{lightgray}{     \begin{minipage}{4cm}     An example text          \begin{lstlisting}[frame=single,language=XML,caption=A Fibonaci example\label{code:fibonaci}]       <xml></xml>     \end{lstlisting}             Some more text     \end{minipage}       }      Any ideas are appreciated!


title: Two pictures, side by side on even and odd page

text: I am formatting a twopage book on latex and I have a diagram divided on two almost page size images. (Two captions). What can I do for putting the first image on an even page and the second on the following page so that way one can open that pages and wiew the whole diagram without passing pages? The two parts of the diagram are in two different files, as opposed to the post "How to include a picture over two pages, left part on left side, right on right (for books)?". In other words, I would like the same as the above post, but just much less functionality, such as dividing the picture into wo parts automatically and such. It would be nice, if the picture waits to be outputted until the next even side begins. I tried using the following command before the two pictures, but that doesn't seem to work, cf. LaTeX wikibook.               \newcommand{\newevenside}{         \ifthenelse{\isodd{\thepage}}{\newpage}{         \newpage         \phantom{placeholder} % doesn't appear on page         \thispagestyle{empty} % if want no header/footer         \newpage         }     }      The problem is that it would place both figures on the left side, two different doublepages. The code which I use for putting the images on the document is               \newevenside          \begin{figure}[hp!]     \includegraphics[width=18cm,angle=90]{figuras/project1.eps}     \caption{My caption.}     \label{fig:gantt1}     \end{figure}          \newpage          \begin{figure}[hp!]     \includegraphics[width=18cm,angle=90]{figuras/project2.eps}     \caption{My caption.}     \label{fig:gantt}     \end{figure}


title: text on arrow for xypic

text: In the following example, I find that the `u` and `w` are vertically too far from the arrow: is there any way so that               \documentclass[10pt]{article}     \usepackage[all]{xy}          \begin{document}          \xymatrix{E \ar[r]^-*+{u}             \ar@{->>}[d]^-*+{v} &E \ar@{->>}[d]^-*+{v}\\                       E/F \ar@{.>}[r]^-*+{w}& E/F}               \end{document}      thanks for your answer


title: My own page number from file {counters}

text: I would like to add my own page number in my publications. I have file: `numerki.tex`               zzzero     jEden     dWa     trZy     cztery     ...     dwadzIescia     etc......      How I can add counter `\counter\cyferki` from file. each line is next counter               0=zzzero     1=jEden     2=dWa .....       (numbers are in utf-8 and different capitalic) And next put it to page number in my specific font.


title: How can I publish a document that uses resources I don't personally have access to?

text: The high-resolution/vector images of many institution logos are held under copyright and strict restrictions. I don't have access to these logos personally, and I've been unsuccessful in asking for them in person for the purposes of building the document. I have pondered, though, perhaps giving my supervisor (who can pass it on to someone who has the authority, if necessary) some sort of _complete package_ to build the document - just add images. I was considering a makefile for some time, but that seems too technical. I also _just_ remembered DVI does this sort of 'referencing', so perhaps I can use that. What would be the best way to make such a 'complete package' so that the end- builder doesn't need _any_ knowledge of TeX or anything? * * * _UPDATE:_ I now do have the resource that was previously unavailable, but the concept of 'a complete package' ready for publishing is still really interesting, if anyone has done something similar before. If you have, you can assume the publisher...   * has all resources needed to 'finalize' the document   * does _not_ have a TeX distribution   * is computer-literate, but not to the extent of complex command-line wizardry (but running a script is within reason).


title: How can I nicely align a single split equation?

text: I'd like to align my equation to that it (and its label) fit on three lines. MWE               \documentclass[11pt]{article}     \usepackage{amsmath}     \usepackage{amssymb}          \usepackage{xfrac}     \usepackage{transparent}     \usepackage{mathtools}          \usepackage[a4paper]{geometry}     \geometry{top=1.0in, bottom=1.0in,               left=1.0in, right=1.0in}               \usepackage[usenames,dvipsnames]{color}          \newcommand{\Cline}[2][red]{     \text{\oalign{$#2$\cr\color{#1}\leaders\hrule height 0.80pt\hfil\cr}}}          \begin{document}          \begin{equation}     \begin{split}     R_{\sigma\mu\rho\nu} &= \bar{R}_{\sigma\mu\rho\nu}\\     &     +\tfrac{1}{2}\bar{\nabla}_{\!\rho}\bar{\nabla}_{\!\mu}h_{\nu\sigma}      +\tfrac{1}{2}\partial_{\rho}\bar{\Gamma}^{\tau}_{\mu\nu}h_{\tau\sigma}     +\tfrac{1}{2}\Cline[Red]{\partial_{\rho}\bar{\Gamma}^{\tau}_{\mu\sigma}h_{\nu\tau}}     -\tfrac{1}{2}\bar{\nabla}_{\!\rho}\bar{\nabla}_{\!\sigma}h_{\mu\nu}      -\tfrac{1}{2}\Cline[Red]{\partial_{\rho}\bar{\Gamma}^{\tau}_{\sigma\mu}h_{\tau\nu}}     -\tfrac{1}{2}\partial_{\rho}\bar{\Gamma}^{\tau}_{\sigma\nu}h_{\mu\tau}\\     &     -\tfrac{1}{2}\bar{\nabla}_{\!\nu}\bar{\nabla}_{\!\mu}h_{\rho\sigma}      -\tfrac{1}{2}\partial_{\nu}\bar{\Gamma}^{\tau}_{\mu\rho}h_{\tau\sigma}     -\tfrac{1}{2}\Cline[Blue]{\partial_{\nu}\bar{\Gamma}^{\tau}_{\mu\sigma}h_{\rho\tau}}     +\tfrac{1}{2}\bar{\nabla}_{\!\nu}\bar{\nabla}_{\!\sigma}h_{\mu\rho}      +\tfrac{1}{2}\Cline[Blue]{\partial_{\nu}\bar{\Gamma}^{\tau}_{\sigma\mu}h_{\tau\rho}}     +\tfrac{1}{2}\partial_{\nu}\bar{\Gamma}^{\tau}_{\sigma\rho}h_{\mu\tau}.     \end{split}     \end{equation}          \end{document}      Note that in my actual document, this equation has the number 6.18, as shown below. Here, I've drawn the red lines on where the margins start. ![enter image description here](http://i.stack.imgur.com/9urfZ.png) Here is an approximate mock-up of what I'd like: ![enter image description here](http://i.stack.imgur.com/XAnHP.png)


title: Cross-referencing (input) multiple tex. files on multiple levels

text: I´ve recently discovered this site and you might be able to give me some advice working with LaTeX. Here´s my problem: My company is working on several user manuals. Each user manual is located in its own directory (repository for svn etc.). Basically, all user manuals have the same structure: Main `.tex` file (providing all `\input`s to document class, \inputs, tables etc.) --> Chapter --> `.tex` file (optional, not always used but pretty often.) There is a lot of cross-referencing going on. So, our structure is basically t1 -->t2-->t3. t standing for `.tex`. Our goal is t1-->t2-->t3(-->t4). We are trying to outsource certain phrases. E.g., the preface is basically always the same. This way, we are able to maintain various user manuals using just one `.tex` file (basically 1 `.tex` file). The problem is: We don´t want to create a directory for common phrases and texts. Our file structure depends on individual repositories/ directories. As a consequence, there is no general relative path that we can use: A chapter in Manual 1 (t1) requires `chapter/xxx.tex` (which inputs `aaa.tex`) as an input path. Chapters in Manual 2 and 3 require `/../../manual1/chapter/xxx.tex`. The path used to input the `aaa.tex` file referenced in `xxx.tex` is based on the main `.tex` file (t1) from manual 1. This path won´t work for manual 2 and 3. If I adjust the path for manual 2 and 3, the path won´t work with manual 1. Is there any way to fix or at least "avoid" this. It would be great to reference to an additional level using a path that will work for several manuals. I hope you don´t consider this question an annoying noob question and I´ve somehow made myself clear, but I´ve been searching for quite a while now and haven´t found an appropriate solution yet. It would be great if you could help me fix this.


title: How to write a greek letter in a item list

text: I am trying to add the character "alpha" in the title of a list like this:                 \item \alpha value      so that I see the bullet, a alpha letter and the word "value", all in the same row. Even though I see the result I want in the preview, I have this errors:               Missing $ inserted     Missing } inserted     Extra }, or forgotten \endgroup      I don't know what I am doing wrong, any tips?


title: Using algorithm2e with polyglossia produces undesired emphasized text

text: Here's a minimal working example:               \documentclass[a4paper]{article}     \usepackage{fontspec}     \setmainfont{CMU Serif}     \setsansfont{CMU Sans Serif}     \setmonofont{CMU Typewriter Text}     \newfontfamily{\cyrillicfonttt}{CMU Typewriter Text}     \usepackage{polyglossia}     % \setmainlanguage{ukrainian}     \usepackage{algorithm2e}          \begin{document}          \begin{algorithm}         \SetKwData{Left}{left}         \SetKwData{Right}{right}         \SetKwFunction{Swap}{Swap}              \For{$i \leftarrow 0$ \KwTo $n$}{             \If{$\Left_i > 0$ {\bf and} $\Right_i > 0$}{                 \Swap{$\Left_i$, $\Right_i$}\;             }         }     \end{algorithm}          \end{document}      This code produces the following output: ![Desired output.](http://i.stack.imgur.com/qLyvm.png) Now, if I uncomment the `\setmainlanguage{ukrainian}` line, the output changes slightly: ![Output with undesired emphasis.](http://i.stack.imgur.com/xiFmM.png) As you see, here the keywords `to`, `and`, and arguments `left` and `right` became emphasized. It's not really that big of a problem, but it still bothers me, italic font here seems out of place. The same result occurs for Russian and Bulgarian, e.g. languages with Cyrillic script. What could be causing this behavior? I'd be really grateful for any advice.


title: draw a DAG with transition labels

text: I appreciate it if you let me know the most elegant way to draw a DAG such as the followings: ![enter image description here](http://i.stack.imgur.com/KEmA0.png)


title: How to horizontally align text in rows below rotated text?

text: I have a table with rotated text in the uppermost columns, however in certain rows the X's are not horizontally centered. I thought that having the \centering or perhaps the origin=c command would fix this, but it hasn't. Here is what the table looks like: ![enter image description here](http://i.stack.imgur.com/46wXi.png) Here is the code:               \documentclass{article}     \usepackage{array}     \usepackage{rotating}     \usepackage{lipsum}          \begin{document}          \newcolumntype{G}{>{\centering\arraybackslash}m{.0535cm}}     \newcolumntype{U}{>{\centering\arraybackslash}m{.450cm}}     \newcommand\RotTextTwo[1]{\fontsize{9}{9}\selectfont       \rotatebox[origin=c]{90}{\parbox{2.6cm}{\vspace{-.4\ht\strutbox}\centering#1}}}     \newcommand\RotTextThree[1]{\fontsize{9}{9}\selectfont       \rotatebox[origin=c]{90}{\parbox{2.6cm}{\vspace{-.15\ht\strutbox}\centering#1}}}               \begin{table}[t]\caption{This is a table I am using}     \footnotesize     \centering     \begin{tabular}{|c|G|U|U|G|U|G|G|G|U|}     \hline      & \multicolumn{9}{c|}{Some Text} \\      \cline{2-10}          Bunch of Text & \RotTextTwo{Garbage Text} & \RotTextThree{Garbage Text Garbage} & \RotTextThree{Garbage Text Garbage} & \RotTextTwo{Garbage Text} &      \RotTextThree{Garbage Text Garbage} & \RotTextTwo{Garbage Text} & \RotTextTwo{Garbage Text} & \RotTextTwo{Garbage Text} & \RotTextThree{Garbage TextGarbage } \\     \hline     \textit{Meaningless Text 2} &      & & X   & & & & & & \\     \hline     \textit{Meaningless Text 3} &      & & X   & & & & & & \\     \hline     \textit{Meaningless Text 4} &      & X & & & & & & & \\     \hline     \textit{Meaningless Text 5} &      & X &   X   & & & & & & \\     \hline     \textit{Meaningless Text 6} &      & X & X & & & & & & \\     \hline     \textit{Meaningless Text 7} &      & X & X & & & & & & \\     \hline                           \textit{Meaningless 8} &      & & & & & & X & & \\     \hline           \textit{Meaningless Text 9} &      & & & X & & & & & \\     \hline     \textit{Meaningless 10} &      & & & X & & & & & \\     \hline     \textit{Meaningless Text 11} &      & & & & & & & X & \\     \hline     \textit{Meaningless 12} &      & & & & X   & & & & \\     \hline     \textit{Meaningless Text 13} &     & & & & X   & & & & \\     \hline     \textit{Meaningless 14} &      & & & & & & & & X \\     \hline     \end{tabular}     \label{tab:nada}     \end{table}          \lipsum          \end{document}


title: Increase spacing after minipage

text: Hello i am using a line of code to draw 2 equations next to eachother using `\minipage{}`:               \begin{minipage}{0.5\textwidth}     \small     \begin{equation}\label{e3}     \begin{split}     \frac{\mathrm d x'}{\mathrm d t} &= \frac{\mathrm d x}{\mathrm d t} - \frac{\mathrm d}    {\mathrm d t}(ut)\\     \frac{\mathrm d x'}{\mathrm d t} &= \frac{\mathrm d x}{\mathrm d t} - u \, \frac{\mathrm d}{\mathrm d t}(t)\\     \frac{\mathrm d x'}{\mathrm d t} &= \frac{\mathrm d x}{\mathrm d t} - u \, \frac{\mathrm d t}{\mathrm d t}\\     v' &= v - u     \end{split}     \end{equation}     \end{minipage}     \begin{minipage}{0.5\textwidth}     \small     \begin{equation}\label{e4}     \begin{split}     \frac{\mathrm d x}{\mathrm d t} &= \frac{\mathrm d x'}{\mathrm d t} + \frac{\mathrm d}{\mathrm d t}(ut)\\     \frac{\mathrm d x}{\mathrm d t} &= \frac{\mathrm d x'}{\mathrm d t} + u \, \frac{\mathrm d}{\mathrm d t}(t)\\     \frac{\mathrm d x}{\mathrm d t} &= \frac{\mathrm d x'}{\mathrm d t} + u \, \frac{\mathrm d t}{\mathrm d t}\\     v &= v' + u     \end{split}     \end{equation}     \end{minipage}      After compiling, using PDFLaTeX i get a resulting document which looks like this: ![too small spacing after minipage](http://i.stack.imgur.com/aBZ4e.png) What can i do to increase vertical spacing after minipage, which is very small? I would also like to know, how can i take care of an annoying `\small` comand which i have to put inside every `\minipage{}` for my equations to look smaller? Can it be done in preamble? Thank you.


title: Biblatex alphabetic style like [Smith, 2005]

text: the _alphabetic_ style of biblatex is already very close to my requirements, but considering the following entry               @BOOK{smith1,       author = {John Smith and Mike Someone},       title = {The book with a very very very very very long title},       year = {2005},       publisher = {Publisher},       location = {New York}     }      I would like to have a label like **[Smith, 2005]** instead of [Smi+05]. In other words:               [<first author's last name>, <year with 4 digits>]      In case there is more than one entry with the same author and the same year, a single letter should be added right behind the year like in **[Smith, 2005a]** ( _alphabetic_ already does this by default).


title: loop and input@path

text: I'm trying to have recursive path in the command `\input@path`, but it seems to be impossible (as I read, I'm with the TexLive 2012 and Linux). So I had the following idea, make a loop in `\input@path`, but it doesn't work and I don't know why ... This is what I did :               \newcounter{path}     \setcounter{path}{0}     \def\nom{%       \ifcase\thepath Cours%       \or Livres%       \fi     }     \def\input@path{%      \loop \ifnum \thepath<3        {~/Exercices/\nom/Derivee/}      \stepcounter{path} \repeat     }      If someone have an idea, it will be very helpful.


title: Enumerate inside align

text: How can I get an `enumerate` inside an `align` environment? I want something like this:               %...     \begin{enumerate}     \item test123     \begin{align*}     \item x^2 & \text{ bla}\\     \item x^3 & \text{ bla2}\\     \end{align*}     \end{enumerate}     %...      Is that possible?


title: hyperref in Texmaker not making clickable links in table of contents

text: I am using Texmaker 3.1 on Windows 7 (also tried Texmaker 3.3.3 with the same result) with a MikTeX 2.9 back end to compile a document where I would like the table of contents to link to the pages. For this I normally use the `hyperref` package, and this has worked before in Texmaker on other machines. On my present machine, Texmaker compiles without complaints, but in the resulting output the table of contents entries are not clickable. Here is a minimal example:               \documentclass[10pt,a4paper]{article}          \usepackage{hyperref}          \hypersetup{     colorlinks,     citecolor=black,     filecolor=black,     linkcolor=blue,     urlcolor=black     }          \oddsidemargin 0.0in     \textwidth 6.5in               \begin{document}               \tableofcontents          \newpage          \section{First Section}          This is the first section.          \newpage          \section{Second Section}          This is the second section.          \subsection{A Subsection}     This is a subsection.          \end{document}      In this example I've coloured the links blue to demonstrate that my output does colour links correctly (my table of contents has blue entries) but nothing is clickable. In addition no PDF bookmarks are available in the output when I open it in Acrobat. Since Texmaker isn't complaining about missing packages, etc., I'm at a loss as to what's going wrong. Any suggestions are appreciated. UPDATE: I have got the Texmaker 3.1 version producing correct, clickable output now, but I'm not convinced this issue can be considered 'answered'. To share the stop-gap solution: I changed the settings in Texmaker for QuickBuild to be "pdfLaTeX + View PDF." This still doesn't explain why the other methods available for ending up with a PDF file don't work with the clickable table of contents entries, however. UPDATE: As no responses have come at the original Stack Overflow location for this question, I am posting it here to expose it to the expert TeXnicians on this site.


title: Decrease linespacing in margin notes of the fixme package?

text: Is it possible to get single-spaced marginnotes in a double-spaced document?               \documentclass[english,a4paper]{scrartcl}     \usepackage{babel}     \usepackage{blindtext}     \usepackage[draft]{fixme}     \linespread{2}          \begin{document}     \blindtext     \fxnote{this is a multi-line margin note note note note }     \blindtext     \end{document}


title: On testing two fully expanded character strings for equality

text: I know three macros that test two fully expanded character strings for equality:   1. `\ifthenelse{\equal{<op1>}{<op2>}}{<true>}{<false>}` (`ifthen` package)   2. `\IfStrEq{<op1>}{<op2>}{<true>}{<false>}` (`xstring` package)   3. `\ifstr{<op1>}{<op2>}{<true>}{<false>}` (`scrbase` package) Interestingly, they share one drawback: They are fragile, which means that   * we have to `\protect` them in moving arguments (e.g. in the argument of `\section`).   * they don’t properly work in the context of PDF string expansion (e.g. for PDF outlines) as implemented by the `hyperref` package. Minimal example:               \documentclass{article}          \usepackage{xstring}          \usepackage{hyperref}          \newcommand*{\juhu}{%       juhu%     }          \newcommand*{\test}[1]{%       \IfStrEq{#1}{juhu}{Juhu!}{Oje!}%     }          \begin{document}          \tableofcontents          \section{\test{\juhu}}     %% \section{\protect\test{\juhu}}          \end{document}      Hence my question: Is it possible to implement an equality test that fully expands its operands, but removes the restrictions listed above?


title: latex and pdftex hangs when compiling

text: I just updated my MiKTeX and now nor latex, neither pdflatex not compiling my tex. Even if it contains only               \begin{document}     \end{document}      No error messages are shown, no files are created. It just hangs.


title: Cross product using the checker method

text: I saw an old question on how to obtain arrows inside of matrices using arrows. And thanks to Altermundus I was able to hack together the file below:               \documentclass[12pt]{article}     \usepackage{tikz}     \usetikzlibrary{matrix}     \usepackage{fullpage,amsmath}     \begin{document}          \begin{align*}     \begin{array}{|rrr|rr}     i &  j & k & i &  j\\     3 & -2 & 2 & 3 & -2\\     3 &  2 & 1 & 3 &  2     \end{array}     \end{align*}          \begin{figure}[!htbp]     \tikzset{node style ge/.style={circle}}     \centering     \begin{tikzpicture}[baseline=(A.center)]       \tikzset{BarreStyle/.style =   {opacity=.4,line width=3 mm,line cap=round,color=#1}}       \tikzset{SignePlus/.style  =   {above left,,opacity=0.8,circle,fill=#1!50}}       \tikzset{SigneMoins/.style =   {above right,,opacity=0.8,circle,fill=#1!50}}     % les matrices     \matrix (A) [matrix of math nodes, nodes = {node style ge},,column sep=0 mm]      {      i &  j & k & i &  j \\            3 & -2 & 2 & 3 & -2 \\            3 &  2 & 1 & 3 &  2 \\     };           \draw [BarreStyle=red] (A-1-1.north west) node[SignePlus=red] {$+$} to (A-3-3.south east) ;      \draw [BarreStyle=red] (A-1-2.north west) node[SignePlus=red] {$+$} to (A-3-4.south east) ;      \draw [BarreStyle=red] (A-1-3.north west) node[SignePlus=red] {$+$} to (A-3-5.south east) ;      \draw [BarreStyle=blue]  (A-1-3.north east) node[SigneMoins=blue] {$-$} to (A-3-1.south west);      \draw [BarreStyle=blue]  (A-1-4.north east) node[SigneMoins=blue] {$-$} to (A-3-2.south west);      \draw [BarreStyle=blue]  (A-1-5.north east) node[SigneMoins=blue] {$-$} to (A-3-3.south west);      \draw (A-1-1.north west) -- (A-3-1.south west); \draw (A-1-3.north east) -- (A-3-3.south east);     \end{tikzpicture}     \end{figure}          \end{document}      ![CrossProduct](http://i.stack.imgur.com/86f20.png) Now I am having a few bunks to iron out, and some help would be much obliged =)   * Is there any method to get the absolute signs, eg the brackets `| |` around the matrices to be horizontal? Right now they are slanted, due to the different size of `a_{11}` and `$_{13}`.   * The blue and red lines are also not quite parallel, any fix here?  I was thinking of wrapping this code in a new environment, or something. But I guess that will have to do for a later question. I sort of need to make a few of these, so I would preffer not a quick and dirty fix that works only in this case. My entries are never bigger than 3 digits.


title: Indent fancy quotation box in latex

text: I want to write latex to implement below fancy quotation box as per solution Fancy Quotation Boxes in Latex. ![enter image description here](http://i.stack.imgur.com/2gbsV.png) However, I don't know how to indent the quotation box such as: ![enter image description here](http://i.stack.imgur.com/IKSwe.png) You may observe the quotes **part of definition D** has been indented, so it aligns with **Definition D**. I update the code:               % <!-- language: latex --> Comment this line for avoid errors     \documentclass[a4paper]{article}     \usepackage[table]{xcolor}     \usepackage{framed}     \usepackage[strict]{changepage}              %Defining colour with different models.     \definecolor{mypink1}{rgb}{0.858, 0.188, 0.478}     \definecolor{mypink2}{RGB}{219, 48, 122}     \definecolor{mypink3}{cmyk}{0, 0.7808, 0.4429, 0.1412}     \definecolor{mygray}{gray}{0.8}          \definecolor{formalshade}{rgb}{0.95,0.95,1}              \newenvironment{formal}{%       \def\FrameCommand{%         \hspace{1pt}%         {\color{mygray}\vrule width 6pt}%         {\color{formalshade}\vrule width 4pt}%         \colorbox{formalshade}%       }%       \MakeFramed{\advance\hsize-\width\FrameRestore}%       \noindent\hspace{-4.55pt}% disable indenting first paragraph       \begin{adjustwidth}{}{7pt}%       \vspace{2pt}\vspace{2pt}%     }     {%       \vspace{2pt}\end{adjustwidth}\endMakeFramed%     }          \begin{document}          \subsubsection*{Definition Lists}          \textbf{Markdown Extra} has a special syntax for definition lists too: \newline          \noindent     \textbf{Term 1} \\     \noindent     \textbf{Term 2} \\     \indent \indent Definition A \\     \indent \indent Definition B \\          \noindent     \textbf{Term 3} \\          \indent \indent Definition C \\          \indent \indent Definition D \\          % indent quote blocks?     \begin{formal}         part of definition D     \end{formal}              \begin{formal}     \begin{quote}         part of definition D     \end{quote}     \end{formal}          \end{document}


title: matlab2tikz - TeX out of memory

text: I am using `matlab2tikz` to import figures from MATLAB to tex. However I quickly get the message `TeX capacity exceeded, sorry [main memory size = 3000000]`. I have tried expand main memory using instructions from http://docs.miktex.org/manual/runtimeparams.html using `initexmf --edit- config-file=xelatex` but that only opens an empty file! I have also tried to use externalization functionality of `pgfplots` using instructions from its manual and also from Export eps figures from TikZ, but I've also failed (probably because I am using xetex and not pdflatex). What should I do furhter? EDIT: I am using MikTeX 2.9 on Windows 7 (with XeTeX 0.9998)


title: Problem with twocolumn ledger format in scrbook

text: currently I am trying to get a thesis in architecture into a ledger (tabloid, double letter) formatted srcbook document. The issue is that it should have twocolumns - at least for the main part of the investigation - and that LaTeX does somehow not like it. I always get the warning: _Package typearea warning: Bad type area settings! The detected line width is about 128% larger that..._ If I let it calculate the DIV value it is all very scrumbled up at the left hand side of the document, so it seems necessary to use a higher DIV value in order to have a nice distributed page (at least using the space a bit better). In addition to that I get a very bad distribution on the pages following the first page of each chapter and have no clue how to organize it better. What package might help? Just for if it is important: I use pdflatex with MikTeX. Here my minimal example:               \documentclass[     paper=280mm:432mm,  % Papierformat: doble carta/ ledger     pagesize,           % stellt Ausgabeformat ein     DIV=14,             % Satzspiegel regeln     landscape,          % Querformat      BCOR=10mm,          % Binderand. Wird dann noch abgezogen     12pt]               % Schriftgrösse     {scrbook}          \usepackage{blindtext}       \usepackage{fontenc}        % Schrift (Font)      \usepackage[english]{babel} % hier kann man die Sprache des Dokuments einstellen     \usepackage{scrpage2}       % um Seiten einzurichten      \usepackage{multicol}       % mehrere Spalten     \pagestyle{scrheadings}     % Seitenlayout     \linespread{1.2}          \begin{document}        \chapter{Test}        \begin{multicols*}{2}        \blindtext[10]        \end{multicols*}     \end{document}      Thanks in advance! You work has already helped me a lot before.


title: Author and institute don't appear when adding background image to title page in beamer

text: I am attempting to add a background image to the title page of a beamer talk. I have attempted to use the solution given here Creating a background image on the title page only using Beamer. However I am getting some problems I don't understand. Here is my MWE .               \documentclass{beamer}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{libertine} % or any other font package (or none)     \newcommand*\quotefont{\fontfamily{LinuxLibertineT-TLF}} % selects Libertine for quote font     \usepackage{tikz}     \usefonttheme[onlylarge]{structurebold}     \setbeamerfont*{frametitle}{size=\normalsize,series=\bfseries}     \setbeamertemplate{navigation symbols}{}          \setbeamercolor{background canvas}{bg=black}     \setbeamercolor{normal text}{fg=white}          \pgfdeclareimage[width=\paperwidth]{mybackground}{bigdata410}          \setbeamertemplate{title page}{                \begin{picture}(0,0)                  \put(-30,-163){%                     \pgfuseimage{mybackground}                 }                  \put(0,-110.7){%                     \begin{minipage}[b][45mm][t]{226mm}                         \usebeamerfont{title}{\inserttitle\par}                     \end{minipage}                 }                   \end{picture}         }      \title{Lost in data}     \author[Author et al.\@]{Author}     \institute{University of }     \date{}          \begin{document}          \begin{frame}       \titlepage     \end{frame}     \end{document}      My problems are   * The title is not centered   * The author and institution don't appear on the title page   * If I comment out the libertine fonts lines I get  LaTeX Font Warning: Font shape `T1/cmss/m/n' in size <4> not available (Font) size <5> substituted on input line 44. (I can fix this last problem using \usepackage{lmodern} it seems but I am not sure I like that font.) Any help very much appreciated.


title: Biblatex: submitting to the arXiv

text: I am trying to submit a LaTeX file to the arXiv which uses `biblatex`. However, it fails whatever I do. I first get the message               biblatex.sty is not found      I have tried including (all from TeXLive 2010) `biblatex.sty` but then I get               logreq.sty is missing then logreq.def is missing      then               ! Package biblatex Error: Outdated 'etoolbox' package.      I then tried adding `etoolbox.sty` and `etoolbox.def` and get               ! Package biblatex Error: Style 'alphabetic' not found      So I added `alphabetic.bbx` then `standard.bbx` then `alphabetic.cbx` and finally I get               ! Package biblatex Error: Autocite command 'inline' undefined      I also tried incorporating the bib into the main LaTeX file as in biblatex submitting to a journal but it doesn't help. Has anyone successfully used `biblatex` with the arXiv and if so, how?


title: Fontspec: Is there any practical difference between \setmainfont and \newfontfamily + \def\rmfamily{...}

text: As the title of this question suggested. Is there any practical difference between               \setmainfont{font name}      and               \newfontfamily\familyname{font name}     \def\rmfamily{\familyname}      I had a look into the source of font spec. I believe the above two are practically the same. However, I am still not quite familiar with the latex3 syntax, so I may miss something.


title: Implementing a sort of "tightened frenchspacing"

text: By default, (La)TeX adds extra space between sentences. The exact rules are in the _TeXbook_ , a summary by TH. can be found here. What follows is is my "executive summary":   * After any period (or quotation/exclamation mark) that doesn't follow a capital letter, TeX adds a font's "extra space" to the "normal (interword) space". For Computer Modern 10pt, the normal space is 3.33pt and the extra space 1.11pt, resulting in an intersentence space of 4.44pt (+33% compared to the nomal space, assuming no stretch and shrink).   * A sentence end after a capital letter is indicated by the `\@` command: `Ann is learning the ABC\@.` To denote that a period after a lowercase letter doesn't end a sentence, one may use `\@` as well as an explicit space: `Prof.\@ Higgins` or `Prof.\ Higgins`. Intersentence spacing may be brought in line with normal spacing by issuing the `\frenchspacing` command. (This is the standard setting for certain languages, e.g. the `(n)german` option of the `babel` package.) With `\frenchspacing` enabled, there's no need to use the `\@` command. One may revert to (La)TeX's default behavour by issuing `\nonfrenchspacing`. So, there's the choice between extra intersentence spacing and uniform spacing. What is missing in my opinion is a third option I'll call "tightened frenchspacing": normal (interword) spacing between sentences and _decreased_ spacing after non-sentence ending periods. To be somewhat more precise (while still ignoring stretch and shrink), I envision the following:   * Adhering to a font's ratio between "normal space" and "normal space plus extra space" (3:4 for Computer Modern), the intersentence space is set to the normal space. The space after non-sentence ending periods equals the normal space multiplied by the above ratio (resulting in a space of 2.5pt for Computer Modern).   * As with `\nonfrenchspacing` in effect, the `\@` command is used to denote cases of special punctuation. How should such a "tightened frenchspacing" option be implemented? EDIT: Thanks to Mico for providing what may well be a stepping stone to a solution. Here's another attempt at clarification:   * Simply reducing the spacing after _any_ period is not what I had in mind. There should be a (tangible) difference between end-of sentence spaces and spaces after non-sentence-ending periods (only that the latter should be reduced instead the former augmented).   * If adhering to a font's normal space/extra space ratio is not possible, a solution that adds a fixed (reduced) space (say, a thin space) after non-sentence-ending periods will be accepted.   * For compatibility reasons, I'd prefer a solution that works with the traditional use of `\@` (i.e allows "tightened frenchspacing" for existing documents without the need to change the document body). Should it turn out that a different set of "special punctuation" macros is needed, I'll accept this as a solution.


title: moderncv with less than 10pt font size

text: I want to make a moderncv resume with font size less than 10pt. I am trying out different font sizes to see which one is best. I saw this question and one comment said that `\documentclass[8pt]{extarticle}` worked. How do I combine that line with moderncv? `documentclass[8pt]{extarticle}{moderncv}` or `documentclass[8pt]{moderncv,extarticle}` don't work. Is it possible to achieve this at all? I even tried adding `\usepackage[fontsize=9pt]{scrextend}` but that throws up errors as well.


title: Using different text and math fonts with unicode-math

text: When using pdfLaTeX it is sometimes possible, when using different text and math font sets, to take the fonts for operators like `sin` and `cos` from the text font even within formulae. Thus, using the `lucimatx` package, I can write               \renewcommand{\rmdefault}{bch}     \usepackage[onlymath=true]{lucimatx}      and then formulae will be set using `lucida` for math fonts, but charter (i.e., `bch`) for text-like objects like `sin` and `cos`, so matching the text using in the document body. This is what one wants from a typographic standpoint. Is something similar possible using `unicode-math`? If I use               \usepackage{unicode-math}     \setmainfont{Charis SIL}   % Charis is a charter clone     \setmathfont{LucidaBrightMathOT.otf}      It seems to use `lucida` fonts for everything in math mode. The same if I use `xits` math fonts. I may, of course, be missing the equivalent of the `onlymath` option in `unicode-math`. Any help would be appreciated. Regards Geoff Vallis


title: Show "Page X of Y" only if there are multiple pages?

text: I'm trying to add a line in the header to be "Page X of Y", but only if there are multiple pages. My main problem is how to format the if statement. So far I have                   \ifx \pageref{LastPage} 1         \relax     \else         \fancyhead[R]{Page \thepage\ of \pageref{LastPage}}     \fi      I think it's the first line that is problematic, as the rest seems to work.


title: How do I change colouring of comments using algorithmicx?

text: I am using the `algorithm` and `algpseudocode` packages, whilst wrapping my algorithms around `algorithm` and `algorithmic` blocks. **I would like to change the colour or formatting of my comments (`\Comment{...}`) to make them more or less pronounced compared to standard code**, as often with narrow technical documents the comment and pseudocode may come close together and the comment may perhaps overflow to the next line, slightly hampering readability. Thanks


title: \pgfmathdeclarefunction and LuaLaTeX

text: Is it possible to use LuaLaTeX in `\pgfmathdeclarefunction`? I tried with `sinh` which seems to work in `pgfmathsetmacro` but not in `\pgfmathparse` and `pgfplots`. How should I declare a pgf function with Lua correctly?               \documentclass{article}     \usepackage{tikz}     \usepackage{pgfplots}          \makeatletter     \pgfmathdeclarefunction{luasinh}{1}{%         \begingroup             \edef\pgfmath@arg{#1}%             \directlua{tex.setdimen("pgfmath@x", math.sinh(\pgfmath@arg) .. "pt")}%             \pgfmath@returnone\pgfmath@x%         \endgroup     }%     \makeatother               \begin{document}          \noindent     Lua: \pgfmathsetmacro\luasinh{luasinh(1)}\luasinh\\     PGF: \pgfmathsetmacro\pgfsinh{sinh(1)}\pgfsinh\\          \begin{tikzpicture}         \begin{axis}             \addplot {sinh(x)};             %\addplot {luasinh(x)}; does not work         \end{axis}     \end{tikzpicture}          \end{document}      I think being able to use Lua in `LuaLaTeX` when declaring pgf functions could be useful. For example, this question "Erf function in LaTeX" could maybe be answered without calling Gnuplot but simply call `math.erf` (if this exists?) in `\directlua`.


title: Add file location (figure) in windows ST3

text: I have been using Sublime Text 3 with Latexing to produce my documents. However, I need to add lots of screenshots in my document. I am on windows and one can think how difficult it can be to get absolute paths right. Any Latexing or ST3 support in this regard to ease insertion of absolute paths would be very helpful. Thanks!


title: What is the correct way to stretch the cell keeping it vertically centred in tabularX

text: I have this table, in which the text is touching the horizontal lines above and below, I tried some of the solutions to stretch the cells I found in the web. I managed to stretch the cell but I can't keep it center aligned. This would be a MWE:                   \documentclass[a4paper,11pt,twoside]{article}         \usepackage{amssymb}         \usepackage{amsfonts}         \usepackage{array}         \usepackage{mathtools}         \usepackage{mathabx}      \everymath{\displaystyle}          \usepackage{tabularx}         \begin{document}         \begin{table}[H]             \centering             \begin{tabularx}{1.3\textwidth}{ c | X }                     \hline                          Objetivos de diseño & $\frac{W_{TO}}{S_w} $, $\frac{T_{TO}}{W_{TO}} $, $A$, $C_{Do}$, $\varphi$, $N_e$, $C_{Lmax_{TO}}$, $C_{Lmax_{L}}$, $C_{Lmax}$ \\\hline                          Especificaciones iniciales &  $\frac{W_{CR}}{W_{TO}}$, $\frac{W}{W_{TO}}$, $\frac{W_{L}}{W_{TO}}$, $q$, $\sigma$, $S_{TO}$, $S_e$, $n$ \\\hline                         Factores adicionales & $\frac{T_{TO}}{T_2} $, $\gamma$, $\eta$, $c_T$, $\frac{T_{TO}}{T_{CR}} $\\  \hline                 \end{tabularx}         \end{table}             \end{document}


title: Enforce 2-digit citation numbers?

text: I need citation numbers to be at least two digits. So, any number less than 10 needs to be prefixed with a zero: [01], [02] ... [10] Is it possible to that in bibtex, or any other citation package? I am using standard IEEE paper style and the multibib package, but I would appreciate an answer in any package or style.                   \documentclass[10pt,journal,cspaper,compsoc]{IEEEtran}         \usepackage{multibbl}


title: Filling area between curve and circle using TikZ

text: The question is rather self-explaining. I have the picture below, and now I want to fill the two areas between the circle (arc) and the curves.               \documentclass{article}          \usepackage{tikz}          \begin{document}     \begin{tikzpicture}[thick,every node/.style={circle,scale=.5,fill}]          \draw (0,0) ++(160:3) arc (160:-160:3);          \node (e1) at (160:3) {};     \node (e2) at (-160:3) {};          \draw(e1) -- node[fill=none,left,scale=2] {$e$} (e2);          \draw plot [smooth] coordinates {(160:3) (130:2) (110:2.5) (100:2.5) (90:3)};     \draw plot [smooth] coordinates {(40:3) (30:1) (-40:1.5) (-80:3)};          \end{tikzpicture}     \end{document}


title: pgfplots: Add main diagonal (identity line) without affecting the axis

text: I would like to add a main diagonal to a plot that does not affect the axis. The line should start and end at the axis or beyond them. Furthermore, I would like to avoid `xmin`and `xmax`, because I work with data tables. I tried relative coordinates `rel axis cs`, but this does not result in a main diagonal (slope 1 and offset 0). Here is a minimal working example to start with:               \documentclass{scrartcl}          \usepackage{pgfplots}     \pgfplotsset{compat=1.9}          \begin{document}          \begin{tikzpicture}         \centering         \pgfplotsset{width=0.9\columnwidth}         \begin{axis}             \addplot coordinates {(0,0.1)(1,2)(2,3)};         \end{axis}     \end{tikzpicture}          \end{document}


title: Reference to a subfigure

text: I'm using `subfigure` for some images. To reference to them in the text, I use the `\autoref{fig:test}` command. But this doesn't matter the problem is the same with `\ref` command. To shorten the name I used: `\addto\extrasngerman{\def\figureautorefname{Abb.}}` and to have arabic numbers instead of chars: `\renewcommand*\thesubfigure{\arabic{subfigure}}` Problem (still without the modifications above): It refers to it with > 11 , but I want to have it referred like > 1.1 MWE:               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage[ngerman]{babel}     \usepackage[hidelinks]{hyperref}     \usepackage{graphicx}     \usepackage{caption}     \usepackage{subcaption}     \addto\extrasngerman{\def\figureautorefname{Abb.}}     \renewcommand*\thesubfigure{\arabic{subfigure}}     \begin{document}     \section{Test}     Hello. This is some text. I'm referring to a the test image (\autoref{fig:Test1}). Or to the second image with the ref command (Abb. \ref{fig:Test2}). What I want to have: (Abb. 1.2)          \begin{figure}[h]             \centering             \begin{subfigure}[b]{0.3\textwidth}                     \includegraphics[width=\textwidth]{bmp0_test_image.png}                     \caption{TestCaption1}                     \label{fig:Test1}             \end{subfigure}%             ~             \begin{subfigure}[b]{0.3\textwidth}                     \includegraphics[width=\textwidth]{bmp0_test_image.png}                     \caption{TestCaption2}                     \label{fig:Test2}             \end{subfigure}             \caption{Test-Figure}\label{fig:TestFigure}     \end{figure}     \end{document}      ![Output](http://i.stack.imgur.com/6FtOU.png)


title: How can i use fonts other than gbsn/gkai for CJK Chinese?

text: The standard CJK package only provides 2 fonts for simplified Chinese, as described here. My question is how to create more fonts for it? I'm using MacTeX 2013 and UTF8 + CJK + pdflatex is the expected environment. There should be a way to convert fonts from, say `ttf`, to fonts TeX could handle.


title: multiple non linear curve fitting using pgfplot for IC50

text: My question is related with Non-linear curve fitting with gnuplot .I want to make multi IC50 using that plot which give result red, green and blue line, but only blue line appeared. this is MWE               \documentclass[11pt]{article}     \usepackage{pgfplots}     \usepackage{siunitx}     \DeclareSIUnit\Molar{\textsc{m}} % http://tex.stackexchange.com/a/27618/828     \begin{filecontents}{test11.dat}     2   12     5   55     10  96     20  135     50  144     100 147     200 147     500 146     \end{filecontents}     \begin{filecontents}{drc11.dat}     2   17     5   60     10  92     20  127     50  144     100 147     200 157     500 166     \end{filecontents}     \begin{filecontents}{drc13.dat}     1   11     3   40     12  82     21  97     40  104     80 117     100 127     400 136     \end{filecontents}     \begin{document}          \begin{figure}[h!t]     \centering     \begin{tikzpicture}     % test11 red line     \begin{axis}[         xmode=log,         ymode=linear,         axis x line*=bottom,         axis y line*=left,     tick label style={font=\small},     grid=both,     tick align=outside,          tickpos=left,     xlabel= {[ACh]} (nM),     ylabel=Response (mm),         xmin=0.1, xmax=1000,         ymin=0, ymax=160,         width=0.8\textwidth,         height=0.6\textwidth,     ]          \addplot[only marks] file {test11.dat};     % Now call gnuplot to fit this data     % The key is the raw gnuplot option     % which allows to write a gnuplot script file     \addplot+[raw gnuplot, draw=red, mark=none, smooth] gnuplot {     set log x; % <------------------------------------------------- this is the magic line     f(x)=Ymax/(1+(EC50/x)^nH);     % let gnuplot fit, using column 1 and 2 of the data file     % using the following initial guesses     Ymax=150;     nH=2;     EC50=60;          fit f(x) 'test11.dat' using 1:2 via Ymax,EC50,nH;          % Next, plot the function and specify plot range          % The range should be approx. the same as the test.dat x range          plot [x=0.1:1000] f(x);        };            \end{axis}     % % % %     \begin{axis}[         xmode=log,         ymode=linear,         axis x line*=bottom,         axis y line*=left,     tick label style={font=\small},     grid=both,     tick align=outside,          tickpos=left,     xlabel= {[ACh]} (nM),     ylabel=Response (mm),         xmin=0.1, xmax=1000,         ymin=0, ymax=160,         width=0.8\textwidth,         height=0.6\textwidth,     ]     \addplot[only marks] file {drc11.dat};     % Now call gnuplot to fit this data     % The key is the raw gnuplot option     % which allows to write a gnuplot script file     \addplot+[raw gnuplot, draw=green, mark=none, smooth] gnuplot {     set log x; % <------------------------------------------------- this is the magic line     f(x)=Ymax/(1+(EC50/x)^nH);     % let gnuplot fit, using column 1 and 2 of the data file     % using the following initial guesses     Ymax=150;     nH=2;     EC50=60;          fit f(x) 'drc11.dat' using 1:2 via Ymax,EC50,nH;          % Next, plot the function and specify plot range          % The range should be approx. the same as the test.dat x range          plot [x=0.1:1000] f(x);        };            \end{axis}     %DRC13 : blue line     \begin{axis}[         xmode=log,         ymode=linear,         axis x line*=bottom,         axis y line*=left,     tick label style={font=\small},     grid=both,     tick align=outside,          tickpos=left,     xlabel= {[ACh]} (nM),     ylabel=Response (mm),         xmin=0.1, xmax=1000,         ymin=0, ymax=160,         width=0.8\textwidth,         height=0.6\textwidth,     ]          \addplot[only marks] file {drc13.dat};     % Now call gnuplot to fit this data     % The key is the raw gnuplot option     % which allows to write a gnuplot script file     \addplot+[raw gnuplot, draw=blue, mark=none, smooth] gnuplot {     set log x; % <------------------------------------------------- this is the magic line     f(x)=Ymax/(1+(EC50/x)^nH);     % let gnuplot fit, using column 1 and 2 of the data file     % using the following initial guesses     Ymax=150;     nH=2;     EC50=60;          fit f(x) 'drc13.dat' using 1:2 via Ymax,EC50,nH;          % Next, plot the function and specify plot range          % The range should be approx. the same as the test.dat x range          plot [x=0.1:1000] f(x);        };            \end{axis}     \end{tikzpicture}     \end{figure}     \end{document}      and the result is only blue line appear ![enter image description here](http://i.stack.imgur.com/BZdhX.jpg) This is the errors in .log actually during compile I can see three lines but after compile finish, two lines dissappear. I always use `-shell-escape´               ! Undefined control sequence.     <write> gnuplot -V >\pgfplots@plot@filename                                                  .vrs     l.36 ...gnuplot@logbehavior@checkversion\endcsname          The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.          runsystem(gnuplot -V >.vrs)...disabled (restricted).          ! Undefined control sequence.     \pgfplots@identify@gnuplot@logbehavior@checkversion ...                                                       .vrs\relax \ifeof \r@pgfpl...     l.36 ...gnuplot@logbehavior@checkversion\endcsname          The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.          Package pgfplots: checking gnuplot -V : `gnuplot 4.6 patchlevel 0 ' (if this fa     ils, set `/pgfplots/gnuplot writes logscale=true|false')     Package pgfplots: I found gnuplot version >= 4.4. This one doesn't write log()      coordinates. I will apply log() manually.     PGFPlots: reading {test11.dat}     runsystem(gnuplot IC50curvesederhana.pgf-plot.gnuplot)...disabled (restricted).          PGFPlots: reading {IC50curvesederhana.pgf-plot.table}     LaTeX Font Info:    External font `cmex10' loaded for size     (Font)              <7> on input line 75.     LaTeX Font Info:    External font `cmex10' loaded for size     (Font)              <5> on input line 75.     PGFPlots: reading {drc11.dat}     runsystem(gnuplot IC50curvesederhana.pgf-plot.gnuplot)...disabled (restricted).          PGFPlots: reading {IC50curvesederhana.pgf-plot.table}     PGFPlots: reading {drc13.dat}     runsystem(gnuplot IC50curvesederhana.pgf-plot.gnuplot)...disabled (restricted).          PGFPlots: reading {IC50curvesederhana.pgf-plot.table}     [1


title: Workaround for a very weird bug in lualatex math-mode?

text: In this MWE, of a math equation               \documentclass{article}     \begin{document}     \begin{equation}     \sqrt{\frac{\left(E-\frac{N_c e^d}{b}\right)}{a}}     \end{equation}     \end{document}      I find that `lualatex` (Version beta-0.70.2-2013031016 (TeX Live 2013/dev)) produces a very strange result: ![lualatex](http://i.stack.imgur.com/Q4NS9.png) The result is however as expected with `pdflatex` 3.1415926-2.5-1.40.13 (TeX Live 2013/dev) and `xelatex` (3.1415926-2.5-0.9999-2013031016 (TeX Live 2013/dev)) The example is really minimal to reproduce the bug. The question is: I really need to type an equation like this and I really need to use `lualatex` for other reasons. What is a workaround (trick with commands) or a permanent solution (e.g. load package, add something to the preamble)? A secondary question is how one reports a bug in `lualatex`?, (or for any TeX program for that matter)


title: How to write a custom biblatex bbx file: no formatting, just plain data

text: I'd like to have a biblatex style which would output something along the lines of               \begin{journalentry}     \label{label}     \lastname{Smith}     \firstname{John}     \date{1988}     \title{A clever paper}     \journal{Some journal}     \end{journalentry}      using the `.bib` and `.bcf` files. I looked into `debug.bbx`, but it seems to clutter the `.bbl` file with lots of other stuff, and I don't know how to "strip down" its output.


title: What are the advantages of TeXShop over TeXworks?

text: The TeXworks homepage states that "It is deliberately modeled on Dick Koch’s award-winning TeXShop for Mac OS X" and it seems that today people are using both. Both are delivered with TexLive and MacTex. TeXworks is available for Windows and Linux as well, what I consider a big advantage. TeXShop might have better OSX look&feel, but it is available for OSX only. So why should I use it, does it have advantages over TeXworks?


title: underfull \hbox (badness 1342) in paragraph

text: This message of warning appears at the line 967, which says:               Las ecuaciones en \eqref{eq1.32} sugieren un m\'etodo para calcular las factorizaciones \QR reducidas. Dados $a^1,a^2,\dotsc$, podemos construir los vectores $\seq[q]{n}$ y los escalares $r_{ij}$ por un proceso de ortogonalizaci\'on sucesiva. Esta es una idea antigua, conocida como la \textit{ortogonalizaci\'on de Gram-Schimd}.      In the log file:               Underfull \hbox (badness 1342) in paragraph at lines 967--968     []\OT1/cmr/m/n/12 Las ecua-ciones en [] su-gie-ren un m^^Setodo para cal-cu-lar las fac-to-ri-za-cio-nes     []


title: Split a string with hyphens into separate words

text: I want to write a macro in which I can split a string with a linking character (like a hyphen) into different words. So, I have something like `\macro{one- two-three}` which I would like to split into three different words. Similarly, `\macro{four-five}` should print `"four five"` (please note the space). A restriction is that I don't want to load any package to keep the tex-file as small as possible. So I don't want to use `xstring` or `substr` or anything else. How do I write a macro which returns me the separate words? I'm new here, so my apologies if I didn't explain my problem clearly.


title: Custom glossary style: Make glossary as wide as \textwidth

text: WARNING: This is a follow-up question to Display long form (first-use like) entries of none acronyme type entries. As _mafp_ suggested in the other post I went ahead and defined my own glossary-styles (along with some column specifiers) to tackle the unit issue (using the `user1` field). Now my defintion looks like this (style `tabx3col` used in first glossary and `tabx4col` used in second):               \newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}     \newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}     \newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}          \newglossarystyle{tabx3col}{%      % put the glossary in a longtable environment:      \renewenvironment{theglossary}%       {\begin{longtable}{L{0.2\textwidth}L{0.6\textwidth}R{0.2\textwidth}}}%       {\end{longtable}}%      % Set the table's header:      \renewcommand*{\glossaryheader}{}%      % No heading between groups:       \renewcommand*{\glsgroupheading}[1]{}%      % Main (level 0) entries displayed in a row:       \renewcommand*{\glossaryentryfield}[5]{%         \glstarget{##1}{\textbf{##2}}% Name         & ##3% Description         & ##5% Page list         \\% end of row       }%      % Sub entries treated the same as level 0 entries:      %\renewcommand*{\glossarysubentryfield}[6]{%       %\glossaryentryfield{##2}{##3}{##5}{##6}}%      %% Nothing between groups:      %\renewcommand*{\glsgroupskip}{}%     }               \newglossarystyle{tabx4col}{%      % put the glossary in a longtable environment:      \renewenvironment{theglossary}%       {\begin{longtable}{L{0.1\textwidth}L{0.1\textwidth}p{0.55\textwidth}R{0.2\textwidth}}}%       {\end{longtable}}%      % Set the table's header:      \renewcommand*{\glossaryheader}{}%      % No heading between groups:       \renewcommand*{\glsgroupheading}[1]{}%      % Main (level 0) entries displayed in a row:       \renewcommand*{\glossaryentryfield}[5]{%        \glstarget{\textbf{##1}}{\textbf{##2}}% Name        & $[$\glsentryuseri{##1}$]$% Units        & ##3% Description        & ##5% Page list         \\% end of row       }%      % Sub entries treated the same as level 0 entries:      %\renewcommand*{\glossarysubentryfield}[6]{%       %\glossaryentryfield{##2}{##3}{##5}{##6}}%      %% Nothing between groups:      %\renewcommand*{\glsgroupskip}{}%     }      This gives me an output as shown in the image below: ![screenshot of output](http://i.stack.imgur.com/KQl7T.png) I edit the screenshot with some grey lines for the text which i would like to align (Using the `R` column specifier for fixed-width raggedright columns used in the pagelist). Mainly I would like to have the whole glossary `\textwidth`. I thought by making every column dependant on the `\textwidth` variable and adding the values up to 1 I would get a table which ultimately is as wide as the headerline. I've also tried using tabularx as the table environment, which failed (even though using the macro commands, e.g., `\tabularx \endtabularx` ). I've compiled an MWE (http://pastebin.com/McqsTPga, maybe not so minimal anymore) where you can see the problem for yourself. I'm sorry for the somewhat lengthy post, but this is really bugging me.


title: Change title page template in beamer

text: I would like to change the `title page` in beamer. Thus I tried to change it with `defbeamertemplate` as you can see above :               \documentclass{beamer}     \title{A title}     \date{\today}     \institute{home}     \author{me}     \defbeamertemplate*{title page}{default}[1][]     {     }          \begin{document}          \begin{frame}         \titlepage     \end{frame}          \begin{frame}         \frametitle{plop}         plop              plop     \end{frame}     \end{document}      My problem is that even with a simple example such as above, I got the following error message :               ! LaTeX Error: Command \beamer@@tmpop@title page@default already defined.                    Or name \end... illegal, see p.192 of the manual.      actually the page 192 of the manual does not help me so much ...


title: Run a command at the end of a latexmk run

text: Is there a way to tell latexmk to run a certain command once it's done compiling everything? I haven't found anything in the documentation. Right now I'm using this latexmkrc:               $pdflatex = 'pdflatex -interaction=nonstopmode -file-line-error -synctex=1 %O %S';     $out_dir = 'build';      The reason I'm asking is because I'm using auctex in conjunction with latexmk, so I'd like the "View" command of auctex to open the pdf ; but for this, the pdf must be in the current directory, not in the build subdirectory. Besides, synctex only works when the synctex file is in the same directory. So I'd like to run something like `copy %D . & copy %Z%B.synctex.gz .` at the end of the run. I managed to do it on Linux: I added this line:               $pdflatex .= ' && cp %D %Z%B.synctex.gz .';      but the similar one on Windows fails:               $pdflatex .= ' && copy /y %D . && copy /y %Z%B.synctex.gz .';      This is _not_ an issue with the syntax of the command: when I copy directly in the cmd prompt the command latexmk tells me it runs, it works. So there must be some weird issue.


title: Adjusting font size with TikZ picture

text: Taking from the PGF manual,               \begin{tikzpicture}       \draw [help lines] (0,0) grid (3,3);       \coordinate (a) at (rnd,rnd);       \coordinate (b) at (3-rnd,3-rnd);       \draw (a) -- (b);       \node (c) at (1,2) {x};       \draw let \p1 = ($ (a)!(c)!(b) - (c) $),                 \n1 = {veclen(\x1,\y1)}             in circle [at=(c), radius=\n1];     \end{tikzpicture}      I'd like to increase the size of `x`. The problem is that I have multiple circles in the same diagram. Some of them require a larger sized font, while others are okay at default. How do I do this?


title: How do I set top left position as the anchor for a node (TikZ)

text: Is there a way to position a node in terms of left/right coordinates of bounding rectangle? It appears to me that I can only specify center position.


title: Changing the referencing format for apacite

text: Consider the following MWE:               \documentclass{article}     \usepackage[natbibapa]{apacite}     \bibliographystyle{apacite}          \usepackage{filecontents}     \begin{filecontents*}{bibliography.bib}     @article{billioandrew,         author  = "Billio, M. and Getmansky, M. and Lo, A. and Pelizzon, L.",         title   = "Econometric measures of connectedness and systemic risk in the finance and insurance sectors",         year    = "2012",         journal = "Journal of Financial Economics",         volume  = "104",         number  = "3",         pages   = "535--559"}     \end{filecontents*}          \begin{document}     \nocite{*}     \bibliography{bibliography}           \end{document}      The output in the reference list is as follows: ![enter image description here](http://i.stack.imgur.com/rIiEy.png) However, I want the output to be: Billio, M., Getmansky, M., Lo, A., Pelizzon, L., 2012. Econometric measures of connectedness and systemic risk in the finance and insurance sectors. Journal of Financial Economics 104(3), 535-559 * * * Note the following changes: 1) A comma after the last author (eg, L., instead of L.) 2) No brackets around the year (eg, 2012 instead of (2012)) 3) No italics for the journal name (eg, Journal of Financial Economics instead of _Journal of Financial Economics_ ) 4) No italics for volume number (eg, 104 instead of _104_ ) 5) No comma after the journal name and before the volume number (eg, Journal of Financial Economics 104(3) instead of Journal of Financial Economics, 104(3)) 6) No `&` symbol before the final author/editor in a multi-author/editor list * * * I'd also like to have the same set of rules apply for `@misc` as well. However, I want the in-text citation to remain the same, I only want the above to apply to the reference list output. How can I achieve this?


title: Anyone having trouble reaching miktex.org?

text: Looks like a network misconfiguration to miktex.org ....                 Tracing route to miktex.org [178.77.68.21]       over a maximum of 30 hops:              1    <1 ms    <1 ms    <1 ms  172.28.8.2         2    20 ms    <1 ms    <1 ms  172.28.1.66         3     1 ms    <1 ms    <1 ms  172.28.1.1         4     1 ms    <1 ms    <1 ms  a72-246-0-3.deploy.akamaitechnologies.com [72.246.0.3]         5     1 ms     2 ms    <1 ms  80.67.64.193         6     2 ms     1 ms    <1 ms  80.67.75.246         7    30 ms    43 ms    <1 ms  bst-edge-04.inet.qwest.net [63.149.66.65]         8     7 ms     6 ms     6 ms  jfk-brdr-04.inet.qwest.net [67.14.5.26]         9     8 ms     6 ms     6 ms  63-235-40-58.dia.static.qwest.net [63.235.40.58]        10    82 ms   149 ms    81 ms  po6.ar4.AMS2.gblx.net [67.17.107.174]        11   164 ms   103 ms    82 ms  xe-1-2-0.cr-antares.ams1.hosteurope.de [206.165.75.2]        12    89 ms   208 ms   123 ms  ae1.cr-sargas.lon1.he-core.de [80.237.129.186]        13   191 ms    98 ms   108 ms  xe-0-1-0.cr-merak.fra2.he-core.de [80.237.129.190]        14   104 ms   343 ms     *     xe-0-0-0.dr-master.fal1.he-core.de [176.28.4.114]        15   317 ms   104 ms   104 ms  pvcw-5-35-228-61.dedicated.hosteurope.de [5.35.228.61]        16     *      104 ms     *     pvcw-5-35-228-2.dedicated.hosteurope.de [5.35.228.2]        17   104 ms     *      104 ms  pvcw-5-35-228-61.dedicated.hosteurope.de [5.35.228.61]        18   103 ms     *      103 ms  pvcw-5-35-228-2.dedicated.hosteurope.de [5.35.228.2]        19   104 ms     *      105 ms  pvcw-5-35-228-61.dedicated.hosteurope.de [5.35.228.61]        20   104 ms     *      104 ms  pvcw-5-35-228-2.dedicated.hosteurope.de [5.35.228.2]        21   104 ms     *      104 ms  pvcw-5-35-228-61.dedicated.hosteurope.de [5.35.228.61]        22   104 ms     *      104 ms  pvcw-5-35-228-2.dedicated.hosteurope.de [5.35.228.2]        23   104 ms     *      103 ms  pvcw-5-35-228-61.dedicated.hosteurope.de [5.35.228.61]        24   104 ms     *      104 ms  pvcw-5-35-228-2.dedicated.hosteurope.de [5.35.228.2]        25   104 ms     *      104 ms  pvcw-5-35-228-61.dedicated.hosteurope.de [5.35.228.61]        26   104 ms     *      104 ms  pvcw-5-35-228-2.dedicated.hosteurope.de [5.35.228.2]        27   104 ms     *      104 ms  pvcw-5-35-228-61.dedicated.hosteurope.de [5.35.228.61]        28   105 ms     *      104 ms  pvcw-5-35-228-2.dedicated.hosteurope.de [5.35.228.2]        29   104 ms     *      104 ms  pvcw-5-35-228-61.dedicated.hosteurope.de [5.35.228.61]        30   104 ms     *        *     pvcw-5-35-228-2.dedicated.hosteurope.de [5.35.228.2]      Cannot, for example, TCP connect to grab a Beamer class using TexWorks. _Added an hour later_ This is to speed a solution for anyone else that gets into this situation. It turned out that for some reason the MikTeX 2.9 I was using could not get out to any repository. I rebuilt the db, using "mpm --update-db", and reinstalled both the MikTeX binary and the TeXworks binary. (This is on a corporate Win7 system having many security things on it. I did check firewall issues previously.) I then tried to specify the mirror to use for package downloads. In the MikTeX programs, there are is both an "admin" version and a non-admin version. You want the admin one. If you go specify that packages are to be obtained from Internet and get the list of possibilities in place of 'pick a random one', just choose a reliable one near you. Apply and save up the choices, and you should be in business.


title: Modifying existing code to sort a list of abbreviations

text: I have currently the Latex code written in the .cls file to display a list of abbreviations as follows:               \newcommand\listnomenclature{Abbreviations}     \usepackage{longtable}          \newcommand\listofnomenclature[2]{     \btypeout{\listnomenclature}     \addtotoc{\listnomenclature}         \chapter*{\listnomenclature           \@mkboth{               \MakeUppercase\listnomenclature}{\MakeUppercase\listnomenclature}}     \begin{longtable}[c]{#1}#2\end{longtable}\par         \cleardoublepage     }      It is used in the following way:               \listofnomenclature{ll}{     GHG     &   GreenHouse Gasses \\     CoMP    &   Cooperative Multi-Point \\     ITU     &   International Telecommunication Union \\     }      Is it possible to modify the codes in the .cls file so that the output is sorted **alphanumerically** without drastically changing the way it is used?


title: Wrapper for siunitx' \SI macro to automatically split number and unit

text: ## Problem I use the `siunitx`-package to typeset numbers and units with correct spacing etc. There is a command               \SI{<number>}{<unit>}      for that. However, it would be much easier to write something like               \xSI{<number and unit>}      and let LaTeX automatically split the number and the unit and call `\SI{}{}` internally.               \xSI{9.81m/s^2}  →  \SI{9.81}{m/s^2}     \xSI{1e-3m}      →  \SI{1e-3}{m}      I know that `expl3` provides some regex-functionality, but as I am only familiar with "regular" LaTeX I do not know where to start. ## Question How can I write a wrapper function for `SI{}{}` (using `expl3`?) so that the number and the unit parts get automatically split?


title: How to remove ticks from the top and right axes of a plot generated with PGFPlots?

text: I want to remove ticks from the top and right axes of the bounding box of a plot generated with pgfplots. Any help appreciated. Here is sample code which generates unwanted ticks.               \documentclass{article}     \usepackage{pgfplots,siunitx}     \pgfplotsset{compat=1.8}          \pgfplotstableread{     celc fahr     0  32     20 68     40 104     60 140     80 176     100 212     }\mytable               \begin{document}     \begin{tikzpicture}         \begin{axis}[xlabel={\si{\degreeCelsius}},                      ylabel={\si{\degree F}}]         \addplot table \mytable;         \end{axis}     \end{tikzpicture}     \end{document}      The result, with unwanted ticks in top and right: ![example](http://i.stack.imgur.com/LLuhf.png) I realize this sounds very basic but a search for examples to guide me has not panned out.


title: wxLua in LuaLaTeX

text: I have some problems using wxLua in LuaLateX. This works:               lua simpleui.lua      (print instead of tex.print) But if i try this:               lualatex wx.tex      it doesn't work.               \documentclass{article}      \directlua{require("simpleui.lua")}      \usepackage{color}          \begin{document}       {\Huge\color{\ChoicewxRadioBox} Test!}     \end{document}      Error: ![](http://s7.directupload.net/images/140518/4i88hj3y.png) simpleui.lua               require("wx")          frame = nil          function HandleEvents(event)       local name = event:GetEventObject():DynamicCast("wxWindow"):GetName()       print(string.format("\\global\\def\\Choice%s{%s}", name, event:GetString()))     end          function main()       frame = wx.wxFrame(wx.NULL,                          wx.wxID_ANY,                          "Erstellen Sie Ihr PDF-Dokument mit LuaTeX",                          wx.wxDefaultPosition,                          wx.wxSize(185, 85),                          wx.wxDEFAULT_FRAME_STYLE)       local panel = wx.wxPanel(frame, wx.wxID_ANY)       local choices = {"blue", "red", "green"}       local radioBox = wx.wxRadioBox(panel,                                      wx.wxID_ANY,                                      "Farbe",                                      wx.wxDefaultPosition,                                      wx.wxDefaultSize,                                      choices, 1,wx.wxRA_SPECIFY_ROWS)       frame:Connect(wx.wxID_ANY,                     wx.wxEVT_COMMAND_RADIOBOX_SELECTED,                     HandleEvents)       frame:Show(true)     end          main()          wx.wxGetApp():MainLoop()      The folder contains the following files:   * lua51.dll   * lua5.1.dll   * simpleui.lua   * wx.tex   * wx.dll I am using Lua 5.1 and LuaTeX beta-0.70.2 (MikTeX 2.9). texlua simpleui.lua doesn't work ![](http://s1.directupload.net/images/140519/yahqzuht.png) The example is on page 24: http://www.dante.de/events/Archiv/dante2012/Programm/Vortraege/vortrag- meigen.pdf Edit: I was able to compile the wxlua libs on Linux and it works, but i still haven't any solution for windows.


title: Equations and defining equation variables

text: I have a main equation that should be numbered and now I want to define the variables of the equations which may contain another set of equations. For example please have a look; **code:**               \begin{align}     \label{eq:2.1}     &\frac{J_1(a k s)}{\sqrt{\pi } s}     \end{align}     \begin{align*}     \text{where} ~& \text{\textsl{a} is lens radius}\\     & \textsl{k}=\frac{2 \pi }{\lambda }\\     & \textsl{s}=\sqrt{\left(\frac{u}{z_2}+\frac{x}{z_1}\right){}^2+\left(\frac{v}{z_2}+\frac{y}{z_1}\right){}^2}     \end{align*}      **Result:** ![Result](http://i.stack.imgur.com/2y8FL.png) As we can see there is more than 2 line spacing (white space ) between the Eqn 2.1 and the variable definitions ... is there any other efficient way to define variables of equations without numbering them ... Or sub equation them as 2.1.1 , 2.1.2 etc ...


title: Print a document with exam class so that it can be folded into a book

text: > **Possible Duplicate:**   >  Printing a book Is there a method when printing on a5paper with `exam` class so that it comes out like a book? Folding down the middle, and have it print the pages in correct order, after you fold it, it follows the pages expected in a book.


title: Are there any ways to do control flow depending on the compilation method?

text: I would like to do something like               \if{\pdflatex}{        \includepdf{file.pdf}     }          \if{\latex}{       \epsfig{file.eps}     }      Maybe this isn't the best example, but do control-flow solutions exist in LaTeX to let us do something depending on how we compile?


title: xparse \DeclareDocumentEnvironment does not print arguments in the end code section

text: I've been trying to create a custom environment for writing up my journal in LaTeX, but can't seem to get `xparse` to work right. When I use the code:               \documentclass{article}     \usepackage{xparse}          \DeclareDocumentEnvironment{entry}{m m}{#1}{#2}          \begin{document}     \begin{entry}{foo}{bar}     Test phrase     \end{entry}     \end{document}      all I get is: > foo Test phrase without the `bar`! Is there something I'm missing here, or is this a bug? EDIT: Just tried it on my other machine and it compiles fine with xparse 2012/11/12 v4332. I guess it's an out date xparse on my other machine. Thanks!


title: one and the same command for different outputs depending on position in document

text: A few days ago I had an idea for a `\newcommand` which -- in my eyes -- would be kind of cool to have. Imagine you wanted to write a lengthy text. In this text you mention a bunch of names of historical figures. Some of these figure reoccur at different parts of your text. Imagine further that you want to provide their dates of birth and death -- but of course you do not want to provide them every time you mention them but only once, i.e., when you mention that name either (a) for the first time in your entire document or (b) for the first time in that `part`/`chapter`/`section` (should your text be book-length and contain several chapters) For example you want to write in your `*.tex`-file:               This was one of the most important achievements by \Einstein -- in fact,      what \Einstein achieved is one of the most important achievements in the      science of physics as such.      The Output should be like: > This was one of the most important achievements by Albert Einstein > (1879-1955) – in fact, what [Albert] Einstein achieved is one of the most > important achievements in the science of physics as such. Maybe you even want to omit Einstein's forename in the second occurrence, too -- this is what the [brackets] illustrate. So, does anyone have an idea how such a command could be designed so that the date is printed only once at the first occurrence in the entire document (i.e., the case of (a) as mentioned above)? Maybe this command could even be tweak so that it also provides the option to print the dates of birth and death at the first occurrence in every `part` or `chapter` or `section` (i.e., the case of (b) as mentioned above)?


title: Fork down edge style with Tikz 3.0 tree graph

text: When node/child style is used, it is possible to achieve `fork down` edge style picured here: ![enter image description here](http://i.stack.imgur.com/hwVs8.png) What would be the syntax for the similar edge style, but using `graph`? The below MWE produces sloped edges:               \documentclass[10pt,landscape,letterpaper]{article}     \usepackage{tikz}          \usetikzlibrary{graphs, graphdrawing}     \usegdlibrary{trees, layered}          \begin{document}          \begin{tikzpicture}     \graph [         binary tree layout,         sibling distance=4mm,         level distance=8mm,         components go right top aligned,         component sep=1pt,         nodes=draw     ]     {         Supervisor         -- Current Employee             -- {                 Subordinate 1--{Worker 01,Worker 02},                 Subordinate 2--{SubSubordinate 21--{Worker 21,Worker 22,Worker 23}             },             Subordinate 3-- SubSubordinate01--{Worker 11,Worker 12}         };     };     \end{tikzpicture}     \end{document}


title: How to use glossaries for different grammatical acronym forms?

text: I'm writing a paper in German and am struggling with how to make glossaries work for me. In German, there are 4 different cases, and depending on which combination a gender, case, singular/plural and definite/indefinite form I want to use, I have to use different forms of the nouns and adjectives. My problem basically is, how to define just the standard form for use in the list acronyms, but use the grammatically correct form for the long form (at the first place where the acronym is used)? I've already done many hours of research and trial and error, but I haven't quite achieved what I want. One principle is described here: Customizing the first use of acronyms generated by glossaries I like the idea, but unfortunately it's only that easy if I only use nouns as base for acronyms because then I only have four different forms. If I use combinations of adjectives and nouns, I get very many forms, which would mean quite a lot of work to define all of them in the acronym list. Another proposal (found at Using the glossaries package in other languages.) is to use `\glslink` or `\glsdisp` and define the form of the acronym everywhere, where it is used. While this would be quite simple, it doesn't work as I want it to, since it only displays the long form and doesn't seem to set the 'first use' flag. I am actually thinking of a way very similar to the second suggestion, but with `\gls`, so it will display the short and long form at first use and after that only the long form. I already tried to modify the first example to my needs, but I do not totally understand all the commands there, so I'm lost. For illustration, something like this is what I want: `\gls{<label>}{<apperance at this point in the text as long form in case of first use>}` Edit: This is the example from the second link I posted:               \newcommand{\newacronymgerman}[6]{%     \newacronym{#1}{#2}{\protect\gchoose{#3}{#4}{#5}{#6}}}     \newcommand{\acg}[2][N]{\csname choose#1\endcsname\ac{#2}\chooseN}     \newcommand{\chooseN}{\renewcommand\gchoose[4]{##1}}     \newcommand{\chooseA}{\renewcommand\gchoose[4]{##2}}     \newcommand{\chooseD}{\renewcommand\gchoose[4]{##3}}     \newcommand{\chooseG}{\renewcommand\gchoose[4]{##4}}     \newcommand{\gchoose}[4]{#1}          \newacronymgerman{<name>}{<abbrev>}{<Nom>}{<Akk>}{<Dat>}{<Gen>}      Now I would like to change this to not use any of the pre-defined (Nom, Akk, Dat, Gen) forms,when putting `\acg`, but give the actual form as an argument to `\acg` at the place I use it in the text. It should actually be quite simple, but as I don't understand all commands in the example (even after hours of looking them up), I can't do it myself. Edit: One example would be:   * Ich bin ein alte**r** Mann. (I'm an old man.)   * Ich bin der alte Mann. (I'm the old man.)   * Ich sehe die Frau des alte**n** Mann**es**. (I see the old man's wife.)   * Ich gebe dem alte**n** Mann ein Buch. (I give the old man a book.)   * Wir sind alte Männer. (We are old men.)   * Ihr seid die Frauen der alte**n** Männer. (You are the old men's wifes.)   * Ich gebe den alte**n** Männer**n** meine Bücher. (I give the old men my books). Another example:   * Das ist ein kleine**s** Kind. (This is a small child.)   * Das ist das kleine Kind. (This is the small child.)   * Die Haarfarbe des kleine**n** Kind**es** ist braun. (The child's hair color is brown.)   * Ich lese dem kleine**n** Kind ein Buch vor. (I read a book to the child.)   * Wir sind kleine Kinder. (We are small children.)   * Wir sind die kleine**n** Kinder. (We are the small children.)   * Das ist die Haarfarbe kleine**r** Kinder. (That is the hair color of small children.)   * Ich lese kleine**n** Kinder**n** ein Buch vor. (I read a book to small children.) In these cases, I listed only the cases which require forms with different suffixes for "alter Mann" (masculine) and "kleines Kind" (neutral). In these two, the different forms are already different for different cases and for feminine words, there will be other forms again. In this specific case (first example), I would like "alter Mann" in my glossaries, but in the text use something like `Ich bin der \gls[alte Mann]{aM}.` to produce the second sample sentence. I'm afraid, that defining all the possible forms beforehand for every acronym (when defining the acronyms) would take forever, but perhaps, that's what I will have to do?!


title: chapter title long and necessity to cut it

text: my chapter title is too long and I have the necessity to cut it in two different lines. well which could be the best way to cut it?I tried using `\newline` but unfortunately this modification affects also title page in every page.