title: Enclose an entry in an enumerate list in parentheses

text: I'd like to enclose one entry of an `enumerate` list in parentheses, with the opening parenthesis appearing before the index number. I can do this manually by using `\item[(3.] Item text)`, but this requires hard-coding the item number. Is there a way to do this automatically? ![](http://i.stack.imgur.com/1vv6o.png)               \documentclass{article}          \begin{document}     \begin{enumerate}       \item Really important       \item Quite important       \item[(3.] If we have time)     \end{enumerate}     \end{document}      * * * In the answer to Modifying labels on some enumerated items, an approach is suggested for modifying the item label, which gets me quite close to the goal. The opening parenthesis is added and the counter is still automatic. I only need to add the closing parenthesis by hand. Could that be automated as well?               \documentclass{article}          \begin{document}     \newcommand{\parenitem}{\stepcounter{enumi}\item[(\theenumi.]}          \begin{enumerate}       \item Really important       \item Quite important       \parenitem If we have time)     \end{enumerate}     \end{document}


title: change height of title area in a block in latex beamer

text: I'm using latex to create a poster, and I'd like to have a bit more padding around the titles of the blocks. Where is the setting for this? Here is a minimum working example... beamerposter_block_height.tex:               \documentclass[final]{beamer}     \mode<presentation>{\usetheme{MWE_theme}}     \usepackage[orientation=portrait,size=a0,scale=1.4,debug]{beamerposter}     \begin{document}     \begin{frame}         \begin{block}{Introduction}             the rain in spain                             \end{block}     \end{frame}     \end{document}      beamerthemeMWE_theme.sty:               \ProvidesPackage{beamerthemeMWE_theme}     \setbeamercolor*{block body}{bg=white,fg=black,series=\bfseries,family=\rmfamily}     \setbeamercolor*{block title}{fg=white,bg=gray}     \setbeamerfont{block title}{size=\LARGE,series=\bfseries}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \setbeamertemplate{block begin}{       \vskip.75ex       \begin{beamercolorbox}[ht=10ex,dp=0.5ex,center,leftskip=1em,colsep*=.75ex]{block title}%         \usebeamerfont*{block title}%         %{\rule[-0.4ex]{0mm}{2ex}\insertblocktitle}%         {\vskip5ex          \textbf{\phantom{Gg}\insertblocktitle}% phantom because of baseline problem          \vskip5ex         }       \end{beamercolorbox}%       {\ifbeamercolorempty[bg]{block body}{}{\nointerlineskip\vskip-0.5pt}}%       \usebeamerfont{block body}%       \begin{beamercolorbox}[leftskip=1em,colsep*=.75ex,sep=0.5ex,vmode]{block body}%         \ifbeamercolorempty[bg]{block body}{\vskip-.25ex}{\vskip-.75ex}\vbox{}%       }       \setbeamertemplate{block end}{       \end{beamercolorbox}     }          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \setbeamertemplate{blocks}[rounded]%[shadow=true]


title: Positioning of Pgfplot axis labels

text: I'm trying to adjust the position of my axes labels and I'm having some trouble:               \documentclass{article}     \usepackage{float}     \usepackage{pgfplots}     \usepackage{graphicx}     \begin{document}     \begin{figure}[H]     \centering     \begin{tikzpicture}     \begin{axis}[          axis lines=middle,         axis line style={->},         x label style={at={(current axis.right of origin)},anchor=north, below=5mm},         y label style={at={(current axis.above origin)},rotate=90,anchor=south east},         xlabel={$u$ unemployment},         ylabel={$\pi$ inflation}]     \addplot[black,samples=100,domain=0:1] {120*(1-x)^(1/3)-1};     \end{axis}     \end{tikzpicture}     \end{figure}     \end{document}      It may be that I don't understand the label style stuff, but I want the y label to be rotated and on the left of the y-axis (so it doesn't intersect with the ticks) and I want the x label to be below the x-axis (so it also doesn't run into ticks). Also, is there a way to center the labels in those positions?


title: Make footnotesep same as line spacing using custom thesis class

text: I'm starting to write my thesis using a custom (and incredibly old) thesis style that has been doing the rounds in my university (UCL). It seems as if it was originally written by a professor of the Computer Science department, but since it is the only one around, it has since been adapted by various people in different departments generating what I imagine is a rather daunting variety of versions in different places. Anyway, my problem is with the spacing of footnotes. In brief, the problem is that the spacing of the lines _within_ a footnote is not the same as the spacing _between_ different footnotes, with the result that two footnotes on the same page, at least one of which has more than one line, has an irregular line spread. Here's a MWE:               \documentclass{ucl_thesis}          \begin{document}          Some text.     \footnote{A short footnote on one line.}          Some more text.     \footnote{A longer footnote so that it spans multiple lines.     A longer footnote so that it spans multiple lines.     A longer footnote so that it spans multiple lines.}          \end{document}      ![enter image description here](http://i.stack.imgur.com/jJL2G.png) In order to compile it you'll need two files: `ucl_thesis.cls` and `ucl_a4.sty`. ## What I've done The part in `ucl_thesis.cls` that modifies the line spacing is on line 106:               \renewcommand \baselinestretch{1.5}      and according to this answer by @jon, "this is usually not recommended" since "LaTeX provides `\linespread`, which is probably better to use". However, changing the line quoted above into               \setlength{\footnotesep}{1.5\baselineskip}%     \linespread{1.5}\selectfont%      as per his answer did not solve the problem: the spacing between footnotes was now _too big_. ![enter image description here](http://i.stack.imgur.com/Ns5aa.png) Before I start manually adjusting this until the error was too small for me to see, I thought I'd ask here.


title: Curly Braces: adding half-spaces around each brace

text: When I use the commands `\\{` and `\\}`, the braces rendered are "too tight" or hug too closely to the text and math that lies between them. I would like to redefine `\\{` to `\\{\,`, and `\\}` to `\,\\}` , but I'm not sure how to do this with delimiters.


title: Converging and diverging nodes in a flowchart

text: I have a little problem that I am sure is really trivial, but have no idea how to solve it. I have a very simple flowchart with one node that I want to split into two so that they converge in the same following node, and another node that I want to split into two so that the previous node diverges into them. Here is a MWE:               \documentclass{beamer}          \mode<presentation> {         \usetheme{Dresden}         \usecolortheme{default}         \usepackage{tikz}         \usetikzlibrary{positioning,shadows,calc}     }          \begin{document}          \begin{frame}     \frametitle{Flowchart}     \begin{tikzpicture}[         every node/.style={         font=\sffamily,         font=\fontsize{8}{8}\selectfont,         drop shadow,         fill=blue!10,         text width=7cm,         align=center},         >=latex, %Make the arrow tips latex         myline/.style={ultra thick,black!50},         shorter/.style={shorten <=1mm,shorten >=0.5mm}]         \node (A) at (0,0) {Normal dataset and Mutant dataset};         \node[right=0.3cm of A,             fill=blue!30,             text width=1.5cm] (A2) {\fontsize{7}{7}\selectfont\textcolor{blue}{F5}};         \node[below=0.5cm of A] (B) {Filter process 1};         \node[below=0.5cm of B] (C) {Filter process 2};         \node[below=0.5cm of C] (D) {Reduced model and Full model};         \node[below=0.5cm of D] (E) {Identify gene set 1 and Identify gene set 2};         \node[below=0.5cm of E] (F) {Analyze gene set 1 and Analyze gene set 2};         \draw[myline,-,shorter] (A) -- (A2);         \draw[myline,->,shorter] (A) -- (B);         \draw[myline,->,shorter] (B) -- (C);         \draw[myline,->,shorter] (C) -- (D);         \draw[myline,->,shorter] (D) -- (E);         \draw[myline,->,shorter] (E) -- (F);     \end{tikzpicture}     \end{frame}          \end{document}      I want the node "Normal dataset and Mutant dataset" in two nodes "Normal dataset" (with the node "F5" on the left) and "Mutant dataset" (with the node "F5 on the right") converging in the node "Filter process 1". Then I want to split the node "Reduced model and Full model" into two nodes "Reduced model" and "Full model", so that "Filter process 2" diverges into them. From that point, the flowchart should continue separated, so that "Reduced model" connects with "Identify gene set 1" and "Full model" with "Identify gene set 2". Then "Identify gene set 1" should connect with "Analyze gene set 1" and "Identify gene set 2" with "Analyze gene set 2". The objective is to be able to draw converging and diverging arrows (Though it is not the best example, but something similar to this). I guess this should be easy to accomplish, but I really don't know how, and don't find any example on the net. Many thanks in advance!


title: How to print a given date with an abbreviated month

text: The best I've been able to do is with isodate. It's the only package I've been able to find that works on arbitrary dates.               \usepackage[orig, british, cleanlook]{isodate}     \printdate{2013-06-28}      produces:               28 June 2013      I'm looking to have the month abbreviated to match our existing documentation format. I would like to end up with:               28 Jun 2013      Where all the months are abreviated. I'm thinking maybe I need to make a custom language for isodate, but there must be a better way. **Update:** I have also looked at the datetime package's \formatdate command. Unfortunately the date comes in as a solid string and I don't have the option of splitting it to the separate fields that the command needs. I would be satisfied with something along the lines of:               \formatdate{\getday{2013-06-28}}{\getmonth{2013-06-28}}{\getyear{2013-06-28}}      That could be defined to a new command that would be easier to use.


title: Adding multiple images in a LaTeX document in the same "area"

text: Is it possible to add multiple images to a given are in a LaTeX document. What I want to achieve is having three images aligned horizontally, and each one of them corresponding letters a), b), and c) respectively. In the caption I want to explain what Fig X.a) is and then Fig X.b) and then Fig X.c) Do I incorporate this 3 figures in one larger figure and import it in latex? or can I do it in another fashion. How do I add the letter a) b) c) to the figures? Should I add them to the figures with Paint or other software, or there is a LaTeX way of assigning letters to figures? Thanks in advance!


title: Expand citations in latex with bibtex

