title: Citation from same first author but different year

text: My problem is the following, I have 2 articles published by the same first author at 2 distinct years in Bibtex that I want to cite within the text in the "author-year" style. Even though I tried re-entering the citations over and over in Bibtex with different cite-key entries, one of the references is appearing in the text as a question mark (?), whereas all remaining references are showing up just fine. MWE:               \documentclass[preprint,12pt,authoryear]{elsarticle}          \usepackage{natbib}           \biboptions{comma,round}     \biboptions{semicolon}               \begin{document}          [….text………. with following commands for in-text citations: \citep and \citet]          \end{document }      Bib entries:               @article{Ratnayake,         Author = {Ratnayake, W.M.N.,Hansen, StevenL. and Kennedy, MichaelP.},         Journal = {Journal of the American Oil Chemists' Society},         Number = {6},         Pages = {475-488},         Title = {{Evaluation of the CP-Sil 88 and SP-2560 GC Columns Used in the Recently Aapproved AOCS Official Method Ce 1h-05: Determination of cis-, trans-, saturated, monounsaturated, and polyunsaturated fatty acids in vegetable or non-ruminant Animal Oils and Fats by Capillary GLC Method}},         Volume = {83},         Year = {2006}}      This reference is appearing as question mark when cited within text               @inbook{Hernandez,         Author = {W.M. Nimal Ratnayake and Cristina Cruz-Hernandez},         Chapter = {Chapter 5},         Edition = {second edition},         Editor = {Destaillats, Fr{\'e}d{\'e}ric and S{\'e}b{\'e}dio, Jean-Louis and Dionisi, Fabiola and Chardigny, Jean-Michel},         Pages = {105 - 146},         Publisher = {Woodhead Publishing},         Series = {Oily Press Lipid Library Series},         Title = {Trans Fatty Acids in Human Nutrition (second edition)},         Year = {2012}}      Any feedback is highly appreciated!


title: luaotfload : Windows API error 67

text: I got subtle error when running `lualatex` on my new desktop (W7 Pro Russian x64, MiKTeX 2.9 64-bit). Similar program set on my laptop (W7 Home Russian x64, MiKTeX 2.9 64-bit) gives no errors. As it is seen from attacted log, LuaLaTeX cannot generate font base reporting that **lualatex.EXE cannot find network name** `\\\MiKTeX\\]MPM[\fonts\opentype`. Indeed, there is no such path on my comp. `Luatex.exe` is looking for server `\\\MiKTeX`, which is absent. Running `DebugView` with various trace options gave me no idea where the problem came from. The only visible difference between my desktop and laptop is that the desktop is included into company's network through novel client (which I hate, to say truth). I would appriciate any adea on how to resolve my problem.               This is LuaTeX, Version beta-0.70.1-2011080216 (rev 4277)  (format=lualatex 2011.10.10)  11 OCT 2011 09:45     . . .     ("C:/Program Files/MiKTeX 2.9/tex/latex/fontspec/fontspec.cfg")))     luaotfload | Font names database not found, generating new one.                  This can take several minutes; please be patient.     luaotfload | Updating the font names database:     luaotfload | Scanning TEXMF and OS fonts...lualatex.EXE: Windows API error 67: The network name cannot be found.     lualatex.EXE: Data: \\MiKTeX\]MPM[\fonts\opentype


title: Delimitershortfall in align environment

text: Can you explain why the `\delimitershortfall` cannot be modified inside a `align` environment? This is a MWE:               \documentclass{article}          \usepackage{amsmath}          \begin{document}          \begin{equation}         \delimitershortfall -1pt     \left(\left((x)\right)\right)     \end{equation}          \begin{align}         \delimitershortfall = -1pt     \left(\left((x)\right)\right)     \end{align}          \end{document}      The output is the following: ![Example](http://i.stack.imgur.com/uM4Vr.png) In the first case the outer parenthesis are larger, as expected. But in the second case, the new value of `\delimitershortfall` seems ignored.


title: Which measurement units should one use in LaTeX?

text: There are various measurement units that one can use (such as pt, mm, in, em, ex etc.) for specifying lengths and heights. For font-based units (em and ex) the actual spacing will vary slightly depending on the font. For the other types of units the spacing is fixed at the given measurement. Is it better to prefer some of these units over others in certain situations? For example, is the "em" unit better than a fixed measurement when specifying lengths for indenting text eg. when setting xleftmargin, and xrightmargin in the listings package. When would you use the "ex" unit for specifying heights? I imagine fixed units should always be used when setting page margins. So, I guess what I am asking is, what are the guidelines for deciding which measurement units to use?


title: How to use the .sty file on a webpage

text: There are webpages that contains .sty text file. Does anyone know how to use it? Thanks for any helpful answers.


title: How to move a paragraph to the bottom of the page (without vspace)

text: I am looking to move a text paragraph of a few lines (like a disclaimer) at the bottom of a 2 page document. Each time I do that, I need to adjust that specific paragraph with the `\vspace` function. Is there a function to put a paragraph directly at the bottom?


title: Is babel breaking my labels?

text: I'm wondering if the `babel` package is breaking my labels. I'm calling `babel` with this:               % Russian     \usepackage[utf8x]{inputenc}     \usepackage[english,russian]{babel}     \addto{\captionsrussian}{%       \renewcommand{\tablename}{Table}     }      and declaring my labels like this:               \begin{table}[h] \label{tab:declensionofsamyi}      and calling my labels like this:               The full declension of \fbox{\textbf{самый}} is provided in \ref{tab:declensionofsamyi}.      which outputs the following:               The full declension of самый is provided in Table .      As you can see, there isn't a number displayed when I reference a label. It is like this whenever I want to reference a label. However, captions in my `table`s display numbers correctly. If I'm doing something wrong or this is a trivial fix, please forgive my ignorance.


title: Class file for Homework/Assignments

text: I was wondering if there is a good general purpose homework class file/template out there. I want to use it for classes. Generally, math- centered courses. I would like if there was syntax highlighting for programming (Python, Ruby, C, Java, etc.).


title: Roman number not showing with \pageref

text: I tried to use the `\pageref` to show page number when referencing to a figure/table, it works fine where I have arabic number but for the tables that appear in my appendix the numbers are not showing. I haven't used the package `appendix` and `\appendix` but `\pagenumbering{Roman}` before the appendix starts.               \documentclass[12pt,a4paper,twoside,french]{article}     \usepackage{mathptmx}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \usepackage{tabularx}     \usepackage{prettyref}          \begin{document}     \pagenumbering{gobble}     \maketitle          \pagenumbering{arabic}     \section{Section}     See figure \ref{tab:table} on page \pageref{tab:table}          \pagenumbering{Roman}     \section*{Appendix}          \begin{table}     \caption{caption}     \begin{tabularx}{10cm}{XXl}     .... table      \end{tabularx}     \label{tab:table}     \end{table}          \end{document}


title: How to add an entry to theindex at item level without page number?

text: In my index, I would like to group certain items under a group entry name. Sinmce I already use the three levels available (item, subitem, subsubitem), I tried to create an entry without page number. In the example below, "Weird Languages" should not be followed by a page number, because it is intended as the class title of what follows.                \documentclass[12pt,twoside,a4paper,openright]{book}           \usepackage{xunicode}      \usepackage{imakeidx}       \makeindex[name=texts,title=Texts,columns=1,options=-s mystyle -c -l]       \begin{document}           \index[texts]{Script@\string\textbf{Weird Languages}}           3.28\index[texts]{Script!Aramaic!3.28}      5.1\index[texts]{Script!Greek!5.1}      8.1\index[texts]{Script!Demotic!8.1}           \printindex[texts]           \end{document}      The outcome so far is: ![PDF output](http://i.stack.imgur.com/xtYJG.png) How do I suppress the page number of an individual entry, here "Weird Languages" , or, how do I add an item without page number while keeping page numbers for other items as normal?


title: Glossaries Package: No long form the first time using an acronym

text: Every time an acronym is used for the first time, the glossaries package (GP) includes the long form in the text. I don't want GP to do that (the abbreviations are clear/they can be looked up in the list). I now solved it using \hphantom{all acronyms} somewhere on the first pages, but I bet there is a better solution to this.               \documentclass{article}          \usepackage[nopostdot,nogroupskip,nonumberlist]{glossaries}          \newacronym{OSA}{OSA}{Old South Arabian}     \newacronym{MSA}{MSA}{Modern South Aramaic}          \begin{document}          Some text about how interesting \gls{OSA} and \gls{MSA} are. And I want them ALWAYS to be abbreviated as \gls{OSA} and \gls{MSA}.          \end{document}


title: Newline in table of contents

text: The table of contents of my document is similar to this example:               1 Chapter         1.1 Section         1.2 Section     2 Chapter         2.1 Section             2.1.1 Subsection             2.1.2 Subsection         2.2 Section     ---------- page break ----------             2.2.1 Subsection             2.2.2 Subsection     3 Chapter         3.1 Section         3.2 Section      I want to manually move the page break one row up, before the _2.2 Section_ line. Is it possible? How?


title: Custom Build Settings in Sublime

text: I'm using LatexTools for Sublime 2. I want to add the parameter `-shell- escape` to the build command, but struggling. The documentation says not to edit 'LaTeX.sublime-build', but to edit 'LaTeXTools.sublime-settings'. I've tried doing this, setting `"builder": "script"` and the build settings as follows:               "builder_settings" : {              // General settings:         // See README or third-party documentation              // (built-ins): true shows the log of each command in the output panel         "display_log" : true,                 // Platform-specific settings:         "osx" : {             // See README or third-party documentation             "program": "pdflatex",             "command": ["latexmk", "-cd", "-e", "$pdflatex = '%E -interaction=nonstopmode -synctex=1 %S %O'", "-f", "-pdf"]             // "cmd": ["latexmk", "-cd",             //  "-e", "\\$pdflatex = 'pdflatex %O -interaction=nonstopmode -synctex=1 %S'",             //  //"-silent",             //  "-shell-escape",             //  "-f", "-pdf"]         },              "windows" : {             // See README or third-party documentation         },              "linux" : {             // See README or third-party documentation         }     },      Which I think is what I need. But now when I try and build something, nothing happens. Any suggestions on what to do?


title: Problem with plain text

text: I would like to use something like this in my LaTeX document: `P29_Ampl_1`. After this I have got an error because I use `_`. I can solve it by insertign `$` between the `P29_Ampl_1` -> `$P29_Ampl_1$`. It cause that text doesn't look good. How can I solve it. I would like to use `P29_Ampl_1` as a normal plain text? Thanks


title: Fatal error, "Can't write on file 'test.pdf'

text: I am not the most experienced latex user, so I hope I can describe the problem accurately. When I compile my tex document I get following message: ! I can't write on file `test.pdf'. Please type another file name for output               ! Emergency stop.     \AtBegShi@Output ...ipout \box \AtBeginShipoutBox     \fi \fi     l.1 \begin{titlepage}      I run Windows 7 if it helps and I use following packages.               \documentclass[a4paper,10pt]{report}     \usepackage{hyperref}     \usepackage{amsthm}     \usepackage{cleveref}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{bm}     \usepackage{mathtools}     \usepackage{graphicx}     \usepackage{siunitx}     \usepackage{booktabs}     \usepackage{pdfpages}     \usepackage{appendix}     \usepackage{import}


title: Subfigure label position and visibility in memoir

text: I am writing my master thesis using Memoir. I want all subfigures to have their labels in the top left corner. I have so far done this with tikz, but I would like to find a more elegant solution as my current solution has flaws. I would like to be able to automatically reference figures in the text, without having to manually specify the subfigure. This means each figure needs to have a label. Yet if I label the subfigure, said label invariably appears underneath the figure, and I am not sure how to move it, change its color and so on. Anyway, an mwe and images of current and desired solution:               \documentclass{memoir}          \usepackage{tikz,siunitx,mwe}     \newsubfloat{figure}          \newcommand{\scalebarimg}[6]{       \begin{tikzpicture}         \draw node[name=micrograph] {\includegraphics[width=#2\textwidth]{#1}}; %I fetch the image         \draw[ultra thick,#6] (micrograph.south west)++(0.03*0#2\textwidth,0.035*0#2\textwidth)--++(#2*#3\textwidth,0)node[above,midway]{#4 \si{\micro\meter}}; %I draw the scalebar         \draw  (micrograph.north west)  node[anchor=north west,yshift=-1,#6]{\textbf{\small{(#5)}}}; %I draw the image label       \end{tikzpicture}     }          \begin{document}     \begin{figure}     \centering     \subbottom[\label{fig:one}]{         \scalebarimg{example-image}{.45}{0.33933}{50}{a}{black}     }\subbottom[\label{fig:two}]{         \scalebarimg{example-image}{.45}{0.33933}{50}{b}{white}     }     \caption{Figures (a) and (b) should not be doubly labeled.}     \end{figure}                    See Figure~\ref{fig:one} and \subcaptionref{fig:two}.          \end{document}      which yields   ![enter image description here](http://i.stack.imgur.com/RxGar.png)   but I want   ![enter image description here](http://i.stack.imgur.com/cFszS.png) Is there a way of letting LaTeX position the label where I want it to relative the top left corner of the image? Or at least hide the caption for each individual subfigure while still labelling it?


title: How to user author and section in page header

text: I working on an edition with various author. How can I set the author of the actual essay to the left page header an the title of the actual section to the right pages header? I tried like this:               \documentclass[12pt,twoside]{scrbook}     \usepackage[german]{babel}     \usepackage{blindtext}     \usepackage[ansinew]{inputenc}      \usepackage{scrpage2}          %%     % Kopf- und Fußzeile     %%     \clearscrheadfoot     \lehead{\pagemark}     \chead[]{\rightmark}     \rohead{\pagemark}     \cfoot[\pagemark]{}     \pagestyle{scrheadings}     %\manualmark          %%     % Titel     %%     \renewcommand*{\chaptermarkformat}{}     \renewcommand*{\chapterheadstartvskip}{\vspace*{0.5\baselineskip}}     \renewcommand*{\chapterheadendvskip}{\vspace*{1\baselineskip}}     \makeatletter     \newcommand*{\orgichapter}{}     \let\orgichapter\chapter     \renewcommand*{\chapter}[1]{%       \gdef\chapterauthor{#1}%        \orgichapter     }     \renewcommand*{\chapterformat}{}               \newlength{\authorindent}     \renewcommand*{\chapterheadendvskip}{%       \ifx\chapterauthor\@empty\else           \markboth{"Test"}{\chapterauthor}%           \vskip\baselineskip\nobreak           \settowidth{\authorindent}{{%           \usekomafont{sectioning}\usekomafont{chapter}\chapterformat         }}%         \noindent\begin{large}\textit{\chapterauthor}\par\nobreak         \global\let\chapterauthor\@empty \end{large}      \fi       \noindent\par\nobreak\vskip 1\baselineskip%     }     \makeatother               %%     % Dokumentenbeginn     %%     \begin{document}     \chapter{Harmann von Aue}[]{Das ist ein Test-Dokument}          \section{Sage es niemand, nur den Weisen}     \blindtext     \Blindtext\Blindtext     \section{Weil die Menge gleich verhöhnt}     \Blindtext               \end{document}      The problem seems to be, that \section overrides \marboth. I could use \manualmark in the header but that would have the site effect that sections would not appear in the header at all.


title: Is it possible to customize the transdissolve effect?

text: This code uses the `\transdissolve` effect:               \documentclass{beamer}     \usepackage{tikz}     \begin{document}        \begin{frame}        \transdissolve[duration=.1]             \begin{tikzpicture}[remember picture,overlay]                \only<1>{\draw[fill=red] (current page.south west)rectangle(current page.north east);}                \only<2>{\draw[fill=blue] (current page.south west)rectangle(current page.north east);}             \end{tikzpicture}        \end{frame}     \end{document}      The effect decompose the frame into small rectangles that change color. Is it possible to customize the effect changing the size of the rectangles?


title: TOC out of order in two-column documents

text: I was playing with `\@outputdblcol` and I came up with this:               \documentclass[twocolumn]{article}          \makeatletter     \def\@outputdblcol{%       \if@firstcolumn         \global \@firstcolumnfalse         \global \setbox\@leftcolumn \box\@outputbox       \else         \global \@firstcolumntrue         \setbox\@outputbox \vbox {%                              \hb@xt@\textwidth {%                               \hskip\columnwidth                                                          \hfil                                {\normalcolor\vrule \@width\columnseprule}%                                \hfil                                \hb@xt@\columnwidth {%                                  \box\@outputbox \hss}%     \hskip-\textwidth                                \hb@xt@\columnwidth {%                                  \box\@leftcolumn \hss}%                                  \hskip\columnwidth \hskip\columnsep                                                  }%                                   }%         \@combinedblfloats         \@outputpage         \begingroup           \@dblfloatplacement           \@startdblcolumn           \@whilesw\if@fcolmade \fi             {\@outputpage              \@startdblcolumn}%         \endgroup       \fi     }     \makeatother     \pagestyle{headings}               \begin{document}     \tableofcontents     \section{Correct Headings}               Some useless text that we are provingin Some useless text that we are provingin Some useless text that we are provingin Some useless text that we are provingin     \section{Part}           Some useless text that we are provingin      \newpage                              \section{Wrong Headings}               Some useless text that we are provingin     \section{Another Part}             Some useless text that we are provingin      \section{LAst Part}       Some useless text that we are provingin     \end{document}      But interestingly even though columns are in the right order but TOC is out of order. Why is this happening? and how one should fix it? (of course without changing the definition of `\@outputdblcol` to its original form)? Using David Carlisle's suggestion, I get exactly the same problem:               \documentclass[twocolumn]{article}     \TeXXeTstate=1     \makeatletter     \def\@outputdblcol{%       \if@firstcolumn         \global \@firstcolumnfalse         \global \setbox\@leftcolumn \box\@outputbox       \else         \global \@firstcolumntrue         \setbox\@outputbox \vbox {%                              \hb@xt@\textwidth {\beginR%                                \hb@xt@\columnwidth {%                                  \box\@leftcolumn \hss}%                                \hfil                                {\normalcolor\vrule \@width\columnseprule}%                                \hfil                                \hb@xt@\columnwidth {%                                  \box\@outputbox \hss}%                                                  \endR}%                                   }%         \@combinedblfloats         \@outputpage         \begingroup           \@dblfloatplacement           \@startdblcolumn           \@whilesw\if@fcolmade \fi             {\@outputpage              \@startdblcolumn}%         \endgroup       \fi     }     \makeatother     \pagestyle{headings}               \begin{document}     \tableofcontents     \section{Correct Headings}               Some useless text that we are provingin Some useless text that we are provingin Some useless text that we are provingin Some useless text that we are provingin     \section{Part}           Some useless text that we are provingin      \newpage                              \section{Wrong Headings}               Some useless text that we are provingin     \section{Another Part}             Some useless text that we are provingin      \section{LAst Part}       Some useless text that we are provingin     \end{document}      but this one works fine:               \documentclass[twocolumn]{article}     \TeXXeTstate=1     \makeatletter     \def\@outputdblcol{%       \if@firstcolumn         \global \@firstcolumnfalse         \global \setbox\@leftcolumn \box\@outputbox       \else         \global \@firstcolumntrue         \setbox\@outputbox \vbox {%                              \hb@xt@\textwidth {%                               \hskip\columnwidth                                                          \hfil                                {\normalcolor\vrule \@width\columnseprule}%                                \hfil                                \hb@xt@\columnwidth {%                                  \box\@leftcolumn \hss}%                                  \hskip-\textwidth                                \hb@xt@\columnwidth {%                                  \box\@outputbox \hss}%                                               \hskip\columnwidth\hskip\columnsep   }%                                   }%         \@combinedblfloats         \@outputpage         \begingroup           \@dblfloatplacement           \@startdblcolumn           \@whilesw\if@fcolmade \fi             {\@outputpage              \@startdblcolumn}%         \endgroup       \fi     }     \makeatother     \pagestyle{headings}               \begin{document}     \tableofcontents     \section{Correct Headings}               Some useless text that we are provingin Some useless text that we are provingin Some useless text that we are provingin Some useless text that we are provingin     \section{Part}           Some useless text that we are provingin      \newpage                              \section{Wrong Headings}               Some useless text that we are provingin     \section{Another Part}             Some useless text that we are provingin      \section{LAst Part}       Some useless text that we are provingin     \end{document}      I am only interested to how fix TOC in the first two examples.


title: Footer scaling with scalebox

text: I use a `pspicture` to draw a electric diagram in one of my slides with beamer, and I've got a pause-command within the `pspicture` (to make thing appear). I use `\scalebox` to make my picture enter the slide without exceeding. When I compile, I see my footer (I use the theme of my university) scaling with the pspicture. It's also the same using `\psscalebox`. What can I do? Is there a special command to put in the definition of the theme? Can somebody help me? EDIT : I made an example :               \documentclass{beamer}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{amsmath,here}     \usepackage{cancel}     \renewcommand{\CancelColor}{\red}          \setbeamertemplate{navigation symbols}{} % Delete Navigation Buttons     \usetheme{Madrid}     \usepackage{pst-circ}     \usepackage{siunitx}     \usepackage{graphicx}          \begin{document}     \begin{frame}{Here is my diagram}     \begin{center}          \begin{pspicture}[showgrid=false](-1.5, 0)(10, 6.5)     \psscalebox{0.65}{           \pnode(-1.5, 5){E}         \pnode(-1.5, 6.5){F}         \pnode(-1.5, 8){G}         \pnode(-1.5, 8.5){H}              \pnode(0, 0){A}         \pnode(0, 5){B}         \pnode(0, 6.5){C}         \pnode(0, 8){D}         \pnode(0, 8.5){I}         \pnode(0, 10){L}              \pnode(2.5, 8.5){K}         \pnode(2.5, 5){J}              \pnode(4, 5.5){A1}         \pnode(4, 3.5){B1}         \pnode(4, 1.5){C1}              \pnode(4.5, 10){M}         \pnode(4.5, 9){W}              \pnode(6, 8){Y}         \pnode(6, 6){X}         \pnode(6, 5.5){P}         \pnode(6, 4.5){E1}         \pnode(6, 2.5){D1}              \pnode(7, 8.5){N}         \pnode(7, 8){O}         \pnode(7, 2.5){G1}         \pnode(7, 0){H1}              \pnode(7.5, 4.5){F1}              \pnode(8, 8){Z}         \pnode(8, 6){Q}         \pnode(8, 3.5){I1}         \pnode(8, 2.5){J1}              \pnode(10, 6){R}         \pnode(10, 1.5){K1}              \pnode(12, 6){S}         \pnode(12, 0){L1}              \pnode(13.5, 6){T}         \pnode(13.5, 0.5){U}         \pnode(13.5, 0){V}              %--------------         \wire[arrows=-*](A)(B)         \cell(B)(C){}         \cell(C)(D){}         \cell(E)(F){}         \cell(F)(G){}         \wire(B)(E)         \wire(G)(H)         \wire(H)(I)         \wire[arrows=-*](D)(I)         \diode[arrows=-*, labeloffset=0.5](I)(K){1N4001}         \wire(B)(J)         \multidipole(K)(J)         \battery[labeloffset=0.9]{$\SI{1.2}{\volt}$}         \battery[labeloffset=0.9]{$\SI{1.2}{\volt}$}         {}         \wire(I)(L)         \wire(L)(M)         \transistor[TRot=-90, transistortype=PNP, transistorinvert=true, transistorcircle=false](W){emitter}{collecteur}         \wire(TBaseNode)(M)         \wire(emitter)(N)         \wire(collecteur)(K)         \wire[arrows=-*](N)(O)         \wire(Y)(Z)         {\only<1>{\resistor[dipolestyle=zigzag, labeloffset=0.7](X)(Y){${\SI{1}{\kilo\ohm}}$}}}              \coil[dipolestyle=curved, labeloffset=1, arrows=-*](Z)(Q){$\SI{470}{\micro\henry}$}          \wire[arrows=-*](X)(P)         \wire[arrows=-*](P)(E1)         \wire(P)(A1)         \resistor[dipolestyle=zigzag, labeloffset=-0.8, arrows=-*](A1)(B1){$\SI{4,7}{\kilo\ohm}$}         \psline(B1)(C1)(K1)         \transistor[transistorcircle=false](5.5, 3.5){emitter}{collecteur}         \wire(TBaseNode)(B1)         \wire(emitter)(D1)         \wire(collecteur)(E1)         \psline(D1)(J1)(I1)         \transistor[transistorcircle=false](F1){emitter}{collecteur}         \wire(TBaseNode)(E1)         \wire(emitter)(I1)         \wire(collecteur)(Q)         \wire[arrows=-*](Q)(R)         \only<1>{\multidipole(R)(K1)         \capacitor[dipolestyle=chemical, labeloffset=-1]{$\SI{0.012}{\micro\farad}$}         \resistor[dipolestyle=zigzag, labeloffset=-0.8]{$\SI{1}{\kilo\ohm}$}         {}}         \diode[arrows=-*, labeloffset=0.5](R)(S){1N4001}         {\only<1>{\capacitor[dipolestyle=chemical, labeloffset=-1, arrows=-*](S)(L1){$\SI{1}{\milli\farad}$}}}         \wire(S)(T)         \multidipole(T)(U)         \LED{}         \LED{}         \LED{}         \resistor[dipolestyle=zigzag, labeloffset=0.7]{$\SI{220}{\ohm}$}         {}         \wire(U)(V)         \wire(V)(A)         \wire[arrows=*-*](H1)(G1)          \pause              \resistor[dipolestyle=zigzag, labeloffset=0.7](X)(Y){\cancel{${\SI{1}{\kilo\ohm}}$}}         \multidipole(R)(K1)         \capacitor[dipolestyle=chemical, labeloffset=-1]{\cancel{$\SI{0.012}{\micro\farad}$}}         \resistor[dipolestyle=zigzag, labeloffset=-0.8]{\cancel{$\SI{1}{\kilo\ohm}$}}         {}         \capacitor[dipolestyle=chemical, labeloffset=-1, arrows=-*](S)(L1){\cancel{$\SI{1}{\milli\farad}$}}          \rput(5.3, 6.6){{\color{red}\sffamily ${\SI{47}{\ohm}}$}}          \rput(8.9, 4.5){\color{red}\sffamily {$\SI{1}{\micro\farad}$}}          \rput(9.1, 2.2){\color{red}\sffamily {$\SI{5.6}{\kilo\ohm}$}}          \rput(11, 2.6){\color{red}\sffamily {$\SI{47}{\milli\farad}$}}          }     \end{pspicture}          \end{center}     \end{frame}          \end{document}      You see? The footer on the first slide scales. What happens?


title: Beamer: Transparent AND centered background image on intro slide

text: I know this is similar to other questions. Other answers address either:   1. Adding a transparent image   2. Centering an image but I cannot find an answer with both.  With previous answers I can successfully make my image transparent OR centered, but not both. I've tried integrating methods for the two with no luck. Here's the code I'm using on my introduction slide               \usepackage{tikz}              \usebackgroundtemplate{               \vbox to \paperheight                   {\tikz \node[opacity=0.2]                       {\vfil\hbox to \paperwidth                          {\hfil\includegraphics[width=1.5in]{name.png}                       \hfil}\vfil} ;  }                 }


title: How to write date and time in footer

text: I am writing a report in which i need to write date and time in the footer. How do I write date and time in footer? like                     Jan 8, 2013 5:45 PM


title: Format appendix chapter title with titlesec in a scrbook

text: I'm writing a longer text and redefined the Design of a Chapter start page using `titlesec`. For example               \documentclass[cleardoublepage=empty,fontsize=11pt,a4paper,twoside,DIV=calc]{scrbook}          \usepackage[no-math]{fontspec}     \usepackage{xunicode,xcolor}      \usepackage{hyperref,titlesec,scalefnt}          \titleformat{\chapter}[display]%         {\relax\huge\color{blue}}%         {\Huge\raggedleft{\textcolor{blue!25}{\scalefont{4}\thechapter}}}{0pt}{}     \titlespacing{\chapter}{0pt}{\baselineskip}{\baselineskip}          \begin{document}         \begin{mainmatter}             \chapter{Eins}         \end{mainmatter}         \begin{backmatter}             \chapter{Ein Beispiel}         \end{backmatter}     \end{document}      Which sets the chapter number in light blue and huge to the right (see Chapter 1). But if i change into the `backmatter` to add an appendix chapter (which should be apendix A), the whole `titlesec` (from the second block) definition is lost. I would like to have `A` as the “appendix number” and set to the right, as the chapter number before (and of course “A An Example” to the toc). How can i achieve, that the numbering is set to A (and shown) and that the titlesec-definition is not lost?


title: How do I set annotations on a facing page?

text: It's common to set an old play (e.g. Shakespeare) with annotations on the left page and reference information on the right. I don't want to do this for a play, but I would like to set a document with annotations on one page and text on the facing page. The catch is that I want to ensure that the annotations have parallel section spacing, because the length of the annotation may be longer or shorter than the corresponding section in the document, and I don't really want to make it so that you have to switch back and forth between documents. That is, I would like it something like this:               +-----------------+    +-----------------+     | Heading         |    | Heading         |     | -------         |    | -------         |     | annotation      |    | this paragraph  |     |                 |    | is long         |     |                 |    |                 |     | Heading 2       |    | Heading 2       |     | ---------       |    | ---------       |     | this annotation |    | short paragraph |     | is really long  |    |                 |     +-----------------+    +-----------------+      Does anyone know of a package that can do this, or an alternate way to achieve the objective of lining up the document and annotations?


title: How to imitate a character that looks similar to an inverted 2?

text: I am trying to imitate a character that looks similar to an inverted 2. It can be seen at the start of the second last words in the following image: ![sample with character similar to inverted 2](http://i45.tinypic.com/rvlqhz.png) What I have come up with so far is using `graphicx`:               \documentclass{scrartcl}     \usepackage[ngerman]{babel}     \usepackage{graphicx,tipa}     \begin{document}     Si m"ue"sti d t"a\textesh\textesh{}en uf \scalebox{1}[-1]{2}tans \textesh{}icke          \emph{Si m"ue"sti d t"a\textesh\textesh{}en uf \scalebox{1}[-1]{2}tans \textesh{}icke}     \end{document}      However, this is not quite right. It inverts the character, but it is placed way too low: ![inverted 2 positioned way too low](http://i46.tinypic.com/211ut1l.png) Is there a better way for inverting the character than using `graphicx`? If I use `graphicx` how do I get the character back on the line?


title: How can I change the chapter title bold in the table of content?

text: I am using `classicthesis` package. I want to add boldface to the font of the chapter title in the table of content. In the `FrontBackMatter/Contents` file, I add the following code:               \renewcommand\cftchapfont{\bf}      but it does not change anything. How can I simply add boldface to the current font of the chapter titles in TOC? Thanks.


title: Defining \nextslide in overprint environment in beamer

text: We all use the `\onslide` command inside the `overprint` environment in `beamer`. However, I find that assigning hard coded slide values, like `\onslide<5>` in this environment is really cumbersome. This situation becomes difficult whenever we have to insert a new slide in the middle of twenty some overlay slides. We have to manually renumber every subsequent slide after a new slide is inserted. That is why, I tried to define a `\nextslide` command in `beamer`. The idea is very simple, the `\nextslide` command will increment a predefined counter and will use this value with the `\onslide` command.               \documentclass{beamer}          \newcounter{slidecounter}     \setcounter{slidecounter}{0}     \def\nextslide{\addtocounter{slidecounter}{1}\onslide<\value{slidecounter}>}          \begin{document}          \begin{frame}{Title}            \begin{overprint}         \nextslide         On one              \nextslide         On two            \end{overprint}          \end{frame}          \end{document}      I understand that I still need to implement resetting the counter at the start of `overprint` environment once I am successful with this part. However, whenever I run the code with `pdflatex`, it keeps on generating page after page, which I have to interrupt with `Ctrl-C`. > [1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] [2] [3] [4] [5] [6] > [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] > [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] > [38] [39] [40] [41] [42] [43] [44] [45] [46] [47] [48] [49] [50] [51] [52] > [53] [54] [55] [56] [57] [58] [59] [60] [61] [62] [63] [64] [65] [66] [67] > [68] [69] [70] [71] [72] [73] [74]^C ! Interruption. > \pgfsysprotocol@literalbuffered ...tocol@temp {{#1 \space }}\expandafter > \pgf... l.20 \end{frame} ? x The `beamer` code is too myriad for me to find out where this infinite loop is happening. Any suggestion will be appreciated.


title: Is Arara safe/secure

text: I have just begun playing around with `arara` and I am curious if there are safety/security concerns. For example, `pdflatex` from TeX Live has shell escape disabled by default. If the TeX Live team think that shell escape is too dangerous (and I am not sure that is the reason it has been disabled) to be enabled by default, then I am not sure it is wise to give `arara` so much power. Is there a way to rein in the power of `arara`? One concern I have is that it might be possible to inject a malicious `arara` directives into a package or the `aux` file. I am not so concerned about shell escape, but rather other things that can be done. For example, can an untrusted package use the file contents environment to overwrite the `pdflatex` rule on the first pass such that on the second pass custom code is run?


title: How to save space in qtree

text: Suppose, I have a qtree:               \documentclass{article}     \usepackage{tikz}     \usepackage{tikz-qtree,tikz-qtree-compat}     \begin{document}     \begin{tikzpicture}     \tikzset{         % Define arrow style         pil/.style={                ->,                thick,                shorten <=2pt,                shorten >=2pt,},         edge from parent/.style={draw, edge from parent path={(\tikzparentnode.south)             -- +(0,-8pt)             -| (\tikzchildnode)}},         level 1/.style={sibling distance=0.5cm}     }     \Tree     [.{1}         [.1-1 ]         [.1-2 ]         [.1-3             [.1-3-1 ]             [.1-3-2 ]             [.1-3-3 ]             [.1-3-4 ]         ]         [.1-4 ]         [.1-5 ]     ]     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/jICr7.png)   1. Is it possible to shift nodes 1-2 and 1-4 closer to 1-3? ![enter image description here](http://i.stack.imgur.com/IGroi.png)   2. Is it possible to make 1-3 subtree grow vertically, so I could get something like this: ![enter image description here](http://i.stack.imgur.com/rVmCN.png) I know, that `qtrees` can grow both vertically and horizontally. But how to create a hybrid tree?


title: pgfplotstable error: missing \endcsname inserted

text: I'm getting strange errors with `pgfplotstable`:               \documentclass{article}     \usepackage[utf8]{inputenc}      \usepackage[T1]{fontenc}     \usepackage{pgfplots}         \pgfplotsset{compat=1.7}     \usepackage{pgfplotstable}     \begin{document}     \pgfplotstabletypesetfile[columns={lambda,n},col sep=comma]{n.csv}     \end{document}      And the `n.csv` file:               lambda,n     6907.16,1.4190     6716.17,1.4185     5790.65,1.4252     5769.59,1.4256     5460.74,1.4272     4916.04,1.4345     4358.35,1.4412     4347.50,1.4461     4339.24,1.4475     4077.81,1.4555     4046.56,1.4572      What's wrong with it:                Missing \endcsname inserted. [...le[columns={lambda,n},col sep=comma]{n.csv}]     Package inputenc Error: Unicode char \u8: not set up for use with LaTeX. [...le[columns={lambda,n},col sep=comma]{n.csv}]     Extra \endcsname. [...le[columns={lambda,n},col sep=comma]{n.csv}]     Missing \endcsname inserted. [...le[columns={lambda,n},col sep=comma]{n.csv}]     Extra \endcsname. [...le[columns={lambda,n},col sep=comma]{n.csv}]     Missing \endcsname inserted. [...le[columns={lambda,n},col sep=comma]{n.csv}]     Package inputenc Error: Unicode char \u8: not set up for use with LaTeX. [...le[columns={lambda,n},col sep=comma]{n.csv}]     Extra \endcsname. [...le[columns={lambda,n},col sep=comma]{n.csv}]     Undefined control sequence. [...le[columns={lambda,n},col sep=comma]{n.csv}]     Undefined control sequence. [...le[columns={lambda,n},col sep=comma]{n.csv}]     Undefined control sequence. [...le[columns={lambda,n},col sep=comma]{n.csv}]     Undefined control sequence. [...le[columns={lambda,n},col sep=comma]{n.csv}]     Undefined control sequence. [...le[columns={lambda,n},col sep=comma]{n.csv}]     Undefined control sequence. [...le[columns={lambda,n},col sep=comma]{n.csv}]     Undefined control sequence. [...le[columns={lambda,n},col sep=comma]{n.csv}]     Undefined control sequence. [...le[columns={lambda,n},col sep=comma]{n.csv}]     Undefined control sequence. [...le[columns={lambda,n},col sep=comma]{n.csv}]     Undefined control sequence. [...le[columns={lambda,n},col sep=comma]{n.csv}]     Undefined control sequence. [...le[columns={lambda,n},col sep=comma]{n.csv}]


title: Is it possible to make a macro with \label?

text: I'm not very experienced with LaTeX and I'm having trouble when trying to define a macro to include some images. I want to do it this way because I'm trying to take notes using LaTeX and I need to type it quickly. The macro is:               \newcommand{\capeps}[3]{\begin{figure}[h]     \begin{center}      \includegraphics[width=.9\linewidth]{./figures/#1.eps}     \caption{#2}      \label{fig:#3}      \end{center}      \end{figure}}      but I can't make it recognize the label. Do you know what's the problem with this?


title: Node position TikZ

text: I'd like make something like the pic below, but in horizontal format. How do I get the text boxes equidistant between susceptible and exposed? Relative positioning of nodes in TikZ uses coordinates. Isn't there a way to do with relative to an object? ![enter image description here](http://i.stack.imgur.com/8hyEw.png)                  \documentclass{article}          %\usepackage[latin1]{inputenc}     \usepackage{tikz}     \usetikzlibrary{shapes,arrows}     \usetikzlibrary{calc,     arrows,decorations.pathmorphing,     backgrounds,fit,positioning,shapes.symbols,chains}     \usetikzlibrary{decorations.pathreplacing}               \begin{document}                    % Define block styles     \tikzstyle{block} = [rectangle, draw, fill=blue!30,         text width=5em, text centered, rounded corners, minimum height=4em]     \tikzstyle{line} = [draw, -latex']     %\tikzstyle{curve}=[draw,(latex']               \begin{figure}[!ht]     \centering\makebox[\textwidth]{     \begin{tikzpicture}[node distance =4cm, auto,     comment/.style={     rectangle,      inner sep= 5pt,      text width=4cm, }]                   % Place nodes         \node [block] (susceptible) {Susceptible};         \node [block, right of=susceptible] (exposed) {Exposed};               \draw [decorate,decoration={brace,amplitude=10pt},xshift=0pt,yshift=0pt]      (3.8,-2)--(-1,-2)  node [black,midway,yshift=-0.6cm]      { \emph{Environmental \& Human factors}      };                   \node [block, right of=exposed] (infectious) {Infectious};          \draw [decorate,decoration={brace,amplitude=10pt},xshift=0pt,yshift=0pt]     (7.9,-2) -- (4.1,-2)  node [black,midway,yshift=-0.6cm]      { \emph{Variable immunity} };                            \node [block, right of=infectious] (removed) {Removed};     \draw [decorate,decoration={brace,amplitude=10pt},xshift=0pt,yshift=0pt]     (12,-2) -- (8.2,-2)  node [black,midway,yshift=-0.6cm]      { \emph{Control parameters} };               \draw [decorate,decoration={brace,amplitude=10pt},xshift=0pt,yshift=0pt]     (0.1,1) -- (3.9,1) node [black,midway,yshift=0.6cm]      {\large  Contact parameters};          \draw [decorate,decoration={brace,amplitude=10pt},xshift=0pt,yshift=0pt]     (4.1,1) -- (12,1) node [black,midway,yshift=0.6cm]      {\large  Disease parameters};                   \path [line] (susceptible) -- (exposed);         \path [line] (exposed) -- (infectious);         \path [line] (infectious) -- (removed);          \path[line,dashed] (removed.south) -- + (0,-.35) -- + (-12,-.35) -- (susceptible.south);               \end{tikzpicture}}     \smallskip     \label{fig:flowchart_disease_transmission}     \caption{Flowchart of fundamental disease transmission mechanisms}     \end{figure}               \end{document}      **EDIT** Looks like this and took me 2 hours (looks okay-ish): ![enter image description here](http://i.stack.imgur.com/wXiDo.png) In powerpoint, 5 mins but looks pants! Still can't work out how to get an itemized list in the lower braces.


title: Force the abstract onto a new page

text: I have a document that has the header "Abstract" at the very bottom of the first page, and then the actual text of the abstract is on the second page. The rest of the first page is taken up with author information. I would like to force my abstract to start on a new page. I have tried to do this using \vspace and \pagebreak and \newpage etc., but not of them seem to change anything. Is this because my class file overrides everything? I am using the class file aastex.


title: Figure numbering

text: I have a figure composed by 9 subfigures (3 rows and 3 columns). I divided this figure into 2 blocks using the following commands: `\addtocounter{figure}{-1}` and `\addtocounter{subfigure}{1}`. These 2 blocs have the same label and the same figure number (Figure 1). I would like that the numbers of the 2 figures (blocs) become "Figure 1.1" and "Figure 1.2". Any ideas? Thank you.


title: Strange behaviour of wrapfigure if followed by equation

text: I have just had some problem with wrapfigure where I used the following code:               \documentclass[a4paper, 12pt]{article}           \usepackage{wrapfig} % to have text around figures     \usepackage{graphicx}        \usepackage{amsmath}          \begin{document}     \subsubsection*{Sample Subsection}     \begin{wrapfigure}{r}{0.25\textwidth}         \includegraphics[width=0.23\textwidth]{sampleFigure}         \caption{Heat Balance for the ceiling node}     \end{wrapfigure}     \begin{equation*}         a^2+b^2=c^2     \end{equation*}     with      \begin{align*}         a^2+b^2&=c^2 & a^2+b^2&=c^2 \\         a^2+b^2&=c^2 & a^2+b^2&=c^2 \\         a^2+b^2&=c^2 & a^2+b^2&=c^2     \end{align*}     can be solved to     \begin{equation}        a^2+b^2=c^2     \end{equation}          \subsubsection*{Sample Subsection}     \begin{wrapfigure}{r}{0.25\textwidth}         \includegraphics[width=0.23\textwidth]{sampleFigure}         \caption{Heat Balance for the ceiling node}     \end{wrapfigure}     -> With some text it is working!     \begin{equation*}         a^2+b^2=c^2     \end{equation*}     with      \begin{align*}         a^2+b^2&=c^2 & a^2+b^2&=c^2 \\         a^2+b^2&=c^2 & a^2+b^2&=c^2 \\         a^2+b^2&=c^2 & a^2+b^2&=c^2     \end{align*}     can be solved to     \begin{equation}        a^2+b^2=c^2     \end{equation}          \end{document}      In the first subsection there is a problem, whereas the second subsection looks as I expected. The only difference between the two sections is the line starting with "->". Does anyone have an explanation for this behaviour?


title: texmacs enter latex source code

text: is there in texmacs an equivalent to the Ctrl plus L shortcut in Lyx where it is possible to insert latex code to get other tables than the table environments which are doable in texmacs by default?


title: Strange looking table

text: I am trying to print this rather odd looking table, below ![Grading system](http://i.stack.imgur.com/7uNM9.png) I know there is an package called exam, though I sort of want to do this "my own style" I did try to make the table below, but I was not even close in doing so. Most importantly is that the table looks good, not that it is an exact replica of the table. Could anyone be so kind as to help me? I have started learning latex recently, and stumbling down the path of learning =) EDIT: One could remove the vertical lines furthest to the left and right aswell, then the table would be more inline witht the standard of tables. Edit2:               \documentclass[10pt,a4paper]{article}     \usepackage{mathtools}     \usepackage{booktabs}     \usepackage{multirow}     \usepackage{multicol}          \begin{document}     \noindent \begin{tabular*}{\textwidth}{@{}clccccccccccccccc@{}}       \toprule       & & &  & & & Sum \\       \cmidrule{1-1}\cmidrule(l){2-16}\cmidrule(l){17-17}        \multirow{2}{*}{Part 1} & Problem & 1a1) & 1a2) & 1b1) & 1b2) & 1c & 1d1) & 1d2) & 1e & 1f & 2a & 2b & 2c  \\                                &  Score  & 2    & 2    & 2    & 2    & 2  & 2    & 2    & 2  & 2  & 2  &  2 & 2 &  24  \\       \midrule       \multirow{2}{*}{Part 1} & Problem & 1a1) & 1a2) & 1b1) & 1b2) & 1c & 1d1) & 1d2) & 1e & 1f & 2a & 2b & 2c  \\                                &  Score  & 2    & 2    & 2    & 2    & 2  & 2    & 2    & 2  & 2  & 2  &  2 & 2 &  24 \\      \cmidrule{1-1}\cmidrule(l){2-17}\cmidrule(l){17-17}       & \multicolumn{5}{r}{Total number of points} & 14 \\       \bottomrule       \end{tabular*}     \end{document}


title: Texmaker (WinXP) : How to open documents in separate windows?

text: Is it me or is it actually not possible to open Latex files in separate Windows with Texmaker? Does anyone know of a way?


title: How do I indent a table within the itemize environment?

text: I'd like to know how to indent a table within the `itemize` environment.               \documentclass{article}     \begin{document}     Hello. I love \LaTeX! I have a question:     \begin{itemize}         \item             How can I indent the table below?                  \begin{tabular}{|rcccl|}                 \hline\\[-10pt]                 this & table & should & be & indented \\                 \hline             \end{tabular}          \end{itemize}     \end{document}


title: moderncv oldstyle shows unnecessary spaces

text: ![enter image description here](http://i.stack.imgur.com/kC7ns.png) When I write my name in two part, oldstyle shows unnecessary spaces between them. How can I fix this?


title: How to make consistent "top margin" of TOC and its continued page?

text: The top margin of the 1st page of TOC and its continued page is not consistent. The same thing happens to Summary, List of Tables and List of Abbreviations. I use a thesis template. The template can be download here: http://www.math.uic.edu/graduate/current/uicthesi I think the uicthesi.cls file corresponds format parameters. I copy and paste the part that I think for this issue below. But no matter how I fix, the continued page of TOC (and summary, and List of Tables) still looks much higher than its 1st page. Any comments are much appreciated!               \def\tableofcontents{        \clearpage        \typeout{TABLE OF CONTENTS.}        \def\headmark{\vbox{             \hbox to \textwidth{\bfseries\large\hfil TABLE OF CONTENTS                (Continued) \hfil}         \setlength{\topmargin}{-0.5in}             \vspace{\innerheadskip}             \hbox to \textwidth{\bfseries\normalsize                \underbar{CHAPTER}\hfil\underbar{PAGE}}}}          \pagestyle{continued}        \table@of@cont        \newpage        }          \def\table@of@cont{%        \begin{singlespace}        \thispagestyle{pageonbottom}        \@makeschapterhead{TABLE OF CONTENTS}        \par        \hbox to \textwidth{\bfseries\underbar{CHAPTER}            \hfil\underbar{PAGE}}        \@starttoc{toc}        \end{singlespace}}


title: Libertine Font Greek Letters Size

text: As you can see the greek letters from pxfonts are bigger than the numbers. How can i fix the size? The numbers size is the better. ![enter image description here](http://i.stack.imgur.com/CsDwN.png)               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage[lining]{libertine}     \usepackage[libertine, cmintegrals]{newtxmath}          \DeclareSymbolFont{greeksymbols}{OML}{pxmi}{m}{it}          \DeclareMathSymbol{\beta}{\mathalpha}{greeksymbols}{12}     \DeclareMathSymbol{\gamma}{\mathalpha}{greeksymbols}{13}     \DeclareMathSymbol{\theta}{\mathalpha}{greeksymbols}{18}          \begin{document}          $5\beta +5\gamma+ 2\theta+3\Gamma + 250\log_2 n = 75\sin x $          \end{document}


title: Compiling a 870 mb latex file

text: I have a tikz file that is 870 mb and I want to compile it using some latex. How can I achieve this? I have tried increasing the amount of main memory to latex to the maximum and it still doesn't render. Currently I get the following output while compiling. I computer generated the file using this tool https://gephi.org using the tikz output export. http://pastebin.com/4bD9r1Ld I performed the fix in the answer below and now I get this error http://pastebin.com/KMZDW8qZ


title: Adding margin to a custom environment

text: Is there a way to define a custom environment (for example Propositions) in such a way that the content of that environment will automatically have a given margin at the top and the bottom? I mean something like ![Margin to Proposition environment](http://i.stack.imgur.com/8qn2n.png) Here's a MWE:               % Document etc (fold)             \documentclass[]{article}             \usepackage[utf8]{inputenc}             \usepackage[T1]{fontenc}             \usepackage{amssymb,amsmath}             \usepackage{amsmath}             \usepackage{amsthm}             \usepackage{mathrsfs}                  \newtheorem{prop}{Proposition}[]      \newcommand{\calO}{\mathscr{O}}             \newcommand{\OX}{\calO_X}      \newcommand{\OC}{\calO_C}      \newcommand{\OD}{\calO(D)}      \newcommand{\OXD}{\OX(D)}      \newcommand{\ND}{\calN_D}      \newcommand{\ODD}{\calO_D(D)}      \newcommand{\Mtt}{\tilde{M}_t}        \newcommand{\Xdr}{X_d^r}        \newcommand{\Xdrr}{ X_d^{\underline{r}} }        \newcommand{\Wdr}{W_d^r}        \newcommand{\Wdrr}{W_d^{\underline{r}}}        \newcommand{\Gdr}{G_d^r}        \newcommand{\eps}{\varepsilon}      \newcommand{\AND}{\qquad \text{and} \qquad}      \DeclareMathOperator{\Pic}{Pic}      \newcommand{\ABiff}{if and only if }      \newcommand{\al}{\alpha}      \newcommand{\alb}{{\alpha\beta}}      \newcommand{\set}[1]{\Big\{ #1 \Big\}}                   \begin{document}                      With the aim of describing the tangent space of $\Wdr$, we will first look at the one of its canonical blow-up $\Gdr$. A motivation for this approach is the observation that the natural projection         $$ \pi:\Gdr\to\Wdr, \qquad (L,W) \mapsto L $$         is biregular away of $W_d^{r+1}$. Indeed $\pi$ is clearly a regular map and, further, the preimage of a $L\in \Wdrr$ consists just of the point $w=(L,H^0(L))$. It follows that, as far as $\Wdrr$ is regarded, $\pi_*$ gives an isomorphism between the tangent spaces         \begin{equation}\label{eq:tgnt_Wdrr}                 T_{w}\Gdr \cong T_L\Wdr, \quad \forall L\in\Wdrr.         \end{equation}         In order to describe the tangent space of $\Gdr$, a preliminary result about the first order deformations of a pair $(L,s) \in \Pic^d \times H^0(L)$ will turn out to be crucial.         \begin{prop}                 Let $L\in \Pic^d$ be a line bundle over $X$ and $s\in H^0(L)$ a global section. Then an element $\phi \in T_L\Pic^d \cong H^0(\OX)$ induces a first order deformation of the pair $(L,s)$ \ABiff $\phi\cdot s=0$ in $H^1(L)$.         \end{prop}         \begin{proof}                 Assume that $L$ is given by transition functions $g_\alb$ on a open cover $U_\al$ of $X$. We already know that $T_L \Pic^d \cong H^1(\OX)$ and a first order deformation $L'$ of $L$ is represented by a class $\phi \in H^1(\OX)$ in the following way                 $$ g_\alb \quad\overset{\phi}\leadsto\quad g'_\alb = g_\alb \cdot (1+ \eps \phi_\alb). $$                   On the other hand, on a first order deformation of the pair $(L,s)$ into $(L',s')$ we have the additional requirement that the section $s'$ corresponds to a linear deformation of $s$. In formula this is expressed as                 $$ s'_\al = s_\al + \eps t_\al, \quad t \in H^0(L). $$                 The action of the transition functions can therefore be expanded as                 $$ s'_\beta = g'_\alb \cdot s'_\al \;\iff\; s_\beta + \eps t_\beta = g_\alb \cdot (1 + \eps \phi_\alb)\cdot(s_\al + \eps t_\al)$$                 and imposes the conditions                 $$ s_\beta = g_\alb \cdot s_\al \AND \phi_\alb \cdot s_\al = t_\al - g_{\beta\al}\cdot t_\beta. $$                 The first one is automatically satisfied since $s$ being a global section of $L$, while the second one can be rewritten in terms of the coboundary map $\delta : C^0(L) \to C^1(L)$ as                 $$ \phi \cdot s = \delta (t), $$                 thus giving the desired result.         \end{proof}              \end{document}


title: \underbrace at a strange place, spanning array columns

text: Take a look at the following code:               $$\begin{array}{rr|r|c|l}     vd_2:&\raisebox{0pt}[0pt]{\makebox[0pt][l]{$\overbrace{\phantom{b_1\dots b_{n-l_{k-1}-2k}\hspace{2\arraycolsep}b_{n-l_{k-1}-2k+1}\dots b_{n-k-1}b_{n-k}\hspace{2\arraycolsep}c^k}}^v$}}b_1\dots b_{n-l_{k-1}-2k}&b_{n-l_{k-1}-2k+1}\dots b_{n-k-1}b_{n-k}&c^k&d_2\\     \mathrm{PW}(w):&\dots w_r c^{r+1-k}&c^k\raisebox{0pt}[0pt][0pt]{\makebox[0pt][l]{$\underbrace{\phantom{w_{k-1}\hspace{4.17em}\hspace{2\arraycolsep}c^k\hspace{2\arraycolsep}\widetilde{w_{k-1}}\dots}}_{w_r}$}}w_{k-1}\hspace{4.17em}&c^k&\widetilde{w_{k-1}}\dots\dots     \end{array}$$      I would like to draw the `\underbrace` in a more elegant way. The main problem is how to make sure that `$c^kw_{k-1}$` is in the dead center of the column. In the proposed code, it has been done artifically: the empty space of length `4.17em` is added to the right of `$c^kw_{k-1}$`, where the value `4.17em` is obtained by trial-and-error. This works nicely in `12pt`, but if the font size is changed, it slides off the center. Even if there were not a problem with changing the font size, it would seem logical that there is a nicer way to accomplish this effect, instead of guessing the value `4.17em` (or whichever works for the particular font size) until a good enough pixel-precision is reached.


title: Trying to import a tikz figure generated by matplotlib2tikz, getting dimension too large for y-axis

text: I'm trying to use a graph exported by `matplotlib2tikz`, with the following code in it:               \begin{tikzpicture}     \begin{axis}[     ylabel={CF [\%]},     xmin=0.5, xmax=7.5,     ymin=0.096, ymax=0.144,     axis on top,     width=\figurewidth,     height=\figureheight,     legend entries={Without Daytime,With Daytime}     ]     \addplot [red, dotted, mark=square*, mark options={draw=black}]     coordinates {     (1,0.133436580942456) (2,0.115673379339152) (3,0.120904949173964) (4,0.131747653060196) (5,0.132274436935023) (6,0.13189650135679) (7,0.131731186551343)      };     \addplot [blue, dotted, mark=diamond*, mark options={draw=black}]     coordinates {     (1,0.109315022898981) (2,0.11263226182201) (3,0.113782540485058) (4,0.107637011084747) (5,0.108459720680927) (6,0.120093612355885) (7,0.120109008832872)      };     \path [draw=black, fill opacity=0] (axis cs:13,1)--(axis cs:13,1);          \path [draw=black, fill opacity=0] (axis cs:1,13)--(axis cs:1,13);          \path [draw=black, fill opacity=0] (axis cs:13,0)--(axis cs:13,0);          \path [draw=black, fill opacity=0] (axis cs:0,13)--(axis cs:0,13);          \end{axis}      In my tex-file I have:               \usepackage{tikz}     \usepackage{tkz-fct}      \usepackage{pgfplots}          \newlength\figureheight     \newlength\figurewidth      and:               \setlength\figurewidth{0.8\textwidth}     \setlength\figureheight{0.625\figurewidth}          \begin{figure}     \centering     \input{.fig1.tikz}     \caption{CAPTION}     \end{figure}      But this gives me: `! Dimension too large. <to be read again> ...` Changing the `ymin` and `ymax` to 0 an 1.5 solves it but it doesn't look that good anymore. I know I'm a real newbie when it comes to latex, but I hope someone could help me out.


title: Question about ArsClassica codes

text: I would to know for what is used the code below (Last lines code) in `arsclassica.sty`. Also I would to know why in `arsclassica-settings` there are some repetitions of `\lstset` is not the same thing put all the options in one `\lstset`? And why, for examples this string: `\lstset{moredelim={[is][\ttfamily]{!?}{?!}}}` is repeated? * * * ## Listings code               \lstset{basicstyle=\normalfont\ttfamily}     \lstset{flexiblecolumns=true}     \lstset{moredelim={[is][\normalfont\itshape]{/*}{*/}}}     \lstset{basicstyle=\normalfont\ttfamily}     \lstset{flexiblecolumns=false}     \lstset{moredelim={[is][\ttfamily]{!?}{?!}}}      \lstset{escapeinside={�*}{*�}}     \lstset{firstnumber=last}     \lstset{moredelim={[is][\ttfamily]{!?}{?!}}}      * * * ## Last lines code               \def\toc@headingbkORrp{%        \def\toc@heading{%          \chapter*{\contentsname}%          \@mkboth{\spacedlowsmallcaps{\contentsname}}            {\spacedlowsmallcaps{\contentsname}}}}      \@ifclassloaded{scrreprt}{\toc@headingbkORrp}{}      \@ifclassloaded{scrbook}{\toc@headingbkORrp}{}


title: Change the graphic in beamer footline for every part

text: I would like to change a graphic in my footline of a beamer presentation dependent on the active part. I wanted to load a specific filename based on `\insertpart` but this doesn't work. Here is the footline template code:               \hspace{24pt}\insertauthor \ \insertdate \hfill\insertpart\      \includegraphics[height=1em]{gfx/footgfx\insertpart}\usebeamercolor[fg]{footline pagenumber}\hfill \insertframenumber{}\hspace{24pt}      What other possibility than modifiying the filename with \insertpart do I have? Is there a alternative?


title: How do you define a command to select nested groups?

text: Assuming a pair structure (2-tuple) is defined using groups               {{<tokens1>}{<tokens2>}}      is it possible to define a command `\first#1{...}` (and `\last#1{...}`) taking the surrounding group as its single argument which expands to `<tokens1>` but _consumes_ `{<tokens2>}` (and vice versa)? If so, how? > By _consume_ I mean expanding to `\relax` or the empty token list (or > whatever is the most appropriate pattern for _expand to nothing_ ). > > This is for a LISP style recursive list implementation. > > TeX-core solutions preferred.


title: LaTeX + Memoir or ConTeXt MkIV?

text: Is it worth to migrate from LaTeX (with Memoir) to ConTeXt? I think about it, but I have few doubts:   * LaTeX + Memoir is a well documented team, while ConTeXt not,   * LaTeX + Memoir is a team that works and simply does things,   * there are many text editors with syntax highlighting, command completion, UTF-8 encoding for LaTeX,   * but ConTeXt seams to allow for more efficient work. And the final question, perhaps most important, does InDesign/QuarkXPress/Scribus can be replaced with ConTeXt? Not theoretically, but practically. Is it possible to do handily and efficiently the same things? It would be marvelous to do all typographic designs with one tool (ConTeXt) instead of using InDesign/QuarkXPress/Scribus + LaTeX. For example, is it convenient to design good-looking books/newspapers (not just for scientists:) only with ConTeXt? I'm aware that WYSIWYG software is more suitable for "uneven, not repetitive designs". But maybe ConTeXt is good enough for that kind of work also? Please, do not be shy, just answer my question:) I really need to hear some experienced users' opinions. But any help is most welcome!


title: Expansion in \endnote-argument for hints after exercises

text: A desired feature for the latex-templates that we're using for exercises is to give hints in a way that the students have the option of trying to solve the exercise without it (i.e. not directly below the problem formulation). `endnotes` (or rather, the newer `enotez`), seemed like a good starting point for this. However, I'd like the mark of each endnote to be a reference back to the subproblem for which the hint is given. My idea was to automatically label all subproblems with a counter derived from `\thesubproblem`, and thus reconstruct the right label without having to manually feed the label to the `\hint`-command I'd like to have (see code below). Unfortunately, I can't manage to:   * expand the reference in the argument of `\endnote`   * feed **any** reference into the optional argument (which is responsible for the mark). This is secondary however, because by changing the style and removing the marks, I could just put the reference at the beginning of the body of the hint. I've looked at a few tex.sx questions (How to expand several arguments in an environment?, When to use \edef, \noexpand, and \expandafter?, etc.), but with no success. Additionally, I'd like to make use of the splitting into sections that `enotez` offers, ideally by tricking it into thinking that a new problem belongs to a new section (which I do below with a `\section*{}` that I'd like to get rid of). I've played around with incrementing the counters and so forth, but this didn't work and my `expl3`-fu is not good enough to parse what `enotez.sty` is actually doing. Here's my sample code:               \documentclass{article}     \usepackage[english]{babel}          \usepackage{etoolbox}     \usepackage{enotez}     \usepackage[colorlinks]{hyperref}          \makeatletter     \setenotez{         list-name=Hints,         list-style=section,         mark-cs=\@gobble,         split=section,         split-title={Hints for Problem <ref>}     }     \makeatother          \DeclareInstance{enotez-list}{custom}{list}{number = #1:}          \newcounter{exsheet}     \newcounter{problem}[exsheet]          \newcommand{\exsheet}[1]     {\setcounter{exsheet}{#1}     \begin{center}  {\Large Homework Problem Sheet #1} \end{center}     }          \setlength{\parindent}{0pt}     \makeatletter     \renewcommand{\theproblem}{\arabic{exsheet}.\arabic{problem}}     \newcommand{\problem}[2][]{%         % details see tex.stackexchange.com/q/31780         \@startsection{problem}{1}{\z@}{-3.25ex\@plus -1ex \@minus -.2ex}{1.5ex \@plus .2ex}%         {\large\bfseries Problem~}[\ifstrempty{#1}{#2}{#1}]{#2}}     \let\problemmark\@gobble          \newcounter{subproblem}[problem]     \renewcommand{\thesubproblem}{(\arabic{exsheet}.\arabic{problem}\alph{subproblem})}     \newcommand{\thesp}{\arabic{exsheet}.\arabic{problem}.\arabic{subproblem}}     \newcommand*{\subproblem}{\@startsection{subproblem}{2}{0em}{1ex}{0pt}{\bfseries}{}%         \label{sp.\thesp}}     \let\subproblemmark\@gobble     \makeatother          % % % % % % Help needed here: % % % % % % %     %\newcommand{\hint}[#1]{\endnote[...expansion magic...\ref{sp.\thsp}]{#1}}          \let\thesection\theproblem          \begin{document}          \exsheet{1}          \problem{Test}     \subproblem Text     \subproblem Text\endnote[(1.1b)]{Hint} % call should just be \hint{Hint}     \subproblem Text      \subproblem Text\endnote[(1.1d)]{Hint} %\ref{sp.\thesp} works outside          \section*{Section for splitting endnotes -- shouldn't be here}     \problem{Test}     \subproblem Text\endnote[(1.2a)]{Hint}     \subproblem Text     \subproblem Text     \subproblem Text\endnote[(1.2d)]{Hint}          \vfill % would normally be \newpage     \printendnotes[custom]     \end{document}


title: Automatic matching and scaling delimiters

text: When I'm writing maths in TeX, I often have to use the scaling delimiters `\left(` and `\right)` and so on. I find the heavy use of them very unreadable in the source code. Is there any possibility that when I write in math mode `(` that it will have the effect that `\left(` normally has and the other way around? This way, the readablity of long or big formulae could be improved. Here is a MWE:               \documentclass{article}     \begin{document}     $\displaystyle\left(\frac{t}{2}\right)$ for $t\in [0,1)$.     \end{document}      What I want is being able to write something like               \documentclass{article}     % Fancy code or package here     \begin{document}     $\displaystyle (\frac{t}{2})$ for $t\in \left[0,1\right)$.     \end{document}      and get the same output as above. Non-matching delimiters like in the interval above are far more rare in mathematical texts, in my opinion. That is the reason I'd like to have this possibility. Bonus question for the comments: Why is this a good/bad idea or how to circumvent this issue?


title: Add an unnmbered section to the table of Contents in Lyx

text: I use Lyx 2.1, class document : report. I created a general introduction as unnumbered chapter, but at the table of Contents, the introduction does not exist. ![enter image description here](http://i.stack.imgur.com/Kqh9e.png)


title: includeonlyframes not working in lyx beamer

text: I am trying to use the `\includeonlyframes` option in a Lyx file created using the beamer template. but it is not working. ( I am trying this solution. http://tex.stackexchange.com/a/27354/38845 ) Here is what I did.   * Added `\includeonlyframes{mylable}` to the document preamble in lyx.   * Added a lable "mylable" to a frame (using insert-> label menu)   * Expected behavior: only the frame labeled "mylable" should be displayed.   * Actual behavior: Error "Error while previewing format"


title: Adding a hrule between hboxes decreases their vertical distance

text: Using pdftex. Given two sample programs test0.tex               \vbox{     \hbox{X}     \hbox{Y}     }          \bye      test1.tex               \vbox{     \hbox{X}     \hrule     \hbox{Y}     }          \bye      gives the following outputs. test0.png ![test0.png](http://i.stack.imgur.com/FbSYT.png) test1.png ![test1.png](http://i.stack.imgur.com/G6KF1.png) So, adding a `\hrule` between the two `\hbox`es actually decreases their vertical distance. Why is this and what parameters influence the vertical distance between two sibling hboxes?


title: How to draw 3d molecules with TikZ?

text: Is it possible to draw molecules in 3d with TikZ like in this picture? ![enter image description here](http://i.stack.imgur.com/DVqzT.jpg)


title: Showing all the decimal numbers on the y axis clearly in a given chart

text: I would like to show my y axis as follows: ![enter image description here](http://i.stack.imgur.com/anrpy.gif) Here is my code:               \documentclass[english,12pt]{standalone}          \usepackage{tikz}     \usetikzlibrary{patterns}     \usepackage{pgfplots}     \pgfplotsset{compat=1.10}     \begin{document}               \begin{tikzpicture}     \begin{axis}[ybar=1.2pt,% configures `bar shift'         width=0.80*\textwidth,         height=7cm,         ymin=0,         bar width=10pt,         enlarge x limits=0.07,         symbolic x coords={system,system2,system3,system4,system5,system6,system7,system8,system9,system10},         grid style={dotted,gray},         tick align=outside,         tickpos=left,         xtick=data,         ymajorgrids=true,         ytick={0,10000,20000,30000,40000,50000,60000},         point meta=y,         x tick label style={rotate=90,anchor=east,tickwidth=2mm,                             at={(xticklabel cs:0.9,5pt)}, xticklabel},         legend columns=1,         legend style={draw=none,nodes={inner sep=2pt}}     ]     \addplot[pattern=horizontal lines light blue,pattern color=orange] coordinates      {(system,62692) (system2,51132) (system3,21046)(system4,11902) (system5,3740) (system6,5898)(system7,3870) (system8,1383) (system9,3947) (system10,849)};     \legend{VS}     \end{axis}     \end{tikzpicture}          \end{document}      However, my chart now shows the y axis with point meta (e.g., 10^4). How can I disable it? Even though, I do not use a specific property, the chart automatically adjusts the y axis by itself as follows: ![enter image description here](http://i.stack.imgur.com/034eG.gif)


title: How to change the headers of the ToC when using `fancyhdr`/`extramarks`?

text: WIth `fancyhdr`, one must use the package `extramarks` to get the headers of the subsections right; but for the old hack:               \markboth{WEWFE}{ONWOOQ}      no longer works. For the section headers I use `\firstleftmark` and the last version. My setting is:               \documentclass[a4paper, 11pt]{article}     \usepackage{lipsum}     \usepackage{fancyhdr}     \usepackage{extramarks}     \pagestyle{fancy}     %     \fancyhf{}     \fancyfoot{}     \renewcommand{\sectionmark}[1]{\markboth{\thesection\ {#1}}{}}     \renewcommand{\subsectionmark}[1]{\markright{\thesubsection\ {#1}}}     \fancyhead[L]{\nouppercase{\firstleftmark}}     \fancyhead[C]{\nouppercase{\lastrightmark}}     %        \begin{document}     \tableofcontents     %     \section{first section}     %     \lipsum[1]     %     \subsection{first subsection}     %     \lipsum[1]     %     \end{document}      The problem is that table of content is printed as a subsection [so in the middle of the header] not as a section [it should be on the left of the header] I want precisely the converse, because the ToC is considered as actually a section, not a subsection!


title: include algorithm package in latex

text: I am using llncs (lecture notes in computer science) class style for my latex file. However, I am not able to include the algorithm package in my file. When I compile my file, I get an error for the usepackage command for algorithm. I tried several different algorithm packages but none of them works. Does anybody know the trick for this?


title: How do I decorate a parametric curve with text in Tikz

text: Nothing I'm doing is allowing me to get a compilable, decorated path. The MWE shows two attempts               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{decorations.pathmorphing}     \usetikzlibrary{decorations.text}     \begin{document}          \begin{tikzpicture}       \draw[help lines] grid (3,2);       \fill [draw=red,              fill=red!20,              postaction={decorate,                          decoration={raise=2pt,                                      text along path,                                      text={this, is my text asldfj some more text and yet more text to come and even more test to come this, is my text asldfj some more text and yet more text to come and even more test to come}                                     }}]                           plot[domain=-4:4,parametric] function{t,t*t};     %% this fails too %% plot[domain=-4:4,parametric] ({t},{t*t});     \end{tikzpicture}          \end{document}      As it currently stands, I get the error:               Package pgf Warning: Plot data file `mwe_01.pgf-plot.table' not found. on input      line 16.               ! Package pgf Error: I cannot decorate an empty path.          See the pgf package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.16 ...t[domain=-4:4,parametric] function{t,t*t};      If I reverse which `plot` lines are commented out, I get the error:               ! Package PGF Math Error: Unknown function `t' (in 't').          See the PGF Math package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.17     plot[domain=-4:4,parametric] ({t},{t*t})                                                      ;     ?       Currently the manual is driving me crazy. Examples are hard to use because for very few of them is it clear what libraries need to be called. For example, it took a long time to figure out that `\usetikzlibrary{decorations}` wasn't sufficient. It then took me another century to figure out which decoration libraries I needed. :(:::::::::::::::::::::::::: I'm sure the solution to decorating a parameterized path is straight-forward. It might even be documented in the manual. But, after search for way too long, I can find nothing that's helping me. :( Any suggestions?


title: How to build Knitr document from the command line

text: I would like to compile a knitr document from the command line. With Sweave, the sequence               R CMD Sweave my_sweave_file.Rnw     latex my_sweave_file.tex     latex my_sweave_file.tex     dvips my_sweave_file.dvi     ps2pdf my_sweave_file.ps      builds the final pdf file I want to publish. What is the corresponding build sequence with knitr? Thanks!


title: Base 2 logarithmic scale

text: I am plotting data with `pgfplots` using `semilogxaxis` that use base 10 logarithm. Is there a way to change the base of logarithmic-axes (I need an axis where power of 2 values are separated by the same amount of pixels) ?


title: Removing strange vertical space after first (customized) \item

text: I have a custom environment `properties` (that is almost ready for release to Github) that works like so:               \begin{properties}     \item[no max in reals] \forall a \in \Re, \exists b \in \Re : a < b     \item[minimum natural] \exists n \in \Na : \forall m \in \Na, n \le m     \end{properties}      and would produce (sans typo) ![output](http://i.stack.imgur.com/tosrU.png) However, for a more complicated example, the spacing seems to be off: ![output](http://i.stack.imgur.com/Nd81e.png) I think this has something to do with the behavior of `\NewDocumentEnvironment` that I'm not accounting for… MWE               \documentclass{article}     \usepackage{amsmath,amsthm} % \text{...}; \newtheorem{...}{...}     \usepackage{xparse,expl3}     \usepackage[hidelinks]{hyperref} % For some reason, this affects                                      % numbering of the equations.     \ExplSyntaxOn          % makes sure math content is centered     \cs_new:Nn \property_do_fill:      { \hskip \textwidth minus \textwidth }          % enters math mode and starts a property     % does not typeset a math comment     \cs_new:Nn \property_do_begin:      {       \equation       \quad\bullet       \property_do_fill:     }          % enters math mode and starts a property     % does typeset math comment     \cs_new:Nn \property_do_begin:n      {       \equation       \quad\bullet\enspace\text{\slshape #1}       \property_do_fill:     }          % ends this property and exists math mode     \cs_new:Nn \property_do_end:     {       \property_do_fill:       \endequation     }          \bool_new:N \g_property_first_item_bool          \NewDocumentEnvironment { properties } { }      {       \bool_set_true:N \g_property_first_item_bool       % Delimits properties       % starts off by beginning a property, and then redefines itself       % to end a previous property before starting a new one.       \DeclareDocumentCommand \item { o }        {         \bool_if:NTF \g_property_first_item_bool          { \bool_set_false:N \g_property_first_item_bool }          { \property_do_end: }         \IfValueTF { ##1 }          { \property_do_begin:n { ##1 } }          { \property_do_begin: }        }      }      { \property_do_end: }               \theoremstyle{definition}     \newtheorem{definition}{Definition}                              %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %%% Extra %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          % This stuff isn't necessary for compilation, but is stuff that I use     % in the example.  Feel free, of course, to use it in your own stuff     % (LPPL and all that jazz).  I find it helps further logicall organize     % stuff, although it acts a little weird with AUCTeX's fold mode.                    % Save the old \forall     \cs_set_eq:NN \for_all: \forall          % create a *new* forall that takes two arguments: the predicate and     % the other thing.  Because I forgot FOM.     \cs_new:Nn \for_all:nn      {       \for_all: #1,\; #2      }     \DeclareDocumentCommand \forall { s }      {       \IfBooleanTF { #1 }        \for_all:        \for_all:nn      }          % Save the old \exists     \cs_set_eq:NN \exists: \exists          % create a *new* forall that takes two arguments: the predicate and     % the other thing.  Because I forgot FOM.     \cs_new:Nn \exists:nn      {       \exists:\,#1:#2      }     \DeclareDocumentCommand \exists { s }      {       \IfBooleanTF { #1 }        \exists:        \exists:nn      }          \ExplSyntaxOff          \def\Na{\mathbf N}          \begin{document}     \begin{definition}[group]       A group is a set $G$ together         with a binary operation $*$ on $G$         that satisfies the following axioms:       \begin{properties}       \item[associativity] \label{def:group:assoc}         \forall{a,b,c \in G}{(a * b) * c = a * (b * c)}       \item[identity] \label{def:group:identity}         \exists{e \in G}{\forall{a \in G}{a * e = a = e * a}}       \item[inverse] \label{def:group:inverse}         \forall{x \in G}{\exists{b \in G}{a * b = b * a = e}}       \end{properties}     \end{definition}     \end{document}


title: how to insert \Delta with normal text

text: If I do               The equation is \Delta I/I= k = constant,      I get Missing $ inserted. $ l.26 The equation is \Delta


title: Wrong ticks in colorbar using pgfplots

text: I'm using pgfplots and addplot3 to show a 3D function, provided by the following csv:               100,2.0,100     500,2.0,500     1000,2.0,1000     1500,2.0,1500     2000,2.0,2000          100,2.1,158.489     500,2.1,930.823     1000,2.1,1995.26     1500,2.1,3116.74     2000,2.1,4276.94          100,2.2,250.901     500,2.2,1732.86     1000,2.2,3981.07     1500,2.2,6476.04     2000,2.2,9146.1          100,2.3,398.107     500,2.3,3225.97     1000,2.3,7942.87     1500,2.3,13456.1     2000,2.3,19557.4          100,2.4,630.843     500,2.4,6004.51     1000,2.4,15848.9     1500,2.4,27955.1     2000,2.4,41825.6          100,2.5,1000     500,2.5,11173.7     1000,2.5,4.75107     1500,2.5,2.81728     2000,2.5,2.26659          100,2.6,1583.01     500,2.6,2.49369     1000,2.6,1.65541     1500,2.6,1.45015     2000,2.6,1.35367          100,2.7,93.0216     500,2.7,1.47484     1000,2.7,1.24744     1500,2.7,1.17567     2000,2.7,1.13921          100,2.8,2.64684     500,2.8,1.20907     1000,2.8,1.11044     1500,2.8,1.07747     2000,2.8,1.06059          100,2.9,1.64157     500,2.9,1.10231     1000,2.9,1.05243     1500,2.9,1.03585     2000,2.9,1.02746          100,3.0,1.32898     500,3.0,1.05254     1000,3.0,1.02562     1500,3.0,1.01693     2000,3.0,1.01265      I'm using this code:               \pgfplotsset{         ytick={2.0,2.2,...,3},         xtick=data,         ztick={1e0,1e1,1e2,1e3,1e4},     }          \begin{figure}[ht]     \centering     \begin{tikzpicture}         \begin{axis}[view/h=135,colorbar right,ymin=1.9,ymax=3.1,zmode=log,xlabel style={sloped},ylabel style={sloped},ymajorgrids=true,x dir=reverse,                  colorbar style={yticklabel=$10^{\pgfmathparse{\tick}\pgfmathprintnumber\pgfmathresult}$}]             \addplot3[surf,shader=faceted interp] table [col sep=comma] {function.csv};         \end{axis}     \end{tikzpicture}     \end{figure}      which results in the following plot: ![3D plot](http://i.stack.imgur.com/NXuoT.png) As you can see, the labels on the ticks in the colorbar are wrong, as the range should be more or less [10^0,10^4], as it is correctly shown in the plot on the left. Any idea on how can I fix this?


title: To have abstract in the document class revtex?

text: I had to change my document class to **revtex4-1** to be able to have `\widetext` parameter for one of my equation, discussion about implementation. However, the abstract `\begin{abstract}...\end{abstract}` is not supported by this class. My minimal code               \documentclass[twocolumn]{revtex4-1}     \begin{document}     \title{Hello world}     \maketitle          \begin{abstract} % abstract     The maximal     \end{abstract}          \end{document}      I get the errors               ./article.tex:84: LaTeX Error: Environment abstract undefined.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.6 \begin{abstract}                           % abstract          ./article.tex:8: LaTeX Error: \begin{document} ended by \end{abstract}.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.8 \end{abstract}      **How can you have abstract in revtex4-1?** or **How can you have widetext in _article_ document class?**


title: How to get rid the indent after the equation

text: Since my equation in LaTeX is quite large I have decided to increase its size in the following way:               %          \begin{small}             \begin{eqnarray}                 bla bla bla bla                      \end{eqnarray}                   \end{small}                  %               text text text      Everything looks fine here, except that that the text after the equation starts with an indent, even though I have put `%` between the equation and the text. How can I get rid of the indent?


title: Which package is required for \Z to work as the symbol for the set of integers?

text: According to http://www.proofwiki.org/wiki/Symbols:Z#The_Set_of_Integers, \Z should produce the symbol for the set of integers, but I have not been able to find the package that enables this feature. I have tried `dsfont` as well as `amsmath,amsfonts,amsthm,amssymb` but none of them seem to have it.


title: TeXnicCenter 2.0, Windows XP

text: I'm trying to insert a file into my document. In the preamble I have               \usepackage{graphicx}          \usepackage{epstopdf}     Then in the text I have:          \begin{figure}[!ht]          \centering     \includegraphics[width={\textwidth}]{C:/..[full file path inserted]/DLSdiameter.eps}          \caption{Sizes of detergent micelles calculated by DLS.}          \label{fig:DLS_diameter}          \end{figure}      (note each command starts a new line, but I can't get that to display here without a linespace as well.) This inserts the figure but leaves a large blank space above the figure in which parts of the file path are displayed twice. I also get two errors: 'File'C:/filepath' not found' and 'Cannot determine size of graphic in 'C:/filepath''. I initially used the Insert>Figure options in TeXnicCentre with some modifications to the code from internet searches. I am also using the conversion LaTeX=>PS=>PDF, as this is the only option which seems to display the figure. Any suggestions would be welcome. Thanks.


title: Setting environment variable with arara

text: I wanted to set my `TEXINPUTS` environment variable from with an `arara` rule/directive. For example my `texinputs.yaml` rule is               !config     identifier: texinputs     name: texinputs     command: export TEXINPUTS="@{mypaths}$TEXINPUTS:"     arguments:     - identifier: mypaths       flag: "@{parameters.mypaths}"      and my `test.tex` file is               \documentclass{article}     \begin{document}     Hello world     \end{document}     % arara: texinputs: { mypaths: ".//:" }     % arara: pdflatex      When I run `arara -v test` from the directory in which `test.tex` is located, I get > Running texinputs... > > I'm sorry, but the command from the 'texinputs' task could not be found. Are > you sure the command 'export TEXINPUTS=".//:$TEXINPUTS:"' is correct, or > even accessible from the system path? What am I doing wrong? I am on Linux with `TeX Live 2012`.


title: Solid of revolution about arbitrary axis

text: I'd like to rotate the region between y=cos(x) and y=x^2 - 0.25*pi^2 about the line x=pi. How to do this? So far I have only managed to rotate around the x-axis:               \documentclass[letterpaper]{article}     \usepackage{tikz}     \usepackage{pgfplots}          \begin{document}          \begin{tikzpicture}         \begin{axis}[view={60}{30}]         \addplot3[surf,shader=flat,           samples=20,           color=red, opacity=0.15,           domain=-0.5*pi:0.5*pi, y domain=0:2*pi,           z buffer=sort]          ({x * cos(deg(y))}, {x * sin(deg(y)) }, {cos(deg(x))});        \addplot3[surf,shader=flat,          samples=20,          color=red, opacity=0.15,          domain=-0.5*pi:0.5*pi, y domain=0:2*pi,          z buffer=sort]         ({x * cos(deg(y))}, {x * sin(deg(y)) }, {x*x - 0.25*pi^2});        \end{axis}     \end{tikzpicture}          \end{document}      Which produces:   ![solid of revolution](http://i.stack.imgur.com/tYt0j.png) However, the solid should be more of a donut shape. Edit: To clarify, I wish to produce a graphic of the solid that this rotation will generate: ![question](http://i.stack.imgur.com/AvVbe.png)


title: Figure positioning correction

text: I am finding incredibly tough to align a one particular figure in my report. Somehow this figure gets automatically positioned in the extreme right position.Here is my code for the same. Could anyone help me with the error/ positioning ?                    \begin{figure}[ht]          \begin{picture}(1,6.85)             \put(1.3,2.0){\includegraphics[width=12.0cm,scale=15.20]                     {figures/orthography_specimen_final.eps}}             \end{picture}             \caption{deep drawn component}                     \end{figure}


title: How to add spacing before and after a cdot?

text: I'm having the following code:               \documentclass[11pt]{article}     \usepackage{amssymb,amsthm,amsmath}     \newcommand{\norm}[1]{\lVert #1 \rVert_2}          \begin{document}     \begin{displaymath}     \norm{\cdot}=...     \end{displaymath}     \end{document}      I'd like to add a little space before and after the dot in the norm, because it's a bit crushed between the vertical lines now. Is there a command with the same output as `\cdot` that does this automatically or should I insert the spacing manually (with `~` for example) each time?


title: Esami: questions side-by-side

text: Following this question, my problem has now shifted to this: I managed to generate the exam pdf, but some of the questions appears next to the previous one rather than below, even if this means that i can see only the question number and first couple of words. Something like this:               1. Question                 |         a stuff                 |         b more stuff            |         c other stuff           |     2. Question            3. Que         a different stuff       |         b casual stuff          |         c random stuff          |      I have set no option that involves columns in the `\usepackage` nor used the `multicols` environment. Can someone help me? **EDIT:** Here is the main `tex` file Here is the `cfg` file Here are the three problems: each one should be put on a different file (problema1, problema2, problema4 in the main file)


title: Importing .mat file to pgfplots

text: I am using `pgfplots` to create figures, and I have a (large) set of simulation data generated from `Matlab`. It is in the `.mat` format. The data are of the form (two column)               (1,0.2)          (1,0.3)          ...          (1,0.2)          ...          (2,0.4)          (2,0.1)          ...      A scatter plot in `pgfplots` would be appropriate. I want to directly importing this file using `pgfplots`. Unfortunately, the following code seems not work.               \documentclass{article}     \usepackage{pgfplots}     \usepackage{xcolor}          \begin{document}          \begin{figure}     \centering     \begin{tikzpicture}     \begin{axis}     \addplot+[scatter]     table{test.mat};     \end{axis}     \end{tikzpicture}     \end{figure}          \end{document}       Is there anyone know how to import these data ? Since the size is a little bit large, it is not possible to copy every sample into the code.


title: pythontex on Ubuntu 14.04

text: After installing the package `pythontex` via `latex pythontex.ins`, I tried the following example to test it:               \documentclass[10pt,a4paper]{article}       \usepackage[utf8]{inputenc}       \usepackage{amsmath}       \usepackage{amsfonts}       \usepackage{amssymb}       \usepackage{pythontex}       \listfiles       \begin{document}     \begin{pycode}       print "Hello \Latex "     \end{pycode}       \end{document}       First step was `pdflatex PythonExample1.tex` which I got the following message:               This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian)     restricted \write18 enabled.entering extended mode     (./PythonExample1.tex     LaTeX2e <2011/06/27>     Babel <3.9h> and hyphenation patterns for 4 languages loaded.     (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))     (/usr/share/texlive/texmf-dist/tex/latex/base/inputenc.sty     (/usr/share/texlive/texmf-dist/tex/latex/base/utf8.def     (/usr/share/texlive/texmf-dist/tex/latex/base/t1enc.dfu)     (/usr/share/texlive/texmf-dist/tex/latex/base/ot1enc.dfu)     (/usr/share/texlive/texmf-dist/tex/latex/base/omsenc.dfu)))     (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsmath.sty     For additional information on amsmath, use the `?' option.     (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty     (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty))     (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsy.sty)     (/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopn.sty))     (/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amsfonts.sty)     (/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amssymb.sty)     (./pythontex.sty     (/usr/share/texlive/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty     Style option: `fancyvrb' v2.7a, with DG/SPQR fixes, and firstline=lastline   fix      <2008/02/07> (tvz) (/usr/share/texlive/texmf-  dist/tex/latex/graphics/keyval.sty     )) (/usr/share/texlive/texmf-dist/tex/latex/etex-pkg/etex.sty)     (/usr/share/texlive/texmf-dist/tex/latex/etoolbox/etoolbox.sty)     (/usr/share/texlive/texmf-dist/tex/generic/xstring/xstring.sty     (/usr/share/texlive/texmf-dist/tex/generic/xstring/xstring.tex))     (/usr/share/texlive/texmf-dist/tex/latex/pgfopts/pgfopts.sty     (/usr/share/texmf/tex/latex/pgf/utilities/pgfkeys.sty     (/usr/share/texmf/tex/generic/pgf/utilities/pgfkeys.code.tex     (/usr/share/texmf/tex/generic/pgf/utilities/pgfkeysfiltered.code.tex))))     (/usr/share/texlive/texmf-dist/tex/latex/caption/newfloat.sty)     (/usr/share/texlive/texmf-dist/tex/latex/currfile/currfile.sty     (/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty     (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty)     (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty     (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty)     (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/etexcmds.sty     (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty))))     (/usr/share/texlive/texmf-dist/tex/latex/filehook/filehook.sty))     (/usr/share/texlive/texmf-dist/tex/latex/upquote/upquote.sty))     (./PythonExample1.aux) (/usr/share/texmf/tex/latex/xcolor/xcolor.sty     (/usr/share/texlive/texmf-dist/tex/latex/latexconfig/color.cfg)     (/usr/share/texlive/texmf-dist/tex/latex/pdftex-def/pdftex.def     (/usr/share/texlive/texmf-dist/tex/context/base/supp-pdf.mkii     [Loading MPS to PDF converter (version 2006.09.02).]     )))     No file pythontex-files-PythonExample1/PythonExample1.pytxmcr.     Run PythonTeX to create it.     (./PythonExample1.aux)          *File List*     article.cls    2007/10/19 v1.4h Standard LaTeX document class     size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)     inputenc.sty    2008/03/30 v1.1d Input encoding file     utf8.def    2008/04/05 v1.1m UTF-8 support for inputenc     t1enc.dfu    2008/04/05 v1.1m UTF-8 support for inputenc     ot1enc.dfu    2008/04/05 v1.1m UTF-8 support for inputenc     omsenc.dfu    2008/04/05 v1.1m UTF-8 support for inputenc     amsmath.sty    2013/01/14 v2.14 AMS math features     amstext.sty    2000/06/29 v2.01     amsgen.sty    1999/11/30 v2.0     amsbsy.sty    1999/11/29 v1.2d     amsopn.sty    1999/12/14 v2.01 operator names     amsfonts.sty    2013/01/14 v3.01 Basic AMSFonts support     amssymb.sty    2013/01/14 v3.01 AMS font symbols     pythontex.sty    2014/07/17 Version\unhbox\voidb@x \penalty \@M \ {}0.14      fancyvrb.sty    2008/02/07     keyval.sty    1999/03/16 v1.13 key=value parser (DPC)     etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)     etoolbox.sty    2011/01/03 v2.1 e-TeX tools for LaTeX     xstring.sty    2013/10/13  v1.7c  String manipulations (C Tellechea)     pgfopts.sty    2011/06/02 v2.1 LaTeX package options with pgfkeys     pgfkeys.sty         pgfkeys.code.tex     newfloat.sty    2013/05/11 v1.1-91 Defining new floating environments (AR)     currfile.sty    2013/02/01 v0.7b Provides the file path elements of the   current     input file     kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)     ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)     kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO)     infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)     etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)     ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)     filehook.sty    2011/10/12 v0.5d Hooks for input files     upquote.sty    2012/04/19 v1.3 upright-quote and grave-accent glyphs in  verbat     im     xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)     color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive     pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX     supp-pdf.mkii     ***********          )     No pages of output.     Transcript written on PythonExample1.log.      After that was `pythontex PythonExample1.tex` to get the following error message:               Traceback (most recent call last):     File "/usr/bin/pythontex", line 42, in <module>     import pythontex2 as pythontex     File "/usr/share/texlive/texmf-dist/scripts/pythontex/pythontex2.py", line  61, in <module>     from pygments.styles import get_all_styles     ImportError: No module named pygments.styles      which is because that pygments is not installed. After installing it I get the following error message               ----  Messages for py:default:default  ----     * PythonTeX stderr - error on line 11:     File "<outputdir>/py_default_default.py", line 50     print "Hello \Latex"                          ^     SyntaxError: invalid syntax          --------------------------------------------------     PythonTeX:  PythonExample1 - 1 error(s), 1 warning(s)      Finally, even if I try `pdflatex PythonExample.tex` again, no pdf file will be generated. I am using Ubuntu 14.04 with Python 2.7.6 Any help!