title: How can I add the index of value of a table to a point on a graph?

text: I would like to add to each branch of my polar comb graph the index value as a label. I give you my code and a screenshot with what I would like to have:               \documentclass{minimal}     \usepackage{eurosym}     \usepackage{pgfplots}     \usepackage{fp}          \begin{document}     \pgfplotsset{compat=newest}      \centering     \begin{tikzpicture}     \begin{polaraxis}[         visualization depends on=x \as \pgfplotspointx,         nodes near coords,         every node near coord/.style={             rotate=\pgfplotspointx,             append after command={                 node [                     anchor=south,                     rotate=\pgfplotspointx,                     shift={(axis direction cs:0,(12.75-\pgfplotspointmeta))}                 ] {$\pgfmathprintnumber{\pgfplotspointx}^\circ$}             }         },     width=4.2\textwidth,     xmin=-1,xmax=45.01, ymin=12, ymax=15,     title=Displacement 12N,     grid=both,     minor x tick num={4},      minor y tick num={1},     ]     \addplot+[polar comb ,data cs=cart, mark size=1, mark=asterisk] table {     13.8893888888889    0     13.8875152609215    0.256057893044211     13.8818942709919    0.512013162090311     13.8725256030249    0.767763280177719     13.8594087369111    1.02320591422122     13.8425429585071    1.27823902144993     13.8219273735841    1.53276094524909     13.7975609256787    1.78667051020809     13.7694424177793    2.03986711617976     13.7375705377745    2.29225083115874     13.7019438875704    2.54372248278928     13.6625610157771    2.79418374831654     13.6194204538470    3.04353724279891     13.5725207555396    3.29168660540349     13.5218605395737    3.53853658361110     13.4674385353184    3.78399311516262     13.4092536313646    4.02796340758379     };     \end{polaraxis}     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/VbvX6.jpg) Thank you very much in advance!


title: Algorithm2e modify line numbers