text: I am writing a paper like the following one, and bibtex creates cites inside of cites:               \documentclass{article}     \begin{document}          cite1~\cite{abc:oopsla2005}      cite2~\cite{martinAl:oopsla2005}          \bibliographystyle{plain}     \bibliography{bib,crossref}          \end{document}      Where bib.bib contains:               @InProceedings{martinAl:oopsla2005,     author = {Michael Martin and Benjamin Livshits and Monica S. Lam},     title = {Finding application errors and security flaws using {PQL}: a program query language},     crossref = {oopsla2005},     pages = {365--383},     }      and crossref.bib contains:               @proceedings{oopsla2005,     key = {OOPSLA 2005},     booktitle =  {Proceedings of the 20th {ACM SIGPLAN} Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA 2005)},     title =      {Proceedings of the 20th {ACM SIGPLAN} Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA 2005)},     year =      2005,     address =      {San Diego, California, USA},     month =        oct,     publisher =     acm,     note =         sigplan # {, 40(11)}            }      So, when I create the pdf file, I get: [1] M. Martin, B. Livshits, M. S. Lam, Finding application errors and security flaws using PQL: a program query language, in: [3], pp. 365–383. ACM SIGPLAN Notices, 40(11). [2] C. Allan, P. Avgustinov, A. S. Christensen, L. Hendren, S. Kuzins, O. Lhot ́ak, O. de Moor, D. Sereni, G. Sittampalam, J. Tibble, Adding trace matching with free variables to AspectJ, in: [3], pp. 345–364. ACM SIGPLAN Notices, 40(11). where [3] is: [3] OOPSLA 2005, Proceedings of the 20th ACM SIGPLAN Conference on Object- Oriented Programming Systems, Languages and Applications (OOPSLA 2005), ACM Press, San Diego, California, USA, 2005. ACM SIGPLAN Notices, 40(11). I would like to extend cites 1 and 2 to show the full content of these references. If I can show full references, I expect Latex/Bibtex removes reference 3. Is it possible to set some parameters in Latex to achieve my goal? (I cannot use a line command option because my Latex file is compiled in the journal server) In other words, I just want to get: [1] M. Martin, B. Livshits, M. S. Lam, Finding application errors and security flaws using PQL: a program query language, in Proceedings of the 20th ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA 2005), ACM Press, San Diego, California, USA, 2005. ACM SIGPLAN Notices, 40(11). [2] C. Allan, P. Avgustinov, A. S. Christensen, L. Hendren, S. Kuzins, O. Lhot ́ak, O. de Moor, D. Sereni, G. Sittampalam, J. Tibble, Adding trace matching with free variables to AspectJ, in Proceedings of the 20th ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA 2005), ACM Press, San Diego, California, USA, 2005. ACM SIGPLAN Notices, 40(11). Thanks,


title: biblatex remove the eng. from citations

