title: Can't draw a path in certain circumstances

text: I can not draw the path `fond` at the end but I can draw it in the scope where it is defined. The same with path `haut` but in works well with the path surface?               \documentclass[tikz]{standalone}          \usepackage{tikz,ifthen}     \usetikzlibrary{calc,intersections,fpu}          \def\Azi{30}%30     \def\Alt{20}%20          \def\Radius{1.5}     \def\Length{5}     \def\AngleMax{atan(2*\Radius/\Length)}          \newcommand{\SetRelAngle}[1]{%         \def\RelAngle{#1}            % max +23 Min -30         \def\Angle{\AngleMax+#1}              \pgfmathsetmacro\RadCos{\Radius*cos(\Angle)}         \pgfmathsetmacro\RadSin{\Radius*sin(\Angle)}         \pgfmathsetmacro\LCos{\Length*cos(\Angle)}         \pgfmathsetmacro\LSin{\Length*sin(\Angle)}              \pgfmathsetmacro\CosAlt{cos(\Alt)}         \pgfmathsetmacro\SinAlt{sin(\Alt)}         \pgfmathsetmacro\CosAzi{cos(\Azi)}         \pgfmathsetmacro\SinAzi{sin(\Azi)}              \pgfmathsetmacro\SinAziSinAlt{\SinAzi*\SinAlt}         \pgfmathsetmacro\CosAziSinAlt{\CosAzi*\SinAlt}              \pgfmathsetmacro\CosAngle{cos(\Angle)}         \pgfmathsetmacro\SinAngle{sin(\Angle)}         \pgfmathsetmacro\TanAngle{tan(\Angle)}              %                           ----- Centre         %                           ----- de l'ellipse surface         \pgfmathsetmacro\CX{\LCos-\RadCos/\TanAngle}         \pgfmathsetmacro\CZ{\LSin-\RadCos}              %                           ---- Contact surface bord         %                           ---- sup cylindre          \pgfmathsetmacro\CXX{\LCos+\RadSin}                   %                           ----- grand axe au fond         \pgfmathsetmacro\GAZ{1.5}         \pgfmathsetmacro\GAX{-\GAZ*tan(\Angle)}         \pgfmathsetmacro\GAY{%             \GAZ*(tan(\Angle)*tan(\Azi)+tan(\Alt)/cos(\Azi))}         }          % #1 premier point               ---- Angle entre 2 nodes ----     % #2 second point     % On récupère le résultat dans \MyAngle     \newcommand{\NodeAngle}[2]{%     \pgfextra{         \pgfmathanglebetweenpoints%             {\pgfpointanchor{#1}{center}}%             {\pgfpointanchor{#2}{center}}%             \global\let\MyAngle\pgfmathresult     }}          %                                   ---- Calculate projection     \newcommand{\CoorXY}[4][MyNode]{%         \pgfmathsetmacro\PjX{%              #2*\CosAzi             -#3*\SinAzi}         \pgfmathsetmacro\PjY{%              #2*\SinAziSinAlt             +#3*\CosAziSinAlt             +#4*\CosAlt}         \coordinate (#1) at (\PjX,\PjY) ;         }          %                               ---- with a dot for debugging     \newcommand{\CoorXYT}[4][MyNode]{%         \CoorXY[#1]{#2}{#3}{#4}         \node[small dot,label={[font=\scriptsize]#1}] at (#1) {}         }          %%%%                        ---- Use path several times     %%%%                        ---- thanks to Andrew Stacey     \makeatletter     \tikzset{       use path for main/.code={%         \tikz@addmode{%           \expandafter\pgfsyssoftpath@setcurrentpath\csname tikz@intersect@path@name@#1\endcsname         }%       },       use path for actions/.code={%         \expandafter\def\expandafter\tikz@preactions\expandafter{\tikz@preactions\expandafter\let\expandafter\tikz@actions@path\csname tikz@intersect@path@name@#1\endcsname}%       },       use path/.style={%         use path for main=#1,         use path for actions=#1,       }     }     \makeatother          %%%%                        ---- Définition des styles ----     \tikzset{%         small dot/.style={fill=black,circle,scale=0.3},         surface/.style={blue!75!black!75,fill=blue!10,smooth},         fond/.style={blue!75!black!75,fill=blue!80!black!20}         }          % ##############     \begin{document}     % ##############     %\foreach \An in {36,15,1,0,-1,-12}{%     %\SetRelAngle{\An}          \SetRelAngle{5}     \begin{tikzpicture}[scale=2]               \clip (-\Radius-.5,-1.5*\Radius)         rectangle (\Length+1,\Length+.5) ;          %%%% Debugging          % Repère      \CoorXY[CB]{0}{0}{0} ;      %\CoorXYT[X]{2}{0}{0} ;      %\CoorXYT[Y]{0}{3}{0} ;      %\CoorXYT[Z]{0}{0}{2} ;      %\draw[red,<-] (X) -- ($ (X)!2!(CB) $) ;     %\draw[red,<-] (Y) -- ($ (Y)!2!(CB) $) ;     %\draw[red,<-] (Z) -- ($ (Z)!2!(CB) $) ;          % Ellipse du haut     \CoorXY[CH]{\LCos}{0}{\LSin} ;     \CoorXY[XH]{\LCos}{-\Radius}{\LSin} ;          % Ellipse surface     \CoorXY[SH]{\CX}{0}{\CZ} ;     \CoorXY[SXH]{\CX}{-\Radius}{\CZ} ;     \CoorXY[SYH]{\CXX}{0}{\CZ} ;          %\draw[thin,dashed] (SH)--(SYH) ;          % Ellipse du bas     %\CoorXYT[BD]{0}{\Radius}{0} ;     \CoorXY[BG]{0}{-\Radius}{0} ;     \CoorXY[BH]{-\RadSin}{0}{\RadCos} ;     %\CoorXYT[BB]{\RadSin}{0}{-\RadCos} ;          % Grand Axe     \CoorXY[GA]{\GAX}{\GAY}{\GAZ} ;               %%%%                        ---- Plan cylindre bas ----     \begin{scope}[red]     \pgftransformtriangle         {\pgfpointanchor{CB}{center}}         {\pgfpointanchor{BG}{center}}         {\pgfpointanchor{BH}{center}} ;     %\draw (-1pt,-1pt) rectangle (1pt,1pt) ;     %\draw (0pt,-1pt) -- (0pt,1pt) (-1pt,0pt) -- (1pt,0pt) ;     \path [name path=fond] (0pt,0pt) circle (1pt) ;     \NodeAngle{CB}{GA} ;         \coordinate (GaBL) at (\MyAngle:1pt) ;     \coordinate (GaBR) at (180+\MyAngle:1pt) ;     \end{scope}          %%%%                        ---- Plan cylindre haut ----     \begin{scope}[red]     \pgftransformtriangle         {\pgfpointanchor{CH}{center}}         {\pgfpointanchor{XH}{center}}         {\pgfpointanchor{SYH}{center}} ;     %\draw (-1pt,-1pt) rectangle (1pt,1pt) ;     %\draw (0pt,-1pt) -- (0pt,1pt) (-1pt,0pt) -- (1pt,-0pt) ;     \path [name path=haut] (0pt,0pt) circle (1pt) ;     % Attention dans ce plan l'axe y est vers le bas     \coordinate (GaHL) at (-\MyAngle:1pt) ;     \coordinate (GaHR) at (180-\MyAngle:1pt) ;       \end{scope}          %%%%                        ---- Plan de la surface ----     \begin{scope}[blue]     \pgftransformtriangle         {\pgfpointanchor{SH}{center}}         {\pgfpointanchor{SXH}{center}}         {\pgfpointanchor{SYH}{center}} ;     %\draw (-1pt,-1pt) rectangle (1pt,1pt) ;     %\draw (0pt,-1pt) -- (0pt,1pt) (-1pt,0pt) -- (1pt,-0pt) ;     \coordinate (bobR) at (180-\MyAngle:1pt) ;     \coordinate (bobL) at (-\MyAngle:1pt) ;     \path [name path=surface] (0pt,0pt) circle (1pt) ;     \end{scope}          \draw[red] (bobL)--(bobR) ;     \draw (GaBL)--(GaHL) ;     \draw (GaBR)--(GaHR) ;          %\pgfmathifthenelse{\AngleMax>\Angle}{0}{1} ;     %\ifthenelse{\pgfmathresult=1}{%         %%%%%%%%%%%%%%%%%%%%%         %%%% Cas ellipse %%%%         %%%%%%%%%%%%%%%%%%%%%              % remplissage         \fill[fond]             (GaBL)--(bobL)--(bobR)--(GaBR) --cycle ;              % dessin de la surface         \draw [use path=surface,surface] ;              % dessin du fond         % ##### don't work         \draw [use path=fond,fond] ;              %}{%         %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%         %%%% cas ellipse tronquée %%%%         %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%              %}                \end{tikzpicture}     \end{document}


title: How does TiKZ calculate positioning of picture on page?

text: I'm trying to use `\beginpgfgraphicnamed` to externalise some complex figures in a large document, using the latest released version of TiKZ (2.00). This produces standalone PDF images but for me the graphic is shifted up: the top part of the image is cut off and the bottom part has unnecessary whitespace. The overall PDF that is generated by pdflatex when these externalised images are used has the same visual problem, so I'm having to drop the idea of externalising graphics for now. As far as I can tell the overall size of the pictures is correct (when comparing to the version without externalisation). _I am using a custom thesis style file that changes margins_ , which is probably breaking several of the `l2tabu` no-no's. > How does PGF/TiKZ calculate the positioning of pictures on the page, at > least as this affects positioning of externalised pictures? In particular, are there specific things to tweak or to avoid tweaking to ensure this problem does not happen? I'm trying to not embark on a big LaTeX hacking project like redoing the style based on a more modern `documentclass` than `report`, so ways to steer clear of this would be especially welcome.


title: What version control system should I use for my LaTeX documents?

text: The answers to this question have convinced me I want to start using some kind of version control system. The question is, which should I use? First this is mainly just for myself, not for collaboration. What are the pros and cons of git, SVN, mercurial... others? I'd like to be able to have a version number in the header or footer of my drafts. Ideally, I'd like a system which allowed me to compile a document such that differences between selected versions of the file are highlighted in the pdf output somehow (a sort of "track changes" like behaviour). And I'd like to have nice integration with emacs, my editor of choice. Pros and cons of one versioning system per answer please (I've CWed this, but discuss whether I should undo that...)


title: How to Repeat Cell Content on Next Page for \longtable using \multirow

text: I've created a LaTEX document that has several large tables that span multiple pages using long table. The table has several Topics (column 1) and Topics (column 2). The issue is that on the second page I have an empty column 1, but the subtopics are listed nicely in column 2. Can you tell me how to get "Topic 1" on to page 2 as well? Here's some example code :               \documentclass[11pt]{article}     \usepackage{lipsum} % for dummy text only     \usepackage{multirow}     \usepackage{longtable}%Setup to allow tables to span multiple pages and repeat headers on                            %next page      \setlength{\arrayrulewidth}{1.2pt}% Set all table lines thicker than their 0.4pt default          %--------------------Setup Margins ---------------------     \textheight 9in     \usepackage[hmargin=2cm,vmargin=4cm]{geometry}     \setlength{\headsep}{1pt}     \setlength{\footskip}{25pt} % 25pts          \begin{document}     \begin{centering}         \begin{longtable}{|p{3.2cm}|p{2.3cm}|p{10.5cm}|} \hline               \endfoot % force a footer here              \hline             \bf{Head 1} & \bf{Head 2} & \bf{Head 3}\\[5ex]   \hline \endhead           \multirow{3}{*}{Topic 1}     &Subtopic A  & There is some text here but could be small   \\ \cline{2-3}      & Subtopic B & \lipsum[1-3]  \\  \cline{2-3}      &  Subtopic C & \lipsum[1-2]   \\  \cline{2-3}      \hline      \multirow{3}{*}{Topic 2}      &Subtopic A  & \lipsum[1-3]   \\ \cline{2-3}      & Subtopic B & \lipsum[1-2]  \\  \cline{2-3}      &  Subtopic C & \lipsum[1-2]   \\  \cline{2-3}      \hline         \end{longtable}      \end{centering}     \end{document}


title: Included png appears too big in PDF

text: I'm a beginner with LaTex and writing an article in it (letter-sized). WinEDT and MikTeX (versions seen in the log). I have a PNG chart (obtained from R/ggplot2) which is 471 x 335 pixels and which I'm including as below. The problem: in the PDF the image is scaled up to occupy the width of the page and thus becomes blurry. I see the warnings in the log, but am not sure what I need to do given it's a picture, not text.               \documentclass[12pt]{article}     \usepackage[letterpaper]{geometry}     \geometry{top=1.0in, bottom=1.0in, left=1.5in, right=1.0in}     \usepackage{graphicx}     \begin{figure}       \includegraphics{chart}\\                            % line 35        \caption{Adjusted Relative Risk (RR)}\label{mylabel} % line 36     \end{figure}      The output log shows:               Command Line:   texify.exe --pdf --tex-option=--synctex=-1 "C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW\test1.tex"     Startup Folder: C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW          This is pdfTeX, Version 3.1415926-1.40.10 (MiKTeX 2.8)     entering extended mode          ("C:/Documents and Settings/myself/Application Data/WinEdt Team/WinEdt 6/RW/test1.tex"     LaTeX2e      Babel  and hyphenation patterns for english, dumylang, nohyphenation, ge     rman, ngerman, german-x-2009-06-19, ngerman-x-2009-06-19, french, loaded.     (C:\MiKTeX\tex\latex\base\article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (C:\MiKTeX\tex\latex\base\size12.clo)) (C:\MiKTeX\tex\generic\babel\babel.sty     *************************************     * Local config file bblopts.cfg used     *     (C:\MiKTeX\tex\latex\00miktex\bblopts.cfg)     (C:\MiKTeX\tex\generic\babel\english.ldf (C:\MiKTeX\tex\generic\babel\babel.def     ))) (C:\MiKTeX\tex\latex\graphics\graphicx.sty     (C:\MiKTeX\tex\latex\graphics\keyval.sty)     (C:\MiKTeX\tex\latex\graphics\graphics.sty     (C:\MiKTeX\tex\latex\graphics\trig.sty)     (C:\MiKTeX\tex\latex\00miktex\graphics.cfg)     (C:\MiKTeX\tex\latex\pdftex-def\pdftex.def)))     (C:\MiKTeX\tex\latex\geometry\geometry.sty     (C:\MiKTeX\tex\generic\oberdiek\ifpdf.sty)     (C:\MiKTeX\tex\generic\oberdiek\ifvtex.sty)     (C:\MiKTeX\tex\latex\geometry\geometry.cfg))     (C:\MiKTeX\tex\latex\base\flafter.sty)     (C:\MiKTeX\tex\latex\setspace\setspace.sty     Package: `setspace' 6.7      )     ("C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW\t     est1.aux") (C:\MiKTeX\tex\context\base\supp-pdf.tex     [Loading MPS to PDF converter (version 2006.09.02).]     )     *geometry* driver: auto-detecting     *geometry* detected driver: pdftex     [1{C:/MiKTeX/pdftex/config/pdftex.map}] [2]           Overfull \hbox (39.14508pt too wide) in paragraph at lines 35--36     [][]           Underfull \hbox (badness 10000) in paragraph at lines 35--36          [3] [4 ] [5]     ("C:\Documents and Settings\myself\Application Data\WinEdt Team\WinEdt 6\RW\t     est1.aux") )     (see the transcript file for additional information)     Output written on test1.pdf (5 pages, 100528 bytes).     SyncTeX written on test1.synctex     Transcript written on test1.log.


