title: Conflict between mathdesign and Heuristica

text: When using the packages `mathdesign` and `heuristica` together, small caps don't render properly. Like so:               \documentclass[letterpaper,12pt]{amsart}          \usepackage[utopia]{mathdesign}     \usepackage[osf,scaled=.92]{heuristica}          \begin{document}       \textsc{qwertyuiop}     \end{document}      The output shows lower case letters instead of small caps. Other packages like `fourier` don't have the same problem, but I would still prefer to use `mathdesign`. I like the math font better. Is there a way to fix the conflict, or to grab only the math fonts from `mathdesign`?


title: Modified \pageref

text: I want to modify `\pageref{...}` to cite the actual label page number if it is not on the same page (to where the command is called), or to state 'On the present page' if it is, how can this be done? Furthermore, is it possible to state 'Above, on the present page' or 'Below, on the present page' depending on the relative location of the label to where the command was called....


title: How to add binding space to memoir twoside

text: I'm using the LED template to MSc which uses `memoir` `twoside`. I need to print it and it requires extra margins for binding. How do I simply add the extra space on the spine side of the page?               \documentclass[11pt, a4paper, twoside, makeidx]{memoir}     \input{style.tex}          STYLE.TEX:          \usepackage{graphicx}     \usepackage{epsfig}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{amsthm}     \usepackage{booktabs}     \usepackage{stmaryrd}     \usepackage{url}     \usepackage{longtable}     \usepackage[figuresright]{rotating}     \usepackage{geometry}          \usepackage{polski}     \usepackage[cp1250]{inputenc}          % *************** Wygląd strony ***************     \settypeblocksize{*}{32pc}{1.618}          \setlrmargins{*}{1.47in}{*}     \setulmargins{*}{*}{1.3}          \setheadfoot{\onelineskip}{2\onelineskip}     \setheaderspaces{*}{2\onelineskip}{*}          \def\baselinestretch{1.1}          \checkandfixthelayout          % *************** Stylu rozdziałów i podrozdziałów ***************     \makechapterstyle{mychapterstyle}{%         \renewcommand{\chapnamefont}{\LARGE\sffamily\bfseries}%         \renewcommand{\chapnumfont}{\LARGE\sffamily\bfseries}%         \renewcommand{\chaptitlefont}{\Huge\sffamily\bfseries}%         \renewcommand{\printchaptertitle}[1]{%             \chaptitlefont\hrule height 0.5pt \vspace{1em}%             {##1}\vspace{1em}\hrule height 0.5pt%             }%         \renewcommand{\printchapternum}{%             \chapnumfont\thechapter%             }%     }          \chapterstyle{mychapterstyle}          \setsecheadstyle{\Large\sffamily\bfseries}     \setsubsecheadstyle{\large\sffamily\bfseries}     \setsubsubsecheadstyle{\normalfont\sffamily\bfseries}     \setparaheadstyle{\normalfont\sffamily}          \makeevenhead{headings}{\thepage}{}{\small\slshape\leftmark}     \makeoddhead{headings}{\small\slshape\rightmark}{}{\thepage}


title: kpfonts vs. fence scaling

