title: How to define macro for colored text?

text: I know that it is possible to obtain colored text in Latex by including the color package and writing like               \textcolor{red}{This is red text}      How could I define a macro which would produce text of a given color such as               \red{This is red text}      ?


title: Have \foreach restart or loop

text: I understand that trying to have a "loop function" like `\foreach` _loop_ sounds like a paradox but I'll try to explain what I mean. Recently, I've asked a question about automatising the creation of hours in a timeline, in order to have them increase, i.e. `00:00`, `01:00`, `02:00` and so on. I forgot to mention something there and the problem came out when I was playing with the options. Now for reference this is the part of the code that controlled the hours:               \newcommand*{\MaxNumber}{17}%     \begin{document}      \begin{tikzpicture}        %draw horizontal line           \draw[|->, -latex] (0,0) -- (\MaxNumber,0);        \draw[-, dashed] (-1,0) -- (0,0);             %draw hours        \foreach \x  in {0,...,\MaxNumber} {%              \draw (\x,0) node[below=7pt,anchor=east,xshift=0,rotate=45] {$\x\colon 00$};              \draw[] (\x,-0.1) -- (\x,0.1);             }      If I set the `\MaxNumber` to 23, the hours would draw each hour using the 24-Hour clock. But if I set it to, say, 50, the displayed hours would not restart from 00:00, i.e. midnight, instead they'd keep increasing up to 50:00. But since this is a timeline, I'd like the `\foreach` to restart each time it reaches 23:00, since 24:00 and 00:00 are the same hour. I've tried tweaking it and searching both this site and internet, but I'm not that expert yet to understand what I could work on. I expect there to be many ways to do this so I'd like to know, what would be the most appropriate way to do it?


title: Drawing electromagnetic tetrahedron diagram having text within node connections

