title: Make paperheight (page length) same as section length

text: I'd like a document where each section is followed by a page-break but otherwise is _one_ page. The sections have varying lengths, mainly due to the size of the picture(s) in each one. So far what I have is:               \documentclass{article}     % make all pages long     \usepackage[paperheight=26in]{geometry}     \usepackage{hyperref} % essential     \usepackage[demo]{graphicx}     \usepackage{lipsum}     % from \documentclass{memoir}      \makeatletter      \newcommand*{\centerfloat}{%        \parindent \z@        \leftskip \z@ \@plus 1fil \@minus \textwidth        \rightskip\leftskip        \parfillskip \z@skip}      \makeatother     % Redefine \section to add \clearpage at the beginning     \newcommand*{\OrgSection}{}       \let\OrgSection\section     \renewcommand*{\section}{       \clearpage       \OrgSection     }     %     \begin{document}     %\tableofcontents     %\newpage     \section{First section}     \lipsum[4]     \begin{figure}     \centerfloat     \includegraphics[width=1.3\textwidth, height=12in]{demo}     \caption{Short caption}     \end{figure}     \section{Second section}     \lipsum[5]     \begin{figure}     \centerfloat     \includegraphics[width=1.3\textwidth, height=4in]{demo}     \caption{Short caption}     \end{figure}     \end{document}      giving: ![enter image description here](http://i.stack.imgur.com/QaCQf.png) This is not intended to be printed. Many of the figures are longer than a standard page, but not all. I'm trying to avoid excessive whitespace. I would also prefer to avoid the figures 'floating' into another section. The above solution works but the pages are too long in some cases. I'm trying to avoid having to redefine `[paperheight]` manually for each section as there are >40. I'm open to other design suggestions here. As still rather new to this so would be great if a solutions requiring `\makeatletter` had a little explanation. I have been looking at the test package screenread which is close to what I want, except that some of my figures are also slightly wider than standard textwidth and this is not supported by the above. Also in the above the default magnification of the .pdf viewer changes depending on section length, which is also not ideal...


title: Modifying the section, subsection and subsubsection style

