title: Space is not working in latex

text: I want to have the following output . ![enter image description here](http://i.stack.imgur.com/wTXLX.png) For this purpose , I have the following code .               \begin{align*}                         Maximize     \mathbf{z = x_1+2x_2+3x_3}                                        \end{align*}                          \begin{align*}                          Subject to  \mathbf{x_1 + \hspace{2cm}+2x_3 \leq 2  }\\                                         \mathbf{ \hspace{2cm}x_2+2x_3 \leq 2 } \\                                            \mathbf{x_1  \geq 0 , x_2 \geq 0 , x_3 \geq 0}                                    \end{align*}        For this code , I have the following output : ![enter image description here](http://i.stack.imgur.com/vNNyJ.png) I do not understand how to achieve my desired output . What have I to do ? Please help me .


title: How to use hfill and underbrace together

text: I'm basically trying to achieve what was answered in How to make nested table span all underlying cells but this time with an horizontal brace under 1 2 3. But as soon as I use `\underbrace`, 1 2 3 collaps. It seems like `\underbrace` is cancelling the effect of `\hfill`.


title: how to use incgraph to obtain a landscape cover?

text: I tried this               \documentclass[12pt,a4paper,x11names,landscape]{article}     \usepackage[top=2.5cm, left=3.5cm, bottom=2.5cm, right=2.5cm]{geometry}       \usepackage{incgraph,mwe}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[spanish]{babel}     \begin{document}     \incgraph[paper=document][width=\paperwidth,height=\paperheight]{example-image-a.eps}     jei     \end{document}      but the image is not as I want. Any parts are out, and an parts are in white, as you can see -edited after Werner´s comment ![enter image description here](http://i.stack.imgur.com/niTlQ.jpg) How to correct this?


title: Disregard environment indent for equation

text: I have a large equation in nested `itemize`-environments, which creates a lot of indention for the equation, such the equation is only placed on the right side of the page. It would look nicer if the equation was centered w.r.t. to the text area and disregard the base indention from the `itemize`-environments. Is it possible to somehow disable the indention for one equation? MWE:               \documentclass{memoir}     \begin{document}     \begin{itemize}       \item Item 1         \begin{itemize}           \item Item 1.1             \begin{itemize}               \item Item 1.1.1                 Text which should be indented                 % this equation should be positioned just as if it was not contained in any itemize-environment                 \[                    1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1                 \]                 Text which should be indented             \end{itemize}         \end{itemize}     \end{itemize}     \end{document}


title: LaTeX inserts blank page between figures

text: I am writing a relatively long text in LaTeX. At some points I need to include a bunch of large figers (2 figures per page, no text) using `\figure` and `\includegraphics`. In order to avoid pages with only one figure, I use `[H]` / `[P]` placement specifier. The problem is that LaTeX for some reason puts a blank page between the pages with figures. I end up with something like: text page - page with 2 figures - blank page - page with 2 figures.


title: How to draw a graph on a sphere using tikz

text: I'm trying to make some TiKz graphics for a project I am working on and I am a little stuck. What I am looking for is to be able to draw some planar graphs on a sphere's surface? Any help would be awesome


title: BibLaTex and citing same source several times in same paragraph

text: I have encountered a strange problem in a thesis, where I try to cite a book several times in the same paragraph, referring to different pages in the book. This results in the citations following the first is that only the page number is shown (as a simple number). Is there a (simple) way to force these citations to mimic the first? MWE:               \documentclass[a4 paper,12pt]{report}     \usepackage{graphicx}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{times}          \usepackage[english]{babel}          \usepackage[     authordate,     backend=biber,     natbib,     maxbibnames=99,     ]{biblatex-chicago}          \addbibresource{mybib.bib}          \usepackage{csquotes}          \begin{filecontents}{mybib.bib}     @BOOK{orton,       title = {Survey of English Dialects},       publisher = {Leeds: Arnold},       year = {1962},       author = {Orton, Harold},       volume = {IV},       date-added = {2014-04-20 12:50:04 +0000},       date-modified = {2014-04-24 18:41:22 +0000}     }     \end{filecontents}          \begin{document}          This is a quote \citep[117]{orton} .  And then the second quote by the same person which results in the strange behaviour  \citep[224]{orton}.          In the next paragraph the third quote compiles just like the second \citep[332]{orton}, and then a different kind of quote by Orton compiles like a dream \citeyearpar[340]{orton}. But the last one has the same problem as number two and three \citep[345]{orton}.          \printbibliography     \end{document}


title: Remove the period at the end of the subcaption using \subbottom with memoir

text: I am using the `memoir` package (with `hyperref` package in case that makes a difference) and I am using `\subbottom` to place subfigures within a figure environment. I simply want the subcaptions to read (a) and (b), which is automatically handled, so I have left the caption empty (as shown below). However, the final output when I compile my code has a period after the (a) such that my figures are labelled (a). and (b). Any ideas on how to remove the period?               \begin{figure}[bt]      \centering         \subbottom[]{\includegraphics[width=0.28\textwidth]{imagea}\label{fig:imagea}}         \hfill         \subbottom[]{\includegraphics[width=0.30\textwidth]{imageb}\label{fig:imageb}}\\         \caption{Images}         \label{fig:images}      \end{figure}


title: Make \section*{} compatible with the exam class

text: I'd like to redefine the `\section*{}` command so that the section title are aligned left. I actually can achieve it with `\fullwidth{\section*{my section title}}` but y would like to do something like:               \renewcommand\section*{\fullwidth{\section*{#1}}}      which of course does not work.


title: \pdfmarkupcomment works in MWE, but doesn't work in my thesis

text: I have no idea why, but `\pdfmarkupcomment` doesn't show anything in my document. I tried to create MWE and it highlights text perfectly. I guess some of the commands interfere with `pdfcomments`. Could someone help? Here is my MWE (main file):               \documentclass[a4paper, oneside, BCOR=10mm]{scrbook} % see docs!     \usepackage{pdfcomment}     \usepackage[ngerman, USenglish]{babel} % main language comes last!     \begin{document}     \pdfmarkupcomment[markup=Highlight, disable=false]{replication server}{what is this?}     \include{mwe2}     \end{document}      And include:               \chapter{Test}\label{chap:test}     \pdfmarkupcomment[markup=Highlight, disable=false]{replication server}{what is this?}


title: Natural numbers symbol causes an error

text: My latex code is `$(X_i)_{i \in \N}$` and I get this error:               ! Undefined control sequence. of $(X_i)_{i \in \N      Can anybody tell me why? I have included the `amssymb` package:               \usepackage{amssymb}


title: Heading number in margin using titlesec and/or komascript

text: Using `titlesec` and/or `komascript` how do I format all headings so the number is **left aligned** in the margin, the title to the right, with a horizontal rule underneath it all (from margin to text width edge). What's left of my hair is about to come out :(                _____________________________     |                             |     | 3.1  Section Title          |     | -------------------------   |     |      Text width paragraph   |     |      Blah blah blah blah    |     |                             |            >-<  >------------------<        |                |        `-- Margin       ` Text


title: Comma in front of & in the reference section

text: I'm handling with a problem concerning referencing and citing sources in APA- Style. Here is my example code:                 \documentclass[a4paper,         12pt,         bibtotoc,         liststotoc,         pointlessnumbers           ]{scrartcl}      \usepackage[utf8]{inputenc}      \usepackage[T1]{fontenc}      \usepackage{textcomp}                \usepackage[american,ngerman]{babel}           \usepackage[babel=true]{csquotes}      \usepackage[style=apa,backend=biber, doi=false, url=false]{biblatex}        \DeclareLanguageMapping{ngerman}{ngerman-apa}      \DefineBibliographyStrings{ngerman}{andothers={et\ \addabbrvspace al\adddot}}      \renewcommand\finalandcomma{\addcomma}           \usepackage{filecontents}      \begin{filecontents}{literatur.bib}      @article{DroitVolet2007,       author = {Droit-Volet, S. and Meck, W. H.},       year = {2007},       title = {{H}ow emotions colour our perception of time},       pages = {504--513},       volume = {11},       number = {12},       issn = {13646613},       journal = {Trends in Cognitive Sciences},       doi = {10.1016/j.tics.2007.09.008  Titel anhand dieser DOI in Citavi-Projekt übernehmen           }      @article{Gibbon1984,      author = {Gibbon, J. and Church, R. M. and Meck, W. H.},      year = {1984},      title = {{S}calar timing in memory},      pages = {52--77},      volume = {423},      issn = {0077-8923},      journal = {Annals of the New York Academy of Sciences}     }         }          \end{filecontents}          \bibliography{literatur}          \begin{document}              There is no comma in this citation \parencite{DroitVolet2007}, but the comma is missing in the references.      For more than two authors there has to be a comma in front of & \parencite{Gibbon1984}.                        \printbibliography          \end{document}       Latex misses a comma in front of & in the reference section, when there are only two authors. The intext-citation is totally fine for two authors, but the entry in the references should look like this: Droit-Volet, S., & Meck, W. H. (2007). .... For more than two authors there has to be a comma in front of & in in text- citations as well. While searching for a solution, I tried to fix it by using               \renewcommand*{\finalnamedelim}{%       \finalandcomma       \addspace       \bibstring{and}%       \space     }      or               \renewcommand\finalandcomma{\addcomma}       But unfortunately neither of these solution worked in my case ... Help or any advice would be highly appreciated. Best wishes, Ferdinand


title: Faulty output because of Polyglossia issue

text: this is my first question on here so I hope I'll include all necessary information right away.   I am running MiKTeX 2.9, set up for XeTeX; my Editor is TeXMaker and my OS is Windows 8, 64-bit. Yesterday (Feb 13, 2013) I ran an update through MiKTeX's update wizard, as a consequence the `miktex-runtime-bin-2.9` got updated which caused all sorts of trouble (mostly no package being detected anymore). I reinstalled MiKTeX except for the faulty, `miktex-runtime-bin-2.9`. All packages (at least all I use regularly) work fine, except for polyglossia. A code example:               \documentclass[paper=a4, numbers=noendperiod, listof=numberedtotoc]{scrreprt}     \pagestyle{headings}     \usepackage{xltxtra}     \usepackage{polyglossia}     \setdefaultlanguage{german}     \begin{document}     Test     \end{document}      An output is produced, but with the following error messages:               ! Missing number, treated as zero.     <to be read again>  \l@german      l.7 \select@language {german}     A number should have been here; I inserted `0'.          ! Missing number, treated as zero.     <to be read again>  \l@german      l.22 \begin{document}     A number should have been here; I inserted `0'.          Package polyglossia Warning: You asked for `ngerman' but only     `german' hyphenation is available! on input line 48.      As a result, the hyphenation does not work anymore, especially not in the references (not for the code I put in the example; that's just a short version to show which packages I use). Polyglossia was working fine before I updated `miktex-runtime-bin-2.9`, therefore I have no idea why these errors are issued, also because I properly set the default languages.   I consulted the Polyglossia documentary and also checked for a similar question, if it was asked somewhere else; however I could not find a working answer, especially because the issue is quite recent. I should also note, that the same code with the same versions of MiKTeX and Polyglossia is working without problems on my other computer. I hope this was not too long of a read. If you require more information, feel free to ask.


title: TikZ/figure environment: Placing footnote at end of figure

text: Another update. This code displays essentially what I need. The only question I have at this point is if there is a way to enter the text of my "footnote" so that each line doesn't have to be placed in a separate node.               \documentclass[10pt]{article}          %%%% Set margins %%%%          \setlength{\textwidth}{6.25in}     \setlength{\oddsidemargin}{0in}          %%%% Packages %%%%          \usepackage[labelfont={bf}, justification=justified, singlelinecheck=false, labelsep=space]{caption}     \usepackage{here}     \usepackage{tikz}     \usetikzlibrary{calc,shapes,shapes.geometric,positioning}     \usepackage{hyperref}          %%%% Set pdf zoom to 100% %%%%          \hypersetup{pdfstartview={XYZ null null 1.00}, pdfview={XYZ null null 1.00}}          %%%% TikZ graphics styles/commands %%%%          \tikzstyle{arr}=[-latex, black, line width=0.5pt]     \tikzstyle{doublearr}=[latex-latex, black, line width=0.5pt]     \tikzstyle{input}=[font=\small\sffamily\bfseries]     \tikzstyle{rect}=[rectangle, draw=black, font=\small\sffamily\bfseries, inner sep=9pt]     \tikzstyle{circ}=[circle, draw=black, font=\small\sffamily\bfseries, inner sep=6pt]     \tikzstyle{trigl}=[        isosceles triangle,        draw,        shape border rotate=90,        inner sep=2,        font=\small\sffamily\bfseries,        isosceles triangle apex angle=60,        isosceles triangle stretches     ]          \def\onesub#1{\strut$1\rlap{$_{#1}$}$}          \begin{document}     \begin{figure}[H]     \caption{The Model with Level 1 and Level 2 Predictors}     \label{CSL12}     \begin{tikzpicture}[auto, bend angle=45]          \node[rect]                      (Yij)  at (18, -6) {$LifeSat_{ij}$};     \node[trigl, anchor=right side]  (11)   at (8, -3) {\onesub{1}};     \node[rect]                      (Gij)  at (8, -5) {$Gender_{ij}$};     \node[rect]                      (Aij)  at (8, -7) {$AgeMar_{ij}$};     \node[rect]                      (AGij) at (8, -9) {$Gender_{ij} \times AgeMar_{ij}$};     \node [input]                    (rij)  at (20.5, -6) {$r_{ij}$};     \node[trigl]                     (12)   at (10, -1.15) {\onesub{2}};     \node[rect]                      (Mj)   at (12.5, -1) {$YearsMar_{ij}$};     \node[circ]                      (B0j)  at (12.5, -4.35) {$\beta_{oj}$};     \node[input]                     (M0j)  at (13.75, -3) {$\mu_{0j}$};          \draw [arr] (B0j)                to (Yij);     \draw [arr] (Gij)                to node [pos=.15, font=\scriptsize] (b1) {$\beta_1$} (Yij);     \draw [arr] (Aij)                to node [pos=.40] {\scriptsize$\beta_2$} (Yij);     \draw [arr] (AGij)               to node [pos=.55] {\scriptsize$\beta_3$} (Yij);     \draw [arr] (rij)                to node [pos=.5, above] {\scriptsize$1$} (Yij);     \draw (11.right side)            to (B0j);     \draw [arr] (12)                 to node [pos=.25, right] {\scriptsize$\gamma_{00}$} (B0j);     \draw [arr] (Mj)                 to node [pos=.50, right] {\scriptsize$\gamma_{01}$} (B0j);     \draw [arr] (M0j)                to node [pos=.30, left] {\scriptsize$1$} (B0j);     \draw [arr] (Mj)                 to node [pos=.30, right] {\scriptsize$\gamma_{11}$} (b1);          \node[inner sep=0pt, font=\footnotesize] at ([yshift=-20]current bounding box.south) (a)      {Note: $YearsMar_j$ is grand mean centered and was calculated by subtracting the sample mean from each score.};          \node[inner sep=0pt, below = 0cm of a, font=\footnotesize, xshift=38]      {$AgeMar_{ij}$ is group mean centered and was calculated by subtracting the mean for the person's gender from their score.};          \end{tikzpicture}     \end{figure}          \end{document}      Based on Harish Kumar's response, I produced the updated code below. The proposed solution is definitely on the right track. I thought the figure would look better if I had the caption on the top and so I've moved it there. I've also eliminated the superscripts "a" and "b" because they didn't look as good as I thought they might. The last thing I did was to expand the text for the "footnote" that appears at the bottom. So now for a couple of follow-up questions. 1) Is it possible to left justify the figure so that it lines up with the left side of the page? 2) Is it possible to set up the "footnote" so that it's all one piece and not in two separate nodes? Ideally, the second line of the text would be indented as shown below. The exact place where the text breaks could be set automatically or manually. I've experimented a bit with using "\" in TikZ based on some things I've seen in the manual but have had some troubles with it.               \documentclass[10pt]{article}          %%%% Packages %%%%          \usepackage[labelfont={bf}]{caption}     \usepackage{here}     \usepackage{tikz}     \usetikzlibrary{calc,shapes,shapes.geometric,positioning}     \usepackage{hyperref}          %%%% Set pdf zoom to 100% %%%%          \hypersetup{pdfstartview={XYZ null null 1.00}, pdfview={XYZ null null 1.00}}          %%%% TikZ graphics styles/commands %%%%          \tikzstyle{arr}=[-latex, black, line width=0.5pt]     \tikzstyle{doublearr}=[latex-latex, black, line width=0.5pt]     \tikzstyle{input}=[font=\small\sffamily\bfseries]     \tikzstyle{rect}=[rectangle, draw=black, font=\small\sffamily\bfseries, inner sep=9pt]     \tikzstyle{circ}=[circle, draw=black, font=\small\sffamily\bfseries, inner sep=6pt]     \tikzstyle{trigl}=[        isosceles triangle,        draw,        shape border rotate=90,        inner sep=2,        font=\small\sffamily\bfseries,        isosceles triangle apex angle=60,        isosceles triangle stretches     ]          \def\onesub#1{\strut$1\rlap{$_{#1}$}$}          \begin{document}     \begin{figure}[H]     \caption{The Model with Level 1 and Level 2 Predictors}     \label{CSL12}     \begin{center}     \begin{tikzpicture}[auto, bend angle=45]          \node[rect]                      (Yij)  at (18, -6) {$LifeSat_{ij}$};     \node[trigl, anchor=right side]  (11)   at (8, -3) {\onesub{1}};     \node[rect]                      (Gij)  at (8, -5) {$Gender_{ij}$};     \node[rect]                      (Aij)  at (8, -7) {$AgeMar_{ij}$};     \node[rect]                      (AGij) at (8, -9) {$Gender_{ij} \times AgeMar_{ij}$};     \node [input]                    (rij)  at (20.5, -6) {$r_{ij}$};     \node[trigl]                     (12)   at (10, -1.15) {\onesub{2}};     \node[rect]                      (Mj)   at (12.5, -1) {$YearsMar_{ij}$};     \node[circ]                      (B0j)  at (12.5, -4.35) {$\beta_{oj}$};     \node[input]                     (M0j)  at (13.75, -3) {$\mu_{0j}$};          \draw [arr] (B0j)                to (Yij);     \draw [arr] (Gij)                to node [pos=.15, font=\scriptsize] (b1) {$\beta_1$} (Yij);     \draw [arr] (Aij)                to node [pos=.40] {\scriptsize$\beta_2$} (Yij);     \draw [arr] (AGij)               to node [pos=.55] {\scriptsize$\beta_3$} (Yij);     \draw [arr] (rij)                to node [pos=.5, above] {\scriptsize$1$} (Yij);     \draw (11.right side)            to (B0j);     \draw [arr] (12)                 to node [pos=.25, right] {\scriptsize$\gamma_{00}$} (B0j);     \draw [arr] (Mj)                 to node [pos=.50, right] {\scriptsize$\gamma_{01}$} (B0j);     \draw [arr] (M0j)                to node [pos=.30, left] {\scriptsize$1$} (B0j);     \draw [arr] (Mj)                 to node [pos=.30, right] {\scriptsize$\gamma_{11}$} (b1);          \node[inner sep=0pt, font=\footnotesize] at ([yshift=-20]current bounding box.south) (a)      {Note: $YearsMar_j$ is grand mean centered and was calculated by subtracting the sample mean from each score.};          \node[inner sep=0pt, below = 0cm of a, font=\footnotesize, xshift=20]      {$AgeMar_{ij}$ is group mean centered and was by subtracting the mean for the person's gender from their score.};          \end{tikzpicture}     \end{center}     \end{figure}          \end{document}      Need to place a couple of footnotes after a figure. Maybe this truly is harder than I imagined. Or maybe I'll be embarrassed by how easy it turns out to be. Below is a sample figure. The first footnote would indicate that YearsMarj is grand mean centered. The second would indicate that AgeMarij is group mean centered. Not sure if the figure would look better with footnote marks or without. If it had footnote marks, then I'd imagine having a superscripted "a" beside YearsMarj and a superscripted "b" beside AgeMarij and Gender x AgeMarij. (A superscripted 1 and a couple of superscripted 2s might do just as well though.) Will be interested to see if this is easy or difficult. Any help with it will be greatly appreciated.               \documentclass[10pt]{article}          %%%% Packages %%%%          \usepackage{here}     \usepackage{tikz}     \usetikzlibrary{calc,shapes,shapes.geometric}     \usepackage{hyperref}          %%%% Set pdf zoom to 100% %%%%          \hypersetup{pdfstartview={XYZ null null 1.00}, pdfview={XYZ null null 1.00}}          %%%% TikZ graphics styles/commands %%%%          \tikzstyle{arr}=[-latex, black, line width=0.5pt]     \tikzstyle{doublearr}=[latex-latex, black, line width=0.5pt]     \tikzstyle{input}=[font=\small\sffamily\bfseries]     \tikzstyle{rect}=[rectangle, draw=black, font=\small\sffamily\bfseries, inner sep=9pt]     \tikzstyle{circ}=[circle, draw=black, font=\small\sffamily\bfseries, inner sep=6pt]     \tikzstyle{trigl}=[        isosceles triangle,         draw,        shape border rotate=90,        inner sep=2,        font=\small\sffamily\bfseries,        isosceles triangle apex angle=60,        isosceles triangle stretches     ]          \def\onesub#1{\strut$1\rlap{$_{#1}$}$}          \begin{document}     \begin{figure}[H]     \begin{center}     \begin{tikzpicture}[auto, bend angle=45]          \node[rect]                      (Yij)  at (18, -6) {$LifeSat_{ij}$};     \node[trigl, anchor=right side]  (11)   at (8, -3) {\onesub{1}};     \node[rect]                      (Gij)  at (8, -5) {$Gender_{ij}$};     \node[rect]                      (Aij)  at (8, -7) {\bf$AgeMar_{ij}$};     \node[rect]                      (AGij) at (8, -9) {$Gender_{ij} \times AgeMar_{ij}$};     \node [input]                    (rij)  at (20.5, -6) {$r_{ij}$};     \node[trigl]                     (12)   at (10, -1.15) {\onesub{2}};     \node[rect]                      (Mj)   at (12.5, -1) {$YearsMar_j$};     \node[circ]                      (B0j)  at (12.5, -4.35) {$\beta_{oj}$};     \node[input]                     (M0j)  at (13.75, -3) {$\mu_{0j}$};          \draw [arr] (B0j)                to (Yij);     \draw [arr] (Gij)                to node [pos=.15, font=\scriptsize] (b1) {$\beta_1$} (Yij);     \draw [arr] (Aij)                to node [pos=.40] {\scriptsize$\beta_2$} (Yij);     \draw [arr] (AGij)               to node [pos=.55] {\scriptsize$\beta_3$} (Yij);     \draw [arr] (rij)                to node [pos=.5, above] {\scriptsize$1$} (Yij);     \draw (11.right side)            to (B0j);     \draw [arr] (12)                 to node [pos=.25, right] {\scriptsize$\gamma_{00}$} (B0j);     \draw [arr] (Mj)                 to node [pos=.50, right] {\scriptsize$\gamma_{01}$} (B0j);     \draw [arr] (M0j)                to node [pos=.30, left] {\scriptsize$1$} (B0j);     \draw [arr] (Mj)                 to node [pos=.30, right] {\scriptsize$\gamma_{11}$} (b1);          \end{tikzpicture}     \end{center}     \caption{The Model with Level 1 and Level 2 Predictors}     \label{CSL12}     \end{figure}          \end{document}


title: Text alignment on top with multirow command

text: \begin{table}[!h]       \centering       \caption{Titel}       \resizebox{.95\columnwidth}{!}{%         \begin{tabular}{p{4.5cm}p{10cm}p{3.5cm}}             \hline             Name & \multicolumn{2}{p{\textwidth-3\tabcolsep-\widthof{test}-2\fboxrule}}                 {long_title which goes over two coloums}\\             \hline             Explanation & \multicolumn{2}{p{\textwidth-3\tabcolsep-\widthof{test}-2\fboxrule}}                 {Explanation which goes over two coloums}\\             \hline         \multirow{3}{*}{Targets}                          & Target 1 is long text with two lines & not reached\\             \cline{2-3}             & Target 2 & reached\\             \cline{2-3}             & Target 3 & reached\\             \hline              \end{tabular}%         }       \label{tab:test}%     \end{table}%       I hope this photo helps to understand my problem: ![enter image description here](http://i.stack.imgur.com/lzgmD.png) I would like to align the text "Targets" on the top of the cell, like the second table. I'm sure this must be simple to do, but I can't seem to put my finger on it.


title: Does boldface sans-serif not work?

text: \documentclass{article}          \newcommand{\nptime}{\ensuremath{\sf NP}}     \newcommand{\bnptime}{\ensuremath{\sf\bf NP}}          \begin{document}       \nptime\\       \bnptime     \end{document}      I'm trying to make a macro to typeset "NP" in boldface sans-serif font, but as demonstrated by my MWE, it's not working. BF seems to force a serif font. Alternatively, I'd be happy to find an opposite to `\ensuremath`, but I can't seem to find one. I tried `\text{}` to no avail. The following similar MWE does the same thing.               \documentclass{article}          \newcommand{\nptime}{{\sf NP}}     \newcommand{\bnptime}{{\sf\bf NP}}          \begin{document}       \nptime\\       \bnptime     \end{document}


title: Where to save a xindy style?

text: What is the best place to save a xindy style file (`.xdy`)? I read about `XINDY_SEARCHPATH` but what if I can’t change it because I’m only the developer and have no access to the users settings or when I want to publish a style via CTAN. Is there any place for such files? Furthermore the file should not be deleted if the distribution is updated.


title: `pmatrix` line break

text: I wrote a matrix using the `pmatrix` environment. The content is very long and LaTeX produces an output of the kind (the "a" line extending beyond `\textwidth`):               ( aaa aaa aaa aaa aaa aaa + aaa aaa aaa )     ( bb bb bb bb bb bb bb bb               )     ( cccccccccccccccccc                    )      I would like to get:               ( aaa aaa aaa aaa aaa aaa )     (           + aaa aaa aaa ) [aligned right]     ( bb bb bb bb bb bb bb bb )     ( cccccccccccccccccc      )       Can someone please help me? Here is a minimal example:               \documentclass{article}     \usepackage{amsmath}     \begin{document}     $\begin{pmatrix}         aaa aaa aaa aaa aaa aaa + aaa aaa aaa \\         bb bb bb bb bb bb bb bb\\         cccccccccccccccccc     \end{pmatrix}$     \end{document}


title: Using Terminal to run LaTeX commands

text: Since I always used TeXShop to compile my `tex`-files I did not have to run LaTeX commands via terminal (many macros like `BibTeX`, `MakeIndex` etc. are included in TeXShop). Now that I want to include an index and change its style I need for my understanding to run the following command in terminal to generate a `.ist` file:               makeindx -g -s a:\mkidx.ist MyIndex.idx      I just do not know how to run (LaTeX-)commands via Terminal. Can anyone help?


title: How to modify this command to vertically align a table cell?

text: This minimal code example:               \documentclass[helvetica,portuguese,narrow]{europecv}     \usepackage[top=1.5cm, bottom=1.5cm, left=1.5cm, right=1.5cm]{geometry}     \usepackage{graphicx}     \begin{document}         \begin{europecv}             \ecvlanguageheader{(*)}             \ecvlanguage{English}{\ecvCOne}{\ecvCOne}{\ecvBTwo}{\ecvBTwo}{\ecvCOne}             \ecvlanguagefooter{(*)}         \end{europecv}     \end{document}      Produces the following document: ![enter image description here](http://i.stack.imgur.com/YDOLL.png) What I want is to vertically align those `C1` and `B2`. I looked through the `europecv` package and found that I can add the following to my document to rewrite the command that outputs those table rows:               \makeatletter         \renewcommand*\ecvCEF[2]{             \begin{tabular}{@{}>{\footnotesize}p{.2\ecv@langparwidth}@{\hspace{1mm}}>{\footnotesize\centering}p{.74\ecv@langparwidth}@{}}                  #1 & #2\tabularnewline             \end{tabular}         }     \makeatother      That is the original code, I just need to find how to properly **vertically align** those `C1` and `B2` to the **middle of the cell**. Any suggestions?


title: how to draw plate indices in graphical model by tikz

text: I made my Hierarchical model with tikz by following code:               \documentclass[10pt,a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{color}     \usepackage{graphicx}     \usepackage{multirow}     \usepackage[landscape]{geometry}     \usepackage{tikz}     \usetikzlibrary{shapes,arrows, fit}     \usetikzlibrary{positioning}          % Define block styles     \tikzstyle{response} = [cloud, circle, draw, fill=blue!20,          text width=8em, text centered,  minimum height=3em]          \tikzstyle{level1} = [cloud, circle, draw, fill=green!10,          text width=7em, text centered,  minimum height=2em]              \tikzstyle{level2} = [cloud, circle, draw, fill=red!10,          text width=6em, text centered,  minimum height=2em]                 \tikzstyle{level3} = [cloud, circle, draw, fill=yellow!10,         text width=5em, text centered,  minimum height=2em]                \tikzstyle{arrow} = [thick,->,>=stealth]     \tikzstyle{a} = [rectangle, draw, minimum height=13em, minimum width=30em]     \tikzstyle{b} = [rectangle, draw, minimum height=26em, minimum width=50em]     \tikzstyle{c} = [rectangle, draw, minimum height=47em, minimum width=45em]     \author{Ehsan Masoudi}     \begin{document}               %\begin{tikzpicture}[node distance = 2cm, thick, every node/.style={scale=0.7}, auto]     %align = flush centera     \begin{tikzpicture}[thick,scale=0.7, every node/.style={transform shape}]     % Place nodes      % \node [response] (resp) {$y_{(pij)} \sim Wiener(\alpha_{(p)}, \beta, \tau_{(pij)}, \delta_{(pij)})$};           \node [response] (resp) {$y_{(pij)}$};     %%level1         \node [level1, above = 1.5cm of  resp] (alpha) {$\alpha_{(p)} \sim N(\mu_{\alpha}, \sigma^2_{\alpha})$};     \node [level1, left = .7cm of  resp] (tau) {$\tau_{(pij)} \sim N(\theta_{(p)}, \chi_{(p)})$};       \node [level1, right = .7cm of resp] (delta) {$\delta_{(pij)} \sim N(\nu_{(pi)}, \eta_{(p)})$};          %%level2      \node [level2, above left = 1.5cm and -.4cm of alpha] (mu-alpha) {$\mu_\alpha \sim U(.01, 3)$};     \node [level2, above right = 1.5cm and -.4cm of alpha] (sigma-alpha) {$\sigma_\alpha \sim U(.0001, 2)$};          \node [level2, above left = 3cm and 0.5cm of tau] (theta) {$\theta_{(p)} \sim N(\mu_\theta, \sigma_\theta)$};     \node [level2, below = 5.5cm  of tau] (chi) {$\chi_{(p)} \sim N(\mu_\chi, \sigma_\chi)$};     \node [level2, above right = 3cm and .4cm of delta] (eta) {$\eta_{(p)} \sim N(\mu_\eta, \sigma_\eta)$};     \node [level2, below = 1cm of delta] (nu) {$\nu_{(pi)}\sim N(\mu_{\nu(i)}, \sigma_{\nu(i)})$};          \node [level3, above left = 1.5cm and -.4cm of theta] (mu-theta) {$\mu_\theta \sim U(.01, 1)$};     \node [level3, above right = 1.5cm and -.4cm of theta] (sigma-theta) {$\sigma_\theta \sim U(.0001, .25)$};          \node [level3, above right = .7cm and 4.2cm of nu] (mu-nu) {$\mu_{\nu(i)} \sim U(-5, 5)$};     \node [level3, right = 4cm  of nu] (sigma-nu) {$\sigma_{\nu(i)}\sim U(.0001, 3)$};          \node [level3, above left = 1.5cm and -.4cm of eta] (mu-eta) {$\mu_\eta = 3.5$};     \node [level3, above right = 1.5cm and -.4cm of eta] (sigma-eta) {$\sigma_\eta = 3.5$};          \node [level3, below left = 1.5cm and -.4cm of chi] (mu-chi) {$\mu_\chi = .35$};     \node [level3, below right = 1.5cm and -.4cm of chi] (sigma-chi) {$\sigma_\chi = .125$};           %\node [above right =0.75cm and 0cm of theta] {CGPA} edge (student);               %level1     \draw [arrow] (mu-theta) -- (theta);     \draw [arrow] (sigma-theta) -- (theta);          \draw [arrow] (mu-alpha) -- (alpha);     \draw [arrow] (sigma-alpha) -- (alpha);          \draw [thick, dashed, ->] (mu-eta) -- (eta);     \draw [thick, dashed, ->] (sigma-eta) -- (eta);          \draw [arrow] (mu-nu) -- (nu);     \draw [arrow] (sigma-nu) -- (nu);          \draw [thick, dashed, ->] (mu-chi) -- (chi);     \draw  [thick, dashed, ->](sigma-chi) -- (chi);          %level2     \draw [arrow] (chi) -- (tau);     \draw [arrow] (theta) -- (tau);          \draw [arrow] (eta) -- (delta);     \draw [arrow] (nu) -- (delta);          %level2     \draw [arrow] (chi) -- (tau);     \draw [arrow] (theta) -- (tau);          \draw [arrow] (eta) -- (delta);     \draw [arrow] (nu) -- (delta);     %%path          \draw [arrow] (alpha) -- (resp);     \draw [arrow] (tau) -- (resp);     \draw [arrow] (delta) -- (resp);          \node[a,fit=(resp) (tau) (delta)] (container) {};     \node[b,fit=(resp) (tau) (delta)(nu)(mu-nu)(sigma-nu)] (container) {};     \node[c,fit=(resp) (tau) (delta)(nu)(chi)(theta)(alpha)(eta)] (container) {};          \end{tikzpicture}     \end{document}      Now, I would like to add index p = 1,...P, i = 1,...I and j = 1,...J for each plate (red index in the figure is drawn by paint!) ![enter image description here](http://i.stack.imgur.com/0jST2.jpg) any help would be appreciated. P.S.: in addition how can I bold the text in all nodes my one syntax? or any syntax that make them more obvious. For example, arranging all of the prior distributions in a column next to the model.


title: TikZ compiles fine with pdfLaTeX but  all labels are placed at origin with pdfTeX

text: I have the following code that works just fine when I compile with pdflatex, but does not work right with latex. In the second case, the lines are fine (at least to my eyes) but all labels are written in (0,0), superimposed one to the other. In either case, compiling ends with no errors. Running on Debian Sid, pgfversion 2.10, pdfTeX 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian). Any help is greatly appreciated.               \begin{tikzpicture}      \draw (0,0) arc (0:360: 1.1cm and 1.1cm);      \draw[line width = 2pt] (0,0) arc (0:70: 1.1cm and 1.1cm);           \draw (3,.6) -- (8,.6);      \draw[line width = 2 pt] (3,.6) -- (5,.6);      \draw (3 cm, .56cm) -- (3 cm, .65cm) node[anchor=north] {$0$};      \draw (8 cm, .56cm) -- (8 cm, .65cm) node[anchor=north] {$L$};      \draw (5 cm, .56cm) -- (5 cm, .65cm) node[anchor=north] {$\ell$};           \draw (3,-.6) -- (8,-.6);      \draw[line width = 2 pt] (4.5,-.6) -- (6.5,-.6);      \draw (3 cm, -.56cm) -- (3 cm, -.65cm) node[anchor=north] {$0$};      \draw (8 cm, -.56cm) -- (8 cm, -.65cm) node[anchor=north] {$L$};      \draw (4.5 cm, -.56cm) -- (4.5 cm, -.65cm) node[anchor=north] {$\frac{L-\ell}{2}$};      \draw (6.5 cm, -.56cm) -- (6.5 cm, -.65cm) node[anchor=north] {$\frac{L+\ell}{2}$};     \end{tikzpicture}


title: Latex command problem

text: I'm not sure what the correct command is. I tried this `$^\mathbb{N}|mathbb{Q}$` But it doesn't look correct. How do I fix the error?


title: How to use pdfpages with files with utf8 chars in the name?

text: Let's consider this MNWE (Minimal Not Working example):               \documentclass[12pt]{article}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     %\usepackage[spanish]{babel} % with or without, same problem     \usepackage{pdfpages}     \begin{document}            \includepdf{plain_chars.pdf}            \includepdf{accénted_chars.pdf}          \end{document}      In the directory the two PDF files exists (they are the same):               -rw-rw-r-- 1 romano romano 4726 Jun 16 16:13 accénted_chars.pdf     -rw-rw-r-- 1 romano romano 4726 Jun 16 16:07 plain_chars.pdf      I am using `pdflatex` on a standard Ubuntu 14.04 installation, and I have:               ! Package pdfpages Error: Cannot find file `acc\IeC {\'e}nted_chars.pdf'.          See the pdfpages package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.10   \includepdf{accénted_chars.pdf}      At first I thought it was a problem with `babel`, but then I commented it out and it still is not working. Is it possible to convince `\includepdf{}` to accept file names with non-ascii char in their name?


title: How do I include a .bbx file in my .tex file?

text: How do I set a .bbx file that contains some customisations inside my actual .tex file? I want to move all the changes I've made to the "numeric" biblatex behaviour somewhere outside of my main .tex file.


title: mdframed everyline extended frame

text: In the following MWE, I have used `everyline=true`. Is there any way to ensure that the vertical distance between the bottom of the frame on Page 1 to the bottom of text to be the same as the vertical distance from the top of the frame to the beginning of the text? Same question for Page 2.               \documentclass{article}          \usepackage{tikz}     \usepackage[framemethod=TikZ]{mdframed}          \usepackage{blindtext}          \begin{document}          \begin{mdframed}[roundcorner=5pt, everyline=true]     \begin{enumerate}     \item \blindtext     \item \blindtext     \item \blindtext     \item \blindtext     \end{enumerate}     \end{mdframed}          \end{document}


title: Align the top of two tables horizontally (side-by-side with minipage)

text: I'm using `\minipage` to put two tables side by side. But when the two tables are not of equal length, the shorter of the two is vertically centered with respect to the other. I would like both tables to be aligned horizontally at the top (i.e. so that I could draw an imaginary straight flat line from (1) through (2)).               \documentclass{article}     \usepackage{gb4e}     \begin{document}         \begin{table}[h]             \begin{minipage}{0.5\linewidth}                 \begin{exe}                     \ex                         \begin{tabular}[t]{l l}                             ich & `I'\\                             du & `you'\\                             er & `he'\\                         \end{tabular}                 \end{exe}             \end{minipage}             \begin{minipage}{0.5\linewidth}                 \begin{exe}                     \ex                         \begin{tabular}[t]{l l}                             Schiff & `ship'\\                             Haus & `house'\\                             Mund & `mouth'\\                             Auto & `car'\\                             Buch & `book'\\                             Stuhl & `chair'\\                         \end{tabular}                 \end{exe}             \end{minipage}         \end{table}     \end{document}      ![enter image description here](http://i.stack.imgur.com/WH7i2.png)


title: Custom citations in text

text: I want to customize the citation in the text of my LaTeX document. Currently when citing, only **[1, p.123]** is stated when citing. Is it possible to introduce a new command so the citation inserts **(Simpson 1998: p.123)** as the source reference? When searching for the customization of bibliographies only the style of the bibliography (list of sources like books, proceedings etc.) is considered, not the shorthand in the text... Minimal working example:               \documentclass[12pt]{article}     \title{\LaTeX}     \date{}     \begin{document}          This thesis bases on the theoretical work of Simpson \cite[p.123]{Simpson}.          \begin{thebibliography}{50}             \bibitem{Simpson} Homer J. Simpson. \textsl{Mmmmm...donuts}. Evergreen Terrace Printing Co., Springfield, SomewhereUSA, 1998     \end{thebibliography}          \end{document}      Produces: ![Citation text](http://i.stack.imgur.com/bzKFO.png)


title: Plotting sin(1/x) associated functions

text: I need to plot x, -x, x^2, -x^2, sin(1/x), x*sin(1/x), x^2*sin(1/x) and sin(1/x). But the functions containing sin(1/x) looks somehow bad. How can I fix it. I also do not know how to label the graphs (writing y=sin(1/x) next to the curve y=sin(1/x).               \documentclass{article}     \usepackage{pstricks-add}     \usepackage{pst-func}     \begin{document}     \begin{pspicture}*(-5,-2)(5,2)     \SpecialCoor % For label positionning     \psaxes[labels=y,Dx=\pstPI2]{->}(0,0)(-5,-2)(5,2)     \uput[-90](!PI 0){$\pi$} \uput[-90](!PI neg 0){$-\pi$} 5 \uput[-90](!PI 2 div 0){$\frac{\pi}2$}     \uput[-90](!PI 2 div neg 0){$-\frac{\pi}2$}     \psplot[linewidth=1.5pt,linecolor=blue,algebraic]{-5}{5}{sin(1/x)}     \psplot[linewidth=1.5pt,linecolor=red,algebraic]{-5}{5}{x*sin(1/x)}     \psplot[linewidth=1.5pt,linecolor=green,algebraic]{-5}{5}{x^2*sin(1/x)}     \psplot[algebraic,linestyle=dashed]{-5}{5}{x}     \psplot[algebraic,linestyle=dashed]{-5}{5}{-x}     \psplot[algebraic,linestyle=dashed]{-5}{5}{x^2}     \psplot[algebraic,linestyle=dashed]{-5}{5}{-x^2}     \end{pspicture}     \end{document}


title: How can I determine the actual inner and outer margins

text: I somehow have the feeling this is a dumb question, but I just can't find anything :-( How can I determine the actual values of the inner and outer margins of my document, or still better: the right and left margins of the current page? Background is that I'm working on a package to manage music examples, and one of the kinds these come are multi-page pdf files. Additional to other methods I would like to add an option to automatically offset the included pdf pages depending on being on an odd or even page. For this I would like to read out the margins of the current page.


title: Longtable alternative for twocolumn documents?

text: Is there a recommended method for incorporating multi-page tables into `twocolumn` documents? It's clear that the `longtable` package isn't set up to deal with documents of more than one column. Is there an alternative package that will deal better with the `twocolumn` format? Alternatively, what's the best way of putting `longtable` (or equivalent) into a `twocolumn` document as a single column float? Is there something similar to `table*` and `figure*`, but for `longtable`?


title: Different spacing around equation and align

text: In my document, I use `align` and `equation`, depending on the length of the equation. They are spaced differently, as you can see on the picture below. I read that comments in the empty lines would help, but it only removes the top blank line. How can I get the `equation` and the `align` environment to look alike in spacing? ![](http://i.stack.imgur.com/Ojscu.png)               Dieses $\beta$ ist der kritische Winkel, bei dem (solange man vorsichtig zieht) nichts passiert. Ist das Drehmoment positiv, rotiert das Jojo im Uhrzeigersin, also im negativen Sinn, oder nach rechts.          Für eine Rotation nach rechts gilt:          \begin{align*}     0 &< R_2 \cos(\beta) - R_1 \\     \frac{R_1}{R_2}  &< \cos(\beta) \\     \end{align}          Der Kosinus ist nur im Interval $\left(- \frac{\pi}{2}, \frac{\pi}{2} \right)$ positiv. $\beta$ muss also zwischen dem positiven und negativen kritischen Winkel liegen:          \begin{equation*}     \arccos \left( \frac{R_1}{R_2} \right) > |\beta|, \quad \beta \in (-\pi, \pi]     \end{equation}          Für eine Rotation nach links muss der Winkelbetrag größer sein, man zieht entweder steil nach oben, steil nach unten oder direkt nach links.


title: customizing TEXMFHOME

text: I'm on Ubuntu 12.04 (not sure if it makes a difference) and I'm trying to change `$TEXMFHOME` to a custom directory. Currently it is `$HOME/texmf`, which I believe is the default, but even when I put `.sty` files in there the compilation of the `.tex` file cannot find it. And more so, when I change the directory of `$TEXMFHOME` to something else and move the `.sty` file there, it still can' find it. However, if I put the `.sty` file in the same directory as the `.tex` file it works perfectly (not what I want though). I am changing `$TEXMFHOME` in `/etc/texmf/texmf.d/05TeXMF.cnf` and using `sudo update-texmf` to generate the `texmf.cnf` file. Is this the correct way? What am I doing wrong? If it's helpful, I am using emacs with auctex as my editor. I have found other threads on here and other sites that are very similar, but none of the solutions for those worked for me.


title: Should this combination of counters and \ifnum conditions work or does it need modification? Is there a better way?

text: I'm producing the final product of my thesis with LaTeX. I'm having trouble with the front matter of my thesis, specifically with getting LaTeX to recognize that if the front matter stops at a certain number of pages, then it is to execute the command `\beginthesis`. I've tried to produce counters so that if a certain combination of counters produced a certain number, and it was greater than X, it would produce a new front matter page via `\newpage`, but if less than X, it would execute `\beginthesis`. So, in simplified form, the whole process looks something like this, with abstract being the absolute last page that can be present:               \newcounter{frontmattercounter}     \newcounter{frontmattercheck}     \newcounter{frontmatterabstract}     \newcounter{frontmatterepigraph}          \newcommand{frontmattercheck}{%     \addtocounter{frontmattercheck}{\value{frontmatterabstract}}     \addtocounter{frontmattercheck}{\value{frontmatterepigraph}}     }          \frontmattercheck     \setcounter{frontmattercounter}{\value{frontmattercheck}}          \newcommand{epigraph}     \setcounter{frontmatterepigraph}{1}     .     .     .     \ifnum\value{frontmattercounter} > 1     \@restonecolfalse\newpage     \else     \beginthesis\fi          \newcommand{abstract}     \setcounter{frontmatterabstract}{10}     .     .     .     \beginthesis      I have about 6 or 7 pages that I have set up this way, but for some reason, it seems that LaTeX is not recognizing the values properly. Is there a better way to do this, or is there a way I can modify my process to get the intended result? Thanks in advance.


title: Changing Enumerate Colors using Beamer Theme Berlin

text: I am trying to figure out how to change the coloring of enumerations in Beamer using the Theme 'Berlin'. I was able to change the color of the Itemize environment by:                   \setbeamercolor{itemize item}{fg=TAMIU}      Also I was able to change the color of the Table of Content enumeration by:                   \setbeamercolor{section number projected}{bg=TAMIU,fg=white}      But non of these two approaches work for the enumeration:                   \setbeamercolor{enumerate item}{fg=TAMIU}         \setbeamercolor{enumerate number projected}{bg=Tamiu,fg=white}      So how can I do this?


title: siunitx package, doesn't seem to format imaginary numbers correctly

text: If I use the `siunitx` package to generate an imaginary number e.g. `\SI{120i}{\per\centi\meter}` then it places a 0 before the 120 (probably some artifact of expecting complex notation with a real number included). This seems like a bug. Also it puts the number in parenthesis which would make sense if it was a complex number with a real and an imaginary component, but not if it's just an imaginary component on it's own. I have considered turning of parsing, but that can create other formatting problems e.g. I like my "i" to be italic", which can be set up with the options, but not if parsing is turned off.


title: Indentation in AUCTEX and algorithmic package

text: When working with EMACS+AUCTEX I encountered the problem of proper indentation when using the `algorithmic` package. In this MWE:               \documentclass[12pt]{article}     \usepackage{algorithmic}     \begin{document}     \begin{algorithmic}       \IF {list.first $\neq x_{min}$}        \STATE bla        \STATE bla 2       \ENDIF     \end{algorithmic}     \end{document}      I have a correct indentation, but hitting `C-c C-q C-e` in the algorithm's environment, produces:               \begin{algorithmic}       \IF {list.first $\neq x_{min}$} \STATE bla \STATE bla 2       \ENDIF     \end{algorithmic}      When trying to add a nested if, I fail to obtain good indentation completely. Does anyone know the problem? Possible solutions?


title: Referring a series of figures

text: When I run the add file, I get: > Chapter 1 chap > > 1.1 sec > > figures 1.1 - 1.1. Just a figure 1.1 Just b figure 1.1 Clearly this is wrong but does it happen?               \documentclass{report}          %\usepackage{amsmath}     %\usepackage{mathrsfs}     \usepackage{graphicx}     \begin{document}     \chapter{chap}     \section{sec}     figures \ref{a} - \ref{c}.          Just a figure \ref{a}     Just b figure \ref{b}          \begin{figure}       \includegraphics[width=0.8\textwidth]{mem0per.png}       \caption{A figure}       \label{a}     \end{figure}          \begin{figure}       \includegraphics[width=0.8\textwidth]{mem0per.png}       \caption{B figure}       \label{b}     \end{figure}          \begin{figure}       \includegraphics[width=0.8\textwidth]{mem0per.png}       \caption{C figure}       \label{c}     \end{figure}          \end{document}


title: Using a dash (--) in LaTeX Beamer class

text: I want to use a dash in my beamer presentation, however `4--6` looks just like that in the output (i.e. the `--` is not converted to a dash as it usually is). Does anyone know a way around that? Here's the requested example (could be it's xelatex...)               \documentclass{beamer}          \usepackage{fontspec}     \usepackage{polyglossia}     \setdefaultlanguage[spelling=new,latesthyphen=true,babelshorthands=true]{german}     \setmainfont[Mapping=tex-text,Numbers=OldStyle]{Linux Libertine O}     \setsansfont{Linux Biolinum O}          \usepackage{csquotes}          \begin{document}     \begin{frame}--\end{frame}     \end{document}


title: Indentation and floats

text: I usually only allow paragraphs to be indented when there's a _need_ for them to be: only if the previous "element" could be confused and thus "merged" with the paragraph in question. In practical terms, this means that there's no indentation after a `\medskip` or `\bigskip`, nor after `itemize` or `enumerate`, nor after displayed math. Now, when typesetting floats it's hard to enforce this style: I'd like to leave no indentation after a float (in my opinion, it's hard to confuse things here). Given, a paragraph may well finish "flush" to the right margin and continue a new sentence just after the float... The "solution" I'm looking for then would be to _force_ floats to occur (as many as need to) _inside_ paragraphs, so that the first letter after the float is a lowercase, non indented, letter. Any ideas? PS: I usually also set `\setlength\parfillskip=2em plus 1 fil`, so as to have a consistent "visual clue" that a paragraph is over.


title: Projected coordinate in TikZ is not properly placed

text: I'm trying to draw an airplane. When I was drawing the window for the cockpit, I was using projected points to get right angles. But things aren't working out as expected. Could anyone give me a pointer about what I'm doing incorrectly?               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{calc}     \pagestyle{empty}     \begin{document}          \def\aeBodyRadius{0.25cm}     \def\aeBodyNoseDistance{0.21cm}     \begin{tikzpicture}[x=5cm,y=5cm,scale=3,every node={transform shape}]            \coordinate (TAIL) at (0,0);       \coordinate (NOSE) at ($(TAIL)+(30:1)$);            \coordinate (MID)     at ($(TAIL)!0.75!(NOSE)$);            \coordinate (MID/TOP) at ($(MID)!\aeBodyRadius!90:(NOSE)$);       \coordinate (MID/BOT) at ($(MID)!\aeBodyRadius!-90:(NOSE)$);            \coordinate (NOSE/TIP) at ($(NOSE)!\aeBodyNoseDistance!90:(MID)$);            \coordinate (HIND/TOP) at ($(TAIL)!\aeBodyRadius!90:(NOSE)$);       \coordinate (HIND/BOT) at ($(TAIL)!\aeBodyRadius!-90:(NOSE)$);            \node[fill,circle,inner sep=1pt] at (MID/TOP) {};       \node[fill,circle,inner sep=1pt] at (MID/BOT) {};       \node[fill,circle,inner sep=1pt] at (HIND/TOP) {};       \node[fill,circle,inner sep=1pt] at (HIND/BOT) {};            \draw[rounded corners=10pt]                                   (HIND/TOP) --                                  (MID/TOP)  --                                  node [pos=0.25] (WINDOW/TOP/N) {}                                  node [pos=0.50] (WINDOW/BOT/N) {}                                  (NOSE/TIP) --                                   (MID/BOT)  --                                  (HIND/BOT);         \coordinate (WINDOW/TOP) at (WINDOW/TOP/N.center);         \coordinate (WINDOW/BOT) at (WINDOW/BOT/N.center);              \coordinate (WINDOW/RIG/T) at ($(TAIL)!(WINDOW/TOP)!(NOSE)$);         \coordinate (WINDOW/RIG)   at ($(WINDOW/TOP)!(WINDOW/BOT)!(WINDOW/RIG/T)$);              \draw (WINDOW/TOP) -- (WINDOW/RIG) -- (WINDOW/BOT);              \draw[red] (TAIL) -- (NOSE);          \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/1iwuU.png) The "red" line runs down the center of the plane clearly shows how my _perpendicular_ is not what it should be. _UPDATE_ What seems _not_ to be working is the following snippet of code:                   \coordinate (WINDOW/RIG/T) at ($(TAIL)!(WINDOW/TOP)!(NOSE)$);         \coordinate (WINDOW/RIG)   at ($(WINDOW/TOP)!(WINDOW/BOT)!(WINDOW/RIG/T)$);      The projected points do not seem to lie on the appropriate perpendicular. In particular, `(WINDOW/RIG)` should lie above the red line since the line through `(WINDOW/TOP)` and `(WINDOW/RIG/T)` should be perpendicular to the red line through `(TAIL)` and `(NOSE)`.


title: Crop jpeg into circular tikz node

text: \documentclass[demo]{article}     \usepackage{graphicx}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}     \node[circle,draw,inner sep=2cm]{\includegraphics{myimage.jpg}};     \end{tikzpicture}     \end{document}      How do I modify the above code so that the included image is adapted to the circle shape and cropped of the exceeding parts? I want to specify a shape (a circle) and then include an image respecting the given dimension and cropped.


title: Scaling figures / graphics inside table

text: I have the following code:               \begin{table}[ht]     \begin{tabular}{c c c}     Name & Number of crossings & Arf invariant \\        \includegraphics[scale=0.5]{../images/unknot.jpg}  & 0 & 0 \\     \end{tabular}     \end{table}      which produces a table. But the picture does not get scaled. Why? And how can I make it scale the graphic? Thanks for your help.


title: Creating Multiple Language Presentation with Latex Beamer

text: I love creating presentation with latex beamer. The result is awesome. The problem is, I'd like to provide my presentation in english and in another language. What are the tips and trick to do this? Should I manually comment the english string, translate it and compile it to have result in another language? Are there any better mechanism? What I meant by tips and tricks are the fast and practical way to do it.


title: Email field in beamer class?

text: I am new to the beamer class and I am struggling to include my email info in a presentation. I tried `\email` but there is no such field. I tried the below but the theme over-rode the `\small` making the email appear too big.               \documentclass[a4paper,12pt,english]{beamer}     \usetheme{PaloAlto}     \usecolortheme[named=black]{structure}     \usefonttheme{professionalfonts}     \title{Some Great Long Title}     \author{Author\\{\small email@email.com}}     \institute{ABC}     \begin{document}     \begin{frame}     \titlepage     \end{frame}     \end{document}      Is there any way of inserting a row of text between author and institute with no formating?


title: Add PDF bookmark manually

text: I would like to add a bookmark to the table of contents. This page shows a method, but `\pdfbookmark` is not recognised as a command. This is my document header:               \documentclass[a4paper]{report}     \usepackage[pdftex,bookmarks=true]{hyperref}     \usepackage[pdftex]{graphicx}     \usepackage[utf8]{inputenc}     \usepackage{array}      I'm compiling the document with TexMakerX's PDFLaTeX option.


title: Command for automatically inserting wordcount in document?

text: I am using LyX, and I was wondering if there is any ERT Command for automatically inserting wordcount in a document? I am on Windows.


title: Does \\ in the last line of an array have any effect?

text: Consider the following example:               \begin{array}{l}     line 1 \\     line 2 \\     \end{array}      Is the `\\` in the last line completely optional or are there circumstances under which it has any effect?


title: How to set default line spacing in a .cls file?

text: I am writing a document class where I want to set the default line spacing to be 1.5. How can I use the `setspace` package to achieve this? More particularly, where in my .cls file should I mention `\onehalfspacing`?   I have tried modifying `\baselinestretch`, but it does not work when I add `\RequirePackage{setspace}` in the .cls file.


title: Simplest example from pfgplots documentation not working

text: I get a lot of errors when I try to compile even the simplest examples with `pgfplots`. The following is taken from the documentation of the package:               \documentclass{article}          \usepackage{pgfplots}     \pgfplotsset{compat=1.5.1}          \begin{document}            \begin{tikzpicture}         \begin{axis}[           xlabel=Cost,           ylabel=Error]         \addplot[color=red,mark=x] coordinates {           (2,-2.8559703)           (3,-3.5301677)           (4,-4.3050655)           (5,-5.1413136)           (6,-6.0322865)           (7,-6.9675052)           (8,-7.9377747)         };         \end{axis}       \end{tikzpicture}          \end{document}      I get more than 30 errors of the following type:               ! Illegal parameter number in definition of \pgfmathresult.     <to be read again>                       1     l.11       ylabel=Error]          You meant to type ## instead of #, right?     Or maybe a } was forgotten somewhere earlier, and things     are all screwed up? I'm going to assume that you meant ##.      Strangely, the produced pdf output contains the (visually) correct plot. I'm using TeXLive 2009, pdfTeX, pgfplots 1.5.1, pgf 2.00. edit: I believe that this has something to do with my system (missing or old packages?) but I'm not sure. Maybe someone has seen this before?


title: Why does \cal{M}_n give “M>”?

text: Why does `\cal{M}_n` give “M>” in parts of my LaTeX file and works correctly in other parts? ![enter image description here](http://i.stack.imgur.com/wvVpK.png)


title: Insert Text between "List of XXX" Heading and Actual Listing

text: I would like to insert a small paragraph of text between the "List of Figures" heading and the actual list of figures, and also between "List of Listings" and the actual list of listings. I am using the `listing` environment provided by `minted`. What's the best and easiest way to do this? Edit: A picture in case I wasn't clear enough: ![enter image description here](http://i.stack.imgur.com/PbaYb.png) Edit2:               \documentclass{article}     \usepackage{minted}          \begin{document}     \listoffigures     \listoflistings          \begin{figure}     \caption{A figure}     \label{fig:figure}     \end{figure}          \begin{listing}     \caption{A listing}     \label{fig:listing}     \end{listing}          \end{document}


title: Citing author inline and year in footnote using biblatex

text: I've been looking around and note found an answer to this question, which surprises me given the style is somewhat common. I just switched over to biblatex because some journals in my field use footnotes instead of inline citations, and it can easily switch between the two. My problem is that I cannot seem to get any combination of biblatex commands to produce a citation with the author name inline and year in the footnote. (I'm using authoryear-icomp as the biblatex style.) Example of what I'd like:               In my article I reference the recent work of Authorname^1, which is important.          ^1: <this is a footnote containing only> Year.      In natbib terms, I'd like a \citet{} command that puts the name in the text but puts the year in the footnote. I have no problem using \footcite to get Author and year into a footnote, but can't seem to figure out how to keep an author's name in the text so certain sentences can keep their flow. I could obviously work around this by writing out the author's name, footnoting the year, and using \nocite to put it in the bibliography. This, however, would defeat the whole purpose of being to easily switch between journal requirements. I figure there's an easy solution and I'm just being a tool. Help?


title: pgfplots: Scatter plot with multiple series side-by-side

text: I have multiple machines on which I did benchmarks. Now I wan to use pgfplots to show multiple y values (the variance in the measurement) for a single x value (a benchmark parameter) within a single graph. Each machine should get its own "column" in the plot, similar to the effect `ybar` produces with multiple `addplot` commands. In other questions I already found valuable hints but the legend is broken by the manual mark offset (`xshift`) as it is applied there as well. Here's a MWE:               \documentclass[border=1mm]{standalone}     \usepackage{pgfplotstable}          \begin{document}          \pgfplotstableread{       A B   C       foo   1   2.4       foo   1   2.1       foo   1   2.6       foo   1   2.3     }\dataA          \pgfplotstableread{       A B   C       bar   1   2.9       bar   1   2.2       bar   1   2.5       bar   1   2.1     }\dataB          \begin{tikzpicture}       \begin{axis}[only marks, ybar, symbolic x coords={1}, xtick={1}]              \foreach \id / \offs / \tab in {foo/-4/\noexpand\dataA, bar/4/\noexpand\dataB} {          \edef\temp{\noexpand\addplot+ [every mark/.append style={xshift=\offs pt}] table[x=B, y=C] {\tab};           \noexpand\addlegendentry{\id}          }               \temp         }            \end{axis}     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/DiFdh.jpg) I already tried to compensate for the `xoffset` by adding `[every mark/.append style={xshift=-\offs pt}]` to the `addlegendentry` command, but without any effect. How can I get the desired "column effect" in the plot without messing up the legend?


title: Real line in inequalities solution

text: In solving one variable linear inequalities I want to show the number line. How to draw real line like this? ![inequalities solution](http://i.stack.imgur.com/L1Mam.png)


title: Setting texinputs with .bat file (texlive2012)

text: How can I append additional paths for latex to search for external .sty and .cls files using .bat file. My try:               set TEXINPUTS=D:\myfolder\     latex %1


title: Problem inserting a figure in LaTeX

text: I am writing a research paper using LaTeX. I have certain images to insert. Now when we observe the images from the research paper, they have the following format:                   image         its caption      I am trying to replicate this using the following code                   \begin{figure}[h]         \centering         \includegraphics[width=.75\linewidth]{E:/Arifah/MS/thesis/final thesis report/Component           Based Software Development.png}          \caption{Component Based Software Development}         \end{figure}      However, the format that I am getting is                   the path of image         image         caption       Now, how do I remove the path?


title: tikz : how to refer to a node, in nested nodes

text: The following MWE displays 2 nested boxes. The alignment is done by refering to the inside box, through the name of the node "inbox"               \documentclass[12pt, a4paper]{scrartcl}     \usepackage{tikz}     \begin{document}     Before     \begin{tikzpicture}[baseline=(inbox.base)]%        \node[draw,rounded corners](outbox) {%        \begin{tikzpicture}[scale=1]%             \node[draw,rectangle](inbox){\textcolor{gray}{in}};        \end{tikzpicture}                 };     \end{tikzpicture}     After     \end{document}      But replacing `baseline=(inbox.base)` by `baseline=(outbox.base)` produces the compilation error : _Package pgf Error: No shape named outbox is known._ Can someone explain me this ? By the way, is it the right way, as i did, to nest nodes inside nodes ?


title: Removing sidebar from a single beamer frame

text: I like using the Beamer Goettingen theme as it has a nice sidebar. I would like to remove this from occasional slides, so the text can go all the way across. However, while the [plain] option removes the side bar, the text still wraps as if the side bar were there (minimal worked example below). How do I get text to wrap across slide?               \documentclass{beamer}     \usetheme{Goettingen}     \usepackage{lipsum}     \usecolortheme{seahorse}          \begin{document}          \begin{frame}[plain]{title}          \lipsum          \end{frame}          \end{document}


title: reduce space at the top using maketitle

text: I'm using XeLaTeX for my document and want to style my title page. The problem is, that `\maketitle` make a large top space, my text begins ca. 10 cm from the top. How can I reduce this space? In the moment it looks very crimped at the bottom. Here's the explicit code:               \documentclass[a4paper,12pt,twoside,ngerman]{article}     \parindent0pt     \parskip6pt     \usepackage{fontspec}     \usepackage{lmodern}     \usepackage{microtype}          \setmainfont[Path = fonts/,         BoldFont = akko-w01-bold.ttf,         ItalicFont = akko-w01-italic.ttf,         BoldItalicFont = akko-w01-bold-italic.ttf      ]{akko-w01-regular.ttf}          \usepackage[ngerman]{babel} % Paket für die neue deutsche Rechtschreibung     \usepackage[...]{hyperref}     ...     \title{Title}     \date{}     \author{}     \begin{document}     \input{./acronyms}     \input{./glosaries}     \maketitle     \thispagestyle{empty}     \begin{center}     \textbf{{\large Thesis}}\\     \ \\     von          Name Name\\     aus City          Matrikel-Nr.: Number          {\today}\\     \ \\     \ \\     \textbf{{\large University}}          University long          University subtitle          Vorgelegt bei          \textbf{Name of the prof}          \ \\     \textbf{{\large company}}          department          city     \end{center}               \begin{minipage}{.5\textwidth}       \begin{flushleft}         \includegraphics[width=0.9\linewidth]{images/university.png}       \end{flushleft}     \end{minipage}%     \begin{minipage}{.5\textwidth}     \begin{flushright}         \includegraphics[width=0.9\linewidth]{images/company.png}     \end{flushright}     \end{minipage}


title: How to *disable* Lua's Microtype for a given tabular column?

text: I'm looking for a way to disable Lua's Microtype (note the capital M - to distinguish from the lower case `microtype` _package_ ) in the first `tabular` column of the MWE given below:               \documentclass[a4paper]{article}          \usepackage{fontspec}          \pdfprotrudechars=2     \pdfadjustspacing=2     \newfontfeature{Microtype}{protrusion=default;expansion=default;}     \directlua{fonts.protrusions.setups.default.factor=.5}     \setmainfont[Microtype, Numbers={OldStyle, Proportional}, Ligatures=TeX]{Verdana}          \usepackage{tabularx}          \begin{document}          \begin{tabularx}{\textwidth}{@{}*{1}{l|}*{1}{X}@{}}          aaaaaaaaaaaa & \textbf{bbbbbbbbbb} \\     &\emph{ccccccccccccccc}\\          \end{tabularx}          \end{document}      This MWE isn't "optimized" to show the effect(s) of M/microtype, and thus perhaps ought to be improved accordingly...


title: Passing arguments to a .sty-file - a specific case

text: After having plowed through (i.e. read and trimmed down the given examples in an attempt to apply them to my case) these documentations and guides:   * Implementing key-value input: An introduction   * The kvoptions package   * pgfopts — LaTeX package options with pgfkeys, I still can't figure out how to simply pass two numbers to a `.sty`-file. The situation is as follows: there is a `.sty`-file that changes the behaviour of `siunitx` so that only very small and very large numbers are output in scientific notation, and the other numbers are displayed in the usual format. This file has the following contents:               \RequirePackage{expl3,siunitx}     \sisetup{scientific-notation=true}     \ExplSyntaxOn         \cs_new_eq:NN \fpcmpTF \fp_compare:nTF     \ExplSyntaxOff     \newcommand*{\ThresholdLow}{0.01}     \newcommand*{\ThresholdHigh}{100}     \let\OldNum\num%     \renewcommand*{\num}[2][]{%         \fpcmpTF{abs(#2)<=\ThresholdLow}{%             \OldNum[scientific-notation=true,#1]{#2}%         }{%             \fpcmpTF{abs(#2)>=\ThresholdHigh}{%                 \OldNum[scientific-notation=true,#1]{#2}%             }{%                 \OldNum[scientific-notation=false,#1]{#2}%             }%         }%     }      and is for the time being saved as `threshold.sty` in the same folder as the (to be) compiled document. This document includes it using the `usepackage`-command, as such:               \documentclass{article}     \usepackage{threshold}     \newcommand{\Row}[1]{#1 & \OldNum{#1} & \num{#1}}     \begin{document}     \begin{tabular}{l l l}         Num & Old & New\\\hline\\[-0.7em]         \Row{0.01}\\         \Row{0.1}\\         \Row{1}\\         \Row{10}\\         \Row{100}\\     \end{tabular}     \end{document}      In the `.sty`-file above, there are two lines defining the limits outside of which the numbers should be printed using scientific notation:               \newcommand*{\ThresholdLow}{0.01}     \newcommand*{\ThresholdHigh}{100}      Now ideally, these two thresholds would be given as an argument to the `threshold.sty` using for example               \usepackage[low=0.01,high=100]{threshold}      where the file would use `0.01` and `100` as default values if no arguments are given. What is the preferred way to do this? And maybe more useful to other readers that are as new to these matters as I am: what would be the simplest way to do this?


title: Aligning text in LyX: left/center/right

text: How can I center/right/left align text in LyX? In Microsoft Word, I can just click the 3 buttons on the toolbar.


title: How to draw 3 figures and have them side by side while they're connected

text: I would like to have 3 figures side by side, as in one of my previous posts. However, this time isn't the same. I would like to link my figures as below: ![enter image description here](http://i.stack.imgur.com/aelkp.png) My problem is not only how to put my figures side by side (maybe with the `subcaption` package it'll be solved), but also how I could draw these dashed lines?


title: Translate string into TIPA

text: I am writing a project about phonetics using the `tipa` package. The problem is, I need to publish two separate versions of my project using different phonetic notation standards. When considering the fact that there is, fortunately, a one-to-one correlation between the symbols of these two standards, I would like to know if there is a way to convert from the one standard to the other without having to write everything twice? Furthermore, since I am only using a small selection of the symbols available in `tipa`, I would like to use a custom syntax which eases typing. What I need to create is a command `phone` in which I can type phonetic writing using my own custom syntax. The `phone` command is then supposed to convert this into the `tipa` syntax. If that is possible, all I have to do to convert between these two standards is to change this command. An example: Since I'm using `\textraiseglotstop` and `\textsubarch{5}` a lot, I would `phone` to replace `?` with `\textraiseglotstop` and `R` with `\textsubarch{5}`. If somebody can provide me with a command that enables me to make lots of substring conversions without causing conflicts, I think that would suffice. Other suggestions are also very welcome, though.


title: Copying LaTeX from a PDF

text: Is there a way to copy from a PDF to a LaTeX document? Whenever I do it, it copies in with weird symbols in the place of LaTeX commands for example:               $$f:\mathbb{R}\rightarrow \mathbb{R}$$      copies in as > f : R ! R; I did a quick search and I couldn't really find anything (some sort of PDF to LaTeX converter that worked well) Am I missing something obvious or can this not be done (for some reason)?


title: epstopdf suddenly stopped working

text: I'm trying to compile some `.tex` files in WinEdt 7 with pdfLaTeX using MikTex 2.9. I have a lot of eps figures and was previously using `epstopdf` in the preamble without any problems. But for some reason when i try and recompile the `.tex` files (after deleting the converted PDFs) i'm getting the error:               Package pdftex.def Error: File 'subFolder_Name/Figure_Name-eps-converted-to.pdf' not found.      For some reason the `.eps` source file is not getting converted into a PDF. I'm baffled because this was working fine previously and I haven't changed anything with the WinEdt setup. Any help would be great.


title: How can I supress horizontal rules in newlfm letterhead?

text: I'm trying to use the `newlfm` package to put together a LaTeX letterhead. (Thankfully, my college's letterhead is text-only, so I don't have to worry about fancy logos or the like.) I've gotten fairly close to making it work, but `newlfm` insists on putting horizontal rules below the letterhead (and above the footer, which is currently empty.) How can I tell `newlfm` not to insert these rules? I know that `newlfm` uses `fancyhdr` under the hood, so I tried inserting the commands               \renewcommand{\headrulewidth}{0pt}     \renewcommand{\footrulewidth}{0pt}      in my preamble, but it didn't have any effect. (Explicitly loading `fancyhdr` didn't in the preamble didn't make a difference.) I also tried putting these commands inside the definition of the Williamsltr wrapper, but that didn't work either. The documentation doesn't seem to mention these horizontal rules at all. Any thoughts? I'd like to use `newlfm` if at all possible, but if getting rid of these rules is more than a minor tweak, I'm open to using another package instead.               \documentclass[orderfromdateto,sigcenter]{newlfm}     \usepackage[T1]{fontenc}     \usepackage{baskervald}     \usepackage{lipsum}          \newsavebox{\Wlogo}     \savebox{\Wlogo}{\parbox{6in}{\Large WILLIAMS COLLEGE \hspace{5mm} \normalsize     WILLIAMSTOWN, MASSACHUSETTS 01267-2693}}          \makeaddress{WillPhys}{     \addr{ \parbox{3in}{\begin{flushright}\emph{DEPARTMENT OF PHYSICS} \\       33 Lab Campus Drive \\       Williamstown, MA 01267 \\       (413) 597-2482 \end{flushright}}     }     \name{Michael Seifert}     }          \makeletterhead{Williamsltr}{%      \setadrfr{\adrWillPhys}\Lheader{\usebox{\Wlogo}}%     }          \lthWilliamsltr          \begin{document}     \greetto{To Whom It May Concern,}     \closeline{Sincerely,}     \begin{newlfm}          \lipsum[1-2]          \end{newlfm}          \end{document}


title: What package do I need in order to use \psfig{...}?

text: I'm using `\documentclass[final]{siamltex}` to write a paper. Within the document I'm trying to use a function \psfig. I have used the following syntax successfully in other papers that I have previously written:               \begin{figure}     \centering     \psfig{file=myfile.eps, height=2in, width=2in,}     \caption{This is my caption.}     \end{figure}      However, when I use it in this file, I get an undefined control sequence error. How do I fix it so that it will display my post-script images? Do I need to use a special package? Is there something wrong with my syntax?


title: Error when using T1 fontenc and urw-garamond from mathdesign

text: What is causing this error?               (see the transcript file for additional information){E:/MikTeX/fonts/enc/dvips/ fontname/texnansi.enc}     !pdfTeX error: miktex-pdftex (file ugmr8a.pfb): cannot open Type 1 font file for reading     ==> Fatal error occurred, no output PDF file produced!      I have the following lines after `\documentclass[stdletter]{newlfm}` and before `\begin{document}`:               \usepackage[urw-garamond]{mathdesign}     \usepackage[T1]{fontenc}      Exchanging their order or omitting the `fontenc` line doesn't help. I'm new to LaTeX and I cannot decode log files very well yet.


title: How to align source code produced by listings package with main paragraph text

text: I'm using the latex `listings` package for the first time to format some HTML. I'm noticing that by default, the html code is being pushed further left than the main paragraph text of my document. Is there any simply option or way of specifying to `listings` that all source code should have the same margin width on the left as my general paragraph text does? For reference, my latex code thus far is as follows:               \begin{lstlisting}[language=html]          ...          ...             ...               \end{lstlisting}      edit: I've isolated this down to only happening when I add _line numbers_ to the listing using:               \lstset{     numbers=left     }      Minimum working example:               \documentclass{article}     \usepackage{lipsum,listings}     \begin{document}     \lstset{     numbers=left     }     \lipsum[1]     \begin{lstlisting}[language=html]          ...          ...          ...               \end{lstlisting}     \end{document}      So is there a way to get the _line numbers_ to align with the general paragraph text?


title: to path + relative coordinates in TikZ?

text: The following gives an error with PGF 2.00:               \begin{tikzpicture}       \draw (0,0) to +(1,1);     \end{tikzpicture}      I could swear that this worked once with a different version, but I don't know which. The problem seems to be that the target coordinate of a "to" path must begin with a parenthesis. But drawing "to" paths to a relative coordinate is a really useful thing to be able to do! Is there any way around this? The only one I've thought of so far is to use the "calc" package instead:               \begin{tikzpicture}       \draw (0,0) to ($(0,0)+(1,1)$);     \end{tikzpicture}      but this quickly gets cumbersome, especially with a path of several segments using ++ relative coordinates in the middle. _Edit:_ Yes, of course in this simple example I could replace `to` with `--`, but the point is that I want to use other `to` paths, specifically `curve to`. _Edit:_ Here's a more complicated thing I'd like to be able to do:               \begin{tikzpicture}       \filldraw[fill=gray] (0,0) to[out=20,in=180] ++(2,1)         to[out=0,in=160] ++(2,-1) -- cycle;     \end{tikzpicture}


title: Where are the texdocs for the built-in LaTeX document classes?

text: I can `texdoc` for the following classes:   `letter`   `slides`   `proc` But, where are the `texdoc`s for the following built-in document classes?   `article`   `report`   `book`


title: How do I read the texdoc for the letter document class?

text: I am reading the `texdoc` for the `letter` document class. But it doesn't say anything about getting started. I think this is a commented source code document. Yes, it lists all the features of the `letter` class, but it doesn't say anything about how to use them in practice. There is no tutorial or walkthrough or something similar. To illustrate what I mean: ![alt text](http://i.stack.imgur.com/dp9Q2.png) This question is related to the one I asked about reading commented sources. I noticed that most documentation is in this form, which is rather frustrating. In contrast, the `memoir` and `pgfmanual` are superb examples of documentation.


title: problem with longtable in landscape orientation in a twocolumn mode document

text: I have some trouble formatting a long table in landscape orientation using a predefined document class (provided by a journal editor): \- the standard page size is shrunk: the height of the page (width of the table) is reduced with respect to a standard page, \- the table is out of the page: laying over the header of the page N.B.: the article is in a twocolumn mode The warning indicates:               (no line number in this file):     Package subfig Warning: Your document class has a bad definition      of \endfigure, most likely      \let\endfigure=\end@float      which has now been changed to      \def\endfigure{\end@float}      because otherwise subsequent changes to \end@float      (like done by several packages changing float behaviour)      can't take effect on \endfigure.      Please complain to your document class author.      The only way I could reformat more or less in a descent way is editing the page specifications: `\setlength\LTleft{-180pt} and \footskip = 200pt` Please let me know if you have any other suggestion. The document is available on writelatex.com and can be edited or downloaded at the following URL: https://www.writelatex.com/351847jnrdzr N.B.: you can save your modifications using the history tab Thanks. the table looks like:               \documentclass{bioinfo}     \usepackage{url}     \usepackage{rotating}     \usepackage{lscape}     \usepackage{subfig}     \usepackage{graphicx}     \usepackage{longtable}     \usepackage{supertabular}     \usepackage{multicol}              \begin{landscape}     \setlength\LTcapwidth{8in} % default: 4in (rather less than \textwidth...)     \setlength\LTleft{-180pt}            % default: \parindent     \setlength\LTright{0pt}           % default: \fill     \footskip = 200pt     \onecolumn     \tablehead{Table table table table table table table table table Table.}     \begin{longtable}{@{\extracolsep{\fill}}*{10}{llcccccccc}}     \label{table:table} \\     \hline     \\      &  & \multicolumn{3}{c}{multicolumn1} & & \multicolumn{4}{c}{multicolumn2} \\      \\      \cline{3-5} \cline{7-10} \\     column1 & column2 & column3$^a$ & column4 & column5$^b$ & & column7 & column8 & column9 & column10 \\     \\     \hline     \\     Type & Name$^c$ & X,XXX,XXX-X,XXX,XXX(?) & X,XXX,XXX-X,XXX,XXX(?) & NNNNN && PPPPPP$^b$(-)& X,XXX,XXX-X,XXX,XXX(?) & X,XXX,XXX-X,XXX,XXX(?) & N-X,XXX,XXX$^c$ \\          Type & Name$^c$ & X,XXX,XXX-X,XXX,XXX(?) & X,XXX,XXX-X,XXX,XXX(?) & NNNNN && PPPPPP$^b$(-)& X,XXX,XXX-X,XXX,XXX(?) & X,XXX,XXX-X,XXX,XXX(?) & N-X,XXX,XXX$^c$ \\          Type & Name$^c$ & X,XXX,XXX-X,XXX,XXX(?) & X,XXX,XXX-X,XXX,XXX(?) & NNNNN && PPPPPP$^b$(-)& X,XXX,XXX-X,XXX,XXX(?) & X,XXX,XXX-X,XXX,XXX(?) & N-X,XXX,XXX$^c$ \\          \\     \hline     \end{longtable}     $^a$ Text Text Text Text Text Text  Text Text Text Text Text Text Text Text Text  Text Text Text Text Text Text.     $^b$ Text Text Text Text Text Text  Text Text Text Text Text Text Text Text Text  Text Text Text Text Text Text.          \twocolumn          \end{landscape}      bioinfo.cls:               \newcommand\classname{bioinfo}     \newcommand\lastmodifieddate{2003/02/08}     \newcommand\versionnumber{0.1}          % Are we printing crop marks?     \newif\if@cropmarkson \@cropmarksontrue          \NeedsTeXFormat{LaTeX2e}[2001/06/01]     \ProvidesClass{\classname}[\lastmodifieddate\space\versionnumber]          \setlength{\paperheight}{11truein}     \setlength{\paperwidth}{8.5truein}          \newif\if@final          \DeclareOption{draft}{\PassOptionsToPackage{draft}{graphicx}}     \DeclareOption{a4paper}{\PassOptionsToPackage{a4}{crop}}     \DeclareOption{centre}{\PassOptionsToPackage{center}{crop}}     \DeclareOption{crop}{\PassOptionsToPackage{cam}{crop}\global\@cropmarksontrue}     \DeclareOption{nocrop}{\PassOptionsToPackage{off}{crop}\global\@cropmarksonfalse}     \DeclareOption{info}{\PassOptionsToPackage{info}{crop}}     \DeclareOption{noinfo}{\PassOptionsToPackage{noinfo}{crop}}     \DeclareOption{final}{\global\@finaltrue}          \ExecuteOptions{a4paper,nocrop,centre,info}          \ProcessOptions          % Load all necessary packages     \RequirePackage{inputenc,crop,graphicx,amsmath,array,color,amssymb,flushend,stfloats,amsthm,chngpage,times}     %\RequirePackage[LY1]{fontenc}     %\RequirePackage[LY1,mtbold]{mathtime}     \def\helvetica{\fontfamily{phv}\selectfont}     \def\helveticaitalic{\fontfamily{phv}\itshape\selectfont}     \def\helveticabold{\fontfamily{phv}\bfseries\selectfont}     \def\helveticabolditalic{\fontfamily{phv}\bfseries\itshape\selectfont}      ...


title: How can I force a footnote to appear on the same page as a particular displayed-math environment?

text: In this example, `\footnotemark` and `\footnotetext` are used respectively inside and immediately outside of an `align*` environment to create a footnote. (Here the equation-numbering system is being abused as a way to place explanatory notes to the right of the working. A footnote is desired here because the explanatory note in question is excessively long and is forced onto its own line, which looks ugly.) However, because I have contrived to put the `align*` environment at the bottom of the page, the footnote is getting shifted onto the following page. This is undesirable. It would be much better if the footnote were on the same page as the `align*` environment. (Straightforward use of `\footnote` does not work in the `align*` environment. The standard solution, as described in answers to other TeX/LaTeX Stack Exchange questions, is to use `\footnotemark` and `\footnotetext` as seen here. But just doing this does not address this issue.)               \documentclass[a4paper, reqno]{amsart}          \newtheorem{proposition}{Proposition}     \newcommand{\tie}{\bowtie}     \newcommand{\ordtie}{\mathord{\tie}}          \begin{document}          Here is some vertical space to force the align* environment to the     bottom of this page, so that the problem is exposed.\vspace*{15cm}          \begin{proposition}        Behold: a proposition.     \end{proposition}          \begin{proof}        We first check that $f$ satisfies both parts of Definitions (number).        For (i), let $v \in V_{(G / \ordtie) / \ordtie''}$. Then        $v = \big[[v']_{\tie}\big]_{\tie''}$ for some $v' \in V_G$, and we have        \begin{align*}           \pi_{G / \ordtie'}f(v) &= \pi_{G / \ordtie'}\big(f\b(){\b[]{[v']_{\tie}}_{\tie''}}\big)                               \\ &= \pi_{G / \ordtie'}\big([v']_{\tie'}\big)                                     \tag{by Proposition (number)}                               \\ &= \pi_G(v')                                   = \pi_{G / \ordtie}\big([v']_{\tie}\big)                                   = \pi_{(G / \ordtie) / \ordtie''}\big(\big[[v']_{\tie}\big]_{\tie''}\big)                                     \tag{\footnotemark}                               \\ &= \pi_{(G / \ordtie) / \ordtie''}(v),        \end{align*}        \footnotetext{Here we are using (three times) the definition from        Definitions (number) of the parity map of a quotient graph.}        as required. For (ii), let $\{u, v\} \in U_{(G / \ordtie) / \ordtie''}$;        then there exists $\{u', v'\} \in U_G$ such that        $u = \big[[u]_{\tie}\big]_{\tie''}$ and $v = \big[[v]_{\tie}\big]_{\tie''}$. We have        \[ \text{some more displayed mathematics, I daresay.}           \]        And that's all.     \end{proof}          \end{document}      How might I force the footnote to be on the same page as the `\align*` environment, given that the `\footnotetext` command cannot be placed inside the environment (for the same reason, I assume, that simply using `\footnote` does not work inside the environment)?


title: Tex file run error

text: When I run the tex file by Winedit, the out put shows like this. How to check this error?![enter image description here](http://i.stack.imgur.com/qTGxu.png) How to find the wrong in the tex file?


title: Appendix letter position

text: `\appendix \section{Appendix}` gives me "A Appendix". How can I get "Appendix A"


title: Why \nointerlineskip if background of Beamer-color frametitle is empty?

text: I'm trying to read the source of Beamer default outer theme (the file `beamerouterthemedefault.sty`). In line 144 there is this code:               \defbeamertemplate*{frametitle}{default}[1][left]     {       \ifbeamercolorempty[bg]{frametitle}{}{\nointerlineskip}%       % more things here     }      My question is simple: what is the purpose of this `\nointerlineskip`, and how is this connected to the background of the `frametitle` Beamer-color? Edit: I checked on the repository on Bitbucket, and couldn't find any hints there (I hoped for some enlightening commit message found through "blame" - but no, nothing.)


title: Type several columns using right-to-left language

text: I want type Farsi (this language is right-to-left) in several columns. How do I start the contents from the first column to the right?


title: Commutative diagram using TeX Writer

text: I bought an ipad app TeX writer and I am wondering if I can draw a commutative diagram. It includes the packages   * amslatex   * revtex4-1   * IEEEtran   * babel   * cyrillic   * graphicx   * color   * xcolr   * geometry   * algorithm2e   * listings. I could draw commutative diagram using a package amscd but it does not produce commutative diagram with a diagonal arrow. Is there any package that I can use on TeX Writer with which I can draw a commutative diagram with a diagonal arrow. It seems that one can add other packages and I tried but it did not work for me. (I am not familiar those technical language.)


title: using \middle| to include limits during an integration process

text: i need to include limits (lower and upper ) in the ``\middle|` to solution to an integration.               \begin{eqnarray}      Area &=& \int_{-1}^{2}(7-x^2)dx \\     &=& \left[\left(7x-\frac{1}{3}x^3\right) \middle| \right] \\ % here is where i wish it to occur     &=& \left[7.2-\frac{1}{3}(8)\right]- \left[7(-1)-\frac{1}{3}(-1)\right] \\     &=& 18      \end{eqnarray}


title: pgfplots and log scale: bars starting from the bottom of the screeen

text: The following MWE               \documentclass{standalone}     \usepackage{tikz}     \usepackage{pgfplots}     \begin{document}     \begin{tikzpicture}     \begin{axis}[ybar,ymode = log]     \addplot coordinates{     (1,1e-15)     (2,1e-14)     (3,1e-13)     };     \end{axis}     \end{tikzpicture}     \end{document}      compiles to this bar chart: ![enter image description here](http://i.stack.imgur.com/bRHzJ.png) I'd like the bars to start from the bottom of the screen instead of the top, since it makes more sense to visualize my data like that (they are computational errors). Is there a pgfplots option to achieve that? The manual only says that the bars always start from 0 (and there is no way to change that); clearly, when `ymode=log` this is interpreted as starting from log(1)=0, which is not what I want here.


title: Verb end of the line alignement

text: I have a problem when I use the command `\verb|detectionFinProgramme|`. I don't know how to manage LaTex to get a normal alignement at the end of the line. ![enter image description here](http://i.stack.imgur.com/QgBxB.png) Does someone have a solution ? Thanks in advance for your help.


title: Plot in TikZ: f(x) = 1/(x – 2) + 3

text: I am trying to plot the function `f(x) = 1/(x-2) + 3` using TikZ, however I get that the domain is undefined. What code should I type?


Why do I get an "ERROR: Please use \mathaccent for accents in math mode." for the following code?               \[c=439 450\times10^6\frac{\mathrm{millimètre}}{\mathrm{seconde}}\]      I am guessing `\usepackage[utf8]{inputenc}` is having problems with the accented "è" in "millimètre."


title: How to insert newline in Lyx-macro?

text: I want to create a Lyx-macro that takes two inputs in math and stacks them above each other, upper and lower part of the same size. Below is the definition in Latex and its desired use. How can I define the command in Lyx as macro? I do not know how to insert a `\\` in the macro environment. `Ctrl-Enter` is disabled and `Enter` leaves the macro environment and typing `\\` gives me `\backslash`. When I edit the `.lyx` file and add the `\\` directly I get the desired result. But I don't know how input this in the lyx-editor.               \documentclass{standalone}     \usepackage{amsmath}     \newcommand{\vchop}[2]{\begin{gathered}#1 \\ #2 \end{gathered}}     \newcommand{\vchopp}[3]{\begin{gathered}#1 \\ #2 \\ #3\end{gathered}}     \begin{document}     $\vchop{1}{5};P$     \end{document}      Edit: Copying a `gathered` environment with the desired number of rows from a math-expression not in a macro into the macro works. But this is not optimal.


title: vertical space beneath last item across pages in a multicols environment

text: I am using the `multicols` environment to create a simple worksheet with exercises in two columns. Everything works wonderfully, except if the exercises span multiple pages, the `multicols` environment justifies the last item on a page to the bottom of the page, leaving no room for the student to do the work. I found an easy fix to this by simply making my bottom margin larger and removing my footer: ![enter image description here](http://i.stack.imgur.com/Q7kv2.png) which came from this code:               \documentclass[reqno,12pt]{article}     \usepackage{amsmath,amssymb,amsthm}     \usepackage[top=1.125in, bottom=2.125in, left=0.75in, right=0.75in]{geometry}     \geometry{letterpaper}          \usepackage{multicol}     \usepackage{fancyhdr}     \setlength{\headheight}{28pt}     \setlength{\headsep}{16pt}     \fancyhf{}     \pagestyle{fancy}     \fancyhead[L]{MVCC Math 141 \\ Jaffary}     \fancyhead[R]{Practice Problems}     %\fancyfoot[R]{\thepage}     %\renewcommand{\headrulewidth}{0.1pt}     %\renewcommand{\footrulewidth}{0.1pt}          \begin{document}          \section*{Exercises}     \hrule     \medskip     Solve the following equations.     \medskip          \begin{multicols}{2}     \begin{enumerate}\itemsep3.2cm     %   \\         \item $3 \cdot 2^{x} = 48$         \item $3 \cdot \log_{2}(x) = 12$         \item $3 \sqrt[4]{x} = 6$         \item $3 \cdot 2^{x} = 48$         \item $3 \cdot \log_{2}(x) = 12$         \item $3 \sqrt[4]{x} = 6$         \item $3 \cdot 2^{x} = 48$         \item $3 \cdot \log_{2}(x) = 12$         \item $3 \sqrt[4]{x} = 6$         \item $3 \cdot 2^{x} = 48$         \item $3 \cdot \log_{2}(x) = 12$         \item $3 \sqrt[4]{x} = 6$         \item $3 \cdot 2^{x} = 48$         \item $3 \cdot \log_{2}(x) = 12$         \item $3 \sqrt[4]{x} = 6$         \item $3 \cdot 2^{x} = 48$         \item $3 \cdot \log_{2}(x) = 12$         \item $3 \sqrt[4]{x} = 6$     \end{enumerate}     \end{multicols}          \end{document}      I am looking for a better way to do this, and retain a footer. The following image shows the problem I encountered: ![enter image description here](http://i.stack.imgur.com/JXUzL.png) which came from this code, where the bottom margin is the same as the top and there is a footer:               \documentclass[reqno,12pt]{article}     \usepackage{amsmath,amssymb,amsthm}     \usepackage[top=1.125in, bottom=1.125in, left=0.75in, right=0.75in]{geometry}     \geometry{letterpaper}          \usepackage{multicol}     \usepackage{fancyhdr}     \setlength{\headheight}{28pt}     \setlength{\headsep}{16pt}     \fancyhf{}     \pagestyle{fancy}     \fancyhead[L]{MVCC Math 141 \\ Jaffary}     \fancyhead[R]{Practice Problems}     \fancyfoot[R]{\thepage}     \renewcommand{\headrulewidth}{0.1pt}     \renewcommand{\footrulewidth}{0.1pt}          \begin{document}          \section*{Exercises}     \hrule     \medskip     Solve the following equations.     \medskip          \begin{multicols}{2}     \begin{enumerate}\itemsep3.5cm     %   \\         \item $3 \cdot 2^{x} = 48$         \item $3 \cdot \log_{2}(x) = 12$         \item $3 \sqrt[4]{x} = 6$         \item $3 \cdot 2^{x} = 48$         \item $3 \cdot \log_{2}(x) = 12$         \item $3 \sqrt[4]{x} = 6$         \item $3 \cdot 2^{x} = 48$         \item $3 \cdot \log_{2}(x) = 12$         \item $3 \sqrt[4]{x} = 6$         \item $3 \cdot 2^{x} = 48$         \item $3 \cdot \log_{2}(x) = 12$         \item $3 \sqrt[4]{x} = 6$         \item $3 \cdot 2^{x} = 48$         \item $3 \cdot \log_{2}(x) = 12$         \item $3 \sqrt[4]{x} = 6$         \item $3 \cdot 2^{x} = 48$         \item $3 \cdot \log_{2}(x) = 12$         \item $3 \sqrt[4]{x} = 6$     \end{enumerate}     \end{multicols}          \end{document}


title: How complete is Texpad on the iPad

text: For 7.99 Euro I can purchase Texpad in the Apple store. It is just 11.4 MB, so it won't be as complete as my TeX Live 2012. Has anyone experience, how complete it is? Is it just the standard classes or could I prepare my Beamer slides with it?


title: Selecting text between parenthesis in Emacs+AUCTeX

text: I am looking for a way to select text inside surrounding nearest parenthesis. For example if I am working with a string               (text \textit{text2 $a^2=b$} text3)      this command selects whole string in case if my cursor is on `text`, `textit` or `text3`. In case my cursor is on `tex2` it selects               {text2 $a^2=b$}      An if it is inside '$..$' it selects math expression. It would be very nice if i could interactively change the selection region from smaller to bigger and vice versa.


title: Display content in separate buffer in Emacs+AUCTeX

text: Is there a way to display something like table of content of my current latex file in separate buffer, where all sections, subsections, figures and tables are listed interactively? So I could instantly jump to the piece just by clicking on it's link.