title: How can I balance uniformity of style files against modularity?

text: I'm using Windows/TeXworks/MiKTeX, and I would like to have one style file I can use anywhere in any document in my top-level folder. If I want to add a new command or renew an old one, I'd like that to be available in all documents recursively contained in my top-level folder. I have a very hierarchical structure to my top-level folder. So this would seem to point to having a single file that TeXworks knows about. Could I add a path in Preferences -> Typesetting -> Paths for TeX and related programs? I've tried that, possibly superficially, without any success. Adding the correct folder to the Windows PATH variable doesn't seem to do the trick, either. On the other hand, suppose I want to send someone a TeX file? It would be nice in such circumstances to be able to have the style file in the same folder as the TeX file. If I do that, how could I ensure that it's always up-to-date? Is there a script available somewhere that could take my master style file and push it down to all pre-existing lower-level locations? Just to reiterate: I want uniformity of my style files in my very hierarchical folder structure. However, I would also like modularity, in that each folder is self-contained. How can I achieve that? Also, out of curiosity, since I may acquire a Linux computer soon, how would I do this in, say, *ubuntu with TeXlive?


title: Suppress lacheck error

text: How can I suppress a `lacheck` error on a single line of a file? Using `chktex`, I know that I can add a comment at the end of a line to suppress a particular warning. For instance, if I want to suppress warning `#8`, I can use:               % chktex 8      Is there something equivalent that can be done using `lacheck`?


title: Which figure type to use: pdf or eps?

