title: LuaTeX won't end a line at Unicode emdash

text: I'm using LuaLaTeX instead of XeLaTeX for my book, mainly because it supports microtype's `expansion` feature, to produce the optimal word spacing and line breaking that will result in the most uniform textspace coverage while minimizing hyphenation. A problem I'm finding is that LaTeX doesn't seem to understand that an emdash without spaces (which I insert directly into the .tex document as the Unicode character — ) provides just as good a spot for ending a line as whitespace does, and it will do whatever it has to to avoid ending a line immediately before or after an emdash, even where that would be the optimal spot. I've tried replacing the Unicode with `\textemdash`, but this had no effect. XeTeX doesn't have this problem. Is there any way to explain to LuaTeX what XeTeX seems to understand? To illustrate:               \documentclass[letterpaper,12pt,onecolumn,final]{memoir}     \usepackage{luatextra}     % fontspec is loaded by luatextra in LuaLaTex                  \usepackage{xparse}     \usepackage{polyglossia}     \setdefaultlanguage{english}     \usepackage[final=true]{microtype}     \usepackage[showframe]{geometry}          \setmainfont{Linux Libertine O}          \begin{document}          So, with dash and verve, he sang: “I am the very model of a modern major general          Now, adding a little more more \emph{dash} to his verve\ldots          So, with dash and verve, he sang: “I am the very model of a modern major general—          This brings the paragraph to just a hair shy of the end of the line. No font expansion has been done by      microtype, because it fits perfectly. This would then be an optimal position for a line break, were the      paragraph to continue onto the next line. Does it do that? Let’s see.          So, with dash and verve, he sang: “I am the very model of a modern major general—I’ve information      vegetable animal and mineral.”          As you can see, microtype negatively expands (in other words, compresses) the first line to avoid the      optimal break point, if only it knew!          \end{document}


title: In beamer, how to use \pause inside \only

text: I want to use `\pause` inside `\only` as in the example below. Sometimes it works well (see slides 2 and 3), but sometimes it doesn't (see slides 5 and 6). Why?               \documentclass{beamer}     \setbeamertemplate{footline}     {       \hfill \insertframenumber{} / \inserttotalframenumber\hspace*{2ex}     }          \begin{document}     \begin{frame}     \frametitle{An example}     \only<1>{     insert a picture for instance     }     \pause     \only<2-3>{     \begin{itemize}     \item here is my first remark     \pause     \item and here is my second     \end{itemize}     }     \only<4>{     insert a 2nd picture     }     \pause     \only<5-6>{     \begin{itemize}     \item bla bla bla     \pause     \item ...     \end{itemize}     }     \end{frame}     \end{document}      On purpose, I want the footline to display the number of frames, that is only "1/1" in this example.


title: Subsection numbers with memoir + frontmatter

text: I've just tried to use \frontmatter with memoir class for the first time and everything works fine except for some weird detail. When I add \frontmatter and \mainmatter commands, the numbers of subsections disappear in the ToC and also in the subsection titles themselves. The code is the following:               ...     \chapterstyle{veelo}     \setcounter{secnumdepth}{3}     ...     \begin{document}     \frontmatter     \include{abstract}     \include{acknowledgement}     \setcounter{tocdepth}{2}     \tableofcontents     \include{chap0_intro}     \include{abbrev}     \mainmatter     \include{chap1_somi}     \include{chap2_simulation}     ...      ToC looks like this: ![enter image description here](http://i.stack.imgur.com/0BtMU.png) Why and how can I get them back while keeping the matter-commands?


title: Lower hrulefill inside tabu

text: I'm trying to make a paper form. I want to draw a horizontal line for people to write on. I want that line below the baseline. I found a TUGboat on making forms that defines an `\xfill` command that works fine in a paragraph, but I can't get it to work in a `tabu` environment. How can I use position something equivalent to `\hrulefill` below the baseline in a `tabu` environment? MWE:               \documentclass{article}          % From https://www.tug.org/tugboat/tb24-2/tb77wilson.pdf     \newcommand*{\xfill}[1][0pt]{%       \cleaders       \hbox to 1pt{\hss         \raisebox{#1}{\rule{1.2pt}{0.4pt}}%         \hss}\hfill}          \usepackage{tabu}          \begin{document}          This works: \xfill[-0.5ex]          \begin{tabu}{@{}X@{}}       Rule is too high: \hrulefill \\       Rule is not visible: \xfill[-0.5ex] \\     \end{tabu}          \end{document}      Rendered: ![Rendered MWE](http://i.stack.imgur.com/f7RnK.png) I'm using MacTeX 2014, rendering with LuaLaTeX.


title: Using TikZ for a simple drawing

