title: Create standalone pictures

text: I am trying to write a sample code to be used as a template to generate pictures that will be latter included in a paper. At this stage, the pictures are only plots. I have the following code. But it does not respect the specified `\paperwidth` and `\paperheight`. What is missing?               \documentclass{standalone}          \usepackage{geometry}     \geometry{%     paperwidth=52.65mm,     paperheight=47.75mm,     margin=0mm,     }     \usepackage[utf8]{inputenc}     % Like in main document      \usepackage{mathptmx}     \usepackage{helvet}     \usepackage{courier}          \newcommand*{\Filename}{test.dat} % name of data file          \usepackage{pgfplots}     % Default options for plots     \pgfplotsset{%     compat=newest,     compat/show suggested version=false,     every axis/.append style={thick},     width=\paperwidth,     height=\paperheight,     %ymin=0,ymax=0.5,     %xmin=-4,xmax=4,     tick label style={font=\footnotesize},     label style={font=\footnotesize},     grid=both,     xlabel={}, ylabel={},     %y label style={at={(0.03,0.5)}},     legend style={         %at={(1,1)},         %anchor=north,         %legend columns=1,         %cells={anchor=west},         font=\footnotesize,         %rounded corners=1pt,     },     enlargelimits=false     }          \begin{document}     \begin{tikzpicture}     \begin{axis}     \addplot table[x index=0,y index=1] {\Filename};     \addplot table[x index=0,y index=2] {\Filename};     %\addplot table[x index=0,y index=3] {\Filename};     %\legend{1, 2}     \end{axis}     \end{tikzpicture}     \end{document}      The `\Filename` has the following structure:               -4.15026086e+00 7.25473468e-05 1.41017490e-04     -3.86659676e+00 2.26169966e-04 1.05763117e-04     -3.58293265e+00 6.50582962e-04 5.99324332e-04     -3.29926855e+00 1.72673142e-03 1.55119239e-03     -3.01560444e+00 4.22864523e-03 4.44205093e-03     -2.73194034e+00 9.55503020e-03 1.00827505e-02     -2.44827623e+00 1.99212796e-02 2.09410973e-02     -2.16461213e+00 3.83227576e-02 3.75811611e-02     -1.88094802e+00 6.80221925e-02 6.63487290e-02     -1.59728392e+00 1.11403505e-01 1.17220789e-01     -1.31361981e+00 1.68345470e-01 1.65484024e-01     -1.02995571e+00 2.34724472e-01 2.39377189e-01     -7.46291604e-01 3.01974074e-01 2.99380131e-01     -4.62627499e-01 3.58455543e-01 3.52790505e-01     -1.78963394e-01 3.92604521e-01 3.91112008e-01     1.04700711e-01 3.96761612e-01 3.99960856e-01     3.88364816e-01 3.69963048e-01 3.68619719e-01     6.72028921e-01 3.18303494e-01 3.16725282e-01     9.55693026e-01 2.52684624e-01 2.53091140e-01     1.23935713e+00 1.85084726e-01 1.84944438e-01     1.52302124e+00 1.25088302e-01 1.24624207e-01     1.80668534e+00 7.80040529e-02 7.93575925e-02     2.09034945e+00 4.48819784e-02 4.54428861e-02     2.37401355e+00 2.38276477e-02 2.55241657e-02     2.65767766e+00 1.16719845e-02 1.14576711e-02     2.94134176e+00 5.27548738e-03 5.11188401e-03     3.22500587e+00 2.20006153e-03 1.86848174e-03     3.50866997e+00 8.46567166e-04 1.12813992e-03     3.79233408e+00 3.00567741e-04 2.82034980e-04     4.07599818e+00 9.84640435e-05 1.41017490e-04


title: why this math mode in lettrine

text: Trying to use the lettrine package in XeLaTeX with the Georg Duffner's EB Garamond font results in:               ! Bad USV code (-2411)      Trial and error shows that the problem comes with these two lines in lettrine.sty:               \smash{\llap{\mbox{\L@ante}\raisebox{\L@lraise}{\usebox{\L@lbox}}%            \hskip \the\L@Findent}}      These lines, in the original lettrine.sty file, are enclosed within `$ $` and thus typeset in math mode. I removed the `$ $` and the problem disappeared. Question: Is there any reason why these two lines should be in math mode, given that they don't do anything about math?


title: Problem with snake ticks in pgfplots for bell shaped normal distribution

