title: MikTex doesn't accept "ù" character

text: I'm using MikTex and pdfLatex. In the preamble I'm using                  \usepackage[latin1]{inputenc}      because I'm writing in italian, and the text is coded in UTF-8. This works nicely for every type of accented char [à,è,é,ì,ò] except than ù. Whenever I try to output a pdf I receive the well-known $ missing error if there's a "ù" around. What can I do? Error message:               ! Missing $ inserted.     <inserted text>                      $     l.56 ...filo Twitter @MiurSocial non pubblica più                                                        da aprile 2012,      I'm pretty sure there are no underscores or other special chars, and this happens only with ùs. Thanks! EDIT: if i use utf8 instead of latin1 I get this:               ! Package inputenc Error: Unicode char \u8:� not set up for use with LaTeX.          See the inputenc package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.2 ...abbreviazione di electronic government, �                                                        l'insieme di tutte le pr      * * * code in the preamble:               \documentclass[a4paper, 12pt, openright,twoside]{book}     \usepackage[textwidth=15cm,textheight=21cm]{geometry}     \usepackage[italian]{babel}     \usepackage[latin1]{inputenc}     \usepackage{fancyhdr}     \usepackage{graphicx}     \usepackage{svg}     \graphicspath{ {immagini/} }     \pagestyle{fancy}     \fancyhead{}     \fancyfoot{}     \fancyhead[CE]{\bfseries\leftmark} %C = center O= odd  E=even     \fancyhead[CO]{\bfseries\rightmark} %C = center O= odd  E=even     \fancyfoot[C]{\thepage}     \usepackage[section]{placeins}     \usepackage{booktabs}     \usepackage{fancybox}     \usepackage{tabulary}     \newcommand{\miur}{Ministero Italiano dell' Università e della ricerca}     \begin{document}     \input{cap1.tex}     \input{cap2.tex}     \input{cap3.tex}     \input{cap4.tex}     \input{cap5.tex}     \end{document}      The text giving problems has been directly input from keyboard and it's encoded in UTF-8. Now I tried with encoding it as ISO-8859-1 and it works.


title: How to disable auto-help window appears in TexStudio?

text: TexStudio is my favourite Tex editor. However, one feature is very annoying that I couldn't figure out how to disable. When the mouse pointer stays for a while on some Tex command, an auto-help window appears on the screen which includes information about the command. I tried to disable it from `options`, `configure TeXstudio`, but it seems that there is no option there.


title: multi-part numbers and units in siunitx

text: I'm trying to type set something like this "4 x 5 x 6 mm^2". the following command using _siunitx_ package does not generate what I wanted.               \SI{4 x 5 x 6}{mm^3}      Instead, it produces “4 mm^3 x 5 mm^3 x 6 mm^3". How do we correct this? Thanks.


title: How to organize properly my LaTeX document files created in TexLive 2012 (on Windows 7)?

text: I've installed `texlive 2012` which has two main folders: `2012` and `texmf- local`. To organize my documents I created a new folder I called `doc` under `texmf-local`. Up to now this has worked fine. For this purpose is `texmf-local` the correct folder and `doc` a good name or are there better ways? ADDED. I am the only user. I've forgotten to mention that `texlive 2012` is installed on `Windows 7`.


title: Why does tikz node parameters fail when given as a macro (set by \newcommand)?

text: > **Possible Duplicates:**   >  How to submit a set of tikz command with pgfkeys?   >  Multiple TikZ keys with foreach I have a class file which is supposed to modify the maketitle. I use TikZ nodes for placement of elements, and wish to add a background for one of the text nodes. If I add the options directly, everything works fine:               \node [text width=40mm,fill=red] {Foo}      However, since I want to give class users the option to turn the background coloring off, I want to give those node options as a macro, which has a different value depending on class options:               \newcommand\nodefillstyle{fill=red}          \node [text width=40mm,\nodefillstyle] {Foo}      I would expect this to work just as it works elsewhere, but it fails with a confusing error message:               ! Package pgfkeys Error: I do not know the key '/tikz/fill=red' and I am going      to ignore it. Perhaps you misspelled it.      Below you can see my class file and .tex file: test-article.cls:               \NeedsTeXFormat{LaTeX2e}     \ProvidesClass{test-article}[2013/01/02 My test documentclass]          % Use article default options     \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}     \ProcessOptions          \LoadClass{article}          \RequirePackage{tikz}          \newcommand\nodestyle{fill=red}          \renewcommand\maketitle{%      \begin{tikzpicture}%       \node [text width=40mm,\nodestyle] at (current page.center) {\@title};%      \end{tikzpicture}%     }      simplefill.tex:               \documentclass[a4paper]{test-article}          \title{My title}          \begin{document}      \maketitle     \end{document}      Why does this happen, and how can I achieve using macros within node options?


title: Should Hyperlinks include trailing puctuation as part of the link text?