text: Both are vector graphics (typically) and both can be imported painlessly into a pdflatex document (so let's say we ignore dvi for this question). What are the advantages and disadvantages of each? What should I use?


title: Moving page number or text above horizontal footer line

text: How do I move some chosen text (or current page number) directly above the horizontal rule/line created by the `\renewcommand{\footrulewidth}` command? I am using the fancyhdr package. Edit: More specifically --- How can I keep the page number below the rule, but add some text (e.g. a URL) above the line?


title: Is it possible to remove the ddots when using umlcreatecall in the tikz-uml package?

text: I am using the TikZ-UML package to make a UML Sequence Diagram and want to remove the ":" character (separating class and instance name) when using `\begin{umlcreatecall}[]{A}{B}`. This is possible with the `no ddots` option when using `\umlobject[no ddots, x=4]{A}` to define the lifeline initially rather than dynamically (e.g. "create" with constructor during part of the sequence) **Example 1: "no ddots" set on umlobject**               \begin{tikzpicture}         \begin{umlseqdiag}             \umlobject[no ddots, x=4]{A}             \umlobject[no ddots, x=8]{B}                  \begin{umlcall}[op=create]{A}{B}             \end{umlcall}         \end{umlseqdiag}     \end{tikzpicture}         ![Using umlobject to create instance](http://i.stack.imgur.com/2AeSm.png) **Example 2: Need to find something similar to "no ddots" that works with umlcreatecall**               \begin{tikzpicture}         \begin{umlseqdiag}             \umlobject[no ddots, x=4]{A}                  \begin{umlcreatecall}[x=8]{A}{B}             \end{umlcreatecall}         \end{umlseqdiag}     \end{tikzpicture}         ![Using umlcreatecall to create instance](http://i.stack.imgur.com/ih1SY.png) **Update:** Here is an example showing why one would use `\begin{}` and `\end{}` in tikz-uml; specifically, because it is semantically how you nest function calls (need to tell the macro / tikz-uml how far down the "activation box" should extend and how the arrows are positioned).                   \begin{tikzpicture}             \begin{umlseqdiag}                 \umlobject[no ddots, x=0]{A}                 \umlobject[no ddots, x=6]{B}                 \umlobject[no ddots, x=12]{C}                      \begin{umlcall}[op=doComplexTask(), type=synchron, with return]{A}{B}                     \begin{umlcall}[op=doSomethingWithC(), type=synchron, with return]{B}{C}                     \end{umlcall}                     % Calling these without the \begin and \end does not work                     %\umlcall[op=doMoreStuff(), type=synchron]{B}{B}                     %\umlcall[op=doStuffWithA(), type=synchron, with return]{B}{A}                 \end{umlcall}             \end{umlseqdiag}         \end{tikzpicture}      ![Example of nested call \(works with umlcall or umlcreatecall\)](http://i.stack.imgur.com/Sr3tF.jpg)


title: How to draw a shape on the entire height of a minipage?

text: My purpose is to create a nice resume with the arrows indicating the timeline of my experiences. The left column contains information that is not relevant here. I have the following code:               \documentclass[a4paper,12pt]{article}%minimal working example     \usepackage[french]{babel}          \usepackage{fontspec}%déjà chargé par luatextra     \defaultfontfeatures{Ligatures=TeX} % to have the automatics ligatures of TeX     \setromanfont{Verdana}          \usepackage{paracol} %%Pour les colonnes sur plusieurs pages          \usepackage{multido}          \begin{document}          \setlength{\parindent}{0em}     \setlength{\parskip}{0.5em}          \columnratio{0.32}     \begin{paracol}{2}     \begin{leftcolumn}     Left column          \multido{\i=2+1}{30}{bla ble bli\\}          \end{leftcolumn}%     \begin{rightcolumn}%          \textbf{A title for something that is a little bit verbose}          {\scriptsize a comment about it}          \hspace{2em}     \begin{minipage}{0.6\columnwidth}          \begin{itemize}     \item {\footnotesize bla bla bla}     \end{itemize}     {\footnotesize bla bla again}          {\footnotesize bla}          {\footnotesize bla}          \begin{itemize}     \item {\footnotesize bla bla}     \end{itemize}     \end{minipage}     \begin{minipage}{0.28\columnwidth}     {\fbox{Some stuff}}\end{minipage}          \textbf{A second title  that is a little bit verbose}          {\scriptsize a comment about it}          \hspace{2em}     \begin{minipage}{0.6\columnwidth}          \begin{itemize}     \item {bla bla bla}     \end{itemize}     {\footnotesize one thing}          {\footnotesize another one}          {\footnotesize a third one}          {\footnotesize a fourth one}          \begin{itemize}     \item {\footnotesize bla bla}     \item {\footnotesize bla bla}     \item {\footnotesize bla bla}     \item {\footnotesize bla bla}     \item {\footnotesize bla bla}     \item {\footnotesize bla bla}     \item {\footnotesize bla bla}     \end{itemize}     {\footnotesize something else}          {\footnotesize a last thing}     \end{minipage}     \begin{minipage}{0.28\columnwidth}     {\fbox{Some stuff}}     \end{minipage}          \textbf{Another title}          {\scriptsize etc}     \end{rightcolumn}     \end{paracol}     \end{document}      I would like to add to the pdf output the red shapes as drawn into this example: ![example](http://i.stack.imgur.com/ughvu.png) The shape should be an arrow as shown there (not necessarily red, I will probably change the color), and will be a vector graphic programmatically drawn. Possibly, I would like it to be filled with a background color. I want the arrow's height to be constrained to the minipage's height (something like arrow's height = minipage's height - 4em). I use minipage here because I also draw rounded boxes (the ones with "Some stuff") and have intermediate titles. I give here a minimalist example of what I wish. I would also like (if possible) that may arrow can be continued when a page break occurs (but I don't know if it is possible using minipage) How can I achieve this ? **EDIT** : here is an exemple of what I would like to do (the left rounded box's height depends on its content, not on the minipage's height) ![final look of this part of my resume](http://i.stack.imgur.com/JpUd1.png)


title: On lozenge diagrams

text: In the literature of sequence transformations, some algorithms are nicely represented as lozenge diagrams, e.g. ![Wynn epsilon](http://i.stack.imgur.com/vCSQK.png) or in an extended form, ![Wynn table](http://i.stack.imgur.com/K3X8a.png) I could probably cheat and use `matrix`, `array` or some such construct, but might there be a better way to render these in LaTeX?


title: Lines in matrices don't work in mathjax

text: Mathjax and latex don't produce the same result: Code:               \begin{array}{c|c}        \lambda & b^* \\ \hline        0 &  B \\        \end{array}     \right)      Latex: ![output](http://i.stack.imgur.com/04HeA.png) Mathjax: ![enter image description here](http://i.stack.imgur.com/MpirM.png) Would there be a trick so that I can get the same result in mathjax ? I'm not sure if I'm allowed to ask mathjax question here. Otherwise I would rephrase my question: Is it possible to get the same result in latex using an other code ?


title: Two mini pages side by side vertically aligned on top

text: I would like to have two mini pages side by side, vertically aligned on top. The left hand mini page features a table, the right hand side simple text. Alas, the right mini page is a little lower compared to the left one.               \documentclass{article}     \setlength{\parindent}{0pt}     \begin{document}     \begin{minipage}[t]{.5\textwidth}%     %\hrule     \begin{tabular}{rl}     abc & def \\     abc & def \\     \end{tabular}     \end{minipage}%     \begin{minipage}[t]{.5\textwidth}%     %\hrule     abc          def          ghi          jkl     \end{minipage}     \end{document}      If you comment in the two `\hrule` commands, they are on par. How come? What am I doing wrong? BTW: if the table only features one line, the mini pages are on par, even without the `hrule` commands.


title: `\tag` and `\Rightarrow`

text: \documentclass[a4paper,12pt]{article}     \usepackage{amsmath}     \usepackage{fullpage}     \usepackage{secdot}     \usepackage{setspace}          \setlength\parindent{0pt}          \title{\vspace{-3em} Quantum Mechanics}     \author{David G}          \begin{document}     \maketitle          \section{Operators In Schroedinger Equation}     \onehalfspacing     In quantum mechanics, a question that concerns us all is whether light is particles or waves. Let's first assume light is wave, so it must satisfy the wave equation:     \begin{align*}         \left (\frac{\partial^2 \psi}{\partial x^2}+\frac{\partial^2 \psi}{\partial y^2}+\frac{\partial^2 \psi}{\partial z^2} \right)-             \frac{1}{c^2}  \frac{\partial^2 \psi}{\partial t^2} & = 0 \tag{\textbf{1.1}}\\         \nabla^2 \psi - \frac{1}{c^2}  \frac{\partial^2 \psi}{\partial t^2} & = 0 \tag{\textbf{1.2}}     \end{align*}          Naturally, we construct the solution of this wave equation:      \[      \psi(x,y,z;t) = \psi_{0} \, e^{i \, [\, k (x+y+z)- \omega t + \phi_{0}\, ]} \tag{\textbf{1.3}}     \]          Here, we can set the initial condition $\phi_{0} = 0$, and we would like to explore the 1D case:     \[          \psi(x,t) = \psi_{x,0} \, e^{i \, (kx- \omega t)} \tag{\textbf{1.4}}     \]      Now, we lay down all the foundation, and we want to express the momentum and energy operators, by using the solution of the wave function. By observing the equation:     \[      E = \frac{p^2}{2m} + V \tag{\textbf{1.5}}     \]     We want to express the momentum $p$ as a differential operator.     \begin{align*}            \frac{\partial \psi}{\partial x}  &= i k \psi                                                = i \frac{p}{h} \psi \tag{\textbf{1.6}} \\                                    p \, \psi &= - i \hbar \frac{\partial}{\partial x} \psi \\                                      \hat{p} &= - i \hbar \frac{\partial}{\partial x} \tag{\textbf{1.7}}     \end{align*}     \pagebreak          Plug equation $1.7$ into $1.5$, we get:     \[             \hat{H} = - \frac{\hbar ^2}{2 m} \frac{\partial ^2}{\partial x^2} + \hat{V} \tag{\textbf{1.8}}     \]     , where $\hat{H}$ is Hamiltonian Operator, namely the Energy Operator.\\     To this point, we only explore the property of $\frac{\partial \psi}{\partial x}$. A natural thought right afterwards is to see $\frac{\partial \psi}{\partial t}$.     \begin{align*}             \frac{\partial \psi}{\partial t} & = - i \omega \psi \tag{\textbf{1.9}}                                                 = - i \frac{E}{\hbar} \psi \\                                     \hat{H}  & = i \hbar \frac{\partial}{\partial t} \tag{\textbf{1.10}}     \end{align*}     Now, by observing equation $1.8$ and $1.10$, we derive that the wave function of one particle must satisfy the \textbf{Schroedinger Equation}:     \[         \boxed{ i \hbar \frac{\partial}{\partial t} = - \frac{\hbar^2}{2m} \frac{\partial ^2}{\partial x^2} + \hat{V} } \tag{\textbf{1.11}}     \]     \end{document}      I have two questions about my code:   1. Is there an easy way to `\tag` my equation? Like, some command automatically `tag` (1.1), (1.2)...and so on. I don't want to type each time those equation number.   2. `\begin{align*} \frac{\partial \psi}{\partial t} & = - i \omega \psi \tag{\textbf{1.9}} = - i \frac{E}{\hbar} \psi \\\ \hat{H} & = i \hbar \frac{\partial}{\partial t} \tag{\textbf{1.10}} \end{align*}` In this code, I want to add `\Rightarrow` at the leftmost side in the line of equation 1.10, how to do it? Besides, I am not sure if the position of the leftmost will be the nicest, you are welcome to adjust the right position for me, as long as it looks nice.   1. Any other suggestions on my code, like redundancies or improvement, are very welcome. I want to improve every time!


title: How to include a .gif inside TikZ mindmap?

text: I know that TikZ provides a mindmapping library. I am wondering if it is possible to insert a `*.gif` picture instead of writing text inside each child (circle). Any help will be appreciated in advance. here is the sample:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{mindmap,trees}     \tikzset{concept/.append style={fill={none}}}     \begin{document}     \pagestyle{empty}     \begin{tikzpicture}       \path[mindmap,concept color=black,text=black]         node[concept] {Motivation}         [clockwise from=0]         child[concept color=green!50!black] {           node[concept] {practical} }         child[concept color=blue, counterclockwise from=30] {           node[concept,scale=1.2] {applied} }         child[concept color=orange, counterclockwise from=60] {          node[concept] {theoretical} };     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/WZY7y.png) Now instead of "applied", I want to insert a `*.gif` image.


title: How to pass comma in value of a (xkeyval) comma separated list of values at \documentclass level?

text: At `\usepackage` level, `xkeyval` allows us to insert commas in value of a comma separated list of values: it is enough to enclose in braces the values containing commas. For instance, the following MCE works well.               \begin{filecontents*}{mypackage.sty}     \NeedsTeXFormat{LaTeX2e}[1999/12/01]%     \ProvidesClass{mypackage}[2013/11/17 v0.1 A test package]%     %     \RequirePackage{xkeyval}%     %     \def\@separator{}%     %     \DeclareOptionX{separator}[]{\def\@separator{#1}}%     \ExecuteOptionsX{separator}%     \ProcessOptionsX\relax%     %     \newcommand{\twoseparatedvalues}[2]{#1\@separator#2}%     %     \end{filecontents*}     %     \documentclass{article}     \usepackage[separator={,}]{mypackage}     %     \begin{document}     \twoseparatedvalues{foo}{bar}     \end{document}      But AFAICS, at `\documentclass` level, enclosing values in braces is not possible. For instance, the compilation of the following MCE:               \begin{filecontents*}{myclass.cls}     \NeedsTeXFormat{LaTeX2e}[1999/12/01]%     \ProvidesClass{myclass}[2013/11/17 v0.1 A test class]%     %     \RequirePackage{xkeyval}%     %     \def\@separator{}%     %     \DeclareOptionX{separator}[]{\def\@separator{#1}}%     \ExecuteOptionsX{separator}%     \ProcessOptionsX\relax%     %     \newcommand{\twoseparatedvalues}[2]{#1\@separator#2}%     %     \LoadClass{article}%     \end{filecontents*}     %     \documentclass[separator={,}]{myclass}     %     \begin{document}     \twoseparatedvalues{foo}{bar}     \end{document}      throws the error:               ! LaTeX Error: Missing \begin{document}.      BTW, passing values without commas at `\documentclass` level and passing afterwards values with commas enclosed in braces work like a charm, as in the following MCE.               \begin{filecontents*}{myclass.cls}     \NeedsTeXFormat{LaTeX2e}[1999/12/01]%     \ProvidesClass{myclass}[2013/11/17 v0.1 A test class]%     %     \RequirePackage{xkeyval}%     %     \def\@separator{}%     %     \DeclareOptionX{separator}[]{\def\@separator{#1}}%     \ExecuteOptionsX{separator}%     \ProcessOptionsX\relax%     %     \newcommand{\twoseparatedvalues}[2]{#1\@separator#2}%     %     \LoadClass{article}%     \end{filecontents*}     %     \documentclass[separator=--]{myclass}     %     \begin{document}     \twoseparatedvalues{foo}{bar}          \setkeys{myclass.cls}{separator={,}}{}%     \twoseparatedvalues{foo}{bar}     \end{document}      Hence my question: how to pass comma in value of a (xkeyval) comma separated list of values at `\documentclass` level?


title: How should I cite the European Commission?

text: I'm using biblatex for reference management in my thesis, and I want to cite this report from the European Commission but I can't figure out what to put in the bib entry. Usually I just find whatever I want to cite on Google Scholar and export the citation, but this document doesn't seem to be catalogued there. How should the bibliography entry (suitable for bibtex or biblatex) look for the above linked document?


title: How to combine fill and pattern in a pgfplot bar plot?

text: Is it possible to combine a TikZ pattern with a background of a chosen color?               \addplot[black,fill=yellow,pattern=north east lines] ...      yields bars which have black stripes on white (transparent?) background, whereas               \addplot[black,pattern=north east lines,fill=yellow] ...      yields bars which are plain yellow with not stripes at all. Any chance of getting tiger-like bars (black stripes on yellow) without defining an inherently-colored pattern by hand?


title: can array environment be applied in this case?

text: Consider the following document: Basically what I would like to have are two things: a curly bracket on the right side encompassing equations (5) and (6) below (in the `flalign` environment). From the curly bracket I would like to have a `\Rightarrow` leading to an equation (a=b).               \documentclass[leqno,10pt]{article}     \usepackage{soul}     \usepackage[margin=0.75in]{geometry}     \def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]}     \let\endchangemargin=\endlist      \usepackage{fancyhdr}     \pagestyle{fancy}     \lhead{Lecture 1}     \rhead{Handout 3}     \usepackage{mathtools}     \usepackage{enumitem,array}     \usepackage{relsize}     \usepackage{amsmath}     \usepackage{amsthm} %for proof      \newtheorem*{mythm}{Theorem}     \newtheorem*{mydef}{Definition}     \newtheorem*{mycases}{Special Cases}     \title{\ul{Conditional Expectations in Bivariate Probability Distribution}}     \date{}     \newenvironment{mydescription}{%        \renewcommand\descriptionlabel[1]{\hspace{\labelsep}\textbf{{##1}}}%        \begin{description}%     }{%        \end{description}%     }     \newenvironment{definition}[1][Definition]{\begin{trivlist}     \item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}          \providecommand\given{}      \DeclarePairedDelimiterX{\EV}[1]{E(}{)}{\renewcommand\given{\nonscript\,\delimsize\vert\nonscript\,} #1}     \providecommand\iven{}      \DeclarePairedDelimiterX{\V}[1]{V(}{)}{\renewcommand\iven{\nonscript\,\delimsize\vert\nonscript\,} #1}          \begin{document}          \newenvironment{Myitemize}{%     \renewcommand{\labelitemi}{{}}%     \begin{itemize}[nosep]}{\end{itemize}}          \maketitle          \newcommand{\myitem}{\stepcounter{enumi}\item[(\theenumi)]}%for enumerate with no. in brackets     \newcommand\litem[1]{\item{\bfseries {#1}}}          \thispagestyle{fancy}          \begin{mydef}      If the random vector $(X,Y)$ has joint \textbf{pdf} $f(x,y)$ with conditional \textbf{pdf} $g_{2}(y|x)$, and if $Z=h(X,Y)$ is a (single-valued) function of (X,Y). Then the conditional expectation of the random variable $Z$, given $X=x$ is      \begin{equation}     E(Z|x)=\int_{-\infty}^{\infty}{h(x,y)g_{2}(y|x)dy}     \label{eq:}     \end{equation}     \end{mydef}           \begin{mycases}     (a,b,c are constants; ($X^{*}=X-E(X); Y^{*}=Y-E(Y)$)\\     \begin{flalign}\label{cas}         & Z=a+bX+cY & \Rightarrow\quad & \!\begin{aligned}[t]\EV{Z \given x}&=\EV{a \given x}+b.\EV{X \given x}+c.\EV{Y \given x} \\&= a+bx+c.\EV{Y \given x} \end{aligned} &\hphantom{Z=a+bX+cY\quad(2)} & \\        & Z=XY & \Rightarrow\quad & \EV{Z \given x} = x\EV{Y \given x}\\      & Z = Y & \Rightarrow\quad & \EV{Z \given x} = \EV{Y \given x} = \mu_{Y|x} = \text{The CE of Y given X}\\      & Z=(Y-\mu_{Y|X})^{2} &\Rightarrow\quad & \EV{Z \given x} = \V{Y \iven x} = \sigma^{2}_{Y|x}=\text{The CV of Y given X}\\      & Z=(Y-\mu_{Y})^{2} & \Rightarrow\quad & \EV{Z \given x} = \V{Y \iven x} + (\mu_{Y|x}-\mu_{Y})^2     \end{flalign}          \end{mycases}          \end{document}


title: TOC with pagestyle empty in memoir

text: I'm using the memoir class for a thesis, and want no page numbering of the front matter including the TOC. Have followed the answer to Table of contents with page style empty which does remove the page numbering of the first page of the TOC. My TOC is three pages long, and the last 2 pages still has a heading with roman page numbering. Minimal example below here:               \documentclass[danish,12pt,a4paper,oneside,openany]{memoir}     \AtBeginDocument{\addtocontents{toc}{\protect\thispagestyle{empty}}}           \begin{document}       \frontmatter       \pagestyle{empty}       \include{frontmatter/titlepage}       \include{frontmatter/abstract}       \tableofcontents*       \pagestyle{headings}            \mainmatter       ...


title: How to put section number into the right side of section title in LaTeX?

text: I am a novice for LaTeX, so need you guy's help. I am wondering how to change section style in order to put the section number into the right side of section title in LaTeX, especially memoir class. So, I want it to show like [chapter number] section title [section number] For example, let a chapter has three sections like section one, section two, and section three. Then, they should appear like               1. section one 1.     1. section two 2.     1. section three 3.      Can anybody do that for me?


title: Prevent \listofalgorithms from producing blank page

text: I'm writing my thesis with latex, and there's a chapter in which are described some algorithms using the algorithmicx package. What I want to do is to place an index of algorithms at the very beginning of the chapter, so I've tried               \chapter{Algoritmi per la ricerca}     \label{ch:algoritmi}          \listofalgorithms          Text of the chapter....      The problem is that the command \listofalgorithms produces a blank page between the chapter title and the list of algorithms. Is there a way to avoid this? I'm using document class scrbook. Thank you :)


title: How to control the size of diagbox(with long text) in psmatrix diagrams?

text: The problem for me is the 4th and 5th line from the bottom (code from an example of Herbert and the problem is where I try to add things ;-) )               \usepackage{amsmath,amsfonts,amssymb,latexsym}          \usepackage{pst-node}     \usepackage{pst-blur}               %\input{pssettings.tex}     \begin{document}     \psset{framearc=0.2,shadowcolor=black!70,shadowangle=-90}     \begin{psmatrix}[rowsep=1.75,colsep=1.5]% defines the distance between two frames         \psframe[fillcolor=lightgray,linestyle=none,blur,shadow](-1.00,-1.00)(1.00,1.00)         \cnode[fillstyle=solid,fillcolor=blue](0,0){0.15}{Current}         & [name=SA] Solución Actual\\         \psframe[fillcolor=lightgray,linestyle=none,shadow,blur](-1.00,-1.00)(1.00,1.00)         \cnode[fillstyle=solid,fillcolor=blue](0,0){0.15}{Current}         \cnode[fillstyle=solid,fillcolor=pink](-0.75,0.75){0.15}{Current}         \cnode[fillstyle=solid,fillcolor=pink](0,0.65){0.15}{Current}         \cnode[fillstyle=solid,fillcolor=pink](0.75,0.75){0.15}{Current}         \cnode[fillstyle=solid,fillcolor=pink](-0.75,0.15){0.15}{Current}         \cnode[fillstyle=solid,fillcolor=pink](0.65,0.15){0.15}{Current}         \cnode[fillstyle=solid,fillcolor=pink](-0.75,0.75){0.15}{Current}         & [name=SS] Generar Vecindad\\         \psframe[fillcolor=lightgray,linestyle=none,shadow,blur](-1.00,-1.00)(1.00,1.00)         \cnode[fillstyle=solid,fillcolor=pink](1,1){0.20}{Current}         \cnode[fillstyle=solid,fillcolor=blue](0,0){0.20}{Current}         \psline[linewidth=0.2]{->}(1,1)(0.5,0.5)         & Elegir Mejor Vecino\\         \psdiabox[shadow=true]{¿Is in the house of Mary?}         &\psdiabox[shadow=true]{¿Is in the house of King?}& \\         }}&     \end{psmatrix}     \end{document}


title: Use Cyrillic characters in the table of contents with \pdfbookmark

text: I am trying to do a book which has its main language as Russian. The problem is that on the second compiler run on TeXShop (LaTeX document) when it needs to create the bookmarks in Russian, it struggles with the characters for some reason. This same code works when I use it with a text in English, so I need to figure out how to handle the Russian. I'm a bit new to TeX and would appreciate your help very much. This is a shortened example of my code:               \documentclass[a5paper]{book}     \usepackage{graphicx}     \usepackage[left=1cm, right=1cm, top=1.5cm, bottom=1cm]{geometry}     \usepackage[utf8]{inputenc}     \usepackage[T2B]{fontenc}     \usepackage[pdftex]{hyperref}     \hypersetup{         unicode=true,         colorlinks=true,         citecolor={black},         linkcolor={black},         urlcolor={black},         pdffitwindow=true,     }     \usepackage[none]{hyphenat}     \sloppy          \begin{document}     \frontmatter         % Titlepage         \title{             \Huge{\textbf{БИБЛИЯ}}\\\vspace{0.05cm}         \author{} \date{}         }         \pdfbookmark[0]{Title Page}{title}         \maketitle          \mainmatter     \begin{center}     \pdfbookmark[0]{Бытие}{Бытие}\noindent\\     \vspace{0.15cm}\textbf{\Huge{Бытие}}\vspace{0.00cm}\\     \end{center}     \pdfbookmark[1]{1}{Бытие1}\noindent\Large{Глава 1}\\\\     \normalsize 1 \Large \indent В начале сотворил Бог небо и землю.\\     \normalsize 2 \Large \indent Земля же была безвидна и пуста, и тьма над бездною, и Дух Божий носился над водою.\\          \pdfbookmark[1]{2}{Бытие2}\noindent\Large{Глава 2}\\\\     \normalsize 1 \Large \indent Так совершены небо и земля и все воинство их.\\     \normalsize 2 \Large \indent И совершил Бог к седьмому дню дела Свои, которые Он делал, и почил в день седьмый от всех дел Своих, которые делал.\\          \begin{center}     \newpage\pdfbookmark[0]{1-e Иоанна}{1-e Иоанна}\noindent\\     \vspace{0.15cm}\textbf{\Huge{1-e Иоанна}}\vspace{0.00cm}\\     \end{center}     \pdfbookmark[1]{1}{1-e Иоанна1}\noindent\Large{Глава 1}\\\\     \normalsize 1 \Large \indent О том, что было от начала, что мы слышали, что видели своими очами, что рассматривали и что осязали руки наши, о Слове жизни, –\\     \normalsize 2 \Large \indent ибо жизнь явилась, и мы видели и свидетельствуем, и возвещаем вам сию вечную жизнь, которая была у Отца и явилась нам, –\\          \pdfbookmark[1]{2}{1-e Иоанна2}\noindent\Large{Глава 2}\\\\     \normalsize 1 \Large \indent Дети мои! сие пишу вам, чтобы вы не согрешали; а если бы кто согрешил, то мы имеем ходатая пред Отцем, Иисуса Христа, праведника;\\     \normalsize 2 \Large \indent Он есть умилостивление за грехи наши, и не только за наши, но и за грехи всего мира.\\          \end{document}      This is a small part of the log output showing the error: > >     (/usr/local/texlive/2011/texmf- > dist/tex/generic/oberdiek/gettitlestring.sty >     Package: gettitlestring 2010/12/03 v1.4 Cleanup title references (HO) >     ) \c@section@level=\count108 ) LaTeX Info: Redefining \ref on input >     line 18. LaTeX Info: Redefining \pageref on input line 18. LaTeX Info: >     Redefining \nameref on input line 18. >   >     (./ATest.out ./ATest.out:3: Undefined control sequence.  \T >                   2B\CYRB \T 2B\cyrery \T 2B\cyrt \T 2B\cyri \T 2B\cyre .0 >     l.3 ...2B\cyrery \T2B\cyrt \T2B\cyri \T2B\cyre .0} >                                                       % 3 ? >     ./ATest.out:3: Missing \endcsname inserted.   >                        \T2B\CYRB  l.3 ...2B\cyrery \T2B\cyrt \T2B\cyri >     \T2B\cyre .0} >                                                       % 3 ? >     ./ATest.out:3: Undefined control sequence.  \T >                   2B\CYRB \T 2B\cyrery \T 2B\cyrt \T 2B\cyri \T 2B\cyre .0 >     l.3 ...2B\cyrery \T2B\cyrt \T2B\cyri \T2B\cyre .0} >                                                       % 3 ?


title: Put the "journaltitle" in article between brackets using biblatex

text: I'm using biblatex in a document with the `verbose-trad1` style. The problem is that I need to put the Journal Title in the bibliography between brackets. I've just found a way to avoid the Journal Title to be in italics : `\DeclareFieldFormat{journaltitle}{#1}` But no way to adapt in to put the title between brackets.... I hope my request is clear enough ! Thanks


title: Problems with custom symbols

text: I'm trying to include some custom symbols in LaTeX. So I have some vector graphic images that I export to PDF, such as: ![My Symbol](http://i.stack.imgur.com/YWWMA.jpg) and I include them in LaTeX using   `\newcommand*\mysymbol{\includegraphics{mysymbol.pdf}}`. I have two problems:   1. The positioning in equations is off (it's above the line even though the image itself has no borders): ![enter image description here](http://i.stack.imgur.com/97q4F.jpg)   2. I cannot use it as a subscript (which I would like). For example, `$H_\mysymbol$` throws the following error:              ./mytex.tex:1000: Missing { inserted.      <to be read again>                          \let       l.1000 $H_\mysymbol                        $     ?


title: How to avoid orphans and widows when using the combine class?

text: Is there a way to avoid orphans and widows when using the `combine` class? I have already tried this:               \widowpenalty10000     \clubpenalty10000      or this:               \usepackage[all]{nowidow}      but they simply have no effect. :-( I guess it is because I am using the class `combine`. :-/ An example is something like that:               \documentclass[11pt]{combine}     \title{Proceedings title...}     \author{Editor's Name}     \date{24th September 2013}     \begin{document}     \pagestyle{combine}     \maketitle     \tableofcontents     \clearpage          \begin{papers}          \coltoctitle{Title1}     \coltocauthor{Author1}     \import{1}          \coltoctitle{Title2}     \coltocauthor{Author2}     \import{2}          ...          \end{papers}     \clearpage     \end{document}      and then we have several articles 1.tex, 2.tex, etc. Below follows the result I am experiencing. I cannot get rid of these few lines that run alone on the next page or some sections that start at the end of one page, so the header stays alone in a page and the content goes all to the next page. ![Example. Problem with orphan lines and section.](http://i.stack.imgur.com/ZWGXm.png) * * *               \documentclass[10pt,a4paper]{spie}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{graphicx}     \usepackage{tipa}     \widowpenalties 3 10000 10000 0     \title{Cross-linguistic effects on voice quality: an investigation on Brazilians’ production of Portuguese and English}     \author{Ana Paula Petriu Ferreira Engelbert \and Adelaide Herc\'{i}lia Pescatori Silva}     \date{}     \begin{document}     \maketitle     \section*{Abstract}     When we speak a foreign language (L2), we almost certainly sound different from how we sound in our native language (L1). Thus, the aim of this study was to compare voice quality when Brazilians speak their native language, Brazilian Portuguese (BP), and English as L2, in order to verify what changes in their voices when they speak different languages. Laver (1980, p.1) describes voice qualiy as “the characteristic auditory coloring of an individual speaker’s voice.”  According to Abercrombie (1967, p. 91), voice quality refers to “those characteristics which are present more or less all the time that a person is talking: it is a quasi-permanent quality running through all the sound that issues from his mouth”. Esling (2000) claims that each language has its own pattern of physiological behavior in which articulators are trained to operate in different ways based on the language’s phonetic constituent. As a result, it is expected that speakers use different voice qualities when speaking different languages. In order to assess these features, the present study compared L1 and L2 speech production, analyzing intra-speaker variation in voice qualities with the aid of perceptual and acoustic instrumental analysis. To test methodological choices on speakers and text types, a pilot study was carried out. Data consisted of three Brazilian proficient speakers of English performing a reading task in Portuguese and English, with three repetitions, recorded in a room with soundproof. Also, an English native speaker was recorded performing the same task in both English and Portuguese. The acoustic analysis was based on LTAS measures, f0, spectral slope, H1-H2 and noise-to-harmonics ratio, and was done with the aid of the free software Praat (Boersma and Weenink, 2012). Preliminary results show different LTAS values, greater inclination of the spectral slope for L2 than the L1, and higher f0 in L2 than in L1. Therefore, there seems to be a tendency concerning the differences in voice quality when Brazilians speak Portuguese and English.          %     \section*{References}     {\parindent0pt           Abercrombie D. (1967). Elements of general phonetics. Edinburgh:Edinburgh University Press.           Boersma, Paul and Weenink, David (2012). Praat: doing phonetics by computer [Computer program]. Version 5.3.34, retrieved 21 November 2012 from http://www.praat.org/          Esling, J. (2000). Crosslinguistic Aspects of Voice Quality. IN Kent, RD and Ball, MJ (eds). Voice quality measurement. Singular Publishing Group: California.          Laver J.(1980). The phonetic description of voice quality. Cambridge: Cambridge University Press.     }     \end{document}      * * *               \documentclass[11pt]{combine}     \usepackage{tipa}     \widowpenalties 3 10000 10000 0     \title{Proceedings of the ...}     \author{Editor's Name\thanks{Support ...}}     \date{7th-9th October 2013}     \usepackage[left=3.5cm,right=3.5cm,top=3cm,bottom=3cm]{geometry}     \begin{document}     \pagestyle{combine}     \maketitle     \tableofcontents     \clearpage     \section*{Editor's introduction} \label{intro} Blabla blablabla bla blablabla bla blablabla     \addcontentsline{toc}{section}{\protect\numberline{}Editor's introduction}     \begin{papers}          \coltoctitle{Cross-linguistic effects on voice quality: an investigation on Brazilians’ production of Portuguese and English}     \coltocauthor{Ana Paula Petriu Ferreira Engelbert and Adelaide Herc\'{i}lia Pescatori Silva}     \import{1}          \end{papers}     \clearpage     \end{document}


title: "in" untranslated for French incollection and artcle bibliography entries

text: Instead of showing the French word `dans`, BibLaTeX is putting `in` to introduce booktitles and journals. For example               @incollection{rodgers99,         Address = {London},         Author = {Roders, C.},         Booktitle = {Modern France: Society in transition},         Date-Added = {2013-03-30 21:06:06 +0000},         Date-Modified = {2013-03-30 23:09:27 +0000},         Editor = {Cook, M. and Davie, G.},         Pages = {53-72},         Publisher = {Routledge},         Title = {Gender},         Year = {1999}}      comes out as > Sellier, G. (2002). « Construction des identités de sexe dans les séries > policières françaises. » In : Les séries policières. Sous la dir. de G. > Sellier et P. Beylot. Paris : L’Harmattan, p. 259–271. as opposed to > Sellier, G. (2002). « Construction des identités de sexe dans les séries > policières françaises. » Dans : Les séries policières. Sous la dir. de G. > Sellier et P. Beylot. Paris : L’Harmattan, p. 259–271. Obviously, I've included `babel` and everything (hence most of it is translated), so I can only assume this is a bug? I've only just started using LaTeX, can I just edit the `french.lbx` file in the `biblatex` package or is that a bad idea? Thanks.


title: signature fields beamer class

text: I want to add multiple (two) signature fields to the bottom of the first page of my beamer document. My first page is a `\titlepage`. I found a solution but it does not work for the beamer class because of an error               illegal parameter number in definition of \test, ... \iterate     and \beamer@doitinframe      My MWC is:               \documentclass[gray]{beamer}     \usetheme{default}          \title{Presentation}     \author{PersonName}     \date{27/3/2013}     \institute[InstitutionName]{}          \begin{document}     \begin{frame}         \titlepage           %% I was inserting the solution here     \end{frame}          \begin{frame}[label=toc]{Table of Contents}         \tableofcontents     \end{frame}          \section{First Section}       \begin{frame}{}     \end{frame}           \section{Second Section}     \begin{frame}{Two}      Content      \end{frame}           \section{Third Section}     \begin{frame}{Three}      Content      \end{frame}     \end{document}


title: Why do these two plot commands give different results?

text: Why the following two MWE codes, using pgfplots with and without gnuplot give different results (a phase shift)?               \documentclass{article}     \usepackage{pgfplots}     \begin{document}     \begin{tikzpicture}     \begin{axis}     \addplot [thick,mark=none,domain=0:6,samples=1000]  {cos(deg(2*x+atan(1)))};     \end{axis}     \end{tikzpicture}     \end{document}      and               \documentclass{article}     \usepackage{pgfplots}     \begin{document}     \begin{tikzpicture}     \begin{axis}     \addplot [thick,mark=none,domain=0:6,samples=1000]  gnuplot {cos(2*x+atan(1))};     \end{axis}     \end{tikzpicture}     \end{document}


title: Fonts tufte russian / cyrilic

text: I'm trying to find nice cyrillic font. Actually I would like to see such beautiful fonts as in tufte-book. My attempt is using following               \usepackage{cmap}          \usepackage[T1]{fontenc}          \usepackage[russian]{babel}          \usepackage[utf8]{inputenc}          \renewcommand{\rmdefault}{cmr}          \renewcommand{\sfdefault}{cmss}          \renewcommand{\ttdefault}{cmtt}      But still it is far from ideal ![enter image description here](http://i.stack.imgur.com/Ip4PC.png) Would you advise me what kind of (cyrillic) fonts should I use.


title: for loop in algpseudocode

text: I want change my pseudocode               \documentclass{article}\usepackage{amsmath}     \usepackage[noend]{algpseudocode}     \usepackage{algorithm}          \makeatletter                    \begin{document}     \begin{algorithm}     \caption{AIP}\label{AIPal}     \begin{algorithmic}[1]     \State \textit{$\sum^{N_agent}_{i=1}$$L_A$} $\gets$ position of \textit{$agent_i$}     \State \emph{loop}:     \State \textit{$i$}$\gets$ 1              \State \textit{$i$ plus 1}     \If {\textit{distance(eNB,$Agent_i$)} $< \delta$} \textit{close $agent_i$}     \If {\textit{distance(eNB,$Agent_i$)}$>\Delta$} \textit{$agent_i$ power equals $\alpha$}      \State \textbf{goto} loop     \EndIf                                      \EndIf                                      \end{algorithmic}     \end{algorithm}     \end{document}      to for loop but I don't know how to transform it to \For code. Can someone help me?


title: R programming language symbol

text: I am currently writing a paper where I mention the R programming language. I've seen some papers use a special symbol for R, but I can't figure out how to get it. Here's an example. How do I get that symbol?


title: How to match left alignment of equations in math mode outside and inside an array?

text: My code is shown below, every equation is left aligned, my problem is that the equations inside the array enviroment seem to be indented. How can I align **all** the equations to the same vertical line?               \documentclass[letterpaper,10 pt,two column,fleqn]{article}     \setlength{\columnsep}{2.5cm}     \usepackage[inner=2.5cm,outer=2.5cm,bottom=2.5cm,top=2.5cm,landscape]{geometry}     \usepackage{nopageno,array,graphicx,amsbsy,amsfonts}     \usepackage{amsmath,MnSymbol,wasysym,bbold}     \newcommand{\ket}[1]{|{#1}\rangle}          \begin{document}     \[S_z\ket{\pm} = \pm\frac{\hbar}{2}\ket{\pm}\]     \[S_{\pm} = S_x\pm S_y\]       \[\begin{array}{ll}         S_z = \dfrac{\hbar}{2}(\ket{+}\bra{+} + \ket{-}\bra{-}) \mbox{\hspace{10mm}}& \ket{s_z,\pm} = \ket{\pm}\\ \\         S_y = \dfrac{-i\hbar}{2}(\ket{+}\bra{-} - \ket{-}\bra{+}) &\ket{s_y,\pm} = \dfrac{1}{\sqrt{2}}(\ket{+}\pm i\ket{-})\\ \\          S_x = \dfrac{\hbar}{2}(\ket{+}\bra{-} + \ket{-}\bra{+}) & \ket{s_x,\pm} = \dfrac{1}{\sqrt{2}}(\ket{+}\pm\ket{-})\\       \end{array}\]     \end{document}


title: How to automatically split text in two columns in beamer

text: I have often blocks with text split in two columns. Problem is that I have to determine where to split the text so that it doesn't end out of the frame, and whenever i made any modification in the frame I have to re-determine where to split. Also, the manual split looks kind of ugly at times. This is an example:               \documentclass{beamer}     \usetheme{Warsaw}          \begin{document}     \begin{frame}     \begin{block}{block title}     \begin{columns}         \column{.4\textwidth}         Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore          et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi          ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum          dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui          officia deserunt mollit anim id est laborum.         Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore          et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi          ut aliquid ex ea commodi consequat.         \column{.4\textwidth}     \end{columns}     \end{block}     \end{frame}     \end{document}      ![enter image description here](http://i.stack.imgur.com/plAOC.png) Of course in my actual code I don't have a block as big as frame, this is just for showing purpose. I would like the text to automatically move to the second column when the end of the block or frame is reached. Is this possible with the `columns` environment? If not, is there any way to do it?


title: Setting font in TeXstudio

text: OK, I am really new and I do not know how to change the default font to something more supportive of non-standard Latin characters. So I have this for the preamble:               \documentclass[12pt,a5paper,onecolumn]{book}     \usepackage[latin1]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{makeidx}     \usepackage[width=6.50in, height=10.00in, left=0.50in, right=0.25in, top=0.25in, bottom=0.25in]{geometry}      and I know that the `\usepackage[latin1]{inputenc}` is the font, however I do not know how to change the font as I do not know what my options are. Can I use regular `.ttf` fonts that are already installed on my computer? I really want to use the Charis SIL font, however if I cannot, can you suggest a font that would be compatible with the letter "ȧ" as well as other linguistic IPA characters? P.S. I've changed the compiler to XeLaTeX because I've read that it supports .ttf, but so far, I don't see that/know how to make it work...


title: How to write y = (x / 6) ^ {3 / 7} in TikZ format to plot its graph?

text: How to write `y=(x/6)^{3/7}` in TikZ format to plot its graph in the following code?               \documentclass{article}     \usepackage{tikz}      \begin{document}     \begin{tikzpicture}     \draw [smooth,samples=100,domain=0:2] plot(\x,{(\x)});     \end{tikzpicture}     \end{document}


title: Omit heading in biblatex with printbibliography

text: Is it possible to omit the heading when I use the `\printbibliography` command? I want to print two different bibliographies one after the other and need to add some text between the second heading and the bibitems. > # 1 References > > bibitem1 > > bibitem2 > > # 2 Sources > > Some text here but just a little bit > > bibitem1 > > bibitem2


title: Vertical spacing problem with multicol package and a newcommand

text: The following code produces and unwanted space. Why and how can it be avoided? A redefinition of the command or macros are invited.               \documentclass[letterpaper]{article}     \usepackage[dvipsnames]{xcolor}     \usepackage{enumitem,multicol,fullpage}     \usepackage{amsmath,amssymb}     \usepackage{tikz}          \newcounter{wsnumcnt}     \newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node (#1) {};}          \usetikzlibrary{fit,positioning}     \usetikzlibrary{calc,shapes}          \newcommand{\wssectsty}[2]{%     \setcounter{wsnumcnt}{#2}%     \gdef\wssecttitle{#1}%     \section*{\tikzmark{title}\color{Orange}\wssecttitle}%     \ifnum \thewsnumcnt<10%         \tikz[remember picture,overlay]{%         \node [             left=42pt of title,             anchor=base,             fill=Orange,              rectangle,             rounded corners,             inner sep=5pt,             outer sep=0pt,             text=white,font=\bfseries\Large]          {\,PR \thewsnumcnt\phantom{1}};}%     \else%         \tikz[remember picture,overlay]{%         \node [             left=42pt of title,             anchor=base,             fill=Orange,              rectangle,              rounded corners,              inner sep=5pt,              text=white,             font=\bfseries\Large]          {\,PR \thewsnumcnt};}%     \fi%     }          \begin{document}     \wssectsty{Section}{1}     Objectives:     \begin{multicols}{3}     \small     \begin{itemize}[label=$\square$]         \item Test 1         \item Test 2         \item Test 3         \item Test 4     \end{itemize}     \end{multicols}     % Unwanted space here.     \wssectsty{Section}{1}     \begin{multicols}{3}     \small     \begin{itemize}[label=$\square$]         \item Test 1         \item Test 2         \item Test 3         \item Test 4     \end{itemize}     \end{multicols}     \section*{Section}     \begin{multicols}{3}     \small     \begin{itemize}[label=$\square$]         \item Test 1         \item Test 2         \item Test 3         \item Test 4     \end{itemize}     \end{multicols}     \end{document}      ![enter image description here](http://i.stack.imgur.com/ISTeP.png)


title: Same vertical spacing for chapter and chapter*

text: I use `\chapter*{}` in the `\frontmatter` and `\chapter{}` in the `\mainmatter`. I use titlesec and the styling of the chapter headings is this:               \documentclass[10pt,a4paper,openany,oneside]{book}     ...     \usepackage{titlesec}     \newcommand*{\justifyheading}{\raggedleft}          \titleformat{\chapter}[display]       {\normalfont\huge\bfseries\justifyheading}       {\filleft\Large\textsc{\chaptertitlename}~\Huge\thechapter}       {1ex}       {\titlerule\vspace{0ex}\filleft}      **Question:** How do I get the chapter title to be at the same level? See the problem in this screenshot, I want the titlerules to be at the same level (i.e. same distance from the top). **Bonus-question:** How do I push the "Chapter 1" to the right so the number is hanging outside the margin?


title: Producing several overlines of the same height throughout a formula

text: ![enter image description here](http://i.stack.imgur.com/llhdG.png) Above is an example produced by `S\overline{n}=\overline{n+1}`. The overlines are not aligned vertically, which is highly undesirable. Is there any way to produce overlines of the same height throughout a whole formula?


title: Using \gather and \align together

text: I'm very picky regarding alignment inside my proofs. What's frustrating me right now is that I have some lines that I want to be center-aligned (using `\begin{gather}`) and others that I wish to align at the "=" sign (using `\begin{align}`). My idea for how to do this was to just switch between the two within one proof, but this creates extra spacing (because closing one and opening another comes with implicit spacing). I've messed around with adding in `\vspace[-20pt]` or something to that effect, but it's a rather clumsy solution and I've had problems with it. Also, ideally I would be able to go from align to gather back to align and have the second align keep aligned with the first, and obviously closing and reopening everything doesn't allow this. Can anybody think of a better way to switch between the two alignment structures? Perhaps using a box to nest my gathers within align or something. Essentially, I usually like most of my proof in align but then want a couple of tangential points in gather. I've spent a while pondering the amsmath readme (and this website), but I can't find an answer. Many thanks in advance! Here's a little example coding to demonstrate the issue with my current scheme:               \documentclass{article}     \usepackage{amsmath}     \usepackage{amsthm}     \begin{document}     \begin{proof}     \begin{align*}     10 &= 2+2+2+2+2 \\     &= 3+3+3+1     \end{align*}\begin{gather*}     \intertext{But now it puts this annoying large space above this line...}     5=5     \end{gather*}     \end{proof}     \end{document}


title: How to generalize a solution with \NewEnviron to \RenewEnviron (error: \env@proof@save@env undefined)

text: This question is a follow-up from Solution environment via true/false switch where Ian helped me to define a solution environment which can be hidden. I tried it as well for a proof environment, but `proof` is already defined. I tried to work with `\RenewEnviron` and followed How to ignore everything in the document environment? to get past the first error, but now I get `LaTeX Error: \env@proof@save@env undefined`. I am looking for a fix (rather than a suggestion to stick with the already defined environment or to use a different name).               \documentclass{scrartcl}          \usepackage[american]{babel}     \usepackage{environ}     \usepackage{amsthm}     \usepackage{amsmath}          \newif\ifshowproof     \showprooftrue          % proof environment     \makeatletter     \providecommand{\env@document@save@env}{}%     \providecommand{\env@document@process}{}%     \RenewEnviron{proof}[1][showproof]{%       \csname if#1\endcsname         \trivlist         \item\relax{\sffamily\bfseries Proof}\par\noindent         \BODY         \endtrivlist       \fi     }     \makeatother          \begin{document}     Proof with hide feature:     \begin{proof}[false]       This should not appear     \end{proof}          Proof without hide feature:     \begin{proof}       This should appear     \end{proof}     \end{document}


title: beamer overly shows item in next page

text: I have a slide with figures and an item list the code               \begin{frame}{title}       \begin{figure}         \centering         \includegraphics<1>[width=\textwidth]{../Fig_0}         \includegraphics<2>[width=\textwidth]{../Fig_1}       \end{figure}       \begin{itemize}       \item<2-> Line 1.       \item<3> Line 2.       \end{itemize}     \end{frame}      So `Fig_0` shows up first, on first click `Fig_1` overwrite the first figure, and shows the first item `Line 1`. However on the second click the item list all moved to a new frame. Why is that? How can I get all of them on a single slide?


title: How to get Part in header?

text: I am writing my master thesis in LaTeX. I am using the `book` document class and the fancy `fancyhdr` package. Now, I would like to have the "Part" on even and the "chapter" on odd pages. I read one of your comments and tried:               \pagestyle{fancy}     \fancyhead{}     \renewcommand{\headrulewidth}{0.2pt}          \renewcommand{\partmark}[1]{\markboth       {\color[gray]{.0}\thepart. #1}{}}          \renewcommand{\chaptermark}[1]{\markright       {\color[gray]{.0}\thechapter.\ #1}}          \renewcommand{\sectionmark}[1]{}          \fancyhead[EL]{\nouppercase{\textbf{\leftmark}}}         \fancyhead[OR]{\nouppercase{\textbf{\rightmark}}}      Unfortunately, the chapter appears on odd pages but the part is not visible on even pages? What did I do wrong?


title: How to align an equation?

text: I am new to LaTeX. So, I am stuck with something which should be simple. I need to align this equation so that the last term which goes to the next line begins after the equal to sign, but I can't figure out how to do this? Here is my code:               \begin{center}     \begin{align*}       log(Y_{it}) = c_i  + year_t + \beta_{1}rcs(MaxT_{it})} + \beta_{2}MinT_{it} +\beta_{3} log(SR_{it}) +\beta_{4}Rain_{it}  +                        \beta_{5}Share Irrigated_{it}     \end{align*}     \end{center}


title: Different Header for each page

text: My code is this               \documentclass[a4paper,14pt]{memoir}     \linespread{1.5}     \usepackage{float}     \setcounter{secnumdepth}{0}     \usepackage{color}     \usepackage{caption}     \usepackage{graphicx}     \usepackage{fancyhdr}     \pagestyle{fancy}     \fancyhf{}     \fancyhead[LE,LO]{\thepage}     \fancyhead[RE,RO]{Introduction}     \begin{document}     \section*{\textcolor{red}{GNDTP - A coal based Plant}}     \section*{\textcolor{red}{Introduction}}     Electricity is not just a convenience; its a necessity. It helps us live comfortably in our homes year-round, regardless of the weather. A safe, reliable and adequate supply of electricity is essential for businesses, farms,     factories, hospitals and homes. Electricity travels at the speed of light,     ar     \end{document}      This is a very long report having different sections and subsections. I want headers on the left as section headings. How do I do it? Please just give me a sample code where on first page header is, say" Intro" and 2nd page header is, say "duction". This is all what i want


title: Latex listings package, issue with caption touching the frame and junk character instead of space

text: I am using `listings` package and facing two issues Following is the LaTeX code and output               \lstset{language=Java, basicstyle=\small, frame=single, breaklines=true, postbreak=\raisebox{0ex}[0ex][0ex]{\ensuremath{\hookrightarrow\space}}}          \begin{lstlisting}[caption={Utils.java},label={lst:JOOQ-LGRN}]      CATCH CLAUSE : catch (Exception fatal) {       log.error("Cannot parse Postgres array: " + rs.getString(index));       log.error(fatal);       return null;     }     \end{lstlisting}      ![Issues are marked in red color](http://i.stack.imgur.com/xlh9R.jpg)   1. There is a junk character which is appearing instead of a space. I have marked it in red. For example between "Cannot" and "parse", between "parse" and "Postgres".   2. The caption is touching the line/frame – how do I create some space between the caption and line/frame Thanks in advance


title: default font name

text: how can i get the default font name? `\the\font` outputted nothing in my case. for the default font, does it use any `cmap` file?


title: Feynmp: Circle with five vertices

text: I am trying to draw a Feynman diagram by using `feynmp` package at one-loop level contains two different diagrams:   1. one-loop with five legs (what I draw is nice, but the problem is the loop gets disordered and it is out of shape)   2. How can I attach a tree-level vertex to one-loop? (reducible diagram). Imagine I have one-loop with four external legs (photons) but one graviton emerges from on of these legs... which actually is like attaching a tree-level vertex to the loop... Any idea? I appreciate any help. Thanks, Naser


title: Avoiding repositioning of minipages when moving overlayed tikzpictures

text: I'm fairly new to Beamer and stuck with this problem of two tikzpictures lying above two minipages. i want tikz1 to be displayed on slide 2 of the frame and tikz2 on the next slide (3). However they seem to take up space despite of the overlay argument. I've tried `\only` and `\visible`, but they too don't seem to work properly. When i move them, in some way the underlying minipages are moved and don't stay in the same place (which is what I desire) With `\onslide`, moving one of the tikzpictures results in having the underlying elements all moved in the same way for all the slides. With `\only` only the underlying elements of the current slide will be messed up, the other ones are not moved. `\visible` seems to behave like `\onslide`. But none of the above leave the minipages in the place where I want them to be.               \documentclass[xcolor=dvipsnames]{beamer}      \usecolortheme[named=Goldenrod]{structure}      \usetheme[height=7mm]{Rochester}           \usepackage{tikz}     \usetikzlibrary{shapes}          \begin{document}     \begin{frame}     \frametitle{A title}          \begin{minipage}[t]{0.5\linewidth}     \begin{exampleblock}{}     \begin{enumerate}     \setbeamercovered{transparent}       \item \uncover<1,3>{This cake is amazing and I am looking forward to eating it!}       \item \uncover<1,2,3>{A friend prepared this cake yesterday.}       \end{enumerate}     \end{exampleblock}     \end{minipage}     \hspace{1cm}     \begin{minipage}[t]{0.3\linewidth}     \begin{exampleblock}{}     \begin{enumerate}       \item \uncover<3>{n.a.}       \item \uncover<2,3>{cake}       \end{enumerate}     \end{exampleblock}     \end{minipage}               \onslide<2>{     \vspace*{-6.5cm}     \hspace*{7cm}     \begin{tikzpicture}[overlay][remember picture]         \node[align=center, ellipse callout, draw, callout relative pointer={(155:1cm)}, fill=yellow!30] (hallo) {some text};             \end{tikzpicture}}          \onslide<3>{     \vspace*{-2cm}     \hspace*{7cm}     \begin{tikzpicture}[overlay][remember picture]         \node[align=center, ellipse callout, draw, callout relative pointer={(155:1cm)}, fill=yellow!30] (hallo) {some text};             \end{tikzpicture}}          \end{frame}     \end{document}


title: Labels in table rows

text: I want to use labels for single table rows:               \begin{table}[h]               \begingroup     \fontsize{8pt}{9pt}     \selectfont          %\begin{adjustwidth}{}{-2cm}     \begin{tabularx}{\textwidth}{ | s | m | b | s | s | }         \hline     % \itshape\large         \textbf{Ref.} & \textbf{Name} & \textbf{Beschreibung} & \textbf{Kategorie} & \textbf{Relevanz} \\     \hline     %\caption*[F1]{}     \label{f1} F-1 & bla & bla & bla & bla \\     \end{tabularx}     \caption{Tabelle}     \label{table:Tabelle1}          \endgroup          \end{table}      After using package "caption" I got lots of "\label without proper \caption ..." warnings. Before using the package it seemed to create a reference to the table but not to the row without any warnings. How can I created labels for single rows?


title: Setting text indentation inside itemize

text: Inside my LaTeX file I code something like this:               \begin{itemize}     \item Item NO 1     \\paragraph no1 paragraph no1 paragraph no1 paragraph no1 paragraph no1      paragraph no1 paragraph no1 paragraph no1 paragraph no1 paragraph no1      paragraph no1 paragraph no1 paragraph no1      \item Item NO 2     \\paragraph no2 paragraph no2 paragraph no2 paragraph no2 paragraph no2 paragraph no2 paragraph no2 paragraph no2 paragraph no2 paragraph no2 paragraph no2 paragraph no2 paragraph no2 paragraph no2 paragraph no2      \item Item NO 3     \\paragraph no3 paragraph no3 paragraph no3 paragraph no3 paragraph no3 paragraph no3 paragraph no3 paragraph no3 paragraph no3 paragraph no3 paragraph no3 paragraph no3 paragraph no3 paragraph no3 paragraph no3      \end{itemize}      The output is like this   * Item NO 1 paragraph no1 paragraph no1 paragraph no1 paragraph no1 paragraph no1 paragraph no1 paragraph no1 paragraph no1 paragraph no1 paragraph no1 paragraph no1 paragraph no1 paragraph no1   * Item NO 2 paragraph no2 paragraph no2 paragraph no2 paragraph no2 paragraph no2 paragraph no2 paragraph no2 paragraph no2 paragraph no2 paragraph no2 paragraph no2 paragraph no2 paragraph no2 paragraph no2 paragraph no2   * Item NO 3 paragraph no3 paragraph no3 paragraph no3 paragraph no3 paragraph no3 paragraph no3 paragraph no3 paragraph no3 paragraph no3 paragraph no3 paragraph no3 paragraph no3 paragraph no3 paragraph no3 paragraph no3 But what I want is something like this   * Item NO 1 paragraph no1 paragraph no1 paragraph no1 paragraph no1 paragraph no1 paragraph no1 paragraph no1 paragraph no1 paragraph no1 paragraph no1 paragraph no1 paragraph no1 paragraph no1   * Item NO 2 paragraph no2 paragraph no2 paragraph no2 paragraph no2 paragraph no2 paragraph no2 paragraph no2 paragraph no2 paragraph no2 paragraph no2 paragraph no2 paragraph no2 paragraph no2 paragraph no2 paragraph no2   * Item NO 3 paragraph no3 paragraph no3 paragraph no3 paragraph no3 paragraph no3 paragraph no3 paragraph no3 paragraph no3 paragraph no3 paragraph no3 paragraphno3 paragraph no3 paragraph no3 paragraph no3 paragraph no3 How do I achieve this?


title: Multicolumn/multirow inside align

text: Is there a way to use `\multicolumn` or `\multirow` inside an `array` environment which is inside `align` environment? For instance, the following piece of code gives me an error. What is the way around this? I want $4$ to span the first two columns.               \documentclass{minimal}          \usepackage{amsmath,amssymb}          \begin{document}          \begin{align}     \begin{array}{ccccc}     1 & 1 & 3 & \cdots & \multicolumn{2}{*}{4}\\     1 & 1 & 3 & \cdots &\\     1 & 1 & 3 & \cdots &\\     1 & 1 & 3 & \cdots &\\     1 & 1 & 3 & \cdots &\\     \end{array}     \end{align}          \end{document}


title: How to show subsections and subsubsections in TOC?

text: So we have something like:               \documentclass[english]{article}     \setcounter{secnumdepth}{2}     \setcounter{tocdepth}{2}     \usepackage{amsmath}     \usepackage{tocloft}     \usepackage{xstring}     \usepackage{titlesec}     \usepackage{tocloft}     \usepackage[unicode=true, pdfusetitle,      bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,      breaklinks=false,pdfborder={0 0 0},backref=false,colorlinks=false]      {hyperref}          \makeatletter     \numberwithin{equation}{section}          % we use this for our refernces as well     \AtBeginDocument{\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}}          % redefinition of \equation for convenience     \let\oldequation = \equation     \let\endoldequation = \endequation     \AtBeginDocument{\let\oldlabel = \label}% \AtBeginDocument because hyperref redefines \label     \newcommand{\mynewlabel}[1]{%       \StrBehind{#1}{eq:}[\Str]% remove "eq:" from labels       \myequations{\Str}\oldlabel{#1}}       \renewenvironment{equation}{%       \oldequation       \let\label\mynewlabel     }{\endoldequation}          \newcommand{\listequationsname}{List of Equations}     \newlistof{myequations}{equ}{\listequationsname}     \newcommand{\myequations}[1]{%           \addcontentsline{equ}{myequations}{\protect\numberline{\theequation}#1}}     \setlength{\cftmyequationsnumwidth}{3em}          \makeatother          \begin{document}     \tableofcontents     \listofmyequations          \section{Brushless Motor Fundamentals}     \subsubsection{DC Motor Operation}     Torque is generated in DC motors from the magnetic force,     also known as the Lorentz force, which is produced when an     electric current is passed through a coil in a magnetic field.     This force is given by \ref{eq:Force}.     \begin{equation}       F=q[E+(v\times B)]       \label{eq:Force}     \end{equation}     where $F$ is the force perpendicular to the coil,     $E$ is the electric field in the coil,     $v$ is the velocity of the charged particles in the coil,     and $B$ is the magnetic field. From mechanics, torque is     \begin{equation}       \tau=F\times r       \label{eq:Torque}     \end{equation}     \section{Brushless Motor Fundamentals 2}     \subsubsection{DC Motor Operation 2}     If the electrical force in \ref{eq:Force} is ignored,     and the remaining magnetic force is used in \ref{eq:Torque},     with the assumption that $v$ is perpendicular to $B$, we find that     \begin{equation}           \tau=qvBrsin\theta       \label{eq:Magnetic}     \end{equation}          \end{document}      How to show subsubsections and subsubsections of subsubsection in TOC?


title: Numbering \subsubsection in report class

text: I used the `\subsubsection` command hoping that LaTeX would add a subsection inside a section               \subsubsection{sub sub section}      But it just made the text within the `{}` bold. It did not give it a subsubsection number. My document class is `report`:               \documentclass[a4paper,12pt]{report}      Could someone please help me to fix this?


title: How do I make sections in level 4 appear in table of contents

text: > **Possible Duplicate:**   >  How to show in TOC subcontents? In my document I have topics that goes four levels deep. That is I have chapters, sections , subsections, subsubsections. My problem is subsubsections does not appear in the generated table of contents. Any ideas on resolving this issue?


title: How to get "subsubsections" in the table of contents if the document class is book?

text: I want to use the `book` class for a thesis and need to provide the table of content with chapter-section-subsection-subsubsection, all four should be displayed. Is there any trick to make it, as I only get chapter-section-subsection if I use the normal `\tableofcontents`?


title: Alternate colback and colbacklower in tcblisting

text: I have written a new environment based on `tcblisting` from package `tcolorbox`. I want the background color for code always in "gray" and the background color of the text compiled in "white". He held four options, but in a couple of them I switch the values of `colback` and `colbacklower`. This is an MWE:               \documentclass{article}     \usepackage{tcolorbox}     \tcbuselibrary{listings,breakable,skins}     % tcolorbox settings     \tcbset{     myexample/.style={breakable,skin=bicolor,%                     colback=lightgray,%                     colframe=gray,%                     colbacklower=white,%                     title style={draw=none,fill=none}%                     }%     }%      % Create myexample enviroment      \newtcblisting{myexample}[1]{myexample,#1}     \begin{document}     % listing=colback, text=colbacklower OK     \begin{myexample}{listing and text}     The background color of the source code should be in gray.     The background color for text compiled in white.     \end{myexample}     % listing=colbacklower, text=colback Wrong, need listing=colback,text=colbacklower     \begin{myexample}{text and listing}     The background color of the source code should be in gray.     The background color for text compiled in white.     \end{myexample}     % listing=colbacklower, text=colback Wrong, need listing=colback,text=colbacklower      \begin{myexample}{text side listing}     The background color of the source code should be in gray.     The background color for text compiled in white.     \end{myexample}     % listing=colbacklower, text=colback OK     \begin{myexample}{listing side text}     The background color of the source code should be in gray.     The background color for text compiled in white.     \end{myexample}     \end{document}      And here are my two questions:   1. It is possible to automatically define the environment?   2. How to define an alias for "listing and text", "text and listing", "listing side text" and "text side listing", like `keyval` options (pgfkeys maybe?). something like:              listing and text=top     text and listing=below     listing side text=left     text side listing=right


title: Listings with rule above caption to look like \floatstyle{ruled}

text: I am using the `listings` package. I would like my listings to have a heavy rule above the caption, so it looks like the `\floatstyle{ruled}`. So it would look like: > a bold line === > > caption > > rule --- > > code > > rule ---


title: TeXstudio: change color of errors / warnings

text: I want to change the text-color of the messages given in error-Tab. In fact the yellow / orange of the warnings is quite bad to read. In the options-dialog I only found possibilities to change the colors of syntax-highlighting. Anyone knows, how to archive this?


title: Greek characters of mathptmx

text: The designer prefers using mathptmx font for the book, but I really dislike its greek characters. They are larger and bolder than non-greek characters. Do you have any suggestion how to please both the designer and myself? :-) ![enter image description here](http://i.stack.imgur.com/mEdde.png) Maybe you could suggest another font that looks like Times (New) Roman and does not have this "problem" with greek characters'? Math support is essential.


title: biblatex: Full Citations in Footnotes on Every Page

text: How can I create this sort of bibliography using biblatex, ie, bibliography at the footer of every page? ![Example](http://i.stack.imgur.com/Vzfbg.png)


title: What are the most common mistakes that beginners of (La)TeX and Friends make?

text: I want to collect the most common mistakes, misconceptions, pitfalls, etc that (La)TeX and Friends users make. Please one answer for each mistake, misconception, pitfall, etc. I am only interested in more technical, objective cases rather than psychological, social, subjective cases. From this complete infinite list of technical and objective cases, we can have a reference how to teach newbies much better directly or indirectly via writing a good book. The technical and object cases are, for example, as follows.   * Beginners sometimes use `$\huge E=mc^2$` with the hope they will get a huge formula. It actually does not produce the expected result. The correct way is `\huge $E=mc^2$.`   * Beginner sometimes use `longtable` inside `table` because they assume `longtable` is the longer version of `tabular` which is able to be sandwiched in `table`.   * etc.


title: Word breaking for two sentences

text: I have written following command:               \newcommand{\ger}[2]{{\noindent\raisebox{-0.2mm}      {\includegraphics[width=5.47mm,height=3.28mm]{Flag_1.pdf}}      \color{red} #1\nopagebreak\\\raisebox{-0.2mm}{\includegraphics{pol.pdf}}       \color{blue} \emph{#2}}\vspace{5pt}}      This is going to be used as follows:               \ger{First sentence}{Second sentence}      Question is, how to assert that these two sentences will be always on the same page with full content (there won't be any page breaks)? I tried to use \nopagebreak, but it still breaks sometimes part of the second sentence.


title: Mini index for subsection

text: There is the following code:               \subsection{some subsection}     Some \mindex[mean=aaa]{sentence} with some \mindex[mean=bbb]{unknown} words.     \listminiindexfromsubsection      The expected output: > Some subsection > > Some sentence with some unknown words. > > Mini index: sentence - aaa unknown - bbb I would like to create something like a mini index, which can create a small dictionary. All words from specific subsection which are arguments of `\mindex[mean=something]{word}` should be collected and when the command `\listminiindexfromsubsection` is written, then the output should contain all of these words with their meaning. What is the method to collect specific words from a subsection and then printing them out?


title: spacing in list of figures

text: I would like to fix the spacing between the figure number and the name of the figure as shown in the following image: ![spacing](http://i.stack.imgur.com/p3eAx.jpg) The list is auto-generated. you can find my LaTeX files in the following link: https://www.dropbox.com/s/iz7w3lwr65yds87/fancy.zip The file to compile is called "fancydissertation.tex" Thank you for your help.


title: What exactly is leading?

text: Wikipedia: > In typography, leading ( /ˈlɛdɪŋ/) refers to the distance between the > baselines of successive lines of type. By this definition, isn't it the same thing as line height? But in the following examples in the same wikipedia page, it seems leading is _extra space_ between lines, not line height. Otherwise, "no leading" should mean "no line height" which is obviously wrong. And 50%/100% leading seems to mean adding an extra inter-line spacing of 50%/100% natural line height. Wikipedia is not the only source that holds contradictory content. Another website in the first search result page of "font leading" also gives contradictory graphical demonstrations. And if you are an iOS developer, you may know that UIFont has a property called **leading** which returns _line height_. The fact that the property is now deprecated and replaced by a new property call **lineHeight** further shows how confusing this **_leading_** thing is. I'm inclined to think leading as extra space added between lines. And here are two references that support this understanding:   * A glossary of typographic terms > leading (pronounced: ledding) The amount of space added between lines of > text to make the document legible. The term originally referred to the thin > lead spacers that printers used to physically increase space between lines > of metal type. Most applications automatically apply standard leading based > on the point size of the font. Closer leading fits more text on the page, > but decreases legibility. Looser leading spreads text out to fill a page and > makes the document easier to read. Leading can also be negative, in which > case the lines of text are so close that they overlap or touch.   * CTParagraphStyle Reference > kCTParagraphStyleSpecifierLineSpacing The space in points added between > lines within the paragraph (commonly known as leading). This value is always > nonnegative. Type: CGFloat. Default: 0.0. Application: CTFramesetter. Maybe leading is really misleading. I hope someone can tell me definitely what exactly leading is. But maybe leading is just a typographic term that can never receive a consensus, thus should be avoided as much as possible, and even be deprecated in preference for more clear and compatible concepts such as ascent, descent, line gap, and line height(line height = ascent + descent + line gap).


title: TikZ node with includegraphics, and x coordinates

text: I am using the following LaTeX code to get a TikZ picture that includes a PDF and then draws two nodes:               \begin{figure}         \begin{tikzpicture}           \node (label) at (0,0)[draw=black]{             \includegraphics[width=\textwidth]{my.pdf}           };           \node [draw=red] (A) at (0,0) {1};           \node [draw=red] (B) at (2,0) {2};         \end{tikzpicture}         \caption{Simplest picture.}     \end{figure}      The result looks like this:               +---------------+     |               |     |      1 2      |     |               |     +---------------+         Figure 1      So, the included PDF is centered, and coordinate `(0,0)`, where "1" is drawn, is now in the center of the picture, instead of on the bottom left of the TikZ picture as usual. How can I change it so that `(0,0)` is still at the bottom left? It should look like this:               +---------------+     |               |     |               |     |1 2            |     +---------------+         Figure 1      I don't want to have to use negative x coordinates to place my points on the picture. UPDATE: Here is a screenshot of what it actually looks like. As you can see, the two red boxes are centered and not at the lower-left. (The chain with the arrows is the PDF.) ![enter image description here](http://i.stack.imgur.com/cVbrG.png) If I replace the `\includegraphics` just with an "X" I get the following picture, where the "X" and the "1" are drawn on top of each other (since they are both at coordinate `(0,0)`). ![enter image description here](http://i.stack.imgur.com/QiiZ9.png)


title: pst-barcode produces PS files which Ghostscript can not read

text: Weird problem with `pst-barcode` package. TeX file:               \documentclass[a4paper]{minimal}     \usepackage{pst-barcode}          \begin{document}          \begin{pspicture}(.25in,.25in)     \psbarcode{tinyurl.com/b5b6du}{format=micro}{qrcode}     \end{pspicture}     \end{document}      I am able to generate a PS file using `latex` and `dvips`. No errors or warnings are shown. But the file cannot be read by Ghostscript (v. 9.10). The error message is shown. After a lot of messages like:               Unknown in Prolog section at line 2346:     %% end      I see the final error message:               GPL Ghostscript 9.10 (2013-08-30)     Copyright (C) 2013 Artifex Software, Inc.  All rights reserved.     This*emphasized text* software comes with NO WARRANTY: see the file PUBLIC for details.     Displaying DSC file /home/vit/work/Year2014/qrcodes.ps     Displaying page 1     WM_GSTEXTINDEX not implemented     Error: /rangecheck in --get--     Operand stack:        18   --nostringval--   4     Execution stack:        %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   false   1   %stopped_push   1900   1   3   %oparray_pop   1899   1   3   %oparray_pop   1883   1   3   %oparray_pop   1771   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   --nostringval--   --nostringval--   %loop_continue   --nostringval--     Dictionary stack:        --dict:1174/1684(ro)(G)--   --dict:0/20(G)--   --dict:117/200(L)--   --dict:174/300(L)--   --dict:38/200(L)--   --dict:110/200(L)--   --dict:33/40(L)--     Current allocation mode is local     Last OS error: No such file or directory          --- Begin offending input ---     %%Page: 1 1     TeXDict begin 1 0 bop 0 TeXcolorgray Black 0 0 a     tx@Dict begin  gsave STV CP T /ps@rot 0 def grestore  end      0 0     a 0 0 a     tx@Dict begin  gsave STV CP T /ps@refangle 0.  def grestore  end      0 0 a 0 TeXcolorgray 166 150 a @beginspecial     @setspecial       tx@Dict begin STP newpath 0.8 SLW 0  setgray   gsave 0.  1 1 0.0      0.0  translate scale rotate 0 0 moveto (tinyurl.com/b5b6du) (format=micro)     /qrcode /uk.co.terryburton.bwipp findresource exec grestore  end          @endspecial 0 TeXcolorgray 0 TeXcolorgray     eop end          --- End offending input ---     file offset = 0     gsapi_run_string_continue returns -101      Regular barcodes are generated without any issues. The problem starts to occur when I add `format=micro` specifier. > `barcode.sty`: `\ProvidesPackage{pst-barcode}[2012/11/16 package wrapper ... > ]` Any ideas are appreciated.


title: Adding a frame footnote in beamerposter creates blank page at beginning

text: If I use a `footnote` within a column, that footnote is in an inconvenient place (at the bottom of that column), so I solved that by using the `[frame]` option, which puts the note at the bottom of the frame (the poster). Here it is with `\footnote{a footnote}`: ![plain](http://i.stack.imgur.com/cwVqt.png) And here it is with `\footnote[frame]{a footnote}` which looks as I wish it to, but with the extra blank page at the beginning: ![frame with blank](http://i.stack.imgur.com/pxYAB.png) This code produces the above documents:               \documentclass[10pt]{beamer}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage[orientation=portrait, size=custom, width=80, height=40, scale=2]{beamerposter}          \begin{document}     \begin{frame}{}          \begin{block}{\veryHuge A title for my poster}         \LARGE By askewchan     \end{block}          \begin{columns}[T]         \column{.5\linewidth}             some text in a column         \column{.5\linewidth}             %some more text in another\footnote{a footnote} column             some more text in another\footnote[frame]{a footnote} column     \end{columns}     \end{frame}     \end{document}      Any ideas how to avoid this? I'd rather not manually place them if possible.


title: unwanted white space when combining surface plot with a vector plot

text: I am trying to produce a surface plot of a scalar field with a vector plot imposed on top using pgfplot/tikz. I am nearly there except that depending on the scale of the arrows white space is added between the axis and surface plot. How can this be avoided? ![scale=0.01](http://i.stack.imgur.com/8HPak.png) ![scale=0.05](http://i.stack.imgur.com/YKW7J.png) The code i am working with:               \documentclass{article}          % Setting graphing environment     \usepackage{pgfplots}     \pgfplotsset{compat=newest}      \pgfplotsset{plot coordinates/math parser=false}          \begin{document}          % declare pgf colormaps:     \usepgfplotslibrary{colormaps}           % declare constants:     \pgfmathsetmacro\kx{2*pi}     \pgfmathsetmacro\ky{2*pi}     \pgfmathsetmacro\k{sqrt(\kx^2+\ky^2)}          % declare equations:     \pgfmathdeclarefunction{rho}{2}{\pgfmathparse{% density         (\ky/\k)^2*cos(deg(2*\kx*#1))+(\kx/\k)^2*cos(deg(2*\ky*#2))}}     \pgfmathdeclarefunction{ux}{2}{\pgfmathparse{% x-velocity         -sqrt(2)*(\ky/\k)*cos(deg(\kx*#1))*sin(deg(\ky*#2))}}     \pgfmathdeclarefunction{uy}{2}{\pgfmathparse{% y-velocity         +sqrt(2)*(\kx/\k)*sin(deg(\kx*#1))*cos(deg(\ky*#2))}}     \pgfmathdeclarefunction{umag}{2}{\pgfmathparse{% velocity magnitude         sqrt(ux(#1,#2)^2+uy(#1,#2)^2)}}          \begin{tikzpicture}         \begin{axis} [                 domain=0:1, view={0}{90},                 axis background/.style={fill=white},                 colormap/jet, colorbar              ]             \addplot3 [                     surf, shader=interp, samples=10             ]                 { rho(x,y) };                  \addplot3 [                     white, -stealth, samples=20,                     quiver={                         u={ux(x,y)/umag(x,y)},                          v={uy(x,y)/umag(x,y)},                          w={0},                          scale arrows=0.01                      },                 ]                 {umag(x,y)};              \end{axis}     \end{tikzpicture}     \end{document}


title: Missing characters in gnuplot generated eps while compiling pdf

text: tTis has bug me for a few days: when I import a gnuplot generated `eps` into my LaTeX file, the characters are always missing. The number and text with in the figure is not complete, for example, it should show "sin(x)" but shows "s_ **", should be "10000" but "1__ _**". Here "_ ___" are blank spaces. I am using Mac OSX 10.8.2, with TeX Live and `texlive-latex-extra` installed from Macports:               sudo port install texlive     sudo port install texlive-latex-extra      This is really a problem for me, can anyone help?


title: Č doesn't sort in bibliography correctly but {\v C} does

text: I have an example here of an article document using pdflatex, bibtex, and natbib, where the Č character for Čermak isn't sorted in the bibliography correctly. I don't understand why not. Both files are encoded as utf-8 by my editor, and the pdf shows the character correctly. If instead I use {\v C} in the bib file, the sorting is correct (so obviously this is my current workaround, but I don't want to have to do it for all my refs if I don't have to).               \documentclass[10pt,a4paper,final]{article}     \usepackage[utf8]{inputenc}     \usepackage[english]{babel}     \usepackage{natbib}     \begin{document}     See \cite{cermak_heat_1985,ingebritsen_sanford_1999}     \bibliographystyle{apalike}      \bibliography{mwe}      \end{document}      and the bib file:               @BOOK{ingebritsen_sanford_1999,       title = {Groundwater in geologic processes},       publisher = {Cambridge University Press},       year = {1999},       author = {Ingebritsen, S. E. and Sanford, Ward E.},       pages = {341}     }     @ARTICLE{cermak_heat_1985,       author = {Čermak, Vladimír and Jetel, Ján},       title = {Heat flow and ground water movement in the {B}ohemian {C}retaceous {B}asin         ({C}zechoslovakia)},       journal = {Journal of Geodynamics},       year = {1985},       volume = {4},       pages = {285--303},       number = {1–4},     }


title: Rename associated Figure files

text: Some journals request that the submitted figure files are named to match the compiled latex pdf (fig1.pdf, fig2.pdf, ...). Now most of my colleagues and I do not name our figures according to the numbering in the latex document, but to what's in them (e.g. experiment1_time_vs_location.pdf). Is there an easy way to have a script rename them (or hard link them) so that it is easier for submission for OSX and Linux. How do you access the figure numbers generated by Latex?


title: How to remove caption & number from wrapped figure?

text: I have a wrapped non-floating figure fitting within 40% of column width, and I want to remove the caption number and text. How can I do this?


title: How to right-justify URLs inside a table?

text: I have a table containing a URL, and I want the URL to break so that the URL is right-justified along with the other text. In my example below you can see that the last few lines are not right- justified: ![](http://www.andrewinfosec.com/latex_1.jpg) I have tried to use `\UrlBreaks` to allow wrapping to occur using any character (see my code below), but this does not work. Frankly, having the code be `\raggedright` would probably also be okay for my needs, but when I add `\raggedright` I get a bizarre linebreak inserted before the URL: ![](http://www.andrewinfosec.com/latex_2.jpg) Any help to fix either scenario would be gratefully received! Here's the code for the first example above:               \documentclass[10pt,letterpaper]{article}          \usepackage[hyphens]{url}     \urlstyle{same}     \usepackage{longtable}          \renewcommand{\UrlBreaks}{\do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j\do\k\do\l\do\m\do\n\do\o\do\p\do\q\do\r\do\s\do\t\do\u\do\v\do\w\do\x\do\y\do\z\do\A\do\B\do\C\do\D\do\E\do\F\do\G\do\H\do\I\do\J\do\K\do\L\do\M\do\N\do\O\do\P\do\Q\do\R\do\S\do\T\do\U\do\V\do\W\do\X\do\Y\do\Z\do\1\do\2\do\3\do\4\do\5\do\6\do\7\do\8\do\9\do\/\do\-\do\_\do\:\do\.}          \begin{document}     \small          \begin{longtable}{@{}p{9.45cm}}          Craig Timberg, Jia Lynn Yang, and Hayley Tsukayama, ``Target says 40 million credit, debit cards may have been compromised in security breach'', \emph{The Washington Post}, December 19, 2013, available: \emph{\url{http://www.washingtonpost.com/business/technology/target-data-breach-affects-40-million-accounts-payment-info-compromised/2013/12/19/5cc71f22-68b1-11e3-ae56-22de072140a2_story.html}}. \\          \end{longtable}     \end{document}


title: Making URLs non-clickable with hyperref

text: I've been told that I have to make all URLs in the bibliography for this document non-clickable. However, I am using `hyperref` to do internal linking within the document (c.f. citations). I looked at the package options for `hyperref` but couldn't find an option to make URLs non-clickable. Is there a secret hack? **Update 1:** Here's an MWE that shows that modifying `href` seemed not to work.               \documentclass{article}     \usepackage[colorlinks]{hyperref}          \begin{document}          \renewcommand\href[3][\relax]{#3}          Here's a cite:~\cite{ChaudhuriMS:11pperm}.               \bibliographystyle{IEEEtran}     \bibliography{example}     \end{document}      example.bib:               @article{ChaudhuriMS:11pperm,         Author = {Kamalika Chaudhuri and Claire Monteleoni and Anand Dilip Sarwate},         Date-Added = {2014-07-15 22:54:03 +0000},         Date-Modified = {2014-07-15 22:54:03 +0000},         Journal = {Journal of Machine Learning Research},         Local-Url = {pdfs/ChaudhuriMS11erm.pdf},         Month = {March},         Pages = {1069--1109},         Title = {Differentially private empirical risk minimization},         Url = {http://jmlr.csail.mit.edu/papers/v12/chaudhuri11a.html},         Volume = {12},         Year = {2011},         Bdsk-Url-1 = {http://jmlr.csail.mit.edu/papers/v12/chaudhuri11a.html}}      I am getting an warning: `Package hyperref Message: Driver (autodetected): hpdftex.` Is that undoing the href redefinition? Note I'm using pdflatex on MacOS. **Update 2:** Here's a new MWE -- it seems that if I put a `\newpage` before the references, it makes all URLs clickable, and if not, then the fix works... I can hack this in my document but I find this behavior a bit... unexpected? Does `\newpage` clear some settings?               \documentclass{article}          \usepackage{filecontents}     \begin{filecontents*}{\jobname.bib}     @article{ChaudhuriMS:11pperm,         Author = {Kamalika Chaudhuri and Claire Monteleoni and Anand Dilip Sarwate},         Journal = {Journal of Machine Learning Research},         Month = {March},         Pages = {1069--1109},         Title = {Differentially private empirical risk minimization},         Url = {http://jmlr.csail.mit.edu/papers/v12/chaudhuri11a.html},         Volume = {12},         Year = {2011}}     \end{filecontents*}          \usepackage[colorlinks]{hyperref}          \begin{document}          Here is a cite: \cite{ChaudhuriMS:11pperm}.          \newpage % comment to make URL not clickable          \let\url\nolinkurl% Make \url be equivalent to \nolinkurl     \bibliographystyle{IEEEtran}     \bibliography{\jobname}     \end{document}      **Update 3:** Here's the .bbl file that is produced by TeXShop (perhaps I should return to the command line?). I still get that the link is non- clickable if and only if the `\newpage` is commented out. The .bbl file is _identical_ whether I comment or don't comment the `\newpage` command.               % Generated by IEEEtran.bst, version: 1.13 (2008/09/30)     \begin{thebibliography}{1}     \providecommand{\url}[1]{#1}     \csname url@samestyle\endcsname     \providecommand{\newblock}{\relax}     \providecommand{\bibinfo}[2]{#2}     \providecommand{\BIBentrySTDinterwordspacing}{\spaceskip=0pt\relax}     \providecommand{\BIBentryALTinterwordstretchfactor}{4}     \providecommand{\BIBentryALTinterwordspacing}{\spaceskip=\fontdimen2\font plus     \BIBentryALTinterwordstretchfactor\fontdimen3\font minus       \fontdimen4\font\relax}     \providecommand{\BIBforeignlanguage}[2]{{%     \expandafter\ifx\csname l@#1\endcsname\relax     \typeout{** WARNING: IEEEtran.bst: No hyphenation pattern has been}%     \typeout{** loaded for the language `#1'. Using the pattern for}%     \typeout{** the default language instead.}%     \else     \language=\csname l@#1\endcsname     \fi     #2}}     \providecommand{\BIBdecl}{\relax}     \BIBdecl          \bibitem{ChaudhuriMS:11pperm}     \BIBentryALTinterwordspacing     K.~Chaudhuri, C.~Monteleoni, and A.~D. Sarwate, ``Differentially private       empirical risk minimization,'' \emph{Journal of Machine Learning Research},       vol.~12, pp. 1069--1109, March 2011. [Online]. Available:       \url{http://jmlr.csail.mit.edu/papers/v12/chaudhuri11a.html}     \BIBentrySTDinterwordspacing          \end{the bibliography}      **Update 4:** This phenomenon seems particular to Apple's Preview PDF reader (the solution given by Werner works great if you view the PDF in Adobe. I still have no idea why `\newpage` causes this difference, but at least I now have plausible deniability about the URLs. Thanks!


title: Align*, & and \futurelet

text: can somebody explain futurelet **within** align-environments? ## Example: The command \A should give an "A" if the next char is a {, a "B" if it is & and "C" in any other case.               \gdef\A{\futurelet\thesymbol\B}     \gdef\B#1{\ifx\bgroup\thesymbol A\else\ifx&\thesymbol B\else C\fi\fi}      and in case of normal text or inline math, it works quite fine:               \A{a},\A&,\A a       % -> "A,B,C"     $\A{a}$,$\A&$,$\A a$ % -> "A,B,C"      **but** the moment I use it within an align*-environment (amsmath) there is an "Incomplete \ifx"-error:               \begin{align*} \A{a},\A&,\A a \end{align*}% --> error.      Can somebody explain it to me? Thx! Chris PS: There are more things about futurelet in an align environment which I do not understand: If we define               \gdef\A{\futurelet\thesymbol\alpha}     \gdef\D#1{\detokenize{#1}}      then               \begin{align*}      \D&,\A a    % -> "&,alpha a" (okay)      \A a,\D{&}  % -> "alpha a,&" (okay)      \A a,\D&    % -> error: "Argument of D has an extra }." (???)     \end{align*}


title: Bar charts: Change the vertical order of different plots and corresponding legend entries

text: I want to compare percentages of two different years using horizontal bar charts. The values for the 2 years (1996 and 2011) are given via a pgfplots table. I want the 1996 values to be shown in top of the corresponding 2011 values. But when adding them in the correct order, the legend entries are ordered the other way (2011 shown first, then 1996). MWE:               \documentclass[a4paper,11pt,twoside]{memoir}     \usepackage{pgfplots}     \usepackage{pgfplotstable}          \begin{document}          \pgfplotstableread[col sep=comma,header=true]{     Type,1996,2011     type1,41.26,46.57     type2,55.42,38.76     type3,0.14,0.11     type4,0.24,0.05     type5,0.79,13.20     type6,2.14,1.31     }\data          \begin{figure} [tb]%         \centering         \begin{tikzpicture}                  \begin{axis}[                     width=12cm,                 xbar,                                                  xtick={0,10,20,...,100},                     xmin=0,                 xmax=100,                        grid=major,                 nodes near coords, nodes near coords align={horizontal},                 symbolic y coords={type6,type5,type4,type3,type2,type1},                 ylabel={Type},                 xlabel={Percentage},                 y label style={at={(-0.1,0.5)}},                 enlarge x limits={abs=0}             ]             \addplot table [x=1996, y=Type] {\data};             \addplot table [x=2011, y=Type] {\data};             \legend{1996,2011}             \end{axis}         \end{tikzpicture}     \label{fig:distribution}     \end{figure}          \end{document}      I tried to change the legend order manually, like described in this post, but that led to ugly vertical align between bars and text in the legend:               \documentclass[a4paper,11pt,twoside]{memoir}     \usepackage{pgfplots}     \usepackage{pgfplotstable}          \begin{document}          \pgfplotstableread[col sep=comma,header=true]{     Type,1996,2011     type1,41.26,46.57     type2,55.42,38.76     type3,0.14,0.11     type4,0.24,0.05     type5,0.79,13.20     type6,2.14,1.31     }\data          \begin{figure} [tb]%         \centering         \begin{tikzpicture}                  \begin{axis}[                     width=12cm,                 xbar,                                                  xtick={0,10,20,...,100},                     xmin=0,                 xmax=100,                        grid=major,                 nodes near coords, nodes near coords align={horizontal},                 symbolic y coords={type6,type5,type4,type3,type2,type1},                 ylabel={Type},                 xlabel={Percentage},                 y label style={at={(-0.1,0.5)}},                 enlarge x limits={abs=0},                 extra description/.code={              \matrix[/pgfplots/every axis legend]              {                             \ref{1996} \pgfmatrixnextcell \node{1996};\\                             \ref{2011} \pgfmatrixnextcell \node{2011};\\                           };              }              ]                    \addplot table [x=2011, y=Type] {\data};                     \label{2011}                     \addplot table [x=1996, y=Type] {\data};             \label{1996}             \end{axis}         \end{tikzpicture}     \label{fig:distribution}     \end{figure}          \end{document}      As suggested in the post, I consulted the `tikz` manual, but found no solution for this problem (at least for my latex skills). Any hints?