title: Tick labels in pgfplots data time format

text: I tried to plot a data set containing seconds and milliseconds with pgfplots. I’ve found a solution for my task here (pgfplots data time format), which I changed a bit. This principally works very well. My code goes here:               \documentclass{article}     \usepackage{pgfplots}     \pgfplotsset{compat=newest}     \usepgfplotslibrary{dateplot}          \def\transformtime#1:#2:#3!{         \pgfkeys{/pgf/fpu=true,/pgf/fpu/output format=fixed}         \pgfmathparse{#1*3600-\pgfkeysvalueof{/pgfplots/timeplot zero}*3600+#2*60+#3}         \pgfkeys{/pgf/fpu=false}     }          \pgfplotsset{         timeplot zero/.initial=0,         timeplot/.style={             y coord trafo/.code={\expandafter\transformtime##1!},             y coord inv trafo/.code={%                 \pgfkeys{/pgf/fpu=true,/pgf/fpu/output format=fixed,}                 \pgfmathsetmacro\hours{floor(##1/3600)+\pgfkeysvalueof{/pgfplots/timeplot zero}}                 \pgfmathsetmacro\minutes{floor((##1-(\hours - \pgfkeysvalueof{/pgfplots/timeplot zero})*3600)/60)}                 \pgfmathsetmacro\seconds{##1-floor((##1)/60)*60}                 \def\pgfmathresult{\pgfmathprintnumber{\hours}:\pgfmathprintnumber{\minutes}:\pgfmathprintnumber[fixed zerofill]{\seconds}}                 \pgfkeys{/pgf/fpu=false}             },         scaled y ticks=false,         yticklabel=\tick         }     }          \begin{document}     \begin{tikzpicture}     \begin{axis}[         timeplot, timeplot zero=0, grid=major, grid style=dashed, ytick={00:12:00, 00:13:00, 00:14:00},     ]     \addplot table {     State           Time       -13 00:12:42.40     -12 00:12:57.06     -11 00:13:17.59     -10 00:13:40.83     -9  00:14:07.44     -8  00:14:31.11     -7  00:14:04.28     -6  00:14:12.07     -5  00:14:09.27     -4  00:13:59.92     -3  00:13:56.82     -2  00:13:55.17     -1  00:13:53.52     0   00:13:52.47     1   00:13:59.32     2   00:14:00.58     3   00:13:43.12     4   00:13:49.05     5   00:13:28.63     };     \end{axis}     \end{tikzpicture}     \end{document}      The problem now is that I get odd tick labels (both 12:60 and 14:0.00 is not I was expecting...): ![enter image description here](http://i.stack.imgur.com/Q23b2.png) I found a similar question (Date plot using pgfplots with odd tick label), but with that solution I unfortunately do not know how to solve my problem. Could anyone here give me a hint?


title: Setting section counter

text: I am writing a lab report and there are four "questions" corresponding to lab instructions 6.1 through to 6.4. How can I set the section counter to start at 6.1 and then continue in 0.1 increments? I would like to avoid using environments like enumerate because I have tikz figures and some of the formatting I have already done elsewhere in the document may be lost. I am using the report class. Here is the MWC:               \documentclass[]{report}     \begin{document}     \title{REPORT}     \author{student ID}     \date{\today}     \maketitle     \section{} \paragraph{6.1}     \section{} \paragraph{6.2}     \section{} \paragraph{6.3}     \section{} \paragraph{6.4}     \end{document}


title: Difficulties with chicago citation - NOT change author's name

text: In this site, it is described how chicago citation should look like; the date of the book, for example, are at the end. Also, as far as I know, when you cite in the text the citation isn't included in the main text but it goes as a footnote at the end of the page. So, if I make a footnote commenting on something that I don't want in the main text and I have a citation in the footnote, how this will be cited? Also, why there is a difference here and how it should properly look like? **EDIT** How could we force bibLaTeX not to change the name and the surname of author cited? For example I want to reference World Bank and in Reference list it writes Bank, World, which is not what I need.


title: Ignoring space between empty/optional command arguments

