title: Making a table independent of pgf

text: I use `pgfplotstable` to generate tables to be included in online submission to journals. I would like to make my paper independant of `pgfplotsable` because compilation of the document is made online with an obsolete LaTeX distribution and clumsy packages handling. I already asked a question to that effect (see this question) but I am now facing a more complicated case. With this, I learned about the `outfile=` option of the `\pgfplotstabletypeset` command which write the tables into a file. I am using some features of `pgfplotstable` to replace the number in the table by symbols (inspired by this question). Here is an eample similar to my actual code:               \documentclass{article}     \usepackage{pgfplotstable}          \begin{document}     \pgfplotstableset{symbol column/.style={column type=c,         postproc cell content/.style={           /pgfplots/table/@cell content={}{%             \pgfmathparse{int(less(##1, 0.01))}             \ifnum\pgfmathresult=1             *             \else                 \pgfmathparse{int(less(##1, .1))}                 \ifnum\pgfmathresult=1                 **                 \else                     \pgfmathparse{int(less(##1,1))}                     \ifnum\pgfmathresult=1                     ***                     \else                     { }                     \fi                 \fi             \fi           },         },     }}                              \pgfplotstabletypeset[outfile=output_table.tex,     columns/A/.style={symbol column},     columns/B/.style={symbol column},     ]     {%     A B     .001 5     .1 .5     .2  .005     1.7 22     }     \end{document}      The output file looks like this:               \begin {tabular}{cc}%     A&B\\%     {}{\pgfmathparse {int(less(.001, 0.01))} \ifnum \pgfmathresult =1 * \else \pgfmathparse {int(less(.001, .1))} \ifnum \pgfmathresult =1 ** \else \pgfmathparse {int(less(.001,1))} \ifnum \pgfmathresult =1 *** \else { } \fi \fi \fi }&{}{\pgfmathparse {int(less(5, 0.01))} \ifnum \pgfmathresult =1 * \else \pgfmathparse {int(less(5, .1))} \ifnum \pgfmathresult =1 ** \else \pgfmathparse {int(less(5,1))} \ifnum \pgfmathresult =1 *** \else { } \fi \fi \fi }\\%     {}{\pgfmathparse {int(less(.1, 0.01))} \ifnum \pgfmathresult =1 * \else \pgfmathparse {int(less(.1, .1))} \ifnum \pgfmathresult =1 ** \else \pgfmathparse {int(less(.1,1))} \ifnum \pgfmathresult =1 *** \else { } \fi \fi \fi }&{}{\pgfmathparse {int(less(.5, 0.01))} \ifnum \pgfmathresult =1 * \else \pgfmathparse {int(less(.5, .1))} \ifnum \pgfmathresult =1 ** \else \pgfmathparse {int(less(.5,1))} \ifnum \pgfmathresult =1 *** \else { } \fi \fi \fi }\\%     {}{\pgfmathparse {int(less(.2, 0.01))} \ifnum \pgfmathresult =1 * \else \pgfmathparse {int(less(.2, .1))} \ifnum \pgfmathresult =1 ** \else \pgfmathparse {int(less(.2,1))} \ifnum \pgfmathresult =1 *** \else { } \fi \fi \fi }&{}{\pgfmathparse {int(less(.005, 0.01))} \ifnum \pgfmathresult =1 * \else \pgfmathparse {int(less(.005, .1))} \ifnum \pgfmathresult =1 ** \else \pgfmathparse {int(less(.005,1))} \ifnum \pgfmathresult =1 *** \else { } \fi \fi \fi }\\%     {}{\pgfmathparse {int(less(1.7, 0.01))} \ifnum \pgfmathresult =1 * \else \pgfmathparse {int(less(1.7, .1))} \ifnum \pgfmathresult =1 ** \else \pgfmathparse {int(less(1.7,1))} \ifnum \pgfmathresult =1 *** \else { } \fi \fi \fi }&{}{\pgfmathparse {int(less(22, 0.01))} \ifnum \pgfmathresult =1 * \else \pgfmathparse {int(less(22, .1))} \ifnum \pgfmathresult =1 ** \else \pgfmathparse {int(less(22,1))} \ifnum \pgfmathresult =1 *** \else { } \fi \fi \fi }\\%     \end {tabular}%      which depends upon `pgf` for the `\pgfmathparse` and associated commands. Is there a way to circumvent this without manually editing the table or using external program


title: Making a series of child TeX files and including them as "chapters" in a parent file?

text: I want to build a big PDF of multiple TeX files which will all have the same preamble. They'll have `\newcommand` and `\renewcommand` as well as `\usepackage` and `\documentclass` because each file should be standalone and compiled as a smaller PDF. But then, I want to take all of the files we have and put them in a main document. I've looked at the other questions:   * Include file with preamble to another tex file   * Make a .tex file that combines complete .tex documents in subdirectories   * http://www.faqoverflow.com/tex/79594.html   * http://ctan.mackichan.com/macros/latex/contrib/standalone/standalone.pdf and the standalone package. I'm not sure I'll be able to do what I want with these. Each child document needs to stand on it's own, with it's own preamble, and table of contents, etc. But they should be included in a master document with a global table of contents that ignores/copies all preambles. * * * Below is example code for one of the children files.               \documentclass[11pt]{article}     \usepackage{amsmath, amsfonts,amssymb,latexsym, multirow}     \usepackage{fullpage, graphicx, subfig, float, hyperref, enumerate}     \usepackage[parfill]{parskip}     \usepackage{pdflscape}%for large figures     \usepackage{cancel}          \linespread{1.3}          \hypersetup{backref,           pdfpagemode=FullScreen,           colorlinks=true}          \renewcommand{\dag}{^\dagger}     \renewcommand{\d}{\text{d}}     \newcommand{\D}{\text{D}}     \newcommand{\bra}{\langle}     \newcommand{\ket}{\rangle}          \newcommand{\comment}[1]{}          \newcommand{\p}{\partial}     \newcommand{\eq}[1]{\begin{align*}#1\end{align*}}          \begin{document}          \noindent \fbox{     \begin{minipage}{6.4in}       \medskip       \textbf{Book} \hfill \textbf{Author}       \begin{center}         {\Large Chapter \#} \\[3mm]       \end{center}     \today \hfill Subauthor     \medskip     \end{minipage}     }          \bigskip     \tableofcontents     \newpage     \section{}     \subsection{}     \end{document}


title: Why does adjust box not resize to the dimensions given

text: Hi looking to understand this a little better. Why does `adjustbox` not resize the text in the following example so that it fits the dimensions I think I'm specifying. e.g a 4in x 4in box. Am I doing something wrong and how do I fix it?               \documentclass{article}     \usepackage{lipsum}      \usepackage{adjustbox}     \begin{document}     \begin{adjustbox}{frame,max height=4in,max width=4in}     \parbox{4in}{     \lipsum[1-3]}         \end{adjustbox}     \end{document}


title: Replacing axis labels with text in Tikz

text: I am plotting 11 points in a scatter plot in Matlab and replacing the x-axis labels 1 - 11 with strings using:               figure;     grid on; hold on; box on;     scatter(2:10,100*d1(1,:),'rs','filled');     scatter(2:10,100*d1(2,:),'bd','filled');     x1=[1 11];     y1=[0 0];     plot(x1,y1,'-k','LineWidth',1.0)     xlabel('Specimen ID');     ylabel('Percentage Difference');     YTick     legend('(+) Direction','(-) Direction','Location','SouthEast');     ylim([-30 30]);     xlim([1 11]);     set(gca,'XTickLabel',{' ','T0','T1B','T2B','T2A','T1A','T3A','T4A','T3B','T4B',' '});     matlab2tikz('PT_force_pd.tikz','width','\pdfw','height','\pdfh','showInfo',false);      I then convert this to a tikz file using matlab2tikz and include it in my latex file. However, the figures now have the numbers 1- 11 on the x-axis as opposed to the string labels I changed them to.               % This file was created by matlab2tikz v0.2.1.     % Copyright (c) 2008--2012, Nico Schlömer <nico.schloemer@gmail.com>     % All rights reserved.     %      %      %      \begin{tikzpicture}          \begin{axis}[%     view={0}{90},     width=\pdfw,     height=\pdfh,     scale only axis,     xmin=1, xmax=11,     xlabel={Specimen ID},     xmajorgrids,     ymin=-30, ymax=30,     ylabel={Percentage Difference},     ymajorgrids,     legend style={at={(0.97,0.03)},anchor=south east,nodes=right}]     \addplot[only marks,mark=square*,color=red] plot coordinates{ (2,2.78639981453257) (3,2.31842963017684) (4,1.14947398221063) (5,7.25340115482997) (6,2.98493302062099) (7,3.26884390452601) (8,14.1539557488726) (9,-0.960290460549314) (10,12.0273779126074) };          \addlegendentry{(+) Direction};          \addplot[only marks,mark=diamond*,color=blue] plot coordinates{ (2,1.38095764618068) (3,5.36378212382794) (4,7.89091352246246) (5,-2.71084599057245) (6,-4.93480585024889) (7,-9.94728428423853) (8,17.0552754021373) (9,2.64843195399426) (10,18.7448964435552) };          \addlegendentry{(-) Direction};          \addplot [     color=black,     solid,     line width=1.0pt,     forget plot     ]     coordinates{      (1,0)(11,0)      };     \end{axis}     \end{tikzpicture}%      Does anyone know how to solve this, or even a way to manually change the tikz axis labels to text?


title: Split a beamer frame in four equal parts

text: > **Possible Duplicate:**   >  What is the best way of arranging multiple minipages on a page? I want to split a beamer frame in four equal parts. Each of these parts will have a border around it and will contain different things (itemized list in one part, a table in another, an image in the third, etc.) I should be able to control vertical and horizontal alignment of content in each part, e.g. Itemized list should be top and left aligned, table should be center aligned vertically and horizontally, etc. I thought of using columns. But could not get what I wanted. Can what I am aiming at be achieved? How? Here is the MWE:               \documentclass[xcolor=dvipsnames,english,professionalfonts,smaller,handout]{beamer}                                                                                \usetheme{Madrid}     \usecolortheme[named=Black]{structure}          \usepackage{booktabs}          \begin{document}          \begin{frame}{Slide1}         \begin{columns}[onlytextwidth]             \begin{column}{.45\textwidth}                 \begin{itemize}                     \item   One                      \item   Two                  \end{itemize}                 \begin{tabular*}{\textwidth}{l l}                     A & B \\ \midrule                     A & B \\ \midrule                     A & B \\ \bottomrule                 \end{tabular*}             \end{column}                  \begin{column}{.45\textwidth}                 \begin{itemize}                     \item   One                      \item   Two                  \end{itemize}                 \begin{tabular*}{\textwidth}{l l}                     A & B \\ \midrule                     A & B \\ \midrule                     A & B \\ \bottomrule                 \end{tabular*}             \end{column}         \end{columns}     \end{frame}          \end{document}      I could split into two columns but I am unable to get the control on placement I need.


title: Uppercase word in glossary, lowercase in text

text: Is it possible to write a word in uppercase in the glossaries but in lowercase in the text? I could use `\glslink` instead of `\gls`, but is there no better solution? Here is an example to clarify what I want:               \documentclass[a4paper]{article}          \usepackage{hyperref}     \usepackage{glossaries}          \makeglossaries     \newglossaryentry{lowercase}{name={lowercase}, description={In the glossary, this word should be capitalized}}     \newglossaryentry{uppercase}{name={Uppercase}, description={This word is capitalized}}          \begin{document}          Should both be lowercase: \gls{lowercase}, \gls{uppercase}.          Workaround: \gls{lowercase}, \glslink{uppercase}{uppercase}.          \printglossaries          \end{document}      This yields:               Should both be lowercase: lowercase, Uppercase.     Workaround: lowercase, uppercase.           Glossary     lowercase In the glossary, this word should be capitalized. 1     Uppercase This word is capitalized. 1


title: media9 playPause behaviour inconsistent for embedded mp4 and swf

text: I'm trying to embed a video in my thesis using the `media9` package and have found that the behaviour of the mediacommand `playPause` changes depending on whether the embedded file is a swf or mp4 format. For an SWF file the video is only paused when the mouse-button is _held down_ while for an MP4 file a _single_ mouse-click pauses the video. Does anyone know why the behaviour is different and what I need to do to get the mp4 behaviour for SWF files? (I realise that the obvious answer is to convert my SWF file to MP4 however I have spent the better part of 6 hrs trying to do that. Although I can convert the file using `ffmpeg`, for some reason it doesn't display once embedded even though the example file included with `media9` does.) A MWE showing the difference in behaviour is as follows. Note that I'm using MiKTeX 2.9, pdfTeX and TeXnicCenter all (re)installed a couple of weeks ago. * * *               \documentclass{article}     \usepackage{media9}     \usepackage[english]{babel}          \begin{document}          \includemedia[label=test,addresource=contours.swf,activate=pagevisible,                   width=9cm,height=10cm,flashvars={source=test.swf&autoPlay=true&loop=true}]                   {}{contours.swf}     \mediabutton[mediacommand=test:playPause]{\fbox{Play/Pause}}          \includemedia[label=random,addresource=random.mp4,activate=pagevisible,                   width=9cm,height=10cm,flashvars={source=random.mp4&autoPlay=true&loop=true}]                   {}{VPlayer.swf}     \mediabutton[mediacommand=random:playPause]{\fbox{Play/Pause}}          \end{document}      * * * The above contours.swf file may be accessed at this link. Any help will be greatly appreciated.


title: Tables as PDF images

text: Due to time constraints I'm considering cheating a little and importing some tables I've created in Excel into my latex document. I realise I can do this quite nicely as a 'figure' using something like the following,               \begin{figure} [t]     \centering     \includegraphics[width=\textwidth,scale=1]{abc}     \caption{Plot of Testing Time Frame vs Gross Profit/.Total Commission.}     \label{fig:abc}     \end{figure}      However, obviously this is now recognised as a figure... and appears in my list of figures rather than my list of tables. Question, is there a way of doing this but for the PDF image imported to be recognised and labelled as a table?


title: How do I use the IEEE bibliography commands?

text: I'm trying to layout a short article using the IEEE latex style guide. I'm having difficulty with the final part of their bibliography instructions as I want to reference an external `.bib` file. I have the `IEEEtran.cls` file and `IEEEtran.bst` file in my local folder.               \bibliographystyle{IEEEtran}     % argument is your BibTeX string definitions and bibliography database(s)     \bibliography{IEEEabrv,../bib/paper}      What are 'string definitions'? I presume the bibliography database is the specific file I want to reference, which in my case is `../../references`


title: How do I get colorized syntax highlighted code in pdfLaTeX

text: I'd like to get syntax highlighted code in LaTeX, but want to preserve the monospaced font (no curly quotes either). pygments doesn't seem to have an option to avoid curly quotes that I could find. Edit:               \mint{python}|'banana'|      Produces curly single quotes.


title: \newcommand: How to determine if in math mode (and then include $ $)?

text: I would like to define a new command which should determine (within a tikz plot) whether its argument is in math mode or not. If so, it should wrap the argument with $ $. I found \ifmode to do this, but it's not working. Here is my minimal example:               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage[american,ngerman]{babel}     \usepackage{tikz}          \newcommand*{\yellowemph}[1]{%       \tikz[baseline=(text.base)]\node(text)[rectangle, fill=yellow, rounded     corners, inner sep=0.3mm]{\ifmmode $#1$\else #1\fi};%     }          \begin{document}     \yellowemph{word}% works     \yellowemph{$\frac{1}{2}$}% works     $\yellowemph{\frac{1}{2}}$% does not work     \end{document}      I am aware of `\ensuremath`, however, this _always_ switches to math mode. I would like to keep text as is if not in math mode (see `\yellowemph{word}` for example). **SOLUTION** As posted below, this is a solution:               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage[american,ngerman]{babel}     \usepackage{tikz}          \newif\ifstartedinmathmode     \newcommand*{\yellowemph}[1]{%       \relax\ifmmode\startedinmathmodetrue\else\startedinmathmodefalse\fi       \tikz[baseline=(text.base)]\node(text)[rectangle, fill=yellow, rounded     corners, inner sep=0.3mm]       {\ifstartedinmathmode$#1$\else#1\fi};%     }          \begin{document}     \yellowemph{word}     $\int_0^\infty f(\yellowemph{x})\,dx$     \yellowemph{$\displaystyle\frac{1}{2}$}     \end{document}


title: Rotate a placetable/placefigure plus caption in ConTeXt?

text: I've a large table, which I want to rotate to fit onto one page. My current solution looks like:               \placetable{some text}     {\rotate[rotation=90]{       \starttable[...]            ....       \stoptable}}      But unfortunately this way only the table itself is rotate, not the caption. Instead I want the table across the page to be in "landscape", whereas the header and footer won't be rotated. Something like:               \rotate[rotation=90]{       \placetable{some text}       {\starttable[...]             ....        \stoptable}}      such that the caption is rotated to and "under" the table (if the page is rotated to landscape in the viewer). Update:   * example file with Taco Hoekwater's solution: https://gist.github.com/1034341   * now header and footer is missing. Any ideas?


title: two questions about amsart

text: If I'm writting a mathematical paper and I'm using               \documentclass[a4paper,titlepage]{amsart}      on the first page there's the titel at the very top of the page. On the second page there's the authors name. How could I fix it, such that on every page there's the title at the very top of the page. second question is about the title. Is it possible to construct a subtitle which will not appear at the top on every page (see question 1). For completeness here's the template I used:                   \documentclass{amsart}          \newtheorem{theorem}{Theorem}[section]     \newtheorem{lemma}[theorem]{Lemma}          \theoremstyle{definition}     \newtheorem{definition}[theorem]{Definition}     \newtheorem{example}[theorem]{Example}     \newtheorem{xca}[theorem]{Exercise}          \theoremstyle{remark}     \newtheorem{remark}[theorem]{Remark}          \numberwithin{equation}{section}          \begin{document}          \title{}          %    Remove any unused author tags.          %    author one information     \author{}     \address{}     \curraddr{}     \email{}     \thanks{}          %    author two information     \author{}     \address{}     \curraddr{}     \email{}     \thanks{}          \subjclass[2000]{Primary }     %    For articles to be published after 1 January 2010, you may use     %    the following version:     %\subjclass[2010]{Primary }          \keywords{}          \date{}          \dedicatory{}          \begin{abstract}     \end{abstract}          \maketitle          \end{document}      The reason for question 2 is the following: I want a subtitle like: Thesis of {\author}. Is there a better template than this for this purpose? I'm very thankful for your help. cheers math Edit: As mbrok suggested, here's my code:                   documentclass[a4paper,titlepage,oneside]{amsart}              % \documentclass{amsart} says to use the AMS article document class.         % [12pt,oneside] says to use the 12pt and oneside options.         % If you don't want these options, just say \documentstyle{amsart}.              % After the document class declaration comes the preamble.         % The preamble begins here.                              \usepackage{amssymb}               \usepackage{amsmath}               \usepackage{amsthm}               \usepackage{amsfonts}               \usepackage[english]{babel}               \usepackage[utf8]{inputenc}               \usepackage{enumerate}               \usepackage{graphicx}                 % Next we use \newtheorem to specify our theorem-like environments            % (theorem, definition, etc.) and how to display and number them.            %            % Note: The \theoremstyle declarations affect the appearance of the            % Theorems, Definitions, etc.                    \theoremstyle{plain}               \newtheorem{theorem}{Theorem}[section]               \newtheorem{lemma}[theorem]{Lemma}               \newtheorem{corollary}[theorem]{Corollary}               \newtheorem*{claim}{Claim}               \theoremstyle{definition}               \newtheorem{definition}[theorem]{Definition}                    \theoremstyle{remark}               \newtheorem{remark}[theorem]{Remark}                 % The preamble is also a good place to define new commands and macros.            % This part of the preamble is strictly optional according to your taste.                    \newcommand{\R}{{\mathbb R}}               \newcommand{\nil}{\varnothing}               \newcommand{\N}{{\mathbb N}}               \newcommand{\A}{{\marhcal A}}                 % The following mysterious maneuver gets rid of AMS junk at the top            % and bottom of the first page.                    \makeatletter               \def\@setcopyright{}               \def\serieslogo@{}               \makeatother                   % This ends the preamble.  We now proceed to the document itself.                    \begin{document}                   % First we specify the top matter (author, title, etc).         %         % Note: All of the top matter items are optional and can be omitted.         % But you will probably want to specify at least the author and title         % and perhaps an abstract.                 % author information                 % first author                  \author{}      %      \address{}            \email{}                 % second author                 %\author{}                 % the address where the research was carried out            % \address{}                 % current address, usually not needed because it is the same as the            % regular address                 % \email{}                 % title                                     \title{}            \xdef\shorttitle{\shorttitle{}}                      % Note that the short title for running heads goes in square            % brackets.  This is optional.  The long title goes in curly            % braces.  In the long title, line breaks are indicated by \\.                 % abstract (optional)            \begin{abstract}                 \end{abstract}                 % AMS subject classifications (used in AMS journals)            \subjclass[2010]{Primary 46N30; Secondary 46E30,54D30}                 % AMS keywords (used in AMS journals)            \keywords{}                 % acknowledge support, etc            % \thanks{This research was partially supported by NSF grant            %  DOA-123456789.}            % \thanks{We would like to thank our colleagues for their helpful            %  criticism.}                 % dedication            \dedicatory{}                 % today's date, or fill in whatever date you prefer            \date{\today}              % This ends the top matter information.         % We can now tell LaTeX to display the top matter.                 \maketitle              % Having displayed the top matter, we now proceed to the body of the         % article.              % The body of the article is divided into sections.         % Each section begins with a \section command.              \tableofcontents         \newpage            \section{Introduction}


title: Do I need fontenc and inputenc

text: My question feels like a duplicate of: fontenc vs inputenc, but in that question the OP uses German and non-ascii characters. I speak and write in English exclusively. My keyboard is the standard en-GB layout making typing non-ascii characters difficult. I use `latex` and not `xetex`. My LateX files are 100% ascii. Every once in a while a citation I download into my `.bib` file contains a non-ascii character, but I have never had an issues "fixing" these. Do I need, or would I benefit from using, the `fontenc` and `inputenc` packages?


title: EPS figure not showing up in PDF file (TeXnicCenter)

text: I am using TeXnicCenter as the editor. The problem I am having is that figures don't show up in the PDF file created. It leaves a blank space in place of figure and caption is showing up below the blank space. I am using the following packages and code:               \documentclass[12pt, onecolumn]{article}     \special{papersize=8.5in,11in}     \documentclass[12pt, onecolumn]{IEEEtran}     \usepackage[dvips]{epsfig}     \usepackage{natbib,url,comment}     \usepackage{subfigure}          \usepackage{graphicx, amsfonts,amssymb,amsmath}     \usepackage{amsmath,amssymb,amsfonts}     \usepackage{algorithmic}     \usepackage{algorithm}           \begin{document}     \begin{figure}[ht!]     \subfigure{         \begin{minipage}[h]{0.44\textwidth}         \centerline{\epsfig{file=figure_4a.eps,height=2.75in,width=2.75in}}         \label{er_1}         \end{minipage}}         \hfill     \subfigure{         \begin{minipage}[h]{0.44\textwidth}         \centerline{\epsfig{file=Fig_4b.eps,height=2.75in,width=2.75in}}         \label{er_2}         \end{minipage}}\\         \hfill         \centering         \caption{it is the caption of figure 4}     \end{figure}     \end{document}      I am not getting any errors or warnings.


title: Are there any programs that will attempt to preprocess simple LaTeX?

text: I find myself in the awkward, although apparently not uncommon, position of being ordered to write, or at least end up with, documentation in the Word format. I don't have anything that fancy in my LaTeX source file save the title page, which I don't particularly care about. I do however make extensive use of the logical markup capabilities of LaTeX, using things like `\servername#1` and `\ipaddress#1` and acronyms using the `acro` package. I have no figures that I'm not willing to export with `standalone` and no fancy `minipage` action going on --- just straight LaTeX. Pandoc seemed to be my best bet, but it simply skipped/stripped my custom commands (`\servername`, things from `acro`) from the document completely. It would be a decent solution if this were not the case. Does there exist a preprocessor that will attempt to expand macro definitions into their appropriate 'base calls'? (I'm talking about things like `\def\servername#1{\texttt{#1}}`). For example,               \documentclass{article}     \newcommand{\servername}[1]{\texttt{#1}}     \begin{document}     Hi!  My server is \servername{localhost}.     \end{document}      is converted to               \documentclass{article}     \begin{document}     Hi!  My server is \texttt{localhost}.     \end{document}


title: Help with math symbols in BibTeX

text: I am writing a PhD thesis using LaTeX. Every thing is going fine, but I have problem with the output of the mathematical symbols in the references lists. I copy one example from the Pdf file to make it clear for you. You can see that the fraction remains the same. > [1] Mezzacapo, F. and Cirac, J. I. (2010) Ground-state properties of the > spin-`\frac{1}{2}` antiferromagnetic Heisenberg model on the triangular > lattice: a variational study based on entangled-plaquette states. New. J. > Phys., 12, 103039. You can see below the all the packages I use:               \documentclass[12pt,PhD,twoside,a4paper]{GB_muthesis}%[10pt,PhD, singlespace]     \usepackage[pdftex]{graphicx}     \usepackage[bookmarks=true,colorlinks=true,linkcolor=blue,     urlcolor=blue,citecolor=blue]{hyperref}     \usepackage[numbers,comma, sort&compress]{natbib}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{mathtools}     \usepackage{rotating}     %\usepackage{GE_manthesis}     \usepackage{GB_thesis}     \usepackage{bm}     \usepackage{fmtcount}     \usepackage{setspace}     \usepackage{chapterbib}     \usepackage{subfigure}% allow subfigures     \usepackage{amsfonts}     \usepackage{url, enumitem}     \usepackage{lscape}     \usepackage{notoccite}%This package is for ingnoring the citation in the caption of the figures and tables.     \begin{document}


title: "Undefined control sequence" error when compiling bibliography with math symbols in the title

text: I am writing a paper/report using a LaTex template which uses document class `scrreprt` and `natbib` as its bibliography package. However, I'm having trouble with one of my citations which has a math symbol and a greek letter in its title: `0 hr {\lt}= {$\alpha$} {\lt}= 4hr`, and `LaTex-BibTex-LaTex-LaTex` always gives me an error about the `.bbl` file: `15: Undefined control sequence.` However, I don't have any error if I remove this part from the title. So what is going wrong?


title: Margin notes, multicols, tikz overlay

text: As seen on page 200 of pgf manual is there a way to put notes in the margin but on the same level as the place it is called ? One can deal with the right-left positionning with the help of this question margin notes multicolumn, but how to deal with up-down level ? **Edit** With your help, here is my try. Still vertical alignement problem.               \documentclass[french]{article}     \usepackage[marginparsep=3pt, top=2cm, bottom=1.5cm, left=1.5cm, right=1.5cm]{geometry}     \setlength{\parindent}{0pt}     \setlength{\headsep}{1em}     \usepackage{tikz,lipsum}     \usepackage{multicol,zref-savepos}          \def\Note#1{%     \zsavepos{#1}%     %%%%%%--------     \ifnum20000000<\number\zposx{#1}%         \begin{tikzpicture}[remember picture,overlay]         \coordinate (here) at (0,0);         \draw (current page.east |- here)                 node[left]{\makebox[1.2cm][l]{#1}};         \end{tikzpicture}%to prevent adding extra space before text     \else         \begin{tikzpicture}[remember picture,overlay]         \coordinate (here) at (0,0);         \draw (current page.west |- here)                 node[right]{\makebox[1.2cm][r]{#1}};         \end{tikzpicture}%to prevent adding extra space before text     \fi%     \ignorespaces     }          \begin{document}     \begin{multicols}{2}          \lipsum[1]          Un essai de note dans la colonne de gauche.\hfill\Note{1pt}          \lipsum[2-3]          \Note{1.5pt} Un essai de note dans la colonne de droite.     \lipsum[4-5]     \end{multicols}          \end{document}      ![enter image description here](http://i.stack.imgur.com/kAKVu.png)


title: Representing Hasse diagram of the Green order

text: I need to represent graphs like the one below using xypics. They arise as the Hasse diagram of the Green order of finite semigroups (specifically finite Left Regular Bands) with the homomorphism to its support lattice. I know the very basics on how to draw lines and place points, but I don't know how one would draw ovaloids around a mass of points like in the image below. Also, I'd rather them not being ellipses. Thank you for your time! ![Screen shot](http://i.imgur.com/i88qEAz.jpg)


title: String list in tikz foreach

text: I'm trying to draw some repeated with PGF/Tikz, and I'm using a `foreach`. Problem: each line has, on the right, a description, which is a string of text - which may be somewhat long and contain commas or math expressions. How can I create a list of strings, iterating over it and use each string as node text?


title: What to do when AMS and MnSymbol packages conflict on an arrow?

text: I need to use two arrows, one from MnSymbol and one from amssymb (`\rightsquigarrow`); unfortunately, MnSymbol redefines this command to produce its own version (which I don't want). Is there a way to redefine back the AMS arrow? Placing the MnSymbol package to load before the AMS one does not work and the answer to this question (how to use MnSymbol along with other packages) says the two packages are incompatible. I can't find the MnSymbol arrow anywhere else (`\leftpitchfork`).


title: Problem with brackets

text: I need to get `{}`. So what is wrong with the command `$ \left\lbrace \left\rbrace $` ?


title: Revisiting producing structured PDFs from LaTeX

text: I am trying to produce a structured or 'tagged' PDF from pdftex (Tex Live 2013) that passes automated tests in Adobe Acrobat for tagging. These tests are the _de facto_ indicator for a document accessibility, which are often required by universities, government agencies and others worldwide for published documents. To test a document for accessibility / tagging, try this:   1. Open the PDF in Acrobat Reader   2. 'file -> 'document properties' -> 'Description'   3. under 'advanced', you'll see a field, 'tagged pdf'. Ideally it should say 'yes'. But it doesn't :( ![enter image description here](http://i.stack.imgur.com/yRvC7.png) **Question** : does anyone know of any way to create a PDF which passes Acrobat's 'Tagged PDF' test directly from LaTeX? The ideal solution would be a package or two that can be called from the preamble of a latex document. I want something that is very low effort for the author, and can thus be very easily integrated with existing workflows. **Note** : There has been discussion about this in the past (see tags and links on the right), but as of May 2014, there was no clear solution to this. Much of the existing discussion is from 2012 or earlier (see How to create tagged PDF?), and so I'd like to see if we can kick-start this discussion. **Why this isn't a duplicate question** : When I first posted this question in July 2013, it was flagged as a duplicate of a question from 2010. The answer references a presentation given at at TUG 2010. That presentation basically says "we're working on it", and is not an answer that allows me to implement a solution. Because it is now 2014, I think it reasonable to expect that:   1. There have been new developments in this field through new packages or updates to core LaTeX   2. Attempting to comply with Section 508 will have required that people figure out solutions. This is a relatively recent requirement and so solutions may have changed since 2010   3. The software that is typically used to judge compliance (Adobe Acrobat) has changed several times since the question was not answered   4. Packages that address accessibility have been proposed but not come in to widespread use or even disappeared (e.g. the accessibility package, http://www.babs.gmxhome.de/da_ergeb.htm), and it is therefore reasonable to revisit this issue with fresh eyes.


title: Why isn't LaTeX centering with the geometry package in use

text: I am messing around with LaTeX and I am trying to center a title at the top of a legal sized sheet of paper with margins at .25 inch. I can't get the title to center with a center environment `\centering` or `\centerline`. If I remove the `geometry` package, the output is as expected. What am I doing wrong?               \documentclass[10pt,legalpaper]{report}          \usepackage[margin=.25in,text={8in,13.5in},centering]{geometry}          \begin{document}          \begin{center}     ARIZONA PRELIMINARY TWENTY DAY NOTICE \newline      IN ACCORDANCE WITH ARIZONA REVISED STATUTES SECTION 33-992.01  \newline     THIS IS NOT A LIEN AND IS NOT A REFLECTION ON THE INTEGRITY OF ANY CONTRACTOR OR          SUBCONTRACTOR      \end{center}     \end{document}


title: Table with Tabu & siunitx not working

text: I am trying to make a table with tabu and using the sunitx package to align and round the entries of my table. However I keep getting the following error: > ! siunitx error: "unknown-option" ! ! Unknown option 'm'. ! ! See the > siunitx documentation for further information. My MNWE (minimal not-working example)               \documentclass[a4paper]{scrreprt}                  \usepackage{siunitx,booktabs}     \usepackage{tabu}     \usepackage[]{xcolor}          \begin{document}     \newcolumntype Z{ XS[m,      tight-spacing=true,round-mode=places,                               round-precision=2] }     \begin{table}      \centering      \small     \caption{Caption}\label{tab:exAll}     \begin{tabu}{X[m,l] ZZZZZZZZ}       \toprule     {}&{A}&{B}&{C}&{D}&{E}&{F}&{G}&{H}\\     \midrule     case 1&0.038941&    10.793553&  10.793553&  2.660292&   5.364928&   0.287945&   4.950661&   1.017396\\     case 2&0.051109&    10.416524&10.416524&    2.699890&5.236410&  0.348350&   5.528117&   0.835394\\     case 3&0.042755&    11.165675&11.165675&    2.845072&   6.585281&   0.279750&   5.059948&   0.920121\\     case 4&0.043165&    10.820561   &10.820561& 2.708484&   5.250033&   0.291793&   4.661221&   0.879731\\     case 5&0.042951&13.764616&13.764616&    2.643305&   5.608317&   0.278537&   5.080898&   0.871181\\     case 6&0.042078&    10.909180   &10.909180& 2.568346&   5.198260&   0.311224&   4.724302&   0.862366\\     \bottomrule     \end{tabu}     \end{table}          \end{document}      How can I solve this problem? I looked at similar questions here on tex.se but those didn't help me. I hope I am not overlooking something very simple.


title: Private installation/update of TikZ in Linux

text: I'd like to make a private installation in Linux of (part of) TikZ, in order to be able to `\usetikzlibrary{decorations.markings}` (note that I cannot update my TeX distrubution, which has already a basic version of TikZ). I know some info is here, but I'd like a simple string of shell commands; also I'd like to know how much space this would take. Up to now, I've done `mkdir ~/texmf`.


title: Replacing text using regular expression before compilation without texteditor

text: I would like to replace some text (no commands) which are included in my tex- file with some certain string. This shall happen (if possible) without modifying the actual source file. Therefore, I don't want to use some bash/shell script or text-editor replacing function. Is there any command/toolbox which does this? I have seen that there is an package called `l3regex`, unfortunately I don't know how to use the tex commands and I don't even know whether this a suitable package for this. Sorry for being imprecise. Here an example.               \documentclass{article}       \theUltraCoolRegExpTool{oldRegexp}{newRegexp}     \begin{document}            \include{file1.tex}     \include{file2.tex}          This here is very long text which also has some formulas $a_{ij} = b*x^2$.          \end{document}        And here, I e.g. want to replace using a regular expression `a_{ij}` by `X^{ij}`. Or maybe some other text in the included files.


title: Head style and Contenst problem

text: I have two problems in one. I am writing my thesis using the package `fancyhdr`, and all my chapters look great. However I have to add some parts, which are not chapter but I would like to have the title as one. The problem is my results do not look like as I expected. All chapters look like: ![enter image description here](http://i.stack.imgur.com/o6fFV.jpg) So my idea is that no-chapter parts should look like: ![enter image description here](http://i.stack.imgur.com/TvEdP.jpg) But in real they look like: ![enter image description here](http://i.stack.imgur.com/b9RmF.jpg) and it gets worse, because my Contents looks awful. ![enter image description here](http://i.stack.imgur.com/7VmxH.jpg) I am using this preamble for the style of my heading.               \fancyhead{} \fancyhead[]{}          \fancyhead[RE]{\scriptsize\leftmark}          \fancyhead[LO]{\scriptsize\rightmark}\fancyhead[LE,RO]{\thepage}          \fancyfoot[]{}               And in the none-Chapter part I wrote               \renewcommand{\chaptername}{}          %\renewcommand\chaptername{\fontsize{50}{50}\selectfont\Large{Curriculum Vitae}}          \renewcommand\thechapter{\fontsize{30}{30}\selectfont\Huge{Curriculum Vitae}}      I was trying too many solutions posted here, but none of those work for me. If I use `\chaptername` instead of `\thecapter` (which I know is the chapter number), the nice rectangle frame becomes into a line. if I use just `\chapter` no eve a line is generate and it is equivalent if I use `\chapter*{}`. I know the problem in the contents is because the `\fontsize` and the `\selectfont`, but those are the size which give me a properly size in the title. Does anybody knows what to do? I would really appreciate any help. If you need to know my preamble it is here Regards, Flavia


title: How to begin a multiplepage ToC on the left and to insert blank pages around it

text: I use this the `article` class (I prefer to stick to this one for compatibility), in twoside mode with a toc taking two pages (but it would be better if the code copes with an arbitrary number of pages). I want to have   * the title page (page style empty)   * blank page (page style empty)   * the summary (page style empty)   * the acknowledgement (page style empty) (I do not want the acknowledgement on the same page as the summary, but only on the recto)   * the blank page (page style empty)(I do not want the acknowledgement facing the toc)   * the toc p1 (page style empty)   * the toc p2 (page style empty)   * blank page(s) (page style empty) in order to make the first section start on the left, and such that the first page of the first section is not the recto of the last page of the ToC   * the first section Normally, the toc begins on a left page (in book view) but my MWE shows it does not. I attempt to introduce blank pages but `\newpage` is not effective.               \documentclass[twoside, a4paper, 12pt]{article}          \usepackage{lipsum}          \makeatletter     \renewcommand\tableofcontents{%     \thispagestyle{empty}     \small         \section*{\contentsname             \@mkboth{\MakeUppercase\contentsname}                     {\MakeUppercase\contentsname}}%         \@starttoc{toc}     \thispagestyle{empty}     }%     \makeatother          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \begin{document}          \thispagestyle{empty}     \begin{title}     Title     \end{title}          \cleardoublepage     %\thispagestyle{empty}     %\clearpage     %\newpage               \newenvironment{mysum}     {     %\clearpage     \thispagestyle{empty}     \null\vfill     \begin{center}     \rmfamily\bfseries\scshape\selectfont Summary\end{center}     }     {\vfill\null}     \begin{mysum}     My summary.     \end{mysum}               \clearpage          \newenvironment{myack}     {     %\clearpage     \thispagestyle{empty}     \null\vfill     \begin{center}     \rmfamily\bfseries\scshape\selectfont Acknowledgements\end{center}     }     {\vfill\null}     \begin{myack}     \begin{center}     We thank you.     \end{center}     \end{myack}          \cleardoublepage     \newpage               \tableofcontents               \cleardoublepage          \pagenumbering{arabic}     \normalfont     \normalsize                                                       \section{first section}          \lipsum[1-3]     \subsection{first subsection of the first section}     \lipsum[1-3]     \subsection{second subsection of the first section}          \lipsum[1-3]     \subsection{third subsection of the first section}     \lipsum[1-11]          \section{second section}     \lipsum[1-11]     \subsection{first subsection of the second section}     \lipsum[1-3]          \subsection{second subsection of the second section}          \lipsum[1-11]     \subsection{third subsection of the second section}     \lipsum[1-11]               \section{third section}     %\lipsum[1-3]     \subsection{first subsection of the third section}          \lipsum[1-3]          \subsection{second subsection of the third section}          \lipsum[1-3]     \subsection{third subsection of the third section}     \lipsum[1-11]          \subsection{first subsection of the third section}          \lipsum[1-3]          \subsection{second subsection of the third section}          \lipsum[1-22]     \subsection{third subsection of the third section}     \lipsum[1-11]               \subsection{first subsection of the third section}          \lipsum[1-22]          \subsection{second subsection of the third section}          \lipsum[1-22]     \subsection{third subsection of the third section}     \lipsum[1-11]                                             \section{first section}          \subsection{third subsection of the third section}     \lipsum[1-11]          \subsection{first subsection of the third section}          \lipsum[1-3]          \subsection{second subsection of the third section}          \lipsum[1-22]     \subsection{third subsection of the third section}     \lipsum[1-11]               \subsection{first subsection of the third section}          \lipsum[1-22]          \subsection{second subsection of the third section}          \lipsum[1-22]     \subsection{third subsection of the third section}     \lipsum[1-11]                         \section{third section}     %\lipsum[1-3]     \subsection{third subsection of the third section}     \lipsum[1-11]          \subsection{first subsection of the third section}          \lipsum[1-3]          \subsection{second subsection of the third section}          \lipsum[1-22]     \subsection{third subsection of the third section}     \lipsum[1-11]               \subsection{first subsection of the third section}          \lipsum[1-22]          \subsection{second subsection of the third section}          \lipsum[1-22]     \subsection{third subsection of the third section}     \lipsum[1-11]                    \subsection{first subsection of the third section}          \lipsum[1-22]          \subsection{second subsection of the third section}          \lipsum[1-22]     \subsection{third subsection of the third section}     \lipsum[1-11]               \subsection{first subsection of the third section}          \lipsum[1-22]          \subsection{second subsection of the third section}          \lipsum[1-22]     \subsection{third subsection of the third section}     \lipsum[1-11]                         \section{first section}          \lipsum[1-3]     \subsection{first subsection of the first section}     \lipsum[1-3]     \subsection{second subsection of the first section}          \lipsum[1-3]     \subsection{third subsection of the first section}     \lipsum[1-11]          \subsection{first subsection of the third section}          \lipsum[1-22]          \subsection{second subsection of the third section}          \lipsum[1-22]     \subsection{third subsection of the third section}     \lipsum[1-11]          \subsection{first subsection of the third section}          \lipsum[1-22]          \subsection{second subsection of the third section}          \lipsum[1-22]     \subsection{third subsection of the third section}     \lipsum[1-11]                    \section{second section}     \lipsum[1-11]     \subsection{first subsection of the second section}     \lipsum[1-3]          \subsection{second subsection of the second section}          \lipsum[1-11]     \subsection{third subsection of the second section}     \lipsum[1-11]               \section{third section}     %\lipsum[1-3]     \subsection{first subsection of the third section}          \lipsum[1-3]          \subsection{second subsection of the third section}          \lipsum[1-3]     \subsection{third subsection of the third section}     \lipsum[1-11]                                             \section{first section}          \lipsum[1-3]     \subsection{first subsection of the first section}     \lipsum[1-3]     \subsection{second subsection of the first section}          \lipsum[1-3]     \subsection{third subsection of the first section}     \lipsum[1-11]          \section{second section}     \lipsum[1-11]     \subsection{first subsection of the second section}     \lipsum[1-3]          \subsection{second subsection of the second section}          \lipsum[1-11]     \subsection{third subsection of the second section}     \lipsum[1-11]          \end{document}


title: Type '{' '}' in url

text: I would like to type brace symbol inside a URL using the url or hyperref package. Is there a way to do that ? (the idea is to typeset REST-like URL, as for example,               http://foo.bar/orders{orderID}


title: \setcounter not working

text: I'm making a large table in latex with 12 columns. It is to be horizontal on its own page and to do so I am implementing it like:               \documentclass[twoside]{article}          \usepackage{pdflscape}          \usepackage[sc]{mathpazo} % Use the Palatino font     \usepackage[T1]{fontenc} % Use 8-bit encoding that has 256 glyphs     \linespread{1.05} % Line spacing - Palatino needs more space between lines     \usepackage{microtype} % Slightly tweak font spacing for aesthetics          \usepackage[hmarginratio=1:1,top=32mm,columnsep=20pt]{geometry} % Document margins     \usepackage{multicol} % Used for the two-column layout of the document     \usepackage[hang, small,labelfont=bf,up,textfont=it,up]{caption} % Custom captions under/above floats in tables or figures     \usepackage{booktabs} % Horizontal rules in tables     \usepackage{float} % Required for tables and figures in the multi-column environment - they need to be placed in specific locations with the [H] (e.g. \begin{table}[H])     \usepackage{hyperref} % For hyperlinks in the PDF          \usepackage{lettrine} % The lettrine is the first enlarged letter at the beginning of the text     \usepackage{paralist} % Used for the compactitem environment which makes bullet points with less space between them          \usepackage{epsfig}     \usepackage{amsmath}          \usepackage{adjustbox}          \usepackage{abstract} % Allows abstract customization     \renewcommand{\abstractnamefont}{\normalfont\bfseries} % Set the "Abstract" text to bold     \renewcommand{\abstracttextfont}{\normalfont\small\itshape} % Set the abstract itself to small italic text          \usepackage{titlesec} % Allows customization of titles     \renewcommand\thesection{\Roman{section}} % Roman numerals for the sections     \renewcommand\thesubsection{\Roman{subsection}} % Roman numerals for subsections     \titleformat{\section}[block]{\large\scshape\centering}{\thesection.}{1em}{} % Change the look of the section titles     \titleformat{\subsection}[block]{\large}{\thesubsection.}{1em}{} % Change the look of the section titles               \setcounter{MaxMatrixCols}{15}     \setcounter{secnumdepth}{5}          %----------------------------------------------------------------------------------------     %   TITLE SECTION     %----------------------------------------------------------------------------------------          \title{title} % Article title                    %----------------------------------------------------------------------------------------          \begin{document}               \begin{landscape}          \begin{table}[H]          \begin{adjustbox}{center}     \scriptsize     \begin{tabular}{|c||c|c|c|c|c|c|c|c|c|c|c|}          %table contents      1&2&3&4&5&6&7&8&9&10&11&12\\ %etc.     \end{tabular}     \end{adjustbox}     \end{table}               \end{landscape}          \end{document}      but got the error ! Extra alignment tab has been changed to \cr. \endtemplate (bizarrely only when I get to the second row of the table); I have triple- checked, there are the right amount of ampersands! When I reduced the number of columns to 10, however, it worked! But to increase the number of columns I have to do (following eg. How to create a matrix with 20 columns in latex)               \setcounter{MaxMatrixCols}{15}      which I do, but it doesn't work when I include all 12 columns. It still returns the same error when it reaches the second row... Am I doing something wrong, missing a package etc.? EDIT: packages, preamble etc included..


title: Working with labels

text: I'm not quite sure what the problem is, so I'll just post a MWE:               \documentclass{article}          \newcommand\twolabels[2]     {         \label{my:#1}         \label{my:#2}     }          \begin{document}     \twolabels{4}{a}     I have two labels: \ref{my:4} and \ref{my:a}.     \end{document}      Instead of referring me to 1 and 2, it gives me two ??'s. Where am I going wrong?


title: Put names on top of matrix

text: I am trying to produce 3 matrices on the same line. And on top of the each matrix, there is a name. I tried using `tabular` for the names and then I use `align` for the matrices. However, this creates some kind of space between the names and the matrices, which I do not want. Is there a better way to do this ? I have seen other posts but they do not seem to solve my problem. Please note that I need to use bordermatrix because I need to label the rows and columns as well.               \begin{center}     \begin{tabular}{ccc}     Kay & Brian &  Edwin \\     \end{tabular}     \end{center}     \begin{align*}     \bordermatrix{ & I & A \cr     I &1 & 2 \cr     A & 3 & 4     }      &     \bordermatrix{ & I & A \cr     I &5 & 6 \cr     A & 7 & 8     }      &     \bordermatrix{ & I & A \cr     I &9 & 10 \cr     A & 11 & 12     }      \end{align*}


title: Formatting raggedright in booktabs. Why am I getting a \noalign error?

text: I have a `\sidewaystable` that is also a `\threeparttable`. I'm trying to produce it using booktabs. In the shape columns there are words with more than 8 letters that TeX keeps hyphenating. The column widths have been set to their current values to ensure that the entire table fits on an A4 page. Whether or not I include the `\noalign{smallskip}` after the `\toprule` and `\midrule` I get the error:               ! Misplaced \cr.     \reserved@c ->\ifnum 0=`{}\fi \cr           l.34 \toprule                  \noalign{smallskip}     ?       Here is an example               \documentclass[12pt,a4paper,openleft,draft]{report}     \usepackage[lmargin=4.0cm, rmargin=2.5cm,tmargin=3cm,bmargin=2.5cm]{geometry}     \usepackage{natbib}     \usepackage{mathpazo}         \usepackage{overpic}     \usepackage[margin=10pt,font=small,labelfont=bf,labelsep=period,singlelinecheck=false]{caption}     \usepackage{threeparttable}     \usepackage{rotating}     \usepackage{units}     \usepackage{sectsty}     \usepackage{graphicx}     \usepackage{epstopdf}     \usepackage{setspace}     \usepackage{url}     \usepackage[english]{babel}     \usepackage{booktabs}     \usepackage{slantsc}     \usepackage{amsmath}     \usepackage{MnSymbol}     \usepackage{array}               \begin{document}          \begin{sidewaystable}[htp]     \begin{scriptsize}     \begin{center}     \caption{Key morphological characteristics}     \label{tab:cycadnmorph}     \begin{threeparttable}     \begin{tabular}     {>{\raggedright}p{3.05cm}>{\raggedright}p{0.6cm}>{\raggedright}p{1.5cm}>{\raggedright}p{2cm}>{\raggedright}p{1.75cm}>{\raggedright}p{1.75cm}>{\raggedright}p{0.25cm}>{\raggedright}p{2cm}>{\raggedright}p{1.5cm}>{\raggedright}p{1.75cm}>{\raggedright}p{1.75cm}}}     \tabularnewline     \toprule\noalign{smallskip}     &&C&&&&&H&&&\tabularnewline     \cmidrule{3-6}     \cmidrule{8-11}     Species&OTU\tnote{a}&Cells\tnote{b}&Shape&Length\tnote{c}&Width\tnote{c}&&Shape&(\%)\tnote{d}&Length\tnote{c}&Width\tnote{c}\tabularnewline     \midrule\noalign{smallskip}     \emph{species name}&A&number (min, max)&Shape&number (min, max)&number (min, max)&&Shape Bigshape biggershape&number (min, max)&number (min, max)&number (min, max)\tabularnewline     \emph{species name}&A&number (min, max)&Shape&number (min, max)&number (min, max)&&Shape Bigshape biggershape&number (min, max)&number (min, max)&number (min, max)\tabularnewline     \emph{species name}&A&number (min, max)&Shape&number (min, max)&number (min, max)&&Shape Bigshape biggershape&number (min, max)&number (min, max)&number (min, max)\tabularnewline     \emph{species name}&A&number (min, max)&Shape&number (min, max)&number (min, max)&&Shape Bigshape biggershape&number (min, max)&number (min, max)&number (min, max)\tabularnewline     \bottomrule     \end{tabular}     \begin{tablenotes}     \item [a] Data adapted.     \item [b] ND, no data.     \item [c] Accession numbers     \item[d] D     \end{tablenotes}     \end{threeparttable}     \end{center}     \end{scriptsize}     \end{sidewaystable}                    \end{document}


title: APS (phys rev) bibliography without URL link

text: Phys Rev journals offer direct BibTeX output for each paper e.g. as here that is very handy to just copy-paste in a BibTeX file:               @article{EXP_stack,       title = {Calculation of Multichannel Reactions in the Four-Nucleon System above Breakup Threshold},       author = {Deltuva, A. and Fonseca, A. C.},       journal = {Phys. Rev. Lett.},       volume = {113},       issue = {10},       pages = {102502},       numpages = {5},       year = {2014},       month = {Sep},       publisher = {American Physical Society},       doi = {10.1103/PhysRevLett.113.102502},       url = {http://link.aps.org/doi/10.1103/PhysRevLett.113.102502}     }      and when you cite it, it will appear e.g. as 26th entry: > [26] A. Deltuva and A. C. Fonseca, Phys. Rev. Lett. **113** , 102502 (2014), > URL http://link.aps.org/doi/ 10.1103/PhysRevLett.113.102502. This by default has also the URL at the end which is indeed very useful to include for easy access. But for the final version to submit, it should not have it. **Question** : How can I exclude the URL? Even when I get the `.bbl` file from BibTeX and copy-paste it at the end of LaTeX file, this remains. Obviously, I don't want to remove them by hand/sed/grep from my main BibTeX file. As a 99 % solution, I found that adding these lines               \def\urlprefix{}     \def\url#1{}      removes JUST the URL but the `,` and `.` remain so the output is: > [26] A. Deltuva and A. C. Fonseca, Phys. Rev. Lett. **113** , 102502 (2014), > . Any idea of a clean solution?               \documentclass[aps,prl,twocolumn]{revtex4-1}     \begin{document}     \title{Stack Question}     \author{John Smith}     \maketitle     How to cite now? \cite{EXP_stack}     \bibliography{stack}     \bibliographystyle{apsrev}     \end{document}


title: Code lost in tex file

text: I am writing my dissertation which is due on Friday, and previously today, I worked on it and closed down the file. I must have clicked something or done something wrong, because when I open the file now, it is empty. Or, it seems that it recognizes that there is some code, but it doesn't read it. The file size is also the same as it used to be. Can somebody please help me? The file is here: https://www.dropbox.com/s/7uytlbel96pqk92/Dissertation.tex?dl=0 My setup is a pc with MikTex and TexStudio as the editor.


title: Drawing pedigrees with PSTricks

text: I'm using a package called `pst-pdgr` which uses `PSTricks`. I have no prior experience with `PSTricks` but I am trying to read and understand as I go. However, I've run into a problem while compiling the pedigree: it doesn't render! I am following the documentation that came with `pst-pdgr`, but nothing I do--adding whatever packages I think are necessary (because the documentation doesn't go into much detail)--are fixing it. Here's MWE:               \documentclass[12pt]{article}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{pst-pdgr,pstricks,pst-pdf,graphicx}     \usepackage[top=2cm, left=2cm, bottom=2cm,right=2cm]{geometry}          \begin{document}          \begin{pspicture}(7,7)     \rput{0.5,1.5}{\pstPerson[affected,female]{A}}     \rput{0.5,1.5}{\pstPerson[male]{B}}     \pstRelationship[descentnode=AB]{A}{B}     \ncline{AB}{C}     \end{pspicture}           \end{document}      If anyone can point me in the right direction, I'd appreciate it.


title: Tracking changes

text: I'm writing a thesis using latex. My supervisor asked me to make few changes so, after checking this site, I found several solutions to track them, and finally decided to use the changes package. I sent him my document with more than 100 changes. He approved almost all them, and then he suggested several new ones.... and asked me to send a new document with ONLY the new changes. I know that using changes package I can use 'final' option to disable markup of changes, but my latex code still has all the \added{} \replaced{}{} and \deleted{}, so my question is: Is there any easy way to hide changes from revision 1, and show new ones I'll add now? EDIT: As suggested, I'm adding an example that shows what I've, and another one of what I'm looking for. This is what my first revised text may look like:               \documentclass{article}          \usepackage{changes}     % Example of what first revision may be          \begin{document}          This is \added{new} text.          This is \deleted{unnecessary}text.          This is \replaced{nice}{bad} text.           \end{document}      And this is what my second revised text I want to look like (of course, I don't want to manually remove the \added, \deleted, \replaced commands, just want the changes package to ignore them)               \documentclass{article}          \usepackage{changes}     % Example of what second revision should look like          \begin{document}          This is new text.          This is text.          This is nice text.           \added{This should be seen as a change in revision 2 of document}          \end{document}      So, if you compile both documents, you'll see what I want to achieve, but, obviously, without having to manually remove the \added, \deleted, \replaced commands. I'm using Miktex+Texmaker (windows port), and it defaults to pdflatex to compile. Thanks in advance


title: Formatting/searching special bibliographystyle using natbib package

text: I'm searching for a special bibliographystyle to meet the following requirements (I post one example): > LÜTKEPOHL H., KRÄTZIG M. (2004). > > _Applied Time Series Econometrics_. Cambridge University Press, Cambridge. So names should be in upper case; format: last name and then initials of first name (with or without a following dot), year in brackets (with or without a following dot), followed by a line-break, the titel should be displayed italic. I use the `natbib` package because I want to have author-year citation in the text (e.g. Lütkepohl and Krätzig (2004)), which is working fine already. By the way the entry in the reference list should begin directly with the last name of the author, i.e. without numbering or acronym in front (I think this will be achieved automatically by means of using the natbib package?). I'm using `\documentclass[a4paper]{article}` and JabRef as reference manager. Would be very happy if someone can help me! Thank you very much!


title: TikZ: Paling Effect

text: \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{patterns}          \def\cHeight{0.5}     \def\cWidth{4}     \newcommand{\cigarOne}[2]{         \pgfmathtruncatemacro\result{\cWidth/2}         \filldraw[pattern=north east lines] (#1,#2) rectangle (\result+#1,#2-\cHeight);         \filldraw[pattern=crosshatch dots] (\result+#1,#2) rectangle (#1+\cWidth,#2-\cHeight);     }          \begin{document}     \begin{tikzpicture}         \cigarOne{2}{5};     \end{tikzpicture}     \end{document}      The command `cigarOne` defines two filled rectangles, and I want one of them (the left one) to be "pale", kind of hardly visible rectangle.


title: Alignment of itemize/enumerate items in footnotes

text: In my document I am using the `footmisc` package (with `\usepackage[splitrule,hang]`) and the following appearance of my footnotes               \deffootnote[1cm]{1cm}{0cm}{\makebox[1cm][l]{\thefootnotemark}}      Now I have the following problem: I would like to use `itemize` and/or `enumerate` environments in footnotes. How do I achieve that the numbers and/or the bullet points are aligned with the beginning of the footnote text? It should look like this:                   1    text text text              1. first item              2. second item         2    text text text              -  first item              -  second item      OK, Here's a MWE:               % !TEX encoding = UTF-8 Unicode     % !TEX TS-program = xelatex          \documentclass[]{scrbook}     \usepackage[left=1cm, right=1cm, top=1.5cm, bottom=2cm]{geometry}     \usepackage{polyglossia}          \usepackage[splitrule,hang]{footmisc}          \setdefaultlanguage[variant=american]{english}          \setmainfont[Mapping=tex-text]{Times New Roman}     \setsansfont[Mapping=tex-text]{Arial}     \setmonofont[Mapping=tex-text]{Courier New}          \setlength{\parindent}{0cm}     \setlength{\parskip}{0.25cm}     \newcommand{\einzug}{1cm}          \deffootnote[\einzug]{\einzug}{0cm}{\makebox[\einzug][l]{\thefootnotemark}}          \begin{document}     Here the first paragraph begins. Here is the first footnote\footnote{Lorem ipsum      color sit amet, consectetuer adipiscing elit.\begin{enumerate}     \item Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis.     \item Curabitur dictum gravida mauris.     \end{enumerate}}. Here the first paragraph ends.          Here the second paragraph begins. Here is the second footnote\footnote{Nulla      alesuada porttitor diam.\begin{itemize}     \item Donec felis erat, congue non, volutpat at, tincidunt tristique, libero.     \item Vivamus viverra fermentum felis.     \end{itemize}}. And here the second paragraph ends.          If you look closely at the footnotes you will see that the item texts are not aligned      with the main footnote text right before them. I would like to see the      following: The numbers in the enumerate environments and the bullet points in the         itemize environments should be exactly aligned with the main footnote text      right before them!     \end{document}


title: Automated Newspaper Layout (with TeX and abroad)

text: **Update:** I'd like to revive (and revise) this question a bit because there have been some recent developments, and furthermore I would be happy to encourage some up-to-date discussion. I'm thinking (from a professional point of view) about fully automatic generation of newspapers from data. More precisely, the system under consideration would get **as input** an 'attributed' data stream of articles (subject classification, headers, author info &c, text, images) plus some hints on the way things should be layouted, but only on the level of "lead story", "short message", "weather report". **As output** , a complete newspaper would be generated automatically without further user interaction (with a focus on print, not online; i.e. PDF rather than HTML). Note that I'm not looking for help on how to do this with LaTeX. There won't be technical difficulties with page and article layout using my system DocScape. I'm asking (myself) about the basic algorithm for "geometrically" generating the page layout based on the given content stream. There has to be some 'artificial intelligence' in there to make the newspaper look good also from a professional newspaper editor's point of view. Of course, any production-quality system would yield a valid answer, _including_ those based on TeX ;-) googling yields some interesting references, but it's hard to distinguish which of them would really lead to an effective implementation. I'm not talking about an academic exercise here but about a real system which would be used by a publisher to produce hundreds of newspapers each week. There are further interesting references in the area of floorplanning for VLSI layout, but these lack consideration for specific needs of newspapers, of course ;-) Now my questions a bit more precisely:   1. Does a system like described above effectively exist (it doesn't have to be based on TeX)? I'd be interested in pointers to concrete systems as well as publications about them.   2. Are there publishers who really use a system like this for making newspapers (online would be interesting as well)?   3. Has anyone here ever worked with such a system and would care to describe how it's used?   4. What are the most interesting "scientific" publications on this subject which I should consider when designing such a system myself? I have seen the question Automatic newspaper creation in LaTeX, but it's got a slightly different focus than mine (what LaTeX tools to use), and unfortunately the discussion there wasn't very intense, yielding no pointers which would help me. ## Some Literature _Here I'll add a review of literature I've collected on the subject. Note that I have **not** read all of it, so if I have misrepresended something, please comment._   1. _Schoon, Benjamin Durant_   Fishpaper : automatic personalized newspaper layout   Thesis (B.S.)-Massachusetts Institute of Technology, Dept. of Electrical Engineering and Computer Science, 1994. More of a historical account than a real contribution to this subject. "automatic personalized newspaper layout" here doesn't include automatically finding a good page layout. The page layout is given by a fixed template, though the system supposedly can account for different text lengths or image sizes of article content, or display alternative content when some element is missing. It is historically interesting because it falls in the advent of the WWW. The browser Mosaic is explicitly mentioned as a device for electronically presenting news items, but in a time before HTML 2.0, apparently the possibilities for screen formatting were limited. TeX is also explicitly mentioned, in the sense of a somewhat competing product to the software `fishpaper` presented, which produces PostScript files from a given stream of news content and given page layout templates. Example from the paper:   ![enter image description here](http://i.stack.imgur.com/gEyzZ.png)   2. _Gonzalez J, Rojas I, Pomares H, Salmeron M, Merelo JJ._   Web Newspaper Layout Optimization Using Simulated Annealing   IEEE Trans Syst Man Cybern B Cybern. 2002;32(5):686-91. Thanks to Martin for the link. This is a classical research paper in the sense that the main focus lies on applying a specific optimization method (simulated annealing) to a precisely mathematically specified problem (web newspaper layout). The concrete results shown in the paper are not overwhelming, and in some sense the problem which is solved is not completely compatible with my own interest (this is for web pages, so no length restriction for the page produced; furthermore the design of a single article is rather uninspired), but from the results shown, it can be expected that the method could be extended towards solving the "complete" problem discussed here. Furthermore, the algorithm is tailored for "real time" application and takes only a couple of seconds for a realistic sample size. Example from the paper:   ![enter image description here](http://i.stack.imgur.com/ZAPN6.png) ## The State of the Art? Since I'm thinking about this subject, ads and blog posts about systems to make newspapers keep popping out to me ;-) Without a connection to one specific vendor, I'd just mention two examples which seem to represent the state of the art for systems which make newspaper layout easy: A tool named "publishing cloud" seems to be a good representative of a large range of almost equivalent editing systems (easy to find with google) based on some easy-to-use web-based layout editor which is, however, template-based with a mostly manual page layouting process. The tools automate several stages of the publishing process, offering import filters for content (mostly to get content from web pages or newswire systems) and export to PDF or digital printing services, but **not** the part I'm interested in here, namely the process of arranging content on the document pages. **I would be interested in any hint that one of the systems in this area offers "real" automtic page layouting for a non-trivial newspaper layout, not just a really easy-to-use web frontend to do it manually.** Last but not least, I should mention that we have implemented a newsletter- generating system for a news agency which is completely automatically generating different types of newsletters every day and every week:   1. EPD Wochenspiegel, a weekly news compilation which exists in a multitude of local and thematic variants.   2. EPD Medien, another weekly newsletter with a specific theme (media) and a slightly different layout.   3. EPD Zentralausgabe, a daily newsletter, again existing in multiple local variants. On the linked pages, you can download example PDF files to take a look at the different layouts. Here, everything is fully automatic: Only the compilation of articles has to be selected in the wire service application. But the layout is not what I would consider "Newspaper Layout", so these examples represent the state of the art we can currently produce, but do not answer my question.


title: Is it possible to combine cases with pgfplots legend?

text: I would like to print a function and add a legend which makes use of `cases`. The current code is:               \documentclass{article}     \usepackage[pdftex,active,tightpage]{preview}     \setlength\PreviewBorder{2mm}          \usepackage{amssymb,amsmath}     \usepackage{pgfplots}          \begin{document}     \begin{preview}     \begin{tikzpicture}         \begin{axis}[             axis lines=middle,             width=15cm, height=15cm,     % size of the image             grid = both,             grid style={dashed, gray!30},             enlargelimits=true,             xmin=-1,     % start the diagram at this x-coordinate             xmax= 1,     % end   the diagram at this x-coordinate             ymin= 0,     % start the diagram at this y-coordinate             ymax= 1,     % end   the diagram at this y-coordinate             /pgfplots/xtick={-1,-0.8,...,1}, % make steps of length 0.2             /pgfplots/ytick={0,0.1,...,1},   % make steps of length 0.1             axis background/.style={fill=white},             ylabel=y,             xlabel=x,             legend style={at={(0.8,0.8)}, anchor=north}]           \addplot[domain=-1:1, ultra thick,samples=100,red]  {1};            \addplot[domain=-1:1, ultra thick,samples=100,blue] {0};            \legend{$1 \text{, if } x \in \mathbb{Q}$, $0 \text{, if } x \in \mathbb{R} \setminus \mathbb{Q}$}         \end{axis}      \end{tikzpicture}     \end{preview}     \end{document}      Which produces: ![dirichlet function](http://i.stack.imgur.com/1Djl6.png) and I would like to get something like this: ![enter image description here](http://i.stack.imgur.com/X1MDO.png) (made with gimp and this LaTeX-piece:               $f(x) =          \begin{cases}             1 & \text{if } x \in \mathbb{Q}\\             0 & \text{if } x \in \mathbb{R} \setminus \mathbb{Q}         \end{cases}$      ) Is it possible to make a legend like this directly in LaTeX?


title: Modify Figure environment

text: is it possible to modify the `Figure` environment in order to distinguish it better from the text in a one column document? I mean, I was thinking in doing               --------- Figure # ----------                  [The Plot]          -----------------------------      with `tikz` or something similar. Or if someone had a better idea of making an environment like this (maybe putting a gray background to the caption). This is because my captions are not very different from my text and sometimes it doesn't look very good. I haven't found something related. Usually what is changed are the headings, chapters or sections.


title: New to LaTeX, want to write recommendation report

text: I'm just starting LaTeX, but i want to learn how to write documents with it. I have to write a recommendation report and thought this would be as good of a time as any to learn. I started looking at the wiki tutorial here http://en.wikibooks.org/wiki/LaTeX, but I was wondering if there is something I could look at that's related to a recommendation report. One thing I'm not sure how to do is create sections. I know there is `\section{}` and `\subsection{}`, but it's not what I am looking for. I am looking for formatting like `\begin{abstract}` where it will center it. And the subsections will be italicized and left justified. Is there a way to do this, so when creating the table of contents, it will still create a full table of contents?


title: How to get less spacing in math mode

text: LaTeX commands like this:               Here again, four different simulations are run on networks of size      $C^{G} = 25 \times\ 25 = 625$, $C^{G} = 50 \times\ 50 = 2500$, $C^{G}     = 250 \times\ 250 = 62500$, and $C^{G} = 500 \times\ 500 = 250000$...      When compiled generate the following: ![Spacing in Math Mode](http://i.stack.imgur.com/Gfo0I.jpg) The spacing in math mode really irritates me. There's too much white space around the equal sign, and the multiplication sign has more right padding than left padding. Is there any way to reduce this spacing?


title: Can DVI files be converted to RTF files?

text: Consider a *NIX executable, `dvi2rtf`, whose contents are:               #!/bin/sh     TMPX=`mktemp /tmp/dvi2rtf.XXXXXX`     dvitty $1 $TMPX         # CTAN     txt2rtf $TMPX $2        # CTAN, in rtfutils      If my head is working this morning and the right executables are on the PATH, this clobbers the second argument with an RTF file whose text contents will roughly correspond to those of the dvi file named by the first argument. Such a program doesn't deserve the filename dvi2rtf, since it makes no attempt to preserve the formatting of the DVI file; Cf. Q#1621885: How to turn a dvi to tex. RTF's `\wpsp` can allow rtf to handle horizontal space similarly to DVI; RTF's notion of code pages is similar to how DVI handles fonts: maybe it is possible to handle other tricky features of dvi, such as vertical space? **Question:** Is there such a program that attempts to preserve layout, however flaky? And if not, are there the RTF primitives to write a converter in a reasonable way?


title: microtype protrusion incompatible quote, changemargin and adjustwidth environments

text: Here is my problem. I need some text to have a reduced margin. Unfortunately, none of the suggested methods of doing this appear to be compatible with microtype protrusion. Is this a bug? Is there a better method? How do I fix this? Thanks!               =======example tex======     %preamble     \usepackage{chngpage}          %change margin environment     \newenvironment{changemargin}[2]{      \begin{list}{}{         \setlength{\topsep}{0pt}         \setlength{\leftmargin}{#1}         \setlength{\rightmargin}{#2}         \setlength{\listparindent}{\parindent}         \setlength{\itemindent}{\parindent}         \setlength{\parsep}{\parskip} }         \item[]} {\end{list}}          %document          ``So'' the quotes in the first line will be margin kerned (protruded) just like it should be.          \begin{adjustwidth}{1em}{1em}     ``So'' the quotes to the left in this line will \emph{not} be margin kerned (protruded) just like it should be. Some extra text to make this obvious. Some extra text to make this obvious. Some extra text to make this obvious. Some extra text to make this obvious.     \end{adjustwidth}          \begin{changemargin}{1em}{1em}     ``So'' the quotes to the left in this line will \emph{not} be margin kerned (protruded) just like it should be. Some extra text to make this obvious. Some extra text to make this obvious. Some extra text to make this obvious. Some extra text to make this obvious.     \end{changemargin}          \begin{quote}     ``So'' the quotes to the left in this line will \emph{not} be margin kerned (protruded) just like it should be. Some extra text to make this obvious. Some extra text to make this obvious. Some extra text to make this obvious. Some extra text to make this obvious.     \end{quote}          ====================


title: Table Cell Alignment - Last Column 'Misbehaving' - Simultaneous Vertical and Horizontal Alignment Problems

text: I am going a little crazy with alignment in the tabular environment. In the following code I would like both the top-left cell 'Green Die', and the last cell in the 2nd row '6' to be aligned vertically. I know the alignment issues with the cell '6' have to do with it being the last column, because if I make it the second to last column it is aligned in the middle. Thanks in advance for any and all help!               \documentclass[11pt]{article}        \usepackage{array, multirow}     \begin{document}          \newcolumntype{S}{>{\centering\arraybackslash} m{1.2cm} }     \begin{tabular}{|S|S|S|S|S|S|S|}     \hline          \multirow{2}{1.2cm} {\centering Green Die}&\multicolumn{6}{|c|} {Red Die} \\ \cline{2-7}          &1&2&3&4&5& 6\\ [4pt] \hline     1& 1+1=2&&&&&\\ [4pt]\hline     2&&&&&&\\[4pt] \hline     3&&&&&&\\[4pt] \hline     4&&&&&&\\ [4pt]\hline     5&&&&&&\\[4pt] \hline     6&&&&&&\\ [4pt]\hline     \end{tabular}          \end{document}


title: Flushing PGF commands and local variable

text: I think I need a way to flush the PGF commands as the reference to `\LabelText` uses the last value, and not value at the time of invocation. The macro `LabelPoint` is intended to replace the first `\addplot` command as shown and label the point with the coordinates, or a specified label if one is given. BUT, both points get labelled as `top`.               \documentclass{article}     \usepackage{pgfplots}     \usepackage{xparse}          \begin{document}     \newcommand{\LabelText}{}     \NewDocumentCommand{\LabelPoint}{o o m m g}{         \IfNoValueTF{#5}{             \renewcommand{\LabelText}{$(#3,#4)$} % Label with given coordinates         }{             \renewcommand{\LabelText}{#5} % Use given label         }         \addplot [#1] coordinates{(#3,#4)} node [#2] {\LabelText};              %\pgfsyssoftpath@flushcurrentpath % -- Syntax error         %\pgfusepath{fill}                % -- no effect     }          \NewDocumentCommand{\LabelPointX}{o o m m g}{       \IfNoValueTF{#5}{         \addplot [#1] coordinates{(#3,#4)} node [#2] {$(#3,#4)$};       }{         \addplot [#1] coordinates{(#3,#4)} node [#2] {#5};       }     }          \begin{tikzpicture}     \begin{axis}         \addplot [mark=*,color=red] coordinates{(0,0)} node [color=blue, below] {$(0,0)$};         \LabelPoint[mark=*,color=red][color=blue, below]{0.5}{0.5}{middle}         \LabelPoint[mark=*,color=red][color=blue, below]{1  }{1  }{top}     \end{axis}     \end{tikzpicture}     \end{document}      I thought the problem had to do with the PGF commands not being flushed, but I can't seem to get that to work -- Have commented out what I tried. I also don't like having a global variable `\LabelText` as it only really has meaning within the scope of the macro so any help in moving that to be within the `\NewDocumentCommand` would be helpful as well. The modified version `\LabelTextX` which uses two different `\addplot` commands works, but that just makes the code harder to read, and gets complicated when there are more conditions involved, so I really don't want to use that as a solution.


title: How do I get MikTeX 2.9 to use a class file which I created and used successfully with MikTeX 2.1

text: The class was created some years ago. It worked correctly with MiKTeX until I upgraded to 2.9 I have created a TDS root and located my personal .sty files in this. They work successfully. I assumed that MiKTeX would similarly locate and use my personal class files. So I copied them into the TDS root. But this generates the error "can't find ....cls" Thanks to those who replied! I forgot to update MikTeX's internal database. Problem solved.


title: Manually specify margins in the TOC and Title Page

text: I have just began my journey into latex. I'm writing my thesis with a given template. The template is big and I do not manage to extrapolating from it a minimum working examples, too many things, I'm not able to understand which is important which is not for this question. The fact is that the title margin and the toc are out of bounds in the computed pdf. See the attached images I think that the painless way to fix it is to manually specify the margin in those 2 pages. I have tried a lot with some `\linespread{}` but it does not fix it. Here is a piece of the template (again, sorry IT IS NOT a minimum working example, I don't understand what is relevant or not)               %\documentclass[12pt,a4paper,oneside, titlepage,fleqn,italian]{book} %stampa     \documentclass[12pt,a4paper,twoside,openright,titlepage,fleqn,italian]{book}          \usepackage[colorlinks=false]{hyperref}%<--inserisce segnalibri e riferimenti indice          \setlength{\parindent}{0pt}     \frenchspacing     \linespread{1.25}          %\addtolength{\voffset}{-1,5cm} %stampa     %\addtolength{\textheight}{-1,5cm} %stampa     %\addtolength{\textwidth}{-1,5cm} %stampa     %inverto i margini per la rilegatura     %\linespread{1} %stampa          \makeatletter     \renewcommand{\thesection}{\if@mainmatter\thechapter.\arabic{section}\else\arabic{section}\fi}     \makeatother          \usepackage{titlesec}              \titleformat {\chapter}             [display]              {\normalfont\bfseries}             {\large\thechapter}             {0ex}             {\LARGE \titlerule[1pt] }              \titleformat{\section}             {\normalfont\large\bfseries}             {\thesection}             {1ex}             {}              \titleformat{\subsection}             {\normalfont\bfseries}             {\thesubsection}             {1ex}             {}          \usepackage{fancyhdr}          \pagestyle{fancy}          \renewcommand{\chaptermark}[1]{\markboth{#1}{}}     \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}     \renewcommand{\subsectionmark}[1]{\markright{\thesubsection\ #1}}          \fancyhf{}     \lhead{\rightmark}     \chead{}     \rhead{\bfseries\thepage}     \renewcommand{\headrulewidth}{0.4pt}     \renewcommand{\footrulewidth}{0pt}     \newcommand{\tab}{\hspace*{2em}}     \DeclareMathOperator*{\argmax}{arg\,max}     \setlength{\headheight}{15pt}%     \fancypagestyle{plain}{\fancyhead{}\renewcommand{\headrulewidth}{0pt}}%     \fancyhead[RO]{\textbf{\thepage}}  %Displays the page number in bold in the header,                                                            %to the left on even pages and to the right on odd pages.     %\fancyhead[RE]{\nouppercase{\leftmark}} % Displays the upper-level (section) information -                                                                       % as determined above - in non-upper case in the                                                                        % header, to the left on odd pages.     \fancyhead[LO]{\nouppercase{\rightmark}} % Displays the lower-level (chapter) information - as                                                                       %determined above - in the header,                                                                        % to the left on odd pages.      See the images: the red box in the second page should be in the title page, and the toc is out of margin. Anyone have some hints?! ![enter image description here](http://i.stack.imgur.com/Et3Sq.png)


title: Accents with lmodern fonts on XeTeX

text: After loading the `lmroman10-regular` font in XeTeX, I can't access accents in TeX' good old ways: `\'` `\"` `\c` etc. I would need to write `Erd\H os` since because I don't have the appropriate "o" on my keyboard. Example:               Before: é, \'e          \font\tenrm="[lmroman10-regular.otf]:mapping=tex-text"     \tenrm          After: é, \'e          \bye      Output: ![enter image description here](http://i.stack.imgur.com/bjzQd.png) How can I fix this?


title: How to reference part of a theorem?

text: I have a corollary with a number of parts whose parts need to be referenced individually later on, so something like:               \begin{cor}\label{cor}        \begin{enumerate}            \item Part one \label{partone}            \item Part two \label{parttwo}        \end{enumerate}     \end{cor}      Ideally, I want `\ref{partone}` to produce 2.1 (supposing it were Corollary 2 for the sake of argument), but, of course, `\ref{partone}` gives 1, as it's referencing the `enumi` counter. Is there a way to get `\ref` to somehow combine the `enumi` and `cor` counters?


title: lstlistings does not work in a slide

text: I am writing a slide. I want to use `lstlisting`                   \documentclass[10pt]{beamer}         \usepackage[utf8]{inputenc}         \usepackage[english]{babel}         \usepackage[T1]{fontenc}         \usepackage{lmodern}          \usepackage{listings}         \begin{document}         \begin{frame}{HeartBleed}         \begin{lstlisting}         Hellow world          \end{lstlisting}        \end{frame}        \end{document}      I get an error around around `\begin{lstlisting}` and it says: `job aborted, no legal \end found`. How can I resolve this problem ?


title: Libertine monospaced font seems to big

text: I'd like to write a document with the Libertine font (using the `libertine` package). I have a couple of code snippets in the text, and to me it seems like the Libertine Mono font that is used by the package is too large compared to the rest of the text (notice the 'x'-height): ![](http://i.stack.imgur.com/PN2lN.png) compared to the same snippet using Computer Modern: ![](http://i.stack.imgur.com/CZ1tB.png) Is there something wrong with my setup, or is that just the way Libertine Mono is supposed to look? If that's the case, is there a way to automatically use a slightly smaller text size for all monospaced output (`\texttt`, `\verb`, listings...)?               \documentclass[border=5mm]{standalone}     \usepackage[T1]{fontenc}     \usepackage{libertine}          \begin{document}     abc \texttt{abc}     \end{document}


title: escape `|' in \verb

text: In LaTeX, if I use `\verb`, how can I escape `|`? For example, I want to display `ab|bc`: `\verb|ab[]bc|`. What should replace `[]`?


title: Automatic width setting in LyX

text: Is there any preference setting so that LyX automatically adjusts images width to `\linewidth` when they are added, instead of doing so by hand whenever a new image is inserted? ![Setting I want to be adjusted automatically, adjusted manually in this cap.](http://i.stack.imgur.com/BHknP.png)


title: drawing water particles in a water column - tikz

text: I am trying to generate a figure that shows various water particles in a water column where the particles are moving chaotically driven by the cooling and heating of water. So far I have generated an idealized water column with 3 spheres used to represent the water particles.               \documentclass{article}     \usepackage[margin = 1in]{geometry}     \usepackage{tikz}     \usetikzlibrary{decorations.pathmorphing,calc,shapes,shapes.geometric,patterns}     \begin{document}     \begin{tikzpicture}     \shade[bottom color=cyan!60!black, top color=blue!20!white] (0,0) rectangle (4,5);     \foreach \x in {1,1.2,1.4}     \shade[ball color = cyan!20!white] (\x,3) circle (.1);     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/t3TQh.png) However, this seems really unimaginative and I was hoping if anyone had some advice on how o improve the figure from the description given above.


title: Is there any multi-purpose package in PGF I can use to simplify the following?

text: I want to avoid using `\usepackage[nomessages]{fp}` and               \FPeval\height{round(6*sin(pi/3):6)}%     \begin{pspicture}(6,\height)      just for the sake of getting more compact code, i.e., without using a temporary variable `\height`. It is not a big problem to use the above approach actually but I am just curios whether or not I can make it more compact. What I want to achieve is to check whether or not there is a useful package in PGF to let me rewrite the above code as follows.               \begin{pspicture}(6,6*sin(pi/3))      I have seen someone use `calc` but I have not tried it yet. The complete code is given as follows.               \documentclass[pstricks,border=12pt]{standalone}     \SpecialCoor     \usepackage[nomessages]{fp}          \begin{document}     % not so compact     \FPeval\height{round(6*sin(pi/3):6)}%     \begin{pspicture}(6,\height)     \pspolygon(6,0)(6;60)     \end{pspicture}          % preferred     \begin{pspicture}(6,6*sin(pi/3))     \pspolygon(6,0)(6;60)     \end{pspicture}     \end{document}      Any suggestions are welcome.


title: how to have \tag, \text and cases environment like things in eqnarray

text: I have this journal template that insists that I do not use `amsmath` in any way and forces me to use `eqnarray`. I am very used to `amsmath` and have things like cases environment, `\tag`, `\text`, etc. in my code. How to have those in `eqnarray`? The template has its own class/style files... cant figure out how to add those here... but a search for "agu latex format" should give all easily...


title: Including eps files written on Xara

text: I'm trying to submit a preprint to arXiv, and the compiler there fails to convert it to PDF (although WinEdt at home has no complaints). Moreover, the log file didn't provide me with meaningful information as to what precisely had gone wrong. My theory is that their compiler doesn't like my eps files, which contain images drawn using Xara (I can think of no other reason why my preprint would compile to a ps but not to a pdf). There are a lot of eps files included- 131 of them. > Has anyone encountered similar problems submitting papers with eps images > drawn using Xara? Is that indeed the likely problem? Is there a fix? Is > there a fix that can be carried out without editing 131 eps files by hand? **UPDATE** : I think I figured it out, by constructing a minimal failing example, and forcing it to work. It's the TIFF preview which causes the problem. Now I'm stripping it from each eps file, one by one...


title: Quotation marks in section titles

text: I have a question similar to that in Cite in the caption of a graphic but not in \listoffigures? I'm using this to create bookmarks in my generated PDFs:               \usepackage[pdftex,bookmarks=true]{hyperref}      My problem, is that I'm using inverted commas (quotation marks) in my section/subsection titles. However, my PDF bookmarks come out with backticks and two apostrophes (``` text... ''`), instead of a proper pair of inverted commas. Is there a way around this? In the question I linked to above, I see that I can specify an optional title for places like this, and if worse comes to worse, I could leave out the quotation marks. I'd really prefer to keep them, though.


title: Display certain objects in a document side by side

text: What is the _standard way_ in latex to display certain objects (e.g. pictures, tables, etc.) side by side, instead of one below the other? I thought about using the tabular environment for this, but I'm not sure if there isn't a better way.


title: Pointing to Java files not in root latex folder using listings

text: I am trying to use listings to point to a Java source code file. The file path is different from the Latex document. Below is an example of what I am trying to do, though it doesn't compile it says it can't find the file. How would I point to my file or do the source code files need to be in the root latex folder? Main.tex               \usepackage{listings}     \usepackage{appendix}          \begin{document}     \input{bibliography.tex}      Appendix.tex               \appendix     \section{Appendix A: Application Code}     \lstinputlisting{/users/<user-directory>/JavaFiles/file.Java}


title: Installing Minion Pro on Windows

text: I have been searching on the Internet but so far there is no guide that works for me. I tried the one from CTAN, but there I have to run commands, and install the LCDF Typetools (which aren't available for Windows?). As far as I know many people use the Minion font. Is there some easy guide out there to help me install them?


title: Tikz overlays on subfigures in memoir

text: Say I have the following code in a document typeset with `memoir`:               \begin{figure}     \centering     \subbottom[]{     \label{sub1}     \includegraphics[width=0.4\linewidth]{test.png}}%     \subbottom[]{     \label{sub2}     \includegraphics[width=0.4\linewidth]{test.png}}%     \caption{\subcaptionref{sub1}: Left of the figure. \subcaptionref{sub2}: Right of the figure}     \end{figure}      which generates the following figure: ![enter image description here](http://i.stack.imgur.com/3Wvhk.png) I would like to be able to overlay some text and mathematical formula on each of the images (with coordinates relative to each image). I read these two posts:   * Drawing on an image with TikZ   * Simplest way to overlay a text + rectangle label a PNG figure? I really like the solution described in the first of them, i.e. using `tikz` commands to overlay text and formulae. However, the examples they provide require using a `tikzpicture` environment, which seems to prevent me from using `\subbottom[]` for subfigures in memoir. How can I use `tikzpicture and` scope in combination with `subbottom` in `memoir`? For the sake of the example, say I want to overlay the symbol `$\phi$` on the center of the subfigure of the left, and the symbol `$\psi$` on the center of the subfigure on the right (both inside small white boxes).


title: Why should I use -- in pages field of a BibTeX entry?

text: In most BibTeX entries I found on the internet a page range in the page field is separated by a double hyphen `\--`. Why should I use a double dash and not a single one `-`?               @misc{blub,     title="blah",     pages="1--99" <---     }      and _not_               @misc{blub,     title="blah",     pages="1-99" <---     }


title: Non-uniform white spacing with \vspace

text: So I am currently writing a document and the TeX is not doing what I want it to do. When I am writing I am using the format:               Blah     \vspace{.08in}           \noindent Blah2 dasfogasngangsnklgs etc etc     \vspace{.08in}          \noindent blah3      Etc. The issue is that in the middle of the page, one of the spaces in the middle a ton larger than all the other breaks. Is there anything I can do to fix this? If it helps, my preamble looks something like               \documentclass[11pt]{amsart}     \numberwithin{equation}{section} \setlength{\textwidth}{17cm}     \usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry}          \usepackage{graphicx,tabularx,array}     \thispagestyle{empty}     \usepackage{fontspec}     \setmainfont{Times New Roman}     \usepackage{verbatim}