title: Running a simple example with PythonTeX fails

text: Using the v 0.12 beta of PythonTeX I am trying to compile the following example:               \documentclass[12pt]{scrartcl}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{pythontex}          \begin{document}          \py{2+2}          \end{document}      I run `pdflatex` on the file, then with running `pythontex` on the file I get the following error:               C:\Users\Uwe\Documents\python\Scripts\pythontex>pythontex pythntx1     This is PythonTeX v0.12beta     Traceback (most recent call last):       File "c:/texlive/2013/texmf-dist/scripts/pythontex/pythontex.py", line 48, in     <module>         pythontex.main()       File "c:\texlive\2013\texmf-dist\scripts\pythontex\pythontex2.py", line 2125,     in main         do_multiprocessing(data, temp_data, old_data, engine_dict)       File "c:\texlive\2013\texmf-dist\scripts\pythontex\pythontex2.py", line 1055,     in do_multiprocessing         result = task.get()       File "C:\Python27\lib\multiprocessing\pool.py", line 522, in get         raise self._value     TypeError: must be string without null bytes or None, not str     C:\texlive\2013\bin\win32\runscript.tlu:596: command failed with exit code 1:      Is it a bug in the beta or am I doing something wrong? EDIT: The first six lines of the Here are the first six lines of `pythntx1.pytxcode`:               =>PYTHONTEX#py#default#default#0#i####8#     2+2     =>PYTHONTEX:SETTINGS#     version=v0.12beta     outputdir=pythontex-files-pythntx1     workingdir=pythontex-files-pythntx1      Running the code now brings a different error:               C:\Users\Uwe\Documents\python\Scripts\pythontex>pdflatex pythntx1.tex     This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/W32TeX)      restricted \write18 enabled.     entering extended mode     (./pythntx1.tex     LaTeX2e <2011/06/27>     Babel <3.9f> and hyphenation patterns for 78 languages loaded.     (c:/texlive/2013/texmf-dist/tex/latex/koma-script/scrartcl.cls     Document Class: scrartcl 2012/07/29 v3.11b KOMA-Script document class (article)          (c:/texlive/2013/texmf-dist/tex/latex/koma-script/scrkbase.sty     (c:/texlive/2013/texmf-dist/tex/latex/koma-script/scrbase.sty     (c:/texlive/2013/texmf-dist/tex/latex/graphics/keyval.sty)     (c:/texlive/2013/texmf-dist/tex/latex/koma-script/scrlfile.sty     Package scrlfile, 2012/06/15 v3.12 KOMA-Script package (loading files)                       Copyright (C) Markus Kohm          ))) (c:/texlive/2013/texmf-dist/tex/latex/koma-script/tocbasic.sty)     (c:/texlive/2013/texmf-dist/tex/latex/koma-script/scrsize12pt.clo)     (c:/texlive/2013/texmf-dist/tex/latex/koma-script/typearea.sty     Package typearea, 2012/07/29 v3.11b KOMA-Script package (type area)                       Copyright (C) Frank Neukam, 1992-1994                       Copyright (C) Markus Kohm, 1994-          )) (c:/texlive/2013/texmf-dist/tex/latex/base/fontenc.sty     (c:/texlive/2013/texmf-dist/tex/latex/base/t1enc.def))     (c:/texlive/2013/texmf-dist/tex/latex/base/inputenc.sty     (c:/texlive/2013/texmf-dist/tex/latex/base/utf8.def     (c:/texlive/2013/texmf-dist/tex/latex/base/t1enc.dfu)     (c:/texlive/2013/texmf-dist/tex/latex/base/ot1enc.dfu)     (c:/texlive/2013/texmf-dist/tex/latex/base/omsenc.dfu)))     (c:/texlive/2013/texmf-dist/tex/latex/pythontex/pythontex.sty     (c:/texlive/2013/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty     Style option: `fancyvrb' v2.7a, with DG/SPQR fixes, and firstline=lastline fix     <2008/02/07> (tvz)) (c:/texlive/2013/texmf-dist/tex/latex/etex-pkg/etex.sty)     (c:/texlive/2013/texmf-dist/tex/latex/etoolbox/etoolbox.sty)     (c:/texlive/2013/texmf-dist/tex/generic/xstring/xstring.sty     (c:/texlive/2013/texmf-dist/tex/generic/xstring/xstring.tex))     (c:/texlive/2013/texmf-dist/tex/latex/pgfopts/pgfopts.sty     (c:/texlive/2013/texmf-dist/tex/latex/pgf/utilities/pgfkeys.sty     (c:/texlive/2013/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex     (c:/texlive/2013/texmf-dist/tex/generic/pgf/utilities/pgfkeysfiltered.code.tex)     ))) (c:/texlive/2013/texmf-dist/tex/latex/caption/newfloat.sty)     (c:/texlive/2013/texmf-dist/tex/latex/upquote/upquote.sty     (c:/texlive/2013/texmf-dist/tex/latex/base/textcomp.sty     (c:/texlive/2013/texmf-dist/tex/latex/base/ts1enc.def     (c:/texlive/2013/texmf-dist/tex/latex/base/ts1enc.dfu))))) (./pythntx1.aux)     (c:/texlive/2013/texmf-dist/tex/latex/base/ts1cmr.fd)     (c:/texlive/2013/texmf-dist/tex/latex/xcolor/xcolor.sty     (c:/texlive/2013/texmf-dist/tex/latex/latexconfig/color.cfg)     (c:/texlive/2013/texmf-dist/tex/latex/pdftex-def/pdftex.def     (c:/texlive/2013/texmf-dist/tex/generic/oberdiek/infwarerr.sty)     (c:/texlive/2013/texmf-dist/tex/generic/oberdiek/ltxcmds.sty)     (c:/texlive/2013/texmf-dist/tex/context/base/supp-pdf.mkii     [Loading MPS to PDF converter (version 2006.09.02).]     )))          Package PythonTeX Warning: Missing autoprint content on input line 8.          [1{c:/texlive/2013/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]     (./pythntx1.aux) ){c:/texlive/2013/texmf-dist/fonts/enc/dvips/cm-super/cm-super     -t1.enc}<c:/texlive/2013/texmf-dist/fonts/type1/public/cm-super/sfbx1200.pfb><c     :/texlive/2013/texmf-dist/fonts/type1/public/cm-super/sfrm1200.pfb>     Output written on pythntx1.pdf (1 page, 4786 bytes).     Transcript written on pythntx1.log.          C:\Users\Uwe\Documents\python\Scripts\pythontex>pythontex pythntx1     Traceback (most recent call last):       File "c:/texlive/2013/texmf-dist/scripts/pythontex/pythontex.py", line 41, in     <module>         import pythontex2 as pythontex       File "c:\texlive\2013\texmf-dist\scripts\pythontex\pythontex2.py", line 970         engine_dict[input_family].extension,                   ^     SyntaxError: invalid syntax     C:\texlive\2013\bin\win32\runscript.tlu:596: command failed with exit code 1:     python.exe c:/texlive/2013/texmf-dist/scripts/pythontex/pythontex.py pythntx1      EDIT 20130716: After fixing the comma in line 969 I get               C:\Users\Uwe\Documents\python\Scripts\pythontex>pythontex pythntx1     This is PythonTeX v0.12beta     Traceback (most recent call last):       File "c:/texlive/2013/texmf-dist/scripts/pythontex/pythontex.py", line 48, in     <module>         pythontex.main()       File "c:\texlive\2013\texmf-dist\scripts\pythontex\pythontex2.py", line 2125,     in main         do_multiprocessing(data, temp_data, old_data, engine_dict)       File "c:\texlive\2013\texmf-dist\scripts\pythontex\pythontex2.py", line 976, i     n do_multiprocessing         keeptemps, hashdependencies)       File "c:\texlive\2013\texmf-dist\scripts\pythontex\pythontex2.py", line 1203,     in run_code         proc = subprocess.Popen(exec_cmd, stdout=out_file, stderr=err_file)       File "C:\Python27\lib\subprocess.py", line 679, in __init__         errread, errwrite)       File "C:\Python27\lib\subprocess.py", line 893, in _execute_child         startupinfo)     TypeError: must be string without null bytes or None, not str     C:\texlive\2013\bin\win32\runscript.tlu:596: command failed with exit code 1:     python.exe c:/texlive/2013/texmf-dist/scripts/pythontex/pythontex.py pythntx1      EDIT 20130716: After upgrading to Python 2.7.5 I get now:               Upgraded to Python 2.7.5. The old error is gone, but_     pythontex pythntx1     This is PythonTeX v0.12beta          ----  Messages for py:default:default  ----     * PythonTeX notice         1 message(s) could not be classified         Based on the return code, they were interpreted as errors     * PythonTeX stderr - unknown on line ??:       python: can't open file '<outputdir>\py_default_default.py': [Errno 2] No such      file or directory          --------------------------------------------------     PythonTeX:  pythntx1 - 1 error(s), 0 warning(s)          C:\texlive\2013\bin\win32\runscript.tlu:596: command failed with exit code 1:     python.exe c:/texlive/2013/texmf-dist/scripts/pythontex/pythontex.py pythntx1


title: How can I properly resolve relative paths in `\usepackage`?

text: I have a dedicated directory for my project; within that are nested directories `source/`, `output/` and `styles/` that contain the `.tex`, `.pdf` and `.sty` files. I was surprised to find that while `\usepackage{../styles/mystyle}` from `source/main.tex` did work as expected, I have to use the _same_ path in the incantation from within `styles/mystyle.sty`, _not_ `\usepackage{./substyle}`. In other words, relative paths in a file included with `\usepackage` would appear to be resolved with respect to the _including file_ , not the _included one_. This seems problematic since it couples sources and styles—and indeed, moving the source to, say, `/tmp/main.tex` breaks the document! this is, to say the least, surprising. Am I doing something wrong? is there a package that allows me to do the equivalent of a `\usepackage` with a path that is resolved relative _to the including file_? I know I could probably set up environment variables and/or edit some TeX configuration file, but I'd prefer not to in order to keep everything working with a standard TeXlive/MacTex installation.


title: Align table columns with superscript markings

