title: Footnote-numbers in the list of figures

text: After I finally made it that my figures can be used with a footnote, so I can write where I got the figure from I have the problem, that each entry in my list of figures on the last page gets a number which looks like a footnote. There are no footnotes on that page and the numbers continue from the previous real footnotes. It looks like that for each entry: ![enter image description here](http://i.stack.imgur.com/bNJbw.png) I wouldn't mind if I just could delete the numbers later with Adobe Acrobat Pro, but unfortunately I don't have the necessary system font, although I thought I installed all LaTex fonts already. If anybody has a solution either for the actual problem or for my attempt of a workaround, I'd be very grateful. I am using the usualy \listoffigures command, to list the figures at the last page. I am also using this command, to fix some footnote issues: \interfootnotelinepenalty=10000. The footnotes in my figures didn't work until I made them like that:               \begin{figure}[ht]     \centering     \includegraphics[width=0.8\textwidth]{image.png}     \caption{footnoteText\protect\footnotemark.}     \end{figure}     \footnotetext{footnoteText. Available under \url{http://nowhere.com}, seen on 16. Januar 2014.}


title: Logo in LaTeX document

text: I don't see any (big) logo on the title page of document class. I'm using the example of `report` in TeXnicCenter. How can I include a logo on all pages?               \documentclass[a4paper,twoside,10pt]{report}          %% Deutsche Anpassungen %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \usepackage[ngerman]{babel}     \usepackage[T1]{fontenc}     \usepackage[ansinew]{inputenc}          \usepackage{lmodern} %Type1-Schriftart für nicht-englische Texte          \usepackage{graphicx} %%Zum Laden von Grafiken          %%     \usepackage{a4wide} %%Kleinere Seitenränder = mehr Text pro Zeile.     \usepackage{fancyhdr} %%Fancy Kopf- und Fußzeilen     \usepackage{longtable} %%Für Tabellen, die eine Seite überschreiten     \renewcommand{\headrulewidth}{0pt}     \fancyhead[L]{}     \fancyhead[R]{     \includegraphics[width=4cm]{Logo.jpg}     }          \title{ABC}     \author{Dipl.-Ing. ABC}          \begin{document}          \maketitle          \pagestyle{plain} %%Ab hier die Kopf-/Fusszeilen: headings / fancy / ...          \end{document}


title: Where is this shortcut coming from?

text: I am writing a report on robot wars (as funny as it sounds). One major section in my report is on EMP Cannons. Whenever I type EMP I get this:               \begin{minipage}[]{<+width+>}         <++>     \end{minipage}<++>      I am using macvim with some latex attachement. Does anyone know how I can figure out where this is coming from and disable it?


title: How do I make a superellipse node shape in tikz?

text: A superellipse is a kind of closed curve which can be used as a "intermediate" shape between ellipse and rectangle. A parameter can control its "roundness". I find it a pleasant alternative to the typical "rounded corners" rectangle. A convenient approximation of the curve can be achieved using bezier patches. In "Metafont book", Knuth defines the following approximation (p. 267), indistinguishable of a real superellipse for practical purposes: > The ﬁve parameters to ‘superellipse’ are the right, the top, the left, the > bottom, and the superness. >   >   >     def superellipse(expr r,t,l,b,s)= >       r{up}...(s[xpart t,xpart r],s[ypart r,ypart t]){t-r}... >       t{left}...(s[xpart t,xpart l],s[ypart l,ypart t]){l-t}... >       l{down}...(s[xpart b,xpart l],s[ypart l,ypart b]){b-l}... >       b{right}...(s[xpart b,xpart r],s[ypart r,ypart b]){r-b}...cycle > enddef; >   The following `metapost` code provides a more convenient way to specify the superellipse by the four corners of the rectangle which contains it:               def my_superellipse(expr sw, nw, ne, se, factor) =         superellipse(1/2[se,ne], 1/2[nw,ne], 1/2[nw,sw], 1/2[sw,se], factor)     enddef;      An example of use (metapost code):               beginfig(1)       z1=(0,0);   % z1, z2, z3 and z4 are four corners of a rectangle       z3=(40,20);       x2=x1; x4=x3; y2=y3; y4=y1;            % Draw a red circle at those points       for i = 1 upto 4:         draw z[i] withpen pencircle scaled 2 withcolor red;       endfor            % Draw the rectangle through those points       draw z1 -- z2 -- z3 -- z4 -- cycle withpen pencircle scaled .1;            % Draw the superellipse, with 0.9 "superness" (the closer to 1, the more squarish)       draw my_superellipse(z1,z2,z3,z4, .9);       % Some text inside       label(btex \LaTeX etex, 1/2[z1,z3]);     endfig;      This is the result: ![Result](http://i.stack.imgur.com/2Ob3B.png) I thought that this would be a nice addition to `tikz` node shapes, but I don't know how to translate the metapost syntax to the required control points of the superellipse curve, and I don't have experience in defining new node shapes for `tikz`. Also note that the resulting node has obvious `north`, `south`, `east` and `west` anchors, but it would be trickier to find the coordinates of `north west`, etc. not to mention the more general anchors `node.angle`. # Update Some clarifications about the question:   1. The formula of the superellipse is well known (see Wikipedia article linked from the first line of the question), however I would prefer do not plot that formula, since it would require to decide the sampling frequency, and do all the computations. I'm interested instead in drawing an approximation using `tikz` syntax such as `..` or `to`, or `pgf` primitives such as `\pgfpathcurveto`. This would require to compute only the control points.   2. I'm aware of the `hobby` package by Andrew Stacey (I was indeed the author of a python script to convert a subset of the metapost syntax to `tikz`, which started it all). However I think this solution is a bit overkill, because it contains a general parser for the metapost syntax, while the superellipse curve has a strong symmetry which could simplify a lot the calculations (although I don't see still how).    3. The ultimate goal is to define a new node shape. This require the use of low-level `pgf` primitives and I don't know how `hobby` package relates to that level of `pgf/tikz`. # Comparison of proposed solutions In order to compare the proposed solutions with the reference superellipse drawn by `metapost` code above, I have obtained the explicit control points of the curve. The following code defines a macro `\metapostsuperellipse` containing this path in `tikz` syntax, and defines a rectangular node of appropiate dimensions (40x20 pt), which can be decorated with the proposed solutions.               \documentclass{article}     \usepackage{tikz}     \begin{document}     \usetikzlibrary{calc}          % These numbers were computed by metapost, and obtained using tracingchoices option         \newcommand{\metapostsuperellipse}{         (40,10) .. controls (40,13.43742) and (39.99951,18.00012)      .. (37.99988,18.99994) .. controls (36.00024,19.99976) and (26.11214,20)      .. (20,20)..controls (13.88786,20) and (3.99976,19.99976)      .. (2.00012,18.99994) .. controls (0.00049,18.00012) and (0,13.43742)      .. (0,10)..controls (0,6.56258) and (0.00049,1.99988)      .. (2.00012,1.00006) .. controls (3.99976,0.00024) and (13.88786,0)      .. (20,0)..controls (26.11214,0) and (36.00024,0.00024)      .. (37.99988,1.00006) .. controls (39.99951,1.99988) and (40,6.56258)      .. (40,10);     }          % Solutions proposed by Qrrbrbirlbel     \newcommand*{\superellipse}[3][draw]{% #1 = styles                                          % #2 = node                                          % #3 = superness         \pgfmathsetmacro\looseness{#3}         \path[#1]                 (#2.east) .. controls  ($(#2.east)!\looseness!(#2.north east)$) and ($(#2.north)!\looseness!(#2.north east)$).. (#2.north)                           .. controls ($(#2.north)!\looseness!(#2.north west)$) and  ($(#2.west)!\looseness!(#2.north west)$).. (#2.west)                           .. controls  ($(#2.west)!\looseness!(#2.south west)$) and ($(#2.south)!\looseness!(#2.south west)$).. (#2.south)                           .. controls ($(#2.south)!\looseness!(#2.south east)$) and  ($(#2.east)!\looseness!(#2.south east)$).. (#2.east)                           ;     }          \newcommand*{\superellipseA}[3][draw]{% #1 = styles                                           % #2 = node                                           % #3 = superness         \pgfmathsetmacro\looseness{2*#3}         \path[curve to, looseness=\looseness, #1]             let \p1 = (#2.east),                 \p2 = (#2.north),                 \n1 = {\x1-\x2}, % distance in x direction                 \n2 = {\y2-\y1}  % distance in y direction                 in                     (#2.east)  to[out=90,  in=0,   out max distance=\n2, in max distance=\n1]                     (#2.north) to[out=180, in=90,  out max distance=\n1, in max distance=\n2]                     (#2.west)  to[out=270, in=180, out max distance=\n2, in max distance=\n1]                     (#2.south) to[out=0,   in=270, out max distance=\n1, in max distance=\n2] (#2.east);     }     \newcommand*{\superellipseB}[3][draw]{% #1 = styles                                           % #2 = node                                           % #3 = superness         \pgfmathsetmacro\looseness{2*#3}         \path[curve to, looseness=\looseness, #1]             let \p1 = (#2.east),                 \p2 = (#2.north),                 \n1 = {min({\x1-\x2},{\y2-\y1})} % minimum of distances                 in                      (#2.east)  to[out=90,  in=0,   max distance=\n1]                     (#2.north) to[out=180, in=90,  max distance=\n1]                     (#2.west)  to[out=270, in=180, max distance=\n1]                     (#2.south) to[out=0,   in=270, max distance=\n1] (#2.east);     }          \tikzset{node box/.style={rectangle, minimum height=20pt, minimum width=40pt, draw, ultra thin, anchor=south west, green}     }               % Pictures to compare proposed solutions with reference (in red)     \begin{tikzpicture}[x=1pt, y=1pt]     \node[node box] (sample) {};     \draw[red, opacity=.5] \metapostsuperellipse;     \superellipse[draw, opacity=0.6, very thin]{sample}{.9}     \end{tikzpicture}          \begin{tikzpicture}[x=1pt, y=1pt]     \node[node box] (sample) {};     \draw[red, opacity=.5] \metapostsuperellipse;     \superellipseA[draw, opacity=0.6, very thin]{sample}{.9}     \end{tikzpicture}          \begin{tikzpicture}[x=1pt, y=1pt]     \node[node box] (sample) {};     \draw[red, opacity=.5] \metapostsuperellipse;     \superellipseB[draw, opacity=0.6, very thin]{sample}{.9}     \end{tikzpicture}     \end{document}      Which gives: ![Comparison](http://i.stack.imgur.com/pAJ9y.png)


title: Best practice for maintaining change history in tex

text: Whenever I write a collaborative document, it undergoes a lot of draft changes. Apart from maintaining the change history in svn, how can I maintain the change history in the tex document itself? I also want it to reflect on the generated pdf.


title: Draw true page border

text: Is there a way to draw a rectangle around every page? The problem is that my document (a Ph.D. thesis) is in a _funny_ format (16x24cm). So to print it centered on A4 paper (for reviewing) I played with the page layout. However, I would like to have indication of the **true page size** with means of a rectangle drawn around each page. Is it possible? BTW. I use `pdflatex`.


title: What are the recommended tools (other than LaTex) for academicians and professionals?

text: I am not sure if this sort of question is allowed or not, but I thought it was better to try than not. The reason I am asking this here is because I want the answer from the sort of person who uses LaTex. So I couldn't really ask this elsewhere could I? So I discovered LaTex about 3 or 4 months back and now I feel like I could never use MS Word again for anything (especially if its longer than 2 pages). I only wish I hadn't discovered it so late! I came across 'git' recently and am considering learning to use it as I don't use any version control system atm! And that's got me thinking - if I didn't know about something as amazing as LaTex then are there other such tools out there that I am missing out on. So I just want to ask you lot if there is something that you use in your academic/professional life that you feel you can't live without - something that you think a graduate or PhD student would find worth investing in.


title: Right aligned text in picture environment slightly off

text: I'm making some placecards and using the picture environment to try to control exactly where everything goes. My problem is that, in the example below, the two lines are not exactly right-aligned. Any idea how to fix this would be very welcome! ![enter image description here](http://i.stack.imgur.com/PHofE.png)               \documentclass[12pt]{article}          \setlength{\unitlength}{1mm}          \newcommand{\rbox}[2]{       \put(0,#1){         \makebox(89,0)[r]{           #2       }}     }          \newcommand{\pclabel}[2]{            \begin{picture}(89,51)(0,0)             \rbox{42}{           \LARGE#1         }         \rbox{28}{           \Large\textsc{#2}         }              \put(87,  0){\line( 0, 1){50}}       \end{picture}     }          \begin{document}     \pclabel{Bob Smithm}{Fiji}     \end{document}


title: Quotes problem in beamer

text: I'm trying to make nice big quotes work in my presentation, but there is some error, a clashing of packages I assume, and I don't know how to resolve this :\ So my mwe is here:               %&latex     \RequirePackage[demo]{graphicx}     \documentclass[xcolor=dvipsnames,hyperref={breaklinks=true},mathserif,10pt]{beamer}      \usecolortheme[named=RoyalPurple]{structure}      \useoutertheme{infolines}     \usetheme[height=7mm]{Rochester}     \setbeamertemplate{items}[ball]     \setbeamertemplate{navigation symbols}{}     \usefonttheme{professionalfonts}          \usepackage{amsmath,amssymb,amsthm,amssymb}     \usepackage{mathtools}     \usepackage{bbm}     \usepackage{graphicx}     \usepackage{float}     \usepackage[croatian]{babel}     \usepackage{ucs}     \usepackage[utf8x]{inputenc}     \usepackage{txfonts}     \usepackage{subfigure}     \usepackage{listings}     \usepackage{time}     \usepackage{extarrows}          \usepackage{lmodern}     \usepackage{graphicx}     \usepackage{framed}          \newcommand*\openquote{\makebox(25,-22){\scalebox{5}{``}}}     \newcommand*\closequote{\makebox(25,-22){\scalebox{5}{''}}}          \makeatletter     \newif\if@right     \def\shadequote{\@righttrue\shadequote@i}     \def\shadequote@i{\begin{snugshade}\begin{quote}\openquote}     \def\endshadequote{%       \if@right\hfill\fi\closequote\end{quote}\end{snugshade}}     \@namedef{shadequote*}{\@rightfalse\shadequote@i}     \@namedef{endshadequote*}{\endshadequote}     \makeatother          %\logo{\includegraphics[width=0.25\textwidth]{logo.eps}}          \title{RANDOM TITLE}     \subtitle{Random subtitle}     \author{John Doe}     \institute[Random institute at random place}     \date{\today}          \begin{document}     \maketitle          \begin{frame}     \frametitle{TOC}     \tableofcontents     \end{frame}          \section{Intro}          \begin{frame}     \frametitle{Intro}     \begin{columns}         \begin{column}{0.5\textwidth}             \begin{itemize}             \item[]             \flushleft{\includegraphics[width=0.5\textwidth]{elvish.eps}}             \end{itemize}         \end{column}         \begin{column}{0.5\textwidth}             \begin{shadequote}             A common mistake that people make when trying to design something completely             foolproof is to underestimate the ingenuity of complete fools.\par\emph{Douglas Adams}             \end{shadequote}         \end{column}     \end{columns}     \end{frame}          \end{document}      Basically I'd like to have image on the left and next to it (on the right) two quotes. I followed the instructions here, but I guess I made sth wrong :\ I didn't want any shade underneath my quotes so I left out the `colorlet` part... So any help would be helpful.


title: \foreach not behaving in axis environment

text: Am hesitant to ask yet one more embarrassing question, but I can't seem to see the problem with the `\foreach` in the MWE. It should produce several horizontal lines but only produces the one with the `yValue` as specified in the `\newcommand{\yValue}{0.3}`: ![enter image description here](http://i.stack.imgur.com/yyqUt.png) ## Code:               \documentclass{article}     \usepackage{pgfplots}          \newcommand{\yValue}{0.3}          \begin{document}     \begin{tikzpicture}     \begin{axis}     [      ymin=0,      ymax=1,      xmin=0,      xmax=1,     ]          \foreach \yValue in {0.00,0.1,...,1.00} {         \draw [red] (axis cs:0,\yValue) -- (axis cs:1,\yValue);     }          \end{axis}     \end{tikzpicture}     \end{document}


title: Undefining leftbar environment to eliminate multiple definitions in memoir class and thmbox package

text: Context : I am using the memoir class, and I was trying to use the `thmbox` package. But the environment `leftbar` is defined both in `memoir` and `thmbox`. So I was trying to undefine an environment but I was just able to find how to undefine a command. By using               \let\command\undefined      So I was able to undefined an environment by doing               \let\env\undefined     \let\endenv\undefined      But I don't know if it is the proper way to do so. Is there a better way ?               \documentclass{memoir}          % Work by adding these two lines.     \let\leftbar\undefined     \let\endleftbar\undefined          \usepackage{thmbox}          \begin{document}       Hello.     \end{document}


title: Plotting Arrows Programmatically in Pgfplots

text: I'm having an issue where I would like to plot a series of evenly spaced arrows where the length is dependent on the values from a data file and I'm not particularly sure how to go about it. I would like to be able to use a `\foreach` loop rather than manually type the arrow `\draw` commands if possible. My idea of how the code would work would be similar to this, though simplified:               \begin{tikzpicture}     \begin{axis}     [      ymin=0,      ymax=.04,     ]          \addplot [mark=none,black,very thick] table[x=T500,y=Y] {Test.dat};          \foreach \y in {0,0.25e-02,...,0.04}         \draw [->] (axis cs:0,\y) -- (axis cs: [Value From File],\y);          \end{axis}     \end{tikzpicture}      An image of what I'm looking to do (simply hard-coded the arrows in) would be something like the following, but extended for the entire range of the data (in this case 0 to .04). Is there a way that this can be done in a method similar to the one that I mentioned above? I appreciate any help. Thanks! ![Example of the Plot](http://i.stack.imgur.com/NlPfu.png) The text file I am plotting as an example is pasted below.               Y       T500     0       40     0.001   36.7099     0.002   33.5354     0.003   30.4769     0.004   27.535     0.005   24.71     0.006   22.0023     0.007   19.4121     0.008   16.9399     0.009   14.5859     0.01    12.3502     0.011   10.2331     0.012   8.23476     0.013   6.35515     0.014   4.59435     0.015   2.95234     0.016   1.42906     0.017   0.0244028     0.018   -1.26176     0.019   -2.42961     0.02    -3.47933     0.021   -4.41114     0.022   -5.22529     0.023   -5.92201     0.024   -6.50156     0.025   -6.9642     0.026   -7.31015     0.027   -7.53968     0.028   -7.65298     0.029   -7.65028     0.03    -7.53175     0.031   -7.29756     0.032   -6.94784     0.033   -6.48271     0.034   -5.90225     0.035   -5.20653     0.036   -4.39559     0.037   -3.46947     0.038   -2.42816     0.039   -1.27168     0.04    0


title: How to remove the full stop at the end of each bibliography entry?

text: Using biblatex how do I remove the last full stops in the following entries: > [1] Peter Fox, Richard Rabbit, and Franc Bird. “Animals are the better hu- > mans”. In: Horse and Hound 10 (2011), pp. 11–15. > > [2] D r Mathematician. How to do all the typographic editing for free. Open > Access, University, 2012. Here is a minimal example:               \documentclass{article}          \usepackage[citestyle=numeric]{biblatex}          \begin{filecontents}{\jobname.bib}     @ARTICLE{liu:11,       author = {Peter Fox and Richard Rabbit and Franc Bird},       title = {Animals are the better humans},       journal = {Horse and Hound},       year = {2011},       volume = {10},       pages = {11--15}     }     @BOOK{bibbook,         title = {How to do all the typographic editing for free. },         publisher = {Open Access, University},         author = {Mathematician, D r},         year = {2012}     }          \end{filecontents}          \addbibresource{\jobname.bib}     \nocite{*}          \begin{document}     \printbibliography     \end{document}      The following answer changes the bib file which is undesired, as this bib file is used to generate other bibliography styles as well.


title: split longtable over even and odd pages (2)

text: I am a first-time user of LaTeX, trying to typeset my thesis. My problem is that some of my tables are large and do not fit on a single page; both in length (many rows) but some also in width (many columns). The longtable package provides a good solution for the long tables, but I have not yet found a satisfying solution for tables that are (also) wide. I think that the best solution would be to have those tables span two facing pages, with the first few columns on the left page and subsequent columns on the right page. Recently a question was asked on tex.stackexchange, that is analogous to my problem (albeit dealing with only two columns): How to make a long table split on even/odd pages?. And David Carlisle had posted an answer with code that works with longtable; splitting the table over two facing pages. However, implementing the code revealed two issues:   1. Davids code requires a `\pagebreak` before `\end{longtable}`. This seems to interfere with the repeated footers specified through longtable (`\endfoot`, `\endlastfoot`). Specifically, the `\endfoot` is also repeated at the end of the table, instead of `\endlastfoot`.    2. Surrounding text does not flow naturally around the table float: Preceding text is printed only on the left/even page, and following text is placed on a new page (probably due to the `\pagebreak` mentioned above), leaving a lot of white space below the table.  My question is if anyone has an idea if these issues can be resolved, and how? Thanks in advance for your help! Below this question is an edited version of Davids code illustrating the problems:               \documentclass{book}          \usepackage{array,longtable,color}     \usepackage{booktabs}     \usepackage{lipsum}     \usepackage[justification=justified,singlelinecheck=false]{caption}          \makeatletter          \def\LT@output{%       \ifnum\outputpenalty <-\@Mi         \ifnum\outputpenalty > -\LT@end@pen           \LT@err{floats and marginpars not allowed in a longtable}\@ehc         \else           \setbox\z@\vbox{\unvbox\@cclv}%           \ifdim \ht\LT@lastfoot>\ht\LT@foot             \dimen@\pagegoal             \advance\dimen@-\ht\LT@lastfoot             \ifdim\dimen@<\ht\z@         \setbox\zzz\vbox{\moveleft10in\vbox{\unvcopy\@cclv\copy\LT@foot}\vss}%         \setbox\@cclv\vbox{\vbox{\unvbox\@cclv\copy\LT@foot}\vss}%         \@makecol         \@outputpage          \setbox\@cclv\box\zzz         \@makecol         \@outputpage               \setbox\z@\vbox{\box\LT@head}%             \fi           \fi           \global\@colroom\@colht           \global\vsize\@colht     %      \vbox     %      {\unvbox\z@\box\ifvoid\LT@lastfoot\LT@foot\else\LT@lastfoot\fi}%         \fi       \else         \setbox\zzz\vbox{\moveleft10in\vbox{\unvcopy\@cclv\copy\LT@foot}\vss}%         \setbox\@cclv\vbox{\vbox{\unvbox\@cclv\copy\LT@foot}\vss}%         \@makecol         \@outputpage          \setbox\@cclv\box\zzz         \@makecol         \@outputpage           \global\vsize\@colroom         \copy\LT@head\nobreak       \fi}          \newbox\zzz          \def\a{%     one&&red\\     two&&green\\     three&&yellow\\     four&&brown\\     }     \def\b{%     111&&this\\     2&&that\\     333&&the other\\     44&&something\\}          \begin{document}          \pagenumbering{arabic}      \lipsum               \begin{longtable}{cp{10in}c}     \caption{Test table} \\          % This is the first header     \toprule     LEFT&&RIGHT\\     \midrule     \endfirsthead          % This is for subsequent headers     \multicolumn{3}{l}{{\tablename\ \thetable{}, continued}} \\     \toprule     LEFT&&RIGHT\\     \midrule     \endhead               % This is the first footer     \midrule      \multicolumn{3}{r}{{Continued on next page}} \\      \endfoot          % This is the last footer     \bottomrule      \multicolumn{3}{l}{{This is the footer}} \\     \endlastfoot          %These are the data     first&&row\\     \a\uppercase{\a}\b     \a\uppercase{\a}\b\b     last&&row\\     \pagebreak % you need this  %BUT: it interferes with the \endfoot and \endlastfoot     \caption{end caption}     \end{longtable}          \lipsum          \end{document}      PS Thank you Jubobs for redirecting me to post my query as a new question.


title: What might cause crop and trim to behave differently in different contexts?

text: I have tried to get a MWE for my problem, but really it is more of a dual to an MWE, because it doesn't work where my actual code DOES work, but I don't understand why it should work. For instance, why would I need to specify negative trim on the right for it to work in a document? Any insights would be appreciated. First, since, it is a complicated problem, here is what one example EPS image looks like when imported in to GIMP (border added in GIMP for clarity): ![enter image description here](http://i.stack.imgur.com/KYoA5.png) Here are the actual EPS files: Yeast Human Here is what I get when I use the same includegraphics parameters in my actual document: ![enter image description here](http://i.stack.imgur.com/LwI5t.png) Here is what the output looks like with the dual MWE (again, same parameters as above): ![enter image description here](http://i.stack.imgur.com/Lpcgm.png) And here is the "dual MWE":               \documentclass{article}               \usepackage[english]{babel}     \usepackage{blindtext}          \usepackage{caption}     \usepackage{graphicx}     \usepackage{subcaption}     \usepackage{float}          \title{A caption test}     \author{Some one}     \date{\today}               \begin{document}          \setlength\fboxsep{0pt}     \setlength\fboxrule{0.5pt}          %      %This part is copied verbatim from another document where it actually works.     %     \begin{figure}     \begin{tabular}{cc}       \begin{subfigure}[b]{0.5\textwidth}   % l   b   r   t       \fbox{\includegraphics[width=\textwidth, trim=25cm 3cm -5cm 0cm, clip=true]         {YeastExpFluxCompare}}       \vspace{3mm} \caption{Yeast} \label{fig:FluxExpCmp:A}       \end{subfigure}     &       \begin{subfigure}[b]{0.5\textwidth}       \fbox{\includegraphics[width=\textwidth, trim=25cm 3cm -5cm 0cm, clip=true]         {HumanExpFluxCompare}}       \vspace{3mm} \caption{Human} \label{fig:FluxExpCmp:B}       \end{subfigure}     \\     \end{tabular}     \caption{\blindtext}     \label{fig:FluxExpCmp}     \end{figure}          Please refer to Supporting Table~\ref{fig:FluxExpCmp}.          \end{document}


title: Is there a BibTeX "schema" somewhere?

text: Is there some specification of BibTeX fields and best practices for using them? E.g. I see people using `eprint`, is this specified somewhere? E.g. `bibtexml` is supposed to provide schemes for BibTeX, but bibtexconverter-0.5-schema.zip `schema\bibtexml-generic.rnc` doesn't know about `eprint`.


title: How to create a graph of our own in LaTeX

text: ![want to create this pic in Latex](http://i.stack.imgur.com/Es24H.jpg) Hi, I want to create the following picture in LaTeX. How can I do this?


title: Stylizing sub-figure caption in beamer

text: When I use               \documentclass{beamer}          \setbeamertemplate{caption}[numbered]     \usepackage{subfigure}          \begin{document}     \begin{frame}          \begin{figure}     \subfigure[Subfig 1]{     }     \hfil     \subfigure[Subfig 2]{     }     \caption{Figure}     \end{figure}          \end{frame}          \end{document}      , it gives ![](http://i.stack.imgur.com/0CuFD.png) . Note that the font color of the figure caption and sub-figure captions are differnt. Now, how can I stylize (i.e., change color, change size, make bold, use roman numerals etc.) the sub-figure captions? I noticed that something like `\usepackage[font=normalfont, labelfont={red,bf}]{caption}` does not work with `beamer`.


title: latex to word? --- OCR?

text: I write in latex, but I often need to collaborate with others who insist on using MS Word. so, I create my part of the document first in latex, then I convert it to MS-Word and kiss it goodbye. it's a roach motel kind of conversion---it checks in, but it won't check out. and please don't ask me to convert my collaborators. I can't. I wish. but I can't. now, in the past, I have looked at https://www.tug.org/utilities/texconv/textopc.html but found no good solutions there. I also looked at solutions in Workflow for converting LaTeX into Open Office / MS Word Format and they were a good start. from what I have seen, the best completely painless effortless way on me, as a user, seems to be to use OCR on the pdf file. It gets a good part of the required MS-Word formatting right. (I find the ones with interim conversion to odt to be not only painful but also having poor results.) Alas, there is one oddity. I think that typical OCR software tends to ignore the information that pdftotext (from glyph&cog's poppler ubuntu package) can obtain. This is because there are occasional characters that are misrecognized in words. is there an OCR program that can use the text-based information in pdf files in its scan process, too? has anyone done systematic experimentation on the quality of automated latex -> pdf -> msword (OCR) translations?


title: Make a text box with color?

text: I'm new user in LaTeX, and I would like to know which is the better code to do a colored squared round box with text in a page? I would like to show important notes for example. Best Regards.


title: titlesec and \section* in \titleformat

text: I use `\titleformat` (`titlesec` package) to make some fancy headings in my documents. But I did not find a way to know, in the `\titleformat` specifications, if the section is made with a `\section` or a `\section*`. Is there a way to detect that and make some test on it ? What I want (a minimal example):               \usepackage[explicit]{titlesec}     \titleformat{\section}[block]{first}{label}{0pt}{\ifsectionstar{#1}{\bf #1}}[trailer]


title: How can I draw the following diagram on LaTeX using Tikz or some other package

text: I want to draw the following number line diagram. How can I do this? ![enter image description here](http://i.stack.imgur.com/HcpRm.jpg) Thanks. Please disregard the stray mark under the word 'some'. :) Here is what I am able to do.                 \documentclass{article}       \usepackage{tikz}       \usetikzlibrary{arrows}       \begin{document}       \tikz\draw [<-o] (0,0) node[pos=0, below] {$-3$}-- +(1,0);       \end{document}


title: spanish option for babel

text: I recently updated my Miktex 2.9 and when I try to compile my files I get the following error, which I didn't have... > package babel error: unknown option spanish. Either you misspelled it or the > language definition file spanish.ldf was not found. This is my preamble:               \documentclass[12pt]{article}     \usepackage[explicit]{titlesec}     \usepackage[usenames,dvipsnames]{pstricks}     \usepackage{amsfonts,amssymb,amsmath,mathrsfs,enumerate,epsfig,fullpage,pst-grad,pst-plot}     \usepackage[spanish]{babel}     \usepackage[latin1]{inputenc}      Please help!


title: TeX and Ubuntu coming from OS-X

text: I'm new to Ubuntu (using 12.04) coming from OS-X 10.8 and .9. I've been using LaTeX on OS-X using the TeXWorks editor. When I tried to install TeXLive on Ubuntu 12.4 it seems to have installed okay (at least, Synaptic insists it is installed) but I can't find TeX anywhere. Do I have to use a not-TeX-aware to get to TeX (and Lilypond, etc)? Or do I have to change away from Unity? I know this is a really low-level question, but I'm a little flummoxed at this point. What is the point of a desktop environment if everything has to be done via scripts?


title: \hyphenation{...} list is not used

text: I am using xelatex, couldnt find out why I am not getting hyphens from the list I created. Is this because of my font (Brill), cause I used Times New Roman which renders with my hyphens. Who is to be blamed. This is my minimal example:               \documentclass[12pt,a5paper]{memoir}     \usepackage[text={10.9982cm,17.01800cm},centering]{geometry}     \usepackage{polyglossia}     \setmainlanguage{english}     \setdefaultlanguage[variant=british]{english}     \setmainfont[Numbers=Lining,Ligatures=TeX]{Brill}     \hyphenation{Sat-chi-dā-nanda-tīr-tha Kriṣṇā-nan-da-tīr-tha Agni-mū-rdha Swāmi-gal}          \begin{document}          2. After him, Sadānandatīrtha Swāmi, and then Satchidānandatīrtha Swāmi     became pontiffs of the Maṭha. The third one was Śri Agnimūrdha     Kriṣṇānandatīrtha Swāmigal; since sparks of fire used to fly from his     head when he became angry, he came to be known as Agnimūrdha. (Iti.,  p 9).          \end{document}      output ![here](http://i62.tinypic.com/fk6rtd.png)


title: Creating a common settings file

text: I have created a file which provides convenient options to change the settings for all of my documents. For e.g.:               \def\BookFontRoman{Gentium Plus}     \def\BookFontCJK{Adobe Song Std}     \def\PageWidth{280}     \def\PageHeight{209}     \def\DisplayFootnotes{1} %1=yes, 0=no     \def\LongTitlePage{1} %1=yes, 0=no      Saved as `settings.tex`, this can be read through the use of `\input{settings}`. My documents also contain `etoolbox` if-then conditionals to check some values. However, I also use some `BASH` scripts to assist in the generation of some LaTeX code. This has some benefits:   * I can establish consistent settings for all of my documents.   * I need not edit to critical source code to make these formatting adjustments. Can you recommend a better way to store settings?   * Is there a more simpler format for putting such information into a single file?   * Is there a solution for allowing `BASH` scripts to also access this information or (if that is too difficult) access other information also stored later in the file (which is ignored by `XeTeX`)?


title: Placing items before \documentclass

text: When looking in books or at sample code, I always see `\documentclass` appearing first. Is that absolutely necessary? I have created some test code which seems to compile fine:               \def\SetClass{article}     \documentclass{\SetClass}     \begin{document}         This is some text.     \end{document}      Is there any problem with placing other items, such as `\input`, `\usepackage`, or such details before the `\documentclass`?


title: How to replace chapter boilerplate with full-page image?

text: Let's say I am producing a book (using `\documentclass{book}`) where instead of displaying the chapter name textually, I am inserting an image that includes the chapter text. How can I still start a new chapter and set the chapter name (for headings and TOC) without actually displaying that it's a new chapter? The code I have right now is:               \chapter{My Chapter Title}     \AddToShipoutPicture*{\centering \includegraphics[width=\paperwidth]{chapter-1.png}}     \phantom{asdf}      where `chapter-1.png` is of course my full-page image, and the `\phantom{asdf}` is apparently necessary for `\AddToShipoutPicture` to work right. Based on "How to format the chapter heading" I tried both of these in my preamble, and neither one worked:               % Generated "LaTeX error: Missing \begin{document}"     \renewcommand{\@makechapterhead}[1]{         \vfill     }          % Had no effect     \def\@makeschapterhead#1{         \vfill     }      Is there something else I can do to change the \chapter template, or even an internal variable that it can set? I'm pretty new to customizing TeX layouts, and have previously only used the predefined styles for thesis et al, so I'm a bit lost.


title: How to make a keyword list with enumitem with labels aligned right in the margin?

text: I kinda succeeded in doing with _without_ using the `enumitem` package, by doing this: _(disregard the lines, it's made with`showframe`)_               \newenvironment*{keywordlist}{%         \list{}{%             \setlength{\labelwidth}{\marginparwidth}%             \setlength{\labelsep}{\marglistsep}%             \setlength{\leftmargin}{0pt}%             \renewcommand*{\makelabel}[1]{\hss\marglistfont##1}%         }%     }{%         \endlist%     }      ![enter image description here](http://i.stack.imgur.com/O1J6w.png) This works like a `description` environment, but the labels are moved to the margin. The labels also align to the right, i.e. the text body, separated by `\marglistsep`. the long label in the middle shows what should happen if the label is too long to fit entirely in the margin. Now, I tried doing this with the function set provided by `enumitem`, but I got only this far:               \newlist{keywordlist}{description}{1}     \setlist[keywordlist]{style=multiline, labelsep=5pt, leftmargin=0pt, labelindent=-\marginparwidth}      ![enter image description here](http://i.stack.imgur.com/qq3dy.png) This will put the labels into the margin, but I pretty much lost the separator value, and all labels are aligned to the left border, which puts a huge gap between the label and the text body. Which doesn't look too good. I like that I can make this label span multiple lines, which is why I'd like to use that over my first approach. In essence, I'd kinda like to have _best of both worlds_ , so the labels are aligned to the text body, could span multiple lines, but if one of those lines gets too long, it'll push the body contents inward.


title: Pdflatex began stopping on \showthe?

text: OK, this I cannot really understand.. Basically, I use `scite` that calls a `lua` script, and through that, `pdflatex`. ( _If`scite` is ran from a terminal, then the `pdflatex` output called through it is dumped to the same terminal, and then one can also interact with `pdflatex`, in case of errors_) Today, I added to one of my files:               \showthe\paperheight     \showthe\pdfpageheight     \showthe\paperwidth     \showthe\pdfpagewidth      ... and I'd run `pdflatex` as usual - and I'd notice this in the log:               ? > 0.0pt.     l.6 \showthe\paperheight          ? > 845.04684pt.     l.7 \showthe\pdfpageheight          ? > 0.0pt.     l.8 \showthe\paperwidth          ? > 597.50787pt.     l.9 \showthe\pdfpagewidth      ... and `pdflatex` kept on going, and all was fine. Then, I keep working - and suddenly, `pdflatex` does _not_ run over the `\showthe` commands anymore; instead, it starts waiting for a user input! Here I'd answer with 'scroll', i.e.               ? > 845.04684pt.     l.7 \showthe\pdfpageheight          ? S     OK, entering \scrollmode...     > 0.0pt.     l.8 \showthe\paperwidth          > 597.50787pt.     l.9 \showthe\pdfpagewidth      ... and then it would run through the end! Now, I am forced to call `pdflatex` like:               pdflatex -interaction=scrollmode file.tex ...      ... so as to cause `pdflatex` to 'run through' these commands - but now I'm afraid it will not stop on some more serious error (where I'd otherwise prefer it to stop). Does anyone have an idea about what happened here - and how do I get my old `pdflatex` behavior back?               $ pdflatex --version     pdfTeX 3.1415926-1.40.10-2.2 (TeX Live 2009)     kpathsea version 5.0.0     $ uname -r     2.6.32-26-generic      Thanks in advance, Cheers!


title: Where to place images and tables for a good layout?

text: I use KOMA Script which always places images in the top of the page. I don't think that this always looks nicely, but if I change the place of my images it doesn't seem much better. Unfortunately I couldn't find any guidelines concerning the proper placement of images and tables with latex. Could you provide me with some tips for a good layout?


title: \marginpar with options

text: I was trying to understand what Leslie Lamport said in his book about `\marginpar` options. He says that > ... `\marginpar[$\Rightarrow$]{$\Leftarrow$}` makes an arrow that points > towards the text, whichever margin the note appears in. (Page 59) I am not sure what he meant by "text". I was hoping that it is the non- marginal text and the arrow would appear in the margin before the margin text. The following is an experiment to test this hypothesis.               \documentclass[11pt]{article}     \usepackage[margin=2in]{geometry}          \begin{document}     This is normal text.%     \marginpar{\em This is a marginal note.}          \vspace{100pt}     This is normal text.%     \marginpar[$\Rightarrow$]{$\Leftarrow$}{\em This is a marginal note.}     \end{document}        As you can see the hypothesis is false. ![enter image description here](http://i.stack.imgur.com/q8O1C.png) Is it possible to make the arrow followed by the marginal note appear in the margin? EDIT: Apparently, I did not make myself clear in my first attempt. As you can see in the second example (\marginpar with options) the marginal text (in italic) which is supposed to be in the margin is not in the margin anymore. What I was hoping to see is the following. ![enter image description here](http://i.stack.imgur.com/omQyH.png) If this is not what the options for `\Marginpar` are there for, then I do not see why I need these options.


title: Parentheses around multiple fields at once in bibliography

text: How can I add one pair of parentheses around multiple fields in a bibliography? The standard authoryear format looks like this: > > Leo Frobenius (1935). _Paideuma. Umrisse einer Kultur- und Seelenlehre_. > Vol. 3. Some Series. Düsseldorf: Diederichs My goal is: > > Leo Frobenius (1935): _Paideuma. Umrisse einer Kultur- und Seelenlehre_ > (Some Series, Vol. 3). Düsseldorf: Diederichs Replacing the dot with a colon is no problem.               \documentclass{scrartcl}     \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}     @BOOK{Frobenius1935,       title = {Paideuma. Umrisse einer Kultur- und Seelenlehre},       publisher = {Diederichs},       year = {1935},       author = {Leo Frobenius},       series = {Some Series},       volume = {3},       address = {Düsseldorf},     }     \end{filecontents}     \usepackage[backend=bibtex,style=authoryear]{biblatex}     \addbibresource{\jobname.bib}     \renewcommand*{\labelnamepunct}{\addcolon\addspace}     \begin{document}     \nocite{*}     \printbibliography     \end{document}


title: Using checksums to determine completion of compilation

text: Before preparing a document for printing, I use a `BASH` script, like the following:               #!/bin/sh          xelatex document.tex % compile 1     makeglossaries document     xelatex document.tex % compile 2     xelatex document.tex % compile 3     xelatex document.tex % compile 4      Some documents contain a lot of cross-references, so they need to be compiled repeatedly. If I created a script which recorded the MD5 checksum of the PDF after each compile and compared this to the MD5 checksum of the previously created PDF (e.g. compared the PDF from compile 4 against that of compile 3), and I have not put any rapidly changing information in my document (such as the current time) would this be a flawless indicator that my document is completely finished compiling and it need not receive additional compiles?


title: Compute remaining horizontal space in align environment

text: I use `align*` often and sometimes it is preferable to add text to the right hand side of an equation instead of using `\intertext`, or `\shortintertext`, which tends to interrupt the math flow. This is pretty straightforward using `\text{}`, _except_ if the text is longer than the amount of space available. In this case I use a `\parbox` and tweak the width of it until it _fits_ , as in the first set of equations: ![enter image description here](http://i.stack.imgur.com/Vqcdn.png) However, I am wondering if there is a way to define the `\RemainingSpace` macro below as some `\dimexpr` expression so that it computes the amount of horizontal space that is available to the `\parbox`? Or, is there a better way to do this? I realize a `tabularx` solution would work, but `align` is really preferable when it comes to equations. * * * ## Minipage:   * The problem is much worse when working in a `minipage` was the width is reduced. An image of that is _not_ included here but is on Page 2 of the output generated by the MWE below. * * * ## Notes:   * I am not really worried about the issue of numbering equations, but that might be useful for others.   * Am assuming that the same solution would work with `alignat*`, but have added a test case for that just in case. * * * ## Code:               \documentclass{article}     \usepackage{showframe}     \usepackage[fleqn]{amsmath}          \newcommand*{\RemainingSpace}{9.0cm}%     \newcommand{\Note}[1]{\parbox[t]{\RemainingSpace}{#1}}%          \newcommand*{\RubbishText}{This was obvious once it was determined that the earlier versions $E = mc$ and $E = mc^3$ were not quite accurate.}%          \newcommand{\TestCases}{%         First using \textbf{align*} with a \textbf{quad} for spacing:         \begin{align*}             E &= mc^2 \quad\Note{\RubbishText}\\             F &= ma + \sin^2 x + \cos^2 x - 1.         \end{align*}         Or could use double ampersand for spacing (but less important than the above version):         \begin{align*}             E &= mc^2 &&\Note{\RubbishText}\\             F &= ma + \sin^2 x + \cos^2 x - 1         \end{align*}         Or, using \textbf{alignat*}         \begin{alignat*}{2}             E &= mc^2 \quad\Note{\RubbishText}\\             F &= ma + \sin^2 x + \cos^2 x - 1         \end{alignat*}%     }%               \begin{document}\noindent     \TestCases          \clearpage\noindent     Same code as above but put in a \verb|\minipage{0.70\linewidth}|:     \bigskip          \hspace*{0.25\linewidth}%     \begin{minipage}{0.70\linewidth}         \TestCases     \end{minipage}%     \end{document}


title: Plot a function of a binary logarithm with TikZ

text: How do I plot a function of a binary logarithm with TikZ? Say that I want to plot `f(x) = log_2 x`.


title: label foo multiply defined

text: I am trying to create a poster with reference in bibtex format. Here is a minimal tex               \documentclass[a0,portrait]{a0poster}     \usepackage{stackengine}     \usepackage{tikz}     \usepackage[T1]{fontenc}          \usetikzlibrary{shapes,snakes,arrows,shadows,petri,decorations.markings}     \definecolor{pms286}{RGB}{4,52,177}     \def\LHead#1{\noindent{\Large\color{pms286} #1}\smallskip}          \pagecolor{pms286!30!white}     \tikzstyle{fancytitle} =[fill=pms286!80, text=white]     \tikzstyle{mybox} = [draw=pms286!80, fill=blue!20, very thick,     rectangle, rounded corners=30pt, inner sep=10pt, inner ysep=30pt,color=blue!20]               \renewcommand\refname{}     \usepackage{float}     \begin{document}          \def\intro{       \begin{tikzpicture}         \node [mybox] (box){%           \begin{minipage}{0.45\textwidth}             \LHead{foo             }           \end{minipage}         };         \node[fancytitle, right=30pt,rounded corners=10pt] at (box.north west) {\Huge{Introduction}};       \end{tikzpicture}     }          \def\bib{       \begin{tikzpicture}         \node [mybox] (box){%           \begin{minipage}{0.45\textwidth}             \LHead{               \vspace*{-4cm}               \nocite{small,big}               \bibliography{mini}{}               \bibliographystyle{abbrv}             }           \end{minipage}         };         \node[fancytitle, right=30pt,rounded corners=10pt] at (box.north west) {\Huge{Reference}};       \end{tikzpicture}     }          \centering     \Shortstack{{\protect\intro} {\protect\bib} }     \end{document}      and a minimal bibtex:               @article{small,     author = {Freely, I.P.},     title = {A small paper},     journal = {The journal of small papers},     year = 1997,     volume = {-1},     note = {to appear},     }          @article{big,     author = {Jass, Hugh},     title = {A big paper},     journal = {The journal of big papers},     year = 7991,     volume = {MCMXCVII},     }      The problem is I am getting error:               (./mini.aux          LaTeX Warning: Label `small' multiply defined.               LaTeX Warning: Label `big' multiply defined.          )      and my aux file is surely having them twice:               \relax      \citation{small}     \citation{big}     \bibdata{mini}     \bibcite{small}{1}     \bibcite{big}{2}     \bibstyle{abbrv}     \citation{small}     \citation{big}     \bibdata{mini}     \bibcite{small}{1}     \bibcite{big}{2}     \bibstyle{abbrv}      I have no idea why. I checked few previous question on same problem, but cant understand what is making this error. Kindly help. I am compiling this with `pdflatex` and `bibtex`.


title: Setting arbitrary chapter values

text: Friends, a colleague of mine showed me a book with a intriguing chapter structure: ![Content](http://i.stack.imgur.com/pKU50.png) I was wondering how we could achieve something similar. I understand that this unusual numbering will break the counters, and I don't expect the chapter numbers to be set automatically, but I'd like to see how it could work even with a manual chapter numbering assignment. As a minimum working example, I wrote a single code with some chapters added:               \documentclass[oneside]{book}          \usepackage[T1]{fontenc}     \usepackage{lipsum}          \begin{document}          \tableofcontents          \chapter{Before the beginning} % Chapter -1          \lipsum[2]          \chapter{Much ado about nothing} % Chapter 0          \lipsum[2]          \chapter{Small is beautiful} % Chapter 0.000000001          \lipsum[2]          \chapter{All is one} % Chapter 1          \lipsum[2]          \chapter{Murdering irrationals} % Chapter \sqrt{2}          \lipsum[2]          \chapter{Golden Phi} % Chapter \Phi          \lipsum[2]          \end{document}      Any ideas?


title: Have biblatex reference numbers match the footnote numbers

text: I want to use biblatex so that I can use `\footcite` in a normal text, which generates a footnote that has a bit of information in it. The rest of the information should be in the section generated by `printbibliography`. The problem is that the numbers next to the reference entries don't match the numbering of the footnotes, which is extremely confusing. So in my working copy the reference number in the `printbibliography` section should be: **3** for the " _Darnassus et al_ " entry and **1** for the " _The Bad Wolf_ " entry. How can I do this? I know there would be trouble when referencing to the same entry, but this could be solved by just reusing the same footnote number. If this looks like a very bad idea, please tell me. It's my first time using a bibliography, so I might be misconceived on how to use it. ## Working copy:               \documentclass{article}          \usepackage[style=authortitle-ibid,bibstyle=numeric]{biblatex}     \usepackage[dutch]{babel}     \usepackage{filecontents}          \begin{filecontents}{\jobname.bib}              @misc{Darn,             title={A strange scribling},             author={Dr. Darnassus and others},             year= {1820},         }              @book{DKB,             title={Three little pigs},             author={The bad wolf},             year={1999},         }          \end{filecontents}          \addbibresource{\jobname.bib}          \begin{document}          An overly\footcite[][33]{DKB} footnoted\footnote{a normal footnote} sentence\footcite{Darn}     \newpage     \printbibliography          \end{document}


title: newenvironment/newcommand for existing environment in LaTeX-Beamer

text: I would like to have the solution of highlighting a line in `listings`-package as a command or environment. To bad I cannot get it working. I tried:   * a simple `newenvironment`: compile errors   * `\newcommand`: also compile errors   * the `environ`-package, see below              \NewEnviron{listingh}{       \vspace{-\baselineskip}       \begin{lstlisting}[backgroundcolor=\color{yellow}]       \BODY       \end{lstlisting}       \vspace{-\baselineskip}     }      Also, same kind of errors. `missing {`, `missing number, threaded a zero` etc. I try to use it with the `beamer`-package and `pdflatex`.


title: Boxes with equal height

text: I am looking for a simple way to make the following boxes the same height.               \documentclass{article}          \setlength{\parindent}{0pt}          \begin{document}          \fbox{\hbox to 0.3\linewidth{\vbox{test}}}%     \hfill     \fbox{\hbox to 0.3\linewidth{\vbox{test\par{}test\par{}test}}}%     \hfill     \fbox{\hbox to 0.3\linewidth{\vbox{test\par{}test}}}          \end{document}      I have experimented with calculating the maximum of the heights of the boxes and setting them with the `settobox` package but I am wondering whether there might be a simpler way. Please note that I do not know the height of any of the boxes beforehand and that I am looking for a method that also scales when there are more than three boxes.


title: How can I customize this code for signature line to fit a specific format?

text: Found a nice piece of code here dynamic signature/date line and modified it to this:               \newcommand*{\DateAndSignature}[1]{%     ..\newline       \par\noindent\makebox[2.25in]{Musterstadt, den}{\hrulefill} \hfill\makebox[2.25in]{\hrulefill}%       \par\noindent\makebox[2.25in][l]{} \hfill\makebox[2.25in][c]{#1}%     }%      But the result is not exactly as I would like it to be, which would be:               Musterstadt, den ______________      _______________________________                                                     Muster Name      The two parts shall be divided to left and right, as an extra, there might be an indentation to the usual paragraph width, but this is optional. My problem is the line after _den_ , can't get it there in a proper way - any ideas? Thanks in advance! **Edit:** combined solution, thanks to the given answers:               \documentclass[a4paper,10pt]{scrreprt}     \usepackage[utf8x]{inputenc}     \newcommand*{\DateAndSignature}[1]{%       \rule{0pt}{2\baselineskip} %       \par\noindent\makebox[2.25in]{\indent Musterstadt, den \hrulefill} \hfill\makebox[2.25in]{\hrulefill}%       \par\noindent\makebox[2.25in][l]{} \hfill\makebox[2.25in][c]{#1}%     }%          \begin{document}     \DateAndSignature{Muster Name}     \end{document}


title: ToC like list of definitions (using theorem environments)

text: For one of my documents I use these commands to setup my theorem environments with `amsthm`:               \usepackage{xcolor}     \usepackage{framed}     \colorlet{shadecolor}{lightgray!25}          \newtheoremstyle{definitionsty}{3pt}{3pt}{\slshape}{}{\bfseries}{.}{.5em}{}     \theoremstyle{definitionsty}     \newtheorem{tdefn}{Definition}[chapter]     \newenvironment{defn}       {\begin{shaded}\begin{tdefn}}       {\end{tdefn}\end{shaded}}      Then I am able to define something via `\begin{defn}[My Hilarious Definition] blabla\end{defn}` and I wanted to include a list, either at the end in the appendix or between the ToC and the first chapter, with the names and numbering of the definitions based on the chapters corresponding to their page, i.e.               Chapter 1 (Kapitel 1 because this is a german document)         Definition 1.1    - My Hilarious Thing ..........  2         Definition 1.2    - Another Super Duper Thingy ..  4     ...     Chapter 2 (aka. Kapitel 2)         Definition 2.1    - Math on Crack ............... 27      However I only want the definitions because am I not really able to name all my usual theorems so I have to omit them in this listing. **Can anyone suggest a good snippet on how to create such a list?**


title: How to add a photo using the res class?

text: I'm using the `res` class for my resume, but none of the examples show how to add a photo. How do I add a 2x2 photo somewhere in the upper corners without breaking the layout? (I'm using example #2 in the link)


title: Spacing between triple vertical lines

text: I would like to create a norm-like operator with 3 verticals bars instead of two. It has to look like `$|||\cdot|||$`. I would like to know how to decrease the spacing between the vertical bars such that it has the same spacing as the `$\lVert .. \rVert$` command. There is a command available in the `stmaryrd` package called `\biginterleave`, but this command has to much spacing between the vertical bars, especially in display math mode. Is there some work-around to adjust the spacing between to vertical bars?


title: gedit [<-- missing link? -->] TexLive

text: following up on a useful question and quite a few answers How can I call TexLive in Ubuntu? my question remains open :-) I write my LaTeX texts in gedit, my base is ubuntu hardy heron 8.04, now I seek a way to compile what I have written in gedit however, I cannot see in gedit how I would be able to compile anything, even though I have now installed texlive-full (which I -- eh -- hoped would enable me to compile my LaTeX files created in gedit). So it seems I need to find the connection between TexLive and gedit in order to get it done. Correct? can anyone tell me what is the missing link? do I need to install a latex plugin for gedit? e.g., http://ubuntu- ky.ubuntuforums.org/showthread.php?t=1270282


title: Stacking two hboxes

text: I am trying to write the macro `\foo{...}{...}` that creates an hbox made up of both `\hbox{#1}` and `\hbox{#2}`, such that both hboxes are stacked one on top of the other. The width of the resulting hbox should be the _maximum_ of the two hboxes. The arguments to the macro are in plain mode (i.e., not in math mode). I'm not very good with raw TeX. Can someone please help?


title: Conflict between steinmetz.sty and cancel.sty. Is there a solution?

text: The two packages conflict, as can be seen in this MWE:               \documentclass{article}     \usepackage{steinmetz}     \usepackage{cancel}          \begin{document}          $\cancelto{0}{a+b}$          \end{document}      When the `steinmetz` package is loaded, the `cancel` arrow is misplaced: ![enter image description here](http://i.stack.imgur.com/hJ43Z.png) How can this conflict be prevented?


title: LNCS style and proper handling of e-mails

text: When defining title in LNCS styled paper, one defined author list and links it to the institute list -- yet only one `\email` clause can be made per institute. Now, the docs are seemingly silent about the situation when there are few authors from one institute that want to have their e-mails visible.   When looking at papers made with llncs, this is usually handled with curly bracket, like this > {J.Smith,J.Doe}@someinst.something Now the question; I'm curious if there exist any more proper way of doing it on LaTeX level than just putting such string into `\email`?


title: Control command arguments

text: Can I define a command that takes an argument but does not eval the argument?


title: Problem with pst-dbicons examples

text: I am currently trying to get the example of the pstricks dbicons package to work but I always end up with errors. I have tried to compile the mondial example (see dbicons-site, sorry i can only put in 2 hyperlinks) but also the much shorter example from the pdf:               \documentclass{article}     \usepackage[latin1]{inputenc}     \usepackage{pstricks,pst-node,pst-coil,color,pst-dbicons}     \seticonparams{entity}{shadow=true,fillcolor=black!30,fillstyle=solid}     \seticonparams{attribute}{fillcolor=black!10,fillstyle=solid}     \seticonparams{relationship} shadow=true,fillcolor=black!20,fillstyle=solid}          \begin{document}     \entity{Person}     \attributeof{Person}{30}[key]{Name}     \attributeof{Person}{90}[mv]{Nickname}     \attributeof{Person}[4em]{150}{phone}[phone\_no]     \attributeof{Person}{270}[mv]{wt}[weight\_at]     \attributeof{wt}{220}{date}     \attributeof{wt}{300}{weight}          \end{document}      Here are the gists for  the mondial one and the small one with gist id 856439. I'd be delighted if someone could point out my error(s).


title: Tikz library : command \draw ... to... with out and in specification

text: I would like to ask how the following command works:               \draw [] (0,0) to [out=20,in=120] (50,20) to [out=-60, in=110] (90,20);      I wonder what part .. `to [out=20,in=120]` .. makes. The result is a curve, but I don't know how to properly understand these parameters.


title: Where does beamer use the headline template?

text: I've been digging through the internals of beamer's frame creation code, trying to customize a theme I created. My goal was to suppress the display of the page number on slides where the frame option `noframenumbering` is given. But that's not my question. In the process of figuring out how to do it, I spent quite some time tracing through internals like `\beamer@@@@frame` to see where it actually used the `headline` template, and _that's_ what I can't figure out. Here is a summary of what I _think_ I've figured out so far. (And bear in mind I'm not overly familiar with TeX so I will probably misuse terms like "calls.") In my main document, I might use the `\frame` command, or `\begin{frame}`. Either way, execution eventually winds up in the macro `\beamer@framecommand`. That in turn calls `\beamer@frame`, which calls `\beamer@@@frame`, which in turn calls `\beamer@@@@frame`. It seems like the typical execution path through `\beamer@@@@frame` ends with                % buried within conditionals      \let\beamer@howtotreatframe\beamer@doseveralframes     % ...     \beamer@howtotreatframe      So then I go to look at the definition of `\beamer@doseveralframes`, and that amounts to               % stuff     \def\beamer@doifinframe{%       \begin{beamer@frameslide}%         #1%       \end{beamer@frameslide}%     }     % stuff      Then I look at the environment definition for `beamer@frameslide` earlier in the file. I see that it creates the box `\beamer@frametitlebox` to store the frame title, and then uses it in               \setbox\beamer@framebox=\vbox{%       \nobreak\vbox{}\nobreak\par\nobreak\beamer@entrycode\nobreak%       \nointerlineskip\unvbox\beamer@frametitlebox%       % etc.     }     % ...     \beamer@undolabels     \beamer@framenotesend     \box\beamer@framebox      OK, so this is where the `frametitle` template is used (?), but I don't see anything about `headline`, even despite checking into the definitions of many of the macros I left out of these quick code snippets. Approaching this from the other end, the only place I see where the `headline` template is used is within               \def\ps@navigation{%       \def\@oddhead{%         % stuff         \beamer@typesetheadorfoot{headline}%  (effectively \usebeamertemplate***{headline})         % other stuff       }%     }      But I don't see that `\ps@navigation` or `\@oddhead` get used anywhere, only defined. What's the missing link?


title: Spacing in a new list

text: I am trying to make a nice table of contents (toc) for a `{book}`. My book has a list of tables and a new list which appear in the toc. When the item number in the lists is more than one digit, the spacing needs adjusting to prevent the item section numbering from running into the item name. I use `\setlength{\cftsecnumwidth}{3em}` / `\setlength{\cfttabnumwidth}{3em}` in the preamble, to change the spacing for the list of sections / tables, which works great. ![without/with adjustments](http://i.stack.imgur.com/1Ns2l.png) But i still need to adjust the spacing for the new list _I have tried_ `\setlength{\cftscinumwidth}{3em}` to adjust the spacing in the new list but `\cftscinumwidth` isn't defined so clearly this won't work . _How can I control the spacing in the new list?_ ## Code               \documentclass{book}     \usepackage{float}     \usepackage{tocloft}     \setlength{\cftsecnumwidth}{3em} % sets space in section numbering     \setlength{\cfttabnumwidth}{3em} % sets space in table numbering      % \setlength{\cftscinumwidth}{3em} % ERROR % sets space in scientists numbering           \newlistof{scientists}{sci} {\listscientisttitle}      \newcommand \listscientisttitle {List of Scientists}     \newcommand \scientistlist [1]  {%       \refstepcounter{scientists}       \addcontentsline{sci}{scientists}       {\protect\numberline{\thechapter.\thescientists} #1}%     }     \newcommand \scientist [1] {\scientistlist{#1}{\underline{Scientist}: #1}}          \begin{document}     \frontmatter     \tableofcontents          \listoftables     \addcontentsline{toc}{chapter}{\listtablename}          \listofscientists     \addcontentsline{toc}{chapter}{\listscientisttitle}          \mainmatter     \chapter{some chapter}     \setcounter{section}{332}     \section{some section}     \paragraph{some paragraph}~\\     \setcounter{table}{332}     \begin{table}[H]       \centering       \caption{some table}       \begin{tabular}{|c|c|c|}         \hline 9 & 44 & 55 \\ \hline       \end{tabular}        \end{table}                          \setcounter{scientists}{332}     \scientist{Mr Black (200--280)}     \end{document}


title: Set pagemargins and linedistance

text: I'm using a template for this document and I want to set the margins to 2.5cm on each side. The top of my .tex file looks like this:               % $Id: $     \pdfpxdimen=1in          \divide\pdfpxdimen by 150          \documentclass[a4paper,12pt]{report}      How can I set the margins to 2.5cm? And another question: is it possible to have a different line-distance for the `abstract` part, and how?


title: Avoid widowed signature lines

text: I have documents created in XeLaTeX with signature lines appearing at the end of the document. Sometimes these signatures appear on pages by themselves i.e. without preceding content. I would like to avoid having these "widowed" signatures, and in particular have the signatures preceded by at least two lines of text (i.e. something that would essentially make it possible to identify the documents to which the signatures would likely attach). The content of the documents and the number of signatures are variable, so I would like to have a solution that is as automatic as possible. Here is an example of the document, using the `memoir` class:               \documentclass{memoir}     \usepackage{lipsum}          % signature     % ~~~~~~~~~     %                _____________     %                *Name* (1)     %                Address (2)     %     \newcommand{\signature}[2]{%      \bigskip\par{}%      \begin{SingleSpace}%      \begin{tabular}{ p{6cm} p{8cm} }          & \rule{6cm}{0.5pt}\newline{}%            \textbf{#1}\\%          & #2 %      \end{tabular}%      \end{SingleSpace}%      \medskip%     }          \begin{document}          % some arbitrary number of lipsum     \lipsum[1-5]          % an arbitrary number of signatures     \signature{John Doe}{42 Wallaby Way, Sydney}      \signature{Jane Smith}{Bates Motel, California}          \end{document}      What I have considered is using a combination of the following to automatically achieve the best outcomes (insofar as they are practical):   1. Making the page sizes slightly larger, particularly if there is only one page;   2. Increase the spacing between paragraphs;   3. Prevent page breaking before the list of signatures. I believe #1 may be achieved by using `\sloppybottom`. I am not sure how to achieve #2, or if it would be aesthetically acceptable. Perhaps #3 can be achieved with `\noprelistbreak` or `\nopagebreak` - though I would presumably have to convert the signatures into a list environment for the prior. I would be very interested in thoughts on this interesting issue.


title: Table errors with excel2latex

text: Following this discussion, I have just converted a table using excel2latex, and I get the following output from it,               % Table generated by Excel2LaTeX from sheet 'Sheet2'     \begin{table}[htbp]       \centering       \caption{Add caption}         \begin{tabular}{rrcccccc}         \addlinespace         \toprule               &       & \multicolumn{2}{c}{VC-A} & \multicolumn{2}{c}{VC-B} &     \multicolumn{2}{c}{Difference (\%)} \\         \midrule         \multicolumn{2}{c}{Patterns} & Average Iterations & Maximum  Iterations & Average Iterations & Maximum  Iterations & Average & Maximum \\         \multicolumn{1}{c}{\multirow{4}[8]{*}{Bullish}} & \multicolumn{1}{c}{1} & 29.29 & 70    & 26.30 & 30    & 11.37 & 133 \\         \multicolumn{1}{c}{} & \multicolumn{1}{c}{2} & 29.11 & 76    & 25.58 & 30    & 13.80 & 153 \\         \multicolumn{1}{c}{} & \multicolumn{1}{c}{3} & 32.91 & 75    & 27.52 & 30    & 19.59 & 150 \\         \multicolumn{1}{c}{} & \multicolumn{1}{c}{4} & 33.65 & 76    & 28.16 & 30    & 19.50 & 153 \\         \multicolumn{1}{c}{\multirow{4}[8]{*}{Bearish}} & \multicolumn{1}{c}{1} & 29.42 & 73    & 26.26 & 30    & 12.03 & 143 \\         \multicolumn{1}{c}{} & \multicolumn{1}{c}{2} & 28.98 & 73    & 25.49 & 30    & 13.69 & 143 \\         \multicolumn{1}{c}{} & \multicolumn{1}{c}{3} & 32.92 & 80    & 27.47 & 30    & 19.84 & 167 \\         \multicolumn{1}{c}{} & \multicolumn{1}{c}{4} & 33.71 & 80    & 28.09 & 30    & 20.01 & 167 \\         \bottomrule         \end{tabular}%       \label{tab:addlabel}%     \end{table}%      I have the `bookends` and `array` packages installed. I get an error saying               ! Undefined control sequence.\@sharp ->\multirow{4}[8]{}{Bullish} ...column{1}{c}{\multirow{4}[8]{}{Bullish}}      Any ideas? Many thanks.


title: Macro to insert formatted text: def, let or what?

text: I want to insert formatting text with a single command (I know the text beforehand):                {\addfontfeature{LetterSpace=20.0}Решение}\      How do I "bind" it to a macro? I tried:                \def\sol#0 {{\addfontfeature{LetterSpace=20.0}Решение}}      \let\sol {{\addfontfeature{LetterSpace=20.0}Решение}}      Both give errors. I'm sure I'm missing something trivial.


title: Resetting theorem counters: \section and (missing) \subsection

text: Suppose I define a new theorem "Theorem" and declare that its counter should be reset whenever the subsection counter is incremented or reset:               \newtheorem{theorem}{Theorem}[subsection]      At some point in my (article) document I start a new `\section` (say, section 2) without starting a `\subsection`. I expect the first theorem in this section to be numbered with "2.0.1" (which may be considered bad style). However, the theorem is numbered "2.0.2". Is this "by design" (technically, I didn't start a new `\subsection`) or a bug? Moreover, what would be a proper workaround? (Such a workaround should not involve manually resetting the theorem counter, and it should work for whatever theorem type I may define in addition to "Theorem".)               \documentclass{article}          \newtheorem{theorem}{Theorem}[subsection]          \begin{document}          \section{bla}          \subsection{blubb}          \begin{theorem}     Some text.     \end{theorem}          \subsection{foo}          \begin{theorem}     Some text.     \end{theorem}          \section{bar}          \begin{theorem}     Some text.     \end{theorem}          \end{document}      EDIT: In response to Seamus' comment: The unexpected counter value also occurs with `amsthm` and `ntheorem`.


title: Theorem numbering error

text: > **Possible Duplicate:**   >  Resetting theorem counters: \sections and (missing) \subsections I have the following in the preamble:               \documentclass{article}          \usepackage[T1]{fontenc}     \usepackage[latin2]{inputenc}     \usepackage[magyar]{babel}     \usepackage{lmodern}     \usepackage{citesort}     \usepackage{enumerate}     \usepackage{amssymb}     \usepackage{amsmath}     \usepackage{indentfirst}     \textheight=22.5truecm     \textwidth=15.5truecm     \parindent=12pt \parskip=7pt     \hoffset -2cm     \voffset -1cm     \pretolerance=1000     \newtheorem{tetel}{Tétel}[subsection]      However the theorems in section 3 before the first subsection are numbered starting from 4 as the screenshot shows: ![incorrect numbering](http://i.stack.imgur.com/CHMB1.png) Never before have I seen this problem. The numbering worked perfectly in every section in every document so far. What could cause this behavior?


title: Inserting abstract into book document

text: I am trying to insert a abstract into my document as shown below, this gives me an error 'Environment abstract undefined'. I have used this format a few times without this problem occurring, I believe this is down to the use of book as a document class. I don't want the abstract to be a chapter.               \documentclass[a4paper,10pt]{book}     \usepackage[utf8]{inputenc}               \begin{document}     \begin{abstract}     Insert anstract here     \end{abstract}      Thanks


title: tweaking the positioning of tikz arrows (such as on a curved path)

text: I believe that this is a duplicate of a question/answer posted within the past two months. But, after much searching, I still can't find it. Does someone out there know the link? # My question I'm not happy with the placement of the arrow in the following picture. Anyone know how to correct the angle at which the arrow is attached to the arc?               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{calc}     \pagestyle{empty}     \setlength{\parindent}{0pt}     \begin{document}          \begin{tikzpicture}[x=0.5cm,y=0.5cm]         \draw[help lines,blue!20,step=1] (0,0) grid (12,12);              \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         %% drawing the circle         \draw[blue]  (A)                       let \p1 = ($ (A) - (Q) $) in                      arc(0:360:{veclen(\x1,\y1)});              %% PROBLEMATIC LINES         \draw [line width=0.4pt,red]               let \p1 = ($(A) - (Q)$), \n1={veclen(\x1,\y1)} in               (Q) -- +(320:\n1)               coordinate (B) circle (2pt);                             \draw[purple,line width=0.4pt]                (B) -- +($  (0,0) ! 2em ! 0 : ($(B)-(Q)$)  $)                 coordinate [label=center:B] (Bl) circle (6pt);              \draw[blue]                  ($ (B) ! 0.45 ! (Q) $)                coordinate (tC) circle (2pt);              \draw[line width=1.5em,->]               (tC)                let \p1 = ($(tC) - (Q)$) in                   arc ({atan2(\x1,\y1)}:{atan2(\x1,\y1)+90}:{veclen(\x1,\y1)});          \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/S5Hlu.png) # UPDATE OK, the link was found at Create curved TikZ single arrow, but I'm still having difficulty getting it to work. Here's one example of what I've tried.               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{calc}     \pagestyle{empty}     \setlength{\parindent}{0pt}     \begin{document}          \begin{tikzpicture}[x=0.5cm,y=0.5cm]         \draw[help lines,blue!20,step=1] (0,0) grid (12,12);              \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         %% drawing the circle         \draw[blue]  (A)                       let \p1 = ($ (A) - (Q) $) in                      arc(0:360:{veclen(\x1,\y1)});              %% PROBLEMATIC LINES         \draw [line width=0.4pt,red]               let \p1 = ($(A) - (Q)$), \n1={veclen(\x1,\y1)} in               (Q) -- +(320:\n1)               coordinate (B) circle (2pt);              \draw[purple,line width=0.4pt]                (B) -- +($  (0,0) ! 2em ! 0 : ($(B)-(Q)$)  $)                 coordinate [label=center:B] (Bl) circle (6pt);              \draw[blue]                  ($ (B) ! 0.45 ! (Q) $)                coordinate (tC) circle (2pt);              \draw[line width=01.5em,->,end angle=230]               (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+90:\n3)               %    -- ++(\n2+0:\n3)                  ;          \end{tikzpicture}          \end{document}      But there's a bit more length to the arrow than I want. ![](http://i.stack.imgur.com/uKoOk.png) _A bit more hacking seems to get it_               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{calc}     \pagestyle{empty}     \setlength{\parindent}{0pt}     \begin{document}          \begin{tikzpicture}[x=0.5cm,y=0.5cm]         \draw[help lines,blue!20,step=1] (0,0) grid (12,12);              \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         %% drawing the circle         \draw[blue]  (A)                       let \p1 = ($ (A) - (Q) $) in                      arc(0:360:{veclen(\x1,\y1)});              %% PROBLEMATIC LINES         \draw [line width=0.4pt,red]               let \p1 = ($(A) - (Q)$), \n1={veclen(\x1,\y1)} in               (Q) -- +(320:\n1)               coordinate (B) circle (2pt);              \draw[purple,line width=0.4pt]                (B) -- +($  (0,0) ! 2em ! 0 : ($(B)-(Q)$)  $)                 coordinate [label=center:B] (Bl) circle (6pt);              \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}          \end{document}      ![enter image description here](http://i.stack.imgur.com/MnIlO.png)


title: How LaTeX format paragraph

text: When I write document I get always `Underfull` and `Overflow` warnings. I know what's does means this warnings. I want to know what LaTeX (TEX I guess) does to format a paragraph. I mean how it decides where to break a line for example. I have got an `Underfull` waring on paragraph I wrote (sorry I don't have it now), as a result I got a part of the word `development` (`lopment`) written in the margin. Why LaTeX doesn't wrote `deve-` in the first line and `lopment` in the next line?


title: A program to export latex tables to excel/ods/csv?

text: I know there are tools to export excel tables to latex, but what about the other way around? I get a lot of latex tables from functions in R (e.g.: texreg) that aren't perfectly customizable via the code, and need some editing. For example, I'll have variables like T:X and X:T as separate rows, based on how whatever model function interpreted an interaction expansion. I'd like to be able to input a tabular object and get .csv-like table, which I could then edit and re-export (using calc2latex in my case). Anything like this exist?


title: TeXstudio Editor Delays

text: I'm running Xubuntu Linux 14.04, 64-bit, on a Lenovo ThinkPad Edge E420. It has 4GB of RAM, and a decent processor, so I'm not worried about underpowering my application. I have TeXstudio 2.6.6, and I have a really annoying delay in the editor. Every time I type in dollar signs, I have probably a 400 or 500 ms delay before the dollar sign actually shows up in the editor. This is true regardless of whether I have the pdf preview window open or not. I also have this same delay every time I type in a math command like \sin or \ln or \frac. Now if I'm deleting code, I only get the delay when I am deleting dollar signs, not when I'm deleting math commands. This delay is big enough that I often doubt whether the keyboard is working, so I type the character in again, only to find out it did actually get entered before. This is slowing me down big-time. Now, I should note that this delay is occurring in a fairly large .tex file: 638 kb. If I open up a small .tex file, this delay is no longer there at all. So, as I see it, TeXstudio is having some scaling issues, possibly with its syntax highlighter. Any ideas? Thanks for your time!


title: mdframed and supertabular disagreeing on positioning (supertabular bug?)

text: Finding that a certain table in my document had to span several pages, and that `longtable` doesn't fit the bill because I have to change the running header mid-table, I turned to `supertabular`. To get the vertical spacing right I use `booktabs`. Since _that_ broke the vertical lines surrounding the table, I thought about working around that by wrapping the whole table in `mdframed`. So far about the history why anyone would want to wrap a `supertabular` with `mdframed` in the first place. ;-) Now to the issue at hand: It appears that the two packages disagree on positioning by a couple of pt...? Source:               \documentclass{article}          \usepackage{mdframed}     \usepackage{supertabular}          \begin{document}          \begin{mdframed}[innerleftmargin=0pt,innerrightmargin=0pt]     \begin{supertabular*}{\textwidth}{l@{\extracolsep{\fill}}l}     \hline     Foo & Bar\\     \hline     \end{supertabular*}     \end{mdframed}          \end{document}      Somewhat unexpected result: ![enter image description here](http://i.stack.imgur.com/i86RB.png) Erm... huh? **EDIT:** Further testing showed that it is supertabular's hline being pushed to the right (out of the text area), not mdframed pushed to the left. Testing also showed this to be specific to supertabular, as neither longtable, tabularx or tabular* displayed similar behaviour. Bug report mailed to supertabular maintainer, CC mdframed maintainer.


title: Missing text from boxes in block diagram (pst-sigsys/pstricks)

text: I am trying to make a block diagram using pst-sigsys/pstricks. The text however isn't in the boxes but is stashed on the left. I absolutely run out of ideas what might be causing it to happen. Any pointers will be greatly appreciated. Thank you! Minimum example:               \documentclass{article}     \usepackage{pst-sigsys}          \pagestyle{empty}          \begin{document}          \begin{figure}[ht]     \centering %     \begin{pspicture}[showgrid=false](0,5)(8,9)          %--- Define blocks ---     \psfblock[framesize=2.5 1](2,7){R11}{Axon Count}     \psfblock[framesize=2.5 1](6,7){R12}{Axon Diameter}          %--- Connect blocks ---     \psset{style=Arrow}     \ncline{R11}{R12} \naput[npos=.5]{(+)}          \end{pspicture}     \end{figure}          \end{document}


title: listings caption number

text: I'm using the `listings` package with this `\begin` command:               \begin{lstlisting}[        language=Python,        caption={Simple Python Program},     ]      This yields a nice code listing with a caption like "Listing 1 Simple Python Program". Is there a way to change the caption and have something like "Listing 1-1 Simple Python Program" in which the 1-1 is the combination of the section number and the subsection number? Any hint will be greatly appreciated!


title: Citing author's full name in biblatex the first time it appears

text: I need a citation command that satisfies the following conditions – similar to `\citeauthor` – and was wondering how to define it:   * If an author or a group of authors is cited the first time, then the authors full names are cited.   * If an author or a group of authors is cited the second, etc. time, then only the authors surnames are cited. E.g.:               \citeauthor{cit:howson1983SciRea} were the first who discussed this thesis. …      But today \citeauthor{cit:howson1983SciRea} refute this thesis.      This should result in: > Colin Howson and Peter Urbach were the first who discussed this thesis. … > But today Howson and Urbach refute this thesis. I already tried a solution to a similar problem:               \DeclareCiteCommand*{\citeauthortest}     {\defcounter{maxnames}{99}%     \defcounter{minnames}{99}%     \defcounter{uniquename}{2}%     \boolfalse{citetracker}%     \boolfalse{pagetracker}%     \usebibmacro{prenote}}     {\ifciteindex{\indexnames{labelname}}{}%     \printnames{labelname}}     {\multicitedelim}     {\usebibmacro{postnote}}      But I get a > Package biblatex Error: Command '\citeauthortest' undefined


title: Auto including the section into an (pre-defined) environment

text: There is a coherency problem in the following text (its typesetting). The last paragraph must not be considered as a part of subsect02. For instance it is a kind of conclusion of two approaches covered under two previous subsections.               \section{section}     Some text here about what we are going to discuss.     \subsection{subsect01}     Text about this subsection.     \subsection{subsect02}     Text about this subsection.          Some text here, which is not related to subsection02, but to the whole section.      I want to make the reader distinguish it from paragraph(s) related to the last subsection by changing the text background color of subsection and section. (Maybe change the font size is better?) Is there a way to approach the goal instead of adding content like `\begin{...}` and `\end{...}` in code?


title: How to use Adobe fonts

text: I stumbled onto several folder named "Adobe" in TeXLive distribution, and it seemed like they are ready to be used. So, is there a way to use Adobe fonts in pdftex,like adobe symbol font for math and adobe times for text?


title: Iterate over pages and set variable

text: I am looking for a way to take the output of a pageref, iterating through, and assigning a property to each of those pages. Specifically, I want to take this:               \documentclass{article}     \usepackage[contents={Watermarked!},pages=some]{background}     \usepackage{hyperref}     \usepackage{forloop}     \usepackage{refcount}          \newcounter{markthis}     \newcounter{endmarkthis}     \newenvironment{watermarked}%     {% at start of watermarked         \stepcounter{markthis}\phantomsection\label{marked:\themarkthis}     Inside watermarked on page \thepage.     }     {% at end of watermarked     \stepcounter{endmarkthis}\phantomsection\label{endmarked:\theendmarkthis}     }     \begin{document}          Some text here on page  1.     \newpage          \begin{watermarked}     some text     \end{watermarked}          \begin{watermarked}     more text     \end{watermarked}          More text here.           \newpage     Page with no watermarked stuff.     \newpage          \begin{watermarked}     more text,      \newpage     on several pages     \newpage     \end{watermarked}          More text here. Start a new page.     \newpage               \begin{watermarked}     more text     \end{watermarked}          Loop to find pages containing the watermarked environment. Hard coded     here.          \noindent     The \arabic{markthis} watermarked environments appear on pages \\     \newcounter{thenumber}     \forloop[1]{thenumber}{1}{\value{thenumber}<5}{     \ifnum \getpagerefnumber{marked:\arabic{thenumber}} < \getpagerefnumber{endmarked:\arabic{thenumber}}         \pageref{marked:\arabic{thenumber}}-\pageref{endmarked:\arabic{thenumber}}     \else         \pageref{marked:\arabic{thenumber}}     \fi     }          \end{document}      and at the end of the loop assign to each page the \BgThispage flag so the watermark appears on all the relevant pages. Is there a clean way to do this? Edit: I made some changes to try to merge the first solution with my existing solution, below:               \documentclass{article}     \usepackage[content={Watermarked!},pages=some]{background}     \usepackage{hyperref}     \usepackage{forloop}     \usepackage{refcount}          \makeatletter     \newif\ifWatermarking\Watermarkingfalse     \newif\ifLastWatermark     \AddEverypageHook{%        \ifWatermarking\bg@material%          \ifLastWatermark\global\Watermarkingfalse\fi%        \fi}             \newcounter{markthis}     \newcounter{endmarkthis}          \newenvironment{watermarked}%         {\global\Watermarkingtrue\global\LastWatermarkfalse            \stepcounter{markthis}\phantomsection\label{marked:\themarkthis}     }%     Inside watermarked on page \thepage.         {\global\LastWatermarktrue         \stepcounter{endmarkthis}\phantomsection\label{endmarked:\theendmarkthis}}     \makeatother          \begin{document}          Some text here on page  1.     \newpage          \begin{watermarked}     some text     \end{watermarked}          \begin{watermarked}     more text     \end{watermarked}          More text here.           \newpage     Page with no watermarked stuff.     \newpage          \begin{watermarked}     more text,      \newpage     on several pages     \newpage     \end{watermarked}          More text here. Start a new page.     \newpage               \begin{watermarked}     more text     \end{watermarked}          Loop to find pages containing the watermarked environment. Hard coded     here.          \noindent     The \arabic{markthis} watermarked environments appear on pages \\     \newcounter{thenumber}     \forloop[1]{thenumber}{1}{\value{thenumber}<5}{     \ifnum \getpagerefnumber{marked:\arabic{thenumber}} < \getpagerefnumber{endmarked:\arabic{thenumber}}         \pageref{marked:\arabic{thenumber}}-\pageref{endmarked:\arabic{thenumber}}     \else         \pageref{marked:\arabic{thenumber}}     \fi     }          \end{document}      This guy returns a missing \begin{document} error, which I cannot figure out why. It goes to the text inside the watermarked environment, namely "Inside watermarked on page \thepage."


title: Split up several equations into smaller ones?

text: I've tried to search for it, but I couldn't seem to find an answer to my question, so here goes. Let's say I'm writing a report of some sort. I'm up 50 pages or so, and at least 100 equations. Then, I'm told that the report has to be a two-column report, which is easy to do in LaTeX. But, my 100 equations are kinda made so they would fit a whole page, which means that, let's say, 50 of my equations are to wide for the columns, and they are all going outside the margin or even the paper it self. My question is: Is there any way, automatically, without going in and inserting a split command in each of the wide equations, and tell each of them where to split, to split them up so they will fit the columns ? So maybe LaTeX would just recognize when they are to long, and then just split it up onto the next line.


title: Help understanding the coordinate system used in tikz

text: I'm trying to understand how the coordinate system work for drawing pictures with tikz. I'm a little lost... Here is a MWE that shows of some example code:               \documentstyle{article}          \begin{document}     \usetikzlibrary{shapes}     \usetikzlibrary{backgrounds,fit,shapes}     \usetikzlibrary{positioning}               \begin{tikzpicture}       \tikzstyle{Y} = [rectangle, fill=orange!30!white]       \tikzstyle{X} = [rectangle, fill=green!30!white]       \tikzstyle{Other} = [rectangle, fill=blue!30!white]          \draw [help lines] (0,0) grid (100,10);            \node [Y, anchor=south west, minimum width=200,minimum height=10] (Response) at (0,0) {};       \node [below=of Response] {\small Variation in response};            \node [X, anchor=south west, minimum width=75,minimum height=10] (Explanatory) at (0,0) {};       \node [above=of Explanatory] {\small Explanatory};            \node [Other, anchor=south west, minimum width=50,minimum height=10] (Other) at (75,0) {};       \node [above=of Other] {\small Other};          \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/Nzke6.png) This is what was expecting, and wanting:   * My first rectangle would start at coordinate (0,0) and end at (200, 10) because the width was set as 200 minimum, and height at 10 minimum, and the south west anchor was (0,0).   * My second rectangle would start at (0,0), and end at (75, 10) for the same reason.   * My third rectangle would start at (75, 0), because the rectangle is placed at (75, 0) and anchored "south west" like all others. But it doesn't even appear at all on my picture... it is way, way to the right (off the page). It starts somewhere I wasn't expecting. That third point is where it breaks down for me. Can someone please explain? I'll try to explain my confusion further. In the second rectangle, I assumed that the rectangle was starting at (0,0) and ending at (75, 10) because of the width and height I provide. But when I place the third rectangle at to start at (75, 0), it starts somewhere else; why is it somewhere different? Probably an easy explanation, but I don't see it. [I am trying to draw a rectangle, and then cut it into sub-rectangles. This is a MWE, so it is more involved than this, with things changing slide-by-slide in beamer. But that's the context.] Thanks. P.


title: xwatermark allpages does not work on Ubuntu

text: I have a document that typesets fine with MikTeX on Windows. I have tried the same source on Ubuntu but I am getting an error:               ! Package xwatermark Error: No page specifier for watermark:      ||{\fontspec {Georgia}Confidential.}||.          See the xwatermark package documentation for explanation.     Type  H <return>  for immediate help.      The watermark related bit is this:               \newwatermark[allpages,textcolor=gray!35,       fontsize=1.5cm,textangle=60]{{\fontspec{Georgia}Confidential.}}      The xwatermark version appears to be 1.5.2a, February 2012. Is this a known problem? Are there any workarounds? **UPDATE** This is Ubuntu Raring, in case it matters. **UPDATE 2** Reduced complete test case:               \documentclass[]{article}     \usepackage{xcolor}     \usepackage[printwatermark]{xwatermark}          \newwatermark[allpages,textcolor=gray!35,       fontsize=1.5cm,textangle=60]{{Confidential.}}          \title{Title}     \author{Václav Zeman}     \date{2013-05-31}          \begin{document}     \maketitle     \end{document}      **UPDATE 3** I have submitted a problem report to Ubuntu: https://bugs.launchpad.net/ubuntu/+source/tex-common/+bug/1186407


title: Make less space between lines on a table

text: I have a big table where I need to use multiple lines on each cell. The table is too big though so I need the space between lines on each cell to be smaller. I found on another post that I could use this to make several lines on a cell               \newcommand{\specialcell}[2][c]{\begin{tabular}[#1]{@{}c@{}}#2\end{tabular}}      And this is part of my table               \begin {table}[H]     \begin{center}       \begin{tabular}           {| >{\footnotesize}C{2cm} | >{\footnotesize}C{2cm} | >{\footnotesize}C{2cm} | >{\footnotesize}C{2cm} | >{\footnotesize}C{2cm} |} \hline Imagen a comparar & $1^{er}$ resultado de clasificación & $2^{do}$ resultado de clasificación & $3^{er}$ resultado de clasificación & $4^{to}$ resultado de clasificación \\           \hline \specialcell{\includegraphics[scale=0.05]{barley/b2.jpeg} \\ barley2 \\(\textbf{Clase 1})} &           \specialcell{\includegraphics[scale=0.05]{barley/b2.jpeg} \\barley2 \\(0.0)} &           \specialcell{\includegraphics[scale=0.05]{barley/b4.jpeg} \\barley4 \\(0.236041)} &           \specialcell{\includegraphics[scale=0.05]{barley/b5.jpeg} \\barley5 \\(0.248987)} &           \specialcell{\includegraphics[scale=0.05]{barley/b1.png} \\barley1 \\(0.333787)} \\            \hline \specialcell{\includegraphics[scale=0.05]{canvas/c21.jpeg} \\canvas21 \\\textbf{Clase 2}} &           \specialcell{\includegraphics[scale=0.05]{canvas/c21.jpeg} \\canvas21 \\(0.0)} &            \specialcell{\includegraphics[scale=0.05]{canvas/c28.jpeg} \\canvas28 \\(0.309975)} &            \specialcell{\includegraphics[scale=0.05]{seeds/s9.jpeg} \\seeds9 \\(0.321354)} &           \specialcell{\includegraphics[scale=0.05]{canvas/c14.jpeg} \\canvas14 \\(0.338891)} \\            \hline       \end{tabular}       \caption{Resultados de la clasificación ascendente de texturas Outex.} \label{cuadroOutex}      \end{center}     \end{table}      So any idea how can I make the linebreaks smaller I tried adding [0.5ex] after each linebreak within a cell but the space didn't seem to change.