title: exsheets and the final grade table

text: I am trying to build an exam using the excellent `exsheets` package. My problem is with the last table, the one that has the grades. Somehow, it seems that `\hline` does not provide a full table with line, existing a gap between the horizontal and vertical rules at each edge of table (see the image below).               \documentclass[10pt,a4paper]{scrartcl}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{lmodern}          \usepackage{exsheets}          \SetupExSheets{solution/print=true}          \newcommand*{\TBD}{\textcolor{red}{To be defined!}}          \begin{document}          \begin{question}{2}     \TBD     \end{question}     \begin{solution}     \TBD     \end{solution}          \begin{question}{1}     \TBD     \end{question}     \begin{solution}     \TBD     \end{solution}          \begin{question}{2}     \TBD     \end{question}     \begin{solution}     \TBD     \end{solution}          \begin{question}{3}     \TBD     \end{question}     \begin{solution}     \TBD     \end{solution}          \begin{question}{2}     \TBD     \end{question}     \begin{solution}     \TBD     \end{solution}          \begin{tabular}{|l|*{\numberofquestions}{c|}c|}     \hline     Question & \ForEachQuestion{\QuestionNumber{#1}\iflastquestion{}{&}} & Total \\     \hline     Points & \ForEachQuestion{\GetQuestionProperty{points}{#1}\iflastquestion{}{&}} & \pointssum* \\     \hline     P.\ student & \ForEachQuestion{\iflastquestion{}{&}} & \\      \hline     \end{tabular}              \end{document}      ![enter image description here](http://i.stack.imgur.com/ljnCQ.png)


title: Spurious percent symbol in bibtex url

text: Using pdflatex and bibtex, this code gives me a spurious percent symbol.               \documentclass[twocolumn]{article}     \usepackage{url}          \begin{document}     hello \cite{hello}.          \bibliographystyle{plain}     \bibliography{android}     \end{document}      bib entry:               @misc{hello,       author={{John Smith}},       title={My Title},       note={\url{http://tex.stackexchange.com/questions/4213/how-to-deal-with-bibliography-items-containing-long-urls}},     }      Rendered doc: ![enter image description here](http://i.stack.imgur.com/DsAdS.png) Note the '%' at the end of third line. How to fix it?


title: Reducing height of multicol separator line

text: I am bodging a table using `multicol` and `rule` so that I can have cells of dynamic sizes and populate it using a macro rather than manually. It mostly works, however I would like to reduce height of the line between the columns. See an example of how I am building this, and a picture of what the result of the full document looks like.               \documentclass{article}     \usepackage[a5paper,margin=15mm, top=0.8cm, bottom=0.7cm, left=1cm, right=1cm,headsep=2pt]{geometry}     \usepackage{multicol}          \newcounter{qnumber}     \setcounter{qnumber}{0}     \newcommand{\question}[1]{%     \rule{\columnwidth}{0.01pt} \newline     \stepcounter{qnumber}       Q\theqnumber. \textsf{#1}            \vspace{4.5mm}     }          \begin{document}     \pagestyle{intervention}     \thispagestyle{intervention}          \setlength{\columnseprule}{0.1pt}     \section*{Week 1}     \begin{multicols}{2}          \question{Calculate the following:         \begin{enumerate}[(a)]              \item $10 \times 0.5$             \item $10 \times 0.25$         \end{enumerate}       }          \end{multicols}     \end{document}      Produces an output like: ![enter image description here](http://i.stack.imgur.com/oLLKr.jpg) How do I reduce this height?


title: Bibtex - Make Title italic, Rest Upright

text: Is it possible to change the behaviour/settings of bibtex so that the title (of a book, article, paper, thesis, etc.) is always italic and everyhing else (e.g. author, journal, edition, etc.) is always upright?      Basically: ![enter image description here](http://i.stack.imgur.com/rV9PA.png) Minimal working example: Latex File:               \documentclass{article}     \begin{document}     I cite ~\cite{Bre89}.     \nocite{*}     \bibliography{Master}     \bibliographystyle{alpha}     \end{document}      Master.bib:               @book {Bre89,         AUTHOR = {Bressoud, David M.},          TITLE = {{Factorization and Primality Testing}},         SERIES = {Undergraduate Texts in Mathematics},      PUBLISHER = {Springer-Verlag},        ADDRESS = {New York},           YEAR = {1989},     }     @article {CEP83,         AUTHOR = {Canfield, E. R. and Erd{\H{o}}s, Paul and Pomerance, Carl},          TITLE = {On a problem of {O}ppenheim concerning ``factorisatio                   numerorum''},        JOURNAL = {J. Number Theory},       FJOURNAL = {Journal of Number Theory},         VOLUME = {17},           YEAR = {1983},         NUMBER = {1},          PAGES = {1--28},     }      My bib-file is actually much larger, so solutions that would involve me changing every single entry would not be ideal.


title: Trying to embed .avi video in beamer presentation with media9

text: I am trying to embed a video in a `beamer` presentation. I am using the `media9` package. I get the following error message:               ! You can't use `\dimexpr' in restricted horizontal mode.     <argument> \dimexpr           l.62 \end{frame}          ?       Others posts have recommended to update the packages, which I did. The versions of my softwares are the following: WinEdt v7.1; MiKTex v2.9.4533; media9 v0.43 (2014-04-07) I run `Latex -> dvi2ps -> ps2pdf` The error occurs for the following command line: `latex.exe --src --interaction=errorstopmode --synctex=-1 "test.tex"` And a minimal code is                \nonstopmode      \listfiles      \documentclass[hyperref={pdfpagelabels=false},dvips]{beamer}          \usepackage{graphicx}     \usepackage{media9}          \begin{document}          \begin{frame}       \frametitle{Title}       \framesubtitle{Sub-title}       \begin{center}         \includemedia[activate=onclick,width=0.75\textwidth]{\includegraphics{figs_defense/image_acquisition.eps}}{figs_defense/image_acquisition.swf}       \end{center}     \end{frame}          \end{document}      The `*File List*` section in the `*.log` file is:                *File List*       beamer.cls    2013/12/02 3.33 A class for typesetting presentations (rcs-revi     sion 332bfd3ce558)     beamerbasercs.sty    2013/12/25 (rcs-revision 31cc758a62ae)     beamerbasemodes.sty    2013/09/03 (rcs-revision 768f2d98ca64)     beamerbasedecode.sty    2010/05/01 (rcs-revision efa082c6111d)        ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)     beamerbaseoptions.sty    2013/03/10 (rcs-revision 47431932db0d)       keyval.sty    1999/03/16 v1.13 key=value parser (DPC)     geometry.sty    2010/09/12 v5.6 Page Geometry       ifvtex.sty    2010/03/01 v1.5 Detect VTeX and its facilities (HO)      ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional     geometry.cfg       size11.clo    2007/10/19 v1.4h Standard LaTeX file (size option)      pgfcore.sty    2010/04/11 v2.10 (rcs-revision 1.7)     graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)     graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)         trig.sty    1999/03/16 v1.09 sin cos tan (DPC)     graphics.cfg    2007/01/18 v1.5 graphics configuration of teTeX/TeXLive        dvips.def    1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)       pgfsys.sty    2010/06/30 v2.10 (rcs-revision 1.37)       pgfrcs.sty    2010/10/25 v2.10 (rcs-revision 1.24)     everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS)       pgfrcs.code.tex       pgfsys.code.tex     pgfsyssoftpath.code.tex    2008/07/18  (rcs-revision 1.7)     pgfsysprotocol.code.tex    2006/10/16  (rcs-revision 1.4)       xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)        color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive      pgfcore.code.tex      xxcolor.sty    2003/10/24 ver 0.1     atbegshi.sty    2011/10/05 v1.16 At begin shipout hook (HO)     infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)      ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)     hyperref.sty    2012/11/06 v6.83m Hypertext links for LaTeX     hobsub-hyperref.sty    2012/04/25 v1.12 Bundle oberdiek, subset hyperref (HO)     hobsub-generic.sty    2012/04/25 v1.12 Bundle oberdiek, subset generic (HO)       hobsub.sty    2012/04/25 v1.12 Construct package bundles (HO)     ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)      intcalc.sty    2007/09/27 v1.1 Expandable calculations with integers (HO)     etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)     kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO)     kvdefinekeys.sty    2011/04/07 v1.3 Define keys (HO)     pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)     pdfescape.sty    2011/11/25 v1.13 Implements pdfTeX's escape features (HO)     bigintcalc.sty    2012/04/08 v1.3 Expandable calculations on big integers (HO)       bitset.sty    2011/01/30 v1.1 Handle bit-vector datatype (HO)     uniquecounter.sty    2011/01/30 v1.2 Provide unlimited unique counter (HO)     letltxmacro.sty    2010/09/02 v1.4 Let assignment for LaTeX macros (HO)      hopatch.sty    2011/06/24 v1.1 Wrapper for package hooks (HO)     xcolor-patch.sty    2011/01/30 xcolor patch     atveryend.sty    2011/06/30 v1.8 Hooks at the very end of document (HO)     refcount.sty    2011/10/16 v3.4 Data extraction from label references (HO)      hycolor.sty    2011/01/30 v1.7 Color options for hyperref/bookmark (HO)      auxhook.sty    2011/03/04 v1.3 Hooks for auxiliary files (HO)     kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)       pd1enc.def    2012/11/06 v6.83m Hyperref: PDFDocEncoding definition (HO)     hyperref.cfg    2002/06/06 v1.2 hyperref configuration of TeXLive          url.sty    2013/09/16  ver 3.4  Verb mode for urls, etc.       hdvips.def    2012/11/06 v6.83m Hyperref driver for dvips      pdfmark.def    2012/11/06 v6.83m Hyperref definitions for pdfmark specials     rerunfilecheck.sty    2011/04/15 v1.7 Rerun checks for auxiliary files (HO)     beamerbaserequires.sty    2010/05/01  (rcs-revision efa082c6111d)     beamerbasecompatibility.sty    2012/05/01  (rcs-revision 67c48b3b652d)     beamerbasefont.sty    2013/10/18  (rcs-revision 72f39e01808a)      amssymb.sty    2013/01/14 v3.01 AMS font symbols     amsfonts.sty    2013/01/14 v3.01 Basic AMSFonts support     sansmathaccent.sty    2013/03/28     filehook.sty    2011/10/12 v0.5d Hooks for input files     beamerbasetranslator.sty    2010/06/11  (rcs-revision 85fd1cc7fc42)     translator.sty    2010/06/12 ver 1.10     translator-language-mappings.tex     beamerbasemisc.sty    2013/09/03  (rcs-revision a55719c41d85)     beamerbasetwoscreens.sty    2010/05/01  (rcs-revision efa082c6111d)     beamerbaseoverlay.sty    2013/12/25  (rcs-revision f6bd5e3805da)     beamerbasetitle.sty    2010/09/21  (rcs-revision f0446ed0b6ae)     beamerbasesection.sty    2013/06/07  (rcs-revision 60b9fe0f342f)     beamerbaseframe.sty    2013/10/02  (rcs-revision cdc8e9a3aaac)     beamerbaseverbatim.sty    2012/08/30  (rcs-revision dfdb135076b3)     beamerbaseframesize.sty    2011/09/12  (rcs-revision 70f9d8411e54)     beamerbaseframecomponents.sty    2013/10/18  (rcs-revision 5cf6c5555a45)     beamerbasecolor.sty    2010/06/06  (rcs-revision d1a9b48be06d)     beamerbasenotes.sty    2012/12/19  (rcs-revision 1686da3db3c9)     beamerbasetoc.sty    2013/05/23  (rcs-revision 0fdf5bc43be8)     beamerbasetemplates.sty    2010/05/01  (rcs-revision efa082c6111d)     beamerbaseauxtemplates.sty    2013/09/04  (rcs-revision 4ac715c499d0)     beamerbaseboxes.sty    2012/05/13  (rcs-revision 56972908a390)     beamerbaselocalstructure.sty    2013/09/04  (rcs-revision 4ac715c499d0)     enumerate.sty    1999/03/05 v3.00 enumerate extensions (DPC)     beamerbasenavigation.sty    2013/10/05  (rcs-revision 62be157fe783)     beamerbasetheorems.sty    2010/06/06  (rcs-revision 7e7cc5e53e9d)      amsmath.sty    2013/01/14 v2.14 AMS math features      amstext.sty    2000/06/29 v2.01       amsgen.sty    1999/11/30 v2.0       amsbsy.sty    1999/11/29 v1.2d       amsopn.sty    1999/12/14 v2.01 operator names       amsthm.sty    2004/08/06 v2.20     beamerbasethemes.sty    2010/05/01  (rcs-revision efa082c6111d)     beamerthemedefault.sty    2010/06/17  (rcs-revision d02a7cf4d8ae)     beamerfontthemedefault.sty    2012/12/19  (rcs-revision 1686da3db3c9)     beamercolorthemedefault.sty    2012/12/19  (rcs-revision 1686da3db3c9)     beamerinnerthemedefault.sty    2013/10/15  (rcs-revision 65cb471f9634)     beamerouterthemedefault.sty    2012/12/19  (rcs-revision 1686da3db3c9)       media9.sty    2014/03/25 v0.43 acrobat-9/X compatible media        expl3.sty    2014/01/07 v4646 L3 Experimental code bundle wrapper      l3names.sty    2014/01/04 v4640 L3 Namespace for primitives     l3bootstrap.sty    2014/01/04 v4640 L3 Experimental bootstrap code         etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)     l3basics.sty    2014/01/04 v4642 L3 Basic definitions      l3expan.sty    2014/01/04 v4642 L3 Argument expansion         l3tl.sty    2013/12/27 v4625 L3 Token lists        l3seq.sty    2013/12/14 v4623 L3 Sequences and stacks        l3int.sty    2013/08/02 v4583 L3 Integers      l3quark.sty    2013/12/14 v4623 L3 Quarks        l3prg.sty    2014/01/04 v4642 L3 Control structures      l3clist.sty    2013/07/28 v4581 L3 Comma separated lists      l3token.sty    2013/08/25 v4587 L3 Experimental token manipulation       l3prop.sty    2013/12/14 v4623 L3 Property lists        l3msg.sty    2013/07/28 v4581 L3 Messages       l3file.sty    2013/10/13 v4596 L3 File and I/O operations       l3skip.sty    2013/07/28 v4581 L3 Dimensions and skips       l3keys.sty    2013/12/08 v4614 L3 Experimental key-value interfaces         l3fp.sty    2014/01/04 v4642 L3 Floating points        l3box.sty    2013/07/28 v4581 L3 Experimental boxes     l3coffins.sty    2013/12/14 v4624 L3 Coffin code layer      l3color.sty    2012/08/29 v4156 L3 Experimental color support     l3luatex.sty    2013/07/28 v4581 L3 Experimental LuaTeX-specific functions     l3candidates.sty    2014/01/06 v4643 L3 Experimental additions to l3kernel      l3regex.sty    2013/12/14 v4623 L3 Experimental regular expressions     l3tl-build.sty    2011/12/08 v3039 L3 Experimental token list construction     l3tl-analysis.sty    2011/12/08 v3039 L3 Experimental token lists analysis        l3str.sty    2013/07/24 v4576 L3 Experimental strings       l3flag.sty    2011/12/08 v3039 L3 Experimental flags     l3str-convert.sty    2013/01/08 v4339 L3 Experimental string encoding conversio     ns     l3keys2e.sty    2013/12/31 v4634 LaTeX2e option processing using LaTeX3 keys       xparse.sty    2013/12/31 v4634 L3 Experimental document command parser     atenddvi.sty    2007/04/17 v1.1 At end DVI hook (HO)     zref-abspage.sty    2012/04/04 v2.24 Module abspage for zref (HO)     zref-base.sty    2012/04/04 v2.24 Module base for zref (HO)     zref-lastpage.sty    2012/04/04 v2.24 Module lastpage for zref (HO)         tikz.sty    2010/10/13 v2.10 (rcs-revision 1.76)          pgf.sty    2008/01/15 v2.10 (rcs-revision 1.12)     pgfcomp-version-0-65.sty    2007/07/03 v2.10 (rcs-revision 1.7)     pgfcomp-version-1-18.sty    2007/07/23 v2.10 (rcs-revision 1.1)       pgffor.sty    2010/03/23 v2.10 (rcs-revision 1.18)      pgfkeys.sty          pgfkeys.code.tex       pgffor.code.tex         tikz.code.tex      nameref.sty    2012/10/27 v2.43 Cross-referencing by name of section     gettitlestring.sty    2010/12/03 v1.4 Cleanup title references (HO)         test.out         test.out     translator-basic-dictionary-English.dict         translator-bibliography-dictionary-English.dict         translator-environment-dictionary-English.dict         translator-months-dictionary-English.dict         translator-numbers-dictionary-English.dict         translator-theorem-dictionary-English.dict         image_acquisition.eps    Graphic file (type eps)      ***********