text: I have a table of integers; a handful of them have an extra superscript marks to distinguish various characteristics. I think the table looks nice, but the superscript marks throw off the alignment. Can someone suggest how I can have the table elements right aligned and have the marks extend into the whitespace between the table columns? An example of my table is given here ![enter image description here](http://i.stack.imgur.com/9TaUI.png)               \begin{table}[p] \centering         \caption{List of \SZA s for the \NDI\ data tables released with \MENDFx. The separations are merely for convenience and show the light ($Z < 25$), mid-weight ($25\leq Z < 89$) and the actinides. The \SZA s with an asterisk (*) indicate isotopes new to \ndf[1] and \SZA s new in the \MENDFx\ library.}         \begin{tabular}{rrrrrrrrr}             \toprule             1001     & 1002    & 1003    & 2003    & 2004    & 3006    & 3007    & 4007$^{*\dagger}$   & 4009 \\             5010     & 5011    & 6000    & 6012    & 7014    & 7015    & 8016    & 8017    & 9019 \\             11022    & 11023   & 12024   & 12025   & 12026   & 13027   & 14028   & 14029   & 14030 \\             15031    & 16032   & 16033   & 16034   & 16036   & 17035   & 17037   & 18036   & 18038 \\             18040    & 19039   & 19040   & 19041   & 20040   & 20042   & 20043   & 20044   & 20046 \\             20048    & 21045   & 22046   & 22047   & 22048   & 22049   & 22050   & 23050$^*$  & 23051$^*$ \\             24050    & 24052   & 24053   & 24054   & 25055   & \\             \midrule             26054    & 26056$^\dagger$   & 26057   & 26058   & 27058   & 27059   & 28058   & 28059   & 28060 \\             28061$^{\dagger}$    & 28062   & 28064   & 29063   & 29065   & 30064$^*$  & 30065$^*$  & 30066$^*$  & 30067$^*$ \\             30068$^*$   & 30070$^*$  & 31069   & 31071   & 32070   & 32072   & 32073   & 32074   & 32076 \\             33074    & 33075   & 34074   & 34076   & 34077   & 34078   & 34079   & 34080   & 34082 \\             35079    & 35081   & 36078   & 36080   & 36082   & 36083   & 36084   & 36085   & 36086 \\             37085    & 37086   & 37087   & 38084   & 38086   & 38087   & 38088   & 38089   & 38090 \\             39089    & 39090   & 39091   & 40090   & 40091   & 40092   & 40093   & 40094   & 40095 \\             40096    & 41093   & 41094   & 41095   & 42092   & 42094   & 42095   & 42096   & 42097 \\             42098    & 42099   & 42100   & 43099   & 44096   & 44098   & 44099   & 44100   & 44101 \\             44102    & 44103   & 44104   & 44105   & 44106   & 45103   & 45105   & 46102   & 46104 \\             46105    & 46106   & 46107   & 46108   & 46110   & 47107   & 47109   & 47111   & 48106 \\             48108    & 48110   & 48111   & 48112   & 48113   & 48114   & 48116   & 49113   & 49115 \\             50112    & 50113   & 50114   & 50115   & 50116   & 50117   & 50118   & 50119   & 50120 \\             50122    & 50123   & 50124   & 50125   & 50126   & 51121   & 51123   & 51124   & 51125 \\             51126    & 52120   & 52122   & 52123   & 52124   & 52125   & 52126   & 52128   & 52130 \\             52132    & 53127   & 53129   & 53130   & 53131   & 53135   & 54123   & 54124   & 54126 \\             54128    & 54129   & 54130   & 54131   & 54132   & 54133   & 54134   & 54135   & 54136 \\             55133    & 55134   & 55135   & 55136   & 55137   & 56130   & 56132   & 56133   & 56134 \\             56135    & 56136   & 56137   & 56138   & 56140   & 57138   & 57139   & 57140   & 58136 \\             58138    & 58139   & 58140   & 58141   & 58142   & 58143   & 58144   & 59141   & 59142 \\             59143    & 60142   & 60143   & 60144   & 60145   & 60146   & 60147   & 60148   & 60150 \\             61147    & 61148   & 61149   & 61151   & 62144   & 62147   & 62148   & 62149   & 62150 \\             62151    & 62152   & 62153   & 62154   & 63151   & 63152   & 63153$^{\dagger}$   & 63154   & 63155 \\             63156    & 63157   & 64152   & 64153   & 64154   & 64155   & 64156   & 64157   & 64158 \\             64160    & 65159   & 65160   & 66156   & 66158   & 66160   & 66161   & 66162   & 66163 \\             66164    & 67165   & 68162   & 68164   & 68166   & 68167   & 68168   & 68170   & 69168$^{*\dagger}$ \\             69169$^*$   & 69170$^*$  & 71175   & 71176   & 72174   & 72176   & 72177   & 72178   & 72179 \\             72180    & 73180$^*$  & 73181   & 73182   & 74180$^*$  & 74182   & 74183   & 74184   & 74186 \\             75185    & 75187   & 77191   & 77193   & 79197   & 80196   & 80198   & 80199   & 80200 \\             80201    & 80202   & 80204   & 81203$^*$  & 81205$^*$  & 82204   & 82206   & 82207   & 82208 \\             83209    & 88223   & 88224   & 88225   & 88226   & \\             \midrule             89225    & 89226   & 89227   & 90227   & 90228   & 90229   & 90230   & 90231$^*$  & 90232 \\             90233    & 90234   & 91229$^*$  & 91230$^*$  & 91231   & 91232   & 91233   & 92230   & 92231$^*$ \\             92232    & 92233   & 92234   & 92235   & 92236   & 92237   & 92238   & 92239   & 92240 \\             92241    & 93234   & 93235   & 93236   & 93237   & 93238   & 93239   & 94236   & 94237 \\             94238    & 94239   & 94240   & 94241   & 94242   & 94243   & 94244   & 94246   & 95240$^*$ \\             95241    & 95242   & 95243   & 95244   & 96240$^*$  & 96241   & 96242   & 96243   & 96244 \\             96245    & 96246   & 96247   & 96248   & 96249   & 96250   & 97245$^*$  & 97246$^*$  & 97247$^*$ \\             97248$^*$   & 97249   & 97250   & 98246   & 98248$^*$  & 98249   & 98250   & 98251   & 98252 \\             98253$^*$   & 98254   & 99251$^*$  & 99252$^*$  & 99253$^*$  & 99254   & 99255   & 100255  & 1027058 \\             1047110  & 1048115 & 1052127 & 1052129 & 1061148 & 1067166 & 1095242 & 1095244 & 1099254$^*$ \\             \bottomrule         \end{tabular}              \label{tab:SZAs}     \end{table}


title: How to properly typeset multiletter quantities, e.g. Re or Nu (Reynolds, Nusselt numbers)

text: Is there a canonical way to typeset such quantities in equations and inline math?               \documentclass{article}     \begin{document}     $Re$, $Nu$ are clearly not an option.     $\mathit{Re}$, $\mathit{Nu}$ appear ok to me.     \end{document}


title: Fontspec package makes font weird compiling with XeLaTeX

text: I'm new to LaTeX. I'm using the 'fontspec' package and compiling the document with XeLaTeX (xetex), but when I use the package:               \usepackage{fontspec}      The font is all weird, not behaving like it should. When I don't use fontspec, the font is ok, but I lose the UTF-8 encoding, which I need, like this:   * With fontspec (bad font, encoding ok):  ![enter image description here](http://i.stack.imgur.com/J74cf.png)   * Without fontspec (font ok, bad encoding):  ![enter image description here](http://i.stack.imgur.com/AtQgj.png) Any help is most welcome, thanks!


title: TikZ: Drawing a curve using controls

text: \documentclass{article}     \usepackage{tikz}     \usepackage{fp}     \usepackage{float}     \usetikzlibrary{calc, arrows}     \begin{document}     \begin{figure*}     \begin{tikzpicture}[fixed point arithmetic]     \pgfmathsetmacro{\d}{1.87529 * 4}     \pgfmathsetmacro{\Ly}{sqrt(3) * 2}     \pgfmathsetmacro{\Lx}{\d / 2}     \pgfmathsetmacro{\per}{1707 / 6378 * 4}          \coordinate (E) at (0, 0);     \coordinate (M) at (\d, 0);     \coordinate (L4) at (\Lx, \Ly);          \draw (E) -- (M);     \draw (E) -- (L4);     \draw (M) -- (L4) node[font = \scriptsize, above] {\(L_4\)};;     \draw[-latex] (E) -- (-45:2cm) node[below = .1cm, font = \scriptsize]     {\(v_r\)} coordinate (P1);     \filldraw[blue, opacity = .7] (E) circle (1cm);     \filldraw[gray, opacity = .7] (M) circle (.3cm);     \filldraw[green] (.7 * \per, 0) circle (.075cm);     \node[font = \scriptsize] at (\Lx + 2, \Ly)     {\((187529, 332900.1652, 0)\)};     \draw[dashed, thick] (E) circle (1.2cm);     \draw[dashed, thick, red] ([shift = (E)] -45:1.2cm) .. controls (3, 1)     and (-4, 5) .. (L4);          \draw let       \p0 = (E),       \p1 = (P1),       \p2 = (M),       \n1 = {atan2(\x1 - \x0, \y1 - \y0)},       \n2 = {atan2(\x2 - \x0, \y2 - \y0)},       \n3 = {2cm},       \n4 = {(\n1 + \n2) / 2}     in (E) + (\n1:\n3) arc[radius = \n3, start angle = \n1, end angle = \n2]     node[fill = white, inner sep = 0cm, font = \scriptsize] at ([shift = (E)]     \n4:\n3) {\(\nu = -\frac{\pi}{4}\)};     \end{tikzpicture}     \end{figure*}     \end{document}      I have tried constructing this curve by using `controls` in draw but it didn't quite work out. Maybe there is a better way than this but I don't know. So the flight path would start at the dotted circle and vector `v_r` and end at the location `L_4`. In the Python code, I plotted the solution longer than needed. ![enter image description here](http://i.stack.imgur.com/3owNH.png) Here is the current image but the curve I would like to add is picture below: ![enter image description here](http://i.stack.imgur.com/XDtJR.png) * * * **Edit 2:** So I have constructed a somewhat decent curve but I am hoping someone can help it look a little better still. Also, I have changed the screen shot. Why is the figure not centering and is skewed to the right?


title: Can I annotate the links in chemfig?

text: `chemfig` is really great chemical picture editor, but just one problem doesn't allow me to continue the work. In the picture below, you see the chemical picture from the book with numbered links and framed **CH_3** radicals. Is these feature available in the `chemfig` package? ![Chemical image example](http://i.stack.imgur.com/Zpl9X.jpg)


title: Biblatex: Modify maxcitenames to work in three cases

text: Classically maxcitenames in biblatex ist set to something like `\usepackage[maxcitenames=2,style=authoryear]{biblatex}` to get the following citations:   * One author name if there is only one author   * Two author names if there are two authors   * Two author names + et.al if there are more than two authors Is there a way to modify maxcitenames in a way that I get   * One author name if there is only one author   * Two author names if there are two authors   * **First author name + et.al** if there are **more than two** authors This would require to count how many authors are in an bib-entry and decide which of the three cases is applicable. I am happy to hack a bit myself if someone can give me at least a starting point. handling author lists in biblatex does not seem trivial to mee.


title: Why is `\strut` working in these scenarios?

text: `\strut` seems to be a powerful command to get the interlinear spacing correct; particularly, when working with text in `\parbox`s or `minipage`s. But it's also nice in contexts in which LaTeX is setting the text in an _unexpected_ place. Here's a MWE which illustrates two situations in which `\strut` is the quick and easy method to get the interlinear or textual alignment correct.               \documentclass{article}     \usepackage[width=7.5in]{geometry}     \usepackage{lipsum}     \pagestyle{empty}     \begin{document}          \noindent     \begin{minipage}[t]{3in}       \hspace*{\fill}Naive Approach\hspace*{\fill}            \vspace{1cm}            \noindent       \begin{tabular}{ll}         first  & short text                                                         \\         second & \parbox[t]{2.25in}{By putting a long line here I get bad spacing.} \\         third  & short text                                                         \\         fourth & spacing                                                            \\         fifth  & short text                                                         \\       \end{tabular}            \vspace{1cm}            \leavevmode\vadjust{         \noindent         \raisebox{\dimexpr0.5\totalheight\relax}[0pt][0pt]{\makebox[0pt][r]{Hello}}       }%       \lipsum[1]            \vspace{1cm}            On this side of things, the placement of \verb-Hello- just isn't easily       gotten correct whether I substitute             \vspace{0.5cm}            \centering       \verb|\dimexpr0.5\totalheight\relax|             by       \verb|\depth| or just plain \verb|0pt|.            \vspace{0.5cm}            \textbf{Note:} if I replace \verb-Hello- by \verb-Why- and then raise       the box by \verb-\depth- then things appear to be visually aligned correctly.          \end{minipage}\hspace*{\fill}%     \begin{minipage}[t]{3in}       \hspace*{\fill}Better spacing with \verb=\strut=\hspace*{\fill}            \vspace{1cm}            \noindent       \begin{tabular}{ll}         first  & short text                                                               \\         second & \parbox[t]{2.25in}{By putting a long line here I get bad spacing.\strut} \\          third  & short text                                                               \\         fourth & spacing                                                                  \\         fifth  & short text                                                               \\       \end{tabular}            \vspace{1cm}            \leavevmode\strut\vadjust{         \noindent         \raisebox{\dp\strutbox}[0pt][0pt]{\makebox[0pt][r]{Hello}}       }%       \lipsum[1]               \end{minipage}          \end{document}      ![enter image description here](http://i.stack.imgur.com/m1Jwr.png) I've seen the answers posted at What's the difference between \strut, \mathstrut and \vphantom? and Spacing between items containing a parbox. They're helpful in understanding when to use `\strut`. I've looked at how `\strut` is defined. But I'm still in the dark about how `\strut` actually accomplishes what it does. Could someone take the time to explain how it is that using `\strut` achieves the correct effect? Or point me in the right direction? **NOTE** I've also seen this explanation but other than restating the definition, I'm still unclear about why it's working in the situations I've provided above. **UPDATE** After considering the example @Werner provided using `\fbox`s to show the depth created by `\strut`, I decided I should try something similar to illustrate my situation involving `\vstrut`. Unfortunately, it wasn't as simple as just placing my example into an `\fbox`. Basically the content disappears. But I prevailed. In the following MWE I test out three different scenarios with three cases each.               \documentclass{article}          \newcommand{\aestrut}{\raisebox{0pt}[0pt][0pt]{\rule[\dimexpr-0.3\baselineskip\relax]{0.4pt}{\dimexpr\baselineskip\relax}}}     \newcommand{\visibleStrutAndBaseline}{\aestrut\rule[-0.4pt]{1cm}{0.4pt} Followed by text}     \newcommand{\aehline}{\rule[-0.4pt]{1cm}{0.4pt}}          \newcommand{\aecontent}[1]{\aehline\hspace{\dimexpr-1cm+0.25em}#1}          \setlength{\parindent}{0pt}     \pagestyle{empty}     \begin{document}            \visibleStrutAndBaseline --- using No strut       {\leavevmode\vadjust{\raisebox{0pt}[0pt][0pt]{\aecontent{Text}}}}            \vspace{0.25cm}            \visibleStrutAndBaseline --- using Strut but not raised       {\leavevmode\strut\vadjust{\raisebox{0pt}[0pt][0pt]{\aecontent{Text}}}}            \vspace{0.25cm}            \visibleStrutAndBaseline --- using Strut and raised by depth of strut       {\leavevmode\strut\vadjust{\raisebox{\dp\strutbox}[0pt][0pt]{\aecontent{Text}}}}                 %%--------------------------------------------------------------------------------            \vspace{1cm}            \visibleStrutAndBaseline --- using No strut       {\leavevmode\vadjust{\raisebox{0pt}[0pt][0pt]{\aecontent{Ziggy}}}}            \vspace{0.25cm}            \visibleStrutAndBaseline --- using Strut but not raised       {\leavevmode\strut\vadjust{\raisebox{0pt}[0pt][0pt]{\aecontent{Ziggy}}}}            \vspace{0.25cm}            \visibleStrutAndBaseline --- using Strut and raised by depth of strut       {\leavevmode\strut\vadjust{\raisebox{\dp\strutbox}[0pt][0pt]{\aecontent{Ziggy}}}}            %%--------------------------------------------------------------------------------            \vspace{1cm}            \visibleStrutAndBaseline\rule[-2ex]{2pt}{3ex} --- using No strut       {\leavevmode\vadjust{\raisebox{0pt}[0pt][0pt]{\aecontent{Deep}}}}            \vspace{0.25cm}            \visibleStrutAndBaseline\rule[-2ex]{2pt}{3ex} --- using Strut but not raised       {\leavevmode\strut\vadjust{\raisebox{0pt}[0pt][0pt]{\aecontent{Deep}}}}            \vspace{0.25cm}            \visibleStrutAndBaseline\rule[-2ex]{2pt}{3ex} --- using Strut and raised by depth of strut       {\leavevmode\strut\vadjust{\raisebox{\dp\strutbox}[0pt][0pt]{\aecontent{Deep}}}}          \end{document}      The scenarios involve the depth of the main line of text and the depth of the text in the `\vadjust`. So, in **scenario one** the depth of the `\vadjust` content is **zero**. In **scenario two** there is a nontrivial depth for this content. In the **third scenario** I've created a _deep_ depth. For each scenario there are three cases: The **case one** is to consider what happens when `\strut` is not used. **Case two** is to use `\strut` but not raise the contents of the `\vadjust`. And the **third case** illustrates raising the content by the depth of `\strut`. In all _scenarios_ and _cases_ I use a visible strut to mimic `\strut`, which I've set to zero height and depth so as not to inadvertently disturb the vertical spacing. ![enter image description here](http://i.stack.imgur.com/TKvxx.png) This example helped me see two things: **first** was where exactly `\vadjust` is placing the text: Sure enough, others have been saying it's placed between the lines. And that is certainly true. Per correction by @DavidCarlisle : it seems to be placed so that the _TOP_ of the `\vadjust`'s content is aligned with the _BOTTOM_ (not the baseline) of the box for the line from within which `\vadjust` was called. The **second** things I was able to see was that, as long as the main text does not have any boxes with _wild_ depths, then `\strut` will be sufficiently deep to affect the correct depth to get the desired alignment.


title: Ignoring first names when sorting citations with biblatex

text: I am writing a custom citation style, and am attempting to write the sorting rules. I want the names in the bibliography to be sorted by last name only, ignoring all first names and initials. However, I also want the initials to be printed in the actual bibliography list. Here is a minimal working example:               \documentclass[10pt]{article}          \usepackage[style=authoryear,backend=biber,sorting=last]{biblatex}          \DeclareNameFormat{lastname}{#1\addspace}     \DeclareNameFormat{last-init}{#1 #4\addspace}          \DeclareNameAlias{sortname}{lastname}     \DeclareNameAlias{default}{lastname}     \DeclareNameAlias{author}{last-init}          \DeclareSortingScheme{last}{       \sort{         \field{presort}       }       \sort[final]{         \field{author}       }       \sort{         \field{title}         \field{year}       }     }          \usepackage{filecontents}          \begin{filecontents}{\jobname.bib}     @book{first,       author = {John Doe and Mary Jane},       title = {Lorem Ipsum},       publisher = {Oxford University Press},       location = {Oxford},     }          @book{second,       author = {Apple Doe and Mary Sue},       title = {Another},       publisher = {Cambridge},       location = {Cambridge},       date = {1917},     }     \end{filecontents}          \addbibresource{\jobname.bib}          \begin{document}          \nocite{*}          \printbibliography          \end{document}       This prints out citations:               Doe A. Sue M. (1917). Another. Cambridge: Cambridge.     Doe J. Jane M. Lorem Ipsum. Oxford: Oxford University Press.      But this uses the first initial to disambiguate having the same first last names, rather than using the second last name. The result should be:               Doe J. Jane M. Lorem Ipsum. Oxford: Oxford University Press.     Doe A. Sue M. (1917). Another. Cambridge: Cambridge.


title: parcolumns in \autocite footnotes

text: I have a thesis chapter that has been compiling perfectly well on one machine, but when I installed and updated MacTex2013 on my new machine, it throws up all kinds of errors. I don't know where the exact problem is, but for some reason formatting inside the square brackets of \autocite commands does not seem to be working any more. Here is the example:               \begin{filecontents}{example_bibliography.bib}      @article{citethis,         Author = {Some Guy},         Date-Added = {2014-05-01 21:09:02 +0000},         Date-Modified = {2014-05-01 21:10:03 +0000},         Journal = {JOURNAL: The Journal of Journal Studies},         Number = {2},         Pages = {99--200},         Title = {Articles Have Names},         Volume = {1},         Year = {2014}}     \end{filecontents}           %!TEX TS-program = lualatex     %!TEX encoding = UTF-8 Unicode          \documentclass{article}          \usepackage [french, latin, german, american]{babel}           \usepackage[notes,backend=biber]{biblatex-chicago}          \addbibresource{example_bibliography.bib}          \usepackage{parcolumns}          \usepackage{fontspec}     \setmainfont[                  Ligatures=TeX                  ]{Brill}          \begin{document}          Here is some body text.\autocite[Here is some Lorem Ipsum text in a footnote w/o parcolumns:     \smallskip     {Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.\smallskip     But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness.}%     ][100--181]{citethis}               More body text: Here is some Lorem Ipsum text in parcolumns:     \begin{parcolumns}{2}     \colchunk[1]{%     Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.      }%     \colchunk[2]{%     No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful.     }%     \end{parcolumns}%               %Here is some body text.\autocite[Here is some Lorem Ipsum text in a footnote with parcolumns:     %\begin{parcolumns}{2}     %\colchunk[1]{%     %Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?     %}%     %\colchunk[2]{%     %Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?     %}%     %\end{parcolumns}%     %\smallskip%     %][100--181]{citethis}          \end{document}      Parcolumns alone sets correctly, as does the autocite, but when I uncomment the last one, which compiles fine on the other machine, I get all kinds of errors, as it seems to think sentences are individual cites, for example:               LaTeX Warning: Citation 'Neque porro quisquam est' on page 1 undefined on input      line 57.      and a break on:               l.57 \colchunk[2]{                     %      What am I doing wrong?


title: Creating a smaller vertical bar

text: I want a vertical bar but in mathematical mode it appears too big. I just want a small | at the same height as the letters.


title: Referencing to figure using label yields question marks

text: This is my document. I can't seem to find out why referencing to this label only yields **??** rather than a reference. Other figures are working as intended.               \documentclass{article}          \usepackage{pgfplots}     \usepackage[heightrounded]{geometry}     \usepackage[miktex]{gnuplottex}     \usepackage{lipsum}     \usepackage[pageanchor]{hyperref}     \usepackage{hypcap}          \begin{document}          \subsubsection{P-waarde bij de chi-kwadraattoets}          \textbf{\textit{Let op!}} Deze paragraaf is geen stof die je moet weten, maar alleen ter verduidelijking!          \lipsum[1]\ref{fig:CS.CFG}.          \begin{figure}[h]     \capstart     \begin{center}     \begin{tikzpicture}       \begin{axis}[%         xlabel = $\chi ^2$,         ylabel = $P\left(\chi ^2 (5) \geq \chi ^2\right)$,         samples = 200,         restrict y to domain = 0:0.5,         domain = 0.01:15]         \foreach \k in {5} {%           \addplot+[mark={}] gnuplot[raw gnuplot] {%         isint(x)=(int(x)==x);         log2 = 0.693147180559945;         cchisq(x,k)=k<=0||!isint(k)?1/0:x<0?0.0:igamma(0.5*k,0.5*x);         set xrange [ 1.00000e-10 : 15.0000 ];         set yrange [ 0.00000 : 1.10000 ];             samples=200;             plot 1-cchisq(x,\k)};     }       \end{axis}     \end{tikzpicture}     \end{center}     \caption{Kansfunctie (Chi-kwadraat CDF) om een bepaalde waarde van $\chi ^2$ te vinden}\label{fig:CS.CDF}     \end{figure}                    \end{document}


title: Subequation number not shown (empheq+amsart)

text: * * * This is a Follow-up question to Number equations within array * * * In the original post I was asking about the basics of subnumbering equations and I got satisfactory answers so I could implement the examples in my work (those examples in the answers run properly). But I continue to have a problem with the use of empheq package: I don't know why the references to the equations are well created in the pdf but the correspondent numbers do not appear near the equations. How Can I solve this problem? I Isolate the problem and show it on the Minimal Working Example (MWE) and at the output attached.               \documentclass[a4paper,12pt,reqno]{amsart}     %\usepackage{amsmath}     \usepackage{empheq} % autoload amsmath     \numberwithin{equation}{section}     \newcommand{\pderiv}[2]{\frac{\partial #1}{\partial #2}} % derivada parcial          \begin{document}     \section{Some Stuff}     %\subsection{Sub-Some Stuff}           Example working with simple numbering (\ref{A} - OK):     \begin{equation}       \left\{         \def\arraystretch{1.8}       \begin{array}{l}     \pderiv{x}{l} = (\sin\theta\cos\phi) \pderiv{r}{l}                   +(r\cos\theta\cos\phi) \pderiv{\theta}{l}                          +(-r\sin\theta\sin\phi) \pderiv{\phi}{l} \\     \pderiv{y}{l} = (\sin\theta\sin\phi) \pderiv{r}{q}                      +(r\cos\theta\sin\phi) \pderiv{\theta}{q}                          +(r\sin\theta\cos\phi) \pderiv{\phi}{q} \\     \pderiv{z}{l} = (\cos\theta) \pderiv{r}{\xi}                   +(-r\sin\theta) \pderiv{\theta}{\xi}               +(0) \pderiv{\phi}{\xi} \\      \mbox{(\textbf{some text})} .         \end{array}          \right.     \label{A}     \end{equation}          Below, some example using empheq package NOT WORKING WELL.           \begin{subequations}     \label{B}     \begin{empheq}[left={ }\empheqlbrace]{align}         \pderiv{\phi}{l}    &= 0  \label{B1}  \\         \pderiv{\phi}{q}    &= 0  \label{B2}  \\         \pderiv{\phi}{\xi}  &= 1  \label{B3}      \end{empheq}     \end{subequations}     (\textbf{references ARE OK}, \ref{B}, \ref{B1}, \ref{B2}, \ref{B3}, but numbers correspondent to each equation do not show at the right).      \end{document}      ![enter image description here](http://i.stack.imgur.com/JGXvT.png) That same example worked with subnumcases package (the references were OK and the numbers were there). And below yet a example with the same problem for empheq (\textbf{references ARE OK}, \ref{C}, \ref{C1}, \ref{C2}, \ref{C3}, but numbers correspondent to each equation do not show at the right) and in which I was not able to convert even with subnumcases package because of the splitting in multiple lines (some must be without number).               \begin{subequations}     \label{C}     \begin{empheq}[left={ }\empheqlbrace]{align}     \pderiv{x}{q}         &= \sin\theta\cos\phi\left( \frac{R_E\sin^4\theta}{1+3\cos^2\theta} \right)          + r\cos\theta\cos\phi \nonumber \\          &\left( \frac{-2R_E\sin^3\theta\cos\theta}{r(1+3\cos^2\theta)} \right)          =\frac{R_E\sin^5\theta\cos\phi}{(1+3\cos^2\theta)}          -\frac{2R_E\sin^3\theta\cos^2\theta\cos\phi}{(1+3\cos^2\theta)} - \nonumber \\          & = \frac{R_E\sin^3\theta\cos\phi}{(1+3\cos^2\theta)}          \frac{R_E\sin^3\theta\cos^2\theta\cos\phi}{(1+3\cos^2\theta)}          - \frac{2R_E\sin^3\theta\cos^2\theta\cos\phi}{(1+3\cos^2\theta)} \nonumber \\         &= \frac{R_E\sin^3\theta\cos\phi(1-3\cos^2\theta)}{(1+3\cos^2\theta)} \label{C1} \\          \pderiv{y}{q} &= \frac{R_E\sin^5\theta\sin\phi}{(1+3\cos^2\theta)}          -\frac{2R_E\sin^3\theta\cos^2\theta\sin\phi}{(1+3\cos^2\theta)} \nonumber \\          &= \frac{R_E\sin^3\theta\sin\phi(1-3\cos^2\theta)}{(1+3\cos^2\theta)} \label{C2} \\          \pderiv{z}{q} &= \frac{R_E\sin^4\theta\cos\theta}{(1+3\cos^2\theta)}          +\frac{2R_E\sin^4\theta\cos\theta}{(1+3\cos^2\theta)}          = \frac{3R_E\sin^4\theta\cos\theta}{(1+3\cos^2\theta)}  \label{C3}      \end{empheq}     \end{subequations}


title: How does the package pst-labo work to draw chemical equipment?

text: I would like to draw some chemical equipment and I found this `pst-labo` package. However, it does not work for me and I am sure I have the package installed. This should be a very simple example of its usage which does not work for me:               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage{pst-labo}          \title{Blank}     \date{April 2014}          \begin{document}          \maketitle          \section{Introduction}          \psset{unit=0.5cm}     \pstTubeEssais          \end{document}


title: How can I effect a new frame title, mid frame, based on the original one?

text: At some stage of my `frame` environment, I want to access the current value of the frame title, and then construct and effect a new frame title based on the original value. Sounds convoluted, doesn't it? I hope this will better explain what I'm trying to achieve:               \documentclass{beamer}          \begin{document}         \begin{frame}         \frametitle{Foo}                    % original title: Foo         ...         % Here, I want, for instance, to append "bar" to the 'current' frame title.         % \insertframetitle is defined here         \let\currtitle\insertframetitle     % to avoid recursion         \frametitle{\currtitle bar}         % desired new title: Foobar         \end{frame}     \end{document}      I thought `\let\currtitle\insertframetitle` would be enough to keep me out of trouble, but I get the error               Undefined control sequence. \insertframetitle      and I don't understand why... The original title should only be used to construct the new one and is not meant to be printed unchanged in the output. The reason I must solve this problem is that I want to define a new frame environment in which the original frame title (provided by the user) is processed and used to construct the _effective_ frame title, based on the contents of the frame environment.


title: Centering mutirow text in a table whose cells contain several lines of text

text: I'd appreciate advise in centering a multirow text. In the MWE below the multirow text "spring" is NOT centered over the three rows that it spans.               \documentclass[10pt,a4paper,twoside,open=right,headinclude,footinclude]{scrreprt}     \usepackage{classicthesis-ldpkg}     \usepackage{multirow}          \newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}     \newcolumntype{M}[1]{>{\centering\arraybackslash}m{#1}}          \begin{document}          \begin{table}[htbf]      \centering         \begin{tabular}{|M{20mm}|M{20mm}|M{20mm}|} \hline             Type & Specs & Uses\\ \hline             -- & Model 1 & blah blah blah blah blah blah blah blah \\ \hline             \multirow{3}*{spring} & Model 2 & blah blah blah blah blah blah blah blah \\ \cline{2-3}             & Model 3 & blah blah blah blah blah blah blah blah \\ \cline{2-3}             & Model 4 & blah blah blah blah blah blah blah blah \\ \hline         \end{tabular}     \end{table}          \end{document}       ![multirow text not centered](http://i.stack.imgur.com/oRIeJ.png) However, in the trivial case where each entry in the table contains only one line, the multirow text is correctly centered as the following MWE shows:               \documentclass[10pt,a4paper,twoside,open=right,headinclude,footinclude]{scrreprt}     \usepackage{classicthesis-ldpkg}     \usepackage{multirow}          \newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}     \newcolumntype{M}[1]{>{\centering\arraybackslash}m{#1}}          \begin{document}          \begin{table}[htbf]     \centering         \begin{tabular}{|M{20mm}|M{20mm}|M{20mm}|} \hline             Type & Specs & Uses \\ \hline             -- & Model 1 & blah \\ \hline             \multirow{3}*{spring} & Model 2 & blah \\ \cline{2-3}             & Model 3 & blah  \\ \cline{2-3}             & Model 4 & blah \\ \hline         \end{tabular}          \end{table}          \end{document}      ![multirow image centered](http://i.stack.imgur.com/gVUVF.png)


title: Monotype Garamond

text: I'm relatively new LaTeX user, and I want to use **Monotype Garamond** in LaTeX documents, at any cost. I know this is not the original version of Garamond, that the author is Jean Jannon from 1615 year, etc. For a long time I used Monotype Garamond in MS Word, and my faculty requires exclusively this font for my Ph.D. thesis, so please can anyone help me? I use **TeX Live 2013** with **WinEdt 8.0** on 64-bit machine.


title: Ring as a submolecule

text: Is there a nice way to define a ring submolecule and then reuse it in a bigger molecule (maybe something similar to “chemfig and lego-style molecule construction”? (append one ring after another) I would like to draw for example this:               \documentclass{article}     \usepackage{chemfig,xstring}          \begin{document}          \chemfig{-*6(-=-(-*6(-=-(-*6(-=-(-)=-=))=-=))=-=)}          \end{document}      but such that the ring would be defined as a submolecule (name e.g. `ring`) and then append one ring after another (`\chemfig{-!{ring}-!{ring}-!{ring}}`). Is there a way to do it? Desired result: ![\(image of desired result\)](http://i.stack.imgur.com/tSuQK.jpg)


title: size of page number in footer

text: I set the size of the text using `\fontsize`, but this seems to have no effect on the page number. I want to keep the pagestyle as `plain`. How can I make the font used to print the page number "grow" in size according to the text font size? This is a good place to ask another, more embarrassing question: What is the meaning of the arguments to `\fontsize`? I understand that they are the font size in points, but then why two arguments? I currently use it as `\fontsize{12}{12}` to select font size 12pt, but I'm unsure why the number is mentioned twice.


title: Standalone compilation of sources intended for \input{} or \include{}

text: My LaTeX workflow involves frequent recompiles (good ol' C-c C-c in AucTeX). Right now I'm working on a large document that's composed of chapters, each in an individual file. I would like to use the `\input{}` or `\include{}` mechanism to compile the final document, however that involves stripping the chapters sources from the preamble. I could create a "main" file (a chapter-main.tex for every chapter.tex) with the preamble and `\include{chapter.tex}`, but this means that as I'm editing an individual chapter, I need to switch to a different file for a recompilation, which breaks my workflow. Are there any ways to use the `\include{}` mechanism that don't get in the way of editing files individually?..


title: Removing unwanted lines and iterative plot

text: I am trying to plot a couple of streamlines over a circle, defined as `x^2 + y^2 - 4`, so the radius is 2. I am trying plot using a function, specifically using PSTricks. However, I keep getting extra lines that I do not want like so: ![enter image description here](http://i.stack.imgur.com/dPcpR.png) Using an image editing program I just filled in the lines that I am not interested in with the colour blue. The code I am using to generate the above image is:               \documentclass{article}     \usepackage{pst-func}     \begin{document}     \begin{pspicture}(-5, -5)(5, 5)         \psaxes{<->}(0, 0)(-5, -5)(5, 5)[$x$, 0][$y$, 90]         \psplotImp         [             algebraic,             linecolor       = red,             stepFactor      = 0.1         ]         (-5,-5)(5,5)         {             y - y * (y^2 + x^2 - 4)^-1 - 1.1         }     \end{pspicture}     \end{document}      I am also trying to create a plot that plots many streamlines, how would I do this? If you look at the function, `y - y * (y^2 + x^2 - 4)^-1 - 1.1`, it is only `1.1` that would need to be changed, iteratively with a common difference of 0.1, in order to get different streamlines. Any help would be so much appreciated!


title: Plotting Weierstrass function

text: I'm trying to plot Weierstrass function using only basic TikZ picture functionality (no gnuplot or whatnot). How do I use sum in a `\draw`? Do I have to make a new command? Use a loop? An alternative (ugly) solution with manual summation:               \begin{tikzpicture}[xscale=2.2,yscale=2.7]     \draw[thick, color=lightgrey,step=0.25cm,solid] (-2,-0.75) grid (2,0.75);     \draw[<->] (-2.1,0) -- (2.1,0) node[below right] {$x$};     \draw[<->] (0,-0.9) -- (0,0.9) node[left] {$y$};     \draw[color=newblue, thick, domain=-2:2,samples=500,/pgf/fpu,/pgf/fpu/output format=fixed] plot (\x, {(1/2)*sin(2*\x r) + (1/4)*sin(4*\x r) + (1/8)*sin(8*\x r) + (1/16)*sin(16*\x r) +     (1/32)*sin(32*\x r) + (1/64)*sin(64*\x r) + (1/128)*sin(128*\x r) + (1/256)*sin(256*\x r) +     (1/512)*sin(512*\x r) + (1/1024)*sin(1024*\x r) + (1/2048)*sin(2048*\x r) +     (1/4096)*sin(4096*\x r) + (1/8192)*sin(8192*\x r) + (1/16384)*sin(16384*\x r) +     (1/32768)*sin(32768*\x r) + (1/65536)*sin(65536*\x r) + (1/131072)*sin(131072*\x r) +     (1/262144)*sin(262144*\x r) + (1/524288)*sin(524288*\x r) +     (1/1048576)*sin(1048576*\x r) }) node[right, black] {};     \end{tikzpicture}


title: How can I put a coloured outline around fraction lines?

text: I use the `contour` package to put thick white outlines around labels in graphs, so they remain readable above the grid lines without taking up too much space. Unfortunately, the package is not able to draw outlines of the horizontal lines used in fractions or root symbols when the `[outline]` option is active (which is used to generate 'proper' outlines instead of multiple copies of the text). Is there a different way to generate coloured outlines of equations? Maybe something using `pgf`? This is what happens with the `contour` package: ![sqrt{\\frac{a}{b}} with red contour. The contour around the horizontal lines is missing.](http://i.stack.imgur.com/sYNUa.png) Generated with this minimal working example:               \documentclass{minimal}     \usepackage[outline]{contour}     \usepackage{amsmath}          \contourlength{.6pt}     \begin{document}     \contour{red}{$\sqrt{\dfrac{A}{B}}$}     \end{document}


title: How to configure kile in texlive 2010?

text: How to configure kile in texlive 2010?


title: Is there any way to get references to automatically update between files on one computer

text: I suspect the title doesn't really do justice to my question, so let me try to explain a bit more carefully. I have a couple of situations now where I'm working simultaneously on closely linked papers that refer to each other a lot. So, Paper 2 will have many citations like [Paper 1, Proposition 4.7]. Now, within one file, LaTeX deals brilliantly with referring to other parts of the same document in a way that is dynamic; if I move things so that Proposition 4.7 becomes Proposition 7.1, within the same document, things will change automatically. Is there any way to set things up so this will happen in Paper 2 when I move things in Paper 1?


title: XeLaTeX cannot map letters with diacritics correctly?

text: I found that XeLaTeX cannot map letters with more than two diacritics correctly. For example, `\v{\"{u}}` or `\v{ü}` cannot produce the expected ǚ correctly. I've tried many fonts, so I think it may not depend on fonts. Any tricky way to fix this? Thanks!


title: Two lines above & below arrow

text: क्रोष्टान् + स् $\xrightarrow[\stackrel{\normalsize\text{}}{\shortstack[c]{{\textcolor{blue}{\text{\scriptsize{\nameref{8.2.7}}}}}\ \textcolor{blue}{\text{\scriptsize{नकार gets लोप}}}}}]{\stackrel{\normalsize\text{}}{\shortstack[c]{{\textcolor{black}{\text{\scriptsize{\nameref{6.1.68}}}}}\ \text{\scriptsize{सकार gets लोप \&}}}}}$ ![alt text](http://i.stack.imgur.com/1D0Ih.png) I am not sure if this is the best way to work with. It worked so I adopted it. But now my document is getting really big and I am worried if it would cause any sort of problems later. Also can I create a command where I can use text to the left and right of the arrow and all four lines above & below the arrow as arguments. So far I was getting by with copy paste and changing the text as needed. Just to give an idea in my 200 page document this thing came so far around 300 times. thanks for your comments PS: The font is unicode Devanagari(Sanskrit2003)


title: Exact position of a node in a rectangle

text: > **This question led to a new package:**   >  `fancytabs` I have a node positioned in a shaded rectangle with:               \newcommand{\tabstyle}{\Large\scshape}     \newcommand{\tabheight}{4cm}     \newcommand{\tabwidth}{1cm}     \newcommand{\tabcount}{6}     \newcommand{\tableftcolor}{white}     \newcommand{\tabrightcolor}{gray!50}     \newcommand{\tabtop}{\tabheight}     \newcommand{\tabtextpos}{0.5}     \newcommand{\fancytab}[2]{%       \begin{tikzpicture}[remember picture,overlay]         \node[yshift={-\tabtop-1*mod(#2-1,\tabcount)*\tabheight},                       xshift=-0.5*\tabwidth]           at (current page.north east) {           \tikz\shade[shading=axis,bottom color=\tableftcolor,                       top color=\tabrightcolor,shading angle=-90]             (0,0) rectangle (\tabwidth,\tabheight)                node[rotate=90,pos=\tabtextpos] {\tabstyle#1};         };       \end{tikzpicture}%     }      Typically, when `\tabtextpos` has value `0.5`, the text is centered in the shape, both vertically and horizontally: ![0.50, centered](http://i.stack.imgur.com/HQp2D.png) Now if I used `0.38` to put it more to the left, I get: ![0.38, not centered](http://i.stack.imgur.com/A5AZ2.png) which is more to the left, but also down. How could I put it to the left while still keeping it centered vertically? **Edit:** This code is now part of a module called `fancytabs`, available on CTAN.


title: Program listing outputs text wider than usual

text: \documentclass[12pt]{article}     \usepackage{listings}     \lstset{basicstyle=\ttfamily}     \begin{document}          \texttt{int main(void)} is rendered tighter than in the listing.     What lstlisting option would need changing?          \begin{lstlisting}[numbers=left,language=c,showtabs=true]     int main(void)     {      printf("Hi world\n");     }     \end{lstlisting}     \end{document}


title: Arguments of tikzset inside a beamer document

text: I am trying to use `tikzset` with an argument in a `beamer` document, and I am having an error I do not understand.               \documentclass{beamer}          \usepackage{tikz}          \begin{document}          \begin{frame}{My try}      \begin{tikzpicture}         \tikzset{boite/.style={draw=#1}}         \node[boite=red] {The text} ;     \end{tikzpicture}     \end{frame}           \end{document}      The error I get with this code is               ! Illegal parameter number in definition of \test.     <to be read again>                         1     l.10     \end{tikzpicture}      Note that the exact same code in an `article` works like a charm:               \documentclass{article}          \usepackage{tikz}     \begin{document}          \begin{tikzpicture}         \tikzset{boite/.style={draw=#1}}         \node[boite=red] {The text} ;     \end{tikzpicture}     \end{document}


title: How can I define bullet style for itemize with french option babel?

text: I would like to use `itemize` environment with the bullet style before each item. I found out that the `french` option with the `babel` package seems to define the dash style for the `itemize` environment. It is not even possible to "overwrite" this definition in the preamble as it is suggested in this answer. Here is my MWE for you to play around with it:               \documentclass{article}     \usepackage[french]{babel}          \def\labelitemi{$\bullet$}          \begin{document}          \begin{itemize}     \item Blabla     \item Bloblo     \end{itemize}          \end{document}      I can think of some ways to redefine the `itemize` environment in the preamble to produce the bullet even if the `french` option is loaded but would you have any "simple" solution to fix this problem without having to redefine the `itemize` environment? Remark: I haven't tried with other options but this problem might not be limited to the `french` option.


title: How to make equations the same size

text: When I write an equation using the simple `\\[` and `\\]`, it comes out to the correct size, with the fractions bulging above and below the lines and the parentheses surrounding them. But when I use the {array} environment, the equations become squished, and all the fractions are squeezed into the line. How can I get the array environment to look the same as if I were typing an individual equation?               \[ I(a;b)=I\left(\frac{1}{a};\frac{1}{b}\right)\]      is what I want the following array to look like:               \[\begin{array}{rcl}          I\left(a;\frac{1}{a}\right) & = & I\left(\frac{1}{a};a\right) \\          I\left(a;\frac{1}{a}\right) & = & -I\left(a;\frac{1}{a}\right) \\          \hbar I\left(a;\frac{1}{a}\right) & = & 0          \end{array}\]


title: How do I make an integral symbol larger in in-line math mode?

text: I have the following formula in my LaTeX code:               $ \mu_{x_{t}} = E(x_{t}) = \int_{a}^{b} $      This gives me the follwing in my document ![enter image description here](http://i.stack.imgur.com/pK9yE.png) Now I tried to use `\bigint`, but that gives me too thick integral... what do I need to do to get the same thickness but with more height?


title: Change font of nomenclature (nomencl)

text: I am strying to change the font of my abbreviations list `\printnomenclature` (nomencl.sty) so I can have the abbreviations in bold (my main font lacks a bold version). I've tried several things, but I just can't get it to work. The font changes to default, and italics in the definitions are lost for some weird reason.               \renewcommand{\nomname}{List}     \renewcommand{\nomlabel}[1]{\textbf{#1}} %bold abbreviations     \printnomenclature     \input{ABC}      I've tried this with no luck:               \renewcommand{\nomname}{List}     \renewcommand{\nomlabel}[1]{\textbf{#1}} %bold abbreviations     {\fontfamily{Arial}\selectfont\printnomenclature}     \input{ABC}      Also this:               \renewcommand{\nomname}{List}     \renewcommand{\nomlabel}[1]{{\fontfamily{Arial Bold}\selectfont{#1}}} %bold abbreviations     \printnomenclature     \input{ABC}


title: How to change the scale between ticks

text: Is it possible to change the spacing between two ticks? 4000-3000 = 3000-2000 = 2000-1500 = 1500-1000 ![enter image description here](http://i.stack.imgur.com/uShzr.png)               \begin{tikzpicture}     \begin{groupplot}[         group style={             group name=my plots,             group size=1 by 2,             xlabels at=edge bottom,             xticklabels at=edge bottom,             vertical sep=0pt         },         width=16cm,         height=6cm,         xmin=400, xmax=4000,         x dir= reverse,         ymin=40,ymax=105,         tickpos=left,         xtick={500,1000,1500,2000,3000,4000},         enlargelimits=false,         ytick align=outside,         xtick align=outside     ]          \nextgroupplot     \addplot [smooth, black, no marks] file {data1.dat};     \nextgroupplot     \addplot [smooth, black, no marks] file {data2.dat};     \end{groupplot}     \end{tikzpicture}      Example: ![enter image description here](http://i.stack.imgur.com/uwFmm.gif) * * *               \begin{tikzpicture}     \begin{groupplot}[         group style={             group name=my plots,             group size=2 by 2,             xlabels at=edge bottom,             xticklabels at=edge bottom,             vertical sep=0pt,             horizontal sep=0pt,         },         height=5cm,         x dir= reverse,         ymin=35,ymax=105,         tickpos=left,         xtick align=outside     ]     \nextgroupplot [xmin=2000.1, xmax=4000, width=6.9cm,ytick align=outside,axis y line*=left,xtick={3000,4000}]     \addplot [smooth, black, no marks] file {data1.dat};     \nextgroupplot [ytick=\empty,xmin=400, xmax=2000.1, width=10cm,axis y line*=right, xtick={500,1000,1500,2000}]     \addplot [smooth, black, no marks] file {data1.dat};     \nextgroupplot [xmin=2000.1, xmax=4000, width=6.9cm,ytick align=outside,axis y     line*=left,xtick={3000,4000}]     \addplot [smooth, black, no marks] file {data2.dat};     \nextgroupplot [ytick=\empty,xmin=400, xmax=2000.1, width=10cm,axis y line*=right,    xtick={500,1000,1500,2000}]     \addplot [smooth, black, no marks] file {data2.dat};     \end{groupplot}     \end{tikzpicture}      Not good but it works. If there is an easier Solution tell me please.


title: Start TeXstudio portable in multiple instances

text: I use TeXstudio portable and want to use it in multiple instances when double clicking a `.tex` or `.txss` file. The necessary starting parameter is described here, but I do not know how to use it. Do you have an idea? Thanks!


title: Longtable with multicolumn and parbox spacing issues

text: I've been trying to build a "complex" table of a certain size but I still have some problems with the spacing. As you can see in the attached pictures, some lines overlap the table row dividers, other are just random (I suspect there is some conflict with the parbox function used inside the multicolumn one). Is there any way to have a more even and pleasant spacing? ![First part of the table](http://i.stack.imgur.com/UXWsL.png) ![enter image description here](http://i.stack.imgur.com/ONd8i.png)               \documentclass[]{article}     \usepackage{longtable}         \begin{document}     \begin{longtable}{| p{3.5cm} | p{2.5cm} | p{3.5cm} | p{2.5cm} |}     \caption{Use case detail}\label{chap3:tab1}\\          \multicolumn{4}{c}{}\\     \endfirsthead     \multicolumn{4}{c}{\tablename\ \thetable\ -- \textit{Continued from previous page}}\\     \multicolumn{4}{c}{}\\     \hline     \endhead     \hline \multicolumn{4}{r}{\tablename\ \thetable\ -- \textit{Continued on next page}} \\     \endfoot     \hline     \endlastfoot          \hline     % --------------------------------------------------------------------------------------------------------------     Use Case ID: & \multicolumn{3}{l|}{1}\\     % --------------------------------------------------------------------------------------------------------------     \hline     % --------------------------------------------------------------------------------------------------------------     Use Case Name: & \multicolumn{3}{l|}{FIXME - Section Name}\\     % --------------------------------------------------------------------------------------------------------------     \hline     % --------------------------------------------------------------------------------------------------------------     Created by: & & Date created: &\\     % --------------------------------------------------------------------------------------------------------------     \hline     % --------------------------------------------------------------------------------------------------------------     Actors & \multicolumn{3}{l|}{Doctor}\\     & \multicolumn{3}{l|}{Patient}\\     & \multicolumn{3}{l|}{Patients' Database}\\     % --------------------------------------------------------------------------------------------------------------     \hline     % --------------------------------------------------------------------------------------------------------------     Description: & \multicolumn{3}{l|}{\parbox{9cm}{The doctor logs into the system, creates/updates the patient medical record, prints the informed consent form and collects it after the patient has signed it.}}\\     % --------------------------------------------------------------------------------------------------------------     \hline     % --------------------------------------------------------------------------------------------------------------     Preconditions: & \multicolumn{3}{l|}{\parbox{9cm}{1. The doctor is logged into the web software.}}\\     & \multicolumn{3}{l|}{\parbox{9cm}{2. There is no record for the patient on the patients' database.}}\\     % --------------------------------------------------------------------------------------------------------------     \hline     % --------------------------------------------------------------------------------------------------------------     Postconditions: & \multicolumn{3}{l|}{ }\\     % --------------------------------------------------------------------------------------------------------------     \hline     % --------------------------------------------------------------------------------------------------------------     Trigger: & \multicolumn{3}{l|}{\parbox{9cm}{The doctor logs in the system and presses the \textit{Login} button}}\\     % --------------------------------------------------------------------------------------------------------------     \hline     % --------------------------------------------------------------------------------------------------------------     Normal flow: & \multicolumn{3}{l|}{\parbox{9cm}{1. the doctor clicks on the \textit{Patients} icon;}}\\     & \multicolumn{3}{l|}{\parbox{9cm}{2. the doctor clicks on the \textit{Add} button;}}\\     & \multicolumn{3}{l|}{\parbox{9cm}{3. the doctor prints the consent form by clicking on the dedicated button;}}\\     & \multicolumn{3}{l|}{\parbox{9cm}{4. the doctor fills in the patient's details;}}\\     & \multicolumn{3}{l|}{\parbox{9cm}{5. the doctor collects the signed patient's consent form and ticks the dedicated check box;}}\\     & \multicolumn{3}{l|}{\parbox{9cm}{6. the doctor saves the patient's record by clicking the \textit{Save} button.}}\\     & \multicolumn{3}{l|}{\parbox{9cm}{}}\\     % --------------------------------------------------------------------------------------------------------------     \hline     % --------------------------------------------------------------------------------------------------------------     Alternative flows: & \multicolumn{3}{l|}{ }\\     % --------------------------------------------------------------------------------------------------------------     \hline     % --------------------------------------------------------------------------------------------------------------     Exceptions: & \multicolumn{3}{l|}{ }\\     % --------------------------------------------------------------------------------------------------------------     \hline     % --------------------------------------------------------------------------------------------------------------     Notes and issues: & \multicolumn{3}{l|}{ }\\     % --------------------------------------------------------------------------------------------------------------     \hline     \end{longtable}     \end{document}


title: How are atlases and other large books made in LaTeX?

text: I was wondering how large books such as atlases or encyclopedias were made in LaTeX? For example, how does one setup their document or design the layout for such a big book? Is it the same process as writing a standard book or are there special things one has to look out for? I am not looking to make one myself, I was just curious.


title: Occasional overfull \vbox warnings

text: Depending on the value of `\aeheight` I may or may not get `Overfull \vbox` errors. I don't understand why.               \documentclass{article}     \usepackage[margin=0.5in,landscape]{geometry}     \usepackage{multicol}     \setlength{\columnseprule}{0.4pt}     \setlength{\columnsep}{0.25in}     \pagestyle{empty}     \newlength{\aeheight}     \setlength{\aeheight}{6in}     \setlength{\parindent}{0pt}     \usepackage{lipsum}     \begin{document}          \begin{minipage}[t][\aeheight]{10in}     \begin{multicols}{4}       \lipsum[1-2]       \rule{4pt}{\aeheight}     \end{multicols}     \end{minipage}          \end{document}      However, if I set `\aeheight` to `3in`, then I don't get such errors. Can anyone explain why different values are generating the warnings?


title: Unable to build .sty files with MikTeX

text: I need to build the .sty of different packages to be loaded in my input file (I have to do things manually). I am working on Windows and get a very strange behaviour: `latex.exe` seems to be missing the file I want to build even if I run `latex.exe` in the directory containing the `.ins` file. What's going on? EDIT: I am using Miktex               C:\Travail\Tools\localtexmf\tex\latex\tocloft>ls     README  texput.log  tocloft.dtx  tocloft.ins  tocloft.pdf  tocloft.sty          C:\Travail\Tools\localtexmf\tex\latex\tocloft>latex.exe tocloft.ins     This is pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9)     entering extended mode     ! I can't find file `tocloft.ins'.     <*> tocloft.ins      It looks like it is more or less randomely working, sometimes I can build, sometimes not...


title: Enable footnote rule only for split footnotes

text: I am using `\usepackage[norule]{footmisc}` to disable the horizontal rule separating my footnotes from the bodytext of my document. However, I would like to keep this rule in the case that the top line of the footnote text is the continuation of a footnote that started on a previous page (for example, above the footnote text on page two of the following MWE). Here's an MWE that produces a long footnote split across the first two pages:               \documentclass[12pt]{article}     \usepackage[norule]{footmisc}          %lipsum package to automatically generate placeholder text     \usepackage{lipsum}          \begin{document}         \lipsum[1]\footnote{\lipsum[2-7]}     \lipsum[2-10]     \end{document}


title: How can I make subsections lose the section number within the section and gain the section number outside it?

text: For a paper I am typesetting, the author wants subsections to be written with single numerals. So far, OK,               \renewcommand{\thesubsection}{\arabic{subsection}}      does the job. Yet frequently, he wants to cite the subsection in a later section, and wants both section and subsection numbers in references; i.e., he wants to quote Section 1.1 from Section 2. My current workaround is to give both the section and subsection numbers in the reference. MWE               \documentclass[11pt]{amsart}     \usepackage{hyperref}     \usepackage[backend=bibtex,citestyle=alphabetic]{biblatex}     \renewcommand{\thesubsection}{\arabic{subsection}}          \begin{document}     \section{A section} \label{sec:first}     \subsection{A subsection} \label{subsect:first} Something cool.     \section{New section}     Now I want to cite the coolness in Section~\ref{sec:first}.\ref{subsect:first}.     \end{document}      ![Printout demonstrating what I'm talking about](http://i.stack.imgur.com/izOgB.png) This works fine, _except_ that the `hyperref` is set up so that if you click on the first 1, you go to Section 1, not Subsection 1. Yet I would prefer that both numerals go to the same place in the `hyperref` links. > I could just wrap each such citation in `\renewcommand{\thesubsection}`'s, > but is there an easier way to add section numbers when citing subsections > from a different section? **Note:** Since I'm using `biblatex`, `titlesec` is not applicable.


title: ShareLaTeX fails to compile quotes

text: The following document is compiled incorrectly in ShareLaTeX but works perfectly in my LaTeX installation.               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage[russian]{babel}          \begin{document}     [ \textquotedbl a \textquotedbl, "b", "c" ]     \end{document}      ShareLaTeX produces "a", "b"c". Bug of ShareLaTeX?


title: Zooming in and highlighting part of picture

text: In a beamer presentation, is it possible to zoom in on an image to make it full screen and if possible to highlight (something like illuminating a part of picture by bright light while other areas of the slide fade ) the desired location on the image?


title: Drawing a Plane in 3D space

text: How can I draw a plane with equation `$- \sqrt{3} x+y=0 $` in space (with `tikz`)?


title: Scale of a {forest} tree

text: How can I change the scale of a tree made with the `forest`package? I work with beamer, and sometimes my trees are a bit too wide, so they finish after the limit of the frame :               \documentclass{beamer}     \usepackage{forest, philex}          \begin{document}          \begin{frame}{Mise en pratique}     \begin{exampleblock}{}         Comment représenter la structure suivante :     \end{exampleblock}     \lb{}{         \lba{}{J'ai [vu un âne gris dans le clocher].}         \lbb{}{[vu [un [âne [gris] ] ] [dans [le [clocher] ] ] ]}         \lbz{}{             \begin{forest} baseline, for tree={parent anchor=south, calign=first}                 [VP                     [VP                         [V\\\textit{vu}, align=center, base=top]                         [DP                             [D\\\textit{un}, align=center, base=top]                             [NP                                 [N\\\textit{âne}, align=center, base=top]                                 [AP [A\\\textit{gris}, align=center, base=top]]                             ]                         ]                     ]                     [PP                         [P\\\textit{dans}, align=center, base=top]                         [DP                             [D\\\textit{le}, align=center, base=top]                             [NP                                 [N\\\textit{clocher}, align=center, base=top]                             ]                         ]                     ]                 ]     \end{forest}}}          \end{frame}          \end{document}      With `tikz-qtree`, the option `[scale=.8]` was available, but it doesn't seem to work with `forest`. Any idea?


title: How can I draw this table

text: Is there any possibility to write "Effects on" directly above "Monitoring Pollution" Code is:               \textbf{Effects on} \newline      \begin{tabular}{c c c}     \begin{flushleft}     \textbf{Small increases in \end{flushleft}} & \textbf{Monitoring} & \textbf{Pollution} \\     \textbf{} & \textbf{($\mu)$} & \textbf{($w$)} \\     \begin{flushleft}Reward of inspector, $r$ \end{flushleft} & Ambigous & Lower \\     \begin{flushleft}Penalty on inspector for taking bribe, $p_t$ \end{flushleft} & Lower &  Ambigous \\     \begin{flushleft}Penalty on factory for givin bribe, $p_g$ \end{flushleft} & Lower & Ambigous \\     \end{tabular}      ![Table in wrong structure](http://i.stack.imgur.com/VbBzp.png)


title: Could someone explain the branching in xparse's \SplitList?

text: I was digging through `xparse.sty` to better understand how `\SplitList` works and am confused about some branching that is happening there. `\SplitList` is essentially letted to be `\\__xparse_split_list:nn` which examines the token(s) to be used in splitting.               \cs_new_protected:Npn \__xparse_split_list:nn #1#2       {         \bool_if:nTF           {               \tl_if_single_p:n {#1} &&             ! ( \token_if_cs_p:N #1 )           }           { \__xparse_split_list_single:Nn #1 {#2} }           { \__xparse_split_list_multi:nn {#1} {#2} }         }      If a single token is being used for the splitting, then `\\__xparse_split_list_single:Nn` is called. This control sequence is defined within a group where the catcaode of `@` has been changed.               \group_begin:     \char_set_catcode_active:N \@     \cs_new_protected:Npn \__xparse_split_list_single:Nn #1#2       {         \tl_set:Nn \l__xparse_split_list_tl {#2}         \group_begin:         \char_set_lccode:nn { `\@ } { `#1 }         \tl_to_lowercase:n           {              \group_end:             \tl_replace_all:Nnn \l__xparse_split_list_tl { @ } {#1}           }          \__xparse_split_list_multi:nV {#1}  \l__xparse_split_list_tl        }     \group_end:      This seems completely unnecessary to me. What exactly is this command sequence doing that couldn't just be handled by directly passing `#1` and `#2` of `\\__xparse_split_list:nn` to `\\__xparse_split_list_multi:nn`? This last macro is defined as:               \cs_set_protected:Npn \__xparse_split_list_multi:nn #1#2       {         \seq_set_split:Nnn \l__xparse_split_list_seq {#1} {#2}         \tl_clear:N \ProcessedArgument         \seq_map_inline:Nn \l__xparse_split_list_seq           { \tl_put_right:Nn \ProcessedArgument { {##1} } }       }      Here's a MWE where I was testing this out (to see whether I could figure out what I was missing). I basically skip the step of testing whether a single token has been passed and go directly to splitting the argument.               \documentclass{article}     \usepackage{xparse}          \ExplSyntaxOn     \tl_new:N \myProcessedArgument     \seq_new:N \l__my_split_list_seq     \cs_new_protected:Npn \__my_split_list:nn #1#2       {         \typeout{----------------------------------------}%%         \typeout{==>delimiter ~ is ~ "\detokenize{#1}"}         \seq_set_split:Nnn \l__my_split_list_seq {#1}{#2}         %%\seq_show:N \l__my_split_list_seq         \tl_clear:N \myProcessedArgument         \seq_map_inline:Nn \l__my_split_list_seq           {             \typeout{==>\detokenize{##1}}           }       }          \cs_new_eq:NN \mySplitList \__my_split_list:nn      \ExplSyntaxOff          \pagestyle{empty}     \begin{document}          Trial: \mySplitList{.:}{a.b.:{c}.sdf.:ewrewr}          Trial: \mySplitList{.}{a.b.:{c}.sdf.:ewrewr}          \end{document}      But this MWE seems to work fine regardless of what sort of string of tokens (single or not) I'm using to split the token list with.


title: Two lines in an equation of one line

text: What I want to do is to include two lines at the begging in an one-line equation, just like in the following picture. ![enter image description here](http://i.stack.imgur.com/H5wbq.png) Does anyone have any idea in order to achieve it? Thanks a lot.


title: Adding citations as I write and not at the end of my writing

text: I'm using LyX for writing my article. And I want to add a `bibtex` library to add references for it. I can do that and then add citations from that library without a problem. But the thing is, I'm writing the article and adding references as I write. I don't have a ready-made library of references beforehand. On every paragraph I would like to add a citation that was not there before. But as far as it works in LyX, you add the `bibtex` library to your file and then add its citations to your article. So by every new reference I want to add, I have to remove my bib library and reload it for the new citation to be added and this is a bit tiresome because I'm going to have a lot of references. So I was wondering if there's something I don't know or is there another way of doing that. Would appreciate it.


title: How does LaTeX tell me that it wants to be run a second time?

text: Sometimes, when I use the `longtable` package I get a message in the output:               Package longtable Warning: Table widths have changed. Rerun LaTeX.      I read that it can be as often as three times that XeLaTeX must be run until the message disappears. So currently my deploy script re-runs XeLaTeX until the output no longer contains the string `Rerun LaTeX`. So, is this the official way (used by all packages) to detect that a re-run is necessary or is there another way like a specific return value? I can already rule out the existence of the `.aux` file as an indicator, because that file is never deleted.


title: Control pgf/tikz semilog factor

text: I'm currently using the `semilogy` environment and wondering on how to control whether they actually take `10 log` or `20 log`.


title: Create new environment on top of another

text: I'm trying to create a new environment on top of `tcblisting` (from `tcolorbox` package) using `environ` package. Getting weird error about Runaway argument. The MWE:               \documentclass{book}     \usepackage{tcolorbox}     \usepackage{environ}          \tcbuselibrary{listings}          \NewEnviron{CodeListing}[2][]{%       \begin{tcblisting}{listing only}         \BODY       \end{tcblisting}     }          \begin{document}     \begin{CodeListing}       bool someVar;     \end{CodeListing}     \end{document}      The error is               Runaway argument?     ! File ended while scanning use of \next.     <inserted text>                      \par      <*> mwe.tex      If I remove the `tcblisting` environment in the new environment, Everything is fine. What is going wrong here ?


title: "Thank You" slide in Beamer

text: The last slide on presentation is usually, "Thank You" or "Thanks for a Patient Hearing" or something like that. Are there any showcases/ examples of nice last Beamer slides to be included in presentations?


title: How to remove Section, SubSection titles?

text: How do I remove a section/subsection title, but keep the section/subsection name in the headings and in the table of contents? For example, I type in my document somewhere,               \section{My Section}      and I get   1. "(section number) MY SECTION" in the headings,    2. "(section number) My Section.........(page number)" in the table of contents,    3. "(section number) My Section" before the first paragraph.  How do I prevent the third item from occurring? I have been searching for hours and it seems that this should have a simple one line solution, but I haven't found it. I have thought about using               \addcontentsline{toc}{subsection}{My Section}      but then I lose "(section number) MY SECTION" in the headings and I lose the (section number) in the table of contents. So an equivalent set of question, How do I add numbered sections to the toc and to the headings? Working example?               \documentclass[12pt]{book}     \usepackage{lipsum}     \begin{document}     \tableofcontents     \chapter{Chapter 1}     \section{Section 1}     \subsection{Subsection 1}     Here is lovely paragraph. And notice there is a ``subsection title'' right above me. How do I get rid of that title thingy????      \subsection{Subsection 2}     More stuff..... $$1+2+3+\cdots+\infty=-\frac{1}{12}$$     \lipsum[1-10]     \section{Section 2}     \lipsum[1-10]     \Section{Section 3}     \lipsum[1-10]     \chapter{Chapter 2}     \section{Section 1}     Again, above me a section name, how do I get rid of that guy??? \\     \lipsum[1-10]     \section{Section 2}     \lipsum[1-10]     \end{document}


title: How to draw spherical triangles?

text: Does anyone know how to draw spherical arcs and spherical triangles using LaTeX?


title: Formatting a LaTeX list as an HTML table

text:
Is it possible to add some configuration somewhere in order to have LaTeX list, such as:               \begin{customlist}      \item[keyword1] Description.      \item[keyword2] Another description.      \item[keyword3] Yet another.     \end{customlist}      formated as an HTML table by tex4ht, something like:

keyword1	Description.

keyword2	Another description.

keyword3	Yet another.

      ? Before you tell me that if I want a table I should use `tabular`, I'll say that I'm trying to adapt an old LaTeX document by modifying the `.sty` files, introducing as few changes as possible in the `.tex`. The `customlist` environment is defined as a list, introducing some kind of header, so the LaTeX output already looks a bit like a table. My main problem with `tex4t` is that the descriptions are not the argument to any command, so I don't know how to introduce the `</td></tr>`part at the end of each row. The rest would probably be something along the lines of:               \ConfigureList{customlist}{\Tg
}{\Tg
}{\Tg
\Tg}{\Tg	}      But of course, that does not create a valid table (at least not in XHTML, which is what I'd prefer). Something that formats the list as a tabular in LaTeX would be welcome too.


title: Make \vspace appear below empty \subparagraph

text: I was doing some homework in LaTeX, and I wanted to put some blank space below a subparagraph heading so that I could draw a diagram in after printing it out. For the subparagraphs where I had content before the spacing, using \vspace worked fine to insert blank space. However, when I tried putting a \vspace directly after a \subparagraph, like               \subparagraph{some homework section}     \vspace{2in}      the vertical space rendered above the subparagraph heading rather than below it. I temporarily fixed it by adding a \quad before the \vspace, but that feels hacky and I would rather know the reason it's exhibiting this behavior. This occurred with both `\vspace` and `\vspace*`


title: LaTeX equation is always on one page

text: I have a very large equation of the form                \begin{align}             I(a,b) &= \int_{[a,b]} x^d\lambda (x) \\                    &= \frac{1}{10^b a!}\int_{[a,b]} x^6\lambda (x)           \end{align}      The only difference is, my equation does not only have one line under the top equation but about 10. The thing is that my TeX program always wants that all these equations appear on one page. This is of course problematic, because the preceding page looks very stretched and almost empty cause I waste that much space. Therefore I want that it should be possible that this equation is written over two pages. How can I do this?


title: htlatex - need help converting latex to html

text: I am trying to convert a set of tex file to html. The attached code generates perfect pdf. While it gives the following error with htlatex. I have not much knowledge of tex so please help by being more verbose as possible. **error** :               l.259 --- TeX4ht warning --- \halign translated into linear text ---      ! Missing number, treated as zero.      <to be read again>                          \ar:cnt       l.259 ...rigraph.sequences}{Trigraph}{Replacement}          related files can be seen at https://github.com/ramneek-handa/draft/source Here is the minimal example:               \documentclass[ebook,10pt,oneside,openany,final]{memoir}          \usepackage[american]                {babel}        % needed for iso dates     \usepackage[iso,american]                {isodate}      % use iso format for dates     \usepackage[final]                {listings}     % code listings               \setcounter{totalnumber}{10}          % Base definitions for tables     \newenvironment{TableBase}     {      \renewcommand{\tcode}[1]{{\CodeStylex{##1}}}      \newcommand{\topline}{\hline}      \newcommand{\capsep}{\hline\hline}      \newcommand{\rowsep}{\hline}      \newcommand{\bottomline}{\hline}          %% vertical alignment      \newcommand{\rb}[1]{\raisebox{1.5ex}[0pt]{##1}}    % move argument up half a row          %% header helpers      \newcommand{\hdstyle}[1]{\textbf{##1}}             % set header style      \newcommand{\Head}[3]{\multicolumn{##1}{##2}{\hdstyle{##3}}}   % add title spanning multiple columns      \newcommand{\lhdrx}[2]{\Head{##1}{|c}{##2}}        % set header for left column spanning #1 columns      \newcommand{\chdrx}[2]{\Head{##1}{c}{##2}}         % set header for center column spanning #1 columns      \newcommand{\rhdrx}[2]{\Head{##1}{c|}{##2}}        % set header for right column spanning #1 columns      \newcommand{\ohdrx}[2]{\Head{##1}{|c|}{##2}}       % set header for only column spanning #1 columns      \newcommand{\lhdr}[1]{\lhdrx{1}{##1}}              % set header for single left column      \newcommand{\chdr}[1]{\chdrx{1}{##1}}              % set header for single center column      \newcommand{\rhdr}[1]{\rhdrx{1}{##1}}              % set header for single right column      \newcommand{\ohdr}[1]{\ohdrx{1}{##1}}      \newcommand{\br}{\hfill\break}                     % force newline within table entry          %% column styles      \newcolumntype{x}[1]{>{\raggedright\let\\=\tabularnewline}p{##1}}  % word-wrapped ragged-right                                                                         % column, width specified by #1      % \newcolumntype{m}[1]{>{\CodeStyle}l{##1}}              % variable width column, all entries in CodeStyle      \newcolumntype{m}[1]{l{##1}}                           % variable width column, all entries in CodeStyle     }     {     }          % General Usage: TITLE is the title of the table, XREF is the     % cross-reference for the table. LAYOUT is a sequence of column     % type specifiers (e.g. cp{1.0}c), without '|' for the left edge     % or right edge.          % usage: \begin{floattablebase}{TITLE}{XREF}{COLUMNS}{PLACEMENT}     % produces floating table, location determined within limits     % by LaTeX.     \newenvironment{floattablebase}[4]     {      \begin{TableBase}      \begin{table}[#4]      \caption{\label{#2}#1}      \begin{center}      \begin{tabular}{|#3|}     }     {      \bottomline      \end{tabular}      \end{center}      \end{table}      \end{TableBase}     }          % usage: \begin{floattable}{TITLE}{XREF}{COLUMNS}     % produces floating table, location determined within limits     % by LaTeX.     \newenvironment{floattable}[3]     {      \begin{floattablebase}{#1}{#2}{#3}{htbp}     }     {      \end{floattablebase}     }               \newcommand{\CodeStylex}[1]{\texttt{#1}}     \newcommand{\tcode}[1]{\CodeStylex{#1}}          \begin{document}     \begin{floattable}     {Potential \tcode{setlocale} data races}     {tab:setlocale.data.races}     {lllll}     \topline          \tcode{fprintf}     &     \tcode{isprint}     &     \tcode{iswdigit}    &     \tcode{localeconv}  &     \tcode{tolower}     \\          \end{floattable}          \end{document}


title: PGFplots xaxis to use exact values and not scale

text: I have a graph with values in xaxis as powers of 2. PGFplots automatically changes the x labels. I want it to use the exact values. What option should I use?               \documentclass{article}     \usepackage{pgfplots}     \pgfplotsset{compat=newest}     \pagestyle{empty}     \begin{document}     \pgfplotstableread     {     thread  speedup     1   1     2   3     4   5     8   7     16  7     32  7     64  8     128 9     }\datafile     \begin{tikzpicture}         \begin{axis}         [             title=test             ,xlabel=size             ,ylabel=Througput         ]         \addplot table[x=thread,y=speedup,color=red,mark=x] {\datafile};         \end{axis}     \end{tikzpicture}     \end{document}      ![output](http://i.stack.imgur.com/T8H6A.png)


title: Arbitrary positioning in math mode without size restriction

text: In the MWE below, are all general methods, of achieving arbitrarily shifting of symbols up or down or left or right in math mode, represented? If yes, that is the answer. If no, what good methods are missed? Specifically, are there any ways to get around the related problems listed below?   1. A tabular stack does the work almost everywhere there are ordered rows and columns of symbols, but a scalebox won't compile inside it.   2. A raisebox seems to work well in some cases, but it won't compile when placing math mode font size commands inside it, and in similar instances.   3. Also one cannot place a raisebox inside a raisebox: the second one causes the first one to be ignored.   4. Horizontal spacing via `\;` , `\`, ``, `\:` often leads to cluttering of some formulas. Is there any way to set the spacing between all symbols in math mode to be a definite size by default? This can be done by doing all work inside tabular stack and setting a parameter, but is there a parameter of this sort in the ordinary math environment? The formula in the MWE is for illustration:              \documentclass[12pt]{article}     \usepackage{amsfonts,mathtools,amssymb}     \usepackage{tabstackengine}     \usepackage{tikz}     \begin{document}          \[%     \setstackgap{L}{25pt}\setstacktabulargap{2pt}\TABbinary%     \underset{\raisebox{-7pt}{$\textstyle 1$}}{\underbrace{\raisebox{4pt}{\;qbqb\;}}}%     \raisebox{-9pt}{\hspace{7pt}${\tabularCenterstack{rcl}{\textstyle = \\ \textstyle +}}$\hspace{7pt}}%      \underset{\raisebox{-7pt}{$\textstyle 1$}}{\underbrace{\raisebox{4pt}{\;qqbb\;}}}%     \raisebox{-9pt}{\hspace{7pt}${\tabularCenterstack{rcl}{\textstyle = \\ \textstyle +}}$\hspace{7pt}}%     \underset{\raisebox{-7pt}{$\textstyle 1$}}{\underbrace{\raisebox{4pt}{\;qb\;}}}%     \mathrel{\raisebox{-21pt}{$\;=\;\;\;3$}}%     \]          \[%     \underset{\raisebox{-5pt}{\scalebox{0.9}{$1$}}}{\underbrace{\raisebox{4pt}{\;qbqb\;}}}%     \;\stackrel{\raisebox{2pt}{=}}{\raisebox{-19pt}{\scalebox{0.9}{\,+}}}\;%     \underset{\raisebox{-5pt}{\scalebox{0.9}{$1$}}}{\underbrace{\raisebox{4pt}{\;qqbb\;}}}%     \;\stackrel{\raisebox{2pt}{=}}{\raisebox{-19pt}{\scalebox{0.9}{\,+}}}\;%     \underset{\raisebox{-5pt}{\scalebox{0.9}{$1$}}}{\underbrace{\raisebox{4pt}{\;qb\;}}}%     \mathrel{\raisebox{-19pt}{\scalebox{0.9}{$\;=\;\;\;3$}}}%     \]                     \scalebox{1}{\begin{tikzpicture}[scale=1]%     \node at (2.75,-1.2) {$+$};%     \node at (2.75,-1.9) {$d$};%     \node at (0,0) {$%     \underset{\raisebox{-5pt}{\scalebox{0.9}{$1$}}}{\underbrace{\raisebox{4pt}{\;qbqb\;}}}%     \;\stackrel{\raisebox{2pt}{=}}{\raisebox{-19pt}{\scalebox{0.9}{\,+}}}\;%     \underset{\raisebox{-5pt}{\scalebox{0.9}{$1$}}}{\underbrace{\raisebox{4pt}{\;qqbb\;}}}%     \;\stackrel{\raisebox{2pt}{=}}{\raisebox{-19pt}{\scalebox{0.9}{\,+}}}\;%     \underset{\raisebox{-5pt}{\scalebox{0.9}{$1$}}}{\underbrace{\raisebox{4pt}{\;qb\;}}}%     \mathrel{\raisebox{-19pt}{\scalebox{0.9}{$\;+\;\;\;p$}}}%     $};\end{tikzpicture}}          \end{document}      Of course a formula can also be placed in a `standalone` document, `output`, and then included as graphics in the `tikz` environment above where other symbols are drawn over it, and so on, avoiding all issues with macros not compiling one inside the other, but that s a last resort.   5. Better: is there a way to do this in one document, say code halfway through outputs to a `pdf`. This is then is read by the compiler (it would be in the same folder as the ultimate output `pdf` and the `.tex` file) as it continues down the document code and treated as graphics by the remaining code in the compiler, which outputs a second `pdf` (the actual paper). **EDIT:** to clarify, has this been implemented anywhere / can it be done?


title: Formatting the Table of Contents (Remove "Page", add periods)

text: I would like to remove the column heading "Page" from the table of contents. I have looked around and cannot seem to find an answer (or a similar question). I would also like to add a period "." after only the sections in the table of contents. I have found and tried the following code which produces a period after every entry in the table of contents, not just the sections.               \let \savenumberline \numberline     \def \numberline#1{\savenumberline{#1.}}      Edit: Adding a MWE (hopefully). My document is actually made up of at least 10 separate latex files included by using \input and is still 11,500 lines long. I hope that I have included enough to be helpful. There are items that are commented out just so I didn't lose what "solutions" I had found so far. The foreword is commented out because it was including a list of tables, which was not desired. I also wanted to add that I noticed that my table of contents is no longer hyperlinking. I'm wondering if this is because I chose "tableofcontents" instead of using the foreword command.               \documentclass[draft,wd,letterpaper]{isov2} % needed to change ; to , in order to compile      \let\ifpdf\relax % required to get rid of fatal error          % Latex Error: /usr/local/texlive/2013/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty:3540 Package ifpdf Error: Name clash, \ifpdf is already defined.           %\usepackage[top=3cm, bottom=3cm, left=3cm, right=3cm]{geometry}                \usepackage{float}      % see http://tex.stackexchange.com/questions/46512/too-many-unprocessed-floats      \usepackage{morefloats}      % see http://www.tex.ac.uk/cgi-bin/texfaq2html?label=underscore      \usepackage{import} % file path       % see http://http://www.ctan.org/pkg/import      \usepackage{multicol}      % see http://www.ctan.org/pkg/multicol           \usepackage{tabularx}      \usepackage{longtable}           % table of contents hyperlinks      \usepackage{hyperref}      \hypersetup{     colorlinks,     citecolor=black,     filecolor=black,     linkcolor=black,     urlcolor=black      }           %\usepackage{lmodern}"      %\usepackage[T1]{fontenc}"      %\usepackage{textcomp}"      %\usepackage{underscore}"          % This bit controls how ASN1 is formatted     \usepackage{listings}     \lstdefinelanguage{ASN1} {      keywords={CHOICE, SEQUENCE, BEGIN, END, IMPLICIT, EXPLICIT, INTEGER, DEFINITIONS},      sensitive=false,      morecomment=[s]{(--}{--)},      morecomment=[l]{--}      }          \lstnewenvironment{asn1}[1][] {      \lstset{     language=ASN1,     tabsize=2,      xleftmargin=1em     captionpos=b,     frame=single,     % basicstyle=\scriptsize,     basicstyle=\footnotesize\ttfamily,     float,     #1       }     }      {}          \newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}     \newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}     \newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}          % essentially allows one to build a table within a table     % \newcommand{\specialcell}[2][c]{%     %   \begin{tabular}[#1]{@{}c@{}}#2\end{tabular}}          % allow underscores to serve as linebreaks for wrapping     \renewcommand\_{\textunderscore\allowbreak}          % defines the command \camelhyphen.  Anything in the argument can break before a capital    letter and wrap with a hyphen     \makeatletter     \def\camelhyphen{\leavevmode\begingroup     \let\ifcase\iftrue     \def\or##1{%      \catcode`##1\active\uccode`\~`##1\uppercase{%     \def~{\egroup\-\hbox\bgroup\string##1}}}%     \@Alph{}%     \@camelhyphen}     \def\@camelhyphen#1{{\hbox\bgroup#1\egroup}\endgroup}     \makeatother          \standard{ISO/IEEE 11073-10201}     \yearofedition{2013}     \languageofedition{(E)}     \setcounter{tocdepth}{3}     % ToC includes ssclauses and above               % Add a period (.) after the section numbering     \makeatletter     \def\@seccntformat#1{\csname the#1\endcsname.\quad}     \makeatother          \usepackage{etoolbox} \patchcmd{\tableofcontents}{\hfil\pagename}{}{}{}          %\usepackage[dotinlabels]{titletoc}          %\usepackage{tocloft}     %\newcommand{\cftdot}{.}     %\let \savenumberline \numberline     %\def \numberline#1{\savenumberline{#1.}}          \usepackage{lipsum}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \begin{document}          \title{Example Document}          \newpage     \tableofcontents          \clause{Hello}\lipsum         \sclause{Little}\lipsum     \clause{Second}\lipsum          \end{document}      Clarification: I did not edit my actual .tex file to create a MWE. I did not comment anything out that isn't originally commented in my actual file. The code above creates a similar looking document to what I am working with. I also realize now that I have been referring to clauses as sections, but they are actually clauses. In the TOC, I would like a period after the clause number only (i.e. not sclause or ssclauses). @Gonzalo Medina - Thank you very much! That worked beautifully! My TOC now does not show "Page" Thank you to everyone for your helpful comments.