title: Table-like layout in plain TeX

text: Below image shows part of a document prepared with a word processor. Gray lines mark table borders and are only visible in edit mode (they will not be visible when document is printed but have been preserved as a hint at text layout). My question is how I can prepare a similar layout--text in two columns--with TeX (preferrably plain TeX). ![enter image description here](http://i.stack.imgur.com/CLySQ.png)


title: File ended while scanning the use of \@newenv

text: I am trying to create a diary in `LaTeX`. I have found a relevant question using latex to keep a diary. I believe that **_ferahfeza_** gave a prety answer however there are some points that are not working. The idea is to have a `diary.tex` file the will be inputed in a main file. **`diary.tex`**               \newcounter{diary}     \renewcommand{\thediary}{\arabic{diary}}     \newenvironment{diary}[2]     {\par\medskip\refstepcounter{diary}%     \hbox{%     \fboxsep=\the\sidebar\hspace{-\envborder}\hspace{-.5\sidebar}%     \colorbox{exampleborder}{%     \hspace{\envborder}\footnotesize\sffamily\bfseries%     \textcolor{white}{{#1}\ {#2}\enspace\thediary\hspace{\envborder}}     \today % Print date in header of frame     }}}      The **`main file`** is the following               \documentclass[a4paper]{book}     \usepackage{xcolor}     \usepackage{framed}     \usepackage{datetime}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{times}     \usepackage{lipsum}     \input{diary}          \begin{document}          \begin{diary}{Hello!}{07.18.2013}     \lipsum[1]     \end{diary}          \begin{diary}{Second entry.}{07.19.2013}     \lipsum[2]     \end{diary}          \end{document}      However when I try to build the file I get the error > `file ended while scanning the use of \@newenv` What might be wrong there?


title: Drawing transitive diagram in Tikz

text: I am very new to Tikz. How to draw rounded arrows and nodes without rectangular boundary. I want to draw something like this: ![enter image description here](http://i.stack.imgur.com/wwG7b.jpg)


title: Embedding Mercurial version control information in a TeX document

text: I use Mercurial. Imagine the following scenario. Suppose I have a document which is in a state of ongoing revision. I print out a version and file it. Some time later, I want to check whether the version I have on disk has changed compared to the version I have printed out. For simplicity assume that the version I have on disk has no local changes; i.e. the current version in version control is also the most recent version. It would be handy to have some identifier as part of the file, say for example the revision when the file was last changed. Then I could look at that and see that there has been no change since I last printed the file. Now, Mercurial actually has an extension that does something similar, namely the keyword extension. However, this has problems, and is officially disapproved of by the Mercurial founder and project leader, Matt Mackall. After looking at this, it occurred to me that though using this extension could be problematic, there was no real problem using LaTeX to embed version control information in a LaTeX file. And nearly all text documents I write are LaTeX documents. I see there is prior art by Martin Scharrer. Any tips on how to do similar things in Mercurial? EDIT: To be clear, my intention was not to use the keywords extension, but rather call hg directly from TeX as part of the typesetting.


title: using biblatex with res.cls

text: I am having a problem getting `biblatex` to work with `res.cls` I have successfully used biblatex using the `article` class to create a nice bibliography the way I want it to look. However, when I try and use it within the class `res`, I get a               ! Package keyval Error: revisers undefined.      message. In fact, this message appears simply by adding               \usepackage[firstinits=true, isbn=false, url=false,  doi=false, style=ieee, defernumbers=true, sorting=ydnt]{biblatex}      in the preamble. Any ideas? Here is a minimal example:               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \documentclass[overlapped,line,letterpaper]{res}          \usepackage{ifpdf}          \ifpdf       \usepackage[pdftex]{hyperref}     \else       \usepackage[hypertex]{hyperref}     \fi          \hypersetup{       letterpaper,       colorlinks,       urlcolor=black,       pdfpagemode=none,       pdftitle={Curriculum Vitae},       pdfauthor={Daniel L. Zelazo},       pdfcreator={$ $Id: cv-us.tex,v 1.28 2006/12/12 22:53:52 jrblevin Exp $ $},       pdfsubject={Curriculum Vitae},       pdfkeywords={networked dynamic systems control optimization}     }          %%===========================================================================%%     \usepackage[T1]{fontenc}     \usepackage[american]{babel}     \usepackage{csquotes}     \usepackage[firstinits=true, isbn=false, url=false,  doi=false, style=ieee, defernumbers=true, sorting=ydnt]{biblatex}     \usepackage{hyperref}     \usepackage{nameref}     \addbibresource{dz_pubs_2011.bib}     \usepackage{eurosym}     \renewcommand{\labelitemiv}{$-$}     %%===========================================================================%%          \begin{document}          %---------------------------------------------------------------------------     % Document Specific Customizations          % Make lists without bullets and with no indentation     \setlength{\leftmargini}{0em}     \renewcommand{\labelitemi}{}          % Use large bold font for printed name at top of pages     \renewcommand{\namefont}{\large\textbf}          %---------------------------------------------------------------------------          \name{Daniel L. Zelazo}          \begin{resume}          \hspace{-37pt}\begin{ncolumn}{2}       {\bf Research Associate \& Lecturer} & \\        {\small Institute for Systems Theory \& Automatic Control} &\hfill {\small Phone: +49 711 685 67747} \\       {\small University of Stuttgart }     &\hfill {\small Fax: +49 711 685 67735} \\       {\small Pfaffenwaldring 9  }        &\hfill {\small {\tt daniel.zelazo@ist.uni-stuttgart.de}} \\      {\small  70550 Stuttgart, Germany   }          &\hfill {\small {\tt \verb+http://www.ist.uni-stuttgart.de/~zelazo/+} }\end{ncolumn}          %---------------------------------------------------------------------------          \section{\bf {\large Education}}     \begin{ncolumn}{1}       {\bf University of Washington} \hfill  Seattle, WA         \\       {\bf PhD} \hfill September 2004 - September 2009 \\        \\       Department of Aeronautics \& Astronautics Engineering  \\       Thesis: \emph{Graph-theoretic Methods for the Analysis and} \\\emph{Synthesis of Networked Dynamic Systems} \\       Advisor:  Prof. Mehran Mesbahi      \\                      \end{ncolumn}          %---------------------------------------------------------------------------               \section{\bf {\large Publications \& Patents}}     See attached list.          \nocite{*}          \printbibheading     \printbibliography[heading=subbibliography,title={Letters},keyword=letter, prefixnumbers={L}]          \end{resume}          \end{document}          %%===========================================================================%%      for the dz_pubs_2011.bib file, the following should be sufficient:               @misc{Holland2011,     author = {Holland, Alex and Zelazo, Daniel},     title = {{Sensitivity Analysis in Control Versus Biology}},     howpublished = {Letter to the Editor of PLoS Biology regarding the 2009 PLoS Biol 7(1) e10000015 and e1000021 articles},     year = {2011},     keywords={letter}     }


title: Setting the space between page header and text block

text: I work with documentclass report and use `fancyhdr` package for chapters in this way:               \renewcommand{\chaptermark}[1]{\markboth{#1}{}}     \renewcommand{\chaptermark}[1]{\markright{\thechapter\ #1}}     \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}     \fancyhf{}     \fancyhead[LO]{\bfseries\nouppercase\rightmark}     \fancyhead[RE]{\bfseries\nouppercase\leftmark}     \fancyhead[RO]{\bfseries\nouppercase\thepage}      \renewcommand{\headrulewidth}{0.5pt}     \renewcommand{\footrulewidth}{0pt}     \addtolength{\headheight}{0.5pt}     \fancypagestyle{plain}{     \fancyhead{}      \renewcommand{\headrulewidth}{0pt}      }      I would like to change space between the line and the following text. Can anyone help me?


title: Adjusting the postion of chapter numbers in the Tufte-Latex class

text: I'm using the Tufte-latex book class, and trying to figure out how to use numbers in the chapters/sections. The default style has no numbers, which I turned off by commenting out this line:               % Turn off section numbering     %\setcounter{secnumdepth}{-1}      But I can't figure out how to make the Chapter Number, and Chapter Title be on the same line. At the moment the chapter title is underneath the number like so: ![enter image description here](http://i.stack.imgur.com/gM97V.png) while I would prefer the chapter to look more like other sections, e.g.: ![enter image description here](http://i.stack.imgur.com/BoQVV.png) I've read through the class file a few times, but I'm not sure what I should be looking for as I'm not familiar with many of the commands. I think this section may be relevant, but am not certain: (lines 1526 - 1534)               % Make Tuftian-style section headings and TOC formatting          \titleformat{\chapter}%       [display]% shape       {\relax\ifthenelse{\NOT\boolean{@tufte@symmetric}}{\begin{fullwidth}}{}}% format applied to label+text       {\itshape\huge\thechapter}% label       {0pt}% horizontal separation between label and title body       {\huge\rmfamily\itshape}% before the title body       [\ifthenelse{\NOT\boolean{@tufte@symmetric}}{\end{fullwidth}}{}]% after the title body      And possibly this part:               \titlespacing*{\chapter}{0pt}{50pt}{40pt}       I would appreciate any guidance about how to tweak this.


title: referencing main subequation

text: In the following example i labeled each subeqnation.               \begin{subequations}       \begin{gather}         R_0 = 0 \label{subeqn:ini-cond-r}  \\         N_0 = 0 \label{subeqn:ini-cond-n}       \end{gather}     \end{subequations}      then i could give as reference each equation separately. What i would like to have, assuming the subequation numbers are _1.1a_ and _1.1b_ , is a reference to _1.1_ or somehow that LaTeX will show the number _1.1_ (It would be nice a solution with hyperref, since i already use it in my work)


title: Group labels in pgfplots or finding cm fonts for windows

text: I'd like to put a second `xlabel` on a grouped bar graph using `TiKz` but can't seem to work it out. So I have found this **cm superfonts** package: http://ctan.org/pkg/cm-super. Or I can download `cm fonts` directly to my pc (but they're in a format I can't open and I've tried everything) http://sourceforge.net/projects/cm-unicode/ I'm intending to make my graph> export to Adobe illustrator or inkscape and write my group labels in there:               % This file was created by matlab2tikz v0.3.2.     % Copyright (c) 2008--2013, Nico Schlömer <nico.schloemer@gmail.com>     % All rights reserved.     %     % The latest updates can be retrieved from     %   http://www.mathworks.com/matlabcentral/fileexchange/22022-matlab2tikz     % where you can also make suggestions and rate matlab2tikz.     %     %     %          \documentclass[tikz,border=3pt]{standalone}     \usepackage{pgfplots}     \pgfplotsset{compat=newest}     \usetikzlibrary{plotmarks}     \begin{document}     \definecolor{mycolor1}{rgb}{0.0416666666666667,0,0}          \begin{tikzpicture}          \begin{axis}[%     width=11.0276041666667in,     height=5.87479166666667in,     area legend,     scale only axis,     xmin=0, xmax=25,     xtick={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40},     xticklabels={E,P,H,N,F,,E,P,H,N,F,,E,P,H,N,F,,E,P,H,N,F,},     ymin=0, ymax=2,     ylabel={CFU cm$^2$},     legend style={draw=black,fill=white,legend cell align=left},yticklabel style={/pgf/number format/fixed},     ]     \addplot[ybar,bar width=0.10082380952381in,bar shift=-0.063014880952381in,fill=mycolor1,draw=black] plot coordinates{(1,0.04485625)     (2,1.881133333)     (3,1.197503086)     (4,1.842835802)     (5,0.3139072)     (6,0)     (7,0.04485625)     (8,0.002466667)     (9,0.578984568)     (10,0.003676543)     (11,0.3139072)     (12,0)     (13,0.000628571)     (14,0.001266667)     (15,0.576515432)     (16,0.001048457)     (17,0.30285028)     (18,0)     (19,0.04485625)     (20,0.001266667)     (21,0.576762346)     (22,0.002796914)     (23,0.30285028)};          \addlegendentry{4  ac.h$^{-1}$};          \addplot [     color=black,     solid,     forget plot     ]     table{     0 0     25 0     };     \addplot[ybar,bar width=0.10082380952381in,bar shift=0.063014880952381in,fill=white,draw=black] plot coordinates{(1,0.04265625)     (2,0.595466667)     (3,0.499092593)     (4,0.401030556)     (5,0.170007298)     (6,0)     (7,0.04265625)     (8,0.000133333)     (9,0.306561728)     (10,0.000462346)     (11,0.170007298)     (12,0)     (13,5e-05)     (14,0.0002)     (15,0.306561728)     (16,0.000462346)     (17,0.159355735)     (18,0)     (19,0.04265625)     (20,0.0002)     (21,0.306592593)     (22,0.000777778)     (23,0.159355735)};          \addlegendentry{6 ac.h$^{-1}$};          \end{axis}     \end{tikzpicture}%     \end{document}      Like this: ![enter image description here](http://i.stack.imgur.com/DEXh1.png)


title: How costly is it to store content in a box register?

text: I wonder how costly it is in terms of compilations speed and also other terms like memory etc., to store some content in a box and use this box then afterwards only once (or maybe twice). Is the difference meaningless or significant if used often in a document? I'm talking about something like               {\sbox\mybox{<some content>}% or \setbox\mybox\hbox{..}      <calculated something depended on the box dimension>      \box\mybox      % or:      % \usebox\mybox     }      Also: how big is the difference between using `\box` and `\usebox` (which requires to copy the box)? In some scenarios I can't be sure that the box isn't required again and can't use `\box` in general. I'm coding several macros similar to `\raisebox` which store their content into a box and allow the user to access the dimensions using the macros `\height`, `\width` and others. During the normal use these macros might often be cascaded and each of it would simply re-save the saved box of the inner macro (`\sbox\mybox{\sbox\mybox{..} .. \usebox\mybox} .. \usebox\mybox`). So I wonder if I should program these macros in a way so that they can reuse the box register of the inner macro in such cases or if this would be overkill?


title: Configuring TexMaker and BibTex

text: I'm using Windows 7 and just installed Texmaker. Is it possible to configure it in such a way that I can run Latex -> BibTex -> Latex -> Latex? I looked at the configuration options here: ![enter image description here](http://i.stack.imgur.com/ZE0fH.png) I tried replacing the `bibtex %` line with `pdflatex -synctex=1 -interaction=nonstopmode %.tex bibtex % pdflatex -synctex=1 -interaction=nonstopmode %.tex` but that did not work. What should I change to be able to run this command?


title: Is \baselineskip automatically defined?

text: Is is automatically defined by LaTeX? What does it depend of? I was going through the `Wikibook` section regarding lenghts, and I just realized also that `\bigskip` and others are not dependent on the font size. Is this the same for `baselineskip`?


title: How to h-alignment subtable to the limits of text?

text: I have this 2 subtables. How could I separate more the 2 tables, puttin the space indicate in the image in the center to get bigger the central distance ? I usually use \centering for center... are there a similar command to h-align to right or left ? ![enter image description here](http://i.stack.imgur.com/ZL5LN.png)               \documentclass{article}     \usepackage{subcaption}     \usepackage{graphicx}     \usepackage{mathtools,amsmath,amssymb}     \usepackage{graphicx}     \usepackage{subcaption}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[spanish]{cleveref}     \usepackage[spanish]{babel}               \begin{document}     \renewcommand{\listtablename}{Índice de tablas}     \renewcommand{\tablename}{Tabla}     \crefname{table}{tabla}{tablas}          jdhjfdks fjkf hjdshjds hfj kdhjk h dj fhdj  k  fhhfjdfd dsj fl k d sjf kd j fljkasdfk j sd alk  flka s j f kla sjf lkd sj fk l sajf kl dsj fl k d sjf kd j fljkasdfk j sd alk  flka s j f kla sjf lkd sj fk l sajf kl dsj fl k d sjf kd j fl     After a table we have.. THIS     \begin{table}[h!]     \centering     \begin{subtable}{.48\linewidth}     {\begin{tabular}{|c|c|c|c|c|}       \hline       % after \\: \hline or \cline{col1-col2} \cline{col3-col4} ...       {\scriptsize Tarea} & {\scriptsize T.Proc.} & {\scriptsize Límite} & {\scriptsize Ret.} & {\scriptsize Pen.} \\ \hline       $j$ & $t_j$ & $d_j$ & $h_j$ & $p_j$ \\ \hline       1 & 3 & 3 & 3 & 45\\       2 & 7 & 7 & 7 & 23\\       3 & 4 & 14 & 4 & 4\\       \hline     \end{tabular}}     \end{subtable}%     %     \begin{subtable}{.48\linewidth}     {\begin{tabular}{|c|c|c|c|c|}       \hline       % after \\: \hline or \cline{col1-col2} \cline{col3-col4} ...       {\scriptsize Tarea} & {\scriptsize T.Proc.} & {\scriptsize Límite} & {\scriptsize Ret.} & {\scriptsize Pen.} \\ \hline       $j$ & $t_j$ & $d_j$ & $h_j$ & $p_j$ \\ \hline       29 & 42 & 175 & 32 & 23\\       30 & 23 & 168 & 12 & 240\\       31 & 17 & 35 & 123 & 23\\         \hline     \end{tabular}}     \end{subtable}%     \caption{JjjreA TABLE}\label{tab:1a}     \end{table}                    AFTER The big BIG               \end{document}


title: mirror figure in metapost

text: With a valid figure, I would like to always produce the mirror figure. To clarify my thought, I'm looking for some tricks to do something like:               beginfig(1);       ...     endfig;          beginfig(2);       mirror(fig1);     endfig;      Is such a thing possible ?


title: TeXLive 2011 and subfig

text: I am a long user of TeXLive on Windows. I recently moved to TL2011 from TL2010 without any problems with the iso file from CTAN. A couple of days ago I updated the TL2011 with the latest updates on CTAN. I find that subref does not work well with TL2011. If I have the command e.g.               Fig.~\subref*{fig:subfig:P2jeffcott}       in order to get it as Fig. 1(a) and not Fig 1a, well TL2011 complains. I get an error message:               No file test.aux.     <newjeffcott.eps> <newjeffcott.eps>     ! Argument of \@caption has an extra }.     <inserted text>                  \par      l.18 ...~\subref*{fig:subfig:P2jeffcott} is cool.}          ?       Process has been terminated ... I am putting the testfile test.tex and the figure newjeffcott.eps here: http://petitlien.fr/myfiles (This will expand to a GMX shared folder) Note: I do not have any problems with with TL2010 nor TL2008 and nor with the version of TL2011 that came with the iso file on CTAN. The problem arose after I updated my whole TL2011 from CTAN three days back. Thanks a lot...


title: copying a screenshot image with tikz

text: Is there a package that can be used to draw images that resemble a screenshot with tikz. For example, if I take the following screenshot ![enter image description here](http://i.stack.imgur.com/0M5g6.png) Is there a package that does this in tikz or is it a case of drawing the appropriate shapes from scratch?


title: Subfig no space between figures and double brackets

text: I followed the instructions here to make subfigures http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions#Subfloats However there were no space between the figure and I got double brackets for the captions. I cannot find any instruction on the Internet. I hope anyone can help me here. My code is like this               \begin{figure}[H]       \centering       \subfloat[a]{\label{fig:a}\includegraphics[width=.5\textwidth,height=15em]{appendix/1.jpg}}       \subfloat[b]{\label{fig:b}\includegraphics[height=15em]{solution.jpg}}            \caption[The short caption]{The long caption}       \label{fig:preparation}     \end{figure}      ------- Update -------- Problem solved! For the spacing I used `\qquad` and for double brackets, I found out that I have both packages `subfigure` and `subfig` enabled. I deleted package `subfigure` then I get single brackets as expected. Thank you all for helping me solve this problem!


title: \underbrace error

text: I'm trying to write an equation, but I keep getting an "Undined control sequence error on the line my equation is one, and I can't seem to figure out what the error is. Can any of you guys seen an errors in the equation?               \documentclass[a4paper,12pt]{article}     \begin{document}     $     \theta^* = \bf{argmin}\underbrace{{1\over2}(g-F(\theta))^T(g-F(\theta))}_\text{f(\theta)}     $     \end{document}


title: Bold , italic (and sans-serif) math symbols

text: I would like to implement the suggestions in the TUGboat 30:3, 2009 about the upright/italic and bold/normal in scalars, vectors and tensors. All this is about math. I use this font:               \usepackage[charter]{mathdesign}      For vectors, I always used `\vec`, so I just redefined it like so:               \renewcommand{\vec}[1]{\boldsymbol{#1}}      Now they are bold and italic, just like I want them. Is that even the correct way to do this? How can I get characters in bold, italic and sans-serif? I _almost_ got it with this, they are just upright and not italic:               \newcommand{\tens}[1]{\boldsymbol{\mathsf{#1}}}


title: perspective tikz figure 3d

text: I want to rotate my figure, like here below: ![my required orientation](http://i.stack.imgur.com/2qgvM.png)               \documentclass{standalone}     \usepackage{tikz}     \usepackage{tikz-3dplot}     \begin{document}     \tdplotsetmaincoords{180}{0}     \begin{tikzpicture}[thick,scale=3,tdplot_main_coords]     \draw[thick,->] (4,0,0) -- (5,0,0) node[anchor=north east]{$x$};     \draw[thick,->] (4,0,0) -- (4,1,0) node[anchor=north west]{$y$};     \draw[thick,->] (4,0,0) -- (4,0,1) node[anchor=south]{$z$};     \end{tikzpicture}     \end{document}      ![my current orientation](http://i.stack.imgur.com/dNqfH.png) What can I do to rotate z-coordinate?


title: How to postpone the set up of a conditional?

text: I'm about to produce a series of assessment texts. Some of these assessments have annexes, others don't. I would like to be able to define a specific class, like this :               \documentclass{myexam}     \begin{document}     \frontmatter     \section{Easy steps}     \section{Advanced steps}     \section*{Appendix}     \end{document}      And the `\frontmatter` macro should print something like : > This text consists of 5 pages plus an appendix of 2 pages. while, in absence of appendix, it should print like : > This text consists of 5 pages. I tried to use labels together with a conditional (`\newif\ifannex` and so on), but it doesn't seem to work. Ideas ?


title: problem with a ledmac command

text: There's something wrong with my style file:               %%%%%%%%%%%%%Start%%%%%%%%%%%%%%%%     \makeatletter     \def\parafootfmt#1#2#3{%     \normal@pars     \parindent=0pt \parfillskip=0pt plus 1fil     {\bf\printlines#1|}%     {\select@lemmafont#1|#2}~%     #3\penalty-10 }     \makeatother          \let\Afootfmt\parafootfmt          %\newcommand{\rhet}[2]{\edtext{#1}{\Afootnote{#2}}}          \newcommand{\rhet}[2]{\edtext{}{\Afootnote{#1~]\ \ #2}}}     \newcommand{\oed}[2]{\edtext{ #1}{\Bfootnote{~]\ \ #2}}}     \footparagraph{A}     \footparagraph{B}     %%%%%%%%%%%%%End%%%%%%%%%%%%%%%      when I use `\rhet{blah}{see X}` "blah" does not appear in the main text This is the preamble of the main document:               % XeLaTeX can use any Mac OS X font. See the setromanfont command below.     % Input to XeLaTeX is full Unicode, so Unicode characters can be typed directly into the source.          % The next lines tell TeXShop to typeset with xelatex, and to open and save the source with Unicode encoding.          %!TEX TS-program = xelatex     %!TEX encoding = UTF-8 Unicode     \documentclass[11pt,oneside]{book}     \usepackage{ledmac}     \usepackage{fancyhdr}     \usepackage{adforn}     \pagestyle{myheadings}     \usepackage{hanging}     \textheight = 180.5 mm     \textwidth = 108.5 mm     \pagenumbering{arabic}          \usepackage{imakeidx}      \makeindex[name=nominum, title=Index nominum, columns=2]     \makeindex[name=rerum, title=Index rerum, columns=2]     \pretolerance=100     \usepackage{microtype}     \input{style}     \raggedbottom               \newcommand*{\LeftWidth}{3.0cm}%     \newcommand*{\RightWidth}{\dimexpr\linewidth-\LeftWidth-2em\relax}%     \newcommand{\AlignedBrace}[2]{%         \medskip\par\noindent%         \parbox{\LeftWidth}{\raggedleft\textbf{#1}\strut~}%         $\left\{~\parbox{\RightWidth}{\strut\textit{#2}\strut}\right.$%     }%               %\usepackage{geometry}                % See geometry.pdf to learn the layout options. There are lots.     %\geometry{a4paper}                   % ... or a4paper or a5paper or ...      %\geometry{landscape}                % Activate for for rotated page geometry     %\usepackage[parfill]{parskip}    % Activate to begin paragraphs with an empty line rather than an indent     \usepackage{graphicx}          \usepackage{amssymb}     \usepackage{amsmath}     %\renewcommand %These two commands are for double-spacing     %\baselinestretch{2}          % Will Robertson's fontspec.sty can be used to simplify font choices.     % To experiment, open /Applications/Font Book to examine the fonts provided on Mac OS X,     % and change "Hoefler Text" to any of these choices.          \usepackage{fontspec,xltxtra,xunicode}     \defaultfontfeatures{Mapping=tex-text}     \setromanfont[Mapping=tex-text]{Brill}     \setsansfont[Scale=MatchLowercase,Mapping=tex-text]{Gill Sans}     \setmonofont[Scale=MatchLowercase]{Andale Mono}     \frenchspacing               \begin{document}


title: XeLaTeX, \includegraphics and \hyperlink

text: I have question regarding XeLaTeX. I have switched from LaTeX to XeLaTeX because I wanted to use ttf fonts and now I have a problem with `\hyperlink`. It works with text, but it doesn't with images. So for example, when I click on the text: Dit hjem, I will go to page 2. It does not work with image. My code:               \documentclass[landscape,a4paper,11pt]{article}      \special{papersize=297mm,210mm}          \usepackage{graphicx}     %\usepackage[pdftex]{graphicx}          \usepackage{hyperref}          \usepackage[danish]{babel}          \DeclareGraphicsExtensions{.png,.pdf,.jpg,.mps}          \usepackage[top=2cm, bottom=2cm, left=3cm, right=3cm]{geometry}     \usepackage[absolute]{textpos}     \pagestyle{empty}          \setlength{\parindent}{0pt}          \usepackage{color}          \hypersetup{         bookmarks=true,         % show bookmarks bar?         unicode=false,          % non-Latin characters in Acrobat’s bookmarks         pdftoolbar=true,        % show Acrobat’s toolbar?         pdfmenubar=true,        % show Acrobat’s menu?         pdffitwindow=false,     % window fit to page when opened         pdfstartview={FitH},    % fits the width of the page to the window         pdftitle={My title},    % title         pdfauthor={Author},     % author         pdfsubject={Subject},   % subject of the document         pdfcreator={Creator},   % creator of the document         pdfproducer={Producer}, % producer of the document         pdfkeywords={keyword1} {key2} {key3}, % list of keywords         pdfnewwindow=true,      % links in new window         colorlinks=false,       % false: boxed links; true: colored links         linkcolor=black,          % color of internal links         citecolor=green,        % color of links to bibliography         filecolor=magenta,      % color of file links         urlcolor=cyan,           % color of external links         pdfnonfullscreenpagemode=true,         linktoc=none,         pdfborder={ 0 0 0}     }               \begin{document}          \hyperlink{page.2}{\includegraphics[height=14.869mm, width=14.869mm]{images/tiger}}      \hyperlink{page.2}{\textblockcolour{white}{\fontsize{3mm}{5mm} \selectfont Dit hjem}}          \null\newpage     Some text          \end{document}


title: Parsing leading hardspaces

text: This question is related to (but distinct from) this question: Parsing a \$ as part of an improved \getargs command, which I asked earlier. I am experiencing a residual space in a string result from which I am trying to remove all spaces, both regular spaces and hardspaces. The routine works great when the argument contains just regular spaces, it works when the argument contains hardspaces not in the leading position. But it fails to remove a leading hardspace. If I lead the argument with multiple hardspaces, it removes all but one. I would like, if possible, to retain this logical approach (recursive) to the problem, since it is fast and it fits into a larger algorithm being developed. I'm not sure what makes a leading hardspace different from other hardspaces, or if my coding merely is not structured to catch a leading space (I thought it was). Here is input (note: re-edited to minimize content for MWE):               \documentclass{article}     \usepackage{ifnextok}     \usepackage{ifthen}     \makeatletter     \def\stringend{$}     \def\add@space{\protected@edef\thestring{\thestring\@sptoken}}     \newcommand\noblanksF[2][v]{%       \def\thestring{}\expandafter\eat@Block#2\stringend%       \if v#1\thestring\fi}      \def\eat@Block{\IfNextToken\stringend%       {\@gobble}%       {\add@tostring{\eat@Block}}%     }     \def\add@tostring#1#2{%       \ifthenelse{\equal{#2}{~}}%         {}%         {\if\@sptoken#2\else\protected@edef\thestring{\thestring#2}\fi}%       #1}     \makeatother     \parindent 0in\def\bl{\rule{1ex}{1ex}}     \begin{document}     Testing noblanks: \\     \bl\noblanksF{This is a test with 0 leading spaces}\bl\\     \bl\noblanksF{ This is a test with 1 leading space}\bl\\     \bl\noblanksF{  This is a test with 2 leading spaces}\bl\\     \bl\noblanksF{  This  is  a  test  with  2  spaces  (lead+everywhere)}\bl\\     FROM HERE OUT, RESULTS LEAVE ONE LEADING SPACE:\\     \bl\noblanksF{~This is a test with 1 leading hardspace}\bl\\     \bl\noblanksF{~~This is a test with 2 leading hardspaces}\bl\\     \bl\noblanksF{~~~This is a test with 3 leading hardspaces}\bl\\     \bl\noblanksF{~~~~This is a test with 4 leading hardspaces}\bl\\     \bl\noblanksF{~~This~~is~~a~~test~~with~~2~~hardspaces~~(lead+everywhere)}\bl     \end{document}


title: Count and use the number of items in advance

text: When writing LaTeX code, I often successively make changes like adding or removing items. I'd like to have TeX count and update the number of items in the list automatically, as in               There are \numItemsNextList ways how a parameter can be given:     \begin{itemize}     \item By a constant expression.     \item By user interaction.     \item From another database.     \end{itemize}      (what happens next is of course that I realize there is yet another way to give a parameter and add it to the list) I could roll out my own preprocessor to just count the number of `\item`-commands in the following `\begin{...} ... \end{...}` block. But is there a TeX solution as well?


title: import/(copy in) math from Pdf

text: Is it possible to import/(copy in) a pdf-file including formulas and math to Lyx while keeping the math unchanged/editable/usable?


title: Changing font size in equations changes superscript size in text (LATeX)

text: I used `\DeclareMathSizes{12}{20}{14}{10}` to make my equations larger than the default output of LATeX (the parameters mean, as far as I understand, {font size}{equation regular text size}{equation superscript size}{supersuperscript size}). However, the superscripts outside the equation environment also became 14pt font! I thought that the `\DeclareMathSizes` command would only affect the content of my equations. Is there a way to change the superscript size in math mode without affecting the parameters for rest of my text? EDIT: Here is a minimal example that reproduces my problem, note that changing the third parameter also influences what happens to the superscript outside the equation. Is this normal? How can I stop this from happening?               \documentclass[12pt,oneside,letterpaper,titlepage]{article}     \DeclareMathSizes{12}{20}{14}{10}          \begin{document}     ...modulation by Ca\textsuperscript{2+}...          \begin{equation}     \sigma^2 = iI - \frac{I^2}{N}     \end{equation}     \end{document}      **SECOND EDIT/FINAL SOLUTION: I ended up following a suggestion to do something much simpler: I just used the `\LARGE` command on my equation. Here's the same example as above, using `\LARGE` instead of `\DeclareMathSizes`:               \documentclass[12pt,oneside,letterpaper,titlepage]{article}          \begin{document}     ...modulation by Ca\textsuperscript{2+}...          \begin{equation}     \LARGE{\sigma^2 = iI - \frac{I^2}{N}}     \end{equation}     \end{document}


title: multi-page two column table in a single column document

text: I have looked through and tried quite a few probable solutions but am unable to get this right. I am posting the best minimal example I currently have of what I am trying to accomplish here. Being new, I am not allowed to post images, so please do copy the two files and compile. I want the title to be at the top of both the sides/columns of the table and also to manage the extra whitespace at the end of table.               \documentclass{article}     \usepackage[left=2cm, top=3cm, right=2cm, bottom=3cm]{geometry}     \usepackage{tabularx}     \usepackage{xtab}          \begin{document}          \section{List}          \topcaption{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}     \label{tab:xxxxx}          \twocolumn          \tablehead{\hline x & x*x \\ \hline}          \begin{xtabular}{| l || c |}     \input{squares.tex}     \end{xtabular}     \end{document}      Data File to test the script above :: squares.tex               101 & 10201 \\     102 & 10404 \\     103 & 10609 \\     104 & 10816 \\     105 & 11025 \\     106 & 11236 \\     107 & 11449 \\     108 & 11664 \\     109 & 11881 \\     110 & 12100 \\     111 & 12321 \\     112 & 12544 \\     113 & 12769 \\     114 & 12996 \\     115 & 13225 \\     116 & 13456 \\     117 & 13689 \\     118 & 13924 \\     119 & 14161 \\     120 & 14400 \\     121 & 14641 \\     122 & 14884 \\     123 & 15129 \\     124 & 15376 \\     125 & 15625 \\     126 & 15876 \\     127 & 16129 \\     128 & 16384 \\     129 & 16641 \\     130 & 16900 \\     131 & 17161 \\     132 & 17424 \\     133 & 17689 \\     134 & 17956 \\     135 & 18225 \\     136 & 18496 \\     137 & 18769 \\     138 & 19044 \\     139 & 19321 \\     140 & 19600 \\     141 & 19881 \\     142 & 20164 \\     143 & 20449 \\     144 & 20736 \\     145 & 21025 \\     146 & 21316 \\     147 & 21609 \\     148 & 21904 \\     149 & 22201 \\     150 & 22500 \\     151 & 22801 \\     152 & 23104 \\     153 & 23409 \\     154 & 23716 \\     155 & 24025 \\     156 & 24336 \\     157 & 24649 \\     158 & 24964 \\     159 & 25281 \\     160 & 25600 \\     161 & 25921 \\     162 & 26244 \\     163 & 26569 \\     164 & 26896 \\     165 & 27225 \\     166 & 27556 \\     167 & 27889 \\     168 & 28224 \\     169 & 28561 \\     170 & 28900 \\     171 & 29241 \\     172 & 29584 \\     173 & 29929 \\     174 & 30276 \\     175 & 30625 \\     176 & 30976 \\     177 & 31329 \\     178 & 31684 \\     179 & 32041 \\     180 & 32400 \\     181 & 32761 \\     182 & 33124 \\     183 & 33489 \\     184 & 33856 \\     185 & 34225 \\     186 & 34596 \\     187 & 34969 \\     188 & 35344 \\     189 & 35721 \\     190 & 36100 \\     191 & 36481 \\     192 & 36864 \\     193 & 37249 \\     194 & 37636 \\     195 & 38025 \\     196 & 38416 \\     197 & 38809 \\     198 & 39204 \\     199 & 39601 \\     200 & 40000 \\


title: Problems with itemize

text: I had the following situation               \begin{itemize}     \item[(A_s)] Item (A_s) such that      \begin{equation}\label{sob}     \sum_{n}n     \end{equation}     \item[(B_s)] Item (B_s)     \end{itemize}      and the result was blank screen. After that I put `$` at the beginning and end of the items               \begin{itemize}     \item[$(A_s)$] Item (A_s) such that      \begin{equation}\label{sob}     \sum_{n}n     \end{equation}     \item[$(B_s)$] Item (B_s)     \end{itemize}      and everything worked fine. I lost a lot of time until I found this. What was the problem?


title: Rounded and shadow for block

text: I have style for my block:               \setbeamertemplate{block begin}{     \vskip.75ex     \begin{beamercolorbox}[leftskip=1em,colsep*=.75ex]{block title}%     \usebeamerfont*{block title}\insertblocktitle     \end{beamercolorbox}%     {\ifbeamercolorempty[bg]{block body}{}{\nointerlineskip\vskip-0.5pt}}%     \usebeamerfont{block body}%     \begin{beamercolorbox}[colsep*=.75ex,sep=.75ex,vmode]{block body}%     \ifbeamercolorempty[bg]{block body}{\vskip-.25ex}{\vskip-.75ex}\vbox{}%     }     \setbeamertemplate{block end}{     \end{beamercolorbox}\vskip1ex     }      Is possible to make it rounded and with shadow?


title: Correct left aligning items in simplecv (LyX)

text: The simplecv class (for LyX), provides the _Itemize_ environment which is defined in `simplecv.layout` as follows:               Style Itemize         Margin                Static         LatexType             Item_Environment         LatexName             itemize         NextNoIndent          1         LeftMargin            MMN         LabelSep              xx         ItemSep               0.2         TopSep                0.7         BottomSep             0.7         ParSep                0.3         Align                 Block         AlignPossible         Block, Left         LabelType             Itemize         LabelString           "*"     End      Using _items_ with the paragraph alignment set to _justified_ (which is the default), produces a visually correct list of items (screenshot below, left). I would like to have an _Left_ alignment. Trying to do so (i.e. changing through LyX' paragraph settings interface), prints the (default) bullet, on its own, and pushes the text in the next line (screenshot below, right)! ![enter image description here](http://i.stack.imgur.com/eiJh2.png)![enter image description here](http://i.stack.imgur.com/carig.png) The complete code, **this time using** `{\raggedright ... \par}`, as seen in LyX' LaTeX Source window reads: % Preview source code               %% LyX 2.0.2 created this file.  For more info, see http://www.lyx.org/.     %% Do not edit unless you really know what you are doing.     \documentclass[english]{article}     \usepackage{charter}     \usepackage[scaled=0.8]{berasans}     \usepackage{beramono}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \usepackage[a4paper]{geometry}     \geometry{verbose,tmargin=1.4cm,bmargin=3cm,lmargin=2cm,rmargin=2.5cm}     \pagestyle{empty}     \setcounter{secnumdepth}{0}     \setcounter{tocdepth}{2}     \setlength{\parskip}{\medskipamount}     \setlength{\parindent}{0pt}     \usepackage{pifont}          \makeatletter     \@ifundefined{date}{}{\date{}}     \AtBeginDocument{       \def\labelitemi{\footnotesize\(\bullet\)}       \def\labelitemii{\footnotesize\(\circ\)}       \def\labelitemiii{\tiny\ding{71}}       \def\labelitemiv{\tiny\ding{75}}     }          \makeatother          \usepackage{babel}     \begin{document}     \begin{itemize}     \item \noindent \begin{flushleft}     {\raggedright Sample text sample text sample text sample text sample     text sample text sample text sample text sample text sample text sample     text sample text sample text sample text sample text sample text sample     text sample text sample text sample text sample text sample text sample     text sample text sample text sample text sample text sample text sample     text sample text sample text sample text sample text sample text sample     text sample text sample text sample text sample text sample text sample     text\par}     \par\end{flushleft}     \item \noindent Sample text sample text sample text sample text sample text     sample text sample text sample text sample text sample text sample     text sample text sample text sample text sample text sample text sample     text sample text sample text sample text sample text sample text sample     text sample text sample text sample text sample text sample text sample     text sample text sample text sample text sample text sample text sample     text sample text sample text sample text sample text sample text sample     text\end{itemize}          \end{document}      The visual result, as seen in a larger screenshot, is an incorrect left aligned item and a correctly justified item: ![incorecct and correct left alingment of item](http://i.stack.imgur.com/Y8vlL.png) How is it possible to achieve a _correct_ Left alignment? Are the `Align`, `AlignPossible` instructions in `simplecv.layout` related? [Question to self: did I touch some other, global, setting which affects the behaviour in question?]


title: Compilation of LaTex in Windows? With TeXnicCenter or other software?

text: I am forced to use Windows -machine during certain classes, software provided by this party here. I have earlier compiled things through SSH but now trying to use Tex -softwares built for Windows working such as TeXnicCenter and some compiler but it apparently misses the compiler. I am now trying to install the MikTex -LaTex-compiler for Windows but `"initexmf.exe: Windows API error 5: Access is denied."` so my system -admistrators apparently not allowing me to compile LaTex in Windows. >   1. So how can I get the PDF -document out of this GUI -tool? > >   2. When I build, the "build output" is empty. Why? > > ![enter image description here](http://i.stack.imgur.com/sPTJv.jpg) **Perhaps related** >   1. Perhaps useful for the MikTex -error: Windows API error 5: "Access is > denied" when trying to compile TikZ picture and here. >


title: Combining report and apa6 class for a dissertation

text: I am a complete newcomer to LaTeX. Here is what I am attempting to do - combine a thesis template (made with the `report` class) with a template based on the `apa6` class. In other words, I need the following front matter from the thesis template (title page, abstract, dedication, acknowledgements, table of contents [including roman page numbering beginning on page iii]) and the following items from the `apa6` class template (APA style headings, reference styles, running heads, etc. (with arabic numbering beginning with the first page of chapter 1) for everything else. The thesis code is located here. The `apa6` template is found in the `apa6` documentation, in particular the `shortsample.tex` file that comes with `apa6.cls`. Any pointers here? What I should try? Where I should look next?


title: Proper page size for slides

text: I'm just going to use the standard `article` class to create my slides manually. The question is, what pagesize is appropriate, and why? Should I take into account my projector's resolution and/or the laptop's resolution? How should I set a custom pagesize, in case I need a substandard one? Actually: I used a projector at school once and gave a presentation of slides created with Beamer. It worked fine (although I'm not sure I could have improved the resolution to better fit the projector/laptop). How can I bring the default Beamer pagesize over to the `article` class? That might work too.


title: What is the proper way of citing/referencing an external image/document file?

text: I'm writing a paper in latex and I have some tables and image files that are too big to fit on the page, so I wanted to just include them as extra files with the paper and reference them through the bibliography (I'm using BibTex). Is there a "proper" way to do this? How would an entry in the .bib file that cites an external file look? I've only cited other papers so far, I can't find out how to reference to an external file.


title: hf-tikz doesn't box around equation

text: In TikZ based \boxed construct is causing pdflatex to hang it was suggested to use hf-tikz instead of manually using tikz. The documentation indicates that this package doesn't work properly for tall formulas like \frac{}'s. Sure enough, it doesn't, as illustrated in the following:               \documentclass{article}          \usepackage{hf-tikz}          \begin{document}          \[\tikzmarkin{a}x + y = 400\tikzmarkend{a}\]          \[     \tikzmarkin{z2}     \int_{     E - \frac{\Delta}{2} \le H \le E + \frac{\Delta}{2} \le H     }      d^{3N} x d^{3N} p     =     \left( \frac{2 \pi \Delta}{\omega} \right)^{3N}     \tikzmarkend{z2}     \]          \end{document}      This looks like ![hf-tikz example output](http://i.stack.imgur.com/UFZ6e.png) Why is the manual offsetting that is suggested in the hf-tikz required, when a simple `\boxed` is able to figure out the dimensions to use? How can the box sizing be automated?


title: Concatenating/appending to macro in loop

text: I have looked through answers on this forum that did bring me closer to the solution of the problem stated above, but both the approach via `\xdef` and via `\g@addto@macro` give errors or wrong results. What I want to do is to define a macro with an optional argument that is parsed in a loop: the input `\gttest[Mg=x,Fe=y,Ca=z]` is supposed to create a chemical formula of the form Mg_x Fe_y Ca_(1-x-y); spaces and parens are given here for clarity only and don't appear in the actual output. Here is the code (part of a .sty file):               \RequirePackage{xspace}     \RequirePackage{xstring}     \RequirePackage{ifthen}     \RequirePackage{fp-eval}     \RequirePackage{twoopt}     % preliminaries for the components     \newcommand{\@sublow}{\vphantom{A}}     \newcommand{\@chem}[2]{%     \ifthenelse{\equal{#2}{1}}{#1}{%     \ensuremath{\mathrm{#1}\@sublow_{#2}}}}     \newcommand{\@GCresb}{}     \newcommand{\@GCresc}{}     \newcommand{\@GCtmpa}{}     \newcommand{\@GCtmpb}{}     \newcommand{\@GCtmpc}{}     \newcommand{\@GCtmpd}{}     \newcounter{isscmp}     \newcounter{jsscmp}     \newcounter{lsscmp}     \newcounter{nsscmp}     % the actual macro     \newcommand{\gttest}[1][]{%     \StrCount{#1}{=}[\nsscmp]%     \setcounter{lsscmp}{\nsscmp}%     \setcounter{isscmp}{0}%     \setcounter{nsscmp}{1}%     \renewcommand{\@GCtmpa}{}%     \renewcommand{\@GCresc}{}%     \whiledo{\value{nsscmp}<\value{lsscmp}\OR\value{nsscmp}=\value{lsscmp}}{%     \ifthenelse{\value{nsscmp}<\value{lsscmp}}{%     \StrPosition[\thensscmp]{#1}{,}[\jsscmp]%     \StrMid{#1}{\value{isscmp}+1}{\numexpr\jsscmp-1}[\@GCtmpb]}{%     \StrGobbleLeft{#1}{\value{isscmp}}[\@GCtmpb]}%     \StrBefore{\@GCtmpb}{=}[\@GCtmpc]%     \StrBehind{\@GCtmpb}{=}[\@GCtmpd]%     \ifthenelse{\value{nsscmp}<\value{lsscmp}}{%     % all but last comp.: use given subscript and accumulate     \xdef\@GCresc{\@GCresc-\@GCtmpd}%     \renewcommand{\@GCresb}{\@chem{\@GCtmpc}{\@GCtmpd}}}{%     % last comp.: apply closure condition \sum x_i=1     \renewcommand{\@GCresb}{\@chem{\@GCtmpc}{1\@GCresc}}}%     \xdef\@GCtmpa{\@GCtmpa\@GCresb}% <-- causes Incomplete iffalse     %\g@addto@macro\@GCtmpa{\@GCresb}% <-- produces wrong result     \setcounter{isscmp}{\jsscmp}%     \stepcounter{nsscmp}}%     \@GCtmpa}      In this form, the code throws an error: > ! Incomplete \iffalse; all text was ignored after line 5. > > \fi > > <*> mytest If I comment the `xdef` line signaled with the <-- and uncomment the following line with the `g@addto...` instead, it runs smoothly but the result is Ca_(1-x-y) Ca_(1-x-y) Ca_(1-x-y) So - why doesn't this work? I have no idea where an incomplete if clause would be in the first variant nor how the last appendage gets to be repeated three times in the second variant, although the argument is correctly parsed.


title: Change hyphenation patterns only for a chapter

text: I am currently writing a book in Italian using LyX and I use               \usepackage[italian]{babel}      in the preamble. However, I need to write a chapter of this book in a different language. How can I change the hyphenation only for this chapter to English?


title: Getting Atbegshi to start on first page and reset content when overwritten

text: I'm trying to add titles at a specific location (over a letterhead) for a number of pages (1-2) and then add a new title to the following 2. I have two problems. First `AtBegShi` starts at the second page `\AtBeginShipoutFirst` doesn't fix this, and secondly `\AtBeginShipoutDiscard` doesnt reset `AtBegShi` so it has Rhubarb and Custard superimposed. Any thoughts on this would be extremely gratefully received. thanks               \documentclass[10pt]{article}     \usepackage{atbegshi}     \usepackage{textpos}     \AtBeginShipoutInit          \def\mycontent{rhubarb}          \AtBeginShipout{         \begin{textblock}{6}[0,0](0.1,-0.15)         \mycontent         \end{textblock}         }         \AtBeginShipoutFirst{         \begin{textblock}{6}[0,0](0.1,-0.15)         \mycontent         \end{textblock}         }          \begin{document}          blah     \newpage     blah     \newpage     \def\mycontent{custard}          blah     \newpage     blah     \end{document}


title: Beamer navigation dots

text: I'm writing a presentation using the `Beamer` class, I wonder if it is possible to keep the navigation dots filled (using the outertheme `miniframes` or `smoothbars`) once I've passed that slide. An example (I've picked the `Frankfurt` theme at random, any other theme will do):               \documentclass{beamer}     \usetheme{Frankfurt}     \useoutertheme{miniframes}     \usepackage{remreset}          \makeatletter     \@removefromreset{subsection}{section}     \makeatother          \setcounter{subsection}{1}          \begin{document}     \section{Test}     \frame{one}     \frame{two}     \frame{three}     \end{document}      As you can see, in the first slide the first dot is full while the others are blank, in the second one the middle dot is full, on the last slide the last dot is full. I would like the first slide to have the first dot full, the second one to have the first two dots full, etc..


title: Turning off line-wrapping in auctex for smooth transition with ess in same file

text: I sometimes use auctex + ess for Sweave/knitr documents. Every time I switch from auctex to ess and vice versa, there is a pause/jolt while the auctex lines re-wrap themselves. Previously, I also had outline/folding modes turned on which made it nearly unusable, but after turning those off I think I only have auctex's line wrapping feature keeping me from making a smooth transition between the two environments (in the same file/buffer). How can I turn off this line-wrapping feature and keep it turned off? I assume it is associated with some hook; turning it off manually will not work because it will immediately re-initiate itself once I switch back from the ess to auctex environment.


title: Error compiling .Rnw in TeXstudio (knitr with PdfLaTeX)

text: I´ve been trying to get the minimal Demofile for knitr running and compiling in TeXstudio, but I keep getting errormessages. Here´s the info, mybe somebody can help me out about what I´m doing wrong: I´m compiling this example file from the knitr website:               \documentclass{article}          \begin{document}          Here is a code chunk.          <<foo, fig.height=4>>=     1+1     letters     chartr('xie', 'XIE', c('xie yihui', 'Yihui Xie'))     par(mar=c(4, 4, .2, .2)); plot(rnorm(100))     @          You can also write inline expressions, e.g. $\pi=\Sexpr{pi}$, and \Sexpr{1.598673e8} is a big number.          \end{document}      I have this added in my Builds as a user command in TeXstudio:               knitr:knitr   "C:/Program Files/R/R-3.0.2/bin/Rscript.exe" -e "library(knitr, lib.loc='C:/Users/User/Documents/R/win-library/3.0'); knit2pdf('%.Rnw')"      (based on the info here http://yihui.name/knitr/demo/editors/#comment-784855735 and here http://yihui.name/knitr/demo/editors/ ) Now when compiling I get the error               Couldn´t start Build & View:PdfLaTeX:"C:Program Files (x86)/MikTeX 2.9/miktex/bin/pdflatex.exe" -synctex=1 - interaction=nonstopmode "002-minimal".tex .      and when I hit Ok, it says:               Logfile not found!      TeXstudio works fine with simple .tex-documents. So what am I missing here? Thanks in advance!


title: Split circle in tikz unevenly

text: How can split circle (tikz shape circle) in two parts. However, I would like the split to be uneven i.e. the top part occupy lets say 30% of the area and lower part the rest 70%. Thanks


title: How to make a semi - shading stripe in resume with LaTeX

text: I want to make some semi-shading strips in resume to highlight each field, like this image: ![enter image description here](http://i.stack.imgur.com/Nvacm.png) However, the template code which I use is as below:               \newcommand{\resitem}[1]{\item #1 \vspace{-2pt}}     %     \newcommand{\resheading}[1]{%      \vspace{8pt}      \parbox{\textwidth}{%       \setlength{\FrameSep}{\outerbordwidth}        \begin{shaded}        \setlength{\fboxsep}{0pt}        \framebox[\textwidth][l]{%         \setlength{\fboxsep}{4pt}         \fcolorbox{shadecolorB}{shadecolorB}{%          \textbf{\sffamily{\mbox{~}\makebox[6.762in][l]{\large #1}\vphantom{p\^{E}}}}%         }%        }%       \end{shaded}      }%      \vspace{-10pt}%     }     %     \resheading{Education}      and the result looks like this: ![enter image description here](http://i.stack.imgur.com/0CBay.png) Could you tell me how to change this template code in order to get the first picture above? I tried several times, but all failed. ////////////////////////////////////////////////////////////////////////////////////// The full title and package used in this template is as below:               \documentclass[letterpaper,13pt]{article}          \newlength{\outerbordwidth}          \pagestyle{empty}          \raggedbottom          \raggedright          \usepackage[svgnames]{xcolor}          \usepackage{framed}          \usepackage{tocloft}          %-----------------------------------------------------------          \setlength{\outerbordwidth}{1pt}  % Width of border outside of title bars          \definecolor{shadecolor}{gray}{0.75}  % Outer background color of title bars (0 = black, 1 = white)          \definecolor{shadecolorB}{gray}{0.93}  % Inner background color of title bars          %-----------------------------------------------------------          %Margin setup          \setlength{\evensidemargin}{-0.25in}          \setlength{\headheight}{-0.25in}          \setlength{\headsep}{0in}          \setlength{\oddsidemargin}{-0.25in}          \setlength{\paperheight}{11in}          \setlength{\paperwidth}{8.5in}          \setlength{\tabcolsep}{0in}          \setlength{\textheight}{10in}          \setlength{\textwidth}{7in}          \setlength{\topmargin}{-0.3in}          \setlength{\topskip}{0in}          \setlength{\voffset}{0.1in}          \setlength{\parskip}{1pt plus 1pt minus 1pt}


title: Why does standalone not detect the TikZ crop correctly?

text: This small example               \documentclass{standalone}     \usepackage{xltxtra,textcomp,graphicx,color,tikz}     \usepackage[absolute,overlay]{textpos}     \begin{document}     \begin{tikzpicture}         \clip (0,0) rectangle (12.8cm, 1.15cm);         \draw (0,0) grid (12.8cm, 1.15cm);     \end{tikzpicture}     \end{document}      generates this output: ![output](http://i.stack.imgur.com/8MwY3.png) Where is the margin / extra space on the left side coming from, and how can I remove it? Shouldn't `\clip` take care of that?


title: Could not change level separator

text: When I use XePersian package the following code does not work to set `-` instead of `.` as separator in headers?               \documentclass{book}          \renewcommand{\thesection}{\arabic{chapter}-\arabic{section}}     \usepackage{xepersian}     \begin{document}          \chapter{First}          \section{Test}          \end{document}


title: Create macro from fairly complex pgfplots code

text: I have this pgfplots code that takes data from a file `mydata.tsv` and creates a bar plot. Now I would like to transform it into a macro in order to use it for several files.               \pgfplotstableread[col sep=tab]{mydata.tsv}\datatable     \makeatletter     \pgfplotsset{         /pgfplots/flexible xticklabels from table/.code n args={3}{             \pgfplotstableread[#3]{#1}\coordinate@table             \pgfplotstablegetcolumn{#2}\of{\coordinate@table}\to\pgfplots@xticklabels             \let\pgfplots@xticklabel=\pgfplots@user@ticklabel@list@x         }     }     \makeatother          \begin{tikzpicture}     \begin{axis}[     ybar,     ymin=0,     ylabel=\si{\micro\second},     flexible xticklabels from table={mydata.tsv}{stage}{col sep=tab},     xticklabel style={rotate=90, anchor=east},     xtick=data]     \addplot       plot [error bars/.cd, y dir=both, y explicit]       table[x expr=\coordindex, y=mean, y error=error]{\datatable};     \end{axis}     \end{tikzpicture}      After looking at some introduction to macros, I tried this:               \newcommand{\myplot}[1]{         % same code as above, with "mydata.tsv" replaced by "#1"     }     \myplot{mydata1.tsv}     \myplot{mydata2.tsv}      But I got the following error:               Package pgfplots Error: Sorry, could not retrieve column 'stage' from table '{stage}{mean}{error}@table'.      I am assuming that there is some problem with the existing `#1`,`#2`,`#3` in my code, I also tried replacing those by `##1`,`##2`,`##3`, but that didn't help (same error). EDIT: this is what the data from `mydata.tsv` looks like:               stage   mean        error     One     27.19143    0.274788478838     Two     27.83391    0.354268822434     Three   87.15405    0.437466618964      (separated by tabs, probably not rendered correctly by stackexchange)


title: Draw in cylindrical and spherical coordinates

text: I can try to draw this in TikZ: ![first image](http://i.stack.imgur.com/YIaiT.jpg) ![second image](http://i.stack.imgur.com/njnQm.jpg) I managed to draw the coordinate axis. The first image is in cylindrical coordinates and the second in spherical coordinates. I don't know draw in spherical coordinate system, the arrow labels, curved lines, and many other things. I have started to read the manual of Till Tantau, but for now I'm a newbie with TikZ and I don't understand many things of this manual.


title: crash of tikz-uml and pgf-umlcd

text: I am stuck with inheritance diagram using `pgf-umlcd`. I am using both `pgf- umlcd` and `tikz-uml`. There is no error but the inherited line is not showing.               \documentclass[a4paper,10pt]{book}     \usepackage{tikz-uml}     \usepackage{pgf-umlcd}     \begin{document}     \begin{figure}[H]     \centering          \begin{tikzpicture}       \begin{abstractclass}[text width=5cm]{Shape}{0,0}       \end{abstractclass}            \begin{class}[text width=4cm]{Rectangle}{-3,-3}         \inherit{Shape}       \end{class}            \begin{class}[text width=4cm]{Ellipse}{3,-3}         \inherit{Shape}       \end{class}       \begin{class}[text width=4cm]{Circle}{3,-6}         \inherit{Ellipse}       \end{class}          \end{tikzpicture}     \end{figure}     \end{document}


title: Invisible character equal to the height of capital letters

text: > **Possible Duplicate:**   >  How do I create an invisible character? How can I insert an invisible character (similar to `\strut`) which has a width of zero (won't impact word or letter spacing) and has a height equal to the height of an uppercase letter in currently selected font?


title: Whitespace as wide as a character

text: I would like to produce whitespace as wide as a particular character. One trick I have figured out is to use `{\color{white} x}` (if for example this would produce whitespace as wide as the character x) with the color package. However, this is problematic, as when I create a `pdf` (e.g. using `pdflatex`), the character will still be there, so that if a user copies some text they have selected including the "invisible" character, they will also copy that character. Are there better methods to accomplish what I want?


title: Adding spaces inside a math expression

text: I want to my statement to say u = g in Omega. I tried coding `$$u=g in \Omega$$`, but this results in no spaces around the word 'in'. How can I insert them?


title: Draw circle perpendicular to line

text: I was trying to create a circumference perpendicular to a line similar to this ![enter image description here](http://i.stack.imgur.com/3dQlE.png) but I only see a tutorial for creating in a axis-plane (xy, xz, yz)               \documentclass[tikz, border=15mm]{standalone}     \usetikzlibrary{arrows,calc, decorations.markings, intersections}          \begin{document}          \begin{tikzpicture}[scale=.8]     \draw (0,0,0) -- (xyz cs:x=6);     \draw (0,0,0) -- (xyz cs:y=6);     \draw[name path=axe] (.5,.5)--(5,5);     %     \node[inner sep=0, outer sep=0] at (1,2) (a) {};     \node[inner sep=0, outer sep=0] at (2,3.5) (b) {};     \node[inner sep=0, outer sep=0] at (3,5) (c) {};     \node[inner sep=0, outer sep=0] at (4,4) (d) {};     \node[inner sep=0, outer sep=0] at (4,2.5) (e) {};     \node[inner sep=0, outer sep=0] at (3,1) (f) {};     %     \shadedraw[name path=mold,inner color=brown!10,outer color=brown!70,draw=brown!70]      plot [smooth cycle, tension=.8] coordinates { (a) (b) (c) (d) (e) (f)};     %     \draw [dashed, name intersections={of=axe and mold}]     (intersection-1) --(intersection-2);     \fill [name intersections={of=axe and mold}]     (intersection-1) circle (2pt)     (intersection-2) circle (2pt)     (2.2,2.2) circle (2pt)     (3.2,3.2) circle (2pt);     \end{tikzpicture}     \end{document}


title: change the itemize from bullet to square

text: I am trying to change the itemize symbols. Using               \begin{itemize}      \renewcommand{\labelitemi}{$\blacksquare$}       \item  An extensively analysis      \end{itemize}      the problem is the dimension of the square. it is quite big with respect the bullet one. Any idea about that?


title: Math Graph Symbols, Characters, or Glyphs in LaTeX

text: I'm trying to qualitatively describe an equation and would like to do so by using little pictures of the functions involved. Therefore, I am looking for glyphs or a way of drawing cute little pictures of a sine wave, a gaussian, a logistic (or sigmoid) function, and a step function. Any thoughts?


title: Insert a url in a footnote

text: I would like to insert a url in a footnote but that isn't working. I use the following code :               \documentclass[a4paper,11pt,final]{article}     \usepackage{color}     \usepackage[usenames,dvipsnames,svgnames,table]{xcolor}     \usepackage{fancyhdr}     \usepackage[french]{babel}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{setspace}     \usepackage{url}     \usepackage[french]{varioref}     \usepackage[pdftex]{graphicx}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{eurosym}     \usepackage{amsmath}     \usepackage{ucs}     \usepackage{caption}     \usepackage{pdfpages}     \usepackage{enumitem}     \renewcommand{\FrenchLabelItem}{\textbullet}     \usepackage{wrapfig}     \usepackage{multirow}     \usepackage{supertabular}     \setlength{\doublerulesep}{\arrayrulewidth}     \usepackage[left=3cm, right=2.5cm, top=2.65cm, bottom=2.65cm]{geometry}     \pagestyle{fancy}     \fancyhead[LO]{}     \usepackage{hyperref}      and the problem is in this "sentence" :               \,\footnote{La vidéo réalisée à l'effet du projet Arqana Racing Club est visible sur le lien suivant : \url{http://www.youtube.com/watch?feature=player_embedded&v=5o0t29uwTQc#!}}      Could you help me please ?


title: LaTeX Combined hyper reference and footnote lacks verbatim argument behaviour

text: > **Possible Duplicate:**   >  Getting those %#!^& signs in the footnote! Here's my first version of a clever command for URL-footnotes. It combines `pdftex`'s hyperlink behaviour with a `\footnote` displaying the URL.               \usepackage[pdftex]{hyperref}     \newcommand{\hrefn}[2]{\href{#1}{#2}\footnote{See {\tt #1}}} %HyperRef and Footnote in one      However it doesn't treat the input as verbatim as `\href` does. How do I **prevent** my command `\hrefn` from treating characters such as `#` and `~` as special control characters? I already `\usepackage{underscore}` so `_` are not a problem. /Nordlöw


title: How can I include underscores in a footnote?

text: > **Possible Duplicate:**   >  Getting those %#!^& signs in the footnote! I'm trying to do               \footnote{http://en.wikipedia.org/wiki/The_Wisdom_of_Crowds}      And it appears to be breaking because of the underscores               \footnote{http://en.wikipedia.org/wiki/TheWisdomofCrowds}      Seems fine. How can I fix this?


title: PDF Bookmark hierarchy incorrect

text: I'm having the same problem as that noted in This question: namely, the pdf bookmarks are incorrect, with some sections incorrectly subsumed under others. However, the code that I'm using is somewhat different, so I'm not sure if the same solution applies. The appearance in the actual document is exactly as I'd like it to be, but I'd like the bookmarks to be correct as well. Below is a MWE. The problem is presumably due to the addcontentsline.               \documentclass{book}     \usepackage[english]{babel}     \usepackage{blindtext}     \usepackage[hidelinks]{hyperref}               \begin{document}          \tableofcontents     \chapter{First}          \section{introduction}          \blindtext          \newpage      \vspace*{\fill}          {      \addcontentsline{toc}{section}{\protect\numberline{}APPENDICES}     \Huge     \begin{center}  \textbf{APPENDICES}     \end{center}     }     \vspace*{\fill}     \newpage      test     \subsection*{Appendix A}     \addcontentsline{toc}{subsection}{\protect\numberline{}APPENDIX A}     \blindtext          \subsection*{Appendix B}     \addcontentsline{toc}{subsection}{\protect\numberline{}APPENDIX B}     \blindtext     \chapter{Second}          \section{Introduction}          \blindtext          \end{document}


title: PSTricks doesn't work in Linux

text: I'm tryng to compile in Linux (Ubuntu 12.04 + Texlive-full) a document using `latex>dvips>ps2pdf`. This document include graphics in .eps and has a pspicture code. When I compile this document in Windows (with MikTek distribution); i don't have any problem; but, when i try in Ubuntu, the document doesn't compile correctly: Don't recognize the .eps file and the pspicture code, and print in the document expressions like               psset],pst-gradfillcolor=white %For .eps file     psset],pst-gradshowgrid=falsepsset].... %For pspicture.      The info about the error is (token from .log file)               (./Portada.tex     LaTeX Font Info:    Try loading font information for U+txsya on input line 4.     (/usr/share/texmf-texlive/tex/latex/txfonts/utxsya.fd     File: utxsya.fd 2000/12/15 v3.1     )     LaTeX Font Info:    Try loading font information for U+txsyb on input line 4.          (/usr/share/texmf-texlive/tex/latex/txfonts/utxsyb.fd     File: utxsyb.fd 2000/12/15 v3.1     )     LaTeX Font Info:    Try loading font information for U+rsfs on input line 4.          (/usr/share/texmf-texlive/tex/latex/jknapltx/ursfs.fd     File: ursfs.fd 1998/03/24 rsfs font definition file (jk)     )     LaTeX Font Info:    Try loading font information for U+txmia on input line 4.          (/usr/share/texmf-texlive/tex/latex/txfonts/utxmia.fd     File: utxmia.fd 2000/12/15 v3.1     )     LaTeX Font Info:    Try loading font information for U+txsyc on input line 4.          (/usr/share/texmf-texlive/tex/latex/txfonts/utxsyc.fd     File: utxsyc.fd 2000/12/15 v3.1     )     File: Logo/FCFM.eps Graphic file (type eps)     <Logo/FCFM.eps>     LaTeX Font Info:    Try loading font information for OT1+txss on input line 8.          (/usr/share/texmf-texlive/tex/latex/txfonts/ot1txss.fd      File: ot1txss.fd 2000/12/15 v3.1     )     LaTeX Font Info:    Font shape `OT1/txss/m/n' will be     (Font)              scaled to size 10.40245pt on input line 8.     LaTeX Font Info:    Font shape `OT1/txss/m/n' will be     (Font)              scaled to size 9.49997pt on input line 8.     LaTeX Font Info:    Font shape `OT1/txss/m/n' will be     (Font)              scaled to size 8.54997pt on input line 9.     File: Logo/DIMEC.eps Graphic file (type eps)     <Logo/DIMEC.eps>)     (./Indice.tex [1          ] (./T1RT.toc)     \tf@toc=\write5     \openout5 = `T1RT.toc'.          [1]) (./p1.tex               [1]     LaTeX Font Info:    Try loading font information for OT1+txtt on input line 42.          (/usr/share/texmf-texlive/tex/latex/txfonts/ot1txtt.fd     File: ot1txtt.fd 2000/12/15 v3.1     )) (./p2.tex          Package Fancyhdr Warning: \headheight is too small (12.0pt):      Make it at least 20.48752pt.     We now make it that large for the rest of the document.     This may cause the page layout to be inconsistent, however.          [2] (./p2factor.tex     ! Argument of \begin has an extra }.     <inserted text>                  \par      l.4 \begin           {pspicture}(0,-3.1154687)(6.0146875,3.1154687)     I've run across a `}' that doesn't seem to match anything.     For example, `\def\a#1{...}' and `\a}' would produce     this error. If you simply proceed now, the `\par' that     I've just inserted will cause me to report a runaway     argument that might be the root of the problem. But if     your `}' was spurious, just type `2' and it will go away.          Runaway argument?     ! Paragraph ended before \begin was complete.     <to be read again>                        \par      l.4 \begin              {pspicture}(0,-3.1154687)(6.0146875,3.1154687)     I suspect you've forgotten a `}', causing me to apply this     control sequence to too much text. How can we recover?     My plan is to forget the whole thing and hope for the best.               ! Package keyval Error: [ undefined.          See the keyval package documentation for explanation.     Type  H <return>  for immediate help.     ...                                                        l.7 ...r=color17b](3.176875,-2.3004687)(0.24,0.16)          Your command was ignored.     Type  I <command> <return>  to replace it with another command,     or  <return>  to continue without it.               ! Package keyval Error: [ undefined.          See the keyval package documentation for explanation.     Type  H <return>  for immediate help.     ...                                                        l.8 ...or=color17b](3.156875,1.6195313)(2.36,0.84)          Your command was ignored.     Type  I <command> <return>  to replace it with another command,     or  <return>  to continue without it.               ! Package keyval Error: [ undefined.          See the keyval package documentation for explanation.     Type  H <return>  for immediate help.     ...                                                        l.9 \psdots[dotsize=0.12](                           3.176875,1.6395313)     Your command was ignored.     Type  I <command> <return>  to replace it with another command,     or  <return>  to continue without it.               ! Package keyval Error: [ undefined.          See the keyval package documentation for explanation.     Type  H <return>  for immediate help.     ...                                                        l.10 ...04cm,linestyle=dashed,dash=0.16cm 0.16cm](                                                   3.176875,1.5995313)(3.1768...          Your command was ignored.     Type  I <command> <return>  to replace it with another command,     or  <return>  to continue without it.               ! Package keyval Error: [ undefined.          See the keyval package documentation for explanation.     Type  H <return>  for immediate help.     ...                                                        l.11 \psline[linewidth=0.04cm](                                3.196875,0.77953124)(3.176875,-2.3204687)     Your command was ignored.     Type  I <command> <return>  to replace it with another command,     or  <return>  to continue without it.               ! Package keyval Error: [ undefined.          See the keyval package documentation for explanation.     Type  H <return>  for immediate help.     ...                                                        l.12 ...ecolor=red](3.146875,1.5895313)(1.55,0.55)          Your command was ignored.     Type  I <command> <return>  to replace it with another command,     or  <return>  to continue without it.               ! Package keyval Error: [ undefined.          See the keyval package documentation for explanation.     Type  H <return>  for immediate help.     ...                                                        l.13 \psline[linewidth=0.04cm,linecolor=color49](                                                  3.196875,-2.3004687)(4.5768...          Your command was ignored.     Type  I <command> <return>  to replace it with another command,     or  <return>  to continue without it.               ! Package keyval Error: [ undefined.          See the keyval package documentation for explanation.     Type  H <return>  for immediate help.     ...                                                        l.14 ...3.196875,-1.2804687){1.08}{49.76364}{90.0}          Your command was ignored.     Type  I <command> <return>  to replace it with another command,     or  <return>  to continue without it.               ! Package keyval Error: [ undefined.          See the keyval package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.15 ...cm 2.0,arrowlength=1.4,arrowinset=0.0]{->}                                                   (3.156875,1.6195313)(2.276...          Your command was ignored.     Type  I <command> <return>  to replace it with another command,     or  <return>  to continue without it.          ! Argument of \language@active@arg> has an extra }.     <inserted text>                  \par      l.15 ...cm 2.0,arrowlength=1.4,arrowinset=0.0]{->}                                                   (3.156875,1.6195313)(2.276...     I've run across a `}' that doesn't seem to match anything.     For example, `\def\a#1{...}' and `\a}' would produce     this error. If you simply proceed now, the `\par' that     I've just inserted will cause me to report a runaway     argument that might be the root of the problem. But if     your `}' was spurious, just type `2' and it will go away.          Runaway argument?     ! Paragraph ended before \language@active@arg> was complete.     <to be read again>                     \par      l.15 ...cm 2.0,arrowlength=1.4,arrowinset=0.0]{->}                                                   (3.156875,1.6195313)(2.276...     I suspect you've forgotten a `}', causing me to apply this     control sequence to too much text. How can we recover?     My plan is to forget the whole thing and hope for the best.      PD: I'm Texmaker user; but, i don't know how to compile in terminal


title: \cite that tolerates whitespace?

text: Is there a package that provides a variant of the `\cite` command that tolerates arbitrary whitespace? That is, I would like to be able to write something like               \cite{foo, bar, baz}      or               \cite{         foo, bar, baz,         baf, bah, bam     }      without any ill effect. To keep things interesting, it should work flawlessly with other commonly used packages such as `cite`, `natbib`, and `hyperref`, and it should also work _without_ those packages. * * * **Edit:** Examples... test.bib:               @MISC{bar,         author={Bar Bar},         title={Bar},         year={1988}     }          @MISC{foo,         author={Foo Foo},         title={Foo},         year={1988}     }      * * * test1.tex:               \documentclass{article}     \usepackage[numbers,sort&compress]{natbib}          \begin{document}         \cite{foo, bar }.              \bibliographystyle{plain}         \bibliography{test}     \end{document}      Here `pdflatex test1` works OK but `bibtex test1` gives the following error:               White space in argument---line 2 of file test1.aux      : \citation{foo,bar      :                   }     I'm skipping whatever remains of this command      * * * test2.tex:               \documentclass{article}          \begin{document}         \cite{foo, bar }.              \bibliographystyle{plain}         \bibliography{test}     \end{document}      Again, `pdflatex test2` works OK but `bibtex test2` produces the following error:               White space in argument---line 3 of file test2.aux      : \citation{bar      :               }     I'm skipping whatever remains of this command      * * * test3.tex:               \documentclass{article}     \usepackage{cite}          \begin{document}         \cite{foo, bar }.              \bibliographystyle{plain}         \bibliography{test}     \end{document}      This seems to work fine! But naturally it has all the side-effects of the `cite` package as well, which isn't always compatible with other packages.


title: Spurious blank space when adding a member to a database within \foreach

text: The MWE adds blank space proportional to the maximum value of the `\foreach` iteration: ![enter image description here](http://i.stack.imgur.com/p7onr.png) Why is this and how do I eliminate this additional space? ## Note:   * This problem seems similar to an earlier issue I had earlier in Text being output when none should be, but I don't know how to resolve this issue.   * I am guessing this is some sort of expansion related issue as `\dtlexpandnewvalue` is required to get the correct output from the database. ## Code:               \documentclass{article}          \usepackage{pgffor}     \usepackage{datatool}     \usepackage{showframe}          \newcommand*{\InitalizeDB}[1]{%          \DTLifdbexists{#1}%             {\DTLcleardb{#1}}% DB exists, so just clear it             {\DTLnewdb{#1}}%   DB does not exist, so create it     }%     \newcommand*{\AddMemberToDB}[3]{%         % #1 = name of DB         % #2 = db key to be used         % #3 = member to be added to DB         \dtlexpandnewvalue%         \DTLnewrow{#1}%         \DTLnewdbentry{#1}{#2}{#3}%     }%                    \begin{document}     \InitalizeDB{MyDB}     \noindent     abc%     \foreach \x in {2,...,7} {%         \AddMemberToDB{MyDB}{MyDBKey}{\x}%     }%     def          \bigskip\noindent     Database:\par     \DTLdisplaydb{MyDB}     \end{document}


title: Packages that need to be included in a specific order

text: This isn't a real question, so I'm marking it community wiki. When I was new to LaTeX, I thought that the `\usepackage` command worked much like the `#include` command of the C language: just put whatever you need in the preamble, in whatever order you like. But then bugs began to bite me and I realised, with growing horror, that commutative packages seem to be the exception rather than the rule. They appear so often that I think it would be useful to have a list here of problematic interactions between pairs of packages, and their correct order. Also, a question for amusement: I want to know if there exists three packages `A`, `B` and `C`, such that `A` has to be included before `B` and `B` needs to be included before `C`, but `C` needs to be included before `A`.


title: Disable moderntimeline functionality without rewriting content

text: For some positions I'd like to apply to I'm not brave enough to use moderntimeline. Is it possible to disable the timeline part and fall back to just numerical date ranges without having to rewrite the relevant parts?


title: Biblatex, print ISBN field in MISC entry type

text: Is it possible to force print `isbn` field in `misc` entry type? I've set `biblatex` to               \usepackage[authordate,backend=bibtex]{biblatex-chicago}      I've tried to do it with               \AtEveryBibitem{\ifentrytype{misc}{\csappto{blx@bbx@\thefield{url}}{\printfield{isbn}}}}      It will compile, but `isbn` is not added. Maybe it needs `biber` backend, but I need `bibtex` solution. It works without `blx@bbx@`, but adds `isbn` before entry. Edit: Ok now it looks I'm fine with biber. Set is `\usepackage[backend=biber,style=authoryear]{biblatex}`, but still with same problem.


title: tests for defined labels (r@) and infinite passes with Makefile

text: My question probably has to do with `.aux` files and `\newlabel` therein. Here is what I can describe.   * The way my .PDF builds is via a Makefile; I inserted an MWE to show what happens.   * The situation is that I need do avoid issuing `\label` commands for user's `\item`s in a `\begin{enumerate}` environment whenever they give "`multiply defined`" warnings, e.g.:   * when `\label{itm:i}` is for the first `\item` - using `\roman` (representation of counter `enumi`) - as well as for the ninth - using `\alph`; and   * I employ the use of all five (`\alph`, `\Alph`, `\roman`, `\Roman`, `\arabic`) for each `\item`: this `TeX`nique happens [recursively,] iteratively, automatically.   * (My problem is with infinite passes through **`make`** : I explain how.)   * I use the pairs `\ifcsname r@#1\endcsname` in some `\newcommandx` that generates `\label`s - or `\@ifundefined{r@#1}{}{}` -, where `#1` would be the label. The MWE is the following.               \documentclass[10pt]{article}          \usepackage{paralist,alphalph,xargs}          \def\alph#1{\alphalph{\value{#1}}}     \def\Alph#1{\AlphAlph{\value{#1}}}          \makeatletter          \newcommandx\mwelabel[3][2=itm,3=r@]{%     \@ifundefined{#3#2:#1}{\label{#2:#1}}{%     \typeout{avoided #2:#1}}}          \newcommandx\MweLabel[3][2=itm,3=r@]{%     \ifcsname#3#2:#1\endcsname%     \typeout{skipped #2:#1}\else%     \label{#2:#1}\fi}          \makeatother          \begin{document}          \section{MWE}\mwelabel{one}[sec]          TEXT          \subsection{Mwe} \MweLabel{one}[sec]          Text          \section{Mwe} \MweLabel{two}[sec]          See subsection \ref{sec:one}.          \begin{enumerate}[(a)]     \setcounter{enumi}{24}     \item twenty-five \mwelabel{tst:one}     \item twenty-six \mwelabel{tst:two}     \item twenty-seven     \end{enumerate}          text          \begin{enumerate}[(A)]     \setcounter{enumi}{29}     \item thirty \MweLabel{tst:one}     \item thirty-one \MweLabel{tst:two}     \item thirty-two     \end{enumerate}          See items \ref{itm:tst:one} and \ref{itm:tst:two}.          \end{document}          \endinput          avoided sec:one     skipped sec:one     skipped sec:two     avoided itm:tst:one     avoided itm:tst:two     skipped itm:tst:one     skipped itm:tst:two      When I run the command line "`pdflatex mwe.tex ; pdflatex mwe.tex`", after the second pass it `typeout`s what is after `\endinput`.   * When I run `pdflatex` through, instead, the command line "`make clobber clean && make`", the process goes into an infinite loop. The `Makefile` is the following.               # A Makefile for building TeX documents     #          DOC = mwe     TARGETS = $(DOC).pdf     #QUIET = >/dev/null          ##  commondefs  ###############################################################     #          -include commondefs     #          MDIRT = *~ core *.stamp _*.* tmp.inputs     LDIRT = *.aux* *.log*     DIRT = $(MDIRT) $(LDIRT)     RM = rm -f          .SUFFIXES: .tex .aux .stamp .pdf          SEP=:     #SEP=\;         # for MikTeX+Cygwin     PDFLATEX = TEXINPUTS=.$(SEP) pdflatex $(QUIET) -shell-escape #-halt-on-error          ##  Makefile  #################################################################     #     ###############################################################################          .DEFAULT: all     .PHONY: all     .SECONDARY: $(filter-out $(TARGETS), $(DOC).pdf)          all: $(TARGETS)          FDIRT = mwe.pdf          TEXS = *.tex     DEPS = $(DOC).stamp          $(DOC).pdf: $(TEXS) $(DEPS)          #     ###############################################################################               ##  commonrules  ##############################################################     #          -include commonrules          # Some basic recursive rules for building, installing, and cleaning up     # a source tree     #     subdirs:         @sub="$(SUBDIRS)"; \         for i in $$sub; do if test -n "$$i"; then \               (cd $$i; make); \         fi; done;          clean: localclean         @sub="$(SUBDIRS)"; \         for i in $$sub; do if test -n "$$i"; then \               (cd $$i; make $@); \         fi; done;          localclean:         $(RM) $(DIRT)          clobber: localclean         @sub="$(SUBDIRS)"; \         for i in $$sub; do if test -n "$$i"; then \               (cd $$i; make $@); \         fi; done;         $(RM) $(TARGETS)         $(RM) -r auto               # Rules for TeX files     #     # The line that runs LATEX needs to run inside a subshell to turn off     # "make"'s status checking. It blows away .aux because the .aux file     # created is bad and also breaks biblatex. It touches .stamp to force a     # rebuild.     .tex.pdf:         @if test -r "$*.aux"; \            then cp $*.aux $*.auxprev; \            else echo > $*.auxprev; \         fi         @echo "$(PDFLATEX) $<"         @sh -c "$(PDFLATEX) $< || (rm -f $*.aux; sleep 1; touch $*.stamp; exit 1)"         @-cmp -s $*.aux $*.auxprev; \         if test $$? = 1; \         then \             #diff -urN $*.aux $*.auxprev; \             sleep 1; \             echo "==> Rebuilding $@"; \             touch $*.stamp; \             $(MAKE) $@; \         else \             echo "==> No need to rebuild $@"; \         fi         @rm -f $*.auxprev          .tex.stamp: # backward compatibility         touch $@        * I tried defining separate commands associated with each `\label` using some unused prefix instead of `r@`, i.e., `mwe@`. With `make` there are no longer infinite passes. However, this does not work either, since in both cases there are `multiply defined` warnings from `LaTeX`, that obviously should not be, because the `\label` is to be guarded by `\@ifundefined` or `\ifcsname\endcsname`. The modified MWE is the following (identical, except `3=mwe@` instead of `3=r@`).               \documentclass[10pt]{article}          \usepackage{paralist,alphalph,xargs}          \def\alph#1{\alphalph{\value{#1}}}     \def\Alph#1{\AlphAlph{\value{#1}}}          \makeatletter          \newcommandx\mwelabel[3][2=itm,3=mwe@]{%     \@ifundefined{#3#2:#1}{\@namedef{#3#2:#1}{}\label{#2:#1}}{%     \typeout{avoided #2:#1}}}          \newcommandx\MweLabel[3][2=itm,3=mwe@]{%     \ifcsname#3#2:#1\endcsname%     \typeout{skipped #2:#1}\else%     \@namedef{#3#2:#1}{}\label{#2:#1}\fi}          \makeatother          \begin{document}          \section{MWE}\mwelabel{one}[sec]          TEXT          \subsection{Mwe} \MweLabel{one}[sec]          Text          \section{Mwe} \MweLabel{two}[sec]          See subsection \ref{sec:one}.          \begin{enumerate}[(a)]     \setcounter{enumi}{24}     \item twenty-five \mwelabel{tst:one}     \item twenty-six \mwelabel{tst:two}     \item twenty-seven     \end{enumerate}          text          \begin{enumerate}[(A)]     \setcounter{enumi}{29}     \item thirty \MweLabel{tst:one}     \item thirty-one \MweLabel{tst:two}     \item thirty-two     \end{enumerate}          See items \ref{itm:tst:one} and \ref{itm:tst:two}.          \end{document}          \endinput          skipped sec:one      How can I really guard reissuing `\label` commands? The "enumerate-item- alph...arabic" context could probably be ignored. I have thus also inserted test cases for `\label`ing `\section`s. Appreciate all help. Thank s.   * `Makefile` uses tabs in rules! I have put a **`diff`** command in the "`.tex.pdf`" suffix rule, between the `mwe.aux` and `mwe.auxprev` files, whose comparison (the **`cmp`** command) seems to be the criterion to rerun **`$(MAKE)`**. The output of **`diff`** is always the same, only switching between minus and plus on the same lines. Either:               --- mwe.aux 2013-05-30 16:46:01.080584663 +0300     +++ mwe.auxprev 2013-05-30 16:46:00.920586664 +0300     @@ -1,4 +1,10 @@      \relax       \@writefile{toc}{\contentsline {section}{\numberline {1}MWE}{1}}     +\newlabel{sec:one}{{1}{1}}      \@writefile{toc}{\contentsline {subsection}{\numberline {1.1}Mwe}{1}}      \@writefile{toc}{\contentsline {section}{\numberline {2}Mwe}{1}}     +\newlabel{sec:two}{{2}{1}}     +\newlabel{itm:tst:one}{{y}{1}}     +\newlabel{itm:tst:two}{{z}{1}}     +\newlabel{itm:tst:one}{{AD}{1}}     +\newlabel{itm:tst:two}{{AE}{1}}      or:               --- mwe.aux 2013-05-30 16:46:01.595578225 +0300     +++ mwe.auxprev 2013-05-30 16:46:01.439580175 +0300     @@ -1,10 +1,4 @@      \relax       \@writefile{toc}{\contentsline {section}{\numberline {1}MWE}{1}}     -\newlabel{sec:one}{{1}{1}}      \@writefile{toc}{\contentsline {subsection}{\numberline {1.1}Mwe}{1}}      \@writefile{toc}{\contentsline {section}{\numberline {2}Mwe}{1}}     -\newlabel{sec:two}{{2}{1}}     -\newlabel{itm:tst:one}{{y}{1}}     -\newlabel{itm:tst:two}{{z}{1}}     -\newlabel{itm:tst:one}{{AD}{1}}     -\newlabel{itm:tst:two}{{AE}{1}}


title: Pointing (an arrow) to a tabular node in beamer is buggy (ignorenonframetext)

text: Maybe a bug in beamer, works OK while using the minimal document class. Again, following the example over there, and also after playing with Circling/framing and referring to a bunch of nodes, the following doesn't work as expected:               \documentclass[ignorenonframetext,xcolor={table,svgnames}]{beamer}     %\documentclass{minimal}          \usepackage{tikz}     \usetikzlibrary{shapes,backgrounds,fit,positioning}          \begin{document}          \tikzstyle{every picture}+=[remember picture]               \begin{frame}            \tikzstyle{na} = [baseline=-.5ex]            \begin{tabular}{ll}         Blah & $=$ Again blah          \tikz[na] \node[coordinate] (blah) {};\\          Foo & $+$ Bar \\         Buggy & $=$         \tikz[baseline]{           \node[rounded corners,fill=red!15,anchor=base] (bug)           {Bug};         }       \end{tabular}            \bigskip           This is also buggy, booh \tikz[na] \node[coordinate] (booh) {};            \begin{tikzpicture}[overlay]         \path[very thick,->] (blah) edge [bend right] (bug);         \path[very thick,->] (booh) edge [bend left] (bug);       \end{tikzpicture}            \end{frame}          \end{document}      **I just found the culprit, it is the ignorenonframetext option!! But why is it so?**


title: \hfill and \hspace do not work

text: All, I want to put three figures together in one line, spanning two columns. I used `\hfill` and `\hspace{}` in order to make the three figures fully span the horizontal width of the paper. However, after so many times I tried, I just cannot make it. There is always some space on the right, and `\hfill` or `\hspace{}` will not help to occupy the space. Below is a MWE. Please use this link to download the figures http://pan.baidu.com/share/link?shareid=3521927653&uk=3776487005. (Click the button below in the opened page to download, the page is in Chinese.) ![enter image description here](http://i.stack.imgur.com/obdvL.jpg)               %\documentclass[conference]{IEEEtran}     \documentclass[9.5pt,conference,compsocconf,letterpaper]{IEEEtran} %ICDCS     \usepackage[noend]{algpseudocode}     \usepackage[ruled]{algorithm}     \usepackage{subfigure}     \usepackage{graphicx}     \usepackage{times}     \usepackage{amssymb}     \usepackage{url}     \usepackage{hyperref}     \usepackage{amsmath}     \usepackage{multirow}     \usepackage{graphicx}     \usepackage{setspace}     \usepackage{wrapfig}     \algnewcommand{\LineComment}[1]{\State \(\triangleright\) #1}          \begin{document}          %\title{xxx}     %     %\maketitle               \begin{figure*}[htp]       % Requires \usepackage{graphicx}       \begin{minipage}{0.32\textwidth}%           \centering           \includegraphics[width=1\textwidth]{merging_and_balancing_multi_thread.eps}%           \caption{\small Multi-thread monitoring speed with both merging and balancing optimizations.}%           \label{fig:merging_and_balancing_multi_thread}%       \end{minipage}\hspace{0.2cm}       \begin{minipage}{0.33\textwidth}%           \centering           \includegraphics[width=1.1\textwidth]{Monitoring_result_and_ground_truth.eps}%           \caption{\small Popularity monitored by the fixed window and sliding window designs,                     compared with the popularity ground truth.}%           \label{fig:Monitoring_result_and_ground_truth}%       \end{minipage}\hfill       \begin{minipage}{0.32\textwidth}%           \centering           \includegraphics[width=1.05\textwidth]{Deviation_distribution.eps}%           \caption{\small The deviation distribution.}%           \label{fig:Deviation_distribution}%       \end{minipage}       \vspace{-0.6cm}     \end{figure*}               \end{document}


title: LyX and Summation

text: I am using the latest version of LyX and I am having trouble getting the limits to work at all. Ideally, I'd like to be able to place the summation limits above and below the sigma. However, at this point, I would settle for the less-pleasing-to-my-eyes variant of having the limits in the northeast and southeast corners of the symbol. However, try as I might, LyX does not want to place the limits anywhere. The "Change Limits Type" whose use I have seen recommended in various forums remains greyed out no matter what I do and the documentation does not provide any information I have yet found on how the process is even supposed to work in theory. On an admittedly editorial note, I am beginning to feel LyX is extremely lacking in documentation, which is unfortunate as I think it otherwise is a great application. Anyway, if Someone could point me in the direction of how to resolve this issue, I'd greatly appreciate it.


title: Cross references and citations do not show in LibreOffice after htlatex conversion

text: When trying to convert a simple LaTeX document to LibreOffice/OpenOffice, cross references and citations do not show in the final document. They do when converting to (X)HTML, but this has other drawbacks. How to set up conversion to LibreOffice properly? I'm using Ubuntu 12.10 with packaged TeXlive 2012 and LibreOffice 3.6. The code required to replicate this (shown below) can be downloaded or checked out using Git. To compile, use `make texput.odt`. texput.tex:               \documentclass{scrartcl}     \pagestyle{empty}     \bibliographystyle{plain}          \begin{document}       \section{First} \label{sec:first}       \cite{test}            \ref{sec:first}       \bibliography{texput}     \end{document}      texput.bib:               @article{test,       author = "Anyone",       title = "Something",       year = 2010,     }      Compilation command, according to instructions:               latexmk texput.tex     htlatex texput.tex "xhtml,ooffice,bib-" "ooffice/! -cmozhtf" "-coo -cvalidate"      Resulting output: ![.tex -> .odt -> .pdf -> .png](http://i.stack.imgur.com/gDpQD.png) Direct compilation: ![.tex -> .pdf -> .png](http://i.stack.imgur.com/7MA4y.png) Analysis of the generated `content.xml` file (inside `texput.odt` which in fact is a ZIP archive) shows mysterious `<t4htlink>` elements, I'm not sure they're part of the Open Document specification... Removing the opening and closing tags fixes the issue, at least for the reference to the section. The citation needs some more fixing. (The results don't change if I omit the `bib-` switch for the compilation.)


title: TikZ (finite) grid with character in each cell

text: The code               \begin{tikzpicture}     \draw[step=0.5cm,color=gray] (-1,-1) grid (1,1);     \end{tikzpicture}      gives me a nice finite 4x4 grid. Now I want to center one character in each cell, how to do this? By the way, how can I specify the absolute position of my picture and how to stretch it in one direction (i.e. that it becomes a proper rectangle (not a square)).


title: What are all the possible first arguments to `\setbeamerfont`?

text: I have searched in the user guide for the string `\setbeamerfont`, but the only thing I could find was a description that said `\setbeamerfont{some beamer element}`. Where can I find a listing of all beamer elements whose font can be set using this command? In this particular case, I am trying to find the beamer font for "normal" text.


title: Matrix looks flat

text: I would like to typeset a partitioned matrix in LaTeX with dashed lines. After a quick search on TeX.SE, I found this post with a nice example of such matrices. I tried it on my computer and the result looks "flat". By "flat", I mean that the matrix doesn't look square. Here is my example :               \documentclass[a4paper,10pt]{article}     \usepackage{arydshln}     \setlength{\dashlinegap}{2pt}          \begin{document}     \[ \Gamma = \left(\begin{array}{c:c} \Gamma_{A} & \Gamma_{AB} \\ \hdashline (\Gamma_{AB})^\top & \Gamma_{B} \end{array} \right) \]     \end{document}      Here is the result of the previous code : ![enter image description here](http://i.stack.imgur.com/gPHGY.jpg) How can I make the matrix look square ?


title: Is it reasonable to expect an expl3-compatible release of TikZ/PGF in the future? / Workarounds for using TikZ under expl3 syntax

text: Keeping in mind:   * TikZ uses space tokens significantly, and   * `expl3` syntax completely disregards whitespace and will only become more prevalent, is it reasonable to expect a future version of TikZ where `expl3` syntax is taken into account? It would obviously be catastrophic if its syntax changed, but is it feasible to do this 'behind the scenes'? If it is not feasible (I really don't have a good grasp on on TikZ), is there a workaround that does not litter the environment with `~`? * * * ### Edit for Christian: They should only be visible to package-writers on the programming layer. Under `\ExplSyntaxOn`, keys like `current page.south west` and `remember picture` 'compress' to `currentpage.southwest` and `rememberpicture` respectively. Obviously these keys aren't defined, thus an error. It's only an absolute headache inside a new definition, where catcodes cannot be effectively changed with a simple `\ExplSyntaxOff`.