text: I'm using the LaTeX `algorithm2e` package by defining               \usepackage[ruled, linesnumbered, vlined]{algorithm2e}      The `linesnumbered` argument adds lines numbers from [1,...,n] if we have an algorithm with n lines. I would like to know if there's any possibility to change the numbers in something like: [1*,...,n*] (adding a symbol like a * or a ' behind the number). Note I have several algorithms in my document, thus I want to define the above described "different line number style" in a local `\begin{algorithm} ... \end{algorithm}` scope. I am thankful for all help and information.


title: \pgfdeclareshape: how to define anchors in a loop?

text: I think my question is quite similar to this and this, however I didn't manage to modify the provided solutions to fit my problem. In the following MWE I am trying to define 8 pin anchors in a `\foreach` loop. What I am doing is obviously wrong, as I am getting an _"Undefined control sequence"_ error when I try to reference one of this pins. Can someone provide a minimal example for a defining anchors in a loop?               \documentclass[tikz,border=1cm]{standalone}          \usepackage{circuitikz}          % BEGIN myic definition     \def\w{3cm}     \def\h{4.5cm}          \pgfdeclareshape{myic}{         \anchor{center}{\pgfpointorigin}         \anchor{text}         {\pgfpoint{-.5\wd\pgfnodeparttextbox}{-.5\ht\pgfnodeparttextbox}}              % PIN ANCHORS         % The following code does not work as expected.         % I am looking for a way to define \n anchors in a loop.         \foreach \n in {0,...,7}             {\anchor{in\n}{\pgfpoint{.5*\w}{7*.25cm-\n*.5cm}}}              \foregroundpath{             % RECTANGLE             \pgfsetlinewidth{0.025cm}             \pgfpathrectanglecorners{\pgfpoint{.5*\w}{.5*\h}}{\pgfpoint{-.5*\w}{-.5*\h}}             \pgfusepath{draw}                  % PIN NAMES             \foreach \n in {0,...,7}                 {\pgftext[right,at={\pgfpoint{.5*\w-.1cm}{7*.25cm-\n*.5cm}}]{\scriptsize IN\n}}         }     }     % END myic definition          \begin{document}          \begin{circuitikz}         \draw (0,0) node[myic] (u0) {U0};         \draw (u0.in0) to[short,-o] ++(1,0); % <- ERROR: Undefined control sequence.     \end{circuitikz}          \end{document}      Here is what I have so far, the red line with a circle is what I am not able to create: ![tikzcircuit ic](http://i.stack.imgur.com/kJZGp.png)


title: How to change white background of an included PDF to transparent

text: I have an external 100 pages PDF document (not created by pdflatex) that I `\includegraphics` page-wise into a beamer presentation. The external PDF document employs white as page color, but I need the background to be transparent. Ideally, this would be an option one could pass to `\includegraphics` – which I doubt to exist. However, I would also be open for some process involving external tools (`pdftk`, `pdfjam`, ImageMagick, Acrobat...).


title: BibLaTeX: how to sort references by year within the citation

text: I am using biblatex with the following command: `\usepackage[citestyle=numeric-comp,sorting=none]{biblatex}`, and then add muptiple citations with, e.g. `\cite{Lamont1985, Sorin1983}`. I need the bibliography to be sorted by appearance, so I'm using `sorting=none`. However, in this example Lamont will appear before Sorin, which doesn't make much sense (they are referenced simultaneously). So, is it possible to sort the sources within the citation automatically?


title: Regular apostrophe with XeTeX?

text: I'm trying to get a regular apostrophe with XeTeX, like this one: ![who](http://i.stack.imgur.com/PfoZi.png) However all I'm getting by typing `who's` in my `.tex` is ![enter image description here](http://i.stack.imgur.com/B64ZF.png) (notice the diagonal apostrophe) How can I get the nice first one to get rendered?


title: The file does not conform to Adobe's published PDF?

text: My question is how to check if a pdf file created with pdfTeX-1.40.12 is conform to Adobe's published PDF ? Is it possible to know ? I try to look at the properties of the file with Adobe Reader but I see nothing. This problem appears when I try to get a gif file from a pdf file with `convert` I get this message : > >     Warning:  Default viewing OC config dictionary has /BaseState /OFF >   >     This file had errors that were repaired or ignored. >   >     The file was produced by:  pdfTeX-1.40.12 >     Please notify the author of the software that produced this >     file that it does not conform to Adobe's published PDF >     specification. >   Perhaps it's a problem with `convert` but independently, how to know if a pdf is conform to the norm. I think that the fact to be able to open a pdf with a viewer is not a proof. The pdf is get with the first example of my answer here. The pdf with the pentagon. I used `convert` like this (Martin's idea)               convert -verbose -delay 100 -loop 0 -density 400 namefile.pdf namefile.gif


title: References into the tables in different style of the text

text: I would like to do one question concerning to references into the tables. So, I am writing my Phd thesis and I have so many tables with theoretical and experimental values. For the experimental values I have references to add, but I would like to add these references like superscript. However in the text the references are into the brackets like, for example [25];[10]... is possible to change just into the table? I have used, for example, `\cite{Edgar1994}` into the tabel and the result was the experimental value plus the reference such as 1.94[25]. I would like [25] superscript without brackets and link to the bibliography. * * * I am using `\bibliographystyle{apsrev4-1}` and `bibtex` to create my bibliography.


title: Listings in Minted not working

text: To surround the code with a box, the documentation suggested to use `listing` environment. But the code has no effect at all. What is the issue here: ![enter image description here](http://i.stack.imgur.com/De1n2.png)   My MWE:               \documentclass[a4paper , 12pt]{article}     \usepackage{minted}     \usemintedstyle{manni}     \begin{document}     \begin{listing}[H]     \begin{minted}{java}     class Test     {         public static void main(String args[])         {             System.out.println("Hello World");         }     }     \end{minted}     \end{listing}     \end{document}


title: Cyrillic and classicthesis: Clash error

text: I want to add a pair of lines in Russian to some file, which I'm writing with `classicthesis`. I tried adding cyrillic alphabet with the packages described just bellow, and had still no problem:               \documentclass{article}     \usepackage[T2A,T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[russian,english]{babel}          \begin{document}          English text and      \begin{otherlanguage*}{russian}     русский текст     \end{otherlanguage*}          \end{document}      But when I add the lines that allow me to write in cyrillic to a working example written with `classicthesis`, I get `Option clash for package inputenc.\usepackage` and `Option clash for package babel` upon compiling the following:               \documentclass[ twoside,openright,titlepage,numbers=noenddot,headinclude,%1headlines,% letterpaper a4paper                     footinclude=true,cleardoublepage=empty,abstractoff, % <--- obsolete, remove (todo)                     BCOR=5mm,paper=a4,fontsize=11pt,                     ngerman,american,                     ]{scrreprt}          \usepackage{classicthesis-preamble}      \usepackage[T2A,T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[russian,english]{babel}          \begin{document}     \frenchspacing     \raggedbottom     \selectlanguage{american}           English text and      \begin{otherlanguage*}{russian}     русский текст     \end{otherlanguage*}}     \end{document}      Any hint?


title: Appendices looking like section AND subsections in the bookmarks

text: I am writing a thesis and i would like the appendices, which are declared as `\chapter` to be grouped under one chapter "Appendices" in the bookmarks, and then each appendix to appear as a section. The answer to this question was provided here. The idea was to use `xpatch` to change the TOC entries from `\chapter` to `\section`. I am now trying to change the `\section` entries in my appendices into `\subsection` in the bookmarks. And that's where I run into problems. My code below runs with no error, but treats all the bookmarks in my appendices as sections. Note that I am using a style file (dissertation.sty, see code below the .tex file). This style file defines the command `\appendices` which is why I do not use the `appendix` package.               \documentclass[12pt]{report}          \usepackage{dissertation}          \usepackage[latin1]{inputenc}     \usepackage{graphicx}     \usepackage{caption}     \usepackage{subcaption}     \usepackage{multirow}     \usepackage{multicol}     \usepackage{amsmath,amssymb,amsfonts,dsfont}     \usepackage{xpatch}     \usepackage[dvipdfm,hypertexnames=false,colorlinks,linktoc=page]{hyperref}          \begin{document}          \chapter{Chapter 1}          \section{Section 1}          \section{Section 2}          \chapter{Chapter 2}               \appendices          \chapter{Appendix 1}           \chapter{Appendix 2}          \section{Sub-appendix 1}          \section{Sub-appendix 2}          \end{document}      And the minimum style file needed for this code to compile is:               \newlength{\regular@textheight}     \setlength{\regular@textheight}{\textheight}     %     \addtolength{\regular@textheight}{-\footskip}     \newlength{\short@textheight}     \setlength{\short@textheight}{\textheight}     \addtolength{\short@textheight}{-\footskip}          \def\short@page{%         \setlength{\textheight}{\short@textheight}         \global \pagestyle{plain}         \global \@colht\textheight         \global \@colroom\textheight         \global \vsize\textheight}          \def\regular@page{%         \setlength{\textheight}{\regular@textheight}         \global \pagestyle{plain}         \global \@colht\textheight         \global \@colroom\textheight         \global \vsize\textheight}          \newcounter{regular@short}               \def\doublespacing{%         \def\default@spacing{\baselineskip=23.5pt plus .5pt minus .2pt}}                    \newlength{\one@num}\setlength{\one@num}{18pt}     \newlength{\two@num}\settowidth{\two@num}{9.9...}     \newlength{\three@num}\settowidth{\three@num}{9.9.9...}     \newlength{\four@num}\settowidth{\four@num}{9.9.9.9...}     \newlength{\five@num}\settowidth{\five@num}{9.9.9.9.9...}     \newlength{\six@num}\settowidth{\six@num}{9.9.9.9.9.9...}          \def\longtocentry{%     \settowidth{\two@num}{99.99...}     \settowidth{\three@num}{99.99.99...}     \settowidth{\four@num}{99.99.99.99...}     \settowidth{\five@num}{99.99.99.99.99...}     \settowidth{\six@num}{99.99.99.99.99.99...}}          \newlength{\c@onenum}         \setlength{\c@onenum}{\one@num}     \newlength{\c@twonum}         \setlength{\c@twonum}{\c@onenum}\addtolength{\c@twonum}{\two@num}     \newlength{\c@threenum}         \setlength{\c@threenum}{\c@twonum}\addtolength{\c@threenum}{\three@num}     \newlength{\c@fournum}         \setlength{\c@fournum}{\c@threenum}\addtolength{\c@fournum}{\four@num}     \newlength{\c@fivenum}         \setlength{\c@fivenum}{\c@fournum}\addtolength{\c@fivenum}{\five@num}          \def\l@section{\@dottedtocline{1}{\c@onenum}{\two@num}}     \def\l@subsection{\@dottedtocline{2}{\c@twonum}{\three@num}}     \def\l@subsubsection{\@dottedtocline{2}{\c@threenum}{\four@num}}     \def\l@paragraph{\@dottedtocline{4}{\c@fournum}{\five@num}}     \def\l@subparagraph{\@dottedtocline{5}{\c@fivenum}{\six@num}}               \def\nopage@addcontentsline#1#2#3{\addtocontents{#1}%     {\protect \contentsline {#2}{#3}{}}}          \newlength{\toc@chap@indent}     \settowidth{\toc@chap@indent}{\bf\@chapapp\space\thechapter.\hspace*{1em}}     \def\l@chapter#1#2{\addpenalty{-\@highpenalty}         \vskip 1.0em plus 1pt         \@tempdima=\toc@chap@indent         \begingroup         \parindent \z@         \rightskip \@pnumwidth         \parfillskip -\@pnumwidth         \bf \leavevmode         \advance\leftskip\@tempdima \hskip -\leftskip #1\nobreak\hfil         \nobreak\hbox to\@pnumwidth{\hss #2}\par         \penalty\@highpenalty \endgroup}          \def\@makechapterhead#1{ \vspace*{0pt} {\parindent 0pt \centering         \ifnum \c@secnumdepth >\m@ne \Large\bf \@chapapp{} \thechapter         \par \vskip 15pt \fi \Large \bf #1\par \nobreak \vskip 35pt}}          \def\@makeschapterhead#1{\vspace*{0pt} {\parindent 0pt \centering         \Large \bf #1\par \nobreak \vskip 30pt}}          \def\chapter{%         \clearpage         \short@page \setcounter{regular@short}{0}         \default@spacing         \global\@topnum\z@ \@afterindenttrue         \secdef\@chapter\@schapter}          \def\shortchapter{%         \clearpage         \short@page \setcounter{regular@short}{1}         \default@spacing              \global\@topnum\z@ \@afterindenttrue         \secdef\@chapter\@schapter}          \newcount\chap@or@app\chap@or@app=1          \def\appendixname{Appendix}          \def\appendices{\clearpage\phantomsection         \typeout{Appendices.}         \short@page \setcounter{regular@short}{1}             \markboth{}{}\pagestyle{myheadings}             \thispagestyle{plain}         \vspace*{\fill}         \centerline{\large\bf Appendices}         \vspace*{\fill}              \addcontentsline{toc}{chapter}{Appendices}              \setcounter{chapter}{0}         \setcounter{section}{0}         \def\@chapapp{\appendixname}         \chap@or@app=2         \def\thechapter{\Alph{chapter}}              \makeatletter         \xpatchcmd{\Hy@org@section}{{toc}{section}}{{toc}{subsection}}{}{}%         \xpatchcmd{\Hy@org@chapter}{{toc}{chapter}}{{toc}{section}}{}{}%         \makeatother         }               \newcount\with@parts\with@parts=0     \def\@part[#1]#2{%         \short@page         \ifnum \c@secnumdepth >-2 \relax           \refstepcounter{part}           \addcontentsline{toc}{part}{\partname~\thepart\hspace{1em}#1}%         \else           \addcontentsline{toc}{part}{#1}         \fi         \markboth{}{}         {\centering          \interlinepenalty \@M          \reset@font          \ifnum \c@secnumdepth >-2 \relax            \huge\bfseries \partname~\thepart            \par            \vskip 20\p@          \fi          \Huge \bfseries #2\par}          \ifnum\value{part}=1 \pagenumbering{arabic}          \with@parts=1 \fi         \@endpart}               \newcounter{no@chapters}     \setcounter{no@chapters}{0}               \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne         \refstepcounter{chapter}         \typeout{\@chapapp\space\thechapter.}         \addcontentsline{toc}{chapter}{\@chapapp\space\thechapter.\hspace*{1em}#1}\else         \addcontentsline{toc}{chapter}{#1}\fi         \addtocontents{lof}{\protect\addvspace{10pt}}         \addtocontents{lot}{\protect\addvspace{10pt}}         \@makechapterhead{#2} \@afterheading         \ifnum\chap@or@app=1 \ifnum\value{chapter}=1             \markboth{}{}\pagestyle{myheadings}             \ifnum\with@parts=0 \pagenumbering{arabic}\fi                                                \fi\fi             \thispagestyle{plain}}          \def\@schapter#1{\thispagestyle{plain}             \@makeschapterhead{#1} \@afterheading}     \def\section{%          \ifnum\value{no@chapters}=1 \fpage \fi%          \@startsection{section}{1}{\z@}%         {4.6ex plus -1ex minus -.2ex}{.3ex plus .2ex}{\large\bf}}     \def\subsection{\@startsection{subsection}{2}{\z@}%         {3.9ex plus -1ex minus -.2ex}{.2ex plus .2ex}{\normalsize\bf}}     \def\subsubsection{\@startsection{subsubsection}{2}{\z@}%         {3.9ex plus -1ex minus -.2ex}{.2ex plus .2ex}{\normalsize\bf}}          \doublespacing


title: How was this tip box produced?

text: I presume Drew Neil (of Vimcasts.org fame) used some TeX typesetting engine (XeLaTeX?) to typeset his excellent book, _Practical Vim_. See a screenshot below. I really like the way his "tip boxes" stand out of the main text and catch the reader's attention, without being too flashy or "in-your-face". What package(s) do you think he used to produce those fancy boxes (the "Tip 2" bit, in particular)? The `mdframed` package doesn't seem to offer that level of customisation. The `tcolorbox` package is a more likely candidate, but I didn't spot any box similar to that shown below in the manual... How do you think the author generated those boxes? ![enter image description here](http://i.stack.imgur.com/uqfoH.png)


title: Conflict between hyperref and multiinclude using beamer class

text: I'm working on a presentation using the `beamer` class, and I have the following problem: the hyperlinks created by `hyperref` stop working for any slide placed after a slide that uses the `\multiinclude` command (i.e. any slide placed after the slide "Present approach", in the short example below). Any ideas of what am I doing wrong?               \documentclass[hyperref={pdfpagelabels=false},dvips]{beamer}          \usepackage[utf8]{inputenc}     \usepackage{graphicx}     \usepackage{amssymb}     \usepackage{textpos}     \usepackage{xmpmulti}     \usepackage{animate}     \usepackage{xcolor}     \usepackage{lmodern}    % Use Latin Modern fonts          \usetheme[hideothersubsections]{PaloAlto}          \begin{document}          \section{Introduction}          \subsection{Motivation}     \begin{frame}       \frametitle{Motivation}     \end{frame}          \subsection{Background}     \begin{frame}       \frametitle{Background}     \end{frame}          \subsection{Present approach}     \begin{frame}       \frametitle{Present approach}       \begin{block}{\centering Approach}         \begin{figure}           \centering           \multiinclude[<+>][format=eps,start=1,end=7,graphics={height=0.55\textheight}]{figs_defense/research_flow_chart}         \end{figure}       \end{block}     \end{frame}          \subsection{Contributions}     \begin{frame}       \frametitle{Contributions}     \end{frame}          \section{Analytical study}          \subsection{General procedure}          \begin{frame}       \frametitle{Analytical study}     \end{frame}          \end{document}


title: Why can't I use ?

text: I can't figure out why LaTeX won't let me use the symbol (U+1D53D, mathematical double-stuck capital F). When I try, I get the error `Package inputenc Error: Unicode char \u8: not set up for use with LaTeX.` The input file is UTF-8 encoded. Here is a minimal working (or rather, non- working) example to demonstrate the issue.               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{mathtools}     \begin{document}     % \newcommand{\eff}[1]{F\text{#1}}     \newcommand{\eff}[1]{\text{#1}}     $ \eff{some} $     \end{document}      When using the first variant of `\eff`, everything works (the output is rendered as "Fsome" with an italic F, just as expected). However, if I comment that one out and instead uncomment the second variant, I get the error on line 8 (where I actually use the freshly defined command). I'm using pdfLaTeX 3.1415926-1.40.10-2.2 from and on Debian Squeeze (package texlive-latex-base version 2009-11+squeeze1) with no special options at all (just `pdflatex mwe.tex`) to try to render the document. I find it hard to believe that nobody would have wanted to use this particular symbol in a LaTeX document, so surely it can be done. What am I missing?


title: How to cite a license in BibTeX?

text: This is not really a technical question. However I am wondering how a license (like the GNU GPL) should be cited in BibTeX.


title: xcoffins behaviour when joining two instances of the same coffin

text: When I use `\JoinCoffin` to build a page, and add more than one instance of the same coffin, ongoing references to that coffin appear to behave "sensibly". That is, any reference to the coffin is made to its latest instance. I realise this usage "works in my case", but would like to know if it is "correct". Is this behaviour a supported feature of `xcoffins`, or should I avoid it? Here's a CWE (Compact Working Example!):               % !TEX TS-program = XeLaTeX     % !TEX encoding = UTF-8 Unicode     \documentclass[a4paper]{memoir}     \usepackage{graphicx}     \usepackage{xcolor}     \usepackage{xcoffins}     \nonzeroparskip     \setlength{\parindent}{0pt}     \isopage     \checkandfixthelayout     \begin{document}     \NewCoffin \tpage     \NewCoffin \tbar         \SetHorizontalCoffin \tbar              {\color{blue} \rule{\textwidth}{1pc}}     \NewCoffin \kim         \SetHorizontalCoffin \kim              {\includegraphics[width=2in]{ubiquitous-surveillance-warning.png}}     \JoinCoffins \tpage \tbar     \JoinCoffins \tpage[\tbar-b,\tbar-r] \kim[t,r]     \JoinCoffins \tpage[\kim-b,\kim-r] \tbar[t,r]     % ===================================================================     \JoinCoffins \tpage[\tbar-b,\tbar-l] \kim[t,l] % <-- This is the line     % ===================================================================     \TypesetCoffin \tpage     \end{document}      and its result, in which you can see that the second copy of the graphic is "correctly" placed relative to the second instance of the `\tbar` coffin: ![xcoffins output](http://i.stack.imgur.com/EmDsN.png)


title: A little change in unsrtnat

text: I am using `natbib` and `unsrtnat.bst`. I want to change `FUNCTION {format.chapter.pages}` and `FUNCTION {format.in.ed.booktitle}` in order to get something like this: > page 12-34, chapter 5 in Very nice book Any suggestions?


title: editing and sorting references

text: I have a project split into several `tex` files that I make through `Sweave` (an R function that weaves together LaTeX and R code). One of the files contains lines for references:               \section{Viri in reference}     \def\section*#1{}     \bibliographystyle{/media/spajza1/tex/styles/diploma2}     %\bibliographystyle{unsrtnat}     \bibliography{/media/spajza1/clanki/bazaclankov}      I create the pdf in the following manner.               pdflatex diploma; bibtex diploma; pdflatex diploma; pdflatex diploma      `diploma.tex` contains links to other segments of the project through `\include`. One of them is the above mentioned file with code for references. Because I have a few references starting with local characters, the order is not as I would want it to be. Where (or when in the sequence of producing a pdf) can I change the order of references (and perhaps edit them a bit)? I use JabRef as a reference manager. _EDIT_ I will add these few lines for posterity if I need to come back later to see how I resolved this.               @TECHREPORT{Stirn1981,       author = "{\noopsort{Stirn} Štirn, J.}",       title = {Manual of methods in aquatic environmental research},       institution = {Food and agriculture organization of the united nations},       year = {1981},       timestamp = {2010.09.05}     }


title: pdf_tex file not found

text: I'm trying to include an image (edited in Inkscape) in my document. However, everytime I run the file , it says "File not found". In Inkscape i have saved the document as .pdf and used the latex option as given by: http://www.howtotex.com/tips-tricks/inkscape-images-with-latex- fonts/ I have tried:   * export area as page   * export area as drawing, to find out if that may be the problem, but error still persist. Both the .pdf as .pdf_tex file are in the same file as my .tex file. **Note** : The example image (given in link above), also in the same file as my .tex file, works perfectly. This is the code i'm using:               \documentclass[]{article}     \usepackage{graphicx}     \usepackage{color}     \usepackage{transparent}     \begin{document}     \begin{figure}[htb]     \centering     \def\svgwidth{200pt}     \input{drawing4.pdf_tex}     \caption{Double pendulum}     \end{figure}     \end{document}      This is the error message that keeps showing up: ![enter image description here](http://i.stack.imgur.com/CuTIY.png) I am using Texmaker and Inkscape 0.48 Any help will be much appreciated Kind regards, Andrew * * * **EXTRA** : So I think i should add this to give a little more insight into the problem. This is the image i want to include in my document. The graph I copied it from another document using sniptool and paste it in Inkscape. I want to give it a header and add the symbols underneath so it can have the same font as my tex document. You know, to have a nice and uniform document. When I draw some random figures in Inkscape and include text such as MoS$_2$ and export it to pdf+LaTeX, it work perfect. I think it has something to do with editing this image. What I added was: the text in the top and bottom and the blue numbers **Question reformulation:** Can I edit a photo/image (adding text, arrows etc) in Inkscape and export it to pdf+latex and have it work perfectly? Thank you in advance! ![enter image description here](http://i.stack.imgur.com/iuNgs.png)


title: Lilyglyphs how to design stem

text: I need to set a new command for drawing a minim with mensural notehead using LilyGlyphs. So far I have made a notehead which is a single character:               \documentclass{article}     \usepackage{lilyglyphs}     \begin{document}          \halfNote %shows a minim          \meaning\halfNote          \newcommand*{\minima}[1][]{%         \setkeys{lilyDesignOptions}{scale=2.25,raise=.75}%         \lilyPrint[#1]{\lilyGetGlyph{noteheads.s1neomensural}}%     }          \minima           \end{document}      but I can't figure out how to make the stem. I tried to analyze the macro for a half note (I'd just need to change the notehead and fix the stem position if I could copy it) but I guess this is too advanced for me. macro:->\@protected@testopt \halfNote \halfNote {} Anyone could help me? Thank you, A


title: Use of \everyeof and \endlinechar with \scantokens

text: The e-TeX `\scantokens` primitive allows retokenization of input. However, it is almost always used in a group where `\everyeof` and `\endlinechar` are set (see for example Can I convert a string to catcode 11?). What is the reasoning for requiring these two steps?


title: Formatting LaTeX-dump from Mathematica equations for A4-paper without manual adjusting?

text: _I asked this questionhere in Mathematica.SE but they encouraged to ask also on this site._ ![enter image description here](http://i.stack.imgur.com/lPUcr.png) How can make this writing process easier from Mathematica to LaTeX? Please, note that I have a lot of variables and I want to make them visible to the reader, I am not much interested how but not over the page so have to break the equations and perhaps other formatting, possible to get it directly from Mathematica? **Mathematica Code**               AA = -a*g/(A*(2*g*h)^(1/2));     aa = (F1 + F2)^2/(2*a^2*g);     BB = 2/A;     Du = F1 + F2 - 1.2;     Dx = h - aa;     Px = AA*Dx - BB*Du // Simplify;          {AA, aa, BB, Du, Dx, Px} // TeXForm (*perhaps wrong way here? I want to show the above lines fast and accessible to the reader*)      **Out**               \left\{-\frac{a g}{\sqrt{2} A \sqrt{g h}},\frac{(\text{F1}+\text{F2})^2}{2 a^2        g},\frac{2}{A},\text{F1}+\text{F2}-1.2,h-\frac{(\text{F1}+\text{F2})^2}{2 a^2 g},-\frac{\frac{\sqrt{2} a g        \left(h-\frac{(\text{F1}+\text{F2})^2}{2 a^2 g}\right)}{\sqrt{g h}}+4. (\text{F1}+\text{F2}-1.2)}{2 A}\right\}      **My by-hand edited thing, time-consuming (too long, have to break it somehow)**               \begin{equation}     \begin{split}     {A',a',B',\Delta u, \Delta x, \partial x} := \left\{     -\frac{a g}{\sqrt{2} A \sqrt{g h}}, \\     \frac{(\text{F1}+\text{F2})^2}{2 a^2 g}, \\     \frac{2}{A}, \\     \text{F1}+\text{F2}-1.2, \\     h-\frac{(\text{F1}+\text{F2})^2}{2 a^2 g}, \\     -\frac{\frac{\sqrt{2} a g \left(h-\frac{(\text{F1}+\text{F2})^2}{2 a^2 g}\right)}{\sqrt{g h}}+4. (\text{F1}+\text{F2}-1.2)}{2 A} \\     \right.     \end{split}     \end{equation}      **Perhaps related**   1. How to break long equation?


title: Straight quotes?

text: How do I get a straight quote instead of curly quotes? I’m not inside `verb` or `listing` or any other special environments, and I’m not using XeLaTeX or anything—just normal LaTeX. I don’t want to change all quotes, just get the occasional straight quote. For example, I’d like a way to get something like this in the TeX:               ... some examples of these glyphs are curly quotes (``''),     straight quotes ('"), and angled quotes ($'$$"$) ...      to look like this in the output:               ... some examples of these glyphs are curly quotes (“”),     straight quotes ('"), and angled quotes (′″) ...      As I’m using an academic-publisher-provided template that does its own required font setup, I’m extremely wary of changing fonts or font encodings. I think the template uses the `times` package, and the formatting instructions say all fonts must be Type 1.


title: Who can solve my text positioning problem in my colored tabu header row?

text: I've a positioning problem in my tabu header. If I define the text color with `rowfont`, the text in that row will jumping around like a rabbit.               \documentclass[]{scrlttr2}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[ngerman]{babel}     \usepackage{colortbl}     \usepackage{tabu}     \usepackage{xcolor}          \definecolor{TableHeaderColor}{HTML}{444444}     \definecolor{TableHeaderBackgroundColor}{HTML}{EEEEEE}          \begin{document}         \begin{tabu} to \textwidth {c X}             \rowfont{\bfseries\footnotesize\color{TableHeaderColor}}             \taburowcolors{TableHeaderBackgroundColor .. TableHeaderBackgroundColor}             Header & Test \\ \hline             \taburowcolors{white .. white}             Bla & bla \\ \hline             \rowfont{\bfseries\footnotesize\color{TableHeaderColor}}             \taburowcolors{TableHeaderBackgroundColor .. TableHeaderBackgroundColor}             Footer & bla         \end{tabu}          \end{document}      The resoult is the following: ![enter image description here](http://i.stack.imgur.com/cY9rS.png) # Update According to Gonzalo Medina's answer I did this changes:               \begin{tabu} to \textwidth {X[1,m,c] X[9,m]}      The positioning is still not perfect. The baseline isn't the same. ![enter image description here](http://i.stack.imgur.com/YrmPi.png) # Update #2 After I added `\strut` as Gonzalo Medina recommended, I've still the problem if I'm using `\usepackage{lmodern}`. ![enter image description here](http://i.stack.imgur.com/Rr9uM.png)


title: Looking for a specific symbol used in set theory, can't find on detexify

text: I'm looking for a specific symbol for typesetting my lecture notes in logic and set theory. The character is used to define a new set from two existing sets alpha and beta (which are ordinals): ![Formula](http://i.stack.imgur.com/O7Qcc.jpg) In the above image, the `\bot` character is not what I want: instead of one vertical line I would like two parallel ones. Detexify found `\coprod` and `\amalg` (upside down product signs), which are close, but ideally the symbol that I'm looking for should be sans-serif. In other words, I would like a symbol that is to `\bot` what `\vDash` is to `\vdash`. Unfortunately, I do not know the name of the operation that this symbol is representing, so meaning-based googling is ruled out. Could anybody possibly help me out? I greatly appreciate your answers.


title: Per-page shared counter

text: I’m trying to number some objects on a per-page basis with a shared counter. The following example is close to minimal.               \documentclass{article}          \usepackage{zref-perpage}          \newcommand*{\tablecaption}[1]{%       \setlength{\belowcaptionskip}{\abovecaptionskip}%       \setlength{\abovecaptionskip}{0pt}%       \caption{#1}%     }          \newcounter{maincounter}          \newtheorem{theorem}{Theorem}     \newtheorem{proposition}[theorem]{Proposition}          \makeatletter     \let\c@equation\c@maincounter     \let\c@figure\c@maincounter     \let\c@table\c@maincounter     \let\c@theorem\c@maincounter     \makeatother          \zmakeperpage{maincounter}     %\zmakeperpage{equation}     %\zmakeperpage{figure}     %\zmakeperpage{table}     %\zmakeperpage{theorem}          \renewcommand*{\themaincounter}{\arabic{zpage}.\arabic{maincounter}}     \renewcommand*{\theequation}{\themaincounter}     \renewcommand*{\thefigure}{\themaincounter}     \renewcommand*{\thetable}{\themaincounter}     \renewcommand*{\thetheorem}{\themaincounter}          \begin{document}     %     \begin{theorem}     Blah.     \end{theorem}     %     \begin{table}[h]     \centering     \tablecaption{A table}     \begin{tabular}{l | l}     1 & 2 \\     \hline     3 & 4     \end{tabular}     \end{table}     %     \begin{equation}     a = b     \end{equation}     %     \begin{figure}[b]     \centering     \rule{3cm}{2cm}     \caption{A black rectangle}     \end{figure}     %     \begin{proposition}     Blah.     \end{proposition}     %     \newpage     %     \begin{equation}     c = d     \end{equation}     %     \begin{table}[t]     \centering     \tablecaption{Another table}     \begin{tabular}{l | l}     a & b \\     \hline     c & d     \end{tabular}     \end{table}     %     \begin{theorem}     Blah.     \begin{equation}     e = f     \end{equation}     \end{theorem}     %     \end{document}      The problem is that the counter `maincounter` is not reset at each change of page and that the value of the counter `zpage` is always 0. If I uncomment the commented lines in the preamble, the per-page reset works and the counter `zpage` is incremented but the counters are not linked any longer. As a bonus, I would like the different objects on each page to be numbered in their order of apparition (maybe something like the `\MakeSorted` command of the `perpage` package). * * * ## Update Thanks to David Carlisle’s comment, I was able to use the code related to the `perpage` option from the `footmisc` package and make it work with any counter. One relatively constraining aspect of this solution is the need to patch the commands that print the number of the corresponding objects: we have to surround them with some code which checks whether there is a change of page or not and consequently sets the associated counter. Such patching hence depends on the loaded packages and their possible redefinitions. (Here, I am working with `amsmath` and `amsthm`.) Linking the counters is very easy, then: I just need to load the per-page machinery for one ‘main’ counter and identify the others to that one. As for the number of the current page within the numbering of the different objects, I tried to make a label before incrementing the counter and printing it (through patches, as previously) in order to then be able to use `\pageref`. However, there is something wrong with those patches: they break the mechanism of references; some incorrect values of the counter and the page are _sometimes_ — or is it always? — read and written. Here is the code with some testing inside the document. The incorrect references are indicated with the command `\wrong`, which prints its argument in red.               \documentclass[a4paper, 11pt]{article}          % amsmath redefines the \label command, which messes up the mechanism that prints the current page number     \makeatletter     \let\label@original\label     \makeatother          \usepackage{etoolbox}     \usepackage{amsmath}     \usepackage{amsthm}     \usepackage{xcolor}          \allowdisplaybreaks          \makeatletter          \providecommand\protected@writeaux{%       \protected@write\@auxout     }          % Get and print the current page number     \newcounter{currentpage@mark}     \def\theCurrentPageMark{%       \global\advance\c@currentpage@mark\@ne       \label@original{currentpage@mark\the\c@currentpage@mark}%     }     \def\theCurrentPageRef{%       \expandafter\pageref{currentpage@mark\the\c@currentpage@mark}%     }          % Load some commands that reset a counter at each change of page     \def\load@PerPage@machinery#1{%       \expandafter\newif\csname ifPerPage@#1@hint\endcsname       \newcounter{PerPage@#1@next@reset}       \expandafter\newif\csname ifPerPage@#1@towrite\endcsname       \@nameuse{PerPage@#1@towritefalse}            \global\@namedef{PerPage@#1@initial@stab}{\@addtoreset{#1}{page}}       \AtBeginDocument{\@nameuse{PerPage@#1@initial@stab}}       \newcounter{@#1@serial}       \@namedef{PerPage@#1@cpage}{0}       \@nameuse{PerPage@#1@hinttrue}            \@namedef{PerPage@#1@hint}{%         \setcounter{#1}{0}%         \protected@writeaux\relax{\expandafter\protect\csname PerPage@#1@hinttrue\endcsname}%         \@tempcnta\csname c@@#1@serial\endcsname%         \advance\@tempcnta\@ne         \global\expandafter\csname c@PerPage@#1@next@reset\endcsname\@tempcnta       }            \AtBeginDocument{%         \protected@writeaux\relax{%           \protect\providecommand{\expandafter\protect\csname PerPage@#1@hinttrue\endcsname}{}%         }%       }            \@namedef{PerPage@#1@lastfoot}{-1}            \@namedef{PerPage@#1@aux}##1##2{%         \ifnum\csname PerPage@#1@lastfoot\endcsname<##1%           \@nameuse{ifPerPage@#1@hint}%             \@nameuse{PerPage@#1@reset}{##1}{##2}%             \@nameuse{PerPage@#1@hintfalse}%           \else             \gdef\@tempa{##2}%             {\expandafter}\expandafter\ifx\csname PerPage@#1@cpage\endcsname\@tempa             \else               \@nameuse{PerPage@#1@reset}{##1}{##2}%             \fi           \fi           \@namedef{PerPage@#1@lastfoot}{##1}%         \fi         \global\cslet{PerPage@#1@initial@stab}{\relax}%       }            \@namedef{PerPage@#1@reset}##1##2{%         \global\@namedef{PerPage@#1@cpage}{##2}%         \expandafter\gdef           \csname PerPage@#1@next-\@nameuse{PerPage@#1@prev@foot}\endcsname{##1}%         \@namedef{PerPage@#1@prev@foot}{##1}%         \expandafter\xdef           \csname PerPage@#1@next-\@nameuse{PerPage@#1@prev@foot}\endcsname{\the\@MM}%       }            \@namedef{PerPage@#1@prev@foot}{root}            \AtBeginDocument{%         \protected@writeaux\relax{%           \protect\providecommand{\expandafter\protect\csname PerPage@#1@aux\endcsname}[2]{}%         }%         \csname c@PerPage@#1@next@reset\endcsname\@ne       }            \AtEndDocument{%         \csletcs{PerPage@#1@aux}{PerPage@#1@endaux}%         \@namedef{PerPage@#1@lastfoot}{-1}%         \@nameuse{PerPage@#1@hintfalse}%         \@namedef{PerPage@#1@prev@foot}{root}%       }            \@namedef{PerPage@#1@endaux}##1##2{%         \ifnum\csname PerPage@#1@lastfoot\endcsname<##1%           \@nameuse{ifPerPage@#1@hint}%             \@nameuse{PerPage@#1@reset@end}{##1}{##2}%             \@nameuse{PerPage@#1@hintfalse}%           \else             \gdef\@tempa{##2}%             {\expandafter}\expandafter\ifx\csname PerPage@#1@cpage\endcsname\@tempa             \else               \@nameuse{PerPage@#1@reset@end}{##1}{##2}%             \fi           \fi           \@namedef{PerPage@#1@lastfoot}{##1}%         \fi       }            \@namedef{PerPage@#1@reset@end}##1##2{%         \def\@tempa{##1}%         {\expandafter}\expandafter\ifx\csname PerPage@#1@next-\@nameuse{PerPage@#1@prev@foot}\endcsname\@tempa         \else           \@tempswatrue         \fi         \global\@namedef{PerPage@#1@prev@foot}{##1}%         \global\@namedef{PerPage@#1@cpage}{##2}%       }            \pretocmd{\clearpage}{\@nameuse{PerPage@#1@hint}}{}{}            \@namedef{PerPage@#1}{%         \if@minipage\else           \global\expandafter\advance\csname c@@#1@serial\endcsname\@ne           \if@filesw             \expandafter\xdef\csname PerPage@#1@writetemp\endcsname{%               \noexpand\protected@writeaux\relax{%                 \expandafter\string\csname PerPage@#1@aux\endcsname%                   {\the\@nameuse{c@@#1@serial}}{\noexpand\thepage}%               }%             }%             \@nameuse{PerPage@#1@towritetrue}%           \fi           \ifnum\csname c@PerPage@#1@next@reset\endcsname>\csname c@@#1@serial\endcsname           \else             \global\expandafter\csname c@#1\endcsname\@ne             \expandafter\let\expandafter\@tempa               \csname PerPage@#1@next-\number\csname c@PerPage@#1@next@reset\endcsname\endcsname             \ifx\@tempa\relax               \global\expandafter\csname c@PerPage@#1@next@reset\endcsname\@MM             \else               \global\expandafter\csname c@PerPage@#1@next@reset\endcsname\@tempa             \fi           \fi         \fi       }            \@namedef{PerPage@#1@end}{%         \@nameuse{ifPerPage@#1@towrite}%           \@nameuse{PerPage@#1@writetemp}%           \@nameuse{PerPage@#1@towritefalse}%         \fi       }     }          \newcounter{maincounter}     \load@PerPage@machinery{maincounter}          % Patch some numbering commands to take into account the page number and the resetting     \newtheoremstyle{thmstyle}%       {\topsep}%       {\topsep}%       {\itshape}%       {}%       {\bfseries}%       {.}%       { }%       {\thmname{#1}%        \thmnumber{\@ifnotempty{#1}{ }%                   \theCurrentPageMark                   \PerPage@maincounter                   \@upn{#2}%                   \PerPage@maincounter@end}%        \thmnote{ {\the\thm@notefont(#3)}}}          \theoremstyle{thmstyle}     \newtheorem{theorem}{Theorem}     \newtheorem{proposition}[theorem]{Proposition}          \pretocmd{\@footnotemark}{%       \theCurrentPageMark       \PerPage@maincounter       \global\csname c@\@mpfn\endcsname\c@footnote       \protected@xdef\@thefnmark{\thempfn}%     }{}{}     \apptocmd{\@footnotemark}{%       \PerPage@maincounter@end     }{}{}          \pretocmd{\tagform@}{%       \theCurrentPageMark       \PerPage@maincounter     }{}{}     \apptocmd{\tagform@}{%       \PerPage@maincounter@end     }{}{}          \pretocmd{\@caption}{%       \theCurrentPageMark       \PerPage@maincounter     }{}{}     \apptocmd{\@caption}{%       \PerPage@maincounter@end     }{}{}          % Link the counters     \let\c@footnote\c@maincounter     \let\c@equation\c@maincounter     \let\c@theorem\c@maincounter     \let\c@figure\c@maincounter     \let\c@table\c@maincounter          \renewcommand{\thefootnote}{\theCurrentPageRef.\arabic{footnote}}     \renewcommand{\theequation}{\theCurrentPageRef.\arabic{equation}}     \renewcommand{\thetheorem}{\theCurrentPageRef.\arabic{theorem}}     \renewcommand{\thefigure}{\theCurrentPageRef.\arabic{figure}}     \renewcommand{\thetable}{\theCurrentPageRef.\arabic{table}}          \newcounter{rptcount}     \long\def\rpt#1#2{%       \setcounter{rptcount}{#1}%       \loop #2%         \ifnum\therptcount>1 \addtocounter{rptcount}{-1}%         \repeat     }          \def\brack@iden[#1]{#1}          \newcommand*{\blindtext}[1]{%       \ifnum#1<\@ne       \else\ifnum#1=\@ne         Blah%       \else         Blah, %         \rpt{\numexpr#1-2\relax}{blah, }%         blah%       \fi\fi       \@ifnextchar[\brack@iden.%     }          \makeatother          \newcommand*{\tablecaption}[1]{%       \setlength{\belowcaptionskip}{\abovecaptionskip}%       \setlength{\abovecaptionskip}{0pt}%       \caption{#1}%     }          \newcommand*{\wrong}[1]{%       \textcolor{red}{#1}%     }          \begin{document}     %     \begin{theorem}\label{thm1}     Blah.     \end{theorem}     %     \begin{table}[h]     \centering     \tablecaption{A table}     \begin{tabular}{l | l}     1 & 2 \\     \hline     3 & 4     \end{tabular}     \end{table}     %     \begin{equation}\label{eq1}     a = b     \end{equation}     %     \begin{figure}[b]     \centering     \rule{3cm}{2cm}     \caption{A black rectangle}\label{fig1}     \end{figure}     %     \begin{proposition}     Blah.     \end{proposition}     %     Theorem~\wrong{\ref{thm1}}. Equation~\eqref{eq1}. \blindtext{301}\space Table~\ref{tbl1}. Equation~\eqref{eq2}.\par     %     \begin{equation}     c = d     \end{equation}     %     \begin{table}[t]     \centering     \tablecaption{Another table}\label{tbl1}     \begin{tabular}{l | l}     a & b \\     \hline     c & d     \end{tabular}     \end{table}     %     \begin{theorem}     Blah.     \begin{equation}     e = f     \end{equation}     \end{theorem}     %     Footnote~\ref{fn1}. \blindtext{398}[\footnotemark], blah\footnotemark, blah\footnote{\label{fn1}A footnote.}. Footnote~\ref{fn1}. Theorem~\wrong{\ref{thm1}}. Equations~\eqref{eq1} and~\eqref{eq2}. Figure~\ref{fig1}.\par     %     \blindtext{519}     %     \begin{align}     \alpha &= \beta \\     \gamma &= \delta \\     \varepsilon &= \zeta \label{eq2}     \end{align}     %     \blindtext{528}\space Figure~\wrong{\ref{fig2}}. Proposition~\wrong{\ref{prop1}}.\par     %     \begin{proposition}\label{prop1}     Blah.     \end{proposition}     %     Proposition~\wrong{\ref{prop1}}.     %     \begin{figure}[p]     \centering     \rule{4cm}{3cm}     \caption{Another black rectangle}\label{fig2}     \end{figure}     %     \end{document}


title: How to align text to the right in math mode?

text: I have a table of formulas, some have a description next to them, I want the equations to appear left flush and the text between parentheses right flush. I was writing it in the following way.               \documentclass[letterpaper,10 pt,twocolumn,fleqn]{article}     \setlength{\columnsep}{2.5cm}     \usepackage[inner=2.5cm,outer=2.5cm,bottom=2.5cm,top=2.5cm,landscape]{geometry}     \usepackage{nopageno,array,graphicx,amsbsy,amsfonts}      \usepackage{amsmath}      \begin{document}            \[{\bf P} = \int_{t_i}^{t_f}{\bf F}\,dt = \Delta{\bf p}\mbox{\hspace{7mm} (Impulse) }\]     \[\frac{dA}{dt} = \frac{l}{2\mu}=cte \mbox{\hspace{7mm} (Kepler's Second Law) }\]     \end{document}      but the alignment is different for each equation.


title: How to change exercise numbers?

text: I am looking for simple code that simply makes me change the exercise numbers instead of the usual ordering "1, 2, 3, 4,....$ For example, I am doing a homework involving exercises 1, 5 and then 1, 2. I would like it to show Exercise 1 Exercise 5 Exercise 1 Exercise 2 Instead of Exercise 1 Exercise 2 ...


title: Defining tabular rows with macros using `\ifnum` leads to `Incomplete \ifnum`

text: I am trying to define tabular rows using a macro which shall perform an conditional definition of the tabular row according to a given parameter. Please consider the following MWE:               \documentclass{article}          \newcommand{\test}[3]{         \ifnum\numexpr#1\relax=0             #2 & %#3         \else             #2 & #3         \fi     }          \begin{document}              \begin{tabular}{ll}             \test{0}{col1-1}{col1-2} \\             \test{1}{col2-1}{col2-2} \\         \end{tabular}          \end{document}      Removing the comment in the fifth line (`#2 & %#3` ⟶ `#2 & #3`) leads to the error message `Incomplete \ifnum; all text was ignored after line 14`. Even after hours of searching the web I am not able to solve this issue. What am I doing wrong? # Edit @David Carlisle, @egreg, and @Francis: Thank you all very much for your answers. I tried all of your examples, and they all solve my issue. Although I think that the solution of @egreg is the formally accurate way to go, I consider the solution of @David Carlisle to be more elegant for my use case just for the sake of simplicity and brevity, while considering the answer of @Francis as a workaround. So I decided to mark the answer of @David Carlisle as the accepted one, without wanting to neglect the other answers. Thank you very much for your help!


title: Which methods of optimization are possible with this piece of LaTeX?

text: For those of you who are familiar with my questions, you would know that I'm a newbie. If you don't, well you know now. What is the problem with this piece of LaTeX? There aren't any major errors, it's just if there was a way to maybe optimize it a little.               \:\:\:\:\left(\sqrt{2}+\sqrt{3}\right)^2\\=\left(\sqrt{2}\right)^2+2\times\sqrt{2}     \times\sqrt{3}+\left(\sqrt{3}\right)^2\\=2+2\sqrt{6}+3\\=5+2\sqrt{6}


title: What do the pieces of LaTeX, \left and \right, respectively mean?

text: What are their uses and are they even standard?


title: Estout and dcolumn: Overriding decimal alignment

text: I'm using estout (esttab actually) to produce a table in Latex from Stata. I'm using the dcolumn package to align the decimal places in my table. I want to override the alignment for a single row; to be specific the number of observations row. Is there a way of doing this? Or, equivalents, if there a way to prefix each element in a row with "\multicolumn{1}{c}{" and suffix with "}", which would override the dcolumn alignment? Example:               \begin{table}[htbp]\centering     \caption{My Table}     \begin{tabular}{l*{3}{D{.}{.}{-1}}}     \toprule                                 &\multicolumn{1}{c}{Mean/s.d.}&\multicolumn{1}{c}{Mean/s.d.}&\multicolumn{1}{c}{Mean/s.d.}\\     \midrule     Var A               &        8.68&        8.51&        8.92\\                         &        2.42&        2.51&        2.26\\     Var B               &        2.14&        1.98&        2.37\\                         &        1.33&        1.29&        1.35\\     \midrule     Observations        &       38040&       22054&       15986\\     \bottomrule     \end{tabular}     \end{table}      Thanks!


title: What is the LaTeX filename length limit for images?

text: **See Final Update below.** I have some images with very long filenames and/or paths, and when I try to include them, my document appears to build fine, but when I try to open the PDF, it says the document is corrupted and when I look at the filesize, it's very small. If I rename the same image to a very short name, it works fine. Can anyone tell me the filename length limit for images or input files in general? And is there a way to increase it or do I have to rename all problematic files? Thanks! **Update 1** For whatever reason, this problem was solved by explicitly adding the extension to the image filename when including it, rather than letting Latex add the filename based on the list of graphics extensions. Not sure why this made a difference, but it's working now. **Update 2** OK, to this problem is.. intermittent?! I first encountered this problem two days ago, and thought I'd solved it with Update 1. Left my thesis alone after a full error-free compile. Today, after making no changes, when I build it, the build finishes fine, although there are some strange warnings, e.g. undefined citations that I know are defined because I see them in my bib file and they've never been an issue before. However, despite building without errors, when I try to open the PDF, Acrobat says it is corrupted, as per my original question. I also notice the size is not right; my thesis should be around 20MB right now, and when this happens, it's around 17MB. Curiously though, moving my whole Latex project folder to the root of my hard drive seems to fix it, which gets me back to the question about possible filename length issues. It just seems weird that it would be intermittent; Latex systems may have some problems, but intermittent compile issues when nothing in the source has changed are not a class of problem I've encountered before. Any thoughts? My thesis is currently about 110 pgs, long bibliography, various lists (notation, figures, TOC, etc). That doesn't seem that crazy to me considering how long some PhD theses are, but is there any possibility I'm running into some sort of output buffer error or something? **Final Update** The intermittent behaviour mentioned above was probably a mistake on my behalf. After a lot of experimenting, I found that simply shortening the paths and image filenames solved my problem. I did not experiment enough to determine the exact cutoff for length, but the problematic filenames before the switch were up to 141 characters long including the path and extension. After shortening path and filenames, the longest are 105 characters, and everything's building fine now. So, the cutoff for my system must be somewhere in that range. For reference, I am building using MikTeX 2.8 and TeXnic Center 2 Alpha 3 on Windows 7 x64.


title: backslashbox is too wide

text: I feel the first column in my longtable is too wide. Please see the figure below ![alt text](http://i.stack.imgur.com/4yc3i.png) My code is:               \begin{center}       \begin{longtable}{|c|c|c|c|c|c|}       \caption{Error rates for SVM and 100 random counts. \label{tab:2}}\\       \hline       \backslashbox{Concepts}{Train sizes} & 10 & 100 & 1000 & 10000 & 100000\\       \hline       1 & 0.49 (0.00) & 0.49 (0.00) & 0.47 (0.00) & 0.43 (0.00) & 0.33 (0.00)\\       \hline       \end{longtable}       \end{center}        I wonder if there is some way to reduce the width of the first column? Thanks and regards! * * * EDIT: As Hugo suggested, I tried to specify the width for the first column.               \begin{longtable}{|p{50pt}|c|c|c|c|c|}        But it appears messed up ![alt text](http://i.stack.imgur.com/UQFTU.png)


title: Drawing of matching boxes in LaTeX

text: I want to draw a split with diffrent blocks inside each one there is the block index. Since I am new to LaTeX, I tried to use               \fbox{$b_{0}$}\fbox{$b_{1}$}\fbox{$b_{2}$}%     \fbox{$..........................$}%     \fbox{$b_{S.t -1}$}\fbox{$b_{s.t}$}       However, this gives boxes of different sizes. Is there any other suggestion.


title: Indent as much as the width of a word

text: Here is my basic problem: I want to write on a line               Thesis: "something really long that              should continue here like this"      How can I do that? (without tabular) Edit: I am using this inside a tabular environment like this:               \documentclass[a4paper,10pt]{article}          \begin{document}     \begin{tabular}{r|p{11cm}}       other lines & text here \\     &Thesis: "something really long that\\     &should continue here like this"\\     \end{tabular}          \end{document}


title: output does not contain 'et al.', although the citation abbreviates to one author

text: i have found many helpful answers to other question here, so i hope you can solve my problems as well. I'm currently writing my masters thesis and had to change to using biblatex, which brought a lot of problems along. For me it looked like the solutions in biblatex – et al. beginning from second citation? would shorten several authors down to et al. after the second name, but it doesn't. I do always only get the first author and the year without the "et al." I could only find other questions around here on changing the et al. into different languages or symbols, but not on creating it! Here is my code:               \documentclass[12pt,a4paper,oneside]{article}     \usepackage[english, ngerman]{babel}     \usepackage[ansinew]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{hyperref}          \usepackage[backend=biber,     style=authoryear-comp,      bibstyle= authoryear,     citetracker=true,     maxnames=99,     maxcitenames=2,     sorting=nyt,     uniquelist=false,     natbib=true,     useprefix=true     ]{biblatex}          \usepackage[babel]{csquotes}     \addbibresource{literatur.bib}          \AtEveryCitekey{\ifciteseen{}{\defcounter{maxnames}{99}\clearfield{namehash}}}%     \DeclareNameAlias{sortname}{last-first}%     %     \let\oldmultinamedelim\multinamedelim %altes Trennzeichen speichern     \let\oldfinalnamedelim\finalnamedelim %altes Trennzeichen speichern     \renewcommand*{\multinamedelim}{~,\space} %     \renewcommand*{\finalnamedelim}{~\&\space} %          \AtBeginBibliography{%     \renewcommand*{\multinamedelim}{\oldmultinamedelim}%     \renewcommand*{\finalnamedelim}{\oldfinalnamedelim}%     }                    \begin{document}\selectlanguage{english}          The study of \textcite[][]{Behr} \\     They say \textcite[][]{Behr} \\     ..substantial lack of understanding" \parencite[][]{Behr}               \printbibliography[title={References}]     \addcontentsline{toc}{section}{References}\label{sec:ref}          \end{document}      with the article for literatur.bib:               @article{Behr,      author ={Behr, M. and Wachsmuth, I. and Post, T. and Lesh, R.},     title ={Order and {E}quivalence of {R}ational {N}umbers: {A} {C}linical {T}eaching {E}xperiment},      journal ={Journal for {R}esearch in {M}athematics {E}ducation},     volume ={15},      year ={1984},      pages ={323--341}     }      What comes out is: ![resulting text](http://i.stack.imgur.com/REIif.jpg) And as i just noticed there is another mistake: Why does it put spaces bevor the commas, isn't the ~ ment to prevent this? -> This was solved by deleting the ~. Thank you for helping in advance.


title: braces over matrix

text: I want to make an overbrace and a side brace on my matrix in order to indicate its size. How can I achieve that.                 \begin{pmatrix}       1 & 1 & 0 & .& . & . & 0 & 1  \\       0 & 0 & 1 & .& . & . & 1 & 0 \\      .\\      .\\      .\\       0 & 1 & 1 & . & . & . & 1 & 1      \end{pmatrix}


title: Overriding printer scaling defaults from within LaTeX

text: **Edited version of question** I have to produce a series of documents that need to be printed without scaling. The target users are likely to have low-level computer skills and will overlook instructions like: _When printing, choose Paper Handling > Page Scaling > None_. Can I get LaTeX to embed the relevant code directly into the pdf? * * * **Original version of question** Using `geometry.sty`, I have specified the margin of this document to have two text blocks with the following offsets, in landscape:   * left margin = 0.75 inches   * space between text blocks = 1.5 inches   * right margin = 0.75 inches The paper size is 8.5 x 11 inches = US letter. Yet, when colleagues in the US print the document (single sided, or double sided with long-edge binding), the results are very variable:   * p4-p1: left=1, mid=0.94, right=0.75  p2-p3: left=0.69, mid=0.94, right=1.125 (inches)   * p4-p1: left=0.63, mid=0.97, right=0.75  p2-p3: left=0.69, mid=0.97, right=0.69 (inches)   * on an old single sided printer:  left=0.81, mid=0.94, right=0.81 (inches) It looks like different viewers and/or printers are tampering with my dimensions. Is there some way to avoid this?


title: Tikz-Create a Picture Legend

text: I am trying to create a legend inside a `tikzpicture`. The picture shows an accelerator and I would like to make a legend that will explain each part. My code is               \documentclass{standalone}          \usepackage{tikz}     \usetikzlibrary{positioning}               \begin{document}     \definecolor{tank}{RGB}{98,190,177}       \makeatletter          \pgfdeclareshape{slit}{         \savedanchor\centerpoint{\pgf@x=0cm\pgf@y=0cm}         \saveddimen\halfwidth{             \pgf@x=.25cm             \pgfmathsetlength\pgf@xa{.5*\pgfkeysvalueof{/pgf/minimum width}}             \ifdim\pgf@x<\pgf@xa\pgf@x=\pgf@xa\fi}         \saveddimen\halfheight{             \pgf@x=.25cm             \pgfmathsetlength\pgf@xa{.5*\pgfkeysvalueof{/pgf/minimum height}}             \ifdim\pgf@x<\pgf@xa\pgf@x=\pgf@xa\fi}         \anchor{center}\centerpoint         \anchor{north}{             \pgf@process\halfheight             \pgf@x=0cm             \pgf@y=.2cm\advance\pgf@y by\halfheight}         \anchorborder{\centerpoint}         \backgroundpath{             \draw[rounded corners=.1cm](-\halfwidth,-\halfheight)rectangle(\halfwidth,\halfheight);             \draw[rounded corners=.04cm](-.8*\halfwidth,-.4*\halfheight)rectangle(.8*\halfwidth,-.8*\halfheight)(-.8*\halfwidth,.4*\halfheight)rectangle(.8*\halfwidth,.8*\halfheight);}}          \pgfdeclareshape{quadrapole}{         \savedanchor\centerpoint{\pgf@x=0cm\pgf@y=0cm}         \saveddimen\halfwidth{             \pgf@x=.25cm             \pgfmathsetlength\pgf@xa{.5*\pgfkeysvalueof{/pgf/minimum width}}             \ifdim\pgf@x<\pgf@xa\pgf@x=\pgf@xa\fi}         \saveddimen\halfheight{             \pgf@x=.25cm             \pgfmathsetlength\pgf@xa{.5*\pgfkeysvalueof{/pgf/minimum height}}             \ifdim\pgf@x<\pgf@xa\pgf@x=\pgf@xa\fi}         \anchor{center}\centerpoint         \anchor{north}{             \pgf@process\halfheight             \pgf@x=0cm             \pgf@y=.2cm\advance\pgf@y by\halfheight}         \anchorborder{\centerpoint}         \backgroundpath{             \draw[rounded corners=.1cm,fill=white](-\halfwidth,-\halfheight)rectangle(\halfwidth,\halfheight);             \draw[rounded corners=.04cm,fill=red](-.8*\halfwidth,-.4*\halfheight)rectangle(.8*\halfwidth,-.8*\halfheight)(-.8*\halfwidth,-.2*\halfheight)rectangle(.8*\halfwidth,.2*\halfheight)(-.8*\halfwidth,.4*\halfheight)rectangle(.8*\halfwidth,.8*\halfheight);}}          \pgfdeclareshape{lens}{         \savedanchor\centerpoint{\pgf@x=0cm\pgf@y=0cm}         \saveddimen\halfwidth{             \pgf@x=.05cm             \pgfmathsetlength\pgf@xa{.5*\pgfkeysvalueof{/pgf/minimum width}}             \ifdim\pgf@x<\pgf@xa\pgf@x=\pgf@xa\fi}         \saveddimen\halfheight{             \pgf@x=.2cm             \pgfmathsetlength\pgf@xa{.5*\pgfkeysvalueof{/pgf/minimum height}}             \ifdim\pgf@x<\pgf@xa\pgf@x=\pgf@xa\fi}         \anchor{center}\centerpoint         \anchor{south}{             \pgf@process\halfheight             \pgf@x=0cm             \pgfmathsetlength\pgf@y{-1.5*\halfheight-.2cm}}         \anchorborder{\centerpoint}         \backgroundpath{             \draw[fill=white](0,-1.5*\halfheight)--(0,-\halfheight)(0,\halfheight)--(0,1.5*\halfheight)(-\halfwidth,-\halfheight)rectangle(\halfwidth,\halfheight);}}          \pgfdeclareshape{pump}{         \savedanchor\centerpoint{\pgf@x=0cm\pgf@y=0cm}         \saveddimen\halfwidth{             \pgf@x=.1cm             \pgfmathsetlength\pgf@xa{.5*\pgfkeysvalueof{/pgf/minimum width}}             \ifdim\pgf@x<\pgf@xa\pgf@x=\pgf@xa\fi}         \saveddimen\halfheight{             \pgf@x=.3cm             \pgfmathsetlength\pgf@xa{.5*\pgfkeysvalueof{/pgf/minimum height}}             \ifdim\pgf@x<\pgf@xa\pgf@x=\pgf@xa\fi}         \anchor{center}\centerpoint         \anchor{south}{             \pgf@process\halfheight             \pgf@process\halfwidth             \pgf@x=0cm             \pgfmathsetlength\pgf@y{-\halfheight-\halfwidth-.2cm}}         \anchorborder{\centerpoint}         \backgroundpath{             \draw[ultra thick](0,0)--(0,-\halfheight);             \draw[fill=white](0,-\halfheight)circle(\halfwidth);}}          \pgfdeclareshape{source}{         \savedanchor\centerpoint{\pgf@x=0cm\pgf@y=0cm}         \saveddimen\halfwidth{             \pgf@x=.3cm             \pgfmathsetlength\pgf@xa{.5*\pgfkeysvalueof{/pgf/minimum width}}             \ifdim\pgf@x<\pgf@xa\pgf@x=\pgf@xa\fi}         \saveddimen\halfheight{             \pgf@x=.1cm             \pgfmathsetlength\pgf@xa{.5*\pgfkeysvalueof{/pgf/minimum height}}             \ifdim\pgf@x<\pgf@xa\pgf@x=\pgf@xa\fi}         \anchor{center}\centerpoint         \anchor{north}{             \pgf@process\halfheight             \pgf@x=0cm             \pgf@y=.2cm\advance\pgf@y by\halfheight}         \anchor{south}{             \pgf@process\halfheight             \pgf@x=0cm             \pgf@y=-.2cm\advance\pgf@y by-\halfheight}         \backgroundpath{             \draw[fill=white](-\halfwidth,-\halfheight)rectangle(\halfwidth,\halfheight)(-.8*\halfwidth,-1.5*\halfheight)--(-.8*\halfwidth,1.5*\halfheight)(-.4*\halfwidth,-1.5*\halfheight)--(-.4*\halfwidth,1.5*\halfheight)(0,-1.5*\halfheight)--(0,1.5*\halfheight)(.4*\halfwidth,-1.5*\halfheight)--(.4*\halfwidth,1.5*\halfheight)(.8*\halfwidth,-1.5*\halfheight)--(.8*\halfwidth,1.5*\halfheight);}}          \tikzset{steers/.style={fill=white,draw,shape=rectangle,rounded corners=.1cm}}            \begin{tikzpicture}             % source PSU             \draw[step=.2cm](-10.4,2.1)grid(-6.6,3.3)(-6,2.7)node{1};             % slits             \path[slit,minimum height=.9cm,minimum width=.9cm](-6.5,0)node(sl){}(5.5,0)node{}(8,-2)node[rotate=90]{};             % pumps             \path[pump,minimum height=.8cm](-8-1.7320508*.6,.6)node[rotate=150]{}(-8-1.7320508*.6,-.6)node[rotate=30]{};             \path[pump,minimum height=1.3cm,minimum width=.4cm](-3.9,0)node(lo){}(2.3,0)node{}(6.6,0)node[rotate=180]{}(8,-3.1)node[rotate=270]{};             % Tubes             \draw[thick,double,double distance=.1cm](-9.7320508,-1)--(-8,0)--(-9.7320508,1);             \draw[thick,double,double distance=.2cm,rounded corners=.4cm](-8,0)-|(8,-5);             \draw[thick,double,double distance=.3cm,rounded corners=.4cm,line cap=rect](7.1,0)-|node[shift={(.2,.2)}]{11}(8,-.6);             % lines             \draw[thick,double,double distance=.1cm,line cap=rect,fill](8,-5.5)--+(-40:3.5)+(0,0)--+(-70:3.5)+(0,0)--+(-110:3.5)+(0,0)--+(-130:3.5)+(0,0)--+(-150:3.5)+(0,0)--+(-25:3.5);             \draw[fill=white](8,-5.5)+(-70:3.5)circle(.4)node[shift={(.5,.5)}]{13};             % quadrapoles             \path[quadrapole,minimum height=.9cm,minimum width=.9cm](3,0)node(re){}(8,-4.3)node[rotate=90]{};             % lenses             \path[lens](-8-1.7320508*.5,.5)node[rotate=-30]{}(-8-1.7320508*.5,-.5)node[rotate=30]{};             \path[lens,minimum height=.3cm,minimum width=.1cm](-7.3,0)node(le){}(-4.3,0)node{};             % sources             \path[source,minimum height=.4cm,minimum width=1.2cm](-9.7320508,1)node(source1)[rotate=-30]{}(-9.7320508,-1)node(source2)[rotate=30]{};             % steerers             \path(-5.3,0)node[steers](st){\phantom{(}}++(.1,.5)node{7}(4.2,0)node[steers]{\phantom{)}};             % tank             \draw[fill=tank](-1.8,1.3)--(-3.6,.7)--(-3.6,-.7)--(-1.8,-1.3)rectangle node[shift={(0,1.6)}]{9}(.1,1.3)--(1.9,.7)--(1.9,-.7)--(.1,-1.3);             % inflector             \draw[fill=white](-8,0)+(-.1,-.3)--+(-.1,.3)--+(-.3,.3)--+(-.4,.1)--+(-.4,-.1)--+(-.3,-.3)--+(0,-.3)--+(.1,-.1)--+(.1,.1)--+(-.1,.3)node[above]{4};             % switcher             \draw[fill=white](8,-5)+(-.5,-.6)--+(.5,-.6)..controls+(.3,-.4)and+(-.3,-.4)..+(-.5,-.6)--+(-.3,0)--+(.3,0)--+(.5,-.6)node[above right]{12};             % walls             \draw[line width=.17cm](3,-5.6)--(6.9,-5.6)arc[start angle=-180,end angle=0,     x radius=1.1cm,y radius=.9cm]--(10.7,-5.6)(8,-6.5)--(8,-10.5);             % left labels             \path(sl.north)node{6}(lo.south)node{8}(re.north)node{10}(le.south)node{5}(source1.north)node{2}(source2.south)node{3};             %Legend             \node[anchor=east] at (-9,-6) (leg1) {$1$. PSU};             \node[below=1mm of leg1] (leg2) {$2$. Sputter Source};             \node[right=6mm of leg1,anchor=west] (leg8) {$8$. Pumps};         \end{tikzpicture}     \end{document}      and my output is ![enter image description here](http://i.stack.imgur.com/TDHGF.png) I am trying to align the legend entries but I don't know how to do it! I've played around with `anchors` but without any luck at all. Any ideas?


title: The numbering of exercises automatically on table

text: I have several hundred exercises in form               \begin{exercise}          \end{exercise}      where each one is a small own file. I input those through `\input{...}` on master documend. I have done some other questions about these exercises and I explain my purpose here * * * **Here's my question:** it is possible the numbering of the exercises shown in my final .pdf document to appear somehow automatically through **loops** in a **tabular** with three columns where the first column shows the chapter to which exercise belongs, in the second column is the number of exercise and the third column is a page on which the exercise occurs. Unfortunately I do not know if this is possible and obviously if it is possible how could to become ... for this reason I can not give my own example. All I can think of is via `\label` `\ ref` but this I think it's quite hard to be done every time I decide to introduce some exercise in the middle of the text, I must modify whole table * * * Below is the structure of my document               \documentclass[a4paper,10pt]{book}     \usepackage[utf8x]{inputenc}          \newtheorem{exercise}{\Large \bfseries}[chapter]           \begin{document}          \chapter{kinetic }       \input{exercise.435.tex}          \chapter{momentum}       \input{exercise.436.tex}           \end{document}      and the `exercise.435.tex`, `exercise.436.tex`:               \begin{exercise}      Here is the text of the exercise     \end{exercise}


title: Subsubsection and enumerate combination

text: I can't manage to combinate the effects of enumerate and subsubsection in Latex. The output PDF shows a strange error. Here's my code:               \begin{document}     \chapter{Introduzione al Cloud Computing}     ahem     \section{Sicurezza dei sistemi Cloud}     hum     \subsection{Principali vulnerabilità della sicurezza in\\ambiente Cloud}     hey     \begin{enumerate}         \item \subsubsection{Data Breaches}         hello             \begin{itemize}             \item ciao             \end{itemize}         \item \subsubsection{Data Loss}         hi         \item \subsubsection{Account or Service Traffic Hijacking}         bzz         \item \subsubsection{Insecure Interfaces and APIs}         what         \item \subsubsection{Denial of Service}         ohnoes     \end{enumerate}     \end{document}      and here's the strange result: ![Preview](http://i.stack.imgur.com/QILJf.png) subsubsection numbers 2 and 3 are overlapping. If I cut the first item's "sub- itemize", that is:               \begin{itemize}     \item ciao     \end{itemize}      the problem fades away! What am I missing? I am using Texmaker, and the following packages: fancyhdr, indentfirst, graphicx, newlfont, amssymb, amsmath, latexsym, amsthm, xcolor, hyperref, breakurl. Thanks in advance.


title: trim in includegraphics only stretches the image

text: I am using following code to crop left and right part of a certain image and including it.               \documentclass[aip,reprint]{revtex4-1}          \draft % marks overfull lines with a black rule on the right          \usepackage{graphicx, float}          \graphicspath{{figures/}} % Directory in which figures are stored          \begin{document}          \begin{figure}[H]     \fbox{\includegraphics[width = 0.95\columnwidth,trim = 2cm 0 2cm 0,clip]{patterndeath}}     \caption{\label{patterndeath}}     \end{figure}          \end{document}       Somehow, instead of trimming the left and right part of the figure, it simply stretches the image vertically. Is what am I doing right? The original graph looks like this: ![Trim1](http://i.stack.imgur.com/NH9UN.png) After usig trim option as given in the above code it looks like this one: ![Trim2](http://i.stack.imgur.com/VmhHq.png) Thus, the left and right blank margins are still there, only image is stretched vertically. Thank you **Update** : I solved the problem now. Actually I was creating a .dvi file using the command latex file.tex In the dvi file so generated, the image is indeed stretched. But once I convert this file to pdf, everything is fine and trim works as expected.


title: Systeme package

text: I am using the `systeme` package to create an equation system. I am also using the `mtpro2` package for mathematical notation. When I want to create a 2x2 system with a curly bracket it works just fine by using the command : `\sysdelim\{.`. But it seems that the curly bracket doesn't look the same in a 3x3 system or above.               \documentclass[b5paper,11pt]{article}      \usepackage{pgfplots}      \usepackage{psfrag}      \usepackage{amsmath}      \usepackage{mtpro2}      \usepackage{calc}      \usepackage{systeme}           \begin{document}      \sysdelim\{.\systeme{2x+3y=5,x-4y=-3\quad}      \sysdelim\{.\systeme[xzy]{2x+3y-z=5,x+2z-4y=-3,x+y=2}      \end{document}      ![enter image description here](http://i.stack.imgur.com/VMbPm.jpg) How can i make the 2nd bracket look like the 1st?


title: What's the internal font name of the Kp-Fonts?

text: I have checked the`kpfonts.sty`:               \renewcommand{\sfdefault}{jkpss\kp@petitesmajuscules\kp@flig\kp@style}      It seems that this name `jkpss\kp@petitesmajuscules\kp@flig\kp@style` is not correct. So what's the real name of this font? So how to invoke `Kpfonts` as a second font?


title: How to horizontally align all characters like a typewriter

text: I want to make a document that looks like an old top secret file written on a typewriter. The problem is that when I want to use a `center` environment, the alignment of the characters is off. Is there a way to make sure that the boxes of all the characters are aligned while still making use of the `center` environment? MWE               \documentclass[a4paper]{article}          \title{Your Paper}     \author{You}          \begin{document}     \ttfamily      \raggedright     \begin{center}     Top Secret Document     \end{center}     This is a top secret document containing secret information about a secret thing which has remained secret for many years. This is a top secret document containing secret information about a secret thing which has remained secret for many years.     \end{document}      ![example of typewriter center](http://i.stack.imgur.com/QAxzk.jpg)


title: Preventing Ångström symbol being italicised in pythontex

text: I'm trying to make a plot in a tex document within pythontex and I set the label within pycode tags to be               self.label = r'A: {0} B: {1:.0f}$\AA$'.format(self.aaa,self.bbb)      I don't want the Ångström symbol to be in italics, but I don't see how to prevent it. The various suggested methods here don't seem to work inside pythontex, and I don't know how to apply "Define additional math operators to be typeset in roman" to my situation. Any guidance would be appreciated! Thank you.


title: ignorenonframetext option breaks frame background color option?

text: I'm trying to change the background color of a frame in Beamer and have been following the example in this question. The example version works fine, but if you introduce the `ignorenonframetext` argument to the `\documentclass` declaration, all of the frames get a white background. This changes the background color, but produces a frame with the non-frame text.               \documentclass{beamer}          \begin{document}          Some non-frame text.          \begin{frame}{Test}     white     \end{frame}          \setbeamercolor{background canvas}{bg=black}     \begin{frame}{Test}     \textcolor{white}{black}     \end{frame}          \end{document}      And this hides the non-frame text but doesn't change the background color. The only difference is the first line.               \documentclass[ignorenonframetext]{beamer}          \begin{document}          Some non-frame text.          \begin{frame}{Test}     white     \end{frame}          \setbeamercolor{background canvas}{bg=black}     \begin{frame}{Test}     \textcolor{white}{black}     \end{frame}          \end{document}      Is this a bug? What's going on here? **EDIT** It just occurred to me that this isn't a bug: of course it's ignoring the background color command, it's nonframe text. In which case the question is how to set the background color with the `ignorenonframetext` option in place?


title: Compiling multiple tex files into a single file

text: I was writing my masters' thesis using Latex and have written 4 chapters in 4 different `.tex` files. Now I wish to combine all these chapters into a single `.pdf` file. For this I wrote a main `.tex` file in which I included the 4 tex files using `\include` statement. However, everytime I run the main tex file, I see an error message : > Message : ! Latex error ! Can be used only in preamble. What I wrote in the main tex file was the following :               \documentclass[10pt]{thesis}     %\usepackage{pgf}     \usepackage{varioref}                                                               %   when using \vref the page the figure is on is printed     \usepackage[margin=10pt,font=small,labelfont=bf]{caption}                          %   enables caption adjustments     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{subfigure}     \usepackage{array}     \usepackage{url}                                                                    %   makes nice url's     \usepackage[a4paper, left=3cm,right=3cm,top=4cm,bottom=4cm]{geometry}     %\usepackage{mathcomp}     %\usepackage{mathptmx}     \usepackage{graphicx,color}     \usepackage[english]{babel}     \usepackage{bbm}                                                                    %   enables \mathbbm     \usepackage{lscape}                                                                 %   enables landscape tables     %\usepackage{lettrine}                                                               %   enables dropcaps ('miniaturen')     \usepackage{float}     \usepackage{caption}          %\usepackage{here}     %\usepackage{rotate}     %\usepackage{fancyhdr}     \usepackage{multirow}     \usepackage{picins}     \usepackage{a4}     \usepackage{braket}     \usepackage{cite}           \begin{document}     \include{Chapter1_Introduction_Final}       % Names of my tex files                \include{Chapter2_STIOS}                        \include{Chapter3_FrequencyStabilization}                       \include{Chapter4_VHDLperformance}                       \end{document}      If I compile each `.tex` file individually , then I get separate `.pdf` files. However, I want to generate a single `.pdf` file consisting of all 4 chapters. I would be obliged for the assistance.


title: Lining numbers in mathnormal

text: Is there a simple way to have lining numbers (instead of old style ones) using `\mathnormal{}` ? I want `$\mathnormal{abc123}$` to look like `$abc123$`. My problem is that I have an operator `\Declaremathop[1]{Op^{#1}}` with an argument that can be a number or a letter, and in both case I want the argument to look just like the default math font (using `$...$`), but :   * with `\Declaremathoperator[1]{Op^{#1}}` I get roman letter ;   * with `\Declaremathop[1]{Op^\mathnormal{#1}}` I get old style numbers. Edit : the operator is actually in two parts, eg `\Declaremathoperator{Op^{#1}Bla}` that's why I cannot isolate the argument out of the operator declaration.


title: box aligned based on top border, but with dynamic width

text: I want to have a box, aligned based on top border. I can do this with `minipage[t]`, but i would have to specify the width, which i do not want. What is thus the simplest way to have a top-aligned box, with dynamic width?


title: How to change font size of longtable-lines without changing font size of caption?

text: I'd like to change the font size of all contents of a `longtable` to `footnotesize`. However the rest of the document _and also the caption (!)_ shall be (stay) in normal size. (`pdflatex` is used) How can I do that?   * I tried to put the `\footnotesize`command outside the `longtable`-environment, but then the `caption` is also smaller.   * If I put the command in before the first line of the table, it is only executed for the first cell of the table.   * If I put it before `\endoffirsthead`, I get an error message during compiling. EDIT: I don't want to be the whole document to be in `\footnotesize`, but **only** the content of the tables! **Minimal example:**               \documentclass{scrbook}       \usepackage{longtable, booktabs}       \begin{document}          \begin{longtable}{ccc}     \caption{This is the caption of the table which shall be normal size!}\\      \toprule     aaaaaaa & bbbbbb & ccccccccc\\       \midrule        a & b & c\\       a & b & c\\     a & b & c\\       a & b & c\\       a & b & c\\       a & b & c\\       \bottomrule       \end{longtable}


title: Using SyncTeX with Adobe Acrobat Reader

text: The font rendering quality of Adobe Acrobat Reader is far superior to that of other PDF viewers. It also supports scripting via JavaScript. The debugger for JavaScript can apparently be enabled in the (free) Reader product by editing the registry. Laurens, developer of SyncTeX, claims that the command line SyncTeX tool could in principle be used to perform direct and inverse search on a PDF open in Acrobat reader **Question** Does anyone know of a Latex IDE on any platform that has attempted to connect the IDE's text editor to Acrobat Reader by using the SyncTex commandline tool as described in Laurens' article above?


title: Caption spacing in longtable package

text: I am using a style file that sets a particular spacing for the List of Figures (LoF) and List of Tables (LoT) in my Table of Contents. However, I am using `longtable` for all my tables, and it is changing the LoT spacing by redefining `@caption` and `@makecaption`. I am unfamiliar with the code, so I haven't been able to identify what exactly I need to change in the `longtable` code in order to achieve the spacing I want. I'd like to be able to change the spacing to `10pt`. I've tried changing the `\vskip` value from `\baselineskip` to `10pt`, but this didn't seem to do anything. I should also say that the style file that I'm currently using is very rickety, so I can't resort to the caption package without causing chaos.               \def\LT@caption{%       \noalign\bgroup         \@ifnextchar[{\egroup\LT@c@ption\@firstofone}\LT@capti@n}     \def\LT@c@ption#1[#2]#3{%       \LT@makecaption#1\fnum@table{#3}%       \def\@tempa{#2}%       \ifx\@tempa\@empty\else          {\let\\\space          \addcontentsline{lot}{table}{\protect\numberline{\thetable}{#2}}}%       \fi}     \def\LT@capti@n{%       \@ifstar         {\egroup\LT@c@ption\@gobble[]}%         {\egroup\@xdblarg{\LT@c@ption\@firstofone}}}     \def\LT@makecaption#1#2#3{%       \LT@mcol\LT@cols c{\hbox to\z@{\hss\parbox[t]\LTcapwidth{%         \sbox\@tempboxa{#1{#2: }#3}%         \ifdim\wd\@tempboxa>\hsize           #1{#2: }#3%         \else           \hbox to\hsize{\hfil\box\@tempboxa\hfil}%         \fi         \endgraf\vskip\baselineskip}%       \hss}}}      Thanks for any suggestions.


title: How can I create active hyperlinks for cross references in Texinfo DVI/PDF?

text: The Texinfo PDF manual has cross references as hyperlinks through the document. The cross references are presented in an attractive dark red colour. When I create a PDF from my own Texinfo source files, the DVI file does not contain active links, though the cross references are otherwise fine. I can't find this documented in the Texinfo manual, nor see it implemented as a recent feature in the news. How can I create cross references as hyperlinks through the document?


title: Make LaTeX recognize local files in Dropbox under Linux

text: I have some local LaTeX files in Dropbox and have not been able to make LaTeX recognize them. It does find my local texmf folder, but that doesn't help me. I am working under Fedora 17 and `uname -r` returns: `3.4.4-3.fc17.x86_64`, however I do not have admin access. I suspect this may have something to do with setting paths, but despite several attempts I have not managed to do it. Could anybody please help me solve this? Under Windows with MiKTeX I have managed to get this to work. Added: I've tried to add the following to my `.login` and `.cshrc`               export TEXMFHOME='~/Dropbox/Local TeX Files':     setenv TEXMFHOME='~/Dropbox/Local TeX Files':      and same thing with `TEXINPUTS`. However, none of this has worked for me. I know that the `.login` and `.cshrc` are read when I login, but either I have the variables wrong, the syntax, or there is an issue with assigning paths to Dropbox folders at startup.


title: TeXlive 2011 Pretest - Trouble with Synctex?

text: Is anyone else having trouble with synctex in the TeXlive 2011 pretest? My set-up is Emacs+Auctex+Okular (on Linux). I can't get forward-search/sync to work with TeXlive 2011. (I confirmed that my setup still works with TeXlive 2010.) **Solution** : **Rewrite the relevant lines in the .emacs file as described here** : http://stackoverflow.com/questions/6898710/emacs-auctex-rewriting- the-okular-make-url-function-to-work-with-new-synctex-fu/6904563#6904563


title: Add numbered section to toc without using \section

text: I'd like to have a new section in line with the usual numbering, without it showing in the text. I include multiple PDF files using the `\includepdf` command. Each of them is a subsection which I'd like to subordinate under the section. However, I can't just use `\section` because that makes a new headline in the document and I do not want this, especially because I have no other text except the files and an empty site with just the headline on it looks silly. Example:               \documentclass{scartcl}     \usepackage{pdfpages}          \begin{document}     \tableofcontents          \includepdf[addtotoc={1,subsection,2,title1,1}]{1.pdf}          \includepdf[addtotoc={1,subsection,2,title2,2}]{2.pdf}          \end{document}      I want it to look like               1.Section        1.1 title1        1.2 title2      without having a nearly empty page because `\section` makes a new headline


title: pdftex and javascript forms with automatic calculations

text: I would like to create a PDF document in TeX with a form. Some of the fields in the form will be calculated based on the values of other fields. Here is a MWE, thanks to Victor Ivrii on the pdftex mailing list back in 2005:               \documentclass{article}     \usepackage[pdftex]{hyperref}     \begin{document}     \begin{Form}          \TextField[maxlen=40,keystroke={AFNumber_Keystroke(2, 0, 1, 2,     true);},align=2,height=10pt,width=45pt,name=alpha]{Alpha}          \bigskip     \TextField[maxlen=40,keystroke={AFNumber_Keystroke(2, 0, 1, 2,     true);},align=2,height=10pt,width=45pt,name=beta]{Beta}               \bigskip     \TextField[maxlen=40,keystroke={AFNumber_Keystroke(2, 0, 1, 2, true);},     calculate={AFSimple_Calculate("SUM" , new Array ( "alpha" , "beta" )     ;)},  align=2,height=10pt,width=45pt,name=gamma,readonly=true]{Gamma}     \end{Form}     \end{document}      The resulting PDF has three fields, and the third is supposed to automatically update to be the sum of the first two. If I compile the document and open in Acrobat, I can edit the first two fields (`alpha` and `beta`) but the third (`gamma`) does not update. No JavaScript errors are thrown. If I examine the properties of the field `gamma` in Acrobat, I can see that its `calculate` property is set to be the sum of the to fields `alpha` and `beta`. ![Acrobat window and dialog](http://i.stack.imgur.com/bid7j.png) If I select "Pick...", I'm shown a dialog with the three fields, and `alpha` and `beta` are selected. If I deselect and _reselect_ those fields and accept, the form now works as desired (Acrobat-altered document at scribd). The `diff` command tells me the PDF file has changed but not how. I have found some discussion about this on the pdftex mailing list, in the above referenced thread and again here. Ralf Uterman apparently posted a patch as a result of the second thread, but as far as I can tell the issue persists. I have tried the `eforms` package from the AcroTeX bundle as well, but the author writes in the manual that "Calculate works correctly when drivers `dvips`, `dvipsone`, or `dvipdfm` are used." (`pdftex` is not listed). Yet I cannot get this to work under any driver. If I use the `dvips` driver to compile to DVI, then `dvips` to convert to PostScript, then convert to PDF using either Acrobat Distiller, I get the same non-functioning form as with `pdftex`. If I use the `dvipdf` driver, then `dvipdf` to convert to PDF, all the form elements are unrecognized and ignored. This document is going to be stamped over a scanned PDF so I really need no other output except the form and some basic marks. So I'm flexible as to engine, driver, etc., but so far I'm not getting anything to work without manual intervention via Acrobat. I'm aware of the related question “ hyperref: how to format text in a forms text-field ” but I can't get the calculations to work in the accepted answer there, either.


title: How to draw a decorated rectangle with rounded corners?

text: As the title says, I was trying to draw a rectangle with rounded corners, and then decided it needed decorating. Well, the result looks awesome, but isn't really what I had in mind. a) What happened? b) How do I do it properly?               \documentclass[a4paper]{article}     \usepackage{tikz}     \usetikzlibrary{decorations.pathmorphing}      \begin{document}     \begin{tikzpicture}[scale=2]         \draw[rounded corners=40mm,                decorate,decoration={snake,amplitude=5,segment length=30}]         (0,0) rectangle (5,5);     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/q49O5.jpg)


title: Labeling node values on the axes

text: I want to draw some curves and some special coordinates on the curves, then label the nodes on the axes. So far I have done it manually like this (it's a diagram for the Markowitz risk premium in case you have heard of it):               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage{tikz}     \usepackage{pgfplots}     \usetikzlibrary{calc,intersections,through,backgrounds}     \title{Plotty}     \date{October 2013}          \begin{document}          \begin{tikzpicture}[scale=1]         \begin{axis}[xmin=0,ymin=0,ymax=10,xmax=10,xticklabels={,,},yticklabels={,,},axis x line=center,axis y line=center,clip=false,                         xlabel=$w$,ylabel=$U(x)$]             \draw[name path=ucurve] (axis cs:0,0) .. controls (axis cs:2,9) .. (axis cs:10,10) coordinate[pos=0.2](n1) coordinate[pos=0.9](n2);             \draw[name path=eucurve] (n1) -- (n2) coordinate[pos=0.5](n3);             \draw[dotted] let \p1 = (n3) in (n3) -- (\x1,0) node[below,blue]{$E(w)$};             \draw[dotted,name path global=uintersect] let \p1 = (n3) in (n3) -- (0,\y1) node[left,blue]{$E(U(w))=U(E(w)-\pi)$};             %Calculate the intersection             \draw[dotted,name intersections={of=ucurve and uintersect,by=I}] let \p1 = (I) in (I) -- (\x1,0) node[below,blue]{$E(w)-\pi$};             \draw[dotted] let \p1 = (n1) in (n1) -- (\x1,0) node[below,blue]{$90$};             \draw[dotted] let \p1 = (n1) in (n1) -- (0,\y1) node[left,blue]{$U(90)$};             \draw[dotted] let \p1 = (n2) in (n2) -- (\x1,0) node[below,blue]{$P_u$};             \draw[dotted] let \p1 = (n2) in (n2) -- (0,\y1) node[left,blue]{$U(P_u)$};         \end{axis}     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/AA1ai.png) As you can see, I'm trying to do this manually by generating the paths to the axes. However, things get quite messy because I don't take into account the label size.   1. How can I avoid the overlapping labels? I feel that there must be a plot option or something to label coordinates on the axes.   2. How can I optimize my code? I'm just starting with `pgfplots` and I've found out there are hundreds of ways to achieve the same results, so maybe I'm not doing this right. Particularly the `intersections` library seems overkill for my needs...


title: Where can I find examples of decorated borders/margins?

text: Are there any readily available examples of decorated borders/margins? I am trying to have some decore running along the edges of page, e.g. Gargoyles/Motif/Some type of mathematical curve/whatever. Just need some examples to get started and have a choice to pick from.


title: How to make two rectangles top adjusted horizontally in TiKZ?

text: I have 2 rectangles and an operator between them, the one on the right is longer than the one on the left:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{positioning}     \begin{document}     \begin{tikzpicture}     \node[rectangle, draw, text width={1cm},  minimum height={1cm}, text centered] (l) {l};     \node (op) [right=0.5cm of l] {$+$};     \node[rectangle, draw, text width={1cm},  minimum height={3cm}, text centered, right=0.5cm of op] (r) {r};     \end{tikzpicture}     \end{document}      The code above makes the two rectangles **center** adjusted horizontally, does anyone know how to make them **top** adjusted horizontally?


title: Aligning on plus sign (as well as decimal sign) in tabular environments using numprint

text: Is it a bug in the numprint package .. or maybe a missing feature? I can't align on the plus/minus sign in tabular environments, padding numbers with spaces.               \documentclass{article}     \usepackage{booktabs}     \usepackage{numprint}          \begin{document}     \begin{center}     \nplpadding[\ ]{4}     \begin{tabular}{*{2}{N{4}{2}}}       \toprule       -940    & +1000   \\       +952.38 & -1000 \\ \midrule       +12.38 &     0 \\       \bottomrule     \end{tabular}     \end{center}          \end{document}      Any hint welcome.


title: Command \c@subfigure already defined

text: when I try `\usepackage{subcaption}` immediately at the beginning of my document I get an error: `Command \c@subfigure already defined` What can I do?


title: How to install LaTeX compiler on Mac OS X without additional software

text: I want to install only the LaTeX compiler because I don't care about the additional software that comes with MacTeX. I'm going to use Latexian for creating `.tex` documents. Is this option possible?


title: Positioning of text in cells/tables

text: I want LaTeX to place the text of some of the cells in my table (using `tabularx`) at the bottom of the cell. Right now all the text I write in the cells will be positioned at the top of each cell. Can I define it individually for each cell - the same goes for positioning the text of the cell in the middle of the row (but not centered in the column). I really hope my question is understandable.


title: How to use texi2dvi to run latex generating PDF?

text: I use `xelatex` instead of `pdflatex` to generate PDFs, but now I want to use `texi2dvi` to generate them, however every time it shows errors as follows:               texi2dvi(file="Letter__Oct11.tex",pdf=TRUE) failed                    LaTeX errors:     ! Fatal fontspec error: "not-pdftex"     !      !      ! Requires XeTeX or LuaTeX to function!     ! Requires XeTeX or LuaTeX to function!     !      !      ! See the fontspec documentation for further information.     ! See the fontspec documentation for further information.     ! For immediate help type H <return>     ! For immediate help type H <return>     |'''''''''''''''''''''''''''''''''''''''''''''''     | This is a fatal error: LaTeX will abort     |...............................................


title: Achieve Linebreak in DOI in biblatex

text: In my references (using XeLaTeX, `biblatex` and Biber) I have one specific DOI that is hanging over more than a centimeter after line-break. All other DOI are correctly wrapped. Even inserting a (wrong space in the DOI does not help at all). How can I fix that? I invoke `biblatex` using:                \usepackage[safeinputenc,uniquelist=false,maxnames=2,%                  minnames=1,maxbibnames=99,style=authoryear,url=false,%                  dashed=false,firstinits=true,backend=biber]{biblatex}      and `hyperref` sign:               \usepackage[hidelinks,pdfa,pdfencoding=auto,pdfusetitle,hypertexnames=false]{hyperref}      This is what it looks like: ![enter image description here](http://i.stack.imgur.com/06Mpx.png) P.S.: I know I can use: `\setcounter{biburlnumpenalty}{100}` but I'd prefer to perform a manual linebreak using some trick


title: How to add a target directory when you convert from tex file to pdf in Vim-LaTeX?

text: I just installed Vim-LaTex on OSX. I learnt `:TTarget pdf` and type `\ll` to convert a tex file to pdf. When I do this a pdf file is created in the same directory as tex file. How can I add the target directory to `\ll`?