title: content-independent total height

text: I am generating a table from a program with two pairs of name/value columns. Each pair forms a two column tabu table and the two tables are then nested in an overall tabu table to get the effect. I find it does not look so good if any of the cells wrap so in that case I am going to create a differently formatted table. Since the program that generates the table does not know if latex is going to wrap cells it needs to be determined in latex. To determine if there are any wrapped cells we generate the above table twice --- once with the actual data values and once with each value replaced by just X. If the values are all X the name columns will be so short it won't wrap so if the table when generated with the actual data has the same total height as the same table with just X as the data then we know that nothing has wrapped. The fly in the ointment is that if we replace each cell with X then the totalheight of the two tables is slightly different even if the table with real data does not wrap. I am concerned that the difference might get even larger if the actual tables were larger. Is there any way that I can assure that the two will have the same total height if none of the cells wrap?               \documentclass{article}     \usepackage{calc}     \usepackage{colortbl}     \usepackage{tabu}          \newsavebox\bboxA     \newsavebox\bboxB     \newsavebox\bboxElse          \newlength{\thA}     \newlength{\thB}          \begin{document}      \savebox{\bboxA}{       \begin{tabu}{X|[blue]X}      \tabulinesep=4pt\begin{tabu}{>{\bfseries}lX}      \everyrow{\tabucline[blue]-}     1 & X \\      2 & X \\      3 & X \\      \end{tabu}      &      \tabulinesep=4pt\begin{tabu}{>{\bfseries}lX}      \everyrow{\tabucline[blue]-}     4 & X \\      5 & X \\      7 & X \\      \end{tabu}      \end{tabu}      }      \setlength{\thA}{\totalheightof{\usebox{\bboxA}}}      \savebox{\bboxB}{       \begin{tabu}{X|[blue]X}      \tabulinesep=4pt\begin{tabu}{>{\bfseries}lX}      \everyrow{\tabucline[blue]-}     1 & 8.3 \\      2 & 10.3 \\      3 & 19 \\      \end{tabu}      &      \tabulinesep=4pt\begin{tabu}{>{\bfseries}lX}      \everyrow{\tabucline[blue]-}     4 & 16 \\      5 & 15.6 \\      7 & 19.8 \\      \end{tabu}      \end{tabu}      }      \setlength{\thB}{\totalheightof{\usebox{\bboxB}}}           A: \the\thA{}     \begin{center}     \usebox\bboxA     \end{center}          \vspace{5ex}     B: \the\thB{}     \begin{center}     \usebox\bboxB     \end{center}          \end{document}       Screenshot of output. The A and B numbers shown in points are the total heights of the boxes containing the tables. The objective is that those two numbers be the same but they are not. How can the code be changed so that as long as the data in the cells don't wrap they have identical total heights? ![screenshot](http://i.stack.imgur.com/oOa3X.png) **ADDED** I have been playing around with this some more since I posted it and it seems that if we add a strut so that all four occurrences of `\begin{tabu}{>{\bfseries}lX}` are replaced with `\begin{tabu}{>{\strut\bfseries}lX}` then the two total heights do come out the same. Although it works here I am not sure whether that will work generally to give identical total heights for the two tables provided there is no cell wrapping or if there is anything else that I have to worry about. **ADDED 2** There was an error in this section so I have deleted it and replaced it with the next section. **ADDED 3** Here is a revision of the MWE (1) using Peter Gill's idea to use `\vphantom` making use of the `\mystrut` macro defined here: How to detect the length of the tallest letter and that of the deepest letter of the current font size? and (2) also we implemented David Carlisle's idea in bboxA (and also in the new bboxC to illustrate the situation where it does not fit) to use `ll` format instead of `lX` and now we show the width as well as the total height of each box. Also at the end we show the `\textwidth` .               \documentclass{article}     \usepackage{calc}     \usepackage{colortbl}     \usepackage{lipsum}     \usepackage{tabu}          \newsavebox\bboxA     \newsavebox\bboxB     \newsavebox\bboxC          \newlength{\thA}     \newlength{\thB}     \newlength{\thC}          \newlength{\wA}     \newlength{\wB}     \newlength{\wC}          \def\mystrut{\vphantom{Ag}}          \begin{document}      \savebox{\bboxA}{%     \begin{tabu}{l|[blue]l}      \tabulinesep=4pt\begin{tabu}{>{\mystrut\bfseries}ll}      \everyrow{\tabucline[blue]-}     1 & 8.3 \\      2 & 10.3 \\      3 & 19 \\      \end{tabu}      &      \tabulinesep=4pt\begin{tabu}{>{\mystrut\bfseries}ll}      \everyrow{\tabucline[blue]-}     4 & 16 \\      5 & 15.6 \\      7 & 19.8 \\      \end{tabu}      \end{tabu}      }      \setlength{\thA}{\totalheightof{\usebox{\bboxA}}}      \setlength{\wA}{\widthof{\usebox{\bboxA}}}           \savebox{\bboxB}{%     \begin{tabu}{X|[blue]X}      \tabulinesep=4pt\begin{tabu}{>{\mystrut\bfseries}lX}      \everyrow{\tabucline[blue]-}     1 & 8.3 \\      2 & 10.3 \\      3 & 19 \\      \end{tabu}      &      \tabulinesep=4pt\begin{tabu}{>{\mystrut\bfseries}lX}      \everyrow{\tabucline[blue]-}     4 & 16 \\      5 & 15.6 \\      7 & 19.8 \\      \end{tabu}      \end{tabu}      }      \setlength{\thB}{\totalheightof{\usebox{\bboxB}}}      \setlength{\wB}{\widthof{\usebox{\bboxB}}}           \savebox{\bboxC}{%     \begin{tabu}{l|[blue]l}      \tabulinesep=4pt\begin{tabu}{>{\mystrut\bfseries}ll}      \everyrow{\tabucline[blue]-}     1 & \lipsum[1] \\      2 & 10.3 \\      3 & 19 \\      \end{tabu}      &      \tabulinesep=4pt\begin{tabu}{>{\mystrut\bfseries}ll}      \everyrow{\tabucline[blue]-}     4 & 16 \\      5 & 15.6 \\      7 & 19.8 \\      \end{tabu}      \end{tabu}      }      \setlength{\thC}{\totalheightof{\usebox{\bboxC}}}      \setlength{\wC}{\widthof{\usebox{\bboxC}}}           A: Total height: \the\thA{} Width: \the\wA{}     \begin{center}     \usebox\bboxA     \end{center}          \vspace{5ex}          B: Total height: \the\thB{} Width: \the\wB{}     \begin{center}     \usebox\bboxB     \end{center}          \vspace{5ex}          C: Total height: \the\thC{} Width: \the\wC{}     \begin{center}     \usebox\bboxC     \end{center}          \vspace{5ex}     Text Width: \the\textwidth          \end{document}       The result is shown below. We see that the width of bboxA is less than the textwidth of 345pt and the width of bboxC is greater. ![screenshot](http://i.stack.imgur.com/WF0P2.png)


title: hyperref: how to format text in a forms text-field

text: I would like to pre-format the text in a form text-field, e.g. make it bold, italic or use a specific font. The following code generates a simple text- field:               \documentclass{scrreprt}     \usepackage{hyperref}     \begin{document}     \textbf{The Text Field}     \begin{Form}     \TextField[]{\ }     \end{Form}     \end{document}      Is it possible to pre-format the text in the text-field? The hyperref package manual (10/2011) speaks of an optional parameter **format** and the use of JavaScript to format the field. Can this be used to format the text in the field? And if yes, how is it done? (I am not proficient in JavaScript)


title: externalize pgfplots, and only pgfplots

text: I would like to externalize the plots in my document (using `pgplots`), but not other inline stuff, such as bonds automatically drawn by `chemmacros`. That is, in the following test document:               \documentclass{article}     \usepackage{chemmacros,pgfplots}          \usepgfplotslibrary{external}     \tikzexternalize          \begin{document}     \ch{A-B}     \begin{tikzpicture}      \begin{axis}[        xlabel={\ch{A-B}},        xmin = 0, xmax = 1,        ymin = 0, ymax = 1,     ]     %  \addplot {x*x};      \end{axis}     \end{tikzpicture}     \end{document}      I'd like to externalize the `tikzpicture` environment, but not the `\ch` command (neither do I want the `\ch` command inside the environment to be recursively externalized, if that can happen). I could use `\tikzexternaldisable` and `\tikzexternalenable` to switch off and on externalization when needed, but is there a better more automatic way to, for instance, prevent externalization of `\ch`? _PS_. There is some unwanted interaction between `pgplots` and `chemmacros`. The above example gives wrong results if the `\addplot` is uncommented, or if the x and y limits are commented out. It does not happen if `\ch` is not used inside the plot. This, however, is not immediately related to the question, and might be worth a new one.


title: I have to make an article with lms.cls but I am not able to proceed as there is the error "lms.cls does not exist"

text: I have to make an article with `lms.cls`. But I am not able to proceed, as there is error when compiling which is “`lms.cls` does not exist”.


title: Page Number Spacing Issue With Titletoc

text: I'm new to LaTeX and I could use a bit of help. I'm using the `report` class and I'm trying to color the chapter headings a green I have defined. I don't really want to change the default formatting, except for the color. I've been trying to do this with the `titletoc` package. I've got it working to a degree but I'm having a problem with the alignment of my page numbers. The right margin for the chapter level entries seems to have shifted to the left so that the page numbers for the chapters no longer align with the ones for the sections. ![enter image description here](http://i.stack.imgur.com/6tQWb.png) I'm using the following markup to generate this.               \documentclass{report}     \usepackage[parfill]{parskip}     \usepackage{titletoc}     \usepackage{xcolor}     \definecolor{lawn_green}{RGB}{33,122,62}     \titlecontents{chapter}         [1.5em]          {\addvspace{0.6em}\color{lawn_green}}          {\contentslabel{1.2em}}          {\hspace*{-2.3em}}          {\hfill\contentspage}          []           \begin{document}          \tableofcontents          \chapter{Introduction}          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. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.               \chapter{Main Body}     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. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.          \section{A Section}     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. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.          \section{Another Section}          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. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.          \subsection{A Subsection}          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. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.          \chapter{Conclusion}          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. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.          \end{document}      I've tried using `\contentsmargin` with a negative value to get the page numbers over, but if I align the single digit page numbers the double digit ones will become out of line. Any help you can provide would be appreciated.


title: Referring to a correctly-styled pseudocode procedure name from the main text

text: I'm using the recommended `algpseudocode` package, and have defined a procedure inside an `algorithmic` environment that I would like to refer to from the main text. Inside this environment,               \Procedure{MyProc}{$x$}      and               \Call{MyProc}{$y$}      both display `MyProc` in what appears to be a nice small-caps style. I would like this same styling to be applied when I refer to the procedure name from the main text, but I couldn't find a way to do this in the manual, and trying to start an "in-line" environment didn't work:               Calling the procedure\begin{algorithmic}\Call{MyProc}{$y$}\end{algorithmic} results in      It results in the error:               ! 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.418 ...thmic}\Call{MyProc}{$y$}\end{algorithmic}                                                       , results in     ?      Any ideas? Please don't tell me I have to grovel through the `algpseudocode` source code, dig up whatever style it's applying, and hardcode that each time I want to refer to a procedure name... Thanks!


title: Labeling a box in tikz

text: As shown in the working example below, I have red box around all the boxes. I want to label the box but I couldn't manage to do it. I tried to use some of the ways in given in the tikz examples but I was also unsuccessful. Could anybody please help me with this ? Thanks in advance.               \documentclass[a4paper,11pt,twoside]{report}     \usepackage[left=2.5cm,right=2cm,top=2cm,bottom=2cm]{geometry}     \usepackage[T1]{fontenc}     \usepackage{amsmath, graphicx, tikz, enumerate, amssymb, pgf}     \usepackage{fancyhdr}     \usepackage{cite}     \usepackage{setspace}     \usepackage{pgfplots}     \usepackage{slashbox}     \usepackage{bchart}     \usepackage{float}     \restylefloat{table}     \usepackage{caption}     \raggedbottom     \usepackage[bottom]{footmisc}               \usetikzlibrary{trees}          \usetikzlibrary{arrows,automata}          \usetikzlibrary{calc,trees,positioning,arrows,chains,shapes.geometric,%     decorations.pathreplacing,decorations.pathmorphing,shapes,%     matrix,shapes.symbols,automata}          \tikzset{      >=stealth',      punktchain/.style={      rectangle,       rounded corners,      % fill=black!10,     draw=black, very thick,     text width=10em,      minimum height=3em,      text centered,      on chain},      line/.style={draw, thick, <-},       element/.style={         tape,         top color=white,         bottom color=blue!50!black!60!,         minimum width=8em,           draw=blue!40!black!90, very thick,           text width=10em,            minimum height=3.5em,            text centered,            on chain},           every join/.style={->, thick,shorten >=1pt},           decoration={brace},           tuborg/.style={decorate},           tubnode/.style={midway, right=2pt},           every rectangle node/.style={color=black,thick}         }            \begin{document}             \begin{tikzpicture}          [node distance=.5cm,           start chain=going below,]             \node[punktchain, join] (timing) {Timing Solver};             \node[punktchain, join] (solver)      {Solver};             \node[punktchain, join] (impl)      {SolverImpl};             \node[punktchain, join] (stp) {STPSolver};             \node[punktchain, join, ] (stpimpl) {STPSolverImpl};                  \draw[tuborg, decoration={brace}] let \p1=(solver.north), \p2=(impl.south) in             ($(2.5, \y1)$) -- ($(2.5, \y2)$) node[tubnode] {*};                \draw[red,thick,dashed] ($(timing.north west)+(-1,0.3)$)  rectangle    ($(stpimpl.south     east)+(1,-0.2)$);                 \end{tikzpicture}           \end{document}