title: TiKZ generates unneeded whitespace

text: Edit: I did compile this document:               \documentclass[DIV14,parskip=half-]{scrartcl}          \usepackage[utf8]{inputenc}     \usepackage[ngerman]{babel}     \usepackage[T1]{fontenc}          \usepackage{tikz}     \usepackage{tkz-euclide}     \usetkzobj{all}          \usepackage{showframe}          \begin{document}          \fbox{\begin{tikzpicture}             \tkzDefPoint(0, 0){A}             \tkzDefPoint(4, 0){B}             \tkzDefPoint(6, 3.5){C}             \tkzDefPoint(2, 3.5){D}             \draw (0, 0) node[below left] {A} -- (4, 0) node[below right] {B} -- (6, 3.5) node[above right] {C} -- (2, 3.5) node[above left] {D} -- cycle;             \tkzCircumCenter(A,B,D)             \tkzGetPoint{O}             \tkzDrawCircle(O,A)             \tkzCircumCenter(A,C,D)             \tkzGetPoint{O}             \tkzDrawCircle(O,A)     \end{tikzpicture}}          \end{document}      and got this output: ![image of output](http://i.stack.imgur.com/jxWTM.png) With this code, TiKZ generates an image nearly twice as high as needed. Above the picture is a large whitespace. Where does it come from? Original Code:               \documentclass[DIV14,parskip=half-]{scrartcl}          \usepackage[utf8]{inputenc}     \usepackage[ngerman]{babel}     \usepackage[T1]{fontenc}          \usepackage{tikz}     \usepackage{tkz-euclide}     \usetkzobj{all}          \begin{document}          \begin{tikzpicture}             \draw (0, 0) grid (10, 10);             \tkzDefPoint(0, 0){A}             \tkzDefPoint(4, 0){B}             \tkzDefPoint(6, 3.5){C}             \tkzDefPoint(2, 3.5){D}             \draw (0, 0) node[below left] {A} -- (4, 0) node[below right] {B} -- (6, 3.5) node[above right] {C} -- (2, 3.5) node[above left] {D} -- cycle;             \tkzCircumCenter(A,B,D)             \tkzGetPoint{O}             \tkzDrawCircle(O,A)             \tkzCircumCenter(A,C,D)             \tkzGetPoint{O}             \tkzDrawCircle(O,A)     \end{tikzpicture}          \end{document}


title: How to change the theorem counter, theorem name in a specific case

text: I have used GMS class to write design a math book. In that book, the author has a special theorem, as following:               \documentclass{gsm-l}     \newtheorem{theorem}{Theorem}     \newtheorem{lemma}[theorem]{Lemma}     \theoremstyle{definition}     \newtheorem{definition}[theorem]{Definition}     \newtheorem{example}[theorem]{Example}     \newtheorem{xca}[theorem]{Exercise}     \theoremstyle{remark}     \newtheorem{remark}[theorem]{Remark}     \numberwithin{section}{chapter}     \numberwithin{equation}{chapter}     \setcounter{tocdepth}{2}     \makeindex     \begin{document}     \title{}     \maketitle          \section{Indent the subsection}     \begin{theorem}Here is theorem 1     \end{theorem}     \begin{theorem}This theorem must be numbered as theorem 2A     \end{theorem}     \printindex     \end{document}      As you can see in the MWE, there are two theorems. I want to number the second theorem to theorem 2A, and the next theorem to that is theorem 3 as usual. How can I do? Please help me. Thanks.


title: How to use "fit" to frame the nodes and labels

text: I'm using the `fit` TikZ library to fit a rectangle around two nodes which include `label`s. However, the rectangle is only fit around the actual nodes, not about their labels:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{fit}          \begin{document}     \begin{tikzpicture}               \node [label=label1,draw] (node1) {Node1};     \node [label=label2,draw] (node2) at (4,2){Node2};          \node[fit=(node1)(node2), draw] {};     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/V52Tm.jpg) How to fit the rectangle also around the node labels?


title: table not fitting

text: Ciao guys, I need to make the table below have certain properties To fit onto the page. And then making the columns evenly spaced even if it means breaking up the long column label.               \documentclass[12pt]{article} %     \usepackage{booktabs}% http://ctan.org/pkg/booktabs     \usepackage{tabularx}% http://ctan.org/pkg/tabularx          \begin{document}     \begin{table}[htbp]       \centering       \caption{Descriptive statistics of country-level yearly covariates}         \begin{tabular}{rccc|ccc}         \addlinespace         \toprule               & \multicolumn{3}{c}{Countries experiencing spont. events of disturbance } & \multicolumn{3}{c}{Countries not experiencing spont. events of disturbance } \\         \midrule               & Obs   & Mean  & Std Dev. & Obs   & Mean  & Std. Dev \\                         \hline         Urban population (percent) & 525   & 32.527 & 13.186 & 273   & 30.994 & 11.883 \\         GDP per capita (constant, USD, year 2000) & 462   & 643.516 & 700.011 & 270   & 488.737 & 480.186 \\         Democracy indicator (Binary) & 474   & 0.409 & 0.492 & 242   & 0.178 & 0.383 \\         Internet penetration (users/100 of population) & 418   & 2.739 & 4.598 & 213   & 2.916 & 5.954 \\         Cellphone subscribers (users/100 of population) & 524   & 10.857 & 20.657 & 270   & 12.015 & 24.364 \\         \bottomrule         \end{tabular}%       \label{covariates}%     \end{table}%     \end{document}


title: Global pgfplotset messing up error bars

text: I have a plot with some error bars generated with this code, but the error bars are messed up.               \documentclass{article}     \usepackage{pgfplots}     \pgfplotsset{compat=newest}     \pgfplotsset{     every axis/.append style={     scale only axis,        },     /tikz/every picture/.append style={     baseline,     trim axis left,     trim axis right,         }     }     \begin{document}     \begin{tikzpicture}     \begin{axis}[%     width=4.5in,     height=3.5in,     scale only axis,     xmode=log,     xmin=0.001,     xmax=1,     xminorticks=true,     ymin=0,     ymax=250     ]     \addplot [color=blue,solid,forget plot]      plot [error bars/.cd, y dir = both, y explicit]      table[row sep=crcr, y error plus index=2, y error minus index=3]{0.0625469 25.07   0.25    0.25\\     0.0390918   54.77   0.649999999999999   0.649999999999999\\     0.0244324   154.33  1.5 1.5\\     0.0152702   200 5.5 5.5\\     0.00954391  208.67  5.5 5.5\\     0.00596494  215.33  6   6\\     0.00372809  219 2.5 2.5\\     0.00233006  220.67  5   5\\     0.00145628  221 1.5 1.5\\     };     \end{axis}     \end{tikzpicture}%     \end{document}      ![plot](http://i.stack.imgur.com/ntvoW.png) But if I remove               \pgfplotsset{     every axis/.append style={     scale only axis,        },     /tikz/every picture/.append style={     baseline,     trim axis left,     trim axis right,         }     }      It looks fine. The problem is like that `pgfplotset` command early in my document to control all alignment and axis trimming. Any solutions? Thanks


title: Applying TikZ options stored in a file

text: I need to set some TikZ options that have been written to a file by a script. I thought I could use a helper macro defined with `\edef` and the expandable version of `\input` as described in Why is \input not expandable?, but the compilation of my minimal document fails with               Runaway definition?     ->\tikzset { every node/.style={ fill=orange!50,draw=black,thick     ! File ended while scanning definition of \auxmacro.     <inserted text>     }     l.12 \@@input inputfile.txt      Here's the test document               \documentclass{article}     \usepackage{tikz}     \usepackage{filecontents}          \begin{filecontents}{inputfile.txt}     fill=orange!50,draw=black,thick     \end{filecontents}          \makeatletter     \edef\auxmacro{\noexpand\tikzset{         every node/.style={             \@@input inputfile.txt         }     }}     \auxmacro     \makeatother          \begin{document}     \begin{tikzpicture}     \node {Testnode};     \end{tikzpicture}     \end{document}      How can I apply TikZ options stored in a file?


title: Using \frak with context

text: I am trying context out and cannot get `\frak` to work. Should the following work?               \starttext     {\frak The quick brown fox jumps over the lazy dog. 1234567890}     \stoptext      I did a cut and paste of the `{\frak}` line from http://wiki.contextgarden.net/Command/frak. I also tried the braces like `\frak{text}` but to no avail.


title: using tkz-graph to draw concentric cycles of vertices

text: I would like to use `tkz-graph` to layout cycles of vertices on concentric circles. If I had complete cycles then `tkz-berge` would do teh job nicely but because I wish to exclude some edges it seems to me that I need the former package. I would like to be able to achieve something like the subfigure on the left (first tikzpicture environment) by means of the `tkz-graph`'s `\Vertices*` and `\Edges` macros. Here is a failing MWE, I believe.               \documentclass{standalone}               \usepackage{tikz}     \usepackage{tkz-berge}          \begin{document}         \begin{tikzpicture}[scale=0.45,rotate=22.5]           \GraphInit[vstyle=Simple]           \tikzset{VertexStyle/.append style={minimum size=3pt}}           \grCycle[RA=1.0,prefix=a,Math=true]{8}           \grCycle[RA=2.5,prefix=b,Math=true]{8}           \grCycle[RA=4.0,prefix=c,Math=true]{8}           \grCycle[RA=5.5,prefix=d,Math=true]{8}           \EdgeIdentity{a}{b}{8}           \EdgeIdentity{b}{c}{8}           \EdgeIdentity{c}{d}{8}         \end{tikzpicture}              \begin{tikzpicture}[scale=0.45,rotate=18]           \GraphInit[vstyle=Simple]           \tikzset{VertexStyle/.append style={minimum size=3pt}}           \tikzset{node distance = 1.5cm}           \Vertices{circle}{A,B,C,D,E}                \begin{scope}             \tikzset{VertexStyle/.append style={node distance = 3cm}}     %        \tikzstyle{every node} = [node distance = 3cm]             \Vertices*{circle}{F,G,H,I,J}           \end{scope}                \begin{scope}             \tikzset{VertexStyle/.append style={node distance = 4.5cm}}     %        \tikzstyle{every node} = [node distance = 3cm]             \Vertices*{circle}{K,L,M,N,O}           \end{scope}         \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/Boi29.png) From what I have read the answer might be for me to use `\SetGraphUnit{1.5}` but for other reasons I do not want to upgrade my texlive installation to the latest one. Is there a way I can layout vertices on concentric circles so that I can add only those edges I need?


title: How to cite one bibentry in full length in the body text?

text: I am using the `natbib` package. Now I want to have a bibliography entry cited in full length in the text. That should also appear in the bibliography are. For example > Text text... > > Mr. ABCD (2012) HELLO WORL, This is a cite in Page... > > text text... > > .....bib area...   >  Mr. bbb sss ..   >  Mr. ABCD (2012) HELLO WORL, This is a cite in Page...


title: Drawing two angles, with arrowheads, and labeling edges of a triangle

text: I was given the following code on Stack Exchange for drawing a triangle with one vertex at the origin and with two angles drawn from the positive x-axis. I am using WinEdt to compile it. It is giving me error messages that are unfamiliar to me.               "<"C:\Program Files/My Own Download\MiKTeX 2.7\tex\latex\amsfonts\umsa.fd">"      Is there a package that I have to put in the preamble? I would also like to label the legs of the triangle a, b, and c and to give the coordinates of the vertices as `P = (\cos\phi, \sin\phi)` and `Q = (\cos\theta, \sin\theta)`.               \documentclass{amsart}     \usepackage{}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{amsthm}     \usepackage{newlfont}     \usepackage{mathtools}     \usepackage{tikz}          \tikzset{     mydot/.style={       fill,       circle,       inner sep=1.5pt       }     }          \begin{document}          \begin{tikzpicture}[>=latex]               % the coordinates of the vertices     \coordinate (O) at (0,0);     \coordinate (A) at (2,1);     \coordinate (B) at (-3,5);          % the axis     \draw[help lines,->] (-3.5,0) -- (2.5,0);     \draw[help lines,->] (0,-0.5) -- (0,5.5);          % the edges of the triangle     \draw (O) -- (A) -- (B) -- cycle;          % labelling the vertices     \node[mydot,label={right:$A$}] at (A) {};     \node[mydot,label={left:$B$}] at (B) {};     \node[mydot,label={below:$O$}] at (O) {};          % the arcs for the angles     \begin{scope}[gray]     \draw[->]       (1,0) +(0:0.5cm) arc [radius=1cm,start angle=0,end angle=41] node[midway,right] {$\phi$};     \draw[->]       (0.5,0) +(0:0.25cm) arc [radius=0.75cm,start angle=0,end angle=122] node[midway,above] {$\theta$};     \end{scope}     \end{tikzpicture}          \end{document}


title: Good at using TeX, bad at installing it

text: I'm hoping you can help out a clueless person. As a former mathematical physicist, I've used Tex or LaTeX to typeset just about everything under the sun. But when it comes to installing the thing, I feel like one of my Luddite relatives. I've visited the usual download sites many times over the past few years, and I can't even parse the language in the how-to. I should say, I'm no longer in academia and so this stuff doesn't happen automatically anymore. And nobody outside of academia seems to have heard of TeX, so I can't get any person-to-person help. N.B., I'm using Windows these days. Today I tried installing TeX for what must be the dozenth time. This time I downloaded ProTeXt and installed MiKTeX and TeXStudio. I can typeset basic articles now (yay!). But I need to use graphics too. And my problem. When I try to use the command `\usepackage{graphicx}`, a TeXStudio dialog box pop up and says: > The required file `tex\context\base\supp-pdf.mkii` is missing. It is part of > the package `mptopdf`. This package will be installed from…" And I have the choice to install from the Web, a directory, or a CD. So I choose to install from a directory. It asks what directory. I have no way of knowing what directory. So I scour `C:\Program Files (x86)\MiKTeX`, and discover that there is a file called `mptopdf` in location `C:\Program Files (x86)\MiKTeX\tpm\packages`. So I tell the dialog box to install from `C:\Program Files (x86)\MiKTeX\tpm\packages`. > Error message: "Not a local package repository." Now, if a directory on my machine called `packages`, which contains a package called `mptopdf`, is not a 'local package repository,' then what is? How can I get graphics to work in my installation? Many thanks in advance. I'm not as dumb as I sound, but getting TeX post- academia has really stumped me.


title: `a, `b etc not giving \alpha, \beta etc in auctex

text: I am using Auctex in Emacs for typing mathematical documents. I am very new to emacs and tex in general. I heard it from a friend that `a will expand as \alpha and so on in auctex, but this is not happening for me. Please help


title: Change font size

text: I trying to change the size of the eurm font in a paper by defining it like this:               \font\twelveeurm=eurm12 \font\eleveneurm=eurm11 \font\teneurm=eurm10 \font\nineeurm=eurm9      \font\eighteurm=eurm8 \font\seveneurm=eurm7 \font\fiveeurm=eurm5 \newfam\eurmfam     \textfont\eurmfam=\teneurm \scriptfont\eurmfam=\nineeurm \scriptscriptfont\eurmfam=\fiveeurm     \def\eurm#1{{\fam\eurmfam\relax#1}}      I am using the packages `euler`, `amsmath`, `amsthm`, `amssymb`, `showlabels` in the preamble. One character has been defined:               \def\g{\text{{\twelveeurm g}}}      I keep getting these error messages:               \twelveeurm=eurm12 not loadable: Bad metric (TFM) file.      I wasn't able to read the size data for this font, so I will ignore the font specification; and a similar message with `\eleveneurm`. My apologies for the log post


title: Tabular table wordbreak

text: I've got the following table (generated by pandoc html => tex):               \begin{longtable}[c]{@{}lll@{}}     \toprule\addlinespace     \begin{minipage}[b]{0.23\columnwidth}\raggedright     Naam     \end{minipage} & \begin{minipage}[b]{0.46\columnwidth}\raggedright     Eigenschap     \end{minipage} & \begin{minipage}[b]{0.23\columnwidth}\raggedright     Value     \end{minipage}     \\\addlinespace     \midrule\endhead     \begin{minipage}[t]{0.23\columnwidth}\raggedright     TesttesttesttestTesttesttesttest     \end{minipage} & \begin{minipage}[t]{0.46\columnwidth}\raggedright     String lal ei igigieieieieieie     \end{minipage} & \begin{minipage}[t]{0.23\columnwidth}\raggedright     Lalalaallala     \end{minipage}     \\\addlinespace     \begin{minipage}[t]{0.23\columnwidth}\raggedright     Test test test test     \end{minipage} & \begin{minipage}[t]{0.46\columnwidth}\raggedright     String     \end{minipage} & \begin{minipage}[t]{0.23\columnwidth}\raggedright     Lalalaallala     \end{minipage}     \\\addlinespace     \begin{minipage}[t]{0.23\columnwidth}\raggedright     Test test test test     \end{minipage} & \begin{minipage}[t]{0.46\columnwidth}\raggedright     String     \end{minipage} & \begin{minipage}[t]{0.23\columnwidth}\raggedright     Lalalaallala     \end{minipage}     \\\addlinespace     \begin{minipage}[t]{0.23\columnwidth}\raggedright     Test test test test     \end{minipage} & \begin{minipage}[t]{0.46\columnwidth}\raggedright     String     \end{minipage} & \begin{minipage}[t]{0.23\columnwidth}\raggedright     Lalalaallala     \end{minipage}     \\\addlinespace     \begin{minipage}[t]{0.23\columnwidth}\raggedright     Test test test test     \end{minipage} & \begin{minipage}[t]{0.46\columnwidth}\raggedright     String     \end{minipage} & \begin{minipage}[t]{0.23\columnwidth}\raggedright     Lalalaallala     \end{minipage}     \\\addlinespace     \bottomrule     \end{longtable}      The second row and the first cell has the value 'Testtesttestst....', the 'word' should be broken; otherwise you'll see the table like this: ![wrong table](http://i.stack.imgur.com/4aSzy.png) I know this is fixable with \hline - but that doesn't seem to do the job for me..


title: How to define the distance of color regions in radial shading using TikZ?

text: I am making a series of figures explaining the photolithographic process, and need to find a way to illustrate edge beads during spin coating. To show this I initially wanted to use radial shading, and create a band around the edge of my figure where the color darkens over a short distance, but I cannot seem to find out how to define the width of the inner or outer color in that shading mode. The result is that the shading I want to employ progresses gradually from the origo of the circle and terminates at the very edge. How can I ensure that the color change starts a user definded distance from the edge? E.g. as indicated in the dummy code (does not compile):               \begin{tikzpicture}         \draw[outer color=purple!70!black,inner color=purple!80,fading width=5pt](0,0) circle (1.5);     \end{tikzpicture}


title: How to control latex appendix environment when placing R code in?

text: I am having a problem with latex environment. When I place r code using `\begin{lstlisting} ... code..\end{lstlisting}` other objects like tables are displayed only after the script subsections, despite it maintains the order in the content table page. Anyone knows how can I control this issue? here is my preamble:               \documentclass[12pt,a4paper,oneside]{article}     \usepackage{setspace}     \usepackage{natbib}     \usepackage{booktabs}     \usepackage{dcolumn}     \usepackage{graphicx}     \usepackage{amsmath}     \usepackage{listings,relsize}     \lstset{     basicstyle=\small,      keywordstyle=\color{red}\itshape,     commentstyle=\color{blue},      stringstyle=\ttfamily,      showstringspaces=false,     numbers=left, numberstyle=\tiny,      columns=fullflexible }     \newcommand{\ra} [1] {\renewcommand{\arraystretch} {#1} }


title: creating bibliography with natbib as an individually numbered section

text: hi I'm using natbib with an "apalike" style. When I generate the bibliography at the end of my document it is titles "references". Is there a way to have the title numbered in line with my other sections?               \documentclass[a4paper, 11pt]{article}     \usepackage{natbib}          \begin{document}     \bibliographystyle{apalike}               \section{Overview} displayed as section number 1          \section{Scientific Interest} displayed as section number 2          \section{Research Question}          \section{Theoretical Background / Literature Review}          \section{Hypotheses}     \section{Methods}          \bibliography{jab} ---> HERE I WANT IT TO BE DISPLAYED AS "8 References"     \end{document}


title: How to bring the journal name at the top in IEEEtran?

text: I am new to Latex. At the top of my paper, i want to bring the name of conference/journal. I don't know what should i call it..i have already tried to use `header` but header is something different. i want to bring the top line ( **"JOURNAL OF LATEX CLASS FILES, VOL. 11, NO. 4, DECEMBER 2012"** ) as shown in the image below: ![image](http://i.imgur.com/UDZulqk.png). Currently i am using the following code:               \documentclass[12pt,conference]{IEEEtran}     \usepackage{lipsum}     \usepackage{fancyhdr} %used for header     \pagestyle{fancy} %also used for header     \usepackage{cite}      \usepackage[cmex10]{amsmath}     \usepackage{graphicx}     \usepackage[caption=false,font=footnotesize]{subfig}     \usepackage{url}     \usepackage{url}     \usepackage{amssymb}     \usepackage{amsfonts}     \usepackage[all,graph]{xy}     \usepackage{booktabs}     \usepackage{multirow}     \usepackage{array}     \usepackage{comment}           \title{Affect of Motion Direction}     \author     {\IEEEauthorblockN{SKM}     \IEEEauthorblockA{Faculty of Electrical Engineering\\     University of XYZ\\     skm@mail.com}     }     \markboth{IEEE Transactions on \LaTeX}{SKM: My IEEE article}              \begin{document}     \maketitle          \input{abstract}          \begin{keywords}     Attention shift, Eye movement, Spatial attention.     \end{keywords}          \input{introduction}     \section{REVIEW OF EXISTING MATERIAL}     \input{exp_method}         \section{EXPERIMENTAL RESULTS}     \section{GENERAL DISCUSSION}          \bibliography{refer.bib}     \bibliographystyle{plain}          \end{document}


title: Making a black hole and information

text: I would like to make the picture similar to the following to represent information in a black hole horizon and black hole inside the sphere in tex. I can make a sphere but making the discrete bits seem hard, I cant get it looking nice like the image at all. Any ideas? ![Black Hole](http://i.stack.imgur.com/MefYU.jpg) ![enter image description here](http://i.stack.imgur.com/jXcJf.jpg)


title: Letting variables take on random values in TikZ inside \foreach

text: I want to use variables to store a value in TikZ and do computations based on it. For instance, I want to have variables `a,b` and `c` for the following purpose in TikZ: `\draw (a,b) circle (r)` I should be able to assign `a,b` and `c` (these can be decimals) and the circle must be drawn at the desired location with the desired radius. How do I go about doing this? PS: Essentially, I want to draw 100 small circles inside a unit square at random locations. Hence, I want the variables `a`, `b` and `c` to take random values. Below is my attempt, which doesn't work.               \documentclass{standalone}          \usepackage[first=0, last=1000]{lcg}     \usepackage{tikz}          \begin{document}          \begin{tikzpicture}     \foreach \i in {1,2,...,100}{         \def{a}{\rand\arabic{rand}}         \def{b}{\rand\arabic{rand}}         \draw(a/1000,b/1000) circle (0.001);     }     \end{tikzpicture}          \end{document}


title: Defining variables in TikZ

text: I'm trying to define random variables - for example to draw some random points of the form (r,r) when r is a random number. I tried `\def\myrandomnumber{rnd}`, but that seems to give me a new random number every time. What's to be done?


title: Why cannot I compile `\documentclass{minimal}\document . \enddocument` ?

text: Why cannot I compile the most minimal code below?               \documentclass{minimal}\document . \enddocument


title: Wrong protrusion with csquotes and microtype

text: I’m experiencing problems using the `csquotes` package and `microtype` using protrusion (margin kerning). The problem is that using `\enquote` I only get margin kerning on the left margin.               \documentclass{minimal}          \usepackage[utf8]{inputenc}     \usepackage[ngerman]{babel}     \usepackage[tracking]{microtype}          \usepackage{csquotes}     \MakeAutoQuote{»}{«}          \begin{document}     \def\blindtext{Dies hier ist ein Blindtext zum Testen, Testen, Testen und Testen von Textausgaben und anderen Zeichen}          \noindent%     „\blindtext.“ \blindtext{} in mehreren Zeilen.\\     \enquote{\blindtext.} \blindtext{} in mehreren Zeilen.\\     »\blindtext.« \blindtext{} in mehreren Zeilen.\\     \end{document}      The first text uses manually set quotation marks which give margin kerning both left _and_ right. The second and third text snipped only protrude on the left margin. Any ideas why I have this problem and how I can possibly solve it?


title: LuaTeX and graphics

text: I'd like to know what LuaTeX offers in terms of graphics: I'm mostly interested in pstricks and tikz/pgfplots. Could it help tikz to run faster? Would it help tikz to handle 3D non-parallel figures? (which is not available yet and is CPU consuming). What could it bring to the pstricks package users?


title: Without using `\fboxsep` method, how to make a cell has 4 equal paddings?

text: # Scenario Plese see the screenshot below. The top table is produced using `minipage`-typed column and the bottom table is produced using `m{}`. **WITHOUT** using `\fboxsep` approach (that was already answered here), how to modify the bottom table such that it looks like the top table? * * * # Screenshot ![alt text](http://i.stack.imgur.com/D4Xe1.png) * * * # Minimal Code               \documentclass{article}     \usepackage{array,calc,longtable}          \tabcolsep=5mm     \arrayrulewidth=2pt          \newcolumntype{A}     {          >{\begin{minipage}{0.3\linewidth-2\tabcolsep-1.5\arrayrulewidth}%          \vspace{\tabcolsep}\centering}%         c%         <{\vspace{\tabcolsep}\end{minipage}}%        }          \newcolumntype{B}     {          @{}>{\centering}%         m{0.3\linewidth-0\tabcolsep-1.5\arrayrulewidth}%         <{}@{}%     }          \def\pic{\rule{2.5cm}{1cm}}     \begin{document}          \begin{longtable}{|*2{A|}}\hline     \pic & \pic \tabularnewline\hline     \end{longtable}          \begin{longtable}{|*2{B|}}\hline     \pic & \pic \tabularnewline\hline     \end{longtable}          \end{document}


title: Question about indent lengths in ToC

text: It seems that there is a different length between the different levels. It seems it is larger between the `subsection` and `subsubsection` as opposed to between the `section` and `subsection`. I have read that using the `tocloft` package that `indent` and `numwidth` control these lengths. How do I change them so they are all 0.5 in? and also include down to the paragraph level? (just a note: I don't want to change the indenting size in the body just the ToC)


title: Adding a CTAN package to a MacPorts-maintained TeX installation

text: I have installed **TeXlive** through **MacPorts** and now discover that I am missing some package. For clarity let's use a trivial example and say I am missing lipsum.sty. I now have two options: **Option 1** I go to a **CTAN** site, look for lipsum.sty, download it, and install it in `~/Library/texmf/tex`. This is not bad, but it leaves it possible that I will end up with a second lipsum at some point. That's why the second option is desirable. **Option 2** 2.1-- I find out which MacPorts package includes lipsum.sty and 2.2-- I `sudo port install` the necessary package. How do I do 2.1?


title: video embedding in TeX Live

text: I have to make videos. It can be done using different software available but I want to make it using LaTeX. Can anyone tell how to make videos using TeX Live and wined t editor.


title: Verbatim in beamer showing error: "File ended while scanning use of \@xverbatim."

text: I am using Texmaker and MiKTeX on Windows 7. I have the following `beamer` code,               \documentclass{beamer}     \theme{AnnArbor}     \begin{document}     \begin{frame}     \begin{verbatim}             \begin{frame}[<alignment>]        \frametitle{Frame Title Goes Here}        Frame body text and/or LATEX code        \end{frame}          \end{verbatim}     \end{frame}     \end{document}      I was expecting the following output,                      \begin{frame}[<alignment>]            \frametitle{Frame Title Goes Here}            Frame body text and/or LATEX code            \end{frame}      But instead I got the following Error Message,               File ended while scanning use of \@xverbatim.      Can any one please point out the error here. As far as I know verbatim can have anything inside it. Also when I tried the following code,               \begin{verbatim}      \ begin{frame}[<alignment>]      \frametitle{Frame Title Goes Here}      Frame body text and/or LATEX code      \ end{frame}     \end{verbatim}      I got the following output,                   \ begin{frame}[<alignment>]          \frametitle{Frame Title Goes Here}          Frame body text and/or LATEX code         \ end{frame}      But I don't want space between `\` and `begin` and `\` and `end`.


title: How do I control parskip within a tcolorbox?

text: I am using the `tcolorbox` to provide some beautiful frames around certain parts of my document; I use the `parskip` to give nice spacing between paragraphs. When I have more than one paragraph inside a `tcolorbox` the `parskip` is not obeyed, as highlighted in the screen shot below. I have searched the manual, but it _seems_ to describe before and after skips, but not ' _during_ '. How can this be fixed? ![screenshot](http://i.stack.imgur.com/rw5hX.png) Here's a complete MWE that demonstrates the problem:               % arara: pdflatex     \documentclass{article}          \usepackage{tcolorbox}     \usepackage{lipsum}     \usepackage{parskip}          \begin{document}          \begin{tcolorbox}     \lipsum[1]          \lipsum[2]     \end{tcolorbox}          \lipsum     \end{document}


title: Why are certain mathematics operators not defined and how do I replicate them?

text: I noticed that while `\ker` renders correctly as the "kernel" operator in Linear Algebra, the corresponding `\im` for the "image" is not defined (I tried everything that could possibly be an abbreviation for "image") nor is "rank" given a command. Can I get these operators from some kind of 'math add-on' package? And if not, how should I typeset operators correctly? I tried `\text{im}A` but this didn't put any space, so I ended up doing `\text{im}\, A` - is that the right amount of spacing for an operator? EDIT: Also, what's the difference between `\text{stuff}` and `\mathrm{text}`?


title: Using foreach loop variable as node label in pgfplots

text: I have a (multi)line plot generated from a table in pgfplots:               \begin{document}     \begin{tikzpicture}     \begin{axis}     \pgfplotstableread{table.tsv}\loadedtable       \foreach \metavar in {foo,bar} {         \addplot table[x index=1,y=\metavar] from \loadedtable node {\metavar};       }     \end{axis}     \end{tikzpicture}     \end{document}      This works well **except** for the node I want to place at the end of each line as a kind of _inline_ legend. Here, LaTeX complains:               ! Argument of \T1\metavar has an extra }.     <inserted text>                       \par       If I substitute the `\metavar` node label with some literal text, everything compiles fine, but this of course misses the point of the `\foreach`. So how do I access a loop variable in a place like this?


title: Change appearance of natbib \cite locally

text: I am sorry if this question has already been addressed somewhere; it appears my Google Fu is weak with respect to this question. # The Problem I am trying to create a table that compiles experimental data. My aim is to include the reference in a separate column, so as to distinguish it from the values in other columns. The problem that I now have is that the references generated still are formatted the same as in normal text (superscript). This is highly unpractical for use in the table, as the font size in it will also be smaller than normal text. ## Minimum working example Here is a MWE that demonstrates the problem:               \documentclass[english,12pt,oneside]{scrartcl}          \usepackage[english]{babel}             \usepackage[T1]{fontenc}                                                             \usepackage[hidelinks]{hyperref}     \usepackage{charter}     \usepackage[a4paper,left=30mm,right=20mm,top=25mm,bottom=25mm,                 marginparwidth=3cm]{geometry}      \usepackage[font=small,format=plain,labelfont=bf,up,textfont=up]{caption}     \usepackage[super, sort&compress]{natbib}               \begin{document}     \section{Introduction}     The influence of rings\cite{ref1} must not be neglected when examining this or      the other. Furthermore, acting is a career choice that should always be held in      high regard.\cite{ref2}          \section{The Table}     \begin{table}[h!]         \centering         \caption{This is the table that I am talking about. All the time.}         \begin{tabular}{lrr}         \hline \hline         Field name & Value & Ref. \\         \hline         Arg1 & 122.3 & \cite{ref1} \\         Arg2 & 129.4 & \cite{ref2} \\         \hline         \end{tabular}     \end{table}               \footnotesize     \bibliographystyle{unsrt}     \bibliography{biblio}          \end{document}      biblio.bib:               @article{ref1,         author    = {Hermann Hesse},         title     = "The Things about Annular Rings",         journal   = "Journal of Rings",         year      = "2064"     }     @article{ref2,         author={Julia Roberts},         title={Acting: A Career},         journal = {Journal of Acting Reviews},         pages={20--23},         year=1997     }      ## Output ![Output of the MWE above.](http://i.stack.imgur.com/1nWs6.png) ## Desired Output I'd like the table to look like the following: ![Desired output](http://i.stack.imgur.com/W17Nm.png) Generally it would be great to have some new type of command like `\tablecite{}` which would then not superscript the reference. Thanks in advance!


title: How can I get two tables side by side in landscape mode?

text: I'd like to get two tables side by side in landscape mode with an appendix title at the top. Here's what I've been working with:               \documentclass{article}     \usepackage{pdflscape}     \begin{document}          \begin{center}          \appendix{\large{\bf Appendix 4b: Overall Usage Statistics}}\\     \medskip                    \emph{Table 1: Oriented to Bormino Usage}\\     \medskip          \begin{tabular}{lcccc}     Context & Italian & Bormino & Both & N/A \\\hline     \\     Mother & 24.3\% & 59.5\% & 16.2\% & 0\% \\     Parents to age 10 & 27.0\% & 59.5\% & 13.5\% & 0\% \\     Father & 29.7\% & 56.8\% & 10.8\% & 2.7\% \\     Grandfather & 24.3\% & 55.9\% & 10.8\% & 13.5\% \\     Grandmother & 24.3\% & 54.1\% & 13.5\% & 8.1\% \\     Brothers & 21.6\% & 46.0\% & 10.8\% & 21.6\% \\     Swearing & 27.0\% & 40.5\% & 16.2\% & 16.2\% \\     Sisters & 8.1\% & 35.1\% & 8.1\% & 48.7\% \\     Relatives & 24.3\% & 32.4\% & 43.2\% & 0\% \\     Neighbors & 24.3\% & 27.0\% & 46.0\% & 2.7\% \\     Partner & 32.4\% & 24.3\% & 27.0\% & 16.2\% \\     Son & 16.2\% & 21.6\% & 16.2\% & 46.0\% \\     Localities & 29.7\% & 21.6\% & 48.7\% & 0\% \\     At Work & 32.4\% & 21.6\% & 43.2\% & 2.7\% \\     Colleagues & 29.7\% & 18.9\% & 48.7\% & 2.7\% \\     Schoolmates & 43.2\% & 16.2\% & 32.4\% & 8.1\% \\     Thinking & 43.2\% & 16.2\% & 35.1\% & 5.4\% \\     Daughter & 13.5\% & 13.5\% & 8.1\% & 64.9\% \\     Officials & 67.6\% & 13.5\% & 18.9\% & 0\% \\     Praying & 40.5\% & 10.8\% & 16.2\% & 32.4\% \\     Counting/Mental math & 62.2\% & 8.1\% & 29.7\% & 0\% \\     Teachers & 73.0\% & 8.1\% & 5.4\% & 13.5\% \\          \end{tabular}               \emph{Table 2: Oriented to Italian Usage}\\     \medskip          \begin{tabular}{lcccc}     Context & Italian & Bormino & Both & N/A \\\hline     \\     Teachers & 73.0\% & 8.1\% & 5.4\% & 13.5\% \\     Officials & 67.6\% & 13.5\% & 18.9\% & 0\% \\     Counting/Mental math & 62.2\% & 8.1\% & 29.7\% & 0\% \\     Thinking & 43.2\% & 16.2\% & 35.1\% & 5.4\% \\     Schoolmates & 43.2\% & 16.2\% & 32.4\% & 8.1\% \\     Praying & 40.5\% & 10.8\% & 16.2\% & 32.4\% \\     Partner & 32.4\% & 24.3\% & 27.0\% & 16.2\% \\     At Work & 32.4\% & 21.6\% & 43.2\% & 2.7\% \\     Colleagues & 29.7\% & 18.9\% & 48.7\% & 2.7\% \\     Localities & 29.7\% & 21.6\% & 48.7\% & 0\% \\     Father & 29.7\% & 56.8\% & 10.8\% & 2.7\% \\     Swearing & 27.0\% & 40.5\% & 16.2\% & 16.2\% \\     Parents to age 10 & 27.0\% & 59.5\% & 13.5\% & 0\% \\     Neighbors & 24.3\% & 27.0\% & 46.0\% & 2.7\% \\     Relatives & 24.3\% & 32.4\% & 43.2\% & 0\% \\     Mother & 24.3\% & 59.5\% & 16.2\% & 0\% \\     Grandmother & 24.3\% & 54.1\% & 13.5\% & 8.1\% \\     Grandfather & 24.3\% & 55.9\% & 10.8\% & 13.5\% \\     Brothers & 21.6\% & 46.0\% & 10.8\% & 21.6\% \\     Son & 16.2\% & 21.6\% & 16.2\% & 46.0\% \\     Daughter & 13.5\% & 13.5\% & 8.1\% & 64.9\% \\     Sisters & 8.1\% & 35.1\% & 8.1\% & 48.7\% \\          \end{tabular}     \end{center}     \end{landscape}     \end{document}      I've tried using minipage, but the two tables always appear on the left of the page on top of each other when I do this. Other options such as sidewaystable or column don't work either, they split the tables to two pages. I can't seem to find any other answers regarding side-by-side columns in landscape, so any advice would be useful. Thanks a lot!


title: Automatic thousands separators?

text: I want to typeset big numbers with a separator (e.g a space or a ",") between hundreds and thousands, etc... For example 1 Million = 1 000 000. I know the package `siunitx` which does it very well, but one must write `\num{the big number}`. Would it be possible, that this typeset automatically occurs for any number in a maths environment `$ ...$`, without being obliged to write explicitly `\num` ?


title: Index both authors and subjects with authorindex and makeindex

text: I am trying to make two separate indexes for my PhD dissertation, the author index and the subject index. Creating the author index is quit easy, I just use the `\usepackage{makeidx}` and `\printindex` command and `LaTeX` creates a beautiful author index for me. What if I want to add the subject index before the author index? I have read the responses to the similar question on StackExchange: How can I have two or more distinct indexes? but it is not a viable solution for me, because it requires me to manually index both authors and subjects. Currently, I do not have to index the authors and latex creates the index for me automatically. Is there any way to only index the subjects manually ( I mean to use `\index{key}` for every subject of interest) and have the authors index automatically? The \authorindex package does not work with \natbib


title: Latex replacing "Page 118" with "P1ge 118"

text: I am getting this very strange error in Latex using enumerate. My code is as follows:               \documentclass{article}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage[margin=.75 in]{geometry}     \usepackage{enumerate}          \begin{document}     \fbox{     \parbox{6.66 in}{     {\bf MATH 342 \hfill Name}          \emph{Problem Set \# 9 \hfill 25 January 2013}}}     \vspace{.1 in}          \begin {enumerate}[{\bf \ \ \ \ Page 71:}]         \item \ \ \         \begin{enumerate}             \item[37.]             \begin{enumerate}                 \item[d.]              \end{enumerate}             \item[80.]         \end{enumerate}     \end{enumerate}               \begin {enumerate}[{\bf \ \ \ \ Page 118:}]         \item \ \ \         \begin{enumerate}             \item[26.]             \item[27.]             \item[65.]          \end{enumerate}     \end{enumerate}               \begin {enumerate}[{\bf \ \ \ \ Page 138:}]         \item \ \ \         \begin{enumerate}             \item[3.]             \item[10.]             \item[42.]         \end{enumerate}     \end{enumerate}               \end{document}      This outputs everything as expected except "Page 118" is "P1ge 118" and "Page 138" is "P1ge 138" I am using TeXworks with MikTex if this makes any difference. Anybody know whats going on/how to fix it? Thanks


title: Adding foldmarks in KOMA-script but NOT scrlttr2

text: Is there an easy way to add foldmarks in KOMA-script classes? I am aware of the foldmarks-option in `scrlttr2`, but that works only in `scrlttr2`.


title: No page numbering

text: I have two sections before the table of contents, for which I use the following code:               \clearpage     \thispagestyle{empty}     \section*{RandomTitle}      The problem is, that latex starts the page numbering here and I don't want that. I want the page numbering to start after the table of contents. How do I do this?


title: I want donot have page number in the top and bottom of the pages

text: I want to remove the number pages from the file. How can I do? Please help me.


title: What to do if \clearpage does not flush the floats exactly?

text: Consider this MWE:               \documentclass[%     12pt,     journal,     onecolumn,     twoside,     draftcls,     letterpaper,     ]{IEEEtran}          \usepackage{tikz}     \usetikzlibrary{calc}     \usetikzlibrary{positioning}     \usepackage{adjustbox}     \usepackage{setspace} %\singlespacing     \usepackage[nopar]{lipsum}     \usepackage{xstring}     \usepackage{afterpage}          \begin{document}     \lipsum[1]          \lipsum[2]          \lipsum[3]          \lipsum[4]          \clearpage % \newpage % no effect %[1]     % \afterpage{\clearpage} % has effect, but page 1 doesn't end with [4], starts also \lipsum[5] %[2]          \begin{figure}[hbt]     \centering     \begin{tabular}{p{0.5\textwidth} p{0.5\textwidth}}       \vspace{0pt} \includegraphics[width=0.41\textwidth]{pic1.pdf} &       \vspace{0pt} \includegraphics[width=0.41\textwidth]{pic1.pdf}     \end{tabular}     \caption[hda-beh]{Something something, something, something something;     (some) something and something something (thing); some thing:     something something, something something}     \label{fig:something}     \end{figure}          \lipsum[5]          \lipsum[6]          \end{document}      ... where I'm using this pic1.pdf (an illustration I've had, with most content removed). I'm using `\clearpage` because I want the page to end after the fourth paragraph; then I'd expect the floats to be on page 2, and I'd expect the text to continue from page 3. However, with the above code as is (choice `%[1]`), I actually get this (click on thumbnails for full size): ![test10](http://i.stack.imgur.com/Pmz3vs.png) ![test11](http://i.stack.imgur.com/8nBf4s.png) ![test12](http://i.stack.imgur.com/vL90xs.png) ... that is, unexpectedly, text is placed on page 2, and the floats on page 3. If I use `\afterpage{\clearpage}` (that is, I uncomment `%[2]` and comment `%[1]`), I get this instead: ![test20](http://i.stack.imgur.com/yz8lJs.png) ![test21](http://i.stack.imgur.com/dcQHis.png) ![test22](http://i.stack.imgur.com/2GG0Ys.png) ... that is, now floats are on page 2, as expected - but page 1 does **not** end with paragraph 4, instead it includes a bit of paragraph 5 (circled in red), which I don't want! So how do I tell latex: "end the page HERE, flush floats on next page, and start with text on the page after that"?


title: Vertical alignment using multirow and booktabs

text: I'm trying to format correctly the following table:               \documentclass[a4paper,twoside]{report}     \usepackage{array,colortbl,multirow,multicol,booktabs,ctable}     \newcommand{\hdrule}{\midrule[\heavyrulewidth]}     \usepackage[english]{babel}     \usepackage{xunicode}     \usepackage[no-math]{fontspec}     \setmainfont[Ligatures=TeX]{TeX Gyre Pagella}     \begin{document}     \begin{table}[ht]     \centering     \begin{tabular}{ccccccc>{\itshape}r}     \toprule     a & b & c & d & e & f & g & 1 \\ \hdrule     \multirow{4}{*}{A} & \multirow{4}{*}{B} & \multirow{4}{*}{C} & \multirow{4}{*}{D} & \multirow{2}{*}{E} & F & G & 2 \\ \cmidrule{6-8}     &&&&& H & I & 3 \\ \cmidrule{5-8}     &&&& J & K & L & 4 \\ \cmidrule{5-8}     &&&& M & N & --- & 5 \\ \hdrule     --- & --- & --- & --- & O & P & Q & 6 \\ \bottomrule     \end{tabular}     \end{table}     \end{document}      I use the package `booktabs` for the horizontal rules, and it seems that it messes up the vertical centering as calculated by `multirow`. For instance, A B C and D should be aligned with the rule separating lines 2 and 3, and E should be aligned with the rule separating lines 1 and 2. Instead, it is slightly higher. Is there any way around this?


title: Is something wrong with @STRING processing between Jabref and biber?

text: I've just been revisiting bibliographies, and trying to manage them with Jabref. I seem to have found something wrong with `@string`s (or my understanding of them). In my pre-Jabref `.bib` file, I have:               @string{pok = "Poughkeepsie, NY"}     @Manual{dxcapa24,       ...       location    = pok,       ...     }      which in my `.bbl` file becomes, by courtesy of biber and BibLaTeX,               \list{location}{1}{%       {Poughkeepsie, NY}%       }      Now, after Jabref, my `.bib` file looks like this:               @STRING{pok = {Poughkeepsie, NY}}     @MANUAL{dxcapa24,       ...       location = {#pok#},       ...     }      which fails to expand correctly in my `.bbl` file, causing a LaTeX error when it gets imbedded:               \list{location}{1}{%         {#pok#}%         }      My questions are:   * Am I doing something wrong and if so, how do I correct it?   * Where is the definitive `@string` syntax and semantics reference for `.bib` files?   * Is there a problem with Jabref and/or biber? **Note:** I haven't provided a full MWE, as I believe the snippets fully illustrate the problem; but I'll be happy to provide one if the snippets are thought inadequate. * * * **Update:** From the BibTeX website: > When quotation-marks are used, string concatenation using # is possible, but > not when braces are used. Which _suggests_ that Jabref might be in error. A view has also been exposed in the SF Jabref forums that Jabref itself should convert @strings to their expanded values, with another, Jabref-specific, mechanism for handling abbreviations which removes the need for `biber` to do this. Not sure I'm entirely happy with that, though. * * * Thanks to @Fran for reminding me: in my case, `shorttitle` is also messed up, while `author`, `title`, and `publisher` are handled correctly. * * * @Fran's answer solves the problem. I apologise for any premature aspersions on Jabref.


title: Put from external file?

text: I need to write a command that read a line from a text file and expand to the content of this line, the next command read the next line and so on.               ...     \command{arg}     ...     \command{arg}     ...     \command{arg}     ...      the macro argument can't be used as an index in the external file, and that the external file is produced by a python script. Ethan:: the text file contain Arabic text generated in a line by line form by the python script... in a first pass of LateX (XeLateX) each \command write its argument in a fileIn.txt (Arabic text)... the python script take this file and produce fileOut.txt... in the second pass of Latex each \command will read its corresponding Line from fileOut.txt... The two text files contain simple line by line Arabic text...               line one     line two     .     .     .     last line      here is a MnWE:               usepackage{}     ...     ...     \newcommand{\command}[1]{....#1...}     ...     \begin{document}     ...     ...     \command{arg0}     ...     ...     \command{arg1}     ...     ...     ...     \command{arg2}     ...     ...     \command{arg3}     ...          \end{document}      in the first pass \command{..} is typically like \index{..} wich WRITE content in an external file... but in second pass i havn't any idea about the command in ()TeX wich PUTS a content from an external file... hope all is clear now.


title: Koma-Script (scrbook): twocolumn formatting and wide equation problem

text: I use `scrbook` class (see bellow) in my book and sometimes I need **typeset wide equation**.               \documentclass[%         ,fontsize=12pt    %          ,a3paper         % pagesize         ,twocolumn      ]{scrbook}     \areaset[5mm]{250mm}{350mm}     \unsettoc{toc}{twocolumn}      Is it possible to _partially switch between one and two column formatting_? I tried to use the library `widetext`, but I'm afraid that it is not a part of the MiKTeX distribution. I would like to typeset wide equation in the text, not only at a bottom or top side. Is it possible? **MNWE:** (added wide equation; for `\setchaptertoc` see KOMA-Script (scrbook): onecolumn table of contents & minitoc in twocolumn document)               \documentclass[twocolumn]{scrbook}     \usepackage[nohints]{minitoc}     \usepackage{amsmath, amsthm, amssymb, amsfonts, amsbsy}     \usepackage{bigints}     \usepackage{mathtools}     \mtcsetrules{minitoc}{off}     \usepackage{lipsum}          \newcommand*{\setchaptertoc}{%       \setchapterpreamble{       \vspace{1.85\baselineskip} % workaround for removed rule       \smash{\makebox[\linewidth]{\hrulefill}} % workaround for removed rule       \vspace{-1.85\baselineskip} % workaround for removed rule       \minitoc       \vspace{-1.15\baselineskip} % workaround for removed rule       \smash{\makebox[\linewidth]{\hrulefill}} % workaround for removed rule       \vspace{1.15\baselineskip} % workaround for removed rule     }}     \newcommand{\dd}[1]{\hspace{2pt}d#1}          \begin{document}     \dominitoc     \tableofcontents          \setchaptertoc     \chapter{One}     \lipsum[1]         \begin{equation}\label{fyz:fey_eq_elstat18}           E_x(x_1, y_1, z_1) =              \int\limits_{\substack{\text{all}\\\text{area}}}\varrho(x_2, y_2, z_2)             \frac{x_1-x_2}{[(x_1-x_2)^2+(y_1-y_2)^2+(z_1-z_2)^2]^{\frac{3}{2}}}\dd{x_2}\dd{y_2}\dd{z_2}         \end{equation}      \lipsum[1]         \section{One, one}     \lipsum[2]     \subsection{One, one, one}     \lipsum[3]     \section{One, two}     \lipsum[4]          \setchaptertoc     \chapter{Two}     \lipsum[5]     \section{Two, one}     \lipsum[6]     \section{Two, two}     \subsection{two, two, one}     \lipsum[7]          \setchaptertoc     \chapter{Three}     \section{Three, one}     \lipsum[8]     \section{Three, two}     \lipsum[9]     \end{document}      ![enter image description here](http://i.stack.imgur.com/vAmuJ.png)


title: Multiple footnotes in equations in stackrel/overset with hyperref

text: I'm trying to place more than one footnote over equality sign in align* environment. With one footmark, it's easy:               \begin{align*}     x\overset{\footnotemark}{=}y     \end{align*}     \footnotetext{Comment1}      That's fine. So, I thought that when I add more footnotes, latex will automatically understand me:               \begin{align*}     x\overset{\footnotemark}{=}y\overset{\footnotemark}{=}z     \end{align*}     \footnotetext{Comment1}     \footnotetext{Comment2}      But it didn't, of course. After a while I modified it:               \begin{align*}     x\overset{\footnotemark[1]}{=}y\overset{\footnotemark[2]}{=}z     \end{align*}     \footnotetext[1]{Comment1}     \footnotetext[2]{Comment2}      And it worked! Sort of.... First of all, I'm using hyperref, and these footnotes are not linked. Secondly, when I try creating a new footnote:               \begin{align*}     x\overset{\footnotemark[1]}{=}y\overset{\footnotemark[2]}{=}z     \end{align*}     \footnotetext[1]{Comment1}     \footnotetext[2]{Comment2}          And now for something completely different\footnote{Python, M.}.      it messed up numbering. Moreover, inserting footnotes manuually does not print them:               \begin{align*}     x\overset{\footnote{Comment1}}{=}y\overset{\footnote{Comment2}}{=}z     \end{align*}      (the links are, but there are no footnotes). Is there any neat way to do what I want?


title: Create a syntax tree with LaTeX

text: Is is possible to create this tree with LaTeX ? ![enter image description here](http://i.stack.imgur.com/Xlq4h.png)               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{trees}          \begin{document}          \begin{tikzpicture}     \node {E}           child {  node {F}   }                child {  node {+}}                child {  node {T}                child {  node {T}           child{node{F}                child{node{8}} }}                child { node {*} }                child { node {F}                child{node{2}}}};                              \end{tikzpicture}          \end{document}       **I managed to create the tree but I lack the attributes for example{Fv: = 2}** ![enter image description here](http://i.stack.imgur.com/hnfqH.png)


title: Bidirectional Reference/Label Commands

text: I've written a _synopsis section_ for each chapter of my thesis, and I'd like to refer to various sections or subsections using `\label` and `\ref` commands. However, since the synopsis precedes the chapter, I'm getting errors simply because the relevant `\ref` commands precede the `\label` commands. Is there a simple work-around to allow for bidirectional referencing? Thanks!


title: How to indent a paragraph inside a TikZ node?

text: How do I get paragraphs inside a node to indent?               \documentclass{article}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}     \node[draw,text width=9cm] {             indent in paragraph long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text.          indent in paragraph long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text long text.     };     \end{tikzpicture}     \end{document}


title: How to make TikZ draw right child before left

text: I'm trying to make a tree with two different colors of edges, black and gray. This is my code:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{positioning,automata}     \definecolor{light-gray}{gray}{0.6}     \begin{document}     \begin{tikzpicture}[line width=.1cm,shorten >=0pt,auto,on grid=false, every state/.style={minimum size=0pt}, level distance=2.0cm, level 1/.style={sibling distance=2cm}, level 2/.style={sibling distance=1cm}, level 3/.style={sibling distance=.5cm}]     \tikzstyle{every node}=[font=\tiny , circle, outer sep=0pt, inner sep=0pt]     \node[] (S) {}       child {node[state] (S1) {}          child {node[state] (S11) {} edge from parent[light-gray] }          child {node[state] (S12) {}}}       child {node[state] (S2) {}          child {node[state] (S21) {}}          child {node[state] (S22) {} edge from parent[light-gray] }};     \end{tikzpicture}     \end{document}      You can see the output below: ![TikZ Tree with overlapping edges](http://i.stack.imgur.com/LlloQ.png) The problem is, I want the black lines to be on top of the gray lines. This is happening in the left subtree, because the left edge is drawn before the right one. However, this is not happening in the right subtree. I want the right subtree to be a mirror image of the left subtree. This is what it should look like: ![Desired TikZ Tree](http://i.imgur.com/hZlauqd.png) I tried changing the order of the gray and black nodes and trying to specify the direction of the children, like this:                    child[right] {node[state] (S22) {} edge from parent[light-gray] }          child[left] {node[state] (S21) {}}};      and this:                    child {node[state, right] (S22) {} edge from parent[light-gray] }          child {node[state, left] (S21) {}}};      but it doesn't work! Any help would be appreciated!


title: how to keep a 1:1 scale with x and y axis

text: I have been searching for hours now on how to fix these small problems, and I am finally admitting defeat and humbly ask for help. Lately I have been going over some of my badly drawn figures, trying to clean the up and whatnot.                   \documentclass[10pt,a4paper]{article}      \usepackage{tikz,tkz-euclide,pgfplots}     \usetkzobj{all}     \begin{document}          \begin{tikzpicture}[x=0.02cm,y=0.02cm,scale=0.8]       \tkzInit[ymin=-40,ymax=390,xmin=-40,xmax=540]       \tkzClip     \draw[help lines,ultra thin,dashed,gray!50!white] (-50,-50) grid (550,400);     \coordinate [label=below right:{50}] (x_1) at (50,0);     \coordinate [label=below right:{}] (B) at (0,390);     \coordinate [label=above right:{\large $y$}] (U) at (0,350);     \coordinate [label=above left:{\large $x$}] (A) at (540,0);     \coordinate [label=below right:{50}] (x_1) at (50,0);     \coordinate [label=below right:{100}] (x_2) at (100,0);     \coordinate [label=below right:{150}] (x_3) at (150,0);     \coordinate [label=below right:{200}] (x_4) at (200,0);     \coordinate [label=below right:{250}] (x_5) at (250,0);     \coordinate [label=below right:{300}] (x_6) at (300,0);     \coordinate [label=below right:{350}] (x_7) at (350,0);     \coordinate [label=below right:{400}] (x_8) at (400,0);     \coordinate [label=below right:{450}] (x_9) at (450,0);     \coordinate [label=below right:{500}] (x_10) at (500,0);     \coordinate [label=below right:{0}] (O) at (0,0);     \coordinate [label=above left:{50}] (y_1) at (0,50);     \coordinate [label=above left:{100}] (y_2) at (0,100);     \coordinate [label=above left:{150}] (y_3) at (0,150);     \coordinate [label=above left:{200}] (y_4) at (0,200);     \coordinate [label=above left:{250}] (y_5) at (0,250);     \coordinate [label=above left:{300}] (y_6) at (0,300);     \coordinate [label=above left:{350}] (y_7) at (0,350);     \coordinate [label=above left:{\bf Kostnader per m{\aa}ned (kroner)}] (R) at (400,350);     \coordinate [label=above left:{\bf Ringetid (minutter)}] (K) at (540,20);     \tkzDefPoint(0,-50){C}      \tkzDefPoint(-50,0){D}     \tkzDefPoint(0,87.50){S}     \tkzDefPoint(500,337.50){T}     \tkzDrawSegment[thick,-stealth](D,A)     \tkzDrawSegment[thick,-stealth](C,B)     \tkzDrawSegment[ultra thick,red](S,T)     \end{tikzpicture}          \vspace*{2ex}          \begin{tikzpicture}     \begin{axis}[         scale only axis,         grid=major,         grid style={dashed, gray!40},         axis lines=middle,         inner axis line style={-stealth},         xlabel={\begin{tabular}{@{}r@{}}\bf Ringetid (minutter)\\ \large $x$\end{tabular}},         ylabel={\large $y$ \ \ \normalsize \bf Kostnader per m{\aa}ned (kroner)},         ytick={0,50,...,350},         xtick={0,50,...,500},         x tick label style={below right},         y tick label style={above left,},         ymin=-50,         ymax=380,         xmin=-50,         xmax=550,     ]     \addplot[color=red,very thick] coordinates { (0, 75) (500, 340)};     \end{axis}     \end{tikzpicture}          \end{document}      The first image as a rather messy code, but the output is exactly as I want it. I tried cleaning up the code, but ran into heaps of problems. My main issue how to keep the ratio between the x- and y-axis, is there any way to do this? (Now I also had some problems with the x and y labels, and the thickness of the axis, but I guess that can wait for another answer...). Any other hints on improvements would be great. =)


title: Argument to \input or \include statement?

text: I produce a lot of plots in Matlab which I export to TikZ with `matlab2tikz`. In `matlab2tikz` I can specify the plot `width` and `height`, for instance. This works out quite nicely, but as I write my document I see that I should have changed the `width` and `height` to different values for several plots. Now, this is of course something I either could do in the `matlab2tikz` call or directly in the `.tex` file output from `matlab2tikz`. I have quite significant amounts of plots and most of them are created in "automated" procedures, so it would be nice if I could pass an argument to `\input` (or similar) which could manipulate the `width` and/or `height` of the plot. Something like:               \input[w=0.4,h=0.2]{plotfile}      and have something like this in `plotfile`:               \begin{axis}[%     width=w\textwidth,     height=h\textwidth,     ]      Is there a solution to this?


title: No comma between journal name and journal number

text: De Gruyter requires no comma between journal name and journal number. So rather than               Bird, Steven, and Klein, Ewan 1994 Phonological analysis in typed feature systems. Computational Linguistics, 20 3: 455–491.      they want:               Bird, Steven, and Klein, Ewan 1994 Phonological analysis in typed feature systems. Computational Linguistics 20 3: 455–491.      I looked at the `.bst` file I have and found that there is an `output.nonull` that probably is responsible for the comma, but I do not know how to influence it.               \documentclass{article}          \usepackage{filecontents}          \usepackage{natbib}          \begin{filecontents}{SM.bib}       @article{a, author={Max Meier}, title={My first paper}, journal={Journal of Googelology},         volume=3123, number=1, pages={3--45}, year=2009}     \end{filecontents}               \begin{document}     \nocite{*}               \bibliographystyle{degruyter-hsk}           \bibliography{SM}     \end{document}      De Gruyter `.bst` is here: degruyter-hsk.bst


title: Overprint environment inside tikz node: unexpected alignment of content

text: I want to use an overprint environment inside a tikz-node. I expect the content text of the overprint-sections to be aligned centrally, but it aligns right and even protrudes a little beyond the overprint/nodes border. Minimal example output: ![unexpected output](http://i.stack.imgur.com/XZitw.png) What am I missing and how can the issue be fixed? Also I do not want the overprint to wobble, which it does a little bit, but I expect that will automatically be gone with a fix. Minimal example code:               \documentclass[transparent]{beamer}     \usepackage[english]{babel}     \usepackage{amsmath}     \usepackage{tikz}     \usetikzlibrary{positioning}          \begin{document}         \begin{frame}%             \begin{center}             \begin{tikzpicture}[every node/.style={draw}]                 \onslide<+->{\node(a){test1};}                 \onslide<+->{\node(b)[below=of a,align=center]{                     \begin{overprint}[4cm]                         \onslide<+>                             $a=b$                         \onslide<+>                             $b=c$                         \onslide<+>                             $c=d$                     \end{overprint}                 };}                 \node(c)[below=of b]{test2};             \end{tikzpicture}             \end{center}         \end{frame}%     \end{document}


title: URL doesn't work in header

text: \documentclass[a4paper,11pt]{article}          \usepackage[utf8]{inputenc}     \usepackage[MeX]{polski}          \makeatletter     \renewcommand\@seccntformat[1]{\csname the#1\endcsname.\quad}     \renewcommand\numberline[1]{#1.\hskip0.7em}     \makeatother               \usepackage{indentfirst}     \usepackage{url}     \usepackage{fancyhdr}     \pagestyle{fancy}     \fancyhf{}     \fancyfoot[C]{\thepage}     \fancyhead[R]{{\small Krakowskie Centrum Psychodynamiczne\\     \url{www.kcp.krakow.pl}}}     \fancyhead[L]{{\small Diagnoza strukturalna cz. I\\Otto F. Kernberg}}           \renewcommand{\headrulewidth}{0.2pt}     \fancypagestyle{plain}     {      \fancyhead{}             \renewcommand{\headrulewidth}{0.2pt} % pozioma kreska     }          %\usepackage[hyphens]{url}     \usepackage{hyperref}     \hypersetup     {         colorlinks,      citecolor=black,      filecolor=black,      linkcolor=black,      urlcolor=black,      pdftex     }          \frenchspacing                         \begin{document}     Some text     \end{document}      All time I have problems whit `hyperref`. Doesn't matter what I do, it still doesn't work. Any suggestions why is that? What, exactly am I doing wrong?


title: Italicizing emphatic speech: Italic or upright quotation marks?

text: This is a typography question. I'm not sure if it's on-topic here; please feel free to migrate to a more appropriate site if necessary. I'm typesetting HPMOR for private amusement, and the online text is typographically fairly liberal. I might like to edit my version to be a little more consistent, and this situation came up: When someone speaks emphatically and I want to style this with italics, and the _entire_ speech is emphasized, do the quotation marks get emphasized, too? Example:               He said, ``don't \emph{look} at it.''      % this is fine     She said, \emph{``Why not?''}              % like this?     He replied, ``\emph{I don't know!}''       % or like this?


title: Todonotes: group list-of-todos by chapter

text: I use the `todonotes` package extensively to mark and comment my projects. So, for a large project, I have dozens of todo-notes and the list of todos, which I insert at the beginning of a document, get's very cluttered. I'm looking for a way to group the list of todos by chapter, so essentially something like:               List of Todos          Chapter 1          Chapter 1 note ... 2     Chapter 1, section 1 note ... 2     Chapter 1, section 2 note ... 3          Chapter 2          Chapter 2, section 1 note ... 4     Chapter 2, section 2 note ... 4      The following MWE gives a starting point for modification:               \documentclass{scrreprt}          \usepackage{todonotes}     % \usepackage{classicthesis}     \usepackage{tocloft}     \usepackage{lipsum}     \usepackage[colorlinks=true,linktocpage=true]{hyperref}          \begin{document}          \listoftodos          \chapter{My first chapter}     \lipsum[1]     \todo{Chapter 1 note}          \section{A first section}          \lipsum[1]          \todo{Chapter 1, section 1 note}          \section{Another section}          \lipsum[1]          \todo{Chapter 1, section 2 note}          \chapter{My second chapter}          \section{A first section}          \lipsum[1]          \todo{Chapter 2, section 1 note}          \section{Another section}          \lipsum[1]          \todo{Chapter 2, section 2 note}          \end{document}       This post tries something similar, but just adds the section next to the page number, which would not remove the clutter I have. I'm using the `classicthesis` template which uses `titlesec` for tableofcontents appearance, in case it matters. A second point would be to remove the "dots" in the list of todos. I believe `todonotes` formats the appearance with this command:               \newcommand{\l@todo}         {\@dottedtocline{1}{0em}{2.3em}}      but I don't know how to modify it to remove the dots and show page numbers at the end of each TOC entry.


title: How can I start the line numbering of my listing by an arbitrary number?

text: This is what I want:               15  <servlet>     16    <servlet-name>udpListener</servlet-name>     17    <servlet-class>oli.servlet.UdpServlet</servlet-class>     18    <!-- UDP Port fuer MSX -->     19    <init-param>     20      <param-name>udpPort</param-name>     21      <param-value>4951</param-value>  <!--Empfangsport-->     22    </init-param>     23    <load-on-startup>0</load-on-startup>     24  </servlet>      I want that line numbering starts at an number other than 1.


title: Setting TOC depth not working

text: I'm using a `\documentclass[11pt]{book}` document. I have tried to define a TOC with a maximum depth of 4 with:               \setcounter{secnumdepth}{4}     \setcounter{tocdepth}{4}     \tableofcontents      The resulting pdf document doesn't take into account my setting and goes to the deepest level in my TOC. I have not see anything relevant in the console, but I'm really a novice in LaTeX.


title: Controlling placement of package warnings in the log

text: Is there any way to control where in the log file or console output `\PackageWarning` or `\ClassWarning` messages get placed? I have a class warning (generated by my own document class) that gets buried at the beginning of the log file which I'd like to place at the end, close to where the warnings about labels appear. Is this possible?


title: Hyperlink with answers package

text: I'm using the `answers` package for an exercises book. I would like to create clickable hyperlinks (in the generated pdf file) from the exercise to the corresponding solution and back from the solution to the exercise. Here is my `ex` (exercise) environment:               \documentclass[12pt, openany]{extbook}     \usepackage{pstricks,pstricks-add,pst-math,pst-xkey}     \usepackage[frenchb]{babel}     \usepackage{slashbox}     \usepackage{graphicx}     \usepackage{amsmath,amssymb,amstext}     \usepackage[latin1]{inputenc}     \usepackage[OT1]{fontenc}     \usepackage{fancybox}     \usepackage{a4wide}     \usepackage{rotating}     \usepackage{epic}     \usepackage{answers}     \usepackage{fancyvrb}     \usepackage{thmbox}     \thmboxoptions{headstyle=\bfseries\boldmath#1 #2~,thickness=0.6pt, cut=false}     \usepackage[hidelinks]{hyperref}     \newcounter{moncompteur}     \newtheorem[M]{exc}[moncompteur]{ \textbf{Exercise}}{}     \newenvironment{ex}{\begin{exc}\normalfont}{\end{exc}}     \Newassociation{sol}{Soln}{corr}     \renewenvironment{Soln}[1]{\par\bigskip\noindent {\bfseries Solution  of exercise #1}\quad}{}


title: Cleveref can't refer to line numbers in listings

text: Consider the following minimal example:               \documentclass{article}          \usepackage{listings}     \usepackage{cleveref}          % \crefname{lstnumber}{line}{Line}          \begin{document}          % \section{Section}          \begin{lstlisting}[escapechar=@]     Lorem ipsum@\label{lineref}@     \end{lstlisting}          See \cref{lineref}: line~\ref{lineref}.          \end{document}      Compiling this document (twice) produces the warning > LaTeX Warning: cref reference format for label type `' undefined on input > line 16. And the output is: > See **??** : line 1. If I uncomment the `\section{Section}` line, everything compiles, and the reference comes out as > See section 1: line 1. It seems that cleveref is picking up on the closest ambient reference for some reason, and not referring to the line number. Note that, in longer examples, the `\ref` command always produces the right line number. The version of cleveref I'm using shouldn't need a manual `\crefname{lstnumber}{line}{Line}`, and indeed, uncommenting that doesn't change anything. The relevant information from my log file is:               This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian) (format=pdflatex 2011.7.11)  21 APR 2012 21:29     ...     (/usr/share/texmf-texlive/tex/latex/listings/listings.sty     ...     (/usr/share/texmf-texlive/tex/latex/listings/lstmisc.sty     File: lstmisc.sty 2007/02/22 1.4 (Carsten Heinz)     ...     (/usr/share/texmf-texlive/tex/latex/listings/listings.cfg     File: listings.cfg 2007/02/22 1.4 listings configuration     ...     Package: listings 2007/02/22 1.4 (Carsten Heinz)     ...     (/home/cs-students/12abs1/texmf/tex/latex/cleveref/cleveref.sty     Package: cleveref 2012/02/15{} v0.18.4{} Intelligent cross-referencing     Package cleveref Info: `listings' support loaded on input line 2843.     Package cleveref Info: loaded `english' language definitions on input line 6732     ...      Any thoughts on what's going on, or how to fix it?


title: Centered page numbers although set "twoside" option

text: Using `article` class and the `twoside` option still gives me the page numbers in the center of the page. Isn't the `twoside` option supposed to put the page numbers on the left in even pages and on the right in odd pages? Here is my MWE:               \documentclass[a4paper,twoside,titlepage,12pt]{article}     \linespread{1.3}          \usepackage[cm-default]{fontspec}          \usepackage{xgreek}          \setmainfont[Mapping=tex-text]{GFS Didot}          \title{Fuzzy Control}     \author{My Name}          \begin{document}     \maketitle     \newpage     \thispagestyle{empty}     \mbox{}          \begin{abstract}     That's it!     \end{abstract}          \tableofcontents          \include{intro}     \include{outro}     \end{document}      Thanks for any help!


title: How do I turn a whole document to have blue text?

text: > **Possible Duplicate:**   >  How do I globally set the text color in XeLaTeX I would like to pass an option to the `xcolor` package, or do anything else that will result in all text in my document to be blue. I know you can use `\PassOptionsToPackage{gray}{xcolor}` to turn all text into grayscale, but I couldn't find a way to do it with "blue scale".


title: Draw a binary tree using tikz

text: I'm trying to draw a binary tree using `tikz` package. If I use only `circle`, I get a tree. But I want to represent a `subtree` using a `triangle`. Now the tree gets uneven. I want to attach the arrows to the top of the `triangle` and also want the size of the `triangle` comparable to the size of the `circle`.               \documentclass{article}     \usepackage{tikz}     \usepackage{pgfplots}     \pgfplotsset{compat=1.10}     \usetikzlibrary{shapes.geometric,arrows,fit,matrix,positioning}     \tikzset     {         treenode/.style = {circle, draw=black, align=center, minimum size=1cm},         subtree/.style  = {isosceles triangle, draw=black, align=center, minimum height=0.5cm, minimum width=1cm, shape border rotate=90, anchor=north}     }     \begin{document}     \begin{figure}[t]     \centering          \caption{An illustration of a simple delete operation. \label{fig:simple}}     {         \begin{tikzpicture}[->,>=stealth',level/.style={sibling distance = 5cm/#1,         level distance = 1.5cm},scale=0.6, transform shape]         \node [treenode] {$X$ \\ 100}         child         {             node [treenode] {$Y$ \\ 50}              child             {                 node [treenode] {$Z$ \\ 40}                  child                 {                     node [treenode] {$S1$ \\ 30}                  }                 child                 {                     node [treenode] {$S2$ \\ 60}                  }             }             child             {                 node [subtree] {$Z$ \\ 200}              }         }         child         {             node [subtree] {$Z$ \\ 200}          }     ;         \end{tikzpicture}     }     \end{figure}     \end{document}      ![output](http://i.stack.imgur.com/bnDzG.png)


title: Randomize a section of code lines

text: This is similar to a previous question, but I didn't really understand the answer given. One possible use of what I'm asking is in the following code for a _Matching_ style of question, where lines of code would want to be randomly interpreted for typesetting               \documentclass[8pt,letterpaper]{book}          \usepackage[allowrandomize,nopoints,proofing,answerkey]{eqexam}     \usepackage{textcomp}     \usepackage{graphicx}          \begin{document}             \begin{exam}{}             \begin{problem*}[\auto]             Match each of names on the right, with the corresponding symbol on the left.                  \begin{multicols}{2}             \begin{parts}             \item\PTs*{2}\fillin{.5in}{\ref{LSNO}} \includegraphics[height=.5cm]{questionBank_img/LSNO}             \item\PTs*{2}\fillin{.5in}{\ref{LSNC}} \includegraphics[height=.5cm]{questionBank_img/LSNC}              \item\PTs*{2}\fillin{.5in}{\ref{LSNOHC}} \includegraphics[height=.5cm]{questionBank_img/LSNOHC}              \item\PTs*{2}\fillin{.5in}{\ref{LSNCHO}} \includegraphics[height=.5cm]{questionBank_img/LSNCHO}              \item\PTs*{2}\fillin{.5in}{\ref{FoSNO}} \includegraphics[height=.5cm]{questionBank_img/FoSNO}              \item\PTs*{2}\fillin{.5in}{\ref{FoSNC}} \includegraphics[height=.5cm]{questionBank_img/FoSNC}              \item\PTs*{2}\fillin{.5in}{\ref{PSNO}} \includegraphics[height=.5cm]{questionBank_img/PSNO}              \item\PTs*{2}\fillin{.5in}{\ref{PSNC}} \includegraphics[height=.5cm]{questionBank_img/PSNC}              \item\PTs*{2}\fillin{.5in}{\ref{LLSNO}} \includegraphics[height=.5cm]{questionBank_img/LLSNO}              \item\PTs*{2}\fillin{.5in}{\ref{LLSNC}} \includegraphics[height=.5cm]{questionBank_img/LLSNC}              \item\PTs*{2}\fillin{.5in}{\ref{TSNO}} \includegraphics[height=.5cm]{questionBank_img/TSNO}              \item\PTs*{2}\fillin{.5in}{\ref{TSNC}} \includegraphics[height=.5cm]{questionBank_img/TSNC}              \item\PTs*{2}\fillin{.5in}{\ref{FlSNO}} \includegraphics[height=.5cm]{questionBank_img/FlSNO}              \item\PTs*{2}\fillin{.5in}{\ref{FlSNC}} \includegraphics[height=.5cm]{questionBank_img/FlSNC}              \columnbreak                  \renewcommand{\thepartno}{\Alph{partno}}             \partsformat{\Alph{partno}.}                         % The above redefinitions are reset when we leave the group, when \end{parts}             % is completed. If the original definitions are needed to be reset before then             % execute the following commands: \defaultthepartno, \defaultpartsformat                  % \foritem{a} resets the partno counter back to 0, and displays (a), which             % has been redefined to A.               %the following lines of code should be shuffled somehow????                  \foritem{a}\label{LSNO} Limit switch NC             \item\label{LSNC} Limit switch NC             \item\label{LSNOHC} Limit switch NO, held closed             \item\label{LSNCHO}  Limit switch NC, held open             \item\label{FoSNO} Foot switch, NO             \item\label{FoSNC} Foot switch, NC             \item\label{PSNO} Pressure/Vacuum switch, NO             \item\label{PSNC} Pressure/Vacuum switch, NC             \item\label{LLSNO} Liquid level switch, NO             \item\label{LLSNC} Liquid level switch, NC             \item\label{TSNO} Temperature activated switch, NO             \item\label{TSNC} Temperature activated switch, NC             \item\label{FlSNO} Flow switch, NO             \item\label{FlSNC}  Flow switch, NC                  \end{parts}             \end{multicols}             \end{problem*}             \end{exam}     \end{document}      which results in the following: ![This would have be an easy test, non?](http://i.stack.imgur.com/hMnL8.jpg)


title: Biblatex supercite command with use of square brackets (like a reference style in Wikipedia)

text: In my report I would like to have the square brackets around the citations as superscripts (like in the Wikipedia style) using `\supercite` command. The default `\supercite{}` command in `biblatex` package gives a number without brackets. I have found a good reference in Biblatex cite with footnote only once, with use of brackets. However I am interested in such citation style just in normal text - not for the footnotes. I know that I have to redefine some command but a lack of knowledge does not allow me to complete the task. Could anyone help me?


title: Identical instance of longtabu

text: Defining a class file, I would like to define a new environment, which is essentially a `longtabu`. The `longtabu` is defined to have a variable width left column, which I would like to be identical in all instances of the environment, although it is the second instance that will determine the width of that column. The class file                   \newenvironment{listazo}{         \begin{longtabu} to \textwidth{X[-1l]X}}         {\end{longtabu}}      The tex file                   \section*{First}         \begin{listazo}              ... stuff ...              \end{listazo}              \section*{Second}         \begin{listazo}              ... stuff ...              \end{listazo}      At the moment each instance of the environment sets the width of the first column differently. How can I make them all use the same column widths, moreover those of the second instance of the environment?


title: How can I customize the listoftable with titletoc package

text: I know how to customize the chapter and section toc with`titletoc` package just like this                    \titlecontents{chapter}[0pt]{\vspace{.1\baselineskip}\bfseries}         {\thecontentslabel\hspace{2.8mm}}{}         {\hspace{.5em}\titlerule*[10pt]{$\cdot$}\contentspage}                but if I what to do this for listoftable and listoffigure, how to do. what is the first parameter for that?


title: Custom enumeration for axioms or hypothesis

text: This is a follow-up from : Custom Enumeration I'd want to obtain something like :               Axioms list :     A1. First axiom      A2. Second axiom     A2'. Equivalent version of the second axiom      with cross-reference, and also in a nice content-oriented manner. More specifically, I expect it to give convenient facility for reordering the items, and also it would be nice if it could generate all enumerations of the sort. For example, I wouldn't expect to need a new command for :               Hypothesis list :     H1) First hypothesis     H2) Second     H2') Another version of the second      Redefining variables in the enumerate environment (locally or globally) is fine in this setting. The best I have so far is : (edited thanks to egreg's answer)               \documentclass{article}          \usepackage{enumitem}          \makeatletter     \def\myEnumCounter#1{\expandafter\@myEnumCounter\csname c@#1\endcsname}     \def\@myEnumCounter#1{\ifcase#1\or \or $'$\or $''$\fi}     \makeatother     \AddEnumerateCounter*{\myEnumCounter}{\@myEnumCounter}{3}          \newlist{axioms}{enumerate}{2}     \setlist[axioms,1]{label=\textbf{A\arabic{axiomsi}.}, ref=A\arabic{axiomsi}}     \setlist[axioms,2]{label=\textbf{A\arabic{axiomsi}\rlap{\myEnumCounter{axiomsii}}.},%                        ref=A\arabic{axiomsi}\myEnumCounter{axiomsii},%                        align=parleft,%                        leftmargin=0em,%                        itemsep=1.4ex,%                        before={\stepcounter{axiomsi}}}          \begin{document}          \noindent Fail attempt %(useful to compare indentation and vertical separation):      \begin{enumerate}[label=\textbf{A\arabic*.}]       \item \label{item:A1} Axiom 1       \item \label{item:A2} Axiom 2       \item[\textbf{A2'}] \label{item:A2prime} Axiom 3     \end{enumerate}          \noindent "Almost there" attempt :     \begin{axioms}       \item \label{item:B1} Axiom 1       \item[]       \begin{axioms}         \item \label{item:B2} Axiom 2         \item \label{item:B2prime} Axiom 2'       \end{axioms}     \end{axioms}          \noindent References : \ref{item:A1}, \ref{item:A2} and \ref{item:A2prime} (last one doesn't work).          \noindent References : \ref{item:B1}, \ref{item:B2} and \ref{item:B2prime}.          \end{document}      The result is : (non totally up-to-date) ![Result](http://i.stack.imgur.com/7YkN7.png) However, there are still a few issues :   * I used the answer to nested enumeration, skipping items to avoid having an extra label in case I need to enter the second enumeration. However, the result somewhat fails to satisfy the "content-oriented" condition.Also, the situation here is a little different, because there is a scheme : I want a label if and only if the item isn't a new `axioms` environment. I guess there would be a way to do that with `enumitem` style key, but I can't figure how.   * There is a 1mm offset of the sub-enumeration I can't suppress (I think I tried all the keys `enumitem` provides for horizontal spacing)   * I had to add the `itemsep=1.4ex` to ensure the sub-enumeration has the same vertical spacing as the main one, but I suspect there is a better way to do this.