text: _(This may be a duplicate, but I could not find an answer among the pile of similar questions...)_ Suppose we have the following command:               % <month> <year> <month> <year>     \newcommand{\timeperiod}[4] {%     #1 #2 -- #3 #4%     }      As long as all arguments are provided, everything works fine. _But_ were one to omit e.g. the second month argument (`#3`), an extra space would appear between the dash and the ending year:               June 2000 – July 2001     June 2000 –  2001      How could I suppress that extra space? Or better yet, how could I make LaTeX ignore any spacing between empty command arguments?


title: Using Texmaker with glossaries on Windows

text: Is there a simple way of integrating `glossaries` package with Texmaker on Windows? I was following a very nice tutorial to understand how `glossaries` package works, but got stuck when trying to make it actually generate an index as I don't know where and how to add the `makeglossaries` command in TexMaker to make it run together with pdflatex.


title: MathJax won't render 'bold' faces

text: I recently implemented LaTeX on my website. I'm displaying my equations using MathJax. I have a problem displaying bold faces. This is my latex syntax:               [latex] \text{{\bf 1 calorie} = amount of energy required to raise the temperature of {\bf 1 gram} of water by 1 degree Celsius.} [/latex]      I'm not sure if it is a browser issue or an issue with MathJax itself. EDIT: Here is how MathJax renders: http://bit.ly/1l0v6p5


title: An alternative way to align figure and table in \subfloat

text: So I realise this has been asked/alluded to a couple of times previously as in: Figure and table side-by-side in subfloats Table and Figure side-by-side with Table caption above, Figure caption below Where ultimately it seems some issues may arise due to bad captioning or use of `hyperref`, though exactly why still isn't overly clear to me. Nevertheless, I'm not using `hyperref` and am trying to achieve 4 (or maybe even greater) panel of images, with an inset table. I was following the approach of this link, by defining my table as a command object, but its still not playing ball. I currently have this: ![Document as it currently stands](http://i.stack.imgur.com/paR1p.png) and would like all 4 (technically 5 since the graph legend is an image I've tacked in) to sit in panels 2 below 2 - effectively, the table needs to come up a couple of centimetres. The most promising avenue of approach I think was probably the `\raisebox` as mentioned in one of the answers, but either it won't work or I'm muddling the syntax. It was throwing me some TeX capacity exceeded error. I'll try to give a MWE, but as I'm not really sure where my error is coming from, I don't know entirely what will be relevant and not. Oh I should probably point out that I'm using the Royal Society of Chemistry's template too (no choice!).               \documentclass[8.5pt, oneside, twocolumn]{article}         \oddsidemargin -1.2cm         \evensidemargin -1.2cm         \textwidth 18cm         \headheight 1.0in         \topmargin -3.5cm         \textheight 22cm     \usepackage{pbox}     \usepackage{xcolor,colortbl}     \usepackage{subfig}     \usepackage[demo]{graphicx}     \usepackage[hyphens]{url} % Included for the sake of completeness since hyperref had caused similar problems in the other threads. Doubt this is the source of the issue though.     \usepackage[format=plain,             justification=raggedright,              singlelinecheck=false,              font=small,labelfont=bf,             labelsep=space]{caption} % A 'default' caption to use unless specified otherwise by me          \begin{document}          % Defining my table object for calling to subfloat:          \newcommand{\slopetable}{     \footnotesize       \begin{tabular*}{0.43\textwidth}{llll}     \hline    \\[-1.7ex]     Assay & \pbox{1.2cm}{Linear regression coefficient (3 s. f.)} & \pbox{1.2cm}{Normalised linear regression coefficient (3 s. f.)} & \pbox{1cm}{Activity (\%)}  \\     \\[-2ex]     \hline     \\[-1.5ex]                     WT MeOH PTC          & 0.308    & 1.00  & 100   \\                     WT Tunicamycin       & 0.374    & 1.21  &  121  \\                     F288W Tunicamycin    & 0.382    & 1.24  &  124  \\     \\[-1.5ex]                       F288W E-peptide [37] & 0.402    & 1.30  & 130   \\                     F288W E-peptide [62] & 0.223    & 0.742 & 74.2  \\                     F288W E-peptide [83] & 0.820    & 2.66  & 266   \\     \\[-1.5ex]                     F288W RWGLW [166]    & 0.409    & 1.32  &  132  \\                     F288W RWGLW [416]    & 0.304    & 0.985 &  98.5 \\                     F288W RWGLW [624]    & 0.276    & 0.896 &  89.6 \\     \\[-1.5ex]                     F288W GW-Oct [83]   & 0.209  &  0.677   & 67.7  \\                     F288W GW-Oct [166]  & 0.0194 &  0.0630  & 6.30  \\                     F288W GW-Oct [416]  & 0.0510 & 0.165    & 16.5  \\     \\[-0.5ex]     \hline     \end{tabular*}     }          % Begin constructing multi-panel figure:               \begin{figure*}[t]         \subfloat[{Dummy caption 1.}\label{rawdata}]{                 \includegraphics[width=0.40\textwidth,clip=true,trim=0 0 20 25]{Raw_data_plot_8x11}}          \subfloat[{Dummy caption 2.}\label{smoothdata}]{              \includegraphics[width=0.40\textwidth,clip=true,trim=0 0 20 25]{Smoothed_data_plot_8x11}}     \captionsetup[subfigure]{labelformat=empty} % Butchering duplicate graph to obtain an un-captioned image at the far right     \subfloat[]{%     \includegraphics[width=0.19\textwidth,clip=true, trim= 655 155 0 150 ]{Plot_for_legend}}          % Beginning of panel causing issues     \subfloat[][]{\slopetable}     \subfloat[{}\label{LinearRegression}]{%     \includegraphics[width=0.5\textwidth,clip=true, left, trim= 0 0 0 0]{Linear_regression_plot}}          \captionsetup{singlelinecheck=off, justification=justified}     \caption{     Temp placeholder caption}          \end{figure*}          \end{document}      I hope that's enough to go on for now at least - any help would be great. I'd ideally like to avoid `bodging` it with minipages and so on if possible though. **EDIT - Somewhat tweaked MWE that replicates the problem, left the original one there incase a solution is found that directly relates to that code.**               \documentclass[8.5pt, oneside, twocolumn]{article}     \oddsidemargin -1.2cm     \evensidemargin -1.2cm     \textwidth 18cm     \headheight 1.0in     \topmargin -3.5cm     \textheight 22cm     \usepackage{pbox}     \usepackage{calc}     \usepackage{xcolor,colortbl}     \usepackage{subfig}     \usepackage[demo]{graphicx}     \usepackage[hyphens]{url} % Included for the sake of completeness since hyperref had caused similar problems in the other threads. Doubt this is the source of the issue though.     \usepackage[format=plain,         justification=raggedright,          singlelinecheck=false,          font=small,labelfont=bf,         labelsep=space]{caption} % A 'default' caption to use unless specified otherwise by me          \begin{document}          % Defining my table object for calling to subfloat:          \newcommand{\slopetable}{     \footnotesize     \begin{tabular*}[b]{0.43\textwidth}{llll}     \hline    \\[-1.7ex]     Assay & \pbox{1.2cm}{Linear regression coefficient (3 s. f.)} & \pbox{1.2cm}{Normalised linear regression coefficient (3 s. f.)} & \pbox{1cm}{Activity (\%)}  \\     \\[-2ex]     \hline     \\[-1.5ex]                 WT MeOH PTC          & 0.308    & 1.00  & 100   \\                 WT Tunicamycin       & 0.374    & 1.21  &  121  \\                 F288W Tunicamycin    & 0.382    & 1.24  &  124  \\     \\[-1.5ex]                   F288W E-peptide [37] & 0.402    & 1.30  & 130   \\                 F288W E-peptide [62] & 0.223    & 0.742 & 74.2  \\                 F288W E-peptide [83] & 0.820    & 2.66  & 266   \\     \\[-1.5ex]                 F288W RWGLW [166]    & 0.409    & 1.32  &  132  \\                 F288W RWGLW [416]    & 0.304    & 0.985 &  98.5 \\                 F288W RWGLW [624]    & 0.276    & 0.896 &  89.6 \\     \\[-1.5ex]                 F288W GW-Oct [83]   & 0.209  &  0.677   & 67.7  \\                 F288W GW-Oct [166]  & 0.0194 &  0.0630  & 6.30  \\                 F288W GW-Oct [416]  & 0.0510 & 0.165    & 16.5  \\     \\[-0.5ex]     \hline     \end{tabular*}     }          % Begin constructing multi-panel figure:               \begin{figure*}[t]     \subfloat[{Dummy caption 1.}\label{rawdata}]{             \includegraphics[width=0.40\textwidth,clip=true,trim=0 0 20 25]{Raw_data_plot_8x11}}      \subfloat[{Dummy caption 2.}\label{smoothdata}]{          \includegraphics[width=0.40\textwidth,clip=true,trim=0 0 20 25]{Smoothed_data_plot_8x11}}     \captionsetup[subfigure]{labelformat=empty}      \subfloat[]{%     \includegraphics[width=0.1\textwidth,clip=true, trim= 655 155 0 150 ]{Plot_for_legend}}          % Beginning of panel causing issues     \subfloat[][]{\slopetable}     \subfloat[{}\label{LinearRegression}]{%     \includegraphics[height=5cm, draft]{Linear_regression_plot}}               \end{figure*}          \end{document}      Which produces: ![Dodgy table alignment by MWE2](http://i.stack.imgur.com/4l4Ac.png)


title: centered text/equations inside align environment

text: is there a way to insert a centered line of text or mathematics inside an align-environment? For example, in the code below, I'd like to have the `\vdots` between the equations above and below horizontally centered, completely ignoring the alignment markers:               \documentclass{article}     \begin{document}     \begin{align}       f(1) &= 1 \\       f(2) &= 2 \\       \vdots & \\       f(n) &= n f(n-1)     \end{align}     \end{document}


title: Nested use of \xspace to not leave extra space

text: I have a feeling this is another of my questions that is going to be a "Duh!!" kind of answer, but I can't seem to figure out how to do this properly: I want to put a wrapper around a macro that uses `\xspace`, but behaves differently upon the first use of the macro. The following does not quite produce the correct result upon first use, and leaves an extra space: ![enter image description here](http://i.stack.imgur.com/HoTuK.png) I'd prefer to have all the formatting controlled by one macro: `\NameStyle`, but am open to options. ## Code:               \documentclass{article}     \usepackage{etoolbox}     \usepackage{xcolor}     \usepackage{xspace}          \newtoggle{FirstUseOfNameStyle}%     \toggletrue{FirstUseOfNameStyle}%          \newcommand*{\NameStyle}[1]{\textit{#1}\xspace}%     \newcommand*{\NameStyleForFirstUse}[1]{\textcolor{red}{\NameStyle{#1}}}%          \newcommand*{\Name}[1]{%         \iftoggle{FirstUseOfNameStyle}{%             \NameStyleForFirstUse{#1}%             \global\togglefalse{FirstUseOfNameStyle}         }{%             \NameStyle{#1}%         }%     }%          \begin{document}     The first name is \Name{Peter}.          The name \Name{Peter},  also known as some other name.          The name \Name{Peter} Grill is well known in TeX circles.     \end{document}


title: Numbering figures

text: How do I get figure numbers to run in the same sequence as equation numbers, eg (1.2.3) equation .... figure 1.2.4? For the environments I define I use \newtheorem{thm}[equation]{THM}, but I don't know how to do the same trick with pre-defined environment like figure.


title: Relation symbol used by Conway in On Numbers and Games

text: I'm trying to find a nice way to typeset a relation used in combinatorial game theory. It's supposed to be a combination of `<` and `||` symbols (with the first vertical line connected to the `<`), though preferably with similar heights. ![On numbers and games](http://i.stack.imgur.com/TSobl.png) (Google Book search) I've had some luck with joining the existing symbols `\lhd` and `\shortmid`, but I can never get the spacing correct; while in some cases it looks perfect, in others there is too much or too little spacing between. Also, in normal text, where the symbol is mentioned, spaces - essential in math mode since this is a relation, but messy in text - will always appear; how can I get around this?


title: Temporarily increase the limit on space size?

text: I often see those warnings about "overfull \hbox" when I'm preparing my document. Because the document is still in the early stage, I see no point in correcting them on-the-spot - since the document will change anyway. But I also want to get rid of that ugly overflow (by increasing the possible width of space between words), so I can show that draft to somebody. Is there a way to do it?


title: minted : changing fontfamily to support UTF8 chars

text: I'd like to print out the output of a "/usr/bin/tree" command. For instance :               /etc/puppet/hieradata/     ├── common.yaml     └── virtual         ├── false.yaml         └── true.yaml      My idea was to put this in a minted environment. But the fontfamily would not contain the UTF8 caracters like :               Missing character: There is no ├ in font [lmroman10-regular]:mapping=tex-text!      I tried some other fontfamilies (like dejavusansmono), but no luck with this. Is there a fontfamily wich provides these characters ?


title: Inconsistent margins using fancyhdr and geometry

text: For my homework assignments I usually use the `fancyhdr` package to create a header that contains the group (A, B, C etc), homework title, my name + student number and the date. Besides that I practically always use the `geometry` package to adjust the page margins. The problem that appears is that the margins seem to change per page, or more specific: the margins of the first page differ from the others. As an illustration of the problem, consider the following MWE.               \documentclass[a4paper]{article}     \usepackage{fancyhdr,lipsum} % lipsum for filler text     \usepackage[margin=4.4cm]{geometry}     \begin{document}     \lhead{Group, homework corrector\\$\,$\\}     \rhead{Homework title\\Name (student number)\\\today}     \pagestyle{fancy}     \lipsum[1-5]    % filler text     \newpage     \lipsum[6-10]   % filler text     \newpage     \lipsum[11-15]  % filler text     \end{document}      Here `[a4paper]` seems necessary to not let `geometry` change the dimensions of the paper, `lipsum` is used for filling, and there are 3 pages written to show that the second and third have the same margins, which differ from those of the first page. The problem should not come from a conflict between `fancyhdr` and `geometry`, as it does also arise when the latter is commented out. Now there are two things I try to achieve, with the corresponding questions:   1. How do I ensure consistent margins troughout the document, as described above?   2. How do I get the text on the second and following pages to start at the height the header starts at on the first page when using `\thispagestyle{fancy}` instead of `\pagestyle{fancy}`? I have tried to solve the second point by redefining the length of `\headheight`, but it seems sloppy to me, as there's no way to be sure the header adds exactly that height on the first page. Here's what I have tried to solve this second problem:               \documentclass[a4paper]{article}     \usepackage{fancyhdr,lipsum} % lipsum for filler text     \usepackage[margin=4.4cm]{geometry}     \begin{document}     \lhead{Group, homework corrector\\$\,$\\}     \rhead{Homework title\\Name (student number)\\\today}     \thispagestyle{fancy}     \lipsum[1-5]    % filler text     \newpage     \setlength{\headheight}{-3\baselineskip}     \lipsum[6-10]   % filler text     \newpage     \lipsum[11-15]  % filler text     \end{document}


title: Generating table of content (TOC) only from file.toc

text: I use `scrbook.cls` How to generate TOC from .toc file information available with me. using Pretty Table of Contents solution with `memoir` documentclass _I want to generate TOC separately and i want to attach to main pdf file. (As i am not using memoir.cls)_


title: Set minimum math font size

text: Example:               \begin{equation}         \begin{array}{ll}             \textrm{stejne rozptyly:} & U = \frac{ \bar{x}_1 - \bar{x}_2 }{ s \sqrt{ \frac{1}{n_1} + \frac{1}{n_2} } } \\             \textrm{ruzne rozptyly:}  & U = \frac{ \bar{x}_1 - \bar{x}_2 }{ \sqrt{ \frac{s_1^2}{n_1} + \frac{s_2^2}{n_2} } }         \end{array}     \end{equation}      ![enter image description here](http://i.stack.imgur.com/Wh6Iq.png) As you can see, the font is WAY TOO small. How do I make LaTeX not print the letters smaller than say 10pt (and increase the equation row instead)? Compiling with XeLaTeX... EDIT: Just to be clear, I don't want a per-letter solution. I seek some global solution.


title: Is it possible to construct more than one stroke with different colors inside a single \pscustom?

text: Is it possible to get the following output where the upper graph is red and the lower one is blue ![enter image description here](http://i.stack.imgur.com/Sl3pI.png)               \documentclass[pstricks,border=17pt]{standalone}     \usepackage{pst-plot}     \psset{algebraic,linewidth=1pt}          \begin{document}          \begin{psgraph}{->}(0,0)(5,2.5){6cm}{5cm}     \pscustom[linestyle=none,fillstyle=solid,fillcolor=orange]     {       \psplot{1}{4}{sqrt(x)}         \psplot{4}{1}{sqrt(x/2)}     }     \psplot[linecolor=red]{1}{4}{sqrt(x)}     \psplot[linecolor=blue]{4}{1}{sqrt(x/2)}     \end{psgraph}     \end{document}      only by using a single `\pscustom` inside `\psgraph` (no `\psplot` outside `\pscustom` for sure!)? My attempt is as follows but it fails because both graphs are blue. ![enter image description here](http://i.stack.imgur.com/xnkyW.png)               \documentclass[pstricks,border=17pt]{standalone}     \usepackage{pst-plot}     \psset{algebraic,linewidth=1pt}          \begin{document}          \begin{psgraph}{->}(0,0)(5,2.5){6cm}{5cm}     \pscustom[linestyle=none]     {       \psplot{1}{4}{sqrt(x)}         \stroke[linestyle=solid,linecolor=red]         \gsave       \psplot{4}{1}{sqrt(x/2)}         \fill[fillstyle=solid,fillcolor=orange]         \grestore         \psplot[liftpen=2]{4}{1}{sqrt(x/2)}         \stroke[linestyle=solid,linecolor=blue]     }     \end{psgraph}          \end{document}      Is it possible to construct more than one stroke with different colors inside a single `\pscustom`?


title: Store \pgfmathresult in a variable

text: The result of `\pgfmathparse` is automatically stored in `\pgfmathresult`. Is it possible to store it in an other variable, too?


title: footmisc effects with endnotes

text: I want my endnotes to simulate the effect of               \usepackage[para,norule,hang]{footmisc}      With these settings, footnotes occur within a single paragraph. Each endnote, by contrast, begins on a new line. I've added some code (from Alan Munn, re hspace except at the beginning of a line) to kill the indent, but can't figure out how to replace with the carriage carry with the same horizontal spacing as `footmisc` places between the footnotes. An example:               \documentclass{article}     \usepackage{endnotes}     \usepackage[para,norule,hang]{footmisc}          \usepackage{etoolbox}          \makeatletter     \patchcmd{\@makefntext}{.5em}{0em}{}{}     \makeatother          %KILL ENDNOTE INDENT         %\def\enoteformat{\rightskip=0pt \leftskip=0pt \parindent=0em \leavevmode\llap{\makeenmark}}     \patchcmd{\enoteformat}{1.8em}{0pt}{}{}          \begin{document}          Gallia\footnote{in} est\footnote{one} omnis\footnote{paragraph}     divisa\endnote{in} in\endnote{a} partes\endnote{vertical} tres\endnote{list}          \newpage          \theendnotes          \end{document}


title: Cross references broken in Lyx master document

text: I've got a child document which contains cross references. When I export the child document to PDF, the cross references are fine. However, when I export the master document to PDF the cross references are broken and appear like: (see ??sub:WMS-Module on page 42). When I click the reference it goes to the correct place, and 42 is the correct page number, but it doesn't display the reference! Any ideas why this might be happening?


title: plot wide range of data with PSTricks

text: I want to use PSTricks in order to plot data in a file. In general I know how to do it but the problem now is that these data run from x=-2000...2000 and y=1.e-10...1e-3 so I get the "too large" error. When I try to change the data or the axis, I have a new problem: I can't get the right ticks. Does any body have a solution to this problem?


title: How to cite SEVERAL articles of Wikipedia (if all labels are wiki:xxx)?

text: Citing one article is as follows:               @misc{ wiki:xxx,       author = {{Estimation lemma}},       title = "Estimation lemma --- {W}ikipedia{,} The Free Encyclopedia",       year = "2010",       url = "http://en.wikipedia.org/w/index.php?title=Estimation_lemma&oldid=375747928",       note = "[Online; accessed 29-September-2012]"     }      But, how to cite a SECOND article? `@misc{ wiki:yyy,` ? Or maybe `@misc{ wiki:xxx,` actually means `@misc{ wiki:001,` ?


title: Environment for different kinds of lists

text: I would like to have one environment so as to display numbered list or bullet/plus list. Here is a pseudo code.               \begin{myList}[1)]         \item Text...              \item Text...         \begin{myList}[bullet]             \item Text...             \item Text...         \end{myList}              \item Text...         \begin{myList}[plus]             \item Text...             \item Text...         \end{myList}     \end{myList}      Here is what should be the output (* symbolizes one bullet).               1) Text...     2) Text...         * Text...         * Text...     3) Text...         + Text...         + Text...      How can I acheive this ? Is there a robust solution ?


title: PDF software with "multiple document (in one window) interface"

text: When I study, I often need to have many books open at the same time, so I can search simultaneously. Having 20 diferent Adobe Acrobat windows open, however, is highly impractical, and things often crash. When viewing DJVUs with for example WinDJView, I can have all the files open in a single window. This is, from what I understand, not possible for PDFs with Adobe Acrobat. What would be a similar kind of **software for viewing PDFs** , but **that it involvesMDI** (multiple document interface)? P.S. if anyone besides me wishes for MDI option in Adobe Acrobat, report here.


title: Globally set Paragraph top and bottom margins

text: I have the below code :               \documentclass[12pt]{book}     \usepackage{lipsum}          \begin{document}          \lipsum[1]     \lipsum[1]          \end{document}      I would like to be able to define the margins of new paragraphs. I am a web guy so I will give an example with CSS for what I am trying to do :               p{margin-top: 10px;margin-bottom: 5px;}       how can I apply that?


title: How to change list settings globally?

text: I'm new to latex, so this might just be a stupid error on my end, but I've downloaded the `enumitem` package and am trying to globally change the style of `{enumerate}` so that I don't have to type `\begin{enumerate}[label=(\roman*),itemsep=3pt,topsep=3pt]` every time I want to make a list. I've tried doing               \documentclass{article}     \usepackage{enumitem}     \listfiles     \setlist[enumerate]{label=(\roman*),itemsep=3pt,topsep=3pt}     \begin{document}     \begin{enumerate}     \item one     \item two     \end{enumerate}     \end{document}      but this doesn't change anything. Is there something I'm doing wrong? EDIT: version: `This is pdfTeX, Version 3.1415926-1.40.11 (TeX Live 2010)` EDIT: the information from `\listfiles` is as follows:               *File List*     article.cls    2007/10/19 v1.4h Standard LaTeX document class     size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)     enumitem.sty    2009/05/18 v2.2 Customized lists     keyval.sty    1999/03/16 v1.13 key=value parser (DPC)     ***********      EDIT: sorry for all these edits. I keep compiling my MWE and getting no change from the classic `enumerate` style, but if I try to change the enumerate style each time I use `\begin{enumerate}`, it changes the way I want it to. I honestly have no idea what I'm doing wrong. I'm using TeXShop version 2.47.


