title: Enforce a line-break inside \lstinline

text: I use `\lstinline{foo}` from the `listings` package to set pieces of code in regular text. To get automatic line-breaks I use the following options:               \lstset{      breaklines=true,      breakatwhitespace=true,      breakindent=2ex,      postbreak=\raisebox{0ex}[0ex][0ex]{\ensuremath{\hookrightarrow\space}}     }      Sometime code fragments have to go into rather narrow table cells and the automatic line breaks just don't look very nice. Is there any way to tell `\lstinline` (and `lstlisting`) where to insert line- breaks without actually putting them into the LaTeX source literally? If I do hard code them this will influence line numbers (in `lstlisting`s) and also the line continuation symbol and indentation will be missing.


title: Package footnotebackref conflict with memoir

text: I'm using `footnotebackref` with `memoir`. The footnote is generated and the link from the text works (from `hyperref` presumably), but no link is created from the footnote back to the text. This appears to be a confict with memoir (though it compiles fine and I don't see any errors in the output). If in the following MWE you substitute `book` for `memoir` then it works as expected. I've run it in both pdfLaTeX and LuaTeX and the results are the same.               \documentclass{memoir}     \usepackage{hyperref}     \usepackage{footnotebackref}     \begin{document}     This is text.\footnote{This is a footnote.}     \end{document}


title: Table column fixed width does not fire

text: I have the springer svjour3 template and the user guide says that for tables the usual Latex 2e commands are used. Now, I would like to produce a table that goes over the whole page (the error is the same, no matter whether I choose the one or the two column setup) with three columns of 6cm width. Inside the cells the text should be line broken automatically.               % For tables use     \begin{table*}     % table caption is above the table     \caption{Please write your table caption here}     \label{tab:1}       % Give a unique label     % For LaTeX tables use     \begin{tabular}{ p{5 cm} l p{5 cm} l p{5 cm} }     \hline\noalign{\smallskip}     first & second & third  \\     \noalign{\smallskip}\hline\noalign{\smallskip}     number & Some very very long text. And even more longer text in this column. & number \\     number & number & Some very very long text. And even more longer text in this column. \\     \noalign{\smallskip}\hline     \end{tabular}     \end{table*}      The problem is that no matter how I manipulate the arguments to the tabular commands, I can produce the desired 5cm for one column only, the rest would ignore it and just get as long as it gets and run out of the pdf page. What could cause this?


title: adding online profile pages to moderncv