text: Consider this example               \documentclass[a4paper]{memoir}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage[T1]{fontenc}     \usepackage{kpfonts}     \begin{document}     \[      (\big(\Big(\bigg(\Bigg(     \]     \end{document}      which gives me ![enter image description here](http://i.stack.imgur.com/j2du5.png) Compare it to the same code without, `kpfonts` ![enter image description here](http://i.stack.imgur.com/EtPNo.png) You will notice that the shift from `(` to `\big(` is much less dramatic. Does anyone know if this can be changed somehow? The jump makes things like this look ugly:               \[ \big\{ \{x\} : x \in X \big\}  \]      ![enter image description here](http://i.stack.imgur.com/ZK0ZI.png) * * * This workaround provided by Steven below, seems useful               \newlength\axisht     \setlength{\axisht}{\dimexpr.5\ht\strutbox-.5\dp\strutbox}     \def\scalemathaxis#1#2{\raisebox{\dimexpr\axisht-#1\axisht}{\scalebox{#1}{$#2$}}}     \newcommand\mbigl[1]{\mathopen{\scalemathaxis{0.8}{\big#1}}}     \newcommand\mbigr[1]{\mathclose{\scalemathaxis{0.8}{\big#1}}}     \[ (\mbigl(\big( \]      will then give a more reasonable middle step. ![enter image description here](http://i.stack.imgur.com/v66zy.png) * * * UPDATE June 18. The developer acknowledges the problem but have no time to fix it. His best solution would be to grap the fences from a different font. Which would require remapping every single fence being used, via `\DeclareMathDelimiter` for suitable values, which also require knowledge about which spots in the font the fences are located.


title: Why are empty and non empty TikZ matrix cells not equally placed?

text: I wanted to draw an almost empty `matrix of nodes` with `TikZ` similar to the left most one below. All nodes would have same size (through `minimum width` and `minimum height`) and no separation between columns and rows. But when I include a text which needs two lines I obtain the central matrix and, if the text just needs one line the right most one. I don't know what's wrong. Do you? I'm using CVS version of `TikZ`.               \documentclass[tikz,border=2mm]{standalone}     \usetikzlibrary{matrix}          \tikzset{     proces/.style={draw, minimum height=15mm, minimum width=2cm, outer sep=0pt, text width=1.5cm, align=center}     }          \begin{document}     \begin{tikzpicture}          \matrix (A) [matrix of nodes,nodes=proces,nodes in empty cells] {      & \\      & \\     };          \begin{scope}[xshift=4.5cm]     \matrix (A) [matrix of nodes,nodes=proces,nodes in empty cells] {      & OOO OOO \\      & \\     };     \end{scope}          \begin{scope}[xshift=9cm]     \matrix (B) [matrix of nodes,nodes=proces,nodes in empty cells] {      & A \\      & \\     };     \end{scope}          \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/G9IEg.png)


title: Missaligned tikz matrix

text: I'm trying to create a matrix of nodes that I will then use as a grid for overlaying my real nodes on top of it, but for some reason the grid appears misaligned once I overlay something on top of it, or put some content inside of the nodes.               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{matrix,fit}          \begin{document}          \begin{tikzpicture}         \matrix (table) [             matrix of nodes, nodes in empty cells,             row  sep=1mm, column sep=1mm, inner sep=0mm, outer sep=0mm,             nodes = { draw, minimum width=10mm, minimum height=10mm } ]             {             $Resc_1$ & & & & & & & & \\             $Resc_2$ & & & & & & & & \\             };     \end{tikzpicture}          \end{document}      What am I doing wrong? How can I align the first column with the rest of the matrix?


title: How to insert an EPS picture into a Beamer presentation?

text: I want to insert this picture :![A picture](http://i.stack.imgur.com/GIdcp.png) in to a beamer. I know that there some problems if the picture is in the format of `PNG` or `jpeg`. So, I convert it into `eps` format. When I tried to insert it, it failed with many errors. Can someone show me how to do this? As you can see that it's a little big. How can it be scaled to suit beamer document?


title: I'm trying to put 3 figures side-by-side, but using subfigures put them in a column instead. Am I doing something wrong? Here's my code:

text: \documentclass[12pt]{article}          \usepackage{tikz}     \usepackage{amsmath}      \usepackage{bm}     \usepackage{amssymb}     \usepackage{subcaption}     \usetikzlibrary{decorations.markings}          \usepackage[a4paper,textwidth=17cm,textheight=23cm]{geometry}          \begin{document}          \begin{figure}      \begin{subfigure}[b]{0.30\textwidth}     \centering     \begin{tikzpicture}[decoration={markings,       mark=between positions 0 and 1 step 25pt       with { \draw [fill] (0,0) circle [radius=2pt];}}]     \path[postaction={decorate}] (0,4) to (4,4);     \path[postaction={decorate}] (0,3) to (4,3);     \path[postaction={decorate}] (0,2) to (4,2);     \path[postaction={decorate}] (0,1) to (4,1);     \path[postaction={decorate}] (0,0) to (4,0);     \draw [<->] (2.3,2) -- (1.75,2) -- (1.75,2.65);     \draw [dashed] (0, 1.5) -- (4,1.5);     \draw [dashed] (0, 2.5) -- (4,2.5);     \end{tikzpicture}     \label{lattice1}     \end{subfigure}          \begin{subfigure}[b]{0.30\textwidth}     \centering     \begin{tikzpicture}[decoration={markings,       mark=between positions 0 and 1 step 25pt       with { \draw [fill] (0,0) circle [radius=2pt];}}]     \path[postaction={decorate}] (0,4) to (4,4);     \path[postaction={decorate}] (0,3) to (4,3);     \path[postaction={decorate}] (0,2) to (4,2);     \path[postaction={decorate}] (0,1) to (4,1);     \path[postaction={decorate}] (0,0) to (4,0);     \draw [<->] (2.3,2) -- (1.75,2) -- (1.75,2.65);     \draw [dashed] (1.25,0) -- (1.25,4);     \draw [dashed] (2.25,0) -- (2.25,4);     \end{tikzpicture}     \label{lattice2}     \end{subfigure}          \begin{subfigure}[b]{0.30\textwidth}     \centering     \begin{tikzpicture}[decoration={markings,       mark=between positions 0 and 1 step 25pt       with { \draw [fill] (0,0) circle [radius=2pt];}}]     \path[postaction={decorate}] (0,4) to (4,4);     \path[postaction={decorate}] (0,3) to (4,3);     \path[postaction={decorate}] (0,2) to (4,2);     \path[postaction={decorate}] (0,1) to (4,1);     \path[postaction={decorate}] (0,0) to (4,0);     \draw [<->] (2.3,2) -- (1.75,2) -- (1.75,2.65);     \draw [dashed] (1.25,0) -- (1.25,4);     \draw [dashed] (2.25,0) -- (2.25,4);     \draw [dashed] (0, 1.5) -- (4,1.5);     \draw [dashed] (0, 2.5) -- (4,2.5);     \end{tikzpicture}     \label{lattice3}     \end{subfigure}     \end{figure}          \end{document}


title: What is the time for the beginning of a day? \formattime{00}{00}{00} or \formattime{24}{00}{00}

text: I have set `\settimeformat{ampmtime}`, and I want to print a time which is the very beginning of the day. For `\formattime{00}{00}{00}`, it gives me **12:00am** ; for `\formattime{24}{00}{00}`, it gives me **12:00pm**. Now I am confused...


title: How to properly align a set of very long equations

text: I do have a term and would like to show several steps of a derivation, just like here:               \documentclass{IEEEtran}     \usepackage{amsmath}     \begin{document}     \begin{align}     thisIsATerm \\     &= \framebox[\columnwidth]{long equation 1}\\     &= \framebox[\columnwidth]{long equation 2}     \end{align}     \end{document}      Here, the equations 1 and 2 are filling up a single (double-column) line. which looks like: ![enter image description here](http://i.stack.imgur.com/8M5xD.png) How to I get something that looks better? Maybe something like this (please suggest something more beautiful or how you would do it): ![enter image description here](http://i.stack.imgur.com/q80L2.png)


title: How to change the order of words in a caption?

text: I'd like to change the order of word in the captions of figures and tables. Instead of _Figure 1_ , I'd like to use _1. ábra_. How can I do this? Thank you in advance


title: Synchronizing log output

text: In a flowchart, multiple processes can come together at a _sync point_ , where both processes much reach it before _anything_ can continue. When running a LaTeX file that makes decently heavy use of the log (for debugging purposes), some of my debugging output is intermixed with the list of files being loaded. Is this to be expected (yes, of course, but why?) and is it possible to force the 'standard output' to flush before my debugging log is put through? Sample LaTeX file:               \documentclass{article}          \makeatletter     %%% Begin package propbox     \RequirePackage{xparse}     \RequirePackage{expl3}     \ExplSyntaxOn          \def\propboxdebugmodeon { \def\if_propbox_debug { \iftrue } }     \def\propboxdebugmodeoff { \def\if_propbox_debug { \iffalse } }     \def\propbox_if_debug #1 { \if_propbox_debug #1 \fi }     \def\propbox_debug_msg #1 { \propbox_if_debug { \typeout{#1} } }          %% box collection     %% holds a list of tokens that save boxes     \seq_new:c { propbox_boxes_seq }          %% Property list     %% Comma-separated list of properties     \clist_new:c { propbox_properties_clist }          % inserts #1 into a the sequence with #2's properties     \cs_new_protected:Npn { \g_propbox_new_box } #1 #2 {       % creates a new save box of the name `propbox_boxnames_N' where N is       % the current number of items in the collection---0--\infty.       \tl_set:Nn \l_tmpa_tl { propbox_boxnames_\seq_count:N \propbox_boxes_seq }       \newsavebox { \use:c { \l_tmpa_tl } }       \savebox { \use:c { \l_tmpa_tl } } {         \begin{minipage}{\linewidth}           #2         \end{minipage}       }       \seq_push:Nv { \propbox_boxes_seq } { \use:c { \l_tmpa_tl } }     }          \NewDocumentCommand{\DeclareBoxProperty}{m}{       \propbox_debug_msg { Declaring~new~set~of~box~properties... }       \clist_set:Nn \propbox_properties_clist { #1 }       \propbox_properties_update       \propbox_debug_msg { Complete!~Here~are~the~new~properties: }       \propbox_if_debug { \clist_show:N \propbox_properties_clist }     }          % updates the list of properties a box can have     \cs_new_protected:cpn { propbox_properties_update } {       \propbox_debug_msg { Implementing~new~properties~for~boxes... }       \clist_show:N \propbox_properties_clist       \clist_map_inline:Nn \propbox_properties_clist {         \propbox_debug_msg { Adding~key~'##1' }         \tl_set:Nn \l_tmpa_tl { l_propbox_box_properties__##1 }         \keys_define:nn { propbox / box_properties } {           ##1 .tl_set:c = { \l_tmpa_tl }         }       }            \propbox_debug_msg { Done. }     }               \ExplSyntaxOff     \propboxdebugmodeon     \DeclareBoxProperty{id,difficulty}     %%% End package     \makeatother          \propboxdebugmodeon     \begin{document}     \DeclareBoxProperty{hello,goodbye}     \end{document}      and its log output:               This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/W32TeX)      restricted \write18 enabled.     entering extended mode     LaTeX2e <2011/06/27>     Babel <3.9f> and hyphenation patterns for 78 languages loaded.     (./test.tex (c:/texlive/2013/texmf-dist/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (c:/texlive/2013/texmf-dist/tex/latex/base/size10.clo))     (c:/texlive/2013/texmf-dist/tex/latex/l3packages/xparse/xparse.sty     (c:/texlive/2013/texmf-dist/tex/latex/l3kernel/expl3.sty     (c:/texlive/2013/texmf-dist/tex/latex/l3kernel/l3names.sty     (c:/texlive/2013/texmf-dist/tex/latex/l3kernel/l3bootstrap.sty))     (c:/texlive/2013/texmf-dist/tex/latex/etex-pkg/etex.sty)     (c:/texlive/2013/texmf-dist/tex/latex/l3kernel/l3basics.sty)     (c:/texlive/2013/texmf-dist/tex/latex/l3kernel/l3expan.sty)     (c:/texlive/2013/texmf-dist/tex/latex/l3kernel/l3tl.sty)     (c:/texlive/2013/texmf-dist/tex/latex/l3kernel/l3seq.sty)     (c:/texlive/2013/texmf-dist/tex/latex/l3kernel/l3int.sty)     (c:/texlive/2013/texmf-dist/tex/latex/l3kernel/l3quark.sty)     (c:/texlive/2013/texmf-dist/tex/latex/l3kernel/l3prg.sty)     (c:/texlive/2013/texmf-dist/tex/latex/l3kernel/l3clist.sty)     (c:/texlive/2013/texmf-dist/tex/latex/l3kernel/l3token.sty)     (c:/texlive/2013/texmf-dist/tex/latex/l3kernel/l3prop.sty)     (c:/texlive/2013/texmf-dist/tex/latex/l3kernel/l3msg.sty)     (c:/texlive/2013/texmf-dist/tex/latex/l3kernel/l3file.sty)     (c:/texlive/2013/texmf-dist/tex/latex/l3kernel/l3skip.sty)     (c:/texlive/2013/texmf-dist/tex/latex/l3kernel/l3keys.sty)     (c:/texlive/2013/texmf-dist/tex/latex/l3kernel/l3fp.sty)     (c:/texlive/2013/texmf-dist/tex/latex/l3kernel/l3box.sty)     (c:/texlive/2013/texmf-dist/tex/latex/l3kernel/l3coffins.sty)     (c:/texlive/2013/texmf-dist/tex/latex/l3kernel/l3color.sty)     (c:/texlive/2013/texmf-dist/tex/latex/l3kernel/l3luatex.sty)     (c:/texlive/2013/texmf-dist/tex/latex/l3kernel/l3candidates.sty)     (c:/texlive/2013/texmf-dist/tex/generic/oberdiek/ifpdf.sty)))     Declaring new set of box properties...     Implementing new properties for boxes...     The comma list \propbox_properties_clist contains the items (without outer     braces):     >  {id}     >  {difficulty}.     <recently read> }          l.74 \DeclareBoxProperty{id,difficulty}          Adding key 'id'     Adding key 'difficulty'     Done.     Complete! Here are the new properties:     The comma list \propbox_properties_clist contains the items (without outer     braces):     >  {id}     >  {difficulty}.     <recently read> }          l.74 \DeclareBoxProperty{id,difficulty}          (./test.aux) (c:/texlive/2013/texmf-dist/tex/latex/graphics/graphics.sty     (c:/texlive/2013/texmf-dist/tex/latex/graphics/trig.sty)     (c:/texlive/2013/texmf-dist/tex/latex/latexconfig/graphics.cfg)     (c:/texlive/2013/texmf-dist/tex/latex/pdftex-def/pdftex.def     (c:/texlive/2013/texmf-dist/tex/generic/oberdiek/infwarerr.sty)     (c:/texlive/2013/texmf-dist/tex/generic/oberdiek/ltxcmds.sty)     (c:/texlive/2013/texmf-dist/tex/context/base/supp-pdf.mkii     [Loading MPS to PDF converter (version 2006.09.02).]     ))) (c:/texlive/2013/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty     (c:/texlive/2013/texmf-dist/tex/generic/oberdiek/ifluatex.sty))     (c:/texlive/2013/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty     (c:/texlive/2013/texmf-dist/tex/latex/oberdiek/grfext.sty     (c:/texlive/2013/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty))     (c:/texlive/2013/texmf-dist/tex/latex/oberdiek/kvoptions.sty     (c:/texlive/2013/texmf-dist/tex/latex/graphics/keyval.sty)     (c:/texlive/2013/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty     (c:/texlive/2013/texmf-dist/tex/generic/oberdiek/etexcmds.sty)))     (c:/texlive/2013/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))     Declaring new set of box properties...     Implementing new properties for boxes...     The comma list \propbox_properties_clist contains the items (without outer     braces):     >  {hello}     >  {goodbye}.     <recently read> }          l.80 \DeclareBoxProperty{hello,goodbye}          Adding key 'hello'     Adding key 'goodbye'     Done.     Complete! Here are the new properties:     The comma list \propbox_properties_clist contains the items (without outer     braces):     >  {hello}     >  {goodbye}.     <recently read> }          l.80 \DeclareBoxProperty{hello,goodbye}          (./test.aux) )     (see the transcript file for additional information)     No pages of output.     Transcript written on test.log.          LaTeX exited abnormally with code 1 at Sun Aug 11 20:00:50


title: How to add hyperlinks to enumerate items?

text: I want that each item on an enumerate list has a different hyperlink. Like this:               \documentclass{beamer}     \newcommand{\myitem}[2]{\item[\hyperlink{#2}{#1.\arabic{enumi}}]}          \begin{document}        \begin{frame}           \begin{enumerate}              \myitem{1}{destination1} text 1              \myitem{1}{destination2} text 2           \end{enumerate}        \end{frame}     \end{document}      the result should be:               1.1 text     1.2 text     ...      However this does not wok and i get 1.0 for every number. How do I solve this?


title: Option in the algorithm with Latex

text: This is my algorithm:                \usepackage{algorithm}      \usepackage{algorithmic}      \begin{document}      \begin{algorithm}[H]      \caption{My algo}      \begin{algorithmic}[1]      \STATE instruction 1      \STATE instruction 2      \end{algorithmic}      \end{algorithm}      \end{document}      Please, i ask how can i specify which instruction have applied this option: 1 ? ![enter image description here](http://i.stack.imgur.com/89xLL.png) i'd like to delete the number before "Début" and befor "Fin", i'd like also add spacing before "ch" and "po"


title: canonicalize file path strings in TeX

text: I have a package which recursively loads many little modules (essentially tex files) from relative file paths. As modules may load other modules, I have to be careful not to load modules twice, so I keep a record of the file paths I have loaded. BUT, for this to work I have to canonicalize file names to avoid double loading. So what I really want is a macro `\mod@simpl` that canonicalizes the respective strings by eliminating any occurrences of `foo/..`. I have been able to do that for one level (the code is so ugly that I do not want to include it here; there must be a better way) but not for two. I also looked at the `xstring` package, but that does not help either. The table below is my testing table.               \begin{tabular}{|l|l|l|}\hline       source       & result                          & should be \\\hline\hline       aaa            & \mod@simpl{aaa}            &  aaa\\\hline       ../../aaa      & \mod@simpl{../../aaa}      &  ../../aaa\\\hline       aaa/bbb        & \mod@simpl{aaa/bbb}        & aaa/bbb\\\hline       aaa/..         & \mod@simpl{aaa/..}         & \\\hline       ../../aaa/bbb  & \mod@simpl{../../aaa/bbb}  & ../../aaa/bbb\\\hline       ../aaa/../bbb  & \mod@simpl{../aaa/../bbb}  &  ../bbb\\\hline       ../aaa/bbb     & \mod@simpl{../aaa/bbb}     &  ../aaa/bbb\\\hline       aaa/bbb/../ddd & \mod@simpl{aaa/bbb/../ddd} & aaa/ddd\\\hline       aaa/bbb/../..  & \mod@simpl{aaa/bbb/../..}  & \\\hline     \end{tabular}      Please help. Michael


title: eledpar — parallel columns not being set

text: I am trying to use `eledpar` to typeset paragraphs in two languages in parallel, in columns on the same page, but am having no success. Minimal working example:               %!TEX TS-program = xelatex     %!TEX encoding = UTF-8 Unicode     \documentclass[11pt,asymmetric]{article}     \usepackage{geometry}     \geometry{letterpaper}          \usepackage{eledmac}     \usepackage{eledpar}     \usepackage{lipsum}          \begin{document}           \begin{pairs}       \begin{Leftside}{\lipsum[1]}       \end{Leftside}            \begin{Rightside}{\lipsum[1]}       \end{Rightside}       \Columns      \end{pairs}          \end{document}      * * * Here is the output: ![enter image description here](http://i.stack.imgur.com/giuoT.png) * * * Version and environment: Mac OS: `10.8.4` eledmac:               revision:    31251     cat-version: 1.5/1.4     cat-date:    2013-07-20 17:09:33 +0200      * * * Note: This issue was raised among several others in a post from 2011 but doesn't seem to have been answered there.


title: Process multiple bibtex files

text: I need your help to find a way to process multiple `bibtex` files in TeXworks for Mac. I have to do this because I am working with `multibib`. At the moment I select `bibtex` and press the green bottom to compile, but the second bibliography is not shown on the output file. Thanks in advance for your support! To process my document, I have to run `LaTeX` three times and `BibTEX` two times:   * latex mydoc   * bibtex mydoc   * bibtex sec (How I select a different file name?)   * latex mydoc   * latex mydoc This is a short version of the code I have:               \documentclass{article}     \usepackage{multibib}     \newcites{sec}{\TeX\ and \LaTeX\ References}          \begin{document}     References to the \TeX book \citeltex{Knuth:1991}     and to Lamport’s \LaTeX\ book, which appears     only in the references\nociteltex{Lamport:1994}.     Finally a cite to a Postscript tutorial     \cite{Adobe:1985}.          \bibliographystylesec{alpha}     \bibliographylsec{lit}          \renewcommand{\refname}{Postscript References}     \bibliographystyle{plain}     \bibliography{lit}     \end{document}      The output should look like this: ![Output](http://i.stack.imgur.com/wqXP6.png)


title: how to set the location and font size of the graph?

text: Now I write some code to draw the graph. However, the graph is too large, I just want to put it in the left half of the document. So how to set the font size and location of the graph? Also, I want to change the `and-or-gate` to `diamond` or `bigoplus` in the graph like ![enter image description here](http://i.imgur.com/imgZ3.jpg?1) I don't known how to draw it,would someone help me? The code below is taken from TeXample fault tree example:               \documentclass{minimal}     \usepackage{tikz}     \usetikzlibrary{shapes.gates.logic.US,trees,positioning,arrows}     \begin{document}     \begin{tikzpicture}[     % Gates and symbols style         and/.style={and gate US,thick,draw,rotate=90,             anchor=east,xshift=-1mm},         or/.style={or gate US,thick,draw,rotate=90,             anchor=east,xshift=-1mm},         be/.style={circle,thick,draw,anchor=north,             minimum width=0.7cm},         tr/.style={buffer gate US,thick,draw,rotate=90,             anchor=east,minimum width=0.8cm},     % Label style         label distance=3mm,         every label/.style={blue},     % Event style         event/.style={rectangle,thick,draw,text width=2cm,             text centered,font=\sffamily,anchor=north},     % Children and edges style         edge from parent/.style={->,very thick,draw=black!70},         edge from parent path={(\tikzparentnode.south) -- ++(0,-1.05cm)                 -| (\tikzchildnode.north)},         level 1/.style={sibling distance=5cm,level distance=1.4cm,                 growth parent anchor=south,nodes=event},         level 2/.style={sibling distance=5cm},         level 3/.style={sibling distance=3cm},         level 4/.style={sibling distance=2cm}     %%  For compatability with PGF CVS add the absolute option:     %   absolute         ]            \begin{scope}[xshift=-15cm,yshift=-5cm,very thick]     %% Draw events and edges         \node (g1) [event] {No flow to receiver}              child{node (g2) {No flow from Component B}                 child {node (g3) {No flow into Component B}                    child {node (g4) {No flow from Component A1}                       child {node (t1) {No flow from source1}}                       child {node (b2) {Component A1 blocks flow}}                 }                    child {node (g5) {No flow from Component A2}                       child {node (t2) {No flow from source2}}                       child {node (b3) {Component A2 blocks flow}}                 }                }                 child {node (b1) {Component B blocks flow}}             };     %% Place gates and other symbols     %% In the CVS version of PGF labels are placed differently than in PGF 2.0     %% To render them correctly replace '-20' with 'right' and add the 'absolute'     %% option to the tikzpicture environment. The absolute option makes the     %% node labels ignore the rotation of the parent node.        \node [or]   at (g2.south)   [label=-20:G02] {};        \node [and]  at (g3.south)   [label=-20:G03] {};        \node [or]   at (g4.south)   [label=-20:G04] {};        \node [or]   at (g5.south)   [label=-20:G05] {};        \node [be]   at (b1.south)   [label=below:B01]   {};        \node [be]   at (b2.south)   [label=below:B02]   {};        \node [be]   at (b3.south)   [label=below:B03]   {};        \node [tr]   at (t1.south)   [label=below:T01]   {};        \node [tr]   at (t2.south)   [label=below:T02]   {};     \end{scope}     \end{tikzpicture}     \end{document}


title: Certain text always included in new document

text: Is there a way to make `\documentclass` and all that to always appear in a new document? It's annoying to have to copy from other documents.


title: flalign numbering

text: I have an equation that is so large that it needs to span over several lines. However I also have a particular alignment that I want, so I used the flalign environment to lay it out as I want it to be. However, I end up with each line being numbered, when I only want one number for the whole equation:                   \begin{flalign} \label{soundness:goal}         &   \gamma \tdash \{p\}\cmd\{q\} \implies \forall \sigma \in \TStore. \; \forall h \in \THeap. \; \forall \rho. \\         &   \quad (\sigma, h) \vDash_{\rho} p \implies \forall t \in Trace_{\gamma}(\state{\cmd}{[\sigma]}{ h}). \; \exists n \in \mathbb{N}. \; length(t) < n         \end{flalign}      Is there anyway that I can have an flalgn environment or similar, but only have the last line numbered?


title: In the align environment, how to number only one of the lines?

text: > **Possible Duplicate:**   >  Selective numbering of equations with align I would like to know, how to number only one specific line among many, in the align environment. For instance, I don't want to number all the step of my equation, only the final result.


title: Choose which rows in multi-line equation to assign numbers to

text: If i do:               \begin{align}         a = b \\         b = c \\         c = d \\     \end{align}      The output will be like:               (1)        a = b     (2)        b = c     (3)        c = d      If I use algin* instead. No row will be enumerated. Is there a way to get the following output?                          a = b                b = c     (1)        c = d


title: Multiple copies of short page on one sheet of paper

text: Suppose you have a short document (including a fancy header) which occupies only a small part of a DIN A4 page, like in this example:               \documentclass[a4paper, 12pt]{article}          \usepackage[top=2cm,hmargin=2.2cm]{geometry}          \usepackage{fancyhdr}     \pagestyle{fancy}     \fancyhf{}     \fancyhead[R]{\small \today}     \fancyhead[L]{\small  header}     \fancyfoot[C]{}               \begin{document}     short text  short text  short text short text  short     text  short text  short text  short text  short text  short     text  short text short text  short text  short text  short     text short text  short text  short text  short text  short     text  short text  short text  short text  short text end of the text.     \end{document}      Suppose I want to print this text 50 times. To save paper I would print it and use a photocopier to copy this text incl. fancy header several times to one sheet of paper. Now my question is, if there is a simple LaTeX way to do this, i.e. in the above example, have as many copies of all text from fancy header to "end of the text" automatically on a DIN A4 sheet as you can fit on it?


title: Drawing a comprehensible table

text: I have a 2 column document format. I am interested to draw a specific table. My problem is that my table is big a little bit, That is why I tried first to draw it in a 1 column document format. But when I reduced its size using the command `\resizebox` in order to be drawn only in a 2 column format, it became very small and the values into the table becomes not understandable. So how to draw a comprehensible table in a two-column format document? Any help will be very appreciated:) You can find my code below:               \begin{multicols}{2}         \begin{center}         \resizebox{9.5cm}{!}{         \begin{tabular}{ | l | l | l | | l | l | l | | l | l |}         \hline         $\Delta$ & 0.001 & 0.01 & 0.1 & 0.5 & 1\\         \hline         $D_s (L=2)$ & $4.17 \times 10^{-8}$ & $4.17 \times 10^{-6}$ & $4.17 \times 10^{-4}$ & $ 0.01$ & $ 0.042$\\         \hline         $D_s (L=8)$ & $1.04 \times 10^{-8}$ & $1.04 \times 10^{-6}$ & $1.04 \times 10^{-4}$ & $ 2.6 \times 10^{-3}$ & $ 0.01$\\         \hline         $D_s (L=16)$ & $5.2 \times 10^{-9}$ & $5.2 \times 10^{-7}$ & $5.2 \times 10^{-5}$ & $ 1.3 \times 10^{-3}$ & $ 5.21 \times 10^{-3}$\\         \hline         $D_s (L=32)$ & $2.6 \times 10^{-9}$ & $2.6 \times 10^{-7}$ & $2.6 \times 10^{-5}$ & $ 6.51 \times 10^{-4}$ & $ 2.6 \times 10^{-3}$\\         \hline         $D_s (L=64)$ & $1.3 \times 10^{-9}$ & $1.3 \times 10^{-7}$ & $1.3 \times 10^{-5}$ & $ 3.255 \times 10^{-4}$ & $ 1.3 \times 10^{-3}$\\         \hline         \end{tabular}         }         \end{center}


title: Error - Missing number treated as zero

text: I'm getting this error when trying to combine chapters in my thesis:               Chapter 1.     ! Missing number, treated as zero.     <to be read again>                         }     l.13 ...on{BACKGROUND AND CONTEXT OF ENGD PROJECT}          ?      My main document is:               \documentclass[a4paper]{report}     \usepackage[dvips]{graphicx}     \usepackage{listings}     \usepackage{color}     \usepackage{url}     \usepackage{caption}     \usepackage{parskip}     \usepackage{tabularx,booktabs}     \usepackage{harvard}     \usepackage[top=2.0cm,bottom=2.0cm, left=4.0cm, right=2.0cm, includeheadfoot]{geometry}     \usepackage{pdfpages}     \usepackage{fancyhdr}     \pagestyle{fancyplain}     \usepackage{titlesec}     \usepackage{nomencl}     \makenomenclature     \renewcommand{\nomname}{List of Abbreviations}     \linespread{1.5}     \fancyhf{}     \lhead{\leftmark}     \fancyhead[R]{---Draft---}     \fancyfoot[RO, LE] {\thepage}     \setcounter{secnumdepth}{4}          \begin{document}     \include{Front/Front}               \include{Chapt/Chapt1}     \include{Chapt/Chapt2}     \include{Chapt3/Chapt3}          \addcontentsline{toc}{Chapter}{References}          \renewcommand\bibname{References}     \bibliographystyle{plain}     \bibliographystyle{dcu}     \bibliography{sixth}          \include{References}     \include{Publications/Publications.tex}     \include{Appendix/Appendix.tex}          \end{document}      This is the Chapt1.tex, line 1.13 refers to `\section{BACKGROUND AND CONTEXT OF ENGD PROJECT}`               \pagenumbering{arabic}     \chapter{Chapter Title Here} % Main chapter title     \label{Chapter1} % For referencing the chapter elsewhere, use \ref{Chapter1}     \section{BACKGROUND AND CONTEXT OF ENGD PROJECT}      Any help us much appreciated!


title: AIP Template: greeks letters not working

text: I am trying to use the American Institute of Physics latex template but for some reason some greek letters and other math symbols are not working. Maybe it's my pc. So below is a `aipproc` document class file for you to check where `pi`, `infinity` and `Omega` are not rendered properly.               \documentclass[         ,final            % use final for the camera ready runs     %%  ,draft            % use draft while you are working on the paper     %%  ,numberedheadings % uncomment this option for numbered sections     %%  ,                 % add further options here if necessary       ]       {aipproc}          \usepackage{times,mathptm}     \usepackage{amsfonts} %mathbb     \usepackage{amssymb, amsmath}     \layoutstyle{8x11single}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %% FRONTMATTER     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %\usepackage{amsfonts, amsthm, latexsym}     %\usepackage{amssymb,amsmath, graphicx}     \begin{document}          \title{why are greeks and other symbols failing?}          \classification{02.60.-x,02.70.Bf}     \keywords      {}          % \author{<author1>}{     %   address={<author1 address>}     % }          \author{me}{     %  address={<common address for author2 and author3>}     }          \author{him}{       address={Department of Applied Mathematics}      % ,altaddress={<author1 address>} % additional visiting address     }               \begin{abstract}          \end{abstract}          \maketitle     \section{Introduction}     Pi: $\pi$, Infinity: $\infty$, Omega: $\Omega$          \end{document}


title: write , instead of . in mathmode

text: in my language it's typical to write comma in numbers instead of a dot (12,34 instead of 12.34). However, if I write ",", it automatically inserts space right after the comma. To overcome this, I have to write "{,}" instead. Is is possible to somehow convince latex to write "," instead of "." in mathmode? Thanks for all your suggestions.


title: Contents and Detailed Table of Contents without repetetion and indent

text: ### This question has two parts.      ### Part 1 First, I'm interested to create two TOCs, with a reference in the first shorter TOC the longer and more detailed TOC. Without the reference appearing in the second one. It seems strange to make a reference to 'Detailed Table of Contents' in the Detailed Table of Contents (as illustrated in my example, see below) ### Part 2 Second, how can I make the reference to 'Detailed Table of Contents' and to 'References' indent like the other (numbered sections)? I would like the D in Detailed to be above the F in First, and the same with References. I have made this rather elaborate example below (+ code). ![enter image description here](http://i.stack.imgur.com/1H4vc.png) ![enter image description here](http://i.stack.imgur.com/HUxio.png) ![enter image description here](http://i.stack.imgur.com/gc29y.png)                \documentclass[11pt, a5paper]{article}          \begin{filecontents*}{\jobname.bib}     @book{Veblen1899,         author = {Veblen, Thorstein},         Isbn = {978-81-87879-29-9},         publisher = {Aakar Books},         title = {The Theory of the Leisure Class},         subtitle = {An Economic Study of Institutions},         Year = {[1899] 2005}}          \end{filecontents*}          \usepackage[english]{babel}          \usepackage[backend=bibtex,     style=authoryear, %     natbib=true,]{biblatex}          \usepackage{filecontents}          \addbibresource{\jobname.bib}          \DefineBibliographyStrings{english}{%       bibliography = {References},     }          \usepackage{hyperref}                 \hypersetup{               pdfborderstyle={/S/U/W 1}, % thanks, http://tex.stackexchange.com/a/26085/22939              }          % This package allows you to create another table of contents, with a different depth.     \usepackage{shorttoc}          % change the title of ToC     \addto\captionsenglish{% Replace "english" with the language you use       \renewcommand{\contentsname}%         {Detailed Table of Contents}%     }          \begin{document}     \pagenumbering{roman}     \setcounter{secnumdepth}{1}               % short TOC from the shorttoc package{}     \clearpage     \vspace*{\fill}     \shorttoc{Contents}{2}               \newpage     \clearpage     \vspace*{\fill}     \addcontentsline{toc}{section}{Detailed Table of Contents}      \tableofcontents               \newpage     \pagenumbering{arabic}     \section{First section}     \subsection{First subsection in First section}     \subsection{Second subsection in First section}     \subsubsection{First subsubsection in First section}     \section{Second section}     \subsubsection{First subsubsection in Second section}     \subsubsection{Second subsubsection in Second section}     \subsubsection{Third subsubsection in Second section}     \section{Third section}     \subsection{First subsection in Third section}     \subsubsection{First subsubsection in Third section}     However \citet{Veblen1899} demonstrates that     \printbibliography[heading=bibintoc] % thansk http://tex.stackexchange.com/a/67155/22939     \end{document}


title: Issue with \\ in custom command

text: So I'm trying to make my own command to make matrices less painful My current command is:               \newcommand{\mat}[2]{     \left(\begin{array}{#1}{#2}\end{array}\right)}      with the intention to use it as:               \mat{cc}{1&0\\0&1}      producing the same thing as               \left(     \begin{array}{cc}     1 & 0 \\     0 & 1     \end{array}\right)      But I keep getting the message "Missing } inserted." I think it doesn't like the \\ in the command argument. Any suggestions? Edit: Fixed it. Removed the brace group from the macro


title: Getting the expectation symbol to behave like $\sum$ instead of $\Sigma$

text: How can I get an expectation symbol which behaves like `$\sum$`? Specifically, I want the underscore to be like that of a summation. At the moment I use               $$\mathbb{E}_{x\in A}$$       However, I do not like this. It feels like I am writing a sum as               $$\Sigma_{x\in A}$$       Whereas the alternative               $$\sum_{x\in A}$$      is much nicer when in a centered equation. (The underscore appears directly below the sigma, instead of slight infront and below.) Is there a way to make an expectation symbol which behaves like `$$\sum$$` rather then `$$\Sigma$$`?


title: \multicolumn in array not showing column separator

text: I'm trying to write three columns of equations separated by vertical lines in an array, but when I use the multicolumn command it doesn't show the column separator. I've tried using the multicols package but it messes up the formatting.               \[     \begin{array}{>{\displaystyle}r>{\displaystyle}l|>{\displaystyle}r>{\displaystyle}l|>{\displaystyle}r>{\displaystyle}l}     \frac{\delta^2\psi_L}{\delta x^2}& = -k^2Ce^{ikx}-k^2Re^{-ikx}&\frac{\delta^2\psi_C}{\delta x^2}& = A\kappa^2e^{\kappa x}+B\kappa^2e^{-\kappa x}&\frac{\delta^2\psi_R}{\delta x^2}& = -Tk^2e^{ikx}\\     &&&&&\\     &=-k^2\psi_L&&=\kappa^2\psi_C&&=-k^2\psi_R\\     &&&&&\\     &=-\frac{2mE}{\hbar^2}\psi_L&&=\frac{2m(V-E)}{\hbar^2}\psi_C&&=-\frac{2mE}{\hbar^2}\psi_R\\     &&&&&\\     \multicolumn{2}{l}{\mbox{Substitute into (1), }V=0}&\multicolumn{2}{c}{\mbox{Substitute into (1)}}&\multicolumn{2}{c}{\mbox{Substitute into (1), }V=0}\\     &&&&&\\     E\psi_L&=E\psi_L&(E-V)\psi_C&=(E-V)\psi_C&E\psi_R&=\psi_R\\     \end{array}     \]      ![Output:](http://i.stack.imgur.com/I8p0N.png)


title: Deleting colon while using \renewcommand for table names

text: I have to rename one of the many tables as Fig. But executing the below script resulted in ':' before the caption.               \renewcommand{\tablename}{}     \renewcommand{\thetable}{}          \begin{table}[!h]     \begin{center}          % table contents          \end{center}     \caption{Fig 1: Frame description}     \label{table1}     \end{table}      The caption of the table looked like this- : Fig 1: Frame description. Is there a way to make the initial ':' disappear?


title: Externally set ymin, ymax, xmin and xmax with pgfplotset

text: According to percusses answer in Argument to \input or \include statement? both `height` and `width` in the `axis` environment in `PGFplots` may be set externally (outside the `axis` environment) with a nested `\pgfplotsset` statement:               \pgfplotsset{execute at begin axis={\pgfplotsset{width=5cm}}}       However, if I try to apply the same concept to `xmin`, `xmax`, `ymin` and `ymax` according to the answer suggested by Piotr, `pgfplotsset` doesn't seem to override the settings given within the `axis` environment. Consider the following MWE:               \documentclass{article}     \usepackage{pgfplots}     \pgfplotsset{compat=newest}     \begin{document}     { % begin outer pgfplotsset scope     \pgfplotsset{ymax=5, ymin=1, execute at begin axis={\pgfplotsset{width=5cm}}}     \begin{tikzpicture}     \begin{axis}[width=10cm, ymin=0]         \addplot {x^2};     \end{axis}     \end{tikzpicture}     } % end outer pgfplotsset scope     \end{document}      which produces the following graph, where `ymin` clearly is `0`, though I just set it `ymin=1` in `pgfplotsset`. ![enter image description here](http://i.stack.imgur.com/sIpwB.png) * * * # What I want to achieve Set `xmin`, `xmax`, `ymin` and `ymax` from outside the `axis` environment (in a similar way as I do with `width` applying `execute at begin axis` in `pgsplotsset`), even though they also will be specified in `\begin{axis}[]`. The external call to `xmin` etc. should override the values set in `\begin{axis}[]`. * * *


title: How to adjust the Beamer default font size more finely?

text: I can adjust the default font size for a Beamer presentation using any of these options:               \documentclass[pdf,12pt]{beamer} % very small     \documentclass[pdf,14pt]{beamer} % small     \documentclass[pdf,20pt]{beamer} % very large      Values between `14pt` and `20pt` give the same result as `12pt`, but I think the optimal font size lies somewhere between. How can I adjust the font size to something like `18pt`?


title: Individual value labels in Kiviat Diagram

text: I'm using the `tkz-kiviat` package to draw spider graphs and am quite happy with it. I can see how to add a axis label but how can I label the individual values of each node? There doesn't seem to be a solution to this in the documentation... I'm trying to add the specific values to the balls.               \documentclass[]{scrartcl}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[upright]{fourier}     \usepackage[usenames,dvipsnames]{xcolor}     \usepackage{tkz-kiviat,numprint,fullpage}     \usetikzlibrary{arrows}     \thispagestyle{empty}          \begin{document}          \begin{tikzpicture}[label distance=.15cm]           \tkzKiviatDiagram[radial=5, radial  style/.style ={-}, lattice style/.style ={blue!30}]%             {Poissons,Légumes,Viande,Lait,Pain}           \tkzKiviatLine[thick,color=red,mark=ball,  ball color=red,mark size=4pt,fill=red!20](5,9,6,8,4)           \tkzKiviatLine[thick,color=blue,mark=ball,mark size=4pt,fill=blue!20,opacity=.5](9,6,8,4,5)          \end{tikzpicture}     \end{document}       ![Output](http://i.stack.imgur.com/r8pL3.png)


title: Creating an example environment structured exactly like amsthm's proof environment

text: I want to create an environment for examples that is structured exactly like the `\begin{proof}...\end{proof}` environment, i.e. starting with an italic "Example.", continuing in the same line and ending with a particular symbol to the far right, e.g. `\clubsuit`. Edit: I am using `amsthm` package. How do I do that, i.e. what is the code to be inserted at the beginning?


title: Why to use [T2A, T1] when [T2A] is enough?

text: I am writing some seminar in Cyrillic for university               \documentclass[a4paper,14pt]{extarticle}     \usepackage[T2A,T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{droid}          \DeclareRobustCommand{\cyr}[1]{%       {\fontencoding{T2A}\selectfont#1}%     }          \renewcommand{\contentsname}{\cyr{Садржај}}     \renewcommand{\refname}{\cyr{Литература}}               \begin{document}          \begin{titlepage}     \vspace*{\stretch{2}}     \begin{center}     \huge     \cyr{Назив семинарског} \\          \vspace{\stretch{4}}     %\normalsize     \cyr{Име и презиме}     \end{center}     \end{titlepage}          \tableofcontents     \clearpage          \section{\cyr{Глава 1}}          \cyr{ЋЧСАЋЧСАЋ АСААС ШЂСАШЂ ЊЉЖ СААЋЖ СЦАБЕК АСАЖЋ сажћ ћафа ћжасжћашђ асдажћ}                    \section{\cyr{Глава 2}}          text $math$          English alphabet W Q           $\int\limits_0^1 \frac{x^2-3x}{\sqrt{x-1}}\,dx$               \section{\cyr{ПОГЛАВЉЕ}}          \end{document}      But when I use               \documentclass{article}     \usepackage[T2A]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{droid}      I don't see any difference. So I don't have T1 fonts included. I mean, here I can also write English alphabet using English keyboard and I write here Cyrillic using directly Cyrillic letter. And here I didn't define `\cyr` because I have tried different ways. So mine question is: why should I use first way instead second? I suppose there is different between method 1 and 2, but which one?


title: How to enforce the text filled in flowchart follow single line space?

text: My document is in a `doublespace` environment using `elsarticle` template, that is the whole document is two double line space . I searched the solutions, like `setspace` package. I used it as follows:               \usepackage{setspace}     \begin{singlespace}          my flowchart         \end{singlespace}      The result is that the flowchart and following content are all single line space. In order to keep the content following the flowchart double line space, I do it as follows:               \usepackage{setspace}         \begin{singlespace}          my flowchart         \end{singlespace}              \begin{doublespace}          following content         \end{doublespace}      But it did not work. The results is the same as previous one. Can anyone help me out? Any suggestion will be greatly appreciated!


title: Change bibliography starting number

text: I am currently using the usual field `\begin{thebibliography}` for my references at the end of my scientific papers. The numbers of the citations go from `[1]` to `[19]`, as usual. I would like to change this. I would like that the starting number were `[9]`, to `[27]`, for the citations. How could I do?


title: extrarowheight vs arraystretch

text: What's the difference between these two in a table environment? I've seen they cause somewhat the same result, but I have no idea what is the difference, except that `arraystretch` is used in a scale factor and `extrarowheight` seems to be added in length.


title: Why is the default font in Latex using 10 pt

text: I know that it can be configured, but my question is why 10 pts is the default size. The reason I ask is that a professor has said it was too small to read and I'm worried a proposal could be affected by this. Perhaps knowing why 10pts is the default will assuage my worries.


title: How can I typeset non-inline math in tables?

text: I have to typeset mathematics in table and want to avoid it being scaled down because I have to use inline math (`\\( \\)`). However, using `\\[ \\]` for example does not work. What is the best way to typeset tables with formulas, in such a way that the math is not scaled down? MWE:               \documentclass{article}     \usepackage{amsmath}          \begin{document}          \[ test \] % works          \begin{tabular}{cc}     \[ test  \] & \[ test \]\\ % doesn't work     \end{tabular}          \end{document}


title: Problem with hyperref's pagebackref, modroman and thebibliography

text: Following @yiannis-lazarides comment here, I decided to use the `modroman` package for my frontmatters. In my actual project I don't have that many references, and thus decided to use the `thebibliography` environment. The problem is that I'm also using `hyperref` with the `pagebackrefs` option enabled, and this gives me some _very_ strange warnings; not strange because of the warning _per se_ , but rather because of when it happens (which baffles me). The warning itself is:               name{page.xiij} has been referenced but does not exist, replaced by a fixed one      and its raised when LaTeX is typesetting the pagebackrefs in question. A minimal working example (exercising the warnings further) follows:               \documentclass{book}     \usepackage[pagebackref]{hyperref}     \usepackage{modroman}     \begin{document}       \frontmatter       \renewcommand{\thepage}{\texorpdfstring{\modroman{page}}{\roman{page}}}       \setcounter{page}{10}       Lorem ipsum dolor sit amet\cite{bib}, consectetur adipiscing elit.\clearpage       Lorem ipsum dolor sit amet\cite{bib}, consectetur adipiscing elit.\clearpage       Lorem ipsum dolor sit amet\cite{bib}, consectetur adipiscing elit.\clearpage       Lorem ipsum dolor sit amet\cite{bib}, consectetur adipiscing elit.\clearpage       Lorem ipsum dolor sit amet\cite{bib}, consectetur adipiscing elit.\clearpage       Lorem ipsum dolor sit amet\cite{bib}, consectetur adipiscing elit.\clearpage       Lorem ipsum dolor sit amet\cite{bib}, consectetur adipiscing elit.\cleardoublepage       \begin{thebibliography}{9}         \bibitem{bib}           A.~N.~Author.           Some title here.           \emph{Another one here}, (12):3--5,           September 1990.            \end{thebibliography}     \end{document}      Thoughts anyone? :)


title: Modifying the Page Numbers in the Table of Contents

text: Is there a way how I could make a section/chapter/any-heading which occurs on page x in my document to appear in the table of contents with the page x-1? (I am using scrbook) I'd like this result not for the entire document but only for a part of it. General Example:   * Heading 1 of page 3 is listed in the ToC as starting on page 3. (x)   * Heading 2 of page 11 is listed in the ToC as starting on page 11. (x)   * Heading 3 of page 23 is listed in the ToC as starting on page **22**. (x-1)   * Heading 4 of page 47 is listed in the ToC as starting on page **46**. (x-1)   * Heading 4 of page 69 is listed in the ToC as starting on page 69. (x) It might sound strange but I have good reasons for doing this: Particular Context: In my particular case I think I'll use this in the appendix (A) of the `backmatter`. The headings I am talking about there are sections:               xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx     x                              x                              x     x              \section*{فصل}  x  A.1 \section{Heading}       x     x                              x                              x     x                              x                              x     x                              x                              x     x                              x                              x     x                              x                              x     x                              x                              x     x                              x                              x     x 22                           x                           23 x     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx      On page 22 I use `\section*{Heading}` for creating a section heading that is not listed in the ToC. On page 23 I use `\section{Heading}` to create a section heading that is listed in the ToC but which I would like to apeare there as starting on page 22. The reason why I do this is that the text on page 22 is an Arabic text whose English translation is on page 23 but I want the english title in the ToC.


title: Symbol for skeptical consequence that matches the turnstile package

text: This might be seen as a follow up to Symbol for skeptical consequence. From it I got answers so that I could write that _B_ is a skeptical consequence of _A_ such as ![B is a skeptical consequence of A](http://i.stack.imgur.com/qrRcu.png) which Peter Grill's code produces. Now say that I use the `turnstile` package to typeset turnstiles which symbolizes logical consequence, that I prefer the turnstiles of the turnstile package to `\vdash` and `\vDash`, and that I in the same text want to speak both of logical and skeptical consequence. Then I face two problems:   1. The turnstiles of the turnstiles package don't match any of the symbols for skeptical consequence in the answers of Symbol for skeptical consequence because the turnstiles of the turnstile package are larger.   2. The turnstiles of the turnstile package is superior in how symbols are placed below the turnstile. This can be illustrated by the following which symbolizes that _B_ is a skeptical consequence of _A_ in language _L_ and that _B_ is a logical consequence of _A_ in language _L_ : ![B is a logical and skeptical consequence of A](http://i.stack.imgur.com/46Xe9.png) What I would like is, ideally, an extension of the turnstile package to handle skeptical consequence so that I could produce turnstiles with a wavy horizontal that matches the (normal) turnstiles, both in terms of appearance and ability to have correctly placed symbols below and above, of the turnstile package. Also, in contrast to what the images shows, I'd like the wavy line to be such that it has the same thickness and edges as the vertical line.


title: How to display P0 and Pn-1

text: How can I display the index of P0 has a small letter, as well as Pn-1 (where the n-1 is small) ? I know it's a simple thing but i'm starting with latex and not being able to hit the correct keywords on google.


title: How do I get eprint, hplain, bibtex, hyperref, and pdflatex to work?

text: After reading http://arxiv.org/hypertex/bibstyles/ I thought that I would try to get the bibtex field "eprint" working in my Latex files. So I downloaded hplain.bst, changed `\bibliographystyle{plain}` to `\bibliographystyle{hplain}`, added the eprint field to a bibtex entry, and ran `pdflatex`. The eprint field shows up in the pdf file, but is not a link. Here is a bit of the header from my .tex file:               \documentclass[12pt]{amsart}          \usepackage[hidelinks,pagebackref,pdftex]{hyperref}      What am I doing wrong?


title: Biber locale does not match system language nor biblatex language

text: Suppose I have a file like this:               \documentclass{article}     \usepackage[backend=biber,language=british]{biblatex}     \addbibresource{bibliography.bib}          \begin{filecontents}{bibliography.bib}          @article{HauserYangBerwickTattersallRyanWatumullChomskyLewontin2014,       Author = {Hauser, Marc D. and Yang, Charles and Berwick, Robert C. and Tattersall, Ian and Ryan, Michael and Watumull, Jeffrey and Chomsky, Noam and Lewontin, Richard},       Date-Added = {2014-04-27 10:34:40 +0000},       Date-Modified = {2014-07-06 19:19:20 +0000},       Doi = {10.3389/fpsyg.2014.00401},       Journaltitle = {Frontiers in Psychology},       Number = {401},       Title = {The Mystery of Language Evolution},       Volume = {5},       Year = {2014},     }          \end{filecontents}          \begin{document}          Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed pharetra     odio a lacus tristique, eleifend consectetur sapien pellentesque.     Integer dictum mattis dapibus. Vivamus in sagittis nisi. Nunc quis     adipiscing mauris, ac malesuada sapien. Sed rhoncus sapien sit amet dui     imperdiet, sed sollicitudin turpis condimentum. Ut sed rutrum leo. Nam     hendrerit blandit convallis. Aliquam erat volutpat. Maecenas quis     bibendum ipsum, et fermentum metus. Nam semper congue malesuada.          \cite{HauserYangBerwickTattersallRyanWatumullChomskyLewontin2014}          \printbibliography          \end{document}      I can compile it fine. If I do `$ biber <filename>.bcf` I get the following:               INFO - This is Biber 1.9     INFO - Logfile is 'paper.blg'     INFO - Reading 'paper.bcf'     INFO - Found 1 citekeys in bib section 0     INFO - Processing section 0     INFO - Looking for bibtex format file 'bibliography.bib' for section 0     INFO - Decoding LaTeX character macros into UTF-8     INFO - Found BibTeX data source 'bibliography.bib'     INFO - Overriding locale 'en-US' defaults 'normalization = NFD' with 'normalization = prenormalized'     INFO - Overriding locale 'en-US' defaults 'variable = shifted' with 'variable = non-ignorable'     INFO - Sorting list 'nty' of type 'entry' with scheme 'nty' and locale 'en-US'     INFO - No sort tailoring available for locale 'en-US'     INFO - Writing 'paper.bbl' with encoding 'ascii'     INFO - Output to paper.bbl      This suggests to me that biber has a locale and it's en-US. But my system language, as reported by `$ echo $lang` is en_GB.UTF-8. The language option for biblatex specifies British English. I've noticed that in the .bcf the 'sortlocale' key is just English, which I take it means _US_ English. So, I presume, that's why biber reports that locale. Question: does it matter for my plan to make documents that follow British English conventions that biber has this locale setting? If so, how can I change it? Or is there no difference between UK and US English sorting?


title: Adding a graphics in a subsection

text: I'm trying to add a small graphics which in PDF format in the subsection label but i'm getting errors. The code is:               \subsection{Al-Razi \includegraphics[width=0.4cm]{images/rs} (864-930)}      Is there any way to add the graphics in the subsection label?


title: How to create label based on filename with reftex?

text: I'm using reftex under emacs. In my document, my label policy is the following :               \label{<buffer name>:<env>:<key>}      for example               \label{derivability:thm:Rolle}      Is there a way to do that automatically with reftex ? Thanks you for any advice, link or documentation...


title: TeXstudio Compile: Error: Could not start the command: pdflatex.exe

text: I'm trying write a report in LaTeX but TeXstudio won't let me. All I have is this:               \documentclass[a4paper,11pt]{report}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{lmodern}     \usepackage{graphicx}          \title{----}     \author{---\\By: ----}          \begin{document}          \maketitle     \paragraph{1}     \paragraph{2}      \subparagraph{Red}$\\$     \includegraphics{Red}     \subparagraph{Blue}$\\$     \includegraphics{Blue}          \end{document}      But when I click F1 to compile, TeXstudio spits this message:               Error: Could not start the command: pdflatex.exe -synctex=1 -interaction=nonstopmode "Prelab1".tex      What is the problem? Why can't I compile? P.S: Ever since I switched from Ubuntu back to windows, writing LaTeX documents has been a massive pain T.T. What is the best LaTeX editor that won't give me a problem every single second?


title: Does the package csvsimple support auto pagination?

text: I have a csv file that will probably take two pages, and doing `\csvautotabular{Foo.csv}` just makes my table run off the page. I checked the documentation but did not see anything about pagination of tables. Does anyone know if there's a way to make it automatically break the table across page boundaries? I am also open to using alternate packages for importing CSV's if they solve this problem well.


title: Custom environment with fancy text indentation

text: I am trying to typeset text by breaking it into smaller cameos, numbering each cameo, and putting a heading. See below for an example of how I want the typeset text to look. ![Example of how I want the typeset text to look](http://i.stack.imgur.com/8aqwj.png) The code with which I used to typeset the text is shown below.               \documentclass{article}          \usepackage{verse}          \newlength{\zlindenttext}     \newlength{\zlindentheading}     \newlength{\zlverticalspace}          \newlength{\saveleftmargini}     \setlength{\saveleftmargini}{\leftmargini}          \makeatletter     \newcommand*{\compress}{\@minipagetrue}     \makeatother     \newenvironment{tverse}[1][]{       \compress\ifx\\#1\\\begin{verse}\else\begin{verse}[#1]\fi     }     {       \end{verse}\vspace{-\lastskip}\vspace{-1\baselineskip}       % No left indentation for verses       \setlength{\leftmargini}{\saveleftmargini}     }          \begin{document}          \begin{figure}[h!]     \small     \setlength{\zlindenttext}{5mm}     \setlength{\zlindentheading}{8mm}     \setlength{\zlverticalspace}{4mm}     \begin{tabular}{p{6mm}@{\hspace{4mm}}p{100mm}@{\hspace{-5mm}}p{40mm}}       1.     &     \setlength{\leftmargini}{0\zlindenttext}     \begin{tverse}     And now the Lord says,\\     who formed me from the womb to be his servant,     \end{tverse}     &     \setlength{\leftmargini}{-2\zlindentheading}     \begin{tverse}     GOD SAYS:\\     His Servant     \end{tverse}     \\[\zlverticalspace]       2.     &     \setlength{\leftmargini}{1\zlindenttext}%     \begin{tverse}     to bring Jacob back to him,\\     and that Israel might be gathered to him,     \end{tverse}     &     \setlength{\leftmargini}{-1\zlindentheading}%     \begin{tverse}     JACOB---RETURN\\     Israel---Gathered     \end{tverse}     \\[\zlverticalspace]       3.     &     \setlength{\leftmargini}{2\zlindenttext}%     \begin{tverse}     for I am honored in the eyes of the Lord,\\     and my God has become my strength---     \end{tverse}     &     \setlength{\leftmargini}{0\zlindentheading}%     \begin{tverse}     SERVANT HONORED\\     Made Strong     \end{tverse}     \\[\zlverticalspace]       4.     &     \setlength{\leftmargini}{0\zlindenttext}%     \begin{tverse}     he says:``It is too light a thing,\\     that you should be my servant     \end{tverse}     &     \setlength{\leftmargini}{-2\zlindentheading}%     \begin{tverse}     HE SAYS: TOO LIGHT\\     My Servant     \end{tverse}     \\[\zlverticalspace]       5.     &     \setlength{\leftmargini}{1\zlindenttext}%     \begin{tverse}     to raise up the tribes of Jacob\\     and to restore the preserved of Israel;     \end{tverse}     &     \setlength{\leftmargini}{-1\zlindentheading}%     \begin{tverse}     JACOB---RAISED\\     Israel---Preserved     \end{tverse}     \\[\zlverticalspace]       6.     &     \setlength{\leftmargini}{2\zlindenttext}%     \begin{tverse}     I will give you as a light to the nations\\     that my salvation may reach to the end of the earth.''     \end{tverse}     &     \setlength{\leftmargini}{0\zlindentheading}%     \begin{tverse}     TO NATIONS\\     Salvation To All\end{tverse}     \end{tabular}     \end{figure}          \end{document}      It works, but I think that it could be better. What I would like is to be able to define a new environment with the following features:   1. Options to change the text size, the vertical spacing between cameos, the indentation of the text and the indentation of the headings.    2. Options to shift the text or headings to the left or right as more space may be needed.   3. A new command to specify the level of the text and the level of the heading.   4. Automatic numbering of the cameos. What I want is for the following code below to work               \begin{rhetfigure}[text=small,vertical space=5mm,         text indent=5mm,heading indent=5mm]         \rhettext{0}{         And now the Lord says,\\         who formed me from the womb to be his servant,}         \rhetheading{0}{         GOD SAYS:\\         His Servant}         \\         \rhettext{1}{         to bring Jacob back to him,\\         and that Israel might be gathered to him,}         \rhetheading{1}{         JACOB---RETURN\\         Israel---Gathered}         ...     \end{rhetfigure}      Unfortunately, I don't know enough LaTeX to make this work, and so I would appreciate any help! If you read so far, thank you for reading to the end.


title: How to create a "Diagram package"?

text: After looking for some material about Venn Diagrams, for example that (Ed Sandifer. How Euler Did It, Venn Diagrams Mathematical Association of America, January 2004) and after checking different questions on Tex.stackexchange like How to draw Venn diagrams (especially: complements) in LaTeX, I realized there was no Venn Diagram package and that may be an interesting idea. What if you wanna trace the Venn diagram for 4 different circles ? What about the Euler diagram ? (difference http://en.wikipedia.org/wiki/Venn_diagram) I'm just a beginner in LaTeX, I have some knowledge in C and some basic knowledge in LaTeX but I have no idea of how to build a LaTeX package. I just have an idea of what the requirements should be :   * Compatible with PDFLatex   * Considered as a float by the compiler   * Highly configurable in terms of      * Type of diagram : Venn, Euler, conceptual three axis diagram (here), ...     * Number of sets     * Colors     * Size (scale, width)   * And it would take the past parameters as arguments and options of the package If you have some tutorial for doing it, I'd be glad to start the code but right now I have no idea of how to do it. I just wanted this idea to be somewhere, just like the diagram idea Diagrams package that allows to draw computer buffers (memory diagrams).


title: Where do the values of 1em and 1ex come from?

text: In my answer to “Which measurement units should one use in LaTeX?” I explore the values of `1em` and `1ex` for different fonts using both TFM fonts and the font mechanisms of XeLaTeX that uses non-TFM fonts. My, _highly empirical_ , conclusions in that post are:   * **For TFM fonts:**     * The value of `1em` is not equal to the ‘selected size’ of the font, nor is it the width of an actual “M”.     * The value of `1ex` is not tied to the size of an actual “x”. However, for all the ‘Computer Modern’ text fonts and _most_ styles of the ‘Latin Modern’ text fonts, `1ex` = `\ht` of `\hbox{x}`   * **For non-TFM fonts (in XeLaTeX):**     * The value of `1em` is exactly the ‘selected font size’.     * The value of `1ex` is exactly the height of an “x”. (`\ht` of `\hbox{x}`) Now to my question. Am I correct to assume that:   * **For TFM fonts:**     * The values of `1em` and `1ex` are separate, “independent”, values in the font definition file, and those are read into LaTeX when the font is loaded.   * **For non-TFM fonts (in XeLaTeX):**     * The value of `1em` is **always** set to the ‘selected font size’, and the value of `1ex` is **always** set to the height of an “x”. (`\ht` of `\hbox{x}`)     * _**or_** ; is it possible to have `1em` ≠ ‘selected font size’ _and/or_ `1ex` ≠ `\ht` of `\hbox{x}`? ### Edit to better specify what answer I am looking for: The answer provided by tohecz deals with the design reasons for having `1em` and `1ex` not exactly tied to the extents of letters “M“ and “x”. What I am looking for is an answer more on the lines of where TeX loads these values from. The answer provided by David Carlisle corroborates my first assertion (that for TFM fonts values are loaded from the font definition file, and are independent on the extents of the letters “M” and “x”). What’s left is whether, for Xe(La)TeX, fonts loaded from non-TFM files, the values are _always_ taken from the selected size and extents of letter “x”. I find this interesting since the values of `1em` and `1ex` differ between whether you load Latin Modern fonts from TFM files (via e.g. `\usepackage{lmodern}`) or via new font methods (via e.g. `\fontspec{LMSans10}`) [I realize that `\usepackage{lmodern}` is probably most consistent, but still...]


title: Left marginnote does not work

text: I badly need to have marginal notes on the _left_ margin. The command `\marginpar` does not work. Supposedly, `\marginnote` works, and this needs the `marginnote` package. OK, I tried, but nothing happens. Here is the LaTeX code:               \documentclass{article}      \usepackage{marginnote}     \begin{document}     This is normal text.      \marginnote[left]{right}     \end{document}      Unfortunately, anything I put on the `[left]` field is ignored. Any help would be greatly appreciated!


title: tikz-Graph problem

text: I have the following graph which I defined:               \begin{figure}     \centering     \begin{tikzpicture}       [scale=.8,every node/.style={circle,fill=blue!20}]       \node (n1) at (1,10) {(D,D)};       \node (n2) at (3,8)  {(D,A)};       \node (n3) at (5,6)  {(D,N)};       \node (n4) at (7,4) {(D,O)};       \node (n5) at (7,2)  {\sout{(A,D)}};       \node (n6) at (5,0)  {(A,A)};       \node (n7) at (3,-2)  {(A,N)};       \node (n8) at (1,-4)  {(A,O)};       \node (n9) at (-1,-4)  {\sout{(N,D)}};       \node (n10) at (-3,-2)  {\sout{(N,A)}};       \node (n11) at (-5,0)  {(N,N)};       \node (n12) at (-7,2)  {(N,O)};       \node (n13) at (-7,4)  {(O,D)};       \node (n14) at (-5,6)  {(O,A)};       \node (n15) at (-3,8)  {(O,N)};       \node (n16) at (-1,10)  {(O,O)};           \path[->, every node/.style={font=\sffamily\small}]              (n1)    edge [bend right]  (n4)                  edge [bend right]  (n3)                  edge [bend right]  (n2)               (n2)    edge   (n6)                  edge   (n7)                  edge   (n8)               (n3)    edge   (n11)                  edge   (n12)               (n4)    edge   (n13)                  edge   (n14)                  edge   (n15)                  edge [bend left]  (n16)               (n6) edge [bend right]  (n7)               edge [bend right]  (n8)                   (n7)    edge   (n11)                  edge   (n12)               (n8)    edge   (n13)                  edge   (n14)                  edge   (n15)                  edge   (n16)               (n12)    edge   (n13)                  edge [bend right]  (n14)                  edge [bend right]  (n15)                  edge [bend right]  (n16)               (n13)    edge [bend right]  (n1)                  edge   (n2)                  edge   (n3)                  edge   (n4)               (n14)    edge   (n6)                  edge   (n7)                  edge [bend left]  (n8)               (n15)    edge   (n11)                  edge [bend left]  (n12)               (n16) edge [bend left]  (n13)                edge [bend left]  (n14)                edge [bend left]  (n15)           %selflloops for better graphic display:     (n1)  edge [loop above] node  (n1)           (n6)  edge [loop below] node  (n6)          (n11) edge [loop below] node  (n11)          (n16) edge [loop above] node  (n16)     %   (n11) edge [bend right] node  (n14)     %cannot be added????     %     \end{tikzpicture}     \caption{Graph with the possible states which could be reached.}     \end{figure}      But somehow I get the errors:               ! Package tikz Error: (, +, coordinate, or node expected.          See the tikz package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.471 }               ! Package tikz Error: A node must have a (possibly empty) label text.          See the tikz package documentation for explanation.     Type  H <return>  for immediate help.      Could somebody plz give me a hint how I could solve the paths properly?


title: Differences in vertical positioning of superscripts and subscripts depending on grouping (`{ }`): Why? Caveats? Workarounds?

text: This question about `{(x+y)}^2` vs `(x+y)^2` drew my attention to the slightly different vertical positioning of super- and subscripts for such expressions. Compare `(x+y)^8_8` (left) and `{(x+y)}^8_8` (right) [all expressions in math mode]: ![different vertical positioning of super- and subscripts](http://i.stack.imgur.com/AU9Pk.png)               \documentclass{article}     \begin{document} \((x+y)^8_8\), \({(x+y)}^8_8\) \end{document}      (This minimal example code is barely worth posting.) This raises some questions for me:   * Why is the vertical positioning different in the two expressions?   * Is there anything the LaTeX user should pay attention to to get such vertical positioning "right" (this is assuming that there is deeper rationale behind the difference)?   * Is there an easy way of getting such expressions to always have identical positioning of super- and subscripts? The answers to the linked question above advise against the version with `{ }`, so I assume that any rationale for the difference in vertical positioning will require a different example term.


title: How to cite email/correspondence in IEEE format?

text: I have several email conversations I would like to cite in my PhD thesis. The bibliography style that I'm using is `\bibliographystyle{IEEEtranSN}`. I know that style is _not_ IEEE compliant in a strict way, but comes good enough for me as I'm actually defining the template (as described in this question: When should I upload my new style?). Now, according to this post: Citing personal correspondence with function of cited person via email?, Esteis wrote: > I'd stick "Personal communication" in `howpublished` However, the answer is not complete as for which entry (@article, @inproceedings, etc.) and what should really be the IEEE standard for this. According to `IEEEtran_bst_HOWTO` documentation pdf: > Private communication entries can be created using the misc type with a note > indicating “private communication” or “personal correspondence”, etc. So, the "solution" should be to add a `@misc` entry in your .bib file, something like this:               @misc{IEEEexample:private,       author        = "S. Konyagin",       howpublished  = "private communication",       year          = "1998"     }      However, this seems rather incomplete. Shouldn't we define what type of communication it was (forums, letters, emails, phone talks, etc.)? Should we create a new entry for each conversation? For each day? What should really be the right way to do this?


title: hyperref incorrect links: how to debug?

text: **Problem Statement.** I am writing a large document that is too big to provide here for illustration. For the first hundred pages or so, the hyperlinks are correctly matched to the displayed text. For example, the text might refer to page 55, and the hyperlink would also direct the PDF viewer to that page. But then, at some point, the hyperlinks start pointing to incorrect pages, much earlier in the document. For example, a link might go to page 8, but the displayed text might refer correctly to page 80. (Throughout the document, the _displayed_ references, e.g. page numbers or section numbers, remain correct. It is the hyperlinks that are broken at some point.) **Question.** is there a way to debug documents that use the `hyperref` package, to find out why this sort of thing is happening?


title: Using Color Commands for Math Operators

text: I was wanting to know how is it possible to create a math symbol in color to position correctly. I have used the following but the top limit does not center properly. Sorry for the verbage as I don't know how to word the question precise and clearly. Here is a `mwe` of the problem:               \documentclass[11pt]{article}     \usepackage{color}          \begin{document}          \[ \sum_{\color{red} m=0}^{\color{red}{\infty}}  \]          \end{document}      Which produces the following below: ![enter image description here](http://i.imgur.com/evGjV.png)


title: Inhibit indentation of first paragraph of quotation

text: I'm using LyX. Would it be possible to format something as "quotation" in a way in which the first paragraph doesn't get indented but the subsequent paragraphs does, like the way in which text formatted as "standard" in most classes doesn't indent first paragraphs? I read somewhere than indentation of quotations is language specific but I've tried formatting the text as Danish, German and English with the same result.


title: Having inside delimiters same size as outside ones

text: I want to define a set                $S=     \left\{       \left[\matrix{     a &b \cr     a^2 & b^2\cr     }\right] \left| \right.  a, b  {\rm \  real \  numbers}  \right\} $      How do I make the separating bar | same size as the matrix delimiter?


title: First chapter appearing before first line in table of contents

text: I have a table of contents in my `memoir` book. I want there to be one line for each chapter, in addition to headings for each set of similar chapters. For some reason, the line for the first chapter appears before the first `phantom` line.               \documentclass{memoir}          \begin{document}          \frontmatter     \tableofcontents*          \mainmatter          \phantomsection     \addcontentsline{toc}{part}{Topic 1}          \include{intro}          \chapter{Chapter 2}          This is the second chapter.          \phantomsection     \addcontentsline{toc}{part}{Topic 2}          \chapter{Chapter 3}          This is the third chapter.          \chapter{Chapter 4}          This is the fourth chapter.          \end{document}      The file `intro.tex` in the same directory contains the following:               \chapter{Introduction} \label{chap:intro}          \noindent This is the introductory chapter.      I've noticed that if I paste the contents of `intro.tex` into the main file (instead of using `\include`), the problem is fixed--the "Introduction" line in the table of contents appears before "Topic 1"! However, this isn't a good solution, since I have large chapter files which I want to include separately... What might be causing this problem? And is there a way to fix it?


title: "APPENDIX" shows up in wrong place in table of contents

text: > **Possible Duplicate:**   >  First chapter appearing before first line in table of contents I am working on my thesis and using a class file provided by previous students. Here is my problem. My toc currently looks like this               LIST OF TABLES....viii          LIST OF FIGURES...ix          CHAPTER     1 CHAPTER 1 TITLE            1.1...       1.2...       etc          2 CHAPTER 2 TITLE            2.1...       2.2...       etc          A APPENDIX FOR CH 1          APPENDIX          B APPENDIX FOR CH 2      As you can see, the word "APPENDIX" shows up after "A" and I would like it before "A" right after the chapter 2 subsection stuff. In the class file I am using the following code               \let\savedAppendix=\appendix          \renewcommand{\appendix}          {\savedAppendix          \addcontentsline{toc}{blankhead}{APPENDIX}          }      In my main file I am using the following command               \include{ch1}          \include{ch2}          \appendix          \include{app1}          \include{app2}      In the beginning of `ch1`, `ch2`, `app1`, and `app2`, I invoke the `\chapter{...}` command with the chapter/appendix name inside the argument. I discovered that LaTeX keeps placing the word "APPENDIX" after the first chapter within the appendix. One simple workaround was to insert an empty chapter as follows               \include{ch1}          \include{ch2}          \appendix          \chapter*{}          \include{app1}          \include{app2}      The problem here is that it produces an empty page between the last page of chapter 2 and the first page of appendix A. Any help is greatly appreciated. thanks


title: Add author before chapter title in ToC

text: I working on an edition with various author. And I want the chapter's author name being shown in the ToC. I have modified the chapter to add the author there and use it in the page header as follows:               \documentclass[10pt,twoside]{memoir}     \usepackage[german]{babel}     \usepackage{blindtext}     \usepackage[ansinew]{inputenc}      \usepackage{scrpage2}          %%     % Kopf- und Fußzeile     %%     \usepackage{fancyhdr}     \pagestyle{fancy}          \makeatletter          %%     % Kapitelüberschrift um Feld für Autor erweitern     %%     \newcommand*{\orgichapter}{}     \let\orgichapter\chapter     \renewcommand*{\chapter}[1]{%       \gdef\chapterauthor{#1}%        \orgichapter     }     \renewcommand*{\chapterformat}{}          %%     % Kapitelüberschrift formatieren     %%     \renewcommand{\printchaptername}{} % Kapitelnamen unterdrücken     \renewcommand{\chapternamenum}{}     \renewcommand{\printchapternum}{}  % Kapitelnummer unterdrücken     \renewcommand{\afterchapternum}{}          %%     % Autor nach Titel einfügen     %%     \renewcommand{\afterchaptertitle}{%     \vskip\onelineskip\begin{large}\textit{\chapterauthor}\end{large}     \vskip\onelineskip}          %%     % Zählung auf der Ebene \section beginnen     %%     \renewcommand{\thesection}{\arabic{section}}     \setcounter{secnumdepth}{3} % Subsection mit Zähler (1.1) versehen          %%     % Kolumnentitel     %%     \renewcommand{\chaptermark}[1]{ \markboth{#1}{}  } % Stil der Kopfzeile zurücksetzen     \renewcommand{\sectionmark}[1]{ \markright{#1}{} } % Stil der Kopfzeile zurücksetzen     \fancyhf{}                        % Use fancyhdr     \fancyhead[CE]{\small\chapterauthor}    % L for Left, E for Even page     \fancyhead[CO]{\small\leftmark}         % Aufsatztitel als Kolumentitel     %\fancyhead[CO]{\rightmark}       % \chapter als Kolumnentitel     \fancyhead[LE]{\thepage}          % L for Left, E for Even page     \fancyhead[RO]{\thepage}      \renewcommand{\headrulewidth}{0pt} % Keine Trennlinie          %%     % Inhaltsverzeichnis     %%     \renewcommand*{\cftchapterdotsep}{\cftdotsep}     \settocdepth{chapter}     \renewcommand{\cftchapterfont}{\normalfont}     \renewcommand{\cftchapterpagefont}{\normalfont}          %%     % Dokumentenbeginn     %%     \begin{document}     \tableofcontents*           \chapter{Walter von der Vogelweide}[]{Ich saß uf eynem Steine?}     \section{Und dachte Bein mit Beine}          \Blindtext          \clearpage          \chapter{Hartman von Aue}[Was auch immer]{So gebt nur mehr und immer mehr}          \section{Moralische Quellen der Irrationalität}     \thispagestyle{empty}     \Blindtext     \section{Das ist nur Blindtext}     \Blindtext     \end{document}      How can I use the `\chapterauthor` now in ToC? It should look like this:               Walter von der Vogelweide     Title of the chapter  ........  123          Hartmann von Aue     Title of the chapter  ........  345      I know, many have asked that before, but I can't get it working anyhow.


title: Aligning the currency symbol in a tabular environment

text: Friends, I have to create some sort of a balance sheet, so my first sketch is using a tabular environment. I also have to follow some styling rules. One of the styles rules I need to obey is the presence of the currency symbol in every single monetary description. I defined `\brl` (to be expanded as **R$** ) to make my life easier. Besides that, all currency symbols need to be vertically aligned. Most of the work is wonderfully made by the `siunitx` package. Consider the following code:               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage{siunitx}          \newcommand{\brl}{R\$}          \sisetup{output-decimal-marker={,},group-separator ={.},group-minimum-digits=4}          \begin{document}          \begin{table*}[h]     \centering     \begin{tabular}{p{.35\textwidth}S}     Item 1\dotfill\brl & 10.00\\     Item 2\dotfill\brl & 100.00\\     Item 3\dotfill\brl & 1000.00\\     Item 4\dotfill\brl & 10000.00     \end{tabular}     \end{table*}          \end{document}      That's the workaround I came up. The output is as follows: ![Output](http://i.stack.imgur.com/vnQIR.png) I also need to use `\dotfill`. The dots are part of the styling rules as well. TBH, I'm not proud of my solution. `=P` I'm sure there are better approaches than mine. I suspect `siunitx` can easily solve this issue of currency symbol alignment, but I'm stuck. Any ideas on how to improve my code? **UPDATE:** Sorry if I didn't make myself clear. I was thinking about a currency symbol configuration in the number column itself, something like `\money{1000.00}` instead of putting the `\brl` symbol in the previous column.


title: tlmgr problems under downstream package environment

text: I am looking for more detailed information on tlmgr. The information I have is from `tlmgr --help` and it does not help to solve problems I have. ## Background I have used Robby Workman's `texlive.Slackbuild` to build a texlive package in order to install texlive on my slackware machines in stead of the tetex installation that Slackware comes with up to version 13.37. (I used a more recent release of texlive than the one the script were originally written for, but that should not make a difference. The difference is a few weeks in the 2011 release.) In the end I want to rsync with one repository and store it on my server for use with texlive on my Windows and Linux installations. I also picked up that the philosophy of many of the downstream package makers is not to provide support for things like tlmgr as it does not uphold the distro package management approach. Well it may work for many, but that is too limiting to me. (It's the same approach some people follow towards cpan - if its not pre-packaged for the distro it is not installed; I use Slackware as a basis and expand each box according to what is needed from it.) The first problem I had after installation of the build texlive package was the missing tlmgr associated files. I downloaded all of them. Next I assumed that I had to download `texlive.tlpdb`, but that referred to all potential things that could be installed with texlive. So it was not the solution. If I try to do `tlmgr check file` to do a clean up, it points to `/usr/share/bin` which does not exist, it probably should refer to `/usr/share/texmf/bin`. (Which seems to be a path problem as the variable `$Master` in `tlmgr.pl` refers to that location.) The next thing I tried was to recreate. I deleted `texlive.tlpdb` and ran: `tlmgr recreate-tlpdb`. The first complaint is that more than one platform is possible and one must specify it with `\--platform=`, so I added `\--platform=i386-linux` as inside the `texlive.tlpdb` and for which the texlive installation was built. Then the complaint is the platform is not present in `/usr/share/bin`. I even added a symlink inside `/usr/share/texmf/bin/ i386-linux` to `/usr/share/texmf/bin`, but that also does not solve the problem. ## My question I would like to know how to get tlmgr working so I can update tex-packages as and when I decide to, without waiting for a next release. A full release is also to big (about 1.5GB) to download one every now and then. [My current ISP contract clamps me severely down if I become a prime down-loader and then I might as well use an old 1200Bd dail-up modem.] ## Possible alternative solutions I thought of writing a perl program that extracts from the `texlive.tlpdb` the bits that are appropriate to the installation, but then there are lot of other problems that still need to be overcome, the first two being:   1. Package revision numbers which cannot be correlated with the the installation.   2. Determining which collections and schemes are fully installed. Another possibility is to rebuild the texlive package and build it for multi- platform, but that would still not solve tlmgr's vantage point from `/usr/share/bin`. A last and totally different approach would be to use a different package maker that operates using tl-install and then create a package against a local copy of a texlive repository that I have made more two months ago. After that I could maybe use tlmgr as its supposed to be, I will start searching again for examples of this approach.


title: Flushing within twocolumn article

text: I am new to LaTeX and I'm creating a template for handins for school work. I am using the `article` document class with the `twoclumn` option. In the beginning of the template I am making a header with name of class and title for exercise. I would like to be able to, on a line in the header, write something at the beginning of the line and then on the same line flush something to the right margin but in the first column. Sketch: `MyClassTitle ___________space_____________ SomethingHere || Right column` where `||` denotes the boundary between the two columns. I have been trying with flushright and raggedleft but can not make it work.


title: tikz : Bullseye cart with arrows

text: **Desired Output** ![enter image description here](http://i.stack.imgur.com/rUXTj.jpg) **My MWE** Borrowed the code from here.               % Dartboard.     % Author: Roberto Bonvallet <rbonvall@gmail.com>     % Under Creative Commons attribution license.          \documentclass[tikz]{standalone}     \usepackage{mathpazo}          \tikzstyle{wired}=[draw=gray!30, line width=0.15mm]     \tikzstyle{number}=[anchor=center, color=white]     % Sectors are numbered 0-19 counterclockwise from the top.          % \strip{color}{sector}{outer_radius}{inner_radius}     \newcommand{\strip}[4]{         \filldraw[#1, wired]           ({18 *  #2}      :                   #3) arc           ({18 *  #2}      : {18 * (#2 + 1)} : #3) --           ({18 * (#2 + 1)} :                   #4) arc           ({18 * (#2 + 1)} : {18 *  #2}      : #4) -- cycle;     }          % \sector{color}{sector}{radius}     \newcommand{\sector}[3]{         \filldraw[#1, wired]           (0, 0) --           ({18 * #2} :                   #3) arc           ({18 * #2} : {18 * (#2 + 1)} : #3) -- cycle;     }          \begin{document}          % 81 degrees = 4.5 sectors.     % The rotation leaves 20 at the top.     \begin{tikzpicture}[rotate=81, scale=.14]            % These are the official dartboard dimensions as per BDO's regulations.            % The whole board's background.       \fill[black] (0, 0) circle (225.5mm);            % Even sections.       \foreach\i in {0,2,...,18} {         \sector{black}{\i}{162mm}         \strip{red}{\i}{170mm}{162mm} % Double strip.         \strip{red}{\i}{107mm}{ 99mm} % Treble strip.       }            % Odd sections.       \foreach\i in {1,3,...,19} {         \sector{white}{\i}{162mm}         \strip{green}{\i}{170mm}{162mm} % Double strip.         \strip{green}{\i}{107mm}{ 99mm} % Treble strip.       }            % Bull's ring and eye.       \filldraw[green, wired] (0, 0) circle (15.9mm);       \filldraw[red,   wired] (0, 0) circle (6.35mm);            % Labels.       \foreach \sector/\label in {%           0/20,  1/ 1,  2/18,  3/ 4,  4/13,           5/ 6,  6/10,  7/15,  8/ 2,  9/17,          10/ 3, 11/19, 12/ 7, 13/16, 14/ 8,          15/11, 16/14, 17/ 9, 18/12, 19/ 5}%       {         \node[number] at ({18 * (-\sector + .5)} : 197.75mm) {\label};       }     \end{tikzpicture}          \end{document}      **Output** ![enter image description here](http://i.stack.imgur.com/ylqd9.png) **Questions**   1. My MWE produces there wrongly pages. How to correct this?   2. How to put arrows? Thanks in advance for your help.


title: How to eliminate the gaps before and after \frac{}{}?

text: The macro `\frac` add a gap (approx 1.2pt) before and after the whole fraction. You could compare               \[\frac{1}{1}\frac{1}{1}\frac{1}{1}\frac{1}{1}\frac{1}{1}\frac{1}{1}\frac{1}{1}\frac{1}{1}\]      and               \newcommand{\mycmd}{\hskip1.2pt1\hskip1.2pt}     \[\mycmd\mycmd\mycmd\mycmd\mycmd\mycmd\mycmd\mycmd\]      Even, the `\genfrac` command (setting the third arguement to "0pt") has still keep the gaps back:               \newcommand{\myfrac}{\genfrac{}{}{0pt}{0}{1}{1}}     \[\myfrac\myfrac\myfrac\myfrac\myfrac\myfrac\myfrac\myfrac\]      though the horizontal rule is invisible. The gaps takes some problems:   1. If we use a huge font (e.g. set `\fontsize` to 20pt), the numerator/denominator does not match the fractional line in the projecting.    2. If we write a binomial coefficient, the gaps are not necessity. So, a customized command `\newfrac` without the gaps is beneficial.


title: Help automating calendar creation

text: I'm doing calendars for all the family, and I have a problem _automating_ the process. I'm using the `calendar` tikz library. I need to include the moon phase in the calendar. I can do it with this code               \documentclass{scrartcl}     \usepackage{mathabx}     \usepackage{tikz}     \usetikzlibrary{calendar}     \usepackage{etoolbox}          \newcount\mooncounter     \mooncounter=1          \def\moon{%     \ifnum\mooncounter=1%         $\newmoon$\global\advance\mooncounter by 1\else         \ifnum\mooncounter=2%              $\rightmoon$\global\advance\mooncounter by 1\else             \ifnum\mooncounter=3%                  $\fullmoon$\global\advance\mooncounter by 1\else                 \ifnum\mooncounter=4%                      $\leftmoon$\global\mooncounter=1                 \fi%             \fi%         \fi%     \fi%     }          \begin{document}     \begin{tikzpicture}         \calendar [             dates = 2012-12-1 to 2012-12-last,             week list,             day xshift = 3em             ] if (equals = 2012-12-27,                 equals = 2012-12-2,                 equals = 2012-12-7,                 equals = 2012-12-6,                 equals = 2012-12-8,                 equals = 2012-12-9,                 equals = 2012-12-12) [day text = \moon\%d-];     \end{tikzpicture}     \end{document}      First of all, I don't know how `\newcount` works (just copied the code from other site), but I use it because I can't find the way of doing it with `\newcounter` or `\pgfmathtruncatemacro` (I can't make them work in the `\calendar`). That's why I have this first question: Why the command doesn't work out of the `\calendar`? I mean. If I write               \begin{document}         \moon \moon     \end{document}      it doesn't work as I expected. I want it to be cyclic but it shows me two consecutive `\newmoon`s. Anyway, I want to be able to input the days which have a moon, and then let LaTeX do the rest. I tried with this:               \newcommand*{\listofmoons}[1]{%         \edef\listmoons{#1}%         \def\moons{}%         \foreach \l in \listmoons {%             \xappto\moons{if (equals = 2012-12-\l) [day text=\moon\%d-]}         }%     }      and then use               \begin{tikzpicture}         \listofmoons{2,6,7,8,9,12,27}         \calendar [             dates = 2012-12-1 to 2012-12-last,             week list,             day xshift = 3em             ] \moons;     \end{tikzpicture}      but it doesn't work. Again it doesn't cycle correctly (that's why I'm suspicious about `\newcount`). ## Which is the best way to achieve this? May be another completely different method? By the way, is there any big question/community wiki about calendars? May be it would be good to open one.


title: Project directory organization: where does code output go?

text: I'm trying to build a project directory organization structure which follows best-practices. Adapting this structure, part of my project structure would look as follows:               myproject     myproject/code/r/main.r         myproject/report/main.tex      Q: Where should I tell my R output to go though? Is there a generally acceptable best practice which is the least breakable, most modular, most intuitive, etc.? I see a few options:   1. `myproject/code/r/`. In this case `main.tex` will include statements like `\includgraphics{../code/r/output.pdf}`. This seems clunky though. Should `main.tex` really "know" about `../code/r/`?   2. `myproject/code-output`. In this case `main.tex` will include something like `\includgraphics{../code-output/output.pdf}`. `main.r` would include statements like `pdf("../../code-output/output.pdf")`. Right now this is my preferred method. It seems logical for `main.r` to "put" it's output in a directory that is reasonable for `main.tex` to "see".    3. `myproject/report/img`. In this case `main.tex` will include something like `\includgraphics{./img/output.pdf}`. `main.r` would include statements like `pdf("../../report/img/output.pdf")`. I don't like this approach for the same reasons as "1." above: in this case, it doesn't seem like `main.r` should "know" about `\report\img`.  I'm not a programmer but may be doing a lot of this. So, I'm very curious how programmers think about this sort of stuff. All thoughts are welcome!


title: better reference for apparently undocumented latex command line options?

text: I've gradually blundered upon a number of useful pdflatex command line options from questions in this forum, but not all of these are documented (specifically the useful `-file-line-error` parameter). My command line now includes the following "goodies"               pdflatex -file-line-error -synctex=1 --max-print-line=1000 -interaction batchmode      Is there a better manual for the command line options than the url given? I am using MikTex 2.9 which matches the document url. If this is the best that the docs get, are there more similar undocumented options that are commonly used and helpful?


title: Checking if is Appendix or Chapter

text: How can i check if the value in `\thechapter` or `\value{chapter}` is a letter or a number? That way i could identify if the counter is referring to a normal Chapter or an Appendix.