title: references not printing to pdf properly

text: I've struggled with a new computer and miktex for sometime. I asked this question before and thought I had it resolved (saw a green hyper link box in the pdf and assumed all was good) but did not. (See question: references not printing). I have some more information and hopefully can get this solved. I stopped using WinEdt and can replicate the problem in MikTeX. Here is the code I'm running:               \documentclass[leavefloats]{apa6e}     \usepackage[american]{babel}     \usepackage{csquotes}     %\usepackage[style=apa]{biblatex}     \usepackage[style=apa, backend=biber, bibencoding=latin1]{biblatex}     \addbibresource{explicit.bib}     \DeclareLanguageMapping{american}{american-apa}          \usepackage{enumerate}     \usepackage{hyperref}     \usepackage{graphicx}     \usepackage{ragged2e}     \usepackage{textcomp}     %\usepackage[justification=justified,singlelinecheck=false,font=small,format=plain,labelfont=bf,up,textfont=normal,up]{caption}     \usepackage{etoolbox}     \usepackage{microtype}  %disable ligitures     \DisableLigatures{encoding = *, family = *}          %--------------------------     \makeatletter     \renewcommand{\maketitle}{%     \thispagestyle{titlepage}%     \vspace*{1in}%     \Centering\@title\\\@author%     \vfill%     \ifdefined%     \apaSIXe@leavefloats{}     \fi     \RaggedRight%     \mspart{\@title}%     }     \makeatother     %---------------          \usepackage[section]{placeins}          \usepackage{setspace}     \usepackage{appendix}     \usepackage{float}     \usepackage{subfig}     \usepackage{amsmath}      %\numberwithin{equation}{subsection} %changes labeling of equations          \setlength{\parindent}{1 em}     \usepackage{color}     \usepackage{ifthen}     \makeatletter     \renewenvironment{figure}[1][]{%     \ifthenelse{\equal{#1}{}}{%     \@float{figure}     }{%     \@float{figure}[#1]%     }%     \centering     }{%     \end@float     }     \renewenvironment{table}[1][]{%     \ifthenelse{\equal{#1}{}}{%     \@float{table}     }{%     \@float{table}[#1]%     }%     \centering     }{%     \end@float     }          \defbibheading{bibliography}{%     \section{\normalfont\refname}}          \title{Teacher Metacognition: The Intentionality of Teacher Led Speech}     \shorttitle{Intentionality of Teacher Led Speech}     \author{Tyler Rinker\\University at Buffalo\\Department of Learning and Instruction}          \authornote{Theories of Language \& Literacy}%LAI 687 -          \date{\today}      \begin{document}     \maketitle     %\defbibheading{bibliography}{%     %\section{\normalfont\refname}}          %\hspace{.5in}Usually a paper has an introduction but there is no heading for the introduction.  That's what you've got here, an introduction with no heading.  %Not pretty but it pleases the APA.          I want this to work \cite{Nagy1985}          \clearpage %This forces a page break     \printbibliography          \end{document}      I When I run this with both biber and bibtex as the backend. Here is a zip file with my bib file, tex file and the two pdfs that out put using biber and bibtex as backend. https://dl.dropbox.com/u/61803503/my%20items.zip Now for some information. If I run it with bibtex as the backend the references never print and the in text citation appears as the bibtex citation key in bold. Ok if I switch to biber as the back end the references still don't print but the in text citation appears correct (green hyper link box around it and the year) but when I click on it it takes me to my cover page as there is no reference section to go to. If I run the same pdfLatex thing again (the green play button in texworks labeled Typeset if you hover over it) the green intext hyper reference boxes go away and the in text citation is not a date any more but the bold BibTex key instead. The only way to get it back to being green hyper box with year is to switch to bibtex as backend, run it, and the switch back to biber as the back end. Here is the console out put:               Command Line:   bibtex.exe "theories"     Startup Folder: C:\Users\trinker\Desktop\PhD Program\Indep. Study\lit_review_articles_explicit_talk\paper          This is BibTeX, Version 0.99d (MiKTeX 2.9)     The top-level auxiliary file: theories.aux     The style file: biblatex.bst     Database file #1: theories-blx.bib     Database file #2: explicit.bib     Biblatex version: 2.1               Command Line:   texify.exe --pdf --tex-option=--interaction=errorstopmode --tex-option=--synctex=-1 "C:\Users\trinker\Desktop\PhD Program\Indep. Study\lit_review_articles_explicit_talk\paper\theories.tex"     Startup Folder: C:\Users\trinker\Desktop\PhD Program\Indep. Study\lit_review_articles_explicit_talk\paper          This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9)     entering extended mode          ("C:/Users/trinker/Desktop/PhD Program/Indep. Study/lit_review_articles_explici     t_talk/paper/theories.tex"     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar     abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,      croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga     lician, german, german-x-2012-05-30, greek, gujarati, hindi, hungarian, iceland     ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin, latvian,      lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, n     german-x-2012-05-30, nynorsk, oriya, panjabi, pinyin, polish, portuguese, roman     ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerm     an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl     ishmax, welsh, loaded.     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\apa6e\apa6e.cls     Document Class: apa6e 2011/03/03 v0.3 APA 6e manuscript formatting     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\article.cls"     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\size12.clo"))     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\psnfss\times.sty")     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\psnfss\mathptmx.sty")     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\geometry\geometry.sty"     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\keyval.sty")     ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\ifpdf.sty")     ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\ifvtex.sty")     ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\ifxetex\ifxetex.sty")     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\geometry\geometry.cfg"))     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\ms\ragged2e.sty     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\ms\everysel.sty)     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\footmisc\footmisc.sty))     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\fancyhdr\fancyhdr.sty)     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\float\float.sty")     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\caption\caption.sty     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\caption\caption3.sty))     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\ifthen.sty"))     ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\babel\babel.sty"     *************************************     * Local config file bblopts.cfg used     *     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\arabi\bblopts.cfg)     ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\babel\english.ldf"     ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\babel\babel.def")))     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\csquotes\csquotes.sty     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\etoolbox\etoolbox.sty     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\misc\etex.sty"))     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\csquotes\csquotes.def)     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\csquotes\csquotes.cfg))     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\biblatex\biblatex.sty     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\biblatex\biblatex2.sty     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\oberdiek\kvoptions.sty"     ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\ltxcmds.sty")     ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\kvsetkeys.sty"     ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\infwarerr.sty")     ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\etexcmds.sty"     ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\ifluatex.sty"))))     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\logreq\logreq.sty     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\logreq\logreq.def))     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\ltxmisc\url.sty")     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\biblatex\blx-dm.def)     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\biblatex\blx-compat.def)     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\biblatex\biblatex.def)     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\biblatex-apa\apa.bbx     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\biblatex\bbx\standard.bb     x)          Package biblatex Warning: Macro 'reviewauthor' undefined.     (biblatex)                Using \newbibmacro.          ) (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\biblatex-apa\apa.cbx)     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\biblatex\biblatex.cfg)))      ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\tools\enumerate.sty")     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\hyperref\hyperref.sty"     ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\hobsub-hyperref.sty"     ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\hobsub-generic.sty"))     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\hyperref\pd1enc.def")     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\00miktex\hyperref.cfg"))          Package hyperref Message: Driver (autodetected): hpdftex.          ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\hyperref\hpdftex.def"     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\oberdiek\rerunfilecheck.sty"))     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\graphicx.sty"     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\graphics.sty"     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\trig.sty")     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\00miktex\graphics.cfg")     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\pdftex-def\pdftex.def")))     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\textcomp.sty"     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\ts1enc.def"))     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\microtype\microtype.sty     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\microtype\microtype.cfg)     ) (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\placeins\placeins.sty)      (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\setspace\setspace.sty)     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\appendix\appendix.sty)     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\subfig\subfig.sty)     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\ams\math\amsmath.sty"     For additional information on amsmath, use the `?' option.     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\ams\math\amstext.sty"     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\ams\math\amsgen.sty"))     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\ams\math\amsbsy.sty")     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\ams\math\amsopn.sty"))     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\graphics\color.sty"     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\00miktex\color.cfg"))     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\biblatex-apa\american-ap     a.lbx     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\biblatex\lbx\american.lb     x     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\biblatex\lbx\english.lbx     )))     ("C:\Users\trinker\Desktop\PhD Program\Indep. Study\lit_review_articles_explici     t_talk\paper\theories.aux")     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\ts1cmr.fd")     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\psnfss\ot1ptm.fd")     *geometry* driver: auto-detecting     *geometry* detected driver: pdftex     ABD: EverySelectfont initializing macros          Package biblatex Warning: File 'theories.bbl' is wrong format version - expecte     d 2.1.               ("C:\Users\trinker\Desktop\PhD Program\Indep. Study\lit_review_articles_explici     t_talk\paper\theories.bbl"     ! Undefined control sequence.     <argument> ...c@refsection @entry@\blx@slist@name           l.119 \endentry          ?      ! Undefined control sequence.     <argument> ...c@refsection @entry@\blx@slist@name           l.119 \endentry          ?      ! Undefined control sequence.     l.121 \lossort          ?      ! Undefined control sequence.     l.122 \endlossort          ?      ) ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\hyperref\nameref.sty"     ("C:\Program Files (x86)\MiKTeX 2.9\tex\generic\oberdiek\gettitlestring.sty"))     ("C:\Users\trinker\Desktop\PhD Program\Indep. Study\lit_review_articles_explici     t_talk\paper\theories.out")     ("C:\Users\trinker\Desktop\PhD Program\Indep. Study\lit_review_articles_explici     t_talk\paper\theories.out")     (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\context\base\supp-pdf.mkii     [Loading MPS to PDF converter (version 2006.09.02).]     ) (C:\Users\trinker\AppData\Roaming\MiKTeX\2.9\tex\latex\microtype\mt-ptm.cfg)     Underfull \hbox (badness 2941) in paragraph at lines 83--83      []\OT1/ptm/m/n/12 (+20) Teacher Metacog-ni-tion: The In-ten-tion-al-ity of Tea     cher Led Speech           Underfull \hbox (badness 10000) in paragraph at lines 83--83      []\OT1/ptm/m/n/12 (+20) Tyler Rinker           Underfull \hbox (badness 10000) in paragraph at lines 83--83      []\OT1/ptm/m/n/12 (+20) University at Buf-falo           Underfull \hbox (badness 10000) in paragraph at lines 83--83      []\OT1/ptm/m/n/12 (+20) Department of Learn-ing and In-struc-tion      [1{C:/Users/trinker/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}]     Underfull \hbox (badness 2922) in paragraph at lines 83--83      [][]\OT1/ptm/m/n/12 (+20) Teacher Metacog-ni-tion: The In-ten-tion-al-ity of T     eacher Led Speech           Underfull \hbox (badness 10000) in paragraph at lines 109--109      [][]\OT1/ptm/b/n/12 Literature Re-view           Underfull \hbox (badness 10000) in paragraph at lines 118--118      [][]\OT1/ptm/b/n/12 Methods           Underfull \hbox (badness 10000) in paragraph at lines 124--124      [][]\OT1/ptm/b/n/12 Results           Underfull \hbox (badness 10000) in paragraph at lines 126--126      [][]\OT1/ptm/b/n/12 Conclusion      [2]          LaTeX Warning: Empty bibliography on input line 134.               ("C:\Users\trinker\Desktop\PhD Program\Indep. Study\lit_review_articles_explici     t_talk\paper\theories.aux")          Package biblatex Warning: Please rerun LaTeX.     (biblatex)                Page breaks have changed.           )     (\end occurred when \ifx on line 46 was incomplete)     (\end occurred when \ifx on line 46 was incomplete)     (\end occurred when \ifx on line 46 was incomplete)pdfTeX warning (dest): name{     cite.0@Nagy1985} has been referenced but does not exist, replaced by a fixed on     e          {C:/Program Files (x86)/MiKTeX 2.9/fonts/enc/dvips/fontname/8r.enc}<C:/Program      Files (x86)/MiKTeX 2.9/fonts/type1/urw/times/utmb8a.pfb><C:/Program Files (x86)     /MiKTeX 2.9/fonts/type1/urw/times/utmr8a.pfb>     Output written on theories.pdf (2 pages, 35260 bytes).     SyncTeX written on theories.synctex.     Transcript written on theories.log.     texify: pdflatex.exe failed for some reason (see log file).               _____________________________________________________________________           PDFTeXify Compilation Report (Pages: 2)           Errors: 4   Warnings: 5   Bad Boxes: 9     _____________________________________________________________________      It still makes a pdf but with no references. I'm not really that great with LATEX (love it's flexibility but am not really knowledgeable). So please make sure your answers assume nothing. **EDIT:** I changed the code and the output above to reflect the problem after trying the solutions given


title: pgfplots, toks, position of pin edge

text: I want to use pins to comment specific points in a diagramm. When I use a edge like `->` it works fine. But if I use `*-` for example then the center of the dot is not at the position it should be. Maybe it's a problem with the `anchor`. Here is an example:               \documentclass[]{article}          \usepackage{tikz}     \usepackage{pgfplots}     \usepgflibrary{arrows}          \begin{document}          \begin{tikzpicture}     \begin{axis}%     [     axis y line = left,     axis x line = middle,     grid     ]     \addplot[mark=none,domain=0:5] {x};      \node%     [     coordinate,     pin={[pin edge={*-}]50:{text}}     ]      at (axis cs:2,1) {};     %     \node%     [     coordinate,     pin={[pin edge={red}]-50:{text}}     ]      at (axis cs:2,1) {};     \end{axis}     \end{tikzpicture}          \end{document}      Leading to ![enter image description here](http://i.stack.imgur.com/RqZ1k.png) The close up shows the problem: ![enter image description here](http://i.stack.imgur.com/8AUpY.png) Any ideas?


title: Justify long line with no spaces but a lot of hyphens

text: % !TEX TS-program = xelatex     % !TEX encoding = UTF-8 Unicode          \documentclass[11pt]{memoir}     \usepackage{fontspec}     \usepackage{showframe}          %%% Book Layout %%%     \setstocksize{4in}{5.75in}     \settrimmedsize{4in}{5.75in}{*}     \setlength{\trimtop}{0pt}     \setlength{\trimedge}{\stockwidth}     \addtolength{\trimedge}{-\paperwidth}     \settypeblocksize{3in}{4.52in}{*}     \setulmargins{0.5in}{*}{*}     \setlrmargins{0.6in}{*}{*}     \setmarginnotes{0pt}{0pt}{0pt}     \checkandfixthelayout          %%% Other Settings %%%     \sloppy          %%% Document Proper %%%     \begin{document}          “It’s not at all clear,” Roger Mexico’s been saying, “what they have in      mind, not at all, the Witchcraft Act’s more than 200 years old, it’s a     relic of an entirely different age, another way of thinking. Suddenly      here we are 1944 being hit with convictions right and left. Our Mr.     Eventyr,” motioning at the medium who s across the room chatting     with young Gavin Trefoil, “could be fallen upon at any moment—pouring      in the windows, hauling dangerous tough Eventyr away to the     Scrubs on pretending-to-exercise-or-use-a-kind-of-conjuration-to-cause-the-spirits-of-deceased-persons-to-be-present-in-fact-at-the-place-where-he-then-was-and-that-those-spirits-were-communicating-with-living-persons-then-and-there-present my God what imbecile Fascist \textit{rot}.~.~.~.”          \end{document}      ![enter image description here](http://i.stack.imgur.com/Qfyoi.png) As you can see, two lines failed to justify because of the unusually long line with lots of hyphens. Is there any way to fix that?


title: What is best practice for aligning distinct arrays or tables side-by-side?

text: I have two related tables that could naturally be displayed side-by-side but don't have to be. However, it saves space to display them side-by-side rather than one atop the other. If I do so without tweaking the alignment, it looks ugly:               \begin{center}         \(             \begin{array}{l|cccccc}                 &   A   &   B   &   C   &   D   &   E   &   F   \\ \hline             x^A &   1   &   3   &   1   &   1   &   1   &   2   \\             x^B &   2   &   2   &   2   &   0   &   2   &   0   \\             x^C &   3   &   1   &   3   &   1   &   0   &   1             \end{array}         \)         \hspace{.5in}         \(             \begin{array}{l|cccc}                         &   x           &   y       &   z   &   w   \\ \hline                 q=1     &   1           &   0       &   0   &   1   \\                 q\neq 1 &   0           &   1       &   1   &   1   \\             \end{array}         \)     \end{center}      ![MWE Displayed](http://i.stack.imgur.com/cpGJc.png) Therefore, right now I am using the following hack to make the rows line up.               \begin{center}         \(             \begin{array}{l|cccccc}                 &   A   &   B   &   C   &   D   &   E   &   F   \\ \hline             x^A &   1   &   3   &   1   &   1   &   1   &   2   \\             x^B &   2   &   2   &   2   &   0   &   2   &   0   \\             x^C &   3   &   1   &   3   &   1   &   0   &   1             \end{array}         \)         \hspace{.5in}         \(             \begin{array}{l|cccc}                         &   x           &   y       &   z   &   w   \\ \hline                 q=1     &   1           &   0       &   0   &   1   \\                 q\neq 1 &   0           &   1       &   1   &   1   \\                 \multicolumn{2}{c}{ }   &           &       &             \end{array}         \)     \end{center}      Is this bad practice? If so, what is the right way to do it? If the answer is "two tables that need to be side-by-side are two tables that need to be one table"--and therefore that these two tables should not be side- by-side--so be it.


title: Conditional formatting, rounding and postprocessing of a column in pgfplotstable

text: I want to round p-values in a table to two decimals (for example 0.05), have values less than 0.05 in bold font and have values less than 0.01 to come out as '<0.01' in bold font. Like this (the example is made in Excel): ![enter image description here](http://i.stack.imgur.com/jncpk.png) **Question:** How do I do this using `pgfplotstable` package? Example:               \documentclass{article}          \usepackage{pgfplotstable,tabularx,booktabs}          \begin{document}          \noindent%     \pgfplotstabletypeset[columns={var,p},     every head row/.style={before row=\toprule,after row=\midrule},     every last row/.style={after row=[0.5ex]\bottomrule},     columns/var/.style={string type,column name=Variable},     columns/p/.style={column name=$p$,fixed,fixed zerofill,precision=2,dec sep align},     ]{     var p     A   0.0445     B   0.5343     C   0.0000     D   0.0254     E   0.9843     }     \end{document}      Which gives following table with correct rounding: ![enter image description here](http://i.stack.imgur.com/oCG2R.png) I manage to get values <0.05 to come out as bold font, but for some reason I do not manage to round the values. Rounding works for the values that are >0.05 (i.e. `\pgfmathprintnumber{##1}` works, but `\textbf{\pgfmathprintnumber{##1}}` produces scientific notation without bold font.               \documentclass{article}          \usepackage{pgfplotstable,tabularx,booktabs}          \begin{document}          \noindent%     \pgfplotstabletypeset[columns={var,p},     every head row/.style={before row=\toprule,after row=\midrule},     every last row/.style={after row=[0.5ex]\bottomrule},     columns/var/.style={string type,column name=Variable},     columns/p/.style={column name=$p$,fixed,fixed zerofill,precision=2,       postproc cell content/.style={           /pgfplots/table/@cell content/.initial={}{%            \pgfmathparse{int(less(##1,0.05))}             \ifnum\pgfmathresult=1                \textbf{##1}                \else                \pgfmathprintnumber{##1}                     \fi           },         },       },     ]{     var p     A   0.0445     B   0.5343     C   0.0000     D   0.0254     E   0.9843     }     \end{document}      ![enter image description here](http://i.stack.imgur.com/h9xTP.png) I also fail to incorporate both bolding and `<0.01` into the script. If I run the script with `<0.01` condition, I get scientific notation for values that are between 0.01 and 0.05 and correct rounding for values that are >0.05.               \documentclass{article}          \usepackage{pgfplotstable,tabularx,booktabs}          \begin{document}          \noindent%     \pgfplotstabletypeset[columns={var,p},     every head row/.style={before row=\toprule,after row=\midrule},     every last row/.style={after row=[0.5ex]\bottomrule},     columns/var/.style={string type,column name=Variable},     columns/p/.style={column name=$p$,fixed,fixed zerofill,precision=2,       postproc cell content/.style={           /pgfplots/table/@cell content/.initial={}{%            \pgfmathparse{int(less(##1,0.01))}             \ifnum\pgfmathresult=1                \textbf{$<$0.01}                \else                \pgfmathprintnumber{##1}                     \fi           },         },       },     ]{     var p     A   0.0445     B   0.5343     C   0.0000     D   0.0254     E   0.9843     }     \end{document}      ![enter image description here](http://i.stack.imgur.com/xkBAB.png) **Bonus niceness:** It would be cool to get the values centered by decimal point, but I guess this is impossible, because **`<0.01`** probably has to come out as a string?


title: What is the best practice for typesetting set-builder notation with a large number of membership criteria?

text: That is, I have something akin to the following right now:               \documentclass{article}     \usepackage{amsmath}     \usepackage{amssymb}          \begin{document}     We must have $(a^i,b^i,c^i) \in X^i(d) = \bigg\{(a,b,c)         \in \mathbb R^A \times \mathbb R^B \times \mathbb R^C : $     \begin{displaymath}         \begin{array}{l}             1.\ d_0 \cdot (a_0 - b_0) + d_1 \cdot (b_0 - c_0) \leq 0  \\             2.\ \sum_j c_j b^j \leq d_j \\             3.\ \forall k \geq 1,                 d_k \cdot \left(a_k - b^h_k - F_k(x_{k^*})\right) \leq                  \sum_k (b_k-c_k) \cdot \min \left(d_k \cdot G^j_k, m_k \right)                 \bigg\}         \end{array}     \end{displaymath}     \end{document}      Which produces this monstrosity: ![Awful TeX Job](http://i.stack.imgur.com/bXZ6L.png) Any suggestions for slaying this beast would be much appreciated. Goals:   * make it look clean,    * and comport with TeX best practices,   * in particular removing manual serialization   * and manual, highly-contingent layout tweaks Restrictions:   * There is limited horizontal space with which to work, which may end up requiring that the set be opened on a different line from that on which it is closed.   * Obviously, I do not want to define membership criteria outside of the set braces and then reference them, unless I can be convinced that this is the most simple / elegant way to express the set.


title: key-value is not being read as expected

text: I'm trying to write some code that allows me to reveal in stages the content of a pre-existing file (a `pspicture` showing a geometric construction). I'm trying to write this using LaTeX3. I've got some working code, but I don't like how I'm implementing it. Currently, the working version is a hobbled together collection of commands. I want to streamline this using `l3keys`. However, I'm getting stuck. > What's working: Here's what I've got that's working. There are three files: File in which I define the `expl3` interface: this is put in a file called **stages.tex**               %% defining stages     \usepackage{xparse}     \usepackage{verbatim}     \ExplSyntaxOn          \tl_new:N    \ace_reveal_tl     \tl_gset:Nn  \ace_reveal_tl {REVEAL}     \tl_new:N    \ace_conceal_tl     \tl_gset:Nn  \ace_conceal_tl {CONCEAL}          \NewDocumentCommand{\revealstage}{ m }{             \tl_gset:cV { ace__reveal__ #1 __stage__new } \ace_reveal_tl         }     \NewDocumentCommand{\burystage}{ m }{             \tl_gset:cV { ace__reveal__ #1 __stage__new } \ace_conceal_tl     }          \NewDocumentCommand{\testforstage}{ m m m }{                 \tl_if_eq:cNTF { ace__reveal__ #1 __stage__new } \ace_reveal_tl                                {#2}                                {#3}         }          \NewDocumentEnvironment{stage}{ m }             {                 \tl_if_eq:cNF { ace__reveal__ #1 __stage__new } \ace_reveal_tl                               {\expandafter\comment}             }             {                 \tl_if_eq:cNF { ace__reveal__ #1 __stage__new } \ace_reveal_tl                               {\expandafter\endcomment}               }          \ExplSyntaxOff        File in which I define the picture I'm using in which I implement stages: this file is called **diagram.tex**               \begin{pspicture}[showgrid=false](-20,-13)(20,13)         %..% compass directions %..%          {             \psset{PointName=none,PointSymbol=none}              \pstGeonode(0,0){o}(1,0){r}(0,1){u}             \pstRotation[RotAngle=20]{o}{r}[r1]              \pstGeonode(0,0){Q}         }         %% temporarily define midpont of segment(PQ) --> M to control positioning         \pstGeonode[PointName=none,PointSymbol=none,PosAngle=0](0,0){tM}         %% point outside the circle and the center of circle         \pstTranslation[DistCoef=14,PosAngle=80]{o}{r1}{tM}[Q]         \pstTranslation[DistCoef=10,PosAngle=-100]{r1}{o}{tM}[P]         %% construct circle centered at P         \pstCircleOA[Radius=\pstDistVal{9}]{P}{}              %% construct mid-point between P and Q         \pstTranslation[DistCoef=9,PointName=none,PointSymbol=none]{o}{r}{P}[B]         \pstTranslation[DistCoef=0.5,PointName=none,PointSymbol=none]{P}{Q}{P}[M]         %% show constructions         \begin{stage}{midpoint}             \pstLineAB[linecolor=blue,linewidth=0.1pt,linestyle=dashed]{P}{Q}             \pstGeonode[PointName=M,PosAngle=-90](M){showM}         \end{stage}              %% construct circle centered at M passing through P and Q         \begin{stage}{large circle}             \pstCircleOA[linecolor=blue,linewidth=0.2pt,linestyle=dashed]{M}{P}         \end{stage}              %% construct tangents         \pstInterCC[PointName=none,PointSymbol=none,RadiusB=\pstDistVal{9}]{M}{P}{P}{}{U}{V}         \begin{stage}{tangents}             \testforstage{large circle}{                 \pstGeonode[PointName={U},PosAngle=-90](U){showU}                 \pstGeonode[PointName={V},PosAngle=110](V){showV}             }{                 \pstGeonode[PointName={U},PosAngle=-50](U){showU}                 \pstGeonode[PointName={V},PosAngle=90](V){showV}             }             \pstLineAB[linecolor=red,nodesep=-8]{Q}{V}             \pstLineAB[linecolor=red,nodesep=-8]{Q}{U}         \end{stage}          \end{pspicture}      The main document:               \documentclass{article}     \usepackage{pstricks,pst-eucl}     \psset{unit=0.15cm}     \usepackage[margin=1in]{geometry}     \input{stages}     \pagestyle{empty}     \begin{document}              \input{diagram}               \revealstage{midpoint}         \input{diagram}              \revealstage{large circle}         \input{diagram}              \revealstage{tangents}         \input{diagram}              \burystage{midpoint}         \burystage{large circle}         \input{diagram}          \end{document}      This creates: ![enter image description here](http://i.stack.imgur.com/ujrIB.png) > What's not working: I would really like to be able to write something like the following lines in the _main document_ :               \activatestage[reveal=midpoint,                    conceal={large circle,                             midpoint}]                   {diagram}      But this above example is a bit more sophisticated than I've currently tried to implement. Currently, I haven't written code to handle passing multiple values to be parse by the key. I've only written something that I _believe_ should be able to handle the following:               \activatestage[reveal=midpoint,                    conceal=large circle]                   {diagram}      And this is the code I use to try to implement this:               %% defining keys     \ExplSyntaxOn     \keys_define:nn { stages }{         reveal  .code:n = \fnc_reveal_stages:n #1,         conceal .code:n = \fnc_conceal_stages:n #1     }          \cs_new:Npn \fnc_reveal_stages:n #1 {             \tl_gset:cV { ace__reveal__ #1 __stage__new } \ace_reveal_tl     }          \cs_new:Npn \fnc_conceal_stages:n #1 {             \tl_gset:cV { ace__reveal__ #1 __stage__new } \ace_conceal_tl     }          \NewDocumentCommand{\activatestage}{ o m }{             \tl_set:Nn  \l__no_value_tl         { \NoValue    }             \tl_set:Nn  \l__keys_present_tl     { #1 }             \tl_show:N \l__keys_present_tl             \bool_if:nF {        \tl_if_eq_p:NN \l__keys_present_tl  \l__no_value_tl) }                     {                         \keys_set:nn{ stages }{#1}                     }             \input{#2}     }     \ExplSyntaxOff      I've put the above in its own file called **additions.tex** Here's the main document where I try to implement the new approach:               \documentclass{article}     \usepackage{pstricks,pst-eucl}     \psset{unit=0.15cm}     \usepackage[margin=1in]{geometry}     \input{stages}     \input{additions}     \pagestyle{empty}     \begin{document}              \input{diagram}               \revealstage{midpoint}         \input{diagram}              \revealstage{large circle}         \input{diagram}              \revealstage{tangents}         \input{diagram}              \activatestage[reveal=midpoint,                        conceal=large circle]                       {diagram}          \end{document}      But this results in: ![enter image description here](http://i.stack.imgur.com/YDb1r.png) But this isn't doing what I expect (as you can see by comparing to my working example). The key seems to only see the first letter of the value being passed to it. How do I get the key to see the entire value?


title: Homework solution x columns

text: I'm writing a book and in its end, I write the exercises solutions. To become with a better layout, I use `multicols` environment, like this:               \begin{multicols}{2}     \setlength{\columnseprule}{0.4pt}       \begin{enumerate}         \item answer 1         \item answer 2       \end{enumerate}     \end{multicols}      But, when an exercise have two or more items, like 1a) 1b) and I write these solutions in another `multicols` environment, the vertical line extends to it. I tried to use `\setlength{\columnseprule}{0.0pt}` to fix it, but when I do, it erases the vertical line. I get something like this:               1.          # 6.      2a)  | b)   # 7.      c)  | d)   # 8.     3.          # 9.     4.          # 10.     5.          # 11.        where `#` means the main vertical line (that I want to keep) and `|` means the vertical line of an exercise (that I tried to erase using `0.0pt`). I hope you understand my problem. Thanks :)


title: Can we display (fx as a movie) all decisions LaTex is making while typesetting our document?

text: I have just thought that it would be amazing to see LaTex in work while making art.


title: How can I change the vertical alignment of a rotated deluxe table?

text: I am working in AASTeX using the `deluxetable` package. I have a deluxe table spanning several pages which I have rotated (using `\rotate`) to the landscape orientation, but the right edge of the table is flush with the top of the page, while there's a bunch of extra space over the page number at the bottom. How can I align my table vertically, either centering it or at least moving it maybe an inch downward? Here's what precedes the `\tablehead{}` command (which is quite lengthy):               \begin{deluxetable}{c l l l l l l l l l l l l l}     \tabletypesize{\scriptsize}     \rotate     \tablecaption{\label{tbl-2}}     \tablewidth{0pt}


title: Positioning a tikz scope relative to another tikz scope

text: In the manual of PGFplots on page 333 the author describes how to position an axis environment relative to another axis environment:               \begin{tikzpicture}         \begin{axis}[name=plot1,height=3cm,width=3cm]             \addplot coordinates {(0,0) (1,1) (2,2)};         \end{axis}         \begin{axis}[name=plot2,at={($(plot1.east)+(1cm,0)$)},anchor=west,height=3cm,width=3cm]              \addplot coordinates {(0,2) (1,1) (2,0)};         \end{axis}     \end{tikzpicture}      Unfortunately, the same for scopes,               \begin{tikzpicture}         \begin{scope}[name=scope1]              \draw (1,2) rectangle (3,4);         \end{scope}         \begin{scope}[at={($(scope1.east)+(1cm,0)$)},anchor=west]              \draw (5,6) rectangle (7,8);         \end{scope}     \end{tikzpicture}      , does not work. How can I get it to work? I am not interested in absolute positioning, but merely in relative positioning.


title: Commutative diagrams side by side have different sizes

text: Within the statement of a theorem, I have two commutative diagrams. I am trying to use pb-diagram to create them, and I would like them to be side by side. Unfortunately the size of the commutative diagrams seem to depend on the size of the symbols at the nodes, and the two commutative diagrams come out to be different sizes. Is there any way to fix this? Here is the code I have right now:               \documentclass[12pt]{amsart}     \usepackage[arrow,matrix,curve,cmtip,ps]{xy}     \usepackage{pb-diagram}      \usepackage{pb-xy}     \usepackage{amsmath,amsthm,amssymb}     \begin{document}     \begin{equation}     \begin{diagram}     \node{\mathcal{C}_R}\arrow{e,t}{P}\arrow{s,l,J}{\Psi}\node {\mathcal{C}_R}\arrow{s,l,J}{\Psi}\\     \node{\widehat{\mathcal{C}}_R}\arrow{e,t}{E(P)}\node{\widehat{\mathcal{C}}_R}     \end{diagram}\hspace{40pt}     \begin{diagram}     \node{\mathcal{C}_{R,\,\operatorname{top}}}\arrow{e,t}{P}\arrow{s,l,J}{\Psi}\node {\mathcal{C}_{R,\,\operatorname{top}}}\arrow{s,l,J}{\Psi}\\     \node{\widehat{\mathcal{C}}_{R,\,\operatorname{top}}}\arrow{e,t}{E(P)}\node{\widehat{\mathcal{C}}_{R,\,\operatorname{top}}}     \end{diagram}     \end{equation}     \end{document}      and here is the result of compiling: ![enter image description here](http://i.stack.imgur.com/yxkee.png)


title: How can I process an array using TikZ 2.00 syntax?

text: I use TikZ/PGF 2.00. In the CVS PGF manual pag. 563 we have               \def\myarray{{1,"two",2+1,"IV","cinq","sechs",sin(\i*5)*14}}     \foreach \i in {0,...,6}{\pgfmathparse{\myarray[\i]}\pgfmathresult, }      My question is: How can do the same but in TikZ/PGF 2.00?


title: how to make the line between two tuples longer?

text: I drawed a picture like a process flow, However, I found the line between two tuples is too short as seen in the following image. ![enter image description here](http://i.stack.imgur.com/33lHD.jpg) How to make the line longer? Here is the code:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{trees}     \resizebox{.5\textwidth}{!}{     \tikzset{level 1/.style={level distance=0.7cm, sibling distance=3cm}}     \tikzset{level 2/.style={level distance=0.7cm, sibling distance=6cm}}          \tikzset{bag/.style={text width=20em, text centered,yshift=-0.2cm}}     \begin{tikzpicture}[grow=down, -stealth]     \node[bag]{$S_0){:}(B,true,0)$}         child{ edge from parent node[right]{}; \node[bag]{$S_1{:}(R_{good}\sq P,true,DS)$}                 child{ edge from parent node[right]{}; \node[bag]{$S_2{:}(and)$}                         child[missing]                         child{ edge from parent node[right=0.1cm]{$[else]$}; \node[bag]{$S_3{:}(A_1,true,DS)$}                             child{edge from parent node[right=0.1cm]{};\node[bag]{$S_5{:}(P_1,true,DS)$}                                child{edge from parent node[right=0.1cm]{$ $};\node[bag]{$S_7{:}(or)$}                                   child[missing]                                   child{edge from parent node[right=0.1cm]{};\node[bag]{$S_8{:}(A_2, FS{>}1,1)$}                                      child{edge from parent node[right=0.1cm]{};\node[bag]{$S_{10}{:}(P_2,FS{>}1,DS{+}1)$}                                         child{edge from parent node[right=0.1cm]{$$};\node[bag]{$S_{12}{:}(or)$}                                         }                                      }                                   }                                   child{edge from parent node[right=0.15cm]{};\node[bag]{$S_9{:}(R_{good},0{<}FS{<}1,DS{+}FS)$}                                     child{edge from parent node[right=0.1cm]{};\node[bag]{$S_{11}{:}(Stop,0{<}FS{<}1,DS{+}FS)\tick$}                                     }                                   }                                }                             }                         }                         child{ edge from parent node[right=0.9cm]{$[if]$}; \node[bag]{$S_4{:}(R_{good}\sq  P,true,DS)$}                             child{edge from parent node[right=0.1cm]{$\lreply \_ User$};\node[bag]{$S_6{:}(Stop,K_{DS\land FS\land PS},DS)\tick$}                             }                         }                 }         };     \end{tikzpicture}}     \end{document}


title: How to vertically center included pdfs?

text: when I'm trying to fill a poster with multiple (landscape) slides, like this:               \documentclass[a0]{sciposter}          % Support for PDF inclusion     \usepackage[final]{pdfpages}               \begin{document}            \includepdf[pages=27-34,nup= 2x8,noautoscale,scale=2]{english.pdf}          \end{document}      the resulting 'figure' starts in the middle of the page going upwards outside of the page. How can I set it to be vertically centered?


title: LaTeX optimal settings for MS Word-like document

text: When you create a new document in Microsoft Word, you get a standard blank document with the right margins. Moreover when that document is exported to PDF, you are satisfied with the layout. Over and over I have tried to get the best out of LaTeX, to make it standard looking but I have failed. Using `fullpage` or `geometry` packages with custom sizes doesn't give best results. What settings would you use if you were to mimic a Word portrait document in LaTeX ? I'm not concerned with fonts, CM fonts are my favourite.


title: Biblatex: Defining author = {} so that it leads to [Keine Autorenangabe] (engl. "no credits") in the output

text: I am using **biblatex** for a paper in linguistics. A friend of mine used the entry "[ohne Autorenangabe]" (engl. something like "no credits") where the sources lacked of an author what holds for example for a number of newspaper articles. But he is working in Word. I was wondering whether it is possible to create some kind of command which produces the [ohne Autorenangabe] output. In the biblatex document it could look like this               @book{example,      author = {},     title = {Meaning of it},      year = 1998,     }      And the output look like this: > [ohne Autorenangabe] (1998): Meaning of it. So the question is, if it is possible to define `author = {}` in a way that it produces the [ohne Autorenangabe] (and maybe an English equivalent). The desired command would be suitable not only for the @book entry. Notice: The entry `author = {Autorenangabe] [Kein}` doesnt lead to the desired result, because it will lead to an output including a comma: [Ohne, Autorenangabe].


title: Import curly brackets from MathDesign (Utopia)

text: I am using Fourier maths fonts with Utopia text (`\usepackage{fourier}`) for a book project, but I'm not satisfied with the curly brackets `\{` and `\}`. They are too slim, and barely distinguishable from other brackets in font size 10. Utopia with MathDesign (`\usepackage[utopia]{mathdesign}`) seems to have better-looking curly brackets. Is there a way of importing just the curly brackets from MathDesign to my document, sticking to Fourier otherwise. And are the curly brackets defined by the maths fonts even if they are used outside math mode, since with MathDesign you get better-looking brackets in normal text, too. * * * Following egreg's answer I added the suggested lines, but the sizes of the bigger brackets are incorrect. When I load type `$\{\bigl\{\Bigl\{\biggl\{\Biggl\{$`, this is what I get: ![enter image description here](http://i.stack.imgur.com/kJyoY.png) After a bit of research, I've found that the cause seems to be the amsmath package. I'm relying on amsmath quite heavily, so it would be nice to find a fix. Unfortunately, I have almost no experience in working with fonts in LaTeX myself. Below is a working example:               \documentclass{article}          \usepackage{amsmath}     \usepackage{fourier}          \DeclareSymbolFont{mdsymbols}     {OMS}{mdput}{m}{n}     \DeclareSymbolFont{mdlargesymbols}{OMX}{mdput}{m}{n}     \DeclareMathDelimiter{\lbrace}        {\mathopen}{mdsymbols}{"66}{mdlargesymbols}{"08}     \DeclareMathDelimiter{\rbrace}        {\mathclose}{mdsymbols}{"67}{mdlargesymbols}{"09}     \renewcommand{\textbraceleft}{%       {\fontfamily{mdput}\fontencoding{OMS}\selectfont\char"66}}     \renewcommand{\textbraceright}{%       {\fontfamily{mdput}\fontencoding{OMS}\selectfont\char"67}}          \begin{document}     $\{\bigl\{\Bigl\{\biggl\{\Biggl\{$     \end{document}


title: How to create text-to-speech compatible header?

text: In Adobe Professional I can add editable header and footer which will be skipped by the text-to-speech module. How can I achive this with latex?


title: LyX: Indent first line inside a numbered list

text: I am using LyX to answer questions for an assignment. Specifically, I am using the numbered list tool to number my answers. Some of the answers are quite long and go over multiple paragraphs, so I am using the following method to have multiple paragraphs inside a single numbered item:   1. Click the "numbered list" button.   2. Type first the paragraph.   3. Hit return to start a new paragraph. This automatically starts a new numbered item.   4. Type the second paragraph.   5. Click the "default" button next to the "numbered list" button, or change the type to standard. This removes the undesired number from the start of the paragraph and indents the first line, but the entire paragraph is unaligned with the first paragraph.   6. Hit tab, or hit alt+shift+right, or click the "increase depth" button. This aligns the second paragraph with the first, but removes the indent from the first line. The result of the above steps looks likes this:               1. This is the first paragraph.        This is the second paragraph,        here it is wrapped around,        and wrapped around some more.      This is what I would like it to look like:               1. This is the first paragraph.           This is the second paragraph,        here it is wrapped around,        and wrapped around some more.      I can achieve the desired result by hitting ctrl+space a couple times before each new paragraph, but would like a better (less duplication of effort) method. This is similar to this question, except that I want indentation inside the list, not after. At the time of posting, the other question has no accepted solution. Note that this requirement is self-imposed purely to make for easy reading. Alternative suggestions to the same end will also be appreciated! EDIT: The tex source, copied and pasted:               \documentclass[english]{article}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \usepackage{babel}     \begin{document}     \begin{enumerate}     \item This is a paragraph.               This is another paragraph.\end{enumerate}          \end{document}      Running through pdf-latex gives the original result, i.e. no first-line indentation.


title: Numbering in Beamer handout

text: Consider the following MWE.               \documentclass[handout]{beamer}     \newcounter{slidenumber}     \defbeamertemplate*{footline}{infolines theme frame plus slide}{         \setcounter{slidenumber}{\insertpagenumber}%         \addtocounter{slidenumber}{-\insertframestartpage}%         \addtocounter{slidenumber}{1}%         \leavevmode%         \hbox{%             \begin{beamercolorbox}[wd=\paperwidth,ht=2.25ex,dp=1ex,center]{date in head/foot}%                 \insertframenumber(\alph{slidenumber}{})/ \inserttotalframenumber\hspace*{2ex}             \end{beamercolorbox}}%             \vskip0pt%         }     \setbeamertemplate{footline}[infolines theme frame plus slide]          \begin{document}          \begin{frame}       \only<handout:1>{Handout 1 of frame 1}       \only<handout:2>{Handout 2 of frame 1}     \end{frame}          \begin{frame}       Frame 2     \end{frame}          \end{document}      Frame 1 has two slides, I want to number them as `1(a)/2`, `1(b)/2`. Frame 2 has only one slide, and is currently numbered as `2(a)/2`. However, I want to number it as `2/2`. In general, I want frames with multiple slides numbered as               <frame_num>(<slide_num_in_frame>)/<total_frame_num>      and frames with only one slide numbered as               <frame_num>/<total_frame_num>      How can I achieve this effect?


title: Preserving thousands separator with siunitx

text: I'm writing a paper and my advisor is requiring that all large numbers have a comma as a thousands separator. I've read this question which asks about how to make `siunitx` not throw errors when there is a comma in the input, but how can I force a comma in the output when using `\SI`? Ideally it would only do it for numbers with more than 4 digits -- ie. `\SI{9000}` would not contain a space or comma but `\SI{10000}` would be `10,000`. But if that's not possible, I'd settle for `9,000` also.


title: Beamer XeTeX Right to Left

text: I am preparing Farsi slides in beamer which is a right to left language just like Hebrew. I have problems in the presentation which I briefly discuss:   * The TOC is left to right:   ![alt text](http://i.stack.imgur.com/UIRE0.jpg)   * The itemize can be forced to be right to left but it flushes to the left   ![alt text](http://i.stack.imgur.com/CJrl0.jpg)   * the frame title is shown in the left (this one is solved thanks to Mr.Vafa Khalighi the solution is `\setbeamertemplate{frametitle}[default][right]` command) ![alt text](http://i.stack.imgur.com/AbLgM.jpg) I found this web site very helpful to solve some problems, but the mentioned problems are still unresolved. the code is shown below               % XeLaTeX can use any Mac OS X font. See the setromanfont command below.     % Input to XeLaTeX is full Unicode, so Unicode characters can be typed directly into the source.          % The next lines tell TeXShop to typeset with xelatex, and to open and save the source with Unicode encoding.          %!TEX TS-program = xelatex     %!TEX encoding = UTF-8 Unicode          \documentclass[11pt]{beamer}     \usetheme{Warsaw}     \usecolortheme{crane}     %\usepackage{geometry}                % See geometry.pdf to learn the layout options. There are lots.     %\geometry{letterpaper}                   % ... or a4paper or a5paper or ...      %\geometry{landscape}                % Activate for for rotated page geometry     %\usepackage[parfill]{parskip}    % Activate to begin paragraphs with an empty line rather than an indent     \usepackage{graphicx}     \usepackage{amssymb}               % Will Robertson's fontspec.sty can be used to simplify font choices.     % To experiment, open /Applications/Font Book to examine the fonts provided on Mac OS X,     % and change "Hoefler Text" to any of these choices.     \TeXXeTstate=1     \usepackage{fontspec,xltxtra,xunicode}      \usepackage{bidi}     \defaultfontfeatures{Mapping=tex-text}     \setromanfont[Mapping=tex-text]{X Zar}     \setsansfont[Scale=MatchLowercase,Mapping=tex-text]{Gill Sans}     \setsansfont[Scale=MatchLowercase,Mapping=tex-text]{X Zar}     \setmonofont[Scale=MatchLowercase]{X Zar}     % \newfontfamily{\A}{X Zar}               \title{امنیت در اجرای همروند یک پروتکل احراز اصالت}     \author{یاسر صبحدل}     \date{\today}          \begin{document}     \frame{\titlepage}          \section[چارچوب]{}     \frame{\tableofcontents}          %\maketitle          % For many users, the previous commands will be enough.     % If you want to directly input Unicode, add an Input Menu or Keyboard to the menu bar      % using the International Panel in System Preferences.     % Unicode must be typeset using a font containing the appropriate characters.     % Remove the comment signs below for examples.               % \newfontfamily{\H}[Scale=0.9]{Lucida Grande}     % \newfontfamily{\J}[Scale=0.85]{Osaka}     \section{مقدمه}     \subsection{مروری بر پروتکلهای احراز اصالت}          \frame     {     \frametitle{محاسبات چندجانبه امن}     \begin{flushright}     از ۳ منظر مورد بررسی قرار می‌گیرد:\\     \end{flushright}     \setRL     {     \begin{itemize}     \item مورد اول     \item مورد دوم     \end{itemize}     }     }          \end{document}      BTW, I just didn't use the `\newfontfamily` command because the whole document is persian and only some words are english, so I changed the main font with a persian one.


title: A LaTeX editor between TexShop and Texmaker for Mac OS?

text: I was using `TexShop` for a while due to its simplicity. But recently discovered `Texmaker` which makes it so much easier to type common functions (auto completion) and double compile before exporting as PDF. I realised that `Texmaker` scrolls in one-line intervals, as in it skips a whole line when scrolling. This provides a choppy experience while editing the code. And the buttons on the left tend to disappear when my mouse runs over them. However, `TexShop` provides a finer resolution when scrolling and hence a smoother experience when editing the code (plus the program is not as laggy as `Texmaker` due to less features). Is there another editor that combines the simplicity + smoothness of `TexShop` and the efficiency + features of `Texmaker` in one program ? Maybe another editor that I may have missed ? * * * Note: I do know there are comparisons available online etc, but I want something specific here; an editor that combines features from both TexShop and Texmaker.


title: Is it possible to load a package before the Lyx preambule?

text: I was wondering if it was possible to edit the packages that `Lyx` load before the preamble. When I unse xelatex lyx load the package fontspec. The problem is that I load in the preambule the package cmbright and if I do it in this order the text turn to serif. From the exported `TeX` file from `Lyx` I switched the order of the two packages (first `cmbright` and then `fontspec`) and it works perfectly. So does anybody know how to edit the packages that Lyx automatically load? Thanks!


title: Problem with a matrix

text: I have to write a matrix, my code is               \documentclass[a4paper]{article}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[italian]{babel}     \begin{document}      \begin{itemize}     \item Esercizio 165      $\begin{matrix}     1  &   h\\      h & -1\\     1  & -1     \end{matrix}$     \end{itemize}     \end{document}      I obtain:                ! Misplaced alignment tab character &.     l.13 1  &                 h\\     ?       What's the problem ?


title: How to get the head number (only a digital) in ConTeXt MKIV?

text: In my country, we usually don't use number 1, 2 ... as the head number (the section number, the chapter number and so on) but our own characters, for instance, the `一` stands for number `1`, the `二` stands for number `2`, the `十` stands for `10`. Now, all my teachers, maybe you have known what I mean, I hope that I can get the head number, for example, the section number, so, I can define a macro called `\def\mysectionnumbers#1{...}` and pass it to the option `numbercommand` in the `\setuphead[section][...,numbercommand={\mysectionnumber},...]` so that I can change the section number into the `一` `二` above. But, the `#1` in the `numbercommand = \...#1` is not only a digital, so I can't use the `\ifnum` or `\ifcase`. It seems like that it is the `...\getheadnumber...`. How can I get the head number and change it? By the way, what's the replacement text of `\getheadnumber`?


title: Block element characters (pmboxdraw) are shown too wide in verbatim and Verbatim (fancyvrb) environments

text: I want to put source code into _verbatim_ and _Verbatim_ (fancyvrb) environments that uses box-drawing characters from codepage 850 (0xDB, 0xDC, 0xDF) (see http://en.wikipedia.org/wiki/Code_page_850). By using a text editor I converted the source code file to Unicode and created the following minimal example in LaTeX (source code is taken from tube by 3SC (http://www.pouet.net/prod.php?which=3397) FWIW):               \documentclass[a4paper]{scrbook}     \usepackage{fancyvrb}     \usepackage[utf8]{inputenc}     \usepackage{pmboxdraw}     \author{Wolfgang Keller}     \title{Minimal example}          \begin{document}          \begin{verbatim}     ;  (▄) ( ) ▄ ) ( )   256b intro by baze/3SC for Syndeecate 2001   use NASM to     ;  ▀█▀ █▄█ ███ ██▄   loveC: thanks, Serzh: eat my socks dude ;]   compile the     ;  ( ) ( ) ( ) ( )   e-mail: baze@stonline.sk, web: www.3SC.sk    source code     \end{verbatim}          \begin{Verbatim}[commandchars=\\\{\}]     ;  (▄) ( ) ▄ ) ( )   256b intro by baze/3SC for Syndeecate 2001   use NASM to     ;  ▀█▀ █▄█ ███ ██▄   loveC: thanks, Serzh: eat my socks dude ;]   compile the     ;  ( ) ( ) ( ) ( )   e-mail: baze@stonline.sk, web: www.3SC.sk    source code     \end{Verbatim}     \end{document}      The problem is: the block elements are drawn far too wide - destroying the ASCII art. And the documentation of pmboxdraw (ftp://ftp.ctan.org/tex- archive/macros/latex/contrib/oberdiek/pmboxdraw.pdf) doesn't really tell me how to solve this problem.


title: Draft watermark image just in a \section

text: Is it possible to have a draft watermark only in a `\section`? EDIT: I have in a document more then one `\section`, and I need the `draftwatermark` just in some `\section`. Unfortunately the section with and without the `draftwatermark` share the page. For example I want the `draftwatermark` under the text of just one of these sections A,B,C               \documentclass{article}          \usepackage{kantlipsum} % supply mock text          \begin{document}          \section{A}          \kant[2]          \section{B}          \kant[2-4]          \section{C}          \kant[2]          \end{document}


title: how to have the journal name shown when I cite a paper in beamer?

text: I am writing a `beamer` presentation and I would like citations to appear (in the text!) like > [Doe et al., Journal of Latex Greatness, 2007] Instead if I use only the `\cite{}` command (together with `apalike` bibliography style) I only get the author and date: > [Doe et al., 2007] Do you have any ideas? I use a large BiBTeX file that stores all the relevant information.


title: How to typeset the house of an algebraic number?

text: I would like to reproduce the following text ![inequality involving the house of an algebraic integer](http://i.stack.imgur.com/9r4ZB.png) but I couldn't find the house symbol neither through Detexify nor by looking through the Comprehensive LaTeX Symbol List. I also tried combining vertical bars and overline like               \left\lvert\overline{ \alpha }\rvert\right     \overline{\left\lvert \alpha \rvert\right}      to less than desirable results.


title: How to insert Horizontal cut in delta symbol?

text: How do we write the Greek delta symbol with a cut in it as in `\hbar` (which produces a cut in h)?


title: how to prevent cell color to cover table's borders?

text: When I change the background color of a cell in a table, the color covers the borders, however I want the horizontal lines to remain. I have a simple command `\cellcolor[gray]{0.9}` in my table. Can anybody help me with this problem?


title: Special layout with multi-page table in ConTeXt

text: I have a special layout of page to make. It contains blocks of text, a graph and tables. I don't know in advance the length of the tables in the document. I have a dummy two tables example to show what I want to do. ![sample document](http://i.stack.imgur.com/Ighhv.png) And the code to do that is here:                   \setupcolors[state=start]         \setuplayout[backspace=20mm,         topspace=20mm,         header=0mm,          footer=10mm,         leftedge=0.5in,         rightedge=0.5in,         width=fit,         rightmargin=0mm]              \starttext              \startuseMPgraphic{FunnyFrame}         picture p ; numeric o ; path a, b ; pair c ;         p := textext.rt(\MPstring{FunnyFrame}) ;         o := BodyFontSize ;         a := unitsquare xyscaled(OverlayWidth,OverlayHeight) ;         pickup pencircle scaled OverlayLineWidth ;         b := a  ;         fill b withcolor .5[white, blue] ;         draw b withcolor .5[white, blue] ;         setbounds currentpicture to a ;         \stopuseMPgraphic              \defineoverlay[FunnyFrame][\useMPgraphic{FunnyFrame}]         \defineblank[aroundFrame][1pt]         \defineframedtext[FunnyText][frame=off,background=FunnyFrame,align={middle,hilo}, color=white,backgroundoffset=0pt,offset=3pt,width=\hsize,margin=no,before={\blank[aroundFrame]},after={\blank[aroundFrame]}]         \def\StartFrame{\startFunnyText}         \def\StopFrame {\stopFunnyText }         \setMPtext{FunnyFrame}{} % initialize the text variable                   \defineparagraphs[DetailTablesColumns][n=2, distance=0pt, tolerance=very tolerant]         \setupparagraphs[DetailTablesColumns][1][width=2.5cm]              \setupTABLE[row][each][framecolor=white,rulethickness=2pt,frame=on]         \setupTABLE[row][even]         [background=color,backgroundcolor=white,frame=off]         \setupTABLE[row][odd]         [background=color,backgroundcolor=gray,frame=off]         \setupTABLE[header][each]         [background=color,backgroundcolor=darkblue,foregroundcolor=white,style=bold]         \setupTABLE[column][each][width=.25\hsize]              \startDetailTablesColumns         \StartFrame[width=\hsize]         Some funny title              With subtitle         \StopFrame         \DetailTablesColumns         \bTABLE[align=right,option=stretch,split=repeat]         \bTABLEhead         \bTR         \bTH A1 \eTH \bTH B1 \eTH \bTH C1 \eTH \bTH D1 \eTH         \eTR         \eTABLEhead         \bTABLEbody         \dorecurse{3}         {         \bTR         \bTD 1 \eTD \bTD 2 \eTD \bTD 3 \eTD \bTD 4 \eTD         \eTR         }         \eTABLEbody         \eTABLE         \stopDetailTablesColumns              \startDetailTablesColumns         \StartFrame[width=\hsize]         Another funny title              Still with subtitle         \StopFrame         \DetailTablesColumns         \bTABLE[align=right,option=stretch,split=repeat]         \bTABLEhead         \bTR         \bTH A \eTH \bTH B \eTH \bTH C \eTH \bTH D \eTH         \eTR         \eTABLEhead         \bTABLEbody         \dorecurse{26}         {         \bTR         \bTD 1 \eTD \bTD 2 \eTD \bTD 3 \eTD \bTD 4 \eTD         \eTR         }         \eTABLEbody         \eTABLE         \stopDetailTablesColumns         \startDetailTablesColumns         \StartFrame[width=\hsize]         Another funny title              Still with subtitle         \StopFrame         \DetailTablesColumns         \bTABLE[align=right,option=stretch]         \bTABLEhead         \bTR         \bTH A \eTH \bTH B \eTH \bTH C \eTH \bTH D \eTH         \eTR         \eTABLEhead         \bTABLEbody         \dorecurse{24}         {         \bTR         \bTD 1 \eTD \bTD 2 \eTD \bTD 3 \eTD \bTD 4 \eTD         \eTR         }         \eTABLEbody         \eTABLE         \stopDetailTablesColumns              \stoptext      I would want to be able to define my table only once, as this is dynamically generated. Any idea ? I used paragraphs because that seemed to work, but I'm open to trying something else if needed.


title: In Lyx, I am trying to create a module for "Illustration"

text: I am trying to create `Illustration` drop down in Lyx. For this I am creating a module in the lines of `theorems-ams-bytype.module` and `theorems-ams- bytype.inc`. This is the code inside it:               Style Example     CopyStyle             Definition     LatexName             example     LabelString           "Illustration \theexample."     Preamble      \theoremstyle{definition}       \newtheorem{example}{\protect\examplename}[chapter]     EndPreamble     Requires              amsthm     LangPreamble       \providecommand{\examplename}{_(Illustration)}     EndLangPreamble     BabelPreamble       \addto\captions$$lang{\renewcommand{\examplename}{_(Illustration)}}     EndBabelPreamble     LabelCounter          example     End      What should be done in the code so that I will be able to get a nice `tikz` box or using `mdframe` some gray rounded box around the `illustration` box. Right now the illustration looks like a example (coming from `theorem` style) but I want it should look like the concept box below. ![enter image description here](http://i.stack.imgur.com/94TsP.png)


title: SIrange with leading plus

text: When using `siunitx`, by default, `\SIrange{-4}{+6}{\percent}` will render > -4% to 6%. Is there any general way to change rendering of the positive values with a leading "+" for the positive values? > -4% to +6%


title: Organisation chart in latex using tikz

text: I would like to do a organisation chart with pictures, name, mobile.nr and email in each node... I tried with the tikz tree bit failed. How can i add pictures in a node? ![Chart over the organisation](http://i.stack.imgur.com/MFChj.png) Can someone help me? Please


title: Frame individual cells in a table

text: I'm aiming to make an RPG character sheet in LaTeX, but I'm having a little trouble with the boxes one usually asociates with this kind of thing. Is there a way to individualy frame table cells in some kind of automated manner? The MWE below has the distinct disadvantage that `fbox`s in different places are not guaranteed to line up. Any solution would ideally allow the 'Wounds' `fbox` to be perfectly aligned (possibly with the use of `multirow` and `multicolumn`) with the other boxes. Also, more automated than the solution below (so if for some reason a number/description gets to big for a box, the whole sheet doesn't need redesigning). The closest I've got to what I'm after, ![MWE example](http://i.stack.imgur.com/TEmH4.png)               \documentclass{article}     \usepackage[margin=0.5cm,footskip=0.25in]{geometry}     \usepackage{array}     \usepackage{multicol}          \newcommand\fpbox[2]{\fbox{\parbox{#1}{\centering #2}}}     \newcommand\fphbox[3]{\fbox{\parbox[c][#1][t]{#2}{\centering #3}}}     \newlength\cs     \setlength\cs{0.2cm}     \setlength\fboxsep{0.1cm}     \newcommand\hs{\hspace{\cs}}     \begin{document}          \noindent     \begin{tabular}[c]{c@{\hs}c@{\hs}c@{\hs}c@{\hs}c}     \fpbox{1cm}{STR} & \fpbox{0.7cm}{14}& \fpbox{0.7cm}{0} &\fpbox{0.7cm}{0}& \fpbox{0.7cm}{0}\\[\cs]     \fpbox{1cm}{DEX}& \fpbox{0.7cm}{10} &\fpbox{0.7cm}{0} &\fpbox{0.7cm}{0}& \fpbox{0.7cm}{0}\\[\cs]     \end{tabular}     \begin{minipage}{4cm}     \begin{tabular}[c]{ccc}       \multicolumn{3}{l}{Wounds/Current HP}\\       \multicolumn{3}{l}{\fphbox{1.25cm}{4.4cm}{\hspace{0pt}}}       \end{tabular}     \end{minipage}     \end{document}


title: How do I put a figure* before my abstract?

text: I'm sadly not using double-column abstract, just single-column. This is based on the sigchi document class: https://code.google.com/p/sigchi-latex/ The obvious thing:               \documentclass{sigchi}     \begin{document}     \title{My awesome paper}     \maketitle     \begin{figure*}     \centering         \includegraphics[width=7in]{figures/teaser.png}     \caption{Some stuff about the teaser}     \label{fig:teaser}     \end{figure*}     \begin{abstract}Talking some more.\end{abstract}     \end{document}      Does not seem to work. What is the correct way to do this? Note that Place a two-column picture under the author affiliation and above abstract is not exactly what I want: I need a caption for my figure, still. So I've tried also               \documentclass{sigchi}     \usepackage{caption}     \begin{document}     \title{My awesome paper}     \makeatletter     \let\@oldmaketitle\@maketitle% Store \@maketitle     \renewcommand{\@maketitle}{\@oldmaketitle% Update \@maketitle to insert...       \includegraphics[width=7in]         {figures/teaser.png}\bigskip}% ... an image     \captionof{figure}{Some fun facts about my image.}     \label{fig:teaser}     \makeatother          \maketitle     \end{document}      So that my figure shows up, however my caption does not show up below it; just on the second page...?


title: how to add number to the title of sections and subsection using the titlesec package

text: I am using the `titlesec` package but the numbering of section and subsections disappeared. I need to retrieve it. my code is               \titleformat{\section}[block]{\color{blue}\Large\bfseries\filcenter}{}{1em}{}     \titleformat{\subsection}[hang]{\bfseries}{}{1em}{}          I need to achive the following specs: Main headings: Arial, Size 12, Bold, Uppercase, Center Justified. Sub-headings: Arial, Size 12, Bold, Title case, Left Justified.


title: How to format subitems

text: I have the following code:               \documentclass{beamer}     \usetheme{Hannover}     \begin{document}         \begin{frame}             \begin{enumerate}                 \item This is 1                 \begin{enumerate}[a]                     \item This is a                 \end{enumerate}             \end{enumerate}         \end{frame}     \end{document}      This gives me: ![output from beamer](http://i.stack.imgur.com/w0BsK.png) Note that the bullet for subitem `a` does not have proper format like `1`. How can I achieve this?


title: Suppress something if at the end or beginning of a page

text: I would like to suppress the horizontal rule between the `mdframed` boxes if it occurs at the top or bottom of a page. I found this partial solution which makes use of `\cleaders`. But it is nor working. See my 3 pages: ![enter image description here](http://i.stack.imgur.com/CvnMn.png) I'm using `\par\cleaders\vbox to 0.4pt{\hrule width\linewidth}\vskip0.4pt` after `\end{mdframed}` and so on page 1 there are 3 of them. But I'd like only 2 between those 3 boxes. ## Minimal code               \documentclass{amsart}     \usepackage{lipsum}     \usepackage[nobreak]{mdframed}          \newcommand{\divider}{%     \vspace{2ex}     \par\cleaders\vbox to 0.4pt{\noindent\rule{\linewidth}{2pt}}\vskip0.4pt%     \vspace{2ex}     }     \begin{document}          \begin{mdframed}     \lipsum[1-2]     \end{mdframed}     \divider          \begin{mdframed}     \lipsum[3]     \end{mdframed}     \divider          \begin{mdframed}     \lipsum[1]     \end{mdframed}     \divider          \begin{mdframed}     \lipsum[1]     \end{mdframed}     \divider          \end{document}      ![enter image description here](http://i.stack.imgur.com/5fG4Y.png)


title: Definition of PSTricks constant

text: Consider the following example. **Code**               % pdflatex -shell-escape test.tex          \documentclass{article}          \usepackage{auto-pst-pdf,pstricks-add}     \usepackage[locale=DE]{siunitx}          \definecolor{nicered}{rgb}{0.796,0.255,0.329}          \begin{document}          \begin{figure}     \def\WidthPallet{46 }     \def\length{22.8 }     \def\height{5.4 }     \def\rows{2 }     \def\EachRow{8 }     \edef\faktor{\the\numexpr\EachRow/\rows\relax\space}     %\edef\startX{\the\numexpr(\WidthPallet-\EachRow*\height)/2\relax\space}     \def\startX{\WidthPallet \EachRow \height mul sub 2 div}     %\edef\startX{\the\numexpr(\WidthPallet-\rows*\length)/2\relax\space}     \def\startY{\WidthPallet \rows \length mul sub 2 div}      \centering      \psset{        unit=0.26cm      }       \begin{pspicture}(\WidthPallet,\WidthPallet)         \psframe[          fillstyle=solid,          fillcolor=brown         ](0,0)(\WidthPallet,\WidthPallet)        \psset{          fillstyle=solid,          fillcolor=nicered,          dimen=middle        }         \rput(!\startX\space \startY\space){%           \multido{\rA=0+\height}{\EachRow}{%             \multido{\rB=0.0+\length}{\rows}{%               \psframe(\rA,\rB)(!\rA\space \height add \length \rB\space add)             }           }         }        \psset{          linestyle=dashed,          fillcolor=nicered,          arrows=<->,          nrot=:U,          offset=-19pt        }         \pcline(!\startX\space 0.6 \WidthPallet mul)(!\startX\space \height add 0.6 \WidthPallet mul)         \ncput*{\scriptsize\SI{\height}{\cm}}         \pcline(!\startX\space \startY\space)(!\startX\space \length \startY\space add)         \ncput*{\SI{\length}{\cm}}         \pcline(!0 0.65 \WidthPallet mul)(!\WidthPallet 0.65 \WidthPallet mul)         \ncput*{\SI{\WidthPallet}{\cm}}       \end{pspicture}     \end{figure}          \end{document}      **Output** ![enter image description here](http://i.stack.imgur.com/jhDYr.jpg) **Question** Why can't I replace               \def\startX{\WidthPallet \EachRow \height mul sub 2 div}     \def\startY{\WidthPallet \rows \length mul sub 2 div}      by               \edef\startX{\the\numexpr(\WidthPallet-\EachRow*\height)/2\relax\space}     \edef\startX{\the\numexpr(\WidthPallet-\rows*\length)/2\relax\space}      in order to get rid of some of the `\space`s?


title: How to use BibTex correctly

text: I've tried to write this into a `.tex` file and in the same folder in which this file is put, I've added a `bibli.text` file. .tex file's code               \documentclass{article}          \usepackage[latin1]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[francais]{babel}               \begin{document}          J'insère le premier \cite{Uml}.          \bibliography{bibli} % mon fichier de base de données s'appelle bibli.bib          \end{document}      bibli.bib file's code :               @book{Uml,         author    = {P. Roques et F. Vallée},         title     = {De l’analyse des besoins à la conception},         journal = {UML en action},         edition  = {Quatrième},         publisher = {Eyrolles},         date      = {01/03/2007},         location   = {France},         pages     = {381},         }      To build this, I've :   * compiled for 2 times.   * Build > BibTex.   * compiled for 2 times. _OS : Windows_ **Edit :** That in the the `Outline` the full structure of the BibTex file is putted by the compiler. I've no error message while compiling but The bibliography written into my bibli.tex is not included in the pdf file result.


title: Prevent wrapping of subfloat captions

text: Because the images in my `\subfloat`s are smaller than their captions, captions are wrapped to the next line. How can I prevent it? * * * ## Update I was wrong assuming `subfig` is a popular package so, here is more info about my problem.               \usepackage{subfig}     % ...more latex here     \begin{figure}     \centering     \subfloat[A sufficiently long caption]{\includegraphics{bakan}} \qquad     \subfloat[Here goes another long caption]{\includegraphics{bakan}} \qquad     \subfloat[The captions are broken]{\includegraphics{bakan}}     \caption{Line breaks in subcaptions demo.}     \end{figure}      The code above produces: ![alt text](http://i.stack.imgur.com/bCXkL.png) When the images are small, subcaptions look ugly.


title: Compile time optimized "area under analytical curve" plotting with pgfplots?

text: There are some question regarding how to plot an area under a curve with `pgfplots`. But as far as I can see, all the answers have in common that a function has to be plotted twice with different style options. Example, Pgfplots: how to fill the area under a curve with oblique lines (hatching) as a pattern? That's also the way I do it currently. Here is an easy working example to play with:               \begin{tikzpicture}[/pgf/declare function={f=1-exp(-x*x);}]       \begin{axis}[axis x line=center]         \addplot [domain=-2:2, samples=500, red, fill] {f} \closedcycle;         \addplot [domain=-5:5, samples=500] {f};       \end{axis}     \end{tikzpicture}      But especially if one has many plots with non-trivial functions (needing a lot of samples to look smooth!) this can lead to long compile times. Just setting down the samples for the area filling plot often is not enough, because then some of the area will "overhang" on the wrong side of the curve due to the rough sampling of the plot. **Is it possible to achieve the same output with just plotting the function once to significantly reduce the compile time?**


title: Alphabetizing a customized List of Abbreviations

text: I maintain a style file which offers a list of abbreviations. The most common request that I get is to provide a way to alphabetize the list. The entries in the list file myThesis.loabb look like this:               \contentsline {abbreviation}{\hbox to\@tempdima {GPS\hfil }{Global Positioning System}}{1}  {section*.6}     \contentsline {abbreviation}{\hbox to\@tempdima {GNSS\hfil }{Global Navigation Satellite System}}{1}{section*.6}     \contentsline {abbreviation}{\hbox to\@tempdima {SDR\hfil }{Software Defined Radio}}{2}{section*.8}     \contentsline {abbreviation}{\hbox to\@tempdima {RF\hfil }{Radio Frequency}}{5}{section*.14}     \contentsline {abbreviation}{\hbox to\@tempdima {ASIC\hfil }{Application Specific Integrated Circuit}}{6}{section*.16}     \contentsline {abbreviation}{\hbox to\@tempdima {DSP\hfil }{Digital Signal Processor}}{6}{section*.17}      We have a requirement to present our lists in a custom format, so I would prefer a script to reorder the entries of the loabb file in alphabetical order. Ideas?


title: No .bbl generated

text: I am having issue with generating references using TeXworks. Bibtex does not generate .bbl file, and the citation in the pdf appears only with [?]. Here is my pdflatex code:               \documentclass{article}     \begin{document}     As is discussed in \cite{power}     \bibliographystyle{plain}     \bibliography{ref}     \end{document}      Here is my bibtex code with only one entry:               @misc{power,     title = {Compressive Sensing: The Big Picture},     author = {Carron, I.},     year = 2013,     howpublished = {\url{ https://sites.google.com/site/igorcarron2/cs#reconstruction}}     }      I compiled them in this manner: pdflatex, bibtex, pdflatex, pdflatex. But the bibliography does not show and the citation is only [?]. What seems suspicious is that no .bbl file is generated although bibtex has been run many times. Can anyone help me?


title: plastex the memory dump could not be found

text: I have been using MikTeX 2.9 along with Texworks on Windows 7 for a long time and a variety of projects and they work superbly. Today I installed PlasTeX which was a hassle because the platex documentation failed to mention the need to create a .bat file in \Python\Scripts\ so that the command plastex can be found from elsewhere (see [1]):               c:\python27\python.exe c:\python27\Scripts\plastex %*      The remaining problem is that when executing plastex I get "the memory dump could not be found". What can I do? [1] Install plasTeX on Windows 7


title: Footline placement after \begin{document}

text: I'm trying to place an image as a border in the footer (`footline`) of a `beamer` presentation. I've noticed that if I use `\setbeamertemplate{footline}[large]` after the `\begin{document}`, the vertical placement is too low to show the image. If I use it before `\begin{document}`, then it gets placed correctly. In the final presentation, some slides (such as the title slide) will have this, but more will not, which is why I don't want to set it globally above `\begin{document}` and then suppress it on the slides which don't have it. What I'm trying to do would look like:               \defbeamertheme{footline}{large}{           \leavevmode           \includegraphics[width=\paperwidth]{images/banner.pdf}           \begin{tikzpicture}[overlay]               \node at (-.845\paperwidth,.05\paperheight) {               \includegraphics[width=.15\paperwidth]{images/logo.png}               };           \end{tikzpicture}      }           \begin{document}      {\setbeamertemplate{footline}[large]          \begin{frame}              \titlepage          \end{frame}      }      \begin{frame}{Frame without footline}          Text      \end{frame}      \end{document}


title: Splitting/breaking a long table from an input file

text: I am input a file in my main latex file but the table (inputfiles contains a table) is too long to be on apage. How can I break it on two or main pages.               \usepackage{longtable} %%               \IfFileExists{file}{%     \begin{table}     \begin{center}     \caption{Grenzwertverletzung [st]}     \begin{tabular}{ll}     st&  \input{file} \\     \end{tabular}     \end{center}     \end{table}     }{}       ![enter image description here](http://i.stack.imgur.com/1v1Pu.jpg)


title: The most convenient file format to switch between latex and a word processor back and forth

text: I have to work on a project to create some docs, the problem is that the others have to only consider the content of docs while I care about the font, the margin, and all the others stuff with latex. There is some pratical solution to that? I was interested in some editors like LyX but i experienced some problems especially while opening "pure" tex files. I'm looking for every solution that can solve my problem: a new editor with its own file format, a new file format compatible with some editor, a plugin, everythin that can solve my problem.


title: Biblatex-apa: numbered, annotated bibliography using \fullcitebib?

text: **EDIT #3:** The code below has been updated to what I'm currently using, from the post at http://tex.stackexchange.com/a/91381/24264; note that I've added a field to my bibentry (`annote`) as part of this fix. I've decided to **_forgo adding the numbering_** , since it seems to be more trouble than it's worth, and my prof may end up seeing it as against APA style, anyway :) **EDIT #2:** I arrived at a satisfactory fix for the issue from EDIT #1 (reflected in the code below), but I would still like the annotation(s) to line up with the numbered references--"Howlin" and the word "Annotations" in my example. Can anyone tell me how to accomplish this? **EDIT #1:** @Guido was very helpful with my main question. At this point, I'm trying to insert a "References" page that mimics the vertical spacing of `\printbibliography` in the current document--and I've, again, run into a gap in my knowledge. _Original post:_ My goal is to create an annotated bibliography in APA format (for a term paper due in April). Up to now, my only experience with biblatex is the simple `\printbibliography` command. Having done some searching, I was looking to replicate the solution here, but I get no joy, even when I stick as closely as possible to Alan's original example; \fullcitebib itself works without a hitch, as long as Alan's code--starting with `\newcounter{bibnum}` and ending with `{\end{thebibliography}}`--is not present. When I insert the code block, I get the following errors at compile time:               ! Undefined control sequence.     \blx@precode ...egin {thebibliography}\thebibitem     l.91 \fullcitebib{howlin04}          ! LaTeX Error: Something's wrong--perhaps a missing \item.     See the LaTeX manual or LaTeX Companion for explanation.     ...     l.91 \fullcitebib{howlin04}      My question (if you can call it a question, rather than a "please tell me how this is done") is why my MiKTeX seems to be behaving strangely--I don't have enough LaTeX knowledge to understand how `\thebibitem` is properly defined, and thus fix the problem. Here is my minimal example:               \documentclass[man,12pt,noextraspace]{apa6}     \usepackage{filecontents}     \shorttitle{Cog paper}          \begin{filecontents}{cogsources.bib}      @article{howlin04,     author = {Howlin, Patricia and Goode, Susan and Hutton, Jane and Rutter, Michael},     title = {Adult outcome for children with autism},     journal = {Journal of Child Psychology and Psychiatry},     volume = {45},     number = {2},     publisher = {Blackwell Publishing},     issn = {1469-7610},     url = {http://dx.doi.org/10.1111/j.1469-7610.2004.00215.x},     doi = {10.1111/j.1469-7610.2004.00215.x},     pages = {212--229},     keywords = {Autistic disorder, prognosis, adulthood, follow-up studies},     year = {2004},     annote = {Annotations go here.},     }     \end{filecontents}          %% fontspec     \usepackage{fontspec}     \setmainfont[Ligatures=TeX]{Times New Roman}          %% bibliography     \usepackage[canadian]{babel}     \usepackage{csquotes}     \usepackage[style=apa,backend=biber,sortcites=true,sorting=nyt,language=american]{biblatex}     \DeclareLanguageMapping{american}{american-apa}     \addbibresource{cogsources.bib}          %% annote     \renewbibmacro*{finentry}{%       \iffieldundef{annotation}         {\finentry}         {\setunit{\finentrypunct\par\vspace{\bibitemsep}\nobreak}          \printfield{annotation}%          \finentry}}              \begin{document}          \printbibliography     \nocite{howlin04}          \end{document}


title: How to save a figure produced by tikz save/export as EPS file

text: I use MiKTeX 2.9 and `tikz` package and use TeXworks to make simple figures, these are saved in pdf file by pdfLaTeX. I wish to have them as EPS file. I read here: Export eps figures from TikZ I use a simple example               \documentclass{article}     \usepackage{tikz}          % set up externalization     \usetikzlibrary{external}     \tikzset{external/system call={latex \tikzexternalcheckshellescape -halt-on-error     -interaction=batchmode -jobname "\image" "\texsource" &&      dvips -o "\image".ps "\image".dvi &&     ps2eps "\image.ps"}}     \tikzexternalize[shell escape=-enable-write18] % MikTeX uses a -enable-write18 instead of --shell-escape.          \begin{document}     \begin{tikzpicture}     \draw (0,0) circle (1cm);     \end{tikzpicture}     \end{document}      and get the following error:               ===== 'mode=convert with system call': Invoking 'latex -halt-on-error -interact     ion=batchmode -jobname "untitled-1-figure0" "\def\tikzexternalrealjob{untitled-     1}\input{untitled-1}" && dvips -o "untitled-1-figure0".ps "untitled-1-figure0".     dvi && ps2eps "untitled-1-figure0.ps"' ========          ! Package tikz Error: Sorry, the system call 'latex -halt-on-error -interaction     =batchmode -jobname "untitled-1-figure0" "\def\tikzexternalrealjob{untitled-1}\     input{untitled-1}" && dvips -o "untitled-1-figure0".ps "untitled-1-figure0".dvi      && ps2eps "untitled-1-figure0.ps"' did NOT result in a usable output file 'unt     itled-1-figure0' (expected one of .pdf:.jpg:.jpeg:.png:). Please verify that yo     u have enabled system calls. For pdflatex, this is 'pdflatex -shell-escape'. So     metimes it is also named 'write 18' or something like that. Or maybe the comman     d simply failed? Error messages can be found in 'untitled-1-figure0.log'. If yo     u continue now, I'll try to typeset the picture.          See the tikz package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.15 \end{tikzpicture}        I see many have got the same error. I do not know what to do. Can somebody please help?


title: How to automatically adjust the emdash length according to current language?

text: In Russian typography the emdash, which is typed as the ligature `---` in LaTeX, is 20% shorter than the standard emdash. The `babel` package cares this difference so that `---` prints a shorter emdash if `russian` is the current language. However this switch mechanism works only for `latex.exe` engine whereas `lualatex.exe` and `xelatex.exe` type long emdash in any case. This is because under LaTeX `\selectlanguage{russian}` switches current encoding from, say, `OT1` or `T1` to, say, `T2A`. As a result latin emdash comes from, say, `cmr` font family, whereas russian emdash comes from LH fonts (as a rule). Under LuaTeX or XeLaTeX `\selectlanguage` does not switch current encoding (it remains EU2 for LuaTeX or EU1 for XeTeX) so that `---` always came from same font. Note however that most fonts contain dashes of different length and, thus, it is possible (in principle) to map `---` to different code points depending on the current script. **My question is: how to do that using instruments provided by the`fontspec` package?** Note that `babel` provides a shorthand `"---` (if the `russian` option is indicated) which always types 20% shorter emdash but it also reduces spaces around the emdash and prevents the line break after it. **UPDATE:** I have realised that there is no code point in modern Open Type fonts (in contrast to metafont LH fonts used in legacy LaTeX for typesetting cyrillic texts). Both `polyglossia` and `babel` with `russian` option compose a shorter emdash from two endashes, they define a `\cyrdash` macros as follows               \def\cyrdash{\hbox to.8em{--\hss--}}      and map it to a shorthand `"---`. So final form of my question is **How to map the ligature`---` to `\cyrdash`?** Is there any solution except for making the dash `-` active character?


title: "Extra \fi" errors in equation environment with savetrees

text: I get the `Extra \fi` error for the `\end{equation}` line in the following code.               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage{savetrees}     \usepackage{amsmath}     \begin{document}     \begin{equation}     2+2=4     \end{equation}     \end{document}      Why is that? How do I fix it? The filelist:                *File List*       article.cls    2007/10/19 v1.4h Standard LaTeX document class        size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)      inputenc.sty    2008/03/30 v1.1d Input encoding file          utf8.def    2008/04/05 v1.1m UTF-8 support for inputenc         t1enc.dfu    2008/04/05 v1.1m UTF-8 support for inputenc        ot1enc.dfu    2008/04/05 v1.1m UTF-8 support for inputenc        omsenc.dfu    2008/04/05 v1.1m UTF-8 support for inputenc      savetrees.sty    2011/05/14 v2.0 Pack as much text as possible onto each page       xkeyval.sty    2008/08/13 v2.6a package option processing (HA)       xkeyval.tex    2008/08/13 v2.6a key=value parser (HA)      titlesec.sty    2011/12/15 v2.10.0 Sectioning titles      geometry.sty    2010/09/12 v5.6 Page Geometry         ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)        ifvtex.sty    2010/03/01 v1.5 Switches for detecting VTeX and its modes (HO)       ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional          calc.sty    2007/08/22 v4.3 Infix arithmetic (KKT,FJ)      microtype.sty    2010/01/10 v2.4 Micro-typography with pdfTeX (RS)      microtype.cfg    2010/01/10 v2.4 microtype main configuration file (RS)       amsmath.sty    2000/07/18 v2.13 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        mt-cmr.cfg    2009/11/09 v2.0 microtype config. file: Computer Modern Roman (RS)


title: How can I float molecules in \chemfig around an element? (without the lines)

text: For example: ![](http://i.imgur.com/zAmC4n2.png) I just want to show that the H2O molecules are attracted to the Carbon atom. I can't find a way to remove the lines connecting the Oxygens to the Carbons or how to extend the Hydrogens out from the Oxygens. Here is a minimal working example.               \documentclass{article}     \usepackage{chemfig}     \begin{document}     \chemfig{C^+(-[:0]O)(-[:90]O)(-[:180]O)(-[:270]O)}     \end{document}


title: What's the difference between color and xcolor packages?

text: I am working off a template. I recently updated my TeXLive from 2009 to 2012. One issue I am having is with the following like               \usepackage[usenames,dvipsnames]{color}      When I use this I get now numerous errors. Errors that didn't exist when I use xeLaTeX in TeXLive 2009. The errors look like:               ) (/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty     (/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty     (/usr/share/texlive/texmf-dist/tex/latex/euenc/eu1enc.def)     (/usr/share/texlive/texmf-dist/tex/latex/euenc/eu1lmr.fd))     (/usr/share/texlive/texmf-dist/tex/xelatex/xunicode/xunicode.sty     (/usr/share/texmf/tex/latex/tipa/t3enc.def     (/usr/share/texlive/texmf-dist/tex/latex/euenc/eu1lmss.fd))     (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty))     (/usr/share/texlive/texmf-dist/tex/latex/fontspec/fontspec.cfg)))          ! LaTeX Error: Option clash for package color.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      If I change the package name `color` to `xcolor` it fixes the issue. Why is this? MWE:               % compile with xelatex     \documentclass[11pt]{article}     \usepackage{fancyhdr}                   % url not needed if hyperref used     \usepackage{fontspec}     \usepackage{xunicode}     \usepackage[usenames,dvipsnames]{color}     \usepackage{hyperref}                   % added to generate the error message     \begin{document}     \texttt{\href{mailto:bob@gmail.com}{bob@gmail.com}}     \end{document}


title: Bibtex references not compiling because of LastPage package?

text: I am trying to compile an essay and it has references in it. I am using BibTeX and XeLaTeX. Here are the last few lines of the log               LaTeX Warning: Reference `LastPage' on page 4 undefined on input line 46.          [4] (./Essay.bbl (/usr/local/texlive/2011/texmf-dist/tex/latex/euenc/eu1lmtt.fd     )     Overfull \hbox (86.4996pt too wide) in paragraph at lines 9--13     \EU1/lmtt/m/n/12 http://goscandinavia.about.com/od/scandinaviatripplanning/p/sc     andnordic.htm\EU1/TimesNewRoman(0)/m/n/12 .          Overfull \hbox (66.03194pt too wide) in paragraph at lines 26--29     []\EU1/TimesNewRoman(0)/m/n/12 Meltdown, October 2011.  URL \EU1/lmtt/m/n/12 ht     tp://english.aljazeera.net/programmes/meltdown/\EU1/TimesNewRoman(0)/m/n/12 .          LaTeX Warning: Reference `LastPage' on page 5 undefined on input line 29.          [5]     ! Missing $ inserted.     <inserted text>                      $     l.43 .../files/1892_the_nordic_model_complete.pdf}                                                       .     ?       The commands entered are the following:               xelatex Essay.tex     bibtex Essay.aux     xelatex Essay.Tex     then the error      Here is a minimal working example:               \documentclass[a4paper,12pt]{article}     \usepackage{fontspec}     \usepackage{natbib}     \usepackage{fancyhdr}     \usepackage{lastpage}     \usepackage{setspace}     \pagestyle{fancy}     % clear any old style settings     \fancyhead{}     \fancyfoot{}     %new settings     \lhead{\footnotesize {Sebastian Stephenson}}     \rhead{\footnotesize{2812193}}     \rfoot{{\thepage} of \pageref{LastPage}}     %for hardvard style citation      \citestyle{agms}     % addfont Times New Roman     \setmainfont{Times New Roman}     \begin{document}          \begin{doublespacing}         \title{The Nordic Region and The Great Recession}         %to remove the date that is added when it gets complied         \date{}         \maketitle         %Because the maketitle command has been used, it automatically         %issues \thispagestyle{plain} which overrides the fancy headings for         %this page.  Must now tell Latex to override this         \thispagestyle{fancy}         With an understanding of what makes the Nordic region distinct from other regions. We will look at how the Nordic region is doing in the Great Recession. "The outlook for these countries is good" says Christian Ketal, economist at Harvard Business School and the Stockholm School of Economics "They are going to return...there own banking crises before the Great Recession,showing experience in managing a situation like today. It appears that the Nordic region is set for bright future.     \end{doublespacing}         \bibliographystyle{plainnat}         \bibliography{References}          \end{document}      Here is a sample of how I am citing in the Tex file.               the Nordic embassy.\citep{monoembassy} There is even consideration for further integration with one historian proposing a Nordic federation.\citep{econorfed} They are not completely homogenous societies. For instance Finland is the only Nordic country in the euro,\citep{econorfed} Norway is a oil powered economy\citep{unischobooklet5} and the last 30 years of Iceland.      Here are two samples of BibTeX entries:                @article{nordicdecline,     author={Johan Carlstrom},     editor={Chris Kirkham},     title={Nordic Countries Plunge Into Recession as Export Markets Fail  - Bloomberg},     month={Febuary},     year={2008},     url={http://www.bloomberg.com/apps/news?pid=newsarchive&sid=at0pmFF3uEOY},     publisher={Bloomberg},     address={New York},     note={[14102011]}     }          @book{nordicpdfintro,     author={Torben M. Andersen and Bengt Holmstr√∂m and Seppo Honkapohja and Sixten Korkman and Hans Tson S√∂derstr√∂m and Juhana Vartiainen},     booktitle={The Nordic Model:Embracing globalization and sharing risks},     pages={13},     year={2007},     url={http://www.etla.fi/files/1892_the_nordic_model_complete.pdf},     publisher={Taloustieto Oy},     address={Helsinki,}     }      Can anyone explain what I need to do? Note: The last BibTeX entry could be the issue.