title: Linenumbers with lineno (edtable) breaks inside threeparttable because of caption

text: I'm trying to show linenumbers for tables using `lineno`, i.e. `edtable`. The table is set using `threeparttable` and linenumbers work fine, but compilation fails when including a caption. The error message shown is `you can't use \hrule here except with leaders`. I use the `caption` package, but compilation also fails when using KOMA captions. The MWE illustrates the issue.               \documentclass{scrartcl}          \usepackage{threeparttable}     \usepackage{caption}     \usepackage[edtable]{lineno}          % That's the definition of caption@hrule from caption3.sty     % Redefine something here?     % \makeatletter     % \renewcommand*\caption@hrule{\hrule\@height\z@}     % \makeatother          \begin{document}          \begin{table}\centering     \begin{threeparttable}     \caption{A simple table}     \resetlinenumber[1]     \begin{edtable}{tabular}{l*{3}{c}}                               & \multicolumn{1}{c}{(1)}   & \multicolumn{1}{c}{(2)}   & \multicolumn{1}{c}{(3)}   \\     Variable 1                &  1.85                     & 0.92                      & 1.11                      \\                               & (0.34)                    & (0.24)                    & (0.14)                    \\     \end{edtable}     \end{threeparttable}     \end{table}          \end{document}


title: TikZ edge between multiple source nodes and single target node

text: I'm trying to achieve something like the following: ![Sample image](http://i.imgur.com/yw0eM3Y.png) (Please ignore the node styles, I've sorted that part, it's the edges I'm struggling with!) My diagrams can have undirected edges that join arbitrary sets of nodes together; I use small perpendicular marks to distinguish different edges. So for example, the rightmost edge above is a single edge with two source nodes and a single target, and the two edges to its left are distinct. My questions are:   1. How can I easily add the perpendicular marks (I'd ideally like to say "add a small mark after 70% of the edge")?   2. How do I specify an edge with multiple source nodes (or multiple target nodes)? I suppose I'd like to specify a point "someway" between the connection points as the "convergence" point of the edges. I realise number 2 is quite vague, since I haven't specified precisely what I want, but I hope someone can point me in the right direction! My (very) poor attempt so far is as follows:               \documentclass[tikz]{standalone}     \begin{document}     \begin{tikzpicture}         \node[draw, circle] (p0)                     {};         \node[draw, circle] (p1) [right of=p0]       {};         \node[draw, circle] (p2) [above right of=p1] {};         \node[draw, circle] (p3) [below right of=p1] {};         \node[draw, circle] (p4) [below right of=p2] {};         \draw (p0.east) to (p1.west);         \draw (p1.east) to (p2.west);         \draw (p1.east) to (p3.west);         \draw (p2.east) -- (p3.east) -- (p4.west); % This is just wrong! :-)     \end{tikzpicture}     \end{document}      Thanks!


title: Creating a circular shade with an intermediate color

text: I need to draw a circle that represents a density that's constant up to a certain value of radius, then begins to descend. What I mean, is something like this:               \documentclass[12pt]{article}          \usepackage{tikz}          \begin{document}     \begin{tikzpicture}          \shade [shading=radial,inner color=black] (0,4) circle (2cm);     \draw [fill=lightgray] (0,4) circle (1cm);          \draw[->] [very thick] (0,0) -> (0,2);     \draw[->] [very thick] (0,0) -> (3,0);          \draw [dotted] (0,2) -> (0,4);     \draw [dotted] (1,0) -> (1,4);     \draw [dotted] (2,0) -> (2,4);          \draw [thick] (0,.25) -- (1,.25) -- (1,1.35) --                    (1.25,1.35) .. controls (1.625,1.35)                    and (1.625,0) .. (2,0);          \draw (-.2,1.7) node {$\rho$};     \draw (1,-.2) node {$R_{in}$};     \draw (2,-.2) node {$R_{out}$};     \draw (3.1,-.2) node {$R$};               \end{tikzpicture}          \end{document}      Which produces this: ![What I managed to produce so far](http://i.stack.imgur.com/Kbq31.png) What I want is this: ![Circle with darker outer shading](http://i.stack.imgur.com/QCosC.png) Notice how the line of the circle matches the shade's starting color. I though I could do this by setting an "intermediate color" for the shade, but this option doesn't seem to exist. Ideally the shade should follow closely the plot in the bottom of the first figure, but I consider that as a bonus.


title: How to stack three relations

text: Is it possible to stack three relations or symbols ontop of one another? Specifically I would like to stack three symbols, `R`, `\rightleftarrows` and `L` in order to define a pair of adjoint functors $R:C\to D$ and $C\gets D:L$. Also, is there a `\rightleftarrow` with long arrows? **EDIT** I actually meant to ask wether there is a version of `\rightleftarrows` with long arrows. I'm not a regular user, so I don't know how to format my question adequately, could someone convert what's inside the dollar so that it appears as latex please?


title: TikZ: posticipate execution of type /.code key

text: I'm trying to create some TikZ keys which allows to easily draw distributed loads on a mechanical structure (or truss). The code I wrote at the moment is:               \documentclass[a4paper]{article}          \usepackage{tikz}     \usetikzlibrary{calc,positioning}     \makeatletter     \tikzset{load start/.style={insert path={coordinate (mec@start@load)}},%              load end/.style={insert path={coordinate (mec@end@load)}},              load distance/.initial=1em,              force distance/.initial=10pt,              force length/.initial=.7cm}     \tikzset{forze/.code={%         \coordinate (mec@X1) at ($(mec@start@load)!\pgfkeysvalueof{/tikz/load distance}!90:(mec@end@load)$);         \coordinate (mec@X2) at ($(mec@end@load)!\pgfkeysvalueof{/tikz/load distance}!-90:(mec@start@load)$);         \draw (mec@X1) -- (mec@X2);         \pgfpointdiff{\pgfpointanchor{mec@X1}{center}}{\pgfpointanchor{mec@X2}{center}}         \pgfmathsetmacro{\mec@force@distrib@lenght}{veclen(\pgf@x,\pgf@y)}         \pgfmathsetmacro{\mec@force@number}{round(\mec@force@distrib@lenght/\pgfkeysvalueof{/tikz/force distance})}         \pgfmathsetmacro{\mec@force@distance}{1/\mec@force@number}         \pgfmathparse{1-\mec@force@distance}         \foreach \i in {0,\mec@force@distance,...,\pgfmathresult}{           \coordinate (endarrow) at   ($(mec@X1)!\i!(mec@X2)$);           \coordinate (startarrow) at ($(endarrow)!\pgfkeysvalueof{/tikz/force length}!90:(mec@X2)$);           \draw[-latex] (startarrow) -- (endarrow);         }         \coordinate (endarrow) at   ($(mec@X1)!1!(mec@X2)$);         \coordinate (startarrow) at ($(mec@X2)!\pgfkeysvalueof{/tikz/force length}!-90:(mec@X1)$);         \draw[-latex] (startarrow) -- (endarrow);       }}%}     \makeatother     \begin{document}     \begin{tikzpicture}[node distance=1mm]     \coordinate (a) at (0,0) node[left=of a]{A};     \coordinate (b) at (0,3) node[left=of b]{B};     \coordinate (c) at (3,3) node[right=of c]{C};     \coordinate (d) at (3,0) node[right=of d]{D};     \draw[thick] (a) -- (b) [load start] -- (c) [load end] -- (d);     \path[forze] (a);     \draw (d) [load start] -- (b) [load end];     \path[forze] (a);     \end{tikzpicture}     \begin{tikzpicture}[node distance=1mm]     \coordinate (a1) at (0,0) node[left=of a1]{A1};     \coordinate (b1) at (0,3) node[left=of b1]{B1};     \coordinate (c1) at (3,3) node[right=of c1]{C1};     \coordinate (d1) at (3,0) node[right=of d1]{D1};     \draw[thick] (a1) -- (b1) [load start] -- (c1) [load end,forze] -- (d1);     \draw[forze] (a1) -- (d1);     \end{tikzpicture}     \end{document}      The `load start` and `load end` keys are used only to save the beginning and ending coordinates of the distributed load, and the `forze` key uses these coordinates and draws in the right way the baseline and all of the arrows. In the first example everything works fine but, as you can see, to get the right output it is necessary to define another path (after the one in which `load start` and `load end` are used) where the `forze` key is used. In the second example I show the syntax I would like to use (basically I want to avoid the necessity to define the second "fake" path) but you can see that something is wrong:   * In the first case the arrows appears, but the specificed path is disappeared (the structure disappears);   * In the second case the path is there (the line from `d1` to `a1`) but the arrows are overimposed to the previous ones. I think that this happens because the code defined in the `forze` key is processed too early, when the start and end coordinates of the load are not yet correctly saved. I tried to use the `append after command`, `execute at end to`, `execute at end note` keys, but the result is always the same. Is there a better approach? An additional question: is it correct to define macros (like `\mec@force@number`) via `\pgfmathsetmacro` within a key (like `forze`) or it should be better to define them outside it? Which is better from a "register consumption" point of view? ## Update As @percusse suggested, I tried to use the `preaction` and `postaction` keys. I tried those possibilities:               \draw[postaction={forze}] (a) -- (b) [load start] -- (c) [load end] -- (d);      Perfect result               \draw[thick,postaction={forze}] (a) -- (b) [load start] -- (c) [load end] -- (d);     % or     \draw[thick][postaction={forze}] (a) -- (b) [load start] -- (c) [load end] -- (d);     % or     \draw[thick][postaction={forze,thin}] (a) -- (b) [load start] -- (c) [load end] -- (d);      bad result: the load appears to be thick too               \draw[preaction={draw,thick},postaction={forze}] (a) -- (b) [load start] -- (c) [load end] -- (d);      perfect result, but not transparent to the user (that should use the `preaction` key). So it seems that the second time that the path is used, it automatically gets the options from the first one (the manual says that the options are different, but it seems that this is true only if the same options are redefined). Is it possible to avoid this allowing to normally specify options on the path and just use `postaction={forze}` to draw the load (which can be easily made by a specific key)?


title: How to add another \cc tag in a letter class?

text: I need to create a legal document similar to a letter for a bussiness. I use the stardar class letter for be the best that fit at my needs. In fact I need to create a formal document but I need to add in the end another field like the one created by the `\cc` tag but I need that this (e.g. `\ccp`) produces a text such as `ccp` or `con copia para` My document is like this MWE:               \documentclass[10pt,letterpaper]{letter}     \usepackage[utf8]{inputenc}      \usepackage[T1]{fontenc}     \usepackage[left=155pt,right=115pt,top=72pt,bottom=100pt]{geometry}     \usepackage[spanish,activeacute,mexico]{babel}     \usepackage[osf]{mathpazo}     \usepackage{multicol}     \usepackage[usenames,dvipsnames,table]{xcolor}     \address{Distrito Federal, México}      \date{9 de enero de 2014}      \signature{\textcolor{white}{Sutano}}      \begin{document}     \begin{letter}{}      \begin{flushright}     \opening{\textsc{Recibo de pago de anticipo y apartado}     \end{flushright}     }           \bigskip          Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce tortor felis, aliquet vitae arcu quis, gravida venenatis mi. Integer lacinia magna id enim viverra egestas. Pellentesque posuere lectus ut turpis malesuada, sed iaculis nunc dapibus. Fusce vel aliquam risus. Vestibulum dignissim libero mattis, ornare tellus in, varius metus. Nunc convallis risus eu varius pretium. Nulla euismod ultrices placerat. Curabitur suscipit nisl consequat adipiscing tristique. Mauris quis neque tortor. Nulla facilisi.          Mauris in dolor et nibh venenatis facilisis feugiat sit amet justo. Pellentesque luctus eleifend ligula, id gravida dui posuere vel. Duis cursus ante tristique dignissim fringilla. Nunc malesuada bibendum est ut ornare. Aliquam condimentum a orci ut rhoncus. In ipsum erat, gravida quis convallis pretium, sagittis vel arcu. Mauris ut luctus mi, sed bibendum dui. Quisque eu augue quis sem placerat laoreet. Sed venenatis tincidunt libero, at congue eros pharetra id. Maecenas non ante nunc. Ut imperdiet consequat justo sodales aliquet.          Integer iaculis porttitor ipsum ac hendrerit. Maecenas consectetur viverra dui, et fringilla leo porttitor non. Fusce sollicitudin nulla vitae lorem ultrices laoreet. Phasellus viverra pulvinar urna ac tempor. Aenean adipiscing tortor turpis, at blandit elit placerat eget. Nulla pharetra est libero, ultricies aliquet nisl scelerisque sed. Vestibulum arcu massa, gravida in dolor ut, egestas ultrices nulla. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin semper eget magna a tempus. Fusce sed sodales tellus. Pellentesque egestas dictum lacus, sit amet varius lacus faucibus eget. Quisque ac tellus laoreet mauris elementum laoreet. Pellentesque nec mauris sit amet nulla porttitor consectetur. Praesent tempus elementum purus, eu consectetur sem convallis at.              \begin{multicols}{2}         \begin{center}     \underline{\hspace{120pt}}\\     Recibe\\     Fulano     \end{center}          \begin{center}     \underline{\hspace{120pt}}\\     Entrega\\     Sutano     \end{center}     \end{multicols}          \closing{\textcolor{white}{Atentamente}}      \cc{Sutano} %<--- Will be great can change it for print just cc     %\ccp{Perengano} %<--- This is what I need for print ccp     %\ps{adding a postscript}      %\encl{}      \end{letter}      \end{document}      I don't know how to do it, I hope this won't be hard to do and I hope to be clear with my question.


title: Biblatex: bibliography section headings without numbers in scrreprt or scrbook

text: The following code produces headings on the section level starting with the number of the section before the bibliography:               \documentclass{scrbook}          \usepackage{csquotes}     \usepackage[english]{babel}     \usepackage[style=authoryear]{biblatex}     \bibliography{biblatex-examples}          \begin{document}          \nocite{westfahl:space}\nocite{aksin}\nocite{angenendt}     \nocite{baez/article}\nocite{bertram}\nocite{doody}     \nocite{matuz:doody}\nocite{gillies}\nocite{glashow}     \nocite{herrmann}\nocite{kastenholz}\nocite{reese}     \nocite{sarfraz}\nocite{kant:ku}\nocite{nietzsche:historie}     \nocite{brandt}\nocite{hyman}\nocite{pines}\nocite{moraux}     \nocite{salam}\nocite{cms}\nocite{baez/online}\nocite{ctan}     \nocite{itzhaki}\nocite{markey}\nocite{wassenberg}     \nocite{almendro}\nocite{kowalik}\nocite{laufenberg}     \nocite{sorace}\nocite{jcg}\nocite{chiu}\nocite{padhye}     \nocite{geer}\nocite{loh}          \printbibheading     \printbibliography[notkeyword=secondary,heading=subbibliography,title={Primary Sources}]     \printbibliography[keyword=secondary,heading=subbibliography,title={Secondary Sources}]          \end{document}      The resulting section header is !["0.0 Secondary Sources"](http://i.stack.imgur.com/SMTDD.png) on the top of page 3 while the header representing the chapter on the top of page 2 is correctly set to "Bibliography". The 0.0 seems wrong. How can I remove it? I tried several combinations with `\defbibheading{subbibliography}` but I did not succeed. (with biblatex 2.2, biber 1.2)


title: hyperlinking author names in biblatex when using \citeauthor

text: Using `biblatex`, the `\citeauthor` no longer is hyperlinked by default (as done in `natbib`). I am currently desperately looking for a way to make it a hyperlink ... any suggestion welcome


title: How to obtain the width of a column within the APA document class?

text: I am using the APA document class. My document has some tables:               \documentclass[jou]{apa}     \usepackage{tabularx}     \title{This is the title}     \author{This is the author}     \begin{document}         \maketitle              This is some text so that you can see how wide each of the columns is in the document.              \noindent\begin{tabularx}{\textwidth}{|X|X|}             1 & 2 \\         \end{tabularx}     \end{document}      When I compile this, the width is too wide and does not match the column width. I tried replacing `\textwidth` with `\linewidth`, but this did not work either.   * How can I set the table to match the width of the columns in the APA document class?


title: Metrology tolerance and fits

text: How can i type meteorological tolerance, limits and fits etc, like double superscripts one on another notations using latex can any one please help me in this regard?


title: How to make memoir's \tableofcontents behave like starred \tableofcontents* by default?

text: I am writing a class based on `memoir`, which provides `\tableofcontents` (which lists the ToC within the ToC) and `\tableofcontents*` (which does not list the ToC within the ToC). I have seen this question and its many duplicates, but I want to prevent the Table of Contents from itself being listed in the Table of Contents regardless of the user's choice of `\tableofcontents*` _vs._ `\tableofcontents`. Based on the `memoir` manual (Section 9.2), I am currently using `etoolbox` to do               \pretocmd{\tableofcontents}{\begin{KeepFromToc}}{}{<class warning omitted>}     \apptocmd{\tableofcontents}{\end{KeepFromToc}}{}{<class warning omitted>}      which works as expected (both starred and unstarred variants do not write a ToC entry). Is this a recommended way to do this? Does this method have any bad side effects I've not thought of? Here is an MWE for any testing you may wish to do:               \documentclass{memoir}     \usepackage{etoolbox}          \pretocmd{\tableofcontents}{\begin{KeepFromToc}}{}{}     \apptocmd{\tableofcontents}{\end{KeepFromToc}}{}{}          \begin{document}          \tableofcontents        \chapter{Test Chapter}     \section{Test Section}          \end{document}


title: Adjustbox not showing caption with key option chosen

text: I can't get a caption to show up in the following MWE. I've put `caption` at the end of the key list, and in the actual example the `BLAH BLAH BLAH` is replaced with an `\input{table.tex}` variant, but the problem persists in this simple version. `\caption` outside the environment just gives me a `caption outside float environment` error. Any thoughts appreciated               \documentclass[10pt,landscape]{article}     \usepackage[left=0.5in,right=0.5in,top=0.5in,bottom=0.5in]{geometry}     \usepackage{adjustbox}     %\usepackage{caption}     \usepackage{booktabs}          \begin{document}          \renewcommand{\arraystretch}{1.5}          \begin{adjustbox}{width=\textwidth,totalheight=\textheight,keepaspectratio,caption={blah blah}}     BLAH BLAH BLAH     \end{adjustbox}               \end{document}


title: Hyperref problem with enumerated tabularx rows

text: I was trying to do an enumeration with columns, which references one item from another one in the same list. I figured out that the best way is to make a table with enumerated rows. I had a working solution, however next thing I tried to do was to add PDF references with `hyperref` package. However, this produces quite strange results. My solution is three column table: first one is right-aligned for the number of the row, next one has some specified length and the third one uses all the remaining space, therefore `tabularx` is needed. A short code sample:               \usepackage{tabularx}     \usepackage{hyperref}     \newcounter{hdItemCounter}     \setcounter{hdItemCounter}{0}          \begin{document}          \begin{tabularx}{\textwidth}{@{}rp{50pt}X}         \refstepcounter{hdItemCounter}\thehdItemCounter.\label{hdItem1} & Some text to fill at least two lines. & Some text\\         \refstepcounter{hdItemCounter}\thehdItemCounter.\label{hdItem2} & Some text. & Some text\\         \refstepcounter{hdItemCounter}\thehdItemCounter.\label{hdItem3} & Some text. & Some text \ref{hdItem2} ir \ref{hdItem1}\\         \refstepcounter{hdItemCounter}\thehdItemCounter.\label{hdItem4} & Some text. & Some text\\         \refstepcounter{hdItemCounter}\thehdItemCounter.\label{hdItem5} & Some text. & Some text \ref{hdItem3} ir \ref{hdItem4} \\     \end{tabularx}     %Some text to fill at least several pages to see the strange effect with hyperref.     \end{document}      I need a lot of such tables, therefore, I created new environment and new `\item`-style command:               \newenvironment{someenvironment}[1]%         {\tabularx{\textwidth}{@{}rp{#1}X}}         {\endtabularx}     \newcommand{\someitem}[1]{\refstepcounter{hdItemCounter}\thehdItemCounter.\label{#1} &}      First I was trying to do this with `listliketab`, but I wasn't able to put it inside my new environment. However, even without the new environment `hyperref` acts strangely. All the references are produced, however they point to wrong places: top of the page is at the line bottom and not at the top: ![enter image description here](http://i.stack.imgur.com/FVhOt.png) This can be changed by changing the type of first column to `p`:               \begin{tabularx}{\textwidth}{@{}p{10pt}p{50pt}X}      But then again - I need right-aligned first column. Nevertheless, this produces even stranger results: now references point to the top of the number, but the number is placed not at the top of the row: ![enter image description here](http://i.stack.imgur.com/N7TlB.jpg) This problem can be solved by writing something in front of `\refstepcounter`:               I\refstepcounter{hdItemCounter}\thehdItemCounter.\label{hdItem1}      By the way, \phantom{I} does not work, however forced space symbol does:               \ \refstepcounter{hdItemCounter}\thehdItemCounter.\label{hdItem1}      I am sorry for the lengthy post, but I wanted to be as specific as I can. Can anyone, please, suggest a better solution to my problem? I need every `pt` of the page width in order to display formulas as clearly as possible, therefore it would be very nice to have the `r` column and avoid putting space in every line. I will be really grateful for any help and comments.


title: Paragraph numbering

text: I've got a question following from a previous post answers on numbering paragraphs (Automatically assign a number to every paragraph). I used the code that Alan provided, however it seems that I can't get any of the subsubsections numbered. Another thing is that the table of contents contains not only numbered sections but also a string of all paragraphs in each section (or it displays an error and does not compile.)               \documentclass[12pt,a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{graphicx}     \usepackage{latexsym}     \usepackage{fullpage}     \usepackage{amsmath}     \usepackage{float}     \usepackage{indentfirst}     \usepackage[font=footnotesize,format=plain,labelfont=bf,up,textfont=it,up]{caption}     \setlength{\parindent}{0cm}     \usepackage{subfig}     \usepackage{booktabs}     \usepackage{appendix}     \pagenumbering{arabic}     \usepackage{verbatim}     \usepackage{setspace}     \usepackage{rotating}     \usepackage{subfig}     \usepackage{array}     \usepackage[english]{babel}     \usepackage{multirow}     \usepackage{wrapfig}     \usepackage{subfig}          %to get para numbers in the margins          \usepackage{titlesec}     \usepackage{chngcntr}     \usepackage{lipsum} % for dummy text     \titleclass{\numpar}{straight}[\section]     \newcounter{numpar}     \renewcommand{\thenumpar}{\arabic{numpar}}     \counterwithout{numpar}{section} % from the chngcntr package     \titleformat{name=\numpar,page=odd}[leftmargin] {\normalfont %paragraph number for odd page     \bfseries\filleft}     {\thenumpar}{.5em}{}     \titleformat{name=\numpar,page=even}[leftmargin] {\normalfont %paragraph number for even page     \bfseries\filleft}     {\thenumpar}{.5em}{}     \titlespacing{\numpar}     {1pc}{0ex plus .1ex minus .2ex}{1pc}     \newcommand*{\np}{\numpar{}}     \usepackage[parfill]{parskip}     %evidence counter     \newcounter{evidence}     \newcommand{\ev}{%             \bf{EV\stepcounter{evidence}}%             \theevidence}     \begin{document}     \tableofcontents          \pagebreak     \section{A section}     \np  \lipsum[1] \marginpar{\ev}          \np \lipsum[5]          \subsection{A subsection}     \np \lipsum[2]          \subsubsection{A subsubsection}          \np \lipsum[3]\marginpar{\ev}          \end{document}


title: Aligning ticklabels in secondary y-axis in pgfplot

text: I want to right align the ticklabels in secondary y-axiz in `pgfplot`. Here is my output and MWE. Thanks in advance for your help. ![enter image description here](http://i.stack.imgur.com/JHG52.png)               \documentclass{standalone}     \usepackage{pgfplots}     \pgfplotsset{compat = 1.7}          \begin{document}          \begin{tikzpicture}              \pgfplotsset{             set layers,% --- CF             , x tick label style={                  /pgf/number format/.cd,                  fixed,                  fixed zerofill,                  precision=1,                  /tikz/.cd                 }               , y tick label style={                  /pgf/number format/.cd,                  fixed,                  fixed zerofill,                  precision=1,                  /tikz/.cd                 },         }              \begin{axis}[             %   title = {$x \exp(-x^2-y^2)$}             , xlabel = $x$                 , ylabel = $y$                 , domain = -1:1                 , y domain = -1:1             , enlargelimits             , view = {0}{90}             , extra description/.code={% --- CF                     \xdef\XMIN{\pgfkeysvalueof{/pgfplots/xmin}}                     \xdef\XMAX{\pgfkeysvalueof{/pgfplots/xmax}}                     \xdef\YMIN{\pgfkeysvalueof{/pgfplots/ymin}}                     \xdef\YMAX{\pgfkeysvalueof{/pgfplots/ymax}}             },             ]                 \addplot3[                 contour gnuplot={                       number = 10                      },                  thick                 ]              {                         776.062 -50.812* x + 153.062 * y -76.812 *x *y                         };              \end{axis}              \begin{axis}[% --- CF             xmin=\XMIN,             xmax=\XMAX,             ymin=\YMIN,             ymax=\YMAX,             ticklabel pos=right,         ]         \end{axis}          \end{tikzpicture}          \end{document}


title: bug in tabu when rowcolors are defined?

text: In the following code the vertical separation from cell to the bottom is negative instead of the defined `\tabulinesep=5pt` when `\rowcolor{headcolor}` and and `\rowfont` are defined.               \documentclass[]{scrartcl}      \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage[utf8]{inputenc}     \usepackage[table]{xcolor}     \usepackage{tabu}       \tabulinesep=5pt     \listfiles     \begin{document}     \colorlet{headcolor}{gray!25}     \begin{tabu} to 0.8\textwidth{X[1,L]X[1,L]}         \hline         \rowcolor{headcolor}         \rowfont[l]{\bfseries}%          head & head \tabularnewline         \hline         text which is considerably longer than the width of the column &         text which is considerably longer than the width of the column \\         \hline     \end{tabu}     \end{document}      Here the visual result ![enter image description here](http://i.stack.imgur.com/bRjH1.png) Is this a bug in the tabu package? I contacted the author of tabu, but got no answer in the last days.


title: jou class apa6 - problem with table

text: I am running the short sample provided in apa6. [man] and [doc] class document mode work fine. But [jou] class is reporting problem (below). I've tried to isolate the problem. The problem arises with the table. Removing the table eliminates the problem. I am using MiKTeX 2.9 with TeXStudio. Any advice how to resolve so that table can be produced in jou class? **I am trying to typeset the following example short sample from apa6:**               \documentclass[jou]{apa6}      \usepackage[american]{babel}     \usepackage{csquotes}     \usepackage[style=apa,sortcites=true,sorting=nyt,backend=biber]{biblatex}     \DeclareLanguageMapping{american}{american-apa}     \addbibresource{bibliography.bib}     \title{Sample APA-Style Document Using the \textsf{apa6} Package}     \shorttitle{test}     \author{Brian D. Beitzel}     \affiliation{SUNY Oneonta}      \leftheader{Beitzel}          \begin{document}     \maketitle     We begin with \textcite{Shotton1989}.  We can also cite this work in     parenthesis, like this: \parencite{Shotton1989}.      ....     \section{Results}     Table \ref{tab:ComplexTable} contains some sample data.  Our     statistical prowess in analyzing these data is unmatched.      \begin{table}[htbp]     \vspace*{2em}       \begin{threeparttable}     \caption{A Complex Table}      \label{tab:ComplexTable}      \begin{tabular}{@{}lrrr@{}}         \toprule<br/>       Distribution type  & \multicolumn{2}{l}{Percentage of} & Total number \\                           & \multicolumn{2}{l}{targets with}  & of trials per  \\                           & \multicolumn{2}{l}{segment in}    & participant    \\      \cmidrule(r){2-3}                                            &  Onset  &  Coda            &       \\   \midrule            Categorical -- onset\tabfnm{a}  &    100  &     0            &  196     \\            Probabilistic                   &     80  &    20\tabfnm{*}  &  200     \\            Categorical -- coda\tabfnm{b}   &      0  &   100\tabfnm{*}  &  196     \\       \midrule           \end{tabular}            \begin{tablenotes}[para,flushleft]               {\small                   \textit{Note.} All data are approximate.                    \tabfnt{a}Categorical may be onset.                    \tabfnt{b}Categorical may also be coda.                   \tabfnt{*}\textit{p} < .05.                   \tabfnt{**}\textit{p} < .01.                }           \end{tablenotes}         \end{threeparttable}     \end{table}      \section{Discussion}      This is a lengthy and erudite discussion.  It demonstrates amazing     skill in interpreting the results for the masses.     \printbibliography     \end{document}      **But when I compile it with LaTeX I get this error message:**               Trying to make PK font rtxr at 540 DPI...       Running miktex-makemf.exe... miktex-makemf: The rtxr source file could not be found.            Running ttf2pk.exe...       miktex-makepk: PK font rtxr could not be created.       Process exited with error(s)


title: How to make the following matrices?

text: I follow the following code for the Matrices but it's not working so need some guidance to reproduce the code. I want to make the following Matrices (image)? ![enter image description here](http://i.stack.imgur.com/VCNWZ.jpg) I follow the following code but it's not working. So give me some guidance to reproduce the following code.               \documentclass{article}     \usepackage{fancyvrb}     \usepackage{color}          \definecolor{darkblue}{rgb}{0.1,0.3,0.5}          \DefineVerbatimEnvironment%     {MyVerbatim}{Verbatim}     {gobble=0,label=\hspace{.85\textwidth},labelposition=all,      frame=single,framerule=3pt,framesep=5mm,rulecolor=\color{black}}          \begin{document}     \begin{minipage}{6cm}     \begin{MyVerbatim}     JHENM KA  AG  KEW GENAH BHERKATEY HAN  (USER-U1_S1)     ***   *** *** *** ***   ***       ***  (USER-U1_S1)     Words: 7 Correct: 0 Errors: 7 Percent correct = 0.00\% Error = 100.00\% Accuracy =  0.00\%     Insertions: 0 Deletions: 7 Substitutions: 0     JHENM KA  AG  KEW GENAH bherkatey han  (USER-U1_S2)     ***   *** *** *** ***   bherkatey han  (USER-U1_S2)     Words: 7 Correct: 2 Errors: 5 Percent correct = 28.57\% Error = 71.43\% Accuracy = 28.57\%     Insertions: 0 Deletions: 5 Substitutions: 0     JHENM KA  AG  kew genah BHERKATEY HAN  (USER-U1_S3)     ***   *** *** kew genah ***       ***  (USER-U1_S3)     Words: 7 Correct: 2 Errors: 5 Percent correct = 28.57\% Error = 71.43\% Accuracy = 28.57\%     Insertions: 0 Deletions: 5 Substitutions: 0     ABELAS ANESAN KA  deshemn hey  (USER-U2_S3)     ***    ***    *** deshemn hey  (USER-U2_S3)     Words: 5 Correct: 2 Errors: 3 Percent correct = 40.00\% Error = 60.00\% Accuracy = 40.00\%     Insertions: 0 Deletions: 3 Substitutions: 0     abelas ANESAN KA  DESHEMN HEY  (USER-U2_S4)     abelas ***    *** ***     ***  (USER-U2_S4)     Words: 5 Correct: 1 Errors: 4 Percent correct = 20.00\% Error = 80.00\% Accuracy = 20.00\%     Insertions: 0 Deletions: 4 Substitutions: 0     TOTAL Words: 31 Correct: 7 Errors: 24     TOTAL Percent correct = 22.58\% Error = 77.42\% Accuracy = 22.58\%     TOTAL Insertions: 0 Deletions: 24 Substitutions: 0     \end{MyVerbatim}     \end{minipage}     \hfill     \end{document}


title: Is it possible now to use microtype with opentype fonts?

text: LuaTeX has limited support for microtypograhpy now, and it can be invoked if only type1 fonts are used. But is it possible for `microtype` to work with opentype fonts loaded with `fontspec` now? I have searched the Internet for this, but most of the relevant information is outdated.


title: getfileinfo not working in Joseph Wright's model dtx file creating a class

text: I love Joseph Wright's model dtx file for style file creation, but would like to use it for classes, too. So I did some replacements in it (`sty` -> `cls` and the like) and got this `democls.dtx`:               % \iffalse meta-comment     % !TEX program  = pdfLaTeX     %<*internal>     \iffalse     %</internal>     %<*readme>     ----------------------------------------------------------------     democls --- description text     E-mail: you@your.domain     Released under the LaTeX Project Public License v1.3c or later     See http://www.latex-project.org/lppl.txt     ----------------------------------------------------------------          Some text about the class: probably the same as the abstract.     %</readme>     %<*internal>     \fi     \def\nameofplainTeX{plain}     \ifx\fmtname\nameofplainTeX\else       \expandafter\begingroup     \fi     %</internal>     %<*install>     \input docstrip.tex     \keepsilent     \askforoverwritefalse     \preamble     ----------------------------------------------------------------     democls --- description text     E-mail: you@your.domain     Released under the LaTeX Project Public License v1.3c or later     See http://www.latex-project.org/lppl.txt     ----------------------------------------------------------------          \endpreamble     \postamble          Copyright (C) 2009 by You <you@your.domain>          This work may be distributed and/or modified under the     conditions of the LaTeX Project Public License (LPPL), either     version 1.3c of this license or (at your option) any later     version.  The latest version of this license is in the file:          http://www.latex-project.org/lppl.txt          This work is "maintained" (as per LPPL maintenance status) by     You.          This work consists of the file  democls.dtx     and the derived files           democls.ins,                                     democls.pdf and                                     democls.cls.          \endpostamble          \usedir{tex/latex/democls}     \generate{       \file{\jobname.cls}{\from{\jobname.dtx}{class}}     }     %</install>     %<install>\endbatchfile     %<*internal>     \usedir{source/latex/democls}     \generate{       \file{\jobname.ins}{\from{\jobname.dtx}{install}}     }     \nopreamble\nopostamble     \usedir{doc/latex/democls}     \generate{       \file{README.txt}{\from{\jobname.dtx}{readme}}     }     \ifx\fmtname\nameofplainTeX       \expandafter\endbatchfile     \else       \expandafter\endgroup     \fi     %</internal>     %<*class>     \NeedsTeXFormat{LaTeX2e}     \ProvidesClass{democls}[2009/10/06 v1.0 description text]     %</class>     %<*driver>     \documentclass{ltxdoc}     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage[numbered]{hypdoc}     \EnableCrossrefs     \CodelineIndex     \RecordChanges     \begin{document}       \DocInput{\jobname.dtx}     \end{document}     %</driver>     % \fi     %     %\GetFileInfo{\jobname.cls}     %     %\title{^^A     %  \textsf{democls} --- description text\thanks{^^A     %    This file describes version \fileversion, last revised \filedate.^^A     %  }^^A     %}     %\author{^^A     %  You\thanks{E-mail: you@your.domain}^^A     %}     %\date{Released \filedate}     %     %\maketitle     %     %\changes{v1.0}{2009/10/06}{First public release}     %     %\DescribeMacro{\examplemacro}     % Some text about an example macro called \cs{examplemacro}, which          % might have an optional argument \oarg{arg1} and mandatory one     % \marg{arg2}.     %     %\StopEventually{^^A     %  \PrintChanges     %  \PrintIndex     %}     %     %    \begin{macrocode}     %<*class>     %    \end{macrocode}     %     %\begin{macro}{\examplemacro}     %\changes{v1.0}{2009/10/06}{Some change from the previous version}     %    \begin{macrocode}     \newcommand*\examplemacro[2][]{%       Some code here, probably     }     %    \end{macrocode}     %\end{macro}     %     %    \begin{macrocode}     %</class>     %    \end{macrocode}     %\Finale      However, compiling the `dtx` file shows that `\filedate` and `\fileversion`, generated by `\GetFileInfo` got wrong values: ![enter image description here](http://i.stack.imgur.com/jUUH5.png) There has been a comment by @MartinScharrer to a related question saying: However, I guess the cause of trouble is the `\ProvidesClass` line before the `\documentclass`. It should be there, at least not in this form, because it is taken as part of the driver document. There are some `\iffalse .. \fi` missing or use `%<class>\ProvidesClass` instead. I have been moving around stuff in my `democls.dtx` to no avail. How can I get this working?


title: amsmath bibliography conflict

text: Edit: I found a solution. I used the `tocbibind` package and replaced the line in the template with               \settocbibname{Bibliography}      I'm working on my thesis and my university has a LaTeX template package which renames the bibliography chapter from _References_ to _Bibliography_ and adds it to the table of contents like so               \renewcommand{\bibname}{Bibliography \addcontentsline{toc}{chapter}{Bibliography}}      But this causes a conflict between bibtex and amsmath and I get an error if I have both of the following lines in my file                \usepackage{amsmath}      \bibliography{bib}      where _bib_ is the name of my bibliography file. If I comment either one of those out it works fine but I get an error if I leave both of them in. These are the errors I get               ! Use of \reserved@a doesn't match its definition.\protected@write ...le@protect \edef \reserved@a {\write #1{#3}}\reserved@a ... \begin{thebibliography}{1}     ! Use of \reserved@a doesn't match its definition.\protected@write ... #1{#3}}\reserved@a \endgroup\if@nobreak \ifvmode \nobr... \begin{thebibliography}{1}     ! Extra }, or forgotten \endgroup.\markboth ...d@protected@xdef \@themark {{#1}{#2}}\@temptokena \expandafter ... \begin{thebibliography}{1}      I would very much appreciate suggestions for a workaround or an alternative to the renaming line. Thanks. Edit: It seems that the error is more complicated than I thought as I'm not able to reproduce it without using my university's template. Here is the complete .sty file: http://pastie.org/8505568 And here is the minimum code to get the error:               \documentclass{report}     \usepackage{amsmath}     \usepackage{packages/RUMSC}          \begin{document}     \SSE{}     \MScwhen{Date in English}     \MScdags{Date in Icelandic}     \MSctitle{Thesis title in English}     \MScheiti{Thesis title in Icelandic}     \MScauthor{Author}          \makeMSc     \MSctableofcontents     \startMSc          text\cite{holman_heat_2010}.          \bibliographystyle{plain}     \bibliography{bibliography/bib}     \end{document}      The cited reference doesn't matter but the one I'm using is               @book{holman_heat_2010,         address = {Boston, [Mass.]},         title = {Heat transfer},         isbn = {9780073529363  0073529362  9780071267694  0071267697},     abstract = {One of the most popular heat transfer texts of its time, Holman's book is noted for its clarity, accessible approach, and inclusion of many examples and problem sets. This new edition features design-oriented problems, and improved pedagogy.},     language = {English},     publisher = {{McGraw} Hill Higher Education},     author = {Holman, J. P},     year = {2010}     }


title: Is is possible to make indentation within enumerate item?

text: This is some of my code :               \begin{enumerate}     \item {\bfseries For} all $v \in V(D)$ whose weight isn't 0 with $u$ {\bfseries do}\\     \indent {\bfseries If} $l(v) < l(u) + w((u, v))$ \textbf{then}\\     \hspace{2pt} set $l(v) := l(u) + w((u, v))$\\     \indent \indent set $p(v) := u.$     \end{enumerate}      what I really want is something like this :                For all v element V(D) whose weight isn't 0 with u do        If l(v) < l(u) + w(u,v)           set l(v) := l(u) + w(u,v)              set p(v) := u      but with that code I get :                For all v element V(D) whose weight isn't 0 with u do        If l(v) < l(u) + w(u,v)        set l(v) := l(u) + w(u,v)        set p(v) := u      any help appreciated. thanks.


title: 2 left alignments under cases

text: I would like to align something under `cases` as follows:               value1                    if condition     value2  line1ofvalue2...  otherwise             line2ofvalue2..             line3ofvalue2.      First, there are only 2 conditions (each one for one value), so I want `if condition` and `otherwise` are left adjusted. Then as my `value2` is a long, I need to split it into 3 lines, so I want these 3 lines to be left adjusted. Does anyone know how to do this? Thank you very much


title: How to best use and compile multiple .tex files as part of same final document?

text: I have a large document which currently is comprised of a variety of `.tex` files. The `mainfile.tex` looks something like:               %lots of total formatting stuff          \include{Body/chapter1}     \include{Body/chapter2}     %\include{Body/chapter3}     %\include{Body/chapter4}     %etc      However, this means each of the components (ie chapter1, chapter2, etc) are not valid code. I want to be able to view an individual file and compile while viewing it (ex. `chapter1.tex`) within TeXmaker. I am fine if this compiles `mainfile.tex` As I understand, I need to either combine everything into one file or do either:   * tell TeXmaker to let me set a "always compile this file even if not viewing it" option somewhere - so things like F1, etc work, and always reference the `mainfile.tex` or   * move all my formatting initialization, etc, to a file which I can include at the front of each individual component (and include some sort of header guard in this? I have no idea if this concept is feasible or even makes sense in LaTeX) so the same overall formatting is ALWAYS included at the beginning of a document regardless as to the order they are included. I would strongly prefer the second option if possible but I am unsure how to do this.


title: Long formula alignment inside breqn with tabs?

text: It aligns the formula to the left-hand-side but I would like to get tabs here- and-there. How can I get tabs inside breqn or is there some package to do it automatically?               $ cat test.tex          % breqn -pkg fixes the long equations     \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage{amsfonts}     \usepackage{amsmath}     \usepackage{verbatim}     \usepackage{breqn}                    \begin{document}     % ...          % A long eq which I want better indented, with tabs, so it is easier to read     \begin{breqn}     \forall game\in[2,5]\in\mathbb N     \\     \forall player\in[1,10]\in\mathbb N     \\     % I want 1 pc of TABs HERE      potentialTiredness[player][game] =     \\     % I WANT 2 pcs of TABs HERE     \left(     \sum_{\text{game2}\in[1,\text{game}-1}x[\text{player}][\text{game2}]/5     \right)     +     \frac{x[\text{player}][\text{game}-1]}{10}     \end{breqn}               \end{document}      and it does work:               $ pdflatex test.tex      ...     Output written on test.pdf (1 page, 64508 bytes).     Transcript written on test.log.


title: Creating anchors in a shape with a \foreach loop

text: I was playing around with this question, and in particular tried to modify and expand the linked example. It works fine, but there is an error when I try to use a `\foreach` loop to define the different groups of anchors. If I use the loop variable directly, I get an " _! Undefined control sequence._ " error. If I use the value of the counter, only the last value the loop takes on is used. However, as one can see all three anchors are defined. So my questions are:   * Why does that happen?   * How to work around that? ## Code               \documentclass[tikz, border=2mm]{standalone}               \tikzset{%         multipoles/.is family,         multipoles,         pin spacing/.initial=5mm,         top left pins/.initial=3,         bottom left pins/.initial=3,         top right pins/.initial=8,         bottom right pins/.initial=0,         top pins/.initial=0,         bottom pins/.initial=0,      }          \newcommand{\mpp}[1]%     {   \pgfkeysvalueof{/tikz/multipoles/#1}     }          \newcounter{mypincounter}          \pgfdeclareshape{ic8pin}{     \anchor{center}{\pgfpointorigin} % within the node, (0,0) is the center     \anchor{text} % this is used to center the text in the node     {\pgfpoint{-.5\wd\pgfnodeparttextbox}{-.5\ht\pgfnodeparttextbox}}          \pgfmathtruncatemacro{\lrd}{max(\mpp{top left pins} +\mpp{bottom left pins} +or(\mpp{top left pins},\mpp{bottom left pins}), \mpp{top right pins} +\mpp{bottom right pins} +or(\mpp{top right pins},\mpp{bottom right pins}) == 0 ? 2 : max(\mpp{top left pins} +\mpp{bottom left pins} +or(\mpp{top left pins},\mpp{bottom left pins}), \mpp{top right pins} +\mpp{bottom right pins} +or(\mpp{top right pins},\mpp{bottom right pins})}     \xdef\LRDivisions{\lrd}          \pgfmathtruncatemacro{\tbd}{max(\mpp{top pins} +and(1,\mpp{top pins}), \mpp{bottom pins} +and(1,\mpp{bottom pins}) == 0 ? 2 : max(\mpp{top pins} +and(1,\mpp{top pins}), \mpp{bottom pins} +and(1,\mpp{bottom pins})}     \xdef\TBDivisions{\tbd}          \foreach \x in {1,...,\mpp{top left pins}}     {   \setcounter{mypincounter}{\x}         \expandafter\savedanchor\csname tlpin\Roman{mypincounter} \endcsname{\pgfpoint{-\TBDivisions*\mpp{pin spacing}/2}{\LRDivisions*\mpp{pin spacing}/2-\mpp{pin spacing}}}         \anchor{pin\x}{\csname tlpin\Roman{mypincounter} \endcsname}     }          \foregroundpath{ % border and pin numbers are drawn here     \pgfsetlinewidth{0.4pt}          \pgfpathrectanglecorners{\pgfpoint{\TBDivisions*\mpp{pin spacing}/2}{\LRDivisions*\mpp{pin spacing}/2}}{\pgfpoint{-\TBDivisions*\mpp{pin spacing}/2}{-\LRDivisions*\mpp{pin spacing}/2}}     \pgfusepath{draw} %draw rectangle          \pgftext[left,at={\pgfpoint{-.5cm}{-.55cm}}]{\scriptsize LR : \textcolor{red}{\LRDivisions}}     \pgftext[left,at={\pgfpoint{-.5cm}{.55cm}}]{\scriptsize TB : \textcolor{red}{\TBDivisions}}     }}          \begin{document}          \begin{tikzpicture}     \draw (0,0) node[ic8pin] (IC1) {IC 1};     \draw (-5,5) node[ic8pin,rotate=90] (IC2) {IC 2};     \draw[red] (IC1.pin1) -- ++ (-1,0.5) -- (IC2.pin1);     \draw[blue] (IC1.pin2) -- ++ (-1,0) -- (IC2.pin2);     \draw[green] (IC1.pin3) -- ++ (-1,-0.5) -- (IC2.pin3);     \end{tikzpicture}          \end{document}      This produces the error (the problem is the `*\x`):               \foreach \x in {1,...,\mpp{top left pins}}     {   \setcounter{mypincounter}{\x}         \expandafter\savedanchor\csname tlpin\Roman{mypincounter} \endcsname{\pgfpoint{-\TBDivisions*\mpp{pin spacing}/2}{\LRDivisions*\mpp{pin spacing}/2-\value{mypincounter}*\mpp{pin spacing}*\x}}         \anchor{pin\x}{\csname tlpin\Roman{mypincounter} \endcsname}     }      And this does not work properly (`\value{mypincounter}` is always equal 3):               \foreach \x in {1,...,\mpp{top left pins}}     {   \setcounter{mypincounter}{\x}         \xdef\mydummyx{\x}         \expandafter\savedanchor\csname tlpin\Roman{mypincounter} \endcsname{\pgfpoint{-\TBDivisions*\mpp{pin spacing}/2}{\LRDivisions*\mpp{pin spacing}/2-\value{mypincounter}*\mpp{pin spacing}}}         \anchor{pin\x}{\csname tlpin\Roman{mypincounter} \endcsname}     }      ## Output ![enter image description here](http://i.stack.imgur.com/u6gq7.png) ## Expected Output ![enter image description here](http://i.stack.imgur.com/NomUX.png)


title: Errors with figure caption since using siunitx

text: I am a bit of a newbie with LaTeX. Everything was working well (mostly) but I am running into all sorts of weird errors since I added the `siunitx` package. The error log first showed errors with tables, which I was able to fix (I think) using a quick tip on entry (thank you). Now the remaining errors originate from all my figure captions. It feels like `siunitx` is trying to parse my figure captions but is rejecting their content. I tried the same strategy as what fixed it for my tables (`\sisetup{parse-numbers = false}`), but it is still not working. Any ideas? This is my simple code (works if **siunitx** is commented out):               \documentclass[12pt,letterpaper]{report}     %     % Review cuthesis.sty for more documentation on available options     % for this package.     %\usepackage[1committee,phd,nonsequential]{cuthesis}     \usepackage[3committee,masters,standard,nonsequential]{cuthesis} %Carleton University template     \usepackage{array}     \usepackage{graphicx}     \usepackage{color}     \usepackage{cite}     \usepackage{subfig}     \usepackage{amsmath}     \usepackage{rotating}     \usepackage{setspace}     \usepackage{longtable}     \usepackage[colorlinks=true,pdftex,bookmarks=true,bookmarksnumbered=true,breaklinks=true]{hyperref}     \usepackage{pdfsync}     %\usepackage{ucs}     \usepackage[utf8x]{inputenc}     %\usepackage[T1]{fontenc}     %\usepackage{siunitx} %used for the writing of SI units such as micro     \usepackage{hyperref} %used for pdf properties     %\usepackage[indent,bf]{caption}          \graphicspath{{figures/}}     \onehalfspacing          \title{Sandbox}          \begin{document}          % Define thesis title and author     \title{RD}     \author{FD}     \pastdegrees{B.Eng.}     \dept{Systems and Computer Engineering}     \degreename{Master of Applied Science in Electrical Engineering}               % Specify your Thesis Submission Date     \submitdate{May, 2012} \copyrightyear{2012} \copyrightmonth{May}          % Thesis committee information for the signature page     % Be sure to specify size of committee in cuthesis options.     % Department Chair does not count as a committee member.     % ie: 1committee = department chair  (doesn't make sense)     %     2committee = firstcommittee + department chair     %     3committee = firstcommittee + secondcommittee + department chair     %     4committee = firstcommittee + secondcommittee + thirdcommittee + department chair     % Default setting is 1committee     \firstcommittee{Professor MS, Thesis Supervisor}     \secondcommittee{Professor MB, Examiner}     \thirdcommittee{Professor "Name", Thesis Co-supervisor}          % Specify department chair     \departmentchair{Professor HS, Chair,\\Department of Systems and Computer Engineering}               \section{whatever}     la la          \begin{figure}       % Requires \usepackage{graphicx}        %TODO regenerate this graph with matlab       \centering       \includegraphics[width=4in]{OFDMspectrum-single.png}       \caption{Spectrum of a single modulated OFDM subcarrier (truncated).}  \label{fig:single}     \end{figure}          \end{document}


title: Alphabetic sorting fails in biblatex when defining characters with \newcommand

text: I'm citing an Icelandic guy whose last name has a first character Á (U+00C1). If I write his name in my bibliography with that character code (`\char"00C1`), the sorting works correctly. If, however, I define the character Á as `\auppercaseacute` in my preamble with `\newcommand`, the sorting fails. What is going on here?               \documentclass{article}     \usepackage{fontspec, filecontents}     \usepackage[style=authoryear]{biblatex}     %\newcommand{\auppercaseacute}{\char"00C1}     \begin{filecontents}{\jobname.bib}     @BOOK{mccartney1974,         AUTHOR = "Paul McCartney",         TITLE = "A cool book about guitars",         YEAR = "1974"}     @BOOK{arnason2007,         TITLE = "Íslensk orðabók",         YEAR = "2007",         EDITOR = "Mörður {\char"00C1}rnason"}     \end{filecontents}     \addbibresource{\jobname.bib}     \begin{document}     \cites{mccartney1974}{arnason2007}     \printbibliography     \end{document}      ![enter image description here](http://i.stack.imgur.com/D1una.png)               \documentclass{article}     \usepackage{fontspec, filecontents}     \usepackage[style=authoryear]{biblatex}     \newcommand{\auppercaseacute}{\char"00C1}     \begin{filecontents}{\jobname.bib}     @BOOK{mccartney1974,         AUTHOR = "Paul McCartney",         TITLE = "A cool book about guitars",         YEAR = "1974"}     @BOOK{arnason2007,         TITLE = "Íslensk orðabók",         YEAR = "2007",         EDITOR = "Mörður {\auppercaseacute}rnason"}     \end{filecontents}     \addbibresource{\jobname.bib}     \begin{document}     \cites{mccartney1974}{arnason2007}     \printbibliography     \end{document}      ![enter image description here](http://i.stack.imgur.com/gVOPT.png)


title: listplot and (0,0)

text: Look at the following minimal working example. I cannot understand, why the first line of listplot is plotted from (0,0) to the first data of the input file. I am compiling with               % converting with batchfile     %latex --enable-write18 --src -interaction=nonstopmode --save-size=80000 %A%.tex     %dvips -P pdf -D1200 %A%.dvi     %ps2pdf %A%.ps          \documentclass[pstricks,border=12pt]{standalone}     \usepackage{pstricks}     \usepackage{pst-plot}     \usepackage{filecontents}          % \IfFileExists{testdaten.dat}{}{     \begin{filecontents}{testdaten.dat}     0.0,4.0     0.1,3.27704     0.2,2.7192     0.3,2.30629     0.4,2.0192     0.5,1.83984     0.6,1.7512     0.7,1.73729     0.8,1.7832     0.9,1.87504     1.0,2.0     1.1,2.14629     1.2,2.3032     1.3,2.46104     1.4,2.6112     1.5,2.74609     1.6,2.8592     1.7,2.94504     1.8,2.9992     1.9,3.01829     2.0,3.0     2.1,2.94304     2.2,2.8472     2.3,2.71329     2.4,2.5432     2.5,2.33984     2.6,2.10720     2.7,1.85029     2.8,1.5752     2.9,1.28904     3.0,1.0     3.1,0.71729     3.2,0.45120     3.3,0.21304     3.4,0.01519     3.5,-0.1289     3.6,-0.2047     3.7,-0.1969     3.8,-0.0887     3.9,0.13729     4.0,0.50000}     \end{filecontents}     % }                    \readdata{\data}{testdaten.dat} % Daten auslesen          \begin{document}     % \multido{\iC=1+1}{40}     \multido{\iC=40+1}{1}         {         \begin{pspicture}(-0.5,-0.5) (4 ,4)         \psaxes[axesstyle=frame,origin={0,0},tickstyle=bottom, xyDecimals=0,labels=y]{->}(0,0)(0,0) (4 ,4)                      \listplot[nStart=1,nEnd=\iC\space,plotstyle=line, dotstyle=x, linewidth=1.93pt, linecolor=blue]{\data}  % Punkte Blau              \end{pspicture}         }     \end{document}      Look at the multido command. This one prints only one picture and this picture should be the same as the last one of the other multido command. but the first frame of                \multido{\iC=1+1}{40}       prints a line from (0,0) to (0.0,4.0) which seems to be not correct or I am not able to understand listplot. Goal: The first picture on one page should be the last multido picture, then all pictures should occure except the last one. The order of 40 picture should be 40,1,2,3,4,...,39 In this case you can make animated pictures and the would be capable with any pdf reader. No information is lost, the animation would only start in acrobat.... best regrads EDIT1: Additional Infos:                *File List*     standalone.cls    2012/09/15 v1.1b Class to compile TeX sub-files standalone     ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)        ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)      ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional      xkeyval.sty    2012/10/14 v2.6b package option processing (HA)      xkeyval.tex    2012/10/14 v2.6b key=value parser (HA)     standalone.cfg    2012/09/15 v1.1b Default configuration file for 'standalone'      class      article.cls    2007/10/19 v1.4h Standard LaTeX document class       size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)     pstricks.sty    2013/12/12 v0.60 LaTeX wrapper for `PSTricks' (RN,HV)     pstricks.tex    2014/03/12 v2.53 `PSTricks' (tvz,hv)     pst-xkey.tex    2005/11/25 v1.6 PSTricks specialization of xkeyval (HA)       pst-fp.tex    2014/03/12 v2.53 `PST-fp' (hv)       xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)        color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive        dvips.def    1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)     pst-plot.sty    2011/04/13 package wrapper for pst-plot.tex (hv)     pst-xkey.sty    2005/11/25 v1.6 package wrapper for pst-xkey.tex (HA)      multido.sty    2004/05/17 package wrapper for PSTricks `multido.tex', (HV/RN)      multido.tex    2010/05/14 v1.42 `multido' (tvz,hv)     pst-plot.tex    2014/03/12 1.61 `pst-plot' (tvz,hv)     filecontents.sty    2011/10/08 v1.3 Create an external file from within a LaTeX      Second Multido Command with only one picture ![Second multido](http://i.stack.imgur.com/ShEAC.png) First Multido Command with 40 pictures, the first one can be seen here.... ![First multido](http://i.stack.imgur.com/Dlj0W.png) Peter


title: Looking for \bigCap or \bigdoublecap

text: I know `\Cap` (or `\doublecap`) and I know `\bigcap`. However, now I also need `\bigCap` (or `\bigdoublecap`) which is a `\bigcap` with another `\cap` in between. I already tried using `\stackinset` from the stackengine package, but was not able to produce decent results.


title: Biber: problems with UTF8 files

text: I am running Biber 1.7 (newest) and the matching Biblatex (newest) on AMD64, the distribution is Gentoo with UTF8 locale. The editor being used is Kile and the MWE is compiled with XeLaTeX. MWE, with added fontspect per egreg's suggestion:               \documentclass{article}          \usepackage{fontspec}     \setmainfont[Ligatures=TeX]{cmunrm.otf}          \usepackage{polyglossia}     \setdefaultlanguage{english}     \setotherlanguages{russian}          \usepackage{csquotes}          \PassOptionsToPackage{style=authoryear-comp, natbib=true, backend=biber}{biblatex}     \usepackage{biblatex}     \addbibresource[datatype=bibtex]{bibliography.bib}     \DeclareNameAlias{sortname}{first-last}          \begin{document}          \nocite{*}          a          \printbibliography     \end{document}      The bibliography file is               @STRING{zhetf = {Журнал Экспериментальной и Теоретической Физики}}          @ARTICLE{Migdal1975r,         AUTHOR = {Александр Аркадьевич Мигдал},           TITLE = {{Фазовые переходы в калибровочных и спиновых решеточных моделях}},          JOURNAL = zhetf,         VOLUME = 69,         NUMBER = 4,          PAGES = {1457--1465},         YEAR = 1975     }      I can run XeLaTeX just fine, but when I call Biber on it it stops like so:               stuff@stuff ~/ $ biber mwe     INFO - This is Biber 1.7     INFO - Logfile is 'mwe.blg'     INFO - Reading 'mwe.bcf'     INFO - Using all citekeys in bib section 0     INFO - Processing section 0     INFO - Looking for bibtex format file 'bibliography.bib' for section 0     INFO - Decoding LaTeX character macros into UTF-8     INFO - Found BibTeX data source 'bibliography.bib'      and returns. The output BBL file is empty. What could be wrong with the bibliography file? This behavior occurs on multiple platforms, actually, including at least Windows 7 and Gentoo. EDIT: The problem was not that the bibliography doesn't show up in the PDF file, which would have been solved by specifying a Cyrillic font. Rather, the issue is Biber that bails prematurely without generating any output or error messages. This is the log file produced by `biber --debug mwe` showing that where it dies without warning (I say "dies" because there is no "..." at the end of the line):               [0] Config.pm:425> INFO - This is Biber 1.7     [0] Config.pm:428> INFO - Logfile is 'mwe.blg'     [75] biber:251> INFO - === piÄ<85> paÅº 18, 2013, 08:46:45     [75] Biber.pm:333> INFO - Reading 'mwe.bcf'     [143] Biber.pm:607> INFO - Using all citekeys in bib section 0     [143] Biber.pm:675> DEBUG - Adding 'entry' list 'nyt' for section 0     [154] Biber.pm:2997> INFO - Processing section 0     [154] Biber.pm:3118> DEBUG - Looking for directly cited keys:     [165] Biber.pm:3134> INFO - Looking for bibtex format file 'mwe.bib' for section 0     [165] bibtex.pm:179> DEBUG - Caching data for BibTeX format file 'mwe.bib' for section 0     [166] bibtex.pm:901> INFO - Decoding LaTeX character macros into UTF-8     [166] bibtex.pm:776> INFO - Found BibTeX data source 'mwe.bib'     [166] bibtex.pm:860> DEBUG - Cached Text::BibTeX entry for key 'Migdal1975r' from BibTeX file 'mwe.bib'     [167] bibtex.pm:187> DEBUG - All cached citekeys will be used for section '0'     [167] bibtex.pm:355> DEBUG - Source mapping (type=driver, key=Migdal1975r): Entry type is 'article' but map wants 'conference', skipping step ...     [167] bibtex.pm:355> DEBUG - Source mapping (type=driver, key=Migdal1975r): Entry type is 'article' but map wants 'electronic', skipping step ...     [167] bibtex.pm:355> DEBUG - Source mapping (type=driver, key=Migdal1975r): Entry type is 'article' but map wants 'www', skipping step ...     [167] bibtex.pm:350> DEBUG - Source mapping (type=driver, key=Migdal1975r): Entry type is 'article' but map wants 'mastersthesis' and step has 'final' set, skipping rest of map ...     [167] bibtex.pm:350> DEBUG - Source mapping (type=driver, key=Migdal1975r): Entry type is 'article' but map wants 'phdthesis' and step has 'final' set, skipping rest of map ...     [167] bibtex.pm:350> DEBUG - Source mapping (type=driver, key=Migdal1975r): Entry type is 'article' but map wants 'techreport' and step has 'final' set, skipping rest of map ...     [167] bibtex.pm:378> DEBUG - Source mapping (type=driver, key=Migdal1975r): No field 'address', skipping step ...     [167] bibtex.pm:378> DEBUG - Source mapping (type=driver, key=Migdal1975r): No field 'school', skipping step ...     [167] bibtex.pm:378> DEBUG - Source mapping (type=driver, key=Migdal1975r): No field 'annote', skipping step ...     [167] bibtex.pm:378> DEBUG - Source mapping (type=driver, key=Migdal1975r): No field 'archiveprefix', skipping step ...     [168] bibtex.pm:378> DEBUG - Source mapping (type=driver, key=Migdal1975r): No field 'primaryclass', skipping step ...     [168] bibtex.pm:378> DEBUG - Source mapping (type=driver, key=Migdal1975r): No field 'key', skipping step ...     [168] bibtex.pm:378> DEBUG - Source mapping (type=driver, key=Migdal1975r): No field 'pdf', skipping step ...     [168] bibtex.pm:941> DEBUG - Parsing namestring 'Александр Аркадьевич Мигдал'      EDIT 2: I have played around with the bib file and found that the problem is somehow related to the journal name. Biber fails to finish if the journal name is written using Cyrillic. Changing it to something else ("blablabal") allows Biber to finish, while anything containing Cyrillic (for example, author's name) leads to Biber failing. How come?


title: keep numbering in appendix

text: I have a question about the numbering in the appendix. I want to proof a Lemma in the appendix which I used in the normal sections of my thesis. Therefore, I want to state the Lemma again in the appendix, followed by the proof. But I would like to keep the numbering of the Lemma the same as where I first used it instead of having them numbered with (A.1) etc. Example: In the normal chapters: > Lemma 3.7 > > statement and formular (3.21) Then in the Appendix it should also stay like this: > Appendix > > Lemma 3.7 > > .... > > Proof: > > In order to proof equation (3.21), we have to.... > > \end proof I hope it is clear, what I'm looking for. Thanks!


title: Drawing a 3x2 rectangle

text: I am trying to draw a 3x2 rectangle. I am not sure if multipart rectangle can do it, but it seems that multipart can only do one-dimensional arrays. I tried matrix, but then I cannot get the lines in between cells or around the rectangle. I need to put text in each cell. What I want to get is a rectangle with the following with the box around and horizontal and vertical lines in between cells:               Aid   Value      1     R1      2     R2      This needs to be inside a tikz environment. Here is what I have as a minimal code and it is fine except for the matrix part on the right:               \documentclass{scrartcl}                  \usepackage{tikz}     \usetikzlibrary{shapes,fit,positioning,arrows,matrix}               \begin{document}     \begin{tikzpicture}     \tikzstyle{bigbigbox} = [minimum width=3.5cm, draw, thick, rounded corners, rectangle]     \tikzstyle{bigbox} = [draw, thick, rounded corners, rectangle]     \tikzstyle{box} = [minimum width=2.7cm, rounded corners,rectangle, fill=blue!20]           \node[align=center,draw,shape=rectangle split,            rectangle split parts=3, text width=1.0cm,text centered] (A)             {Value \nodepart{two}R1\nodepart{three}R2};          \node[rectangle, draw,right of=A,xshift=1cm,rotate=90] (A1) {map};       \matrix (A2) [matrix of nodes,row sep=0em,column sep=0em, right of=A1,xshift=1cm]       {          Aid & Value \\          1 & R1 \\          2 & R2 \\};           \node[align=center,shape=rectangle split,            rectangle split parts=2, text width=2cm,text centered,above of=A,yshift=0.3cm] (A3)             {Mapper 1 \nodepart{two}R};          \draw[-triangle 90, line width=1mm, blue!50,postaction={draw=blue!50, line width=3mm, shorten >=0.2cm, -}] (A.east) -- (A1.north);          \node[bigbox] [fit = (A3) (A2)] (box1){};          \end{tikzpicture}          \end{document}


title: KOMA-Script throws "! Extra \else" error

text: With a minimal document such as               \documentclass{scrartcl}     \pagestyle{headings}     \begin{document}     \section{Introduction}     \end{document}      I am getting the following error with **`latex filename.tex`**               ! Extra \else.     \@sect ...sname }{\scr@ds@tocentry }\fi \fi \else                                                    \def \@svsechd {#6{\hskip ...     l.49 \section{Introduction}      Can anyone help pinpoint where the problem might be?   * If I change the document class to be article, it works fine   * If I remove the \pagestyle{headings}, it works fine   * If I change headings to empty, it works fine Versions:               pdfTeX 3.1415926-2.5-1.40.14 (TeX Live 2013/Arch Linux)     kpathsea version 6.1.1     ...     Compiled with libpng 1.6.10; using libpng 1.6.10     Compiled with zlib 1.2.8; using zlib 1.2.8     Compiled with poppler version 0.24.5      and KOMA-Script (`scrartcl.cls`)               %%% From File: $Id: scrkernel-version.dtx 1560 2013-12-19 07:13:30Z mjk $


title: A hitch in my animation and tikz document

text: There's something strange going on with the animation at 135 degrees. I can't figure out what's going wrong. ![enter image description here](http://i.stack.imgur.com/JHgQj.gif) Here's the MWE:               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{calc}     \usepackage{animate}     \newcommand{\crankshaft}[1]{%             \begin{tikzpicture}[x=0.5cm,y=0.5cm]                      \draw[fill]  (0,0) coordinate [label=180:Z] (Z) circle (2pt);           %% center of the picture                 \draw[fill]  (5,5) coordinate [label=135:Q] (Q) circle (2pt);           %% center of the circle                 \draw[fill]  (Q) -- +(  0:6)   coordinate [label=0:A] (A) circle (2pt); %% first point on the circle                 \clip[draw] (Q)  circle (4.5cm);                 \draw[help lines,blue!20,step=1] (0,0) grid (12,12);                 %% drawing the circle                 \draw[blue]  (A)                               let \p1 = ($ (A) - (Q) $) in                              arc(0:360:{veclen(\x1,\y1)});                      \draw [line width=0.4pt,red]                       let \p1 = ($(A) - (Q)$), \n1={veclen(\x1,\y1)} in                       (Q) -- +(#1:\n1)                       coordinate (B) circle (2pt);                      \draw[purple,line width=0.4pt]                        (B) -- +($  (0,0) ! 2em ! 0 : ($(B)-(Q)$)  $)                         coordinate [label=center:{\textbf{B:#1}}] (Bl) circle (2em);                      \draw[blue]                          ($ (B) ! 0.45 ! (Q) $)                        coordinate (tC) circle (2pt);                      \draw[line width=01.5em,->]                       (tC)                        let \p1 = ($(tC) - (Q)$),                            \n1={atan2(\x1,\y1)}, %% start angle                           \n2={\n1+90},         %% end angle                           \n3={veclen(\x1,\y1)} %% radius                       in                           arc (\n1:\n2:\n3)                           -- ++(\n2+80:1em)                          ;             \end{tikzpicture}%     }          \begin{document}              \begin{animateinline}[autoplay,loop]{1}         \multiframe{24}{iAng=0+15}{%             \crankshaft{\iAng}%         }%         \end{animateinline}          \end{document}


title: Reorder sections based on a variable?

text: I have a CV I've created in LaTeX (using the moderncv package). I'm trying to create flavors of the CV based on variables. What I would like to do is to generate the sections in a different order. e.g. I currently have:               \section{Education}     \cventry{X}{Y}{Z}{}{}{}     \cventry{X}{Y}{Z}{}{}{}          \section{Experience}     \cventry{X}{Y}{Z}{}{}{}     \cventry{X}{Y}{Z}{}{}{}          \section{References}     \cventry{X}{Y}{Z}{}{}{}     \cventry{X}{Y}{Z}{}{}{}      So the PDF generated right now has this order:   * Education   * Experience   * References I'd like, say, flavor_A to render as :   * Experience   * Education   * References and flavor_B to render as:   * Experience   * Education and flavor_C to render as:   * Education   * Experience   * References Is something like this possible?


title: Using foreach loop in TikZ to plot at non-uniform locations

text: As a Teaching Assistant for a class, I am trying to draw a seating chart for the professor. The seating chart will have a photo of each student, the student's name, and where the student is sitting in the lecture room. I need to produce two seating charts:   1. A blank seating chart where a rectangle represents each chair, for students to fill in their names where they are seated.   2. A seating chart with students' names and photos. Before attempting to draw a seating chart for the 80+ seats in the lecture hall, I am working on a smaller example with 11 seats. Currently, the code I use to draw the blank seating chart and the output looks like the following:               \documentclass[10pt]{article}          \usepackage[margin=0in,paperwidth=17in, paperheight=11in]{geometry}          \usepackage{tikz}          % Usage: \student{x coord}{y coord}{name}{picture file}     %\newcommand{\student}[4]{%     %  \node[anchor=base,inner sep=0,     %      label={[text width=20mm,align=center]below:#3}] at (#1,#2)     %      {\includegraphics[width=17mm]{#4}};%     %}          % Draw an empty box for each chair     \newcommand{\student}[4]{       \node[anchor=base,shape=rectangle,draw,           minimum width=17mm,minimum height=22mm]           at (#1,#2) {};     }          \begin{document}          \begin{center}     \begin{tikzpicture}       \draw[white] (0,0) -- (43.1,0) -- (43.1,27.9) -- (0,27.9) -- (0,0);            \draw (5,5) -- (10,15);       \draw (12,18) -- (31,18);       \draw (38,5) -- (33,15);            \student{4}{7}{George Washington}{empty-face.png};       \student{5.5}{10}{John Adams}{empty-face.png};       \student{7}{13}{Thomas Jefferson}{empty-face.png};            \student{12.5}{20}{James Madison}{empty-face.png};       \student{17}{20}{James Monroe}{empty-face.png};       \student{21.5}{20}{John Quincy Adams}{empty-face.png};       \student{26}{20}{Andrew Jackson}{empty-face.png};       \student{30.5}{20}{Martin Van Buren}{empty-face.png};            \student{36}{13}{William Henry Harrison}{empty-face.png};       \student{37.5}{10}{John Tyler}{empty-face.png};       \student{39}{7}{James K Polk}{empty-face.png};          \end{tikzpicture}     \end{center}          \end{document}      ![Blank seating chart output](http://i.stack.imgur.com/58Qbx.png) And the code for the seating chart with people's names and photos is very similar:               \documentclass[10pt]{article}          \usepackage[margin=0in,paperwidth=17in, paperheight=11in]{geometry}          \usepackage{tikz}          % Usage: \student{x coord}{y coord}{name}{picture file}     \newcommand{\student}[4]{%       \node[anchor=base,inner sep=0,           label={[text width=20mm,align=center]below:#3}] at (#1,#2)           {\includegraphics[width=17mm]{#4}};%     }          \begin{document}          \begin{center}     \begin{tikzpicture}       \draw[white] (0,0) -- (43.1,0) -- (43.1,27.9) -- (0,27.9) -- (0,0);            \draw[line width=5mm] (5,5) -- (10,15);       \draw[line width=5mm] (12,18) -- (31,18);       \draw[line width=5mm] (38,5) -- (33,15);            \student{4}{7}{George Washington}{empty-face.png};       \student{5.5}{10}{John Adams}{empty-face.png};       \student{7}{13}{Thomas Jefferson}{empty-face.png};            \student{12.5}{20}{James Madison}{empty-face.png};       \student{17}{20}{James Monroe}{empty-face.png};       \student{21.5}{20}{John Quincy Adams}{empty-face.png};       \student{26}{20}{Andrew Jackson}{empty-face.png};       \student{30.5}{20}{Martin Van Buren}{empty-face.png};            \student{36}{13}{William Henry Harrison}{empty-face.png};       \student{37.5}{10}{John Tyler}{empty-face.png};       \student{39}{7}{James K Polk}{empty-face.png};          \end{tikzpicture}     \end{center}          \end{document}      ![Seating chart with names and photos](http://i.stack.imgur.com/luSJS.png) In my prior post: Aligning image and text in new command in TikZ, Peter Grill recommended using a `\foreach` loop to plot multiple students. This is a great idea! Unfortunately, the seating in the lecture room is not regular. In fact, there are ~80 seats behind the desks which are shown in the image below:![Layout of desks of the lecture hall](http://i.stack.imgur.com/cJ8Hl.png) My question is the following. What I would like to do is to define a list of locations:               \newcommand{\ListOfSeats}{       (4,7) (5.5,10) (7,13) (12.5,20) (17,20)       (21.5,20) (26,20) (30.5,20) (36,13) (37.5,10) (39,7)     }      and a list of students' names and photos               \newcommand{\ListOfStudents}{       (George Washington, george-washington.jpg)       (John Adams, john-adams.jpg)       (Thomas Jefferson, thomas-jefferson.jpg)       ...     }      Is there a way to then use a single `\foreach` loop to draw all the 80 seats, and all the 80 students with their names and photos? Thanks for reading to the end, this was a long question but I hope you found it interesting!


title: Cannot draw this diagram using tikz-cd

text: I'm having a lot of problem in drawing a diagram of the form               \begin{itemize}      \item \textbf{The Tower Property}       \begin{tikzcd}        L \arrow[hook]{u} \\        K \arrow[hook]{u} \\        k \arrow[hook]{u} \arrow[bend left][dotted]{uu}       \end{tikzcd}     \end{itemize}       My intention was to draw a tower consisting of L, K and k linked by arrows and such that one arrow starts at k and goes up curved and dotted to L. Thanks in advance.


title: indexing with eledmac and eledpar

text: Using eledmac and eledpar for typesetting a critical edition, I wanted to make a splitted index with the `\edindex[]{}` command. Although I think, that packages are loaded in the correct order and the syntax of \edindex is correct, latex returns the folowing error message:               ./test2.tex:36: Undefined control sequence.`     <argument> \string \indexentry {\@index@txt                                                  \@edindex@hyperref }{\thepageline }     l.36 ...iae Iovis\edindex[persons]{Manubiae Iovis}                                                        tres creduntur esse, quar...      The following MWE produces this error. I'd be grateful for any hint on whats wrong with the source.               \documentclass[11pt,a4paper]{scrbook}     \usepackage[utf8x]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{typearea}     \usepackage[ngerman,latin]{babel}          %\renewcommand*{\chapterheadendvskip}{\vspace{0.725\baselineskip plus 0.115\baselineskip minus 0.192\baselineskip}}          \usepackage{imakeidx}      \usepackage{eledmac}     \usepackage{eledpar}          \footparagraph{A}     \footparagraph{B}     \footparagraph{C}     %\makeindex[title=Index,columns=2]     \newcommand{\AAp}[4]{\edtext{#1}{\lemma{#2}\Afootnote{#3 \textit{#4}}}}     \newcommand{\BAp}[4]{\edtext{#1}{\lemma{#2}\Bfootnote{#3 \textit{#4}}}}     \newcommand{\CAp}[4]{\edtext{#1}{\lemma{#2}\Cfootnote{#3 \textit{#4}}}}          \makeindex[title=Allgemeinindex,columns=2]{}     \makeindex[name=persons, title=Index of names,columns=2]{}          \begin{document}     \begin{pages}     \begin{Leftside}     \beginnumbering     \pstart     \eledchapter*{blabla}     \pend\pstart     Manubiae Iovis\edindex[persons]{Manubiae Iovis} tres creduntur esse, quarum unae sint minimae, quae moneant placataeque sint. Alterae quae maiores\edindex{maiores} sint, ac veniant cum fragore, discutiantque aut divellant, quae a Iove \AAp{sint}{sint}{}{lacuna post sint ind. Porson\edindex{lacuna}}, et consilio deorum mitti existimentur.     \pend          \endnumbering     \end{Leftside}     \begin{Rightside}     \beginnumbering     \pstart     \eledchapter*{bla}     \pend\pstart     Maeson\edindex[persons]{Maeson} persona comica appellatur, aut coci, aut nautae, aut eius generis. Dici ab inventore eius Maesone comoedo\edindex[persons]{Maeson comoedus} , ut ait Aristophanes Grammaticus\edindex[persons]{Aristophanes Gram.}     \pend     \endnumbering     \end{Rightside}     \end{pages}     \Pages          %\printindex     %\printindex[persons]     \end{document}


title: Relational Operator spacing problem with alignat

text: I have not asked a really embarrassing question in a while, so thought it was time :-). I am stumped as to why the spacing around the `=` on the third line is incorrect: ![enter image description here](http://i.stack.imgur.com/eX5jg.png) ## Notes:   * I realize I am cheating a bit on the second line, but I don't mind that the equation starts a bit on the left.   * The absolute value is from Absolute Value Symbols, but is _not_ relevant to this problem. ## Code:               \documentclass{article}     \usepackage{mathtools}          % http://tex.stackexchange.com/questions/43008/absolute-value-symbols     \DeclarePairedDelimiter\abs{\lvert}{\rvert}%          %% ----- Not relevant for this example     %% Swap the definition of \abs* and \norm*, so that \abs     %% and \norm resizes the size of the brackets, and the      %% starred version does not.     %\makeatletter     %\let\oldabs\abs     %\def\abs{\@ifstar{\oldabs}{\oldabs*}}          \begin{document}     \begin{alignat*}{5}      \abs{E_T}                  &&                  {}\le \frac{K (b-a)^3}{12 n^2} &&= 0.005 \\                  &&  \frac{0.2487 (\pi)^3}{12 n^2}                  &&= 0.005 \\         \implies &&                                            n^2  &&=128.52 \\                  &&                                            n    &&\approx 11.34     \end{alignat*}     \end{document}


title: Align the text in flushright block

text: I had two different lines into a block `flushright`.it is so:                          Foo     Hello Everyone      I would align these two lines in this way:               Foo     Hello Everyone      Edit:               \begin{flushright}     Foo     Hello Everyone     \end{flushright}      I would align `Foo` to the second line


title: Why are so many symbols restricted to math mode?

text: A common beginner's mistake is to forget `\\(...\\)`/`$...$` around symbols that require math mode. Why doesn't (La)TeX let people use isolated symbols in text mode by default? I am sure there are at least historical reasons, but a learner with an eye for parsing matters will wonder about an explanation (not found in introductory literature).


title: Defining macros with arguments

text: With `newcommand` I can define customized command like `\ABC`. Is there any way to define a command with arguments. For example I want `\brat{A}{B}` be the same as `[\\![A,B]\\!]`.


title: \read: trailing spaces are removed

text: I'm trying to copy a (binary) file with LaTeX (mostly for the sake of it), but when I read a line, the trailing spaces are removed. The MWE, based on this TeX.SX answer:               \edef\infile{infile}     \edef\outfile{outfile}          \newread\in%     \openin\in=\infile%     \newwrite\out%     \immediate\openout\out\outfile%          \endlinechar-1%     \loop\unless\ifeof\in%     \readline\in to\l%     \immediate\write\out{\l}%     \message{copied line : \l}     \repeat%     \immediate\closeout\out%     \closein\in%     \endlinechar13%          \documentclass{article}     \begin{document}     \end{document}      The `infile` file consists of a single line, and has three trailing spaces:               $ cat infile     abc   def        $ tr ' ' '_' < infile     abc___def___      The `outfile` file, after running the above code, lacks these spaces:               $ latex copy.tex     ...     $ cat outfile     abc   def     $ tr ' ' '_' < outfile     abc___def      Surely there is a way to achieve that, by changing some catcodes I guess, but I tried adding some `\catcode` =11` (with a backtick) or `\catcode` = 9`, but the trailing spaces were still absent from `outfile`.


title: \part and \chapter commands output both numbered and named headings

text: I have the following LaTeX document being compiled in TeXstudio 2.3 on Windows 7 (mode is PdfLatex + PdfViewer):               \documentclass[a4paper,12pt]{report}          % Modified \part and \chapter from report.cls     \makeatletter     \def\@part[#1]#2{%         \ifnum \c@secnumdepth >-2\relax           \refstepcounter{part}%           \addcontentsline{toc}{part}{#1}%         \else           \addcontentsline{toc}{part}{#1}%         \fi         \markboth{}{}%         {\centering          \interlinepenalty \@M          \normalfont          \Huge \bfseries #2\par}%         \@endpart}     \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne                              \refstepcounter{chapter}%                              \typeout{\@chapapp\space\thechapter.}%                              \addcontentsline{toc}{chapter}%                                        {#1}%                         \else                           \addcontentsline{toc}{chapter}{#1}%                         \fi                         \chaptermark{#1}%                         \addtocontents{lof}{\protect\addvspace{10\p@}}%                         \addtocontents{lot}{\protect\addvspace{10\p@}}%                         \if@twocolumn                           \@topnewpage[\@makechapterhead{#2}]%                         \else                           \@makechapterhead{#2}%                           \@afterheading                         \fi}\makeatother     \def\@makechapterhead#1{%       \vspace*{50\p@}%       {\parindent \z@ \raggedright \normalfont         \interlinepenalty\@M         \Huge \bfseries #1\par\nobreak         \vskip 40\p@       }}     \renewcommand{\thesection}{\arabic{section}}% Remove \thechapter from \thesection}     \makeatother     \begin{document}         \tableofcontents         \part{Part One}         \chapter[Chapter Other One]{Chapter One}         \section{Section First}         \subsection{Subsection X}         Djigurda is here.         \subsection{Castles with Penguins}         Castles with penguins here.     \end{document}      Problem is, `\chapter` command produces 2 lines in resulting PDF: ![Example](http://i.stack.imgur.com/N8xss.png) So how do I turn off numbered headings? I want only `Chapter One` to appear.


title: Workaround for "dimension too large" for short, custom decorated, arcs?

text: I have already seen Avoiding `Dimension too large' and `ill-formatted floating point' errors in tikz, and probably there is no answer, but let's see... I have this MWE, with a custom decoration, which can be applied to an arc, but not a short arc:               \documentclass[varwidth,tightpage,border=1bp]{standalone}          \usepackage{tikz}     \usetikzlibrary{decorations}     \usepackage{trace}          \pagecolor{yellow!15} % ignored with preview, but not w/ varwidth          \makeatletter     \pgfkeys{/tikz/.cd, %       /pgf/decoration/deccrosslw/.store in=\deccrosslw, %       /pgf/decoration/deccrosslw=0.2cm, %       /pgf/decoration/deccrosslen/.store in=\deccrosslen, %       /pgf/decoration/deccrosslen=1pt, %     }     \pgfdeclaredecoration{deccross}{initial}     {       \state{initial}[width=\deccrosslen]       {         \pgfpointdecoratedinputsegmentlast         \pgfgetlastxy{\dcplx}{\dcply} % grab coords in macros         \typeout{initial \deccrosslen, \pgfdecoratedinputsegmentlength, dcpl \dcplx, \dcply} % print coords to stdout         \pgfpathmoveto{\pgfpoint{0pt}{0pt}} % already done, but anyway         \pgfpathlineto{\pgfpoint{\deccrosslen}{0pt}} % trace the actual line out (along "x" axis)         % cross out         \pgfpathmoveto{\pgfpoint{0pt}{0pt}}         \pgfpathlineto{\pgfpoint{0.5*\deccrosslen}{0.5*\deccrosslw}}         \pgfpathlineto{\pgfpoint{\deccrosslen}{0pt}}         \pgfpathmoveto{\pgfpoint{0pt}{0pt}}         \pgfpathlineto{\pgfpoint{0.5*\deccrosslen}{-0.5*\deccrosslw}}         \pgfpathlineto{\pgfpoint{\deccrosslen}{0pt}}       }       \state{final}       {         \pgfpathlineto{\pgfpointdecoratedpathlast}       }     }     \makeatother          \begin{document}          Hello:          \begin{tikzpicture}          \draw[]       (0,0) -- (1,0);     \draw[decoration={deccross,deccrosslen=5pt,deccrosslw=0.5cm},decorate]       (0,1) -- (1,1);     \draw[decoration={deccross,deccrosslen=2pt},decorate]       (0,2) -- (1pt,2); % short - no problem          \draw[] (2,0) -- ++(0,2cm)       arc (90:45:2cm) ;          \draw[] (4,0) -- ++(0,2cm)       coordinate(cs)       decorate[decoration={deccross}]{ arc (90:45:2cm) }       coordinate(ce);          %\traceon     \draw[decoration={deccross},decorate]       (cs)       %arc (90:92:2cm) % ! Dimension too large. <to be read again> \relax       arc (90:97:2cm) % 90:97 ok, 90:96 dimension too large       ;          \end{tikzpicture}     \end{document}      When the code works, as in the paste above, this is what is generated: ![test04a](http://i.stack.imgur.com/B0e6w.png) But if the short `arc (90:92:2cm)` is uncommented, then there is a crash with `! Dimension too large.`. This is exactly referred in Avoiding `Dimension too large' and `ill-formatted floating point' errors in tikz : > There is not much you can do. ... Because TeX can't handle the computations > you throw at it. Because of very old but still shiny gears can't crunch > anything that precise. By that I mean very tiny arc length due to your line > width specification (It's too thick for such arc). It may be that it is the same problem here, but still - I do use a line width, which is actually thin? Also, note there is no problem with a short line - only with a short arc... I tried to `trace` a bit, and I've tried to reconstruct a "stack trace" (see selected copypaste below); it seems like there is a `\pgfmathloop` to do the decoration, where `\pgfmathveclen@` is called, which calls `\pgfmathreciprocal@`, which is what ultimately crashes. Is there anything I could do - maybe by coding a special case in my custom decoration - to have the code not crash on short arcs? Here is the snippet from the trace:               \pgfmathloop #1\repeatpgfmathloop ->\def \pgfmathcounter {1}\def \pgfmath@itera     ...     #1<-\advance \pgf@xb \c@pgf@counta \pgf@yb \edef \pgf@decorate@temp {\pgf@xa \t     ...      \pgf@y -\pgf@yc \pgfmathveclen@ {\pgfmath@tonumber {\pgf@x }}{\pgfmath@tonumbe     ...     ...     \pgfmathveclen@ #1#2->\begingroup \pgfmath@x #1pt\relax \pgfmath@y #2pt\relax \     ...     fmathreciprocal@ {\pgfmath@tonumber {\pgfmath@y }}\pgfmath@x \pgfmathresult \pg     ...     #1<-\pgfmath@tonumber {\pgf@x }     #2<-\pgfmath@tonumber {\pgf@y }     ...     ...     \pgfmath@reciprocaltemp ->0.00006          \pgfmathreciprocal@@ #1.#2#3#4#5#6#7\pgfmath@ ->\c@pgfmath@counta #2#3#4#5#6\re     ...     returnone \pgfmath@x \endgroup     #1<-0     #2<-0     #3<-0     #4<-0     #5<-0     #6<-6     #7<-0000000     ...     {\count91}     {changing \count91=6}     {into \count91=166666666}     {\divide}     {changing \count91=166666666}     {into \count91=16666}     {\relax}     {\dimen107}     ! Dimension too large.     <to be read again>                        \relax     \pgfmathreciprocal@@ ...c@pgfmath@counta pt\relax


title: Subfloat: Label beside, caption below

text: I'm looking for a possibility to put the label (a),(b),(c)... of a subfigure beside the subfigure and the caption below. So I'm tried sidesubfigure (Subfig label positioning), which puts the label exactly as I want to, but I didn't find a solution to put the caption below the image.               \documentclass{article}         \usepackage{floatrow}         \usepackage{subfig}         \usepackage{caption}         \usepackage{rule}          \begin{document}          \begin{figure}     \sidesubfloat[description]{\rule{2cm}{2cm}}     \hfill     \sidesubfloat[description]{\rule{2cm}{2cm}}     \end{figure}          \end{document}      Is there a possiblity to do that? ![enter image description here](http://i.stack.imgur.com/VAiwM.png) Edit: Just got another problem, when I'm adding 4 same size picture in 2 rows like this, the pictures are shifted:               \begin{figure}[H]         \begin{mysubfigure}{desc}{imageA}             \includegraphics[width=4cm, height=4cm]{imageA}         \end{mysubfigure}         \hfill         \begin{mysubfigure}{shorter desc}{imageB}             \includegraphics[width=4cm, height=4cm]{imageB}         \end{mysubfigure}         \newline             \begin{mysubfigure}{desc}{imageC}             \includegraphics[width=4cm, height=4cm]{imageC}         \end{mysubfigure}         \hfill         \begin{mysubfigure}{shorter desc}{imageD}             \includegraphics[width=4cm, height=4cm]{imageD}         \end{mysubfigure}     \caption{Two images: \subref{imageA} is imageA, \subref{imageB} is imageB}     \end{figure}      ![enter image description here](http://i.stack.imgur.com/n503s.png)


title: Problem displaying author in citation when using natbib's \citeauthor command

text: I have problem displaying the author name in citation when using `natbib`. I wrote `This is explained in \citeauthor{lamport94}`, and what I get is: ![enter image description here](http://i.stack.imgur.com/Dxa6A.png) , and my entire code is given by:               \documentclass[english]{article}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}          \makeatletter     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.     \PassOptionsToPackage{square,numbers}{natbib}      \usepackage{natbib}          \makeatother          \usepackage{babel}     \begin{document}     This is explained in \citeauthor{lamport94}.          \begin{thebibliography}{9}     \bibitem{lamport94}   Leslie Lamport,   \emph{\LaTeX: A Document Preparation System}.   Addison Wesley, Massachusetts,   2nd Edition,   1994.     \end{thebibliography}     \end{document}      I wonder what is wrong? Note: I'm using LyX. I'm aware of thread Author not appearing, but there's no resolution there, and I use `\citeauthor{}` insteand of `\citet{}`.


title: Maintainable typesetting of placeholders in code snippets

text: I'm looking for a maintainable way of typesetting placeholders in code snippets. In my listings, I would like that anything contained between the two delimiters `@<` and `>@` be   * typeset in (typewriter) italics in some colour (RubineRed, say),   * preceded by an upright (not italics) opening chevron,   * appended by an upright (not italics) closing chevron. For instance, `@<some_value>@` should (in one of my listings) be typeset as ![enter image description here](http://i.stack.imgur.com/hWn94.png) Unfortunately, I can't figure out a way of getting my delimiters (`@<` and `>@`) to be replaced by upright chevrons without having to hardcode the latter or without breaking what `moredelim` does. I want to avoid hardcoding the chevrons because it's not maintainable; imagine if I changed my mind later on as to how my placeholders should be typeset... Below is an example of what I have at the moment and what I would like to get. Any idea?               \documentclass{article}          \usepackage[dvipsnames]{xcolor}     \usepackage{listings}          \lstset     {         moredelim       = **[is][\color{RubineRed}\itshape]{@<}{>@},         basicstyle  = \ttfamily,     }          \begin{document}          Current strategy: hard code the chevrons (which, sadly, get italicised), e.g.     \begin{lstlisting}         x=@<<some_value>>@     \end{lstlisting}          Desired output of \texttt{\detokenize{x=@<some_value>@}} within a listing:     {         \ttfamily         x=%         {%             \color{RubineRed}             \textless\textit{some\_value}\textgreater         }     }          \end{document}      ![enter image description here](http://i.stack.imgur.com/NG1Bd.png)


title: Problems with AucTeX and Emacs24

text: I download AucTeX from ELPA and put nothing in my `.emacs` file. However, the commands `auctex` and `preview-latex` do not seem to be there (when I try `M-x auctex` or `M-x preview-latex`, Emacs cannot find them). When I try to put the load commands in my `.emacs` file, I get errors:               Debugger entered--Lisp error: (file-error "Cannot open load file" "auctex.el")       load("auctex.el" nil t t)      If I look in my emacs elpa directory, `auctex.el` does not seem to be present:               ~/.emacs.d/elpa/auctex-11.86$ ls auctex*     auctex-autoloads.el  auctex.info  auctex.info-1  auctex.info-2  auctex-pkg.el  auctex-pkg.elc      When I open a basic, correctly formatted, `.tex` file and try to run preview- buffer (`M-x preview-buffer`), the following happens: > Cache preamble? (y or n) y > > Type C-c C-l to display results of compilation. So I do, at which point I get this garbage:               ! Preview: Snippet 1 started.     <-><->          l.11 $           a\in S$     Preview: Tightpage -32891 -32891 32891 32891     ! Preview: Snippet 1 ended.(537395+30747x1884782).     <-><->          l.11 $a\in S$          [1] )     (see the transcript file for additional information)     Output written on _region_.dvi (1 page, 1640 bytes).     Transcript written on _region_.log.          Preview-LaTeX exited as expected with code 1 at Mon Mar 11 01:40:34     Running `Preview-DviPS' with ``dvips -Pwww _region_.dvi -o _region_.prv/tmp11354CiZ/preview.ps''     This is dvips(k) 5.992 Copyright 2012 Radical Eye Software (www.radicaleye.com)     ' TeX output 2013.03.11:0140' -> _region_.prv/tmp11354CiZ/preview.ps     </usr/share/texlive/texmf/dvips/base/tex.pro>     </usr/share/texlive/texmf/dvips/base/texps.pro>     </usr/share/texlive/texmf/dvips/base/special.pro>.      </usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb>     </usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi12.pfb>[1]           Preview-DviPS finished at Mon Mar 11 01:40:34     Running `Preview-Ghostscript' with ``gs -dOutputFile\=\(_region_.prv/tmp11354CiZ/pr1-\%d.png\) -q -dSAFER -dNOPAUSE -DNOPLATFONTS -dPrinted -dTextAlphaBits\=4 -dGraphicsAlphaBits\=4 -sDEVICE\=png16m -r102.4x102.669''          Preview-Ghostscript finished at Mon Mar 11 01:40:34      I'm not sure what this is supposed to mean.


title: Which math environment use to make a table layout?

text: I'd like to typeset math in table layout, which is stretched to page width e.g.:               \begin{flalign*}        a)\, \lim_{n\to\infty} \frac{1000n}{n^2+1} &&        b)\, \lim_{n\to\infty} \left( \sqrt{n+1}-\sqrt{n}\right) &&        c)\, \lim_{n\to\infty} \frac{\sqrt[3]{n}\sin n!}{n+1}&&\\        d)\, \lim_{n\to\infty} \frac{(-2)^n+ 3^n}{(-2)^{n+1}+3^{n+1}}&&     \end{flalign*}      This produces output where each column is aligned to right, I'd prefer left align: ![enter image description here](http://i.stack.imgur.com/LnCJi.png) Moreover some padding between lines would be nice. I've tried using an array environment:               \[       \begin{array}{p{0.33\textwidth}p{0.33\textwidth}p{0.33\textwidth}}        a)\, \displaystyle\lim_{n\to\infty} \frac{1000n}{n^2+1} &        b)\, \displaystyle\lim_{n\to\infty} \left(\sqrt{n+1} - \sqrt{n}\right)&        c)\, \displaystyle\lim_{n\to\infty} \frac{\sqrt[3]{n}\sin n!}{n+1}\\        d)\, \displaystyle\lim_{n\to\infty} \frac{(-2)^n+ 3^n}{(-2)^{n+1}+3^{n+1}}       \end{array}     \]      ![enter image description here](http://i.stack.imgur.com/chhHT.png) It seem to solve the problem with align, but math commands inside array produces too many errors and space between rows is even smaller. Any idea how to solve this?


title: Set all paragraphs to be double spaced in LyX

text: Currently I have to manually go to the Edit->Paragraph Settings menu and set double spacing for each individual paragraph in the document. I'm using the article ( hebrew ) doc class as a base for trying to write proofs in Hebrew.