text: I have been using moderncv and I was thinking of adding my _stackoverflow_ and _github_ profiles to my resume, unfortunately there doesn't seem any macros for that (is there?) I wasn't using `\homepage{..}` so I added one of the profiles there. If I add another `\homepage{..}`, the first one disappears so I tried adding the other one with `\extrainfo{..}`. It looks ok this way but the problem is first link is clickable while the second one isn't. So my question is:   * how can I add two `\homepage{..}` 's   * and/or how can I make `\extrainfo{..}` clickable   * and/or how hard it is to maybe create a macro specific to online profiles like `\profilepage{..}` (I don't have any experience with macros).


title: Different styles for the same document

text: Suppose I am writing a paper, which I plan to submit to a journal/conference, but also put on a preprint server like the arXiv. Each publisher has its own style files required for typesetting the paper, while for several reasons, it may be convenient to put a "neutral" version on this preprint server, with a neutral style. My question is the following: **Is it possible to make one single TeX-file, which (e.g., after specifying an option in the preamble) can be compiled to give either version of this same paper?** Even if the solution is a somewhat ugly fix with pure TeX-variables, that would be something. The two different styles may have a different document class, require different packages, etc. so I have no idea where to start, and whether this is even possible.


title: Easy creation of logarithmic grid with TikZ

text: Is it possible to create a logarithmic grid using the command below with TikZ?               \draw (-0.1,-0.1) grid (4.1,4.1);      It would be great to be able to create a logarithmic grid without having to specify each line manually. If it is possible, can you also create log-grid on both and only one axis?


title: The text 'figure' being printed under captions in IEEEtran

text: Under `\documentclass[conference]{IEEEtran}`, whenever I include a caption under a figure, right below the caption, the text 'figure' is printed. This does not happen under `\documentclass{article}`. Running the following code, I get the problem:               \documentclass[conference]{IEEEtran}     \usepackage{graphicx,caption}     \begin{document}          \begin{figure}     \includegraphics{figures/saturation}     \caption{Caption here.}     \end{figure}          \end{document}      Here's a screenshot of the problem: ![problem](http://i.imgur.com/LPw0you.png?1) This is the format suggested here. Any help is appreciated.


title: side by side minipage figures

text: I have this code where the part marked `A` is the same as the part marked `B` except that `.4` in `A` is `.45` in `B`. Even though they are so similar the first one puts the images side by side with the rightmost one flush right but the second one does not do that. I don't understand why there is a difference. Could someone explain that.               \documentclass{article}     \usepackage{colortbl}     \usepackage{graphicx}     \begin{document}          \begin{center}      \noindent\colorbox{blue}{\parbox[t][0.5cm][c]{\textwidth}{\bfseries{HEADER}}}     \end{center}           \noindent\begin{minipage}{\textwidth}          %A     \noindent\begin{minipage}[b]{.4\textwidth}     \includegraphics[width=2in]{elephant}     Some text.     \end{minipage}      \hfill     \begin{minipage}[b]{.4\textwidth}     \includegraphics[width=2in]{elephant}     Some more text.     \end{minipage}          \end{minipage}          \vspace{5ex}          %B     \noindent\begin{minipage}{\textwidth}          \noindent\begin{minipage}[b]{.45\textwidth}     \includegraphics[width=2in]{elephant}     Some text.     \end{minipage}      \hfill     \begin{minipage}[b]{.45\textwidth}     \includegraphics[width=2in]{elephant}     Some more text.     \end{minipage}          \end{minipage}          \end{document}      Output: ![screenshot](http://i.stack.imgur.com/khz0C.png) Creative commons info on elephant image is here


title: Removing [Author Year] Tags from Reference List using ACM Journal Style

text: How can I remove the tags before each bibliographic entry in the list (and also remove the paragraph indentation if possible? Also, is the version without the [Author Year] a valid ACM bibliography style at all? (See image attached please) My code for the bibliography is this:               \bibliographystyle{ACM-Reference-Format-Journals}     \bibliography{library}        Thanks.![enter image description here](http://i.stack.imgur.com/mPD9K.png)


title: Typesetting an old Latin ligature with pdftex

text: I am using `pdftex` (MiKTeX) to typeset snippets of old texts. I am stuck on how to get the ligature that looks like qz in old latin (1526) (but could be some form of que). For example the third word below (and twice more on the last line) ![old latin text from 1526](http://i.stack.imgur.com/Rmt0I.png) I am using `\fontfamily{jkpvos}` from kpfonts to get the long s and st ligatures, but have no clue about the other. (The text is from Cursus quatuor mathematicarum artium liberalium by Pedro Ciruelo, 1526.)


title: Hyperref causing warning with table of contents, list of figures and list of tables

text: I receive the following warning and managed to figure out that these were due to some interplay between the `hyperref` package and the commands `\tableofcontents`, `\listoftables` and `\listoffigures` (the command `\afterpreface` essentially does `\tableofcontents`, `\listoftables` and `\listoffigures`). I have `\hyperref` package as the last package added in my preamble and with the following options: `\usepackage[plainpages=false,pdfpagelabels]{hyperref}` How do I get rid of these warnings?               (/usr/share/texmf/tex/latex/lm/omslmr.fd)pdfTeX warning (ext4): destination wit     h the same identifier (name{page.}) has been already used, duplicate ignored     <to be read again>                         \relax      l.125   \afterpreface                          [1] (./temp.toc)pdfTeX warning (ext4): destina     tion with the same identifier (name{page.}) has been already used, duplicate ig     nored     <to be read again>                         \relax      l.125   \afterpreface                          [2] (./temp.lot)pdfTeX warning (ext4): destina     tion with the same identifier (name{page.}) has been already used, duplicate ig     nored     <to be read again>                         \relax      l.125   \afterpreface                          [3] (./temp.lof     Underfull \vbox (badness 2189) has occurred while \output is activepdfTeX warni     ng (ext4): destination with the same identifier (name{page.}) has been already      used, duplicate ignored     <to be read again>                         \relax      l.12 ...sponds to $10^4$ sec/m.}}{28}{figure.2.10}                                                        [4])pdfTeX warning (ext4): d     estination with the same identifier (name{page.}) has been already used, duplic     ate ignored     <to be read again>                         \relax      l.125   \afterpreface                          [5]pdfTeX warning (ext4): destination with the same identi     fier (name{page.}) has been already used, duplicate ignored     <to be read again>                         \relax


title: The footer styling in fancyhdr - Center text

text: \fancypagestyle{myfancy}{     \fancyhf{}     \fancyhead[LE,RO]{\slshape\nouppercase{\leftmark}}     \fancyfoot[LE,RO]{\tikz[baseline={(0,0)},anchor=center] \node[label={center:\thepage}]{\includegraphics[scale=.25]{apple}};}%     \renewcommand{\headrulewidth}{0.4pt}     \renewcommand{\footrulewidth}{0.4pt}     }      The above code generates header and in the footer it generates page numbers with images on the corners of odd and even pages respectively.Now I want to add quotes by famous people in the footer area in the center which I tried by \fancyfoot[C] leading to overriding of existing settings.How do I do that?Secondly,I have the quotes and the authors in a .csv file.I want to read the author and the quote one by one and for each page I want to display one.I am aware of the **datatool** package but how do I do it? Here is the source code:               %Template for Technical Document     \documentclass{book}     \usepackage[explicit]{titlesec}     \usepackage{tikz}     \usepackage{suffix}     \usepackage{lipsum}     \usepackage[a4paper,margin=1in,bindingoffset=0.2in,centering,headheight=0.3in,heightrounded]{geometry}     %\renewcommand{\chaptername}{Article}     \usepackage{fancyhdr}     \usepackage[a4paper,margin=1in,bindingoffset=0.2in,centering,headheight=0.3in,heightrounded]{geometry}     % Can also use centering, or hcentering               \fancypagestyle{plain}{       \fancyhf{}       \fancyfoot[LE,RO]{\tikz[baseline={(0,0)},anchor=center]         \node[label={center:\thepage}]{\includegraphics[scale=.25]{apple}};}%       \fancyhf[cf]{Hello World}         \renewcommand{\footrulewidth}{0.4pt}       \renewcommand{\headrulewidth}{0.0pt}     }               \fancypagestyle{myfancy}{     \fancyhf{}     \fancyhead[LE,RO]{\slshape\nouppercase{\leftmark}}     \fancyfoot[LE,RO]{\tikz[baseline={(0,0)},anchor=center] \node[label={center:\thepage}]{\includegraphics[scale=.25]{apple}};}%     \fancyhf[cf]{Hello World}     \renewcommand{\headrulewidth}{0.4pt}     \renewcommand{\footrulewidth}{0.4pt}     }               \usepackage{microtype}          \usepackage{afterpage}     \let\oldcleardoublepage\cleardoublepage     \renewcommand{\cleardoublepage}{\afterpage{\thispagestyle{empty}}\oldcleardoublepage}          \pagestyle{myfancy}     \renewcommand{\chaptermark}[1]{\markboth{#1}{}}               \begin{document}     \chapter{Install Backtrack on an Android Device}     \section{What is Backtrack?}     \lipsum[10]     \section{Security Tools in Backtrack}     \lipsum[10]     \section{Installing Backtrack on Android Device}     \lipsum[10]     \end{document}      Also the footer center text is not aligning with the page number.How to modify that as well?![enter image description here](http://i.stack.imgur.com/n4TtF.png)


title: Using a required argument as a default for an optional one in \newcommand

text: I'd like to create a new subsection command with the same calling structure like the original one, but I have no idea on how to handle the case when the optional argument is omitted. Basically I want to have `newsubsection[Short Title]{Long Title}` to call `subsection[#1]{#2}` and `newsubsection{Title}` to call `subsection{#1}`. I've read the thread about a similar problem posted here around two years ago, but it seems to have been much more complicated (more than one `opt`-argument) and I'm too much of a TeX-newbie to transfer the solutions to my problem. Also, I already tried lots of weird combinations like `\newcommand{\subsect}[2][#1]{\par\nolinenumbers\subsection[#1]{#2}\linenumbers}` (failed attempt to use the syntax from the `\wbalTwo`-example here), but none of them were resulting in anything remotely working.


title: Adding an open-quote mark to the start of each line in a multiline quotation?

text: I'm going to be re-typesetting some old books (from the late 18th Century) in the coming weeks, and a few of them are old enough that they use an archaic typographic convention for quotation: every line of a multi-line quote begins with an open quotation mark. This is subtly different from a decorated block quote (see http://en.wikipedia.org/wiki/Quotation_mark#History), since there is no margin change or other indicator, except that each line is decorated on the left. I have a nagging feeling I've seen a package that actually does this, but the search terms make it pretty unfindable. Does anybody have any advice for reproducing this behavior? I'd actually like to capture it as part of the project. Here's an example I've found in Google Books: http://books.google.com/books?id=nY8FAAAAQAAJ&dq=review&pg=PA190#v=onepage&q&f=false . As you can see, the quotation start is indicated by `‘` inline where it starts, but the first character set on every subsequent line is also `‘` until the quote closes. In other words, the quote mark occurs at the start (with some following space, actually) of every newline created, after the quotation opens, and only until the quotation closes.


title: Anomalies and a question regarding a line-filling rule

text: I've created a command for filling a line with a black rectangle. It's called `\fullrule`, you can find it in the code below. I have several questions regarding this MWE:               \documentclass[10pt]{article}     \usepackage[a4paper]{geometry}          \newlength{\mylift}     \setlength{\mylift}{-10pt} % MARK2     \addtolength{\mylift}{-1ex}     \addtolength{\mylift}{\baselineskip}          \newcommand{\fullrule}{%         {\hspace*{0pt}\leaders\hbox{\rule[\mylift]{1pt}{10pt}}\hfill}% % MARK 1         \hspace*{0pt}}          \begin{document}     aaa          \fullrule          aaa\fullrule{}\\     \fullrule{}\\     \fullrule{}          \fullrule          aaa\fullrule{}aaa          \fullrule{}\\     \fullrule{}aaa\\     \fullrule     \end{document}      This is what it produces: ![fullrule](http://i.stack.imgur.com/4Laqs.png)   1. Why is the first line of my document indented? (Okay, this one is the smallest problem.)   2. I had to add `\hspace*{0pt}` right before `\leaders`, and after the "whole `\leaders` part" to get it work with lines with no leading characters before `\fullrule`. Why? (I'd like to understand this, because it took a long time to figure out with trying.)   3. Is there any way to rewrite the `\fullrule` command to use the actual font size instead of 10pt (see `% MARK 1` in the code above), and to calculate the rule's raise using the actual font size (see `% MARK 2` in the code above). Thanks!


title: Problem with typing "^" in Texmaker?

text: I am using Texmaker for making documents in Latex. However for some reason I am not able to type the symbol "^". I am able to type other symbols which require you to hold SHIFT + {other key}, such as !, @, #, $, %, & and *, using the numbers 1 to 5 and 7 to 9. However, when I try to do the same with 6, which should produce a ^, I get nothing. I have to press and hold for a while before I can get the symbol typed. Note that I can still type "^" in other programs (such Microsoft Word) normally (without holding the keys for sometime). My temporary solution is to type it in another program (often a web browser) and copy out of it. But I would expect that you would be able to type it in Texmaker itself. Do other people have the same issue, or does anyone know how to resolve this? **Edit with some extra system info**   OS: Windows 7 enterprise   Texmaker version: 4.0.2 **Edit 2**   Just updated Texmaker to version 4.1.1 and the issue no longer occurs/I am able to type "^" via Shift + 6.


title: line numbers displayed in latex (both-sided)

text: Is there a possibility to get (in an onecolumn article) line numbers on both sides (left and right) displayed? I used the lineno-package for a one-sided numeration, but I fail to use it for left and right simultaneously.               \documentclass{article}     \usepackage[left]{lineno}     \usepackage{blindtext}          \begin{document}     \linenumbers     \blindtext     \end{document}


title: Giving spaces between rows in a (multicolumn) table

text: I managed to make a multicolumn table, but it looks ugly and need some fix.   1. How to move the label "Min width" in the center?   2. How to give more space between the first and second row?  ![enter image description here](http://i.stack.imgur.com/Riuin.png)               \documentclass[11pt, twocolumn]{article}          \usepackage{booktabs}          \begin{document}          \begin{table}[ht]     \caption{String}     \centering      \begin{tabular}{c | cc | cc }     \toprule     Min width  & \multicolumn{2}{|c|}{$fp_{c}$} &     \multicolumn{2}{|c}{$fp_{bf}$} \\ \cline{2-5}      & theory & exp & theory & exp  \\     \midrule     1 & 0.23\% & 0.21\% & 0.04\% & 0.065\% \\     2 & 0.085\% & 0.087\% & 0.0015\% & 0.0020\% \\     3 & 0.032\% & 0.026\% & $5.5\times 10^{-4}$\% & 0\% \\     4 & 0.012\% & 0.011\% & $2.1\times 10^{-4}$\% & 0\% \\     \bottomrule     \end{tabular}     \label{tbl:fp_probabilities}     \end{table}          \end{document}


title: Is there a way to define a newcommand that can evaluate mathematical expressions

text: Let's suppose that I have a very complicated function that depends on `i` and `j`. So I define a new command, say               \newcommand{\foo}[2]{X_{i+j+1}}. % This might be an complicated expression, but I want to keep it simple      Using this definition, I can invoke this command like `\foo{\alpha}{\beta}` or `\foo{2}{3}`. Now, what I want to get is if both of arguments are numerical values, I want to force them to evalue this expression, i.e., `\foo{2}{3}` should generate `X_{6}` instead of `X_{2+3+1}`. It is sometimes annoying that I should manually simplify it even though I know the full expression. I actually feel this seems almost impossible but I anyway would like to ask in case there exists some workarounds.


title: How to wrap text around a figure? (revised)

text: This question has been asked before (and in fact I stole the diagram below from that question) but the answers are not sufficient for my needs (at least near as I can tell). What I want is the following:               Lorem ipsum dolor sit amet, consectetur adipiscing elit.     Aenean quis mi ut elit interdum imperdiet quis non ante.     Sed imperdiet, sapien quis    +------------------------+     viverra rhoncus, tellus dui   |                        |     dictum nisl, at porta purus   |                        |     ipsum ac turpis. Fusce auctor |         FIGURE         |     ullamcorper adipiscing. Nunc  |          HERE          |     non quam ac orci egestas con- |                        |     sequat ut eget quam. Cras     |                        |     blandit condimentum ornare.   +------------------------+     Curabitur aliquam, nulla sit amet iaculis tristique, mi     nulla auctor magna, sit amet imperdiet ante arcu a libero.      However, I do _not_ want the "figure here" bit to start at the top of the paragraph. I've played around with `wrapfig` and `picins` and looked at the documentation for `floatflt`, and haven't really found anything. (`wrapfig` seems to always put it at the top, `floatflt` doesn't have any options for that sort of placement, and `picins` appears to start a new paragraph.) Is there any way to do it besides render the document without the figure, look where the line break is, force a line break at that point, start a new paragraph, and `\noindent`? As much as I enjoy doing that sort of thing and think it falls right in line with TeX's philosophy of "don't worry about layout specifics", ideally that wouldn't apply here. Also ideal is if it can figure out how big the figure is, instead of me telling it.


title: disable syntax highlighting in kile

text: In the `\verbatim` environment, the syntax highlighting is disabled default, e.g. a `$` ist not recognized as beginning of the math mode. I add my own environtment (`\rawtext`) to the kile Verbatim environments (Settings -> Configure Kile -> LaTeX -> General -> Commands -> Environments) ![enter image description here](http://i.stack.imgur.com/ugDw1.png) However, it is not working: ![enter image description here](http://i.stack.imgur.com/MbDxB.png) What is wrong or what can I do to display my own verbatim environment (kile 2.1.0 under Debian Linux)


title: Aligning the long equations

text: I have read all of the different solutions for fitting long formulas in a page, yet I am still not satisfied with the output I get. The formulas are right aligned which does not look good. Would you please let me know if you have a better solution. This is my code:               \begin{equation}          \begin{split}     (1-\mathbf{B})\begin{bmatrix} y_1\\y_2  \\ y_3 \end{bmatrix} &= \\     (\begin{bmatrix} 1\\1  \\ 1 \end{bmatrix}-\begin{bmatrix} 0.30064^{*} & -0.70171 &-10.27380 \\ 0.00206 &  0.35560^{*} &  -0.62373 \\  0.00013 & 0.00228 &  0.77829^{*} \end{bmatrix}\mathbf{B}-\\     \begin{bmatrix} -0.24890^{*} &  0.53801 &  -3.03724 \\  -0.00600 &   0.20570^{*} &  -1.04583 \\ -0.00010 & -0.00189 &  0.27768^{*}  \end{bmatrix}\mathbf{B}^2-\\     \begin{bmatrix} 0.61824^{*} &  0.33973 & -1.09651 \\  -0.00287 &   -0.12782 & 2.79815 \\  -0.00002 & -0.00249 &  -0.07773 \end{bmatrix}\mathbf{B}^3) \begin{bmatrix} \varepsilon_{1t} \\ \varepsilon_{2t} \\ \varepsilon_{3t}  \end{bmatrix}     \end{split}     \end{equation}


title: How can I set single line spacing for \enumerate amd \section?

text: I want to set `\enumerate` and `\section` to use single line spacing and small font like the table of content in this document. How can I do that? Thank you.


title: How to get proper spacing when typesetting an expression such as $f\left(\frac{y}{2}\right)

text: I am trying to typeset the value of a function $f$ for $x = \frac{y}{2}$ (or something other which requires more vertical space). To get properly sized parentheses I tried:               f\left(\frac{y}{2}\right)      which gives me bad spacing. For example,               \documentclass{article}     \begin{document}     \noindent $f\left(\frac{y}{2}\right)$\\     $f(x)$     \end{document}      gives: ![Output](http://i.stack.imgur.com/sMnNg.png) So what's the correct way to typeset this?


title: Using SageTeX with siunitx

text: I have the following problem: I'd like to do calculations using SageTeX and use the result in an `siunitx` expression, so that (for example)               \SI{\sage{3.5^2}}{kg m}      would give me the same result as               \SI{12.25}{kg m}      However, due to how SageTeX works, it's not as easy as this. Trying to compile the following document:               \documentclass{scrartcl}          \usepackage{siunitx}     \usepackage{sagetex}          \begin{document}          \SI{\sage{3.5^2}}{kg m}          \end{document}      Gives me this:               pdflatex -interaction=nonstopmode test.tex          This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian)      restricted \write18 enabled.     entering extended mode     (./test.tex     LaTeX2e <2011/06/27>     Babel <3.9h> and hyphenation patterns for 9 languages loaded.          ...          No file test.sagetex.sout.     )     No file test.aux.          ...          ! Argument of \reserved@a has an extra }.     <inserted text>                      \par      l.8 \SI{\sage{3.5^2}}{kg m}          Runaway argument?     {\def \@currenvir {NoHyper}\edef \@currenvline {\on@line }\csname NoH\ETC.     ! Paragraph ended before \reserved@a was complete.     <to be read again>                         \par      l.8 \SI{\sage{3.5^2}}{kg m}               !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!     !     ! siunitx error: "invalid-token-in-number"     !      ! Invalid token '\immediate ' in numerical input.     !      ! See the siunitx documentation for further information.     !      ! For immediate help type H <return>.     !...............................................            l.8 \SI{\sage{3.5^2}}{kg m}          ! Argument of \reserved@a has an extra }.     <inserted text>                      \par      l.8 \SI{\sage{3.5^2}}{kg m}          Runaway argument?     {\def \@currenvir {NoHyper}\edef \@currenvline {\on@line }\csname NoH\ETC.     ! Paragraph ended before \reserved@a was complete.     <to be read again>                         \par      l.8 \SI{\sage{3.5^2}}{kg m}               !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!     !     ! siunitx error: "invalid-number"     !      ! Invalid numerical input '\immediate \write \ST@sf {try:      _st_.inline(0,     ! latex(3.5^2))     except:      _st_.goboom(8)}\def \par '.     !      ! See the siunitx documentation for further information.     !      ! For immediate help type H <return>.     !...............................................            l.8 \SI{\sage{3.5^2}}{kg m}          *********************************************************************     [1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./test.aux) )     (\end occurred when \iffalse on line 8 was incomplete)     (\end occurred when \iffalse on line 8 was incomplete)     (see the transcript file for additional information)</usr/share/texlive/texmf-d     ist/fonts/type1/public/amsfonts/cm/cmr10.pfb>     Output written on test.pdf (1 page, 8198 bytes).     Transcript written on test.log.      Unfortunately, I don't understand (La)TeX's internals well enough to decide whether there is a feasible solution to this. Is it possible to work around this somehow in LaTeX, or would it be better to try to program something in Sage itself?


title: How to use latex commands to draw a flowchart

text: I have to write a flow chart given by figure below ![enter image description here](http://i.stack.imgur.com/dJRrX.png) I have used the packages,               \usepackage{tikz}          \usetikzlibrary{shapes,arrows}      But I couldn't get what I want. I hope some LaTeX experts here can help me with this. Other option is using `algorithm2e` package, Is that possible to have both codes? When I use the half commands it goes to other page? How to I write complete flow chart in one page ?               \documentclass[a4paper,10pt]{article}     \usepackage[utf8]{inputenc}     \usepackage{tikz}     \usetikzlibrary{matrix,shapes,arrows,positioning,chains}          \begin{document}          % Define block styles     \tikzset{     desicion/.style={         diamond,         draw,         text width=4em,         text badly centered,         inner sep=0pt     },     block/.style={         rectangle,         draw,         text width=10em,         text centered,         rounded corners     },     cloud/.style={         draw,         ellipse,         minimum height=2em     },     descr/.style={         fill=white,         inner sep=2.5pt     },     connector/.style={         -latex,         font=\scriptsize     },     rectangle connector/.style={         connector,         to path={(\tikztostart) -- ++(#1,0pt) \tikztonodes |- (\tikztotarget) },         pos=0.5     },     rectangle connector/.default=-2cm,     straight connector/.style={         connector,         to path=--(\tikztotarget) \tikztonodes     }     }          \begin{tikzpicture}     \matrix (m)[matrix of nodes, column  sep=2cm,row  sep=8mm, align=center, nodes={rectangle,draw, anchor=center} ]{         |[block]| {Start};               &  \\         |[block]| {Assume that $a=c$ the optimilalty cretierin given by }               &                                            \\         |[desicion]| {Locally optimal}          &                                             \\        |[block]| {Assume that $a=d$ the optimilalty cretierin given by}    &                                             \\         |[desicion]| {Locally optimal}         &                                             \\              |[block]| {Assume that $a=e$ the optimilalty cretierin given by}    &                                             \\                 |[desicion]| {Locally optimal}         &                                             \\                      |[block]| {Assume that $a=f$ the optimilalty cretierin given by}    &                                             \\                         |[desicion]| {Locally optimal}         &                                             \\                              |[block]| {Assume that $a=k$ the optimilalty cretierin given by}    &                                             \\                                 |[desicion]| {Locally optimal}         &                                             \\         |[block]| {Stop};                           &                                             \\     };     \path [>=latex,->] (m-1-1) edge (m-2-1);     \path [>=latex,->] (m-2-1) edge (m-3-1);     \path [>=latex,->] (m-3-1) edge (m-4-1);     \path [>=latex,->] (m-4-1) edge (m-5-1);     \path [>=latex,->] (m-5-1) edge (m-6-1);     \path [>=latex,->] (m-6-1) edge (m-7-1);     \path [>=latex,->] (m-7-1) edge (m-8-1);     \path [>=latex,->] (m-8-1) edge (m-9-1);     \path [>=latex,->] (m-9-1) edge (m-10-1);     \path [>=latex,->] (m-10-1) edge (m-11-1);     \path [>=latex,->] (m-11-1) edge (m-12-1);          \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/MQ3KX.png)


title: equations in multiple lines

text: I'm using the following code to generate the second figure.               \begin{equation}     \begin{array}{c}     \displaystyle \min_{W, S}J(W,S)=\frac{\sum^n_{i,j=1}\norm{W^{T}(x_{i}-x_{j})}^2S_{ij}}{\sum^n_{i=1}\norm{W^Tx_{i}}^2}+\mu\norm{S}^2 \\ \\     \displaystyle \text{s.t.} \; W^TW=I \\     \displaystyle \sum^n_{j=1}S_{ij}=1, i = 1, \dots, n     \displaystyle \\S_{ij}\geq0, i,j = 1, \dots, n     \end{array}      \label{piel2}     \end{equation}      But Actually, I'd like to have first figure where the 's.t.' is before all of the constrains. How can I get it? ![figure 1](http://i.stack.imgur.com/gqjDx.png) ![figure 2](http://i.stack.imgur.com/7tZR0.png)


title: LaTeX Warning: Citation undefined

text: Sample running code:               \documentclass[a4paper,11pt]{article}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{lmodern}     \usepackage[hidelinks]{hyperref} % Hyperref package for url's and [hidelinks] option to remove collouring          \title{Test}     \author{Thanos}          \begin{document}          \maketitle     \tableofcontents          \begin{abstract}       This is abstract     \end{abstract}          \section{Section 1}          Referecnce example~\cite{ref:thanos}          \bibliographystyle{./IEEEtran}     \bibliography{./IEEEabrv,./references/ref}          \end{document}      It seems like a very simple question/answer but I can not find the error/solution to my problem. I am trying to understand why `IEEEtran` class is the problem of the code. While I am compiling the current example I keep getting this error: `LaTeX Warning: Citation`ref:thanos' on page 1 undefined on input line 21.` I know that this question has been answered here Undefined citation warnings, which states that the user should compile the code with the following process:   1. latex    2. bibtex    3. latex    4. latex  I tried the following process, but unfortunately, my problem was not solved. If I change my `\bibliographystyle{plain}` and `\bibliography{./references/ref}` it compiles normally. I have also include the `IEEEtran.cls` in the same compiling file but unfortunately did help. Also I tried to compile with `LaTeXiLa` and a different error is printed:               latexmk -pdf -synctex=1 name.tex     Rule 'bibtex name': File changes, etc:       Non-existent destination files:         'name.bbl'     Latexmk: I WON'T RUN 'bibtex configuration' because I don't find the following files:       ./IEEEabrv.bib     Latexmk: Use the -f option to force complete processing,      unless error was exceeding maximum runs of latex/pdflatex.     Latexmk: applying rule 'bibtex configuration'...     Latexmk: Errors, so I did not complete making targets      As a next step I deleted all files apart from the `.tex` file and the `reference` file, still the same error (terminal and compiler). The reference sample that I am using:               @online {ref:thanos,     title = {Statistics},     author = {ITU 2014 All Rights Reserved},     titleaddon = {{ITU}},     year = {2014},     month = {Mar.},     urldate = {2014-03-05},     howpublished = {\url{http://www.itu.int/en/ITU-D/Statistics/Pages/stat/default.aspx#}}     }      I also tried the format of the reference to `@MISC` but unfortunately the error is not solved. I am not 100% sure if I am using `biblatex` or `bibtex`, so I am sorry I can not provide more information about it. Has anybody encounter the same error? I can not find similar information or solution. Thanks in advance for your time and effort.


title: Widening one of the symbols in the overlap of symbols

text: The problem that I am having is that I want to make the intersection and subset signs more distinguished and I think that to make this happen I need to extend the subset legs (facing right) longer. I can't figure out how to do this. I tried `\bigcap`, but I am not aware of `\bigsubset` symbols. Even if there was a `\bigsubset` then the whole thing would just be a bit too big.               \makeatletter     \newcommand{\superimpose}[2]{%       {\ooalign{$#1\@firstoftwo#2$\cr\hfil$#1\@secondoftwo#2$\hfil\cr}}}     \makeatother     \newcommand{\subsetintersection}{\mathpalette\superimpose{{\subset}{\cap}}}     $\subsetintersection$      Any thoughts?


title: Review command in paper document class

text: By chance I saw that the `paper` document class has a `\review` command. After Googling a bit I was unable to find any useful reference to it. Can you tell me what is it for?


title: Lyx handling of \begin{align} and duplicate \tag with amsmath?

text: I am trying Lyx. I started Lyx and asked it to import this plain Latex file:               \documentclass[12pt]{article}%      \usepackage{amsmath}     \begin{document}          \begin{align}     A  &= B+C   \tag{33}\\     D  &= F+G   \tag{34}     \end{align}          \end{document}      ![Mathematica graphics](http://i.stack.imgur.com/ozOB9.png) However it seems Lyx adds its own tags to each equation, giving this result on the screen ![Mathematica graphics](http://i.stack.imgur.com/xq5qL.png) This seems to be just a configuration issue, as I saw few things about it, but I do not understand what the issue exactly. There is a related question here Automatic equation numbering in LyX but I tried the suggestion there for this case, and I still see the double tags in there. ![Mathematica graphics](http://i.stack.imgur.com/HxaPn.png) I also tried to import the same latex file, without the amsmath package, like this                  \documentclass[12pt]{article}%          %%%%%%   \usepackage{amsmath}  %% comment out for Lyx         \begin{document}             \begin{align}         A  &= B+C   \tag{33}\\         D  &= F+G   \tag{34}         \end{align}             \end{document}      But still the double \tag showed up. Could some one please explain (in simple terms, as I am newbie in Lyx) what I need to do to remove the tag that Lyx adds and tell it to use the original tags in the latex file? I am trying to test Lyx to see how it handles some of my Latex files, and I want to keep the same equation numbers and not change them. ![Mathematica graphics](http://i.stack.imgur.com/y265T.png)


title: Tikz get rid of the rest of a line after intersection

text: I have created the following figure:               \documentclass[border=18pt]{standalone}     \usepackage{tikz}               \begin{document}          \begin{tikzpicture}          \begin{scope}[>=latex]     \draw [->] (-3,0) -- (3,0);     \draw [->] (0,-1.5) -- (0,6.5);     \end{scope}          \filldraw [black] (0,0) circle (2pt);          \def\centerx{0}     \def\centery{4}          \def\side{3}     \def\rot{40}     \def\sidePerc{0.25}     \pgfmathparse{\side * sqrt(2)/2 }\let\veclen\pgfmathresult     \pgfmathparse{neg(\veclen)*sqrt(2)/2}\let\llx\pgfmathresult     \pgfmathparse{neg(\veclen)*sqrt(2)/2}\let\lly\pgfmathresult     \pgfmathparse{\veclen*sqrt(2)/2}\let\lrx\pgfmathresult     \pgfmathparse{neg(\veclen)*sqrt(2)/2}\let\lry\pgfmathresult     \pgfmathparse{\veclen*sqrt(2)/2}\let\urx\pgfmathresult     \pgfmathparse{\veclen*sqrt(2)/2}\let\ury\pgfmathresult     \pgfmathparse{neg(\veclen)*sqrt(2)/2}\let\ulx\pgfmathresult     \pgfmathparse{\veclen*sqrt(2)/2}\let\uly\pgfmathresult               \pgfmathparse{\llx*cos(\rot) - \lly*sin(\rot)}\let\llxr\pgfmathresult     \pgfmathparse{\llx*sin(\rot) + \lly*cos(\rot)}\let\llyr\pgfmathresult     \pgfmathparse{\lrx*cos(\rot) - \lry*sin(\rot)}\let\lrxr\pgfmathresult     \pgfmathparse{\lrx*sin(\rot) + \lry*cos(\rot)}\let\lryr\pgfmathresult     \pgfmathparse{\urx*cos(\rot) - \ury*sin(\rot)}\let\urxr\pgfmathresult     \pgfmathparse{\urx*sin(\rot) + \ury*cos(\rot)}\let\uryr\pgfmathresult     \pgfmathparse{\ulx*cos(\rot) - \uly*sin(\rot)}\let\ulxr\pgfmathresult     \pgfmathparse{\ulx*sin(\rot) + \uly*cos(\rot)}\let\ulyr\pgfmathresult                    \coordinate (A') at ({\llxr+\centerx},{\llyr+\centery});     \coordinate (B') at ({\lrxr+\centerx},{\lryr+\centery});     \coordinate (C') at ({\urxr+\centerx},{\uryr+\centery});     \coordinate (D') at ({\ulxr+\centerx},{\ulyr+\centery});               \filldraw [black] (A') circle (2pt)                 (B') circle (2pt)                 (C') circle (2pt)                 (D') circle (2pt);          \draw (A')--(B')--(C')--(D')--(A');          \pgfmathparse{sqrt( (\sidePerc*\sidePerc+0.25)*\side*\side )}\let\pveclen\pgfmathresult     \pgfmathparse{asin(\sidePerc*\side/\pveclen)}\let\angle\pgfmathresult     \pgfmathparse{neg(\pveclen*sin(\angle))}\let\cblx\pgfmathresult     \pgfmathparse{neg(\pveclen*cos(\angle))}\let\cbly\pgfmathresult     \pgfmathparse{neg(\cblx)}\let\cbrx\pgfmathresult     \pgfmathparse{\cbly}\let\cbry\pgfmathresult     \pgfmathparse{neg(\cbry)}\let\crbx\pgfmathresult     \pgfmathparse{neg(\cbrx)}\let\crby\pgfmathresult     \pgfmathparse{\crbx}\let\crtx\pgfmathresult     \pgfmathparse{neg(\crby)}\let\crty\pgfmathresult     \pgfmathparse{\crty}\let\ctrx\pgfmathresult     \pgfmathparse{\crtx}\let\ctry\pgfmathresult     \pgfmathparse{neg(\ctrx)}\let\ctlx\pgfmathresult     \pgfmathparse{\ctry}\let\ctly\pgfmathresult     \pgfmathparse{neg(\crtx)}\let\cltx\pgfmathresult     \pgfmathparse{\crty}\let\clty\pgfmathresult     \pgfmathparse{neg(\crbx)}\let\clbx\pgfmathresult     \pgfmathparse{\crby)}\let\clby\pgfmathresult                    \pgfmathparse{\cblx*cos(\rot) - \cbly*sin(\rot)}\let\cblxr\pgfmathresult     \pgfmathparse{\cblx*sin(\rot) + \cbly*cos(\rot)}\let\cblyr\pgfmathresult     \pgfmathparse{\cbrx*cos(\rot) - \cbry*sin(\rot)}\let\cbrxr\pgfmathresult     \pgfmathparse{\cbrx*sin(\rot) + \cbry*cos(\rot)}\let\cbryr\pgfmathresult     \pgfmathparse{\clbx*cos(\rot) - \clby*sin(\rot)}\let\clbxr\pgfmathresult     \pgfmathparse{\clbx*sin(\rot) + \clby*cos(\rot)}\let\clbyr\pgfmathresult     \pgfmathparse{\cltx*cos(\rot) - \clty*sin(\rot)}\let\cltxr\pgfmathresult     \pgfmathparse{\cltx*sin(\rot) + \clty*cos(\rot)}\let\cltyr\pgfmathresult     \pgfmathparse{\ctrx*cos(\rot) - \ctry*sin(\rot)}\let\ctrxr\pgfmathresult     \pgfmathparse{\ctrx*sin(\rot) + \ctry*cos(\rot)}\let\ctryr\pgfmathresult     \pgfmathparse{\ctlx*cos(\rot) - \ctly*sin(\rot)}\let\ctlxr\pgfmathresult     \pgfmathparse{\ctlx*sin(\rot) + \ctly*cos(\rot)}\let\ctlyr\pgfmathresult     \pgfmathparse{\crtx*cos(\rot) - \crty*sin(\rot)}\let\crtxr\pgfmathresult     \pgfmathparse{\crtx*sin(\rot) + \crty*cos(\rot)}\let\crtyr\pgfmathresult     \pgfmathparse{\crbx*cos(\rot) - \crby*sin(\rot)}\let\crbxr\pgfmathresult     \pgfmathparse{\crbx*sin(\rot) + \crby*cos(\rot)}\let\crbyr\pgfmathresult               \coordinate (AC') at ({\cblxr+\centerx},{\cblyr+\centery});     \coordinate (BC') at ({\cbrxr+\centerx},{\cbryr+\centery});     \coordinate (CC') at ({\crbxr+\centerx},{\crbyr+\centery});     \coordinate (DC') at ({\crtxr+\centerx},{\crtyr+\centery});     \coordinate (EC') at ({\ctrxr+\centerx},{\ctryr+\centery});     \coordinate (FC') at ({\ctlxr+\centerx},{\ctlyr+\centery});     \coordinate (GC') at ({\cltxr+\centerx},{\cltyr+\centery});     \coordinate (HC') at ({\clbxr+\centerx},{\clbyr+\centery});          \filldraw [black] (AC') circle (2pt)                 (BC') circle (2pt)                 (CC') circle (2pt)                 (DC') circle (2pt)                 (EC') circle (2pt)                 (FC') circle (2pt)                 (GC') circle (2pt)                 (HC') circle (2pt);          \draw [shorten >=-2cm, >=stealth](AC')--(0,0);     \draw [shorten >=-2cm](BC')--(0,0);     \draw [shorten >=-2cm](GC')--(0,0);     \draw [shorten >=-2cm](HC')--(0,0);          \draw [-] (-3,-1) -- (3,-1);          \node[draw] at (2,-1.2) {Focal Plane};          \coordinate (P1) at (-3,-1);     \coordinate (P2) at (3,-1);     \clip (P1) -- (P2);          \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/9I2lF.png) now i want to find the intersection of rays from the points "inside" the circumference of the rectangle and that go through the origin, with the focal plane. What i have done is to create lines from the points to the orign and then shortened them so that they intersect the focal plane. How do i chop the shortened lines after the intersection? Also it's my first tikz figure so please keep the guns down :P


title: Mimic Beamer Font in Article Mode

text: I have a `tikz` drawing that I made within the `beamer` document class. I would like to know how to produce this drawing within the `article` document class, but preserve the sans-serif font and font size used in the default `beamer` theme. Here is the `LaTeX` code using the `beamer` document class:               \documentclass[notes=show,beamer,usenames,dvipsnames]{beamer}     \usepackage{tikz}          \setbeamertemplate{navigation symbols}{}          \setbeamersize{text margin left=1em,text margin right=1em}          \begin{document}          \begin{frame}          \begin{tikzpicture}[yscale=3.5,xscale=4.5]          \draw[->] (0,0) -- (2,0) node[below, text width=2cm] {Before Tax Income $z$};     \draw[->] (0,0) -- (0,2) node[below left, text width=1.8cm] {After Tax Income $z - T(z)$};          \begin{scope}     \clip (0,0) rectangle (1,2);     \draw (0,0) -- (1.5,1.5);     \end{scope}          \begin{scope}     \clip (1,0) rectangle (2,2);     \draw (0,0) -- (1.5,1.5);     \end{scope}          \draw[rotate around={45:(1,1)},red] (.6,1.1) node[left] {$L$} parabola bend (1,1) (1.4,1.1);          \draw[shift={(.125,.125)},rotate around={45:(1,1)},cyan] (.6,1.1) node[left] {$M$} parabola bend (1,1) (1.4,1.1);          \draw[shift={(.25,.25)},rotate around={45:(1,1)},ForestGreen] (.6,1.1) parabola bend (1,1) (1.4,1.1) node[right] {$H$};          \draw[dashed] (1,0) node[below] {\textcolor{red}{$z^{*}$}} -- (1,2);          \draw[dashed] (1.25,0) node[below] {\textcolor{ForestGreen}{$z^{*}+\triangle z^{*}$}} -- (1.25,2);          \path (.15,.1) node[right] {slope = $1-t$};          \end{tikzpicture}          \end{frame}          \end{document}      And here is the drawing within the `article` document class:               \documentclass{article}     \usepackage[usenames,dvipsnames]{xcolor}     \usepackage{tikz}               \begin{document}          \begin{tikzpicture}[yscale=3.5,xscale=4.5]          \draw[->] (0,0) -- (2,0) node[below, text width=2cm] {Before Tax Income $z$};     \draw[->] (0,0) -- (0,2) node[below left, text width=1.8cm] {After Tax Income $z - T(z)$};          \begin{scope}     \clip (0,0) rectangle (1,2);     \draw (0,0) -- (1.5,1.5);     \end{scope}          \begin{scope}     \clip (1,0) rectangle (2,2);     \draw (0,0) -- (1.5,1.5);     \end{scope}          \draw[rotate around={45:(1,1)},red] (.6,1.1) node[left] {$L$} parabola bend (1,1) (1.4,1.1);          \draw[shift={(.125,.125)},rotate around={45:(1,1)},cyan] (.6,1.1) node[left] {$M$} parabola bend (1,1) (1.4,1.1);          \draw[shift={(.25,.25)},rotate around={45:(1,1)},ForestGreen] (.6,1.1) parabola bend (1,1) (1.4,1.1) node[right] {$H$};          \draw[dashed] (1,0) node[below] {\textcolor{red}{$z^{*}$}} -- (1,2);          \draw[dashed] (1.25,0) node[below] {\textcolor{ForestGreen}{$z^{*}+\triangle z^{*}$}} -- (1.25,2);          \path (.15,.1) node[right] {slope = $1-t$};          \end{tikzpicture}          \end{document}      I would like the latter to use the same font and font size as the former, including within math mode.


title: How to throw an error and abort the compilation for the following scenario?

text: ## Objectives: I want to throw exceptions (or error messages) when the following illegal code is invoked.               \const[c,any]{temp}{\f[\i]}     \const[others]{temp}{\f[\i]}      ## Minimal Working Example: I cannot minimize the code because minimizing it might be no longer applicable to the real scenario.               \documentclass{beamer}     \usepackage{multido}     \usepackage{pstricks}     \usepackage[nomessages]{fp}          \def\filter#1,#2#3\relax#4{%         \if t#1             trunc(#4:#2)%         \else   \if r#1              round(#4:#2)%         \else   \if c#1             clip(#4)%         \else             \ERRORHERE         \fi\fi\fi}          % \pstVerb concatenator     \def\LoadConstants{}          % Constant declarator invoked in the preamble     \newcommand\const[3][]{%         \if\relax\detokenize{#1}\relax             \edef\temporary{#3}%         \else             \edef\temporary{\filter#1,any\relax{#3}}%         \fi         \expandafter\FPeval\csname#2\expandafter\endcsname             \expandafter{\expandafter{\temporary}}%         \toks0=\expandafter{\LoadConstants\pstVerb}         \edef\LoadConstants{\the\toks0 {/#2 \csname#2\endcsname\space def}}}          \makeatletter     \def\pst@@picture@i[#1]#2(#3,#4){%     % BEGIN - redefine \const for invocation inside pspicture         \renewcommand\const[3][]{%         \if\relax\detokenize{##1}\relax             \edef\temporary{##3}%         \else             \edef\temporary{\filter##1,any\relax{##3}}%         \fi         \expandafter\FPeval\csname##2\expandafter\endcsname             \expandafter{\expandafter{\temporary}}%             \pstVerb{/##2 \csname##2\endcsname\space def}\ignorespaces}%     % END - redefine \const for invocation inside pspicture         \@ifnextchar(% ignore anything between [] and ()     % BEGIN - inject \LoadConstants into pspicture         {\pst@@@picture[#1](#3,#4)\LoadConstants}%         {\pst@@@picture[#1](0,0)(#3,#4)\LoadConstants}%     % END - inject \LoadConstants into pspicture         }     \makeatother          \usepackage[active,tightpage]{preview}     \PreviewEnvironment{pspicture}     \PreviewBorder=25pt\relax               \SpecialCoor     \const{Side}{root(2,17)}% the square root of 17     \def\f[#1]{cos(#1*pi/180)}          \begin{document}     \begin{frame}        \begin{pspicture}(\Side,\Side)         \psframe(!Side dup)\pause         \multido{\i=0+30}{12}{%             \const{temp}{\f[\i]}% legal             \const[r,3]{temp}{\f[\i]}% legal             \const[t,3]{temp}{\f[\i]}% legal             \const[c]{temp}{\f[\i]}% legal             %\const[c,any]{temp}{\f[\i]} must throw an error and terminate the compilation.             %\const[others]{temp}{\f[\i]} must throw an error and terminate the compilation.             \rput{\i}(!Side 2 div dup dup \i\space PtoC 3 1 roll add 3 1 roll add){$\temp$}\pause         }     \end{pspicture}     \end{frame}     \end{document}      ## NOTE: For this problem please give me fish rather than comments how to catch fish because it will become useless, confusing, etc.


title: How to draw a joining line between two picture tikz-pgf

text: I'am having draw two tree using the tikz-pgf package                \begin{frame}           \begin{columns}[c]           \begin{column}{2cm}         \begin{tikzpicture}[scale=0.5]          \tikzstyle{level 1}=[sibling distance=10mm]          \node{f}          child{node{a}}         child{node{f} child{node{b}} child{[red] node{f }   child{node{a}} child{node{f} child{node{b}}child{node{b}}}      }}         ;         \end{tikzpicture}     \end{column}         \begin{column}{2cm}        \begin{tikzpicture}[scale=0.5]         \tikzstyle{level 1}=[sibling distance=10mm]         \node{f}          child{node{a}}         child{node{f} child{node{b}} child{ node{f }   child{node{a}} child{node{g} child[missing] child{node{a}}}      }}         ;        \end{tikzpicture}      \end{column}      \end{columns}     \end{frame}      The result is : ![enter image description here](http://i.stack.imgur.com/chy6e.png) Now i want to connect these two images by a curve line like this ![enter image description here](http://i.stack.imgur.com/HzItQ.png) i don't know how i will do it , any answer will be appreciates


title: How to change hyperlink target of frame titles in Beamer?

text: The default behaviour is that clicking on frame titles takes you to the next slide. I would like to change that behaviour but I can't seem to workout how it is achieved when reading the Beamer source code. How do you change the hyperlink target of frame titles in Beamer? **Edit** I was hardcoding hyperlinks into the titles as follows:               \documentclass{beamer}          \begin{document}          \begin{frame}     \frametitle{\href{http://www.yahoo.com}{Yahoo}}     Blah     \end{frame}          \begin{frame}{\href{http://www.google.com}{Google}}     Blah     \end{frame}          \begin{frame}{\href{http://www.bing.com}{Bing}}     Blah     \end{frame}          \end{document}      And it wasn't working. I thought my hyperlink behaviour was somehow being overwritten by Beamer but it turns out that it was just the PDF viewer misbehaving.


title: How to force lower case in the title?

text: I need to force some letters to be lower case in the title because it is part of a mathematician's name (deRham). How can I do that?


title: LaTeX (beamer) — Is there a way to suppress the caption label of “Figure X:” or “Table X:”?

text: I am making a beamer presentation of someone else's research paper (so I don't have the original tex code). I am using pdfs of tables in the presentation but wanted to cut out all of the original captions, which can be a bit wordy for a slideshow, and simply label them with either "Table X" or "Figure X" along with the title. So I'd like to suppress automatically inserted caption label (otherwise it would say "Figure: Table I", and so on). If I put the title/label without the `\caption{}` function, then I have to fight with word wrapping.


title: Reference Lemma from the same document

text: I am writing a document, where I have 3-4 Theorems, and a Lemma. I want to refer to the Lemma in the Theorems (possibly highlighted and a link to the Lemma). How should I go about doing it? I tried inserting a `\label{lma1}` in the Lemma, and then using `~\cref{lma1}`, but this refers to the Lemma as "Theorem 2.5" (the numbering is right, but I want it to display "Lemma 2.5". How do I change this?


title: Wrong numeration using \newtheorem

text: by using the `\newtheorem`, the latex does not number the theorems in the right order. used code is               \newtheorem{theo.a}{Proposition}     \begin{theo.a}     this is the proposition.     \end{theo.a}      changing into               \newtheorem{theo.a}{Proposition}[2]     \begin{theo.a}     this is the proposition.     \end{theo.a}      leads to a wrong output as well (Proposition 1 is replaced by Proposition .1) ![output](http://i.stack.imgur.com/LFKbc.png)


title: Use algorithmic in LyX

text: I'm used to using the `algorithmic` package in LaTeX, but don't see an easy way to use it in LyX. I even tried this, but it didn't work. Further, it required me to change my document type, which is a problem for me, as I am writing my thesis and require a specific document type. How may I go about using the `algorithmic` package in LyX? Technical specs:   * Mac OS X 10.7.5 (Lion)   * LyX 2.0.6


title: Two stacked elements after a }

text: I'd like to express a set of vectors by {a_n} followed by a little column with two elements, the size of the set and n=1, as they usually are in some books. How can I create that column? I've tried with \stackrel{N}{n=1}, but it looks very big. Is there any other way?


title: Vectorization operator

text: How can I represent the vectorization of a matrix A (i.e, vec(A))? I am talking about this simple operator: ![enter image description here](http://i.stack.imgur.com/aHY1G.png)


title: Aligning columns in beamer with a list

text: I often run into a problem with `beamer`. I have a picture on the left and an `itemize` environment on the right. However the itemized text appears at the very bottom and is often cut off. I then need to do some massive `\vspace{-x pt}` to align it. Is there a better way? Here's an example:               \begin{columns}     \includegraphics[scale=0.08]{2ENQ-A.png}     \column{0.65\textwidth}     \begin{itemize}             \vspace{-130pt}         \item<1-> 345, 453 and 420 are all associated with cancer and increased lipid activity.         \item<1-> E453Q may disrupt interaction with p85 regulatory subunit.         \item<1-> N345K and C420R associated with oncogenic gain of function. Constitutively activate AKT and TOR-mediated signaling.          \end{itemize}


title: Problem with hyperref and tabular (not table)

text: The link to the target inside a tabular is too low. This is not inside a float, so hypcap and \hypcapspace have no effect. Is this a known problem?               \documentclass{article}     \usepackage{hyperref}     \hypersetup{pdftoolbar=true,pdfpagemode=UseNone,pdfstartview={FitH},colorlinks=true}          \begin{document}          \hypertarget{test1}{normal anchor}          \hyperlink{test1}{link}          \begin{tabular}{c}     \hypertarget{test2}{tabular}     \end{tabular}          \hyperlink{test2}{link}     \end{document}


title: How to get the nodes on which a line intersects the hypothetical frame box of \ncput?

text: I want to get the nodes on which the `\*cline` intersects the hypothetical edge of `\ncput`. The following animation shows my attempt to find the nodes by a trial & error approach. I need the nodes because I want to have a transparent background in PNG format in which `\ncput*` fails to do so. ![enter image description here](http://i.stack.imgur.com/xmMlS.gif)               \documentclass[pstricks,border=12pt,multi]{standalone}     \usepackage{pst-eucl,multido}          \begin{document}     \multido{\n=0.1+0.1}{10}{%     \begin{pspicture}[showgrid=false](2,2)         \pstGeonode             [                 PosAngle={135,-45},                 PointName={default,default,none},                 PointSymbol={none}             ]             (0,1){A}             (2,0){B}             ([offset=15pt]{B}A){A'}             ([offset=-15pt]{A}B){B'}             ([nodesep=\n]{B'}A'){A''}             ([nodesep=\n]{A'}B'){B''}         %         \psline(A)(B)         %         \bgroup             \psset{linestyle=dashed,dash=1pt 1pt,linecolor=red,linewidth=0.5\pslinewidth}             \psline(A)(A')             \psline(B)(B')         \egroup         %         \pcline{|<*-}(A')(A'')         \pcline{->|*}(B'')(B')         \ncline[linestyle=none]{A''}{B''}         \ncput[nrot=:0]{$\sqrt{5}$}     \end{pspicture}}     \end{document}


title: Wrapping text in \multicolumn

text: I would like to wrap (and center) text within `\multicolumn`. `Tabularx` and `tabilary` only wrap the text outside of the `\multicolumn{}` columns. I would also like to define the column width as defined by the non `\multicolumn{}` rows. Any ideas? Example:               % Unwrapped example     \begin{tabular}{l*{7}{c}}     Team              & P &\multicolumn{2}{c}{Points Collected bssss} & L & F  & \multicolumn{2}{c}{Points Collected blablabl} \\     \hline     Manchester United & 6 & 4 & 0 & 2 & 10 & 5 & 12  \\     Celtic            & 6 & 3 & 0 & 3 &  8 & 9 &  9  \\     Benfica           & 6 & 2 & 1 & 3 &  7 & 8 &  7  \\     FC Copenhagen     & 6 & 2 & 1 & 3 &  5 & 8 &  7  \\     \end{tabular}


title: how to \cite without an entry in the bibliography?

text: Even though it may sound weird: is it possible to have a `\cite{key}`-command that cites a bibliographic item **without** including that item in the bibliography? As it were, I am looking for the opposite of `\nocite{key}`. I thought about creating my own `\newcommand`, but this would require to use commands like `\citeauthor{key}` and `\citetitle{key}` within this `\newcommand` with the result that the item would appear in the bibliography... I would like to have the following: A source document saying something like this:               \documentclass{scrbook}     \usepackage{biblatex}     \addbibresource{my_bib.bib}     \begin{document}     Let me reference one work: \nobibcite{key-1}. And another: \cite{key-2}.     \printbibliography     \end{document}      With a bibliography in the PDF file that lists **only** the item `key-2` (which was cited by `\cite`) and **not** the item `key-1` (which was cited by the command I am looking for). Nevertheless, the bibliographical information of both items appear in the full text. The PDF should look like this: > Let me reference one work: Author. _Title. One._ Publisher, 2013. And > another: Author. _Title. Two._ Publisher, 2013. > > **Bibliography** > > Author. _Title. Two._ Publisher, 2013. So how should I design the command `\nobibcite{key}`, or is there already a similar command that comes with `biblatex` or another package?


title: \hrule with indents in Plain TeX

text: I am trying to learn the 'metal' of TeX after 20 years of using higher level packages, such as LaTeX. In my test document I have an indented block representing simple recipes. I've created this with two macros, for the beginning and end of a recipe:               \def\beginrecipe{       \par       \begingroup       \leftskip=\baselineskip       \multiply\leftskip by 2       \rightskip=\leftskip       \parindent=-\baselineskip       \parfillskip=0pt plus 1fil       \reciperule     }     \def\endrecipe{       \par       \reciperule       \endgroup     }      I want the recipe blocks to have horizontal rules at the top and bottom, so I've defined my `\reciperule` command to be:               \def\reciperule{       \vskip0.5em\hrule\vskip0.5em     }      In the document this is used something like:               \beginrecipe     {\bf Blonde roux}          2 tbsp of butter.          2 tbsp of flour.          Melt the butter in a pan and add the flour.          Cook the flour without browning for 2 minutes, stirring with a whisk.     \endrecipe      This works well, but the `\hrule` is too wide. It spans the width of the text- block, I want it to just fill the width of the recipe. So it should start `\baselineskip` in from the left, and extend to `\baselineskip` from the right. I've tried to do this with `\hskip\baselineskip` and using `\hrulefill` to fill the available space. The problem is `\hskip` reserves a line worth of height, which is far too much, I want the rule to be thin. Can I either indent an `\hrule` (I know I can set its width, so this would work), or can I get `\hskip`, `\hrulefill`, etc, to have a specified height? Or is there an easier way to do the whole thing (that doesn't use a package beyond Plain TeX)?


title: X mark to match checkmark

text: I am looking to have an X mark that compliments the `\checkmark` symbol in the `amsmath` package. I've had a look at some in symbols-a4.pdf but can't seem to find the matching one! What symbol works well?


title: Adding .jpg images to a specific template in LaTeX

text: I found this template online for a scientific style journal but I am unfamiliar with the packages and am having a lot of trouble adding .jpg images as figures.               \begin{figure}     \includegraphics{"Picture I want to add"}     \end{figure}      is giving me nothing. This is the template that I am working with: https://www.writelatex.com/381932qnwwkv


title: Using simple, MathJax-compatible TeX to put enclose a matrix in braces

text: I was trying to explain the identity matrix over at Math StackExchange and I wound up using the following.               $${\bf I_n} = \underbrace{                     \left.\left(                            \begin{array}{ccccc}                                  1&0&0&\cdots &0\\                                  0&1&0&\cdots &0\\                                  0&0&1&\cdots &0\\                                  \vdots&&&\ddots&\\                                  0&0&0&\cdots &1                           \end{array}                     \right)\right\}                   }_{n\text{ columns}}                    \,n\text{ rows}     $$      It came out alright, but not quite what I wanted: ![Identity Matrix](http://i.stack.imgur.com/LJdGA.png) I'd like to be able to move the ends of the underbrace inside the parenthesis without having it turn into this: ![Identity Matrix 2](http://i.stack.imgur.com/fDRuA.png) Now, I see there are a couple of similar questions on here (examples: 1 2) which deal with the same issue. However, all of them use a bunch of fancy stuff which I can't use in online forum TeX. > Is there a way to enclose a matrix in braces using only commands available > in MathJax? I am not sure exactly which commands these are, but I am guessing a good rule of thumb would be the simplest commands possible.


title: Drawing system architecture in Latex

text: I want to draw a system architecture as in the picture below ![enter image description here](http://i.stack.imgur.com/NTwAt.png) Can you help me?


title: Please explain a strange interaction between bytefield, unicode-math, and mathtools

text: `bytefield` gives me different results when used in association with `mathtools` and `unicode-math` _when used together_. Here's my 'good' MWE:               % !TEX TS-program = XeLaTeX     \documentclass[a4paper]{article}     %\usepackage{mathtools}    % This breaks things     %\usepackage{unicode-math} % when used with this     \usepackage{bytefield}     \begin{document}     \begin{bytefield}{16}       \bitheader{0,15}\\       \begin{rightwordgroup}{Header}           \bitbox{16}{Without}\\       \bitbox{16}{Etc}       \end{rightwordgroup}\\     \end{bytefield}     \end{document}      If I run this as-is, I get: ![Good result](http://i.stack.imgur.com/fNIfG.png) Now, if I uncomment _both_ the lines marked, the alignment of the brace goes wonky: ![enter image description here](http://i.stack.imgur.com/0c6jd.png) Either `unicode-math` or `mathtools` _alone_ doesn't produce this effect. Any ideas, please? * * * As noted by @Qrrbrbirlbel, you can get exactly the same behaviour by swapping `amsmath` for `mathtools`.


title: Problems with bottom margin and alignment of text

text: **1.)** The space between the page number and the text margin is too small and I'd like to adjust it. Somebody recommended, the geometry package, e.g.               \usepackage[     top    = 2.75cm,     bottom = 5.50cm,     left   = 3.00cm,     right  = 2.50cm]{geometry}      but this didn't work. **2.)** The left and right margin seem to be incorrect. The left margin is a little bit longer than the right one. How do I fix without doing it manually? I am a tad puzzled that this doesn't work automatically. Here's the original code I use for my work with a small made up example to see the alignment and the bottom margin:               \documentclass[11pt, psamsfonts]{amsart}     %\documentclass[a4paper,11pt]{article}     \usepackage[english]{babel}     \usepackage{graphicx}     %\usepackage{subcaption}     %\usepackage{caption}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amsthm}     \usepackage{ulem}     \usepackage{multirow}     \usepackage{eurosym}     \usepackage{pgfgantt}     \renewcommand{\baselinestretch}{1.50}     \theoremstyle{definition}     \newtheorem{defi1}{Definition}[section]     \theoremstyle{plain}     \newtheorem{thm}{Theorem}[section]     \newtheorem{lem}{Lemma}[section]     \newtheorem{cond}{Condition}[section]     \pagestyle{plain}               \textheight=230mm     \topmargin=3mm     \oddsidemargin=4mm     \evensidemargin=4mm     \textwidth=160mm     \parindent=0cm     \parskip=3mm          \begin{document}     The book centers on a boy, Bastian Balthazar Bux, who is neglected by      his father (who has sunken into despair after his wife's death) and is      bullied by his schoolmates. Whilst running from some of them, Bastian      bursts into the antique book store of Carl Conrad Coreander. Bastian      steals a book from the store called The Neverending Story which      Coreander has been reading; he hides in his school's attic, where he      proceeds to read the story through the rest of the day and the night,      not realizing that he has effectively become a part of it. After a while     of reading he is magically transfixed and is brought into the book.\\[15cm]          Bastian comes to Fantastica and meets the empress; she asks      him to help re-build Fantastica with his imagination, and he subsequently      has many adventures of his own in his new world. With the help of      AURYN, a medallion that links him to the empress, that grants all of the      boy's wishes and, thus, gives him power over all the inhabitants of      Fantastica, Bastian explores the Desert of Colors, battles the evil witch      Xayide, and meets the three deep thinkers. In the Desert of Colors,      he is told that the inscription of The Gem ("Do what thou wilt[1]")      means it is his job to find out his own True Will ("and nothing is      more difficult"); certainly not wishing whatever comes to his mind, even      though The Gem does fulfil these wishes.     \end{document}


title: Creating a list of abbreviations with KOMA-Script

text: I could not find the commands for creating a list of abbreviations with KOMA- Script. Could someone please tell it to me? Also could someone please tell me if the abbreviations list has to be at the beginning or at the end of the document? Thank you. EDIT: I tried the following:               \documentclass[a4paper,11pt]{scrreprt}     \usepackage[komastyle,automark]{scrpage2}     \usepackage{ngerman}     \usepackage[utf8]{inputenc}           \usepackage[acronym]{glossaries}     \makeglossaries          %%% Abkuerzungen     \newacronym{hvs}{hvs}{human visual system}          \begin{document}          \tableofcontents%     \newpage     \pagestyle{headings}%     \pagenumbering{arabic}%     \setcounter{page}{1}     \parskip1.5ex           \addcontentsline{toc}{chapter}{Abkürzungen}          %Text     Denn der menschliche Wahrnehmungsapparat, auch \gls{hvs} genannt, nimmt höherfrequente Bildinhalte schlechter wahr als niederfrequente.          \printglossary[title=Abk\"urzungen]     \end{document}      But I don't get the glossary to be shown at the end. What is wrong??? I used the perl script makeglossaries on command line.


What is the nodename.number in the following example? For example a.345? Changing number arbitrarily rotates the arrows. How to decide on the numbers so that it remains parallel ?               \begin{figure}[!htb]      \begin{center}       \begin{tikzpicture}[node distance=1.5cm, auto, >=stealth]        % nodes     \node[block] (a){\textbf{START} };     \node[block] (b)[right of= a, node distance =6cm]{\textbf{END}};             % edges               \draw[-open triangle 45] (a.345) -- node[rotate=0,above, yshift=1cm] {a-B} (b.195);     \draw[open triangle 45-] (a.15) -- node[rotate=0,below, yshift=-0.5cm] {B-A} (b.165);                 \end{tikzpicture}       \caption{Diagram }       \label{flowchart}      \end{center}     \end{figure}      ![enter image description here](http://i.stack.imgur.com/uK2DZ.png)


title: Rotate a path around a point

text: I have a named path (a triangle). How do I rotate it around point A in various angles without recalculating points B & C? Here's my code. I want to create the red and green triangles by simply rotating the black triangle in multiples of 60 degrees.               \documentclass{minimal}     \usepackage{tikz}     \usetikzlibrary{calc}          \begin{document}     \begin{tikzpicture}         \providecommand* \angle {30}         \coordinate[label=above left:A](A) at (2,3);         \coordinate[label=below:B](B) at (0,0);         \coordinate[label=below:C](C) at (6,0);         \draw             (A) -- (B) -- (C) -- cycle;              \coordinate[label=B'](B') at ($(A)!1!60:(B)$);         \coordinate[label=C'](C') at ($(A)!1!60:(C)$);         \draw[dashed,red]             (A) -- (B') -- (C') -- cycle;              \coordinate[label=B''](B'') at ($(A)!1!60:(B')$);         \coordinate[label=C''](C'') at ($(A)!1!60:(C')$);         \draw[dashed,green]             (A) -- (B'') -- (C'') -- cycle;     \end{tikzpicture}     \end{document}      ![Rotate triangle](http://i.stack.imgur.com/iTq3z.png)


title: lost symbols with unicode-math

text: I am trying to typeset my text and math latin/greek in Georgia, and digits (math mode) in Neo Euler. I am using XeLaTeX with `unicode-math`. MWE below loses ldots, also the star and minus operators, and instead of {,} I get Euler's f and g. Also, no mathbf. Any pointers?               \documentclass{article}     \usepackage{fontspec}     \usepackage[vargreek-shape=unicode]{unicode-math}          \setmainfont{Georgia}     \setmathfont[range=\mathit/{latin,Latin,greek,Greek}]{Georgia-Italic}     \setmathfont[range=\mathup/{num}, bold-style=TeX]{Neo Euler}          \begin{document}             Answer: $(1+00)^*=\{1, \mathbf{00}, 001, 100, 10000, \ldots \}$\\         and $b^2= 22 \times 22$, whereas $\alpha-\epsilon=90^\circ$.     \end{document}      ![Example results in loss of symbols](http://i.stack.imgur.com/5P0Mf.png) MikTeX 2.9, fontspec 2013/02/25 v2.3, unicode-math 2013/05/04 v0.7e.


title: description begins on a new line without indent

text: I am using this method to write description in a new line in `beamer`, ![enter image description here](http://i.stack.imgur.com/hk1Kc.png) But how can I remove the indent at the new line so it aligns with the `\item[]`? This is what I have right now.               \pdfminorversion=4     \documentclass{beamer}     \usetheme{Madrid}     \usepackage{appendixnumberbeamer}     \usepackage{textpos}     \usepackage{animate}     \usepackage{siunitx}     \usepackage{caption}     \usepackage{subcaption}          \begin{document}          \begin{frame}{title}       \fontsize{8pt}{9}\selectfont       \begin{columns}         \centering         \column{.7\textwidth}         \vbox to .8\textheight{%         \begin{figure}           \centering           \begin{subfigure}[b]{.5\textwidth}             \centering             \includegraphics[width=\textwidth]{../Fig1}           \end{subfigure}%\hfill           \begin{subfigure}[b]{.5\textwidth}             \centering             \includegraphics[width=\textwidth]{../Fig2}           \end{subfigure}\\\vfill           \begin{subfigure}[b]{.5\textwidth}             \centering             \includegraphics[width=\textwidth]{../Fig3}           \end{subfigure}%\hfill           \begin{subfigure}[b]{.5\textwidth}             \centering             \includegraphics[width=\textwidth]{../Fig4}           \end{subfigure}%         \end{figure}         }%              \column{.3\textwidth}         Imperfection in Tx and Rx may cause IQ imbalance and other system error.\\         \begin{description}[leftmargin=0pt]         \item[Gain Imbalance] \hfill \\Amplitude is different for I and Q.         \item[Quadrature Error] \hfill \\Phase between I and Q is not \ang{90}.         \item[IQ Offset] \hfill \\I and Q are not centered at zero.         \item[Gain Compression] \hfill \\Distance $d$ between constellation points is power dependent.         \end{description}            \end{columns}     \end{frame}          \end{document}


title: Configure tex4ht for linked images

text: I have a document that is to be compiled in PDF (using `pdflatex`) and XHTML (using `tex4ht`). For the XHTML version, I wish to have the images linking to their source in a new window (`target="_blank"`). Now, this is perfectly possible by some fiddling with `\HCode`, but I prefer not having to write this _every time_ when I include a graphic in my TeX source. Is there a `\Configure` command I can use in my `tex4ht` config file, so that an a-tag is wrapped around the resulting img-tag automatically? Note: I noticed `\Configure{IMG}`, but I assume that's for generated images, + there is not clear "image source" variable I can use.


title: Are there consequences for using frames bigger than 128x96?

text: I was not sure about how to put this, but anyway, if I set `\geometry{paperwidth=140mm, paperheight=105mm}` instead of the default size for my beamer presentation, what could possibly happen when the presentation is projected? Will two presentations with the same content but different geometries look the same or will the audience notice any difference? Since the frame size is bigger, will the content look smaller? I know this is more than one question but it seems to me that they are all related.


title: What is the proper way to implement language options in a multilanguage package?

text: I'm writing a multilingual LaTeX2e package to be used with pdflatex containing several macro and environment definitions. The main language of the document-- a thesis--is English, Finnish or Swedish. One page of the document contains text in one secondary language, again English, Finnish or Swedish. My problem is in some ways similar to the one here. I have implemented the choice of the main language as an option of my package, which I then pass on to the `babel` package using `\PassOptionsToPackage`. I then process the package options with `english` as the default. However, specifying a language other than `english` globally as say `\documentclass[finnish]{article}` doesn't seem to pass on the chosen language to `babel` while `\usepackage[finnish]{mypackage}` does. This is evident from the caption in tables and figures, which are in English and not Finnish, as well as the title of the list of references, which is also in English in the first case. After digging around I found a solution to my problem (a more elegant one to using flags and then loading `babel` with the appropriate options) here. My question is why doesn't `\PassOptionsToPackage` pass on the option to `babel` when it is specified in `\documentclass`? The option isn't passed on when `finnish` is specified to both `\documentclass` and `\usepackage{mypackage}` either. Why? A minimum working package code for `mypackage.sty` is:               \NeedsTeXFormat{LaTeX2e}     \ProvidesPackage{mypackage}[2013/09/26 Version 0.01]          \DeclareOption{english}{%       \PassOptionsToPackage{english}{babel}     %  \AtEndOfClass{\main@language{english}}     }     \DeclareOption{finnish}{%       \PassOptionsToPackage{finnish}{babel}%     %  \AtEndOfClass{\main@language{finnish}}     }     \DeclareOption{swedish}{%       \PassOptionsToPackage{swedish}{babel}%       %\AtEndOfClass{\main@language{swedish}     }     \ExecuteOptions{english}% Default package options     \ProcessOptions \relax          \RequirePackage{babel}%     \RequirePackage[latin1]{inputenc}%     \RequirePackage[T1]{fontenc}%          \endinput      A not-so-minimal LaTeX file that shows the caption and reference list heading in the wrong language follows:               % This works when \AtEndOfClass{\main@language{...} is uncommented     % but not with \PassOptionsToPackage{finnish}{babel}.     \documentclass[finnish]{article}     \usepackage{mypackage}          % This works with \PassOptionsToPackage{finnish}{babel} uncommented.     % This causes an error with \AtEndOfClass{\main@language{     %\documentclass{article}     %\usepackage[finnish]{mypackage}          \begin{document}          \section{Johdanto}          Tämän tekstin lähteenä oleva tiedosto on opinnäytteen pohja...          \begin{table}[htb]     \caption{\label{taulukko1} Taulukon kirjaintyypin...}     \vspace{1em}     \centering     \begin{tabular}{|c|l|r|}     \hline \textbf{A} & 1 & $e^{j \omega t}$ \\ \hline     \end{tabular}     \end{table}          \subsection*{Lähdeluettelo}           Viite \cite{bcs} on esimerkki artikkelin esittämisestä lähdeluettelossa.          \begin{thebibliography}{99}          \bibitem{bcs} Bardeen,\ J., Cooper,\ L.\ N. ja Schrieffer,\ J.\ R.       Theory of Superconductivity. \textit{Physical Review,} 1957, vol.\       108, nro~5, s.\ 1175--1204.          \end{thebibliography}          \end{document}


title: Label text alignment in tkz-euclide

text: I'm having a bit of difficulty with the alignment of point labels in `tkz- euclide`. For (a simple) example:               \documentclass{article}     \usepackage{tkz-euclide}     \usetkzobj{all}     \begin{document}     \noindent     \begin{tikzpicture}     \tkzInit[ymin=0,ymax=2,xmin=0,xmax=5]     \tkzClip     \tkzDefPoint(1,1){a}     \tkzDefPoint(2,1){g}     \tkzDefPoint(3,1){k}     \tkzDefPoint(4,1){d}     \tkzDrawPoints(a,g,k,d)     \tkzDrawSegments(a,g g,k k,d)     \tkzLabelPoints[below=6pt](a,g,k,d)     \end{tikzpicture}\\     \end{document}      gives me this (the red lines, added afterwards, illustrate): ![Showing misaligned labels](http://i.stack.imgur.com/Sjfqi.png) Please suggest a way to fix this. I would much prefer something automatic, so I don't have to tune things like `[below=5.283pt]` by hand. **Note:** I have assumed this is `tkz-euclide`, but this _may_ be a `tikz` problem. Whatever -- I've tagged both. (And, of course, as usual, it turns out to be a problem between the keyboard and the chair.) * * * Building on Alain Matthes' answer, I've added these lines:               \tikzset{place above/.append style={anchor=base,yshift=6pt}}     \tikzset{place below/.append style={anchor=base,yshift=-12pt}}     ...     \tkzLabelPoints[place above](a,g,k,d)     \tkzLabelPoints[place below](a,g,k,d)      (of course, the numbers may vary -- I'll relativise it later). The result: ![Showing corrected alignment](http://i.stack.imgur.com/lr668.png) Great package!!!


title: Issue adding PDF pages with \includegraphics using a loop

text: The solution for including multiple pdf pages in your main document discussed at http://tex.stackexchange.com/a/125212/41856 works for me, however, the code listed there, and below, will not reference test.pdf as a figure in the main text as Figure (1) below, but by Figure (22), or however many pages are in test.pdf               \getpdfpages{test.pdf}     \foreach \x in {1,...,\value{pdfpages}} {     % your code for page \x of t.pdf goes here     \begin{table}[htpb]    \caption{Figure 1}  \label{fig:Figure 1}      \centering     \includegraphics[page=\x,width=1\textwidth]{test.pdf}      \end{table} }     \clearpage          (\ref{fig:Figure 1})      The prior `\ref` commands yields Figure (22), or however many pages are in test.pdf, in the main document when I would like it to be Figure (1). How can the above code be modified to increment each `\ref` in the document by 1 and not the number of pages in test.pdf? This is even more important when you are including more documents, example test1.pdf, test2.pdf, et cetera in the main text.


title: Underline text with background (soul and ulem nesting)

text: I'm using `soul`'s `\hl` to set background for the paragraph parts and `ulem`'s `\uline` to underline text. The problem is what I cant underline text for text with background. Initial doc:               \documentclass{article}     \usepackage[table]{xcolor}     \usepackage[normalem]{ulem}     \usepackage{soul}          \newcommand{\bg}[2]{\sethlcolor{#1}\hl{#2}}          \definecolor{ColorFg}{HTML}{FFFFFF}     \definecolor{ColorBg}{HTML}{008000}          \begin{document}          {\color{ColorFg}\bg{ColorBg}{Some Text}} another text.          \end{document}      ![initial doc](http://i.stack.imgur.com/MmmiA.png) I want to underline `Text`:               {\color{ColorFg}\bg{ColorBg}{Some \uline{Text}}} another text.      it fails with `! Argument of \UL@on has an extra }.` I tried to use `\soulregister{\uline}{1}` (solution from this topic) - no errors and no underlined tex. Is it possible to underline text with background color (maybe I have to use another packages)? PS `soul` docs provides solution for nested commands, but it's not useful for me since line breaks will not work. Thanks.


title: If \@percentchar represents %, is there a macro for #?

text: If `\@percentchar` represents `%`, is there a macro for `#`? I have tried `\@sharpchar` and `\@numberchar` but both do not exist. Do you have any idea what is the correct macro name for `#`?


title: Distortions caused by LaTeX?

text: First of all, here is a code to compile :               \documentclass[11pt,a4paper]{article}       \usepackage[latin1]{inputenc}     \usepackage{palatino} % for font     \usepackage{fancyhdr} % for header+footers     \usepackage{graphicx} % for plots/pictures     \usepackage{amssymb}     \usepackage{mathrsfs}     \usepackage{amsmath}     \usepackage[inner=3.5cm,outer=3cm,top=2cm,bottom=2.5cm,includeheadfoot]{geometry}          \pagestyle{fancy}           \lhead{Test Test Test}          \rhead{Fiche Archive}     \fancyfoot[C]{}      \fancyfoot[L]{\footnotesize{\copyright \hspace{0.1cm} Rien Rien Rien}}          \begin{document}           \begin{center}           { \Large {\bf Stage }}     \end{center}           \vspace{0.5cm}     \hrule     \vspace{0.15cm}     \noindent$\bullet$ {\sc Identité de l'étudiant, Dddddd}     \vspace{0.15cm}     \hrule     \vspace{0.4cm}          \noindent{\bf NOM :} Nom           \noindent{\bf Pr\'enom :}  Prénom          \noindent{\bf Filière :} ddqfqsf          \noindent{\bf Année Universitaire :} 2012-2013           \noindent{\bf Mail :} dfsdgsg          \vspace{0.5cm}          \end{document}      If you have a look at the resulting pdf file with Adobe Reader, you will probably see distortions in some letters the "T" and "D" but they may disappear while zooming. I've been told this is an error by Adobe Reader which doesn't round correctly some pixels and leads to that scale effect. But I would like to know if that is the only reason and if it could be avoided by setting parameters such as encoding type (latin, uft8), geometry or anything else ![enter image description here](http://i.stack.imgur.com/wMvWp.png)


title: using gnu make and xelatex

text: After switching to xelatex I had a look at my old makefiles. I want to reorganize them and have rules that relate any tex file to the pdf file. Also the files should not be compiled if not necessary (if references are up todate then do not run xelatex several times). What is the best/cleanest/most efficient way to do this? What I have is this:               SOURCE=danish.bib \         danish-include.tex \         danish-passive.tex \         danish-nld.tex \         Implemented-Grammars-common/hpsg-intro.tex \         danish-topologie.tex \         danish-constituent-order.tex \         danish-objectshift.tex \         danish-copula-constructions.tex\         predication-include.tex\         danish-extra.tex           #.SUFFIXES: .tex               %.pdf: %.tex $(SOURCE)         xelatex $* |grep -v math         bibtex $*         xelatex $* |grep -v math         bibtex $*         xelatex $* |egrep -v 'math|PDFDocEncod' |egrep 'Warning|label|aux'         correct-toappear         correct-index         makeindex -gs index.format -o $*.ind $*.idx         makeindex -gs index.format -o $*.lnd $*.ldx         \rm $*.adx         authorindex -i -p $*.aux > $*.adx         sed -e 's/}{/|hyperpage}{/g' $*.adx > $*.adx.hyp         makeindex -gs index.format -o $*.and $*.adx.hyp         xelatex $* | egrep -v 'math|PDFDocEncod' |egrep 'Warning|label|aux'


title: Using the doi package with hyperref pagebacklinks=true

text: As best I understand it, if I want to use both the doi package and the pagebackref=true setting for hyperref, I need to load hyperref first (since otherwise doi will load it, and pagebackref=true cannot subsequently be set by \hypersetup), something like this:               \usepackage[pagebackref=true]{hyperref}     \usepackage{doi}      However, when I do this, the doi package is no longer able to escape some characters, for example, the double underscore in "COLI_a_00057" in the minimal example that follows:               \documentclass{article}     % Remove the {hyperref} line below to get this to compile     \usepackage[pagebackref=true]{hyperref}     \usepackage{doi}     \begin{document}          \cite{fort:cl11}          \begin{thebibliography}{1}          \bibitem[{Fort et~al.(2011)Fort, Adda, and Cohen}]{fort:cl11}     Fort, Karën; Gilles Adda; and K.~Bretonnel Cohen (2011).     \newblock {Amazon Mechanical Turk}: Gold mine or coal mine?     \newblock \emph{Computational Linguistics}, 37(2):413--420.     \newblock \doi{10.1162/COLI_a_00057}.          \end{thebibliography}          \end{document}      If I include this line \usepackage[pagebackref=true]{hyperref} I get error output like this (with a working backlink to page 1):               ! Missing $ inserted.     <inserted text>                  $     l.15           ?      ! Double subscript.     <argument> \Hy@safe@activesfalse 10.1162/COLI_a_                                                 00057     l.15           ?      ! Missing $ inserted.     <inserted text>                  $     l.15       If I remove it, I get a working bibliography entry with DOI link to 10.1162/COLI_a_00057 but (obviously) no backlink. Can I use both doi and hyperref with pagebacklinks=true ?


title: How to control page number on multipage TOC?

text: I am working on page numbering on toc and need page number should start from TOC. In example given below, there are two pages for TOC followed by 2-blank pages. But i observe, page number on toc is 3. How can i make it to 1?               \documentclass{article}     \usepackage{etoolbox,graphicx}% http://ctan.org/pkg/{etoolbox,graphicx}     \usepackage{xcolor}     \usepackage{mdframed}     \usepackage{lipsum}     \definecolor{myblue}{RGB}{146,243,224}          \newcommand{\addstufftotoc}[2][toc]{% \addimagetotoc[<toc>]{<stuff>}     \addtocontents{#1}{#2}}          \makeatletter     \patchcmd{\l@section}% <cmd>     {\begingroup}% <search>     {\begingroup\normalfont\Large\bfseries}% <replace>     {}{}% <success><failure>     \newcommand\mdframedintoc{\par\bigskip%       \begin{mdframed}[hidealllines=true,backgroundcolor=myblue]     Some contents for the \texttt{mdframed} environment.     \end{mdframed}\par\bigskip     \begin{mdframed}% mdframed for the image     \centering     \includegraphics[height=2\baselineskip]{example-image-a}     \end{mdframed}%     }     \patchcmd{\tableofcontents}{\@starttoc{toc}}{\@starttoc{toc} \mdframedintoc}  {}{}     \makeatother          \begin{document}          \mbox{}     \thispagestyle{empty}     \newpage          \mbox{}     \thispagestyle{empty}     \newpage               \tableofcontents     \thispagestyle{empty}     \clearpage     \setcounter{page}{1}     \section{First section}     \addstufftotoc{\nobreak\smallskip\protect\includegraphics[height=2    \baselineskip]{example-image-a}\par}      \section{Second section}       \addstufftotoc{\nobreak\smallskip\protect\includegraphics[height=2 \baselineskip]{example-image-b}\par}      \section{Third section}      \section*{Fourth section}      \addcontentsline{toc}{section}{\protect\numberline{}Fourth section}      \section{Last section}      \addstufftotoc{\nobreak\smallskip\protect\includegraphics[height=2 \baselineskip]{example-image-c}\par}      \section{First section}      \addstufftotoc{\nobreak\smallskip\protect\includegraphics[height=2   \baselineskip]{example-image-a}\par}      \section{Second section}      \addstufftotoc{\nobreak\smallskip\protect\includegraphics[height=2    \baselineskip]{example-image-b}\par}      \section{Third section}      \section*{Fourth section}      \addcontentsline{toc}{section}{\protect\numberline{}Fourth section}      \section{Last section}      \addstufftotoc{\nobreak\smallskip\protect\includegraphics[height=2   \baselineskip]{example-image-c}\par}      \section{First section}       \addstufftotoc{\nobreak\smallskip\protect\includegraphics[height=2  \baselineskip]{example-image-a}\par}      \section{Second section}      \addstufftotoc{\nobreak\smallskip\protect\includegraphics[height=2 \baselineskip]{example-image-b}\par}      \section{Third section}      \section*{Fourth section}      \addcontentsline{toc}{section}{\protect\numberline{}Fourth section}      \section{Last section}      \addstufftotoc{\nobreak\smallskip\protect\includegraphics[height=2  \baselineskip]{example-image-c}\par}      \section{First section}      \addstufftotoc{\nobreak\smallskip\protect\includegraphics[height=2 \baselineskip]{example-image-a}\par}      \section{Second section}      \addstufftotoc{\nobreak\smallskip\protect\includegraphics[height=2  \baselineskip]  {example-image-b}\par}      \section{Third section}      \section*{Fourth section}      \addcontentsline{toc}{section}{\protect\numberline{}Fourth section}      \section{Last section}      \addstufftotoc{\nobreak\smallskip\protect\includegraphics[height=2 \baselineskip]{example-image-c}\par}       \section{First section}      \addstufftotoc{\nobreak\smallskip\protect\includegraphics[height=2   \baselineskip]{example-image-a}\par}      \section{Second section}      \addstufftotoc{\nobreak\smallskip\protect\includegraphics[height=2   \baselineskip]{example-image-b}\par}      \section{Third section}      \section*{Fourth section}      \end{document}      ![enter image description here](http://i.stack.imgur.com/mDUPC.png)


title: How to draw THICK arrows (shown below in the figure) in tikz?

text: I want to draw something like this: ![enter image description here](http://i.stack.imgur.com/sTEGv.jpg) I am not able to draw this. This is what I have drawn: ![enter image description here](http://i.stack.imgur.com/6Llvs.png) This is the code:               \documentclass[a4paper,10pt]{article}     %\documentclass[a4paper,10pt]{scrartcl}     \usepackage{tikz}     \usetikzlibrary{shapes}     \usetikzlibrary{positioning,arrows}     \usepackage[utf8x]{inputenc}     \usepackage{scalefnt}          \begin{document}               \begin{tikzpicture}[fill=blue,ultra thick, scale = 0.75, transform shape,font=\Large]               \node[rectangle] (a1) [draw, minimum width=1.5cm,minimum height=1cm] {};     \coordinate[right=0.75cm of a1] (a4)  {};     \node[rectangle] (a2) [draw, minimum width=1.5cm,minimum height=1cm,right of=a1,node distance=3cm] {};     \node[rectangle] (a3) [draw, minimum width=1.5cm,minimum height=1cm,below of=a4,node distance=3cm] {};          \node[rectangle] (a5) [draw, minimum width=1.5cm,minimum height=1cm,right of=a3,node distance=4cm] {};     \node[rectangle] (a6) [draw, minimum width=1.5cm,minimum height=1cm,above of=a5,node distance=1.25cm] {};          \node[rectangle] (a7) [draw, minimum width=1.5cm,minimum height=1cm,below right of=a5,node distance=3cm] {};                    \end{tikzpicture}          \end{document}      How to draw these kind of arrows?


title: How can I underline multiple parts of the same word using braces with TikZ?

text: UPDATE: I opened a related question here. I work in the field of linguistics and I sometimes need to analyze prefixes, affixes, and suffixes in words. It would be nice to be able to add notes to various parts of words using TikZ. So far, I can do almost what I would like. **The problem is that I cannot put multiple parts of a word into separate nodes without an awkward space in between (making it look like multiple words)** _e.g. taivaissa should be one word (I would like to underline taiva, the root word, and put an explanation underneath and underline the suffix -issa, and also have an explanation underneath_. **Criteria:**   * The solution should allow control over the distance from the bottom (or top depending on orientation) of the curly bracket (brace) to the description, in order to avoid potential overlapping when using long descriptions within the same word. (Ideally, the distance of the brace to word will also be variable as in the example below.)   * The solution does not need to include the dependency-tikz package, I just use it here because it is an easy way to clearly and literally translate individual words. It would be a plus, however! ![Example Slide](http://i.stack.imgur.com/DHNgC.png) **The Code:**               \documentclass[]{beamer}     \usepackage{fontspec}     \usepackage{tikz-dependency}     % Klammern in Formeln     \usepackage{tikz}     \usetikzlibrary{decorations.pathreplacing,calc}     \usepackage{xparse}     \NewDocumentCommand{\tikzbrace}{O{-2.5ex} m m O{} O{}}{%        \tikz[remember picture]\coordinate (left brace coord);%        #2%        \tikz[remember picture]\coordinate (right brace coord);%        \begin{tikzpicture}[remember picture,overlay,           transform canvas={yshift=#1}]           \draw [decoration={amplitude=1ex,brace},decorate,#4] %              (right brace coord) -- (left brace coord)              node [midway,below=1ex,font=\scriptsize,#5] {#3};        \end{tikzpicture}     }                    \begin{document}     \begin{frame}{Satz 1}     \begin{dependency}[edge style={red,densely dotted}]     \begin{deptext}     \tikzbrace[-1ex]{Isae}{Vater} \& meidän, \& joka \& \tikzbrace[-1ex]{olet}{2Psg} \& \tikzbrace[-5ex]{taiva}{-\emph{issa}=pl (sg -\emph{ssa}) Inessiv, ähnlich Lokativ, e.g. talossa "in dem Haus"}issa,\\     \end{deptext}       \deproot[edge unit distance=1ex]{1}{Vater}       \deproot[edge unit distance=1ex]{2}{unserer}       \deproot[edge unit distance=1ex]{3}{wer}     \end{dependency}     \end{frame}     \end{document}


title: standard latex font in lyx

text: By default, LyX sets font to be Times New Roman in the article class. When I print my document it looks different than most other latex documents which seem to be using a different font. What font/size is the standard for latex documents? The following packages in the preamble:               \usepackage{multirow}     \usepackage{rotating}     \usepackage{subfig}     \usepackage{longtable,lscape}     \usepackage[nolists,tablesfirst]{endfloat}     \usepackage{caption}      \captionsetup[table]{skip=20pt}     \usepackage{color, colortbl}     \usepackage[usenames,dvipsnames]{xcolor}     \setcitestyle{round}     \usepackage{bigstrut}     \usepackage{chngcntr}     \counterwithout{figure}{section}     \usepackage{etoolbox}% http://ctan.org/pkg/etoolbox     \patchcmd{\maketitle}{\let\footnoterule\relax}{}{}{}


title: Placing the floats in the current page or in the previous page

text: I would like the floats to appear, if possible in the top (or bottom) of the same page where they are defined, or in the bottom of the previous page otherwise (or wherever it fits as near as possible if it doesn't fit in the previous page). The problem is that LaTeX sends usually the figure to the top of the next page, instead of placing it in the top or bottom of the current page, in the next example I would prefer that LaTeX placed the figure in the first page, even if the place where it is defined is sent to the second page.               \documentclass{article}     \usepackage[a6paper]{geometry}     \usepackage{lipsum}     \begin{document}     First: \lipsum[1]     \begin{figure}[tb]     \begin{tabular}{l|l}     \hline     a & b \\ c & d \\ e & f \\ g & h \\     \hline     \end{tabular}     \caption{some figure}     \end{figure}     Second: \lipsum[2]     \end{document}      What I am looking for is somewhat for the opposite of the package `flafter`: make figures appear either in the current page or before. Is there a way to enforce this behaviour?


title: How can I indent the second line of a linguistic gloss with gb4e.sty?

text: In accordance with the documentation, I've been happily plodding along making interlinear glosses. So far so good! But things get ugly when I make a longer gloss. Looking at example (5) on page (6) in the documentation here: http://ftp.snt.utwente.nl/pub/software/tex/macros/latex/contrib/gb4e/gb4e-doc.pdf               \begin{exe}     \ex     \gll Wenn jemand in die W\"uste zieht ... \\     If someone in the desert draws and lives ... \\     \trans `if one retreats to the desert and ... '     \end{exe}      I wonder if there's a way to insert a line or indent between the long run-on lines to help make them easier to read and less like a block of text. Any ideas would be appreciated!