title: How to set `footskip` on a landscape page?

text: I'm using `geometry` and `pdflscape` to have a _particular page_ in landscape (detailed here). However, setting `footskip` via `\newgeometry{..., footskip = 1cm}` does nothing, because the system still assumes the `footskip` margin is along the short edge of the paper as if were a portrait page. So how to adjust `footskip` on a landscape page?


title: Editing bst file to underline title

text: I could not find an option in makebst that would make the titles of articles be underlined, however, using `emphasize` in an otherwise correct bst I was able to underline it. Unfortunately this makes the resulting underlined text get outside the margins. My code is               \documentclass[10pt,oneside,letterpaper,spanish]{book}     \usepackage[utf8x]{inputenc}     \usepackage[activeacute,spanish]{babel}     \addto\shorthandsspanish{\spanishdeactivate{~<>.}}     \decimalpoint %\spanishdecimal{.}          \usepackage[spanish]{babel}     \usepackage{natbib}          \begin{document}     asdasd \citep{chsh_inequality} asdasd \citep*{aspect_test_bell}     \bibliographystyle{fiuady3}     \bibliography{ejem_biblio}          \end{document}      and my bib file is % This file was created with JabRef 2.5. % Encoding: Cp1252               @ARTICLE{chsh_inequality,        author = {{Clauser}, J.~F. and {Horne}, M.~A. and {Shimony}, A. and {Holt}, R.~A.         },         title = "{Proposed Experiment to Test Local Hidden-Variable Theories}",       journal = {Physical Review Letters},          year = 1969,         month = oct,        volume = 23,        number = 15,         pages = {880-884},           doi = {10.1103/PhysRevLett.23.880},        adsurl = {http://adsabs.harvard.edu/abs/1969PhRvL..23..880C},       adsnote = {Provided by the SAO/NASA Astrophysics Data System}     }          @ARTICLE{aspect_test_bell,        author = {{Aspect}, A. and {Grangier}, P. and {Roger}, G.},         title = "{Experimental Tests of Realistic Local Theories via Bell's Theorem}",       journal = {Physical Review Letters},      keywords = {Fluorescence, phosphorescence},          year = 1981,         month = aug,        volume = 47,        number = 15,         pages = {460-463},           doi = {10.1103/PhysRevLett.47.460},        adsurl = {http://adsabs.harvard.edu/abs/1981PhRvL..47..460A},       adsnote = {Provided by the SAO/NASA Astrophysics Data System}     }      The bst file I generated with makebst is http://pastebin.com/ji5d4vrx. On line 527 replacing `{ title` with `{ emphasize title` makes the titles become underlined, but they come outside of the margins. like this![enter image description here](http://i.stack.imgur.com/smiwx.png) How could I fix the margins? Also, how to add the missing spaces between the authors and the title and between the title and the year?


title: Place symbol inside of \bigsqcup

text: How can I place a symbol inside of `\bigsqcup`? What I have tried is this:               \newcommand{\concn}{\bigsqcup_{i=1}^n\hspace{-1.07em}\text{\footnotesize $h$\normalsize\hspace{0.6em}}}      The problem ist that this only looks nice in an equation enviroment. When I use it inside of text, then my `hspaces` are no longer correct: ![enter image description here](http://i.stack.imgur.com/6iljG.jpg) Is there a method to place the `h` inside of `\bigsqcup` which works in any environment?


title: tilde in hyperref url with \usepackage[T1]{fontenc}

text: By default, LaTeX typesets tildes "too high", but the hyperref package ordinarily corrects this behaviour for URLs (it vertically centers tildes, as expected). However `\usepackage[T1]{fontenc}` seems to break this, and the tilde is "too high" again.               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage{hyperref}     \begin{document}     \url{http://lyle.smu.edu/~tspell/jaws}     \end{document}      any idea how to fix this?


title: Common colorbar for groupplot

text: I want to group two surface plots with the `groupplots` library from `pgfplots` and place a common colorbar from the top of the first plot to the bottom of plot. At the moment (code below), both plots have their own colorbar, which is not what I want. In know, that there is the possibility to put the `colorbar to name`. But this decouples the plot and the colorbar and is also not what I want. The second thing, I thought of, was to put the colorbar in the `group style`. But there, `pgfplots` complains, that it doesn't know the key. So, how do I create such a colorbar? * * * The following code shows the problem.               \documentclass{article}          \usepackage{pgfplots}     \usepgfplotslibrary{groupplots}     \pgfplotsset{compat=newest}          \pagestyle{empty}          \begin{document}     \begin{tikzpicture}     \begin{groupplot}[view={0}{90},         xlabel=$x$,         ylabel=$y$,         colorbar right, % This creates a colorbar next to each plot.         group/xlabels at = edge bottom,         group style = {group size = 1 by 2,                        xlabels at = edge bottom                        }]         \nextgroupplot         \addplot3[surf] {sin(36*x)};         \nextgroupplot         \addplot3[surf] {cos(36*y)};     \end{groupplot}     \end{tikzpicture}     \end{document}


title: TikZ matrix as a replacement for tabular

text: I would like to use TikZ matrices to for some drawings. I am currently using nodes and positioning them manually to simulate a tabular. That helps in positioning arrows and shading. ![TikZ matrix](http://i.stack.imgur.com/wcHqy.png) However, if I use something like the following code:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{matrix}     \begin{document}          \begin{tikzpicture}     \matrix [matrix of nodes,row sep=0,column 2/.style={nodes={rectangle,draw,minimum width=3em}}]     {     0   & 6 \\     1   & 3 \\     };     \end{tikzpicture}     \end{document}      The nodes' lower and upper borders do not overlap, resulting in a double border between nodes. ![Double border](http://i.stack.imgur.com/ONU12.png) edit: Jake suggested a very nice solution, using negative row separation `row sep`. That work very well for one column tables. But the columns are misaligned when there are more columns.               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{matrix}     \usetikzlibrary{positioning}     \begin{document}          \begin{tikzpicture}[cell/.style={rectangle,draw=black},     space/.style={minimum height=1.5em,matrix of nodes,row sep=-\pgflinewidth,column sep=-\pgflinewidth,column 1/.style={font=\ttfamily}}]          \matrix (first) [space, column 1/.style={font=\ttfamily},column 2/.style={nodes={cell,minimum width=2em}}]     {     0   & 6 \\     1   & 3 \\     2   & 9 \\     };          \matrix (second) [right=of first, space, column 2/.style={minimum width=3em,nodes={cell,minimum width=3.5em}},column 3/.style={nodes={cell,minimum width=2em}}]     {     0   &a  & 6 \\     1   &   & 3 \\     2   &c  & 9 \\     };          \matrix [right=of second, space, column 2/.style={minimum width=3em,nodes={cell,minimum width=3.5em}},column 3/.style={nodes={cell,minimum width=2em}}]     {     0   &a  & 6 \\     1   &b  & 3 \\     2   &c  & 9 \\     };     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/yASWT.png)


title: QTikZ Save standalone TikZ file

text: In `QTikZ`, it is possible to export a `pdf`, `eps` and `png`. I was wondering if it were possible to tell `QTikZ` to output a standalone `TikZ` file that is reading to add in a `LaTeX` document. So basically, `QTikZ` would have to merge both the template and the `TikZ` image code into one file and save that. I could do this manually, but I can't understand why this feature doesn't already exist. Perhaps I'm missing something. Also, if anyone has a suggestion for a better option to `QTikZ`, I'm open to suggestions; I'm using Ubuntu 13.


title: pgfplotsforeachungrouped in groupplot

text: I want to create a grid of plots with groupplots, where every plot is taken from an external file and included via pgfplots. Due to the fact, that `foreach` doesn't work nicely in a `axis` environment, I switched to `pgfplotsforeachungrouped`. To workaround the fact, that macros are expanded at the end, I put my definitions in `\edef\temp{\noexpand...}; \temp` constructs. My problem is, that in my nested loops, only the first iteration is executed as expected. The restriction on nested loops does also forbid the use of `\pgfplotsinvokeforeach` because this macro doesn't support nested loops yet. My grid is defined by the variables `x` and `y`. It should follow the following scheme on the left, but results in the middle scheme for the title and the right scheme for the plot.               expected:                       actual result (title):          actual result (plot):     (1,1) (2,1) (3,1)               (1,1) (2,1) (3,1)               (1,1) (1,1) (1,1)     (1,2) (2,2) (3,2)               (1,2) (2,1) (3,1)               (1,1) (1,1) (1,1)     (1,3) (2,3) (3,3)               (1,3) (2,1) (3,1)               (1,1) (1,1) (1,1)     (1,4) (2,4) (3,4)               (1,4) (2,1) (3,1)               (1,1) (1,1) (1,1)      How can I get this grid automatically? * * * According source (as a prerequisite, you would need the files `field_y_x.png` with y and x going from 1 to 3 and 1 to 4, respectively):               \documentclass{scrartcl}          \usepackage{tikz}     \usepackage{pgfplots}     \usepgfplotslibrary{groupplots}     \pgfplotsset{compat=newest}          \begin{document}          \begin{tikzpicture}         \begin{groupplot}[             width=0.3\textwidth,             height=0.3\textwidth,             xmin=-0.6,             xmax=0.6,             ymin=-0.6,             ymax=0.6,             zmin=-0.6,             zmax=0.6,             group style = {group size = 3 by 4,                                horizontal sep = 2cm,                                vertical sep = 2cm                                }             ]                         \pgfplotsforeachungrouped \nx in {1,2,3,4}%             {                 \pgfplotsforeachungrouped \ny in {1,2,3}%                 {                     \edef\mytitle{\noexpand\nextgroupplot[title=\ny-\nx];};                     \mytitle                     \edef\temp{\noexpand\addplot3 graphics[%                         points={% important                             (-0.7,-0.7, 0.7) => ( 641,1000-51)                             (-0.7, 0.7,-1.5) => ( 904,1000-538)                             (-0.7,-0.7,-1.5) => ( 641,1000-765)                             ( 0.7,-0.7,-1.5) => (1096,1000-897)                             }] {field_\ny_\nx.png};};                     \temp                 }             }              \end{groupplot}     \end{tikzpicture}          \end{document}


title: How to get a Waddington landscape?

text: The idea is to make a plot like this ![enter image description here](http://i.stack.imgur.com/cuua1.png) Source: http://figshare.com/articles/_Waddington_s_8220_Epigenetic_Landscape_8221_/620879 But only with 2 wells in the front, not 4. Also the colors don't matter. This is what I have so far:               \documentclass{article}     \usepackage{pgfplots}     \pgfplotsset{compat = newest}     \begin{document}          \pgfplotsset{width=\textwidth}     \begin{tikzpicture}     \begin{axis}[domain=-6:40,domain y=0:12,view={-80}{40},colormap/blackwhite, width=\textwidth]     \addplot3[surf,shader=faceted interp]({x},{y},{exp(-0.07*x)*cos(deg(y)) + (exp((0.15*x)-6.5) * (1+cos(deg(y)/2)))});     \fill[ball color=orange] (axis cs:30,6,0.5) circle [radius=0.2cm];     %      \end{axis}     \end{tikzpicture}          \end{document}      which gives ![enter image description here](http://i.stack.imgur.com/vY2Yl.png) As you can see. I am very close. Thanks a lot to @percusse for the initial help ! However, few small things remain, eg   * the sides could be more round like in the schematic   * instead of having the "big" mountain be concave, it should be convex, eg "bloated"   * the back curve could be a bit more steep The idea in the code is to have a parametric curve in the front defined by `exp(-0.07*x)*cos(deg(y))` and a second parametric curve having more weight in the back `(exp((0.15*x)-6.5) * (1+cos(deg(y)/2)))` Any pointers on how to get the last 20% done would be appreciated :) **Edit 11.06.2014** Here is an update using @TonioElGringo comment below. ![enter image description here](http://i.stack.imgur.com/9Gwor.png) produced by               \begin{tikzpicture}     \begin{axis}[domain=0:1,domain y=0:1,view={-10}{50},colormap/jet, width=\textwidth]     \addplot3[surf,shader=faceted interp]({x},{y},{1-((1-y)*(exp(-80*(x-1/3)^2)+exp(-80*(x-2/3)^2))/2 + y*exp(-60*(x-1/2)^2)/5)});     \end{axis}     \end{tikzpicture}      **Small Edit** I just attach a version with 50 samples, to show how it looks when it is more "smooth". I just added `, samples=50` to the addplot options. Careful, this might need you to tweak with the memory settings of tex because of many calculations to be done. ![enter image description here](http://i.stack.imgur.com/WUiLK.png)


title: What are most important variables set at the beginning of a tikzpicture? of a scope?

text: I asked a lot of questions about nested tikzpicture environments and if I agree with Andrew and Martin that nesting TikZ pictures isn't a good idea, it's interesting to know why. I gave some examples where it looks possible to nest TikZ Pictures. With this examples I discovered or created some useful macros like   1. `\begin{pgfinterruptboundingbox}` `\end{pgfinterruptboundingbox}` here   2. `\useasboundingbox` here   3. `\pgfinterruptpicture` `\endpgfinterruptpicture`   4. `\ensuretikz` by Martin here   5. `\restorefont` created by Martin here   6. `\savecurrentboundingbox` `\restorecurrentboundingbox` created by me here   7. `\tikzifinpicture` here   8. other 7) it's interesting because the definition is `\pgfutil@ifundefined{filldraw}{#2}{#1}%`. These macros are useful to manage the bounding box and the font but perhaps other values are interesting to save and restore. It's possible to look at the sources but it's not very easy for a lot of us. The aim of my question is to build reference answers to describe what are the variables set when tikz picture begins and what are the differences with a scope?


title: Transparency with psSurface in pst-solides 3D

text: I'm trying to draw a graph with pst-solides3D with the option psSurface : The problem is as follows : I want to draw z = +/- (y^2-y^2), which should give a saddle-point graph with the lines x=y and x=-y that are equal to 0. Visually it's nice.               \documentclass[a4paper,10pt]{article}     \usepackage[utf8x]{inputenc}          \usepackage[english]{babel} %change language if necessary     \usepackage[english,verbose]{layout}%change language if necessary     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage{xspace}     \usepackage{pstricks}     \usepackage{pst-solides3d}     \usepackage{epstopdf}          \psset{unit=0.35}      \psset{lightsrc=30 -10 10}      \psset{viewpoint=50 20 30 rtp2xyz,Decran=70}      \begin{pspicture}(-11,-8)(7,8)      %+ Saddle graph z= (y^2-x^2)     \psSurface[ngrid=.2 .2,algebraic,Zmin=-1,Zmax=1,      linewidth=0.5\pslinewidth,spotX=r,spotY=d,      spotZ=l,      hue=0 1](-5,-5)(5,5){%      (x^2-y^2)/3 }      %- Saddle graph z = (x^2-y^2)     \psSurface[ngrid=.2 .2,algebraic,Zmin=-1,Zmax=1,      linewidth=0.5\pslinewidth,spotX=r,spotY=d,      spotZ=l,     hue=0 1](-5,-5)(5,5){%      (-x^2+y^2)/3 }      \end{pspicture}       However as you can see this is not satisfactory. The second plot is plotted over the first one, and covers parts of the first graph it shouldn't cover. Is there any transparency command I could use, or make pstricks understand what is in front of what ? The rendering I'm looking for would be something like this ![enter image description here](http://i.stack.imgur.com/IWCWX.jpg) It knows what should be in front and what should not.


title: What is the docstrip utility?

text: What is the docstrip utility? I have seen the string below many times, in many sources:               generated with the docstrip utility      but what is it? Is it a kind of LaTeX editor?


title: Persistent change of caption width in memoir

text: How do you persistently change caption width in `memoir`? I know you can use `\changecaptionwidth` followed by a `\captionwidth{...}`, but that only works within a float and I don't want to have to specify that all the time. Also, if caption widths can be set persistently, how do you revert to using the full width when using subcaptions?


title: Subsection size in header doesn't change header height

text: I want to change the font size of section and subsection titles in the header. It works fine for the section title, the header automatically increases its height (as stated in the beamer manual) but if I try the same thing with the subsection, I get following result. ![Subsection height problem](http://i.stack.imgur.com/zHu5j.png) Is there any way to set the subsection title's block height so the large subsection title fits? I don't need that box to be of exact size, as I probably create a background using tkiz anyway. So if setting the size isn't possible, is there some way to just move the title it down a little bit?               \documentclass{beamer}     \setbeamerfont*{section in head/foot}{size=\huge}     \setbeamerfont*{subsection in head/foot}{size=\huge}     \usetheme{Berlin}           \begin{document}         \section{Section 1}         \subsection{Subsection 1}         \begin{frame}{Frame}             Content         \end{frame}     \end{document}      I get the same output when I try `\subsection{\huge Subsection 1}` instead of `\setbeamerfont*`.


title: How to intelligently handle notes to self?

text: I'm new to LaTeX, and I thought it would be a good idea to keep my notebook of experiments in it. It is often my habit, when writing about the experiments I have conducted, to write "notes to self". These are lessons I learned from that experiment that will apply to similar future experiments. However, when I am about to attempt a new experiment, I would much rather not scan the whole notebook for notes pertaining to it. Is there any way to make LaTeX collect all such notes to self under a separate heading, and include a reference for each so I can go back and see which experiment that note was made on?


title: How can I prevent inline math formulas from overflowing into the margin?

text: When I compile my document in LaTeX, some formulas in the document in math mode, between `$ $`, go into the right margin area beyond all the text. Is there a way to fix this aesthetic problem?


title: How to get default titlepage with extra pdf-frontpage?

text: I want to have normal LaTeX frontpage, then my University's frontpage and then normal content. My tex               \documentclass[twocolumn]{revtex4-1} % use prl for onepage     \usepackage{pdfpages}     \usepackage{amsmath, amsfonts, amssymb, textcomp}     \usepackage[T4, OT1]{fontenc}     \usepackage{newunicodechar}     \usepackage{multirow}              \begin{document}          \title{La la la}     \author{Masi}          \maketitle     \begin{titlepage}         \begin{flushright} \large     \emph{Supervisor:} \\     Dr.~Mark \textsc{Brown}     \end{flushright}          % Bottom of the page     {\large \today}     \end{titlepage}          \clearpage     \includepdf[pages={1}]{abstract_1.pdf}     \clearpage          Content here la la la          \end{document}      I get ![enter image description here](http://i.stack.imgur.com/RoAWr.png) So problems are the wrong looking frontpage and the overflow of the text of the frontpage to the next page. It should be normal LaTeX one with big title in the center of the page and below it texts. The texts which I have now in **\begin{titlepage} ... \end{titlepage}** goes on the top of the pdf-page which is wrong. **How can you have the default LaTeX frontpage?** **Why is the content being overflown on the top of the pdf-page?**


title: What is the best way to use quotation mark glyphs?

text: There are several types of quotation marks in the English language (and in other languages there are even more). There are also several ways in LaTeX to represent these. I have seen editors, that are capable of directly entering **“** and **”**. And I have also seen things like this **`''**. So, what is the best way to do English quotation marks in LaTeX?


title: Override quotation style

text: Is it possible to override the default quotation marks of ```notation''`? As a czech user, I have to use `\uv{}` to have czech styled quotations, which doesn't write so well.


title: Quote marks are backwards (using texmaker/PDFLatex)

text: > **Possible Duplicate:**   >  What is the best way to use quotation mark glyphs   >  Automatically convert quotations in the form of "abc" to become ``abc" I am (obviously) new to LaTeX and have about 40 pages of text where it seems like half the quote marks are going the wrong way for American English. The opening and closing quotes are both pointing the same way (as if they were all closing quotes). I copied some text from MS Word to texmaker, but I believe that's unrelated because this version, with my headers and newly typed text, does the same thing (using PDFLatex):               \documentclass[11pt,letterpaper,titlepage]{article}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage[top=1.25in, bottom=1.25in, left=1.25in, right=1.25in]{geometry}     \usepackage{etoolbox}     \apptocmd{\thebibliography}{\raggedright}{}{}     \usepackage{graphicx}     \usepackage{textcomp}     \usepackage[hyphens]{url}     \author{Me}     \title{Hello world}     \begin{document}     \section*{Acknowledgements}     Here are some people I'd like to thank. "Thanks!"     \end{document}      The single quote in "I'd" is curled right and so is the double quote after !. But the one before Thanks goes the wrong way. They all appear to be straight in the editor window. My understanding is that little inline quotes like this is not what `\quote{}` is for. Is there some way to fix that doesn't involve going through all 40 pages with a fine-toothed comb? ![Three different styles!](http://i.stack.imgur.com/pxRvc.png)


title: Using quotation marks

text: > **Possible Duplicate:**   >  Automatically convert quotations in the form of "abc" to become ``abc" I have a Microsoft Word document whose text I have copied into a LaTeX `document`. One of the many changes I need to make before it will look good, is to replace all quotation marks such as               "hello"      with the LaTeX version               ``hello''      Is there some setting or macro I can define which will tell LaTeX to treat the former quotation marks exactly as it would treat the latter?


title: Automatically convert " to `` or ''

text: Is there any LaTeX option to treat " characters (ASCII 0x22) as either an opening quote or a closing quote, depending on whether it's at beginning or end of a word? e.g. I supply the text like: "hello", world. and LaTeX would treat that as equivalent to: ``hello'', world.


title: Automatically convert quotations in the form of "abc" to become ``abc"

text: I did not know that latex had different symbol for opening and closing quotation marks. I've used it like "abc" every where and just realised that I really should have used ```abc"`. Is there anyway I can convert all the quotations to become like ``abc"? Doing it manually will take forever as I have a lot of quotations.


title: Replace "quotes" with „quotes“?

text: I live in a funny part of the world where we're required to quote text like this: `„quotes“` (note the difference between the opening and closing quote). Is there an easy way to set up a LaTeX document so that I could just type the usual double quotes that are on my keyboard (`"like this"`), and the LaTeX document processor would replace them to the ones that I need (`„like this“`)? I know I could just use `,,` (two commas) and ```` (two grave accents) in the LaTeX source file, but this seems like a step-back from what Microsoft Word has to offer at this point ;-) If LaTeX (or XeTeX, or whatever) can't do that by itself, is there a way to preprocess the LaTeX document with some sort of an regular expression (somehow embed the regexp in the document)? **EDIT:** The language in question is Lithuanian. _babel_ doesn't do what I want; I don't know if it's supposed to. What I would like to achieve is the automatic `""` => `„“` replacement. Quoting text with anything more than a single keystroke doesn't seem efficient to me ;-)


title: Dodgy quotation formatting. Both start quote and end quotes are in the direction of end quotes,

text: > **Possible Duplicate:**   >  Automatically convert quotations in the form of “abc” to become ``abc" My quotes are coming up like end quotes on both sides of the quotation. How can I overcome this? Here is my code and it works fine on this writer just on my Texmaker the problem happens. Could it be my keymapping or something like this?               %----------------------------------------------------------------------------------------     %   PACKAGES AND OTHER DOCUMENT CONFIGURATIONS     %----------------------------------------------------------------------------------------          \documentclass[paper=a4, fontsize=11pt]{scrartcl}     \usepackage[utf8]{inputenc}     \usepackage[english]{babel} % English language/hyphenation     \usepackage{amsmath,amsfonts,amsthm}      \usepackage[super,comma,sort&compress, square]{natbib}          \begin{document}     \title{}          \maketitle % Print the title          Some sort of "quotation"          \bibliography{mybib}     \bibliographystyle{unsrt}          \end{document}


title: Counters to be used in section (& similar) titles (any TeX)

text: I use LaTeX to take notes in University. The notes are divided into chapters which are the single lessons. They are numbered. It's easy to lose track of that lesson number. So I'd like LaTeX to do that in my place. What I'd need is to create a counter and use its value in the chapters' title. Something like a `\newtheorem`, only that can't go in section titles because it generates the error               argument of \@sect has an extra }        My table of contents starts like this:   ![Table of contents](http://i.stack.imgur.com/8M7x8.png)   The full table of contents is rather long, so I won't put it all here, as I think this much is already enough. As you can see, there are chapters titled _Lezione xx_ (xx being a number), chapters titled _Esercitazione xx_ , and chapters of _Esercizi_ (respectively, Lesson xx, Exercise lesson xx, Exercises), so I would need two independent counters for _Lezione_ and _Esercitazione_ to avoid having to number them manually and risking to find myself (as I just did) with two _Esercitazione 14_ , no _Lezione 22_ and no _Lezione 25_. Is there a way to do that in LaTeX? And is there a way to create a list of all theorems of a particular kind (e.g. if I defined `\newtheorem{defi}{Definizione}`, to create a list of all "`defi`"s)?


title: Connecting to a node towards a point other than the center

text: I'm trying to connect an edge to a node with the target point being off- center. I would like the edge to end with an arrow at the border of the node without going into the box. It is easy to connect an edge to a side of a node:               \begin{tikzpicture}     \node (x) [draw,minimum size=1 cm] at (0,0) {x};     \node (y) [draw,minimum size=1 cm] at (2 cm,2 cm) {y};     \draw[->] (x) -- (y.west);     \end{tikzpicture}      But drawing to halfway between `(x)` and `(x.west)` continues into the node instead of stopping at the border:               \begin{tikzpicture}     \node (x) [draw,minimum size=1 cm] at (0,0) {x};     \node (y) [draw,minimum size=1 cm] at (2 cm,2 cm) {y};     \draw[->] (x) -- ($ (y.west)!0.5!(y) $);     \end{tikzpicture}      How can I make an edge with the same angle as `(x) -- ($ (y.west)!0.5!(y) $)` but which draws the arrow right at the border instead of entering into the node?


title: Iterating over a list of optional arguments

text: I'm defining a new command which should take an optional list of arguments (integers or ranges):               \doit[3,5-7,9]{something}      What I have so far:               \def\doit{\@ifnextchar[{\@with}{\@without}}     \def\@with[#1]#2{       ...     }     \def\@without#1{     }      In the `with` case, how can I iterate over the optional arguments? How can I distinguish between integers and ranges? Do I need to do the parsing manually or there are tools which can help me?


title: Why isn't eqref working?

text: I am trying to use `\eqref` as in the following, but instead of (1), I get a set of blank parentheses as the result. Could anyone help me fix the problem?               \documentclass[10pt]{article}       \usepackage{amssymb}       \usepackage{amsthm}     \usepackage{amsmath}     \usepackage[left=1.5in,right=1.5in,bottom=1.5in,top=1.5in]{geometry}          \begin{document}                 \[     \begin{equation}\label{eq:2}     \begin{align*}     1\cdot 2+2\cdot 3+3\cdot 4+ \cdots+k\cdot(k+1)+(k+1)(k+2) &= \frac{(k+1)(k+2)(k+3)}{3}       \\     &= \frac{(k^2+3k+2)(k+3)}{3} \\     &= \frac{k^3+3k^2+3k^2+9k+2k+6}{3} \\     &= \frac{k^3+6k^2+11k+6}{3}.       \end{align*}     \end{equation}     \]          assuming ~\eqref{eq:2} ...          \end{document}


title: Want to add a string left of "Figure" in caption

text: Ok I need to redefine caption and probably some other things to do something like               \caption{code}{caption string}      So when a figure is made               (code) Figure #: caption string      comes out code will be a letter and can be colored differently (e.g. red or blue) for example a red `R` (no quotes on the R) or blue `D` (no quotes on the D) where Figure and the caption string are in black. e.g.               \caption{\textcolor{red}{R}}{use this caption string}      would come out something like               (R) Figure 1: use this caption string      And I need it to work for tables too. Can anyone help me with the renew command for this?


title: My \printnomenclature doest not work

text: I am using package `\usepackage{nomencl}`and I have the following format and I save it as chapters.txt in Texworks                    \documentclass[12pt,titlepage,a4paper]{book}           \linespread{1.5}            \addcontentsline{toc}{chapter}{List of Abbreviations}             \markboth{\textsf{LIST OF ABBREVIATIONS}}{\textsf{LIST OF ABBREVIATIONS}}             \printnomenclature              \include{chapter1}              \include{chapter2}      I have read that I should run this code on command prompt makeindex .nlo -s nomencl.ist -o .nls If my path for example like this C:\Desktop\thesis means that all of my text work on folder thesis and I wrote what should I write instead of filename?


title: journal specification for figures and figure captions

text: I am submitting some work to a journal and the format of the article has to follow some specific guidelines. One of which is that following the main text, the figure captions are then required followed by the figures. How is it possible to separate the captions from the figures in latex?


title: How to avoid the "http:" part in hyperref's \url?

text: is it possible to use the `\url` command from the hyperref package with "shorthand" URLs, e.g.               \url{ipython.org}      instead of               \url{http://ipython.org} ?      It seems that the former would only link to local files on my computer, instead of retrieving the web address. (I suppose I could be using `\href`, but `\url` is shorter and I'd like to keep its formatting features.) **Edit** in response to karlkoeller's answer: Sorry for not being sufficiently precise. I don't mind typing the 'http' part so much, but I'd rather not see it _printed_. egreg's answer does what I want to do - many thanks!


title: Include PDF images with interpolate=true

text: I was happy to read that `\includegraphics` allows setting the `interpolate` flag for imported images:               \includegraphics[interpolate]{testimg}      This works wonderfully if testimg is a PNG image. Unfortunately, it does not work if testimg is a PDF image (example pdf image). Is there any way to import PDF images and have their interpolate flag be true? ![](http://i.stack.imgur.com/5HL06.png)


title: Conditional compilation of beamer slides

text: I'm preparing a beamer slideshow, and I will have to print slides. I would rather use landscape mode slides, but it is possible that I need to use portrait mode ones. Sadly, I won't know until a few minutes before the talk, so I have to prepare two copies of the presentation. I've tried to use conditional compilation, but it doesn't seem to work pretty well. Basically, I would like to have something like this:                   \newif\ifwide         \widetrue      And then I would write something like this:                   \begin{frame}{A frame}             Some text (...)     \ifwide         \end{frame}              \begin{frame}{A second frame}     \fi             Some text (continued)         \end{frame}      This particular example doesn't work (pdflatex reports `Extra }, or forgotten \endgroup. \end{frame} (followed by: )`). What should I do to have the frame contents split on two frames in landsape mode, but not in portrait mode?


title: Missing glyph in TeXGyreTermes font

text: For Pinyin (Chinese romanization), I like very much the look of the font TeXGyreTermes-Regular that is installed with my TeX system. However, it seems to be missing a single Pinyin symbol that I need: ǖ ([U+01d6]). Neither within TeX nor standard word processors does this character appear. Does anyone know if there is a way to remedy this, other than by using another font? * * * ( _OP added the following as a suggested edit to Villemoes' answer. I moved it to the question instead. —Caramdir_ ) Back after a bit of a delay; thanks very much for your help. First, I've tried your code in LaTeX and it works just fine for ǖ, though it seems some of the other vowels-with-diacritic will also need to be specified the way you have ǖ. As it is, they generate inputenc errors. Second, as for the difference between ǖ and the other vowels with macron, here is what I show: adding               \DeclareUnicodeCharacter{0101}{\={a}}      to your code, the macron is fine: ![macron over ǔ and a](http://i.stack.imgur.com/KJEpV.png) The problem I originally had, attempting `\={ü}` in XeLaTex but without your additions, was that the macron looked like this: ![enter image description here](http://i.stack.imgur.com/Bx7Yf.png) Third: More troubling, however, is that your code doesn't seem to work under XeLaTeX, which is what I am using to have fullest support for Chinese script. It may simply be less work to stay with Times New Roman, as nice as Termes looks. Thanks again for your help.


title: How can I load a true type font in luatex?

text: > **Possible Duplicate:**   >  Load fonts that are in a ./fonts directory I have a TTF file `zapf-chancery.ttf` in the same folder as my LaTeX document. How do I make this font available in my document?


title: Check for missing fonts/characters in XeLaTeX?

text: Because I began to use many Unicode characters (Japanese, some unusual diacritics, etc.) I switched from LaTeX to XeLaTeX to render my documents. Unfortunately, if a font is missing, the letters are simply left out (for example, when I had forgotten to specify the font for Japanese) without any error (and I can't seem to spot a warning either). I will read the result, but I prefer to get some early warning if some character isn't available. Is there any way to get a warning about characters that have not been rendered? An error would be even better.


title: Fix height of frametitle independent of content

text: I'm using a custom `beamer` theme from my university. The `frametitle` height depends on whether any characters extend below the baseline. A `frametitle` named "example" is higher than a title named "test". This leads to jumping blocks when the content blocks are top-aligned. The `frametitle` is defined as follows:               %frametitle          \setbeamertemplate{frametitle}     {     \vspace{2mm} \hspace*{-4mm}     \vbox{\hsize=10cm\bfseries\insertframetitle}          \begin{textblock*}{15mm}(110mm,4mm)     \includegraphics[width=14mm]{\logo}      \end{textblock*}          \begin{textblock*}{1.5mm}(1mm,1mm)     \begin{pgfpicture}{0mm}{0mm}{1.5mm}{9mm}         \color{green100}         \pgfpathrectangle{\pgfpoint{0mm}{0mm}}{\pgfpoint{1.5mm}{9mm}}         \pgfusepath{fill}     \end{pgfpicture}%     \end{textblock*}          }      Presentation example of jumping blocks:               \documentclass[t]{beamer}          \usetheme{jumping-theme}     \begin{document}          \begin{frame}      \frametitle{test}      \begin{block}{test}       t      \end{block}     \end{frame}          \begin{frame}      \frametitle{Example}      \begin{block}{example}       e      \end{block}     \end{frame}          \end{document}      Is there any way to fix the `frametitle` height? I thought the `\vbox` with height parameter would take care of this, but it doesn't.


title: How can I use \SI from siunitx inside \replaced from changes?

text: I'm trying to rceord some changes using the changes package - I've already done a lot of the text, and had to work around display maths but I've got a simply value typeset using siunitx, and changing that value doesn't appear to work:               \documentclass{article}     \usepackage{siunitx}     \usepackage{changes}     \begin{document}         \replaced{\SI{1}{\volt}}{\SI{2}{\volt}}     \end{document}      gives:               ! Extra }, or forgotten \endgroup.     \UL@stop ...z@ \else \UL@putbox \fi \else \egroup                                                        \egroup \UL@putbox \fi \if...     l.5 ...\SI{1}{\volt}}{\SI{2}{\volt}}      If I continue to compile (getting the same error again and 2 `missing } inserted`s, the output is actually exactly as expected: ![surprisingly correct output of above code](http://i.stack.imgur.com/dkgCe.png) adding `\protect` before the `\SI` gives exactly the same error, and of course trying `\SI{\replaced{1}{2}}{\volt}` was never going to work:               !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!     !     ! siunitx error: "invalid-token-in-number"     !      ! Invalid token '\let ' in numerical input.     !      ! See the siunitx documentation for further information.     !      ! For immediate help type H <return>.     !...............................................        Is there some workaround that will get this to run without errors? I don't really want to run in nonstopmode in case of "real" errors, and besides, I used a build script that's designed to stop on errors.


title: float placement at the end of the document

text: > **Possible Duplicate:**   >  Force impagination sequence   >  How can I remove the figures from a draft of my document? Is there a way I can specify an option to tell TeX to place all of the floats I have in my document at the end of the document? Specifically I am inserting them currently where I will need them eventually but for the working paper phase I would like to have them all just follow the text of my document. Is this possible?


title: Force impagination sequence

text: I want to force my document to be in this order:   * text   * tabular   * image This group is repeated some times; as you can imagine the compiler mix the elements (e.g. text1, tab1, text2, tab2, img1, img2). How can I force the correct order?


title: Algorithms \And boolean operator casuing "Undefined Control Sequence" error

text: I'm writing some algorithms using the `algorithmicx` package. I'm trying to create an `if` statement with an `And` boolean operator but using `\And` is causing an `Undefined Control Sequence` error               \usepackage{algorithm}     \usepackage{algpseudocode}          \If{$i < j+bandSize$ \And $j < i+bandSize$}         \State $DTW_{i,j}\gets min(DTW_{i,j-1},DTW_{i-1,j},DTW_{i-1,j-1})+(f[i]-s[j])^2$     \EndIf      What's causing this?


title: Bibliography style which extracts only the initials of the first names

text: I would like the author names in the bibliography to be of the form "Lastname, A.B." I thought that it is the bibliography style file like APA or Chicago which will choose only the initials of the author's first name and ignore the full name that has been typed (e.g. Andrew Middlename Lastname). All the styles tried so far do not compress the information typed in author field. Does that mean I have to enter the names in the required format only or is there some Tex solution to it? **Edit:** In view of the tags apa and chicago added by the moderators, my guess is that the answer can be adapted to them by using `\usepackage[style=authoryear,natbib=true,uniquename=init,firstinits,bibstyle=chicago]{biblatex}` and installing biblatex-chicago.bst file? or is there another way? **Update:** In response to the answers, I would have posted this before but didn't know exactly how to do that.               \documentclass{article}     \usepackage{filecontents}     \\     \begin{filecontents*}{demo.bib}     @book{test,       author = {Herbert Voss},       title  = {Me, I and myself},       year   = 2010,       location = {Berlin}}               @ARTICLE{Name10,       author = {{F}irstname {M}iddlename {L}astname},       title = {{T}itle of the paper},       journal = {{J}ournal {T}itle },       year = {2010},        }          \end{filecontents*}     \\     \usepackage[style=authoryear,natbib=true,uniquename=init,firstinits]{biblatex}     \bibliography{demo}          \begin{document}     A reference to~\cite{test}.          \cite{Name10}          \printbibliography     \end{document}


title: The itemize bullet symbol of beamer

text: I'm using the command `$\bullet$` in beamer, but I would like to use the 3d bullet symbol like that the itemize bullet. Anybody? I'm using               \documentclass[notes=show,12pt]{beamer}     \usepackage{beamerthemeshadow} % theme     \beamertemplateshadingbackground{red!15}{blue!15}     %\usepackage{pgf,pgfarrows,pgfnodes,pgfautomata,pgfheaps,pgfshade}     \usepackage{color}          \begin{document}     \frame{     \begin{itemize}     \item XXX     \item YYY     \end{itemize}          {\color{blue}$\bullet$} XXX     }     \end{document}


title: Aberrant vertical spacing with {align} and friends?

text: Consider documents with the following preamble:               \documentclass[12pt]{article}     \usepackage{amsmath}      ## Question #1. Why do we get bad alignment with the following code?               \noindent     $-3x$\\[-\baselineskip]%     $\begin{aligned}\!         \phantom{-3x} (x+1) & = 4 \\ & = 2^2       \end{aligned}$      I cannot figure out an appropriate amount of negative space to use in order to achieve alignment between the inline math and the `aligned` environment, using any plausible combination of `\baselineskip` and `\jot`. (The dimension `\dimexpr-\baselineskip+0.5\jot` almost works, for reasons which are opaque to me, but still doesn't do the job.) ## Question #2. What is the correct spacing to achieve the proper alignment in this case, independent of font size _etc._? * * * ## Background I'm puzzling over how to produce a robust solution to this problem on equation alignment, and have come to the conclusion that I don't understand what LaTeX is doing with vertical spacing when it comes to `aligned`. I would like to describe how to undo one line of vertical space, but this does not appear to be straightforward when the thing on the next line is a multiline equation. * * * ## Test cases which work properly The following are my little tests to try to asses what is going on with the spacing. The latter two cases only served to make the failure in the above example extra confusing.   1. **Undoing vertical spacing of two lines in textmode:** easy. The following code illustrates roughly the effect that I would like to achieve:              \noindent     Testing \phantom{testing} 1 \phantom{2} 3      \\[-\baselineskip]%     \phantom{Testing} testing \phantom{1} 2 \phantom{3}      This appears as a single line of text, saying "Testing testing 1 2 3" with appropriate alignment and spacing, as it should.   2. **Undoing vertical spacing involving math and an`aligned` environment:** nothing _inherently_ changes about the spacing.              \noindent     $-3x$     \\[-\baselineskip]%     $\begin{aligned}\!         \phantom{-3x} (x+1)         \end{aligned}$      This gives output which looks like −3 _x_ ( _x_ +1) with appropriate alignment and spacing.   3. **Multiline equations without additional vertical spacing:** If we make the `aligned` environment into a multiline equation -- but remove the vertical spacing between the two lines of the equation -- then the vertical alignment _still_ functions properly.              \noindent     $-3x$     \\[-\baselineskip]%     $\begin{aligned}\!         \phantom{-3x} (x+1) & + 4 \\[-\baselineskip] & + 4       \end{aligned}$      I must admit that I don't understand why I don't have to involve the unit `\jot` to make this work properly, but once again we obtain proper vertical alignment, with something that looks like −3 _x_ ( _x_ +1)+4. I would like to see a way of making this work in an obvious and portable way, regardless of what other things are going on. Naturally, if I were using `align` instead of `aligned`, I might also have to involve `\abovedisplayskip`, which I'm comfortable with; though if there are "gotchas" in the spacing beyond that, I'd be again a little annoyed. But in any case, I think the first step is to understand how it's supposed to work with an environment which lives inside of mathmode, such as `aligned`.


title: includepdf does not find file with comma

text: I am already using `grffile` to ensure that all files are found on the file system (windows 7), but now I have an example where the second file is not found.               \documentclass[]{scrbook} %      \usepackage[%        extendedchars, encoding, multidot, space,        filenameencoding=latin1, % Windows XP, Vista, 7     ]{grffile}     \RequirePackage{pdfpages}     \begin{document}     \includepdf{fonts/fontsample - Latin Modern Family.pdf}     \includepdf{fonts/fontsample - Charter, Bera Sans, Luxi Mono.pdf}     \end{document}      The error is > LaTeX Error: File `fonts/fontsample - Charter' not found. How can I ensure that a comma is a valid char for a filename in `\includepdf` ?


title: Drawing a packet layout with TikZ

text: I'm new to TikZ, and I'm having a terrible time figuring out how to create an image similar to this. ![enter image description here](http://i.stack.imgur.com/P24dz.png) So far I am able to create all the rectangles, but there are two things I cannot figure out how to do:   1. I'd like to replace the `B symbols` region with an ellipses in the center to show continuation, and   2. Is there an elegant way to specify positioning for the labels, beyond just coordinates, so that moving around the rectangle regions moves the associated labels?


title: Solid black box in the proof environment

text: I am using               \documentclass[12pt]{article}          \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{amsthm}          \begin{document}          \begin{proof}     A = B     \end{proof}          \end{document}      and an empty square box will be added automatically at the end of the proof. I am wondering how to add a solid black box instead, in an automatic way.


title: tex4ht and texMemo.cls

text: Running `tex4ht` on the example files that use the `texMemo` class http://www.oak-tree.us/2010/08/02/texmemo/ give the following error:               ! LaTeX Error: No \gdef \GenericError { }{LaTeX Error: No \gdef \GenericError {                    }{LaTeX Error: No \title given in `'}      I assume it's a problem with the way the class is set up. What should I look for to fix it?


title: PDF Colour Space and ConTeXt

text: # Background Trying to create a PDF that includes a vectorized cover page having transparent colours. I would like the PDF to have the same appearance in Acrobat Reader, Firefox PDF Viewer, Foxit Reader, and Evince. # Problem By itself, the PDF cover is identical in Acrobat (left) and Evince (right): ![Cover Page PDF](http://i.stack.imgur.com/wtKNN.png) When included using ConTeXt, the PDF cover changes, which also affects the colours on all subsequent pages: ![Cover Page Embedded](http://i.stack.imgur.com/5NMMA.png) This cover page transparency problem can be resolved with `gs` post- processing:               gs -o document-in.pdf -sDEVICE=pdfwrite -dColorConversionStrategy=/sRGB         -dProcessColorModel=/DeviceRGB document-out.pdf      This "fixes" the transparency blending problem on the front page, but then has undesired effects on the remainder of the document (not to mention the file size jumps from 176K to 2.0M, which has negative implications for download times): ![Example Document Page, Incorrect Colour Space?](http://i.stack.imgur.com/ORals.png) In the above example, the colours are likely altered because of the following colour definitions:               \definecolor[ColourSecondary][h=5C883E]          \definespotcolor[ColourSecondaryLighter]       [ColourSecondary][a=1,t=.5]     \definespotcolor[ColourSecondaryLightest]       [ColourSecondary][a=1,t=.2]      When the spot colours are replaced, the problem disappears:               \definecolor[ColourSecondaryLighter][h=adc39e]     \definecolor[ColourSecondaryLightest][h=dee7d8]      However, that then does not produce the transparency effect (the large "S" should allow the horizontal line to show through), although the colours look correct: ![Example Document Page, No Transparency](http://i.stack.imgur.com/pcyX9.png) On the Windows version of Adobe Acrobat Reader 11, the issues are mostly resolved, but there are artefacts everywhere (along the green side bar, through the large S, and a pattern along the column divider): ![Example Document Page, Acrobat Reader 11](http://i.stack.imgur.com/1xvQ5.png) While the latter issue appears to be a bug in Adobe Reader (other PDF readers display expected colours), it would be nice to know if there was a way to minimize the effect, given that Adobe Acrobat Reader is the de facto standard PDF viewer on most Windows-based computers. # Source Code The source code to replicate the problem:               \setupcolors[state=start,]          \definelayer[cover][x=0mm,y=0mm,width=\paperwidth,height=\paperheight,]     \setlayer[cover]{%       \externalfigure[staff-cover.pdf][width=\paperwidth,height=\paperheight]     }          \starttext     \startfrontmatter     \setupbackgrounds[page][background=cover]     \startstandardmakeup     \stopstandardmakeup     \setupbackgrounds[page][background=]     \stopfrontmatter     \startbodymatter     \startchapter[       title={Chapter},     ]     \startsection[       title={Section},     ]     \stopsection     \stopchapter     \stopbodymatter     \stoptext      # Source Files The source files involved:   * Cover Page (SVG)   * Cover Page (PDF) # Ideas Commands that did not resolve the issue:               \pdfpageattr{/Group << /S /Transparency /I true /CS /DeviceRGB>>}     \pdfoptionpdfminorversion=4      # Question How do you force ConTeXt to set the correct colour space so that transparency works in Adobe Acrobat Reader 9.x? # Debug Information Ran:               gs -dBATCH -dNOPAUSE -sDEVICE=tiffsep -dDOINTERPOLATE -dTextAlphaBits=4 \        -dGraphicsAlphaBits=4 -sOutputFile=output.tif -r120 -MaxSeparations=8 \        document-in.pdf      Output:               GPL Ghostscript 9.05 (2012-02-08)     Copyright (C) 2010 Artifex Software, Inc.  All rights reserved.     This software comes with NO WARRANTY: see the file PUBLIC for details.     Processing pages 1 through 23.     Page 1     Page 2     Page 3     Page 4     %%SeparationName: ColourSecondary     Page 5     %%SeparationName: ColourSecondary     ...      The `SeparationName` items exactly correspond to the pages that have the transparent colour. Ran:               identify -verbose document-in.pdf > verbose.log      Output (page 0):               Image: document-in.pdf       Format: PDF (Portable Document Format)       Class: DirectClass       Geometry: 612x792+0+0       Resolution: 72x72       Print size: 8.5x11       Units: Undefined       Type: TrueColorMatte       Endianess: Undefined       Colorspace: RGB       Depth: 16/8-bit       Channel depth:         red: 8-bit         green: 8-bit         blue: 8-bit         alpha: 1-bit       Rendering intent: Undefined       Interlace: None       Background color: white       Border color: rgba(223,223,223,1)       Matte color: grey74       Transparent color: none       Compose: Over       Page geometry: 612x792+0+0       Dispose: Undefined       Iterations: 0       Scene: 0 of 23       Compression: Undefined       Orientation: Undefined       Properties:         date:create: 2013-09-28T20:26:35-07:00         date:modify: 2013-09-28T20:26:35-07:00         pdf:Version: PDF-1.7         signature: 413f2c91258484426000128ea39e439cd701a81658d8e1521a69173b096dc0ed       Profiles:         Profile-icc: 2576 bytes           Artifex Software sRGB ICC Profile       Artifacts:         verbose: true      Output (page 1):                 Format: PDF (Portable Document Format)       Class: DirectClass       Geometry: 612x792+0+0       Resolution: 72x72       Print size: 8.5x11       Units: Undefined       Type: PaletteMatte       Endianess: Undefined       Colorspace: RGB       Depth: 16/8-bit       Channel depth:         red: 8-bit         green: 8-bit         blue: 8-bit         alpha: 8-bit       Rendering intent: Undefined       Interlace: None       Background color: white       Border color: rgba(223,223,223,1)       Matte color: grey74       Transparent color: none       Compose: Over       Page geometry: 612x792+0+0       Dispose: Undefined       Iterations: 0       Scene: 1 of 23       Compression: Undefined       Orientation: Undefined       Properties:         date:create: 2013-09-28T20:26:35-07:00         date:modify: 2013-09-28T20:26:35-07:00         pdf:Version: PDF-1.7         signature: 7dacb7c961ec49fea92685440d0cc5a1f1ef61b06c3179bcf1309768e77a79bd       Profiles:         Profile-icc: 2576 bytes           Artifex Software sRGB ICC Profile      Most pages have a 1-bit alpha channel depth and a type of `PaletteMatte`. Other pages have a type of `TrueColorMatte`. Not sure if that is relevant. # Related Related TeX.SE questions:   * \includegraphics PDF, color problem   * Multiple pdfs with page group included in a single page warning   * Inkscape → PDF → includegraphics → XeLaTeX → changed colors   * Multiple pdfs with page group included in a single page warning Related articles, blogs, discussion threads, and wiki pages:   * http://texblog.net/latex-archive/graphics/adobe-reader-wrong-color/   * http://wiki.contextgarden.net/Color   * http://www.mail-archive.com/ntg-context@ntg.nl/msg09215.html   * http://sarovar.org/tracker/index.php?func=detail&aid=4326&group_id=106&atid=493   * http://www.latex-community.org/viewtopic.php?f=5&t=1904   * http://tug.org/pipermail/luatex/2012-January/003381.html   * http://wouter.horre.be/doc/latex-beamer-and-colors-in-acrobat-reader


title: couldn't get glossaries to work (SOLVED)

text: **SOLVED** > The cause of the problem was the `include(s)` at top of my main tex file, i > changed them to `input` and now it works. I've read the documentation of the glossary package and a lot of examples (g.e. this, or this), but my glossary items will be referenced, the glossary itself otherwise won't be printed. All the other indexes/toc are working. Has someone an idea? Minimal working example:               \documentclass{scrreprt}     \usepackage[toc,acronym]{glossaries}           \makeglossaries          \newglossaryentry{bar}{name={bar}, description={\ldots}}     \newglossaryentry{baz}{name={baz},description={\ldots}}          \newacronym{foobar}{foobar}{\ldots}          \begin{document}     \section{foo section}     Lorem ipsum \gls{bar} \gls{baz} and \gls{foobar}.          \printglossary[type=main,title={Glossary},toctitle={Glossary}]     \thispagestyle{empty}\cleardoublepage     \printglossary[type=\acronymtype,title={List of Abbreviations},toctitle={List of Abbreviations}]          \end{document}      Below the one that makes problems: Makefile:               all:     xelatex thesis     biber thesis     makeglossaries thesis     xelatex thesis      thesis.tex               \RequirePackage[l2tabu, orthodox]{nag}     \documentclass[a4paper]{scrreprt}          \include{header/header}     \include{header/commands}     \include{header/settings}          \makeglossaries     \bibliography{bibliography/thesisbib}          \include{appendix/glossary}          \begin{document}     \input{variables/global}          \pagenumbering{roman}     \begin{titlepage}         \input{frontpage/frontpage}     \end{titlepage}     \newpage     \input{frontpage/title_backside}     \newpage          {         \onehalfspacing         \input{abstract}     }     \blankpage{\thesisBlankPageText}          \tableofcontents     \blankpage{\thesisBlankPageText}          \pagenumbering{arabic}     \chapter{foo}         \section{bar}         \gls{computer} is a machine and \gls{mah}, \gls{aca}.     \blankpage          \appendix      \pagenumbering{Alph}          \cleardoublepage     %\addcontentsline{toc}{subsection}{Glossar}     \glsaddall     \printglossary[type=main,title={Glossary},toctitle={Glossary}]          \addcontentsline{toc}{chapter}{\listfigurename}     \listoffigures     \addcontentsline{toc}{chapter}{\listtablename}     \listoftables     \addcontentsline{toc}{chapter}{\bibname}     \input{bibliography/bibliography}     \end{document}      glossary.tex:               \newglossaryentry{computer}     {       name=computer,       description={\ldots}     }     \newglossaryentry{mah}     {       name=mah,       description={\ldots}     }     \newacronym{aca}{aca}{a contrived acronym}


I'm having this error message: > ! Package xcolor Error: Undefined color model `blue'. No threads on tex.stackexchange were able to be helpul to me. I use a modified version of sharelatex.sty template. This is my code:               %==============================================================================     % Beamer style for posters     % // based on 'cpbgposter' beamer theme //     %==============================================================================               \ProvidesPackage{beamerthemesharelatex}               \RequirePackage{tikz}     \usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,calc}     \RequirePackage[T1]{fontenc}     \RequirePackage{lmodern}     \RequirePackage{textcomp}     \RequirePackage{amsmath,amssymb}     \usefonttheme{professionalfonts}          \usepackage{ragged2e}          % normal math font     %\usepackage{mathptmx}     % funny math font     \usepackage{euler}          %%% other text fonts     %\usepackage{palatino}     %\usepackage{bookman}     %\usepackage{utopia}     %\usepackage{tgpagella}     %\usepackage{tgheros}     %     %\renewcommand\rmdefault{qtm}     %\renewcommand\sfdefault{qhv}     %\renewcommand\ttdefault{qcr}     \renewcommand\ttdefault{lmvtt}          % multicols     \usepackage{multicol}     \setlength{\columnsep}{80pt}          % captions     \usepackage[justification=justified,listformat=simple,format=plain,labelformat=simple]{caption}          \usepackage{url}          %\usepackage{xcolor}     \usepackage{pgf}     \usepackage{pgfpages}     \pgfpagesdeclarelayout{boxed}     {       \edef\pgfpageoptionborder{0pt}     }     {       \pgfpagesphysicalpageoptions       {%         logical pages=1,%       }       \pgfpageslogicalpageoptions{1}       {         border code=\color[blue]{0.4}\pgfsetlinewidth{20pt}\pgfstroke,%         border shrink=\pgfpageoptionborder,%         resized width=.98\pgfphysicalwidth,%         resized height=.98\pgfphysicalheight,%         center=\pgfpoint{.5\pgfphysicalwidth}{.5\pgfphysicalheight}%       }%     }          \pgfpagesuselayout{boxed}     %==============================================================================     % define basic colors      %==============================================================================     %==============================================================================            \definecolor{color0}  {RGB}{0,0,0} %%% text color       \definecolor{color1}  {RGB}{20,66,129} %%% title and subsection color       \definecolor{color2}  {RGB}{28,130,185} %%% section color       \definecolor{color3}  {RGB}{255,253,250} %%% background color          %==============================================================================     %==============================================================================          %set the basic colors palette     %   \setbeamercolor{palette primary}   {fg=color0,bg=color3}     %   \setbeamercolor{palette secondary} {fg=color0,bg=color3}     %   \setbeamercolor{palette tertiary}  {fg=color0,bg=color3}     %   \setbeamercolor{palette quaternary}{fg=color0,bg=color3}       \setbeamercolor{structure}{fg=color1}     %   \setbeamercolor{titlelike}         {bg=color1,fg=color3}     %   \setbeamercolor{frametitle}        {bg=color2!10,fg=color2}     %       \setbeamercolor{colorbar}{fg=color0,bg=color1}       \setbeamercolor{normal text}{fg=color0}          % background color       \beamertemplatesolidbackgroundcolor{color3}       %\beamertemplateshadingbackground{color3}{color3!70!color1}          %set the fonts       \setbeamerfont{section in head/foot}{series=\bfseries}       \setbeamerfont{block title}{series=\bfseries}       \setbeamerfont{block alerted title}{series=\bfseries}       \setbeamerfont{frametitle}{series=\bfseries}       \setbeamerfont{frametitle}{size=\Large}       \setbeamerfont{caption}{size=\normalsize}       \setbeamerfont{caption name}{size=\normalsize}          %set some beamer theme options       \setbeamertemplate{title page}[default][colsep=-4bp,rounded=true]       \setbeamertemplate{sections/subsections in toc}[square]       \setbeamertemplate{items}[circle]       \setbeamertemplate{blocks}[width=0.0]       \beamertemplatenavigationsymbolsempty     %set bibliography style      \setbeamertemplate{bibliography item}[text]      \setbeamercolor{bibliography item}{fg=color0,bg=color3}      \setbeamercolor{bibliography entry author}{fg=color0,bg=color3}      \setbeamerfont{bibliography item}{size=\small}      \setbeamerfont{bibliography entry author}{size=\small}               %     %==============================================================================     % build the poster title     %==============================================================================     \setbeamertemplate{headline}{      \leavevmode       \begin{columns}        \begin{column}{0.15\linewidth}         \begin{center}          \includegraphics[width=1\linewidth]{images/ericae}         \end{center}        \end{column}        \begin{column}{.7\linewidth}         \vskip2cm         \centering         %\usebeamercolor{title in headline}     {\color{color2} \textbf{\huge{\inserttitle}}\\[1ex]}         \vskip 1.5cm         %\usebeamercolor{author in headline}     {\color{fg} \Large{\insertauthor}\\[1ex]}         %\usebeamercolor{institute in headline}     {\color{fg} \large{\insertinstitute}\\[1ex]}             \vskip2cm           \end{column}            \begin{column}{.15\linewidth}              \begin{center}                \includegraphics[width=1\linewidth]{images/ulaval}              \end{center}            \end{column}             \vspace{1cm}         \end{columns}          %%% additional bar under titles     %\begin{beamercolorbox}[colsep=0.5cm]{colorbar}     %\end{beamercolorbox}     }               %==============================================================================     % build the poster foot     %==============================================================================     \setbeamertemplate{footline}{      \leavevmode         \vskip2cm       \begin{center}     \begin{minipage}[c][3cm][c]{0.95\textwidth}       \begin{center}     %          \begin{flushleft}          \vskip-1cm          \begin{tikzpicture}[     remember picture,overlay,     %background rectangle/.style={fill=color3},show background rectangle     ]            \shade [inner color=color2,outer color=color3] (0,0) rectangle (\textwidth,0.3cm);          \end{tikzpicture}          \end{flushleft}     %       \vskip1cm         \centering         %\usebeamercolor{title in headline}     {\color{fg} \textbf{\large{\insertshorttitle}}}     %       \end{center}     \end{minipage}       \end{center}         \vskip1cm     }          %     %==============================================================================     % Section and subsection re-definitions          \renewcommand{\section}[1]{     \par\vskip\medskipamount%     %          \begin{flushleft}          \begin{tikzpicture}[remember picture,overlay]            \shade [inner color=color2,outer color=color3] (0,0) rectangle (\columnwidth,0.3cm);          \end{tikzpicture}          \end{flushleft}     %          \begin{center}          %\vskip1cm          {\textcolor{color2}{\textbf{\Large #1}}}          {\parskip0pt\par}          \end{center}     %          \begin{flushleft}          \vskip-1cm          \begin{tikzpicture}[remember picture,overlay]            \shade [inner color=color2,outer color=color3] (0,0) rectangle (\columnwidth,0.3cm);          \end{tikzpicture}          \end{flushleft}     %       {\parskip0pt\par}       \justifying     }          %%%     \renewcommand{\subsection}[1]{     \par\vskip\medskipamount%          \begin{center}          \vskip0.8cm          {\textcolor{color1}{\textbf{\textsl{\large #1}}}}          {\parskip0pt\par}          \end{center}     %       \justifying     }          %==============================================================================          Below is the poster.tex code:              \documentclass[final]{beamer}     \usepackage[orientation=portrait,size=a0,                 scale=1.25         % font scale factor                ]{beamerposter}          \geometry{       hmargin=2.5cm, % little modification of margins     }          %     \usepackage[utf8]{inputenc}          \linespread{1.15}     %     %==The poster style============================================================     \usetheme{sharelatex}          %==Title, date and authors of the poster=======================================     \title     [Journée de la recherche de la Faculté des Sciences et de Génie de l'Université Laval, 12 mars 2014] % Conference     { % Poster title     Réingénierie des logiciels d'enseignement à distance à l'aide de techniques d'ingénierie de connaissance %\ldots{}     }          \author{ % Authors     Tonguim Ferdinand GUINKO, Laurence CAPUS     }     \institute     [Very Large University] % General University     {     \{tonguim-ferdinand.guinko.1, laurence.capus\}@ulaval.ca \\[0.3ex]     Laboratoire ERICAE\\[0.3ex]     Département d'informatique et genie logiciel\\[0.3ex]     Université Laval     }     \date{\today}                    \begin{document}     \begin{frame}[t]


title: List of tables (or figures) by section - LaTeX

text: I am writing a master's thesis and I wish to create a list of tables and list of figures that is ordered by section, with the name of the section clearly displayed. The numbering of my tables (and figures) is already made per section, which is good. I have seen some topic dealing with this already, but it all seems awefully complicated and improbable, with redefining of functions, and most importantly, it only delt with books (and chapters, which i don't have...). I thought it would be fairly simple and i have found myself browsing the web for quite some time now. Would you have any easy solution? Attached is how i want my list of tables to look like. Thanks a million Guillaume ![That's basically how I want it to look like](http://i.stack.imgur.com/Zrvlu.png)


title: Labeling the center of a closedcycle area

text: I have this figure:               \documentclass[border=2pt]{standalone}     \usepackage{pgfplots}     \usepackage{kpfonts}          \newcommand{\func}{ .00038*(x+8)*(x+6)*(x+3)*(x-1)*(x-6)*(x-8) }          \pgfplotsset{         every x tick label/.style={font=\tiny, below=-2}         }          \begin{document}         \begin{tikzpicture}         \begin{axis}             [axis lines=middle, axis on top=true,                 xtick={-8,-6,-3,1,6,8}, ytick=\empty,                  grid=none,                  every inner x axis line/.style={-},                 every inner y axis line/.style={-},                 xticklabels = {$x_1$, $x_2$,$x_3$,$x_4$,$x_5$,$x_6$,},                 xmin=-8,xmax=8]              \addplot[color=black, samples=100,domain=-8:8] { \func } ;             \addplot[fill=gray!40, domain=-8:-6] { \func } \closedcycle node [xshift=12,yshift=-10] {A};             \addplot[fill=gray!60, domain=-6:-3] { \func } \closedcycle node [xshift=18,yshift=10] {B};             \addplot[fill=gray!80, domain=-3:1] { \func } \closedcycle node [xshift=25,yshift=-15] {C};             \addplot[fill=gray!40, domain=1:6] { \func } \closedcycle node [xshift=32,yshift=40]{D};             \addplot[fill=gray!60, domain=6:8] { \func } \closedcycle node [xshift=14,yshift=-20] {E};             \node [draw=black,align=left,font=\scriptsize] at (axis cs:-5,5)                 {Area of A = 3.2\\Area of B = 4.2\\Area of C = 8.6\\Area of D = 24.1\\Area of E = 5.9};         \end{axis}     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/gBZ1A.jpg) This looks like I want it to, but I'd like a better way to get the labels in the centers. I have to create similar things, and I'd rather not fiddle with `xshift` and `yshift` each time.


title: Designing a new tuple of Algebra Operators

text: It's neccessary to have at least **_two_** extra tuples of Albera Operators. A **minimal** tuple is a triple **(to_be_subset_eq, meet_operator, join_operator)**. There are some ideas how to make 2 extra tupes. However I need help with their implementation. For examples, as follows:               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage{amssymb}          \usepackage{soul}     \setul{1pt}{0.5pt} %depth, thikness          \usepackage[normalem]{ulem}     \renewcommand{\ULthickness}{0.5pt}     \renewcommand{\ULdepth}{1pt}          \usepackage{accents}          \def\uSubsetOne{\mbox{\bfseries\b{$\Subset$}}}     \def\uSubsetTwo{\mbox{\ul{$\Subset$}}} %soul package     \def\uSubsetThree{\mbox{\uline{$\Subset$}}} %ulem pakcage     \newcommand{\uSubsetFour}[1]{\underline{#1\mkern-4mu}\mkern4mu } %\underline hacking       the \underline hacking is from here               \def\uSubsetFive{\mathbf{\underaccent{\bar}{\Subset}}} %accent package          \begin{document}          1. In the First triple  $(\sqsubseteq,\sqcap,\sqcup)$ we need to increase the thickness.          2. Possible variants of $\Subset$ upgrading.          2.1. $(\uSubsetOne,\Cap,\Cup)$ --- the line should be at the right corner.          2.2. $(\uSubsetTwo,\Cap,\Cup)$ ---  the width of the line is too large, soul package.           2.3. $(\uSubsetThree,\Cap,\Cup)$ ---  the width of the line is too large, ulem package.          2.4. $(\uSubsetFour{\Subset},\Cap,\Cup)$ --- lack of thickness, problems with depth and positioning, width is too large.           2.5. $(\uSubsetFive,\Cap,\Cup)$ --- the line should be at the right corner, accents package.          \end{document}      The result of compilation: ![The result of compilation](http://i.stack.imgur.com/D6BnX.png) Here are some useful links: to design a New Large Math Symbol to design a New Arrow-like relation symbol - this variant is aslo applicable in case of implementing `\multimapdot` instead of an arrow in a triple `(\sqsubseteq,\sqcap,\sqcup)`. to design a New fuzzy logic symbol to design a New Box-like symbol Can anyone please help me?


title: How to number equations with a list environment

text: Hi I wish to number equations with a list environment               \begin{itemize}     \item Lol     \begin{equation}     y_t=h_t(\hat{x}_{t|t-1})     \end{equation}     \end{itemize}      I want `y_t=h_t(\hat{x}_{t|t-1})` in the same line of Lol... Can you help me to find out a way?


title: Spacing between align and list environement

text: How can I reduce the spacing between the align and the list environment?               \begin{align*}            {_C}\vOm=( 0, 0, 0 )     \end{align*}             <=== THERE IS STILL SOME SPACING inbetween?      \begin{question}           \item  askjdhaskldhklasdh klashd klajsd lökjas ldökjaslökdj       \end{question}      I have following minimal example:               \documentclass[12pt,a4paper,fleqn]{scrreprt}          \usepackage[english]{babel}     \usepackage{amsmath,lipsum}          \parindent0.0ex     \topskip0pt     \partopsep0.0ex          \renewcommand{\baselinestretch}{1.0}          \newcounter{questioncounter}     \newenvironment{question}{       \begin{list}       {({\itshape\alph{questioncounter}})}       {\usecounter{questioncounter}       \topsep=0pt     \partopsep=0pt     \parsep0.5ex \itemsep0.5ex  \leftmargin5ex \labelwidth5ex}}       {\end{list}}                    \begin{document}     \setlength{\abovedisplayskip}{0pt}     \setlength{\belowdisplayskip}{0pt}     \setlength{\abovedisplayshortskip}{0pt}     \setlength{\belowdisplayshortskip}{0pt}          This is just a normal text bla bla bla      This is just a normal text bla bla bla      \begin{align*}       A\cap B & = \{b,d,e\} \cap \{a,b,f,g\}     \end{align*}     \begin{question}      \item asdasd      \item lkasjd lkajsd lökjasd      \end{question}     This is just a normal text bla bla bla      This is just a normal text bla bla bla      \begin{align*}       A\cap B & = \{b,d,e\} \cap \{a,b,f,g\}     \end{align*}     \begin{question}      \item asdasd      \item lkasjd lkajsd lökjasd      \end{question}          \end{document}


title: What does --shell-escape do?

text: I stumbled upon an example, which needed to be compiled with the additional option `\--shell-escape`. Using this option it worked just fine, but I'm curious: > Why or when is this option needed and what does it actually do?


title: Creating a digraph with formulas instead of nodes

text: I am looking to make a diagram with lines similar to this one: Labeling Edges in a Weighted Digraph But I am trying to have a mathematical formula, which is the label, instead of being above the dot nodes, replace the thick dot nodes. In other words the lines don't actually connect, but like those in commutative diagrams. This method allows location of nodes to be precisely specified, slightly different from tikz-cd. How? How to do this in tikz-cd is also helpful. How does one make the node to label arrows and cutting of arrows by overlapping arrows in this framework? [ ... question was tidied up after being answered and size of arrowheads and labels question placed in its own question ... My own MWE example moved to that question for those corrections, Changing Size of Arrows, Labels, Loops in Diagrams and Directed Graphs, since the answer has several MWEs that answer original question.]


title: semibold Linux Libertine broken?

text: I've just updated to the latest TeX Live (on a Mac, i.e. `sudo tlmgr update --self --all` says `no updates available`) and am now getting errors when trying to use semibold fonts with the `libertine` package. My MWE is               \documentclass{article}     \usepackage[semibold]{libertine}     \begin{document}     no body needed     \end{document}      When compiling (with PDF LaTeX) I get the output below. `texdoc libertine` still suggests that this is the correct way of getting semibold text, so don't think this option has been depreciated. Any clues appreciated!               This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)      restricted \write18 enabled.     entering extended mode     (./test.tex     LaTeX2e <2011/06/27>     Babel <3.9h> and hyphenation patterns for 78 languages loaded.     (/usr/local/texlive/2013/texmf-dist/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/usr/local/texlive/2013/texmf-dist/tex/latex/base/size10.clo))     (/usr/local/texlive/2013/texmf-dist/tex/latex/libertine/libertine.sty     (/usr/local/texlive/2013/texmf-dist/tex/generic/ifxetex/ifxetex.sty)     (/usr/local/texlive/2013/texmf-dist/tex/generic/oberdiek/ifluatex.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/xkeyval/xkeyval.sty     (/usr/local/texlive/2013/texmf-dist/tex/generic/xkeyval/xkeyval.tex     (/usr/local/texlive/2013/texmf-dist/tex/generic/xkeyval/keyval.tex)))     (/usr/local/texlive/2013/texmf-dist/tex/latex/base/textcomp.sty     (/usr/local/texlive/2013/texmf-dist/tex/latex/base/ts1enc.def))     ! Undefined control sequence.     <argument> \libertine@semibold                                    true     l.210 \ProcessOptionsX\relax          ? ^D     ! Emergency stop.     <argument> \libertine@semibold                                    true     l.210 \ProcessOptionsX\relax          !  ==> Fatal error occurred, no output PDF file produced!     Transcript written on test.log.


title: passing a String from an R Script to .Rnw template R code section ,brew/knitr

text: this is my first ever post and i am quite new to all of this, so i hope i am doing this right. my problem is the following: i wrote some R code to get some ID's from a Database, which are then used to brew templates. the template uses Knitr R to then build some querys around the ID's to get the data then used for the actual report. the Script goes like this:               ...     create.report() <- function(ID){          reportname <- "MyReport.Rnw"          brew('template.rnw',reportname)          knit(reportname)           ....     }      the template.rnw with knitr gets the ID passed by brew :               \section*{This is a Report for <%=ID%>}          <<loaddata, echo =FALSE>>=     query <- paste0("SELECT ... WHERE ID= ",<%=ID%>) # this gets us the Data for the report          data <- dbGetQuery(con,query) # Data from db is in Data now.          @     ...      And this just worked fine for me. But now i want to pass more parameters from the Script to the template then just simple Input like an ID. For example i would like to pass a timespan like from="2010-01-01" ,to="2012-01-01" to maby use this like               ...     create.report() <- function(ID,fromdate,todate){          reportname <- "MyReport.Rnw"          brew('template.rnw',reportname)          knit(reportname)           ....     }      .rnw template               <<loaddata, echo =FALSE>>=     from <- paste0("AND date(...) =>'",<%=fromdate%,"'")     to <- paste0("AND date(...) =< '", <%=todate%>,"'")     query <- paste0("SELECT ... WHERE ID= ",<%=ID%>,from,to) # this gets us the Data           data <- dbGetQuery(con,query) # Data from db is in Data now.          @     ...          but the Problem with that is, that he wont leave the fromdate and todate to be a string like "2010-01-01" and allways make it 2008. is there any way to tell the Code Chunks not to do anything with the brew input before setting it, or maby pass the parameters from outside to the chunk so they dont have to be set in the chunk ? I hope you can help me with this, or show me a proper way around it.


title: Should I read Donald Knuth's The TeXbook?

text: I've been using LaTeX for about a year or two as part of writing reports in university and want to gain a more in-depth understanding of how it works (I'm a computer science student). Would Donald Knuth's The TeXbook be a recommended read for me? What does it cover? What is your impression of it, those who have read it?


title: Positioning footnotes before the bibliography

text: I don't want a separate page for my bibliography, so the references simply follow after the end of the actual document. However, there happens to be a footnote on the last page which is then displayed _underneath_ the references. How can I move the footnote to just beneath the text, but before the references? Screenshot of the last page: ![enter image description here](http://i.stack.imgur.com/VTciX.jpg)


title: Restrict function plot to a range of x values using pgfplots.

text: I want to create a plot of two functions using `pgfplots` and `LaTeX`. I want one of the functions only in a certain interval, I'll give an example:               \begin{tikzpicture}     \begin{axis}[         axis x line=middle,         axis y line=middle,         axis on top,         tick label style={font=\tiny},         smooth,         xlabel=$x$,         xmin=-4, xmax=4,         ymin=-1.5, ymax=1.5,         width=0.8\textwidth,         height=0.4\textwidth,         legend style={at={(0.02,0.97)},anchor=north west},     ]     \addplot[draw=red]{2/(1+exp(-x))-1};     \addplot[draw=blue,domain=0:4]{1/(1+exp(-x))};     \end{axis}     \end{tikzpicture}      Now what I want is that the second, blue function is only drawn in the range `x=0:4`, but the output contains the graph for the whole intervall from `-4 to 4`. I've scrolled through _the whole pgf_ manual, but it seems that `domain=a:b` is the solution. Maybe my `PGF` is out of date? I'm using Debian Squeeze with `PGF` version 2.0. EDIT: I've tried out several examples from the `PGF` manual, and many don't work. I believe this is a problem with my machine/Debian/whatever and not with `PGF`. My current workaround is to generate a table of function values for each graph and include it with `\addplot file {function_values.dat};` For example, my `PGF` ignores the `samples=n` setting and many graphs look horrible. Using a table of function values improves output considerably.