title: Adjust typeblocksize in light of paper size

text: I'm trying to figure out how to adjust the typeblocksize in memoir in light of the ratio of `\paperheight` to `\paperwidth`. Right now, I have               \settypeblocksize{*}{\lxvchars}{1.414}      to adjust the `\textheight` to 1.414 time the value of `\lxvchars` (itself calculated based on font and pointsize). This works fine for metric paper whose height is sqrt( 2 ) times the width. I'd like to replace this with a variable expression based on the paper size selected in the documentclass. I.e. something like               \settypeblocksize{*}{\lxvchars}{\paperheight / \paperwidth}      but I can't figure out how to replace the scalar 1.414 with an expression (either inline or else computed elsewhere. Can anyone help?


title: How to draw zig zag arrows at some particular locations in tikz diagram?

text: I want to draw a diagram like this: ![enter image description here](http://i.stack.imgur.com/zloYV.png) My tikz code is as follows:               \documentclass{article}     \usepackage{tikz}     \usepackage[margin=15mm]{geometry}     \usepackage{calc}     \usetikzlibrary{matrix,arrows}     \usetikzlibrary{positioning,arrows}     \usetikzlibrary{shapes,arrows,fit,calc,positioning,automata}          \begin{document}     \tikzstyle{int}=[draw, minimum width=3 cm, minimum height=1 cm]     \tikzstyle{init} = [pin edge={to-,thin,black}]               \begin{tikzpicture}[node distance=5cm,auto,>=latex', scale = 1, transform shape]         \tikzstyle{line} = [draw, -latex']         \node [int] (a) { Box1 };         \node [int] (b) [below of=a, node distance=4 cm] {Box2};          \end{tikzpicture}          \end{document}      which outputs as follows: ![enter image description here](http://i.stack.imgur.com/7Iamt.png) I don't understand how to draw such arrows at correct locations in tikz. I know only how to draw at center. How can I do this?


title: \ifpdf returns true when using LuaLaTeX

text: The `ifpdf` package is supposed to detect if pdfTeX is running: > This package looks for pdfTeX in pdf mode and implements and sets the switch > `\ifpdf`. (from the `ifpdf` documentation) However, when I compile the following MWE with LuaLaTeX, my document reads > This is pdfTeX.               \documentclass{article}          \usepackage{ifpdf}          \begin{document}     \ifpdf         This is pdfTeX.     \else         This is not pdfTeX.     \fi     \end{document}      Is this expected and intended behavior? How do I set up a conditional that _only_ detects pdfTeX? (The MWE works as expected for XeTeX.)


title: How can I use natbib package with ieeeconf style

text: I want to use `ieeeconf` as document class and include `natbib` package.               \documentclass[a4paper, 10pt, conference]{ieeeconf}      \usepackage{natbib}     % something here          \bibliography{reference}      I have provided my references in `reference.bib` file. but I get error while compiling with pdflatex and TexWorks. When I exclude the line:               \usepackage{natbib}      I can compile it but what I see in pdf format is: > [Alouani and Rice(1994)] instead of > [[1]] In the text where I used `\cite{c1}` and: > [Aluni and Rice(1994)] A. T. Alouani and T. R. Rice. On asynchronous data > fusion. pages143-146, 1994* in the reference section. But what I want is to sort them in numbers format. Here is one of my `.bib` file's item:               @article{c1,     author = {A. T. Alouani and T. R. Rice},     title = {On asynchronous data fusion},     booktitle = {Southeastern Symposium on System Theory},     year = {1994},     pages = {143--146},     masid = {50009577}     }      Please help me cope with this.


title: crossing out whole slide does not work

text: I am trying to get the same result as in: crossing out whole slide with LaTeX beamer Crossing out the whole slide. I am just copying the simple example there:                \documentclass{beamer}      \usepackage{tikz}           \begin{document}           \begingroup      \setbeamertemplate{background canvas}{%      \begin{tikzpicture}[remember picture,overlay]      \draw[line width=20pt,red!60!black]       (current page.north west) -- (current page.south east);      \draw[line width=20pt,red!60!black]       (current page.south west) -- (current page.north east);      \end{tikzpicture}}           \begin{frame}      This is wrong.      \end{frame}      \endgroup           \end{document}      But this code produces nothing at all. I just see the sentence without any crossing. Anyone has any idea of what could be the problem? Thank you!


title: A vertical alignment problem in tabu environment with X[m]

text: I learned `tabu` for a while and I can not solve a problem about vertical alignment with `X[m]`. Here is the minimal working example below.               \documentclass{article}     \usepackage[linegoal]{tabu}\tracingtabu=2          \begin{document}            \begin{tabu} to\linewidth{|X[-2.5,c,m]|X[c]|X[c]|} \tabucline-         This is a counterexample. This is a counterexample. This is a counterexample.         This is a counterexample. This is a counterexample. This is a counterexample.         & \texttt X & xyz \\ \tabucline-       \end{tabu}          \end{document}      I want to put the contents of the second and third column in vertical center, but if I set m in the second and third column at the preamble of tabu, i.e.,               \begin{tabu} to\linewidth{|X[-2.5,c]|X[c,m]|X[c,m]|}      the result is strange because the contents in the second and third column is not vertical center. But if I set m in the first column, i.e.,               \begin{tabu} to\linewidth{|X[-2.5,c,m]|X[c]|X[c]|}      then the result that I want comes. I want to know why and how to solve it.


title: Why does a linebreak in minipage flow this to the next page?

text: I am using `zwpagelayout` (see this question) but if I put a `minipage` with a line or paragraph break, I get weird two-page output.               \documentclass{article}     \usepackage[papersize={,10.5in},spine=1in,cropmarks,textwidth=7in,topmargin=.5in,leftmargin=0in,nopagenumbers,color]{zwpagelayout}     \begin{document}     \pagestyle{empty}     \hbox to \textwidth{%       \vbox to \textheight{\hsize \UserWidth \centering     \begin{minipage}{5in}     This\\     Overflows     \end{minipage}          }\hss     \vbox to \textheight{\hsize \CropSpine \centering             }\hss     \vbox to \textheight{\hsize \UserWidth \centering     }\hss}     \end{document}      How do I use linebreaks in a `minipage` in this case?


title: How to separate columns with a line in beamer(poster)?

text: `\setlength{\columnseprule}{0.4pt}` with the multicol package does not work. The beamer guide does not discuss this case for their columns environment... To be clear this is what I want ###### | ###### | ######   ###### | ###### | ######   ###### | ###### | ######   ###### | ###### | ######   ###### | ###### | ######   ###### | ###### | ######


title: Which IDE/Editor and "compiler" do you use for TeX/LaTeX? - How do macros work?

text: I've been using LaTeX for a few weeks now, with TeXworks, and have found it quite frustrating. I'm running MiKTeX 2.8 on Windows 7 x64 with TeXworks 0.3. Reasons why I find TeX frustrating:   * Very difficult to install packages, and get them running in my code (sometimes impossible, i.e. with `xy-pic`)   * When I write code, it takes a while (dollar signs everywhere)   * I also end up using `\\[2mm]` all over the place Quick related question, how do I create macros? — Basically I want to replace `$\rightarrow$` with `\im` (implies) etc. It would also be helpful if I could define keyboard shortcuts for this type of thing (`Alt`+`A` = `$\forall%`, `Alt`+`E` = `$\exists$`, `Alt`+`.` = `$\rightarrow$`, `Alt`+`,` = `$\leftrightarrow$` etc.). **So which TeX, LaTeX or other package would you recommend I use for typesetting, with which IDE/text-editor?** Purpose: For typing up Discrete Mathematics Lectures (Graph Theory, Logic Theory etc.)


title: Acrostic Environment

text: I tried to wrote the code of an environment for acrostics, using cenverse and boldfirst, but it doesn't work (probably because _cenverse_ use `//` and _boldfirst_ not).               \newcommand\dob[1]{\textbf{#1}}     \newenvironment{boldfirst}{\obeylines\everypar{\dob}}{}          \newenvironment{acrostic}[1]     {         \begin{midpage}                  \def\cenverse#1\\{\settowidth{\versewidth}{#1}\begin{verse}[\versewidth]#1\\}                      \begin{boldfirst}                 }{                 \end{boldfirst}                  \end{verse}              \end{midpage}              \newpage     }      The final result must be one acrostic in the centre of every page, with the first letter of every line in bold. Each first letter must be aligned with the upper and the lower letters. Example of the use:               \documentclass[a4paper,oneside]{book}          \usepackage[utf8]{inputenc}     \usepackage[english]{babel}     \usepackage[T1]{fontenc}          \usepackage{verse}     \usepackage{midpage}     \usepackage{microtype}          \newcommand\dob[1]{\textbf{#1}}     \newenvironment{boldfirst}{\obeylines\everypar{\dob}}{}               \newenvironment{acrostic}[1]     {         \begin{midpage}                  \def\cenverse#1\\{\settowidth{\versewidth}{#1}\begin{verse}[\versewidth]#1\\}                      \begin{boldfirst}                 }{                 \end{boldfirst}                  \end{verse}              \end{midpage}              \newpage     }          \begin{document}          \begin{acrostic}     Elizabeth it is in vain you say     Love not—thou sayest it in so sweet a way:     In vain those words from thee or L.E.L.     Zantippe's talents had enforced so well:     Ah! if that language from thy heart arise,     Breath it less gently forth—and veil thine eyes.     Endymion, recollect, when Luna tried     To cure his love—was cured of all beside—     His follie—pride—and passion—for he died.     \end{acrostic}          \end{document}


title: Incorrect reference to the equation number in algorithm2e

text: I want equation number in an algorithm with chapter number included. Here is my code.               \documentclass{book}     \usepackage{amsmath,amssymb,amsthm, latexsym,float,epsfig,subfig}     \usepackage[mathscr]{euscript}     \usepackage{mathrsfs, breqn}     \usepackage[ruled,vlined,linesnumbered,algochapter]{algorithm2e}     \usepackage{multirow}      \newtheorem{exmp}{Example}     \newtheorem{theorem}{Theorem}     \newtheorem{lemma}{Lemma}     \newtheorem{proposition}{Proposition}     \newtheorem{corollary}{Corollary}          \numberwithin{figure}{chapter}     \numberwithin{theorem}{chapter}     \numberwithin{exmp}{chapter}     \numberwithin{lemma}{chapter}     \numberwithin{proposition}{chapter}     \numberwithin{corollary}{chapter}     \numberwithin{equation}{chapter}     \begin{document}         \chapter{First}         \label{chap_ch1}              \begin{algorithm}[!h]             \DontPrintSemicolon             \SetAlgoLined                      \If{p} {                     \begin{equation}    \label{eq:sclrec1}                         a = b                     \end{equation}                 }                 \Else {                     \If{t} {                         \begin{equation} \label{eq:sclrec2}                         x = y                         \end{equation}                     }                      }              \caption{\label{alg:algo} algorithm}         \end{algorithm}         Equation~\ref{eq:sclrec1} and Equation~\ref{eq:sclrec2}          \end{document}      The result is as follows : ![Result of the code](http://i.stack.imgur.com/0RDOB.jpg) I don't understand why my references are incorrect. Can anyone please explain ? writeLatex Code


title: How to execute \LTXexample repeatitively with a looping macro such that its counter value gets rendered in both input/output parts?

text: The following code is the simplified version of my real scenario. It might look trivial. _I forgot to say that the following code is the Minimal Not Working Example (MNWE):_               \documentclass{article}     \usepackage{showexpl}     \usepackage{graphicx}               \begin{document}     \newcount\counter     \counter=-1     \loop         \advance \counter by 1         \ifnum\counter<5         \LTXexample             \scalebox{\counter}{\counter}         \endLTXexample         \newpage     \repeat     \end{document}      When `\counter=1`, for example, I want the input part (source part) to get rendered as               \scalebox{1}{1}      rather than               \scalebox{\counter}{\counter}      . Error messages when it is compiled with pdflatex, latex, xelatex:               (c:/texlive/2010/texmf-dist/tex/latex/listings/lstmisc.sty)          Package Listings Warning: Text dropped after begin of listing on input line 21.               (c:/texlive/2010/texmf-dist/tex/latex/base/omscmr.fd))     *     ! Emergency stop.     <*> counterlistings          !  ==> Fatal error occurred, no output PDF file produced!     Transcript written on counterlistings.log.      How to execute `\LTXexample` repeatitively with a looping macro such that its counter value gets rendered in both input/output parts?


title: "Manual" customizable reference text

text: For a document I am writing, I am considering a table indexed by references to positions in the text with a description of each item. I know already that I can create a phantom section, and make a reference to it (here), but then all references appear with the same identifier "section x.x". Is there any way to customize the reference's text so that I can differentiate the indexes in my table without having to create an independent subsection for each?


title: Questions about \fbox

text: I would like to put a text and a math formula inside a `\fbox`, but I got an error:`ERROR: LaTeX Error: Something's wrong--perhaps a missing \item.` Also the`\\` did not work, so the text and the formula are still in one line.               \begin{figure}[htbp]     \centering     \fbox{%       text\\       $\begin{cases}         abcdefghijklmn\\         cdefg        \end{cases}$     \caption{a_caption}     \label{a_label}     \end{figure}      Another question is that it seems that the width of the frame is up to the width of what I put inside `fbox`, what to do if I want the width to be the width of the page? Could anyone help? Thank you very much!


title: How can I automatically include all source code files located in a given directory?

text: Is there a way to include all files in a directory and all sub directories in a report as a code appendix using the `listings` package? I know I can include each individual file using the `listings` package and `\lstinputlisting`, but I'm just wondering whether there is a quicker way to insert them in a code appendix...


title: Latex errors: undefined control sequence, outer par mode, underfull & overfull hbox

text: I am attempting to put a Stata regression table in Latex, but my code yields the following errors:               Undefined control sequence \estwide{PEAssignment2tabl1.tex}{6}{c}     Not in outer par mode. \begin{table}[htbp]     Undefined control sequence \estwide{PEAssignment2tabl1.tex}{6}{c}     Undefined control sequence \estwide{PEAssignment2tabl1.tex}{6}{c}     Underfull \hbox (badness 10000) in paragraph     Underfull \hbox (badness 10000) in paragraph     Overfull \hbox (240.51797pt too wide) in paragraph      Code begins:               \documentclass[10pt]{article}     \usepackage[left=0.5in, right=0.5in, top=0.5in, bottom=0.5in]{geometry}          \newcommand{\sym}[1]{\rlap{#1}}% Thanks to David Carlisle          \let\estinput=\input% define a new input command so that we can still flatten the document          \newcommand{\estwide}[3]{         \vspace{.75ex}{             \begin{tabular*}             {\textwidth}{@{\hskip\tabcolsep\extracolsep\fill}l*{#2}{#3}}             \toprule             \estinput{#1}             \bottomrule             \addlinespace[.75ex]             \end{tabular*}             }         }             \newcommand{\estauto}[3]{         \vspace{.75ex}{             \begin{tabular}{l*{#2}{#3}}             \toprule             \estinput{#1}             \bottomrule             \addlinespace[.75ex]             \end{tabular}             }         }          % Allow line breaks with \\ in specialcells         \newcommand{\specialcell}[2][c]{%     \begin{tabular}[#1]{@{}c@{}}#2\end{tabular}}          % *****************************************************************     % Custom subcaptions     % *****************************************************************     % Note/Source/Text after Tables     \newcommand{\figtext}[1]{     \vspace{-1.9ex}     \captionsetup{justification=justified,font=footnotesize}     \caption*{\hspace{6pt}\hangindent=1.5em #1}     }     \newcommand{\fignote}[1]{\figtext{\emph{Note:~}~#1}}          \newcommand{\figsource}[1]{\figtext{\emph{Source:~}~#1}}          % Add significance note with \starnote     \newcommand{\starnote}{\figtext{* p < 0.1, ** p < 0.05, *** p < 0.01. Standard errors in parentheses.}}          % *****************************************************************     % siunitx     % *****************************************************************     \usepackage{siunitx} % centering in tables     \sisetup{         detect-mode,         tight-spacing       = true,         group-digits        = false ,         input-signs     = ,         input-symbols       = ( ) [ ] - + *,         input-open-uncertainty  = ,         input-close-uncertainty = ,         table-align-text-post   = false         }          \begin{document}     \title{Assignment 2 \\ \vspace{0.001 mm} {\large Program Evaluation, Spring 2014} \\             \vspace{0.001 mm} {\large Sarah Armstrong}}     \maketitle          \begin{table}     \caption{Sample Characteristics by the Amount of Co-Holding (\pounds)}     \estwide{PEAssignment2tabl1.tex}{6}{c}     \label{table2}     \end{table}               \end{document}      I found the preamble code at http://www.jwe.cc/2012/03/stata-latex-tables- estout/


title: Numbering on margin

text: I want to do something similar to but not the same as line numbering: A macro `\foo` is defined and a counter `foocounter` in an environment `foonumber`. When the macro is used, `foocounter` is increased by 1 and then printed on the left margin of the line where the macro is used. If more the macro is used than once on a line, all `foocounter` should be printed on the left margin, separated by a space. This describes what I want to do, but I have no idea how I can print the counter on the left margin. In addition, I am using `multicol` with two columns. I want the counter to be printed on the left side of each column. (In contrast, line numbering usually print the numbers on the outer margin.) * * * Addition made on 14 July 2014 I write a macro \foo in the following code. This seems successful, but the last occasion of the number jumps to the next page. The final page has no next page and the number disappears. Can anybody fix it?               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{calc}     \def\temppp{}     \newcounter{BAR}     \newcommand\foo{\stepcounter{BAR}$^{\arabic{BAR}}$\tikz[remember picture,overlay]\path let\p1=(current page.west),\p2=(X)in(\x1,0)coordinate(X)+(120pt,\y2)node[above left]{\ifdim\y2=0pt\global\edef\temppp{\temppp~\hbox{\arabic{BAR}}}\else\scriptsize\temppp\global\edef\temppp{\hbox{\arabic{BAR}}}\fi};}     \begin{document}     \hbox to 0pt{\tikz[remember picture]\node(X){};}%Put an X at the start     \foo Lorem ipsum dolor sit amet, consectetuer adipiscing elit. \foo Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. \foo Curabitur dictum gravida mauris. \foo Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. \foo Donec vehicula augue eu neque. \foo Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. \foo Mauris ut leo. \foo Cras viverra metus rhoncus sem. \foo Nulla et lectus vestibulum urna fringilla ultrices. \foo Phasellus eu tellus sit amet tortor gravida placerat. \foo Integer sapien est, iaculis in, pretium quis, viverra ac, nunc. \par     \vskip 360pt \foo Praesent eget sem vel leo ultrices bibendum. \foo Aenean faucibus. \foo Morbi dolor nulla, malesuada eu, pulvinar at, mollis ac, nulla. \foo  Curabitur auctor semper nulla. \foo Donec varius orci eget risus. \foo Duis nibh mi, congue eu, accumsan eleifend, sagittis quis, diam. \foo Duis eget orci sit amet orci dignissim rutrum. \foo Lorem ipsum dolor sit amet, consectetuer adipiscing elit. \foo Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. \foo Curabitur dictum gravida mauris. \foo Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. \foo Donec vehicula augue eu neque. \foo Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. \foo Mauris ut leo. \foo Cras viverra metus rhoncus sem. \foo Nulla et lectus vestibulum urna fringilla ultrices. \foo Phasellus eu tellus sit amet tortor gravida placerat. \foo Integer sapien est, iaculis in, pretium quis, viverra ac, nunc. \par     \end{document}


title: How to use \nocite{*} command in article class without getting question marks in the body of the text?

text: I'm having some troubles using the command `\nocite{*}` to avoid citations in the body of my text. I've compiled many times and it keeps showing me question marks at the `\nocite{*}`'s location. No matter what bibliography style I use, it still shows the question marks. Besides, I've tried to use the `listbib`package and didn't have a good result as well. Please, don't mark this question as already asked because the only one related to this talks about Other issue This is (hopefully), the MWE:               \documentclass[12pt ,a4paper]{article}          \usepackage[brazil]{babel}     \usepackage[latin1]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{ae}     \usepackage{harvard}     \usepackage{graphicx}     \usepackage{caption}     \usepackage{parskip}     \usepackage{indentfirst}     \usepackage{hyperref}     \usepackage{amssymb,fancyhdr,fancybox,epsfig,psfrag,amsmath,tabularx}     \usepackage[paperwidth=8.5in,paperheight=11in,hmargin={25mm,20mm},vmargin={20mm,20mm}]{geometry} %tamanho letter     \usepackage{fancyhdr}     \usepackage{filecontents}          \begin{filecontents}{\jobname.bib}     @book{key,     author = {Author, A.},     year = {2001},     title = {Title},     publisher = {Publisher},     }     \end{filecontents}          \begin{document}     Hello world     \nocite{key}      \thispagestyle{empty}     \newpage     \bibliographystyle{abbrv}     \bibliography{\jobname} % or \addbibressource{/jobname.bib}     \end{document}


title: What is the best way to include eps files in large documents?

text: I am updating an old LaTeX file from the university where I work, which over the past ten years has been partly edited and contributed to by several people, using different methods to include eps files. Some eps files are included using:               \epsfxsize=8cm     \epsfbox{../kap_5/bilder/ekvabsolut.eps}      and others using                 \includegraphics[scale=1]{../kap3/bilder/analytiskFig1.eps}      What are the differences between the two methods? Which is the recommended method to include eps files in a document compiled with pdflatex, and why?


title: biblatex: Abbreviated author names?

text: When using biblatex, how can you obtain abbreviated first names for authors in the bibliography (i.e. like the `abbrv` bibtex)? I've been trying to look everywhere in the manual, but so far no luck.


title: Different scales on the same plot

text: I would like to know whether and how the `pgfplots` package can be used to produce a plot with two curves using different scales, like in the following example: ![enter image description here](http://i.stack.imgur.com/PLTso.jpg)


title: passing a variable from R to Tex in knitr

text: I am sure this has been asked multiple times since it seems to be a common issue. I looked around but all I could find was the \Sexpr for sweave which does what I want. I am using knitr and I can't find a way to pass the variables from the Rcode chunk to Tex. I want is the variable a to be passed from knitr to TEX as given below. Is this possible? I get the error:                object 'a' not found      The sample.Rtex file is.               \documentclass{article}     \begin{document}     \section{Summary}     \begin{figure}[!h]     %% begin.rcode hist1, echo=FALSE, cache=TRUE, results=FALSE, dev='cairo_pdf', fig.width=8,  fig.align='center', out.width='.9\\textwidth'     % temp_setup_vars(File_1, File_1A, File_2, File_2A)     % generate_graph()     % a = 7     %% end.rcode     \caption{Hist}     \label{fig:hist}     \end{figure}          \section{Conclusion}     \par A is \Sexpr{a}.           \end{document}


title: What is the secret to use fonts?

text: ## Background Relatively new LaTeX user going mad here. All I want to do is use the _Day Ramon S_ font, but it seems nigh on impossible to do so. ## Question What is the secret to using fonts in (La)TeX? Is there any rhyme, reason, or rules of thumb to follow? Or do I need to just keep trying random combinations of the patterns I have found until something works? ### note Although all I _really_ want to do is use _Day Roman S_ , I have intentionally kept the question focused on fonts in general as there doesn't seem to be any bullet-proof advice on working with fonts. I see a lot of solutions for specific problems, and even fonts in general, but as can be seen in the next section, it's all a jumble. ### note 2 Yes, I have RTFM for the _Day Roman S_ font in question, it is installed, and has been reinstalled several times. It's still a pain to figure out a _consistent_ and _reliable_ way to use different fonts in a document. ## Previous research In trying to figure this out, I have looked at many of the samples from FontCatalogue archive that did compile and found that there seem to be a wide variety of ways of specifying fonts. I'm not sure which to use when. Sometimes you need to just load a package with the same name as the font and add `\normalfont\normalfont` twice (why?) before the text:               \usepackage{bookman}     \usepackage[T1]{fontenc}     \begin{document}     \normalfont\normalfont      Other times you need to add `\normalfont\<font-name>` before the text:               \usepackage{calligra}     \usepackage[T1]{fontenc}     \begin{document}     \normalfont\calligra      Still other times you need to remove `ic` from the font name and add `family`, creating `\normalfont\<font-name-minus-ic>family` before the text:               \usepackage{egothic}     \usepackage[T1]{fontenc}     \begin{document}     \normalfont\egothfamily      And sometimes the second command after `\normalfont` doesn't appear to be related to the package name at all:               \usepackage{yfonts}     \usepackage[T1]{fontenc}     \begin{document}     \normalfont\swabfamily      Sometimes you also need to use `\renewcommand*` after loading the font package and before loading `fontenc`:               \usepackage{PTSansCaption}      \renewcommand*\familydefault{\sfdefault} %% Only if the base font of the document is to be sans serif     \usepackage[T1]{fontenc}     \begin{document}     \normalfont\normalfont      And sometimes you can do that _without_ loading the font package first and _after_ loading `fontenc` (all other examples are before):               \usepackage[T1]{fontenc}     \renewcommand*\familydefault{\ttdefault} %% Only if the base font of the document is to be typewriter style     \begin{document}     \normalfont\normalfont      Sometimes you use `\renewcommand*` to set other defaults such as `\rmdefault` (previous two examples were `\familydefault`:               \renewcommand*\rmdefault{cmfib}     \usepackage[T1]{fontenc}     \begin{document}     \normalfont\normalfont      And sometimes you have to set various defaults:               \renewcommand*\ttdefault{lmvtt}     \renewcommand*\familydefault{\ttdefault} %% Only if the base font of the document is to be typewriter style     \usepackage[T1]{fontenc}     \begin{document}     \normalfont\normalfont      Finally, some appear to require loading an `.fd` file (font definition?) directly rather than through the `\usepackage` command, set up a `\newcommand*` (rather than `\renewcommand*`), skip loading `fontenc`, and change the duplicated `\normalfont\normalfont` before the text to something more complex:               \input Carrickc.fd     \newcommand*\initfamily{\usefont{U}{Carrickc}{xl}{n}}     \begin{document}     \normalfont\initfamily     \fontsize{12mm}{12mm}\selectfont


title: Adding bibliography to appendix

text: I thought it'll be kind of an easy task to add the bibliography to the appendix. However, after spending hours on it trying different solutions even some suggestions from this forum here I kinda of gave up and post my code here to ask for help. The problem with the code I use is that the bibliography is put on a separate page under Bibliography and not under B References... Here is my code snippet:               \documentclass[10pt,DIV=12,a4paper,numbers=noenddot]{scrreprt}          \usepackage[english]{babel}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{appendix}          \addto\captionsenglish{\renewcommand{\bibname}{References}}          \begin{document}          \tableofcontents %% Adds table of content          \chapter{Chapter 1}          \chapter{Chapter 2}               \begin{appendices}          \chapter{Supplementary Information}              \section{Tables}              \section{Figures}          \chapter{References}              \bibliography{Document/Bibliography/bibliography}{}                  \bibliographystyle{abbrv}          \end{appendices}          \end{document}


title: Declaring multiple authors in pdfauthor from hyperref

text: How do I typeset multiple authors with the `pdfauthor` option from the `hyperref` package? If I try > `pdfauthor={A, B, and C}` the names in the author field (when displayed in Adobe Reader) are surrounded by `"`; > ![output](http://i.stack.imgur.com/ICcxa.jpg) How do I get rit of the `"`s.


title: Paths with PGF/TikZ, in and out of foreach

text: \documentclass[11pt,a4paper]{article}     \usepackage{tikz}          \begin{document}     \begin{tikzpicture}     % CTC : center to center     % Distance is 2*sin(pi/3)     \def\ctc{1.7320508075688772cm}          % Draw an hexagon anywhere.     \def\hexagon#1{         %\draw #1 +(0:1cm) \foreach \a in {60,120,...,300} { -- +(\a:1cm) } -- cycle;         \fill[red] #1 circle (0.2cm);     }     % Draw a small hextile anywhere.     \def\hextile#1{         \foreach \l in {1,2} {             \foreach \a in {30,90,...,330} {                 \hexagon{#1 ++(\a:\l*\ctc)};             }             \foreach \a in {0,60,...,300} {                 \hexagon{#1 ++(\a:\l*3cm-3cm)};             }         }     }     \def\hextiles{         \foreach \a in {0,120,240} {             \hextile{(\a:6cm)};         }     }          %\hextiles;     \hextile{(0:6cm)};     \hextile{(120:6cm)};     \hextile{(240:6cm)};          \end{tikzpicture}     \end{document}      I am wondering why, oh why, calling `\hextiles` and `\hextile` three times don't give out the same result... It seems linked with the way paths are handled, but I can't see how...


title: How to define the size of paragraph indent?

text: \documentclass[12pt]{article}          \begin{document}          Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor      incididunt ut labore et dolore magna aliqua.           Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip      ex ea commodo consequat.           Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore      eu fugiat nulla pariatur.           \end{document}      Doing like this I want to get text with 1 cm indent in the beginning of each paragraph. Default indent is smaller. How to define the size?


title: Color pages in specific sections in LyX

text: To show the difference between my theoretical an practical part, I want to change the background color of the page during practical sections/parts. Until now I used a new paragraph style, which worked fine: create new paragraph style Because I can not use Headings or anything like that, I had to use a shaded box. This also worked fine, but I can not insert numbered illustrations and I get the following error:               > ! LaTeX Error: Not in outer par     > mode.     >  \begin{figure}[h]     >                         You've lost some text.  Try typing  <return>  to proceed. If that doesn't work, type  X <return>  to quit.      Does anybody know how to manage to change the background color for individual sections (including headings, images, ...) in LyX?


title: Make equations large

text: I'm including some equations in my document, but want them to appear very large. I have them in display mode, as opposed to inline mode, but can't seem to find any way to make them larger. I've tried using `\huge` but that seems to make all of the text in that section large (even when using it with {'s). Is there a simple way to do this?


title: Double strikeout

text: I'm using the `ulem` for strikethrough, but need two formats of strikethrough. I'm currently using `\dout{text}` which looks good, but the second`\xout{text}` makes the base text a little too unreadable. I'm looking for a clean double-strikethrough... the closest I've gotten is: `\newcommand\dout{\bgroup \markoverwith{\rule[0.2ex]{0.1pt}{0.4pt}\rule[0.8ex]{0.1pt}{0.4pt}}\ULon}` but this creates a _slight_ hatching effect. (It's good enough, but I figured I'd see if any of ye clever folk had a cleaner solution.) ![example](http://i.stack.imgur.com/jutV8.png)


title: How to typeset the definition of a complicated bijection with nice horizontal alignment?

text: Here is a typical example of what I am talking about:               \begin{align*}     \mathcal{L}                        &\simeq     O^{-1}(T, S) \\     V                                  &\mapsto    f_V := \pi_S \circ \left(\pi_T |_V\right)^{-1} \\     V_f := \{t + f(t) | t \in T\} &\leftarrow f     \end{align*}      The result looks messy in my opinion. I would like everyting to be aligned in the center, and the arrows to extend accordingly --- something that would look like the following:                          ~         X ----------> Y         x |------> yyyyyyy     xxxxxxxxx <----| yyy      I suppose I could use the `array` environment, but how to typeset extensible arrows? A similar question was answered in Dynamically size arrow \mapsto in function definition ; but I do not understand that piece of code, so I do not know how to adapt it (and if it is at all possible). Thank you for your help!


title: Line breaks in listings with long lines

text: This is a follow-up question to Line breaks in listings My MWE with a very long line demonstrate the problem:               \documentclass{report}     \usepackage{listings}     \lstdefinelanguage{text}{}     \lstnewenvironment{mylang}{\lstset{language=text,breaklines=true,breakatwhitespace=false,extendedchars=true,basicstyle=\footnotesize\ttfamily,}}{}     \begin{document}     \begin{mylang}     demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo demo          demodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemodemo      \end{mylang}     \end{document}


title: Adding information to bibitems

text: For a lecture note/book project I have to following problem: I have an extensive list of references processed by bibtex as usual, the entries coming from a large collection of bib-files. Now since the whole project is ment for students, I would like to add some recommendations for particular references like: > This is a standard text book where every student will have to take a look, > for this course Chap~3 and Chap~4 are most important. Of course, I can add lines like that directly as a "note" into the bib-files, but I do not want to spoil my bib-file collection with notes like that which I never will need again (imagine this kind of note appears in a journal article by accident). So the question is: can I modify the behaviour of the bibitem command such that I have an additonal command like `\bibnote{key}{text}` somewhere in my main file, taking the key of the bibentry and adds some text at the end of it, maybe as a separate paragraph. Ideally, it would write things directly to the bbl-file automatically.


title: Toggle links globally using macro

text: I'm writing a CV for my wife using moderncv. We're not sure whether her supervisor wants links in the document, so every time a link might be required, I write the text twice:               PhD student at the Weizmann Institute of Science     % PhD student at the \textcolor{cyan}{\href{http://www.weizmann.ac.il/}{Weizmann Institute of Science}}}      If the tutor decides that we should use links, I will comment out the unlinke text:               % PhD student at the Weizmann Institute of Science     PhD student at the \textcolor{cyan}{\href{http://www.weizmann.ac.il/}{Weizmann Institute of Science}}}      I don't like duplicating code, so I was looking for a way to define a Tex macro for my link style. Perhaps something like:               PhD student at the {\myhref{http://www.weizmann.ac.il/}{Weizmann Institute of Science}}      Where `\myhref` is defined once at the top, where I can toggle the links on and off, and set the link colors if they exist. Is there a way to define a global, custom macro in tex?


title: Cite in body of document, but omit from references (i.e., opposite of \nocite)

text: I can use `\nocite` to add to the references without citing in the paper. But I would like the opposite. I want to cite in the paper without adding to the references. That is, I would like to use by `.bib` file to generate the correct authors and year citation, but omit the full citation from the references section. I know that this is bad form, but for a short assignment, this would allow me to mention the references without providing the whole bibliography and meet a page limit. Edit: I am using BibTeX.


title: Multiple signatures in a letter

text: I've searched for this but haven't found a solution. Is it possible to have multiple signatures in a letter, one above the other?


title: Latex symbol for personal website url

text: I have a `fancyhdr` footer with my personal data and I would like to add some cute symbol inline with my website url. I've already included the `marvosym` package and used:   * `\Letter` symbol before my email address   * `\Telefon` symbol before my phone number. I need a nice symbol for my website url. Could you please suggest me one?


title: Help creating 3D solids of revolution in pgfplots?

text: I have done a lot of plotting in 2D using pgfplots but I am new to the 3D portion. I am attempting to illustrate a solid of revolution. For example, I have the area under the curve y = x^2 + 1 on the domain [0,5] (along with the curve rotated about both the x- and y- axes) illustrated with the following:               \documentclass[24pt, letter]{report}     \usepackage[fleqn]{mathtools}     \usepackage{amsthm, amssymb}     \usepackage{tikz}     \usepackage{pgfplots}     \pgfplotsset{compat=1.9}     \pagenumbering{gobble}          \begin{document}       % Curve + Area Underneath       \begin{tikzpicture}         \begin{axis}[title={$y=x^2+1$},                      xticklabels={,$a$, , , , ,$b$} ,                      yticklabels=\empty,                      x=1.0cm,                      y=0.2cm,                      xmin=0, xmax=5.4,                      ymin=0, ymax=26.9,                      axis x line=bottom,                      axis y line=left                      ]           \addplot[smooth,thick,domain=0:5, fill=blue!50]{1+x^2}\closedcycle;           \node at (axis cs:3.75,4) [anchor=south]{$A$};         \end{axis}        \end{tikzpicture}            % Curve Rotated about y-axis       \begin{tikzpicture}         \begin{axis}[view={45}{45}]           \addplot3[surf,shader=interp,samples=50,                     domain=0:5,y domain=0:2*pi,z buffer=sort]             ({x*cos(deg(y))}, {x*sin(deg(y))}, {x^2+1});         \end{axis}       \end{tikzpicture}            % Curve Rotated about x-axis       \begin{tikzpicture}         \begin{axis}[view={45}{45}]           \addplot3[surf,shader=interp,samples=50,                     domain=0:5,y domain=0:2*pi,z buffer=sort]             (x, {(x^2+1)*cos(deg(y))}, {(x^2+1)*sin(deg(y))});         \end{axis}       \end{tikzpicture}     \end{document}       Is it possible to further the illustration by not only drawing the curve, but also the area under it? For example, when rotating about the y-axis, I'd like it to look not like a bowl, but like a cube with a bowl hollowed out of the top. Eventually I'd even like to be able to illustrate this with the area bounded by two curves, such as the area bounded by y=x^2+1, x=4, y=0, y=37. Additionally, how would I draw the rotation about an arbitrary axis, such as the line y = -1 or x = 6?


title: Numbering sections, subsections etc manually

text: I want to number nested sections, subsections, paragraphs etc manually without using commands like `\section{Section}`,`\paragraph{Paragraph}` like this: 1 1.1 1.1.1 ... How can I achieve that?


title: incompatibilities between LuaLaTeX and \typein ?

text: The following ecm compiles fine with LaTeX and XeLaTeX, but doesn't work with LuaLaTeX :               \documentclass{minimal}     \begin{document}     \typein{test}     \end{document}      And here is the error :               Invalid \endlinechar.     <recently read> \@M           l.4 \typein{test}          ?


title: Expanding arguments before macro call

text: I've been banging my head against this for days. I have a macro which takes a macro name and its arguments. It then re-arranges the arguments a bit and then calls the passed macro with the re-arranged arguments and so ends like this:               #1{\arga}{\argb}{\argc}      where `arga ... \argc` are the processed arguments. However. I need to have `\arga ... \argc` fully expanded _before_ the macro stored in `#1` is called. I cannot for the life of me work this out after days of playing with `\expandafter`, `\noexpand`, `etextools` etc. I can't use `expl3` and I'd really prefer not to use `etextools` but `etoolbox` is available. Here is a MWE:               \documentclass{article}     \begin{document}          \def\x#1#2#3#4{%       \def\arga{#2}%       \def\argb{#3}%       \def\argc{#4}%       #1{\arga}{\argb}{\argc}}          \def\y#1#2#3{\detokenize{#1#2#3}}          \x\y{arg1}{arg2}{arg3}          \end{document}      This results in "\arga \argb \argc" but I want "arg1arg2arg3". `\expandafter` will do this in `\x` but not for three arguments in a row. `etextools` has some macros to do this but I really want to avoid it (it clashes with `etoolbox` in some ways and I must have `etoolbox`). I couldn't get the `etextools` macros to work even when I tried (`\ExpandNextTwo` etc.) UPDATE: I realised that in my case, the args can contain robust macros like:               \documentclass{article}     \usepackage{etoolbox}     \begin{document}          \def\x#1#2#3#4{%       \def\arga{#2}%       \edef\argb{\ifstrequal{#3}{arg2}{arg2}{}}%       \def\argc{#4}%       {\protected@edef\z{\noexpand#1{\arga}{\argb}{\argc}}\z}}          \def\y#1#2#3{\detokenize{#1#2#3}}          \x\y{arg1}{arg2}{arg3}          \end{document}      In which case (using egreg's answer as an example), it isn't fully expanded. As Joseph and egreg mention below, this isn't doable, you just have to use non-robust macros in such cases, for example. I'll let the question stand as it because it is informative.


title: biblatex: removing :eng from fullcite

text: I am writing an annotated bibliography, using the command `\fullcite{key}` to list the reference. How can I get biblatex to suppress the language entry? ie it produces > Author,A. (2010) Title. eng. Journal, etc. I have tried issuing the command `\AtEveryBibitem{\clearfield{language}}` and it works for entries if I do a `\printbibliography` command, but not for anything produced by `\fullcite{key}`. Can anyone help me with this? At the moment, digging into the sourcode for biblatex to make a modified `\fullcite` command looks a bit difficult for me.,


title: How to float figure close to its description in the text?

text: Consider a float of image with               \begin{figure}[h]         \includegraphics[width=1.0\textwidth]{ebooks.jpg}         \captionof{figure}{This is a test}         \label{fig: 1}     \end{figure}      Is it possible to define the figure at the beginning of the document, and automatically displaying the figure after first description of the figure (when term `Figure X` appears on the text for the first time)? In fact, it should look for the first occurrence of the term `Figure X` to place the figure close to that. In general, I want to know how to search for a term in the text and display a figure close to that.


title: A special mathematical symbol (supremum of directed set)

text: I am trying to find a certain mathemtical symbol. It is a `\bigvee` with an arrowhead as in this picture: ![Directed supremum](http://i.stack.imgur.com/sFc04.png) Some authors use this as symbol in domain theory. It denotes the supremum of a set and furthermore states that the set is directed.   I did not find it in the The Comprehensive LaTeX Symbol List.


title: pdflatex: fit-page-to-contents or scale-contents-to-fit-page

text: I have a problem which can be solved one of two ways:   1. Typeset a given chunk of TeX in an "infinitely wide" space, then scale the result so that its width is the width of the page.   2. Typeset a given chunk of TeX in an "infinitely wide" space, then set the page size to the width of the result. Can anybody suggest how to do this with pdflatex? Unfortunately I can't use other TeXes like XeTeX, etc.


title: All files under `/usr/share/texmf` are removed, how to save?

text: I remove all files under `/usr/share/texmf` by mistake with `rm`(could I call it the curse of rm T_T). How could I do next to save the environment? Re- install? Or any other choice.


title: fontspec does not work correctly. MiKTeX portable, no admin rights

text: I am trying to set up a TeX System at work, where I have no admin rights. So I went for MiKTeX portable. It is "installed" on my Desktop. I want to use `fontspec` with XeLaTeX to be able to choose the fonts I want. I can compile a normal document, but when I try to use `fontspec`, XeLaTeX throws an error:               ! Undefined control sequence.     <argument> \c_keys_code_root_tl                                  fontspec/Ligatures/Historical     l.8 ...tureoption{Ligatures}{Historic}{Historical}      which can be ignored by pressing enter. But then there is the critical error:               (c:\Users\**********\Desktop\Miktex\tex\latex\metalogo\metalogo.sty))Running miktex-makemf.exe...     miktex-makemf: The Charis SIL source file could not be found.          Running hbf2gf.exe...               hbf2gf (CJK ver. 4.8.0)                    Couldn't find `Charis S.cfg'          miktex-maketfm: No creation rule for font "Charis SIL".               !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!     !     ! fontspec error: "font-not-found"     !      ! The font "Charis SIL" cannot be found.     !      ! See the fontspec documentation for further information.     !      ! For immediate help type H <return>.     !...............................................            l.10 \setmainfont{Charis SIL}                               % set the main body font (\textrm), assumes Ch...      I've tried several fonts, none of them worked. Googling for the error message did not help either. Does anyone have a suggestion? Nearly forgot to post the document:               % !TEX TS-program = xelatex     % !TEX encoding = UTF-8          \documentclass[11pt]{scrartcl}      \usepackage{fontspec}      \defaultfontfeatures{Mapping=tex-text}     \usepackage{xunicode}     \usepackage{xltxtra}          \setmainfont{Charis SIL} % set the main body font (\textrm), assumes Charis SIL is installed               \begin{document}     Hello World          \end{document}


title: Why won't putting \input inside a tabularx environment compile?

text: Putting a tikzpicture `normpdf_2d.tex`                   \input{./Figures/chapter6/normpdf_2d.tex}      on its own is fine. but, putting it nto a `\tabularx` environment won't compile. Why? What property does this environment need to know about `\input` before it works? The size/width? This however is fine:               \newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}     \begin{figure}     \begin{tabular}{C{.48\textwidth}C{.48\textwidth}}      \subfloat[Subfigure 1] {\input{./Figures/chapter6/normpdf_3d.tex}}      \subfloat[Subfigure 1] {\input{./Figures/chapter6/normpdf_2d.tex}}     \end{tabular}     \end{figure}      This not:               \documentclass{article}     \usepackage{tabularx}     \usepackage{booktabs,multirow}     \usepackage{standalone}     \usepackage{tikz,pgfplots}     \pgfplotsset{compat=newest}     \usepackage{tabularx}     \usepackage{subfig}     \usepackage{filecontents}                           \usepgfplotslibrary{external}             \tikzexternalize               \begin{filecontents*}{normpdf_2d.tikz}     \documentclass[tikz,border=12pt]{standalone}     \usepackage{pgfplots}     \usepackage{subfig}     \usepackage{tabularx}     \pgfplotsset{compat=newest}        %\usepgfplotslibrary{external}     %\tikzexternalize     \begin{document}     \definecolor{mycolor1}{rgb}{0,0.75,0.75}          \begin{tikzpicture}          \begin{axis}[%     width=4.52083333333333in,     height=3.565625in,     scale only axis,     xmin=0, xmax=6,     xlabel={cfu (Y)},     ymin=0, ymax=1,     ylabel={Probability density},     legend style={draw=black,fill=white,legend cell align=left}     ]     \addplot [     color=blue,     solid,     line width=1.5pt     ]     table{     0.164920894751145 0.145245471693298     0.34898483521757 0.314105513485571     0.400206868657802 0.375704063846473     0.431202365194672 0.415565960090126     0.468283168514601 0.465368046385591     0.468819173063357 0.466102333522882     0.541086963948335 0.567617590141928     0.558035142464694 0.591815958738304     0.558424656178589 0.592372256340699     0.567763246195775 0.605704754250354     0.588442297122976 0.635140815037755     0.588968308388865 0.635887013738116     0.589496900268574 0.636636709024852     0.615575125108802 0.673361419528354     0.656478830152384 0.729356371745445     0.663734249176834 0.739001710618186     0.681134429788414 0.761691427683771     0.699206339854542 0.784509230520803     0.703174714510729 0.789406773282464     0.710293205919594 0.798082837552696     0.738324318268112 0.830765143080553     0.743729355370618 0.836772857231647     0.7628624687978 0.857202030543563     0.789650071275085 0.883431847212714     0.848769035460717 0.93014828764704     0.857054257851899 0.935346913150545     0.867490832222506 0.941393771927579     0.892221633180695 0.953428704494102     0.910732799951076 0.96026629015755     0.942439202692875 0.967534739622871     0.964173551423469 0.969220797343017     0.966490207360103 0.969241291138126     0.972340307586979 0.969156381555276     0.999815929196087 0.966143308438322     1.01840762385923 0.96167588822653     1.02422624912665 0.959879519150392     1.04820841787849 0.950503937405069     1.05040526585597 0.949488520832702     1.05188064663965 0.948792015052305     1.06421741151945 0.942513866116551     1.06952744475091 0.939564533487357     1.07377729763307 0.937098333090976     1.10837980144772 0.913625640841771     1.12655613304724 0.898983298828636     1.13577066384758 0.89098627132941     1.1580472276478 0.870142330490693     1.15859589504013 0.869603007065865     1.18051156035791 0.847100007296536     1.21401730562959 0.809369022407148     1.33027028384446 0.656408242977467     1.33483660875034 0.649970375448687     1.37629546726956 0.590995765951455     1.39873034424263 0.558976024508442     1.42011477374599 0.528607866819228     1.49811243643743 0.421418636969251     1.55782976646071 0.345795703108512     1.60683136399288 0.289407680329164     1.67872959183145 0.217237684951087     1.70586524394617 0.193407783948843     2.09859653835273 0.0221208957939459     2.23050096301146 0.0087062390469457     };     \addlegendentry{n=5};          \addplot [     color=green!50!black,     solid,     line width=1.5pt     ]     table{     1.11061716777245 0.25439255248339     1.32152703852018 0.444545345197107     1.33743602693433 0.460242989969573     1.42547263125263 0.547313752669856     1.50599624519356 0.623697850962722     1.5261804928616 0.641779387498937     1.573838875732 0.682042674974274     1.57730219814673 0.684816482012706     1.62699159305991 0.721956657982538     1.63486458952984 0.727347067179288     1.68630344515834 0.758807092685913     1.71784982886711 0.774600265244482     1.83289913575602 0.806644546215021     1.86864417529802 0.807887335418516     1.88963804306077 0.806645110709114     1.90172633188334 0.805269969440086     1.97361138903204 0.787332803216098     2.16847522483986 0.665794197723055     2.26107642525521 0.582137894844234     2.44093902647085 0.40561167899897     2.55728899719626 0.299162501222641     2.72596462417501 0.174351769994033     3.14460320890567 0.0275718440302502     };     \addlegendentry{n=10};          \addplot [     color=red,     solid,     line width=1.5pt     ]     table{     1.58873251442874 0.139270685555603     1.75094674410523 0.187648610352166     2.00056999517431 0.274533946251121     2.27705604989095 0.374550491086161     2.29596621491152 0.380969240114346     2.41176717604408 0.417753266892818     2.41614828744096 0.419044488634782     2.45981848928711 0.431445200552556     2.51461996380818 0.44569150663875     2.63732800530387 0.471433199097579     2.67540149916467 0.47748693150892     2.72686458640717 0.484091305194831     3.03140642922051 0.483465535521604     3.07384878732821 0.477986374915163     3.1895413994593 0.4569517259234     3.25640618890004 0.441099033384993     3.39991043346777 0.399612809225554     3.7029148147097 0.292622994026572     3.94491621538283 0.206344381423128     4.36469219413918 0.0911022396340956     4.68444030939428 0.0408178745872097     };     \addlegendentry{n=15};          \addplot [     color=mycolor1,     solid,     line width=1.5pt     ]     table{     2.44469092422533 0.134047643683245     2.99469910210473 0.332559909167666     3.05373235366556 0.355888865309276     3.31377765482139 0.447946402923478     3.41066336498647 0.474278454032695     3.73828133650772 0.512840458011838     4.11146934521349 0.451592119764443     4.12204843744243 0.448459021945289     4.13062375797785 0.445874763291985     4.34434429091486 0.371194128891267     5.24212616032033 0.0753126892773911     };     \addlegendentry{n=20};          \end{axis}     \end{tikzpicture}%       \begin{document}            \begin{figure}[!ht]       \centering\makebox[\textwidth]       {\resizebox{1.2\textwidth}{!}{%       \begin{tabularx}{1.2\textwidth}{*2X}       \begin{center}       \subfloat[Normal distribution at n=5,10,15,20]{\label{fig:normpdf_3d}}       \subfloat[Probability frequency density plot at n=5,10,15,20]{\label{fig:normpdf_2d}}       \end{center}       \end{tabularx}}}       \smallskip       \caption{PDF and scatter plots}       \label{fig:normpdf}       \end{figure}               \end{document}


title: Why is LaTeX replacing 2010 for the math subject classification with 1991?

text: I am trying to compile a `.tex` document and convert it to PDF where I used the command:               \subjclass[2010]{***(primary), and ***(secondary)}       (`***` correspond to some suitable number from the subject classification). I used               \documentclass{amsart}     \usepackage{amscd,amsmath,amssymb,amsthm,amsfonts,epsfig,graphics}      While compiling the document, the compiler replaces 2010 by 1991 automatically (it also tells me so) and in the PDF output, I also see 1991 subject classification, not 2010 subject classification! Could you inform me why is this happening? What should I do to get the 2010 subject classification? Finally the journal where the paper is accepted is asking to confirm that the authors use 2010 subject classification. By any chance, do you think they accept an older classification written at the footnote? (I know the last one is a bad question, but just in the worst case!)


title: Error message with the package inputenc

text: I'm trying to do a presentation in spanish using `beamer` and so far my source looks like this:               \documentclass{beamer}          \usetheme{AnnArbor}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[spanish]{babel}     \usepackage{amssymb}     \usepackage{amsthm}     \usepackage{placeins}     \usepackage{amsmath}     \usepackage{amscd}     \usepackage{graphicx}          \title{The Title}     \author{Carlos Márquez}     \institute{My Institution}     \date{\today}          \begin{document}          \begin{frame}{Introduction}     bla bla bla     \end{frame}          \end{document}      But when I compile I get the following error message: `!Package inputenc Error: Unicode char \u8:árq not set up for use with LaTeX`. But I followed the instructions in http://en.wikibooks.org/wiki/LaTeX/Internationalization, so I don't know what is wrong. I would appreciate some help to overcome this issue. Thanks.


title: Less pointy angle brackets

text: I was looking for a way to beautifully display UML stereotype titles including angle brackets like you can see here: ![I like](http://i.stack.imgur.com/i0bpX.png) What I came up with is `$\mathtt{\ll metaclass\gg}$`, however, as you can see here ![don't like](http://i.stack.imgur.com/l25KK.png) the brackets are too pointy (I hope you know what I mean) and the spacing between brackets and expression is too big. Short version: Does anyone know a command for according brackets?


title: Beamer bug? Description with item width and overlay in beamerarticle

text: This MWE is really minimal. We make use of the `{description}` environment which in `beamer` takes two optional arguments: overlay specification, and item width.               \documentclass{beamer}     %\documentclass{article}     %\usepackage{beamerarticle}     \begin{document}         \begin{frame}{The Animal Kingdom}             \begin{description}[<+->][Guans of America]                 \item[Gnus] these are large cow-like animals                 \item[Gnats] much smaller than gnus                 \item[Guans of America] mid sized, I think             \end{description}         \end{frame}     \end{document}      Now, this works great in beamer mode, but not in beamerarticle, which generates the following message:               ! LaTeX Error: Something's wrong--perhaps a missing \item.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.7         \item[Gnus] t                  hese are large cow-like animals     ?       This seems like a bug, IMHO. I wonder if there is a workaround that scales. I have few dozens instances of this problem in a large presentation. * * * Joseph Wright's fix to this bug inthe beamer source can be found here.                {         \AtBeginDocument{           \let\beamer@origdescription=\description      -    \renewcommand{\description}[1][]{\beamer@origdescription}      +    % The description environment doesn't use either optional      +    % arg in article mode, so simply gobble them      +    \def\description{%      +      \@ifnextchar[%]      +        {\beamer@description@}      +        {\beamer@origdescription}%      +    }      +    \def\beamer@description@[#1]{%      +      \@ifnextchar[%]      +        {\beamer@description@@}      +        {\beamer@origdescription}%      +    }      +    \def\beamer@description@@[#1]{\beamer@origdescription}         }       }      I tried using this idea in an `\mode<article>` guard, but could not. Any help in finding a temporary work around until the release of the next version, would be greatly appreciated.


title: Problems with table

text: I have some issues by creating my table. I can't find out to add: "Test3", "X1", and "Y1" - so it fit in -- in a good way. ![enter image description here](http://i.stack.imgur.com/JmP8B.png) My preamble:               \documentclass[a4paper]{article}     \usepackage{siunitx,booktabs,threeparttable}          % customize threeparttable     \renewcommand{\TPTnoteSettings}{\footnotesize}     \renewcommand{\TPTnoteLabel}[1]{#1}          \begin{document}          % natural width     \begin{table}[htp]     \centering          \begin{threeparttable}     \caption{What is this table about?}\label{test1}          \medskip          \begin{tabular}{       l       S[table-format=4.0]       S[table-format=3.0]       S[table-format=3.0]       S[table-format=3.0]       S[table-format=2.0]     }     \toprule     & \multicolumn{2}{c}{Name1} & \multicolumn{2}{c}{Name2} \\     \cmidrule(lr){2-3} \cmidrule(lr){4-5}     & {Factor1} & {Factor2} & {Factor1} & {Factor2} & {Total} \\     \midrule     Test 1 &   12 &  32 &   3 & 5     & 99 \\     Test 2 & 1234 & 234 & 334 & {---} & 99 \\      \bottomrule     \end{tabular}     \begin{tablenotes}     \item[Note:] A long note that goes beyond the table width       because we want to have many many words that       mean as little as possible     \end{tablenotes}     \end{threeparttable}     \end{table}          % enlarged width     \begin{table}[htp]     \centering     \begin{threeparttable}          \medskip          \begin{tabular*}{.8\textwidth}{       @{\extracolsep{\fill}}       l       S[table-format=4.0]       S[table-format=3.0]       S[table-format=3.0]       S[table-format=3.0]       S[table-format=2.0]     }     \toprule     & \multicolumn{2}{c}{Name1} & \multicolumn{2}{c}{Name2} \\     \cmidrule(lr){2-3} \cmidrule(lr){4-5}     & {Factor1} & {Factor2} & {Factor1} & {Factor2} & {Total} \\     \midrule     Test 1 &   12 &  32 &   3 & 5     & 99 \\     Test 2 & 1234 & 234 & 334 & {---} & 99 \\      \bottomrule     \end{tabular*}     \begin{tablenotes}     \item[Note:]     \end{tablenotes}     \end{threeparttable}     \end{table}          \end{document}      Thank you very much!


title: incollection: correct information for parts and chapters

text: In the "Handbook of mechanical engineering" there are 3 parts consisting of chapters and then sections (authors belong to the sections). I used `incollection` (`biblatex`) as entrytype to cite a certain section. What would be the best way to add the information of the part and chapter (here: _Part B: Applications in Mechanical Engineering_ , _Chapter 7: Manufacturing Engineering_ ) the section belongs to? Here is the example:               @incollection{Tekkaya2009,         Author = {Tekkaya, A. E.},         Booktitle = {Handbook of Mechanical Engineering},         Chapter = {7.2},         Editor = {Grote, K.-H. and Antonsson, E. K.},         Pages = {554-606},         Publisher = {Springer},         Title = {Metal Forming},         Year = {2009}}


title: How to zoom (and apply grid on) subfigures

text: So I have folders containing triplets of images which all have the same style as shown in an example below ![Example image](http://i.stack.imgur.com/fgHcg.png) It is basically an automatically generated image and a color-bar besides it. I want to display triplets of images in my LaTeX document with a single color- bar - this is easily achievable using subfloats               \begin{figure}[h]     \centering     \begin{subfigure}[b]{0.3\textwidth}     \centering     \includegraphics[trim = 21mm 22mm 38mm 14mm, clip]{img/batch01/dist01}     \caption{$r=1$}     \end{subfigure}     \begin{subfigure}[b]{0.3\textwidth}     \centering     \includegraphics[trim = 21mm 22mm 38mm 14mm, clip]{img/batch01/dist02}     \caption{$r=11$}     \end{subfigure}\hspace{20pt}     \begin{subfigure}[b]{0.3\textwidth}     \centering     \includegraphics[trim = 21mm 22mm 23mm 14mm, clip]{img/batch01/dist03}     \caption{$r=21$}     \end{subfigure}     \caption{Distances ...}     \end{figure}      ![Triplet example](http://i.stack.imgur.com/L1yFv.jpg) But how should I make my life easier if I want to zoom in the data? Let's say to show only the middle 9-th of the square like this ![Zoomed triplet example](http://i.stack.imgur.com/wUwkH.jpg) The example above was created using photo editing software. Unfortunately it would take a ridiculous amount of time for me to create them all like that. What would you suggest? Maybe it is even possible to apply some kind of a grid to make individual pixels more distinctive (not sure about this one, may be too complicated and not worth it).


title: ref to subsection number only

text: is there a way to reference the subsection part only? Example:               \documentclass{article}     \begin{document}          \section{This is my section}     For further information see subsection \ref{subsecthree} within this section.     \subsection{One}     \subsection{Two}     \subsection{Three}\label{subsecthree}          \end{document}      Usually gives (without the stars):               1 This is my section     For further information see subsection **1.3** within this section.      But I want:               1 This is my section     For further information see subsection **3** within this section.      Is that possible? [Edit] To make it more clear: I am looking for a command that works like \ref, but prints (the arabic number of) the value of the subsection counter at the position of the \label. =======================   == Solution in LaTeX == There is another solution below. This is a different solution I came up with   (I cannot post an answer to my own question, so I put it here):               \documentclass{article}          \newcommand{\labelsubseccounter}[1]{         \renewcommand\thesubsection{\arabic{subsection}}         \addtocounter{subsection}{-1}         \refstepcounter{subsection}         \label{#1}         \renewcommand\thesubsection{\thesection.\arabic{subsection}}     }          \begin{document}          \section{This is my section}     For further information see subsection \ref{subsecthree} within this section,      which is called \ref{onepointthree}, not \ref{onepointfour}.     \subsection{One}     \subsection{Two}     \subsection{Three}\label{onepointthree}\labelsubseccounter{subsecthree}     \subsection{Four}\label{onepointfour}          \end{document}      (I would like to insert the compiled code, but don't know how, sorry)


title: ! LaTeX Error: File `adjustbox.sty' not found on Ubuntu 10.04.2

text: I have install `$ sudo apt-get install texlive-full` on Ubuntu 10.04.2 but when I run I got this error about adjustbox.               ! LaTeX Error: File `adjustbox.sty' not found      Is there anyone know how to install/fix this error.


title: How do I write invoices in LaTeX?

text: I'm relatively new to TeX, which means I did nothing more than homework and some math things with it. Now I'd like to write invoices with LaTeX (for reusability etc.) _I am not searching for a template._ What I'm looking for is actually more a starting point and maybe some resources that already helped other people to get started with writing invoices or similar kinds of documents. Where should I start in order to learn to write more complex documents with LaTeX? What helped you?


title: amsmath.sty And bad compilation!

text: I am experiencing problems with teXMaker and my latex TeXLive installation. I CANNOT obtain a good compilation from math. amsmath.sty not found error plus a bad pdflatex output (without fractions from \dfrac and \boxed equations ). Please, help me... I have been reading about the ams packages reconfiguration (I have never heard about it before this year) but I had no problems till now. I don't want to destroy my all my current files with these errors. Could someone tell me how could I manage that all the math /ams math packages work again? Please, it is urgent! Operating system: Uberstudent3.0 TEXMaker last version, 4.1 and TExStudio last version as well. Same error. I CAN NOT anything COMPILE WITH PDFLATEX!!!!None of my source documents work... What has been changed with the amspackages???? I have already read the changes and I guess something is not updated in my TeXLive distro...I installed it this year though... Edit: I can NOT compile from any of my source documents or any of my tex compilers right now (I tested open different copied .tex documents and using texstudio). I obtain the next error ![enter image description here](http://i.stack.imgur.com/0F5hG.png)


title: How include a Feynman diagram in a beamer presentation?

text: I have a bunch of Feynman diagrams constructed with "feynmp" that I would like to include in a beamer (presentation mode). I know Tikz works but then I have to redraw each and every diagram from scratch...no time for that. Thanks for any help.


title: lingmacros alignment causes compile failure

text: Without `&` for alignment, it works perfectly fine.               \documentclass[11pt]{article}     \usepackage{lingmacros}          \begin{document}          \enumsentence{\shortex{3}       {Taroo$_i$-ga Yo$_j$-o zibun$_{i/*j}$-no shinshitsu-ni okutta.}       {Taro-NOM Yo-ACC self-GEN bedroom-DAT sent}       {`Taro$_i$ sent Yo$_j$ to his$_{i/*j}$ bedroom.'}     }          \end{document}      But when I add the `&`               \documentclass[11pt]{article}     \usepackage{lingmacros}          \begin{document}          \enumsentence{\shortex{3}       {Taroo$_i$-ga & Yo$_j$-o & zibun$_{i/*j}$-no & shinshitsu-ni & okutta.}       {Taro-NOM & Yo-ACC & self-GEN & bedroom-DAT & sent}       {`Taro$_i$ sent Yo$_j$ to his$_{i/*j}$ bedroom.'}     }          \end{document}      I get               ! Extra alignment tab has been changed to \cr.     <template> \unskip \hfil }\ \endtemplate           l.10 }