text: I am new with `biblatex` and I would like to format my citation such that: 1. The citations appear without the **_eng._** that appears in each reference. 2. The names appear as Smith, J.S. as opposed to J S Smith An example of my code looks like this:               \documentclass[10pt]{article}     \usepackage{graphicx}     \usepackage{amssymb,amsfonts,amsmath}     \usepackage[table]{xcolor}     \usepackage{booktabs}     \usepackage{times}     \usepackage[style=numeric,subentry,maxnames=5]{biblatex}     \renewbibmacro{in:}{}     \addbibresource{../../bibliographies/shivBiblio}          \begin{document}     this is an example \cite{perelson1996}     \printbibliography     \end{document}      and I get the following: this is an example [1] > References > > [1] A S Perelson, A U Neumann, M Markowitz, J M Leonard, and D D Ho. “HIV-1 > dynamics in vivo: virion clearance rate, infected cell life-span, and viral > generation time.” **eng.** Science 271.5255 (1996), pp. 1582–1586. ISSN: > 0036-8075 (Print); 0036-8075 (Linking). Here is the original bibTex reference:               @article{perelson1996,     Abstract = {A new mathematical model was used to analyze a detailed set of human immunodeficiency virus-type 1 (HIV-1) viral load data collected from five infected individuals after the administration of a potent inhibitor of HIV-1 protease. Productively infected cells were estimated to have, on average, a life-span of 2.2 days (half-life t 1/2 = 1.6 days), and plasma virions were estimated to have a mean life-span of 0.3 days (t 1/2 = 0.24 days). The estimated average total HIV-1 production was 10.3 x 10(9) virions per day, which is substantially greater than previous minimum estimates. The results also suggest that the minimum duration of the HIV-1 life cycle in vivo is 1.2 days on average, and that the average HIV-1 generation time--defined as the time from release of a virion until it infects another cell and causes the release of a new generation of viral particles--is 2.6 days. These findings on viral dynamics provide not only a kinetic picture of HIV-1 pathogenesis, but also theoretical principles to guide the development of treatment strategies.},     Address = {Theoretical Division, Los Alamos National Laboratory, NM 87545, USA.},     Author = {Perelson, A S and Neumann, A U and Markowitz, M and Leonard, J M and Ho, D D},     Crdt = {1996/03/15 00:00},     Da = {19960425},     Date = {1996 Mar 15},     Date-Added = {2013-06-28 00:45:32 +0000},     Date-Modified = {2013-06-28 21:27:14 +0000},     Dcom = {19960425},     Edat = {1996/03/15},     Gr = {AI27742/AI/NIAID NIH HHS/United States; N01 AI45218/AI/NIAID NIH HHS/United States; RR06555/RR/NCRR NIH HHS/United States; etc.},     Issn = {0036-8075 (Print); 0036-8075 (Linking)},     Jid = {0404511},     Journal = {Science},     Jt = {Science (New York, N.Y.)},     Language = {eng},     Lr = {20071114},     Mh = {Antiviral Agents/administration \& dosage/therapeutic use; CD4 Lymphocyte Count; CD4-Positive T-Lymphocytes/*cytology/*virology; Cell Survival; HIV Infections/drug therapy/*virology; HIV Protease Inhibitors/administration \& dosage/therapeutic use; HIV-1/drug effects/*physiology; Half-Life; Humans; Kinetics; Models, Biological; RNA, Viral/blood; Regression Analysis; Ritonavir; Thiazoles/administration \& dosage/therapeutic use; Valine/administration \& dosage/analogs \& derivatives/therapeutic use; Viremia; Virion/drug effects/*physiology; Virus Replication},     Mhda = {1996/03/15 00:01},     Month = {Mar},     Number = {5255},     Own = {NLM},     Pages = {1582--1586},     Pl = {UNITED STATES},     Pmid = {8599114},     Pst = {ppublish},     Pt = {Journal Article; Research Support, Non-U.S. Gov't; Research Support, U.S. Gov't, Non-P.H.S.; Research Support, U.S. Gov't, P.H.S.},     Rn = {0 (Antiviral Agents); 0 (HIV Protease Inhibitors); 0 (RNA, Viral); 0 (Ritonavir); 0 (Thiazoles); 7004-03-7 (Valine)},     Sb = {IM; X},     Source = {Science. 1996 Mar 15;271(5255):1582-6.},     Status = {MEDLINE},     Title = {{HIV-1 dynamics in vivo: virion clearance rate, infected cell life-span, and viral generation time.}},     Volume = {271},     Year = {1996}}


title: TikZ: Using \draw let to construct an arc

text: I tried both `(O.center)` and `(F.center)` but the arc doesn't end at the line `FS`. How can I construct this arc?               \documentclass[tikz,convert=false]{standalone}     \usetikzlibrary{intersections, arrows, backgrounds, calc}     \begin{document}     \begin{tikzpicture}[         every label/.append style = {font = \small},         dot/.style = {inner sep = +0pt, shape = circle,           draw = black, label = {#1}},         small dot/.style = {minimum size = .05cm, dot = {#1}},         big dot/.style = {minimum size = .1cm, dot = {#1}},         extended line/.style = {shorten >=-#1, shorten <=-#1},         extended line/.default = 1cm,         one end extended/.style = {shorten >=-#1},         one end extended/.default = 1.25cm, line cap = round, line join = round,         >=triangle 45]         \pgfmathsetmacro{\a}{3}         \pgfmathsetmacro{\b}{2.5}         \pgfmathsetmacro{\c}{sqrt(\a^2 - \b^2)}              \node[fill = black, big dot = {below left: \(A\)}] (A) at (-3, 0) {};         \node[fill = black, big dot = {below right: \(P\)}] (P) at (3, 0) {};         \node[fill = black, big dot = {below left: \(D\)}] (D) at (0, -2.5) {};         \node[fill = black, big dot = {above left: \(B\)}] (B) at (0, 2.5) {};         \node[fill = black, big dot = {below left: \(F\)}] (F) at (\c, 0) {};         \node[fill = black, big dot = {below left: \(O\)}] (O) at (0,0) {};              \draw (0, -3.25) -- (0, 3.25) node[scale = .75, fill = white,         inner sep = 0cm, pos = .7] {\(b\)};         \draw[name path = xline] (-3.25, 0) -- (5, 0) node[scale = .8, fill = white,         inner sep = 0cm, pos = .2] {\(a\)};         \draw[red, name path = circle] (O) circle (3cm);         \draw[blue, name path = ellipse] (O) ellipse (3cm and 2.5cm);         \path[name path = line] (2.25, 3) -- (2.25, -1);              \path[name intersections = {of = circle and line, by = P1}];         \node[fill = black, big dot = {above: \(Q\)}] (Q) at (P1) {};         \path[name intersections = {of = line and xline, by = P2}];              \draw[black] (Q) -- (P2) node[fill = black, big dot = {below right: \(V\)}]         (V) at (P2) {};         \path[name intersections = {of = line and ellipse, by = P3}];         \node[fill = black, big dot = {right: \(S\)}] (S) at (P3) {};              \draw (O) -- (Q) node[scale = .75, pos = .5, fill = white, inner sep = 0cm]         {\(a\)};         \draw[one end extended] (F) -- (S) node[scale = .8, pos = .5,         fill = white, inner sep = 0.03cm] {\(r\)} coordinate (P4);              \begin{scope}[on background layer]           \begin{scope}             \clip (S) rectangle (P);             \shadedraw[blue, outer color = blue!30!black, inner color = red!30] (O) ellipse (3cm and 2.5cm);           \end{scope}           \filldraw[bottom color = cyan!50!blue, top color = green!20] (S.center) -- (F.center) -- (V.center) -- cycle;         \end{scope}               \draw[latex-latex] let           \p0 = (O),           \p1 = (P),           \p2 = (P4),           \n1 = {atan2(\x1 - \x0, \y1 - \y0)},           \n2 = {atan2(\x2 - \x0, \y2 - \y0)},           \n3 = {3.5cm}         in (O.center) +(\n1:\n3) arc[radius = \n3, start angle = \n1,         end angle = \n2];     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/pOZdy.png) The offending code excerpt is:                   \draw[latex-latex] let           \p0 = (O),           \p1 = (P),           \p2 = (P4),           \n1 = {atan2(\x1 - \x0, \y1 - \y0)},           \n2 = {atan2(\x2 - \x0, \y2 - \y0)},           \n3 = {3.5cm}         in (O.center) +(\n1:\n3) arc[radius = \n3, start angle = \n1,         end angle = \n2];


title: parenthesis around year

text: I tried to put the date in parenthesis and the result ist quite weird. I just want to have the year in this form: (2005) and instead (. 2005) is printed.               \begin{filecontents*}{test.bib}     @ARTICLE{Andreasen2005,       author = {Nancy C Andreasen and William T Carpenter and John M Kane and Robert         A Lasser and Stephen R Marder and Daniel R Weinberger},       title = {Remission in schizophrenia: proposed criteria and rationale for consensus.},       journal = {Am J Psychiatry},       year = {2005},       volume = {162},       pages = {441--449},       number = {3},       month = {3}     }     \end{filecontents*}               \documentclass[          12pt,          DIV10,          ngerman,          a4paper,      ]{scrreprt}      \usepackage[ngerman]{babel}     \usepackage[latin1]{inputenc}      \usepackage[T1]{fontenc}          \usepackage[      bibstyle=test, citestyle=test      ]{biblatex}          \bibliography{test.bib}           \begin{document}                \cite{Andreasen2005}          \printbibliography           \end{document}`      and my test.bbx-file               % $Id: test.bbx,v 0.1 2013/06/28 19:09:07 lehman unstable $          \ProvidesFile{test.bbx}     [\abx@bbxid $Id: test.bbx,v 0.1 2013/06/28 19:09:07 lehman unstable $]          \newbibmacro*{begentry}{}     \newbibmacro*{finentry}{\finentry}          \DeclareBibliographyDriver{article}{%       \usebibmacro{bibindex}%       \usebibmacro{begentry}%       \usebibmacro{author/translator+others}%       \setunit{\labelnamepunct}\newblock       \usebibmacro{title}%       \newunit\newblock       \usebibmacro{byauthor}%       \newunit\newblock       \usebibmacro{bytranslator+others}%       \newunit\newblock       \printfield{version}%       \newunit\newblock       \usebibmacro{journal+issuetitle}%       \newunit       \usebibmacro{byeditor+others}%       \newunit       \usebibmacro{note+pages}%       \newunit\newblock       \usebibmacro{date}       \setunit{\bibpagerefpunct}\newblock       \usebibmacro{pageref}%       \usebibmacro{finentry}}          \newbibmacro*{journal+issuetitle}{%       \usebibmacro{journal}%       \setunit*{\addspace}%       \iffieldundef{series}         {}         {\newunit          \printfield{series}%          \setunit{\addspace}}%       \usebibmacro{volume}%       \setunit{\addspace}%       \usebibmacro{issue}%       \setunit{\addcolon\space}%       \newunit}          \newbibmacro*{volume}{%       \printfield{volume}%       \setunit*{\adddot}%       }          \newbibmacro*{issue}{%       \iffieldundef{issue}           {}         {\printtext[parens]{%           {\printfield{issue}%            \setunit*{\addspace}}}%       \newunit}}          \newbibmacro*{series+number}{%       \printfield{series}%       \setunit*{\addspace}%       \printfield{number}%       \newunit}          \newbibmacro*{note+pages}{%       \printfield{note}%       \setunit{\bibpagespunct}%       \printfield{pages}%       \newunit}          \renewbibmacro*{date}{\mkbibparens{\printdate}}               \endinput      and my test.cbx-file               % $Id: test.cbx,v 1.7 2011/11/13 19:09:07 lehman stable $          \ProvidesFile{test.cbx}     [\abx@cbxid $Id: verbose-inote.cbx,v 1.7 2011/11/13 19:09:07 lehman stable $]          \providebool{bbx:subentry}          \DeclareFieldFormat{entrysetcount}{\mknumalph{#1}}     \newbibmacro*{cite}{%       \printtext[bibhyperref]{%         \printfield{prefixnumber}%         \printfield{labelnumber}%         \ifbool{bbx:subentry}           {\printfield{entrysetcount}}           {}}}          \DeclareCiteCommand{\cite}[\mkbibbrackets]       {\usebibmacro{prenote}}       {\usebibmacro{citeindex}%        \usebibmacro{cite}}       {\multicitedelim}       {\usebibmacro{postnote}}     \AtEveryBibitem{\clearfield{month}}     \endinput      Anyone a clue, please?


title: How to execute codes inside a macro?

text: I use Michael Wichura's old Table macros (see http://www.pctex.com/addons.html) in several places, and I need to access them from within another macro. The problem (I think) is that some of the characters that are used in the Table macros are not passed on correctly. Let me illustrate with some codes.               \documentclass[11pt]{article}          \usepackage{etoolbox}          % These three lines read the macros     \input{nine}     \input{eight}     \input{Table}          \begin{document}          This is a table: % The following few lines use the Table macros      $$      \BeginTable       \BeginFormat       | lw8 | rw4 | rw4 |       \EndFormat       " Line 1  " 1.23 " 4.56 "\\       " Line 2  " 7.89 " 0.12 "\\      \EndTable      $$          \def\QuestionSolution{Q} % This identifies whether I want a question or solution          \expandafter\ifstrequal\expandafter{\QuestionSolution}{S}{%     This is the question}{%     This is the solution with the same table:      $$      \BeginTable       \BeginFormat       | lw20 | rw4 | rw4 |       \EndFormat       " Line 1  " 1.23 " 4.56 "\\       " Line 2  " 7.89 " 0.12 "\\      \EndTable     $$}          \end{document}      The output I get from this code looks like this: ![enter image description here](http://i.stack.imgur.com/zprre.jpg) The first table is fine but, clearly, there is a problem when the table macros are invoked from within the \ifstrequal macro. In fact, the same problem occurs when I call the table from _any_ macro. Of course, I know that I could reconstruct all of these tables using more standard LaTeX codes. The problem is that I have about 200 such (full-page) tables to rewrite in a fairly short interval of time. Is there an easier way to fix this problem? Thank you in advance for your help.


title: Resume template with leading line to start section

text: I came across a resume here and like its format, in particular the red lines that begin each section. How can I create those lines in LaTeX, and then have the years on the left column and everything else on the right column? Also, it would be great if someone could point out a similar resume template online. I tried searching, but didn't find one quite like this.


title: Distance between arrow and reaction product

text: Please tell me, How I can reduce a distance between arrow and feed substances. I want the same distances at all three directions. To make it clearer, I explain: I drew the side substances as a massive elements in order to the scheme acquired roundness. To get a nice scheme. In my opinion each of the array elements has a rectangular invisible borders which can not overlap with an arrows, so the lower elements have lager distances between arrows than the upper. How to solve this problem? Thanks in advance ![enter image description here](http://i.stack.imgur.com/rJAal.jpg)               \documentclass{article}      \usepackage{chemfig}     \usepackage{tikz}          \begin{document}          \begin{figure}[!h]     \begin{center}     \setchemrel{}{}{3em}     \noindent     \schemestart     \chemfig{%     **6(------)     }     \arrow{<=>}[90]     \chemfig{%     *6(---         ([,,,,draw=none]-([,,,,draw=black]*6(--             ([,,,,draw=none]-([:-18,,,,draw=black]*5(----(-)-)))         ----)))     -(-)--)     }     \arrow(@c1--){<=>}[210]     \chemfig{%     **6(-         ([,,,,draw=none]-([,,,,draw=black]**6(-(-)---             ([,,,,draw=none]-([,,,,draw=black]**6(-(-)--(-)---)))         --)))     ----*6(--)-)     }     \arrow(@c1--){<=>}[330]     \chemfig{%     -[:30]-[:-30]-[:30](-[:90])-[:-30]     -[:-90,,,,draw=none]-[:210,,,,draw=black]-[:150]-[:210]-[:150]-[:210]     -[:-90,,,,draw=none](-[:210]-[:150])-[:-30,,,,draw=black]-[:30]-[:-30]-[:30]     }     \schemestop     \caption{Reforming} \label{fig:Precursors}     \end{center}     \end{figure}          \end{document}


title: Possible to put an algorithm inside a \begin{itemize}?

text: Is it possible to put an algorithm inside a \begin{itemize} as one of the \items?


title: Make ConTeXt ignore system-fonts?

text: **How can I make ConTeXt ignore my system-fonts?** Currently, ConTeXt scans and uses all system fonts (all the files in the font folder of windows 7) first and the fonts in the ConTeXt folder second. I want ConTeXt to ignore system fonts and only use fonts in the ConTeXt folder.


title: Set samples in tikzpicture from macro value

text: I'm trying to use set the amount of samples per tikzpicture globally:               \documentclass{standalone}     \usepackage{pgfplots}     \pgfmathdeclarefunction{gauss}{2}{%       \pgfmathparse{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))}%     }     %\samplesize = <number>% How do I get this one to work?     \begin{document}       \section{Gaussian distribution}          \begin{tikzpicture}     \begin{axis}[           hide y axis,           axis lines*=center,            axis on top,           no markers,            domain=2.5:25.5,            samples=\samplesize,           xlabel=\empty,            ylabel=\empty,           every axis x label/.style={at=(current axis.right of origin),anchor=west},           every axis y label/.style={at=(current axis.above origin),anchor=south},           height=5cm, width=12cm,           xmin = 4, xmax=24,           xtick={14}, ytick=\empty,           enlargelimits=false,            clip=false,           grid=major       ]       \addplot [fill=cyan!20, draw=cyan!80, domain=4:7] {gauss(14,3.41696)} \closedcycle;       \addplot [very thick,cyan!50!black] {gauss(14,3.416969)};     \end{axis}     \end{tikzpicture}     \end{document}      I couldn't get this to work with TeX primitive counters, `\value`, `\def`, `\let`, `\newcommand`, etc.


title: slim braces in a table

text: We need to make clear that certain data is the same in several rows. An underbrace taken from math-mode does the job quite well, but is unfortunately way too prominent in the table, especially in contrast to `booktab`’s layout. ![Table with underbrace](http://i.stack.imgur.com/RdKBn.png)               \documentclass{article}               \usepackage{tabularx}     \usepackage{booktabs}               \begin{document}     \begin{tabular}{lccc}      \toprule     & XXX & YYY & ZZZ \\     \midrule      aaa & 11111111111111 & 222222222222 & 333333333333 \\      bbb & 11111111111111 & 222222222222 & 333333333333 \\      ccc & 11111111111111 & 222222222222 & 333333333333 \\      & \multicolumn{3}{c}{{$\underbrace {\hspace{22em}}$}} \\     \\      ddd & & 0000 \\     \bottomrule      \end{tabular}               \end{document}      I've tried `\resizebox` to shrink the brace, but this looks what it is: squeezed. It is also possible to use `tikz` to make something close to curly braces, but I am not too happy with the result of either; I'd like to retain the drawn, "swashy" quality of the math-mode. Is there a possibility to get slimmer braces (i.e. like drawn with a narrower nib) in the same design as used in math-mode?


title: How to add translation to long form of acronym?

text: I am currently using the `acronym` package to handle acronyms/abbreviations in my thesis. I am writing in German, but I use a couple of English acronyms because either no German acronym exists or the English one simply more commonly used. So when introducing the acronym, I want/need to use the German word in text (as "long" form) but I want to include the English long form in parentheses alongside the (English) acronym. And of course, both German and English should show up in the list of acronyms.   * German Term: Steuergerät   * English Term: Electronic Control Unit   * Acronym: ECU So in my text I'd like to have: > .... Steuergerät( Electronic Control Unit, ECU) .... and later simply have > .... ECU .... In the list of acronyms, it should show up as: > ECU Steuergerät (Electronic Control Unit) or > ECU Electronic Control Unit (Steuergerät) Is there a way to include a translation in the long version of an acronym? EDIT: As pointed out by @NicolaTalbot, the use case is the same than Using the glossaries package for English acronyms in German documents. Is there a way to achieve this with the `acronym` package as well or do I need to switch packages?


title: Can biblatex-publist omit names which include middle initials without omitting all names which share my surname?

text: I was putting together a publication list today. I started by copying it from my CV where I have always managed the list manually. However, I recently noticed `biblatex-publist` so I thought I would give that a go. This question concerns the first of three problems I encountered. From my point of view, this is also the most fundamental. One key feature of the package is that it allows you to omit your own name from the list of authors for publications, as is usual when making a list. However, I cannot get this to work well because I publish using 'FirstName MiddleInitial. Surname' so that `author` is specified as `Surname, First M.`. If I ask for all names with my surname to be omitted, it works fine. However, I have a really common surname so this isn't a good solution. (It would work for this case but I don't want to rely on it.) Yet any attempt I make to specify my first name - e.g. as `First` or as `First M.` doesn't omit my name at all. I'm not sure if I've misunderstood the syntax but I experimented with the name of a coauthor who does not use a middle initial, and specifying both surname and first name worked as expected in that case. So it definitely has to do with the middle initial, it seems. Here is an MWE:               \documentclass{article}     \usepackage{filecontents}     \usepackage[bibstyle=publist,backend=biber]{biblatex}       \omitname[Me I.]{Mine}       \bibliography{\jobname}     \begin{filecontents}{\jobname.bib}         @article{my-article,           author = {Mine, Me I.},           title = {Paper I Wrote},           journal = {Some Journal},           year = 1022,           pages = {99--117},           volume = 45,           number = 2}     \end{filecontents}          \begin{document}          \nocite{my-article}          \printbibliography          \end{document}      which produces: ![Reference list still including omitted author's name](http://i.stack.imgur.com/2JA0Q.png) I also tried the following with the same results:               \omitname[Me]{Mine}      Is there an easy way to correct this so that the omission works even for authors who use middle initials to publish? Note that I am not especially attached to `biblatex-publist`. If there's an alternative method, that would be fine. (Especially true since this is not the only difficulty I have using `biblatex-publist` so an alternative might well be preferable!)


title: How can I superimpose a summation operator with its following character?

text: How can I create the following symbol? ![enter image description here](http://i.stack.imgur.com/o4M7E.png) PS: It is not the classic `\sum_{i=0}^n k`


title: Gnuplot's tikz terminal produces uncompilable code

text: I would like to use the gnuplot's tikz terminal to create good looking graphs in pdf format. However, I have trouble compiling the resulting .tex file. My plot.gp file looks like:               clear     reset     set terminal tikz color standalone size 5in,3in     set output 'plot.tex'     plot  sin(x)      I compile the resulting `plot.tex` file with:               pdflatex -shell-escape plot.tex      Then, the compilation halts at the following output:               Overfull \hbox (16.34975pt too wide) in paragraph at lines 96--96     [][]      Preview: Tightpage 0 0 0 0     [1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}])     *      At this point it leaves me the possibility to interact. Typing `\end` and then twice `<RET>` and then `x` seemingly aborts the process but the produces a working .pdf:               *\end     *     Runaway argument?     ! Paragraph ended before \end was complete.     <to be read again>                     \par      <*>      ? x     </home/christian/.texmf-var/fonts/pk/ljfour/jknappen/ec/ecrm1000.600pk>     Output written on plot.pdf (1 page, 7343 bytes).     Transcript written on plot.log.      How could I compile the file without errors? Thanks a lot in advance! P.S.: I am running Linux Mint 14 and TexLive 2012 from the official repositories.


title: Insert terminal output to compilation or record time needed

text: For some reason my document takes very long to compile, and I would like to narrow down why this happens. Finding the bottleneck would be greatly eased if I could time how long individual sections in the code take to compile. The first and obvious question is: **(1) Is there a 'profiler' package that returns how long parts of my documents take to compile?**   Such a package should record, for example, how long individual Ti _k_ Z pictures take to compile. If this should not be an option, I have a second question: **(2) Is it possible to output statements into the terminal?**   If there was something like a command `"shellout(print "Now compiling PGF Plot of weather data...")`, that would print a statement in the terminal among all those LaTeX warnings I get, I could at least stop the time myself.


title: Inserting math equation in text causes '?' to show up and for escaped '/' to not show!

text: I admit I'm new to LaTeX yet I'm writing my thesis using it. I'm having a hard time trouble shooting as the compiler doesn't give me any meaningful errors which leads me to believe what I'm doing is not wrong just being misinterpreted by the compiler. I have a subsection with ONE single formula in text indicated by `$$...$$`. The text that comes after with peppered by question marks and missing characters like `/`.               \subsubsection*{Microarrays, Data Acquisition and Bioinformatics Methods}          To compare the expression pattern of individual genes to those of known clock      components, we devised the following method explained in supplementary      material. First, we subdivided the expression time course into six overlapping      15h time windows (5-20h, 10-25h, etc., see Supplementary Figure S1A).      For each gene and window, we then fit a polynomial of the form:      $$expression_{{gene}_{i,t}} \sim a(t)^2 + b(t) + c$$      where $t$ corresponds to a time window consisting of four time points      and expression corresponds to the matching expression values. This      fitting procedure yields, for each gene, six sets (one set per window)      of coefficients a, b, and c, where values of a indicate peaks if a      $\pm$ s.e. $<$ 0 and troughs if a $\pm$ s.e. $>$ 0. To be even more      stringent, we impose a cutoff of 0.05 on the p-value on $a$ 's t-statistic      which is a measure of the likelihood that $a$ is incompatible      with 0 by chance alone. In this manner, consecutive points along the      time course for each gene can be represented as a series of peaks and      troughs, and compared to specific peak\/trough combinations observed for      different clock genes. \\\          Clock genes can be described by the following peak\/trough combinations      (denominated simply as Peaks A-E in the main text): \\\


title: A new line inside subscript

text: I have formula:               \[ A_k = \bigcup_{I \subset \{ 1,...,k \} \text{card} J = K} B_j\]      which generates ![formula](http://i.stack.imgur.com/T2vBm.png) I would like ask how to make the new line inside subscript. It should look like formula below: ![correct formula](http://i.stack.imgur.com/53But.png) I've tried with \newline and \begin{align*} but it doesn't work.


title: Same distance between chapter head and text / toc

text: With the following example, I get a different vertical distance between "Contents" and "1 bar 5" and "foo" and "Lorem". How do I get the first entry of the TOC to the same height as "Lorem ipsum", that is the base line should be the red rule in the image below: ![enter image description here](http://i.stack.imgur.com/OkHmY.png)               \documentclass{book}     \begin{document}     \tableofcontents          \chapter*{foo}     Lorem ipsum          \chapter{bar}     Lorem ipsum           \end{document}


title: A very basic TikZ code that is not working

text: I tried to type a TikZ code for the first time but it did not compile, and I have no idea why. Is there any other packages that I have to use or is there anything wrong with the syntax?               \documentclass[11pt,twoside,a4paper]{article}     \usepackage{tikz}         \begin{document}     \begin{tikzpicture}     \node (h) at (0,0) {hello};     \node (w) at (2,3) {world};     \draw (h) edge (w);     \end{tikzpicture}     \end{document}


title: standalone figure and tabular

text: I'd like to generate a standalone pdf containing a pgf/tikz image and a tabular. I'm almost getting the desired result but there is a paragraph between the image and the tabular that breaks my layout (I guess it is due to the fact that the empty paragraph takes the full textwidth). What I do to get such result is the following:               \documentclass{standalone}     \usepackage{tikz}     \usepackage{pgf}          \begin{document}     \begin{tikzpicture}     ...     \end{tikzpicture}      %This empty line creates the undesired paragraph     \begin{tabular}     ...     \end{tabular}     \end{document}


title: How to avoid a linebreak before a comma?

text: I just had a problem with a linebreak after a word ending with a hyphen which was followed by a comma. This example shows the problem:   _(The example is constructed, but this just occurred to me in a real text!)_                   \documentclass[11pt, a4paper]{scrartcl}          \usepackage[ngerman]{babel}          \begin{document}          aaDas ist ein Absatz. Das ist ein Absatz. Das ist ein Absatz. Es gibt zeit-, temperatur-,  und weggesteuerte Verfahren ein Absatz. Das ist ein Absatz.Das ist ein Absatz. Das ist ein Absatz.Das ist ein Absatz. Das ist ein Absatz.Das ist ein Absatz. Das ist ein Absatz.Das ist ein Absatz. Das ist ein Absatz.              \end{document}      ![example image](http://i.stack.imgur.com/r8AOh.png) As I can not imagine any scenario where a comma at the beginning of a line could make sense, I wonder how I could tell LaTeX to absolutely avoid that.


title: What preamble does math.stackexchange.com use?

text: I am trying to use Anki to create calculus flash cards. I use the input box on the math.stackexchange.com site since it is the easiest LaTex editor I know of to use for math equations. However, I spend a lot of time trying to fix errors because of differences in the way the code is compiled in Anki, which is probably due to differences in the preamble between Anki and math.stackexchange. Is there a way to find out what they use?


title: Just installed ProText. Command paths all "unknown"

text: Installation went fine but I haven't been able to view a document. I have created and saved a sample document. If I click "build and compile" (the two green arrows) it says "Can't find C:\Users..." though that is the correct file path. "Compile" (single green arrow) does nothing. Clicking the Adobe icon opens Adobe in an external window but then says "file could not be found". Under Options>Configure TexStudio>Commands tab, all fields say "unknown" except the External PDF Viewer one ""C:\Program Files\Adobe\Reader 10.0\Reader\AcroRd32.exe" "?am.pdf"


title: Conditional spacing in ToC column headers

text: Sorry in advance for this being such a specific question, but I'm at my wits end with this problem. My university has odd formatting requirements for dissertations (I know, don't they all). In particular, in the table of contents they want the spacing between chapter/chapter, chapter/section, and section/chapter to be one half spacing, but they want all other spacing to be single spaced. This isn't so hard to sort out (there are some excellent stackexchange solutions). However, they also want the word "Page" to appear above the page number column on ever page of the ToC and they want it to be separated by one half spacing, this is the problematic part. In an attempt to solve this problem I used utilized some stackexchange solutions based on `tocloft`, `etoolbox`, and `setspace` as well as some `\preto` commands for formating the ToC and then used the `atbegshi` package to put "Page" at the top of the page column on each page. The problem is that, due to the way spacing is handled, if a section is at the top of a page, then "Page" is only separated by a single space. Here is a minimal working example illustrating the problem:               \documentclass{report}          \usepackage[onehalfspacing]{setspace}     \usepackage{etoolbox}     \usepackage{tocloft}     \RequirePackage{atbegshi}          \preto\section{       % if this is the first section in a chapter, then add extra space to the ToC       % to make it appear 1.5 spacing.       \ifnum\value{section}=0         \addtocontents{toc}{\vskip6pt}        \fi     }          \preto\chapter{       % add space before chapter lines in the ToC to make it appear 1.5 spacing.       \addtocontents{toc}{\vskip6pt}     }          \newcommand{\newtoc}{       \begin{singlespace}         % zero out the space tocloft puts before chapters         \setlength{\cftbeforechapskip}{0pt}              % add leader dots for chapters         \renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}}          % make chapter and corresponding page appear in normal font         \renewcommand{\cftchapfont}{\normalfont}         \renewcommand{\cftchappagefont}{\normalfont}         % prepend ``CHAPTER'' to the chapter name in the ToC         \renewcommand{\cftchappresnum}{CHAPTER\space}         \settowidth{\cftchapnumwidth}{\cftchappresnum\qquad}              % add some space between ``Page'' and the ToC line in the ToC (make it appear         % onehalfspacing). Then add the ToC line to the ToC         \addtocontents{toc}{\vskip 6pt}         \addcontentsline{toc}{chapter}{TABLE OF CONTENTS}              % generate a name for the ToC         \renewcommand{\cfttoctitlefont}{\normalfont}         \renewcommand\contentsname{\normalfont} {\centerline{TABLE OF CONTENTS}}         \setlength{\cftaftertoctitleskip}{0pt}              % put ``Page'' above the page column on the first page of the ToC         \renewcommand{\cftaftertoctitle}{\hfill{\normalfont { Page}}}              % put ``Page'' above the page column on all subsequent pages of the ToC         % the build the ToC         \AtBeginShipout{\cftaftertoctitle}          \tableofcontents         \AtBeginShipout{}        \end{singlespace}     }          \begin{document}       \newtoc            \chapter{A Chapter}       \chapter{A Chapter}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}     \end{document}      Evidently I need 10 reputation to post images of the output, but the problem can be seen by examining the top of page 2 as compared to either page 1 or page 3 of the output. I attempted to use the `afterpage` package to set a bool in the ToC. The idea being the subsequent \preto commands could use the bool to determine if they need to insert space at the top of the page. This very nearly worked, except that the inserted space always appears two lines down from where it should. Here is the modified code:               \documentclass{report}          \usepackage[onehalfspacing]{setspace}     \usepackage{etoolbox}     \usepackage{tocloft}     \usepackage{atbegshi}     \usepackage{afterpage}          % generate a bool for tracking when a newpage occures in the ToC     \providebool{NewPage}     \global\boolfalse{NewPage}     \preto\section{       \addtocontents{toc}{         \protect\ifbool{NewPage}{           % If NewPage is true, then set it to false and insert spacing           \protect\global\boolfalse{NewPage}\vskip6pt         }{           % turn on the NewPage bool after the end of a page           \protect\afterpage{\global\booltrue{NewPage}}         }       }       % if this is the first section in a chapter, then add extra space to the ToC       % to make it appear 1.5 spacing.       \ifnum\value{section}=0         \addtocontents{toc}{\vskip6pt}       \fi     }     \preto\chapter{       % add space before chapter lines in the ToC to make it appear 1.5 spacing.       \addtocontents{toc}{         \protect\ifbool{NewPage}{           % unflag NewPage           \protect\global\boolfalse{NewPage}         }{           % turn on the NewPage bool after the end of a page           \protect\afterpage{\global\booltrue{NewPage}}         }       }       \addtocontents{toc}{\vskip6pt}     }          \newcommand{\newtoc}{       \begin{singlespace}         % zero out the space tocloft puts before chapters         \setlength{\cftbeforechapskip}{0pt}              % add leader dots for chapters         \renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}}          % make chapter and corresponding page appear in normal font         \renewcommand{\cftchapfont}{\normalfont}         \renewcommand{\cftchappagefont}{\normalfont}         % prepend ``CHAPTER'' to the chapter name in the ToC         \renewcommand{\cftchappresnum}{CHAPTER\space}         \settowidth{\cftchapnumwidth}{\cftchappresnum\qquad}              % add some space between ``Page'' and the ToC line in the ToC (make it appear         % onehalfspacing). Then add the ToC line to the ToC         \addtocontents{toc}{\vskip 6pt}         \addcontentsline{toc}{chapter}{TABLE OF CONTENTS}              % generate a name for the ToC         \renewcommand{\cfttoctitlefont}{\normalfont}         \renewcommand\contentsname{\normalfont} {\centerline{TABLE OF CONTENTS}}         \setlength{\cftaftertoctitleskip}{0pt}              % put ``Page'' above the page column on the first page of the ToC         \renewcommand{\cftaftertoctitle}{\hfill{\normalfont { Page}}}              % put ``Page'' above the page column on all subsequent pages of the ToC         % the build the ToC         \AtBeginShipout{\cftaftertoctitle}          \tableofcontents         \AtBeginShipout{}        \end{singlespace}     }          \begin{document}       \newtoc            \chapter{A Chapter}       \chapter{A Chapter}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}         \section{A Section}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}       \chapter{A Chapter}     \end{document}      The new spacing issue arises on page 2. I think the problem here is that `afterpage` is buffering some of the output (in this case the first two lines on the next page), and then executing the afterpage commands. The result is that the conditional expressions for the buffered sections are expanded and evaluated before afterpage sets the bool. I took a look at `afterpage.sty` hoping to expand the package to allow one to manually dump this buffer, but I was unable to make any progress there. Any help would be greatly appreciated.


title: TikZ/PGF linguistics vowel chart

text: I'm including a vowel chart in a linguistics document of mine, similar to this, and while I'm aware that there are a couple of packages (TIPA, pst- vowel) that can do the job, I'm interested in trying to draw it using PGF/TikZ. Having not used TikZ before, I'm a little unsure on where to start with this deceptively simple figure. ![Hungarian Vowels](http://i.stack.imgur.com/pKakG.png) As I understand it, I'd need to define some kind of skewed grid with [default] nodes at the line intersections, their midpoints, and the middle of each "square". The actual letters would then be drawn on top, positioned by coordinates; at the moment I'm not interested in arbitrary positioning of letters as occurs in the diagram. Can anyone help me out?


title: Mupdf Error when extracting pdf in Portable Xepersian

text: I am trying to compile this Springer paper template in a portable Xepersian.               %%%%%%%%%%%%%%%%%%%%%%% file template.tex %%%%%%%%%%%%%%%%%%%%%%%%%     %     % This is a general template file for the LaTeX package SVJour3     % for Springer journals.          Springer Heidelberg 2010/09/16     %     % Copy it to a new file with a new name and use it as the basis     % for your article. Delete % signs as needed.     %     % This template includes a few options for different layouts and     % content for various journals. Please consult a previous issue of     % your journal as needed.     %     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %     % First comes an example EPS file -- just ignore it and     % proceed on the \documentclass line     % your LaTeX will extract the file if required     \begin{filecontents*}{example.eps}     %!PS-Adobe-3.0 EPSF-3.0     %%BoundingBox: 19 19 221 221     %%CreationDate: Mon Sep 29 1997     %%Creator: programmed by hand (JK)     %%EndComments     gsave     newpath       20 20 moveto       20 220 lineto       220 220 lineto       220 20 lineto     closepath     2 setlinewidth     gsave       .4 setgray fill     grestore     stroke     grestore     \end{filecontents*}     %     \RequirePackage{fix-cm}     %     %\documentclass{svjour3}                     % onecolumn (standard format)     %\documentclass[smallcondensed]{svjour3}     % onecolumn (ditto)     \documentclass[smallextended]{svjour3}       % onecolumn (second format)     %\documentclass[twocolumn]{svjour3}          % twocolumn     %     \smartqed  % flush right qed marks, e.g. at end of proof     %     \usepackage{graphicx}     %     %\usepackage{mathptmx}      % use Times fonts if available on your TeX system     %     % insert here the call for the packages your document requires     %\usepackage{latexsym}     % etc.     %     % please place your own definitions here and don't use \def but     % \newcommand{}{}     %     % Insert the name of "your journal" with     % \journalname{myjournal}     %     \begin{document}          \title{Insert your title here%\thanks{Grants or other notes     %about the article that should go on the front page should be     %placed here. General acknowledgments should be placed at the end of the article.}     }     \subtitle{Do you have a subtitle?\\ If so, write it here}          %\titlerunning{Short form of title}        % if too long for running head          \author{First Author         \and             Second Author %etc.     }          %\authorrunning{Short form of author list} % if too long for running head          \institute{F. Author \at                   first address \\                   Tel.: +123-45-678910\\                   Fax: +123-45-678910\\                   \email{fauthor@example.com}           %  \\     %             \emph{Present address:} of F. Author  %  if needed                \and                S. Author \at                   second address     }          \date{Received: date / Accepted: date}     % The correct dates will be entered by the editor               \maketitle          \begin{abstract}     Insert your abstract here. Include keywords, PACS and mathematical     subject classification numbers as needed.     \keywords{First keyword \and Second keyword \and More}     % \PACS{PACS code1 \and PACS code2 \and more}     % \subclass{MSC code1 \and MSC code2 \and more}     \end{abstract}          \section{Introduction}     \label{intro}     Your text comes here. Separate text sections with     \section{Section title}     \label{sec:1}     Text with citations \cite{RefB} and \cite{RefJ}.     \subsection{Subsection title}     \label{sec:2}     as required. Don't forget to give each section     and subsection a unique label (see Sect.~\ref{sec:1}).     \paragraph{Paragraph headings} Use paragraph headings as needed.     \begin{equation}     a^2+b^2=c^2     \end{equation}          % For one-column wide figures use     \begin{figure}     % Use the relevant command to insert your figure file.     % For example, with the graphicx package use       \includegraphics{example.eps}     % figure caption is below the figure     \caption{Please write your figure caption here}     \label{fig:1}       % Give a unique label     \end{figure}     %     % For two-column wide figures use     \begin{figure*}     % Use the relevant command to insert your figure file.     % For example, with the graphicx package use       \includegraphics[width=0.75\textwidth]{example.eps}     % figure caption is below the figure     \caption{Please write your figure caption here}     \label{fig:2}       % Give a unique label     \end{figure*}     %     % For tables use     \begin{table}     % table caption is above the table     \caption{Please write your table caption here}     \label{tab:1}       % Give a unique label     % For LaTeX tables use     \begin{tabular}{lll}     \hline\noalign{\smallskip}     first & second & third  \\     \noalign{\smallskip}\hline\noalign{\smallskip}     number & number & number \\     number & number & number \\     \noalign{\smallskip}\hline     \end{tabular}     \end{table}               %\begin{acknowledgements}     %If you'd like to thank anyone, place your comments here     %and remove the percent signs.     %\end{acknowledgements}          % BibTeX users please use one of     %\bibliographystyle{spbasic}      % basic style, author-year citations     %\bibliographystyle{spmpsci}      % mathematics and physical sciences     %\bibliographystyle{spphys}       % APS-like style for physics     %\bibliography{}   % name your BibTeX data base          % Non-BibTeX users please use     \begin{thebibliography}{}     %     % and use \bibitem to create references. Consult the Instructions     % for authors for reference list style.     %     \bibitem{RefJ}     % Format for Journal Reference     Author, Article title, Journal, Volume, page numbers (year)     % Format for books     \bibitem{RefB}     Author, Book title, page numbers. Publisher, place (year)     % etc     \end{thebibliography}          \end{document}     % end of file template.tex      But After doing so it gives me the following error which I really dont understand what to do with: > +mupdf\fitz\stm_open.c:112: fz_openrfile(): syserr: open > 'C:\Users\A\Desktop\Test\Springer.pdf': No0êf3Ðò7 | > mupdf\mupdf\pdf_open.c:699: pdf_loadxref(): cannot open file: > 'C:\Users\A\Desktop\Test\Springer.pdPêf3ðò7 + mupdf\fitz\stm_open.c:112: > fz_openrfile(): syserr: open 'C:\Users\A\Desktop\Test\Springer.pdf': > Noàéf3ò7 | mupdf\mupdf\pdf_repair.c:165: pdf_repairxref(): cannot open file > 'C:\Users\A\Desktop\Test\Springer Please help me.


title: How to enforce newlines in latex

text: I am creating a macro driven songbook in LaTeX, and have run into a problem: Linebreaks. I want the input text:               Line1     Line2     Line3      To output like that in the PDF as well. It is not an option to use `\\\` or similar linebreaks, the point fo the macro is that people should be able to just write in the text, and TeX should put it in as it's written. Is there a way to make LaTeX respect the newlines? I have found out how to parse double line breaks, using the following code:               \setlength\parskip{1em}                                                               \setlength{\parindent}{0pt}                                                           \def\arraystretch{2}      That will create vertical distance when using double linebreaks (starting new paragraphs).


title: pgfplotstable read data from file and create new columns

text: I made this file `parameters.dat`:               parameter,    value     $K_1$,      0.00034     $K_2$,      0.0053     $K_3$,      0.07     $K_4$,      0.0027      Now I would like to generate a table in my .tex file with 4 columns: (1) Parameter; (2) Default value (the one from the .dat file); (3) Lower bound (0.75*value); (4) Upped bound (1.25*value). I tried with the following code but pdflatex gets stuck in an infinite loop:               \pgfplotstableset{             create on use/lb/.style={                 create col/expr={\thisrow{value}*0.75}},             create on use/ub/.style={                 create col/expr={\thisrow{value}*1.25}}         }         \pgfplotstabletypeset[                 col sep=comma,             columns={parameter, value, lb, ub},             columns/parameter/.style={                 column name={Parameter},                 string type             }             columns/value/.style={                 column name={Default Value}             }             columns/lb/.style={                 column name={Lower Bound}             }             columns/ub/.style={                 column name={Upper Bound}             }         ]         {gfx/parameters.dat}


title: Decrease space before and after chapter in fncychap

text: I would like to decrease the space before and after the chapter name due to space constraints. I am using the `fncychap`. Here is the MWE:               \documentclass{report}     \usepackage[Glenn]{fncychap}     \usepackage{lipsum} % filler text          \begin{document}         \chapter{Amazing}         \lipsum[1-5] % filler text     \end{document}


title: How to use punctuation marks in LuaLaTeX with unicode-math?

text: I also posts this here: http://texwelt.de/wissen/fragen/3000/interpunktion-in- lualatex-mit-unicode-math-von-hauptschriftart. The problem is that I want to have the `\period` symbol (also `range="002E` does not work) from the mainfont, but when I run this:               %!TEX TS-program = lualatex     \documentclass{standalone}     %     \usepackage[math-style=ISO]{unicode-math}     %     \setmainfont{MinionPro-Regular}     %     \setmathfont{LatinModernMath-Regular}     \setmathfont[range=\period]{MinionPro-Regular}     \setmathfont[range=\mathup/{num,latin,Latin,greek,Greek}]{MinionPro-Regular}     \setmathfont[range=\mathbfup/{num,latin,Latin,greek,Greek}]{MinionPro-Bold}     \setmathfont[range=\mathit/{num,latin,Latin,greek,Greek}]{MinionPro-It}     \setmathfont[range=\mathbfit/{num,latin,Latin,greek,Greek}]{MinionPro-BoldIt}          \begin{document}         $\bigl(x^2+5\bigr).$     \end{document}      I get the following result: ![enter image description here](http://i.stack.imgur.com/E0Tqw.jpg) Are there any ideas to solve this problem? Thanks for help. I may think the problem lies in the `\right.`- and `\left.`-delimiters, because you won't get the incorrect result if you use `\left` and `\right` instead of `\bigl(` and `\bigr)`. It seems as if `range=\period` makes them visible. Is there a possibility to fix this?


title: what does an asterisk (*) character do in a renewcommand?

text: > **Possible Duplicate:**   >  What's the difference between \newcommand and \newcommand*? I've seen `*` used in memoir.cls:                  \renewcommand*{\chapnumfont}{\normalfont\HUGE\sffamily}      and wondered which is the purpose of the `*` here?


title: How to make \citet* display full list of authors?

text: When I am using the `natbib` package with `apalike` bibliography style `\citet*` displays only an abbreviated list of authors, such as `Lemarechal et al. (1995)`. How can I make it display a full list of authors, like `Lemarechal, Nemirovskii, and Nesterov (1995)`, keeping the same or similar bibliography style?


title: Typographic conventions for width of figures in LaTeX data analysis reports

text: I posted this question on stats.SE, but the consensus was that it was better suited to tex.SE. * * * **Context:** I've been thinking recently about conventions for figure width in data analysis reports that lead to PDFs (e.g., in A4 or Letter size). My usual context is R, Sweave, and LaTeX. The default figure width in Sweave is 80% of the text-width (i.e., the width of a paragraph of text).               \setkeys{Gin}{width=0.80\textwidth}      **Questions:**   * Is it reasonable for the width of figures to be wider than the text-width (i.e., to spill into the margins)?   * Is the 80% rule of text-width a good one or would, for example 100%, or some other value be better?   * Should the figure widths be consistent throughout a document (or perhaps with two sizes for small and large figures) or should the width be adapted completely to the content? Any references or thoughts on best practice in this regards would be most welcome.


title: How to calculate a new length?

text: What I want to do is calculate the actual size between the edge of the paper, and my header. `\evenmarginsize` and `\oddmarginsize` do not do this.               \settowidth{\msize}{((\paperwidth - \textwidth)/2)}      Doesn't seem to work, how can this be done?


title: Reason of existense of the extra space in align environment and removal of it between two align environments

text: This is a follow-up question regarding the extra vertical space in amsmath's `align` environment. Why when in use `align` uses so much vertical space in contrast with other environments like for example `tabular` or `itemize`?               \documentclass[12pt]{article}     \usepackage[top=0.3in, bottom=1.2in, left=0.8in, right=0.8in]{geometry}               \usepackage[fleqn]{amsmath}     \usepackage{unicode-math}          \setlength{\mathindent}{0cm}     \newcommand{\3}{\vspace{0.3cm}}          \title{}     \author{}     \date{}          \begin{document}          70          \begin{align*}     &e^{jz}=\cos z+j\sin z\\     &\cos z=(1/2)(2\cos z)=\\     &=(1/2)(2\cos z+j\sin z-j\sin z)=\\     &=(1/2)(\cos z+j\sin z+\cos z-j\sin z)=\\     &=(1/2)(e^{jz}+e^{-jz})     \end{align*}          80          \begin{itemize}     \item Item 1          \item Item 2          \end{itemize}          90          \begin{tabular}{c|c}      Entry 1& Entry 2  \\      Entry 3& Entry 4     \end{tabular}          \end{document}      ![enter image description here](http://i.stack.imgur.com/99hiz.png) Also another image of the huge space between two `align` environments. Even without the blank lines the space is a lot. ![enter image description here](http://i.stack.imgur.com/AewNc.png)               \begin{document}          \begin{multicols*}{2}               \begin{align*}     &\text{70}\\     &e^{jz}=\cos z+j\sin z\\     &\cos z=(1/2)(2\cos z)=\\     &=(1/2)(2\cos z+j\sin z-j\sin z)=\\     &=(1/2)(\cos z+j\sin z+\cos z-j\sin z)=\\     &=(1/2)(e^{jz}+e^{-jz})     \end{align*}                    \begin{align*}     &\text{207}\\     &x(t)=A_{c}\cos \theta(t)\\     &\theta(t)=2\pi f_{c}t+\phi(t)\\     &\phi(t)=K_{p}m(t)\\     &x(t)=A_{c}\cos[2\pi f_{c}t+K_{p}m(t)]     \end{align*}      Edit I: As I mention in a comment I have tried the following code and there is no difference between two `align` environments, only between text and an `align` environment. Why doesn't work in the case of the two environments and how can I fix it so to work? Also what is the reason that this space exists?               \setlength{\abovedisplayskip}{0pt}     \setlength{\belowdisplayskip}{0pt}     \setlength{\abovedisplayshortskip}{0pt}     \setlength{\belowdisplayshortskip}{0pt}


title: TOC chapter entry alignment

text: I am having trouble formatting the TOC for a document. I have long chapter titles which wrap onto two lines of TOC text. The problem is that the second line of a single chapter title is aligned with the chapter number, but I need it to align with the beginning of the title text on the first line: ![Bad alignment with long chapter titles](http://i.stack.imgur.com/6WpVg.png) I am using a style file that floats around my school, and here is the \l@chapter definition:               \def\l@chapter#1#2{%     \pagebreak[3]     \vskip .75em plus 1pt \@tempdima 1.5em      \begingroup         \parindent \z@ \rightskip \@pnumwidth         \parfillskip -\@pnumwidth         \leavevmode {\MakeUppercase{#1}\mydotfill \hbox to\@pnumwidth{\hss #2}}         \par     \endgroup     }      Any ideas for how to get the second line to align with the text on the first?? thanks!


title: AucTeX: run latexmk + viewer in one command

text: **Question 1** : I would like to have a single key combo (C-c C-a) which compiles the file (with latexmk) and displays it. This answer solves the first part. I tried adapting the answer to also call TeX-view, as you see below (with some additional debugging code) but it does not work — `(TeX-active-master (TeX- output-extension))` is None at that point. **Question 2** : Why the heck? I'm a reasonable programmer, but I don't know enough Emacs Lisp to understand how that's possible. Is it a buffer local variable and we are in the wrong buffer? I ran out of time and hope reading the relevant AucTeX source code. Moreover, the code should wait for latexmk, and apparently it does not, because TeX-command runs the external process asynchronously. How should I fix it? Note: I've already tried the suggestion in this other answer, and it does not work.               (defun my-run-latex ()       (interactive)       (let ((output-file (TeX-active-master (TeX-output-extension))))         (message output-file) ;Good.         (TeX-save-document (TeX-master-file))         (TeX-command "LatexMk" 'TeX-master-file -1)         (message (TeX-active-master (TeX-output-extension))) ; Bad         ;(TeX-view) ;Won't work, because TeX-active-master does not work at this point.     )      My AucTeX version is 11.87.3, on Emacs 24.3.1:               M-x emacs-version     > GNU Emacs 24.3.1 (x86_64-apple-darwin, NS apple-appkit-1038.36) of 2013-03-13 on bob.porkrind.org      Update: Why do I need to use the view command, instead of letting the viewer reload the file?   1. The View command will also jump to the ( _clarified_ ) location corresponding to the current location in the editor, while the PDF reload command will not. View (C-c C-v) does work with Skim (Skim provides a command for this purpose).   2. My PDF viewer, Skim on OS X, does not reload the file automatically. I'm using one of the two setups recommended for Skim, the one where the reload is forced through the editor. I've just tried out the other one, and Skim asks whether to reload the file (it preserves the setting only until Skim is closed). I prefer to address this through Emacs than by changing Skim (unless you can show something at least as good as Skim in every respect).


title: How to draw density estimate on histogram by pgfplots?

text: I know how to draw a density histogram using pgfplots from this answer: Is it possible to "transform" a histogram into a density plot in pgfplots?. But how can I draw an estimate line on the histogram like this? ![enter image description here](http://i.stack.imgur.com/XIhUc.png)               \documentclass{article}     \usepackage{pgfplots}     \begin{document}     \pgfplotsset{         small,         every axis plot post/.style={             fill=orange!75,             draw=orange!50!black         },         trim axis left     }          \begin{tikzpicture}     \begin{axis}[ymin=0, title=\texttt{hist=density}]     \addplot [hist=density] table [y index=0] {random.txt};     \end{axis}     \end{tikzpicture}     \end{document}


title: Biblatex: displaying title before author in the bibliography

text: I'm creating a document that includes two separate bibliographies, which must be formatted differently. I found lockstep's excellent answer on question 10104 ( Two bibliographies with two different styles in the same document ), and I'm already using it. I have loaded the authoryear bibliography style for the main bibliography. But the second bibliography must be formatted with the title before the author name. Any suggestion on how to implement this?


title: Minted does not escape beamer's \end{frame}

text: It seems that the following code does not work as expected (ie. printing the `\end{frame}` as a verbatim colored code. Instead, the `\end{frame}` is interpreted by LaTeX:               \documentclass[10pt,a4paper]{beamer}     \usepackage{minted}     \begin{document}     \begin{frame}[fragile]{Test}     \begin{minted}{latex}     \begin{frame}{Title exemple}     This is an exemple.     \end{frame}     \end{minted}     This is never shown !     \end{frame}     \end{document}      There is a bunch of errors at compilation time :               Runaway argument?     ! File ended while scanning use of \FancyVerbGetLine.     <inserted text>                  \par      l.9 \end{frame}      What should be done for this sample to compile nicely ?


title: Whitespaces in arguments in aux file

text: I am using document template provided here: http://iel.ucdavis.edu/code/ASME/conf-1.7b.html.   My MWI is the `tex` file supplied with the template itself. All I have done is to change author name, conference number etc. and rename `tex` and `bib` files(the new file names do not contain spaces) and include a few packages such as `fontenc`, `babel`. You can find the full changes in the diff link below.   However when I compile with MikTeX, the resulting `aux` file contains entries like `\citation{2.5pt plus 1.49998pt minus 0.59998pt}` and thus it generates empty `bbl` file and no bibliography. What am I doing wrong here? **EDIT 1**   I think this goes without saying but I changed `\bibliography` command to               \bibliography{References}      after renaming the `bib` file to `References.bib`. My `tex` file name is `Report.tex` **EDIT 2**   The MWI is difficult to cut down because I don't know which section is causing a problem. You can take a look at this diff to see what changes I have done to `tex` file that came with template: http://www.diffchecker.com/bvge2l6m. The original `tex` file compiles fine with bibliography.


title: Complex dynamically sized tikz diagram

text: I trying to figure out a way to create diagrams in tikz with a x elements on the left (inputs) and y elements on the right (outputs). The inputs/outputs will be represented by different types of symbols/shapes. So, to get an idea, here is a mockup: ![1](http://i.imgur.com/rcy7xs7.png?1) I'm trying to figure out what the best approach is to achieve this. The background shape needs to adapt to the number of elements in the diagram. The mockup is a very simplified example, The i/o elements will be more complex, and there will be some textual annotations in the figure. Ideally i'm looking for something like the pseudo code below, but i'm not sure this is possible to recreate in TikZ:               \begin{mytikzdiagram}         \somecommandXsettingATitle{diagramtitle}              %inputs         \addInput{\node[shape=rectangle,....] {input1}}         \addInput{\node[shape=rectangle,....] {input2}}         \addInput{\node[shape=customx,....] {input3}}         \addInput{\node[shape=arrow,....] {input4}}              %outputs         \addOutput{\node[shape=rectangle,....] {output1}}         \addOutput{\node[shape=arrow,....] {output2}}          \end{mytikzdiagram}      So, the questions I'm pondering on:   * Is the 'environment' approach even possible?      * if yes, are there any good examples out there to give me an idea what's needed to build this.      * if not, what are my alternatives? Define a macro with a variable number of arguments perhaps?     * other suggestions? I'm not looking for someone to implement this, but my experience is rather limited in this area. So, I hope you guys are able to point me in the right direction by finding out the best solution for my problem.


title: Uniformly itemize list in two columns throughout the document

text: How can I get lists arranged in two columns throughout the document. I would like to make changes only in preamble and not in the list. I am thinking of this structure . First item . second item . third item Here is MWE.               \documentclass{article}     \usepackage{multicol}     \begin{document}         \begin{multicols}{2}             \begin{itemize}     \item 1     \item 2     \item 3     \item 4     \item 5     \item 6     \item 7     \item 8     \item 9     \item 10     \item 11     \item 12     \item 13     \end{itemize}         \end{multicols}     \end{document}


title: typesetting modulus operator, as in remainder

text: Is there a standard way to typeset the modulus operator (as in arithmetic remainder)? The percent sign (`%`) is often used by programming languages and mathematicians tend to use `mod`, but because of the romanization of `mod`, this notation can be confusing when used inline with text as in               So long as T mod n = 0 (i.e., the quantity is an integral multiple of n)...      I am currently using `$T\mod{}n=0$`, which places more space between the first argument and `mod` than between `mod` and the second argument.


title: How to insert LaTeX formulas in LibreOffice?

text: I am using Libreoffice normally, but I need have Gauss Matrix (http://en.wikipedia.org/wiki/Gaussian_elimination) in Libreoffice . I found that Latex can do that. I installed Lyx on Ubuntu. How can I write Gauss Matrix in Lyx? Also how can I export it to Libreoffice Writer?


title: Use mathpazo for body and math but use a non-tex font (in this case Futura) for headings.

text: I have a document that so far has used mathpazo for everything. I love the texlive distributed Palatino for maths and body text. The small caps in particular are much better than the True Type Palatino on my Mac. However, I want to use my True Type Futura for headings. Thus I decided to use xetex. All is well except I can't work out how to load up Futura without unloading mathpazo. I can use fontspec to load up the True Type Palatino, but that is a big demotion for by body text. I want mathpazo for everything except headings and to use my True Type Futura for headings.


title: How to move the last line to the next page?

text: I have a trivial (I hope) problem. I want to move the last line from the even page to the odd one and not to break the paragraph. I tried `\newpage` and it moved the line to the odd page but it broke the paragraph too. Then I tried `\pagebreak[1]` but my text floated (vertically) to the bottom even though i used `\raggedbottom` in my preamble (by the way I wouldn't like to use `\raggedbottom`). I googled and found maybe `changepage` package could help. I used it but my footer moved up and of course I don't want it. I hope it's clear. Do you know what to do?


title: Why does `x_\text y` work?

text: As far as I have understand the tokenization in LaTeX, `x_\text y` will be split up into   1. `x`   2. `_`   3. `\text`   4. `y` Now the `_` will consume/bind to the next token. However, `\text` takes an argument as well. If `_` consumes `\text`, the latter does not have an argument. When I do something like `\frac 1 \sqrt 2`, it does not work in contrast to the first one, and this is the behavior that I would except. Why does the first example work at all?


title: Back inclined Italics Font

text: Do we have any back inclined Italics Font? Just the opposite of the forward inclined Italics?


title: PythonTeX - duplicate entry in .pytxcode file

text: I have started using pythontex with latex and have run into a situation where it appears that when the code is stripped out of the tex document there is some sort of numbering issue. Here is a minimal example:               %! program = pdflatex          \documentclass[oneside,11pt,letterpaper,article]{memoir}     \usepackage{pythontex}          \begin{pycode}     import math          Temp="Text"           def tTableData():         tTempTableData="Text 1 & Text 2 \\\\ \n Text 3 & Text 4 \\\\ \n"         return tTempTableData          \end{pycode}          \begin{document}          \begin{itemize}     \item \py{Temp}     \end{itemize}          \begin{table}[ht]     \begin{tabular}{c c}      Column 1    &   Column 2 \\     \py{tTableData()}     \end{tabular}     \end{table}          \py{Temp}     \py{Temp}          \end{document}      I have found that on the first latex compile action, the .pytxcode file is generated correctly with the following lines generated:               =>PYTHONTEX#py#default#default#1#inline##20#     Temp     =>PYTHONTEX#py#default#default#2#inline##26#     tTableData()     =>PYTHONTEX#py#default#default#3#inline##30#     Temp     =>PYTHONTEX#py#default#default#4#inline##31#     Temp      After running pythontex.py and recompiling the document with latex, the following errors are generated (snipped from the log file):               ./testfile.tex:26: Undefined control sequence.     <argument> c@\pytx@counter           l.26 \py{tTableData()}          ./testfile.tex:26: Undefined control sequence.      ...ssage  LaTeX Error: No counter '\pytx@counter                                                        ' defined.          See the LaTeX ...     l.26 \py{tTableData()}          ./testfile.tex:26: LaTeX Error: No counter '' defined.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.26 \py{tTableData()}          ./testfile.tex:26: Undefined control sequence.     <argument> \pytx@counter           l.26 \py{tTableData()}      The .pytxcode file now has the following lines:               =>PYTHONTEX#py#default#default#1#inline##20#     Temp     =>PYTHONTEX#py#default#default#2#inline##26#     tTableData()     =>PYTHONTEX#py#default#default#2#inline##30#     Temp     =>PYTHONTEX#py#default#default#3#inline##31#     Temp      Note the duplicate entries for #2 in lines #26 and #30. If the itemized list is removed (but `\py{Temp}` is left in place), everything appears to run fine. Any ideas on why this is occurring? I am running texlive 2012 and pythontex v. 0.11.


title: Why my asymptote image is rendered like this?

text: After successful installation of Asymptote, when I execute a sample file why are there horizontal lines in the image (with `pdflatex`) but if I make it as a separate `asy` file and execute `asy file.asy` with `settings.outformat="pdf"` It is rendered well. What is the issue? Here is the tex source code:               \documentclass{standalone}     \usepackage{asymptote}          \begin{document}          \begin{asy}[width=10cm,height=10cm]     settings.prc=false;     import three;     draw(unitsphere);     \end{asy}          \end{document}       ![enter image description here](http://i.stack.imgur.com/cHuNw.png) The foo-1.asy code:               if(!settings.multipleView) settings.batchView=false;     settings.tex="pdflatex";     defaultfilename="3dintersect-1";     if(settings.render < 0) settings.render=4;     settings.outformat="";     settings.inlineimage=true;     settings.embed=true;     settings.toolbar=false;     viewportmargin=(2,2);               settings.prc=false;     import three;     draw(unitsphere);     size(284.52756pt,284.52756pt,keepAspect=true);


title: Alignment Issue

text: I am creating my resume in LaTeX and loving it, using new commands and learning many new things. However I am stuck at the top. I am trying to create an output like this .. ![enter image description here](http://i.stack.imgur.com/rEuVx.png) I have learnt a bit about indentation and have to learn more about using the `geometry` package but during my coding (below) I am not able to align like the above image. I have used `\noindent` and `\flushright` but each time I use the command the indentation starts with new line making the output different. ![enter image description here](http://i.stack.imgur.com/78qD6.png)               %% (c) Shashwat Pant     %% Resume - C.V of Shashwat Pant     %% September 17th 2012          \documentclass[letterpaper,11pt]{article}     %\usepackage{times}     \usepackage{geometry}     \usepackage{hyperref}     \usepackage[empty]{fullpage}          \newcommand{\head}[1]{\noindent \\ \\ \large \bf #1}          \begin{document}          \begin{center}     \bf{\huge Shashwat Pant}\    \end{center}          \hrule          \head{Contact Information}          \begin{center} {           Address         } \end{center}          \begin{flushright}       Voice -           \end{flushright}          \end{document}      Apart from the indentation issue, what font package is good for making resume ?


title: Vertical Alignment of Matrix Cells

text: In the equation below, I would like to have the horizontal dashed lines that seperate different cells of the matrix to be vertically aligned. Furthermore it would be nice if the square brackets of both matrices would have the same height. Any suggestions? PS: The only way to include the extra vectors including the triple dots I figured out was the attached combination of array / matrix environments. Is there a more elegant way to do this? PSS: I am using TexStudio. Is there a similar "automatically align marked code"-function as in Matlab's "Ctrl+I"?               \documentclass{article}     \usepackage{amsmath}     \usepackage{arydshln}          \begin{document}          $$     \left[\begin{array}{c}         \begin{matrix} x\\ \vdots\\ x \\ \end{matrix} \\ \hdashline         0 \\ \hdashline         \begin{matrix} x\\ \vdots\\ x \\ \end{matrix} \\     \end{array}\right] =     \left[\begin{array}{c:c}         0   &   0    \\ \hdashline         0   &   \underbrace{\bar{X}_{11}}_{\bar{X}_{22}} \\ \hdashline         0   &   0 \\     \end{array}\right]     $$          \end{document}


title: key-field in cite is cut after three chars

text: I have some references without an author (e.g. websites) and use the key-field to provide a sorting possibility. Strangely the key field is truncated after 3 characters, both in the cite-command (I use author-year style) and in the bibliography. This looks bad, does anybody have an idea how to change it?   I'm using natbib. **EDIT:** (sorry for the late reply, the email notification seems not to work...) I had to rephrase my question, see below.   First of all here is a minimal example:               \documentclass{scrreprt}     \usepackage[english]{babel}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{lmodern}     \usepackage{natbib}     \begin{document}       %\bibliographystyle{dinat}       \bibliographystyle{agsm}       An eample is given. \citep{example2013title}       \bibliography{literaturtest}     \end{document}          @misc{example2013title,         Key = {Example Website},         Lastchecked = {2013-6-02},         Publisher = {Website editors},         Title = {Title of the webpage},         Url = {http://example.org},         Year = {2013}     }      I found out that the problem is caused by using the bibliography style **agsm** , with **dinat** the key field is not truncated (I must have run LaTeX once less than necessary before to not notice that, sorry!). Unfortunately **dinat** produces German output (e.g. "u.a." instead of "et al.") even I specified English for the babel package. So I would need to rephrase my question:   **How can I get a author-year citation in English without cutting the key- field using the natbib package?**   To answer my own question: I found the **apalike** style doing what I intend. **But** now the url field is not displayed anymore. I found a **apalike- url.bst** style on the net who should add the url field. But I was wondering if there is no "default" bib style that meets the requirements...?


title: Adding nodes outside a tree and drawing arrows to them with tikz-qtree and tikz

text: I try to draw a picture that is supposed to explain the sentence dass er das Lied wird haben singen müssen that he the song will have sing must The idea is to write down the sentence and have the tree from the code below that shows the dominance relations that is which verb dominates which other verb. Directly to the right of singen I want to have an additional node for müssen and to left of it one for haben and to the left of haben one for wird. The verbs that are in the trees should be connected to these nodes with arrows. Is this possible? I tried something (see code), but the new nodes do not come out at the same baseline as singen. Maybe I have to redraw everything in some other way?                   \documentclass{article}          \usepackage{tikz-qtree}          \begin{document}          \begin{tikzpicture}     \Tree [.wird               [.haben                   [.muessen singen ] ] ] \node[anchor=east]{muessen};      \end{tikzpicture}          \end{document}      This is what it should look like: ![enter image description here](http://i.stack.imgur.com/khlsN.png)


title: Alignment of image in tcolorbox

text: Many times we see in books, some significant points, some tips and tricks are put in an attractive box with an image in it (usually the text will be in italics). I would like to achieve the same effect. I have referred this link : Adding an Image inside tcolorbox. And this is what I have achieved :               \documentclass[12pt]{article}     \usepackage{tcolorbox}     \begin{document}     \begin{tcolorbox}[     %      breakable,           left=0pt,           right=0pt,           top=8pt,           bottom=8pt,           colback=white,           colframe=red,           width=\textwidth,           enlarge left by=0mm,           boxsep=5pt,           arc=4pt,           outer arc=4pt,         ]         \Large       \smash{\raisebox{-11pt}{\includegraphics[width=1cm,height=1cm]{colorbox}}}\hfill     \end{tcolorbox}     \end{document}       Output: ![enter image description here](http://i.stack.imgur.com/3uLVB.png)   Now, my question is, How to align that image and add a text not at the center but as a paragraph. What I want to achieve is : ![enter image description here](http://i.stack.imgur.com/2spTx.png)


title: \graphicspath and \include

text: I am trying to define a central graphics path for my thesis, however, the chapters are included with the `\include` command and by using `\include` with `\graphicspath`, pdflatex complains about it can not find the pictures, is not that possible to use `\graphicspath` and `\include` together, for which I do not see a sound reasoning behind. I use in the preamble               \graphicspath{{/home/utab/thesis/phd_text/figures_all//}}      and use               \include{ch9}       Then it can can not find the pictures on the above mentioned directories recursively.


title: Changing axes in tikz-3dplot picture

text: As is, the axes in the following picture ![enter image description here](http://i.stack.imgur.com/ploMu.png)               \documentclass{article}     \usepackage{tikz,tikz-3dplot}      \begin{document}     \begin{tikzpicture}[scale=3]         \draw[thick,->,black] (0,0,0) -- (2,0,0) node[anchor=north east]{$x$};         \draw[thick,->] (0,0,0) -- (0,1,0) node[anchor=north east]{$y$};         \draw[thick,->] (0,0,0) -- (0,0,1) node[anchor=east]{$z$};     \end{tikzpicture}     \end{document}      are as follows:   * x-axis: to the right    * y-axis: up   * z-axis: towards you What do I need to do to achieve the following:   * x-axis: towards you   * y-axis: to the right   * z-axis: up It goes without saying that any coordinates entered must observe the changed axes.


title: Cylindrical Bar Chart

text: I know this might be a long shot, but does anyone happen to know (or point me to where to start) how to draw this chart. Say we have 6 values (5, 10, 15, 20, 25, 30), one for each column. ![enter image description here](http://i.stack.imgur.com/vqXVs.jpg) Thanks in advance!


title: False bold integral symbol

text: Why do I get a false integral symbol when I do `\bm{\int(2x}`? I've just loaded the package `bm` in a usual way, and I'm not using any other different font in the preamble. ![enter image description here](http://i.stack.imgur.com/g5pEH.png)


title: How to make a PS file form a TeX document with graphics ?

text: Could someone explain me how to generate a PS file from a TeX file. I have included some graphics in my TeX file. I used graphicx package. I am using TeXLive Thank you.


title: How to create a receipt / facture?

text: I would like to make a standard template for receipts. It should have the usual stuff, i.e.: name, date, concept, amount given, etc. since they could be used for payments such as rent or just plain deposits. Do you any package that could take care of this? Do you have any ideas on mind how to make this template?


title: \pageref points to wrong page number

text: I'm having a small problem with `\pageref{}` in LaTeX. I have a quite a large document, and towards the end I point to specific pages in the text. Using `hyperref`, the link jumps to the correct part of the document, but the actual page number is incorrect. This is slightly similar (but kind of opposite) to this problem: LaTeX hyperref link goes to wrong page I implemented the solution there (`\refstepcounter{dummy}`), but to no avail. The targets of the `\pageref`s are generally text. One such example is:               ...these\refstepcounter{dummy}\label{s82:rclass} classifications are....      later referenced by:               \S\ref{s82:richness}, p.\pageref{s82:rclass}      Where the first ref is the section the text lives in. I'm using the following (if this helps), in addition to `hyperref`:               \documentclass[11pt]{book}          \usepackage[round]{natbib}      I should note that this works correctly towards the start of the document (where I reference forwards rather than backwards, though I'm not sure if that's significant or not). That said, it also does not work when I attempt a reference forwards in the same chapter (document is a thesis) Many thanks in advance for your help. I would like to include a minimal working example, but the referencing works as expected for the small document I tested. I would be keen to solicit suggestions as to what the problem could be, however.