text: How do you draw a simple figure like the following in TikZ? It seems like the only way to start learning TikZ is by adopting examples, but I found the only two fairly relevant to what I wanted too complicated for what I am trying to achieve here. What I am trying to accomplish by getting a piece of code for this figure, is not only the figure itself, but also insight in _how_ TikZ does drawings like these, so I can use it to make similar figures in the future. ![enter image description here](http://i.stack.imgur.com/OEmbx.png)


title: Using hyperref package with index, pdf vs. manuscript pages

text: I am using the hyperref package with the following options:                 \usepackage[breaklinks=true,                   hypertexnames=false,                   linktocpage,                   plainpages=false,                   pdfpagelabels]{hyperref}       I need to select `hypertexnames=false`, as otherwise links to theorems, definitions, etc., go to the wrong chapter. (I.e., a link to Theorem 1.9 might go to Theorem 8.9). However, if I select `hypertexnames=false`, the links in my index go to the pdf page--and not the book page (which, due to front matter, may be more than a 10 page difference). I.e., if I select in the index "Topic X p. 312" it m


title: When is it appropriate to use \paragraph?

text: LaTeX provides seven sectioning commands:   1. `\part`   2. `\chapter`   3. `\section`   4. `\subsection`   5. `\subsubsection`   6. `\paragraph`   7. `\subparagraph`. For most of the documents I write or come across, `\subsubsection` seems to be the deepest sectioning level used. Then there's the "rule" (by Tufte perhaps? I am unable to find the source right now) that suggests that the document outline should not be deeper than three levels, which would leave me somewhere between `\subsection` and `\subsubsection` depending on the document class being used. At any rate, I have not yet come across a use case for `\paragraph` and, thinking about it, I realize I don't know when it would be appropriate to use it. So, that's my question: when, if ever, should `\paragraph` be used?


title: How to put a subscript in the center of two letters

text: I have the following code `\sum_{i<j}^{}\sum Cov(X_i, X_j)` which renders ![formula rendering](http://i.stack.imgur.com/vb3UC.png) How can I move the `i<j` subscript to the center underneath the two sigmas (which will result in a "shift")? Preference will be given to the simplest solution.


title: LaTeX template for Lecture notes

text: Looking for some good templates for creating lecture notes to be given to students. Mainly for computer science subjects. More frequently need short lecture notes.


title: LuaLaTeX: Font table with examples of font files (not system or TEXMF installed)

text: Looking at the answer to the question here, it is _very_ close to what I wanted. What I wanted is to create font table with samples for font files that are not **system** installed or in **TEXMF** trees, but font files that reside in a path or on CD (no sub-folders, just the current folder will do). I am still learning and appreciate your help! Using MiKTeX 2.9 and Windows 7, with LuaLaTeX. * * * EDIT: Inspired by `Taco`'s answer, I have come out with the following (modified from Leo's Code):               \documentclass{article}     \usepackage{fontspec}     \setmainfont{Latin Modern Mono Light}     \usepackage{luacode}     \usepackage[margin=18mm]{geometry}     \parindent=0pt     \usepackage{longtable,makecell}     \renewcommand\arraystretch{2}     \begin{document}     \begin{luacode}     teststring = "0123456789 ABCDEFabcdef"     tex.print(-2, os.getenv('FONTSPEC'))     tex.print('\\\\')     tex.print("\\begin{longtable}{ll}\\hline")     for i,v in ipairs(dir.glob(os.getenv('FONTSPEC'))) do       -- get rid of './' in front of filenames, fontspec don't like that       local f = string.gsub(v, "^./", "")       -- font name       local info = fontloader.info(v)       tex.print('\\makecell[l]{\\bfseries')       tex.print(-2, info.fontname) -- font name here       tex.print('\\\\[-1ex] \\scriptsize')       tex.print(-2, f) -- filename       tex.print('} & \\large\\fontspec{')       tex.print(-2, f)       tex.print('}')       tex.print(teststring)       tex.print('\\\\ \\hline')     end     tex.print("\\end{longtable}")     \end{luacode}     \end{document}      It utilises an environment variable, `FONTSPEC` to specify the font files search pattern, eg. `*.ttf` for TrueType files in the current directory. Note that the **TEX** file needs to be at the same directory where the font files is and the glob pattern is **_CASE SENSITIVE_**! Sample run:               set FONTSPEC=*.ttf     lualatex fontsampler.ltx      Result: ![Font Sampler Example](http://i.stack.imgur.com/zu2s4.png)


title: Font portability between platforms? Windows/Linux

text: If I first work in Windows environment then move to Linux, do I just copy all the fonts in the Windows system font folder into the Linux system font folder? I'll be using xelatex and fontspec.


title: pgfplots: Using Sans Serif Fonts for Numbers and Text (not Variables) in Figures and Diagrams

text: I want to use a sans serif font in figures and diagrams. This also applies to tables (related question). **The normal text should remain roman (with serif).** Here is the normal way one would try to achieve this: ## Solution 1 (not perfect)               \documentclass[]{article}          % Creating beautiful diagrams     \usepackage{pgfplots}          % Figure placement with 'H'     \usepackage{float}          % Better math support     \usepackage{amsmath}          % customize caption of figures and so on     \usepackage[%         font={small,sf}, % <-- Sans Serif option         labelfont=bf,            format=plain,     ]{caption}          \begin{document}          \section*{Standard Options -- Easy to Find}          \begin{figure}[H]     \centering     \begin{tikzpicture}         \begin{axis}[             % options             xlabel={$x$},             ylabel={$y$},             axis x line = middle,             axis y line = middle,               font={\sffamily}, % <-- Sans Serif option              enlargelimits,             ]             %% Plot 1             \addplot+[             % options             no markers,             ] plot coordinates {                 (-1,-1)                 (1,1)                 (4,4)             };             \addlegendentry{Plot 1}             %% Plot 2             \addplot+[             % options               no markers,             smooth,             domain=-2:2,                   ]                {x^2};             \addlegendentry{Plot 2}         \end{axis}         \end{tikzpicture}     \caption{Test caption to demonstrate some effects. Plot 1 shows a linear function and plot 2 shows a curved function. We have $n=2$ plots here.}     \end{figure}          \end{document}      ![enter image description here](http://i.stack.imgur.com/aTQx1.png) This was done using   * `font={\sffamily}` (`axis` option)   * `font={small,sf}` (`caption` package option) The **problem** is that the axis ticks are still not sans serif this is also true for the `2` in the caption. ## Solution 2 (perfect -- but a lot of manual work) So the next solution is to add manual adjustments:               \section*{Manuel Adjustments}          \begin{figure}[H]     \centering     \begin{tikzpicture}         \begin{axis}[             % options             xlabel={$x$},             ylabel={$y$},             axis x line = middle,             axis y line = middle,               font={\sffamily}, % <-- Sans Serif option              enlargelimits,             % manual adjustments             ytick={2,4},             yticklabels={2,4},             xtick={-2,-1,1,2,3,4},             xticklabels={$-$2,$-$1,1,2,3,4},                     ]             %% Plot 1             \addplot+[             % options             no markers,             ] plot coordinates {                 (-1,-1)                 (1,1)                 (4,4)             };             \addlegendentry{Plot 1}             %% Plot 2             \addplot+[             % options               no markers,             smooth,             domain=-2:2,                   ]                {x^2};             \addlegendentry{Plot 2}         \end{axis}         \end{tikzpicture}     \caption{Test caption to demonstrate some effects. Plot 1 shows a linear function and plot 2 shows a curved function. We have %      $n=\text{2}$ % <-- manual adjustments     plots here.}     \end{figure}      ![enter image description here](http://i.stack.imgur.com/3D54I.png) I added               ytick={2,4},     yticklabels={2,4},     xtick={-2,-1,1,2,3,4},     xticklabels={$-$2,$-$1,1,2,3,4},      to the `axis` options and also added `$n=\text{2}$` in the caption (`\text` is provided by the `amsmath` package). The **problem** is the manual work that has to be done. ## Solution 3 (not perfect)               \section*{Changing the \texttt{tick style}}          \begin{figure}[H]     \centering     \begin{tikzpicture}         \begin{axis}[             % options             xlabel={$x$},             ylabel={$y$},             axis x line = middle,             axis y line = middle,               font={\sffamily}, % <-- Sans Serif option              enlargelimits,             % better style             yticklabel={\tick}, % watch out: not yticklabels (no s)              xticklabel={\tick}, % watch out: not xticklabels (no s)              ]             %% Plot 1             \addplot+[             % options             no markers,             ] plot coordinates {                 (-1,-1)                 (1,1)                 (4,4)             };             \addlegendentry{Plot 1}             %% Plot 2             \addplot+[             % options               no markers,             smooth,             domain=-2:2,                   ]                {x^2};             \addlegendentry{Plot 2}         \end{axis}         \end{tikzpicture}     \caption{Test caption to demonstrate some effects. Plot 1 shows a linear function and plot 2 shows a curved function. We have %      $n=\text{2}$ % <-- manual adjustments     plots here.}     \end{figure}      ![enter image description here](http://i.stack.imgur.com/R3Ppk.png) Here I added               yticklabel={\tick}, % watch out: not yticklabels (no s)      xticklabel={\tick}, % watch out: not xticklabels (no s)      but the **problem** is that there are too many zeros. ## Solution 4 (almost perfect)               \begin{figure}[H]     \centering     \begin{tikzpicture}         \begin{axis}[             % options             xlabel={$x$},             ylabel={$y$},             axis x line = middle,             axis y line = middle,               font={\sffamily}, % <-- Sans Serif option              enlargelimits,             % better style             yticklabel={\pgfmathparse{\tick}\pgfmathprintnumber[precision=1,fixed zerofill=false,assume math mode]{\pgfmathresult}},    % watch out: not yticklabels (no s)              xticklabel={\pgfmathparse{\tick}\pgfmathprintnumber[precision=1,fixed zerofill=false,assume math mode]{\pgfmathresult}},    % watch out: not xticklabels (no s)              ]             %% Plot 1             \addplot+[             % options             no markers,             ] plot coordinates {                 (-1,-1)                 (1,1)                 (4,4)             };             \addlegendentry{Plot 1}             %% Plot 2             \addplot+[             % options               no markers,             smooth,             domain=-2:2,                   ]                {x^2};             \addlegendentry{Plot 2}         \end{axis}         \end{tikzpicture}     \caption{Test caption to demonstrate some effects. Plot 1 shows a linear function and plot 2 shows a curved function. We have %      $n=\text{2}$ % <-- manual adjustments     plots here.}     \end{figure}      ![enter image description here](http://i.stack.imgur.com/oDsjK.png) Here I added               yticklabel={\pgfmathparse{\tick}\pgfmathprintnumber[precision=1,fixed zerofill=false,assume math mode]{\pgfmathresult}},    % watch out: not yticklabels (no s)      xticklabel={\pgfmathparse{\tick}\pgfmathprintnumber[precision=1,fixed zerofill=false,assume math mode]{\pgfmathresult}},    % watch out: not xticklabels (no s)      The **problem** is that the minus in the ticks it not set in math mode. The rest looks fine to me. * * * **Question:** How would you solve the problem of having sans serif font for numbers and normal text (not math variables like $x$ or $\gamma$) in the caption and the diagrams? * * * Here is the **complete** `LaTeX` code with all four solutions:               \documentclass[]{article}          % Creating beautiful diagrams     \usepackage{pgfplots}          % Figure placement with 'H'     \usepackage{float}          % Better math support     \usepackage{amsmath}          % customize caption of figures and so on     \usepackage[%         font={small,sf}, % <-- Sans Serif option         labelfont=bf,            format=plain,     ]{caption}          \begin{document}          \section*{Standard Options -- Easy to Find}          \begin{figure}[H]     \centering     \begin{tikzpicture}         \begin{axis}[             % options             xlabel={$x$},             ylabel={$y$},             axis x line = middle,             axis y line = middle,               font={\sffamily}, % <-- Sans Serif option              enlargelimits,             ]             %% Plot 1             \addplot+[             % options             no markers,             ] plot coordinates {                 (-1,-1)                 (1,1)                 (4,4)             };             \addlegendentry{Plot 1}             %% Plot 2             \addplot+[             % options               no markers,             smooth,             domain=-2:2,                   ]                {x^2};             \addlegendentry{Plot 2}         \end{axis}         \end{tikzpicture}     \caption{Test caption to demonstrate some effects. Plot 1 shows a linear function and plot 2 shows a curved function. We have $n=2$ plots here.}     \end{figure}          \section*{Manuel Adjustments}          \begin{figure}[H]     \centering     \begin{tikzpicture}         \begin{axis}[             % options             xlabel={$x$},             ylabel={$y$},             axis x line = middle,             axis y line = middle,               font={\sffamily}, % <-- Sans Serif option              enlargelimits,             % manual adjustments             ytick={2,4},             yticklabels={2,4},             xtick={-2,-1,1,2,3,4},             xticklabels={$-$2,$-$1,1,2,3,4},                     ]             %% Plot 1             \addplot+[             % options             no markers,             ] plot coordinates {                 (-1,-1)                 (1,1)                 (4,4)             };             \addlegendentry{Plot 1}             %% Plot 2             \addplot+[             % options               no markers,             smooth,             domain=-2:2,                   ]                {x^2};             \addlegendentry{Plot 2}         \end{axis}         \end{tikzpicture}     \caption{Test caption to demonstrate some effects. Plot 1 shows a linear function and plot 2 shows a curved function. We have %      $n=\text{2}$ % <-- manual adjustments     plots here.}     \end{figure}          \section*{Changing the \texttt{tick style}}          \begin{figure}[H]     \centering     \begin{tikzpicture}         \begin{axis}[             % options             xlabel={$x$},             ylabel={$y$},             axis x line = middle,             axis y line = middle,               font={\sffamily}, % <-- Sans Serif option              enlargelimits,             % better style             yticklabel={\tick}, % watch out: not yticklabels (no s)              xticklabel={\tick}, % watch out: not xticklabels (no s)              ]             %% Plot 1             \addplot+[             % options             no markers,             ] plot coordinates {                 (-1,-1)                 (1,1)                 (4,4)             };             \addlegendentry{Plot 1}             %% Plot 2             \addplot+[             % options               no markers,             smooth,             domain=-2:2,                   ]                {x^2};             \addlegendentry{Plot 2}         \end{axis}         \end{tikzpicture}     \caption{Test caption to demonstrate some effects. Plot 1 shows a linear function and plot 2 shows a curved function. We have %      $n=\text{2}$ % <-- manual adjustments     plots here.}     \end{figure}               \begin{figure}[H]     \centering     \begin{tikzpicture}         \begin{axis}[             % options             xlabel={$x$},             ylabel={$y$},             axis x line = middle,             axis y line = middle,               font={\sffamily}, % <-- Sans Serif option              enlargelimits,             % better style             yticklabel={\pgfmathparse{\tick}\pgfmathprintnumber[precision=1,fixed zerofill=false,assume math mode]{\pgfmathresult}},    % watch out: not yticklabels (no s)              xticklabel={\pgfmathparse{\tick}\pgfmathprintnumber[precision=1,fixed zerofill=false,assume math mode]{\pgfmathresult}},    % watch out: not xticklabels (no s)              ]             %% Plot 1             \addplot+[             % options             no markers,             ] plot coordinates {                 (-1,-1)                 (1,1)                 (4,4)             };             \addlegendentry{Plot 1}             %% Plot 2             \addplot+[             % options               no markers,             smooth,             domain=-2:2,                   ]                {x^2};             \addlegendentry{Plot 2}         \end{axis}         \end{tikzpicture}     \caption{Test caption to demonstrate some effects. Plot 1 shows a linear function and plot 2 shows a curved function. We have %      $n=\text{2}$ % <-- manual adjustments     plots here.}     \end{figure}          \end{document}


title: How to make \hspace affect all paragraph lines?

text: I'm working on my resume, which I wrote in latex a year or two ago, and now I'm updating it and I'm a lot more rusty than I was expecting. I have a small paragraph that I want shifted over with:               \hspace{2mm}      but that only pushes the initial line and not the whole paragraph, which makes my resume look sloppy and unprofessional.


title: draw function plot with predefined function

text: I want to draw gamma distribution with different shape and scale parameters. The following MWE displayed error. The error information is : ![enter image description here](http://i.stack.imgur.com/HpzqJ.png) Here is MWE:               \documentclass[border=5mm]{standalone}     \usepackage{pgfplots}     \begin{document}          \pgfmathdeclarefunction{gammaPDF}{2}{     \pgfmathparse{1/(#2^#1*gamma(#1))*x^(#1-1)*exp(-x/#2)}     }          \begin{tikzpicture}     \begin{axis}[     width=4cm,      height=3cm,     axis x line=bottom,     axis y line=left     ]     \addplot[     blue!50!white,     mark=none,     domain=0:20,      samples=100,      smooth] {\gammaPDF(9,0.5)};     \end{axis}     \end{tikzpicture}


title: TeXstudio: Building and Compiling Issue

text: I am using TeXstudio, and am running into some difficulties. I have MikTex (evidently this is needed), but it still won't compile. If I add any new content to my LateX document, and then click the green arrow button, it loads an old version of my document, but doesn't include the newly typed content. How can this be fixed?


title: Arrange three images

text: I need to arrange three figures in a two column document as follows ![figure arrangement](http://i.stack.imgur.com/6MWsc.png)


title: Universal `\cite` commands or defining new cite commands

text: I would like to know the best practice to get "universal" cite commands. Across the different articles, I have written, each has had a different template for a different publication venue. And, each template seems to be paired with their own unique commands for citations: `\cite`, `\autocite`, `\citep`, `\citeN`, `\citeyear`, _etc_... In the spirit of separating content and styling, I would like to make it so that I can easily switch templates, without having to --Replace All-- of one cite command for another. So, my question is this: What is the best tactic to obtain universal cite commands? Does the choice of BibTex or BibLatex make a difference with regards to cite commands? Or should I define new commands that make use of template defined commands. In addendum, I would like to ask, if defining new commands is the way to go, can you please supply an example of how to define new commands making use of existing cite commands? Hope this is clear. Thanks in advance! =) * * * UPDATE: I see that `\autocite` allows for one to choose the formatting of the command to produce parenthesis or footnote citations. This is, however, not the functionality that I seek. For example, if we look at the ACM latex template (acmsmall): http://www.acm.org/publications/latex_style/ The documentation states the following, "If you mention the work explicitly in your prose, you should use `\citeN` command. This command generates for example, Nielson [1985] discusses denotational program transformations. Or, you use `\citeyear` and say that Nielson [1985] discusses them." The documentation continues to define other commands like `\citeNP` also. If I format my text using these commands, but then switch templates, I must replace all the citation commands, depending on what is defined by the other templates. What I would like to do is define my own abstraction layer of commands, that I can change to adhere to each of the different templates. If I use `\citeN` at the start of my sentence, but the next template doesn't define this command, I would like to define it myself. Thereby slowly building up a set of citation commands that are "universal". Is this the best practice, or is there a better way to go about this? I see the possibility of declaring cite commands in: renewcommand \cite[99]{Turing} vs. \cite{Turing} Please let me know if there is more confusion.


title: How do I type a single bracket?

text: How do you produce a single bracket in LaTeX? I just want to insert a " [ " without closing the bracket. Is there a way to do this?


title: Conflict between eplain urls and pgf(math)

text: I tried to insert a hyperlink with xetex and eplain, and here is what happens.               \input eplain     \enablehyperlinks     \input pgfmath     \href{http://www.google.com}{google}          \bye      prints this weird error in the log file:               ! Undefined control sequence.     \color ...gfsysprotocol@bufferedtrue \pgfsetcolor                                                        {.}\expandafter \pgfsys@ou...          \temp ->\color [                     cmyk]{0.28,1,1,0.35}     \after@hl@getparam ...]{\hl@opt@color }}\fi \temp                                                        \fi \fi \hl@driver      \@hl@getparam ...\@hllabel {#1}\after@hl@getparam                                                        \ignorespaces      \@@href ...f@end@ext \hlstart@impl {hrefext}{#1#2}                                                       \fi \@@@href      l.4 \href{http://www.google.com}                                     {google}      With "normal" pgf,               \input eplain     \enablehyperlinks     \input pgf     \href{http://www.google.com}{google}          \bye      the document compiles with this error:               Package pgfbase: Error! Unsupported color model `'. Sorry.      and writes a weird pdf file ![enter image description here](http://i.stack.imgur.com/9XOsD.png) (the same happens if I load pgf before eplain)


title: Forcing text into a document with class

text: I'm creating a style sheet for my organizations memos and reports. I need to include a disclaimer type of statement into ever report created with the style. I'm uses a class document (*.cls) based off of the basic article class. Is there a way to force a statement to appear in every report? I do not want it on every page just at the beginning or end of every document, preferably at the end.


title: Space between two column minipages

text: I'm using the OpenFonts version in this repository, which is a resume template for CS majors: https://github.com/deedydas/Deedy-Resume In the resume template, there are two column minipages created, with each column meant to have several subsections, such as Education, Links, Coursework in the first column and Experience, Research, Awards, Societies in the next column. I want to increase the space between the two columns and I tried the solutions to several questions here to set the space between two minipages, but none of them worked. How do I set the space between the minipages here? I fiddled around with the code a lot, and I've seen several variations happen, including the overflow issue the repo owner mentions in the README. EDIT: Here's a minimal .xtx file. `deedy-resume-openfont.cls` is the class file.               \documentclass[]{deedy-resume-openfont}          \begin{document}          \lastupdated          \namesection{Debarghya}{Das}{ \urlstyle{same}\url{http://debarghyadas.com} \\     \href{mailto:dd367@cornell.edu}{dd367@cornell.edu} | 607.379.5733     }          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %     %     COLUMN ONE     %     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \begin{minipage}[t]{0.33\textwidth}           % Sections like Education, Links, Coursework over here               \end{minipage}     \hfill     \begin{minipage}[t]{0.66\textwidth}          %Sections like Experience, Research, Awards, Societies over here          \end{minipage}     \end{document}  \documentclass[]{article}


title: 'Questions about my cv and cover letter', changing formatting of template

text: I know I'm not supposed to post questions under others' topics, so here is my question regarding the CV and cover letter template in: Questions about my cv header and cover letter and here is the code that I'm trying to modify:               \documentclass[11pt,a4paper]{moderncv}     \moderncvtheme[green]{classic}                       \usepackage[utf8]{inputenc}                       \usepackage{floatflt}     \usepackage{fancyhdr}      \usepackage{geometry}     \geometry{a4paper,left=2cm,right=1cm, top=2cm, bottom=1.5cm,headheight=21pt}      \usepackage{tikz}      \usepackage{wrapfig}     \usepackage{lipsum}           % Suppress final dot in \cventry     % Suppress final dot in \cventry     \renewcommand*\cventry[7][.25em]{%       \cvitem[#1]{#2}{%         {\bfseries#3}%         \ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}%         \ifthenelse{\equal{#5}{}}{}{, #5}%         \ifthenelse{\equal{#6}{}}{}{, #6}%         \strut%         \ifx&#7&%           \else{\newline{}\begin{minipage}[t]{\linewidth}\small#7\end{minipage}}\fi}}     % New page style     \fancypagestyle{myfancy}{     \fancyhead[L]{\parbox[t]{.3333\textwidth}{\sffamily\footnotesize       Address Line 1\\Address Line 2}}     \fancyhead[C]{\parbox[t]{.3333\textwidth}{\fixedphonesymbol\sffamily\footnotesize  555-123-456-789}}     \fancyhead[R]{\parbox[t]{.3333\textwidth}{\emailsymbol\sffamily\footnotesize  abcd@tex.stackexchange.com}}     }     \makeatletter     \let\ps@plain\ps@myfancy     \let\ps@empty\ps@myfancy     \makeatother     \pagestyle{myfancy}          \makeatletter     \renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}     \makeatother          \firstname{Prename\\[.2ex]}     \familyname{\unskip Surname}     \title{Curriculum vitae}                   \address{}{}       \photo[128pt]{picture}                                  \begin{document}          \makecvtitle     born 99.11.999 in smallcity          \section{school education}          \cventry{1996- 2008}{Abitur}{School City}{}{}{grade: x,x}       \cventry{1996--2000}{elementary school}{}{}{}{Grundschule somewhere}     \section{studies}          \cventry{02.10.2011-- today}{matriculation Master of Science in xxx}{}{}{}{Joint Masters Program in whatever}     \cventry{07.04.2011}{finishing of Bachelor studies}{}{}{}{grade: x,x title: Bachelor of Science whatever}     \cventry{02.12.2010-01.02.2011}{student assistant}{}{}{}{Chair of xxx  Prof. Dr. xxx \newline student assistant as a tutor of xxx}     \cventry{21.07.2008--29.09.2011}{matriculation Bachelor of Science xxx}{}{}{}{university of xxx}     \section{Bachelor thesis}     \cvline{title}{\emph{Here comes a long title}}     \cvline{supervisor}{Prof. Dr. xxxxx}     \cvline{date}{february 2011}     \cvline{grade}{1.0}          \section{languages}     \cvlanguage{german}{mother tongue}{}     \cvlanguage{english}{fluent}{}          \section{technical knowledge}          \cvline{basic}{Stata, SPSS}     \cvline{expert}{R}          \cvline{miscellaneous}{LaTex, Microsoft Office, Microsoft Dynamics}                \clearpage          \begin{tikzpicture}[remember picture,overlay]     \draw[color1,line width=10pt]        ([yshift=-55pt]current page.north west) -- +(14cm,0pt);     \end{tikzpicture}     \recipient{HR Departmnet}{Corporation\\123 Pleasant Lane\\12345 City, State}      \date{\today}      \opening{Dear Sir or Madam,}      \closing{Sincerely yours,}      \enclosure[Attached]{curriculum vit\ae{}}           \makelettertitle           \lipsum[1-3]           \makeletterclosing          \end{document}      Gonzalo Medina's above answer gives a lovely template, but I would like to modify the formatting under 'school education'. Right now, if I write `\cventry{1}{2}{3}{4}{5}{6}` under 'school education', 2 is bold and 3 is in italics by default. I was wondering how to customise the all the formatting of `\cventry`. I'm not really sure how to adjust the code in Gonzalo Medina's answer because it's a little unwieldy.


title: I can't get my text to be italic on a poster

text: There is a few words that I want to make italic/ emphasized on a poster. I have tried `\textit{State}`, `\it{State}`, `{\itshape State}`, and `\emph{State}` and nothing works. I am using `\usepackage{garamond}` in my preamble. I don't know if that's what's affecting it or not. Please help. Here's some of the file: Thank you! Here's the file:               \documentclass[landscape,custom]{sciposter}     \usepackage[all,poly]{xy}     \usepackage{epsfig}     \usepackage{amsmath,amsfonts,graphpap,setspace}     \usepackage{amssymb,amsthm}     \usepackage{multicol}     \usepackage{tikz}     \usetikzlibrary{shapes,decorations,backgrounds}     \usetikzlibrary{plotmarks}          \theoremstyle{plain}     \newtheorem{thm}{Theorem}     \newtheorem{prop}[thm]{Proposition}     \newtheorem{lem}[thm]{Lemma}     \newtheorem{cor}[thm]{Corollary}     \newtheorem{problem}[thm]{Problem}     \newtheorem{alg}[thm]{Algorithm}     \newtheorem{conj}{Conjecture}     \theoremstyle{definition}     \newtheorem{defn}[thm]{Definition}     %\newtheorem*{remark}{Remark}     \newtheorem{exmp}[thm]{Example}     \definecolor{BoxCol}{rgb}{0,.44,.53}     \definecolor{SectionCol}{rgb}{1,1,1}          \usepackage{garamond}          \bibliographystyle{plain}          \title{Predicting the Future of Coral Reefs: A Simulation Approach}     \author{Chelsey Beese}     \institute{Department of Mathematics and Statistics}     \date{}     \leftlogo[1.5]{CCU}     \conference{{\bf Math 490}}          \setlength{\parindent}{2em}     \setlength{\parskip}{2ex}     \setlength{\topsep}{2ex}          \begin{document}          \maketitle          \begin{multicols}{3}          \section{Model Set Up and Initialization}          The spatial domain consists of a 2500 by 2500 grid of $1 \mbox{ cm}^2$      regular hexagonal cells covering a total area of $625 \mbox{ m}^2$.     Each cell is inhabited by a single organism, denoted by the     %HERE'S WHERE I WANT THE ITALICS%     \texit{cell state}, which can vary over time based on stochastic rules and     the inhabitants of neighboring cells. Cell states are updated on a yearly     basis. The cell size reflects the approximate size of a single coral polyp     rather than imposing an unnatural scale on the system \cite{Soong1993}.     Corals are colonial organisms composed of a group of individual fleshy     polyps that are connected by a layer of thin connective tissue and secrete     a common calcareous skeleton. Therefore, a single organism can span     multiple cells.          \end{multicols}          \end{document}      Sorry everyone, I'm really new to all of this!


title: The printing of biblatex' [prenote] in citation commands

text: As per the `biblatex` documentation page 92: > All citation commands generally take one mandatory and two optional > arguments. The [prenote] is text to be printed at the beginning of the > citation. This is usually a notice such as ‘see’ or ‘compare’. I've noticed, however, that the [prenote] argument doesn't always come at the beginning of the citation, as seen with the `\textcite` command below:               \documentclass{article}     \usepackage[style = authoryear, backend = biber ]{biblatex}     \addbibresource{test.bib}          \begin{document}          \noindent{This is very interesting, \cite[see][]{brunner1965}.}\\     This is very interesting, \textcite[see][]{brunner1965}.\\     This is very interesting \parencite[see][56]{brunner1965}.\\          \end{document}      ![enter image description here](http://i.stack.imgur.com/oHojW.png) Is this behavior intentional, or is it a bug?


title: Suppressing page number in list of abbreviations in LaTeX report

text: I have a LaTeX report as follows in a file called `Main.tex`:               documentclass[a4paper,10pt]{report}          \usepackage[acronym,nomain]{glossaries}          \makeglossaries          \begin{document}          \tableofcontents     \listoffigures     \listoftables     \input{Glossary}          \input{ChapterX}     \input{ChapterY}     \input{ChapterZ}          \end{document}      And I'm trying to create a list of abbreviations from the file `Glossary.tex` which is imported into `Main.tex`. `Glossary.tex` is simply:               \chapter*{List of abbreviations}     \newacronym{jdbc}{JDBC}{Java database connectivity}     \newacronym{jsp}{JSP}{Java server pages}     \newacronym{sql}{SQL}{Structured query language}     \printglossaries     \addcontentsline{toc}{chapter}{List of abbreviations}       After doing this I am supposed to run this instruction at the Windows command line in the same folder as the LaTeX files:               makeglossaries main.tex       But what I do find is that the abbreviations display with page numbers like this;               JDBC Java database connectivity. 14      So how can I surppress the page numbers and is it possible to use two columns for the abbreviations?


title: Display top border of table using csvreader

text: I am using csvreader from the csvsimple package to generate a table in my document. I am struggling to get a top border on the table. Here is the code, including writing the .csv               \documentclass{article}     \usepackage{csvsimple}          % Make csv in question     \begin{filecontents*}{scientists2.csv}     name,surname,     Albert,Einstein,     Marie,Curie,     Thomas,Edison     \end{filecontents*}          \begin{document}          \begin{center}     \csvreader[tabular=|l|l|,         table head=\textbf{ First Name} & \textbf{Last Nmae} \\\hline,         late after line = \\\hline]%     {scientists2.csv}{name=\name,surname=\surname}%     {\name & \surname}%          \end{center}               \end{document}       What argument can I pass (to tabular?) to see the top border? I am using TexWorks to compile. Thanks,


title: Why does loading tikz before calling "driver=dvips" make a difference

text: This question doesn't entirely make sense because I know I don't need to call `driver=dvips`. But I would like to know whether anyone can explain what's happening. _A little background_ I'm trying to learn `tikz`. So, I decided to take some old documents containing---what I thought were simple---graphics I created using `pstricks` and rewrite them using `tikz`. Being a creature of habit, I was going the `latex->dvips->ps2pdf` (I have a shell script which handles this. So, this is usually very unconscious on my part.) But then I was trying things with `tikz` (such as using `spy`) which didn't seem to like this route. I remembered I should just being using `pdflatex` with `tikz`. Also, I'd forgotten about some of the other bells-and-whistles I normally load to get `pstricks` to work correctly: one of which was to load the driver `dvips`. So this is what I noticed: If I compile (using `pdflatex`) this first MWE, everything works quite well--- even though I'm calling the driver `dvips`. (The `tikz` code is from van Dongen's new book.)               \documentclass{article}     \usepackage[driver=dvips,                 landscape,                 twocolumn,                ]{geometry}     \usepackage{tikz}     \usetikzlibrary{spy}     \usepackage{showframe}     \usepackage{lipsum}     \begin{document}          \begin{tikzpicture}         [spy using outlines={circle,                              magnification=2.5,                              size=3cm,                              connect spies}]         \begin{scope}         [spy using outlines={circle,                              magnification=3,                              size=3.5cm,                              red,                              connect spies}]         \draw (-36:0.8)               \foreach \angle in {0,36,...,359}{                     -- (\angle:0.8)                        (\angle:1.1) node {$\angle$}                        (0,0) -- (\angle:0.8)                 };             \spy on (167:1) in node (zoom) at (-30:5.5);         \end{scope}         \spy[blue] on (zoom) in node [right] at (-135:4.5);          \end{tikzpicture}          \lipsum[1-5]          \end{document}      But I was sloppy with loading packages once and got frustrated that my `landscape` directive to `geometry` seemed to be ignored in the final pdf document. Here's the MWE for this **fail** where the only difference with the previous MWE is when I call `\usepackage{tikz}`. (Still compiling using `pdflatex`.)               \documentclass{article}     \usepackage{tikz}     \usepackage[driver=dvips,                 landscape,                 twocolumn,                ]{geometry}     \usetikzlibrary{spy}     \usepackage{showframe}     \usepackage{lipsum}     \begin{document}          \begin{tikzpicture}         [spy using outlines={circle,                              magnification=2.5,                              size=3cm,                              connect spies}]         \begin{scope}         [spy using outlines={circle,                              magnification=3,                              size=3.5cm,                              red,                              connect spies}]         \draw (-36:0.8)               \foreach \angle in {0,36,...,359}{                     -- (\angle:0.8)                        (\angle:1.1) node {$\angle$}                        (0,0) -- (\angle:0.8)                 };             \spy on (167:1) in node (zoom) at (-30:5.5);         \end{scope}         \spy[blue] on (zoom) in node [right] at (-135:4.5);               \end{tikzpicture}          \lipsum[1-5]          \end{document}      There are no problems if I get rid of the `driver=dvips` call. So, please no explanations that I don't need that driver. But what I would like to know is: why there's only an apparent conflict with the driver if `tikz` is called before I call the driver?


title: Pandoc and docx (Word for Mac 2011)

text: I'm trying to use Pandoc to convert Markdown with LaTeX math in it ($\alpha$, etc) into Word docx, but every equation I enter comes out broken in the resulting docx file. I even tried using the official demo (#30) for this with the supplied command:               pandoc -s math.tex -o example30.docx      But the resulting example30.docx still opens with the math broken. ![Screenshot of result](http://i.stack.imgur.com/QGWp1.png) I don't see anything in the issue tracker for Pandoc about this. Is this a known problem, or is it likely to be something on my end (some boneheaded mistake I'm making, perhaps)? I'd be grateful for any pointers or suggestions.


title: Difference between commenting out empty lines and \noindent?

text: My question is similar to this one but I understand the behavior described there and am interested in best practices in cases like the following. Typically, when ending an environment like `quote` in the body of my documents, I've always left a blank line after the environment (it improves code readability for me to separate environments from the main text in this way) and suppressed the paragraph indentation with `\noindent`. Like so:               \documentclass{article}          \begin{document}          Some body text. Let's introduce a quote:%     %     \begin{quote}     Some quote text.     \end{quote}          \noindent Some text following the quote.          \end{document}      Now, I recently realized (no idea why it took me so long) that I could simply comment out the empty line and save myself from littering a bunch of `\noindent`s all over my document. So now I do this:               \documentclass{article}          \begin{document}          Some body text. Let's introduce a quote:%     %     \begin{quote}     Some quote text.     \end{quote}     %     Some text following the quote.          \end{document}      What I am interested in now is whether there are any substantive differences between the two approaches given above that might lead me to prefer one over the other (this is in the spirit of some of my recent questions like inline math or \textit for author defined math constants). Are there?


title: Tick numbers on x and y axis

text: How can I draw the x and y axis so that latex displays the tick numbers on it? (1 unit) I try:               \begin{center}     \begin{tikzpicture}[scale=0.5]     \draw[very thick,blue] (3,-4) ellipse ({4} and {3});     \end{tikzpicture}     \end{center}


title: How to use datatool package to read a CSV files so that they can be used in tables?

text: I am new in latex and I have some issues. I want to read a .csv file in latex to create a table, but I don't know how. I heard that **datatool** package can do this, but I don't know how to use it. My input is smth like this:               ,w5,w6,w7,w8,w9,w10,w11,w12,w13,w14,w15,w16,w17,w18,w19,w20,w21,w22,w23,w24     ,25,23,13,14,15,39,36,4,37,11,26,13,34,39,40,22,33,32,9,5     ,56,31,45,31,38,41,59,26,,44,52,33,,42,,28,51,41,28,36      Thank you! **Update:** I think I found the answer of how to create a table based on a csv file. The name of the packages is actually csvtools.


title: How to prevent LTXexample from ignoring the paragraph indentation?

text: How to prevent `LTXexample` from ignoring the paragraph indentation?               \documentclass[preview,border=3pt]{standalone}     \usepackage{etoolbox}     \edef\keptparindent{\the\parindent}     \patchcmd{\preview}       {\ignorespaces} %%% \preview ends with \ignorespaces (egreg's patch)       {\parindent\keptparindent\ignorespaces}       {}{}          \usepackage{accsupp}     \newcommand*{\noaccsupp}[1]{\BeginAccSupp{ActualText={}}#1\EndAccSupp{}}          \usepackage{xcolor}     \usepackage{showexpl}     \lstset     {         numbers=left,         numbersep=1em,         numberstyle=\tiny\color{white}\noaccsupp,% to hide number lines         frame=single,         framesep=\fboxsep,% expands outward, cannot affect if frame=none         framerule=\fboxrule,% expands outward, cannot affect if frame=none         rulecolor=\color{red},% cannot affect if frame=none         xleftmargin=\dimexpr\fboxsep+\fboxrule\relax,         xrightmargin=\dimexpr\fboxsep+\fboxrule\relax,         breaklines=true,         breakindent=0pt,         tabsize=2,         columns=flexible,         language={[LaTeX]TeX},         basicstyle=\small\ttfamily\hbox{},         keywordstyle=\color{blue},         backgroundcolor=\color{cyan!10},         pos=b,         explpreset={},     }          \begin{document}     \begin{LTXexample}     The position of a particle moving along the $x$-axis is given as     \[     s_t=s_0+v_0t+\frac 1 2 at^2     \]     where $s_0$, $v_0$, $a$, and $t$ represent the initial position, initial speed, acceleration, and the time, respectively.     Even though you are not interested in physics, please be quiet.          And now \ldots     \end{LTXexample}          Indented line \ldots (egreg's patch works!)          \noindent Noindented line \ldots     \end{document}      ![enter image description here](http://i.stack.imgur.com/GVYEp.png) ## Note At the time I wrote this question I thought it was relevant to my problem here (click). In fact it was not. I leave the patch code intact for a historical reason and make a related link work.


title: Display bracket and a text line in the same line

text: I want to get the following : ![enter image description here](http://i.stack.imgur.com/83NG5.png) For this I have used the the following code:               \documentclass{book}     \usepackage{enumerate}     \begin{document}     \begin{enumerate}     \item First item     \item Second item     \end{enumerate}     [Hint:     \begin{enumerate}      \item Hint for first item      \item Hint for Second item     \end{enumerate}]     \end{document}      which produces :   ![enter image description here](http://i.stack.imgur.com/YgRxu.png) How can I do the exact result which I want ?


title: Getting an "undefined tab position" error in tabbing environment

text: I'm not entirely sure what I'm doing wrong here, I'm using a `\kill`'d line to mark the tabs first, but it's still giving me an undefined tab position error. The error is reported for line 0 so I'm not sure which of these is causing it.               \begin{framed}     \begin{tabbing}     tabs \= tabs \= tabs \kill     Give $a$ the value 2.     Give \emph{prime} the value $T$.     While $a \leq \sqrt{n}$ and \emph{prime} $= T$     \> if $a$ divides $n$     \> \> then give \emph{prime} the value $F$     \> \> else increase the value of $a$ by 1.     \end{tabbing}     \end{framed}          \begin{framed}     \begin{tabbing}     tabs \= tabs \= tabs \kill     Give $a$ the value $m$, and $b$ the value $n$.     Find remainder $r$ of $a$ divided by $b$.     While $r \neq 0$:     \> assign $a$ the value $b$     \> assign $b$ the value $r$     \> recompute the remainder when     \> $a$ is divided by $b$.     Give $d$ the value of $b$.     \end{tabbing}     \end{framed}      Can anybody tell me what I'm doing wrong?


title: Insert raw LaTeX between beamer slides, using pandoc markdown

text: I'd like to insert some raw latex (in my case `\appendix`) between two frames in a beamer presentation. Normally, any latex code in the markdown document is passed through into the final `.tex` document, but it is placed within the frame. My input:               First Frame     ===========          Some stuff          \appendix          Appendix Frame     ==============          More stuff      Output:               \begin{frame}{First Frame}          Some stuff          \appendix          \end{frame}          \begin{frame}{Appendix Frame}          More stuff          \end{frame}      And my desired output is to have the `\appendix` come after the first `\end{frame}`. Is there a way to explicitly end the frame environment? Of course adding `\end{frame}` to the markdown file leaves me with two `\end{frame}` lines in the tex file.


title: aligned multi-line equation with intertext and block-wise numbering

text: I try to reproduce the output that is generated by:               \begin{equation}         \begin{aligned}         (x-x_1)^2 + (y-y_1)^2 & = r_1^2 \\         (x-x_2)^2 + (y-y_2)^2 & = r_2^2 \\         (x-x_3)^2 + (y-y_3)^2 & = r_3^2 \\         \end{aligned}         \label{label a}     \end{equation}     Additional lines:     \begin{equation}         \begin{aligned}         (x-x_k)^2 + (y-y_k)^2 & = r_k^2              \end{aligned}         \label{label b}     \end{equation}      but make the two aligned blocks use the same alignment (as if it was just one align block. I tried to do this with just one align block + intertext for the line of text in the middle. But this gave me 4 lines of equation with 4 individual numbers which is not desired. Thanks for your help and sorry for my bad english.


title: PDF contains incorrect bookmark hierarchy

text: After compiling my LaTeX document to PDF, I noticed that its internal bookmarks were using an incorrect hierarchy. Compare the bookmarks tree to the table of contents below: ![TOC](http://i.stack.imgur.com/fwERl.png) ![Bookmarks](http://i.stack.imgur.com/f5gjE.png) How can this happen and how do I fix it? I never tinkered with the bookmarks system manually. * * * Here's a Minimal Working Example:               \documentclass[a4paper,oneside]{report}     \usepackage[a4paper]{geometry}     \usepackage[dutch,english]{babel}     \usepackage{subfigure}     \usepackage{graphicx}     \usepackage{lscape}     \usepackage[font={it,sf},labelfont=bf]{caption}     \usepackage[usenames,dvipsnames]{xcolor}          \usepackage[colorlinks=true,linkcolor=black,citecolor=red,urlcolor=red]{hyperref}     \title{AAA}     \author{AAA}     \date{AAA}          \begin{document}     \maketitle          \null     \vfill     \thispagestyle{empty}               \abstract          \chapter*{Introduction}     \addtolength{\parskip}{10px}     \setlength{\parindent}{0cm}     \pagenumbering{roman}          \newpage     \selectlanguage{english}     \addtolength{\parskip}{-10px}     \tableofcontents          \addtolength{\parskip}{10px}     \chapter{A}     \pagenumbering{arabic}          \section{AA}               \subsection{AAA}               \subsection{AAB}               \section{AB}               \section{AC}               \subsection{ACA}               \subsection{ACB}               \section{AD}               \newpage     \section{AE}               \chapter{B}          \section{BA}               \section{BB}               \subsection{BBA}               \section{BC}               \subsection{BCA}               \section{BD}               \subsection{BDA}               \subsection{BDB}               \subsection{BDC}               \section{BE}          \chapter{C}          \setcounter{chapter}{0}     \renewcommand{\thechapter}{\Alph{chapter}}     \chapter{D}     \selectlanguage{dutch}     \section{DA}          \subsection{DAA}               \subsection{DAB}               \subsection{DAC}               \subsection{DAD}               \subsection{DAE}               \subsection{DAF}               \subsection{DAG}          \newpage     \bibliographystyle{plain}          \end{document}      * * * And here is the file list:                *File List*       report.cls    2007/10/19 v1.4h Standard LaTeX document class       size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)     geometry.sty    2010/09/12 v5.6 Page Geometry       keyval.sty    1999/03/16 v1.13 key=value parser (DPC)        ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)       ifvtex.sty    2010/03/01 v1.5 Detect VTeX and its facilities (HO)      ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional     geometry.cfg        babel.sty    2008/07/08 v3.8m The Babel package      bblopts.cfg    2006/07/31 v1.0 MiKTeX 'babel' configuration        dutch.ldf    2005/03/30 v3.8i Dutch support from the babel system      english.ldf    2005/03/30 v3.3o English support from the babel system     subfigure.sty    2002/07/30 v2.1.4 subfigure package     subfigure.cfg     graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)     graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)         trig.sty    1999/03/16 v1.09 sin cos tan (DPC)     graphics.cfg    2007/01/18 v1.5 graphics configuration of teTeX/TeXLive       pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX     infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)      ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)       lscape.sty    2000/10/22 v3.01 Landscape Pages (DPC)      caption.sty    2012/02/19 v3.2f Customizing captions (AR)     caption3.sty    2012/01/12 v1.4b caption3 kernel (AR)       xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)        color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive     dvipsnam.def    1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)     hyperref.sty    2012/05/13 v6.82q Hypertext links for LaTeX     hobsub-hyperref.sty    2012/04/25 v1.12 Bundle oberdiek, subset hyperref (HO)     hobsub-generic.sty    2012/04/25 v1.12 Bundle oberdiek, subset generic (HO)       hobsub.sty    2012/04/25 v1.12 Construct package bundles (HO)     ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)      intcalc.sty    2007/09/27 v1.1 Expandable calculations with integers (HO)     etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)     kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO)     kvdefinekeys.sty    2011/04/07 v1.3 Define keys (HO)     pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)     pdfescape.sty    2011/11/25 v1.13 Implements pdfTeX's escape features (HO)     bigintcalc.sty    2012/04/08 v1.3 Expandable calculations on big integers (HO)       bitset.sty    2011/01/30 v1.1 Handle bit-vector datatype (HO)     uniquecounter.sty    2011/01/30 v1.2 Provide unlimited unique counter (HO)     letltxmacro.sty    2010/09/02 v1.4 Let assignment for LaTeX macros (HO)      hopatch.sty    2011/06/24 v1.1 Wrapper for package hooks (HO)     xcolor-patch.sty    2011/01/30 xcolor patch     atveryend.sty    2011/06/30 v1.8 Hooks at the very end of document (HO)     atbegshi.sty    2011/10/05 v1.16 At begin shipout hook (HO)     refcount.sty    2011/10/16 v3.4 Data extraction from label references (HO)      hycolor.sty    2011/01/30 v1.7 Color options for hyperref/bookmark (HO)     kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)       pd1enc.def    2012/05/13 v6.82q Hyperref: PDFDocEncoding definition (HO)     hyperref.cfg    2002/06/06 v1.2 hyperref configuration of TeXLive          url.sty    2006/04/12  ver 3.3  Verb mode for urls, etc.      hpdftex.def    2012/05/13 v6.82q Hyperref driver for pdfTeX     rerunfilecheck.sty    2011/04/15 v1.7 Rerun checks for auxiliary files (HO)     supp-pdf.tex      nameref.sty    2010/04/30 v2.40 Cross-referencing by name of section     gettitlestring.sty    2010/12/03 v1.4 Cleanup title references (HO)      problem.out      problem.out      ***********      * * * It appears that these two lines are wreaking havoc:               \setcounter{chapter}{0}     \renewcommand{\thechapter}{\Alph{chapter}}


title: Rotating a set of pictures aligned in multiple rows

text: I made a figure that displays 2x3 images. However, I would like the whole figure, except the caption, to be rotated for 90 degrees. Here is the code that I tried to adjust by 'rotatebox' command:               \begin{figure}[]              \centering      \rotatebox{90} {                   \subfigure[]{\includegraphics[width=0.34\textwidth]{a.pdf}}     \subfigure[]{\includegraphics[width=0.32\textwidth]{b.pdf}}     \subfigure[]{\includegraphics[width=0.28\textwidth]{c.pdf}}        \subfigure[]{\includegraphics[width=0.32\textwidth]{d.pdf}}     \subfigure[]{\includegraphics[width=0.33\textwidth]{e.pdf}}     \subfigure[]{\includegraphics[width=0.32\textwidth]{f.pdf}}      }      \caption{ myCaption             }      \end{figure}      The above code displays pictures rotated, by aligned in only 1 column, one after another. I tried placing '\\' after c.pdf, but it reported error "Something is missing". What would be the way to obtain a 2x3 figure rotated for 90 degrees?


title: LyX 2.1.1 does not recognizing verbatim environment

text: I updated to `LyX 2.1.1` and have issues with previous versions created files. `LyX 2.1.1` throws the following error:               does not recognizing verbatim environment      I wonder how to overcome this issue. Any help will be highly appreciated. Thanks


title: Help with Australian Method Coding

text: Hi I want to write a topic on factoring by using the Australian method. Do anyone know how to code that in latex? A picture of what I mean: ![enter image description here](http://i.stack.imgur.com/zGqpd.jpg)


title: Preventing argument expansion

text: TikZ is able to define parametrized styles using arguments like `#1`. If used in `\newcommand` or `\newenvironment`, they mix up with the arguments of the command. The effect is so severe that the following example will not even compile, but cause TeX to stall. Is there a way to prevent command argument expansion and delay it to be handled by TikZ?               \documentclass{standalone}     \usepackage{tikz}     \newenvironment{fancypicture}[1]{       \begin{tikzpicture}[           fancy/.style={circle, draw, fill=#1}           % The line above here poses the problem.           % Instead of \newenvironment, this #1 shall be left to be handled by TikZ.         ]         \node [fancy=red] at (0, 2) {#1};     }{       \end{tikzpicture}     }          \begin{document}     \begin{fancypicture}       \node [draw] {s};     \end{fancypicture}     \end{document}      I know that it would help to put the style declaration in a top-level `\tikzset`. But that would make it global to all pictures in the document, which I want to avoid.


title: problem with Shorthand for Scope Environments

text: I try in this in this question to use some shorthands with the library `scopes`. I discover some difficulties and I can't explain why I get problems. (I use pgf 2.1 cvs) The main code comes from the pgfmanual               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{scopes}      \begin{tikzpicture}       { [ultra thick]         { [red]           \draw (0mm,10mm) -- (10mm,10mm);           \draw (0mm,8mm)  -- (10mm,8mm);     }         \draw (0mm,6mm) -- (10mm,6mm);       }       { [green]         \draw (0mm,4mm) -- (10mm,4mm);         \draw (0mm,2mm) -- (10mm,2mm);         \draw[blue] (0mm,0mm) -- (10mm,0mm);       }     \end{tikzpicture}     \end{document}       This is perfect. Now I want to draw three times these lines               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{scopes}     \begin{document}     \begin{tikzpicture}      \foreach \i in {0,5,10}{%       \begin{scope}[xshift=\i cm]           { [ultra thick]              { [red]                \draw (0mm,10mm) -- (10mm,10mm);                \draw (0mm,8mm)  -- (10mm,8mm);          }              \draw (0mm,6mm) -- (10mm,6mm);            }            { [green]              \draw (0mm,4mm) -- (10mm,4mm);              \draw (0mm,2mm) -- (10mm,2mm);              \draw[blue] (0mm,0mm) -- (10mm,0mm);            }            \end{scope}}     \end{tikzpicture}     \end{document}       ￼This is always perfect but now if I replace `\begin{scope} ...\end{scope}` by `{..}`, the code compiles but the scopes disappear.               \begin{tikzpicture}      \foreach \i in {0,5,10}{%       {[xshift=\i cm]           { [ultra thick]              { [red]                \draw (0mm,10mm) -- (10mm,10mm);                \draw (0mm,8mm)  -- (10mm,8mm);          }              \draw (0mm,6mm) -- (10mm,6mm);            }            { [green]              \draw (0mm,4mm) -- (10mm,4mm);              \draw (0mm,2mm) -- (10mm,2mm);              \draw[blue] (0mm,0mm) -- (10mm,0mm);            }            }}     \end{tikzpicture}       I know that `{` is the beginning of a TikZ's scope only if `[` comes after `{ otherwise`{..}` is a simple TeX's group. Is-it possible to explain this problem?


title: ExerciseSelect with counter as key

text: I would like to use ExcerciseSelect to choose some questions in order to create different assignments. I have more than 140 different questions. Ideally I would like to make something like student 1 has questions 1,11,21,...131; student 2 has questions 2,12,22..., 132 and so on. I took a look at some related post, but it seems like sueing as key is not straightforward. Here is what I do:               \documentclass{article}     \usepackage{exercise}          \begin{document}          \newcounter{myquestion}     Here are some short exercises :          \ExerciseSelect[counter={1}]          \begin{Exercise}[counter={myquestion}]        Prove that $1+1=2$.      \end{Exercise}          \begin{Exercise}[counter={myquestion}]        Prove that $1+1+1=3$.      \end{Exercise}               \ExerciseStopSelect          \end{document}      I would expect to have only the first question choosen. But it does not. Anyone an idea?


title: Turn cited docs into appendices

text: I have a set of TeX documents `{d}`. These documents need to refer to one another. To achieve this, I have a `references.bib` with one entry for each document in `{d}`. Inside each element of `{d}`, there are various `\cite` lines referring to the elements in `references.bib`. Now I write a PhD thesis and I want to include the items in `{d}` as appendices. If I `\cite` them, they show up in the text as e.g. "[4]", which is not how one normally refers to appendices. I want references to the appendices to show up as e.g. "Appendix A". How an we achieve this? If I `\label` the elements in `{d}` and then `\ref` them in the main text, I get what we want. However, this fails where the appendices refer to each other, because they would have to use `\cite` when compiled alone and `\ref` when part of the PhD thesis. Is there a solution? The best thing I've thought of is making a separate `appendices.bib` for the PhD thesis. The question then becomes, how do I make the `\cite` commands show only the referent's title and also prevent the referred item from showing up in the bibliography? ## Minimal Working Example The following files are just a set of stand-alone documents (the set `{d}` described above). In bananaMilkshake.tex, there is a normal citation using `\cite`. **./banana-docs/bananaMilkshake.tex**               \documentclass{report}          \usepackage{import}          \begin{document}          \subimport*{./}{bananaMilkshake-content}          \bibliographystyle{plain}     \bibliography{references}          \end{document}      **./banana-docs/bananaMilkshake-content.tex**               First, peel a banana \cite{Sank:peelBanana}.     Then put it in the blender.      **./banana-docs/peelBanana.tex**               \documentclass{report}          \usepackage{import}          \begin{document}          \subimport*{./}{peelBanana-content}          \end{document}      **./banana-docs/peelBanana-content.tex**               Separate the top part and then pull the peel off in three sections.      **./banana-docs/references.bib**               @misc{Sank:bananaMilkshake,       author = {Sank, Daniel},       title={How to Make a Banana Milkshake}     }          @misc{Sank:peelBanana,       author = {Sank, Daniel},       title={How to Peel a Banana}     }      Now we have a PhD thesis which wants to use the documents defined above as appendices: **./thesis.tex**               \documentclass{report}          \usepackage{import}     \usepackage{appendix}          \begin{document}          For details on how to make a banana milkshake, see appendix \ref{appendix:bananaMilkshake}.          \subimport*{./}{appendix}          \bibliographystyle{plain}     \bibliography{banana-docs/references}          \end{document}      **./appendix.tex**               \begin{appendices}          \chapter{How to Make a Banana Milkshake} \label{appendix:bananaMilkshake}     \subimport*{./banana-docs/}{bananaMilkshake-content}          \chapter{How to Peel a Banana} \label{appendix:peelBanana}     \subimport*{./banana-docs/}{peelBanana-content}          \end{appendices}      If you build thesis.tex, you find a line               For details on how to make a banana milkshake, see appendix A.      which is nice. However, in appendix A, you see `First, peel a banana [1]. Then put it in the blender.` and in the bibliography you see               [1] Daniel Sank. How to peel a banana.      which is not so nice. You want to be able to `\ref` Appendix B from within Appendix A, but you can't because a `\ref` in `bananaMilkshake.tex` has nothing to point to. One thing that almost works is to make a separate .bib file for the thesis and `\ref` to the appendices inside it. This at least puts "Appendix A" in the bibliography, but that's not quite what we want.


title: Create newshadetheorem without numbering

text: I'm using the `shadethm.sty`-package and I want to suppress numbering for a certain theorem, but command `\newshadetheorem*` is undefined. Any suggestions?


title: How to disable oldstyle numerals in a boldface text in Linux Libertine?

text: This document compiles (in XeLaTeX), but the boldface numbers are set oldstyle. Why? How to use boldface lining digits with Linux Libertine?               \documentclass{article}          \RequirePackage{fontspec}     \setmainfont[Mapping=tex-text,Numbers=OldStyle]{Linux Libertine O}     \def\Lpnum#1{{\addfontfeatures{RawFeature=+lnum;+pnum;-tnum;-onum}#1}}          \begin{document}          123\Lpnum{456}\textbf{\Lpnum{789}}          \end{document}          %%% Local Variables:     %%% TeX-engine:xetex     %%% End:


title: Diagrams of natural transformations using tikz

text: I am trying to draw diagrams representing composition of natural transformations, as they can be found at the end of page 19 and beginning of page 20 in this book, using tikz. I know almost nothing about tikz, so it would be great, if someone could just give me a complete example, that I could try to unterstand. I have seen some examples of just one natural transformation, but I cannot generalize this to three parallel functors and two natural transformations between them.


title: Is \\[<len>] as bad as \\ for new lines?

text: I have heard on multiple occasions that one should rather not use `\\\` to force new lines, unless one uses it in environments like `tabular` or `align`, and it is advised to use `\par` instead. How about starting new lines and creating a given amound of vertical spacing with `\\\\[<len>]`? Is this macro derived from `\\\` and in the same way "bad" for normal text outside of environments? Should I use something like `\par\vspace{<len>}` instead? Or what is the cleanest, and most elegant way of creating lines of text with a fixed vertical spacing? Thanks!


title: .BBL without journaltitle

text: I look for the answer but can't find it... I am using TexMaker and Zotero for my bibliography. When I am using bibtex, the `.bbl` file contain just the name, the title and the references. The is no journal title !!! As an example : in the `.bib` file :               @article{abreuJEAC572,         title = {High frequency impedance spectroscopy study of passive films formed on {AISI} 316 stainless steel in alkaline medium},         volume = {572},         issn = {1572-6657},         url = {http://www.sciencedirect.com/science/article/pii/S0022072804000257},         doi = {10.1016/j.jelechem.2004.01.015}, pages = {335-345},         number = {2},         journaltitle = {Journal of Electroanalytical Chemistry},         author = {Abreu, C.M. and Cristóbal, M.J. and Losada, R. and Nóvoa, X.R. and Pena, G. and Pérez, M.C.},         urldate = {2013-10-11},         date = {2004-11-01},         keywords = {{AISI} 316, Cyclic voltammetry, {EIS}, High frequency impedance, {XPS}}     }      give the .bbl :               \bibitem{abreuJEAC572}     C.M. Abreu, M.J. Cristóbal, R.~Losada, X.R. Nóvoa, G.~Pena, and M.C. Pérez.     \newblock High frequency impedance spectroscopy study of passive films formed       on {AISI} 316 stainless steel in alkaline medium.     \newblock 572(2):335--345.      The protocole is : pdflatex + pdflatex + bibtex + pdflatex That's a big issue for me... Thank you Clément


title: Geometry package in TeX: How to print (or use) the values of geometry properties in document page?

text: I have problems with geometry package. I would like to find out parameters of my page (layout) such as textwidth, layoutheight etc. I want to have a dynamic layout of my page without number or constants.. I have found many pages, but I haven't been able to do that correctly so far. For example: How to print the value of layoutwidth (from package manual `width=\Gm@layoutwidth`) to the document or use it in TiKZ parameters for objects. Thanks a lot...


title: IEEEtran with XeLaTeX

text: I am trying to use the documentclass IEEEtran with XeLaTeX. It all seems to work fine (I load the fonts TeX Gyre Termes Heros, Cursor with fontspecs instead of the standard Times, Helvetica and Courier), except for the command `\IEEEPARstart`, which is used to create the drop cap for the first paragraph. It gives the following error message:               Font \@IEEEPARstartsubfont=""TeX at "" not loadable: Metric (TFM) file or installed font not found. ^^I\IEEEPARstart{T}{he}      I tried to substitute this command with the one from the `lettrine` package, but the drop cap does not look the same as the one that `\IEEEPARstart` should produce. How can I rewrite the `\IEEEPARstart` command to work in XeLaTeX? MWE:               \documentclass[journal, a4paper]{IEEEtran}          \usepackage{fontspec}     \setmainfont{TeX Gyre Termes}     \setsansfont{TeX Gyre Heros}     \setmonofont{TeX Gyre Cursor}          \begin{document}         \IEEEPARstart{T}{he}     \end{document}


title: Warning with footnotes: "name{Hfootnote.xx} has been referenced but does not exist"

text: First, some general details about my document: I'm using the `scrbook` class and the `hyperref` package. The document is split up into different source files (though this fact should not matter in this case). I constantly get a warning for all of my footnotes (180 in total):               Document.tex:0. name{Hfootnote.xx} has been referenced but does not exist, replaced by a fixed one.      where the `xx` is replaced by the number of the footnote in the compiled document and is running from 1 to 180 (in my case with 180 footnotes). The numbering of the footnotes is correct and they appear in the compiled PDF as they should. The only problem is, that the reference in the document is wrong. Clicking on the index of a footnote (in the text) always brings one to the very first page of the document. **What have I already tried/checked?**   * none of the footnotes is in a table or caption   * numerous recompiling does not solve any of the warnings   * some footnotes do contain `\url{}` but by far not all Does anybody have got some hints what else I should check?


title: Help with the geometry figure

text: Can someone help me with creating such a figure in metapost? ![enter image description here](http://i.stack.imgur.com/Eg0Oo.png)


title: maximum number of authors

text: 1. I want to write Boehler et.al. (2003) but I 'm getting names of all authors. How can I fix maximum number of authos with    2. How can I get 30 Sept. **–** 4 Oct. Currenty , I ' getting 30 Sept. 4 Oct               \documentclass{article}     \usepackage[natbibapa]{apacite}     \begin{document}     Some text \citet{BoehlerW2003}.     \bibliographystyle{apacite}     \bibliography{Mybiblo}% Change this to use a different bibliography database file.     \end{document}      Mybiblo.bib               @CONFERENCE{BoehlerW2003,       author = {W. Boehler and  Vicent M. Bordas and  A. Marbs},       title = {Investigating laser scanner accuracy},       booktitle = {CIPA Symposium at Antalya, Turkey, 30 Sept. – 4 Oct},       year = {2003},       owner = {S.S},       timestamp = {2013.06.02}     }


title: How to have a circle in the nav bar for the first frame of one section?

text: In a `beamer`document using the 'Singapore' theme I have some subsections that are one slide long. I noticed that in this case the "circle" in the "navigation bar" does not appear. Here is one little example :               \documentclass{beamer}       \usepackage[utf8]{inputenc}       \usetheme{Singapore}        \title{Title}       \author{Author}       \definecolor{macouleur}{RGB}{51,110,23} % vert moyen     %\definecolor{fondtitre}{RGB}{243,246,93}  % vert fonce     \definecolor{coultitre}{RGB}{50,200,17}  % marron     \setbeamercolor{structure}{fg=coultitre, bg=white}            \begin{document}     }               \setbeamertemplate{caption}{\insertcaption}                    %first frame       \begin{frame}       \titlepage       \end{frame}            % New section           \begin{frame} \frametitle{1st Frame}          \section{Section 1}          \subsection{Sub 1}     \tableofcontents[sectionstyle=show/hide,subsectionstyle=show/shaded/hide]        \end{frame}            \begin{frame}\frametitle{2nd Frame}         bla bla bla       \end{frame}                 % All it's okay if I uncomment it :     %      \begin{frame}\frametitle{Sub2}     %  \subsection{Sub2}     %  This is the beginin of sub2.     %  \end{frame}          % I don't see any circles for this subsection...       \begin{frame}\frametitle{Sub2}       \subsection{Sub2}       This is sub2.       \end{frame}           \begin{frame}\frametitle{Conclusion}     \section{Conclusion}      Conclusion.      \end{frame}                \end{document}      Can somebody help me to get the navigation bar right please?


title: Correct use of hyperref and addcontentsline

text: I am having some issues with the hyperref package. I would like to create a Introduction chapter without a number so I use `\chapter*{Introduction}` and `\addcontentsline{toc}{chapter}{Introduction}` because I want it in the table of contents (see example). But then the link in my PDF viewer gets it wrong and also the automatically created header is no longer correct (see picture). The table of contents shows the right page number (p.1) but the link is also wrong. What is my mistake here?               \documentclass{scrbook}          \usepackage{hyperref}     \usepackage{blindtext}     \usepackage{glossaries}       \makeglossaries          \newacronym{eg}{e.g.}{%     for example     }               \begin{document}               \frontmatter          % abstract before the table of contents     \chapter*{Abstract}     \addcontentsline{toc}{chapter}{Abstract}     \blindtext          \tableofcontents          % chapter with acronyms     \cleardoublepage \phantomsection      \printglossary[type=\acronymtype]     \addcontentsline{toc}{chapter}{Glossary}          \cleardoublepage     \mainmatter               \phantomsection     % \chapter{Introduction} % with this everything is correct but I don't want the number     \chapter*{Introduction}     \addcontentsline{toc}{chapter}{Introduction}          \blindtext          \pagebreak          \blindtext          % first chapter     \chapter{Chapter1}          \gls{eg}     \blindtext          \pagebreak          \blindtext               \end{document}      ![screenshot](http://i.stack.imgur.com/o8O3N.png)


title: Uppercase Frame Titles

text: I am trying to get the frame title to always be displayed uppercase. I found errors with MakeUppercase and Beamer's insertsectionhead helpful, but the same command that worked with `\insertsectionhead` did not work with `\insertframetitle`. IOW, this works (from the linked question):               \documentclass[]{beamer}          \newcommand{\insertsectionHEAD}{%     \expandafter\insertsectionHEADaux%         %\insertframetitle}         \insertsectionhead}     \newcommand{\insertsectionHEADaux}[3]{#1{#2}{\MakeUppercase{#3}}}          \begin{document}     \section{Section 1}          \begin{frame}{Frame 1}          \insertsectionHEAD          \end{frame}     \end{document}      but exchanging the comment between lines 5 and 6 above causes compilation to fail. I was able to get this second version to work:               \documentclass[]{beamer}          \setbeamertemplate{frametitle}{           \expandafter\MakeUppercase\expandafter\insertframetitle     }          \begin{document}     \section{Section 1}          \begin{frame}%[allowframebreaks]     {Frame 1}          \tableofcontents          \end{frame}     \end{document}      but if you uncomment the `[allowframebreaks]` in the frame declaration you also get errors. The `\tableofcontents` also causes problems in some more complex code I have, but I was unable to reproduce the error in these MWEs.


title: How do I cross-reference from inside a PSTricks figure?

text: I have a pstricks figure that gives an overview of my implementation. From inside the figure I want to cross-reference to the sections that describe the various components in detail. However, my references do not seem to be resolved. For example the reference to "sec:mysec" in the snippet below is problematic. I translate this example to pdf using the command "pdflatex -shell-escape example.tex" repeatedly.               \documentclass[pdf]{article}     \usepackage[pdf]{pstricks}     \usepackage{pst-node}     \begin{document}          \begin{pspicture}       \psnode(1,1){A}{Section \ref{sec:mysec}}     \end{pspicture}          \section{My Section}     \label{sec:mysec}          \end{document}


title: Splitting a row to two rows in LaTeX

text: I have the following table in LaTex:               \begin{tabular}{lll}     \hline\noalign{\smallskip}     first & second & third  \\     \noalign{\smallskip}\hline\noalign{\smallskip}     A & C & E \\     B & D & F \\     \noalign{\smallskip}\hline     \end{tabular}      For `C` and `D`, how can I split each of those two rows to two rows? Thanks.


title: Bigger fractions without using \dfrac

text: Is there any way to make fractions bigger? I know one can use `\dfrac` but is there any code I can use in the document preamble to make _all_ fractions bigger?


title: Possible to have # start a comment that ends at EOL or at next #, whichever comes first?

text: I'm trying to create a `listings` language in which the `#` symbol starts a comment that ends at the end of the line or at the next `#` symbol encountered, whichever comes first. Of course, I'd like to capture the `#` symbols themselves as well. Is there any way to achieve the desired effect? # What I want ![enter image description here](http://i.stack.imgur.com/UpPNu.png) # What I have The code corresponding to this unsuccessful attempt can be found below at it, along with some example comments I'd like to highlight (the space-padding inconsistencies are intentional). ![enter image description here](http://i.stack.imgur.com/99X8n.png)               \documentclass{article}          \usepackage{listings}     \usepackage{color}          \begin{document}          \lstdefinelanguage{Test}     {       morecomment=[s][\color{blue}]{\#}{\#},       morecomment=[l][\color{red}]{\#}     }          \begin{lstlisting}[language=Test]       #comment       foo # comment# bar #comment # dec       baz # comment       #comment# qux     \end{lstlisting}          \end{document}


title: Vertical rectangle in every page of a single chapter

text: I want to create a special chapter where there will be a vertical rectangle on the outer side of each page. I want this box to appear only in this special kind of chapter. A code I found here is this :               \documentclass[a4paper,12pt]{book}      \usepackage[all]{background}           \usepackage{lipsum}       \usepackage{showframe}       \usepackage{tikz}       \usetikzlibrary{calc}       \newcommand*{\FrameXStart}{0.0}% in cm       \newcommand*{\FrameXEnd}{2.0}% in cm       \newcommand*{\FrameYClip}{0.0}% shift in cm of the frame, both from top and bottom       \newcommand*{\FrameTextShift}{-1.5}% shift in cm from the top       \newcommand*{\PageNumberLocation}{4.5}% in cm, from bottom       \newcommand*{\ChapterName}{}%       \newcommand*{\OldChapter}{}%       \let\OldChapter\chapter       \def\chapter#1{\def\ChapterName{#1}\OldChapter{#1}}%            \newcommand*{\SectionName}{}%       \newcommand*{\OldSection}{}%       \let\OldSection\section       \def\section#1{\def\SectionName{#1}\OldSection{#1}}%             \newcommand*{\FrameTitle}{\ChapterName: \SectionName}%             \tikzset{Frame Style/.style={fill=blue, draw=none, fill opacity=1}}        \tikzset{Title Style/.style={scale=2.75, text=white, rotate=-90, anchor=west}}        \tikzset{Title Top Shift/.style={xshift=\Midpoint cm, yshift=\FrameTextShift cm}}        \tikzset{Title Bottom Shift/.style={xshift=-\Midpoint cm, yshift=\FrameTextShift         cm}}              \tikzset{Page Number Style/.style={scale=2.0, text=white, draw=none}}         \tikzset{Page Number Odd Shift/.style={ xshift= \Midpoint cm,          yshift=\PageNumberLocation cm}}          \tikzset{Page Number Even Shift/.style={xshift=-\Midpoint cm,           yshift=\PageNumberLocation cm}}              \pgfmathsetmacro{\Midpoint}{0.5*(\FrameXStart+\FrameXEnd)}         \newcommand{\MyGraphicLogo}{% For imported graphic logo           \begin{tikzpicture}[remember picture,overlay]            \checkoddpage          \ifoddpage            \draw [Frame Style]              ($(current page.north west)+(\FrameXStart cm,-\FrameYClip cm)$) rectangle             ($(current page.south west)+(\FrameXEnd   cm, \FrameYClip cm)$);             \node [Title Top Shift, Title Style] at (current page.north west) {};              \node [Page Number Odd Shift, Page Number Style] at (current page.south west)              {};           \else          \draw [Frame Style]             ($(current page.north east)+(-\FrameXStart cm,-\FrameYClip cm)$) rectangle             ($(current page.south east)+(-\FrameXEnd   cm, \FrameYClip cm)$);           \node [Title Bottom Shift, Title Style] at (current page.north east) {};            \node [Page Number Even Shift, Page Number Style] at (current page.south east)             {};            \fi              \end{tikzpicture}}                   \SetBgContents{\MyGraphicLogo}% Select frame to be drawn             \SetBgOpacity{1.0}% Select opacity            \SetBgAngle{0.0}% Select roation of logo            \SetBgScale{1.0}% Select scale factor of logo                 \begin{document}              \chapter{Chapter Title}               \section{Section Title 1}               \lipsum[1-6]              \section{Section Title 2}              \lipsum[2-9]            \end{document}


title: Table to set images on cover page, but text in the cell is not completly centred

text: First of all, excuse my English. I'm trying to make a cover page, I have made it on Word, but in LateX is much harder to do. Is like this, ![This is what I need](http://i.stack.imgur.com/4YS2v.jpg) Same sized images at rigth and left of the text, textwidth size and centred text. But this is what I can do on Latex. How can i make the text is centred in the cell? ![Latex table](http://i.stack.imgur.com/SM8B6.jpg) Here is the LateX Code:                \begin{table}[H]      \centering      \begin{tabular}{| >{\centering\arraybackslash}m{2cm}| >   {\centering\arraybackslash}m{10cm}| >{\centering\arraybackslash}m{2cm}| }      \hline      \mbox{}      \includegraphics[width=2cm,height=2cm]{US_ETSI_Logo} &       \textbf{{\large Universidad de Sevilla. Escuela Técnica Superior de Ingenieros}} &   \mbox{}     \includegraphics[width=2cm,height=2cm]{UniversidadSevilla_Logo}\\     \hline     \end{tabular}      \end{table}      maybe there is an easier solution to achieve what I want.


title: Figure with two side-by-side subfigures that is wider than textwidth

text: I have a 2x2 array of subfigures and the ideal size I'd like them at is a bit wider than the textwidth. I saw this solution for a single figure (Custom margin settings for figure in LaTeX) but am not sure how to adapt it for subfigures. edit: a 1x2 example of the way I'm building my subfigures               \begin{figure}[ht!]     \centering     \begin{subfigure}[b]{6cm}         \centering         \includegraphics[width=6cm]{...}     \end{subfigure}     \quad     \begin{subfigure}[b]{6cm}         \centering         \includegraphics[width=6cm]{...}     \end{subfigure}     \end{figure}


title: invisible subsection

text: I've tried adapting the answer here, to make invisible subsections by changing 'section' to 'subsection' everywhere. It didn't seem to work. Basically, what I want is to have subsections that appear in the bookmarks menu of adobe (or other pdf readers) so that I can't jump to their location, but they shouldn't appear in the text itself. Ideally I would prefer these subsections (or sections for that matter) didn't interfere with the numbering of regular subsections, but that's the less important part.