text: Any idea how to draw this beautiful electromagnetic tetrahedron (due to F.W. Hehl and Y.N. Obukhov) using LaTeX code? ![enter image description here](http://i.stack.imgur.com/zQPeb.png)


title: Why does my EPS header have % Produced by xpdf/pdftops 3.02pl4?

text: I have a simple input file contains PSTricks code as follows.               % sample.tex     \documentclass[cmyk]{minimal}     \usepackage{pstricks}     \usepackage[paperwidth=144bp,paperheight=108bp,margin=0bp]{geometry}          \parindent=0bp     \begin{document}     \begin{pspicture}(\paperwidth,\paperheight)     \psframe[linecolor=red](\paperwidth,\paperheight)     \end{pspicture}     \end{document}      It is compiled using:               latex -interaction=nonstopmode %1     dvips -R -t unknown %1     ps2pdf -dAutoRotatePages#/None -dCompatibilityLevel#1.5 -dPDFSETTINGS#/prepress %1.ps     pdftops -level3 -eps %1.pdf %1-temp.eps     epstool --copy --bbox %1-temp.eps %1.eps      Before invoking the epstool, my `sample-temp.eps` contains the following:               %!PS-Adobe-3.0 EPSF-3.0     % Produced by xpdf/pdftops 3.02pl4     %%Creator: dvips(k) 5.99 Copyright 2010 Radical Eye Software     %%Title: sample.dvi     %%LanguageLevel: 2     %%DocumentSuppliedResources: (atend)     %%BoundingBox: 0 0 144 108     %%EndComments     %%BeginProlog     %%BeginResource: procset xpdf 3.02pl4 0     %%Copyright: Copyright 1996-2007 Glyph & Cog, LLC      Note: I don't understand why the second row does not exist in Herbert's EPS. I failed to execute `epstool` because the second row has a single `%` that should be `%%`. The following screenshot shows the error log. ![enter image description here](http://i.stack.imgur.com/DxgRO.png) * * * Based on Lev's comment, I tried to add `-level3` switch to `pdftops`, but it still does not solve the problem. I don't understand what `sed` in Lev's comment, what is that? This is my `pdftops` version: ![enter image description here](http://i.stack.imgur.com/0pLxn.png)


title: TikZ tree sibling distance

text: I have been struggling a bit with TikZ and how to build trees. What I need now is some advice on how to improve the node placement. Right now I have these 2 trees:               \documentclass[a4paper,10pt]{article}     \usepackage{tikz}     \usetikzlibrary{positioning,shadows,arrows,trees,shapes,fit}     \begin{document}     \begin{tikzpicture}     [font=\small, edge from parent fork down,      every node/.style={top color=white, bottom color=blue!25,      rectangle,rounded corners, minimum size=6mm, draw=blue!75,     very thick, drop shadow, align=center},     edge from parent/.style={draw=blue!50,thick},     level 1/.style={sibling distance=6cm},     level 2/.style={sibling distance=2.5cm},      level 3/.style={sibling distance=2.5cm},      level distance=2cm,     ]          \node {Paletizar} % root         child { node {Iniciar}              child { node {Detectar Pacote}}             child { node {Movimentar}}             }         child { node {Empacotar}             child { [sibling distance=15mm] node {Posicionar}                 child { node {Pegar/Largar}}                 child { node {Organizar}}                 child { node {Movimentar}}                 }             child { node {Agrupar}}             child { node {Padronizar}}             }         child { node {Finalizar}              child { node {Detectar estado\\da palete}}             child { node {Transmitir}}     };     \end{tikzpicture}               \vspace{2cm}          \begin{tikzpicture}     [font=\small, edge from parent fork down,          every node/.style={top color=white, bottom color=blue!25,          rectangle,rounded corners, minimum size=6mm, draw=blue!75,         very thick, drop shadow, align=center},         edge from parent/.style={draw=blue!50,thick},         level 1/.style={sibling distance=6cm},         level 2/.style={sibling distance=3cm},          level 3/.style={sibling distance=2cm},          level distance=2cm,         ]              \node {Paletizador} % root             child { node {Inicialização\\de sistema}                  child { node {Sensor X}}                 child { node {Acção Y}}                 }             child { node {Sacos}                 child { node {Linha/Coluna}                     child { node {Garra}}                 child { node {Rodar Garra}}                 child { node {Acção Y2}}                 }             child { node {Euro Pallet}}             child { node {Disposição $xyz$}                 child { node {$x=?$}}                 child { node {$y=?$}}                 child { node {$z=?$}}                 }             }         child { node {Sistema de despacho}              child { node {Sensor de peso\\/contador}}             child { node {Tapete rolante\\de saída}}     };     \end{tikzpicture}          \end{document}      So basically what I want is a way to edit the code I have so that everything is perceptible which basically means that I need specific sibling distances to each child. I have tried to add a sibling distance in the child nodes but maybe it was in the wrong place or something else because it didn't change anything. I also tried to use below and all its derivations but the results were even worse because of the size of the boxes.


title: How to check if a column type is defined?

text: Column types for tables can be defined and overwritten with `\newcolumntype`. I would like to know if a column type is already defined for an example which shall only be executed in the case where the columntype is defined. EDIT: Similar to the answer of egreg I had also created this code:               \newcommand\isColumntypeDefined[1]{%       \providebool{\tpl@coltype@#1}       \ifcsdef{NC@find@\string#1}{         \setboolean{\tpl@coltype@#1}{true}%       }{%         \setboolean{\tpl@coltype@#1}{false}       }%       \boolean{\tpl@coltype@#1}%     }      but that fails because `\tpl@coltype@#1` does not create a valid command. This problem is related to latex @temps(wa) commands. It would be great to know how to make this code compileable. EDIT2: I changed the whole code to etoolbox definitions and finally ended with this               % Create list of predefined columntypes     \expandafter\let\csname columntype@l\endcsname\@empty     \expandafter\let\csname columntype@c\endcsname\@empty     \expandafter\let\csname columntype@r\endcsname\@empty     \expandafter\let\csname columntype@p\endcsname\@empty     \expandafter\let\csname columntype@m\endcsname\@empty     \expandafter\let\csname columntype@b\endcsname\@empty          \newcommand\CheckIfColumntypeDefined[1]{%       \providebool{tpl@coltype@#1}       \ifcsdef{NC@find@\string#1}%         {\setbool{tpl@coltype@#1}{true}}%         {\ifcsdef{columntype@\string#1}           {\setbool{tpl@coltype@#1}{true}}%           {\setbool{tpl@coltype@#1}{false}}%         }%     }          \newcommand\isColumntypeDefined[1]{tpl@coltype@#1}          \newcommand\IfColumntypeDefined[3]{%       \CheckIfColumntypeDefined{#1}       \ifboolexpr{ bool{\isColumntypeDefined{#1}} }{#2}{#3}%     }


title: LaTeX can't find my .bst file. How do I show it the way?

text: My question is nearly identical to that posed in these: Where do I place my own .sty files, to make them available to all my .tex files? How to have local package overide default package LaTeX fails to find my .sty file but unfortunately, I've followed the instructions in various ways and LaTeX still doesn't find my `.bst` file UNLESS it is in `./` (the `PWD`). I've tried 3 approaches:   1. `export TEXINPUTS=.:~/my/path:` (attempted with both `~` and the full-path)   2. put the file in `~/Library/texmf/` (I'm on a mac)   3. specified the full path to the `.bst` file in the `\bibliographystyle` command Any ideas what I'm still doing wrong? I've tried `texhash` (even though it's not supposed to be necessary) and that also failed. The fact that it works if I put the file in the same directory as the `.tex` file says it's not a problem with the `.bst`.


title: LaTeX/Packages/Listings and subindex

text: I am using LaTeX/Packages/Listings AND this code to make a rectangle with sql source code inside of it, but I would like to have the option to insert subindexes... I try it using the following but had no success, any idea?               \lstset{language=SQL, caption=SQL, label=SQL, frame=shadowbox, rulesepcolor=\color{blue}}     \begin{lstlisting}            SELECT  SUM($x_{1}$ *$x_{1}$ FROM X;     \end{lstlisting}      I would like to make the `$x_1$` shows right


title: PNG (with transparent background) and \pdfximage \pdfrefximage

text: I'm using `pdflatex` (MiKTeX 2.9 portable on Windows 7), and use the pair `\pdfximage` and `\pdfrefximage` to include graphics. Using a PNG with a transparent background yields, in my view, unexpected behavior. It appears that the index generated by `\pdfximage` gets corrupted - which makes the "next graphic" unusable. But the graphic after that ones _can_ be used. I hope my example below illustrates what's happening on my machine: Is this correct usage, or am I not using the `pdflatex` primitives correctly?               % SAMPLE     \pdfoutput=1      \documentclass[german]{article}      \usepackage[a4paper]{geometry}      \usepackage{babel}      % ------------------------------------------      % When the following line is used, \LOGOiii yields 'my_other_pic.jpg' - which is not correct.     \pdfximage width 20.0mm height 8.0mm {png_transparent_bg.png}           % When replacing the above with either of the following lines, \LOGOiii yields 'my_cool_pic.jpg' - which is correct     % (but then I don't have my logo with transparent background)     %\pdfximage width 20.0mm height 8.0mm {my_pic.png}   % png without transparent background     %\pdfximage width 20.0mm height 8.0mm {png_transparent_bg.jpg}  % jpg - no transparent background          \newcommand{\LOGOi}{\pdfrefximage1}          % If png_transparent_bg.png is used, attempting to reference this image results the error:     %     ! pdfTeX error (ext1): cannot find referenced object. (but pdfrefximage3 works!)     \pdfximage height 28.0mm             {my_other_pic.png}      \newcommand{\LOGOii}{\pdfrefximage2}          \pdfximage height 20.0mm             {my_cool_pic.png}      \newcommand{\LOGOiii}{\pdfrefximage3}  %           \begin{document}      \noindent This pdf illustrates behavior diferences between 'loading' a png graphic     with transparent background as first graphic - via pdfximage.     {\LOGOiii}     {\LOGOii}  % comment to remove compile error     \rule{-15mm}{0mm}     {\LOGOi}     \end{document}      \endinput       Console output (attempts to reference 2nd graphic object) - error:               >h:\MikTeXTest\MikTeX.2.9p\texmf\miktex\bin\pdflatex -aux-directory=h:\temp\pdflatex --enable-write18 test_pdfxrefimage.tex      This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9)     entering extended mode     (Q:\TA ... \TST\test_pdfxrefimage\test_pdfxrefimage.tex     LaTeX2e <2011/06/27>     ... console output deleted ...          )) (h:\temp\pdflatex\test_pdfxrefimage.aux)     *geometry* driver: auto-detecting     *geometry* detected driver: pdftex     ! pdfTeX error (ext1): cannot find referenced object.     <to be read again>                     }     l.27 {\LOGOii}                     % uncomment for error     !  ==> Fatal error occurred, no output PDF file produced!     Transcript written on h:/temp/pdflatex/test_pdfxrefimage.log.     >Exit code: 1      Below is console output from pdflatex with above code, but commented line:               %{\LOGOii}  % comment to remove compile error      compiles ok - but references wrong graphic:               >h:\MikTeXTest\MikTeX.2.9p\texmf\miktex\bin\pdflatex -aux-directory=h:\temp\pdflatex --enable-write18 test_pdfxrefimage.tex      This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9)     entering extended mode     (Q:\TA ... \TST\test_pdfxrefimage\test_pdfxrefimage.tex     LaTeX2e <2011/06/27>     ... console output deleted ...          )) (h:\temp\pdflatex\test_pdfxrefimage.aux)     *geometry* driver: auto-detecting     *geometry* detected driver: pdftex          Overfull \hbox (11.66379pt too wide) in paragraph at lines 24--28     \OT1/cmr/m/n/10 This pdf illustrates behavior diferences between 'loading' a pn     g graphic with transparent background     [1{h:/MikTeXTest/MikTeX.2.9p/localtexmf/fonts/map/pdftex/pdftex.map} <Q:/TA.../TST/test_pdfxrefimage/my_other_pic.png (PNG copy)> <Q:/TA.../TST/test_pdfxrefimage/png_transparent_bg.png>]     (h:\temp\pdflatex\test_pdfxrefimage.aux) )     (see the transcript file for additional information)<h:/MikTeXTest/MikTeX.2.9p/     texmf/fonts/type1/public/amsfonts/cm/cmr10.pfb>     Output written on test_pdfxrefimage.pdf (1 page, 33610 bytes).     Transcript written on h:/temp/pdflatex/test_pdfxrefimage.log.     >Exit code: 0      References "my_other_pic.png" but should actually use "my_cool_pic.png".


title: Spacing in headline from beginning of line to title (excluding the section number)

text: How do I change the spacing between the number and the title of a section? I would like to achieve the following: > **1.** (1 cm space BUT from the very beginning of that line!) **Section > title** In Spacing in headline between number and text I basically asked the same question, but with – what I only realized afterwards – a very important difference, i.e. where to start measuring that space! So, what I really want is a constant space of – for instance 1 cm – measured from the beginning of the line and NOT just the space between section number and section title.


title: Having a table in an enumerate environment

text: I have a problem trying to add a table in an `enumerate` environment in LaTeX. I want the table to act as if it were just another piece of text. i.e. showing up exactly right next to the `\item` in an `enumerate` environment. I currently use this to create my table (`M` is to have a 'math' table):               \begin{enumerate}[(a)]       \item       \begin{enumerate}[i.]       \item       \begin{table}[h!]         \begin{tabular}{M M|M M M M M M M}             \hline             p & q & (p & \rightarrow & q) & \rightarrow & (q & \rightarrow & p) \\ \hline             0 & 0 & ~ & 1 & ~ & 1 & ~ & 1 & ~ \\              0 & 1 & ~ & 1 & ~ & 0 & ~ & 0 & ~ \\             1 & 0 & ~ & 0 & ~ & 1 & ~ & 1 & ~ \\               1 & 1 & ~ & 1 & ~ & 1 & ~ & 1 & ~ \\              \hline             ~ & ~ & ~ & ~ & ~ & \uparrow & ~ & ~ & ~ \\          \end{tabular}       \end{table}       \end{enumerate}     \end{enumerate}      But when the code is compiled the table shows up outside of the enumeration.


title: How to make slash (/) paste with correct Unicode codepoint depending on context?

text: Unicode offers different characters for the slash:   * U+002F (/) for the ordinary slash   * U+2215 (∕) for the mathematical division operator   * U+2044 (⁄) to designate vulgar fractions How can I have these automatically paste with the right Unicode codepoint? Some starter code is this:               \documentclass{article}     \input glyphtounicode       \pdfgentounicode=1     \usepackage[T1]{fontenc}     \usepackage{nicefrac}          \begin{document}          textual: w/o (intended: U+002F)          in an equation: \(12/4 = 3\) (intended: U+2215)          in a vulgar fraction (produced by package \texttt{nicefrac}): 1\nicefrac{1}{2} (intended: U+2044)          \end{document}      Note that "-" in math mode already pastes correctly as the "minus sign" (U+2212, "−"), so that is why I suspect that addressing this issue is possible. _See also my related questionhere._


title: Arabic and German in ConTeXt

text: I'm totally new to ConTeXt; how to use Arabic and German in one document?               \mainlanguage[de]          \definefont[ArabicFont][file:alq2.ttf*arabic at 18pt]          \setuppapersize [A5]           \starttext     \setupalign[r2l]     \ArabicFont          بِسْمِ ٱللَّهِ ٱلرَّحْمَٰنِ ٱلرَّحِيمِ          \stoptext       How to modify, so that I can swith between Arabic and German? (I knew LaTeX, and have defined there some macros, but here everything might change...)


title: Different bottom border value for footnotes

text: I'm using the `geometry` package to define the borders of my document:               \usepackage[left=2.5cm,right=2.9cm,top=3.5cm,bottom=3cm,footnotesep=0.5cm]{geometry}      That means the bottom of the text and the bottom of a footnote have 3cm distance to the bottom of the paper. Is is possible to define a different value for the footnote so that I can move it further down to the paper border?


title: How to quickly transfer selected references from Zotero to BibDesk?

text: I maintain my master database of references in Zotero because it does the best job scraping websites, but I like to use BibDesk (OS X) to manage the bibliographies for specific papers and projects because it works better with Texshop. I often have the need to copy a few references from Zotero to BibDesk. For this, I don't want to export and import files, but instead use copy-paste or drag and drop, if possible.


title: Hyphens at end of line disappear upon pasting, even if they were present in the input

text: When I paste text from pdflatex output, there are two things about hyphens that I would like to change:   * Hyphens paste as "hyphen-minus" (U+002D, "-"), but I would prefer the newer Unicode character "hyphen" (U+2010, "‐"), used for textual hyphens.   * Line-breaking hyphens always disappear. This is good if there was no hyphen in the input, but when a word such as "ice-cream" breaks over a line, it would be nice to keep the hyphen. Note that line-final en-dashes paste correctly. Here is some code illustrating the issue:               \documentclass{article}     \input glyphtounicode       \pdfgentounicode=1     \usepackage[T1]{fontenc}          \begin{document}          Hello World, this is dummy text intended to cause a line break: I love line-breaking. Now a long word without an original hyphen: antidisestablishmentarianism. Some dummy text for getting the desired line breaks; some dummy text for getting the desired line breaks.          Compound adjective (with en-dash): World\ War\ II--related, World\ War\ II--related, World\ War\ II--related.          \end{document}      With this code, the pasting behavior is as follows: the hyphen in "line- breaking" disappears (not desired), the hyphen for the line-breaking of "antidisestablishmentarianism" disappears (desired), and the en-dash remains (desired). (Just in case it matters, I'm using Adobe Reader X (version 10.1.4) on Windows 7.) **Is there an easy way to address these two points?** An ideal solution won't make use of new commands (say, using `accsupp`, as great as this package is) but will modify the way (La)TeX deals with `-` in its input source code. Also a solution ideally applies the specialized hyphen character (U+2010) conservatively: for example hyphens in URLs are ordinarily simple hyphen- minuses. (Yep, I know that all this might be quite tricky to implement.) _See also my related questionhere._


title: Palatino text with CMR math in beamer?

text: I've tried so many combinations, but I can't get it to work. I'd appreciate any suggestions.


title: Is it possible to make siunitx typeset exponents in "cramped" style?

text: I'm using siunitx to typeset physical quantities. The result is not always ideal with many exponents in my eyes, because the exponents increase the line to line distance. At least this is my impression. I haven't measured it to be honest. For example take a look on this image: ![enter image description here](http://i.stack.imgur.com/93Ac5.png) The first two values are set with the default settings of `siunitx`. There is much white space around them alienating them from the rest of the text. My current approach is to take the `text mode` option. With the (smaller) old style figures the result looks more harmonious. Now I learned here on tex.SX that it is possible to cramp the exponents. As you can see in the example (the last to values), this results to a more homogenious appearance. Coming to my question, is it possible to configure `siunitx` in a way that it cramps the exponents?               % !TeX program = lualatex     % !TeX encoding = UTF-8 Unicode     \documentclass[a5paper, 10pt]{memoir}          \usepackage{siunitx}          \usepackage{mathtools}     \usepackage{unicode-math}     \setmainfont[Ligatures=TeX, Numbers=OldStyle]{TeX Gyre Pagella}     \setmathfont[math-style=ISO, bold-style=ISO]{TeX Gyre Pagella Math}          \usepackage{microtype}          \def\sometext{ Some text, which takes roughly one line. This sentence is used         to demonstrate different line spacing due to the use of scientific value,         such as }          \begin{document}          \sometext     \SI{1.23E13}{\per\square\centi\metre\per\electronvolt}     here. \sometext     \SI{1.23E13}{\per\square\centi\metre\per\electronvolt}     here. \sometext     \SI[mode = text]{1.23E13}{\per\square\centi\metre\per\electronvolt}     here. \sometext     \SI[mode = text]{1.23E13}{\per\square\centi\metre\per\electronvolt}     here. \sometext     $1.23\times\cramped{10^{13}}\,\cramped{\text{cm}^{-2}}\,\text{eV}\cramped{^{-1}}$     here. \sometext     $1.23\times\cramped{10^{13}}\,\cramped{\text{cm}^{-2}}\,\text{eV}\cramped{^{-1}}$     here. \sometext      {1.23~$\times$~10⁻¹³\,cm⁻²\,eV⁻¹}     here. \sometext no value here.      \end{document}      EDIT: I've added a pure (unicode) text variant using unicode superscripts, unfortunately TG Pagella does not have a superscript minus sign.


title: image too bright when exporting grayscale matlab images with matlab2tikz

text: I am using `matlab2tikz` to export my MATLAB plots to tikz. This works pretty well as long as I am using the colormap `jet` inside MATLAB. Unfortunately, as soon as I am using grayscale, the resulting images become way to bright. This is how the matlab2tikz output looks like: ![matlab2tikz output](http://i.stack.imgur.com/HWjLL.png) This is how the figure looks in MATLAB: ![how it should look like](http://i.stack.imgur.com/DKyL2.png) The resulting tikz file is:               \begin{tikzpicture}          \begin{axis}[% width=0.7\textwidth, height=0.2\textheight, axis on     top, scale only axis, xmin=0.5, xmax=450.5, y dir=reverse, ymin=0.5,     ymax=375.5, title={true disparity} ] \addplot graphics     [xmin=0.5,xmax=450.5,ymin=0.5,ymax=375.5] {trueDisp-1.png}; \end{axis}     \end{tikzpicture}%      I don't see what is happening here. I executed matlab2tikz multiple times and each time the result ended up to bright. If I use the jet colormap on the same image, the resulting png image is correct. Did anybody ever experienced the same behaviour and/or knows how to solve it?


title: What' wrong with this article? It failed in compilation via XeLaTeX

text: I wrote an article as follows.                     \documentclass{article}           \usepackage{fontspec}           \usepackage{unicode-math}           \setmathfont{Asana Math}           \setmainfont{Bitstream Vera Serif}           \begin{document}                \begin{equation}                   \max\sum_{(i,j)\in A}c_{ij}x_{ij}           \end{equation}           \end{document}       Unfortunately it failed to make a pdf by XeLaTeX...                     Package scrlfile, 2009/03/25 v3.03 KOMA-Script package (loading files)                   Copyright (C) Markus Kohm                ) (d:\CTEX\MiKTeX\tex\latex\unicode-math\unicode-math-table.tex))Running                      miktex-makemf.exe...           miktex-makemf: The ICU source file could not be found.                Running hbf2gf.exe...                     hbf2gf (CJK ver. 4.8.0)                          Couldn't find `I.cfg'                miktex-maketfm: No creation rule for font ICU.                ! Font \zf@basefont="Asana Math/ICU" at 10.0pt not loadable: Metric (TFM) file           or installed font not found.           <to be read again>                    \scan_stop:           l.5 \setmathfont{Asana Math}                ?       I'm sure that I did install these packages. So it troubled me.


title: BibTeX: How to get rid of a period after author initial?

text: I have problem with authors initials. I should have a period after a list of authors, but when there is an author, which has only an initial it looks like: "Smith, J.." There are two periods, one from initial and one from the end of the list of authors. How could I add a condition that if there is a period from initial there won't be any other from the end of the list? Many thanks. Edit: I have created bst file using bst generator online. However I changed a comma after the list of authors to a period (by replacing ", " with ". " in .bst). I haven't found any bst with period after the list. I now there exist "if" in the bst, I hoped it could solve the problem, but I don't know how to use it. There is the bib entry:               @ARTICLE{historie_kniha,        author = {Beekman, G.},         title = "{I. O. Yarkovsky and the Discovery of 'his' Effect}",       journal = {Journal for the History of Astronomy},          year = 2006,         month = feb,        volume = 37,         pages = {71-86},        adsurl = {http://adsabs.harvard.edu/abs/2006JHA....37...71B},       adsnote = {Provided by the SAO/NASA Astrophysics Data System}     }      Edit #2: The bst file is there: http://pastebin.com/Ar0S3a27


title: Creating new class file: Where to start?

text: Recently, a journal I have some editorial involvement with has decided that for its 'rapid publication' outlet, it will no longer accept submissions where LaTeX has been used to format the document. They now demand everything be submitted as a (sigh) Word document. After much whining, bitching and moaning from me (and some others), they've relented -- partially. They'll take LaTeX submissions _if_ we can build a strong stylesheet - one wherein the generated PDF looks "pretty damned close to exactly like the published form" (their words). The actual (published) format they want isn't particular complex. Fore example, see http://www.esajournals.org/doi/pdf/10.1890/ES12-00286.1 Now, I'm 'good enough' with laTeX to be able to use this package, and that, a few tweaks here and there, to cobble together something pretty damned close. But, that approach isn't particularly portable. What they want (and I would agree) is a .cls file (and a .bst for the bib) which a user could apply to their document, and presto chango, out comes the paper. I've never tried writing a .cls file. Those that I've accumulated over the years (e.g., Springer etc), I can follow pretty well, but I'm not quite sure where to start. Suggestions? Of course, if any of your smart folks who can do this in your sleep wanna take 15 minutes and put it together, ( (and oh, say, 500 or so folks who use LaTeX for this journal) would be forever indebted - virtual beers on us for life. Real ones if we ever crossed corporeal paths.


title: How can I redefine a list item to normal text in order to enable proper wrapping?

text: Consider the following LaTeX code, the bottom half of which was generated from MarkDown by Pandoc.               \documentclass{article}     \usepackage{mwe}          \makeatletter     \def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth     \else\Gin@nat@width\fi}     \makeatother     \let\Oldincludegraphics\includegraphics     \renewcommand{\includegraphics}[1]{\Oldincludegraphics[width=\maxwidth]{#1}}          \setlength{\parindent}{0pt}          % begin preamble.tex     \usepackage{wrapfig}     \renewenvironment{description}{}{}     \renewcommand{\item}[1][]{%         \renewcommand{\includegraphics}[1]{\Oldincludegraphics[width=4cm]{##1}}%         \begin{wrapfigure}{l}{4cm}%         #1%         \end{wrapfigure}%         }     % end preamble.tex          \begin{document}     \begin{wrapfigure}{l}{4cm}%     \Oldincludegraphics[width=4cm]{example-image-a}%     \end{wrapfigure}%     A.0 Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobortis facilisis     sem. Nullam nec mi et neque pharetra sollicitudin.          A.1 \blindtext          \begin{description}     \itemsep1pt\parskip0pt\parsep0pt     \item[\includegraphics{example-image-b}]     B.0 Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobortis facilisis     sem. Nullam nec mi et neque pharetra sollicitudin.     \end{description}          B.1 \blindtext     \end{document}      What I would like to do, is to redefine the `description` environment and the `\item` command as normal text for the `wrapfigure` to work properly. `\renewenvironment{description}{}{}` appears to do fine. It is the `\renewcommand{\item}[1][]` block that still seems to provoke unexpected `wrapfig` behaviour. Something similar happens when replacing `wrapfig` by `picins`. Note: Since we are dealing here with a Pandoc-generated document, above should only be achieved by changing the preamble and/or adding a header and/or footer to the `document`. ![enter image description here](http://i.stack.imgur.com/izDmu.png)


title: how to mark the minimum of a function in a certain range?

text: In the MWE below,               \documentclass{article}     \usepackage{pgfplots}          \begin{document}          \begin{tikzpicture}     \begin{axis}     \addplot [domain=-10:10, samples=101, blue]{(1.5*x)^((x/(1-x)))};     \addplot [domain=-10:10, samples=101, red]{(10*x)^((x/(1-x)))};     \end{axis}     \end{tikzpicture}          \end{document}      I tried to follow the advice from cmhughes Pgfplots : can't plot some usual mathematical functions How could I plut the two functions zoomed in the range x \in (0,1) What is it that is wrong in my example, please? Also can I somehow indicate the minima or something like a dashed line from the x axis to the minimum point of the curve?


title: subfig and subfloat stopping doc compiling

text: I have a nice little tiled image sequence that relies on `\usepackage{subfig}` and `\usepackage[countmax]{subfloat}` being declared. Is it that `[countmax]` is trying to run against the whole doc and this is too much?               \documentclass[11pt,a4paper]{article}\usepackage{graphicx}\usepackage[english]{babel}\usepackage{caption}     \usepackage{subfig}\usepackage[countmax]{subfloat}     \begin{document}          \def \seq1width{0.325}          \begin{figure}[htbp]     \begin{center}$     \begin{array}{ccc}     \subfloat[]{\label{fig:image_1}\includegraphics[width=\seq1width\textwidth]{./pupbot_1-0.jpeg}} &     \subfloat[]{\label{fig:image_2}\includegraphics[width=\seq1width\textwidth]{./pupbot_1-1.jpeg}} &     \subfloat[]{\label{fig:image_3}\includegraphics[width=\seq1width\textwidth]{./pupbot_1-3.jpeg}} \\     \subfloat[]{\label{fig:image_4}\includegraphics[width=\seq1width\textwidth]{./pupbot_1-6.jpeg}} &     \subfloat[]{\label{fig:image_5}\includegraphics[width=\seq1width\textwidth]{./pupbot_1-9.jpeg}} &     \subfloat[]{\label{fig:image_6}\includegraphics[width=\seq1width\textwidth]{./pupbot_1-10.jpeg}} \\     \subfloat[]{\label{fig:image_7}\includegraphics[width=\seq1width\textwidth]{./pupbot_1-12.jpeg}} &     \subfloat[]{\label{fig:image_8}\includegraphics[width=\seq1width\textwidth]{./pupbot_1-13.jpeg}} &     \subfloat[]{\label{fig:image_9}\includegraphics[width=\seq1width\textwidth]{./pupbot_1-15.jpeg}}          \end{array}$     \rule{35em}{0.5pt}     \caption{\label{fig:chinese_dragon_pupbot_sequence_1} Chinese dragon puppet-robot cyclical motion sequence.}     \end{center}     \end{figure}          \end{document}      When I compile in a standalone doc (as you see the code above) it works fine but when I try to declare these packages (as you see in the code below) at the start of my main.tex and \input{} everything in the code between \begin{figure} and \end{figure} into the document I get this error: > ! Paragraph ended before \sf@setref was complete. \par l.46 I suspect you've > forgotten a `}', causing me to apply this control sequence to too much text. And here is how I am declaring packages in my doc               \documentclass[11pt, a4paper, oneside]{Thesis}          \graphicspath{{./Pictures/}}          \usepackage[square, numbers, comma, sort&compress]{natbib}      \usepackage{graphicx}     \usepackage[english]{babel}     \usepackage{array}     \usepackage{mathtools}     \usepackage{float}     \usepackage{placeins}     \renewcommand{\lstlistingname}{Code}     \usepackage{subfig}     \usepackage[countmax]{subfloat}     \hypersetup{urlcolor=blue, colorlinks=true}      \title{\ttitle}          \begin{document}          \frontmatter     \setstretch{1.3}           %...etc


title: How can tikzpictures in a tabular be centered independent of nodes?

text: I have the following `tikzpicture` inside a `tabular` and i would like to have the circles to be centered such that they line up in collumns and rows, even if there are nodes at different positions. How can this be done?               \documentclass{standalone}     \usepackage{tikz}     \begin{document}     \begin{tabular}{cc}         \begin{tikzpicture}[scale=1]             \draw (0, 0) circle (1cm);             \draw (90:1.3) node {$A$};         \end{tikzpicture}         &         \begin{tikzpicture}[scale=1]             \draw (0, 0) circle (1cm);             \draw (-90:1.3) node {$B$};         \end{tikzpicture}         \\         \begin{tikzpicture}[scale=1]             \draw (0, 0) circle (1cm);             \draw (0:1.3) node {$C$};         \end{tikzpicture}         &         \begin{tikzpicture}[scale=1]             \draw (0, 0) circle (1cm);             \draw (180:1.3) node {$D$};         \end{tikzpicture}     \end{tabular}     \end{document}      The nodes make the center of a `tikzpicture` move away from the center of the circles. Can the center be set manually to the center of the circles? Or is there any option that makes `tikzpicture` ignore the nodes?


title: Number format for accounts

text: I am using `spreadtab` to prepare financial statements for presentation. However, I wish to present negative numbers in brackets (parentheses) within the table: `-3,210` as (3,210) I don't even know if this is possible. I am a total beginner as far as LaTeX is concerned, so please forgive my ignorance.


title: Coordinating the work of Biblatex style authors

text: I am not sure whether this is an admissible question. If it is not, please close it. **The problem** Biblatex opens up the realistic possibility of highly complex citation systems such as those used in my field, law. It is an area very poorly served by existing tools, and in theory an area where LaTeX could be a brilliant tool. However, as any style author quickly finds out, the complexity of these systems requires innovation. We have to work with non-standard entrytypes. And we have to use existing fields unconventionally, and to make heavy use of custom fields. The same, I think, applies also in other fields of humanities. Quite a lot of work is being done by several people, independently. It is obviously not a bug, but a feature, that the end result of these labours are styles that produce different output. Different legal traditions and humanities disciplines have their own preferences, and the whole purpose of is to abstract these preferences. But it is or will be a bug if the use of different fields and entrytypes is so idiosyncratic that `.bib` files produced for one system are radically incompatible, even for sources, such as treaties, international cases, and EU cases, which are common to many different traditions. To take one tiny example, Tobias Schwan's juradiss package records, I think, the court that decided a case in the `Author` field, whereas my work in progress currently uses the `Institution` field. Either might be fine. But it will be a blot on the overall coherence of the system if some of us use one, and some the other, for it makes each `bib` file style-specific. **The question** Is there any existing mechanism by which this sort of decision could be discussed collectively, and existing solutions recorded, not in order to impose compulsory norms, but to help us avoid too Balkanised a system? If not, how could one be created, and what is the best way to have something lightweight and not-too-bureaucratic? As a lawyer, I'm depressingly unfamiliar with the tools for effective cooperation that others here have vast experience of.


title: "Tex capacity exceeded." with beamer

text: I use MikTex 2.9 and am compiling a `beamer` presentation. I have 100+ pages. The file compiles if I comment out about half of the frames. I managed one presentation by compiling the two halves one after the other and combining the two pdfs later. This, however, is a big headache to manage outlines and reference. The exact message is:               Tex capacity exceeded. sorry. [input stack size = 5000].      Increasing the stack size to 50000 is to no avail. Can that be due to large number of frames, or since the outline frame cannot hold all the topics. I simply could not have any clue. Any ideas??


title: Reducing the line spacing of multi-line section headings in memoir

text: [This is essentially a memoir-specific version of this question.] **How can I reduce the line spacing within section (or other) headings in`memoir` without affecting the spacing to the body text above?** In the example that follows, modifying `\baselineskip` does the trick but also affects the spacing of the heading to the previous section's body text. I would like to get rid of this unintended side effect. Further notes about my example: Note that halving `\baselineskip` is too much, but it's good for illustrating the issue. I've included `\tableofcontents` and used the optional-argument version of `\section` (`\section[what appears in the TOC]{what appears in the document body}`) to draw attention to the fact that whatever modifications of the section heading we make, we probably don't want to affect the table of contents. For those taking issue with the visuals of the example ("The original line spacing is just fine in what you show below!"), the actual problem is from something else (my other, actual document has horrible double-spacing); **update:** I have included a screenshot for that as well. Notes for those helping with a solution: 1. It seems that `\par` can't be issued within a section heading. 2. `\setstretch` (from the solutions to the linked question) doesn't work within `memoir`. ![too-large line spacing in section headings \(ordinary spacing for main document\)](http://i.stack.imgur.com/rSCa8.png) This issue is exacerbated by doublespacing (add `\DoubleSpacing` in the preamble): ![too-large line spacing in section headings \(double spacing for main document\)](http://i.stack.imgur.com/f5K5U.png)               \documentclass[12pt]{memoir}          %\DoubleSpacing               \begin{document}          \tableofcontents               \chapter{This is a chapter heading}          Look at the distance of this line to the following heading (as intended):          \section{This is a section heading spanning two lines}          Look at the distance of this line to the following heading (slightly too small):          \section[This is a section heading spanning two lines]%         {\setlength{\baselineskip}{0.5\baselineskip}%          This is a section heading spanning two lines}          Text.          \end{document}


title: chapter headings

text: I'm using document class `report` and I have decided for chapter headings to use one of the predefined style of Vincent Zoonekynd's with some modification. I would prefer to have `\chapter` and `\chapter*` defined differently. For chapter this style:               \documentclass{report}     \usepackage{xcolor}          \makeatletter     \def\LigneVerticale{\vrule height 1.5cm depth 0.9cm\hspace{0.1cm}\relax}     \def\LignesVerticales{%       \let\LV\LigneVerticale\LV\LV\LV\LV\LV\LV\LV\LV\LV\LV}     \def\GrosCarreAvecUnChiffre#1{%       \rlap{\vrule height 0.8cm width 1cm depth 0.2cm}%       \rlap{\hbox to 1cm{\hss\mbox{\white #1}\hss}}%       \vrule height 0pt width 1cm depth 0pt}     \def\@makechapterhead#1{         \vspace*{-20pt}         \hbox{%         \huge\bfseries         \LignesVerticales         \hspace{-0.62cm}%         \GrosCarreAvecUnChiffre{\thechapter}         \hspace{0.2cm}\hbox{#1}%         }\par\vskip 0.5cm}     \makeatother          \begin{document}     \chapter{Name}     \end{document}      For `\chapter*` this style:               \documentclass{report}     \usepackage{xcolor}          \makeatletter     \def\LigneVerticale{\vrule height 1.5cm depth 0.9cm\hspace{0.1cm}\relax}     \def\LignesVerticales{%       \let\LV\LigneVerticale\LV\LV\LV\LV\LV\LV\LV\LV\LV\LV}     \def\GrosCarreAvecUnChiffre#1{{%       \color{white}%       \rlap{\vrule height 0.8cm width 1cm depth 0.2cm}%       \rlap{\hbox to 1cm{\hss\mbox{\color{black}#1}\hss}}%       \vrule height 0pt width 1cm depth 0pt}}     \def\@makeschapterhead#1{        \vspace*{-20pt}        \hbox{%         \huge\bfseries         \LignesVerticales         \hspace{-0.62cm}%         \GrosCarreAvecUnChiffre{\thechapter}         \hspace{0.2cm}\hbox{#1}%         }\par\vskip 0.5cm}     \makeatother          \begin{document}     \chapter*{Names}     \end{document}      Now, I have two questions:   1. How to modife the second style (for `\chapter*`) to have this output- no number {zero} and the name of the chapter move to the left in the space between the vertical lines.   2. how to define the two styles together in one document to be able to use both of them at the same time.


title: Configure tex4ht for colortbl and tabulary

text: I'm trying to use `colortbl` together with `tex4ht`:               \documentclass{article}      \usepackage{tabulary,colortbl}     \begin{document}      \begin{tabulary}{\textwidth}{C}     test\\     \end{tabulary}     \end{document}      When calling htlatex.bat, the result is:               ! Undefined control sequence.     \begin:current@color ->\let \sv:curcolor                                          \current@color     l.4 \begin{tabulary}{\textwidth}{C}      I assume that tex4ht needs some more "configuration" (as Eitan always put it). How is this configuration done? I'm using SVN revision 88 from the tex4ht-SVN: http://svn.gnu.org.ua/sources/tex4ht/trunk/. htlatex.bat is from: http://svn.gnu.org.ua/sources/tex4ht/trunk/bin/ht/win32/htlatex.bat


title: Table used to place text and symbols

text: I want to place some text and a line created with rule. It should look like the example you can see as image. The table shall be textwidth.               \documentclass[a4paper, 11pt]{memoir}     \usepackage[utf8]{inputenc}     \usepackage[ngerman]{babel}     \usepackage{tabularx}          \begin{document}          \begin{table}[h]     \begin{tabular}{lr}     \rule{5cm}{0.5pt} & \rule{5cm}{0.5pt} \\     Mieter & Vermieter     \end{tabular}     \end{table}          \end{docuemtn}      The first line should be on the left side and the second line on the right side of the paper. Centered under the lines should be some text. How to do that with tabular? Kind regards


title: Creating Entry in Bibtex for Executive Orders

text: Anybody have any idea on how to create the proper APA entry for an Executive Order in my .bib? I can't seem to find any guidance on what fields to use to make it work. The reference should appear like this: Exec. Order No. 13,423, 3 C.F.R. 3919. (2007).


title: Misalignment with cutwin

text: Compiling the code below yields a misalignment of the text when the box is drawn.               \documentclass[fleqn,11pt]{book}     \usepackage{cutwin}     \begin{document}     \renewcommand\windowpagestuff{\flushright\rule{2cm}{2cm}}%     \opencutright%     text text text text text text text text text text text text text text text text text   text text text text text text text text text text text text     \begin{cutout}{1}{0.79\linewidth}{0pt}{5}%     text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text     \end{cutout}     \end{document}      ![enter image description here](http://i.stack.imgur.com/uEJTJ.png) Would you know nice tricks to avoid this behavior?


title: In Beamer, how do you change the background color of an enumerated list inside an exampleblock?

text: I am trying to set the background color of the numbers in numbered lists that appear in my example blocks in Beamer. I thought this would do it:               \setbeamercolor{item projected example}{fg=red, bg=yellow}      It does not work. In the example below, I would like to have the numbers "1" and "2" on a dark green background. ![example](http://i.stack.imgur.com/RLwNg.png)


title: How to set a small default font size with beamer?

text: I use `beamer` class with `newcent` package for the font. I set               \documentclass[8pt]{beamer}      at the top of my tex file. But I think the font is still too large. In my beamer theme, I tried to set :               \setbeamerfont{normal text}{size=\small}      But it does not work and I think that it is not the correct way to do that. How can I globally reduce the font size ? Thanks


title: Background Package with Options

text: I get the error message `Error: Unknown option pages=some for package background`, when I tried to compile the following code from the manual of the Background package.               \documentclass{article}     \usepackage[pages=some,placement=top]{background}     \usepackage{lipsum}     \begin{document}     \lipsum[1-5]     \newpage     \backgroundsetup{contents=A,color=yellow}     \BgThispage     \lipsum[1-5]     \newpage     \backgroundsetup{contents=B,color=blue}     \BgThispage     \lipsum[1-5]     \end{document}       What am I doing wrong?


title: Numbering all lines of an array

text: I know there are already many topics about that but I couldn't find an appropriate answer (most of the time the given solutions are not adapted to my case). Here is my code (some command have been renamed) :               \begin{subequations}     \begin{array}{rcll}     \dint_{K} \underline{E}_h \cdot \underline{z} dx + \dint_{K}\Phi_h \nabla\cdot \underline{z} dx -\dint_{\partial K} \lambda_h \underline{z} \cdot \underline{n} d\sigma & = & 0, & \forall\  \underline{z}_h \in\mathbb{Q}^k(K), \\[4mm]     \dint_K \nabla \cdot \underline{E}_h p dx & = & \dint_K (1-\rho)p dx, & \forall\  p \in \mathbb{P}^k(K), \\[4mm]     \dint_e \ldbrack \underline{E}_h \rdbrack \mu d\sigma & = & 0, & \forall\ \mu\in\mathbb{P}^k(e).     \end{array}     \label{eq:Poisson-RT     \end{subequations}      I would like to keep the vertical alignment (all the `\forall` one above the other...) and have a numbering like               ... (1.a)     ... (1.b)     ... (1.c)      I tryed with `subequation` and `align` but the alignment is not the one expected and `array` is not compatible with `subequation`. `eqnarray` could be acceptable if it did not place characters on top of each other.


title: Metapost External Figure

text: I have a metapost file `image.mp` containing the following lines:               beginfig(0);     draw p0;      externalfigure "/Users/dsg/tex/images/image.png" xyscaled r0 shifted r1;      endfig;      When I run `mptopdf scene.mp` I get the following error:               MPtoPDF 1.4.1 : running 'mpost --mem=mpost   --tex=latex  scene.mp'     This is MetaPost, version 1.504 (kpathsea version 6.1.0)     (mpost.mp (/opt/local/share/texmf-texlive-dist/metapost/base/plain.mp     Preloading the plain mem file, version 1.004)) (./scene.mp     >> externalfigure     ! Isolated expression.     <to be read again>                         "/Users/dsg/tex/images/image.png"     l.421 ...tex/images/image.png"                                                        xyscaled r0 shifted r1;      I think it is being caused the new version of metapost on my new computer because this same file used to work on my old computer. I'm not sure how to fix it. I've tried changing it to:               beginfig(0);     draw p0;      draw externalfigure "/Users/dsg/tex/images/image.png" xyscaled r0 shifted r1;      endfig;      But then I get:               MPtoPDF 1.4.1 : running 'mpost --mem=mpost   --tex=latex  scene.mp'     This is MetaPost, version 1.504 (kpathsea version 6.1.0)     (mpost.mp (/opt/local/share/texmf-texlive-dist/metapost/base/plain.mp     Preloading the plain mem file, version 1.004)) (./scene.mp     >> externalfigure     ! Improper `addto'.     <to be read again>                         withpen     draw->...:also(EXPR0)else:doublepath(EXPR0)withpen                                                       .currentpen.fi._op_     <to be read again>                         "/Users/dsg/tex/images/image.png"     l.421 ...images/image.png"                                                        xyscaled r0 shifted r1;      (EDIT: added `beginfig(0);`) SOLVED: you do not need `draw externalfigure ...` just `externalfigure ...`, but as @egreg put it, you need to run `mptopdf -metafun`


title: Limit scope of formatting to within command

text: I wanted to generate a cover page for a tech report and so put the following in my preamble               \makeatletter     \newcommand{\coverpage}{\onecolumn \centering \large     \thispagestyle{empty}     {\noindent\includegraphics[width=3.5in]{Logo_black}}\vspace*{0.4in}\\     {\noindent\huge Electrical Engineering and Computer Science}\vspace*{0.8in}\\     {\noindent\Huge \bf \@title}\vspace*{0.3in}\\     {\noindent \@date}\vspace*{0.3in}\\     {\noindent \@author}\vspace*{0.4in}\\     \textit{TR-ID-12-06}\vspace*{0.4in}\\     \noindent\textbf{Abstract}\vspace*{0.1in}\\     \hspace*{0.1in}\begin{minipage}{0.8\linewidth}     \input{abstract}     \end{minipage}     \vfill     \setcounter{page}{0}}     \makeatother      Then, after `\begin{document}`, I have a `\coverpage`, followed by `\maketitle` and so on. However, now the whole document is formatted as one- column and centered even though my class file configured it to be two-column (and fully justified). Why does this happen and how should I avoid this?


title: An inconsistency in beamer color handling: how to set color for a specific slide layer?

text: The following MWE works for setting the color of the bullets, but not the `\item` text (except at the top level, which turns everything grey). As I step through the slides, I'd like the text of the active "major point" (top level item) to be black.               \documentclass[compress,red,notes]{beamer}          \begin{document}          \frame{     \frametitle{Test color transition in beamer enumerations}          {\setbeamercolor{local structure}{fg=gray}     \setbeamercolor{itemize/enumerate body}{fg=gray!65}     \begin{itemize}       {\only<1>{\setbeamercolor{local structure}{fg=red}                 \setbeamercolor{itemize/enumerate body}{fg=black}}       \item Major point 1       \begin{itemize}         \scriptsize         \item Minor point 1         \item Minor point 2       \end{itemize}       } % end of \only<1>       {\only<2>{\setbeamercolor{local structure}{fg=red}                 \setbeamercolor{itemize/enumerate body}{fg=black}}       \item Major point 2       \begin{itemize}         \scriptsize         \item Minor point 1         \item Minor point 2       \end{itemize}       } % end of \only<2>       {\only<3>{\setbeamercolor{local structure}{fg=red}                 \setbeamercolor{itemize/enumerate body}{fg=black}}       \item Major point 3       \begin{itemize}         \scriptsize         \item Minor point 1         \item Minor point 2       \end{itemize}       } % end of \only<3>       {\only<4>{\setbeamercolor{local structure}{fg=red}                 \setbeamercolor{itemize/enumerate body}{fg=black}}       \item Major point 4       \begin{itemize}         \scriptsize         \item Minor point 1         \item Minor point 2       \end{itemize}       } % end of \only<4>     \end{itemize}     } % end of \color{gray}     } % end of \frame          \end{document}      Assuming this can be made to work, it would also be nice to put the `\only<x>{ ... }` code in its own command. I'm a bit confused about the difference between `\command<parameter>{main param}` (as seen in `\only<parameter>{...}` and `\command[parameter]{main param}` (as seen in almost all other commands outside of beamer). What is the difference between < > and [ ]?


title: Reorder or reduce console output

text: After running pdftexify, I get a long console output of several hundred lines. Hidden within this output, there are a few bad boxes and sometimes a warning. Is there some way to reduce the output such that only the bad boxes and warnings are shown? Or, alternatively, is it possible to reprint the parts with bad boxes and warnings at the end of the output? Such that I can spot and address the presented issues easily.


title: Why does my loop not show?

text: I have a big picture made, but I can't get my nodes to get a loop (an arrow to itself). My code:               \begin{tikzpicture}     \matrix (mat) [matrix of nodes]      {      |[draw,circle]|$(0)$  &[10mm] $\begin{bmatrix} u^{(0)}_0 \\ u^{(0)}_1 \end{bmatrix}$ & $\begin{bmatrix} \sigma^{(0)}_{00} & \sigma^{(0)}_{01} \\ \sigma^{(0)}_{10} & \sigma^{(0)}_{11} \end{bmatrix}$ & \\     |[draw,circle]|$(1)$ & $\begin{bmatrix} u^{(1)}_0 \\ u^{(1)}_1 \end{bmatrix}$ & $\begin{bmatrix} \sigma^{(1)}_{00} & \sigma^{(1)}_{01} \\ \sigma^{(1)}_{10} & \sigma^{(1)}_{11} \end{bmatrix}$ &  $\begin{bmatrix} u^{(0)}_0 \\ u^{(0)}_1 \\ u^{(1)}_0 \\ u^{(1)}_1 \\ u^{(2)}_0 \\ u^{(2)}_1 \end{bmatrix}$ \\     |[draw,circle]|$(2)$ & $\begin{bmatrix} u^{(2)}_0 \\ u^{(2)}_1 \end{bmatrix}$ & $\begin{bmatrix} \sigma^{(2)}_{00} & \sigma^{(2)}_{01} \\ \sigma^{(2)}_{10} & \sigma^{(2)}_{11} \end{bmatrix}$ &   \\     };          \draw [->] (mat-1-1) -- (mat-2-1);     \draw [->] (mat-2-1) to [bend right=35] (mat-1-1);     \draw [->] (mat-2-1) -- (mat-3-1);     \draw [->] (mat-3-1) to [bend right=35] (mat-2-1);          \draw [->] (mat-1-1) to [bend left=55] (mat-3-1);     \draw [->] (mat-3-1) to [bend left=55] (mat-1-1);          \draw [->,loop above,looseness=16,min distance=15mm] (mat-1-1);                \end{tikzpicture}      The interesting part is the last `\draw` command which doesn't seem to have any effect. What should I do to display a loop above my node? Currently it looks like this: ![my tikz image](http://i.stack.imgur.com/0W00S.png)


title: \endcsname errors in classicthesis

text: I have been using classicthesis ( http://www.miede.de/index.php?page=classicthesis ) for about a year now with no issues with TeXnicCenter. I last compiled my document successfully yesterday. Today I updated my MikTex 2.9 packages under Win7 using the Maintenance(Admin) application - I did not pay attention to which packages were updated. I Refreshed FNDB and Updated Formats. My next compile resulted in 132 errors such as the following:               l.18 \setcounter{paragraph}{0}          The control sequence marked <to be read again> should     not appear between \csname and \endcsname.          ! Missing \endcsname inserted.     <to be read again>                     \endcsname      l.18 \setcounter{paragraph}{0}          The control sequence marked <to be read again> should     not appear between \csname and \endcsname.          ! Missing number, treated as zero.      <to be read again>                     \endcsname      l.18 \setcounter{paragraph}{0}          A number should have been here; I inserted `0'.     (If you can't figure out why I needed to see a number,     look up `weird error' in the index to The TeXbook.)          ! Missing \endcsname inserted.     <to be read again>                     \endcsname      l.19 \setcounter{subparagraph}{0}      So I re-downloaded `classicthesis` and compiled it. The result was 101 errors of a similar nature. even with this minimal `classicthesis.tex` file I get 101 errors. This along with `classicthesis-config.tex` should hopefully perform the duties of a MWE.               % Copyright (C) 2012 Andr\'e Miede http://www.miede.de          \documentclass[ twoside,openright,titlepage,numbers=noenddot,headinclude,%1headlines,%     letterpaper a4paper                 footinclude=true,cleardoublepage=empty,abstractoff, % <--- obsolete, remove (todo)                 BCOR=5mm,paper=a4,fontsize=11pt,%11pt,a4paper,%                 ngerman,american,%                 ]{scrreprt}          \input{classicthesis-config}          \begin{document}     \end{document}      I have used the classicthesis-config.tex example file and my modified file with the same result. Relevent files are available at: http://www.ctan.org/tex-archive/macros/latex/contrib/classicthesis/               %http://mirrors.ctan.org/macros/latex/contrib/classicthesis/classicthesis-config.tex     %http://mirrors.ctan.org/macros/latex/contrib/classicthesis/classicthesis.sty      I have tried deleting all the `.aux` files. In my dissertation, removing `\usepackage[polutonikogreek,english]{babel}` results in some 50 errors fewer, but this does not occur in the attached example. Given that I have relied on `\usepackage[polutonikogreek,english]{babel}` for extensive ancient Greek text, I really need to use this. Any ideas as to the cause and/or the remedy for my woes? Thank you for your time thus far.


title: How do I add a Page X of Y in a KOMA-script class?

text: I saw the answers to a similar question, but the accepted answer won't take effect in a KOMA-script class. > >     \usepackage{lastpage} >     ... >     \cfoot{\thepage\ of \pageref{LastPage}} >   I am using `scrartcl` and `lastpage`. The default page numbering is just the page number itself. I want it to be `currentPage / totalPages`. How do I modify it?


title: Non-breaking space in \citet using natbib?

text: When adding citations in the body of a document I'm used to write               ... in some interesting paper~\cite{interesting}.      So that (if I'm using numbered references) the word “paper” and the citation number stick together and do not accidentally end up in two different lines. It seems, however, that the `\citet` command from `natbib` (which should produce something like “Authors [4]”), does not use a `~` between the names of the authors and the citation number so that, on a few rare occasions, I end up with something like                                                                 ... Authors     [4].      Which is annoying. Is there an easy way to make `natbib` use a non-breaking space there?


title: Proper Bibliography Style

text: I am writing a paper with IEEE conference document class a skeleton of which is shown below.               \documentclass[conference, a4paper]{IEEEtran}     \begin{document}     \bibliographystyle{IEEEtran}     \bibliography{IEEEabrv,library}     \end{document}      The reviewers insist on the following conditions in the reference list.   1. No italic fonts in the reference text, neither in the article title, nor in the journal name.    2. Month and year of references must appear before the page numbers (for conference proceedings and journal articles). I have tried several bib styles including IEEETran, amsplain, unsrt, apa and some others, but none of them is meeting the criteria. The acm style nearly does the job, but it prints the authors' names in small caps which I don't think will be acceptable in a technical proceeding. Any suggestion on any new bib style or whether it's possible to tweak any existing style to meet the requirements?


title: two different lists of figure in the same document

text: I'm writing my Phd thesis with parts chapters and sections. It is divided in two very different subjects of research and I'd like to have a clear separation in the document and in the Table of Contents. In particular I'd like to have two different List of Figure and two List of Tables at the end of each parts of the document and not all together at the end of the document. I think that I have to create some new environment but I'm not able to get my result. To construct two different new figure environments I simply inserted:               \newenvironment{myfigure1}{\begin{figure}}{\end{figure}}       in all chapters of the first Part of the document and               \newenvironment{myfigure2}{\begin{figure}}{\end{figure}}      in all chapters of the second Part Also I modified the main file as follows:               \newlistof{myfigure1}{List of Figure}      after the chapters of the first Part and               \newlistof{myfigure2}{List of Figure}       after the chapters of the second Part in the main file. Sorry for my naivety


title: Is there any way to create columns inside a tikzposter block?

text: I am trying to split a tikzposter block within different columns. The columns enviroment works for splitting the poster and insert blocks inside. However the columns environment does not work inside the block. Here's a MWE:               \documentclass[25pt, a0paper, portrait, margin=0mm, innermargin=15mm, blockverticalspace=15mm, colspace=15mm, subcolspace=8mm]{tikzposter}          \usepackage{xcolor}     \usepackage{filecontents}% http://ctan.org/pkg/filecontents     \usepackage{lipsum}% http://ctan.org/pkg/lipsum     \usepackage{tikz}          \begin{filecontents*}{myDummyPictureCode.tex}       \begin{tikzfigure}[Some nice caption for the figure]         \centering         \begin{tikzpicture}           \draw [color=red] (0,0) rectangle (20,10) node [midway] {\huge myFigure};         \end{tikzpicture}       \end{tikzfigure}     \end{filecontents*}          \title{Title}     \author{Name}          \usetheme{Autumn}\usecolorstyle[colorPalette=BrownBlueOrange]{Germany}          \begin{document}\maketitle          \begin{columns}      \column{0.7} \block{FigureOutside Block}{       \lipsum[1]     }          \column{0.3} \block{}{     \input{./myDummyPictureCode.tex}     }     \end{columns}          % Text and figure Inside the Block     \block{Text and figure Block}{     \begin{columns}      \column{0.7} \lipsum[1]     \column{0.3} \input{./myDummyPictureCode.tex}     \end{columns}     }          \end{document}      ![MWE output](http://i.stack.imgur.com/HTkos.png) Is there anyway to achieve the desired result?


title: scaling equation within margin

text: I have split an equation across several lines but I couldn't remain perfectly within the margin. ![enter image description here](http://i.stack.imgur.com/f7kcQ.png) The input is               \begin{equation*}     \begin{split}         & \ddot\phi_3+\phi_3+sin(\tau+\alpha)[p_1\Delta \alpha+2 \nabla p_1 \nabla \alpha] \\         & \qquad -\cos(\tau+ \alpha)[\Delta p_1 -p_1 (\nabla \alpha)^2+\frac{5}{6}g_2^2p_1^3- \frac{3}{4}g_3p_1^3-p_1 +\omega_2 p_1]         +\frac{ p_1^3}{12}(2g_2^2+3g_3)\cos3(\tau + \alpha) \\         & \qquad +g_2 p_1 [p_2+ p_2 cos2(\tau +\alpha)+q_2 \sin2(\tau+\alpha)] =0     \end{split}     \end{equation*}     \begin{equation}\label{eq10}     \begin{split}     & \ddot\phi_3+\phi_3+\sin(\tau+\alpha)[p_1\Delta \alpha+2 \nabla p_1 \nabla \alpha] \\     & \qquad  -\cos(\tau+ \alpha)[\Delta p_1-p_1 (\nabla \alpha)^2 + \lambda p_1^3-p_1+\omega_2 p_1] +\frac{p_1^3}{12}(2g_2^2+3g_3)\cos3(\tau + \alpha) \\      & \qquad +g_2 p_1 [p_2+ p_2 \cos2(\tau +\alpha)+q_2 \sin2(\tau+\alpha)]=0     \end{split}     \end{equation}


title: TikZ callout pointing to nested nodes

text: In the following MWE I want to create a `TikZ` callout pointing to a node within a node. The outer node is for the highlighting environment `\tikzMe` the inner node is for the `\tikzmark`. Somehow I do not achieve that the callout is displayed correctly. Is there a solution?               \documentclass{beamer}     \usepackage{beamerthemeshadow}     \usepackage{mathtools}     \usepackage{tikz}     \usetikzlibrary{%     shapes.callouts,     shadows     }     \usepackage{xparse}          \tikzset{         invisible/.style={opacity=0,text opacity=0},         visible on/.style={alt=#1{}{invisible}},         alt/.code args={<#1>#2#3}{%           \alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}} % \pgfkeysalso doesn't change the path         },         BeamerAlert/.style={alt={#1{fill=red!30,rounded corners}{}},anchor=base,inner sep=1pt}       }          \newcommand<>{\tikzMe}[1]{%             \tikz[baseline]\node[BeamerAlert={#2},anchor=base,text width=9cm] {#1};           }          \NewDocumentCommand{\mycallout}{r<> m m m m m m}{%     \tikz[remember picture, overlay]\node[drop shadow, rounded corners, align=left, fill=#7!30, text width=#4,visible on=<#1>,     draw,rectangle callout,anchor=pointer,callout relative pointer={(#5:#6cm)}]     at (#2) {#3};     }          \newcommand{\tikzmark}[1]{\tikz[overlay,remember picture,baseline=-0.5ex] \node (#1) {};}          \begin{document}          \begin{frame}     \begin{itemize}       \item Cras viverra metus rhoncus sem. Nulla et lectus vestibulum urna fringilla ultrices.       \item \tikzMe<2>{Nam arcu libero, nonummy \tikzmark{x}eget, consectetuer id, \dots}     \end{itemize}     \end{frame}          \mycallout<3>{x.north}{Hahahahaha!!!}{5cm}{260}{0.7}{red}          \end{document}      NB: This question combines the accepted answers of Explanatory bubbles in beamer and Highlighting in beamer using TikZ nodes.


title: pgfplots chart labels too close and not spaced evenly

text: i have a set of numbers as x-coordinates:`{2.08, 2.09, 2.7, 4.9, 12.8, 29.3, 64.2}`. the left part of the diagram is too tight because `2.08` and `2.09` are very close. i want to **evenly** distribute the set of numbers on x-axis. is it possible? and how? see an example as follows:               \begin{figure}[!h]       \centering           \caption{The example.}           \label{figure:the_example}           \begin{tikzpicture}[scale=0.45]             \begin{axis}[ybar,xtick=data,xlabel=$ \lambda $,ylabel=$ \alpha $,                           x tick label style={rotate=-35,anchor=west},width=2.2\textwidth,                           height=0.32\textheight,legend pos=north west,ymin=0]               \addplot coordinates {                 (2.08,10)                 (2.09,15)                 (2.7,25)                 (4.9,22)                 (12.8,21)                 (29.3,12)                 (64.2,17)               };             \end{axis}           \end{tikzpicture}     \end{figure}


title: Packages needed for Latex from sagemath

text: I'm trying to export sagemath graphs using these commands:               sage: M = Matrix ([ [0, 1, 1], [1, 0, 1], [1, 1, 0] ])     sage:  # (the order is the number of edges)     sage: G = Graph(M); G.order()     sage: G.show();     sage: latex.engine();     sage: latex(G);      my output is:               \begin{tikzpicture}     %     \useasboundingbox (0,0) rectangle (5.0cm,5.0cm);     %     \definecolor{cv0}{rgb}{0.0,0.0,0.0}     \definecolor{cfv0}{rgb}{1.0,1.0,1.0}     \definecolor{clv0}{rgb}{0.0,0.0,0.0}     \definecolor{cv1}{rgb}{0.0,0.0,0.0}     \definecolor{cfv1}{rgb}{1.0,1.0,1.0}     \definecolor{clv1}{rgb}{0.0,0.0,0.0}     \definecolor{cv2}{rgb}{0.0,0.0,0.0}     \definecolor{cfv2}{rgb}{1.0,1.0,1.0}     \definecolor{clv2}{rgb}{0.0,0.0,0.0}     \definecolor{cv0v1}{rgb}{0.0,0.0,0.0}     \definecolor{cv0v2}{rgb}{0.0,0.0,0.0}     \definecolor{cv1v2}{rgb}{0.0,0.0,0.0}     %     \Vertex[style={minimum     size=1.0cm,draw=cv0,fill=cfv0,text=clv0,shape=circle},LabelOut=false,L=\\     hbox{$0$},x=3.6292cm,y=0.0cm]{v0}     \Vertex[style={minimum     size=1.0cm,draw=cv1,fill=cfv1,text=clv1,shape=circle},LabelOut=false,L=\\     hbox{$1$},x=5.0cm,y=5.0cm]{v1}     \Vertex[style={minimum     size=1.0cm,draw=cv2,fill=cfv2,text=clv2,shape=circle},LabelOut=false,L=\\     hbox{$2$},x=0.0cm,y=3.6915cm]{v2}     %     \Edge[lw=0.1cm,style={color=cv0v1,},](v0)(v1)     \Edge[lw=0.1cm,style={color=cv0v2,},](v0)(v2)     \Edge[lw=0.1cm,style={color=cv1v2,},](v1)(v2)     %     \end{tikzpicture}      but I must be missing some packages to import into TeXstudio because it doesn't recognize `\useasboundingbox`, or `\definecolor` or `\Vertex` or `\Edge` what packages must I use?


title: xstring macros inside foreach

text: I don't really understand what is the problem here, but I guess it has to do with expansion and fragile macros since when I do the same outside of `\path` it works. Code:               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{arrows,calc}     \usepackage{xstring}          \newcommand{\aw}{10pt}     \newcommand{\bbw}{20pt}     \newcommand{\cw}{30pt}          \newcommand{\width}[1]{%       \StrBefore{#1}{'}[\notprimed]       \IfEndWith{#1}{'}       { \csname \notprimed w\endcsname }       { \csname #1w\endcsname }     }          \begin{document}          \foreach \name in {a,bb,c,a'}     { ++(\width{\name},0pt) node {\name} };          \begin{tikzpicture}       % \draw (0pt,0pt) node {s}       %   ++(\aw,0pt) node {a}       %   ++(\bbw,0pt) node {bb}       %   ++(\cw,0pt) node {c}       %   ++(\aw,0pt) node {a'};            \draw (0pt,0pt) node {s}         \foreach \name in {a,bb,c,a'}         { ++(\width{\name},0pt) node {\name} };     \end{tikzpicture}               \end{document}      I think it has to do with `xstring` also because when I remove the `\StrBefore` and `\IfEndWith` from the definition of `\width` it also works. Any ideas?


title: Typesetting email address

text: I have found this answer by Will Robertson on how to typeset an email address:               \documentclass{article}     \usepackage{color,hyperref}          \catcode`\_=11\relax     \newcommand\email[1]{\_email #1\q_nil}     \def\_email#1@#2\q_nil{%       \href{mailto:#1@#2}{{\emailfont #1\emailampersat #2}}     }     \newcommand\emailfont{\sffamily}     \newcommand\emailampersat{{\color{red}\small@}}     catcode`\_=8\relax              \begin{document}     \email{foobar@gmail.com}     \end{document}      The problem is, however, that it doesn't work if there is an underscore in the address; how do I add this feature?


title: Using the beamer style Berlin

text: This package makes my beamer presentation go all blue with those dots at the top which tell you which section and subsection I am on, right? Thing is, when I make my presentation, compile it and then preview it, all the dots at the top aren't in a neat order. For example, in section 1, they go horizontally. The in section 2 they go vertically, and now in section 3, there is some going horizontally and then like 1 dot vertically and then a few more horizontally. How do I neaten this up?


title: \includegraphicx dynamic filename from \usekomavar

text: I am writing a letter with scrlttr2, which makes use of the KOMA script package. In an .lco file I have the following (which gives me a headache):               \setkomavar{signature}{\includegraphics[height=\useplength{signatureimageheight}]{\usekomavar{signatureimage}}\\     \usekomavar{fromname}}      The error I get is               ! Undefined control sequence.     \filename@simple ...#2\\}\fi \edef \filename@base                                                       {#1}     l.11 \closing{kthxbye,}      If I replace the `\usekomavar{signatureimage}` with `my-signature.pdf` everything is fine, but how can I make things dynamic? `\usekomavar{signatureimage}` produces `my-signature.pdf` **MWE** (actually: minimal error-producing example): letter.tex               \documentclass[a4paper]{scrlttr2}     \usepackage{graphicx}     \usepackage[dutch]{babel}     \begin{document}     \begin{letter}{Recipient\\     Address}     \LoadLetterOption{my-details}     \setkomavar{subject}{subject}     \opening{Hi,}     Lorem ipsum.     \closing{kthxbye,}      \end{letter}      \end{document}      my-details.lco:               \ProvidesFile{my-details.lco}[2013/08/16 lco (My Details)]     \LoadLetterOption{letter-p1}          \setkomavar{fromname}{Me Myself}     \setkomavar{fromaddress}{My Address}     \setkomavar{signatureimage}{my-signature.pdf}          \LoadLetterOption{letter-p2}      letter-p1.lco:               \ProvidesFile{letter-p2.lco}[2013/08/16 lco (letter-p2)]     \KOMAoptions{paper=a4,foldmarks=true,foldmarks=mvp,subject=titled}     \LoadLetterOption{DINmtext}          \newkomavar{signatureimage}     \setkomavar*{signatureimage}{filename of signaure image (including extension)}          \@newplength{signatureimageheight}     \@setplength{signatureimageheight}{\useplength{sigbeforevskip}}      letter-p2.lco **(This is where the dynamic file screws things up)** :               \ProvidesFile{letter-p2.lco}[2013/08/16 lco (letter-p2)]          \ifkomavarempty{signatureimage}{%true-code     }     {%false-code         \setkomavar{signature}{\includegraphics[height=\useplength{signatureimageheight}]{\usekomavar{signatureimage}}\\     \usekomavar{fromname}}         \@setplength{sigbeforevskip}{0cm}     }


title: Example figure placement

text: I am using the following code in an example file.               \documentclass{book}          \usepackage{graphicx}     \usepackage{lipsum}          \begin{document}     \lipsum[1]     \begin{figure}[h]     \includegraphics[width=\textwidth]{box}     \caption{I am a figure\label{fig:one}}     \end{figure}     \lipsum[2]     \end{document}      ![example rendering](http://i.stack.imgur.com/7Hwhk.png) This means that there has to be an image named 'box' in the same directory (e.g. box.pdf). Is there a way to avoid that? I was thinking about an example image that ships with TeX-Live anyway or some tikZ solution? Which would be the most portable way of defining such an example without the necessity of a second file?


title: How does 'filecontents' keep LaTeX parsing while temporarily stop writing output

text: We all know `filecontents.sty` can do               \documentcalss{article}          \usepackage{filecontents}          \begin{document}          Hello World          \begin{filecontents}{dummy.txt}     No one will read this if I don't use it elsewhere     \end{filecontents}          \end{document}      But since `filecontents.sty`'s code is pretty advanced chemistry, I do not get how it prevents the shipout of `No one will read this if I don't use it elsewhere`.


title: pdflatex, dvips: cannot determine size of graphic in ... (no Bound ingBox)

text: I know that there are threads related to this, but it is really painful... I would like to insert images saved from a tool into latex. The images could be saved in any format of the followings: PNG, JPEG, PDF, GIF, BMP. The choice is totally up to me. The problem is I tried               \usepackage{graphicx}     ...     \begin{figure}     \includegraphics{image.suffix}     \end{figure}      The compilation gives me an error `! LaTeX Error: Cannot determine size of graphic in image.suffix (no Bound ingBox).` Someone says it is due to `dvips`. I do have `dvips` in my `makefile`, but I don't know how to remove it; Someone says it is `pdflatex` which should be used, but I don't know how to modify `makefile` to do so.               EPS=    $(FGS:%=%.eps)     %.eps: %.tex $(MACROS)         latex $< && \         dvips -t letter -z -P pdf -o ${<:%.tex=%.ps} ${<:%.tex=%.dvi} && \         gs -q -dNOPAUSE -dBATCH -sDEVICE=bbox ${<:%.tex=%.ps} 2> ${<:%.tex=%.bb} && \         cat ${<:%.tex=%.ps} | perl -ne \          'if (/BoundingBox/) { open BB, "${<:%.tex=%.bb}" or die; print <BB>; close BB; } else { print; }' > $@          all: paper.pdf eps     regen: $(EPS)         make ALLDEPS=1          eps: $(EPS)     SRC=    fonts.tex \         paper.bib \         macros-paper.tex \         packages.tex     paper.pdf: paper.tex $(SRC) $(EPS)         latex paper.tex && \         bibtex --min-crossrefs=500 paper && \         latex paper.tex && \         latex paper.tex && \         dvips paper.dvi -o paper.ps && \         ps2pdf paper.ps paper.pdf      Could anyone help? **Update1:** Following the comment of @nickie , I modified `makefile` including all about `epstopdf`, the compilation still gave me an error: `! Package pdftex.def Error: File 'fg1-eps-converted-to.pdf' not found.` for the tex `\includegraphics[scale=1]{fg1}`, where `fg1.tex` is supposed to generate a figure by `pspicture`. Does anyone have any idea?


title: How do I configure the paths for TexLive2011 to work on my system with TexWorks 0.5?

text: How do I configure the paths for TexLive2011 to work on my system with TexWorks2011? System: Deb 6 64 bit. Currently               peter@peter-deb:~$ sudo tlmgr --gui     sudo: tlmgr: command not found     peter@peter-deb:~$ sudo tlmgr update --all     sudo: tlmgr: command not found      ![enter image description here](http://i.stack.imgur.com/BL3Qg.png) I tried               export PATH=$PATH:/home/peter/texlive/2011/bin but that didn't work. Note: I asked this question 3 months ago but this is a fresh Deb 6 install and is 64 bit not 32 bit now, so the question is coming at it from a different angle. It would be too confusing to resume the existing thread. I tried editing .profile in home so please check this for me:               # ~/.profile: executed by the command interpreter for login shells.     # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login     # exists.     # see /usr/share/doc/bash/examples/startup-files for examples.     # the files are located in the bash-doc package.          # the default umask is set in /etc/profile; for setting the umask     # for ssh logins, install and configure the libpam-umask package.     #umask 022          # if running bash     if [ -n "$BASH_VERSION" ]; then         # include .bashrc if it exists         if [ -f "$HOME/.bashrc" ]; then         . "$HOME/.bashrc"         fi     fi          # set PATH so it includes user's private bin if it exists     if [ -d "$HOME/bin" ] ; then         PATH="$HOME/bin:$PATH"     fi          PATH=/home/peter/texlive/2011/bin/x86_64-linux:$PATH; export PATH     MANPATH=/home/peter/texlive/2011/doc/man:$MANPATH; export MANPATH     INFOPATH=/home/peter/texlive/2011/doc/info:$INFOPATH; export INFOPATH @DJP ![enter image description here](http://i.stack.imgur.com/24ZQn.png) @DJP Latex-mk appears to be installed properly yet it does not appear in TexWorks processing tools...                 peter@peter-deb:~$ latex -v        pdfTeX 3.1415926-2.3-1.40.12 (TeX Live 2011)        kpathsea version 6.0.1        Copyright 2011 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).        There is NO warranty.  Redistribution of this software is        covered by the terms of both the pdfTeX copyright and        the Lesser GNU General Public License.        For more information about these matters, see the file        named COPYING and the pdfTeX source.        Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).        Compiled with libpng 1.5.2; using libpng 1.5.2        Compiled with zlib 1.2.5; using zlib 1.2.5        Compiled with xpdf version 3.02pl5


title: How to make this rectangle a node (TikZ)?

text: I have drawn a rectangle with a fixed position:               \[\begin{tikzpicture}     \draw[thick] (3,1) rectangle (5,3);       \end{tikzpicture}\]      I would like to make it a `node` with a name (for instance `rec`), so that other elements later could be positioned with regards to it, for instance:               \node (elli) [ellipse, below=1cm of rec] {...};      Does anyone know how to make the rectangle above a node?


title: latexmk not accompanying TexWorks 0.5?

text: I seem to remember latexmk should be included since ver 0.4 TexWorks. I have ver 0.5 r.930 Debian installed on Deb 6 64 bit. Also I have Texworks 2011 installed in my home folder. So why doesn't latexmk appear on the list of typesetting options and how do I get it to? I prefer to avoid manually setting it up in preferences. I want it prepackaged. ![enter image description here](http://i.stack.imgur.com/bEUYE.png)


title: Scale tikzpicture to the remaining height of a beamer frame

text: Often in a `frame` (of `beamer`), I have some texts on the top and a resized `tikzpicture` on the bottom:               \begin{frame}     \frametitle{...}     some texts     ...     some texts     \[\resizebox{!}{???}{     \begin{tikzpicture}     ...     \end{tikzpicture}     }\]     \end{frame}      I am wondering how to determine the `???` part, to make the `tikzpicture` occupy the remaining part of the `frame`, so that the total _height_ of picture plus text occupies the whole `frame`. Does anyone know how to do that?


title: could not start the command or log file not found

text: ![compiling error](http://i.stack.imgur.com/QjRUq.png) I get the error `could not start the command` when compiling with Quickstart and I get `log file not found` when compiling with PDFLaTeX. Can any one help me with this issue? Please, see the screen shot.


title: Subsection language problem

text: I work with LaTeX on Windows XP (MiKTeX 2.8, LEd 0.53) and I use Polish fonts that has several unusual letters like "ą, ż, ć" etc. I work in `book` mode and the problem is that I don't get Polish letters in subsections titles. Everything is fine in normal text, chapters titles and sections titles but it doesn't work with subsections. ;/ Does anybody know how to solve this problem? the example:               \section{Piękny dzień}      %%% result: 2.1 Piękny dzień <\---- it's OK               \subsection{Piękny dzień}      %%% result: 2.1.1 Pikny dzie <\---- it's not OK, the special characters disappeared


title: How to let an overlayarea appear in the beamer mode?

text: I basically have the following code for one frame               \subsection{}     \begin{frame}{VERY INTELLIGENT FRAME TITLE}     \begin{columns}     \begin{column}{.5\textwidth}     \centering     \includegraphics<1->[scale=.23]{PICTURE1.PDF}     \begin{center}     \tiny{\quad\qquad\text{VERY FAMOUS PAPER}}     \end{center}     \end{column}     \begin{column}{.5\textwidth}     \centering     \includegraphics<2->[scale=.23]{PICTURE2.PDF}     \end{column}     \end{columns}     \begin{overlayarea}{\linewidth}{.5cm}     \small     \begin{align} \nonumber      *EQUATION*     \end{align}     \end{overlayarea}     \end{frame}      So I would like to let the equation appear with the second picture. I tried inserting "<2->" in several places, but nothing seems to work. Is there any smart solution?


title: How to compile a tex file so that some portion can be optionally not compiled?

text: In C, we can write something for some part of the code, and give `gcc` some option for whether we would like to compile that part of code. It saves us from modifying the C code. In LaTex, is there a similar way for pdflatex? Thanks.


title: Includepdf causes an error message from pgfplots externalization

text: I have a file `test.pdf` which I include in a document containing also an externalized pgfplots picture. When I compile the following code, I get the error message `Sorry, the system call pdflatex ... did NOT result in a usable file`. In order to make my code work, I first need to remove the `includepdf` statement, compile (to create the externalized figures) and then compile again with the `includepdf` statement. I suppose that it is a bug, or is there any possibility to solve it ? Of course, the file `test.pdf` is totally independent from the externalized pictures from pgfplots.               \documentclass{scrbook}           \usepackage{pgfplots}      \pgfplotsset{compat=1.8}      \usepgfplotslibrary[external]      \tikzexternalize[shell escape=-enable-write18]      \usepackage{pdfpages}           \begin{document}     \includepdf{report_test-figure44}           \begin{tikzpicture}      \begin{axis}[      xlabel=Cost,     ylabel=Error]      \addplot[color=red,mark=x] coordinates {      (2,-2.8559703)     (3,-3.5301677)     };     \end{axis}      \end{tikzpicture}           \end{document}


title: Coons patches in pgfplots

text: The current method of drawing Coons patches in `pgfplots` requires four cubic Bézier curves along with point meta values for each corner point. This closely follows the format used in the PDF specification. I am currently creating a large shaded area and have noticed that each surface is created separately, each time using edge flag `f = 0`. I feel this method fails to exploit the reuse of previous Bézier curves provided by the PDF specification. Looking at the `pgfplots` surface shading library, I noticed there is a `\pgfplotslibrarysurf@edgeflag` option under `\pgfplotslibrarysurf@type=6`. While I realise that Coons patches are intended primarily for internal use, I was hoping there was a way to define the edge flag when specifying the coordinates of a Coons patch. Alternatively, is there a better approach for including Coons patches in a pdfLaTeX document? The interface provided by `pgfplots` already allows me to obtain the correct visible result, but for several large plots, produces rather large files. Using the edge flags would reduce the number of coordinates for each surface from 24 to 16 (at 3 bytes each) and the colour data from 4 to 2 (at 2 bytes each), reducing the size of each patch from 81 to 53. I'm not sure how difficult this would be to implement, but as it already seems so close and there is the potential to significantly reduce the complexity of the plots, it seemed a worthy question.


title: Description item label as part of a sentence

text: Are description lists appropriate for definitions where the item label is part of a sentence?               \begin{description}     \item[Apples] are members of the Rosaceae family.     \item[Pineapples] are the only economically important Bromeliad fruit.     \item[Bananas] are delicious.     \item[Blending] of the above fruits into smoothies is possible.     \end{description}      Is it more appropriate to have inter-word spaces between item labels and the rest of the sentence?


title: TeXnicCenter and WinEdt not working but Texmaker working fine?

text: I am able to generate pdf output of my report in Texmaker without any error but both TeXnicCenter and WinEdt(7 & 8) are unable to produce output of the same file. Personally I prefer WinEdt 8. Can someone help me? Thanks in advance for your help... I am using MiKTeX 2.9 in windows 7 machine. Following are the error I received in WinEdt 8               Command Line:   bibtex.exe "delete"     Startup Folder: C:\Users\kites\Desktop               Error Launching Console Application BibTeX ...     Command Line:   bibtex.exe "delete"     Startup Folder: C:\Users\kites\Desktop          Access is denied.               Command Line:   texify.exe --pdf --tex-option=--interaction=errorstopmode --tex-option=--synctex=-1 "C:\Users\kites\Desktop\delete.tex"     Startup Folder: C:\Users\kites\Desktop               Error Launching Console Application PDFTeXify ...     Command Line:   texify.exe --pdf --tex-option=--interaction=errorstopmode --tex-option=--synctex=-1 "C:\Users\kites\Desktop\delete.tex"     Startup Folder: C:\Users\kites\Desktop          Access is denied.


title: Special font used in crypto-related papers

text: Does anyone know what kind of typeface font is used to producer the text "setup", "master-key", and "params" in the following paper: ![enter image description here](http://i.stack.imgur.com/eXntR.png)


title: Authors with same affiliations on title page

text: I want to achieve the exact same title page layout as the paper shown here. For those that do not want to download the paper, the image of the title page is shown below: ![enter image description here](http://i.stack.imgur.com/X0aai.jpg) The super-scripts indicating the authors doesn't have to be as shown in the example title page (e.g, a, b and c), other symbols are fine. I am using the `authblk` package and know the general syntax such as:               \title{title of paper}     \author[1]{author 1\thanks{details that goes into the footnote}}     \author[1]{author 2\thanks{details that goes into the footnote}}     \author[2]{author 3\thanks{details that goes into the footnote}}     \affil[1]{university 1}     \affil[2]{university 2}     \renewcommand\Authands{ and }     \maketitle          \begin{abstract}     abstract goes here     \end{abstract}      But I am not sure how to achieve the example title page shown. Any help would be appreciated!


title: How to write inside an ellipse in TikZ?

text: I have drawn an ellipse:               \node (elli) [ellipse, minimum height=3cm,minimum width=2cm, draw] {};      I would like to write some elements in it as the figure below shows. The position of the elements do not need to be precise, but I want them to be inside the ellipse. Does anyone know how to do it? ![enter image description here](http://i.stack.imgur.com/OqceS.png)


title: Adding Confidence Intervals in Pgfplots

text: I am using pgfplots to generate the following MWE:               \documentclass{article}          \usepackage{tikz}     \usepackage{pgfplots}     \begin{document}          \begin{tikzpicture}         \begin{axis}[             xlabel=$x$,             ylabel=$y$]         \addplot[smooth,mark=*,blue] plot coordinates {             (0,2)             (2,3)             (3,1)         };         \addlegendentry{Case 1}              \addplot[smooth,color=red,mark=x]             plot coordinates {                 (0,0)                 (1,1)                 (2,1)                 (3,2)             };         \addlegendentry{Case 2}         \end{axis}         \end{tikzpicture}      ![enter image description here](http://i.stack.imgur.com/x4zri.jpg) Does anyone know how it is possible to add confidence intervals to each of the plotted points? Cheers, Mil


title: PGFplots: no mark is showing up

text: I have standard deviation bars but there is no symbol mark. How can I get one to appear? I took the statistical code from TikZ: How to pass a specific table to \pgfplotstableset if used for tikzpicture               \documentclass[tikz]{standalone}          \usepackage{pgfplots}     \usepackage{pgfplotstable}     \usepackage{filecontents}     \pgfplotsset{compat = 1.10}          %% Code chunk for statistics starts here...     \newcommand{\calcrowmean}{       \def\rowmean{0}       \pgfmathparse{\pgfkeysvalueof{/pgfplots/table/summary statistics/end index}-\pgfkeysvalueof{/pgfplots/table/summary statistics/start index}+1}       \edef\numberofcols{\pgfmathresult}       % ... loop over all columns, summing up the elements       \pgfplotsforeachungrouped \col in {\pgfkeysvalueof{/pgfplots/table/summary statistics/start index},...,\pgfkeysvalueof{/pgfplots/table/summary statistics/end index}}{         \pgfmathparse{\rowmean+\thisrowno{\col}/\numberofcols}         \edef\rowmean{\pgfmathresult}       }     }     \newcommand{\calcstddev}{       \def\rowstddev{0}       \calcrowmean       \pgfplotsforeachungrouped \col in {\pgfkeysvalueof{/pgfplots/table/summary statistics/start index},...,\pgfkeysvalueof{/pgfplots/table/summary statistics/end index}}{         \pgfmathparse{\rowstddev+(\thisrowno{\col}-\rowmean)^2/(\numberofcols-1)}         \edef\rowstddev{\pgfmathresult}       }       \pgfmathparse{sqrt(\rowstddev)}     }          \pgfplotstableset{       mystat/.style = {         summary statistics/start index/.initial=1,         summary statistics/end index/.initial=3,         create col/mean/.style={           /pgfplots/table/create col/assign/.code={% In each row ...              \calcrowmean             \pgfkeyslet{/pgfplots/table/create col/next content}\rowmean           }         },         create col/standard deviation/.style={           /pgfplots/table/create col/assign/.code={% In each row ...              \calcstddev             \pgfkeyslet{/pgfplots/table/create col/next content}\pgfmathresult           }         }       }     }     %% ...code chunk for statistics ends here          \begin{document}          \begin{filecontents*}{inhibdata.txt}       x rep1 rep2 rep3 rep4 rep5 rep6 rep7 rep8       -6.60206 0.4707758 0.471134 0.464 0.4738401 0.4835494 0.4763314 0.4777448 0.4634806       -6.60206 0.2826772 0.2869296 0.2830769 0.2863636 0.2739131 0.2830051 0.2679083 0.263196     \end{filecontents*}          \pgfplotstableset{       mystat,       create on use/mean/.style={create col/mean},       create on use/stddev/.style={create col/standard deviation}     }          \begin{tikzpicture}       \begin{axis}[         align = center,         xmin = -8.6,         xmax = -5,         ymin = 0.15,         ymax = 0.65,         xtick = {-8, -7, ..., -5}         ]         \addplot[only marks, mark = circle, red, error bars/.cd, y dir = both,         y explicit] table[x = x, y = mean, y error = stddev]{inhibdata.txt};         \legend{$Z' = 0.757$};        \end{axis}     \end{tikzpicture}     \end{document}      I believe since the sd bars are so small `pgfplots` wont put in a symbol.


title: Fill in the blank: text wrapping & math mode

text: I am making notes with blanks to fill in and would like to produce an instructor version with blanks filled in and a student version with blanks unfilled. I would like a `\fillin{ . . . }` command that wraps text and allows math. The solution from Create fill-in-the-blank version of a document with ability to toggle blanks on and off works well for wrapping text, but `censor` does not allow math (or other font switching):               \documentclass{article}     \usepackage{censor}     \censorruledepth=-.2ex     \censorruleheight=.1ex          \begin{document}          \xblackout{this works fine this works fine this works fine this works fine this works fine this works fine this works fine this works fine this works fine this works fine }          \xblackout{this does not work $a+b$ this does not work $a+b$ this does not work $a+b$ this does not work $a+b$ this does not work $a+b$ this does not work $a+b$ this does not work $a+b$ this does not work $a+b$ this does not work $a+b$}          \end{document}      One idea I tried was to use `ulem`'s `uline`, but color text white for the student version. This works for math mode, but text-wrapping fails:               \documentclass{article}     \usepackage{ulem,xcolor}     \newcommand{\fillin}[1]{\uline{\textcolor{white}{#1}}}          \begin{document}          \fillin{This allows math mode $a+b=c$, but the text-wrapping is broken This allows math mode $a+b=c$, but the text-wrapping is broken This allows math mode $a+b=c$, but the text-wrapping is broken}          \end{document}


title: Emptypage not working with \balance?

text: When I use `emptypage` together with `\balance`, it seems to fail to work. Emptypage should clear headings on page 4 of the example. Emptypage works fine with the example code, without `\balance`. How do I get it working correctly? Simple example:               \documentclass[twocolumn]{book}     \usepackage{lipsum}     \usepackage{balance}     \usepackage{emptypage}     \begin{document}     \balance     \chapter{Chapter 1}     \lipsum     \lipsum     \chapter{Chapter 2}     \lipsum     \end{document}      Result: ![emptypage fails to clear headings](http://i.stack.imgur.com/NiUfx.png)


title: How to make or add options for packages or functions

text: I'm using at this moment the Piano Package. This Package is a little limited so I want to change a few things. The standard color of the dots is orange. I want to change this in different situations. But I don't want to edit the `sty` file every time. I want to change the options prefered in               \keyboard[color = … ]…      or               \usepackage[color = … ]{piano}      How can I change this? The first option is my prefered option but the standard code is "`\keyboard[Dso][Fso][Aso][Dst]`" So i hav to change this to `\keyboard{Dso}{Fso}{Aso}{Dst}` and I don't know if this is possible… can anybody help me? Thanks


title: Two dotted division symbol

text: I'm making a report about progression in another language. Is there any way to make two dotted (both up and low) ÷ symbol? I have searched in many things and i can't find it.


title: How to draw a double continous arrowhead [tikz]

text: I want to draw lines with double arrowheads which continously following each other (e.g. torque in mechanics) Now I draw two following lines which complete each other like               \draw[] (0,0) edge[-triangle 45] (0.8,0) edge[-triangle 45] (1,0);      ![enter image description here](http://i.stack.imgur.com/mTigW.png) Is there an easier way to do this? AFAIK there are no default double axial arrowheads in tikz. So I want to avoid to adjust coordinates of both lines to make arrowheads continous.


title: TikZ: Label nodes on to path

text: I use the `to` syntax to set a node in the horizontal middle between to other nodes. My problem is, that a label does not fit well at this middle node. Compare the label of node 2 and node 3 in the picture: ![enter image description here](http://i.stack.imgur.com/MBmei.png) Here is the corresponding mwe:               \documentclass[border=2pt]{standalone}      \usepackage{tikz}          \usetikzlibrary{positioning}          \begin{document}     \begin{tikzpicture}         \tikzset{myRec/.style = {draw, rectangle, minimum height=5mm, minimum width=5mm}}              \node (nd1) [myRec] {1};         \node (nd2) [myRec, below right=of nd1, label=above:x] {2};              \path (nd2) to node (nd3) [myRec, label=above:x] {3} (nd2 -| nd1);     \end{tikzpicture}     \end{document}      I use the label, because I created an own shape which needs to be on the horizontal position of node 2.