text: I realize that this may be a subjective question, but I think this site is the best place for this. * * * I am trying to determine if any trailing punctuation should be part of the link text. The typical style for quotes is to include any trailing punctuation as part of the quote, so am wondering if the same should apply to links. Here is an example of a case where (in my opinion) it looks better if the punctuation is part of the link _only_ for the case where a box is used to indicate the link, but for the case where color, or underlining is used to indicate the link then perhaps it is best to leave it out. That is, for the box style, use the second version, but use the first version for ther other two styles. ![enter image description here](http://i.stack.imgur.com/ecyOr.png) ## Notes: I am not yet decided on the style to use for various reasons:   * One of the problems with colored links is that is not apparent if there are two links: One to "the" and another to "yahoo" in this example. Granted in this case it is clear from the English text, but consider that the link was instead to refer to a compound word where both words could have their own link or a link to the compound word. Perhaps a better example would be a colored link such as: ![enter image description here](http://i.stack.imgur.com/AIOU3.png) So, is this two links: one to "normal", and one to "force", or just one link to "normal force"?   * The underlined links have other issues in that it is not easy to get underlining completely working as I want it as per Using soul with indirect formatting applied (using macro with 2 parameters, one possibly optional).   * All three have problems when the link text starts on one line and ends on the subsequent line. The box version is the only solution that I am aware of that has a _chance_ to remedy this by leaving an open box on the right hand side on the first line, and an open box on the left hand side on the 2md line (of course this is still to be implemented) ## References:   * There is a a follow-up question about Automating processing of trailing punctuation (if any) for hyperlinks. ## Code:               % The following allows to have one version of this code for this questions,     % and the follow up at:     %      %   http://tex.stackexchange.com/questions/125358/automating-processing-of-trailing-punctuation-if-any-for-hyperlinks     %     %\def\SmartVersion{}%  Leave commented for this question.          \documentclass{article}     \usepackage{xparse}     \usepackage{xcolor}     \usepackage{soul}     \usepackage{xstring}     \usepackage{xspace}     \usepackage[colorlinks=true]{hyperref}          %% ----------------------------------------------------------------     %%                http://tex.stackexchange.com/questions/36894/     %%                    underline-omitting-the-descenders     %%     %%     \makeatletter     \ExplSyntaxOn         \cs_new:Npn \white_text:n #1           {             \fp_set:Nn \l_tmpa_fp {.01}             \fp_mul:Nn \l_tmpa_fp {#1}             \llap{\textcolor{white}{\the\SOUL@syllable}\hspace{\fp_to_decimal:N \l_tmpa_fp em}}             \llap{\textcolor{white}{\the\SOUL@syllable}\hspace{-\fp_to_decimal:N \l_tmpa_fp em}}           }         \NewDocumentCommand{\whiten}{ m }             {               \int_step_function:nnnN {1}{1}{#1} \white_text:n             }     \ExplSyntaxOff          \NewDocumentCommand{ \varul }{ D<>{5} O{0.2ex} O{0.1ex} +m } {%     \begingroup     \setul{#2}{#3}%     \def\SOUL@uleverysyllable{%        \setbox0=\hbox{\the\SOUL@syllable}%        \ifdim\dp0>\z@           \SOUL@ulunderline{\phantom{\the\SOUL@syllable}}%           \whiten{#1}%           \llap{%             \the\SOUL@syllable             \SOUL@setkern\SOUL@charkern           }%        \else            \SOUL@ulunderline{%              \the\SOUL@syllable              \SOUL@setkern\SOUL@charkern            }%        \fi}%         \ul{#4}%     \endgroup     }%     \makeatother     %% ----------------------------------------------------------------          \newcommand{\CreateLinkA}[2]{%         \hypersetup{pdfborder={0 0 1}, urlcolor=.}%         \href{#1}{#2}%     }%     \newcommand{\CreateLinkB}[2]{%         \hypersetup{pdfborder={0 0 0}, urlcolor=red}%         \href{#1}{#2}%     }%     \newcommand{\CreateLinkC}[2]{%         \hypersetup{colorlinks=false,urlcolor=.}%         \setulcolor{blue}%         \href{#1}{\varul[0.5pt][1.0pt]{#2}}%     }%          \makeatletter     \newcommand{\CreateLink}[3]{%         \IfStrEqCase{#1}{%             {1}{\CreateLinkA{#2}{#3}}%             {2}{\CreateLinkB{#2}{#3}}%             {3}{\CreateLinkC{#2}{#3}}%         }%         \ifdefined\SmartVersion% "If" clause is unused in this question             % If the next character is anything other than a space,              % include that char as part of the text.              % The "-" is supposed to whatever the next character is,             % but don't know how to get that character.               % Note that the "-" is shown in all cases, so this is NOT working.             \@ifnextchar{\space}{\space}{-}%         \else             \xspace%         \fi     }%     \makeatother               \begin{document}     \textbf{Punctuation NOT part of link:}\medskip     \par Go and check out \CreateLink{1}{www.yahoo.com}{the yahoo}, and also\ldots     \par Go and check out \CreateLink{2}{www.yahoo.com}{the yahoo}, and also\ldots     \par Go and check out \CreateLink{3}{www.yahoo.com}{the yahoo}, and also\ldots          \bigskip     \textbf{Punctuation part of link:}\medskip     \par Go and check out \CreateLink{1}{www.yahoo.com}{the yahoo,} and also\ldots     \par Go and check out \CreateLink{2}{www.yahoo.com}{the yahoo,} and also\ldots     \par Go and check out \CreateLink{3}{www.yahoo.com}{the yahoo,} and also\ldots     \end{document}


title: vertical alignment of 3 columns with different content

text: I'm using the linguistic **avm** library along with **tikz** and I am trying to put a `\leftrightarrow` vertically centered between the attribute-value matrix and the **tikz** image. ![I am not succeeding](http://i.stack.imgur.com/hGSCV.png) Thanks in advance for any help.               \begin{figure}[!h]     \begin{minipage}[t]{.40\linewidth}         \vspace{10pt}             \begin{avm}                 [{} attra & 1 \\                     attrb & 2 \\                     attrc & 3 \[\]]         \end{avm}      \end{minipage} \qquad     \fbox{\begin{minipage}[b]{.1\linewidth}             \centering $\leftrightarrow $     \end{minipage}}     \begin{minipage}[t]{.40\linewidth}         \vspace{0pt}     \centering     \begin{tikzpicture}             \node[circle,fill=green,minimum height=30.00pt,minimum width=150.00pt] {};      \end{tikzpicture}     \end{minipage}     \end{figure}


title: Font size for TikZ picture datavisualization

text: This is a folloup question to: set fontsize for TikZ figure As I mentioned I design my pictures around the fontsize, therefore it is good for me if I can set the font size to a particular size for every picture, so changing the font size in the document does not force me to adjust my pictures. While the previous questions works nicely in general, it does not work with `tikz-datavisualization`. Try changing the font size passed as parameter to the document class. You will notice that the size of `2` changes, while `1` appears to stay consistent. I would like to set the font size used for the tick marks globally for the entire document; how can I do that? (Or is there a way to make the previous fix work with the axis of datavisualizations?) MWE:               \documentclass[12pt]{report}     \usepackage{tikz}     \usetikzlibrary{datavisualization}          \tikzset{every picture/.style={font issue={\fontsize{10}{12}}}, %fix from http://tex.stackexchange.com/questions/122235/set-fontsize-for-tikz-figure, affects for instance the text above the legend ("MyLabel"), but not the labels of the lines in the legend              font issue/.style={execute at begin picture={#1\selectfont}}             }          \begin{document}     \begin{tikzpicture}     \datavisualization [scientific axes=clean,     visualize as line/.list={1,2,4},     x axis={         ticks={             step=2,             minor steps between steps=3,             major ={                 also at={1 as [{tick text padding=2ex, style={text height=1.2ex}, node style={font={\it}}}]},             },                   },     },     1={label in legend={text=1-way}},     legend={matrix node style={label=MyLabel, xshift=-1ex}}]     data {     %normed on worst time     x, y     1, 2     2, 3     3, 2     };     \end{tikzpicture}     \end{document}


title: siunitx: combine "\num" and "\SI" and change order of arguments

text: I'm trying to combine the `\num` and `\SI` command of `siunitx` and change the order of the arguments. In particular, what I want to achieve is a new command `\Zahl[siunitx-options]<pre-unit>{number}[measure]` where everything but `number` is optional. The MWE below achieves my objective by copying `siunitx` internals, which is a bad idea. In particular, I create a new `Npn` "jorg" based in `\SI` that changes the order of the original `SI` command and define `\Zahl` accordingly. Is there a more consistent and reliable way to achieve the same?               \documentclass{scrartcl}          \usepackage{siunitx,xparse,expl3}          \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}          \ExplSyntaxOn     % Create \Zahl based on siunitx' \num and \SI     %  The syntax is then \Zahl[siunitx-options]<pre-unit>{number}[measure]     \cs_new_protected:Npn \__siunitx_jorg:nnnn #1#2#3#4 {       \IfNoValueTF {#2}         { \tl_clear:N \l__siunitx_pre_unit_tl }         {           \group_begin:             \__siunitx_unit_in:nn {#2} {#1}             \cs_set_eq:NN \l__siunitx_pre_unit_tl \l__siunitx_unit_tl           \exp_args:NNNo \group_end:           \tl_set:Nn \l__siunitx_pre_unit_tl { \l__siunitx_unit_tl }         }       \cs_set_eq:NN \l__siunitx_brackets_bool         \l__siunitx_multi_brackets_bool       \__siunitx_combined_unit:nnn {#3} {#4} {#1}       \__siunitx_combined_output:n {#3}     }          \NewDocumentCommand\Zahl{o D<>{} m O{}}%      {       \leavevmode       \group_begin:         \IfNoValueTF {#1}           { \__siunitx_jorg:nnnn { } {#2} {#3} {#4} }           {             \keys_set:nn { siunitx } {#1}             \__siunitx_jorg:nnnn {#1} {#2} {#3} {#4}           }       \group_end:     }     \ExplSyntaxOff          \DeclareSIUnit\%{\char37}                    \begin{document}          \Zahl{200}          \Zahl{200}[\percent]          \Zahl<£>{200}          \Zahl<£>{200}[\percent]          \Zahl[round-mode=figures,round-precision=3]<£>{200.7}[\percent]          \end{document}


title: Which font expansion parameters are ideal for different fonts?

text: Following up on this question Set font expansion so that distortion is not noticeable I think a list of fonts and their respective ideal `stretch` and `shrink` parameters is missing. This would be a great addition to the LaTeX Font Catalogue but it's also a lot of work to do for all fonts and probably very subjective, too. So it needs to be collected somewhere. Why not start here? :)


title: How to run Asymptote with TeX Live?

text: I'm using a clean installation of TeX Live on Windows 7, using TeXworks editor in pdfLaTeX mode. I've tried the following code:               \documentclass{minimal}     \usepackage[pdftex]{graphicx}     \usepackage{asymptote}     \begin{document}      Text Text Text      \begin{center}      \begin{asy}      size(5cm); draw(unitsquare);      \end{asy}      \end{center}     \end{document}      And its produces a `.pdf`, but with no graphic. I understand that I may have to do a step with the `.asy` file, but what do I need to do with this `.asy` file? For some reason I'm getting this when running the command suggested by Philipp (document is named `trial.tex`). ![enter image description here](http://i.stack.imgur.com/zZTyz.jpg) Just running the command `asy` seems to bring up asymptote ok though.


title: titletoc: How to format mini/partial tocs for each section (hspacing, vspace of entries)?

text: I would like to have partial tocs (mini-tocs) for each section. I would like to achieve this with the `titletoc` package. As you can see from the code below, it pretty much does the job but the problem is that the settings for the main toc in the beginning do not necessarily apply for the mini-tocs. For example, the mini-toc is indented like the corresponding sub-toc of the main toc -- of course that's not what one wants... I would like it to be left aligned as the section heading. Another problem is that for the mini-tocs, I would like to have more space between the subsection entries (but no space between the subsubsection entries). How can I do this? As you can see, the first problem can be solved with an `addmargin` environment (which is a bit ugly though), but I couldn't figure out how to solve the second problem (adjusting the space between the subsection entries in the mini-tocs).               \documentclass[     paper=128mm:96mm]{scrartcl}     \linespread{1.12}          % font stuff     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \renewcommand{\familydefault}{\sfdefault}     \usepackage[american]{babel}          % page structure     \usepackage{calc}     \usepackage[includefoot,top=5.5mm,bottom=4.5mm,left=5.5mm,right=5.5mm,footskip=4mm]{geometry}     \usepackage{scrpage2}     \usepackage{titlesec}     \usepackage{titletoc}          %%% settings %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          % page style and layout     \pagestyle{scrheadings}     \clearscrheadfoot          % enlarge font sizes of headings by two levels     \addtokomafont{section}{\huge}     \addtokomafont{subsection}{\LARGE}     \addtokomafont{subsubsection}{\Large}          % spacings     \titlespacing{\section}{0mm}{0ex plus 1ex minus .2ex}{0ex plus .2ex}     \titlespacing{\subsection}{0mm}{0ex plus 1ex minus .2ex}{-.2ex plus .2ex}     \titlespacing{\subsubsection}{0mm}{0ex plus 1ex minus .2ex}{-.4ex plus .2ex}     \setcounter{secnumdepth}{3}% add numbering down to subsubsection          % table of contents     \AtBeginDocument{\renewcaptionname{american}{\contentsname}{\hspace{-0.08em}\Large Outline}}% change name of toc     \setcounter{tocdepth}{3}     \titlecontents{section}[1.2em]{\addvspace{0.6em}\bfseries}{\contentslabel{1.2em}}{\hspace*{-1.2em}}{}[]% define format for section of toc; entries: section, left, above, before with label, before without label, filler and page, after     \titlecontents{subsection}[3em]{}{\contentslabel{1.8em}}{\hspace*{-1.8em}}{}[]% define format for subsection of toc; entries: section, left, above, before with label, before without label, filler and page, after     \titlecontents{subsubsection}[5.6em]{}{\contentslabel{2.6em}}{\hspace*{-2.6em}}{}[]% define format for subsubsection of toc; entries: section, left, above, before with label, before without label, filler and page, after               %%% document %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \begin{document}     \tableofcontents     \clearpage     \section{Section 1}     \startcontents[]% kind     %\begin{addmargin}{-1.08em}% ugly but solves the first problem     \printcontents[]{}{2}{}% kind, prefix, top, init-code     %\end{addmargin}     \clearpage     \subsection{Subsection 1.1}     \subsubsection{Subsubsection 1.1.1}     \subsection{Subsection 1.2}     \section{Section 2}     \subsection{Subsection 2.1}     \subsubsection{Subsubsection 2.1.1}     \subsubsection{Subsubsection 2.1.2}     \subsection{Subsection 2.2}     \subsubsection{Subsubsection 2.2.1}     \subsubsection{Subsubsection 2.2.2}     \clearpage     \end{document}


title: Problems using \nocite with multibbl

text: I get some problems with package `multibbl`. On one hand, if I write `\bibliographystyle{ref}{alpha}` `\bibliography{ref}{books}` and anything more until `\appendix`, a new section or `\end{document}` I get the error `Paragraph ended before \bibliography was complete. <to be read again> \par`, but I fix this writing after that `\nocite{}`. On the other hand, if I want to appear all references, even those which I don't cite, when I place `\nocite{*}` instead of `\nocite{}` the `*` also appears in the final `file.pdf`. Someone knows why this works in this way?


title: I want to convert MathML to LaTeX

text: I'm trying to convert my equations I make in Microsoft Office Word 2013 to LaTeX because I would like to post my equations I make in word at math.stackexchange.com. I'm able to convert it to MathML. But if I post it here it doesn't really look like it should be. Is it possible to convert MathML to LaTeX?               <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math"><mml:mtable><mml:mtr><mml:mtd><mml:mrow><mml:maligngroup/><mml:mi>a</mml:mi><mml:mo><</mml:mo><mml:mi>x</mml:mi><mml:mo><</mml:mo><mml:mi>a</mml:mi><mml:mo>+</mml:mo><mml:msub><mml:mrow><mml:mi>δ</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:malignmark/><mml:mo>⇒</mml:mo><mml:mfenced open="|" close="|" separators="|"><mml:mrow><mml:msub><mml:mrow><mml:mi>f</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mfenced separators="|"><mml:mrow><mml:mi>x</mml:mi></mml:mrow></mml:mfenced><mml:mo>-</mml:mo><mml:msub><mml:mrow><mml:mi>L</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:mfenced><mml:mo><</mml:mo><mml:mfrac><mml:mrow><mml:msub><mml:mrow><mml:mi>L</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mrow><mml:mi>L</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:mfrac></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mrow><mml:maligngroup/><mml:malignmark/><mml:mo>⇒</mml:mo><mml:msub><mml:mrow><mml:mi>L</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:mfrac><mml:mrow><mml:msub><mml:mrow><mml:mi>L</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mrow><mml:mi>L</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:mfrac><mml:mo><</mml:mo><mml:msub><mml:mrow><mml:mi>f</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mfenced separators="|"><mml:mrow><mml:mi>x</mml:mi></mml:mrow></mml:mfenced><mml:mo><</mml:mo><mml:msub><mml:mrow><mml:mi>L</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:mfrac><mml:mrow><mml:msub><mml:mrow><mml:mi>L</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mrow><mml:mi>L</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:mfrac></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mrow><mml:maligngroup/><mml:malignmark/><mml:mo>⇒</mml:mo><mml:mfrac><mml:mrow><mml:msub><mml:mrow><mml:mi>L</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mrow><mml:mi>L</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:mfrac><mml:mo><</mml:mo><mml:msub><mml:mrow><mml:mi>f</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>(</mml:mo><mml:mi>x</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable><mml:mi> </mml:mi></mml:math>      a<x<a+δ1⇒f1x-L1<L1-L22⇒L1-L1-L22<f1x<L1+L1-L22⇒L1+L22<f1(x) It should look like this: https://skydrive.live.com/redir?resid=8FEA31C0ACCF70F0!135 ![enter image description here](http://i.stack.imgur.com/PfG5t.png)


title: Define own \rowfont (without using tabu)

text: Since the future of `tabu` is not that save I’m trying to define an own `\rowfont` macro. This is what I’ve got so far:               \documentclass{article}          \usepackage{array,tabularx}     \usepackage[table]{xcolor}     \usepackage{xparse,etoolbox}          \ExplSyntaxOn\makeatletter          \int_new:N \l_@@_last_rownum_int          \cs_new_nopar:Npn \@@_current_rowfont: { }          \NewDocumentCommand { \rowfont } { m } {        \cs_gset_nopar:Npn \@@_current_rowfont: { #1 }        #1     }          \newcolumntype { L } {        >{           \int_compare:nNnTF { \int_use:N \l_@@_last_rownum_int } = { \number \rownum } {              \@@_current_rowfont:           } {              \cs_gset_nopar:Npn \@@_current_rowfont: { }              \@@_current_rowfont:           }        }        l        <{           \int_gset:Nn \l_@@_last_rownum_int { \number \rownum }        }     }     \newcolumntype { x } {        >{           \int_compare:nNnTF { \int_use:N \l_@@_last_rownum_int } = { \number \rownum } {              \@@_current_rowfont:           } {              \cs_gset_nopar:Npn \@@_current_rowfont: { }              \@@_current_rowfont:           }        }        X        <{           \int_gset:Nn \l_@@_last_rownum_int { \number \rownum }        }     }          \rowcolors { 0 } { } { }          \ExplSyntaxOff\makeatother          \begin{document}     tabular:     \begin{tabular}{LLL}        \rowcolor{black}\rowfont{\color{red}}        1 & 2 & 3 \\        1 & 2 & 3 \\     \end{tabular}          \bigskip          tabularx:     \begin{tabularx}{0.5\textwidth}{xxx}        \rowcolor{black}\rowfont{\sffamily\footnotesize\color{red}}        1 & 2 & 3 \\        1 & 2 & 3 \\     \end{tabularx}     \end{document}      ![result](http://i.stack.imgur.com/lCRDD.png) **Problems**   * In `{tabularx}` the row using `\rowfont` gets enlarged when the argument of `\rowfont` contains `\color`.   * It only works when using `\rowcolors`.   * It can be used with special column types only. Maybe it is possible to solve the problems with another definition …


title: How to use \footnotesize with longtable command?

text: I am using `\longtable` command in a thesis preamble. My problem is that my data are large numbers, and I need to reduce the size of the table to footnote size. I tried using `\begin{footnotesize}`-`\end{footnotesize}` commands, it gave me an error message. What is the right way to reduce the size of the table with using a longtable?


title: Center, Scale, and Wrap Text atop an Image

text: Which LaTeX packages can I use to center, scale, and wrap text such that the following conditions are met:   * If the text isn't a wide as the container, scale the up text to fit.   * If the text is wider than the container, scale the text down to fit.    * In the case that text is scaled down, wrap the text to prevent ending up with one tiny, unreadable paragraph. I've tried `parbox`, `pbox`, `tabular`, and `adjustbox`, none quite meeting all three conditions. Here's the gist:               \documentclass{article}          \usepackage[percent]{overpic}     \usepackage[outline]{contour}     \usepackage{fontspec}     \newfontfamily\headingText[Color=FFFFFF]{KnowYourProduct}          \newcommand{\myFrame}[1]  {         \begin{overpic}[width=6cm,height=3cm,grid,tics=10]{Template}             \put (8,25) {                 {\contourlength{0.025em}\contour{black}{\headingText #1}}             }         \end{overpic}     }             \begin{document}          \myFrame{Title}     \myFrame{This Is A Long Title}     \myFrame{This title is so long that if you're still reading it you may want to reevaluate how you are presently squandering your personal time.}          \end{document}


title: compiled pdfs cannot be opened in Adobe Reader 11

text: I use TeXnic-Center 2.0 Beta 2 (64 Bit) and MiKTeX 2.9. I have a problem with my Adobe Reader 11. I cannot open compiled pdfs, AR 11 says that the pdf is damaged and cannot be repaired. I already changed the server in the "Viewer"-Tab from "acroviewR11" to "AcroViewR11" but it still does not work. I also re-installed AR, but this problem remains. Do you know what can cause this problem or does anybody have same problems and knows a solution? If you need further specific information, just ask me.


title: The titlepage option and the table of contents in KOMA-Script

text: The KOMA-Script document classes provide the `titlepage` option which when set to `true` typesets the title at its own page and otherwise allows for content to immediately follow the title on the same page. For the `scrreprt` class the default is `titlepage=true` and I want to set it to `false` but I get an unexpected result if `\maketitle` is immediately followed by `\tableofcontents`, i.e. there is a page break before the table of contents. (If `\maketitle` is followed by a section, then there is no page break.) On the other hand, the default for `scrartcl` is `titlepage=false` and in that case the table of contents immediately follows the title so I'm pretty sure that there is an easy way to achieve this for `srcreprt` too, but I can't find it. Here's a small code sample.               \documentclass[titlepage=false]{scrreprt}          \title{Title}          \begin{document}          \maketitle     \tableofcontents          \section*{intro}     \chapter{A}     \section{a}     \section{b}     \section{c}          \end{document}


title: \shortstack when writing text in nodes in TikZ

text: I have seen the command `\shortstack` in some nodes in TikZ (for example, the accepted answer here). What is used for? I couldn't find its definition in the TikZ manual.


title: Vertically align nodes in tikz graph

text: I have taken to drawing automata in TikZ, as it will position the nodes for me, and generally requires very little post-processing in terms of options. I know I can force nodes to be in the same horizontal layer by using the `[same layer]` directive. ![enter image description here](http://i.stack.imgur.com/bZMNb.png) How can I do this vertically (i.e. align 1,3,5 and 2,4)? MWE:               \documentclass[10pt,letterpaper]{article}     \usepackage{tikz}     \usetikzlibrary{graphdrawing,positioning,graphs}     \usegdlibrary{layered,trees}     \begin{document}     \begin{tikzpicture}[baseline]         \begin{graph}[layered layout]                         {1->2->3->4,                         2->4,1->4,                         1->3,4->5,2->5,                         {[same layer]1,2},                         {[same layer]3,4}                         };                         \end{graph}     \end{tikzpicture}     \end{document}


title: Putting \hat over first character of subscripted variable

text: I'm using a set of commands to define abstractions of mathematical notations that often occur during my thesis such as: `\newcommand{\DNoise}{n_d}` which would equal some distortion noise. This allows me to quickly change the notation throughout the document with just a change in one place and has proven invaluable so far. Now there is another command `\newcommand{\Est}[1]{\hat{#1}}` which is supposed to put a hat over another symbol to denote it's estimated. Using this with single symbols is all fine but when using it with symbols that have a subscript, the following happens: ![Problem](http://i.stack.imgur.com/dbih5.jpg) The left one is obtained by `\Est{\DNoise}` and the right one by `\Est{n}_d` which is possible but requires to break the pattern used throughout the document. The question is if there is a way to redefine `\Est` so that it produces the left result even when passed a variable with subscript.


title: XeTeX seems to break headers in Tufte-handout

text: I get the following messed-up running headers on pages 2 and following when using Tufte-Handout class with `fontspec` (and therefore XeTeX). The headers repeat the Title and then add a black box. ![Header error](http://i.stack.imgur.com/i1GF5.jpg) A lot of errors are thrown up, starting with:               Latex Error: ./MinimalExample.tex:13 Argument of \MakeTextLowercase has an extra }.     Runaway argument?      A minimal document producing this error follows. Thanks for any advice.               \documentclass[nofonts]{tufte-handout}     \usepackage{fontspec}     \defaultfontfeatures{Mapping=tex-text}     \setromanfont[Mapping=tex-text]{Adobe Caslon Pro}     \setsansfont[Scale=MatchLowercase,Mapping=tex-text]{Helvetica}     \setmonofont[Scale=MatchLowercase]{Inconsolata}     \usepackage{lipsum}     \title{Problem Document Title}     \author{Author Name}     \date{\today}     \begin{document}     \maketitle     \lipsum[1-10]     \end{document}


title: Centering a very wide plot

text: I would like to center the plot in the following code. How can I do that without changing the dimensions of the page for the parts containing text ? I must keep the dimensions of the plot as it without scaling the plot.               \documentclass[a4,12pt]{article}         \usepackage[utf8x]{inputenc}         \usepackage{tikz}         \usepackage{pgf,tikz}         \usetikzlibrary{arrows}          \begin{document}          \begin{center}         \definecolor{cqcqcq}{rgb}{0.75,0.75,0.75}         \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=2.0cm,y=2.0cm]         \draw [color=cqcqcq,dash pattern=on 4pt off 4pt, xstep=2.0cm,ystep=2.0cm] (-3.39,-4.23) grid (5.49,4.35);         \draw[->,color=black] (-3.39,0) -- (5.49,0);         \foreach \x in {-3,-2,-1,1,2,3,4,5}         \draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below] {\footnotesize $\x$};         \draw[->,color=black] (0,-4.23) -- (0,4.35);         \foreach \y in {-4,-3,-2,-1,1,2,3,4}         \draw[shift={(0,\y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left] {\footnotesize $\y$};         \draw[color=black] (0pt,-10pt) node[right] {\footnotesize $0$};         \clip(-3.39,-4.23) rectangle (5.49,4.35);         \end{tikzpicture}     \end{center}          \end{document}


title: What’s behind \over?

text: Typically a TeX command have arguments coming after it. But the command `\over`, which is used to produce fractions, can access the token before it. How exactly is it implemented and can I define a custom command like that?


title: How can I get this header and footer?

text: In every pager header I want title, author left side and chapter name with indent and date on right side. I have been trying from long time. It's very important for my thesis. Please some one help me to solve this. Here is the MS Word representation:               [ Title ]  - [ Subtitle ]                                            1 Introduction     [Author’s name]                                                       2012-01-04     ------------------------------------------------------------------------------------          1 Introduction             xxxxxxxxxxxxxxxxxxxxxxxxxxx     -------------------------------------------------------------------------------------                                       1      I edited the Alan's script a little..All i need is header and footer in Abstract, Acknowledgements and Introduction page also.. this is the edited script.               \documentclass{report}     \usepackage{titling}     \usepackage{fancyhdr}     \usepackage{lipsum} % for dummy text only               \makeatletter     % These commands follow the titling package format for titles     % They define user commands to format the subtitle     \newcommand\presubtitle[1]{\gdef\@presubtitle{#1}}     \newcommand\postsubtitle[1]{\gdef\@postsubtitle{#1}}     \newenvironment{alwayssingle}{%            \@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn            \else\newpage\fi}            {\if@restonecol\twocolumn\else\newpage\fi}     \newenvironment{acknowledgements}     {\pagestyle{empty}     \begin{alwayssingle}     \begin{center}     \vspace*{1.5cm}      \begin{flushleft} {\Large \bfseries Acknowledgements} \end{flushleft}     \end{center}     \vspace{0.5cm}     \begin{quote}}     {\end{quote}\end{alwayssingle}}     \newenvironment{abstracts}     {\pagestyle{empty}     \begin{alwayssingle}     \begin{center}     \vspace*{1.5cm}      \begin{flushleft} {\Large \bfseries Abstract} \end{flushleft}     \end{center}     \vspace{0.5cm}     \begin{quote}}     {\end{quote}\end{alwayssingle}}     % This command takes the subtitle as its argument, and uses the titling command     % \maketitlehookb plus the previously defined formatting commands to insert     % the subtitle into the titlepage. It also generates \thesubtitle for subsequent use     \newcommand\subtitle[1]{%       \renewcommand{\maketitlehookb}{\@presubtitle#1\@postsubtitle}       \newcommand\thesubtitle{#1}}     \makeatother     % Now we define the formatting for the subtitle     \presubtitle{\begin{center}\Large} % change this as needed     \postsubtitle{\end{center}}     % Now enter the regular title information, with the new \subtitle command     \title{My Thesis Title}     \author{A.M. Author}     \subtitle{My subtitle}     \date{\today}          % These commands set up the headers. They are set up for even and odd pages the same     % Check the fancyhdr documentation for information on how to set them differently     % for odd and even pages     \lhead{\begin{tabular}{@{}l}\thetitle\ -- \thesubtitle\\\theauthor\end{tabular}}     \chead{}     \rhead{\begin{tabular}{r@{}}\leftmark\\\thedate\end{tabular}}     \lfoot{}     \cfoot{\thepage}     \rfoot{}     % Set the width of the header rule. Make 0pt to remove the rule.     \renewcommand{\headrulewidth}{.5pt}     \renewcommand{\footrulewidth}{.5pt}     % Make the head height match the size of the header     \setlength{\headheight}{24pt}     \pagestyle{fancy}     % Remove "Chapter" from the marks     \renewcommand{\chaptermark}[1]{%       \markboth{\thechapter.\ #1}{}}          \begin{document}     \maketitle     \begin{abstracts}     \end{abstracts}     \begin{acknowledgements}     \end{acknowledgements}     \chapter{Introduction}     \lipsum\lipsum     \end{document}


title: How to make a list of unbreakable items?

text: In continuation of this question, I tried to make a list of items each consisting of unbreakable text. This can be done manually using minipage:               \documentclass[10pt,a4paper]{article}     \usepackage{lipsum} %for example     \setlength{\textheight}{7cm} %about one item fits per page     \begin{document}     \begin{itemize}     \item\begin{minipage}[t]{\linewidth}     \lipsum[1]     \end{minipage}     \item\begin{minipage}[t]{\linewidth}     \lipsum[2]     \end{minipage}     \end{itemize}     \end{document}      What I would like it to to define a list environment that is just like itemize (or whatever) only that the items are automatically inserted into a minipage as in my manual example. The solution should be robust for nested list environments, so if `\item` is to be redifined, it has to be done so in a very gentle way...not sure how. After redefining the environment itemize-block (for example) the following code should compile and not break the text in each item across pages:               \begin{itemize-block}     \item     \lipsum[1]     \item \begin{itemize}     \item let us make sure it compiles even with      \item a nested list...     \end{itemize}     \item     \lipsum[2]     \end{itemize-block}      This can surely be done...only I have no idea how.


title: How to prevent pagebreak in description environment

text: I have a simple List in the description Environment.               \begin{description}       \item [item] number one       \item [item] number two     \end{description}      there is a new new page between the first item and the second. Is there a way to prevent this? I'd rather have the complete list coherent on a new page.


title: Printing LaTeX command without compiling it

text: How could I write a command in LaTeX, so after compiling it will be shown as a text in `PDF` and not executed? For Example, I would write `\it This is how you write in italic` and the compiled `pdf` would contain the exact same text between the quotation marks without `\it` being executed.


title: How to make the space under footnotes disappear?

text: How do I make the space under footnotes disappear? And to space over the footnote's bar? ![enter image description here](http://i.stack.imgur.com/jedfA.png) Code:               \documentclass[12pt,french]{report}     \usepackage{mathptmx}     \usepackage{helvet}     \usepackage{courier}     \usepackage[T1]{fontenc}     \usepackage[cp1250]{inputenc}     \usepackage[a4paper]{geometry}     \geometry{verbose,margin=1in,headheight=12pt,headsep=25pt}     \usepackage{fancyhdr}     \pagestyle{fancy}     \setlength{\parskip}{\medskipamount}     \setlength{\parindent}{0pt}     \usepackage{babel}     \makeatletter     \addto\extrasfrench{%        \providecommand{\og}{\leavevmode\flqq~}%        \providecommand{\fg}{\ifdim\lastskip>\z@\unskip\fi~\frqq}%     }     \makeatother     \usepackage{latexsym}     \usepackage{pifont}     \usepackage{color}     \usepackage{float}     \usepackage{textcomp}     \usepackage{graphicx}     \usepackage{setspace}     \usepackage[unicode=true,      bookmarks=true,bookmarksnumbered=true,bookmarksopen=false,      breaklinks=true,pdfborder={0 0 0},backref=false,colorlinks=false]      {hyperref}     \hypersetup{pdftitle={tito},      pdfauthor={abc},      pdfkeywords={kiko}}     \usepackage{lipsum}      \makeatletter     \usepackage{multicol}     \usepackage{fancyhdr}     \usepackage{multirow}     \usepackage{longtable}     \setcounter{secnumdepth}{4}     \setcounter{tocdepth}{4}     \usepackage{array}     \newcommand{\ts}{\textsuperscript}     \renewcommand\theparagraph{\alph{paragraph}.}     \renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%                                         {3.25ex \@plus1ex \@minus.2ex}%                                         {0.5ex \@plus .2ex}%                                         {\normalfont\normalsize\bfseries}}     \renewcommand*\l@paragraph{\@dottedtocline{4}{10em}{2em}}          \def\thickhrulefill{\leavevmode \leaders     \hrule height 1ex \hfill \kern \z@}          \def\@makechapterhead#1{%     \vspace*{10\p@}%     {\parindent \z@     {\reset@font     \usefont{OT1}{phv}{m}{n}     \LARGE Chapitre \thechapter\par\nobreak}%     \par\nobreak     \vspace*{30\p@}     \interlinepenalty\@M     \usefont{OT1}{ptm}{b}{n}     {\raggedright \Huge #1}%     \par\nobreak     \vskip 20\p@     \hrule height 1pt     \par\nobreak     \vskip 45\p@     }}          \def\@makeschapterhead#1{%     \vspace*{10\p@}%     {\parindent \z@     {\raggedleft \reset@font     \scshape \vphantom{\@chapapp{} \thechapter}     \par\nobreak}%     \par\nobreak     \vspace*{30\p@}     \interlinepenalty\@M     \usefont{OT1}{ptm}{b}{n}     {\raggedright \Huge #1}%     \par\nobreak     \par\nobreak     \vskip 45\p@     }}          \lhead{\nouppercase\leftmark}     \chead{}     \rhead{}     \lfoot{}     \cfoot{\thepage}     \rfoot{}     \renewcommand{\footrulewidth}{0.4pt}          \pretolerance=10000     \hyphenpenalty=10000     \exhyphenpenalty=10000          \AtBeginDocument{       \def\labelitemi{\Pisymbol{psy}{183}}       \def\labelitemii{\(\rhd\)}       \def\labelitemiii{\(\rhd\)}       \def\labelitemiv{\(\ast\)}     }     \makeatother          \begin{document}     \chapter{Chap}     \lipsum[1]\footnote{\lipsum[1]}     \lipsum[1-8]     \end{document}


title: eps figures with pdflatex

text: In a recent discussion on this site I learned that using               \usepackage[pdf]{pstricks}      makes it possible to run `pdflatex` on files containing `eps` and `pstricks` files (and `psfrag` usage as well). Now a couple of questions:   1. If a file does not contain `pstricks`, just `eps` and `psfrag`, this method can still be used. But is there a method to do this that does not require loading `pstricks`? I know that `auto-pst-pdf` is one approach, another one is to load `epstopdf`, are there any other ways to achieve this without loading these files? Maybe by adding an option to `graphicx`?   2. In all these approaches, every time that `pdflatex` is run all `eps` and `pstricks` files are converted to `pdf` files, even if they have not changed. Is there an approach that prevents it and only converts to `pdf` if a file has been changed from last compilation? Thanks


title: Supress page breaks before headings, allow orphans

text: I am trying to create a simple outline document (based on scrbook), that contains just headings (chapter, section, ...) and a few notes inbetween. For that, I removed the clearpage before a new chapter, and adjusted the heading spacings with the titlesec package. Later, I'll comment out the modification and flesh out the outline to be the final document. I's looking pretty good so far, but Latex insists in inserting rubber between paragraphs and before and after sections. Setting `\raggedbottom` fixed that, but I still get some section headings pushed to the next page, although there would be enough space on the current page. I'd like it to put as much text as possible on the current page, even if the page ends with a heading. I tried               \widowpenalty=0     \clubpenalty=0      but that didn't have any effect. What can I try?


title: How to add curly brace below xytree nodes

text: I would like to add a curly brace and label underneath the E and F nodes of an xytree like this: ![enter image description here](http://i.stack.imgur.com/HWPw2.png) So far, I have the code for the tree, but haven't been able to figure out how to insert the curly brace and label.               \documentclass{article}     \usepackage{xytree}     \begin{document}          \xytree{     &&& \xynode{A} \xyconnect{2,-2}"_{Yes}" \xyconnect{2,2}"^{No}" &&& \\     &&&&&& \\     & \xynode{B} \xyconnect{2,-1}"_{Yes}" \xyconnect{2,1}"^{No}" &&&& \xynode{C} \xyconnect{2,-1}"_{Yes}" \xyconnect{2,1}"^{No}" \\     &&&&&& \\     \xynode{\begin{tabular}{c}D\end{tabular}} && \xynode{E} && \xynode{F} &&     \xynode{\begin{tabular}{c}G\end{tabular}} \\     }          \end{document}


title: Persuading (la)tex "silently to go beyond the envelope of 'good taste' " to avoid an overfull hbox

text: My understanding, based on reading this website, is that (la)tex performs at most three passes when trying to typeset a paragraph: one based on `\pretolerance`, one based on `\tolerance`, and one based on `\emergencystretch`. (I have no knowledge of how the `microtype` package affects this.) If the third pass, with the least stringent requirements, still cannot typeset the paragraph, tex "gives up" and leaves an overfull hbox. To a typical reader, who is familiar with the sort of typesetting that shows up in narrow-columned magazines and newspapers (and sometimes textbooks, and...), an overfull hbox is _much_ more obvious than a relaxed requirement on `\tolerance` or `\emergencystretch`. Given the speed of modern computers, it seems it would be quite reasonable for tex to continue making passes with progressively relaxed requirements until it either is able to typeset the paragraph, or gets to values so bad that the result actually "sticks out" even more than an overfull hbox. If TeX were to follow this approach, then a warning should probably still be given any time extra passes are required. But if the user is expecting to switch to a different document class later, or prefers to ignore the warning for any number of other reasons, a sloppily typeset paragraph may well feel less like a slap in the face than an overfull hbox. Thus, the question:   **Would it be even remotely feasible to modify the behavior of (La)TeX, preferably by means of a package, so that it performs additional passes, with automatically (and progressively) relaxed parameters, before "giving up" and allowing an overfull hbox?**


title: Are subcaption and tabularx incompatible?

text: I know that tex.sx isn't the forum for bug-reporting, but I have a bit of a problem and I'm looking for a technical workaround. The following MWE produces odd labels:               \documentclass{article}          \usepackage{subcaption}     \usepackage{tabularx}          \begin{document}     \begin{figure*}       \begin{subfigure}{0.3\textwidth}         Figure 1a         \caption{Fig1a}         \label{fig:1a}       \end{subfigure}       \hfill       \begin{subfigure}{0.5\textwidth}     \begin{tabularx}{0.5\textwidth}{r}     Figure 1b     \end{tabularx}         \caption{Fig1b}         \label{fig:1b}       \end{subfigure}       \caption{Fig1}       \label{fig:1}     \end{figure*}     \begin{figure}     Figure 2     \caption{Fig2 caption}     \label{fig:2}     \end{figure}     Figures \ref{fig:1a}, \ref{fig:1b}, and \ref{fig:1} should be 1a, 1b     and 1; Figure \ref{fig:2} should be 2.     \end{document}      Specifically, the last line of text reads, "Figures 1a, 1b, and **2** should be 1a, 1b and **1** ; Figure **3** should be **2**." (I know that the example doesn't use any of `tabularx`'s features; merely the use of the `tabularx` environment is enough to throw off the labels.) If I move the `\caption{Fig1}\label{fig:1}` above the subfigures, then I get the right numbering, but of course the caption is now in the wrong position. According to `\listfiles`, I'm using                article.cls    2007/10/19 v1.4h        size10.clo    2007/10/19 v1.4h      subcaption.sty    2011/10/30 v1.1c       caption.sty    2011/11/10 v3.2e      caption3.sty    2011/11/01 v1.4a        keyval.sty    1999/03/16 v1.13      tabularx.sty    1999/01/07 v2.07         array.sty    2008/09/09 v2.4c       So my question is, what is `tabularx` doing that is not properly respecting the label counter, and how could I have deduced that myself?


title: Bibliography as appendix causes problems for further appendixes

text: The document:               \documentclass{article}     \usepackage{natbib}     \begin{document}     \appendix     \renewcommand{\bibsection}{\section{References}     \bibliographystyle{apalike}     \bibliography{foo}     \appendix     \section{More Details}     \end{document}      The output:               [...]     11pdfTeX warning (ext4): destination with the      same identifier (name{section.A}) has been already used, duplicate ignored      The document looks like (appendix numbers are duplicate):               A. References     ...     A. More Details      How to solve it?


title: Numbering the table of contents

text: I'm new to latex. I have successfully formatted the chapter heading, section heading and subsection heading with `titlesec` package:               \usepackage{titlesec}              \titleformat {\chapter}             [display]              {\normalfont\bfseries}             {\large\thechapter}             {0ex}             {\LARGE \titlerule[1pt] }              \titleformat{\section}             {\normalfont\large\bfseries}             {\thechapter.\thesection}             {1ex}             {}              \titleformat{\subsection}             {\normalfont\bfseries}             {\thechapter.\thesubsection}             {1ex}             {}      But in the generated table of content the section and the subsection has no chapter number, while I'd like to have it. Any hints? EDIT: I wanted to avoid to put all the main document because it is a template for a thesis and it is full of parts that are not relevant to the problem but I'm not sure what is relevat and what is not so I will copy it all. Sorry for that.               %\documentclass[12pt,a4paper,oneside, titlepage,fleqn,italian]{book} %stampa     \documentclass[12pt,a4paper,twoside,openright,titlepage,fleqn,italian]{book}          \usepackage[italian]{babel}     \usepackage{graphicx}     \usepackage{natbib}     \usepackage[applemac]{inputenc}     \usepackage{amsmath,amssymb,amsthm,graphicx,bm, color, tikz}     \usepackage{epsfig}     \usepackage{epstopdf}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage[colorlinks=false]{hyperref}     \usepackage{longtable}          \renewcommand{\thesection}{\arabic{section}}     \addtolength{\voffset}{-0,5cm}     \addtolength{\textheight}{1cm}     \setlength{\parindent}{0pt}     \frenchspacing     \linespread{1.25}          \usepackage{fancyhdr}     \usepackage{algorithm}      \usepackage{algorithmic}      \pagestyle{fancy}     \renewcommand{\chaptermark}[1]{\markboth{#1}{}}%     \renewcommand{\sectionmark}[1]{\markright{\thechapter .\thesection\ #1}}%     \renewcommand{\subsectionmark}[1]{\markright{\thechapter .\thesubsection\ #1}}%     \fancyhf{}     \lhead{\rightmark}%     \chead{}%     \rhead{\bfseries\thepage}%     \renewcommand{\headrulewidth}{0.4pt}%     \renewcommand{\footrulewidth}{0pt}%     \newcommand{\tab}{\hspace*{2em}}     \DeclareMathOperator*{\argmax}{arg\,max}     \setlength{\headheight}{15pt}%     \fancypagestyle{plain}{\fancyhead{}\renewcommand{\headrulewidth}{0pt}}%               \fancyhead[RO]{\textbf{\thepage}}     \fancyhead[LO]{\nouppercase{\rightmark}}          \usepackage{frontesp} % see frontesp.sty           \usepackage{atbeginend}          \AfterBegin{itemize}{\addtolength{\parskip}{- 9pt}}     \AfterBegin{description}{\addtolength{\itemsep}{- 9pt}}     \AfterBegin{enumerate}{\addtolength{\itemsep}{- 9pt}}          \usepackage[htt]{hyphenat}          \usepackage{titlesec}              \titleformat {\chapter}             [display]              {\normalfont\bfseries}             {\large\thechapter}             {0ex}             {\LARGE \titlerule[1pt] }              \titleformat{\section}             {\normalfont\large\bfseries}             {\thechapter.\thesection}             {1ex}             {}              \titleformat{\subsection}             {\normalfont\bfseries}             {\thechapter.\thesubsection}             {1ex}             {}          \usepackage[font=footnotesize,labelfont=bf]{caption}          \begin{document}          \frontmatter          \title{  title  }     \author{  author  }     \date{}     \degreeyear{ 2025/26 }            \principaladviser{ teacher }     \firstreader{ reader }          \maketitle          \textcolor{white}{.}          \addtolength{\oddsidemargin}{+1,3cm}          \addtocounter{tocdepth}{+1} % \subsubsection in the table of content               \tableofcontents              \input{preface}          \mainmatter              \input{cap1}         \input{cap2}         \input{cap3}         \input{cap4}          \addtolength{\parskip}{5pt}               \bibliography{bibliografia}     \bibliographystyle{apalike}     % argument is your BibTeX string definitions and bibliography database(s)          \end{document}      PS: if you have any kind of advice it is welcome!


title: How can I have figures identified as tables?

text: My paper includes several graphs that are all much too long to make as tables, so I made them figures (copy and paste from spreadsheet to paint). My paper has to include a list of figures and a list of tables, and I would like to know if there is a way that I can trick LaTeX into thinking that those figures are tables.


title: How does a TeX engine read and render the input stream?

text: I am new to TeX programming and I have not finished reading the TeXBook yet. I need at a glance tutorial about how a TeX engine reads, processes, and produces its output. My mental model as a newbie when considering any black box receiving an input stream and producing an output stream is as follows. The black box   1. takes a chunk of characters of a constant length,   2. processes the taken chunk of characters,   3. save the processed chunk in a file,   4. does 1, 2, 3 until all input stream of characters gets processed. Does a TeX engine use the chunk-by-chunk processing mechanism? Or does it do multiple processing from start to finish as follows? A TeX engine   1. scans all input stream (in an input file) from start to finish,    2. does the first expansion.   3. repeat 1 followed by 2 for the nth expansion until no more expansion possible.   4. saves the rendered output to a file, for example, in PDF format. The answer of this question really helps me to learn plain TeX faster than reading the TeXBook. ## Edit 1 (Sept 9, 2014) Rather than spawning a new related question, I think it is better to just edit this question. It is still hard for me to digest the algorithm how TeX engine works without an example. That is why here I provide a simple example. The comments `unit *` are intentionally added to ease referencing.               % unit A     \def\aa[#1]{a's value: #1}     \def\bb{[Hi!]}     \def\cc{\bb}     \def\dd{\cc}          % unit B     \expandafter\expandafter\expandafter\expandafter     \expandafter\expandafter     \expandafter     \aa\dd               % unit C     \expandafter\expandafter     \expandafter     \aa\cc          % unit D     \expandafter     \aa\bb          \bye       Could you elaborate your answer using this example? The points I want to know:   1. How TeX know when to proceed to the next `unit`.   2. Is it my understanding correct that scanning starts from top to bottom, proceed to the next unit once after the previous unit has been completely expanded and executed? I mean when processing `unit B` to complete its expansion and execution, the remaining units (`C` and `D`) are untouched.


title: problem with macro using \ifx

text: [Edit 1] originally titled "can't understand why this simple macro causes complex error" [original post] I've written a book, and now I'm trying to produce the e-book using tex4ht. Adapting this post, I introduced the following macro:               \newcommand{\gpifpdf}[2]{\ifx\HCode\UnDef{#1}\else{#2}\fi}      Which should return the first argument when producing the pdf file, and the second when using mk4ht to produce the html file. Here is my m(n)we:               \documentclass[10pt]{book}     \usepackage{hyperref}     \newcommand{\gpifpdf}[2]{\ifx\HCode\UnDef{#1}\else{#2}\fi}     \gpifpdf{       \usepackage{fontspec}     }{       \hypersetup{tex4ht}     }     \begin{document}     \gpifpdf{this is pdf text}{this is HTML text}     \end{document}      mk4ht produces an html file which displays "this is HTML text." But using Latexian to generate a pdf generates the following error:               Undefined control sequence.     \clist_if_empty:NF #1->\if_meaning:w                                       #1\c_empty_tl \prg_return_true: \else: \prg_return_false: \fi: \c_zero {}     l.9 \begin{document}      HOWEVER, when I comment out `\usepackage{fontspec}`, it works perfectly, producing a pdf reading "this is pdf text," so the macro seems to work correctly in the document body. When I leave in the `\usepackage{fontspec}`, and comment out the line before and the 3 lines afterwards (lines 4, 6, 7, and 8) it also produces the pdf just fine. In other words: the macro seems to function correctly, and when I do what the macro is supposed to do by hand, everything works, but when I try to get the macro to do it, it doesn't. I just upgrade to MacTeX 2014 from 2013 (so TeXlive 2014), and the problem continues. I am using Latexian, with the XeTeX option.


title: Is Beamer safe to upgrade?

text: I overhead this on a mailing list a month ago. > I gave up using beamer since the new maintainers have broken a lot of things > in beamer Now TeXLive 2010 is out and I'd like to upgrade. But I'm nervous because I use beamer every day and I don't want to have to workaround new issues. I'd be interested to hear what others feel about beamer development and if they have had issues with upgrading. **Edit/Update** I have updated beamer and it runs smoothly. In fact, a nagging bug that I had never gotten to working around was fixed. So the answer is yes, safe to upgrade. :-)


title: Can I have another choice to add the time in beamer except the tdclock

text: Last time, I question that the sumatrapdf cannot show the time. you can see sumatrapdf question And I get the answer it doesn't support the java. Then I use the Adbreader,it's ok. Now, Regardless of things whether Javascript or not, I only want to know whether I can have another choice to add the time in beamer except the tdclock. Say thank you in advance :)


title: Header appearing in second page of TOC, when it shouldn't

text: I have recently made some changes to my document, using the `geometry` package to change its margins. But after I've done this, the fancy header I'm using started to appear in the second page of the TOC, when it shouldn't. I don't understand why this header appears there, as the command I give is simply `\tableofcontents`.


title: Vim-Latex: Inverse and Forward Searching partially enabled. (Environment: Vim-Latex Suite, Sumatra, MikTex)

text: This is a question directed to those who are familiar with compiling Tex using Vim. My OS is Windows 8.1 **Problem Description:** Inverse and Forward Search is partially enabled. When I double click at a paragraph in the PDF file (in Sumatra), if I double click at the first sentence, then I can be sent back to the corresponding paragraph in `.tex` file opened in Vim. However, if I click at any line further than (including) the third line of the same paragraph, I would be told that:               No synchronization info at this position.       The weird thing is, after a random number of lines, inverse search would again point to the `.tex` file again. For forward search, I can only say the following:   1. Sometimes, for the paragraph where inverse search is partially enabled, it works by sending the focus of window to the PDF document and pointing to exact corresponding paragraph.   2. Sometimes, forward search will send me to a random paragraph in PDF file.   3. And sometimes, the forward search fails. Sumatra complains that:  `No result found around line # in file ~\kkk.tex` My Vim is on Github: https://github.com/llinfeng/Vim-Win. I am not sure if I am asking this question in the correct forum. If not, please direct me to the correct site/forum/mail-list.


title: Is it possible to use \node paths directly in forest?

text: The following simple example shows that when a `tikzpicture` is used directly as a `forest` node, some of its paths seem to be ignored: `\node` paths seem to be ignored while, for example `\draw` paths are treated as expected. One way to get the expected result it to previously box the pictures (the example also illustrates this); however, I need to use complex `tikzpicture`s containing `\node` paths directly in forest without previously boxing them. Is this possible?               \documentclass{article}      \usepackage{forest}          \newsavebox\mybox     \newcommand\test{\tikz{\node[fill=cyan!60] (a) {a};\draw[ultra thick,orange] (a.north west) -- (a.south east);}}     \savebox\mybox{\test}          \begin{document}          \begin{forest}     [\test       [\usebox\mybox         [\test]         [\test]       ]       [\test          [\usebox\mybox]         [\usebox\mybox]       ]     ]         \end{forest}          \end{document}      ![enter image description here](http://i.stack.imgur.com/3TUsr.png)


title: How to export beamer frames to standalone subfiles_

text: I try to split a large `beamer` presentation with the `standalone` suite. Herein, I do not want to split out parts of slides, for which I understand the `beamer` class option with the `standaloneframe` would be used, but whole series of slides with overlays and especially their own preambles. I ended up with these two files. The main file               %main.tex     \documentclass{beamer}     \title{title}     \usepackage[subpreambles]{standalone}     %\usepackage{standalone, tikz}          \begin{document}     \begin{frame}[plain]       \titlepage     \end{frame}          \includestandalone{sub}     \end{document}      and a first part               % sub.tex     \documentclass[class=beamer,preview=false,crop=false,varwidth=false]{standalone}     \usepackage{tikz}     \begin{document}     \begin{frame}{A Frame}       \begin{itemize}[<+->]         \item an item         \item another item         \item a circle \tikz \draw circle (3pt);       \end{itemize}     \end{frame}     \end{document}      `sub.tex` can be compiled as expected. Compiling `main.tex` for the first time results in the title frame only followed by an empty slide. It suspect this is due to the collection of the preambles needing one run. Compiling `main.tex` the second time leaves me with an error message which also occurs if I leave out the subpreambles to start with.               ! Missing \endgroup inserted.     <inserted text>                      \endgroup      l.10 \end{frame}          !  ==> Fatal error occurred, no output PDF file produced!      The third run yields a slightly different message, which is repeated at all further `pdflatex` invocations.               Package currfile Warning: File stack underflow! on input line 259.          (./main.sta)     ! Extra }, or forgotten \endgroup.     l.506   }              %     !  ==> Fatal error occurred, no output PDF file produced!      What did I do wrong?


title: Barchart with pgfplots with data from R

text: It took me a while to create a nice (... to some extent) bar chart with R which represents what I need. However I noticed it doesn't look very aesthetic in my Latex document. Sweave isn't a good solution either, because the Latex document is >300 pages and comes with a lot of options and fiddling. I think it is sensible to create the graph in Latex to keep the formatting consistent. To cut a long story short, I will show you what I created in R and from what data, and further down I will show you the result I have in Latex so far (with a slightly different table). My goal is to get the resulting graph as created with R(ggplot2) in Latex(pgfplots) with the same table. The dataframe in R (re.d):                                    Region Sample Density     2             East Midlands   Fame    0.09     3                     Wales   Fame    0.04     4             West Midlands   Fame    0.11     5  Yorkshire and The Humber   Fame    0.12     6                     Other   Fame    0.00     7           East of England   Fame    0.12     8                    London   Fame    0.08     9                North East   Fame    0.03     10               North West   Fame    0.11     11         Northern Ireland   Fame    0.03     12                 Scotland   Fame    0.07     13               South East   Fame    0.14     14               South West   Fame    0.07     15            East Midlands Survey    0.14     16          East of England Survey    0.07     17                   London Survey    0.07     18               North East Survey    0.05     19               North West Survey    0.14     20         Northern Ireland Survey    0.02     21                 Scotland Survey    0.07     22               South East Survey    0.15     23               South West Survey    0.09     24                    Wales Survey    0.03     25            West Midlands Survey    0.10     26 Yorkshire and The Humber Survey    0.07     27                    Other Survey    0.00      This command `ggplot(re.d, aes(x=Region, y=Density, fill=Sample)) + geom_bar(position="dodge") + theme(axis.text.x = element_text(angle = 90, hjust = 1, size = 12),axis.text.y = element_text( size = 12))` delivers the following graph: ![Regions: Sample vs. population -- Graph created with ggplot2](http://i.stack.imgur.com/8SwL5.png) Now I have transposed the dataframe re.d to some extent in order to make it usable for pgfplots. This is however a bit cheating in my opinion. I would prefer to use the table as presented in re.d. Anyway, here comes the table as used by pgfplots -- called regions.latex:               "","RegionFame","SampleFame","DensityFame","RegionSurvey","SampleSurvey","DensitySurvey"     "2","East Midlands","Fame",0.09,"East Midlands","Survey",0.14     "3","Wales","Fame",0.04,"East of England","Survey",0.07     "4","West Midlands","Fame",0.11,"London","Survey",0.07     "5","Yorkshire and The Humber","Fame",0.12,"North East","Survey",0.05     "6","Other","Fame",0,"North West","Survey",0.14     "7","East of England","Fame",0.12,"Northern Ireland","Survey",0.02     "8","London","Fame",0.08,"Scotland","Survey",0.07     "9","North East","Fame",0.03,"South East","Survey",0.15     "10","North West","Fame",0.11,"South West","Survey",0.09     "11","Northern Ireland","Fame",0.03,"Wales","Survey",0.03     "12","Scotland","Fame",0.07,"West Midlands","Survey",0.1     "13","South East","Fame",0.14,"Yorkshire and The Humber","Survey",0.07     "14","South West","Fame",0.07,"Other","Survey",0      The results I get from this table and the code I will paste at the end of this posting is displayed in the following figure: ![The results of the below MWE](http://i.stack.imgur.com/7rmG2.png) And here is the MWE which produced the above result.               \documentclass[DIV11]{scrartcl}     \usepackage{pgfplots}     \usepackage{pgfplotstable}      \usepackage{filecontents}               \begin{filecontents}{RegionN.csv}     "","RegionFame","SampleFame","DensityFame","RegionSurvey","SampleSurvey","DensitySurvey"     "2","East Midlands","Fame",0.09,"East Midlands","Survey",0.14     "3","Wales","Fame",0.04,"East of England","Survey",0.07     "4","West Midlands","Fame",0.11,"London","Survey",0.07     "5","Yorkshire and The Humber","Fame",0.12,"North East","Survey",0.05     "6","Other","Fame",0,"North West","Survey",0.14     "7","East of England","Fame",0.12,"Northern Ireland","Survey",0.02     "8","London","Fame",0.08,"Scotland","Survey",0.07     "9","North East","Fame",0.03,"South East","Survey",0.15     "10","North West","Fame",0.11,"South West","Survey",0.09     "11","Northern Ireland","Fame",0.03,"Wales","Survey",0.03     "12","Scotland","Fame",0.07,"West Midlands","Survey",0.1     "13","South East","Fame",0.14,"Yorkshire and The Humber","Survey",0.07     "14","South West","Fame",0.07,"Other","Survey",0     \end{filecontents}          \begin{document}               \makeatletter     \pgfplotsset{         /pgfplots/flexible xticklabels from table/.code n args={3}{%             \pgfplotstableread[#3]{#1}\coordinate@table             \pgfplotstablegetcolumn{#2}\of{\coordinate@table}\to\pgfplots@xticklabels             \let\pgfplots@xticklabel=\pgfplots@user@ticklabel@list@x         }     }     \makeatother     \pgfplotstableread[col sep=comma]{RegionN.csv}\datatable     \pgfplotstableset{col sep=comma}     \begin{tikzpicture}     \begin{axis}[     ybar, ymin=0,     xlabel=Region,     ylabel=Density,     flexible xticklabels from table={RegionN.csv}{"RegionSurvey"}{col sep=comma},     xticklabel style={text height=1.5ex}, % To make sure the text labels are nicely aligned     xtick=data,     nodes near coords,     nodes near coords align={vertical},     x tick label style={rotate=45,anchor=east, /pgf/number format/1000 sep=},     width=1.0\textwidth,     height=40mm,     bar width=7pt,     ]     \addplot table[x expr=\coordindex,y="DensitySurvey"]{\datatable};     \addplot table[x expr=\coordindex,y="DensityFame"]{\datatable};     \end{axis}     \end{tikzpicture}          \end{document}      The problem is not only the horrendous design, but rather the fact that the graph is wrong. I understand that this comes from the x tick labels which are not in the right order. I was wondering whether this can be sorted with a more advanced pgf code or whether I have to fiddle with my R program to export another table. Any help or suggestions are welcome.


title: Tikz: positioning library breaks path picture bounding box?

text: I try to create and order text boxes with tikz-nodes. The nodes are ordered so far using the tikz `positioning` library. Additionally, I try to have numbers on the background of the nodes by using `path picture`. Here is a minimal example:               \documentclass[tikz]{standalone}     \usetikzlibrary{positioning}     \usepackage[outline]{contour}         \usepackage[english]{babel}     \usepackage{blindtext}         \usepackage{environ}          \newlength{\myblockwidth}     \newcounter{boxcounter}          \newlength{\mylinewidths}     \newlength{\myinnersep}     \setlength{\mylinewidths}{5pt}     \setlength{\myinnersep}{2ex}          \NewEnviron{mycolorblock}[2][]{%       \addtocounter{boxcounter}{1}%       \setlength{\myblockwidth}{#2}%       \addtolength{\myblockwidth}{-4ex}%       \contourlength{.333pt}%       \node[       #1,       draw=orange,       fill=orange!10,       line width=\mylinewidths,       inner sep=2ex,       rounded corners = 2.5ex,       path picture={%         \node[white,         circle, draw=blue!20, line width=\mylinewidths, inner sep=.1pt,         scale = 15,         font=\bf] at (path picture bounding box.center)         {\contour{blue!20}{\the\value{boxcounter}}};}       ](box\the\value{boxcounter}){         \begin{minipage}[t][]{\myblockwidth}%           \BODY         \end{minipage}%       };     }     \begin{document}     \begin{tikzpicture}[inner sep=0pt,node distance=5pt]       \begin{mycolorblock}{\textwidth}         \blindtext[2]       \end{mycolorblock}       \begin{mycolorblock}[below = of box1]{\textwidth}         \blindtext[2]       \end{mycolorblock}     \end{tikzpicture}     \end{document}      Process with `pdflatex` the background number for the second block (and any additional is off-center:   ![result of example](http://i.stack.imgur.com/gPdQb.jpg)   The background is thereby always shifted away from the center of the first block and the distance from the center of its block seems to be scaled by `scale`. I am not even sure it's the `positioning` library which causes this behavior. If someone could point out how to fix or migrate this issue, I would by grateful.


title: Using TexMaker on OS X

text: I've started using TexMaker as an alternative to emacs (I work on both ubuntu and mac and I want to have the same programs on both) for typesetting LaTeX. TexMaker is easy to use but there is one thing that I am not managing to do: I use the environment variable TEXINPUTS and BIBINPUTS to tell latex and bibtex of the location of my private .sty files and .bib files, since I use the same ones for many documents. On the Ubuntu machine, I need to start TexMaker from commandline (and not from the mouse-click menu) for it to "see" these environment variables, on the mac I don't know how to do that, so it never sees them. I set the variables from my .bashrc file. Perhaps that is the mistake? should it be in .login or .profile (although my .profile sources .bashrc...)? Maybe I can add these variables directly to TexMaker, but a) I don't know how and b) I'd rather not, if possible. This question might be more appropriate to SO, but TexMaker is such a specific piece of software that I thought to ask here first.


title: Redefining the emdash so as to allow hyphenation

text: OK, so I use the emdash as follows: `someword---anotherword`, but the problem is this prevents hyphenation of both words around the dash. I can fix this by replacing `\---` with `\textemdash`, but I was wondering, is there any way to redefine the `\---` "command" with `\textemdash`? I use LuaTeX. Related to this issue issue I've found this and this, but neither provides an acceptable solution... Thanks in advance!


title: Caption in wrapfigure spills into text

text: The caption in my wrapfigure spills into text. Is this fixable with wrapfigure or do I need to use something else? Screenshot: ![enter image description here](http://i.stack.imgur.com/QJ4ua.png) MWE (sorry for the mess in the preamble, but some of that is probably responsible):               \documentclass[fontsize=12pt, paper=a4, headinclude, twoside=false, parskip=half+, pagesize=auto, numbers=noenddot, plainheadsepline, open=right, toc=listof, toc=bibliography]{scrreprt}     % eigene syntax highlighting     \PassOptionsToPackage{table}{xcolor}     \PassOptionsToPackage{xcdraw}{xcolor}     \usepackage{minted}     \usepackage{xcolor}     \usepackage{wrapfig}     % PDF-Kompression     \pdfminorversion=5     \pdfobjcompresslevel=1     % Allgemeines     \usepackage[automark]{scrpage2} % Kopf- und Fußzeilen     \usepackage{amsmath,marvosym} % Mathesachen     \usepackage[T1]{fontenc} % Ligaturen, richtige Umlaute im PDF     \usepackage[utf8]{inputenc}% UTF8-Kodierung für Umlaute usw     % Schriften     \usepackage{mathpazo} % Palatino für Mathemodus     %\usepackage{mathpazo,tgpagella} % auch sehr schöne Schriften     \usepackage{setspace} % Zeilenabstand     \onehalfspacing % 1,5 Zeilen     % Schriften-Größen     \setkomafont{chapter}{\Huge\rmfamily} % Überschrift der Ebene     \setkomafont{section}{\Large\rmfamily}     \setkomafont{subsection}{\large\rmfamily}     \setkomafont{subsubsection}{\large\rmfamily}     \setkomafont{chapterentry}{\large\rmfamily} % Überschrift der Ebene in Inhaltsverzeichnis     \setkomafont{descriptionlabel}{\bfseries\rmfamily} % für description Umgebungen     \setkomafont{captionlabel}{\small\bfseries}     \setkomafont{caption}{\small}     % Sprache: Deutsch     \usepackage[english]{babel} % Silbentrennung     % PDF     \usepackage[english,pdfauthor={Foo Bar},  pdfauthor={Foo Bar}, pdftitle={Report}, breaklinks=true,baseurl={http://www.bretschneidernet.de/tips/thesislatex.html}]{hyperref}     \usepackage[final]{microtype} % mikrotypographische Optimierungen     \usepackage{url}     \usepackage{pdflscape} % einzelne Seiten drehen können     % Tabellen     \usepackage{multirow} % Tabellen-Zellen über mehrere Zeilen     \usepackage{multicol} % mehre Spalten auf eine Seite     \usepackage{tabularx} % Für Tabellen mit vorgegeben Größen     \usepackage{longtable} % Tabellen über mehrere Seiten     \usepackage{array}     %  Bibliographie     %\usepackage{bibgerm} % Umlaute in BibTeX     \usepackage[style=authoryear,firstinits,url=false,backend=biber]{biblatex}     \usepackage{csquotes}      \bibliography{bibliographie}     \DefineBibliographyStrings{english}{andothers={et\addabbrvspace al\adddot}}      % Tabellen     \usepackage{multirow} % Tabellen-Zellen über mehrere Zeilen     \usepackage{multicol} % mehre Spalten auf eine Seite     \usepackage{tabularx} % Für Tabellen mit vorgegeben Größen     \usepackage{array}     \usepackage{float}     \floatplacement{figure}{H}     % Bilder     \usepackage{graphicx} % Bilder     \usepackage{color} % Farben     \graphicspath{{images/}}     \DeclareGraphicsExtensions{.pdf,.png,.jpg} % bevorzuge pdf-Dateien     \usepackage{subfigure} % mehrere Abbildungen nebeneinander/übereinander     \newcommand{\subfigureautorefname}{\figurename} % um \autoref auch für subfigures benutzen     \usepackage[all]{hypcap} % Beim Klicken auf Links zum Bild und nicht zu Caption gehen     % Bildunterschrift     \setcapindent{0em} % kein Einrücken der Caption von Figures und Tabellen     \setcapwidth[c]{0.9\textwidth}     \setlength{\abovecaptionskip}{0.2cm} % Abstand der zwischen Bild- und Bildunterschrift     % Quellcode     \usepackage{listings} % für Formatierung in Quelltexten     \definecolor{grau}{gray}{0.25}     \lstset{         extendedchars=true,         basicstyle=\tiny\ttfamily,         %basicstyle=\footnotesize\ttfamily,         tabsize=2,         keywordstyle=\textbf,         commentstyle=\color{grau},         stringstyle=\textit,         numbers=left,         numberstyle=\tiny,         % für schönen Zeilenumbruch         breakautoindent  = true,         breakindent      = 2em,         breaklines       = true,         postbreak        = ,         prebreak         = \raisebox{-.8ex}[0ex][0ex]{\Righttorque},     }     % linksbündige Fußboten     \deffootnote{1.5em}{1em}{\makebox[1.5em][l]{\thefootnotemark}}          \typearea{14} % typearea am Schluss berechnen lassen, damit die Einstellungen oben berücksichtigt werden     % für autoref von Gleichungen in itemize-Umgebungen     \makeatletter     \newcommand{\saved@equation}{}     \let\saved@equation\equation     \def\equation{\@hyper@itemfalse\saved@equation}     \makeatother           %tiefere nummerierung     \setcounter{secnumdepth}{4}          % hier beginnt der eigentliche Inhalt     \begin{document}          Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.          \begin{wrapfigure}{L}{0.44\textwidth}        \centering        \includegraphics[width=0.4\textwidth]{images/hdfs}        \caption{\label{hdfs}Loooong caption foo bar foo bar foo bar fooooo.}     \end{wrapfigure}          \ref{hdfs} Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus.          Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus.          Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus.          \end{document}


title: LyX: How to hide text style labels by default

text: I just upgraded to LyX 2.1.0. I use the "Code" text style from the Logical Markup module. In prior versions, whenever I formatted a word as code, it was just displayed as such (see the first line of the screenshot). Now, it also writes the label "code" beneath it (see second line). ![enter image description here](http://i.stack.imgur.com/71y2V.png) This may be helpful for more obscure text styles. But in the case of code formatting, I can see that it's formatted as code just by looking at the text. So the label stating the obvious just distracts me from reading the text and makes for an uneven line spacing. I found that I can hide each label individually by right-clicking the text an un-checking the "Show Label" checkbox. However, what I'm really looking for is some setting in LyX so that whenever I format some snippet of text, the label is hidden by default.


title: Changing margin widths

text: For my thesis I HAVE to have the following margins when the document is printed off: > Top=2.5cm > > Bottom=2.5cm > > Left=3.2cm (this is to fit a spiral bind) > > Right=2.5cm Any help on how to do this would be greatly appreciated :) **UPDATE** : I have used;               \geometry{text={16.2cm,24cm},top=2.5cm,bottom=2.5cm,left=3.2cm,right=2.5cm}      But now the abstract looks ridiculously narrow, can the width of this be made wider?


title: Table lines and alignment problem

text: I'm using `sidewaystable` environment with the following configuration:               \documentclass[a4paper,oneside,12pt,openright,final,oldfontcommands]{memoir}           \usepackage{multirow}     \usepackage{booktabs}     \usepackage{array}     \usepackage{graphicx}     \usepackage{float}     \usepackage{rotating}          \begin{document}          \begin{sidewaystable}[h]         \begin{tabular}{ | m{6cm} | m{14cm} |}         \toprule         \multicolumn{2}{c}{Envelope \#{}1} \\[1cm] \hline         \multirow{7}{*}{\includegraphics[width=5cm]{10-Envelope1}} & \textbf{Thermal Variables} \\[1cm]         & Surface-to-Volume Ratio \hspace{1cm} Fenestration \hspace{1cm} Shading\vspace{0.5cm}\\ \cline{2-2}              & \textbf{Simulation Programme} \\[1cm]              &  \vspace{0.5cm}\\ \cline{2-2}              & \textbf{Generative Algorithm} \\[1cm]              & \vspace{0.5cm}\\ \cline{2-2}              & \textbf{Performative Algorithm} \\[1cm]              \emph{Ensifacopa Planorstripat} &  \vspace{0.5cm}\\         \bottomrule         \end{tabular}     \end{sidewaystable}          \end{document}      when I compile, this is what I get: ![compiled document](http://i.stack.imgur.com/KHtOk.jpg) My questions are:   1. Why are the table boundaries open at the top   2. Why don't the columns align to the centre despite using `{|m{6cm}|m{14cm}|}`   3. I don't know why, but I have to use `\cline` to split the table, it's like I'm not even using `\multirow`.


title: How to shift a large graph to the left

text: Basically, I have a large graph, which take almost half a page. Right now, when I compile the tex file, the graph shifts to the right on the pdf. I have label and caption on this graph. How can I shift it to the left such that it looks like it is being centered? I have checked out some other posts. However, none seems to work for me.               \begin{center}     \centering{\includegraphics[height =375px, width = 450px]{ABC.pdf} }     \captionof{figure}{ABC}     \label{abc}     \end{center}      Or maybe Someone can give me a solution that can allow to begin at position on the left while having the caption centre at the middle.


title: How can I mix an "ybar" and an "ybar stacked" with pgfplots?

text: I tried a while to create that kind of chart with ybar but it's a mix between "ybar stacked" and "ybar". How can I do that? I tried this way but with no great results:               \begin{tikzpicture}          \begin{axis}[ybar stacked, symbolic x coords={Duracem, Technocem, Alipre, Duracem,      Technocem, Duracem, Technocem, Alipre, Duracem, Technocem, Duracem, Technocem, Alipre,      Duracem, Technocem, Duracem, Technocem, Alipre, Duracem, Technocem, Duracem, Technocem,     Alipre, Duracem, Technocem}]          \addplot coordinates {(Duracem,47.2) (Technocem,39) (Alipre,28) (Duracem,16.2)     (Technocem,15) (Duracem,40) (Technocem,16.4) (Alipre,28) (Duracem,33) (Technocem,15)      (Duracem,89) (Technocem,96)(Alipre,49.6) (Duracem,22.9) (Technocem,15.1) (Duracem,105)      (Technocem,83) (Alipre,47) (Duracem,19.5)(Technocem,24.4)};          \end{axis}     \end{tikzpicture}      The chart wanted: ![The chart as it should look like](http://i.stack.imgur.com/T5jky.png)


title: XeLaTeX and stmaryrd

text: I'm using XeLaTeX and Minion Pro together with the `\usepackage[MnSymbol]{mathspec}` but I need the \llbracket and \rrbracket command from `\usepackage{stmaryrd}` package. Unfortunately, as such, I get a "Too many math alphabets" error message. As a solution, I can redefine my own \llbracket and \rrbracket with existing [, ] and | symbols or try to extract the definition of the \rrbracket and \llbracket commands from stmaryrd as follows (taken from stmaryrd.sty):               \DeclareMathDelimiter\llbracket{\mathopen}{stmry}{"4A}{stmry}{"71}     \DeclareMathDelimiter\rrbracket{\mathclose}{stmry}{"4B}{stmry}{"79}      would this work? thank you


title: adding row numbers to a pgfplotstable

text: I've had a look at the attached answer Automatic table row numbers but I'm not sure how to apply it to pgfplotstable. I'd like to get automatic rownumbers on my table so I can apply formatting by row index. (for subtotals and the like). I have over 100 rows so its hard to scan visually and know the row number, and the columns aren't named so something like               \pgfplotstableset{create on use/new/.style={create col/set={\thisrow{columns={0}}}}}      followed by a               \pgfplotstabletypeset[columns={new,0,1,2,3,4,5,6,7}]\blah      doesnt work and gives me an error. Is there an easy way to get automatic row numbers in a pgfplotstable?


title: "Adventure UML" in TeX

text: I'm new in the world of TeX and I would like to know how can I create something like this. I am Windows user; what tools would be a better choice, which libraries can I use, where can I read tutorials to start creating such diagrams. Thank you!


title: Problem with Texmaker and TikZ

text: I have a problem with TikZ and Texmaker. I would like to know why Texmaker doesn‘t work with the command:               \draw [->] ....      inside the environment `tikzpicture`. I don’t know the reason, maybe I need other packages or different code Yes, I use MiKTeX. I mean, If I want to try this example given in Tikz manual:               \begin{tikzpicture}     \draw  [->](0,0) arc (180:30:10pt);     \draw  (1,0) -- (1.5cm,10pt) -- (2cm,0pt) -- (2.5cm,10pt);     \end{tikzpicture}      I get this error message:               !Argument of \lenguage\active\arg> has an extra}.         <inserted text>\par\draw[->].....


title: \pdfoutline, German sharp-s character

text: I use the following code to produce bookmarks in a pdf document:               \pdfdest num 1 fit     \pdfoutline goto num 1 count 0 {äöüÄÖÜß}          äöüÄÖÜß     ... more text ...      The text prints fine. The pdf bookmark shows umlaut characters but not the 'ß' (s-sharp) character. For 'ß' it displays: 'T1ss'. For the bookmark above 'äöüÄÖÜT1ss' gets displayed. The documentation for `\pdfoutline` includes the sentence: 'Note that this is limited to characters in the PDF Document Encoding vector.' Since 'ß' is printed fine in the document, I assume it must be in the 'PDF Document Encoding vector' (and the 6 umlaut characters get printed and are inserted in the Bookmarks perfectly fine). Do I need to review the PDF file structure? Where should I look for the 'PDF Document Encoding vector'? And then, how can I ensure whether or not something gets included there? I'm using both MikTeX 2.3 and MikTeX 2.9 on a Windows7 32 bit OS. Same result. T1 encoding has been used here for 15+ years, but interestingly, it was only last week that a colleague reported this Problem for the first time. General document outline:               \pdfoutput=1     \documentclass[german]{article}     \usepackage[latin1]{inputenc}     \usepackage[T1]{fontenc}           \usepackage{babel}     \usepackage{times}          \begin{document}      \pdfdest num 1 fit%     \pdfoutline goto num 1 count 0 {1 äöüÄÖÜß}          1 äöüÄÖÜß - etc. etc.          \eject          filler          \eject          \pdfdest num 2 fit%     \pdfoutline goto num 2 count 0 {2 äöüÄÖÜ{\ss}}  % same result          2 äöüÄÖÜß - etc. etc.          \eject          filler          \end{document}


title: Bibliography style: name and year in text + alphabetically ordered and numbered list at the end

text: Is it possible to have a citation style by name and year in text and alphabetically ordered and numbered list at the end?


title: Big title on one page

text: I would like to put a big title on a page, alone. Is is possible to do this? I want to do it to indicate all of my annexes, at the end of my document. And I would like it to appear in my table of contents


title: Unable to read in text labels for pgfplots bar chart

text: I've started using pgfplots and can plot scatter plots where all data is numeric, but I'm having no luck at all with bar charts where the xlabel is text. I've tried to find a solution in the manual and here, but nothing seems to work. I'm trying to get a stacked ybar with each bar representing a yearly quarter, with the bar made up of different contributions, but in desperation I would be happy to just get the first column of data plotted. The following is where I have got too, but I get errors like "The requested list entry with index 1 of `\datatable` is too large; this list has not enough elements..". Can anyone show me a way forward please. The commented line was also tried.               \documentclass{article}     \usepackage{pgfplotstable}     \pgfplotsset{compat=1.9}          \begin{document}     \pgfplotstableread[col sep=comma]{     Year,Electricity,Stationary,Transport,Fugitive,Industrial,Agriculture,Waste     September2003,185.9,78.5,76.3,33.8,30.6,89.3,13.3     September2004,195.2,79.4,79.1,34.2,31.2,89.1,13.0     September2005,194.4,81.8,79.5,35.6,31.1,88.5,12.8     September2006,200.0,81.3,81.2,36.8,31.5,88.7,12.7     September2007,202.4,83.2,83.7,39.4,33.4,86.6,13.0     September2008,204.3,85.2,85.1,38.0,33.9,86.0,13.3     September2009,201.0,84.1,84.9,39.0,30.5,83.3,13.3     September2010,198.6,89.1,86.0,39.4,34.6,82.4,13.3     September2011,192.4,90.1,89.1,38.8,34.0,85.3,12.7     September2012,189.0,90.7,90.9,41.4,30.4,88.8,12.7     September2013,178.7,92.2,92.8,44.8,30.5,90.4,12.6     }\datatable;          \begin{tikzpicture}     \begin{axis}[         ybar,         ymin=0,         ytick=data,         symbolic x coords={year 1, year 2},      ]     \addplot table[xticklabels from table]{\datatable}{Year};     %\addplot table[x expr=\thisrowno{0}, y expr=\thisrowno{1}*-1] {\datatable};     \end{axis}     \end{tikzpicture}%     \end{document}


title: Preventing line shrinking with raggedright

text: Sometimes with `\raggedright`, if a line is too long, but only slighly so, it will be shrunk instead of broken up. Here is an example:               \documentclass{article}     \raggedright     \begin{document}     This is a line that is shrunk to fit the page width despite the use of raggedright.      This is a line that is shrunk to fit the page width despite the use of \ldots     \end{document}      Is there a way to prevent this? In particular, I want all text in my document to be ragged right, and I want to make sure that everywhere in the document, text is never shrunk (neither stretched, but this is never an issue with ragged-right text).


title: How to get Environment groups in Eclipse(TeXlipse)?

text: In Eclipse, How can I see Environment groups (like equation, figure and heading groups)? I don't mean document outline. In TeXnicCenter these groups are shown on left side of the main window. ![enter image description here](http://i.stack.imgur.com/kdZ6K.jpg)