text: I want to create this ![enter image description here](http://i.stack.imgur.com/W2Rd7.jpg) I want this to draw every time I use the command for the section, subsection and sub subsection I already have the code for the graphics, but I do not know how to do all this is done automatically when each command is written, or how to make the format does not move. anyone can help me to do this??               \documentclass[oneside,spanish,10pt, letterpaper]{memoir}     \usepackage[applemac]{inputenc}     \usepackage{tikz}     \usepackage{anysize}     \marginsize{3cm}{2cm}{2cm}{2cm}     \usepackage[siunitx,european,americanresistors]{circuitikz}     \definecolor{logo}{HTML}{6C17A1}     \definecolor{logo2}{HTML}{FFFF10}     \usepackage{color}      \def\sectionfont{\sffamily\LARGE}     \begin{document}     \begin{tikzpicture}[remember picture,overlay]     %%%Section     \fill[logo](4,-1) rectangle (0,-2);     \draw[color = logo2] (0.5,-1.7) to[R,o-o,label=\mbox{$R_1=\SI{1.1}{\ohm}$}] (2.5,-1.7);     \node[inner sep=0pt,outer sep=0pt,text=white,scale=1,font=\sectionfont]  at (3.2,-1.5)    {1.1};     \node[inner sep=0pt,outer sep=0pt,text=logo,scale=1,font=\sectionfont]  at (5.5,-1.5)   {Some text};          %%%sub section     \fill[logo](1.2,-3) rectangle (1.7,-4);     \fill[logo](1.2,-3.95) rectangle (14,-4);     \node[inner sep=0pt,outer sep=0pt,text=logo,scale=1,font=\sectionfont]  at (.5,-3.5)  {1.1.1};     \node[inner sep=0pt,outer sep=0pt,text=logo,scale=1.2,font=\sffamily]  at (2.8,-3.5){Some text};     \node[inner sep=0pt,outer sep=0pt,text=logo2,scale=1,font=\sectionfont]  at (1.45,-3.5){$\oint$};     \draw[color = logo] (13.99,-4) node [ground] {};          %%%subsub section     \fill[logo](1.7,-5) rectangle (2.2,-6);     \fill[logo](1.7,-5.95) rectangle (12,-6);     \node[inner sep=0pt,outer sep=0pt,text=logo,scale=1,font=\sectionfont]  at (.9,-5.5){1.1.1.1};     \node[inner sep=0pt,outer sep=0pt,text=logo,scale=1.2,font=\itshape]  at (3.5,-5.5){Some text};     \node[inner sep=0pt,outer sep=0pt,text=logo2,scale=1,font=\sectionfont]  at (1.95,-5.5){$\psi$};     \draw[color = logo] (11.99,-6) node [ground] {};     \end{tikzpicture}     \end{document}


title: Leftbar in align environment

text: We have to mark lines in a LaTeX document by vertical lines in the left margin of the site. An excellent solution **outside** of `align` environments is the `leftbar` environment (`framed` package):               \begin{leftbar}      Some Text \\ Multiple lines      \begin{align*}       a=b % Even that is working      \end{align*}     \end{leftbar}      But this isn't working **inside** an `align` environment:               \begin{align*}      a ={}& b \\      \begin{leftbar}**       c ={}& d \\       e ={}& f \\      \end{leftbar}      g ={}& h     \end{align*}      Has anybode a solution, which is easy to use? Yes, there are some workarounds (as ending the `align` environment and starting a new one, using phantom to ensure aligning of the "=" and so on) but I **need** an solution my boss is able to use :-) -- a new `leftbar` environment or something like that...


title: Vertical align of a node

text: I have the following problem. ![enter image description here](http://i.stack.imgur.com/fANQh.png) As you see, the last nodes have a height that shrink the arrows. I want to fix the size of the arrows moving the nodes down. How can I do that? This is a example of my code.               %% LyX 2.1.0 created this file.  For more info, see http://www.lyx.org/.     %% Do not edit unless you really know what you are doing.     \documentclass[14pt,spanish]{extarticle}     \usepackage{fontspec}     \setmainfont[Mapping=tex-text]{Ubuntu}     \usepackage{geometry}     \geometry{verbose,tmargin=2cm,bmargin=2cm,lmargin=2cm,rmargin=2cm}          \makeatletter     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.     \usepackage{tikz}     \usepackage{textgreek}     \usepackage{mhchem}     \usepackage{gensymb}          \usetikzlibrary{shapes.geometric, arrows}          \tikzstyle{inicio} = [rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, draw=black, fill=yellow]     \tikzstyle{nodo} = [rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, draw=black]     \tikzstyle{arrow} = [thick,->,>=stealth]     \tikzstyle{centerzero} = [trim left=0pt,trim right=0pt]          \makeatother          \usepackage{babel}     \addto\shorthandsspanish{\spanishdeactivate{~<>}}          \usepackage{xunicode}     \begin{document}               \begin{center}     \begin{tikzpicture}[node distance=2cm, centerzero]         \node (crecimiento) [inicio] {Crecimiento de la biomasa};              \node (luz) [nodo, below of=crecimiento, xshift=-3cm] {Luz}; \draw [arrow] (crecimiento) -- (luz);         \node (oscuridad) [nodo, below of=crecimiento, xshift=3cm] {Oscuridad}; \draw [arrow] (crecimiento) -- (oscuridad);              \node (alto) [nodo, below of=luz] {Alto crecimiento}; \draw [arrow] (luz) -- (alto);         \node (bajo) [nodo, below of=oscuridad] {Bajo crecimiento}; \draw [arrow] (oscuridad) -- (bajo);              \node (bc1-alto) [nodo, below of=alto, xshift=-2cm, text width=2cm] {BC1: 150 a 470 mg SSl\textsuperscript{-1}}; \draw [arrow] (alto) -- (bc1-alto);         \node (bc2-alto) [nodo, below of=alto, xshift=2cm, text width=2cm] {BC2: 1500 a 1620 mg SSl\textsuperscript{-1}}; \draw [arrow] (alto) -- (bc2-alto);               \end{tikzpicture}     \par\end{center}     \end{document}


title: What path provide in a .dtx file (located in source/ folder) to reach files located in doc/ folder?

text: For a class I want to upload on CTAN, I'd like the provided files to be organized as follows when installed by TeX distributions:               〈ROOT PATH〉/doc/latex/myclass/         myclass.pdf         sample/sample.tex         sample/sample.pdf         README         ...     〈ROOT PATH〉/tex/latex/myclass/         myclass.cls         ...     〈ROOT PATH〉/source/latex/myclass         myclass.dtx         myclass.ins         ...      where `〈ROOT PATH〉` will be the TeX distribution root path. The source documentation file, `〈ROOT PATH〉/source/latex/myclass/myclass.dtx`, contains some code examples and "screenshots" coming from the auxiliary files:   * `〈ROOT PATH〉/doc/latex/myclass/sample/sample.tex`   * `〈ROOT PATH〉/doc/latex/myclass/sample/sample.pdf` For maintenance reasons of the class' development version, these code examples and "screenshots" are directly imported in the `myclass.dtx` source file from the `sample.tex` and `sample.pdf` auxiliary files, thanks to something like:               \lstinputlisting[linerange=...-...]{〈hard coded ROOT PATH〉/doc/latex/myclass/sample/sample.pdf}     ...     \includegraphics[page=...]{〈hard coded ROOT PATH〉/doc/latex/myclass/sample/sample.pdf}      where `〈hard coded ROOT PATH〉` is my own `texmf` tree. This works pretty well. The trouble is that, when distributed by TeX distributions, this workflow will fail because, AFAIU, I'm likely unable to anticipate what TeX distribution `〈hard coded ROOT PATH〉` should be specified in `\lstinputlisting` and `\includegraphics` above, as it depends on:   * the TeX distributions,   * the OS. Hence the user couldn't produce the documentation by running the `.dtx` file. Do you see a way to circumvent this problem?


title: How to optimize a conditional text translation?

text: I am working on a short story written in french, and containing a number of short dialogs in english. A friend suggested it might be a courtesy to potential readers to tranlslate the english content into french by footnotes. I would like however to easily offer both versions, by changing a global parameter as shown in the MWE: with _and_ without footnotes. I wonder if the approach taken is optimal. Moreover, I am trying to come up with yet a third version that would be entirely in french, i.e. by replacing the english text by the content of the footnote, but also with a change of font from `\emph` to normal. I use the `\emph` font to distinguish the text in english from the core document in french. Is there a practical way to do this, or is this overkill?               \documentclass[a5paper]{book}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{ifthen}     \usepackage[english, french]{babel}          \def\lang {e} %variable used for conditional translated footnotes          \begin{document}     \selectlanguage{english}          \begin{enumerate}          \item \emph{--- The manager needs to see you before you leave}     \ifthenelse{\equal{\lang}{}} {}{\footnote{\selectlanguage{french}   Monsieur, le patron veut vous voir avant votre départ !}}!          \selectlanguage{french}     Je tournai la tête et levai les yeux vers le visage de la serveuse.           \item \emph{--- The manager needs to see you before you leave}     \ifthenelse{\equal{\lang}{e}} {}{\footnote{\selectlanguage{french}Monsieur, le patron veut vous voir avant votre départ !}}!     \selectlanguage{french}     Je tournai la tête et levai les yeux vers le visage de la serveuse.      \end{enumerate}     \end{document}


title: ToC numbering problem

text: My LaTeX document is acting strangely. Here is a simplified version of it:               \documentclass{article}          \begin{document}          \tableofcontents     \newpage          \addcontentsline{toc}{part}{A Part of My Document}     \include{includedfile}          \end{document}      And in `includedfile.tex`:               \section{My Section Title}     Quack.      Clearly, in the table of contents, the heading for the part should precede the one for the section, but it doesn't! What's wrong?


title: Table of contents numbering is strange

text: > **Possible Duplicate:**   >  ToC numbering problem My LaTeX document is acting strangely. Here is a simplified version of it:               \documentclass{article}          \begin{document}          \tableofcontents     \newpage          \addcontentsline{toc}{part}{A Part of My Document}     \include{includedfile}          \end{document}      And in `includedfile.tex`:               \section{My Section Title}     Quack.      Clearly, in the table of contents, the heading for the part should precede the one for the section, but it doesn't! What's wrong?


title: Linebreak in url

text: I'm using the `apacite` package and I'm trying in `bibtex` to supress the url if the doi is available. I found an answer in the posting apacite: how to suppress url if doi is avalable? It is exacty what I was looking for, but for some reason the `hyperref` package is no longer of any help with the url's linebreaking as it used to (before I tried the answer). Can anyone help me fix this?               \documentclass[11pt,a4paper]{article}     \usepackage[latin1]{inputenc}     \usepackage[spanish]{babel}     \usepackage{hyperref}           %%%%%%%%%%%%%%%%%%%%%% The solution I'm using          \usepackage{filecontents}     \usepackage{apacite}     \usepackage{etoolbox}          \newtoggle{bibdoi}     \newtoggle{biburl}     \makeatletter     \newsavebox{\bib@url}     \newsavebox{\bib@doi}          \undef{\APACrefURL}     \undef{\endAPACrefURL}     \undef{\APACrefDOI}     \undef{\endAPACrefDOI}          \newenvironment{APACrefURL}       {\global\toggletrue{biburl}\lrbox\bib@url}       {\endlrbox}          \newenvironment{APACrefDOI}       {\global\toggletrue{bibdoi}\lrbox\bib@doi}       {\endlrbox}               \newcommand{\printinfo}{       \iftoggle{bibdoi}{\usebox{\bib@doi}}{\usebox{\bib@url}}       \togglefalse{bibdoi}     }          \AtBeginEnvironment{thebibliography}{     \pretocmd{\PrintBackRefs}{%       \iftoggle{bibdoi}         {\iftoggle{biburl}{\unskip\unskip}{}Doi: \usebox{\bib@doi}}         {\iftoggle{biburl}{Retrieved from \usebox{\bib@url}}}{}       \togglefalse{bibdoi}\togglefalse{biburl}%     }{}{}}     \makeatother     %%%%%%%%%%%%%%%%%%%%%%%%          \begin{document}          \nocite{*}     \bibliographystyle{apacite}     \bibliography{tesis}     \end{document}      And in `tesis.bib` I have               @Article{allali,       Title                    = {{Linear} {Algebra} and Image Processing.},       Author                   = {Allali, Mohamed},       Journal                  = {International Journal of Mathematical Education in Science and Technology},       Year                     = {2010},       Url                      = {http://search.ebscohost.com/login.aspx?direct=true\&db=eric\&AN=EJ894161 \&lang=es\&site=eds-live}     }          @InProceedings{Alves,       Title                    = {Articulation problems between different systems of symbolic representations in {Linear} {Algebra}},       Author                   = {M. {Alves D{\'i}as} and M. Artigue},       Booktitle                = {Proceeding of the 19th {International} {Conference} for the {Psychology} of {Mathematics} {Education}},       Year                     = {1995},       Url                      = {http://files.eric.ed.gov/fulltext/ED411135.pdf}     }          @Article{Aydin2,       Title                    = {The factors effecting teaching {Linear} {Algebra} },       Author                   = {Sinan Ayd{\i}n},       Journal                  = {Procedia - Social and Behavioral Sciences },       Year                     = {2009},       Note                     = {World Conference on Educational Sciences: New Trends and Issues in Educational Sciences },       Number                   = {1},       Pages                    = {1549--1553},       Volume                   = {1},            Doi                      = {10.1016/j.sbspro.2009.01.272},       Url                      = {http://www.sciencedirect.com/science/article/pii/S1877042809002754}     }


title: Globally configuring caption max-widths

text: I've got a series of tex documents that I want to make a few changes to for the sake of readability. One that I can't quite get sorted out cleanly (i.e without a massive regex) is setting a max-caption-width; as some of the captions are several lines long and end up looking the same as the body text. Any suggestions?


The following screenshot produced by `latex-dvips-ps2pdf` and the clipping is well done. ![enter image description here](http://i.stack.imgur.com/6ZHxj.png)               \documentclass{article}     \usepackage{xcolor}     \usepackage{pstricks,pst-func}          \newpsstyle{gridstyle}     {     gridwidth=0.4pt,%default: 0.8pt     gridcolor=red!20,%default: black     griddots=0,%default: 0      %     gridlabels=3pt,%default: 10pt     gridlabelcolor=blue,%default: black     %     subgriddiv=5,%default: 5     subgridwidth=0.2pt,%default: 0.4pt     subgridcolor=green!20,%default: gray     subgriddots=0%default: 0     }          \psset{style=gridstyle}     \newpsobject{psGrid}{psgrid}{}          \begin{document}     \noindent%     \renewcommand{\pshlabel}[1]{\bfseries\tiny #1}% for x-axis     \renewcommand{\psvlabel}[1]{\bfseries\tiny #1}% for y-axis     \psset{yunit=0.4cm,xunit=0.5cm}     \centering\begin{pspicture*}(-4,-5)(4,15)         \psGrid         \psaxes[Dy=2,Dx=2]{<->}(0,0)(-4,-5)(4,15)         \psset{linewidth=1pt,linecolor=blue}         \psPolynomial[coeff=-1 0 1,linecolor=red]{-4}{4}             \psPolynomial[coeff=-1 0 1,xShift=1,linestyle=dashed]{-4}{4}             \rput[rt](3,12){\textcolor{red}{$f(x)$}}         \rput[lt](2.5,1){\textcolor{blue}{$g(x)$}}       \end{pspicture*}     \end{document}      But the following screenshot produced by `xelatex` and the clipping is bad done ![enter image description here](http://i.stack.imgur.com/2glIV.png) Why cannot XeLaTeX clip my PSTricks graph plot correctly? * * * **Last edit** : After updating Miktex packages, xelatex clips the graph correctly.


title: Ugly spacing around f in math mode

text: My paper contains many math expressions like `$abcde$` or `$abdefv$`. Unfortunately, the latter looks very ugly, particularly in regards to the spacing around the `f`. In particular, there is a significant amount of space around the `f` which is not present around the other letters. Is there a method to make that spacing tighter? _Note_ : Joseph Wright suggested using `\\!` to get a negative thin space. This does seem to help. But I'm still a bit curious as to why the problem occurs at all. For example, it looks fine in `$acdfv$` before the `f` but not after. If anyone has some more details on why the spacing ends up as it does, please comment. Thanks.


title: Xelatex, Biblatex: biber.exe not working properly (IPC::Run) error

text: I'm using biber.exe and biblatex with the following preamble in my tex document               \documentclass[fontsize =10pt, BCOR=0mm, DIV=default]{scrartcl}       \usepackage{fontspec}      \usepackage{xunicode}      \usepackage{xltxtra}      \usepackage{polyglossia}      \usepackage{graphicx} % support the \includegraphics command and options      \setmainlanguage{english}      \usepackage{csquotes}      \usepackage[bibstyle= nature, citestyle=numeric-comp, sorting=none, backend = biber]{biblatex}%this style compresses the numbering           \usepackage{setspace} %setting interline spacing      \onehalfspacing      \KOMAoptions{DIV=last}      \bibliography{c} %sets the .bib database \begin{document} \section{Results}           \section{This is a section}     \subsection{This is a subsection}      \emph{this is emphasized} This is a reference      \cite{Beaumont2004}      \end{document}       Now since a day I have alot of problems with biber.exe. The problems started to occur after an update of many packages using the automatic update method of my MikTex installation. No matter which bib file or tex file i try, biber.exe is no longer working properly. And the errors looks similar as when I was using an old version of biber.exe once (this is what I get when I execute biber.exe on the .bcf file manually)               G:\Hierarchische clustering manuscript>biber.exe TESTC.bcf      Could not find or check module 'IPC::Run' [THIS MAY BE A PROBLEM!] at IPC/Cmd.pm line 125 Already tried to use 'IO::Select', which was unsuccessful [THIS MAY BE A PROBLEM !] at IPC/Cmd.pm line 154 INFO - Logfile is 'TESTC.blg' INFO - Found 'TESTC.bcf' INFO - Reading TESTC.bcf INFO - Found 1 citekeys in bib section 0 INFO - Processing bib section 0 INFO - Found 'c.bib' INFO - Processing bibtex format file 'c.bib' for section 0 INFO - Decoding LaTeX character macros into UTF-8 c.bib.utf8, line 4, warning: 36 characters of junk seen at toplevel                   Unicode::Collate: Can't locate Unicode\Collate\allkeys.txt in @INC (@INC contain s: F:\temp\par-homantg\cache-fa06d357fc5a676eeabf7d32fcd743b55bd08598\inc\lib F: \temp\par-homantg\cache-fa06d357fc5a676eeabf7d32fcd743b55bd08598\inc CODE(0x1262 454) CODE(0x1262754))      at Biber.pm line 1412       And this is the output from the latex logfile (truncated)               LaTeX Warning: Citation 'Beaumont2004' on page 1 undefined on input line 104.          [1] ("G:\Hierarchische clustering manuscript\TESTD.aux")          LaTeX Warning: There were undefined references.               Package biblatex Warning: Please (re)run Biber on the file:     (biblatex)                TESTD     (biblatex)                and rerun LaTeX afterwards.      I hope one of the users or developers could get more into detail about this error. Is it related to my machine, is it related to my .bib file (encoded in the wrong way? again see my previous questions regarding biber.exe) or anything else. ? I'm using the latest version of biber.exe (downloaded manually from sourceforge) and biblatex 1.0 **Minimal minimal working example**               \documentclass[11pt]{article}     \usepackage{fontspec}     \usepackage{polyglossia}     \setmainlanguage{english}     \title{clustering analysis}     \author{Tim Homan}     \date{oktober 2010} %          \usepackage[backend = biber]{biblatex}          \bibliography{testlibrary} %sets the .bib database         \begin{document}     \section{Results}     text     \subsection{This is a subsection}     This is a reference \cite{Beaumont2004}     \end{document}      **Library download** The library which i use for my testing can downloaded here (rar to save encoding): download here


title: Can the siunitx table alignment feature, S, align ratios?

text: I'd like to align a list of ratios in a column of a table by the colon. Is this possible using `siunitx`? For instance ratios like the following. 1:0.9 1:1.0125 1:0.99


title: Specify file name shell access via \@@input

text: ## Background: I need to perform a conditional branch based on the first three characters of a file. I found a rather simple solution (on a Unix system, or PC with cygwin installed):               head -1 <file-name> | grep '^<string>'      which returns an empty string for the case where there is no match. My first thought was to write this content to a temporary file and then read that file in, but found an ingenious solution by egreg at Write18: capturing shell (script) output as command/variable? which allows you to capture the output directly into a TeX macro. ## TeX Issue: So, I have managed to get this _mostly_ working. The one detail that does not work is that I need to pass in `\FBFileNameWithPath` to the `\edef\TempResult`. The code below is hard coded to _only_ test the file `A.tex`. If I replace `A.tex` with `\FBFileNameWithPath` then `pfdlatex` just hangs. So with this file name hard coded I get: ![enter image description here](http://i.stack.imgur.com/eq6yA.png) The desired output is ![enter image description here](http://i.stack.imgur.com/OcBoy.png) ## Code:               \documentclass{article}     \usepackage{xstring}          %\usepackage{filecontents}% Commented so as to not overwrite any existing files     \begin{filecontents*}{A.txt}     XY: ad nasdf s     sgs sg sg sg      \end{filecontents*}          \begin{filecontents*}{B.txt}     ZZ: ad nasdf s     sgs sg sg sg      \end{filecontents*}          %% http://tex.stackexchange.com/questions/16790/write18-capturing-shell-script-output-as-command-variable               \newcommand*{\FBFileNameWithPath}{}%     \begingroup\makeatletter\endlinechar=\m@ne\everyeof{\noexpand}     \edef\TempResult{\endgroup\def\noexpand\ShellOutput{\@@input|"head -1 A.txt | grep '^XY:'" }}\TempResult%               \begin{document}     % Should be "matched" as A.txt starts with XY:     \xdef\FBFileNameWithPath{./A.txt}     A.txt: \IfStrEq{\ShellOutput}{}{Not matched}{matched.}%          % Should be "Not matched" as B.txt does NOT start with XY:     \xdef\FBFileNameWithPath{./B.txt}     B.txt: \IfStrEq{\ShellOutput}{}{Not matched}{matched.}%     \end{document}


title: Centering table in landscape page

text: I'm trying to get a table centered both vertically and horizontally in a landscape page. I've tried some of the solutions proposed around here but I can't get them to work in my specific case. Here is my code:               \documentclass{article}     \usepackage{float,lscape}     \begin{document}     \begin{landscape}     \begin{table}[htb!]         \centering         \tiny         \setlength{\tabcolsep}{2pt}         \begin{tabular}{|ll|*4r|*4r|*4r|*4r|*4r|}         % ...         \end{tabular}         \caption{A very wide table}         \label{tab:wide_table}     \end{table}     \end{landscape}     \end{document}


title: Prepend 'Appendix' before 'A' using scrbook

text: I am writing my thesis and need to put 'Appendix' before the numbering (A, B, C, ...) in the table of contents (TOC), the chapter title and in the header. I'd also like for `\autoref{}` to output 'Appendix A'. I am using the scrbook class and have tried several different ways to achieve this but nothing gives me the desired output. I want the title to appear as below so that it reads 'Appendix A (Title)'. This is also how I want it to appear in the TOC and in my header. ![Appendix Title](http://i.stack.imgur.com/zaxSY.png) I've tried using the KOMA option `appendixprefix=true` but this splits Appendix A and More Information onto separate lines and doesn't put 'Appendix' before A in the TOC. I've tried redefining `\thechapter` with `\renewcommand{\thechapter}{Appendix \Alph{chapter}` which gives me the desired output in the title and header of my document but the table of contents output is below and `\autoref{}`'s output is 'Appendix Appendix A'. ![TOC Output](http://i.stack.imgur.com/kAHE2.png) I've tried the appendix package too but this won't add Appendix to the title in the main body, only to the TOC. I've also tried some other hacks which work in both the TOC and the title but then show the previous chapter in the header. I set my headers using the following               \usepackage{fancyhdr}          \setlength{\headheight}{15pt}          \pagestyle{fancy}     \renewcommand{\chaptermark}[1]{ \markboth{\thechapter~#1}{} } % Adds chapter number name to right header     \renewcommand{\sectionmark}[1]{ \markright{\thesection~#1}{} } % Adds section name to left header      I'd really appreciate some help with this as I can't find a solution which works for my 3 main cases of title, TOC and header using the scrbook class. MWE:               \documentclass[12pt,a4paper,oneside,pointlessnumbers]{scrbook}          \usepackage[english]{babel}     \usepackage{blindtext}     \usepackage{fancyhdr}     \usepackage[colorlinks]{hyperref}          \setlength{\headheight}{15pt}          \pagestyle{fancy}     \renewcommand{\chaptermark}[1]{ \markboth{\thechapter~#1}{} }     \renewcommand{\sectionmark}[1]{ \markright{\thesection~#1}{} }           \begin{document}          \frontmatter     \tableofcontents          \mainmatter     \blinddocument          \appendix          \chapter{More Information} \label{app:first}     \section{Another Section}     \autoref{app:first}      \Blindtext          \end{document}


title: Automatically adding DOI fields to a hand-made bibliography

text: Is there a tool that will read a `.bib` file and add the correct DOI fields for all the entries that don't have them? My current workflow is to just add citations as and when I need them with auctex in emacs. So a command line tool would be fine. I'd rather not load the file into some bibliography manager like jabref, because it adds all these superfluous fields like "owner" and "timestamp" which are useless. I guess with all the bibliographic information in the file, it should be easy to identify the right DOI with some judicious database searching...


title: An environment to change the vertical space around a formula

text: Specially in beamer presentations, I use a custom environment to change the vertical space around a formula. The code is:               \newenvironment{shrinkeq}[1]     { \bgroup       \addtolength\abovedisplayshortskip{#1}       \addtolength\abovedisplayskip{#1}       \addtolength\belowdisplayshortskip{#1}       \addtolength\belowdisplayskip{#1}}     {\egroup}      However, an unwanted horizontal space is added in front of the text following the formula. For example, the code               Text before text before text before\dots     \[ \int_{a_1}^{b_1}f(x)dx+\int_{a_2}^{b_2}g(x)dx+\int_{a_3}^{b_3}h(x)dx=0 \]     Text after text after text after\dots     \bigskip          Text before text before text before\dots     \begin{shrinkeq}{-2ex}     \[ \int_{a_1}^{b_1}f(x)dx+\int_{a_2}^{b_2}g(x)dx+\int_{a_3}^{b_3}h(x)dx=0 \]     \end{shrinkeq}     Text after text after text after\dots      produces ![alt text](http://i.stack.imgur.com/TClkb.png) The issue can be fixed by putting a `\null` after `\end{shrinkeq}` but I do not understand why this works. ¿Is there a better way to do this?


title: How to typeset dimensional tolerances (mechanical engineering) with LaTeX?

text: Is there a package which allows to typeset dimensional tolerances as used in mechanical engineering like:   ![Example for engineering dimensional tolerances](http://i.stack.imgur.com/F2TWH.png)? I have to use them in the text and wonder how to do that best. So I'm searching for a package which can   * correctly typeset the upper and lower limits   (also in combination with length units! I admit that I'm not sure how to do that the best way.)   * also makes available the symbols for form tolerances like roundness, cylindricity, straightness, etc.


title: How to insert text outside the top margin?

text: > **Possible Duplicate:**   >  Insert graphic at precise place on a page I am trying to insert my name on the top right corner of the page but outside the top margin. How can I do that? Many thanks!


title: How to display a picture flush to the right side of the page and the bottom?

text: > **Possible Duplicate:**   >  Absolute positioning in beamer   >  Insert graphic at precise place on a page I would like to add a picture to my title page, however, for effect, the picture needs to be aligned with the right side of the paper and the bottom of the paper. How can I do this? I'm using `scrartcl` as main `documentclass`. I'm not averse to using the `titlepage` environment, I just haven't used it before (and also I wouldn't know how to do this on a normal page). Edit: this is what my relevant code looks like:               \begin{document}          \maketitle     \vfill\hfill\includegraphics{../front_minifig}     \pagebreak[4]     \tableofcontents     \pagebreak[4]          \section{Lorem}


title: Absolute positioning in beamer

text: It's easy to absolute position something using `remember picture` with TikZ, but it only works with pdfLaTeX. I can get something working by using negative `vskip` and `hskips` (trial and error), but that is pretty annoying. How can i position something on the top corner on the first slide without `remember picture`?


title: How to add text to the corner of a Beamer slide?

text: > **Possible Duplicates:**   >  Absolute positioning in beamer   >  Put variable text at a fixed location on every beamer slide.   >  How can I position an image in an arbitrary position in beamer? I would like to know how to add text to the corner of one of my `beamer` slides. I would like this text to be just above the infoline at the the bottom right of the slide. I've looked into trying to use the `TikZ` package, but this package seems unnecessarily complex for my purposes. Can anyone help? I am using XeLaTeX.


title: Acronym not defined warning

text: I'm getting some strange warnings when I build my latex files with pdftex (texlipse). I have defined an acronym list like this:               \chapter*{Acronyms}     \addcontentsline{toc}{chapter}{Acronyms}          \begin{acronym}          \acro{AL} {Authentication List}     \acro{AM} {Authentication Module}          ...          \end{acronym}      And I when I refer to these acronyms (everyone in the list, but didn't include all here) like this:               ... of the \ac{AL} periodically ...      I get lots of warnings like this in texlipse:               Acronym `AL' is not defined on input line 117      However, the PDF file is produced correctly. My only issue is that I want to go through the warnings to find things that actually needs attention (like overfull /hboxes) but with hundreds of these errors that gets quite tedious. Does anyone know how to get around this problem? Is there maybe some settings in my texlipse that is wrong? I know texlipse don't automatically recognize the acronyms package as when I press ctrl+space I never get the 'ac' option, while other latex commands such as 'begin' will show up.


title: Upper case author names for BST file (based on APA)

text: I have created a .bst file using makebst. It is based on the APA style. I have compared the .bst file to other bst files, and trying unsuccessfully to put the authors in the bibliography in capitals. Thanks, I have uploaded the files, .bst and .dbj (17KB) to: BST and DBJ


title: Aligning tikz picture within text

text: I want to align my tikz within a text. A sample can be seen at the second picture in the following link: Image courtesy from http://www.echoecho.com/htmlimages08.htm ![enter image description here](http://i.stack.imgur.com/VHgpc.png) This is my trial:               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage[margin=6.0em]{geometry}     \usepackage[nomessages]{fp}     \usepackage{mathtools}     \usepackage{amssymb}     \usepackage{stmaryrd }     \usepackage{graphicx}     \usepackage{tikz}     \usepackage{wrapfig}     \usepackage{enumerate}     \usepackage[turkish]{babel}          \usepackage[hidelinks]{hyperref}     \usepackage[stable]{footmisc}     \usepackage{perpage} %the perpage package     \MakePerPage{footnote} %the perpage package command          \setcounter{secnumdepth}{-1}           \begin{document}          \begin{enumerate}     \item      Ardışık üç pozitif tamsayının çarpımının hiçbir zaman bir tamsayının birden büyük bir kuvvetine eşit olamayacağını gösteriniz.          \item          \begin{tabular}[t]{p{4.5cm}r}          $ABCD$ kirişler dörtgeni ve $|AE|=|AD|$, $|BC|=|BE|$ dir.      Buna göre, $EF\parallel AB$ olduğunu gösteriniz.          &               \definecolor{ffffff}{rgb}{1,1,1}     \begin{tikzpicture}[baseline=(current bounding box.north),line cap=round,line join=round,>=triangle 45,x=0.24698133918770565cm,y=0.24577572964669714cm]     \clip(-0.5,-2.72) rectangle (11.5,3.6);     \draw [line width=1.2pt] (0.06,-2.01)-- (4.43,3.26);     \draw [line width=1.2pt] (9.33,1.94)-- (4.43,3.26);     \draw [line width=1.2pt] (9.33,1.94)-- (11.14,-2.13);     \draw [line width=1.2pt] (11.14,-2.13)-- (0.06,-2.01);     \draw [line width=1.2pt] (11.14,-2.13)-- (4.43,3.26);     \draw [line width=1.2pt] (9.33,1.94)-- (0.06,-2.01);     \draw (-0.38,-2.0) node[anchor=north west] {$A$};     \draw (11.4,-2.00) node[anchor=north west] {$B$};     \draw (9.56,2.14) node[anchor=north west] {$C$};     \draw (3.96,3.48) node[anchor=north west] {$D$};     \draw (6,0.92) node[anchor=north west] {$E$};     \draw (7.90,0.87) node[anchor=north west] {$F$};     \begin{scriptsize}     \fill [color=ffffff] (0.06,-2.01) circle (2.0pt);     \fill [color=ffffff] (4.43,3.26) circle (2.0pt);     \fill [color=ffffff] (9.33,1.94) circle (2.0pt);     \fill [color=ffffff] (11.14,-2.13) circle (2.0pt);     \fill [color=ffffff] (6.36,0.67) circle (2.0pt);     \fill [color=ffffff] (7.67,0.66) circle (2.0pt);     \end{scriptsize}     \end{tikzpicture}     \end{tabular}               \item     $0<q<200$ ve $\dfrac{59}{80} < \dfrac{p}{q} <\dfrac{45}{61}$ koşullarını sağlayan bir $(p,q)$ tamsayı çifti bulunuz ve böyle tek bir $(p,q)$ tamsayı çifti olduğunu gösteriniz.          \item     $7$ arkadaşı olan bir kimse, bir hafta boyunca her akşam $3$ arkadaşını yemeğe çağırır. Farklı iki akşam yemeğe çağrılan gruplar birbirlerinden farklı olup; $7$ arkadaştan her biri en az bir akşam yemeğe çağrılmaktadır. Bu koşulları sağlayan kaç değişik çağrı programı yapılabileceğini bulunuz.          \item     \begin{tabular}[t]{p{7cm}r}          $O$ merkezli çemberin yarıçapı $R$'dir. $A$ merkezli $|AB|$ yarıçaplı çember ile $B$ merkezli $|BA|$ yarıçaplı çemberin $D$ kesim noktası alınıyor. $CD$ doğrusu, $O$ merkezli çemberi $E$ noktasında kestiğine göre $|ED|$ uzunluğunu $R$ cinsinden hesaplayınız.           &     \begin{tikzpicture}[baseline=(current bounding box.north),line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]          \clip(-0.16,-1.88) rectangle (6.4,3.52);     \draw [line width=1.2pt] (4.02,0.3) circle (2.16cm);     \draw [line width=1.2pt] (4.55,2.4) circle (1.08cm);     \draw [line width=1.2pt] (3.47,2.39) circle (1.08cm);     \draw [line width=1.2pt] (1.93,0.87)-- (5.5,1.88);     \draw [line width=1.2pt] (1.93,0.87)-- (1.04,0.62);     \draw (4.04,0.04) node[anchor=north west] {$O$};     \draw (5.74,1.94) node[anchor=north west] {$C$};     \draw (4.78,2.58) node[anchor=north west] {$A$};     \draw (3.1,2.62) node[anchor=north west] {$B$};     \draw (1.56,1.12) node[anchor=north west] {$E$};     \draw (4.10,1.25) node[anchor=south east] {$D$};     \begin{scriptsize}     \fill [color=ffffff] (4.02,0.3) circle (2.0pt);     \fill [color=ffffff] (5.5,1.88) circle (2.0pt);     \fill [color=ffffff] (4.55,2.4) circle (2.0pt);     \fill [color=ffffff] (3.47,2.39) circle (2.0pt);     \fill [color=ffffff] (4.01,1.46) circle (2.0pt);     \fill [color=ffffff] (1.93,0.87) circle (2.0pt);     \end{scriptsize}     \end{tikzpicture}          \end{tabular}          \item     $$\sqrt{x - \dfrac{1987}{14}} + \sqrt{x - \dfrac{1988}{13}} + \sqrt{x - \dfrac{1989}{12}} = \sqrt{x - \dfrac{14}{1987}} + \sqrt{x - \dfrac{13}{1988}} + \sqrt{x - \dfrac{12}{1989}}$$     denkleminin tüm reel çözümlerini bulunuz.          \item     İki kişinin bir keki paylaşmasının her iki tarafı da hoşnut eden ve adil bir yöntemi şudur: Biri keki iki parçaya ayırır, diğeri parçalardan birini kendine seçer. Diğer bir deyişle keki $[0,1]$ aralığı gibi düşünürsek, birinci kişi $x_1\in [0,1]$ seçer; ikinci kişi ise $x_1$ ve $1-x_1$ sayılarından birini seçer. (Burada her iki tarafın da ``keksever'' olduğu varsayıldığından, ikinci kişinin $x_1$ ve $1-x_1$ sayılarından daha büyük olanını seçeceği ve dolayısıyla birincinin de $x_1 = \dfrac 12$ seçimini yapacağı kolaylıkla görülür.) Üç keksever kişi için benzer bir paylaşma yöntemi bulabilir misiniz?                     \end{enumerate}          \end{document}


title: Should one use thousands separators in equations?

text: I understand that this is not strictly a TeX question but I have recently been asked to correct an equation presented as the first example in the image below to that of the second example i.e., to use the thousands separator. I compromised by typesetting the third example with a `\thinspace` as the thousands separator. ![enter image description here](http://i.stack.imgur.com/kBPD1.png) All three types are allowed in SI units. What would you recommend? Is there a canonical way? **Edit** I came across a paper by Knuth, where large number coefficients are used. ![enter image description here](http://i.stack.imgur.com/lkwgv.png) He clearly is in favour of not using any separators or spaces. This fact, besides his own papers is corroborated by an anecdote described in Mathematical Writing (page 53), regarding an article he submitted to the ACM. > [...] where Don wrote 1000000 they substituted 1,000,000. Don objected that > although this might be justifed in text, his use is perfectly OK in a > formula. Well then, they replied, write 106 Fine, said, Don, but what do I > do when the number is 1234567? The IEEE standard here is to insert spaces, > thus: 1 234 567. Don doesn't like this in formulae, but agrees that it may > be useful in a high precision context, such as numerical tables. For me that settles it!


title: Captions of subfigures not being centered

text: ![image](http://i.imgur.com/XdpJ3qv.png) Figure 4.1 is two subfigures, each with a caption (technically four figures in total, but the ones on rows are one image). Using               \documentclass[twocolumn,titlepage]{report}           \usepackage{verbatim}     \usepackage{amsfonts}     \usepackage{amsmath}     %%\usepackage{subfigure}     \usepackage{amssymb}     \usepackage[pdftex]{graphicx}     \usepackage{geometry}     \usepackage{titlesec}     \usepackage[center]{caption}     \usepackage{subcaption}          \titleformat{\chapter}[block]      {\normalfont\huge\bfseries}{\thechapter}{1em}{}          \geometry{       body={7in, 10in},       left=0.75in,       top=0.5in     }          \begin{document}          \begin{figure}[ht]            \begin{subfigure}[b]{0.3\textwidth}               \includegraphics[width=8.7cm]{fig5-a.png}           \caption{\textit{I-V Charactaristic at 1Hz (left) and 5 Hz (right)}}        \end{subfigure}            \begin{subfigure}[b]{0.3\textwidth}               \includegraphics[width=8.7cm]{fig8.png}           \caption{\textit{I-V Charactaristic at 10 Hz (left) and 500Hz (right)}}     \end{subfigure}         \caption{I-V Charactaristics of varying frequencies, showing the expected tightening of the bow}         \label{fig:freqdep}      \end{figure}         \end{document}      the captions are not aligned under the entire figure. Ideally the caption would spread right across the width of both plots in figure 4.1 a


title: Draft mode after include statements

text: Normally when I have a document with graphicx that I'd like to see rendered in `draft` mode I use:               \usepackage[draft]{graphicx}      However, assuming I've already called the line:               \usepackage{graphicx}      How can I set the mode to draft after this point? Looking at the docs the best I came up with was this (unsuccessful) attempt:               \ExecuteOptions{draft}


title: Page size too small when using beamer class

text: When I use the beamer class, the resulted pdf document has very small pages: What can I do in order to create A4 sized slides? The beginning of the latex document is:               \documentclass[xcolor=dvipsnames]{beamer}     \usetheme{Madrid}     \usecolortheme[named=ForestGreen]{structure}      The reported size in adobe reader is 5.04" x 3.78"


title: In Beamer, create a square with a number in it (like enumerate)

text: I have an enumerate environment with square icons, which gives me a colored square with a number inside for each item. Below this, I have things I would like to visually correspond with these items. So I am looking to just make this same square with a number inside. Any ideas? Edit: Here is a minimal working example:               \documentclass[mathserif,xcolor=svgnames]{beamer}     \setbeamertemplate{enumerate items}[square]     \begin{document}          \begin{frame}{Example}      \begin{enumerate}       \item Hello there      \end{enumerate}     \end{frame}          \end{document}


title: vdots in between of two columns

text: I am trying to make a matrix like the following: ![enter image description here](http://i.stack.imgur.com/1PtO6.png) but I am not sure how it is possible. since `\vdots` add 3 dots for each column, I try to do a hack like this:                \begin{equation}  \label{eq:lsq3}     \begin{bmatrix} x_1& &1\\&.&\\&.&\\&.&\\x_n& &1\end{bmatrix}    \nonumber      \end{equation}      but it is not working. Any idea?


title: How to remove headers and footers for pages between chapters?

text: To ensure that a new chapter starts on a right-hand page, the `book` class (and the `report` class with the options `twoside` and `openright`) will insert blank pages between chapters if necessary. However, these pages still contain the headers and footers as defined by the class. How can I remove those? Note: I know that I can manually add `\clearpage\thispagestyle{empty}` at the appropriate points of my document. However, this seems awkward and is prone to fail if I change my document later. I'm looking for automatic solutions.


title: blank pages and fancyhdr package

text: > **Possible Duplicate:**   >  How to remove headers and footers for pages between chapters? I have a document class set as book and added the `\usepackage{fancyhdr}` package. but now I have some blank pages that have the top line (the one of the heading). how can i remove only these that are the only thing (except from the page number) present on blank pages?


title: getting two pages using tableofcontents

text: > **Possible Duplicate:**   >  How to remove headers and footers for pages between chapters? I use in my document               \tableofcontents      but I got two pages.In the first I have the table of contents and the second page is empty and have only the head where it is written CONTENTS. is it standard? ![enter image description here](http://i.stack.imgur.com/y1KKt.png)               \documentclass[12pt,a4paper,twoside,openright]{book}          \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[italian,english]{babel}          \renewcommand{\rmdefault}{pplx} %setta il carattere          \usepackage[margin=3.0cm,bindingoffset=0.5cm]{geometry}     \usepackage{setspace} %setta l'interlinea a 1,5     \onehalfspacing          \usepackage{graphicx} %pacchetto immagini     \usepackage{lipsum}     \usepackage{microtype}     \usepackage{eulervm} %paccchetto testo formule          %-------------------------------     \usepackage{fancyhdr}     \newcommand{\changefont}{%         \fontsize{10}{11}\selectfont     }     \fancyhf{}     \fancyhead[RE,LO]{\changefont \slshape \leftmark}     \fancyfoot[C]{\changefont \thepage}     \pagestyle{fancy}     %-------------------------------          %------------------------------------------------------------------     \newcommand{\blankpage}{\newpage\null\thispagestyle{empty}\newpage} %comando pagina vuota     %------------------------------------------------------------------                   \begin{document}              \frontmatter         \input{parti/frontmatter/frontespizio}         \blankpage         \input{parti/frontmatter/dedica}         \blankpage         \input{parti/frontmatter/abstract}         \blankpage         \input{parti/frontmatter/ringraziamenti}         \blankpage              \renewcommand\contentsname{Indice}         \tableofcontents         \addcontentsline{toc}{chapter}{Indice}         \renewcommand\listfigurename{Lista delle Figure}         \listoffigures         \addcontentsline{toc}{chapter}{Lista delle Figure}         \renewcommand\listtablename{Lista delle Tabelle}         \listoftables         \addcontentsline{toc}{chapter}{Lista delle Tabelle}              \mainmatter         \input{parti/mainmatter/chapter_1}          \end{document}


title: Avoiding page numbers in empty pages?

text: > **Possible Duplicate:**   >  How to remove head- and footlines for pages between chapters? I have empty pages in my document, many created using `\cleardoublepage`. I want the page number not to appear in them (but I do want to include them in the count). How can I do it?


title: cleaning bottom of blank pages

text: > **Possible Duplicate:**   >  How to remove head- and footlines for pages between chapters? With the code below you can clear the footer of blank pages.               \makeatletter     \def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else     \hbox{}     \vspace*{\fill}     \vspace{\fill}     \thispagestyle{empty}     \newpage     \if@twocolumn\hbox{}\newpage\fi\fi\fi}     \makeatother      Is there any package or other commands that decrease this code?


title: delete page number in cleardoublepage

text: > **Possible Duplicate:**   >  How to remove headers and footers for pages between chapters? I created a document using               \documentclass[12pt, a4paper, twoside, openright]{book}          \newenvironment{abstract}         {\cleardoublepage\null\vfill\begin{center}         \bfseries\abstractname\end{center}}         {\vfill\null}      When I create               \begin{abstract}          \end{abstract}      on the page before the abstract it creates a blank page but shows the page number. I would like to delete that number. How can I do?


title: Calibri in proTeXt

text: I am a novice LaTeX user. I am using the proTeXt version. I am trying to change the font of a document to Calibri (which I have on my machine). Any tips?


title: prevent page break after AASTeX deluxetable \tablecomments and the next deluxetable?

text: The issue is the following: there are two deluxetables (AASTeX) set after another. The \tablecomments of the first extends extends over a page boundary, such that one line of text lands on a new page. I'd like the next deluxetable to start right after the previous table (i.e. right after those tablecomments). That is, it should start on the same page. However, for some reason the next deluxetable adds a page break. So the page is basically blank, except for that one line of \tablecomments. Looks quite ugly. How to get the next deluxetable to start on the same page after the previous deluxetable? And at the same time, retain the automatic page breaks in deluxetable? It is rather hard to post a MWE on this, it would be a very long example. Essentially the code is:               \documentclass{article}     \begin{document}          \begin{deluxetable}{cc}     \tabletypesize{\scriptsize}       \tablecaption{Test 1. \label{tab:test1}}     \tablewidth{0pt}       \tablehead{\colhead{dummy} & \colhead{dummy}}     \startdata          % ... a lot of data, automatically split over 2 pages ...         % Should be long enough so that Table Comments start at the end of one page         % and continue with one line onto the next page.     \endata     \vspace{-0.6cm}     \tablecomments{Some rather long comment here that needs at least two lines.}     \end{deluxetable}          % The next deluxetable should start right after the first one, on the same     % page as the trailing Table Comments of the first table. For some reason, it does not.          \begin{deluxetable}{cc}     \tabletypesize{\scriptsize}       \tablecaption{Test 2. \label{tab:test2}}     \tablewidth{0pt}       \tablehead{\colhead{dummy} & \colhead{dummy}}     \startdata      % ... a lot of data as well, automatically split over 2-3 pages ...     \endata     \vspace{-0.6cm}     \tablecomments{Any table comment.}     \end{deluxetable}          \end{document}


title: Problem: Different authors result in same citation symbol

text: **Behavior** : Using biblatex's _alphabetic_ style, I'm citing "Mr. Stark" and "Stack Exchange Inc.", both of 2010. In both cases I get [Sta10] as a reference symbol. **Problem** : The reader cannot know whom I'm citing. **Desired behavior** : I'd like different reference symbols, for instance [Sta10a] and [Sta10b]. (This actually works when it's the same author, but not when the authors are different.) Any hints are highly appreciated. Thank you! **Example:**               \documentclass{article}     \usepackage[style=alphabetic]{biblatex}     \usepackage{filecontents}     \begin{filecontents}{same_but_different.bib}     @misc{A, author = {{Stack Exchange Inc.}}, year = {2010}}     @misc{B, author = {Starck, Erik}, year = {2010}}     }     \end{filecontents}     \bibliography{same_but_different}          \begin{document}          \emph{Stark} claims something \cite{A} to which \emph{Stack Exchange} cannot agree \cite{B}.     Unfortunately, they get the same citition symbol.           \printbibliography     \end{document}      **Result** : ![The result of my problematic example](http://i.stack.imgur.com/UntrT.png)


title: Installing background and foreground page layers with TikZ

text: Several times I discovered the need to draw TikZ material behind and on top of the page text (How to draw text-anchored tikz line below text instead of above?, Test if a paragraph has a page break in it? and also Cool Text Highlighting in LaTeX). Most the time I need to draw from a start marker in the text towards a stop marker. As long as there are no page breaks between them I can draw in the text foreground when I draw from the end marker backwards (because the text is already typeset before) or in the background from the start marker forwards (because the text is typeset afterwards). However, as seen in How to draw text-anchored tikz line below text instead of above? this isn't perfect when drawing downwards to the right which goes over existing text to the left. Also in the case of one (or even multiple!) page break(s) between these markers the drawing must be split into multiple operations. Then it is difficult to ensure all material is placed in the correct layer. My idea is now the following: I like to install a background and a foreground layer of the whole page and allow macros to place drawing commands on these layers. I think all commands can be accumulated and then processed when the page is shipped out. For this I found the `atbegshi` package which provides access to the page as box. I now manipulate this box be placing it in a TikZ picture which is stored back in the same box register. See the example code below. My question now is: Is this an appropriate way to do it, i.e. is it safe to manipulate the page box like this or is there a better way to do this? I now about `\AtBeginShipoutUpperLeft` etc. but had problems using it with TikZ. Therefore I'm using the box in a node.               \documentclass{article}          \usepackage{atbegshi}     \usepackage{tikz}     \usetikzlibrary{backgrounds}     \usepackage{lipsum}          % Proof-of-concept     % Later these would be numbered to allow multiple per page     \def\mybgstart{%         \tikz[overlay,remember picture] { \draw [yellow] circle (1pt); \coordinate (bgstart); }%         \gdef\drawinbackground{\draw [yellow,line width=5mm] (bgstart) -- (bgend);}%     }     \def\mybgend{\tikz[overlay,remember picture] { \draw [blue] circle (1pt); \coordinate (bgend); }}          \def\myfgstart{%         \tikz[overlay,remember picture] { \draw [yellow] circle (1pt); \coordinate (fgstart); }%         \gdef\drawinforeground{\draw [purple,line width=5mm] (fgstart) -- (fgend);}%     }     \def\myfgend{\tikz[overlay,remember picture] { \draw [blue] circle (1pt); \coordinate (fgend); }}          \begin{document}     \lipsum[1-3] % for comparison     \clearpage          \makeatletter     \AtBeginShipout{%     \setbox\AtBeginShipoutBox\hbox{%         \color@setgroup         \begin{tikzpicture}[line width=1cm,remember picture]%             \path [use as bounding box] node [inner sep=0pt,outer sep=0pt] (A) {\box\AtBeginShipoutBox};             \begin{pgfonlayer}{background}             \draw [green,line width=1cm] (A.north east) -- (A.south west);             \drawinbackground             \global\let\drawinbackground\empty             \end{pgfonlayer}             \draw [red] (A.north west) -- (A.south east);             \drawinforeground             \global\let\drawinforeground\empty         \end{tikzpicture}%         \color@endgroup     }}     \makeatother          \lipsum[1]     \mybgstart\lipsum*[2]\unskip\mybgend          \lipsum[3]          \myfgstart\lipsum*[4]\unskip\myfgend          \lipsum[5-10]               \end{document}      ![Result](http://i.stack.imgur.com/rMJ2b.png) PS: The above code works well with `pdflatex` but I get an offset with `latex` (DVI mode). With it the `.aux` file holds different `\pgfsyspdfmark` values. I there a way to fix that?


title: Chemical structures drawing: {table} vs \chemfig

text: I write a chemical structure as a table. Please help me understand, How can I reduce the distances between the rows and columns in a table? This is the structure of the zeolite and would like to make it look more compactly at vertical and horizontal axes. ![enter image description here](http://i.stack.imgur.com/Cltm9.jpg)               \begin{table}[h]     \begin{tabular}{ccccccccccccccccccccccccccc}     \multicolumn{3}{c}{} &  &  &  & \multicolumn{3}{c}{$\rm NH_4^+$} &  &  &  & \multicolumn{3}{c}{} &  &  &  & \multicolumn{3}{c}{$\rm NH_4^+$} &  &  &  & \multicolumn{3}{c}{} \\      & O &  &  &  &  &  & O &  &  &  &  &  & O &  &  &  &  &  & O &  &  &  &  &  & O &  \\      &  & \multicolumn{2}{c}{$\diagdown$} &  & \multicolumn{2}{c}{$\diagup$} &  & \multicolumn{2}{c}{$\diagdown$} &  & \multicolumn{2}{c}{$\diagup$} &  & \multicolumn{2}{c}{$\diagdown$} &  & \multicolumn{2}{c}{$\diagup$} &  & \multicolumn{2}{c}{$\diagdown$} &  & \multicolumn{2}{c}{$\diagup$} &  &  \\      &  &  &  & Si &  &  &  &  &  & Al &  &  &  &  &  & Si &  &  &  &  &  & Al &  &  &  &  \\      &  & \multicolumn{2}{c}{$\diagup$} &  & \multicolumn{2}{c}{$\diagdown$} &  & \multicolumn{2}{c}{$\diagup$} &  & \multicolumn{2}{c}{$\diagdown$} &  & \multicolumn{2}{c}{$\diagup$} &  & \multicolumn{2}{c}{$\diagdown$} &  & \multicolumn{2}{c}{$\diagup$} &  & \multicolumn{2}{c}{$\diagdown$} &  &  \\      & O &  &  &  &  & \multicolumn{3}{c}{OO} &  &  &  & \multicolumn{3}{c}{OO} &  &  &  & \multicolumn{3}{c}{OO} &  &  &  &  & O &  \\      &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &      \end{tabular}     \end{table}


title: .cls file not found

text: I'm running Windows 7 and have to run a special class file for my thesis. I've tried holding the file 'tutthesis.cls' in the same directory as the .tex file itself, but that didn't work. I also tried to install the class using method given here: http://docs.miktex.org/2.8/manual/localadditions.html My code looks like this               \documentclass[12pt,a4paper,finnish]{tutthesis}      And it gives the error               ! LaTeX Error: File `tutthesis.cls' not found.      Using the local addition method, my root folder was               C:\Local TeX Files      Which itself looked like               C:\Local TeX Files\tex\latex\misc\tutthesis.cls      just as given in the example. I've tried naming the directories differently (misc -> tutthesis) but so far nothing has worked, even though I've gone through various similar questions on this site. I hope I didn't forget any crucial information. Any ideas what might work? ** EDIT: The log file from a small test document located in the same folder (hopefully this is what you asked for):               This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9) (preloaded format=pdflatex 2014.7.1)  2 JUL 2014 18:08     entering extended mode     **testi.tex     (C:\KOULU\Kandi\LaTeX\testi.tex     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar     abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,      croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga     lician, german, german-x-2013-05-26, greek, gujarati, hindi, hungarian, iceland     ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin, latvian,      lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, n     german-x-2013-05-26, nynorsk, oriya, panjabi, pinyin, polish, portuguese, roman     ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerm     an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl     ishmax, welsh, loaded.     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\article.cls"     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\size12.clo"     File: size12.clo 2007/10/19 v1.4h Standard LaTeX file (size option)     )     \c@part=\count79     \c@section=\count80     \c@subsection=\count81     \c@subsubsection=\count82     \c@paragraph=\count83     \c@subparagraph=\count84     \c@figure=\count85     \c@table=\count86     \abovecaptionskip=\skip41     \belowcaptionskip=\skip42     \bibindent=\dimen102     )          LaTeX Warning: Unused global option(s):         [finnish].          (C:\KOULU\Kandi\LaTeX\testi.aux)     LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 3.     LaTeX Font Info:    ... okay on input line 3.     LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 3.     LaTeX Font Info:    ... okay on input line 3.     LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 3.     LaTeX Font Info:    ... okay on input line 3.     LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 3.     LaTeX Font Info:    ... okay on input line 3.     LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 3.     LaTeX Font Info:    ... okay on input line 3.     LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 3.     LaTeX Font Info:    ... okay on input line 3.      [1          {C:/ProgramData/MiKTeX/2.9/pdftex/config/pdftex.map}] (C:\KOULU\Kandi\LaTeX\tes     ti.aux) )      Here is how much of TeX's memory you used:      206 strings out of 493921      2276 string characters out of 3144874      49031 words of memory out of 3000000      3584 multiletter control sequences out of 15000+200000      3938 words of font info for 15 fonts, out of 3000000 for 9000      841 hyphenation exceptions out of 8191      22i,4n,21p,137b,107s stack positions out of 5000i,500n,10000p,200000b,50000s     <C:/Program Files (x86)/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr1     2.pfb>     Output written on testi.pdf (1 page, 10414 bytes).     PDF statistics:      10 PDF objects out of 1000 (max. 8388607)      0 named destinations out of 1000 (max. 500000)      1 words of extra memory for PDF output out of 10000 (max. 10000000)


title: tcblistof, book class and vertical spacing

text: It deals with the displaying of the tcblistof feature with the package tcolorbox, which differs from the classic `\listoffigures` when used with the book class. In the example below (with `tcolorbox v 3.05`), you can see vertical space added between chapters inside the List of Figures, but not inside the List of Theorems.               \documentclass{book}     \usepackage[theorems]{tcolorbox}          \newtcbtheorem[auto counter,number within=chapter,list inside=thm]{theo}{Theorem}{}{}          \begin{document}     \listoffigures{}     \tcblistof[\chapter*]{thm}{List of Theorems}          \chapter{Chapter No1}     \begin{figure}     \caption{Figure No1}     \end{figure}     \begin{figure}     \caption{Figure No2}     \end{figure}     \begin{theo}{Theorem No1}{}     \end{theo}     \begin{theo}{Theorem No2}{}     \end{theo}          \chapter{Chapter No2}     \begin{figure}     \caption{Figure No3}     \end{figure}     \begin{figure}     \caption{Figure No4}     \end{figure}     \begin{theo}{Theorem No3}{}     \end{theo}     \begin{theo}{Theorem No4}{}     \end{theo}          \end{document}      Is it possible to achieve the same displaying for both? (more precisely, I'd like to make tcblistof behave like the List of Figures).


title: How to put 2 PDF files into a single page

text: I have two separate pdf files which, when combined, are smaller than A4 paper. Is there a way to create a single page out of them without page break with these two being rendered on the same page? I've tried to use `pdfpages`, but I only get them on separate pages.


title: Compilation sequence with lualatex

text: I'm looking to make automatised table using lualatex (I just want to make some conversion and be able to modify the input easily). But I can't find how the code would be parsed and compile by lualatex. The correct sequence is:               all lua section and after latex      or               lua section executed when latex parsed them (so between some latex compilation)      or something else?


title: Calculating percentage

text: I have tried to use the `calc` package to write a macro which prints a percentage based on two numbers. E.g.: `\printpercent{100}{200}` should display 50% as 100 is the half-way point of 200. I have tried many different combinations, but cannot seem to get any meaningful answers printed. See below, for just one of the many formulas I have tried:               \documentclass{article}     \usepackage{calc}     \newcounter{z}     \newcommand{\printpercent}[2]{%         \setcounter{z}{#1 / #2 * 100}         $#1/#2*100=\arabic{z}\%$     }%     \begin{document}         \printpercent{1}{100}         \printpercent{250}{200}     \end{document}      That prints out: > 1/100*100 = 0% > > 250/200*100 = 100%   * How can I calculate a percent from these numbers?


title: Boxes placement in tcolorbox

text: I'd like to know if there is a way to place tcolorboxes like this:               -------- --------     | box1 | |      |     -------- | box3 |       -------- |      |      | box2 | |      |     -------- --------      To do that I'm actually placing the boxes inside tikz nodes, but that seems like an overkill solution. Is there a tikz-free approach?


title: Does LaTeX allow you to rapidly switch your document layout to fit editor choices?

text: After my last (and first) question, I've been given some information about medical articles. I looked at my professor doing some case reports. He uses Word to write the entire document; when he decides the journal to mail the document he searches for that journal specifications such as font and sizes, structure, bibliography rules, … At this point, he adjusts the document, add the bibliography and so on, following the editor guidelines. It's a big waste of time, and each journal has specific and different rules that must be applied. Here I come back to my first question. Providing some journals do not even have a LaTeX section (templates, rules, accepted formats, … ), is it possible to easily switch layout based on their needs?


title: How to wrap a long equation in Latex

text: I have a very big equation and using split or multiline is not helping. How do i wrap it and how do i make sure thatRHS of the eqn is always on the right side of equal to ('=') even when line is changed               \begin{equation*}      \begin{split}       m_{12}(\{ \emph{Red},\emph{Blue} \})= K'* [m_{1}(\{ \emph{Red},\emph{Blue} \})*m_{2}(\{    \emph{Red},\emph{Blue} \})+m_{1}(\{ \emph{Red},\emph{Blue} \})*m_{2}(\{ \emph{Red},\emph{Blue},\emph{Green} \})+m_{2}(\{ \emph{Red},\emph{Blue} \})*m_{1}(\{ \emph{Red},\emph{Blue},\emph{Green} \})]      \end{split}      \end{equation*}


title: Illegal parameter when nesting commands

text: I keep getting illegal parameter errors when trying to define a command that contains another previously defined command. I know that you have to be careful with nested definitions, but I didn't think I was doing that. Here is the MWE:               \documentclass{memoir}          \usepackage{xstring,xparse,xspace}          \NewDocumentCommand{}{\pfc}{Preface~\StrGobbleLeft{#1}{1}\xspace}          \NewDocumentCommand{\D}{ o }{%     \IfNoValueTF{#1} {%     \emph{D}\xspace}{%         \IfBeginWith{#1}%         {p}{\emph{D} \pfc}{%             \IfStrEqCase{#1}{%                 {f}{\emph{Daybreak}\xspace}%                 {g}{\emph{Morgenröte}\xspace}%                 }%                 [\emph{D}~#1\xspace]%             }%         }%     }          \begin{document}          \D[p1]      I was expecting the following: > _D_ Preface 1 But I just get the illegal parameter errors. Presumably I don't want to use ##1 because I am not renewing a command within the macro. If I just put the content of \pfc instead of the command into the \D command, then it works, but I don't want to do this. Any ideas?


title: Print blue brackets in one language and black in another

text: In addition to that question i wonder if it is possible to have that settings for one language and default settings for another ? How to highlight operators and brackets in a C listing?               \documentclass{article}          \usepackage{xcolor}     \usepackage{listings}          \newcommand\opstyle{\color{red}} % <--- customise operator style here          \makeatletter          \lstset     {%       language=C++,       alsoletter=0123456789,% to prevent \opstyle from being applied to digits     }          % Hook into listings     \lst@AddToHook{OutputOther}{\ProcessOther@silmeth}          % helper macro     \newcommand\ProcessOther@silmeth     {%       \ifnum\lst@mode=\lst@Pmode%     % If we're in `Processing' mode...         \def\lst@thestyle{\opstyle}%  % ... redefine the style locally       \fi%     }          \makeatother          \begin{document}     \begin{lstlisting}[]     int i = 0;     if(i > 1) && (1/2 < 2) {              // one-line comment ()={}><;&              printf("string: ()={}><;&");              /*           block comment ()={}><&;         */     }     \end{lstlisting}      Here, I want the group other to appear in Black again. How can I do this?               \begin{lstlisting}[]     int i = 0;     if(i > 1) && (1/2 < 2) {              // one-line comment ()={}><;&              printf("string: ()={}><;&");              /*           block comment ()={}><&;         */     }     \end{lstlisting}     \end{document}


title: Using Tikz Fit to draw a node covering a Tikz chains

text: A chain of nodes is drawn using `tikz chains`. I would like to draw a rectangle node covering the chain nodes (or, multiple rectangle nodes covering subsets of them). I am using `tikz fit`. Unfortunately, by the way I use it, the rectangle nodes are considered part of the chains. As a result, additional join edges are drawn to the rectangle positions are kind of messed up. The following are the MWE:               \documentclass[border=5pt]{standalone}          \usepackage{tikz}     \usetikzlibrary{chains, fit}          \begin{document}     \begin{tikzpicture}[start chain, node distance=5mm, every node/.style={draw, on chain, join}, every join/.style=->]       \node (a)  {a};       \node (b)  {b};       \node  (c)  {c};       \node  (d)  {d};       \begin{scope} [start branch=numbers, every join/.style=<-]         \node (1) [on chain=going above] {1};         \node (2) [on chain=going above] {2};       \end{scope}       \node  (e)  {e};       \node (fit2) [draw, inner sep=2pt, fit=(a) (b) ] {};       \node (fit1) [draw, inner sep=2pt, fit=(d) (1) (e)] {};     \end{tikzpicture}     \end{document}      The result, without and with the covering rectangles, are ![enter image description here](http://i.stack.imgur.com/yw4lS.png) ![enter image description here](http://i.stack.imgur.com/Zp18c.png)


title: Equation subnumbers in IEEEtrantools?

text: I'm using subnumbers in IEEEtrantools:               \documentclass{article}          \usepackage{IEEEtrantools}          \begin{document}          Numbered equation:          \begin{IEEEeqnarray}{rCl}       a & = & b \;.       \label{eq:tTy}     \end{IEEEeqnarray}               Subnumbered equations:          \begin{IEEEeqnarray}{rrCll}       & c & = & 3d & \IEEEyessubnumber       \\*[-0.625\normalbaselineskip]       \smash{\left\{\IEEEstrut[6\jot]\right.} \label{eq:NvY} &&&& \nonumber \;. % the invisible row       \\*[-0.625\normalbaselineskip]       & e & = & f & \IEEEyessubnumber     \end{IEEEeqnarray}          Next equation:          \begin{IEEEeqnarray}{rCl}       h & = & i \;.       \label{eq:tog}     \end{IEEEeqnarray}          \end{document}      It gives: ![enter image description here](http://i.stack.imgur.com/wqi5a.png) I want subnumbers to be independed of the previous and next equations. So I need to get this: ![enter image description here](http://i.stack.imgur.com/GU7Lx.png) How can I get it? (IEEEtrantools is the package I'd like to stick to.)


title: How to prevent small values from being plotted with nodes near coords?

text: I'm trying to finalize my first `pgfplots` chart. I've managed to get is almost the way I would like it to be with thanks to all examples I found here. The last thing I can't seem to figure out is how to prevent plotting of value labels below 4% as they don't fit the bar (and small percentages aren't really relevant in this specific case). I've found an example here on how to suppress the text from showing when the value is 0. I feel that it's just a small step to getting it to work. What I tried was to use `\pgfmathfloatifflags` and test for negative numbers on `\pgfplotspointmeta` minus 4. Would this work? I've not gotten it to work. I believe my understanding of the semantics of TeX/PGF is not adequate. The result so far: I tried to post an image here but as a new user I'm not allowed. Let me describe the issue: One data point has value 2. The bar segment of this data point is too small for the value to be plotted inside bar segment. It's overlapping now with another value. I would like small values to not be plotted in the chart. The code I'm currently using is:               \documentclass{article}          \usepackage{tikz}     \usepackage{pgfplots}          \begin{document}          \pgfplotstableread{     y x1 x2 x3 ylabel     1   41  4 55 {Unit A}     2   60 2 38 {Unit B}     3   20 50 30 {Unit C}     4    0 20 80 {Unit D}     }\datatable          \begin{figure}     \caption{How to not show labels $<4\%$}     \centering     \begin{tikzpicture}     \begin{axis}[         xbar stacked,         legend style={             legend columns=3,             at={(xticklabel cs:0.5)},             anchor=north,             draw=none         },         ytick=data,         axis y line*=left,         axis x line*=bottom,         tick label style={font=\footnotesize},         legend style={font=\footnotesize},         label style={font=\footnotesize},         xtick={0,20,40,60,80,100},         width=\textwidth,         bar width=6mm,         yticklabel style={text width=3cm, align=right},         yticklabels from table={\datatable}{ylabel},         xmin=0,         xmax=100.1,         y=8mm,         enlarge y limits={abs=0.7},         point meta=explicit,         every node near coord/.style={           check for zero/.code={             \pgfmathfloatifflags{\pgfplotspointmeta}{0}{                \pgfkeys{/tikz/coordinate}             }{}           }, check for zero, xshift=3, font=\scriptsize},         nodes near coords={\pgfmathprintnumber[fixed zerofill,precision=0]{\pgfplotspointmeta}$\%$},         nodes near coords align=left     ]     \addplot table [x=x1, y=y, meta=x1] \datatable;     \addplot table [x=x2, y=y, meta=x2] \datatable;     \addplot table [x=x3, y=y, meta=x3] \datatable;     \legend{lorem,ipsum, dolor}          \end{axis}     \end{tikzpicture}     \label{fig:test}     \end{figure}     \end{document}


title: Using TeX in a report generator - Legal question

text: I would like to be able to generate a (dynamic) report automatically using TeX. My proposed solution is simple: A user clicks a button and   1. The apropriate TeX code is generated (on runtime) and saved on disk.   2. The program calls pdflatex.exe to compile the .tex file to PDF. My question is regarding step 2. Is it legal to call pdflatex.exe from within my code while preserving the copy right of my code? In my current solution, I have stripped a portable MiKTeX distribution to ~ 30 MB, which I would like to distribute along with my own code (of course mentioning MiKTeX and linking to the source code). Would this be okay? If it all ends ups being profitable, I will of course donate a substantial amount to MiKTeX (or should I donate elsewhere?), but I guess this doesn't really make any difference. * * * Willie - You certainly have a good point. However, the solution has to be a "one-click-installation" and just specifying that a TeX distrubution is needed is not an option - unfortunately. Distributing an original MikTeX distrubutin isn't either, as the space limit is ~50 mb.


title: How to make the plot mark size independent of the scale?

text: the next code               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{plotmarks}          \begin{document}          \begin{tikzpicture} [yscale=2]     \draw [very thin, lightgray] (0,0) grid (4,4);     \draw [cyan] plot [only marks, mark=square*,mark size=2.5pt] coordinates {(1,1) (2,3) (2.5,2)};          \end{tikzpicture}     \end{document}      gives ![enter image description here](http://i.stack.imgur.com/2GoDo.png) **How to avoid the distorsion of the marks?**


title: Trying to use a particular font

text: I want to use Dominican/Butterbrotpapier/blackletter fonts as shown in Simulate printing imperfections and defects with TeX?, however, there is no latex file so as to replicate similar results. I will appreciate any help or guidance that you can provide. What I could claim is that I tried to ask the similar question to the creator of the post, nonetheless, I have not been successful. P.S. Laptop is running a 32bits Ubuntu 12.04 OS


title: How does "missing \begin{document}" work?

text: I would like to know how does LaTeX invoke the error `Missing \begin{document}`. I would like to reproduce it in the sense of the following MWE (it will become a part of my own document class):               \documentclass{article}          \begin{document}          \title{My titlE} % <-- these are fine     \author{tohecz}     \def\A{\mathbf{A}}          Hello % <-- should invoke error "Text before `\maketitle` command"     % the error should be invoked even when `\maketitle` is missing at all          \maketitle          World % <-- this is fine          \end{document}


title: Alignment troubles with tabular, pgfuseimage and multirows

text: I'm stuck with some alignment problems in tabular: ![my problem with pictures](http://i.stack.imgur.com/BhPZx.png) and in draft mode: ![my problem with just boxes](http://i.stack.imgur.com/9e6gz.png) The point is that the bottom left one should take the whole space without overflooding the bottom (so to speak) The original MWE that gave these images is the following:               \documentclass[9pt,draft]{beamer}     \usepackage{multirow}     \usepackage{tikz}          \pgfdeclareimage[interpolate=true,height=.15\textheight]{mousse-hexa}{img/foam2D-honeycomb.png}     \pgfdeclareimage[interpolate=true,height=.15\textheight]{mousse-grain}{img/foam2D-grain-boundaries.png}     \pgfdeclareimage[interpolate=true,height=.15\textheight]{mousse-desor}{img/foam2D-disordered.png}     \pgfdeclareimage[interpolate=true,height=.15\textheight]{murissement}{img/foam2D-coarsening.png}     \pgfdeclareimage[interpolate=true,height=.30\textheight]{graphe-mur}{img/lauriesfoam.png}          \begin{document}     \begin{frame}{title}     \begin{tabular}{c l}        \pgfuseimage{murissement}                 & \pgfuseimage{mousse-hexa}  \\        \multirow{2}{*}{\pgfuseimage{graphe-mur}} & \pgfuseimage{mousse-grain} \\                                                  & \pgfuseimage{mousse-desor} \\     \end{tabular}     \end{frame}     \end{document}


title: Install IDE without installing TexLive 2007

text: I've been trying so hard to make TexLive work on my Fedora, but I can't find a way. I've installed TeXLive 2012, but when I install Kile, it says it depends texlive2007, the old version. Then I tried to install TeXStudio, but it also depends of texlive2007. How can I install it without installing the old version? I'm using Fedora 17.


title: White spaces around IEEEbiography at IEEE Journal Template

text: There are four co-author biographies at the end of my paper. There are some white spaces among them. I am trying to get rid of them. Is there a way to do it other than -vspace, because I guess it will also cause more problems as I add/remove things from previous pages


title: Is it possible to load biblatex with a class that has already loaded natbib?

text: A while ago I asked a meta question on how big a question can be. I was wondering in particular about breaking open `REVTeX` and reorganising the goo within to replace the `natbib` bits with bits that play more nicely with `biblatex`. This would surely be a large undertaking. Joseph Wright pointed out that   * This is probably a bad idea (`REVTeX` produces a pretty funky `bbl` file and it's difficult to tell how important the internals of that are to the publisher).   * A better question would be about getting `biblatex` to work when `natbib` is around too. As the second point proposes a question of broader relevance than the one I originally intended to ask, and there is the possibility of a solution that would require much less effort than rewriting a class, I'm asking it here. Essentially I'd be using a solution just for my own notes, which often get remixed into papers in a REVTeX class, so for publication I'd have to default to the standard way. It's a start though! So: **Is it possible to load`biblatex` with a class that has already loaded `natbib`?** The first error can be produced with this MWE:               \documentclass[reprint,aps,pra]{revtex4-1}     \usepackage{biblatex}          \begin{document}     \title{MWE}     \author{Mark S.\ Everitt}     \pacs{}     \maketitle          \section{Introduction}     stuff          \end{document}      and the error is:               /usr/local/texlive/2011/texmf-dist/tex/latex/biblatex/biblatex.sty:382: LaTeX Error: Command \bibhang already defined.                Or name \end... illegal, see p.192 of the manual.


title: Two Bibliographies: one for main text and one for appendix

text: I have a manuscript in which has the following structure:               Main Text     Bibliography     Appendix      However, there are citations which are only cited in the appendix, and they show up in the main bibliography. I would like to split my Bibliography into two different sections, so that the structure of the paper would look like this:               Main Text     Bibliography for Main Text     Appendix     Bibliography for Appendix      I'm currently using bibtex and a single .bib file, and creating the bibliography with               \bibliographystyle {someBibStyleFile}     \bibliography {bibFileName}      I'm interested in a method to split my single bibliography into main bibliography and appendix bibliography with minimal changes to the rest of the document. I'm aware that `biblatex` is more powerful than bibtex, but I'm not prepared to make the switch before the deadline of this project. There are many related bibliography-with-multiple-sections type of questions, but I didn't see one that covers this case.


title: Separate bibliography per appendix

text: I am writing my dissertation and I would like to have the appendices formatted in a way so that their bibliographies would be self-contained. In this sense, I would like to have an un-numbered "Bibliography" section at the end of each Appendix, containing the references made throughout that appendix. My appendices are included in the main latex file as follows:               % This is the standard bibliography      \bibliographystyle{IEEEtran}     \bibliography{<name o the file containing the bibliography>}          % This is the appendices part          \appendixtitleon     \appendixtitletocon     \begin{appendices}     \include{ap1/ap1}     \include{ap2/ap2}     \include{ap3/ap3}     \end{appendices}      In this example, the files "ap1.tex", "ap2.tex" and "ap3.tex" are included from their respective folders "ap1", "ap2" and "ap3" and correspond to different appendices (A, B and C). Is there a simple way of achieving the desired result?


title: How to format mathematical and programming variables in text?

text: I am describing an algorithm in a journal paper. In this algorithm I have a few **variables**. I gave them the same names as in my source code (C++ source of the algorithm, not LaTeX source). So I have variables such as:   * **new** (new node that is being inserted)   * **reference** (arbitrarily chosen node)   * **x** (generic looping variable) In computer programming it is good practice to give variables meaningful names. However when reading other articles describing algorithms I often see abbreviated names. In my case it would be:   * **n**   * **r**   * **x** Is this a good practice? Is there a difference between **programming** and **mathematical** texts? Another thing is the mode in which to write these variables in text and in an algorithm environment. Should I use:   * `$new$`   * `\emph{new}`   * `\textbf{new}`   * `\textit{new}` Or perhaps use _one convention in inline text_ and a **different** _one in equations and algorithm environments_? I couldn't find any relevant information in the editor's manual for the journal and also nothing relevant in the LaTeX class manual. All they say is to make variables italic, so that they are not confused with units (for example W can be confused with Watt).


title: Is it true that it is impossible to insert manual line breaks in URLs that are part of a biblatex reference?

text: After having looked through quite a number of questions about inserting line breaks within URLs, I'm still wondering about a specific case: _manual_ insertion of line breaks in a URL in _biblatex_. So the focus here is on manual and on `biblatex`. To be even more specific: I'm not using the `hyperref` package (since this seems to be a constraint under certain conditions). So what I would like to know is simply: **Is it really impossible to insert manual line breaks in URLs that are part of a biblatex reference?** The reasons why I'm assuming that it is impossible are that this question has no accepted answer (see in particular the last comment by the author) and that neither the answers to this question nor to this question mention a manual solution.


title: Section numbering without numbers

text: I want to add a section without a number, but \section* also excludes it from the numbering, so if there is this               \section*{Section 1}     \subsection{Subsection}     \subsection{Subsection 2}     \section*{Section 2}     \subsection{Subsection 3}      I get what I want untill Section 2, but I want Subsection 3 to be numbered as "2.1", and it keeps numbering "1.3". Is there any command that can fix this?


title: I want to have '' after sum

text: ![enter image description here](http://i.stack.imgur.com/SgTig.png)               \sum_{k=0}^{n} f(x_{k})      I want to change sth in this code to get sth like this image. I have problem where put ''.


title: how to specify a date and then use it with a time format defined using the package datetime

text: I have a document in which I have some date and time formats defined using the package datetime. Specifically, I have something such as the following in the preamble:                   \newtimeformat{RFStimeA}{\twodigit{\THEHOUR}\twodigit{\THEMINUTE}\twodigit{\THESECOND}}         \newdateformat{RFSdateA}{\THEDAY~\monthname[\THEMONTH] \THEYEAR}         \newdateformat{RFSdateB}{\THEYEAR-\twodigit{\THEMONTH}-\twodigit{\THEDAY} }         \newdateformat{RFSdateTimeA}{\THEYEAR-\twodigit{\THEMONTH}-\twodigit{\THEDAY}T\RFStimeA}      These defined formats can be used in the document in a manner such as the following:               This document is for the date \RFSdateB\today.      This setup works fine if the date to be typeset in the document is the current date. What I need to be able to do is switch between current dates and specified dates in a manner such as the following (in the preamble):               % Set the date.         % Define the date.             \date{2013-09-08}         % Use today's date.             %\date{\today}      What code should I use in the document (in place of something such as `\RFSdateB\today`) in order to be able to cope with such a 'switch' in the preamble? How should I specify the date in the preamble? Thanks for any ideas you may have!


title: How to create a BIG HEAD in longtable

text: Good night, I'm with a wheezy looking to create a 'pdf' with 'pdflatex' for sending by email with 'mutt'. The result of filtering the output of the 'runrepport' is saved in a 'tex' is processed later. The code used is as follows: **% LATEX con logtable               \documentclass[a4paper] {article}          \renewcommand{\baselinestretch}{0.5}          \usepackage[left=0.5cm,top=1cm,right=0.5cm,bottom=1cm]{geometry}          \usepackage[spanish]{babel}          \usepackage[latin9]{inputenc}          \usepackage{longtable}          \begin{document}          \begin{longtable}{|c|c|c|l|c|c|c|}          \multicolumn{7}{|l|}{\Huge{EMPRESA}} \\          \multicolumn{7}{|l|}{\normalsize{Direccion EMPRESA}} \\          \multicolumn{7}{|l|}{\normalsize{Poblacion EMPRESA}} \\          \multicolumn{7}{|l|}{\normalsize{Cod.Postal y Provincia EMPRESA}} \\          \multicolumn{7}{|l|}{\normalsize{NIF:}} \\          \hline           \multicolumn{3}{|l}{\normalsize{FACTURA: 178.256}}  &          \multicolumn{4}{|l|}{\normalsize{CLIENTE: CORDERO REUNIDOS S.L.}} \\          \multicolumn{3}{|l|}{\normalsize{FECHA..: 12/09/2013}} &          \multicolumn{4}{|l|}{\normalsize{DIRECCION CLIENTE }} \\          \multicolumn{3}{|l|}{\normalsize{COD.CLIENTE:  10.000}} &           \multicolumn{4}{|l|}{\normalsize{COD.POSTAL y POBLACION }} \\          \multicolumn{3}{|l|}{\normalsize{NIF.CLIENTE: A08220220 }} &           \multicolumn{4}{|l|}{\normalsize{PROVINCIA }} \\          \hline           \multicolumn{1}{|c|}{{FECHA}} &           \multicolumn{1}{c|}{{ALBARAN}} &           \multicolumn{1}{c|}{{ARTICULO}} &           \multicolumn{1}{l|}{{DESCRIPCION}} &           \multicolumn{1}{c|}{{CANTIDAD}} &           \multicolumn{1}{c|}{{PRECIO}} &          \multicolumn{1}{c|}{{IMPORTE}} \\           \hline           \endhead          14.10.13 & 145.248 & 45878  & REF: Tuercas 20x12 & 16 & 1.23 & 23.23\\          14.10.13 & 145.248 & 45878  & REF: Tuercas 20x12 & 16 & 1.23 & 23.23\\          14.10.13 & 145.248 & 45238  & REF: Arandelas 12x13 & 23 & 1.23 & 21.34\\          14.10.13 & 145.248 & 45238  & ======= ULTIMA LINEA ===== & 23 & 1.23 & 21.34\\          % ======================== 150 lines more =================================          \end{longtable}          \end{document}      ** The output is good, but I would like to put the group "CLIENTE - DIRECCION - COD.POSTAL - PROVICIA" right in the middle of "DESCRIPCION" to be more aesthetic. Is that possible? thanks


title: Referring a point in the text with a specified name

text: Please suggest as how can I implement the following code:               \documentclass{article}     \usepackage{amssymb,ntheorem,float}     \begin{document}     We summarize our results.       \begin{table}[H]      \centering % used for centering table      \begin{tabular}{|c|c|c|}      \hline\hline      $n$ & $m$ & Proof\\      \hline      $1$ & 2 & \ref{1}\\     \hline     $3$ & 4 & \ref{2}\\     \hline     \end{tabular}      \end{table}     \noindent\textbf{Proofs:}\\     1.\label{1} Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam viverra     dictum nulla, a pretium dui malesuada in. Aliquam id blandit lectus. Sed cursus lorem       \\\\     2.\label{2} more blah blah     \end{document}       Now I want \ref{1} to write as '1' and when it is clicked it should go to proof 1. Secondly I want that the the lipsum text should all be aligned such that a little margin is left where I put 1. as the indicator of proof 1 How do I implement this?