text: I want to draw two sided created region for normal distribution (see figure below). I have issue with snake ticks proper alignment and area looks suspicious to me. Am I missing something here? Any help will be highly appreciated. Thanks ![enter image description here](http://i.stack.imgur.com/Hwx8T.png)               \documentclass[border=5mm]{standalone}     \usepackage{pgfplots}     \usetikzlibrary{arrows,backgrounds,snakes}     \begin{document}          \pgfmathdeclarefunction{gauss}{3}{%       \pgfmathparse{1/(#3*sqrt(2*pi))*exp(-((#1-#2)^2)/(2*#3^2))}%     }          \begin{tikzpicture}     \begin{axis}[         no markers       , domain=-3.2:3.2       , samples=100       , ymin=0       , axis lines*=left       , xlabel= $\textrm{X}$       , every axis y label/.style={at=(current axis.above origin),anchor=south}       , every axis x label/.style={at=(current axis.right of origin),anchor=west}       , height=5cm       , width=12cm       , xtick=\empty       , ytick=\empty       , enlargelimits=false       , clip=false       , axis on top       , grid = major       , hide y axis       ]          \draw [help lines] (axis cs:-3.5, -0.4) grid (axis cs:3.5, 0.5);          \addplot [cyan!50!black] {gauss(x, 0, 1)};      \addplot [fill=cyan!20, draw=none, domain=-3:-1.96] {gauss(x, 0, 1)} \closedcycle;      \addplot [fill=cyan!20, draw=none, domain=1.96:3.2] {gauss(x, 0, 1)} \closedcycle;               \draw[snake=ticks, segment length=1cm] (axis cs:-3.1, 0) -- (axis cs:3.1, 0);          \node[below] at (axis cs:-2, -0.02)  {$\overline{\textrm{X}} - 2\textrm{S}$};      \node[below] at (axis cs:-1, -0.02)  {$\overline{\textrm{X}} - \textrm{S}$};      \node[below] at (axis cs:0, -0.02)  {$\overline{\textrm{X}}$};      \node[below] at (axis cs:1, -0.02)  {$\overline{\textrm{X}} + \textrm{S}$};      \node[below] at (axis cs:2, -0.02)  {$\overline{\textrm{X}} + 2\textrm{S}$};           \draw (axis cs:-3.2, -0.15) --(axis cs:3.2, -0.15) ;     \node[right] at (axis cs:3.2, -0.15) {$\textrm{Z}$};     \draw[snake=ticks, segment length=1cm] (axis cs:-3.1, -0.15) -- (axis cs:3.1, -0.15);          \node[below] at (axis cs:-2, -0.16)  {$-2$};      \node[below] at (axis cs:-1, -0.16)  {$-1$};      \node[below] at (axis cs:0, -0.16)  {$0$};      \node[below] at (axis cs:1, -0.16)  {$1$};      \node[below] at (axis cs:2, -0.16)  {$2$};           \end{axis}               \end{tikzpicture}          \end{document}


title: Resize header in Berlin theme to match a header with no circles (Beamer)

text: I have get rid of the circles in the header using               \setbeamertemplate{mini frames}{}      Nevertheless, the header is too large because it keeps the size it would have if the circles were still there: ![enter image description here](http://i.imgur.com/HHlJ153.png) How can I make the header hegith equal to the text size? (or just specify it manually in some unit) (This is the code)               \documentclass[]{beamer}          \usepackage[spanish]{babel}     \usepackage[utf8]{inputenc} % acentos     \usepackage{listings} % incluir código     \usepackage{caption}  % titulos para los listings     \usepackage{color}          \definecolor{comentaryGreen}{rgb}{0,0.6,0}                    \usetheme{Berlin} % Antibes (simple)     \setbeamertemplate{mini frames}{}          \setbeamerfont{block body}{size=\small}          \begin{document}     \begin{frame}         test     \end{frame}     \end{document}**


title: Some biblatex labels do not appear depending on their position

text: I'm using BibLaTex with Biber to generate my bibliography. Unfortunatelly, I'm struggling with a very strange behaviour concerning the displaying of the blibliography labels: Some labels are not shown, depending on their position within the text. That is, on some position the label appears as expected, on another text position the label "shows" up as in ![enter image description here](http://i.stack.imgur.com/S6Tp5.png) Now, when I insert another reference before the missing one, I get the expected result: ![enter image description here](http://i.stack.imgur.com/xeezb.png) How can I fix this strange issue?


title: Moderncv: \cvitem text is too large

text: How do I change the text size for items under `\cvitem` to match items under `\cventry` that won't cause problems with other `\moderncvstyle{xyz}`? MWE:               \documentclass[11pt,a4paper,sans]{moderncv}     \moderncvstyle{classic} % banking, casual, classic, empty, oldstyle options       \moderncvcolor{blue}   % black, blue, green, grey, orange, purple, red options       \usepackage[scale=0.85]{geometry} % default scale=0.7. height= scale * layoutheight     \usepackage{etoolbox}     \patchcmd{\section}{\vspace*{.5ex}}{\vspace{.5ex}}{}{}          \firstname{John}     \familyname{Doe}     \title{R\'esum\'e}     % optional          % the following definition is from the file moderncvstyleclassic.sty     % reformats the \cventry by removing the period at the end of the line     \renewcommand*{\cventry}[7][.25em]{%       \cvitem[#1]{#2}{%         {\bfseries#3}%         \ifthenelse{\equal{#4}{}}{}{, {\slshape#4}}         \ifthenelse{\equal{#5}{}}{}{, #5}%         \ifthenelse{\equal{#6}{}}{}{, #6}%     %   .\strut% original         \strut%   remove period         \ifx&#7&%           \else{\newline{}\begin{minipage}[t]{\linewidth}\small#7\end{minipage}}\fi}}          % Fixes spacing if using \cvitem in the classic style by redefining \section.      \makeatletter   % changes the catcode of @ to 11 aka Make @ symbol a letter     \@ifpackageloaded{moderncvstyleclassic}{%     \let\oldsection\section%     \renewcommand{\section}[1]{\leavevmode\unskip\vspace*{-\baselineskip}\oldsection{#1}}}{}     \makeatother % changes the catcode of @ back to 12 aka Make @ symbol an "other"          \begin{document}     \makecvtitle     \section{Professional Experience}         \cventry{Year--Year}{Intern}{Financial Services Inc.}{Somewhere}{State}{             \begin{itemize}                 \item This is something important that I did here. This cventry text is the perfect size.                 \item This is something else equally important that I did here. This cventry text is the perfect size.             \end{itemize}}          \section{Skills}         \cvitem[-1.0em]{}{             \begin{itemize}                 \item These are the skills I have. Why is this cvitem text larger than cventry text?             \end{itemize}}          \section{Languages}         \cvitem{}{             \begin{itemize}                 \item These are the languages I speak. Why is this cvitem text larger than cventry text?             \end{itemize}}     \end{document}


title: Verbatim code environment dash dash

text: I have the following environment for displaying code: Which works pretty fine but now I have the problem that -- becomes an en dash inside that environment. For example here: I tried also `{-}{-}` and `-{}-` but inside the Verbatim `{}` are not translated. Any ideas how to escape this the right way?               \documentclass[11pt, twocolumn, landscape]{article}     % use "amsart" instead of "article" for AMSLaTeX format     \usepackage[a4paper]{geometry}                      % See geometry.pdf to learn the layout options. There are lots.     \usepackage[parfill]{parskip}           % Activate to begin paragraphs with an empty line rather than an indent     \usepackage[utf8]{inputenc}      \usepackage[T1]{fontenc}     \usepackage[ngerman]{babel}     \usepackage{color}     \usepackage{verbatim}     \usepackage{frame}     \usepackage{fancybox,calc}      \usepackage[svgnames]{xcolor}      \usepackage{fullpage}     \setlength{\columnsep}{4em}          \newenvironment{code}{\VerbatimEnvironment%        \noindent       %      {\columnwidth-\leftmargin-\rightmargin-2\fboxsep-2\fboxrule-4pt}        \begin{Sbox}        \begin{minipage}{\linewidth-2\fboxsep-2\fboxrule-4pt}           \color{DarkBlue}\begin{Verbatim}     }{%        \end{Verbatim}         \end{minipage}          \end{Sbox}        \fcolorbox{DarkBlue}{Orange}{\TheSbox}      }           \begin{document}     \pagenumbering{gobble}          \begin{code}     git config --global user.name "Max Mustermann"     git config --global user.email "max@mustermann.de"     \end{code}          \end{document}


title: Margin of Titles

text: I'm learning LaTeX and there is a problem i encountered: On the top of a new page a huge margin appears, though I declared a top margin of 2 cm. How can I fix this? ![enter image description here](http://i.stack.imgur.com/aIHbw.png)


title: The differences between TeX engines

text: I am confused about what TeX and its offspring (LaTeX, pdfTeX/pdfLaTeX, e-TeX, ConTeXt, LuaTeX, _etc._ ) are. Some, like LaTeX, seem like add ons to TeX (maybe a change to the eyes and mouth, but not stomach). Others, like pdfTeX, seem like changes to the underlying system ( _i.e._ , a change to the stomach). Is there a good reference that explains the differences and the evolution?


title: How do the various LaTeX compilers (LaTeX, XeLaTeX, PDFLaTeX, ???) differ in terms of use(s), purpose(s), pros and cons?

text: * How do the various LaTeX compilers (LaTeX, XeLaTeX, PDFLaTeX, ???, ConTeXt, fill-in-the-gap) differ?   * Is there an authoritive list of _all_ currently available LaTeX-related compilers?   * Which are the most popular, most freq. used compilers?   * Why do they exist?   * What for are they used?   * For which purpose would I choose which compiler? E.g., I was just reading that using `\setmainfont{Arial}` would necessitate switching the compiler ( _from_ LaTeX to, for instance (?), XeLaTeX). To me as a beginner in search of sense and meaning and orientation, that's mildly confusing: I "only" switch the Font, and I already need to switch to a different compiler. Also, I'd like to be (made) aware of the trade-off involved, and be able to make an informed rather than a random decision... Thanks! * * * ps: I'm new to LaTeX, and the following could be applicable:   * a case for a "community question" (or "big list")   * a duplicate question though the following questions don't seem to be that general in scope:   * What is the practical difference between latex and pdflatex?   * Frequently loaded packages: Differences between pdfLaTeX and XeLaTeX   * What is XeTeX exactly and why should I use it?   * Drawbacks of XeTeX/LuaTeX   * Pros and Cons XeTeX vs pdfLaTeX   * How to tell when to use pdflatex, latex, and xelatex for any given tex file?   * Differences between LuaTeX, ConTeXt and XeTeX   * The differences between TeX engines   * I am new to TeX. Should I use LaTeX, XeLaTeX, ...? Of the above, most are really helpful and worth reading. A slight shame that they're not consolidated into one or two succinct Q&A's: one beginner- friendly, another geared at an experts' bleeding-edge discussion. Other related, helpful, non-SX link(s):   * http://www.tug.org/levels.html, which speaks of five different "levels of TeX": > **Engines** : TeX, pdfTeX, XeTeX, LuaTeX, … These are the actual executable > binaries which implement the different TeX dialects. The LaTeX format is > implemented with both the **pdfTeX** ( **pdflatex** ) and **XeTeX** ( > **xelatex** ) engines, for example. When someone says “TeX can't find my > **fonts** ”, they usually mean an engine.


title: What is the main difference between command latex, tex, pdflatex, pdftex ... and all the other commands?

text: I am new to TeX world, and I use pdfLatex very often. But sometimes pdfLatex do not work. So I begin to wonder what the difference between all these `tex commands`. Please give me some guiding information about all these command to make me stay away from confusion. I will appreciate every comment or answer. Thanks.


title: Tex Distribution Pane not working after installing BasicTex2013

text: I recently upgraded to OS X 10.9 Mavericks and installed BasicTex 2013 (TeXLive-2013-Basic), in addition to TeXLive-2013. Now I need to use the TexLive-2013 as my default distribution, but the Tex Distribution Pane in System Preferences doesn't work anymore. It asks for my admin password, but doesn't actually changes the distribution. Has anybody run into the same problem? Is it Mavericks or BasicTex that has broken the TeX Distribution Pane? If so, is there a way to repair it so that it can change the distribution? Thanks.


title: How to add a line-break inside a problem title?

text: I would like to state a problem in `LaTeX` with a somehow big title and I cannot find a way to separate the title in 2 lines. `LaTeX` keeps all this in one line. (Below is a sample code).               \begin{problem}[{\sc BlablaBlabla BlablaBlablaBlabla BlablaBlablaBlabla BlablaBlablaBlabla Blabla BlablaBlablaBlabla }]     ....     \end{problem}      I tried to use `\\\`, `\newline`, `\linebreak` and the `\protect` before these but nothing worked. `LaTeX` ignored the line breaking command completely. E.g.                \begin{problem}[{\sc BlablaBlabla BlablaBlablaBlabla BlablaBlablaBlabla \\ BlablaBlablaBlabla Blabla BlablaBlablaBlabla }]      ...      \end{problem}      Can someone please help me with this? Thank you!


title: Custom style just for width and height?

text: I have some pgfplot graphs in .tikz files and I want to define a custom style to them that only overrides some entries, and uses whats in the .tikz files for the rest. Example: In my .tikz file I have               \begin{axis}[inTable]      In my document I define all [inTable] graphs as:               \pgfplotsset{inTable/.style={     width=4.5cm,     height=4.5cm,     scale only axis,     xmin=1,     xmax=511,     xlabel={$q (\mu m^{-1})$},     ymin=0.5,     ymax=1,     ylabel={ylabel}     },     inTable/.belongs to family=/pgfplots/scale,     }      But I not all graphs that have `[inTable]` style will necessarily have the same label and x min, x max etc. I want them to have all the same width and height but not necessarily the entries under this. I have tried putting the rest back in the.tikz file eg               \begin{axis}[inTable]     scale only axis,     xmin=1,     xmax=511,     xlabel={$q (\mu m^{-1})$},     ymin=0.5,     ymax=1,     ylabel={y label}      But it only seems to take whats in the `\pgfplotsset{inTable/.style={` How can I mix and match? I hope this question makes sense. Thanks


title: Conflict between `booktabs` and `arydshln` packages

text: Please see the MWE below and its result. I didn't use the `arydshln` package in the example, but I have to use it somewhere else in the same document. As you see, there is something wrong with the vertical border lines in the table. If I don't use one of the `arydshln` and `booktabs` packages, it displays correctly. Is there any workaround here? I'm looking for one of the following:   1. A method to prevent the wrong display with both packages used.   2. An alternative to the nice formatting and `\toprule`, `\midrule`, and `\bottomrule` from the `booktabs` package.   3. An alternative to the `arydshln` package to draw dashed lines in math arrays (vectors, matrices). Thank you for the help.               \documentclass{article}          \usepackage{booktabs}     \usepackage{arydshln}          \begin{document}          \begin{tabular}{ c | r r }     \toprule         & 123 & 456 \\     \midrule         \multicolumn{3}{l}{blah blah blah }\\     \midrule         abc & def & hij \\     \bottomrule     \end{tabular}          \end{document}      ![screenshot](http://i.stack.imgur.com/8k1Bp.png) ADDED-- After some experiments, I found `multicolumn` is not a key. When I replaced it by a regular row, it still displays wrong.


title: Index in Swedish sorting order ( ...YZÅÄÖ...) with xindy and LaTeX

text: I still haven't succeed to sort Swedish letters in the index list with class `article` in the correct order. I've tried it with specifying a sort key, i.e. `\index{g~ra@göra}`, but the result is not perfect. There will not be any empty lines between the groups of Å, Ä, and Ö sorting. And the extra coding job seems not be up to date 2014. This way is quite cumbersome. Is there a better way? Xindy should do the work (easy?), but how do I setup xindy to create an index with Swedish sorting order? My comment: All texts are not written in English. I like the LaTeX system, it's a lot better than Word in my case, but the sorting troubles me.


title: pgfplots: `nan` in `meta expr` causes "Missing number" error

text: I want to draw a table/matrix of color-values, where some of the values are missing. Despite having tried using `unbounded coords=jump` (see this answer), I get the following error: > >     ! Missing number, treated as zero. >     <to be read again> >                       n >     l.59 \end{axis} How do I tell pgfplots to include the rows and columns for the missing value, and simply skip those missing value? Here's my MWE:               \documentclass{standalone}          \usepackage{filecontents}     \usepackage{pgfplots, pgfplotstable}          \begin{filecontents}{data.csv}     yitem,xitem,val     a,R,0.1     b,S,nan     c,T,0.3     d,U,nan     e,V,0.5     f,W,0.6     g,X,nan     h,Y,0.8     i,Z,nan     \end{filecontents}          \pgfplotstableread[col sep=comma]{data.csv}\datatable          \begin{document}     \begin{tikzpicture}     \begin{axis}[         symbolic x coords={R,S,T,U,V,W,X,Y,Z},         xtick=data,         symbolic y coords={a,b,c,d,e,f,g,h,i},         ytick=data,         unbounded coords=jump,     ]     \addplot[         mark=square*,         only marks,         scatter,         point meta=explicit,     ] table [         col sep=comma,         x expr=\coordindex,         y expr=\coordindex,         meta expr=\thisrow{val},     ] {\datatable};          \end{axis}     \end{tikzpicture}     \end{document}      I got the basic idea for the matrix/table from this page. I have added `\listfiles` to my preamble and received the following pgf- looking output: > >     pgfplots.sty    2011/12/29 v1.5.1 (git show 1.5.1-4-g53e640f ) >          pgf.sty    2008/01/15 v2.10 (rcs-revision 1.12) >       pgfrcs.sty    2010/10/25 v2.10 (rcs-revision 1.24) >       pgfrcs.code.tex >      pgfcore.sty    2010/04/11 v2.10 (rcs-revision 1.7) >       pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX >       pgfsys.sty    2010/06/30 v2.10 (rcs-revision 1.37) >       pgfsys.code.tex >     pgfsyssoftpath.code.tex    2008/07/18  (rcs-revision 1.7) >     pgfsysprotocol.code.tex    2006/10/16  (rcs-revision 1.4) >      pgfcore.code.tex >     pgfcomp-version-0-65.sty    2007/07/03 v2.10 (rcs-revision 1.7) >     pgfcomp-version-1-18.sty    2007/07/23 v2.10 (rcs-revision 1.1) >       pgffor.sty    2010/03/23 v2.10 (rcs-revision 1.18) >      pgfkeys.sty >      pgfkeys.code.tex >       pgffor.code.tex >     pgfplotstable.sty    2011/12/19 Part of pgfplots


title: Command /k unavailable in encoding OT1. - possibly using too many languages in one document?

text: I'm a LaTeX newbie, so please, bear with me (also, I'm not an English native speaker, so I apologise in advance for all my grammar/spelling mistakes). I'm using LaTeX to format my translation of one chapter of a book (from English to Polish, the subject of the book being a French author reading an ancient Greek one [Racine reading Euripides to be precise] - as you can see there's bound to be many languages there). I've already translated the whole thing and now I'm doing the footnotes and there the problem appeared:               \documentclass{book}     \usepackage[OT4]{polski}     \usepackage[utf8]{inputenc}     \usepackage[french,polutonikogreek,polish]{babel}     \linespread{1.6}     \makeatletter     \def\blfootnote{\xdef\@thefnmark{}\@footnotetext}     \makeatother     \begin{document}     some Polish text - Litwo, ojczyzno moja     \selectlanguage{french}'Vous vous taisez?'     \selectlanguage{polish} coś tam     \selectlanguage{polutonikogreek} sig~a|s t'i pr`os g~hn '>omma s`on bal`wn '>eqeis     \end{document}      I know - this particular code does not produce any problems but my whole text is longer and everything is all right as long as I don't include this line:               \selectlanguage{polutonikogreek} sig~a|s t'i pr`os g~hn '>omma s`on bal`wn '>eqeis      By itself it poses no problems (tried making a document that would have only this one line and it had no problems), also there is no problem when it is included in the main text (I have more greek text there and not a single part of it poses any problem) - but it is in a footnote (one that has the \selectlanguage command 8 times in it) and every time I try to compilate the whole thing with it I get this error: Command /k unavailable in encoding OT1. Also the Polish diacritical signs (ą ę) stop showing up after that. Why is it so and is there any possibility of changing it? There are several more footnotes awaiting translation and almost every single one includes some ancient Greek text together with other languages...


title: Placing a two-column figure using IEEEtran class

text: I have problems to get a two-column figure on the desired page. I'm using the `IEEEtran` class. here my minimal code:               \documentclass[conference]{IEEEtran}          \usepackage{cite}     \usepackage[pdftex]{graphicx}          \begin{document}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \section{Conclusion}     \label{sec:EndConclusion}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          Conclusion text          \begin{figure*}[tb]     \centering     \includegraphics[width=\textwidth]{figure1}     \caption{caption}     \end{figure*}          \bibliographystyle{IEEEtran}     \nocite{*}     \bibliography{bibliography}           \end{document}      But the figure is always plotted on the next page. I'd like to have the figure on the top and then **Conclusion** and **References** below. ![enter image description here](http://i.stack.imgur.com/Azj4K.jpg) There is definitely enough space for everything. What can I do? Well, my real conclusion is longer, and I have more bib entries, then the references should continue on the next page.


title: Is there a way to compile a LaTeX table into tab delimited text?

text: I am submitting a manuscript to a journal1 that will only accept Word or .rtf submissions (arrrg!) and they require that tables be tab separated text. Is there a way to compile LaTeX tables into tab separated text? I am using `latex2rtf` for the main document but this embeds the tables. I also tried `detex` but that didn't strip the table formatting (e.g., `&`). I am running texlive on Linux. Thank you.   1. The journal is Freshwater Biology FYI


title: Vertical centering of text in a page when text contains enumerations

text: I'd like a vertically centered letter under letterhead, when a letter is less than a page. When a letter is more than a page, I'd like to achieve a minimum spacing between the letter and letterhead. The format of the documents is: > [Letterhead]   >  - leading-space -   >  [Text]   >  - trailing-space - I've thought to add `\vfill` at leading-space and trailing-space. This seems to accomplish what I want for letters of one page. However, when the document is over a page long the leading-space is inappropriately large - notably when there's an `enumerate` environment in the text. I'd be grateful for thoughts and suggestions on how to accomplish this vertical spacing for both long and short (one page) letters. Note that this is similar to Centering text on a page, except I'm not writing poetry. First, I'm using the `memoir` class, and second I'm not writing poetry – which would seem to make the `verse` package inappropriate. I also note that the `letter` package accomplishes this sort of spacing, though I admit that I looked at the package and did not understand how it did so. **EDIT** : The problem seems related to an `enumerate`. Example code is as follows:               \documentclass[oneside,11pt]{memoir}     \usepackage{lipsum}     \begin{document}     \lipsum[1] % Letterhead           \begin{vplace}      \lipsum[2] % Text       \begin{enumerate}[1.] % more Text (albeit enumerated)         \item{}abc         \item{}ghi       \end{enumerate}\par       \lipsum[3-6] % more Text      \end{vplace}     \end{document}      If one removes the enumerated list, then the vertical spacing of the typesetting comes out as one would expect. However, with the enumerated list there's a very strange and large space between the Letterhead and first paragraph of Text. What's causing the large space? Is it possible to eliminate it (without removing the enumerated content).


title: Squeezing space around algorithm construct

text: I am using `algorithm2e` for developing algorithm constructs in my LaTeX document. However, if I want to use `[!t]` or `[!b]` to place the algorithm construct in an appropriate place, sometimes the construct is going down to the last page instead of the current page. Therefore, I wanted to wrap it with a figure construct as follows to squeeze space after the algorithm construct by using squeezing functions such as `\vpsace{-0.5cm}` just between `\end{algorithm}` and `\end{figure}`. But it is giving the error: `! LaTeX Error: Not in outer par mode`. Please help me to solve this.               \begin{figure}[!t]     \begin{algorithm}     ....     ...     \end{algorithm}     \end{figure}


title: Default color pgfplot

text: I noticed that when using `pgfplots` to make plots without specifying style, it automatically assigns the same color and line style to the first input and fifth input, which means the two curves would have the same style... Any way to avoid that?


title: Tikz figure in Beamer shifting way to the right of the frame

text: I'm trying to include a tikz drawing into a Beamer slide. When I do it like this:               \begin{frame}       \frametitle{Overview}       \input{smartservice-diagram.tex}     \end{frame}      the image is way too big. I tried this:               \begin{frame}       \frametitle{Overview}       \resizebox{6in}{!}{\input{smartservice-diagram.tex}}     \end{frame}      and the image gets shrunk down but it gets shifted way over to the right of the slide. It's so far over that part of the image goes off the right of the slide. If I make the resize box a little bigger the image actually slides all the way off the right side. If I make it small the shrunken image moves back over to the left. I tried to create a standalone document with the smartservice-diagram.tex and using the \resizebox and it works just fine (no extra white space on the left of the diagram). So it looks like something with Beamer that I'm missing. Any idea what I have wrong? EDIT: This is not only beamer exclusive, it happens simply using resizebox or also scalebox. I put it inside a figure, but outside a figure also fails. I attach a MWE:               \begin{figure}[htbp]       \resizebox{\linewidth}{!}{     \tikzstyle{scheme} = [draw = black, fill = black!10, thin, rectangle, minimum width = 15pt, minimum height = 10pt]     \begin{tikzpicture}       \node (n1) [scheme] {};       \node (n2) [scheme, at = (n1.east), right = 12pt] {};       \node (n3) [scheme, at = (n2.east), right = 12pt] {};       \node (n4) [scheme, at = (n3.east), right = 12pt] {};     \end{tikzpicture}     }       \caption{Test}     \end{figure}


title: Any way to strengthen font weight/darkness/heaviness?

text: I use TeTeX with fairly basic packages:               \usepackage [koi8-r] {inputenc}     \usepackage [russian] {babel}     \usepackage {cmap}     \usepackage {amssymb}     \usepackage {verbatim}     \usepackage {titlesec}     \usepackage {courier}     \usepackage {pscyr}     \usepackage {amsmath}      The default font family is `rmdefault`. Font witdth and height and the bold font are perfect, but the strokes of the regular text and formulas fonts are too thin, so the printed document is uncomfortable to read. Is there a way to fix this?


title: Fill the background of functional groups in chemfig

text: I want to fill the background of some functional groups or atoms including bonds to emphasize them. For instance, to emphasize carbonyl group in a keton, fill the background of C=O like: ![enter image description here](http://i.stack.imgur.com/anbEa.png) I'm using chemfig to draw chemistry equations, and I have a workaround which cover with overlay(chemmove):               \chemfig{R|_1-@{kc}C(=[:90]O)-R|_2}     \chemmove{         \node[fill=purple!20,anchor=text,inner sep=0.1em]             at (kc.text) {\chemfig{C(=[:90]O)}};     }      However, I need simpler and smarter way since, in this way, I have to write the same code twice(which could be very long if the atoms and bonds are long and complicated) and it does not work with wrong anchoring from time to time.


title: Disable slash insertion on TeXstudio

text: Everytime I'm in the math mode and there already is a `\` typed and I type another one, TeXstudio replaces the old one with the new one instead of let me having a `\\\` typed. This is annoying me and I would like to disable it, but I can't find where to do it. Can someone help?


title: load custom .cwl on a per-document basis in TexStudio

text: Say I have document A in which I define a new command, `\foo`. I'd like to have `\foo{}` autocomplete in document A, but document B does not use `\foo`. Instead, it uses a command `\food`. I don't want Texstudio to autocomplete to `\foo` when I'm working in document B. Is there some way I can have a custom .cwl file load when I am working in document A and a different .cwl when working on document B? I know I can go and uncheck .cwl files in the autocomplete config, but I'd like to automate this if possible so I don't have to remember to check/uncheck every time I work on something new.


title: Creating uniformly sized boxes around text

text: I want to put individual words in to boxes next to each other. I've used the `\framebox` command, but this has produced different sized boxes around each word. How could I get all the boxes to be the same size around, e.g. [This] [is] [an] [example]?


title: In Eclipse how I can view table content in the Latex Table View?

text: I am using texlipse plugin to write the latex document. As you can see from the following figure ![diagram](http://i.stack.imgur.com/d5UxM.png) when you put a table and corresponding data, then you can see the data information in **Latex Table View**. My question is how you can see this in **Latex Table View** (circle marked)? Thanks.


title: Center line based on only part of text

text: I'm working off of a resume template I found. This is what it looks like ![header](http://i.stack.imgur.com/0P4Yn.png) I want to center the bottom line of text differently. Right now, it is centered based on the whole line of text, but I would like the email address to line up centered under the name and address. Here's an example that generates the document.               \documentclass[11pt,letterpaper]{article}     \usepackage{fullpage}     \usepackage{amsmath}     \usepackage{amssymb}     \pagestyle{empty}     \raggedright               \newcommand{\lineunder}{\vspace*{-8pt} \\ \hspace*{-18pt} \hrulefill \\}     \newcommand{\contact}[3]{     \vspace*{-8pt}     \begin{center}     {\LARGE \scshape {#1}}\\         #2 \lineunder          #3     \end{center}     \vspace*{-8pt}     }          \begin{document}          \contact{First M. Last}     { Address, City, State Zip}     {(123) 456-7890 \qquad {email@mail.edu}     \qquad http://www.webaddress.html     }     \end{document}


title: Environments with matched parens in \begin and \end

text: Suppose I have this sort of expression in a document.               \multicolumn{8}{l}{%     \parbox{25em}{%     \begin{itemize}     \addtolength{\itemsep}{-1em}     \item foo     \item bar     \end{itemize}%     }}      I'd like to define a new environment, call it "comment" that would allow me to simple write               \begin{comment}     \item foo     \item bar     \end{comment}      and produce the same output. The problem I've encountered is that the parentheses that are opened at the start are only balanced at the very end. That creates a problem if I try to define the "begin"-section of the new environment in the flatfooted way:               \newenvironment{comment}{%       \multicolumn{8}{l}{%       \parbox{25em}{%       \begin{itemize}       \addtolength{\itemsep}{-1em}     }      The parentheses are unbalanced right now, and if I were to balance them inside the definition of the "begin" part of the environment, I'd get the wrong result. Here's an MWE                   \documentclass{article}               \def\Boxes{%       $\Box$ & $\Box$ & $\Box$ & $\Box$ & $\Box$ & $\Box$ & $\Box$%     }     \usepackage{fullpage}          \begin{document}          \begin{table}[h!]       \begin{tabular}{l|ccccccc}         & Tue & Wed & Thur & Fri & Sat & Sun & Mon\\         \hspace{1em}B$^{\flat}$ Major & \Boxes\\              \multicolumn{8}{l}{%           \parbox{25em}{%           \begin{itemize}             \addtolength{\itemsep}{-1em}           \item foo           \item bar     \end{itemize}%     }}     \\     \end{tabular}     \end{table}     \end{document}


title: Appending to a style that sets code with arguments in pgfkeys

text: I'm trying to create some templating infrastructure that heavily depends on pgfkeys' styles to easily customise the appearance of how some bits of text are typeset on my document. However, I've run into some problem when trying to append more key-value pairs to a style that, as its job, already defined more codes or styles. The following example shows the problem I'm talking about:               \documentclass{minimal}     \usepackage{pgfkeys}     \begin{document}          \pgfkeys{       /my package/.cd,       fancy/.style = {         format/.code = \textbf{##1},       },       fancy,       format=hello, % typesets `hello' in boldface       fancy/.append style = { },       fancy,       format=hello, % nothing is typeset     %  format/.show code, % uncomment to see the definition of format     }          \end{document}      Uncommenting the last line in the `\pgfkeys` command shows that, after trying to append to the `fancy` style, the code in the `format` key has been replaced by:               \textbf {\pgfkeysnovalue }      and thus nothing is typeset on the second `format=hello`. I (sort of) understand why this happens. The same reason why I had to write `##1` when defining the code within the style. However, is there a fix or workaround to make the style “robust” enough so that it is possible to append to it without breaking it? * * * # Edit 1 Thanks to the comment from Joseph Wright and attempted answer from percusse, I figured out that—at the lower level—the problem to solve is the following: given an already defined macro which takes one argument (this is now codes/styles in pgfkeys are internally defined), patch the replacement text of the macro by appending some more text. Now, from `etoolbox`, there _is_ a macro for doing just this: `\apptocmd`. The following is an example of how a solution using this macro should probably look like:               \documentclass{minimal}     \usepackage{etoolbox}     \tracingpatches     \begin{document}     \ttfamily     \def\fancy#1\pgfeov{\pgfkeysalso{format/.code=\textbf{##1}}}     \meaning\fancy\par     \apptocmd\fancy{\pgfkeysalso{color=red}}{Ok!}{Fail.}\par     \meaning\fancy\par     \apptocmd\fancy{\pgfkeysalso{format/.code=\textit{##1}}}{Ok!}{Fail.}\par     \meaning\fancy\par     \end{document}      The only problem is that the second patching attempt doesn't work, and etoolbox shows the following as debug information:               [debug] tracing \apptocmd on input line 10     [debug] analyzing '\fancy'     [debug] ++ control sequence is defined     [debug] ++ control sequence is a macro     [debug] ++ control sequence is a macro with parameters     [debug] -- nested patching command and parameters in patch     [debug] -> the patching command seems to be nested in the     [debug]    argument to some other command     [debug] -> the patch text seems to contain # characters     [debug] -> either avoid nesting or use # characters with     [debug]    category code 12 in the patch text     [debug] -> simply doubling the # characters will not work      Would it be possible to have an `\apptocmd` that works even with `#` characters in the new replacement text? _**Disclaimer:** I do now have some workaround for my particular case, which only works because my `fancy` styles in fact do not need to take any arguments (`format` does, but `fancy` doesn't). So, instead of storing the code as a style, I store it as a regular plain value, and make `.code` expand to this value. Later, a simple `/.append` can be used to patch the “fake” style._ _Still, I would very much like a solution to the original problem, so that one can also append to styles containing both arguments and (let's call them) sub- arguments. I don't know, however, if this is technically possible. So, this is my deal: If someone believes that a general solution is feasible, and lets me know this by just posting a comment, **I'm willing to open a 300 bounty of my rep for a working solution to the general case**. If, however, people believe that this is either just too difficult or technically impossible (and I suspect of this because `etoolbox` did not implement it) then I'll just be content with my sillier workaround and post a full answer expanding on it._


title: emulateapj options not changing anything

text: simple question: how do you change an option with emulateapj? I'm using `\documentclass[12pt, apj]{emulateapj}` but it appears to have no effect and comes up with these messages:               [Compiling C:\Users\User\Documents\Project work\Latex Report\Main\master.tex]          TraditionalBuilder: Invoking texify... done.          No errors. Warnings:          C:\Program Files\MiKTeX 2.9\tex\latex\revtex\revtex4-1.cls: Class revtex4-1 Warning: No Society specified, using default society aps.     C:\Program Files\MiKTeX 2.9\tex\latex\revtex\revtex4-1.cls: Class revtex4-1 Warning: No journal specified, using default pra.     C:\Program Files\MiKTeX 2.9\tex\latex\revtex\revtex4-1.cls: Class revtex4-1 Warning: No type size specified, using default 10.     C:/Users/User/Documents/Project work/Latex Report/Main/master.tex: LaTeX Warning: Unused global option(s):    [fontsize=5mm].     C:/Users/User/Documents/Project work/Latex Report/Main/master.tex: Class revtex4-1 Warning: Assuming \noaffiliation for authors.     C:\Users\User\Documents\Project work\Latex Report\Main\master.bbl:3: LaTeX Warning: Empty `thebibliography' environment on input line 3.      My main needs are to change the font size and typeset (12pt and apj), but it looks like nothing changes. It stays at 10pt and preprint/something else! Any ideas? Thanks


title: How to disable plus and minus (flexible space)

text: I am modifying a thesis template for graduate students at my university and would like to improve our class file to better meet the graduate school's desires. The lady that must ok the format of a thesis has a very good eye for identifying space that is too big or too small... so she has identified that a thesis coming from a LaTeX template sometimes has flexible space - a double space, for example, does not always seem to be the same space/length on each page. Another example might be the space before or after a section or subsection heading. My understanding is that this is controlled by the use of `plus` and `minus` when defining length parameters. Our class fill is built on top of the `report` class, which uses the `plus` and `minus` options on numerous occasions. Though this is a very nice feature, it is something that I am interested in turning off for the purposes of pleasing the graduate school. So, my question actually leads to a few questions... Can this feature be turned off globally? If so, how? If not, how would you remove the option for specific cases (like for the space around section/subsections, etc)?


title: English / German APA reference fails partly - "retrieved from" and "origyear" untranslated

text: I have a problem with my multilingual APA reference. I use LuaTeX, BibLaTeX and biber. I use the BibLaTeX option `babel=other` to activate language switching. Switching gets done by adding an `hyphenation` entry at every reference in the BibLaTeX file. Now here is the problem: Some strings get translated properly but some look very odd. The English entry is completely fine. The German entry also works at least partly because `Ed.` is properly translated as `Hrsg.` and `S.` as `p.`. But when it comes to `Retrieved from` and `Original work published` the German version looks odd. It doesn't even stay with the English version but has strings in bold reading `retrieved from` and `origyear`. Here is an example: LaTeX file:               \documentclass{article}     \usepackage[ngerman,american]{babel}     \usepackage[style=apa,backend=biber,babel=other]{biblatex}     \DeclareLanguageMapping{american}{american-apa}     \usepackage{csquotes}     \bibliography{biblatex.bib}           \begin{document}     \parencite{Entry1}     \parencite{Entry2}     \printbibliography     \end{document}      `biblatex.bib` file:               % Encoding: UTF8          @INBOOK{Entry1,       title = {Liebe},       booktitle = {Buch der Stimmungen},       year = {1999},       origdate = {1950},       editor = {Peter Schmidt},       publisher = {Der Verlag},       location = {Hamburg},       pages = {118--119},       URL = {http://somepage.de},       hyphenation = {ngerman},     }          @INBOOK{Entry2,       title = {Hatred},       booktitle = {Books of feelings},       date = {1998},       origdate = {1950},       editor = {Peter Schmidt},       publisher = {Publishing House},       location = {New York},       pages = {117},       URL = {http://somepage.com},       hyphenation = {american},     }      Any idea? Help much appreciated!


title: How can I undefine an environment?

text: How can I undefine an environment? This is how to undefine a command:               \newcommand\foo     \makeatletter     \let\foo\@undefined     \makeatother      I need to undefine the `spacing` environment from the `setspace` package. This does not seem to work:               \usepackage{setspace}     \makeatletter     \let\beginspacing\@undefined     \let\endspacing\@undefined         \makeatother


title: auto-pst-pdf throws 'MiKTeX GPL Ghostscript 9.05: Unrecoverable error, exit code 1'

text: In a machine with freshly installed MikTex 2.9 the below error is generated every time a file is compiled which uses `auto-pst-pdf` package, but then PDF is produced fine. Does this require any corrective actions?               Process started: pdflatex.exe --shell-escape -synctex=1 -interaction=nonstopmode "forestmwe".tex          Process started: pdflatex.exe --shell-escape -synctex=1 -interaction=nonstopmode "forestmwe".tex          This is dvips(k) 5.993 Copyright 2013 Radical Eye Software (www.radicaleye.com) ' TeX output 2014.06.23:1729' -> forestmwe-autopp.ps <d:/Program Files (x86)/MiKTeX 2.9/dvips/base/tex.pro> <d:/Program Files (x86)/MiKTeX 2.9/dvips/misc/alt-rule.pro> <d:/Program Files (x86)/MiKTeX 2.9/dvips/pstricks/pstricks.pro> <d:/Program Files (x86)/MiKTeX 2.9/dvips/pstricks/pst-algparser.pro> <d:/Program Files (x86)/MiKTeX 2.9/dvips/pst-tools/pst-tools.pro> <d:/Program Files (x86)/MiKTeX 2.9/dvips/pstricks/pst-dots.pro> <C:/Users/user0/AppData/Roaming/MiKTeX/2.9/dvips/pst-barcode/pst-barcode.pro> <d:/Program Files (x86)/MiKTeX 2.9/fonts/enc/dvips/lm/lm-ec.enc> <d:/Program Files (x86)/MiKTeX 2.9/dvips/base/texps.pro> <d:/Program Files (x86)/MiKTeX 2.9/dvips/base/special.pro> <d:/Program Files (x86)/MiKTeX 2.9/dvips/base/color.pro>.          <d:/Program Files (x86)/MiKTeX 2.9/fonts/type1/public/lm/lmr5.pfb> <d:/Program Files (x86)/MiKTeX 2.9/fonts/type1/public/lm/lmr10.pfb> <d:/Program Files (x86)/MiKTeX 2.9/fonts/type1/public/lm/lmr8.pfb>[1] [1]          MiKTeX GPL Ghostscript 9.05: Unrecoverable error, exit code 1          Process exited normally      This answer http://tex.stackexchange.com/a/119295/37570 initially seemed similar but I could not find `lpr` in the `config.ps` file, so it did not apply.


title: Underline and bold round number in table

text: I use `numprint` package to round number in table. I want to bold, underline, etc., some round numbers, but the following is not working               \documentclass{article}     \usepackage{numprint}      \begin{document}          \npdecimalsign{.}     \nprounddigits{2}     \begin{tabular}{n{5}{2}}     0.123456 \\     \textbf{0.123456} \\      %\npboldmath 0.1234562 \\ % Not working undefined control sequence \npboldmath     \underline{0.123456}      \end{tabular}     \npnoround          \end{document}      The output is               0.12      **0.123456**     0.123456       I read in numprint documentation that `\npboldmath` should be used for bolding, but this is also not working (commented line).


title: When using Caption Package, I receive: "Undefined control sequence \captionsetup "

text: I introduce a figure as follows:               \begin{figure}     \centering          \includegraphics[scale=0.300]{Figure.eps}          \caption{Caption for the figure}     \label{a}          \end{figure}      In the preamble I have written:               \usepackage{caption}     \captionsetup{font={small}}      I am writing the .tex file in Vim, in Ubuntu 12.04 LTS. When I compile the .tex file writing in the terminal:               bash make_latex.sh      (script which link is here: http://www.mediafire.com/view/p6ha13gt53nilpv/make_latex.sh ) I receive this error: ![enter image description here](http://i.stack.imgur.com/AVCgR.png) I have installed manually the caption package following all these steps: http://en.wikibooks.org/wiki/LaTeX/Installing_Extra_Packages **First Step** : I extracted the .ins file writing               latex caption.ins      The information generated in the terminal is here: https://www.mediafire.com/?o4giarg9jb4rov9 **Second Step** : As said in the instructions, I wrote:               latex caption.dtx      The information generated in the terminal is here: https://www.mediafire.com/?cl9ocvbid721p0a **Third Step** : In `/usr/local/share/texmf/tex/latex/caption` I copied the files that the info in the **First Step** told that were necessary to be copied. Here is the "proof": ![enter image description here](http://i.stack.imgur.com/nAnWi.png) **Fourth Step** : As said in the instructions, I made               texhash      And as it is shown here: ![enter image description here](http://i.stack.imgur.com/MkCUH.png) The process was done. So, the question is: Why am I receiving that error when compiling ? I would appreciate very much if someone could help me The latex version is: ![enter image description here](http://i.stack.imgur.com/Ljo6E.png) Here is my entire preamble:               \documentclass[12pt,a4paper,twoside,openany]{report}     \usepackage[left=2.5cm,top=2.5cm,right=2.5cm,bottom=2.5cm]{geometry}     \parindent 1 true cm     \usepackage{graphicx}     \usepackage{eufrak}     \usepackage[spanish]{babel}     \usepackage[latin1]{inputenc}       \usepackage[T1]{fontenc}     \usepackage{times}     \usepackage{amsmath}     \usepackage{multirow}     \usepackage{float}     \usepackage{color}     \usepackage[longnamesfirst,super]{natbib}      \setcitestyle{square}     \usepackage{fancyhdr}        \pagestyle{fancy}                                             \renewcommand{\chaptermark}[1]{\markboth{\thechapter .\ #1}{}}                  \renewcommand{\sectionmark}[1]{\markright{\thesection .\ #1}{}}     \lhead{\nouppercase}     \rhead{\nouppercase}     \fancyhead[LE]{{\sf \leftmark}}                                  \fancyhead[RE]{}     \fancyhead[RO]{{\sf \rightmark}}     \fancyhead[LO]{}                                                     \fancyfoot[LE,RO]{\thepage}                                                \fancyfoot[CE,CO]{}                                                              \renewcommand{\headrulewidth}{0.0pt}                                     \renewcommand{\baselinestretch}{1.25}     \usepackage{adjustbox}     \usepackage{enumerate}     \usepackage{courier}     \usepackage{caption}     \usepackage[version=3]{mhchem}     \usepackage{rotating}     \usepackage[percent]{overpic}     \captionsetup{font={small}}     \begin{document}


title: problem using footnote in the chapter title in thesis

text: When I add footnote on the chapter title, all the figures in that chapter are changed their locations and stay after the text ends. Please help if you have had similar problems. I'm attaching the short form of the code.               \documentclass[12pt,footinclude=true]{report}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \usepackage[breaklinks=true]{hyperref}     \usepackage{dcolumn}% Align table columns on decimal point     \usepackage{bm}% bold math     \usepackage{MnSymbol}     \usepackage{html}     \usepackage{url}     \usepackage[none,dcucite,abbr]{harvard}     \usepackage{graphicx}     \usepackage{amsmath}     \usepackage{uathesis}     \usepackage{lscape}     \usepackage{longtable}     \usepackage{cite}     \usepackage{epsfig}     \usepackage{upgreek}     \usepackage[textwidth=13cm,textheight=20cm]{geometry}     %\usepackage[left=4.5cm,right=4.5cm,top=4.5cm,bottom=4.5cm]{geometry}     \usepackage{glossaries}     \usepackage{tabularx}     \makeglossaries\newtheorem{theorem}{Theorem}     \newtheorem{acknowledgement}[theorem]{Acknowledgement}     \newtheorem{algorithm}[theorem]{Algorithm}     \newtheorem{axiom}[theorem]{Axiom}     \newtheorem{case}[theorem]{Case}     \newtheorem{claim}[theorem]{Claim}     \newtheorem{conclusion}[theorem]{Conclusion}     \newtheorem{condition}[theorem]{Condition}     \newtheorem{conjecture}[theorem]{Conjecture}     \newtheorem{corollary}[theorem]{Corollary}     \newtheorem{criterion}[theorem]{Criterion}     \newtheorem{definition}[theorem]{Definition}     \newtheorem{example}[theorem]{Example}     \newtheorem{exercise}[theorem]{Exercise}     \newtheorem{lemma}[theorem]{Lemma}     \newtheorem{notation}[theorem]{Notation}     \newtheorem{problem}[theorem]{Problem}     \newtheorem{proposition}[theorem]{Proposition}     \newtheorem{remark}[theorem]{Remark}     \newtheorem{solution}[theorem]{Solution}     \newtheorem{summary}[theorem]{Summary}     \newenvironment{proof}[1][Proof]{\textbf{#1.} }{\ \rule{0.5em}{0.5em}}     \begin{document}     \chapter[abcd]{abcd\footnote{test}}      \label{chap:Ab}     \end{document}


title: How to add \printindex to tableofcontents

text: I want to add the `\indexname` to the table of contents and to the bookmarks. Now, I know one way to do this job: add the follow code before `\printindex`:               \phantomsection     \cleardoublepage     \addcontentsline{toc}{chapter}{\indexname}      but I want to move all the styling or customize code to single one `.sty` file Anybody knows how to do this through renew `\printindex` command or some method can define in a `.sty` file? EDIT： add the MWE               \documentclass{book}     \usepackage{makeidx}     \usepackage{hyperref}     \usepackage{lipsum}               \makeindex     \begin{document}          \frontmatter     \tableofcontents               \mainmatter     \chapter{one}     \lipsum[1]     \index{word}          \backmatter     \appendix     \phantomsection     \cleardoublepage     \addcontentsline{toc}{chapter}{\indexname}     \printindex               \end{document}


title: Garamond and URL links

text: I am experimenting the use of the Garamond Premier Pro font for a dissertation and I still would like to keep the URL information in the bibliography when available. Obviously, there's a font problem since the typewriter family through `\texttt` does not really fit well. Would you have a suggestion to fix or improve this? ![enter image description here](http://i.stack.imgur.com/T7hXz.png)


title: How to break long word containing symbols but with no hyphen?

text: Below is my minimum working example:               \documentclass[10pt,a4paper,draft]{article}     \usepackage[utf8]{inputenc}     \usepackage[english]{babel}     \usepackage{lipsum}     \begin{document}     Thisisaverylongtexttosimulateerror “firstterm*[title/abstract] AND (secondterm*[title/abstract] OR thirdterm*[title/abstract])” \lipsum[2]     \end{document}      And this is the output:   ![enter image description here](http://i.stack.imgur.com/l1pL8.png) I tried using the `hyphenat` package with the `\fshyp` command to hyphenate the word at the forward slash, but this adds a hyphen as well, which I don't want. How do I break the word either at the * or at the / without adding a hyphen?


title: Why are URLs typeset with monospace fonts by default?

text: When typesetting URLs in LaTeX using the `url` package, they are set in a mono space font by default. While I just accepted that as a fact for a long time, I am now starting to wonder why? In Browsers, for example, the URL in the address bar is also not monospace. It does not make the link more readable, in my opinion rather on the contrary. The only explanation I can come up with is that it sets the link apart from the remeaining text. But honestly, even that sometimes looks a bit obstrusive. So is the reasons really just to set links apart from the text?


title: Force minted to insert new space in code that won't fit on the page

text: Essentially I would like to have `listings`' `breaklines` option on `minted`. I can't seem to find it. I could manually insert new lines but it becomes difficult when the code comes from an external file.


title: TexMaker output problem

text: I tried to run my texmaker after making changes to a document, but the result is still the same as the original. The change does not reflect in the pdf output. I have tried to uninstall and reinstall but still giving the same old pdf output the changes does not reflect. I ensured that I saved before running the quick build but nothing. please what can i do???


title: Overfull hbox - How do I fix this?

text: I have a line in tex which has a markup (as a part of a line) as follows:               \texttt{org.springframework.beans.factory.BeanFactory}      This is giving a overfull `\hbox` warning. How do I fix this? I am using MiKTeX 2.7 on Windows 7.


title: Fancy arrows with TikZ

text: I would like to draw an arrow like this using `TikZ`: ![enter image description here](http://i.stack.imgur.com/zekbW.png) This is taken from Workflow diagram. I didn't succeed in reproducing the arrow; is somewhat beyond my (extremely limited) TikZ abilities. I don't need all the workflow stuff. I simply want to draw such an arrow at a certain place in my text, e.g. -->               \documentclass{article}     \usepackage{<???>}     \usepackage{tikz}     \usetikzlibrary{<???>}     \begin{document}     Donec vehicula augue eu neque. Pellentesque     habitant morbi \tikz <???code for the arrow???> ; tristique senectus et netus     \end{document}      PS: Some explanations in your solution would be much appreciated, otherwise it will be difficult to customize it.


title: How to find citation tag in bibtex

text: I am using Zotero to collect my references then exporting them as a BibTex file and then I cite them in Latex. This is all fine but I often struggle to find the relevant citation tag. I would like to know how to find the citation tag easily as the search function in either WinEdt or TexWorks doesn't appear to work in BibTex files. I have been selecting everything pasting in to Word and then searching that way. Is there a Latex editor that I can use to search through the BibTex file or ideally modify the tags in Zotero (I appreciate that this is not a Zotero forum so not expecting an answer there). Thanks in advance


title: \MakeUppercase in \section and \chapter with hyperref cause trouble

text: I use `hyperref` package to make TOC in the pdf file (you know, the pdf reader can display a toc). But, when `hyperref` is used, the command `\MakeUppercase` in a structure command (like `\section` or `\chapter`) cause trouble in compilation. This is my MWE:               \documentclass[a4paper,12pt,oneside,french]{article}          \usepackage{xltxtra}     \usepackage{ucs}     \usepackage{fontenc}     \usepackage[frenchb,french,francais]{babel}     \usepackage{graphicx}     \usepackage[babel=true]{csquotes}          \usepackage{hyperref}          \author{Me}     \title{Lorem ipsum}     \date{This day}          \begin{document}       \maketitle            \section{Lorem ipsum {\MakeUppercase dolor}}       Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper congue, euismod non, mi.               \end{document}      And when I compile it with `xelatex main.tex`, I get:               This is XeTeX, Version 3.1415926-2.5-0.9999.3 (TeX Live 2013)     restricted \write18 enabled.     entering extended mode     (./main.tex     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, ar     abic, farsi, pinyin, ukenglish, usenglishmax, basque, french, loaded.     (/usr/share/texmf-dist/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/usr/share/texmf-dist/tex/latex/base/size12.clo))     (/usr/share/texmf-dist/tex/latex/xltxtra/xltxtra.sty     (/usr/share/texmf-dist/tex/generic/oberdiek/ifluatex.sty)     (/usr/share/texmf-dist/tex/generic/ifxetex/ifxetex.sty)     (/usr/share/texmf-dist/tex/latex/fontspec/fontspec.sty     (/usr/share/texmf-dist/tex/latex/l3kernel/expl3.sty     (/usr/share/texmf-dist/tex/latex/l3kernel/l3names.sty     (/usr/share/texmf-dist/tex/latex/l3kernel/l3bootstrap.sty))     (/usr/share/texmf-dist/tex/latex/etex-pkg/etex.sty)     (/usr/share/texmf-dist/tex/latex/l3kernel/l3basics.sty)     (/usr/share/texmf-dist/tex/latex/l3kernel/l3expan.sty)     (/usr/share/texmf-dist/tex/latex/l3kernel/l3tl.sty)     (/usr/share/texmf-dist/tex/latex/l3kernel/l3seq.sty)     (/usr/share/texmf-dist/tex/latex/l3kernel/l3int.sty)     (/usr/share/texmf-dist/tex/latex/l3kernel/l3quark.sty)     (/usr/share/texmf-dist/tex/latex/l3kernel/l3prg.sty)     (/usr/share/texmf-dist/tex/latex/l3kernel/l3clist.sty)     (/usr/share/texmf-dist/tex/latex/l3kernel/l3token.sty)     (/usr/share/texmf-dist/tex/latex/l3kernel/l3prop.sty)     (/usr/share/texmf-dist/tex/latex/l3kernel/l3msg.sty)     (/usr/share/texmf-dist/tex/latex/l3kernel/l3file.sty)     (/usr/share/texmf-dist/tex/latex/l3kernel/l3skip.sty)     (/usr/share/texmf-dist/tex/latex/l3kernel/l3keys.sty)     (/usr/share/texmf-dist/tex/latex/l3kernel/l3fp.sty)     (/usr/share/texmf-dist/tex/latex/l3kernel/l3box.sty)     (/usr/share/texmf-dist/tex/latex/l3kernel/l3coffins.sty)     (/usr/share/texmf-dist/tex/latex/l3kernel/l3color.sty)     (/usr/share/texmf-dist/tex/latex/l3kernel/l3luatex.sty)     (/usr/share/texmf-dist/tex/latex/l3kernel/l3candidates.sty)     (/usr/share/texmf-dist/tex/generic/oberdiek/ifpdf.sty))     (/usr/share/texmf-dist/tex/latex/l3packages/xparse/xparse.sty)     (/usr/share/texmf-dist/tex/latex/fontspec/fontspec-patches.sty     (/usr/share/texmf-dist/tex/latex/base/fixltx2e.sty)     *************************************************     * LaTeX warning: "xparse/redefine-command"     *      * Redefining document command \oldstylenums with arg. spec. 'm' on line 107.     *************************************************     ) (/usr/share/texmf-dist/tex/latex/fontspec/fontspec-xetex.sty     (/usr/share/texmf-dist/tex/latex/base/fontenc.sty     (/usr/share/texmf-dist/tex/latex/euenc/eu1enc.def)     (/usr/share/texmf-dist/tex/latex/euenc/eu1lmr.fd))     (/usr/share/texmf-dist/tex/xelatex/xunicode/xunicode.sty     (/usr/share/texmf-dist/tex/latex/tipa/t3enc.def     (/usr/share/texmf-dist/tex/latex/euenc/eu1lmss.fd))     (/usr/share/texmf-dist/tex/latex/graphics/graphicx.sty     (/usr/share/texmf-dist/tex/latex/graphics/keyval.sty)     (/usr/share/texmf-dist/tex/latex/graphics/graphics.sty     (/usr/share/texmf-dist/tex/latex/graphics/trig.sty)     (/usr/share/texmf-dist/tex/latex/latexconfig/graphics.cfg)     (/usr/share/texmf-dist/tex/xelatex/xetex-def/xetex.def))))     (/usr/share/texmf-dist/tex/latex/fontspec/fontspec.cfg)))     (/usr/share/texmf-dist/tex/latex/realscripts/realscripts.sty     *************************************************     * LaTeX warning: "xparse/redefine-command"     *      * Redefining document command \textsubscript with arg. spec. 's' on line 25.                                                                                [0/15232]     *************************************************     *************************************************     * LaTeX warning: "xparse/redefine-command"     *      * Redefining document command \textsuperscript with arg. spec. 's' on line 28.     *************************************************     ) (/usr/share/texmf-dist/tex/latex/metalogo/metalogo.sty))     (/usr/share/texmf-dist/tex/latex/ucs/ucs.sty     (/usr/share/texmf-dist/tex/latex/ucs/data/uni-global.def))     (/usr/share/texmf-dist/tex/latex/base/fontenc.sty)     (/usr/share/texmf-dist/tex/generic/babel/babel.sty     (/usr/share/texmf-dist/tex/generic/babel/frenchb.ldf     (/usr/share/texmf-dist/tex/generic/babel/babel.def)     *************************************     * Local config file frenchb.cfg used     *     (/usr/share/texmf-dist/tex/generic/babel/frenchb.cfg))     (/usr/share/texmf-dist/tex/generic/babel/frenchb.ldf)     (/usr/share/texmf-dist/tex/generic/babel/frenchb.ldf))     (/usr/share/texmf-dist/tex/latex/carlisle/scalefnt.sty)     (/usr/share/texmf-dist/tex/latex/csquotes/csquotes.sty     (/usr/share/texmf-dist/tex/latex/etoolbox/etoolbox.sty)     (/usr/share/texmf-dist/tex/latex/csquotes/csquotes.def)     (/usr/share/texmf-dist/tex/latex/csquotes/csquotes.cfg))     (/usr/share/texmf-dist/tex/latex/hyperref/hyperref.sty     (/usr/share/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty     (/usr/share/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty))     (/usr/share/texmf-dist/tex/latex/oberdiek/kvoptions.sty)     (/usr/share/texmf-dist/tex/latex/hyperref/pd1enc.def)     (/usr/share/texmf-dist/tex/xelatex/xetexconfig/hyperref.cfg)     (/usr/share/texmf-dist/tex/latex/url/url.sty))          Package hyperref Message: Driver (autodetected): hxetex.          (/usr/share/texmf-dist/tex/latex/hyperref/hxetex.def     (/usr/share/texmf-dist/tex/latex/hyperref/puenc.def)     (/usr/share/texmf-dist/tex/generic/oberdiek/stringenc.sty)     (/usr/share/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty)) (./main.aux)     (/usr/share/texmf-dist/tex/latex/tipa/t3cmr.fd)     (/usr/share/texmf-dist/tex/latex/ucs/ucsencs.def     fontencoding T3 patched     ) (/usr/share/texmf-dist/tex/latex/hyperref/nameref.sty     (/usr/share/texmf-dist/tex/generic/oberdiek/gettitlestring.sty)) (./main.out)     (./main.out)     ! Undefined control sequence.     l.19       \chapter                        {Lorem ipsum {\MakeUppercase dolor}}     ?      (/usr/share/texmf-dist/tex/generic/oberdiek/se-ascii-print.def) [1] (./main.aux     )     ** WARNING ** Couldn't open font map file "cid-x.map".      )     Output written on main.pdf (1 page).     Transcript written on main.log.      My output pdf is fine. But I get an error as you see and I want to didn’t get it. When I dell `hyperref` package I didn’t have this error but the pdf reader didn’t know my TOC. So how to conserve my TOC in the reader but didn’t have the error?


title: Centering clrscode3e codebox horizontally

text: How can I center a `codebox` (from `clrscode3e` package) horizontally in a document ?


title: Centering dots in latex

text: How can I center the cdots on the third line to the surrounding equations?               $F(-\infty, x_2,\cdots, x_n)=C\big(0,F_2(x_2),\cdots, F_n(x_n)\big)=0$,\\     $F(x_1,-\infty,\cdots, x_n)=C\big(F_1(x_1),0,\cdots, F_n(x_n)\big)=0$,\\     $\cdots$ \\     $F(x_1,x_2,\cdots,-\infty)=C\big(F_1(x_1),F_2(x_2),\cdots, 0\big)=0$.\\      like so:               XXXXXXXXXXXXXXXXXXXXX     XXXXXXXXXXXXXXXXXXXXX             ...     XXXXXXXXXXXXXXXXXXXXX


title: How to use the MS Trebuchet font?

text: My thesis may use Times New Roman or MS Trebuchet font. I have written it using Times, but now I'd like a look at how it appears in MS Trebuchet. Currently I just use the `times` package, which I guess sets the Times New Roman font as active. How can I try MS Trebuchet? I briefly tried xetex, but it had a problem even with the document type: `report`; I also use graphics etc. I use both Cygwin and Ubuntu Linux.


title: Customize diameter of a circle around numbers

text: The following code gives one good solution for displaying numbers in cricle but **it would be better to have the possibility to control the size of the circle.** Why ? In the example below you will see that the three numbers in circle do not look pretty when they are ine the same context : in the same paragraph or in one list like in the following code. So I would like to us the first optional argument so as to do the following things :   1. If the first optional argument is 0, then the diameter of the circle is the current automatic one.   2. If the first optional argument is one natural number n <> 0, then the diameter of the circle is n times one character width.    3. In other case, one error must be raised. Here is the code to modify...               % Source : http://tex.stackexchange.com/questions/7032/good-way-to-make-pgftextcircled-numbers          \documentclass{article}         \usepackage{enumitem}         \usepackage{tikz}              \newcommand{\pgftextcircled}[2][0]{             \setbox0=\hbox{#2}%             \dimen0\wd0%             \divide\dimen0 by 2%             \begin{tikzpicture}[baseline=(a.base)]%                 \useasboundingbox (-\the\dimen0,0pt) rectangle (\the\dimen0,1pt);                 \node[                     circle,                     draw,                     outer sep=0pt,                     inner sep=0.1ex                 ] (a) {#2};             \end{tikzpicture}         }          \begin{document}          \begin{description}         \item[Automatic width :] \pgftextcircled{0} , \pgftextcircled{63} , \pgftextcircled{733}         \item[Width = 2 :]       \pgftextcircled[2]{0} , \pgftextcircled[2]{63} , \pgftextcircled[2]{733}         \item[Width = 3 :]       \pgftextcircled[3]{0} , \pgftextcircled[3]{63} , \pgftextcircled[3]{733}     \end{description}          Lets' try in one list :          \begin{enumerate}[label=\protect{\pgftextcircled[2]{\arabic*}}]         \item Item n°1         \item Item n°2         \item Item n°3         \item Item n°4         \item Item n°5         \item Item n°6         \item Item n°7         \item Item n°8         \item Item n°9         \item Item n°10         \item Item n°11         \item Item n°12     \end{enumerate}          \end{document}


title: chemfig and MinionPro problem

text: Well, this is rather minor, but               \documentclass{minimal}     \usepackage{chemfig}     \usepackage{MinionPro}     \begin{document}     Hello, World!     \chemfig{*6(=N-*6(-N-=N)=--N-)}     \end{document}      produces               ! Undefined control sequence.     <everyeof> @nil      but the output is fine, so far as I can tell. Why? (Btw, using MinionPro occasionally produces such errors with undefined this or that.) Thanks!


title: CM clearer than CMsuper? After applying \usepackage[T1]{fontenc}, fonts get blurry

text: minimum working code:               \documentclass{article}     % \usepackage[T1]{fontenc}          \begin{document}          abc     ABC     123          \end{document}      ![Preview](http://i.stack.imgur.com/Oc7Y0.png) ![Acrobat](http://i.stack.imgur.com/nhhUp.png) It opens as pdf in Mac's preview and Acrobat X respectively. The left is original, the right uses T1. Should I assume the T1 encoding or CMsuper is not anti aliased or so?


title: TIKZ : How to decorate a \path?

text: My question is about drawing a "commutative-type diagram" in mathematics. I would like to integrate an arrow of the type `\rightsquigarrow`, which is described how to be obtained here : Squiggly arrows in tikz. The problem is that I uses `\path` to connect the entries of my matrix in `tikz` (because this part comes integrated in a bigger diagram), and i get an error > "Package PGF Error: I cannot decorate an empty path.". The code is               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{decorations.pathmorphing}     \usepackage{amssymb}          \begin{document}          \begin{tikzpicture}     \matrix (m) [matrix of math nodes, row sep=3em, column sep=4em, text height=2ex, text depth=0.25ex]     { U & U \\};     \path [->, font=\scriptsize, line join=round, decoration={     zigzag,     segment length=4,     amplitude=.9,post=lineto,     post length=2pt}, decorate] (m-1-1) edge node[auto] {F} (m-1-2);     \end{tikzpicture}          \end{document}      where the decorate part does not work.


title: Pgfplots: put plot legend on the outside margin?

text: I use `classsicthesis` style for my PhD. Since this style is somehow geared towards using the outside margin for additional notes and stuff, I thought I could also place the legends of my plots there. I use `pgfplots` to create them. I styled my plots so that the legend is placed outside the plot. The problem I don't know how to solve (and I really wonder if it can be done) is: > How can it be automatically determined if the plot is on the even or odd > page so that the legend always appears on the outside margin? At the moment I can only do this manually by placing the following two lines in the code of each plot:                legend style={at={(-0.1,1)}, anchor=north east}, %for even pages     %legend style={at={( 1.1,1)}, anchor=north west}, %for odd pages      and (un)commenting the appropriate line - which, of course, is not practical at all. An automated solution would be great - otherwise it's just not worth it for a lengthy document with lots of plots. P.S.: I am using TexLive 2011 on Ubuntu 11.10 **EDIT:** I thought of the question as kind of a general problem, but I was probably wrong, so I created the following MWE to illustrate it a help with the alternative answers:               \documentclass{article}     \usepackage{pgfplots}     \begin{document}     \begin{tikzpicture}     \begin{axis}[     % legend style={at={(-0.1,1)}, anchor=north east}, %for even pages     legend style={at={( 1.1,1)}, anchor=north west}, %for odd pages     ]     \addplot coordinates { (0,0) (1,1) };     \addlegendentry{Legend entry}     \end{axis}     \end{tikzpicture}     \end{document}


title: Split custom float over pages?

text: I use a custom float `example`, but some of the code is running longer than a page. Is there an easy way to split the float across pages? The definition is as follows:               \floatstyle{ruled}     \newfloat{example}{thp}{lop}     \floatname{example}{Example}


title: PGFplot producing "noise" (incorrect graph)

text: **Update:** This has problems if the samples are one of these: **{19,21,23,28,30,31,32,34,36,38,39}** , so I think something else is going on. * * * I can get this example to work fine if I reduce the number of samples to 40 or below. Otherwise, this results in an incorrect graph. I am wondering if this seemingly huge round off problem might indicate that there is some other underlying problem with the math engine. So, is this a know issue, and I just have to make sure that I adjust the number of samples based on what is being plotted? The MWE example below produces the following output as it stands now, when it should just be a straight line. ![Result](http://i.stack.imgur.com/cpxmF.png)               \documentclass{article}     \usepackage{pgfplots}     \usepackage{amsmath}          \begin{document}     \begin{tikzpicture}     \begin{axis}[xmin=-4,xmax=+0, ymin=-0.5,ymax=4.5]           \addplot[draw=blue, mark=none, ultra thick, domain=-4.0:-0.1,              samples=100] % Fine is sample < 42, and NOT {19,21,23,28,30,31,32,34,36,38,39}         {(3*x + abs(x))/x}         node [midway, above right] {$y=\frac{3x + |x|}{x}$};           \end{axis}      \end{tikzpicture}     \end{document}      * * * ## Update 2011-11-03: Am not able to reproduce this behavior with the current TeXLive2011 release, so problem is definitely fixed.


title: change the font of chapter title and section title

text: I am trying to change the font and format of heading using `titlesec` package. However it gives me the following error.                 Missing { inserted \tableofcontents <br>     Missing { inserted \chapter{Introduction}       ## The code:               \documentclass[10pt, letterpaper]{report}     \usepackage{thesis}               \usepackage{titlesec}     \renewcommand{\chaptername}{CHAPTER}{\Large}     \titlespacing*{\chapter}{0pt}{0.5in}{0.3in}     \titleformat{\chapter}[display]             {\normalfont\Large\centering\uppercase}{\chaptertitlename\ \thechapter}{0pt}{\Large}     \titleformat{\section}{\large\bfseries}{\thesection}{1em}{}               \begin{document}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%      \tableofcontents          \chapter{Introduction}          Some text.          \end{document}


title: How to separate beamer columns with vertical lines

text: I am using the `columns` environment with `beamer`.               \begin{columns}[c]     \begin{column}{0.5\textwidth}     \includegraphics<1>[width=0.35\textwidth]{dictmat-4.png}     \end{column}     \hspace{-50pt}     \begin{column}{0.50\textwidth}     \includegraphics<1>[width=0.35\textwidth]{dictmat-5.png}     \end{column}     \end{columns}      How can I draw a vertical line between two columns (i.e., the two figures?)


title: Node placement problem

text: This is my first question in tex.stackexchange. It might be relatively simple problem but I am having difficulties with the placement of the nodes inside graphics. The problem is that when I try to compile the code below I get the result which has problem.               \documentclass{standalone}     \usepackage{pgfplots}          \begin{document}          \begin{tikzpicture}     \begin{axis}[thick,ticks=none,domain=-pi:pi,samples=1000,axis x line=middle,axis y line=none,xlabel={t},xmin=-4,xmax=7,ymax=2,ymin=-2]     \addplot[smooth, color=black] (\x,{sin((9*(deg(x))) )*cos(((deg(x))) )}) node[pos=0.75,pin={carrier wave},thick,inner sep=0pt] {};     \addplot[smooth, color=black] (\x,{cos(((deg(x))) )}) ;     \addplot[smooth, color=black] (\x,{-cos(((deg(x))) )}) node[pos=0.75,pin={envelope wave},thick,inner sep=0pt] {};     \end{axis}     \end{tikzpicture}          \end{document}      It should look like this (look at the position of the pinned text): ![enter image description here](http://i.stack.imgur.com/DIuRu.png) Once it was working but now it is not working.


title: Grid lines in top-view surface plot

text: I'm almost satisfied with my graphs, only grid lines are missing. What I'm basically doing is a sort of density plot / color plot by letting pgfplots generate a surface and viewing it from the top:               \begin{tikzpicture}         \begin{axis}[                 axis lines = middle,                 grid = major,                 grid style = {color = white!90!black},                 xlabel = $x$,                 ylabel = $y$,                 no markers,                 mesh/ordering=y varies,                 view={0}{90},                 colormap = {graywhite}{color=(white) color=(gray)},             ]             \addplot3[surf,shader=interp] file{surf.txt};         \end{axis}     \end{tikzpicture}      Example output, using this input: ![output](http://i.stack.imgur.com/YoCUE.png) The surface is drawn using a fine grid (50x50), thus leaving the original mesh lines is a no-go. By choosing `shader=interp` pgfplots basically removes the mesh lines and interpolates the colors nicely. It would be fantastic if some grid lines could be drawn on top of this, using e.g. black with 10% opacity. Does anyone how to do this?


title: Source Code Indentation

text: I was wondering if it is possible to indent the code like in most programming languages as shown below:               \part         \chapter             \section                 \subsection    etc.      This would make the source code much more readable. So is it possible? If yes how?


title: XeLaTeX, hyperref and page breaking

text: Using XeLaTeX, loading the `hyperref` package apparently changes the way in which (reconfigured) widow and orphan penalties work — so they reappear, just as if I had not altered the values for the penalties. So, basically, the pages do not break where I would want them to. I have noticed that loading the `frenchlinks` option modifies this behaviour, yet without returning it to the settings I want. And I do not have the faintest idea why it does that, given that my document does not contain any link that will be actually affected by it (i.e. turned into small-caps) – all links are either bibliography entires or old-style figures, both being untouched by the option. Also, I have tried putting the widow and orphan penalty commands after loading `hyperref`, without any change. The code I am using rests on the `memoir` class, with customisations. I am only putting the significant ones in my example code. Here is what my preamble looks like:               \documentclass[12pt,a4paper,twoside]{memoir}          \widowpenalties=3 4500 2000 150     \clubpenalties=3 4500 2000 150          \usepackage{csquotes}     \usepackage[british,frenchb]{babel}     \usepackage{xspace}     \usepackage{fontspec,xunicode}     \setmainfont[Ligatures={Common},Numbers={OldStyle}, Mapping=tex-text]{Adobe Garamond Pro}     \usepackage{biblatex}          % Here I redefine some lengths, formatting options, and add a few abbreviations          \usepackage{hyperref}      I have tried running my file with LaTeX, and have not been able to spot the problem there – but that might just be luck or failure to find a place where it would happen. EDIT BY GUO: It seems that hyperref set page size by default, which does not compatible with customized document class leading pagebreak to fail. **Set the setpagesize option of hyperref to false** would alleviate the problem.


title: Defining variants of \small and \large that use \normalsize's line spacing

text: As a partial workaround for grid typesetting, I'd like to define variants of `\small` and `\large` that behave like their standard counterparts except that they use the line spacing of `\normalsize`. I know that I can look up the respective macro definitions for, e.g., the `10pt` standard class option in `size10.clo` and accordingly define the new variants, e.g.,               \newcommand\largeVAR{\@setfontsize\largeVAR\@xiipt\@xiipt}      However, I'm looking for an automatic solution that works for all (possibly custom) `.clo` option files, i.e., one that dynamically adapts to the respective standard macro definitions. Bonus points for a solution showing how to add starred macro versions (`\small*`, `\large*`).


title: What is the document class / package of this pdf file?

text: Does anyone know the name of the package / documentstyle used here? I think the style must be public, because I saw another file by another author using it (but I can't publish this document here).


title: Uncover segments of a TikZ path in Beamer

text: I have a question about uncovering segments of a `TikZ` path in `Beamer`? As a simple example, consider the following path made up of a horizontal and a vertical segment.               \begin{tikzpicture}       \draw(0,0)--(1,0)--(1,1);     \end{tikzpicture}      On the slide, I want to show the horizontal segment first, and then the vertical segment. One way to do this is the following:               \begin{tikzpicture}       \draw<1->(0,0)--(1,0);       \draw<2->(1,0)--(1,1);     \end{tikzpicture}      However, this produces two disjoint line segments (it's clear if you zoom in on the point `(1,0)`). Is there an alternative way to uncover the two segments as a _connected_ path, rather than two disjoint lines?


title: Automatic indentation/framing of nested theorems/proofs

text: I'm a fan of python, and in the sadly common case where one creates new theorems, definitions, etc within the actual proofs of other theorems, I would like the "inner theorems" to be indented. To this end, I've discovered this solution, which provides a frame as well as indenting it. However, that solution frames/indents everything, even base level theorems, which ended up being sort of ugly. Is there a way to make it frame/indent only when you're nesting it in another proof, short of defining separate environments and doing it manually? Not sure if it's important, but in case it is, my current setup is:               \usepackage[amsmath,thmmarks,framed]{ntheorem}     \theorembodyfont{\small}     \usepackage{framed}     \usepackage{color}     \definecolor{gray}{rgb}{0.6,0.6,0.6}     \renewcommand*\FrameCommand{{\color{gray}\vrule width 5pt \hspace{10pt}}}          \theoremstyle{plain}     \newframedtheorem{thm}{Theorem}[page]     \newframedtheorem{lem}[thm]{Lemma}     \newframedtheorem{cor}[thm]{Corollary}     \newframedtheorem{prop}[thm]{Proposition}          \theoremheaderfont{\normalfont\itshape}     \newframedtheorem{rem}[thm]{Remark}     \newframedtheorem{ques}[thm]{Question}          \theoremstyle{nonumberplain}     \theoremheaderfont{\normalfont\itshape}     \newframedtheorem{proof}{Proof:}      * * * Edit: my end solution was an lualatex modification of stuff posted in the checkmarked answer. Because he edited it out, I'll vaguely requote the general idea here: > Define two versions of your environments, `thm` and `frthm`, and within the > `proof` definition, redefine `\thm` to `\frthm` and `\endthm` to `endfrthm`. > This is not as nice a solution as the previous one, but it will technically > work. This is a MWE of that idea, written in lualatex for automation ( you'll have to modify the `tex.print` itself to change implementation-specific details like defining `\newtheorem` differently).               \documentclass[11pt,openany]{memoir}     \usepackage{cool}     \usepackage{luacode}     \usepackage{etoolbox}     \usepackage[amsmath,thmmarks,framed]{ntheorem}     \usepackage{framed}     \usepackage{color}     \definecolor{gray}{rgb}{0.6,0.6,0.6}          \begin{luacode}     prefix = "fr"          function createEnvironments(environs)         for sh, lo in pairs(environs) do             tex.print("\\newtheorem{" .. sh .. "}{" .. lo .. "}")             tex.print("\\newframedtheorem{" .. prefix .. sh .. "}{" .. lo .. "}")         end     end          function redefineEnvironments(environs)         for sh, lo in pairs(environs) do             tex.print("\\def\\" .. sh .. "{\\" ..  prefix .. sh .. "}" )             tex.print("\\def\\end" .. sh .. "{\\end" .. prefix .. sh .. "}")         end     end     \end{luacode}          \begin{luacode}     --your list of shortcut="Environment"; fill in this table!     environList = { lem="Lemma" , prop="Proposition",proof="Proof"}          createEnvironments(environList)     \end{luacode}          \renewcommand*\FrameCommand{{\color{gray}\vrule width 5pt \hspace{10pt}}}     \appto\proof{% ... within the proof environment, we redefine the commands to point to the framed environments     \directlua{redefineEnvironments(environList)}     }          \begin{document}     \begin{lem}     Layer 1     \end{lem}          \begin{proof}     Layer 0 stuff     \begin{prop}     Layer 1 starts getting embedded     \begin{lem}     This is an artefact: once you get into the first proof you start nesting no matter what     \end{lem}     \end{prop}          Layer 0 stuff     \begin{lem}     Another layer 1     \end{lem}          Can put layer 0 stuff here      \begin{proof}     Layer 1 proof     \begin{prop}     Layer 2     \end{prop}     \begin{proof}     We conclude with a layer 2 proof     \end{proof}     \end{proof}          \end{proof}     \end{document}      Explanation: I realized that making every theorem a framedtheorem had bad typesetting side-effects. This new version creates both and redefines the former to the latter within the `proof` environment, where nesting is both likely to occur. Of course, you can do the same within any other environment.


title: How can I make a custom theorem for a definition?

text: Looking at the wikibooks article on theorems has me wondering... I'd like to do something, if possible, similar to the default "proof" theorem style, whereby I can add a custom name to each theorem as I go along.. Eample: In the wikibooks here, it says that if I use the following code, I get the opportunity to name the proof:               \begin{proof}[Proof of important theorem]         Here is my important proof     \end{proof}      If I were to leave out the [proof of important theorem], it would just say "Proof:" instead. I'd like to make it possible to define a definition theorem that always says "Definition #", but I can optionally add a name to it so it may say something like "Definition 3.1 - _The answer of the universe and everything_ ", followed by the definition in question. Right now, this is all I have. I don't know much about TeX yet as I'm just learning it now.               \newtheoremstyle{definitionstyle} % name of the style to be used       {10mm}        % measure of space to leave above the theorem. E.g.: 3pt       {10mm}        % measure of space to leave below the theorem. E.g.: 3pt       {}            % name of font to use in the body of the theorem       {}            % measure of space to indent       {\bfseries}   % name of head font       {\newline}    % punctuation between head and body       {10mm}        % space after theorem head       {}            % Manually specify head     \theoremstyle{definitionstyle}     \newtheorem{mydef}{Definition}[section]


title: Change the base of the numeration

text: In a document, is it possible to change the base in which the numeration is written? The default numeration is decimal, but I would like to use an octal or hexadecimal numeration for instance. Also, when I use a document class 'book' or 'report', how can I set a negative numeration before the main text? What I mean by this is that instead of small latin numeration (i, ii, iii, iv, ...) I would like the pages to decrease with a negative sign in front. Is there a way to do so?


title: TeX, free floating, anchors

text: I want to achieve the following:   1. I want a single page to consist of N "regions." Each region has a x-start, y-start, and a `\hbox` (denoting the contents of the region).   2. Furthermore, for each region, I want to be able to define "anchors" within the reason.   3. I want to be able to draw arrows pointing from one anchor to another anchor. What is the best way to achieve this in TeX?


title: File `ieeetran.sty' not found - trying to use IEEE bibliography style with bibtex

text: I am trying to use IEEE bibliography style with LaTeX. I am using MiKTeX 2.9 and I thought it would be as easy as all of the other packages, just install from the manager and then `\usepackage{ieeetran}` and then `\bibliography{ieeetran}` I'm quite new to this, to be honest I don't even know the proper name to put in the curly brackets and it's not obvious from some of the documentation. Please let me know what other information you might need.


title: Tikz overlay picture over the frame title in Beamer

text: I am trying to put a tikz overlay picture - A nice, thick red 'X' over a word - On the frame title of a Beamer frame. However, the overlay tikz picture in the frame does not recognize the nodes given in the title. For example, I try:               \newcommand{\crd}[1]{\tikz[overlay, remember picture, baseline=.5ex]\coordinate (#1);}     \begin{frame}       \frametitle{Some \crd{p}Crossthis\crd{q} Title}       \begin{tikzpicture}[overlay, remember picture]         \draw[red, thick] (p) -- (q);       \end{tikzpicture}     \end{frame}      And I get:               ERROR: Package pgf Error: No shape named q is known.      How can I put an overlay on the title?


title: Framed minipage of dependent dimensions

text: I am trying to prepare handouts of a ppt (I know). I would like a slide to be shown on the left half of a page and comments regarding it in a framed box of the same size as the slide on the right half. By               \begin{minipage}{.5\textwidth}         \includegraphics[page=4,scale=.3]{my_ppt}     \end{minipage}      I can get the slide in, but how do I create a minipage to the right of it that has the same height as the previous minipage? Is minipage the environment of choice here? And is the framed package the best way to get a frame around it?


title: bibliography in Beamer

text: In Beamer, bibliography is displayed in the way that authors, title and journals are in three lines. Here is an example. Since I have many references, I am wondering, whether we can put them in one line to save some space? Another option is whether we can split the references into several slides?


title: inline equation outside margin

text: My inline equation falls outside the margin. I was wondering if there is any solution for that? Here is the `MWE`:               \documentclass[12pt,letterpaper]{article}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{makeidx}     \usepackage{graphicx}     \usepackage{lmodern}     \usepackage{kpfonts}     \usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}          \begin{document}     where the first equality in \ref{inequality} follows from $\lceil\frac{s}%     {t}\rceil=\lfloor\frac{s+t-1}{t}\rfloor$ for integer $s$ and $t$ and the     inequality follows from the feasibility condition. We also assume that the     item can be ordered at any day of the week and these orders arrive instantly.     For each day $t\in W$ define $p_{x,t,n,j} \left(     \text{for all }x=0,\cdots,u_{j}\text{ }\text{and }     n\in N_{x,t,j}     \right)$ to be the joint probability of     \end{document}


title: Change the PDF bookmark for the table of contents page

text: When I click on the PDF bookmark "Contents" in my PDF Viewer, it goes to the position of the table of contents but does not show the title "Contents". Is it possible to set the PDF bookmark above the Contents title, so one can see the title when clicking on Contents? I'm using the memoir class. Here is a minimal example:               \documentclass[a4paper,12pt,final, oneside]{memoir}          \usepackage[xetex, unicode=true, colorlinks=false, linktocpage=true,      pdfborder={0 0 0}, pdfstartpage=1, pdfstartview=FitV, breaklinks=true,     pdfpagemode=UseNone, pageanchor=true, pdfpagemode=UseOutlines,     plainpages=false, bookmarksnumbered, bookmarksopen=true,     bookmarksopenlevel=1, hypertexnames=true, pdfhighlight=/O, urlcolor=Black,     linkcolor=Black, citecolor=Black]{hyperref}                \begin{document}          \frontmatter     \tableofcontents      \chapter{chapter1}     \chapter{section1}     \end{document}


title: Normalized coordinates for image overlays in TikZ

text: > **Possible Duplicate:**   >  Simplest way to overlay a text + rectangle label an image?   >  Drawing on an image with TikZ I read the following in the TikZ manual: > There are different ways of specifying coordinates. The easiest way is to > say something like (10pt,2cm). This means 10pt in x-direction and 2cm in > y-directions. Alternatively, **you can also leave out the units** as in > (1,2), which means “one times the current x-vector plus twice the current > y-vector.” These vectors **default to 1cm** in the x-direction and 1cm in > the y-direction, respectively. Say I have an image and that I want to overlay stuff on it. Is there a way to set up coordinates that are **normalized** to the size of the figure? For example say I want to place a picture `image.png` within a `tikzpicture`               \begin{tikzpicture}[inner sep=0pt,remember picture]     \node at (0,0) {\includegraphics[width=0.8\linewidth]{image.png}};     \end{tikzpicture}%      I would like to use **normalized** coordinates when drawing `nodes` on top of it, such that I have the following reference frame:                  0                   1        . -------------------> X         |                   |         |                   |         |       Figure      |         |                   |         |                   |       1 | -------------------        V        Y      In other words I would like to have `(1,1)` refer to the bottom right corner, and `(0,0)` refer to the upper left corner of the figure (or image).


title: Tikz picture label on bottom right

text: > **Possible Duplicate:**   >  Simplest way to overlay a text + rectangle label an image? I have to insert manny pictures in document, and all should have bottom right caption but on the top of the picture (inside the picture). This caption should have a 3px bottom and right margin and possible white background color - like white box with text inside. Text should be only one line, but I dont know in advance how long it will be - possibly not more than 5-7 characters. How can i do that with TIKZ package?


title: Multicolumn list with same number of items in each column

text: I want to make a multicolumn list with the same number of items in each column. I tried this with multicols, but some items have bigger heights than others so I got a column of 5 and a column of 3:               \documentclass{article}     \usepackage{multicol}     \usepackage{amsmath}     \begin{document}     \begin{multicols}{2}     \begin{enumerate}     \item $1$     \item $2$     \item $3$     \item $4$     \item $5$     \item $\cfrac{1}{4}$     \item $\cfrac{1}{5}$     \item $\cfrac{1}{6}$     \end{enumerate}     \end{multicols}     \end{document}      ![enter image description here](http://i.stack.imgur.com/Jl5rd.png) Is there a simple way to get the same number of items in each column?


title: To draw a chessboard

text: How to draw a chessboard with house's color unconventional? I can to draw alternately back and white house. But, alternately column black and white I can't