title: ifthenelse to ignore a section

text: I am writing a textbook which has a student version and a teacher version. I did this:               \newboolean{teach}          \setboolean{teach}{true}          \newcommand{\teachr}[1]{\ifthenelse{\boolean{teach}}{\begin{teacher}{#1}\end{teacher}}{\begin{comment}#1\end{comment}}}      to make a command that would print a specific way for teacher sections but can be easily commented out for a student version. I tested the teacher environment and it works fine. But the `\teachr` command does not set as comment when               \setboolean{teach}{false}


title: geometry package - paperwidth and paperheight aren't accurate

text: recognize this simple example:               \documentclass[]{article}     \usepackage[paperwidth=612.0pt, paperheight=792.0pt]{geometry}          \begin{document}     Hello World     \end{document}      I compiled it with pdflatex. Additionally I wrote this small Java-Programm (using the iText library):               PdfReader reader = new PdfReader("example.pdf");     Rectangle psize = reader.getPageSize(1);     System.out.println(psize.getHeight());     System.out.println(psize.getWidth());      The result:               Height: 789.041     Width: 609.714      Why is the paperwidth and paperheight different to the tex?


title: What are the pros and cons of using hard wrapping, and why is it so common with LaTeX?

text: It seems that hard-wrapping - i.e. inserting a newline when the line reaches a certain threshold - is extremely common in the LaTeX source when writing technical papers, either by manually inserting it or by letting the text editor take care of it. After years of writing text in soft-wrapping environment (text is _displayed_ wrapped, but no newline is actually inserted), I find it hard to understand why hard-wrapping is so commonly used. I think understanding the reason(s) behind it will make me less resentful about using it. **What are the disadvantages and advantages of using hard-wrap vs. soft-wrap** , and **why is hard-wrap so commonly used with LaTeX?**


title: Hacking - Memorize a command before reimplement it

text: Here is a small code.               \documentclass[10pt,a4paper]{article}         \usepackage[utf8]{inputenc}         \usepackage{menukeys}          \begin{document}          \keys{Ctrl+Alt+C}     \keys{BUG}     \keys{\return}          \end{document}      Let's supposed that I know for example that `\keys{BUG}` and `\keys{\return}` don't work well. So I would like to redefine the commands `\keys` so as to use a partial home made solution during that the package will be repaired. To do that I need to keep the trace of the original `\keys` macro in a command `\@@@@keys` for example. Then I could define my macro `\keys` that will take care of the arguments `BUG` and `\return`, or just reuse the original macro `\keys`. How can I do that ?


title: How the author name could be made italic in citation using biblatex?

text: I'm using this code:               % arara: pdflatex: { shell: yes }     % arara: biber     % arara: pdflatex: { shell: yes }     % arara: pdflatex: { shell: yes }     \documentclass{article}     \usepackage{filecontents}     \begin{filecontents}{jobname.bib}     @book{ALEXANDER1977apl,         Address = {USA},         Author = {Alexander, Christopher and Ishikawa, Sara and Silverstein, Murray},         Date-Added = {2010-02-24 11:14:54 +1100},         Date-Modified = {2010-06-01 12:10:48 +1000},         Publisher = {{Oxford University Press}},         Title = {{A Pattern Language: Towns, Buildings, Construction}},         Year = {1977}}     \end{filecontents}     \usepackage[indexing=cite,style=authoryear,citestyle=authoryear,sorting=none,maxnames=1]{biblatex}     \makeatletter     \AtEveryCite{%       %\let\parentext=\parentexttrack%       \let\bibopenparen=\bibopenbracket%       \let\bibcloseparen=\bibclosebracket}     \makeatother     \addbibresource{jobname.bib}     \begin{document}     \textcite[pp 45]{ALEXANDER1977apl}     \end{document}      I wonder how I could change appearence of my citation so Author name will be italic? _Alexander_ et al. [1977, pp 45]


title: Japanese Text not writable

text: This is the code I am trying to run:               \documentclass{scrreprt}     \usepackage[utf8]{inputenc}     \usepackage[english, german]{babel}     \usepackage[T1]{fontenc}     %...     \usepackage{CJK}     \newcommand{\jap}[1]{\begin{CJK}{UTF8}{min}#1\end{CJK}}     %...     \begin{document}     %...     \jap{よろしくお願いします}     %...     \end{document}      This gives error               LaTeX Font Warning: Font shape `C70/min/m/n' undefined     (Font)              using `C70/song/m/n' instead on input line 12.          (C:\MiKTeX\tex\latex\cjk\UTF8\c70song.fd)     ! Undefined control sequence.     try@size@range ...extract@rangefontinfo font@info                                                        <-*>@nil <@nnil      l.12 \jap{よろしくお願いします}      The entire log-file is here. Strangely enough, it works when I run the code on say WriteLaTeX. I would appreciate any and all help in resolving this.


title: How to cite it properly?

text: What is the correct way to cite the following:               [2, and the references therein] [see also 13,15,33]      Should there be a comma after see also? And what is the command to produce it?


title: Label positioning in XY-matrix

text: As denoted in XY-pic's user guide, "Each label is placed perpendicular to the arrow at the point halfway between the centers of the base and target objects." In order to center the label at the middle of the arrow instead, one must insert `-` after the `^` or `_`. The difference is quite clear in the following example:               \documentclass{amsart}     \usepackage[all]{xypic}     \begin{document}     $$\xymatrix{A\times B\times C \ar[r]^f & D}$$          $$\xymatrix{A\times B\times C \ar[r]^-f & D}$$     \end{document}      In the first xy-matrix (default centering), the function label $f$ will be shoved back to the left of the arrow, completely obscured. In the second xy- matrix (alternative centering), the function label $f$ is appropriately, or more naturally, placed in the middle of the arrow. After using XY-matrix for a while, I've found that I insert the command `-` more often than I omit it. My question is the following: > Is there a way to set this alternative centering feature as the default > label position? Being rather TeX-nologically inexperienced, I couldn't find any documentation on a solution.


title: External Viewer Preview of Mac cannot find .pdf file

text: I would like to use preview from Mac to as external viewer using texmaker. However, when texmaker is running preview(.app) he seems to struggle, finally a preview popup appears: "The file “mscLiterature.pdf” couldn’t be opened because there is no such file." It appears that my .pdf doesn't exist. However, when looking for it through the Finder I see that the file has been created. These are the compile sequences I've tested:   * PDFLatex ViewPDF   * Latex dvipdfm View PDF   * Latex dvips ps2pdf View PDF The box "Don't launch a new instance..." is unticked, so is "Use a "build"..." . Who has experience using preview and texmaker and may help me with the settings? Regards, Hubert


title: get rid of numbering of figures in appendix

text: is it possible to remove numbering at figures? I am happy to have numbering in an article, but I would like to remove it from the appendix.


title: Text won't left align above list

text: I'm very new to LaTeX and have been using a template from my brother's resume to do up my own, and I have everything exactly how I want it except for the fact that I can't get the text on a line above a list to go all the way to the right. I have a suspicion that the custom list my brother defines at the beginning of the document has something to do with it but I haven't been able to figure it out. Here is the environment set-up he has:               \documentclass[margin,line]{res}               \usepackage[pdftex]{graphicx}     \newcommand{\HRule}{\rule{\linewidth}{0.2mm}}          \oddsidemargin -.5in     \evensidemargin -.5in     \textwidth=6.0in     \itemsep=0in     \parsep=0in          \newenvironment{list1}{       \begin{list}{\ding{113}}{%           \setlength{\itemsep}{0in}           \setlength{\parsep}{0in} \setlength{\parskip}{0in}           \setlength{\topsep}{0in} \setlength{\partopsep}{0in}            \setlength{\leftmargin}{0.30in}}}{\end{list}}      and here is two examples of one where I get what I want and one where I don't: What I want:               \textbf{A University} \hfill \textbf{Somewhere} \\     \textit{My position there} \hfill \textit{when 2012}      What it looks like: ![enter image description here](http://i.stack.imgur.com/Uim2z.png) What is happening that is annoying me:               \textbf{A University} \hfill \textbf{Somewhere} \\     \textit{My position there} \hfill \textit{when 2012}     \begin{list1}         \item[-] This list messes everything up.          \item[-] So unfortunate :(     \end{list1}      And it is causing this: ![enter image description here](http://i.stack.imgur.com/QECQJ.png) As you can see `when 2012` has suddenly been almost tabbed over from the right somehow. If I add a newline after `when 2012 \\\` then it will get rid of the 'tab' but put the list down an entire space so I'm hoping there is some simple fix to this.


title: PGFPlot - Missing values in table data

text: I am using PGFPlot with external table data. However, some values are missing for some plots. This causes data in column 2 does not exists error. Is there a way to solve this. The value does not exists and all data for x, ind3 should be considered as {(1,7)(3,15)}. Is there a way to overcome this problem? The following is the data file I tried to create:               x   ind2   ind3     1   5      7     2   9           3   11     15      And plot commands               \addplot[color=blue, mark=x] table[x=x, y=ind2] {performance.data};          \addplot[color=red, mark=+] table[x=x, y=ind3] {performance.data};      Thanks in advance


title: How to make the name centered with addresses on either side in res.cls

text: I am using a resume template here: http://www.rpi.edu/dept/arc/training/latex/resumes/res9b.tex cls: http://www.rpi.edu/dept/arc/training/latex/resumes/res.cls I was wondering how to make the name centered with addresses on either side but I cannot figure out how to use this cls document which seems to have a way to do it but I still cant figure it out. Any suggestions? Here is the code I found in the cls.               % prints a centered name with the address centered     % or the two address on opposite sides of the page     %     \def\@printcentername{\begingroup       % print the name centered       \leavevmode\hbox to \textwidth{\hfil\@tablebox{\namefont\@name}\hfil}\par       \@ifundefined{@addressone}{%         % do nothing       }{%         \@ifundefined{@addresstwo}{           % only one address           \leavevmode\hbox to \textwidth{\hfil\@tablebox{\@addressone}\hfil}\par         }{           % two addresses           \leavevmode\hbox to \textwidth{\@tablebox{\@addressone}\hfil                          \@tablebox{\@addresstwo}}\par         }%       }%     \endgroup}      * * * There is also this code I just found, but again how to use it is a mystery to me. I want option 1:               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     % HEADINGS:     % There are two types of headings:     % 1) one with the name centered and the address centered or     %    in the left and right side if there are two address     % 2) one where the name is in the upper left corner      %    the a line accross the paper     %    then the address all on one line in the right corner     %    the second address will be directly below the first if defined     %     \let\print@name\relax     \def\ds@centered{\ifx\print@name\relax\let\print@name\@printcentername\fi}     \def\ds@line{\ifx\print@name\relax\let\print@name\@linename\fi}


title: Multiple bibliographies (cited references + list of publications)

text: I am writing a `book` document in which I have to put a `bibliography`, containing all the references cited throughout the text, and a list of publications, that should appear after the bibliography, as an appendix. The list of publications might contain entries already appearing in the `bibliography`. The following MWE describes what I've come up with so far:               \documentclass{book}     \usepackage[english]{babel}     \usepackage[utf8]{inputenc}     \usepackage{hyperref}     \usepackage{lipsum}               \begin{document}     \tableofcontents     \cleardoublepage          \chapter{x}     \lipsum[1-4]     \section{a}     \lipsum[1-4]     \section{b}     \lipsum[1-4]     \cite{goossens}     \section{c}     \lipsum[1-4]          \chapter{y}     \lipsum[1-4]     \section{a}     \lipsum[1-4]     \section{b}     \lipsum[1-4]     \section{c}     \lipsum[1-4]               % references     \makeatletter     \phantomsection     \addcontentsline{toc}{chapter}{Bibliography}     \bibliographystyle{plain}     \bibliography{bibliotest}          \cleardoublepage          % appendices     \appendix     \addcontentsline{toc}{chapter}{List of Publications}     \renewcommand{\bibname}{List of Publications}     \begin{thebibliography}{1}          \bibitem{goossensdifferent}     Michel Goossens, Frank Mittlebach, and Alexander Samarin.     \newblock {\em The Latex Companion A}.     \newblock Addison-Wesley, Reading, Massachusetts, 1993.          \end{thebibliography}               \cleardoublepage          \chapter{another app}               \end{document}      File `bibliotest.bib` contains the following:               @book{goossens,       author = "Michel Goossens and Frank Mittlebach and Alexander Samarin",       title = "The Latex Companion A",       year = "1993",       publisher = "Addison-Wesley",       address = "Reading, Massachusetts"     }      The problems are two:   1. All links point to the correct destinations, except for the two links in the TOC pointing at both the bibliography and the list of publications.   2. Though the correct title appears in the TOC (`List of Publications`), the chapter is unnumbered. # Issues using the `multibib` package If I load `multibib`, I solve point number 1 (all links are correct), but:   1. the chapter is still unnumbered.   2. reference numbering continues after the last reference of the first bibliography. The code of the MWE looks like this now:               \usepackage{multibib}     \newcites{pub}{List of Publications}     ...     \appendix     \phantomsection     \addcontentsline{toc}{chapter}{List of Publications}     \renewcommand{\refname}{List of Publications}     \bibliographystylepub{plain}     \bibliographypub{bibliotest}     \nocitepub{*}


title: Equation numbering

text: Suppose that when we write an equation in the `align` environment and we break the equation in two lines. There is only one equation number. How can I place this number not in the last equation line, but in the middle of the two lines? I am writting a book in the `book` class.)


title: Add equation name underneath equation number

text: I am wondering if it is possible (and if so how) to add names to equations just underneath the equation number. I am just using the standard `equation` environment to display the equation centered in the middle of the page, with the equation number flushed to the right hand side. I need to put some text immediately below the equation number to serve as the equation's name. Other requirements include:   * The text should be horizontally right-aligned with the equation number and should not affect the latter's vertical alignment with the equation; i.e. the equation and equation number should still be vertically in line with each other.   * The vertical spacing between the equation number and name should be standard text spacing; i.e. if the equation is vertically tall, there should not be excess space between the equation number and name.   * The text should be able to be formatted in different font styles. Right now, I need to format it in `\sf`. Here is a MWE (without the equation name):               \documentclass{article}     \usepackage{amsmath}          \numberwithin{equation}{section}          \begin{document}          \section{First Section}     \label{sec:section1}     \begin{equation}     \label{eqn:label}         \boxed{M\approx\frac{\pi}{4}\left(\frac{2d}{\lambda_o}\right)^2\left(\mathrm{NA}\right)^2}     \end{equation}          Reference \eqref{eqn:label}.          \end{document}      Here is a snapshot example of what I'd like to achieve (taken from Saleh, 2007):   ![Equation with name under number](http://i.stack.imgur.com/HYKSW.jpg) I have tried using the `\tag` command, but realized that this not only replaces the equation number, which I do not want, but also causes the equation number counter to skip that particular equation. Ideally, the equation should still function as a regular numbered equation, that can be number-referenced (via `\eqref` or other), but with the addition of some text below the equation number. Any help will be much appreciated.


title: Beamer or MS Powerpoint/LibreOffice Impress?

text: I am preparing a seminar course and will be showing a lot of figures: photos, screen captures of journal figures, etc. Some amount of equations but probably less (by slide count) than the images. I see advantages for using Powerpoint/Impress for slides heavy in images/figures: you can often copy figures in OSX Preview and paste into Powerpoint/Impress without having to explicitly screen capture, and download figures as Powerpoint slides from online journals. With Beamer, you additionally have to convert jpegs to pngs for pdflatex) and bring in an external tool (e.g., Adobe Photoshop) for annotation. However, I'm more comfortable with Beamer because I don't have to rely on my unreliable hand-eye coordination to place and align figures, and you know which figures on the hard drive are included in the presentation because of the explicit `\includegraphics` command (as opposed to importing figures from the menu bar in Powerpoint/Presentation). Have you deliberated such a decision and what has been your experience? Can you also comment on   * how well Beamer handles images(pngs) in comparison to Powerpoint/Impress (is it inefficient)? Since the page size of Beamer pages are much smaller, does that generally make raster images less readable?   * when annotating, I often "place" the image in Adobe Photoshop, draw over it, and save as pdf. Is it better to save back to a png and let Beamer do the conversion? **Update:** Thanks for bringing to my attention that jpegs are accepted by pdflatex. So this is one less hassle, unless the picture is in gif format, but I would say those cases arise less often. A lot of the arguments "for" Beamer is the pdf format, but I often print my Powerpoint/Impress slides to pdf anyway so that's a moot point for me. I understand the tikz package is a very powerful tool that permits annotation, but for this part I think a WYSIWYG tool might be more convenient as as each figure/image is unique and a little more complicated than slide layouts. Positioning text, boxes, and arrows often have to be handled on a case-by-case basis whereas you can get a sense of general positioning for slide layouts after a few times, and the latter is therefore more amenable to solving with macros. **Edit:** I had thought the LibreOffice presentation software was called "Presentation" but it is "Impress". Sorry for the confusion.


title: pdf figure latex without pdflatex

text: I have a figure only in pdf to include in a big tex file that doesn't compile with pdflatex. Is there a way to include a pdf graphic in normal latex? Alternatively, can I convert the pdf to eps without losing quality? Thank you very much in advance!


title: Resume Enumeration across frames

text: I've tried the equivalent of the question Resuming a list when the two `enumerate` environments are on two different frames, but compiler will complain. I.e.               \begin{frame}     \frametitle{A Survey of Computer Vision}     \framesubtitle{Fundamental Tasks of Computer Vision I}          \begin{enumerate}          \item one          \end{enumerate}          \end{frame}          \begin{frame}     \frametitle{A Survey of Computer Vision}     \framesubtitle{Fundamental Tasks of Computer Vision II}          \begin{enumerate}[resume]          \item two         \end{enumerate}          \end{frame}      produced the following error:               ! TeX capacity exceeded, sorry [grouping levels=255].     \labelenumi ->{     \labelenumi }     l.255 \end{frame}     If you really absolutely need more capacity,     you can ask a wizard to enlarge me.      What is the correct way of doing so? Thanks in advance


title: How to handle too long equations?

text: I have some equations that don't fit in one line. In addition, they have different heights. I think it looks awful.               \documentclass{report}     \usepackage{amsmath}     \begin{document}     \begin{align*}     \int_{E} \operatorname{Re}  ((Q f)(x) - g(x))^2 \mu(dx) &=     \int_{E} \left( \sum_{i=1}^n \operatorname{Re}(m_i) \,1_{A_i} (x)     - \operatorname{Re}(g(x))\right)^2 \mu(dx)\\     &=     \int_{E} \left( \sum_{i=1}^n  \operatorname{Re}(m_i) \,1_{A_i}(x) \right)^2       -2 \sum_{i=1}^n  \operatorname{Re}(m_i)\,1_{A_i}(x)\, \operatorname{Re}(g(x)) \\       & \quad +  \operatorname{Re}(g(x))^2 \mu(dx)\\       &=     \int_{E}  \sum_{i=1}^n \operatorname{Re}(m_i)^2\, 1_{A_i}(x)        -2 \sum_{i=1}^n \operatorname{Re}(m_i) \,1_{A_i}(x)\, \operatorname{Re}(g(x))       \\        & \quad + \operatorname{Re}(g(x))^2 \mu(dx)\\     &=\sum_{i=1}^n  \int_{A_i}  \operatorname{Re}(m_i)^2        -2 \operatorname{Re}(m_i)\, \operatorname{Re}( g(x))\\       & \quad + \operatorname{Re}(g(x))^2 \mu(dx)\\     &= \sum_{i=1}^n \int_{A_i}     (\operatorname{Re}(g(x) - m_i )^2 \mu(dx)     \end{align*}              \end{document}      ![screenshot](http://i.stack.imgur.com/ke60b.png) Is there any chance to make it look better?


title: Customizing \maketitle output with \minipage's inside \titlehead => Alignment problems

text: I am trying to customize the title of my `scrreprt` class document. The `\titlehead` looks like this (basically, three 'columns' created with three instances of `\minipage`):                 \titlehead{              \large              \begin{minipage}[t]{0.3\textwidth}         \includegraphics[width=0.9\textwidth]{logo}         \end{minipage}     %          \begin{minipage}[t]{0.4\textwidth}         \begin{center}           Foo \\           Bar \\           Baz         \end{center}         \end{minipage}     %         \begin{minipage}[t]{0.2\textwidth}         \begin{flushright}         Fubar         \end{flushright}         \end{minipage}       }      I have two problems:   1. I want the top of the logo, to align with the top of the text in the other two minipages. I used the `[t]` option of `\minipage` to achieve this. But while the two textual minipages line up properly, the image doesn't. It gets rendered much higher than the text. I assume this is because `\includegraphics` is _not_ text and so, the `[t]` option is meaningless for the first minipage. So what should I be doing to set this right?   2. I expected the total widths of the minipages to add up to `\textwidth`. But if I set the third minipage to `0.3\textwidth` (so that the total width adds up to whole), PDFLaTeX decides to push my third minipage down because apparently the three of them side-by-side are too wide. Is there some way I can cleanly fix this? e.g. like, making the third `\minipage` _fill_ the available horizontal space? If so, how?


title: What's the difference between the environments quote and quotation?

text: On meta, I've found the disscussion {quotation} and {quote}, but it doesn't answer my question. When should I use the environment `quote`? When `quotation`?


title: How to avoid text overflowing below bottom margin?

text: My document contains a title page followed by some text. In order to create my title page, I have to change the page margins on the title page using `\newgeometry`, and after the title page I return to the usual default margins using `\restoregeometry`. It includes graphics, uses Tikz, and uses a new environment called `changemargin` whose code is placed at the beginning of the code before `\begin{document}`. MWE:               \documentclass[10pt, a4paper, titlepage, draft]{article}     % USING DRAFT BECAUSE WE DO NOT HAVE THE PDFs TO BE INCLUDED     \usepackage{geometry}     \usepackage{tikz}     \usepackage{graphicx}          \usetikzlibrary{calc}% ADDED !!!!!          \newenvironment{changemargin}[2]{%     \begin{list}{}{%     \setlength{\leftmargin}{#1}%     \setlength{\rightmargin}{#2}%     }%     \item[]}     {\end{list}}          \begin{document}          \begin{titlepage}          \newgeometry{left=6.75cm, right=1.25cm, top=1.25cm, bottom=1.25cm}          \mbox{}\hfill     \begin{minipage}[c]{8cm}      \flushright \textbf{University of ...}     \end{minipage}%     \hspace{0.5cm} % your specified distance     \begin{minipage}[c]{2.5cm}     \flushright \includegraphics[width=2.50cm]{logo.pdf}     \end{minipage}%          \begin{tikzpicture}[overlay, remember picture]          \useasboundingbox [fill=blue!20] ($ (current page.south west) + (1, 1)  $) rectangle ($ (current page.north west) + (6.75, -1) $) ;     \draw [line width=0.01mm, blue] ($ (current page.north west) + (1, -1)  $) rectangle ($ (current page.south east) + (-1, 1) $) ;      \draw ($ (current page.north west) + (9.625, -4.00)  $) -- ($ (current page.north east) + (-1.25, -4.00)  $) ;     \draw ($ (current page.south west) + (9.625, 4.00)  $) -- ($ (current page.south east) + (-1.25, 4.00)  $) ;          \node[anchor=south west, %anchor is upper left corner of the graphic     xshift=1.125cm, %shifting around     yshift=1.125cm]       at (current page.south west) %left upper corner of the page     {\includegraphics[width=5.25cm]{logo2.pdf}};           \end{tikzpicture}          \begin{changemargin}{0cm}{-0.25cm}          \centering          \vspace*{\baselineskip}     \vspace*{\baselineskip}          \rule{127mm}{1.6pt}\vspace*{-\baselineskip}\vspace*{2pt}         \rule{127mm}{0.4pt}\\[\baselineskip]     \vspace*{\baselineskip}     {\large \textbf{Title}}\\[\baselineskip]     { Subtitle}\\[0.2\baselineskip]     \rule{127mm}{0.4pt}\vspace*{-\baselineskip}\vspace{3.2pt}     \rule{127mm}{1.6pt}\\[\baselineskip]     \vspace*{\baselineskip}          \end{changemargin}          \mbox{} \vfill \hfill     \begin{minipage}[c]{8cm}     \flushright \textbf{Faculty of Science}     \end{minipage}%     \hspace{0.5cm} % your specified distance     \begin{minipage}[c]{2.5cm}     \flushright \includegraphics[width=2.50cm]{logo3.pdf}     \end{minipage}%          \restoregeometry          \end{titlepage}          \newpage          article text          \end{document}      However, the text on the first page overflows into the bottom margin of the document. This does not happen for all the other pages, only the first one. What have I done wrong? (I know my question is similar to this one: Margin overflow when setting the geometry \AtBeginDocument but the answer given there doesn't solve my problem.)


title: Accessing values from tables via "grid search"

text: I am trying to achieve the following: I want to access a number from a table in the main text and make some calculations with it. For example, if there is a value `1.85` in the table I want to store it under a variable name and be able to call it in the main text which then generates `1.85`. The MWE below shows some code kindly provided by egreg that stores a value from a table under a command name. This works quite well if I "hard code" the label manually into the table. The problem is that tables are automatically generated so I can't write `\setvalue{\ValueA}{20}` in the table because it would disappear the next time the table is generated. The layout of the table hardly ever changes, only the numbers change. So what I would need is some "grid search" that takes the value from a cell that I have manually specified and wraps it automatically into egregs code, e.g. `The value is \setvalue\ValueC{mytable.tex}{2}{7}` would access column 2, row 7 of mytable. Is something like that possible, or are there better solutions? Another issue is that I can't access values before the table has been included (see the first commented line). I guess one possible solution would be to put all tables into an insivible box at the beginning of the document, but maybe there a better ways. The MWE below shows how tables generated by Stata's `estout` typically look like. `mytable.tex` only contains the bare content of the table which is then wrapped into the table environment by the `\estauto` command.               \documentclass{scrartcl}          \usepackage{booktabs,filecontents,lmodern,calculator,siunitx}          \sisetup{round-mode=places,round-precision=2}          \makeatletter     \newcommand{\setvalue}[2]{%       \@ifdefinable{#1}{\gdef#1{#2}}#2     }     \makeatother          \DeclareRobustCommand{\estauto}[3]{%      \vspace{.75ex}{%      \begin{tabular}{l*{#2}{#3}}%      \toprule%      #1%      \bottomrule%      \addlinespace[.75ex]%      \end{tabular}%      }     }          \begin{filecontents}{mytable.tex}                               & \multicolumn{1}{c}{(1)}   & \multicolumn{1}{c}{(2)}   & \multicolumn{1}{c}{(3)}   \\     \midrule     \emph{First Control Set}  &                           &                           &                           \\     Variable 1                & \setvalue{\ValueA}{1.85}  & \setvalue{\ValueB}{0.92}  & 1.11                      \\                               & (0.34)                    & (0.24)                    & (0.14)                    \\     Variable 2                & 0.07                      & 0.07                      & 0.07                      \\                               & (0.01)                    & (0.02)                    & (0.01)                    \\     Variable 3                & -0.02                     & -0.01                     & -0.01                     \\                               & (0.01)                    & (0.00)                    & (0.00)                    \\     \end{filecontents}          \begin{document}     % This does not work because it calls the value before the table is included (\ValueA).          \begin{table}\centering\footnotesize         \caption{Consumer Credit Portfolios for Borrowers}         \label{tab:portfolio}         \estauto{\input{mytable.tex}}{3}{c}     \end{table}          This does work and the value is of Variable 1 in (1) is \ValueA{} and in     (2) \ValueB{}. %The spacing is not correct after the values are called.          Let's try some maths: The difference of (1) and (2) of Variable 1 is     \SUBTRACT{\ValueA}{\ValueB}\DiffAB \num{\DiffAB}     % package calculator also has a round option, but I don't really understand the syntax          \end{document}      ![enter image description here](http://i.stack.imgur.com/ercnD.png)


title: Gratuitous vertical space with nested list environments given a certain line length

text: In the following MWE the simple addition of ":" causes some extra vertical spacing to appear before the nested `enumerate` environment, despite the fact that adding ":" does not cause the text to split across another line. Any idea what's going on?               \documentclass{beamer}     \usetheme{CambridgeUS}          \begin{document}          \begin{frame}{Test}          \begin{itemize}         \item{Actional verbs appeared in full \emph{be}-passive, full \emph{get}-passive, and active             \begin{enumerate}[(1)]                 \item{\ldots}             \end{enumerate}         }         \item{Actional verbs appeared in full \emph{be}-passive, full \emph{get}-passive, and active:             \begin{enumerate}[(1)]                 \item{\ldots}             \end{enumerate}         }     \end{itemize}          \end{frame}          \end{document}      ![enter image description here](http://i.stack.imgur.com/lWtAD.png) The question here is _why_ this is happening. That is, I'm happy to just leave out the ":" for the `beamer` presentation that I'm putting together, so I'm not particularly interested in a 'solution' to the 'problem'. I'm just curious why this is happening and whether this is by design in `beamer`. (Note: the effect is dependent on use of this particular theme. ~~Although, if this is underlyingly an issue with`beamer` one could presumably construct analogous cases for other themes.~~ Although, if this is underlyingly an issue with (La)TeX (see update), one could presumably construct analogous cases in other `beamer` themes _and_ other document classes that exhibit this behavior. (Although, see update 2.)) * * * **Update** : As per some of the comments and @Thruston's answer, I thought I would update the question. ~~First, I've removed the`beamer` tag, as this does not seem to be about `beamer`. Given @KevinC's comment, the hunch is that this is related to glue in (La)TeX.~~ (See below.) Second, I wanted to point out that this behavior persists even if one puts everything on one line _without_ any space after ":", so it's still a mystery (at least to me, given my naive understanding of how things are set in horizontal mode), _why_ there would be white space after the ":" that gets pushed to the next line. Does anyone have an explanation?               \documentclass{beamer}     \usetheme{CambridgeUS}          \begin{document}          \begin{frame}{Test}          \begin{itemize}         \item{Actional verbs appeared in full \emph{be}-passive, full \emph{get}-passive, and active:\begin{enumerate}[(1)]\item{\ldots}\end{enumerate}}     \end{itemize}          \end{frame}          \end{document}      * * * **Update 2** : I've added the `beamer` tag again, as @Thruston seems to think it has to do with how the `beamer` macros process space.


title: Can't include a 'tabu' inside \newenvironment with cells in the postamble

text: I'm trying to include a `tabu` inside a new definition of an environment but it fails if the postamble (`enddef`) of the new environment includes tabu's contents, so cells. With `tabular` or `tabular*` works. The error is:               ! Missing number, treated as zero. \tabu@0.H5      The MWE:               \documentclass{article}     \usepackage{tabu}     \newenvironment{testt}     {\begin{tabu} to \textwidth{cccc}      11 & 12 & 13 & 14 \\      21 & 22 & 23 & 24 \\}     {      41 & 42 & 43 & 44     \end{tabu}     }          \begin{document}          \begin{testt}      31 & 32 & 33 & 34 \\     \end{testt}     \end{document}      How to solve this?


title: LaTeX Hyphenation

text: Could you please guide me to load the Oxford Dictionary in LaTeX? I am using MikTeX 2.5 with `\usepackage[english]{babel}`. Yes, I need to load the Oxford Dictionary hyphenation patterns in LaTeX.


title: How to make ACM style pdfs searchable?

text: When I create pdfs using the ACM template, searching for and copying umlauts doesn't work. Using `cmap` gives an error "fontenc already loaded". How can this be fixed? **MWE:**               \documentclass{acm_proc_article-sp}          \usepackage{cmap}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}          \begin{document}          \title{A Sample {\ttlit ACM} SIG Proceedings Paper in LaTeX}          \numberofauthors{1}      \author{     \alignauthor     Ben Trovato\titlenote{Dr.~Trovato insisted his name be first.}\\            \affaddr{Institute for Clarity in Documentation}\\            \affaddr{1932 Wallamaloo Lane}\\            \affaddr{Wallamaloo, New Zealand}\\            \email{trovato@corporation.com}     }     \date{30 July 1999}          \maketitle     \begin{abstract}     This paper provides a sample of a \LaTeX\ document which conforms to     the formatting guidelines for ACM SIG Proceedings.     \end{abstract}          \section{Introduction}          Äöüß fiffy.          The \textit{proceedings} are the records of a conference.     ACM seeks to give these conference by-products a uniform,     high-quality appearance.     \end{document}


title: How to draw the "logo" of the string theory?

text: I wonder whether it is possible to draw the "logo" of string theory with LaTeX. I think it is doable, but not sure how to do it. Any guru wants to give it a shot? ![3-D projection of a Calbi-Yau manifold](http://i.stack.imgur.com/3WrTA.jpg) Source: https://commons.wikimedia.org/wiki/File:Calabi-Yau-alternate.png and (in better quality) https://commons.wikimedia.org/wiki/File:Calabi-Yau.png (both own work by Lunch; CC BY-SA 2.5)


title: Adjoint functors with tikz-cd

text: I'd like to construct diagrams such as ![enter image description here](http://i.stack.imgur.com/xOx2e.jpg), preferably with `tikz-cd`, but I've no idea where to start. Please help :) EDIT: This is what I have so far.               \begin{tikzcd}     \mathbf{C} \arrow[bend left=35]{r}[name=F]{F} & \mathbf{D}\arrow[bend left=35]{l}[name=U]{U}     \arrow[to path=(F) -- (U)]{d}{\vdash}     \end{tikzcd}      I've tried a few variations but I can't figure out how to get `\vdash` (or `\bot` , whichever).


title: MakeIndex and \alph

text: Whilst reading the manual for MakeIndex I stumbled upon: > _MakeIndex_ assumes that all page numbers are either arabic or lower-case > roman numerals; it assumes that pages numbered with roman numerals precede > those numbered with arabic numerals. and wondered... how can I lift this restriction? Specifically: how can I tell MakeIndex to _not_ verify the page numbering format? For instance, if I have an index entry on an `\alph` page. I'm open to suggestions regarding alternative indexing preprocessors, but they should work with `hyperref` (ruling out `xindy` if memory serves).


title: Is \toks necessary to define \g@addto@macro? Can token registers be avoided in generel?

text: In LaTeX2e kernel, there is a useful macro `\g@addto@macro`:               \long\def\g@addto@macro#1#2{%       \begingroup         \toks@\expandafter{#1#2}%         \xdef#1{\the\toks@}%       \endgroup}      However, I think the definition is rather complex. Why it is not defined as this?               \def\g@addto@macro#1#2{%       \expandafter\gdef\expandafter#1\expandafter{#1#2}} % or \xdef?      I cannot see any differences between the two implementation except that `\par` is allowed in the former one. And we know that `etoolbox` package and LaTeX3 use another approach with help of eTeX:               % etoolbox     \newcommand{\expandonce}[1]{%       \unexpanded\expandafter{#1}}     \newrobustcmd{\appto}[2]{%       \ifundef{#1}         {\edef#1{\unexpanded{#2}}}         {\edef#1{\expandonce#1\unexpanded{#2}}}}          % LaTeX3     \cs_new:Npn \exp_not:o #1 { \etex_unexpanded:D \exp_after:wN {#1} }     \cs_new_protected:Npn \tl_put_right:Nn #1#2       { \cs_set_nopar:Npx #1 { \exp_not:o #1 \exp_not:n {#2} } }      It seems that `\toks` is not that useful: I cannot find any use of `\tex_toks:D`, say `\toks` in `source3` at all. So, do we really need `\toks` registers? * * * NOTE: I'm not asking a question about LaTeX (2e/3) kernel, `\g@addto@macro` is just an example. This is more a comparison between macro and token registers in TeX.


title: How to import SVG or EPS files with LaTeX legends on Inkscape?

text: I usually plot my functions using Matlab or Python (matplotlib) and set labels with LaTeX. Occasionally, the plots have some rendering problem and I edit their SVG or EPS files using Inkscape. The problem is that Inkscape imports the LaTeX symbols using some other fonts and I missed the original text. Is there a way to import LaTeX correctly? I'm looking something like this post.


title: Spacing in multiple choice question

text: I tried to make multiple choice question using the following code... but the choices are not uniformly distributed in a single line... I used `\hfill` by replacing `\penalty -50\hskip 2em plus 2em\relax`... it works well when the choices occupies in single line, but when choice takes second line, the result is bad... I want to have two choices for each line when choices takes more than one lines...               \documentclass[12pt]{article}          \newcounter{choice}     %\renewcommand\thechoice{\Alph{choice}}     \renewcommand\thechoice{\alph{choice}}     \newcommand\choicelabel{\thechoice.}          \newenvironment{choices}%     {\list{\choicelabel}%     {\usecounter{choice}\def\makelabel##1{\hss\llap{##1}}%     \settowidth{\leftmargin}{W.\hskip\labelsep\hskip 2.5em}%     \def\choice{%     \item} % choice     \labelwidth\leftmargin\advance\labelwidth -\labelsep     \topsep=0pt     \partopsep=0pt}%     }%     {\endlist}          \newenvironment{oneparchoices}%     {%     \setcounter{choice}{0}%     \def\choice{%     \refstepcounter{choice}%     \ifnum\value{choice}>1\relax     \penalty -50\hskip 2em plus 2em\relax     \fi     \choicelabel     \nobreak\enskip     }% choice     % If we're continuing the paragraph containing the question,     % then leave a bit of space before the first choice:     \ifvmode\else\enskip\fi     \ignorespaces     }%     {}          \begin{document}          \begin{enumerate}          \item One of these things is not like the others; one of these things is not the same.  Which one doesn't belong?          \begin{oneparchoices}     \choice George     \choice Paul     \choice John     \choice Ringo     \choice Socrates     \end{oneparchoices}               \item Which one doesn't belong?          \begin{oneparchoices}     \choice George     \choice Paul     \choice John     \choice Ringo     \choice Socrates     \end{oneparchoices}               \item One of these things is not like the others; one of these things is not the same.  Which one doesn't belong?       \begin{choices}         \choice George         \choice Paul         \choice John         \choice Ringo         \choice Socrates       \end{choices}          \item What was the color of George Washinton's white horse?       \begin{choices}         \choice Green         \choice Yellow         \choice White       \end{choices}          \item One of these things is not like the others; one of these things       is not the same.  Which one doesn't belong?       \begin{oneparchoices}         \choice George         \choice Paul         \choice John         \choice Ringo         \choice Socrates       \end{oneparchoices}          \item What was the color of George Washinton's white horse?       \begin{oneparchoices}         \choice Green         \choice Yellow         \choice White       \end{oneparchoices}               \item What was the color of George Washinton's white horse?            \begin{oneparchoices}         \choice Green         \choice Yellow         \choice White       \end{oneparchoices}     \end{enumerate}          \end{document}


title: Why am I getting overfull with this parcolumns lstlisting?

text: I'm sure this is a simple question but would anybody be able to point out to me why the following generates overfull `\hbox` errors for the two `\colchunk` macros? It doesn't appear LaTeX needs to do any line breaking at all.               \documentclass[a4paper,10pt]{report}          \usepackage[utf8]{inputenc}     \usepackage{fullpage}     \usepackage{listings}     \usepackage{parcolumns}     \begin{document}          \begin{parcolumns}{2}      \colchunk{       \noindent\begin{minipage}{.45\textwidth}       \begin{lstlisting}[language={[x86masm]Assembler}]     movzx ebx, cx     push ebx     call someFunc       \end{lstlisting}       \end{minipage}      }           \colchunk{       \noindent\begin{minipage}{.45\textwidth}       \begin{lstlisting}[language={[x86masm]Assembler}]     mov ecx, edx       \end{lstlisting}       \end{minipage}      }           \colplacechunks     \end{parcolumns}          \end{document}


title: How to skip parskip linespread for all chapter definitions?

text: I'm trying to skip my `parskip` and `linespread` settings for all of my `\chapter` definitions. Here's my complete example:               \documentclass[12pt,a4paper,oneside,]{scrreprt}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \inputencoding{utf8}     \usepackage{helvet}     \usepackage{mathpazo}          \usepackage[parfill]{parskip}     \linespread{1.5}          \begin{document}          Some text.          \chapter{Der positive Wandel – von den Neunzigern bis Heute}     \label{derpositivewandelvondenneunzigernbisheute}          The next paragraph starts.          \end{document}      … and the compiled output: ![example](http://cl.ly/SbXl/example.jpg) … what I want is a spacing like this: ![ideal](http://cl.ly/SbEW/example-ideal.jpg) ## Here's a list of my failed attempts What all of these have in common is that they are not the solution or that I applied them completely in the wrong way. I tried to rewrite the chapter via `\renewcommand` but failed… obviously something went wrong. Inspired by this I also tried `\newcommand\chapter[1]{\par#1\par\vspace{-\parskip}}` which was as faulty as the one above. My next try was this:               \newcommand\std@startsection{}     \let\std@startsection\@startsection     \def\@startsection{\renewcommand*\baselinestretch{1}\std@startsection}      Again, it didn't work. Just like this didn't work:               \makeatletter     \patchcmd{\@chapter}       {\chapter{lof}}       {\chapter{loa}{\protect\addvspace{10pt}}\chapter{lof}}       {}{}     \makeatother      Or this:               \renewcommand\chapter     {\vspace{1.725\baselineskip plus 3\baselineskip minus .192\baselineskip }}


title: Undesired \parindent in front of first label when using asparaenum environment

text: When using the `asparaenum` environment from `paralist`, sometimes the `\parindent` in front of the first item is undesirable. For example, if one uses the `asparaenum` environment directly after starting the `proof` environment, then this results in an additional `\parindent` between ‘Proof.’ and the label of the first item. How can I set up an **environment** that behaves like `paralist`, but that does not introduce this first `\parindent`? Specifically, I hope for a solution based on `paralist` or `enumitem` that does not break the optional argument for `\item`. I attached a small example to illustrate what happens and what output I want. Note that while I can manually modify an instance of the `asparaenum` environment to get the desired output (third part of the example), I don't know how to do this automatically with a new list environment.               \documentclass{amsart}     \usepackage{paralist}     \usepackage{enumitem}          \begin{document}     What \verb!asparaenum! does:     \begin{proof}     \begin{asparaenum}     \item One.     \item Two.\qedhere     \end{asparaenum}     \end{proof}          What \verb!enumitem! does:     \begin{proof}     \begin{enumerate}[wide]     \item One.     \item Two.\qedhere     \end{enumerate}     \end{proof}          What I want:     \begin{proof}     \begin{asparaenum}     \newlength\saveitemindent     \saveitemindent=\itemindent     \advance\itemindent-\parindent     \item\itemindent=\saveitemindent One.     \item Two.\qedhere     \end{asparaenum}     \end{proof}     \end{document}


title: Preventing newline from left column from forcing a newline in the right column

text: I'm writing a CV in LaTeX, and got started with the sample called Writing a CV in LaTeX. I'm trying to modify it so that a newline in the left column does not force a newline in the right column. Here's what I've got so far: preamble:               \definecolor{lightgray}{gray}{0.8}     \newcolumntype{L}{>{\raggedleft}p{0.14\textwidth}}     \newcolumntype{R}{p{0.8\textwidth}}     \newcommand\VRule{\color{lightgray}\vrule width 0.5pt}      columns:               \section*{Professional Experience}     \begin{tabular}{L!{\VRule}R}     June 2012 -- present&{\bf Pixel Pusher at Vandalay Industries}\\     &\lipsum[66]\vspace{5pt}\\     Sept. 2011 -- Apr. 2012&{\bf Intern Pixel Pusher at Vandalay Industries}\\     &\lipsum[66]\\     \end{tabular}      Here's the output: ![output](http://i.stack.imgur.com/RRBFs.jpg) I added arrows to indicate the right-column linebreaks that I'd like to eliminate. Any pointers for this would be great.


title: Mini Table of Content \minitoc drove itself crazy (i was on board) ... how to fix?

text: I am using minitoc. In the main file,               \usepackage[english,tight]{minitoc}           ...           ...               \begin{document}     \dominitoc     \frontmatter      ...     ...     \input(myChapter_one)      And at each chapter (separate file)               \chapter{Chapter name}          \minitoc               ...          ...      It was working fine until today. Now, what I can see, for example in chapter 5, minitoc is not synchronized, it says chapter 4 like, 4.1.2 .. ..4.2.... AND, There is no minitoc on chapter One! [`\minitoc` command is still on the chapter one too!] Can you please give me some clues?


title: imagen beside a math

text: how I can make me stay in the following way but instead of using $ using the command / begin {align} for me to number the mathematical formulas to reference them later?                \begin{center}       \begin{tabular}{ll}      \begin{tikzpicture}                 \coordinate (A) at (0,0);                 \coordinate (B) at (1.3,0);                 \coordinate (C) at (0,1.12);                 \coordinate (D) at (1.3,1.12);                 \draw[o-] (A)--(B) ;                 \draw[o-] (C)--(D) ;                 \draw   (1.3,1.12) to[resistor,label=\mbox{\textcolor{red}{$R$}}] (1.3,0);                 \draw [->,color=blue] (0.5,0.8) arc (90:-90:0.3cm);%                 \draw (0.5,0.5) node {\textcolor{blue}{$i$}}; \end{tikzpicture}      &     \begin{tabular}{l}     $v_e=R i$ \\ \\     $v_e(s)=R I(s)$ \\ \\     \end{tabular}     % \caption{Resistencia}      \label{fig:1.10}     \end{tabular}     \end{center}      because when i try to use the next form i have a error with the compiler               \begin{center}%----figura de la Resistencia     \begin{tabular}{ll}     \begin{tikzpicture}                 \coordinate (A) at (0,0);                 \coordinate (B) at (1.3,0);                 \coordinate (C) at (0,1.12);                 \coordinate (D) at (1.3,1.12);                 \draw[o-] (A)--(B) ;                 \draw[o-] (C)--(D) ;                 \draw   (1.3,1.12) to[resistor,label=\mbox{\textcolor{red}{$R$}}] (1.3,0);                 \draw [->,color=blue] (0.5,0.8) arc (90:-90:0.3cm);%                 \draw (0.5,0.5) node {\textcolor{blue}{$i$}}; \end{tikzpicture}      &     \begin{align}     v_e=R i$ \\     v_e(s)=R I(s)     \end{align}     % \caption{Resistencia}      \label{fig:1.10}     \end{tabular}     \end{center}      Any suggestion?? Thanks


title: Passing options to "append after command"?

text: With minimal `tikz` knowledge, I try to create a node like shape, which has two filled circles in it. Here is my attempt, which suffers from these problems:   * The appended path components seem to be covered by the main node.   * Options passed to later path components are ignored. MWE:               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{calc,positioning,shapes.multipart}     \begin{document}     \tikzset{cell/.style={       name=#1,       draw,       rectangle split,       rectangle split parts=3,       rectangle split horizontal=true,         append after command={%           coordinate (#1 one) at ($ (#1.east)!1/6!(#1.west)  $)           coordinate (#1 two) at ($ (#1.east)!5/6!(#1.west)  $)          [fill=red] (#1 one) circle (2pt)          [fill=red] (#1 two) circle (2pt)         },     }}          \begin{tikzpicture}     \node[cell=a,label=left:{missing circles}] at (0,-1) {};     \node[cell=b,above=1ex of a,label=left:{circles show, but not red}]  {} [draw];     \node[cell=c, above=1ex of b,label=left:{circle ignore style options}] {}  [fill=green];     \node[cell=d, above=1ex of c,label=left:{node hides circles},fill=blue!20] {}  [fill=green];     \end{tikzpicture}     \end{document}      ![The output of the above code](http://i.stack.imgur.com/f8yVH.jpg)


title: Help me short author name, title at footer and name of chapter at header

text: I want to create the header with name of chapter, section.And te short author name and title at the footer. But i want it just visible from the second page of every chapter. My code here:               \documentclass[13pt]{extbook}     \usepackage{amsmath,amsthm,relsize}     \usepackage{fancyhdr}     \pagestyle{fancy}     \fancyhead[LE,RO]{$\ast$}     \fancyhead[CE,CO]{\leftmark}     \fancyhead[RE,LO]{$\dag$}     \fancyfoot[LO,RE]{Jane Doe}     \fancyfoot[CE,CO]{Book Title}     \fancyfoot[LE,RO]{\thepage}      But it's not working as my need. It always happen with all pages. I just want to apply for the second page of every chapter


title: ^\sharp with slanted italic font

text: With certain fonts with strongly slanted italics are used in math mode, `$f^\sharp$` collides the `f` and the `\sharp`. Is there a good way to deal with this, except for adding some kind of manual italic correction?


title: How to generate labels next to junctions and avoid self-collision with tikz?

text: I have an ASCII-art phylogenetic tree that looks (in part) like                                /------ PLN                /-----+ 0.9                |     \------ IL1       /--------+ 1.8       |        |      /----- PVD       |        \------+ 0.8       |               \----- URYD     --+ 3.1       |                /----- PHB       |             /--+ 0.7       |             |  \----- FLP       \-------------+ 0.8                     \----- PQR      I think I understand how to use the `level distance` command on the children to get different depths on each side of the branch, and the `grow right` command to get the tree in the proper orientation, but can I get the numbers to appear as shown here--to the right of the joining node? Should these be the text of some style of node, or are they labels on textless nodes, or...? Also, as shown here, the subtrees are different from each other and asymmetric. At this point, am I better off just drawing nodes by hand without any tree, or is there an effective way to avoid collisions?


title: tikz: positioning above of point a, left of point b

text: I want to create a blockdiagram using tikz. I would like to use "above of, below of, etc." to position my nodes in order to keep it as flexible as possible. I would no like to position a node D on right of A (same y) and above C (same X). However, the following example does not work as expected:               \documentclass{article}     \usepackage{tikz}   % library for drawings     \usetikzlibrary{positioning}          \begin{document}     \tikzstyle{block} = [draw, rectangle,        minimum height=3em, minimum width=4em]           \begin{figure}          \begin{tikzpicture}[auto, node distance=2cm,>=latex]            \node [block] (a) {A};            \node [block, below of=a] (b) {B};            \node [block, right of=b] (c) {C};            \node [block, above of=c, right of=a] (d) {D};          \end{tikzpicture}       \end{figure}     \end{document}      This is the generated output: ![enter image description here](http://i.stack.imgur.com/clxSr.png) I want D to be exactly over C and on the same height as A Has same one an idea how to solve this, without introducting distances and coordinates?


title: What version of PDF to use with pdfTeX

text: What version of PDF should I be specifying when using pdfTeX? I know it defaults to 1.5, so that you can have object compression. Is there any reason I would want to raise this? For example, will I get a smaller file or such? Alternatively, are there any interesting features that I could access by raising the version. I could see XeTeX and LuaTeX users wanting OpenType embedding (V1.6), while most of the things after v1.6 seem to be multimedia or encyption related, except for V1.7 which adds "new string types: PDFDocEncoded string, ASCII string, byte string" ---Is this something that would improve my output files? Will setting the minor version number higher then 7 improve my PDF output, or will it just cause incompatibility flags for people with outdated PDF readers? I'm also only really interested in things which I can take advantage of through LaTeX (i.e. pdfTeX supports it, or there is a marco package to add support for it). Theoretical features that I can't use are much less interesting.


title: Need to reduce a line between these equations

text: I'm not entirely sure how much this depends on how much I've formatted on my document. I have two equations               \begin{equation*}     \vec{n}_w \times [\vec{E} + \vec{v} \times \vec{B}] = \vec{n}_w \times \vec{E}_t + \vec{n}_w \times(\vec{v} \times \vec{B}) = (\vec{n}_w \cdot \vec{B})\vec{v} - (\vec{n}_{w} \cdot \vec{v})\vec{B} = (\vec{n}_w \cdot \vec{B})\vec{v} = 0     \end{equation*}     \begin{equation}     \vec{n}_w \cdot \vec{B} = 0 \\[1ex]     \end{equation}      If anyone runs this, they might notice there are two lines between the equations, whereas I only want one. How do I fix this?


title: How to have different watermarks on title page, even pages and odd pages

text: I would like to have a different background (wallpaper) on the title page, all even and all odd pages in a latex article document. This is what I have so far:               % Set document background     \ifthenelse{\boolean{branding}}{         \leftwatermark{\ThisCenterWallPaper{1.0}{background_page_even.pdf}}         \rightwatermark{\ThisCenterWallPaper{1.0}{background_page_odd.pdf}}     }{}      I am using this snippet to set a different wallpaper on all the even and odd pages in my document. I have created a new command to create the title page (to simplify usage for me). This is how the title page is created:               % Title page     \newcommand{\maketitlepage}{         \pagenumbering{roman}         \begin{titlepage}             \thispagestyle{headers_title}             \ifthenelse{\boolean{branding}}{\ThisCenterWallPaper{1.0}{background_title.pdf}}{}             \begin{center}                 \vspace*{1.5cm}                 \Huge{\textbf{\title}}                      \vspace*{1.5cm}                 \LARGE{\subtitle}                      \Large{-- bla bla --}                      \vspace*{3.75cm}                 \Large{Peter Folta}             \end{center}         \end{titlepage}     }      It places a special image on the title page. This works just fine, with the only problem that the title page now features two background images on top of each other: The title page image as well as the odd page image. This makes sense, as the title page is, in fact, an odd page. However, I'm looking for a solution to just have the title image on the title page. Here is a minimal working example that illustrates my problem:               \documentclass[a4paper, twoside]{article}          \usepackage{watermark}     \usepackage{wallpaper}          \leftwatermark{\ThisCenterWallPaper{1.0}{background_page_even.pdf}}     \rightwatermark{\ThisCenterWallPaper{1.0}{background_page_odd.pdf}}          \newcommand{\maketitlepage}{         \begin{titlepage}             \ThisCenterWallPaper{1.0}{background_title.pdf}             \begin{center}                 Contents of title page ...             \end{center}         \end{titlepage}     }          \begin{document}         \maketitlepage              Contents on an even page ...              \newpage              Contents on an odd page ...     \end{document}      Any ideas?


title: Code fails when loading boolexpr

text: I use this code to check for existing column style (see also this question) But it fails as soon as I load the package `boolexpr`. Is this incompatible with `etoolbox`?               \documentclass[]{scrbook}          \RequirePackage{etoolbox}     \makeatletter     \expandafter\let\csname columntype@p\endcsname\@empty     \newcommand\CheckIfColumntypeDefined[1]{%       \providebool{tpl@coltype@#1}       \ifcsdef{NC@find@\string#1}%         {\setbool{tpl@coltype@#1}{true}}%         {\ifcsdef{columntype@\string#1}           {\setbool{tpl@coltype@#1}{true}}%           {\setbool{tpl@coltype@#1}{false}}%         }%     }     \newcommand\isColumntypeDefined[1]{tpl@coltype@#1}     \newcommand\IfColumntypeDefined[3]{%       \CheckIfColumntypeDefined{#1}       \ifboolexpr{ bool{\isColumntypeDefined{#1}} }{#2}{#3}%     }     \makeatother          \RequirePackage{boolexpr}          \begin{document}     \IfColumntypeDefined{p}{p column defined}{p not defined}%     \end{document}


title: Typographic conventions for free space between subfigures?

text: I'm trying to define a "standard template" for drawing figures for my Ph. D. thesis. I would design large figures to fill the whole textwidth. Sometimes, however I have smaller figure, so that 2 (rarely 3) fit on "one line", and I also want to create a template for them with `width`<`0.5 \textwidth` resp. <`0.33 \textwidth`. (I want to create all figures if possible in "real" size directly to avoid different font sizes later when they would be scaled by the `\includegraphics[width=...]` command). I wondered how the width of the figures should be - compared to the `textwidth`. For large figures, the question was already discussed here Typographic conventions for width of figures in LaTeX data analysis reports and there was an interesting and detailed answer from Geoffrey Jones. The question not discussed there is:   * How much free horizontal space should be left between figures, of 2, 3 or 4 of them are shown as subfigures over the `textwidth`? So:   * Is there a typographic rule (or rule of thumb) stating, how much free space is at least "necessary" to visually separate different subfigures?


title: Layout of Sagetex in Tex (using Kile)

text: If you have something like:               \begin{sagesilent}     G=Graphics()     H=Graphics()     var('x')     G+=plot(cos(x),(x,0,pi))     H+= text("$\cos(x)$", (1, 1), fontsize=16, color='black')     \end{sagesilent}     \[ \sageplot{G+H}\]       into a tex file, how can you place it on the left or on the right, and make it smaller, or even show it vertically? Note: the whole thing is showing correctly, but just too big in the middle of the page. I need general advise in how to deal with sagemath plots like this (using Kile).


title: Define commands for symbols with index, combine with accents

text: To facilitate writing of formulas that contain symbols with subscript, I often define custom commands. However, combining these with accents gives unpleasant results. Is there any way to define such abbreviations and to still obtain the 'right' placement of accents? For example,               \documentclass{article}          \newcommand{\ang}{\varphi_\mathrm{example}}     \begin{document}     $\ang$ is ok, but $\dot{\ang}$ is not. I'd rather obtain $\dot{\varphi}_\mathrm{example}$ without spelling it out. How?     \end{document}


title: xelatex multilingual book with framed pages

text: I am compiling a multilingual book (Arabic+English), ~1400 pages, using the `memoir` class, and have been trying to frame each page with a simple black border using the following:                   \usepackage{background}         \usetikzlibrary{calc}         \usepackage{lipsum}% just to generate some text              \SetBgScale{1}         \SetBgColor{black}         \SetBgAngle{0}         \SetBgOpacity{1}         \SetBgVshift{-4}         \SetBgContents{         \begin{tikzpicture}[thick]         \draw (0.55\textwidth,10) -- (0.55\textwidth,0.52\textheight) -- (0.4\textwidth,0.52\textheight);         \draw (-0.55\textwidth,10) -- (-0.55\textwidth,0.52\textheight) -- (-0.4\textwidth,0.52\textheight);         \draw (-0.55\textwidth,-10) -- (-0.55\textwidth,-0.52\textheight) -- (-0.4\textwidth,-0.52\textheight);         \draw (0.55\textwidth,-10) -- (0.55\textwidth,-0.52\textheight) -- (0.4\textwidth,-0.52\textheight);         \end{tikzpicture}         }              \pagestyle{empty}      The border seems Ok, but I get random empty pages with missing content. I have no idea what is causing this behaviour - I've tried `scrpage2` as well, but to the same effect. Any help will be much appreciated - many thanks for reading. p.s. I am using TeXLive 2010.


title: Centered but left-aligned paragraph

text: I want to have a paragraph, that is centered but in itself left-aligned. Does somebody of you know how to achieve this? (I have text in a paragraph, on each line the text is shorter than the width, but if I just put "flushleft" around it comes to much to the left margin of the page)


title: LaTeX table capabilities

text: This might be a proper question for community wiki. How can various text processor (like Word or Writer) table capabilities be achieved using LaTeX? For example, can I achieve:   * multicolumns and multirows (yes, with `multirow` package)   * merge cells operation spanning multiple rows and columns, respecting borders. Illustrated with figure below: ![Row and column spanning](http://i.stack.imgur.com/7vA4A.png)   * equal column distribution (yes, with appropriate column types and manually inputting column widths, or `tabularx` package)   * equal rows distribution (?)   * changing text direction (yes, does not depend on table enviroment?)   * cell/row shading (yes, with `colorx` package)   * using borders and lines   * setting borders of each cell individually (?)   * aligning cell contents inside a cell in all 9 directions (vertical, horizontal and centering)   * etc.


title: How can I split long tables in Emacs org-mode latex export?

text: In LaTeX, when tables get very long one can use the longtable package. But what about org-mode latex export in Emacs? Is it possible to have org-mode split long tables?


title: How to change linewidth for symbols from plotstyle=dots in pstricks?

text: With the help of `plotstyle` and `dotstyle` one can realize scatterplots in pstricks. In the case one selects `plotstlye=dots` and `dotstyle` as `+`, `o`, `otimes` or similar one obtains little symbols drawed at each data position. **My question: How can I change the linewidth of these symbols without globally scaling them?** In my case I am interested in creating thicker symbols than the default ones. _Minimal working example:_               \documentclass\documentclass{article}     \usepackage{pstricks}     \usepackage{pst-plot}     \usepackage[final]{pst-pdf}          \begin{document}       \begin{pspicture*}(0cm,-0.3cm)(1cm,0.3cm)           % some data...         \savedata{\mydataA}[{{0.2,0}}]         \savedata{\mydataB}[{{0.4,0}}]         \savedata{\mydataC}[{{0.6,0}}]         \savedata{\mydataD}[{{0.8,0}}]         % set plotstyle and dotstyle         \psset{plotstyle=dots, dotstyle=x} % or 'o', '+', 'otimes', ...         % test A: simple plot -> too thin         \dataplot{\mydataA}         % test B: change linewidth -> only scaling, no relations are changed         \dataplot[linewidth=3pt]{\mydataB}         % test C: change dotscale  -> only scaling, no relations are changed         \dataplot[dotscale=1.5]{\mydataC}         % test D: change dotsize   -> only scaling, no relations are changed         \dataplot[dotsize=5pt]{\mydataD}       \end{pspicture*}     \end{document}      Only scaling, no changes in the relations: ![enter image description here](http://i.stack.imgur.com/5elEB.png) Please note: The same question can be found here, but without an answer... **[EDIT] Overview over possible solutions:**   * Using bold versions `B+`, `Bo`, `B|`, `Btriangle`, `Bsquare`, `Bpentagon` and `Basterisk`   * Most general: Defining new dotstyles (see here or Herbert's answer below).


title: Indexing all initial and non-initial words

text: > Please save your time and energy on this question, a possible solution is > provided. I've found a book with two interesting indices. It lists Tamil proverbs and the book indexes all the initial words of the proverbs (the first index) and all the other words (the second index). How could we achieve that in TeX? I enclose an initial TeX file. In this example we should get `a`, `Hello` and `How` terms in the first index and all the other proverb terms in the second index. Please notice that symbols like commas, semi-colons etc. should not be a part of the indices.               % run: *latex mal-indexall-question.tex     \documentclass[a4paper]{article}     \usepackage[noautomatic]{imakeidx}     \indexsetup{firstpagestyle=empty}     \makeindex[name=initial, title=Initial words, columns=3]     \makeindex[name=noninitial, title=Non-initial words, columns=3]     \usepackage[colorlinks]{hyperref}     \begin{document}     \let\indexall=\index % To be changed...     Text before.\indexall{a," [b;] c: r: s: t; {d.}/ (e!) f? g| h¡ i¿}     Text in the middle.\indexall{Hello World!}      Text\indexall{How are you?} after.     \printindex[initial]     \printindex[noninitial]     \end{document}      ![mwe, question](http://i.stack.imgur.com/zhAea.jpg)


title: \footnotetext on different page from \footnotemark

text: I was forced to use `\footnotetext` and `\footnotemark` on because I needed a footnote in a couple of captions. Of the three times this is done in the article: one works fine, the second appears on the page after the caption and the third appears on the page before the caption. Is there a way to get this to work properly? I tried using the `footnote` package but then the actual footnote text did not appear. My preamble and example code (obviously not long enough to show that they appear on two different pages, but hopefully enough to point out if I am doing something incorrectly):               \documentclass[reqno]{amsart}     \usepackage{amssymb,latexsym}     \usepackage{graphicx}     \usepackage{setspace}     \usepackage{cite}     \usepackage{fullpage}     \usepackage{subfig}     \captionsetup[subfigure]{margin=0pt, parskip=0pt, hangindent=0pt, indention=0pt, labelformat=parens, labelfont=rm}     \newtheorem{theorem}{Theorem}     \newtheorem{lemma}{Lemma}     \newtheorem{definition}{Definition}     \newtheorem{notation}{Notation}     \linespread{1.6}          \begin{document}     \begin{figure}     \centering     \includegraphics[scale=.7]{toroids}      \caption{A sphere, a torus, a 2-torus, a 3-torus, etc.\protect\footnotemark}     \label{fig:toroids}      \end{figure}     \footnotetext{This figure adapted from p24 of  \cite{topo}. }     \end{document}


title: Define shorthand command

text: I use a lot of times the following code:               \begin{gather}     \begin{aligned}     Math here     \end{aligned}     \end{gather}      Is there a way to define a new shorthand command like the following:               \SC     {     Math here     }


title: How do you make a TOC link cover text and page number?

text: The hyperref package allows you to specify that TOC links in the pdf cover the text (default) or the page number (linktocpage=true), but not both. That is, you can have this:                [My Title]. . . . . . . . . . . 15      Or this:                 My Title . . . . . . . . . . .[15]      But not this:                [My Title . . . . . . . . . . . 15]      ...where the brackets encompass the portion of the line that is a clickable link. My question: how do you specify that you make the whole line a clickable link? Is there a package that allows you to specify this?


title: Typesetting quotients and double quotients

text: What is the best way to typeset mathematical quotients and double quotients? I mean constructions like `X/~` (~ an equivalence relation on X) and `G\X/H` (where G and H are groups acting on X). While the simple case is solved by something like `X/\mathord\sim` (or maybe with `\mathbin/`), this gets hard to parse for the reader in more complicated situations and with double quotients. An alternative is a slanted `\sfrac{X}{\mathord\sim}` (from `xfrac`), but that makes the X rather small and doesn't work for double quotients. Do you have better ideas?


title: Change column width (modern CV)

text: Using moderncv, does anyone know how I change the command \cvlanguage{}{B}{} such that the column containing B gets wider? As it is now it linebreaks after 15 characters. I also don't want the changes to affect any other commands


title: Mixing bibliographic styles in Biblatex

text: Biblatex allows multiple bibliographies to be printed. How do I make one bilbiography use author-year style while make another use a numerical style? I've heard that this is bad typography but I want to do it to distinguish between actual references to literature (author-year) and image credits (which I hope to do numerically). I've read through the Biblatex documentation and it doesn't seem to help.


title: Do I need \leavevmode for centering figures?

text: I have an image I'd like horizontally centered on the page. Currently, I'm using the following code (which does work) under pdflatex:               \usepackage{float}          ...          \begin{figure}[H]     \begin{center}     \leavevmode     \includegraphics[width=0.8\textwidth]{PicName}     \end{center}     \caption{Some kind of sane Caption}     \label{fig:picref}     \end{figure}      The references I've found on the ineternet are pretty much split 50-50 on whether the \leavevmode is required there or not. But, I can't find anything that says point blank what it's for. So, my two-part question: what exactly does \leavevmode do, and do I need it?


title: Side Margin of a Paper

text: In many journals it is said to maintain "81/2-by-11 double-spaced typed pages". This means how many inch margin? That is what is the value of x in `\usepackage[margin=xin]{geometry}`?


title: How to install ochem for texlive

text: I found this package for latex that gives me the ability to typeset organic structural formulae and reaction schemes for chemistry. I'm having trouble with installing it though. I read through the installation steps in the manual and it tells me that I need to edit the `install.cfg.UNIX` file which contains:               [PATH]     BINDIR=/usr/local/ochem     M4BINDIR=/usr/bin     INCDIR=/usr/local/ochem     DVIPSDIR=/usr/local/tetex/dvips/ochem     STYLEDIR=/usr/local/tetex/tex/latex/ochem     MODULDIR=/usr/local/ochem     DOCDIR=/usr/local/ochem/doc          [SYSTEM]     SYSTEM=UNIX      So I edited the file to this:               [PATH]     BINDIR=/usr/share/ochem     M4BINDIR=/usr/bin     INCDIR=/usr/share/ochem     DVIPSDIR=/usr/share/texmf-texlive/dvips/ochem     STYLEDIR=/usr/share/texmf-texlive/tex/latex/ochem     MODULDIR=/usr/share/ochem     DOCDIR=/usr/share/ochem/doc          [SYSTEM]     SYSTEM=UNIX      When I try to install the package, it says that it works, but when I try to typeset one of the examples, it tells me that it can't find `ochem.sty`. I then tried navigating to the directories that the install was supposed to make and they didn't exist. So I made the directories manually and tried the install again. I still get the missing `ochem.sty` error. Did I edit `install.cfg.UNIX` correctly? My latex distribution is texlive 2009 on Ubuntu 10.10. NOTE: I did try running `sudo texhash` and it still doesn't work. EDIT: I did try running the install script as root, but it didn't work. Then I made the directories manually, and that didn't work either. Here is the link to the package that I downloaded: http://www.2k-software.de/download/ochem_40d.zip


title: symbol toolbar is partially inactive, teXnicCenter

text: I'm using teXniccenter. I want to add math symbols in my documents. I cann't see these symbols graphically. What I have to do to make them active. ![enter image description here](http://i.stack.imgur.com/xugwP.png) ![enter image description here](http://i.stack.imgur.com/44PUA.gif)


title: More Modern Reimplementations of TeX

text: There is no doubt that the original Pascal/WEB implementation of TeX is a masterpiece and I have learnt a lot reading through the source code (both weaved and tangled) but it definitely shows its age. Most of the code deals with things like lower-level datastructures and memory management that would be vastly simpler or unnecessary in a more modern language with good libraries. **Have there been efforts to reimplement TeX in a modern language such as Python while keeping full backwards compatibility?** At various times I've endeavoured this myself and have made _some_ progress but I'm interested if other work exists.


title: How to change order of a bibliography style manually (bilingual bibliography)

text: I've got a bilingual bibliography (Russian and German). I want to sort the entries alphabetically. The Russian entries have to appear alphabetically as well. Unfortunately, since the authors names are written in Russian using the `\cyr` command (for cyrillic), the Russian entries are sorted by the first name of the author, not the second. Is there any possibility to change my `.bst` file? In `plain.bst` I deleted the sorting function. But now it sorts by the text citation order, which I don't need. It would be best if there was a style (looking like plain style) which sorts after the source file, i.e. how the entries are made by hand in my `myliterature.bib` file.


title: Add colors that depend on chapters to the TOC

text: I'would like to add different colors in my TOC, depending on the chapter. I've a color for the header, section subsection of each chapter (red chapter one, blue chapter two etc...). With this code I can change colors of chapter name, section and subsection, but this style is the same of all the TOC:               \usepackage[svgnames]{xcolor}          \makeatletter          \let\stdl@section\l@section          \renewcommand*{\l@subsection}[2]{%       \stdl@subsection{\it\bf\textcolor{DarkGreen}{#1}}{\it\bf\textcolor{DarkGreen}{#2}}}     \makeatother      I'm a newbie, I would to exprime like an `"if chapter==1 \textcolor{DarkGreen}" "if chapter==2 \textcolor{Red}"`... Any ideas? Thankyou in advance.


title: LaTeX Source Code Listing Horizontally In Figure With Subfloats

text: I'm trying to embed a couple of `listings`               \begin{lstlisting}     >>> from sympy import Integral, latex     >>> from sympy.abc import x     >>> latex(x**2)     x^{2}     \end{lstlisting}          \begin{lstlisting}     >>> from sympy.printing.mathml import mathml     >>> from sympy import Integral, latex     >>> from sympy.abc import x     >>> print mathml(x**2)     <apply><power/><ci>x</ci><cn>2</cn></apply>     \end{lstlisting}          \begin{lstlisting}     >>> from sympy import *     >>> x = symbols("x")     >>> fcode(sqrt(1-x**2))     '      sqrt(-x**2 + 1)'     \end{lstlisting}      as a figure with images subfloated as shown here. Is there an easy way (least amount of LaTeX code) for me to do that?


title: How keep a running list of strings and then process them one at a time

text: I would like to keep track of all the `\AddRef` commands in a document and then process them one at a time, for instance print them in the document on one line per value. It seems that this should be doable as the functionality is not that different than list of figures that, but I can' seem to get this to work. I did not even attempt the `\foreach` command required at the end of the file so if someone knows how to do that that would be appreciated.               \documentclass[12pt]{article}     \begin{document}          \newtoks{\Ref}     \newcommand{\AddRef}[1]{%         \let\OldRef=\the\Ref\relax         \let\Ref=\the\OldRef{#1}\relax     }          \AddRef{Ref 1}     \AddRef{Ref 2}     \AddRef{Ref 3}          The list of Ref are:     \the\Ref          \end{document}      At the end, I would like to process the list, say to print a line at a time: Ref 1 Ref 2 Ref 3 * * * The original question above required the case where this list of strings is a global macro so that it is complete at the end of the document. Another application requires that this list of strings be local to a scope so a local version would also be useful.


title: Metadata for different colours in PGFPlots

text: I would like to use PGFPlots to create a plot using three sets of metadata. I figure it would be best to have one set represented by the plot mark and the remaining two by the fill and draw colour respectively. However, I am only able to the mark and one colour:               \documentclass[10pt,a4paper,landscape]{article}     \usepackage{pgfplots}                  \begin{document}               \begin{tikzpicture}     \begin{axis}          \addplot[     only marks,     scatter,     point meta = \thisrow{C1},     visualization depends on = {value \thisrow{Mark} \as \markshape},     visualization depends on = { \thisrow{C2} \as \col2},         scatter/@pre marker code/.append style = {                 /tikz/draw = \col2,                 /tikz/mark = \markshape                 }     ]     table[x=X,y=Y, row sep = \\]{         X   Y   C1  C2  Mark \\         1   1   0   6   *   \\         2   2   6   0   otimes* \\         3   1   0   0   square* \\         4   5   6   6   diamond*    \\     };          \end{axis}     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/DXMl0.png) The row C2 has no effect on the plot whereas Mark, implemented in the same way, does. Having looked into the manual and corresponding forum entries, I have not been able to find a solution for this problem. In addition, in my real data, all metadata is in the form of strings and I would, preferably, have something like the scatter classes, which translates a predefined string to a visualization style, e.g. "abc" to "fill = red" or to "mark = \otimes*", depending on the row. Although I could code every combination of metadata as a seperate scatter class to get what I want, that would be very time consuming and I hope that you can help me getting PGFPlots to do the work for me.


title: Inserting undertilde in Chapter title

text: I'm using undertilde package in amsbook document class. I want to insert `$\utilde{\times}$` in chapter title. But it doesn't work.


title: wrapfig in beamer

text: The `\includegraphics` command can take an overlay parameter `<n>` in beamer. I'd like to do the same thing for `\wrapfig` to allow overlays of a wrapped figure. Is that possible ?


title: How can I float some text to the right of the first line of a paragraph?

text: I'd like to put some right-aligned text on the first line of my paragraph, and have the rest of the text wrap around it, like this:               Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed      {right-aligned text}     do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,     quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat...      How can I achieve this?