title: Using Iwona as a math font with lualatex

text: I would like to use Iwona as a math font, but this setup doesn't get all math symbols right. (Multiline bracket, the sum symbol, etc.)               \setmathfont{Iwona}     \setmathfont[range=\mathup]  {Iwona}     \setmathfont[range=\mathbfup]{Iwona Bold}     \setmathfont[range=\mathbfit]{Iwona Bold Italic}     \setmathfont[range=\mathit]  {Iwona Italic}      I guess that Iwona doesn't have all the math symbols that are necessary, so what should I do? (But at this link, http://www.tug.dk/FontCatalogue/iwona/, I notice that the math symbols are available). I am a bit puzzled. Edit my preamble               documentclass[12pt,a4paper,twoside,openright,oneside,openany,titlepage,frontespizio,headinclude,,footinclude,BCOR5mm,cleardoublepage=empty,tablecaptionabove,]{scrreprt}          \usepackage{fontspec}     \PassOptionsToPackage{protrusion=true,final}{microtype}     \newfontfeature{Microtype}{protrusion=default;expansion=default;}     \usepackage{polyglossia}     \usepackage{subfig}     \usepackage[eulerchapternumbers,subfig,pdfspacing,listings]{classicthesis}          \usepackage{arsclassica}     \usepackage{amsmath,amssymb,amsthm}     \usepackage{unicode-math}     \usepackage[math]{iwona}     \setmainfont[Microtype,Ligatures=TeX]{Minion Pro}     \setsansfont{Iwona}     \setmathfont{Iwona} %     \setmathfont[range=\mathup]  {Iwona}     \setmathfont[range=\mathbfup]{Iwona Bold}     \setmathfont[range=\mathbfit]{Iwona Bold Italic}     \setmathfont[range=\mathit]  {Iwona Italic}


title: Bib entry making maths letters lower case

text: This question is about the reference format making letters inside maths `$ $` into lower case. As they are in standard format I want them to be uppercase. MWE:               \RequirePackage{fix-cm}               \documentclass[natbib,fleqn,smallextended]{svjour3}          \begin{filecontents}{sw_ref.bib}     @article{daon,       title={ $\delta^{18}O$ and $\delta^{13}C$: },       author={D},       journal={Ers},       volume={54},       number={3},       pages={545},       year={2005},       publisher={El}     }     @article{cow,       title={$\delta^{13}C$  measurements},       author={Coichael},       journal={A},       volume={48},       number={7},       pages={5781},       year={2256},       publisher={ACtions}     }     \end{filecontents}      %          %     \smartqed  % flush right qed marks, e.g. at end of proof     %     \usepackage[version=3]{mhchem} % for upright CO2     \usepackage{graphicx}     \usepackage{floatrow}     %     %setting spacing     \usepackage{setspace}     \doublespacing     %\singlespacing     %\onehalfspacing     %For other sizes use the \setstretch command like this:     %\setstretch{1.8}          \raggedbottom          %line Numbers     \usepackage{lineno}     \linenumbers*[1]     %to set numbering format     \usepackage{enumerate}     %Maths     \usepackage{amsmath}     %for deg     \usepackage{gensymb}     %for permil     \usepackage{wasysym}     % for rotating floats     \usepackage{lscape}     %for subfigures and tables     \usepackage[font=small,labelfont=bf]{caption}     \usepackage[font=footnotesize]{subfig}     %made commands     \newcommand{\mytilde}{\raise.17ex\hbox{$\scriptstyle\mathtt{\sim}$}} %around tilde     %% Insert the name of "your journal" with          %     \begin{document}          \title{Det}     %\subtitle{}          \titlerunning{Sou}        % if too long for running head          \author{Tor}          \authorrunning{et al} % if too long for running head          \institute{Tror \at      d \\     }          % \date{Received: date / Accepted: date}     % The correct dates will be entered by the editor          \maketitle          \begin{abstract}          \keywords{}          \end{abstract}          $\delta^{18}O$ and $\delta^{13}C$     \citep{cow}     \citep{daon}          \bibliographystyle{spbasic}     \bibliography{sw_ref}          \end{document}       The output (the stuff at the two ends of the red arrows should look the same): ![enter image description here](http://i.stack.imgur.com/fAh2i.jpg)


title: How do I add the URL to a phjcp/similar bibliography style?

text: I like the phjcp style. [Authors][Journal][Volume in bold][First Page][(Year)]. I would also like to include the URL of the paper by the end. I haven't figured out how to do this. I have loaded the hyperref package, cite package and the url packages. My bib file was created with Mendeley 1.9.2 (Mac) and I am using Texmaker 4.0.2 (Mac) and Working with MacOSX 10.7.5. A typical reference on my bibfile looks like this, although not all of my entries have a               @article{Narayanan2010,     author = {Narayanan, H and Verner, S N and Mills, K L and Remkemer, R and Garikipati, K},     doi = {10.1088/0953-8984/22/19/194122},     file = {:Users/Lorean/Dropbox/Journal Articles/J. Phys. Condens. Matter/Narayanan et al.. 2010.pdf:pdf},     issn = {0953-8984},     journal = {J. Phys.: Condens. Matter},     month = may,     number = {19},     pages = {194122},     title = {{In silico estimates of the free energy rates in growing tumor spheroids}},     url = {http://stacks.iop.org/0953-8984/22/i=19/a=194122?key=crossref.6feb263aa96b7af8953f1a389eebd6fe},     volume = {22},     year = {2010}     }      My bibliography looks like this:               \bibliographystyle{phjcp}     \bibliography{library}      > [74] A. Noy, D. V. Vezenov, and C. M. Lieber, Annu. Rev. Mater. Sci. 27, 381 > (1997). Does anyone know how to add the URL in the end of the reference, so that I can use that as a hyperlink to open the article?. If it is not possible with this bibliography style, would there be a similar one?


title: Specific image layout

text: I can combine graphics with the following:               \begin{figure*}[ht]     \begin{center}$     \begin{array}{ccc}     \includegraphics{Figures/fig1.pdf}\\     \includegraphics{Figures/fig2.pdf}\\     \includegraphics{Figures/fig3.pdf}     \end{array}$     \end{center}     \end{figure*}      This combines the graphics specified into one figure where one graphic is placed under the other (which extend over both columns in the document). However, what I am trying to do is to have the first graphic to cover most of the page, and then have the second and third graphic on the same row but in different columns beneath it. So, say if I had a matrix with 2 rows and 2 columns then the first graphic would be in the first row but extending over both columns and the second and third graphic would be in the second row, second and third column respectively. How can this be achieved?


title: Where is mp.exe in MikTeX 2.9?

text: I am a a retired software engineer and a newbie on this site. Please execuse me for the naiveness in my question. I am using Windows, XP and Vista. Other OS's are not affordable to me for now. I used to have MikTeX 2.8 and was using the packages it came with it to draw automata. The way I used to do, was, write a `.mp` file and use `mp.exe` to preprocess it to create a graphics file and then TeXnicCenter would take it when I `\usepackage{graphics}`. I have a bunch of `.tex` files in this way. Recently, I had to uninstall MikTeX 2.8 and replace it with MikTeX 2.9. Everything was okay when I tried it with `.tex` files without any graphics. When I tried to do with those with automata state diagrams, I found out `mp.exe` is missing from MikTeX 2.9. I have two options,   1. I still have the original protext.exe for MikTeX 2.8 so I can back out MikTeX 2.9 and re-install 2.8.   2. Use TikZ to draw automata state diagrams. I personally prefer option 1. However, option 2 seems to be the best, from all I have read on this site. But, option 2 means that I have to spend some time and efforts to learn TikZ. So, I need to know, how bad is option 1? Or, do I have option 3, that is, something compatible with `mp.exe` in 2.9?


title: Doing \def+asdf+{\texttt{#1}} where + can be set with a macro

text: This is a follow-on from my previous question. In my previous question I learned how to set (say) `+` as a 'special character' such that I can type `+asdf+` in my document and have it expand to `\texttt{asdf}`:               \documentclass{article}          \catcode`+=\active     \def+#1+{\texttt{#1}}          \begin{document}     +asdf+ % does \texttt{asdf}     \end{document}      I'm now interested in defining a command `\DefineShortTexttt{\+}` that will set `+` to be the magic character. This is like `\DefineShortVerb` in the `fancyvrb` package or `\MakeShortVerb` in the `shortvrb` package. **In essence, I want a`\DefineShortTexttt{SYMBOL}` that does `\defSYMBOL#1SYMBOL{\texttt{#1}}`.** I've just learned about the `\lccode`~=`#1\lowercase{....}` trick, and so I've got something working like so:               \documentclass{article}     \usepackage{xparse}          % make a command \ttt+asdf+ that does \texttt{asdf}, like \verb++ construct.     \NewDocumentCommand\ttt{v}{\texttt{#1}}          % make a command \DefineShortTexttt{<c>} such that <c>sometext<c     % is like typing \ttt<c>sometext<c>     \def\DefineShortTexttt#1{%         \begingroup%           \lccode`~=`#1%           \lowercase{%           \gdef~{\ttt~}           }%         \endgroup%         \catcode`#1=\active%     }     \begin{document}     \DefineShortTexttt{\|}      |asdf| % yay, it works!     \end{document}      Now, I just about understand how this works: I let `~` be whatever `#1` is and basically define `[DELIMITER]` to mean `\ttt[DELIMITER]`. So when tex encounters `[DELIMITER]sometext[DELIMITER]` it turns the first one into `\ttt[DELIMITER]`, which will then look like `\ttt[DELIMITER]sometex[DELIMITER]`. Nifty! But notice how I have to use the `\ttt` form in the definition of `\DefineShortTexttt`? Is there any way I can just use `\texttt{}` instead? I've tried a variation where I change the `\gdef~{\ttt~}` to                 \gdef~#1~{\texttt{#1}} % Use of [DELIMITER] doesn't match its definition      I thought this might work because I basically want to write `\gdef~#1~{\texttt{#1}}`, where `~` contains the current delimiter, but it complains about my usage of the delimiter not matching its definition. I think I may need to look at `\expandafter` (???) but can't seem to make it work - could I get any pointers please? (P.S. - I know this all seems a bit trivial - `\ttt+asdf+` is not that hard to write, and making the shorthand version could cause other problems, but this has been very useful in helping me learn some more advanced tex! Also, if I can get `\DefineShortTexttt` working I'll move onto `\UndefineShortTexttt` afterwards, but I'd like to have a good crack at that before asking a question about it. I've been mainly guided by the source for the `shortvrb` package so far).


title: Table: rule spanning two side-by-side tables

text: I have a little problem for which I desperately need help. Basically I want to span a `midrule` (or any other type of rule) over two vertically aligned side- by-side tables. As in the MWE below, I could just put the `midrule` outside the `tabularx` environment and get the result I want. However, doing so produces a `misplaced \noalign` error.               \documentclass[12pt]{article}     \usepackage{array,tabularx}     \usepackage{booktabs}          \begin{document}          \begin{table}[h]     \centering     \midrule\midrule         \begin{tabularx}{.49\textwidth}[t]{Xr}         header 1 & header 2\\ \midrule         row 1    & row 1\\         \end{tabularx}%     \hfill         \begin{tabularx}{.49\textwidth}[t]{Xr}         header 1 & header 2\\ \midrule         row 1    & row 1\\         row 2    & row 2\\         \end{tabularx}     \midrule\midrule     \end{table}          \end{document}      Any suggestions on how to solve this properly would be highly appreciated! Thank you.


title: Pictures not inserting

text: I am trying to insert a picture using `\usepackage[pdftex]{graphicx}`. I have that in my preamble, and then I'm attempting to insert a picture on a title page. I use the `\includegraphics` command. I have the picture saved as a PNG in the file the `.tex` file is saved in. however, when I try to compile, LaTeX returns a `\includegraphics is not a valid control sequence` error. I opened a new file and just included the same image, and the image was created. So why can I not include the picture inside a title page? Below is my full code.               \documentclass[12pt,a4paper]{book}     \usepackage[latin1]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage[pdftex]{graphicx}     \newcommand{\HRule}{\rule{\linewidth}{0.5mm}}     \begin{document}      \begin{titlepage}     \begin{center}          % Upper part of the page. The '~' is needed because \\     % only works if a paragraph has started.          % Title     \HRule \\[0.4cm]     { \huge \bfseries Brian and Sara's Cookbook}\\[0.4cm]          \HRule \\[1.5cm]          % Author and supervisor     \begin{minipage}{0.4\textwidth}     \begin{flushleft} \large     \emph{Author:}\\     Brian \textsc{Maleck}     \end{flushleft}     \end{minipage}     \begin{minipage}{0.4\textwidth}     \begin{flushright} \large     \emph{Author:} \\     Sara \textsc{Comer}     \end{flushright}     \end{minipage}     \includegraphics{cover.png}     \vfill     % Bottom of the page     {\large \today}     \end{center}     \end{titlepage}          \end{document}


title: Drawing electrical diagram using circuitikz

text: I looked at the documentation and examples on CTAN, but `circuitikz` is hard to get the hang of. I am trying to create ![wanted](http://i.stack.imgur.com/T9PHD.png) Here is what I have so far:               \documentclass{convert = false]{standalone}     \usepackage{circuitikz}     \begin{document}     \begin{circuitikz}       \draw (-.5, 0) to[L, l = L] (1.4, 0)                to[R, l = R] (5, 0);     \end{circuitikz}     \end{document}      but the spacing is weird, and I can't seem to figure out how to set it up.


title: URLs with many special characters defined using \urldef

text: I am attempting to use an `\urldef` defined URL to print as a clickable link. But it's resulting in an error. So far I have this:               \documentclass{article}     \usepackage{hyperref}      \usepackage{url}     \urlstyle{sf}         \urldef{\myurl}\url{http://wam.org.ae/servlet/Satellite?c=WamLocAnewscid=1289997634568&p=1135099400289&pagename=WAM%2FWamLocAnews%2FW-T-LAN-FullNews}     \begin{document}     \myurl     \end{document}      The last lines of the error read               ! Undefined control sequence.     \hyper@linkurl ...n/S/URI/URI(#2)>>}\Hy@colorlink                                                    {\@urlcolor }#1\close@pdfl...     l.5 ...ename=WAM%2FWamLocAnews%2FW-T-LAN-FullNews}      If anyone can give me some pointers or examples on how I can get it to work, that would be great. \---EDIT---- I understand @egreg's answer should work after I update my TeX installation. ... (later) ... It did solve it. So if you get the error reported above, you probably have a very old version that needs updating.


title: Increasing the size of a minipage proportional to the contain

text: I am trying to create a simple environment. The enviroment contains a minipage that is surrounded but a dashed box.               \NewEnviron{Notes}{       \par       \begin{tikzpicture}         \node[rectangle,minimum width=0.95\textwidth] (m) {           \begin{minipage} {0.75\textwidth}                  \color{red}\BODY           \end{minipage}         };         \draw[dashed] (m.south west) rectangle (m.north east);       \end{tikzpicture}\\     }      Essentially, I would like to increase the size of the box proportional to its contain. So, something like: `\vspace{0.2*\BODYHeight}` What's the best way of doing this?


title: Beamer - Weird bug in bibliography

text: I am putting bibliography in my last frame. It seems that the command               \beamerdefaultoverlayspecification{<+->}      makes the article symbols look like book. You can see this by remarking this command in the following code:               \documentclass{beamer}          \usecolortheme{crane}          \beamerdefaultoverlayspecification{<+->}          \begin{document}         \begin{frame}{For Further Reading}            \begin{thebibliography}{10}            \beamertemplatebookbibitems            \bibitem{Author1990}         A.~Author.         \newblock {\em Handbook of Everything}.         \newblock Some Press, 1990.            \beamertemplatearticlebibitems            \bibitem{Someone2000}         S.~Someone.         \newblock On this and that.         \newblock {\em Journal of This and That}, 2(1):50--100,         2000.       \end{thebibliography}     \end{frame}     \end{document}      Just for curiosity I would like to know how to overcome this bug. However, I would actually like to show all bibliography items at once and not gradually in my presentation, which might resolve the problem. So my question is - how do I cancel the effect of `\beamerdefaultoverlayspecification{<+->}` for one specific frame?


title: Animated arrows

text: I would like to animate red arrows, some one would help me? thank you.               \documentclass{beamer}      \usepackage{graphics}               \usepackage[T1]{fontenc}     \usepackage[ansinew]{inputenc}     \usepackage{lmodern}     \usepackage{pgf}     \usepackage{amsfonts}     \usepackage{eurosym}     \usepackage{graphicx}          \usepackage{amsmath}          \usepackage{tikz}          \texhash     \usepackage{mathrsfs}     \begin{document}                    \begin{tikzpicture}     \node[draw,very thick](1) at (0,0){A};     \node[draw,very thick](2) at (5,2){B};     \node[draw,very thick](3) at (3,-2){C};     \node[draw,very thick](6) at (7,-2){D};     \node[draw,very thick](7) at (10,0){E };     \node[draw,very thick](8) at (0,-4){F};     \node[draw,very thick](9) at (3,-4){G};     \node[draw,very thick](10) at (7,-4){H};     \node[draw,very thick](11) at (10,-4){I};     \draw[->] [>=stealth,red,very thick](1) to (2);     \draw[->] [>=stealth,red,very thick](1) to (3);     \draw[->] [>=stealth,red,very thick](2) to (7);     \draw[->] [>=stealth,very thick](6) to (7);     \draw[->] [>=stealth,very thick](3) to (6);     \draw[->] [>=stealth,very thick](3) to (6);     \draw[->] [>=stealth,very thick](8) to (9);     \draw[->] [>=stealth,very thick](9) to (3);     \draw[->] [>=stealth,very thick](9) to (10);     \draw[->] [>=stealth,very thick](10) to (11);     \draw[->] [>=stealth,very thick](11) to (7);     \draw[->] [>=stealth,red,very thick](2) to (6);     \draw[->] [>=stealth,very thick](10) to (6);     \draw[->] [>=stealth,very thick](3) to (11);     \end{tikzpicture}     \end{frame}     \end{document}


title: Exponent notation in siunitx

text: I would like to use numbers in `siunitx` where the main number and uncertainty have exponents like:               \num{1.1e-2\pm0.1e-2}      However this gives a Misplaced sign token error and I have to first find a common exponent for both quantities and write the exponent in the end:               \num{1.1\pm0.1e-2}      This gives the expected output of 1.1(1) x 10^{-2}. Is there any configuration option to make the syntax in the first example, or perhaps something with different exponents like `\num{1.1e-2\pm1e-3}`, equivalent to `\num{1.1\pm0.1e-2}`?


title: biblatex sorting when the same first name is spelled out or an initial

text: I am trying to sort some citations/bibliography by the following keys:   1. Author name (as formatted by `maxnames` and `uniquenames`).   2. Publication year (as formatted by `labelyear`). Using some standard options, I can get the formatting _almost_ perfectly:               \RequirePackage{filecontents}     \begin{filecontents*}{papers.bib}       @article{colby_1999,       author={Colby, J and Brown, A and Brown, B},       title={Title},       year={1999},       }            @article{colby_2000,       author={Colby, John and Brown, A and Brown, B},       title={Title},       year={2000},       }            @article{colby_2001,       author={Colby, J and Brown, A and Brown, B},       title={Title},       year={2001},       }            @article{colby_2001_2,       author={Colby, J and Damon, A and Brown, B},       title={Title},       year={2001},       }            @article{colby_2002,       author={Colby, J and Class, A and Brown, B},       title={Title},       year={2002},       }            @article{colby_a_2002,       author={Colby, A and Class, A and Brown, B},       title={Title},       year={2002},       }            @article{adams_1998,       author={Adams, J and Class, A and Brown, B},       title={Title},       year={1998},       }            @article{adams_2002,       author={Adams, J and Class, A and Brown, B},       title={Title},       year={2002},       }     \end{filecontents*}          \documentclass{article}          \usepackage[style=authoryear-comp, natbib, backend=biber]{biblatex}     \ExecuteBibliographyOptions{       maxnames    = 1,        maxbibnames = 99,        uniquelist  = false,        uniquename  = true,        dashed      = false,        firstinits  = true}     \addbibresource{papers.bib}          \begin{document}     \citep{colby_1999,colby_2000,colby_2001,colby_2001_2,colby_2002,adams_2002,adams_1998,colby_a_2002}     \printbibliography     \end{document}      ![enter image description here](http://i.stack.imgur.com/GsF1O.png) The only catch is that I would like the "Colby, John" and all of the "Colby, J" entries to be treated the same for sorting purposes. In other words, I want all of those entries to be compacted into 1 block in the citation, and I want the "Colby, John" entry to be sorted by year within the other "Colby, J"s in the bibliography. Something like this: ![enter image description here](http://i.stack.imgur.com/KEMyn.png)


title: What font/style is this?

text: Consider the following text samples produced with LaTeX:   * sample 1 ![default font](http://i.stack.imgur.com/f0H8y.png)   * sample 2 ![special font](http://i.stack.imgur.com/ILsO8.png) Notice the difference in height of letters in sample 2. Sample 1 is obtained with default font as               {\bf Keywords:} magnetic spectrometers, charged particle tracking, particle optics      My question is how to produce font style in sample 2. Is the purpose of this style to increase readability of text?


title: Define particle names to use upright greek letters in math mode

text: Currently I have my electron neutrino & beta particle marco defined as               \newcommand{\eneutrino}{\ensuremath{\nu_e}}     \newcommand{\belectron}{\ensuremath{\beta^{-}}}     \newcommand{\bpositron}{\ensuremath{\beta^{+}}}      So that it works in math mode, text mode, and with mhchem. However this gives an italic nu and betas, which seems wrong since we don't italicize protons (p or p^{+}, or neutrons (n). How would I change this to give me non-italic greek letters? The closes question I can find on this is Force upright Greek letters with isomath, but that uses DeclareMathSymbol and has some notes about getting it to work with T1 vs OT1 fonts and seems to overwrite the default \nu and \beta, which I don't want to do since I need the normal versions for other things. So, how do I alter the above definitions to give me non-italic greek in math mode using \ensuremath? Bonus points if someone can tell me if this is the correct typesetting of neutrinos and beta particles. Edit: I would really like an answer using Latin Modern, since it is listed as supporting every European alphabet.


title: pgfplots: How to ignore the last line of a data file?

text: I need to plot data files which contain a comment in the last line, like this:               0  2  4     1  5  7     2  9  5       3 11  15     4 10  15     THIS WAS: TOTAL      Now, `pgfplots` seems to have a problem with that giving me an error message complaining about an unbalanced number of columns. My question is: How do I tell `pgfplots` to ignore the last row of the data file? (I know about the `skip first` option of `pgfplotstable`. Maybe there is an equivalent for the last row that I just couldn't find in the manual.) MWE:               \documentclass{standalone}          \usepackage{pgfplots}     \usepackage{pgfplotstable} % For \pgfplotstableread          \usepackage{filecontents}          \begin{filecontents}{total.dos}     0  2  4     1  5  7     2  9  5       3 11  15     4 10  15     THIS WAS: TOTAL     \end{filecontents}          \pgfplotstableread{total.dos}\total          \begin{document}     \begin{tikzpicture}     \begin{axis}     \addplot [no markers, red] table [x=0, y=1] {\total}; \addlegendentry{$1$}     \addplot [no markers, blue] table [x=0, y=2] {\total}; \addlegendentry{$2$}          \end{axis}     \end{tikzpicture}     \end{document}


title: Problem with side by side figures and captions

text: I want to have 4 figures side by side and centered in my paper. I am using this code. The problem is that captions and figures are not aligned. It seems captions are in correct position, but figures are not and directed to right side. Captions are not below of the figures. I am using a double-column format.               \begin{figure*}[ht]     \centering     \begin{tabular}{cccc}     \begin{minipage}{115pt}     \centering     \includegraphics[width=180pt]{1.pdf}     \vspace{-75pt}     \caption{aaaa}     \end{minipage}     &     \begin{minipage}{115pt}     \centering     \includegraphics[width=180pt]{2.pdf}     \vspace{-75pt}     \caption{bbbb}     \end{minipage}     &     \begin{minipage}{115pt}     \centering     \includegraphics[width=180pt]{3.pdf}     \vspace{-75pt}     \caption{cccc}     \end{minipage}     &     \begin{minipage}{120pt}     \centering     \includegraphics[width=180pt]{4.pdf}     \vspace{-75pt}     \caption{dddd}     \end{minipage}     \end{tabular}     \end{figure*}


title: Pgfplot with two ordinates y tick base position

text: > **Possible Duplicate:**   >  position of axis multiplier and one other I have a plot with two ordinates. The tick base for the "right" y-axis is "10^-3". However, the "*10^-3" is placed on the left hand side. I would like to have it on the right hand side, as it belongs the right y-axis. Here is the code:               \documentclass[a4paper,10pt]{article}          \usepackage[utf8]{inputenc}          \usepackage{etex}     \usepackage{tikz,pgfplots}          \pgfplotsset{x tick label style={/pgf/number format/fixed}}     \pgfplotsset{y tick label style={/pgf/number format/fixed}}      \pgfplotsset{y tick label style={/pgf/number format/precision=3}}          \newlength\plotheight     \newlength\plotwidth      \setlength\plotheight{8cm}     \setlength\plotwidth{.8\textwidth}           \begin{document}       \begin{tikzpicture}[font=\sffamily]         \begin{axis}[           width=\plotwidth,           height=\plotheight,           scale only axis,           xmin=0, xmax=0.2,           ymin=-0.002, ymax=0.002,           every y tick label/.append style={font=\color{red}},           axis y line=right,           ]           \addplot [color=red, solid, thick]            coordinates {(0,0) (0.1,0.001) (0.2,-0.001)};         \end{axis}         \begin{axis}[%           width=\plotwidth,           height=\plotheight,           scale only axis,           xmin=0, xmax=0.2,           ymin=-0.2, ymax=0.2,           every y tick label/.append style={font=\color{blue}},           axis y line=left,           xtick=\empty,           ]           \addplot [color=blue, solid, thick]            coordinates {(0,0) (0.1,0.06) (0.2,-0.15)};         \end{axis}       \end{tikzpicture}     \end{document}      Many Thanks!


title: Is it possible to "transform" a histogram into a density plot in pgfplots?

text: I just figured out that there is the `pgfplots` package with the `hist` feature, that allows to "draw" histograms based on an external data table. What I'm looking for is a possibility to transform a histogram into density plot, where instead of counts I have densities according to breaks. It is like the `hist` function in R (if anybody knows) with parameters `freq = FALSE`. Or, is there any other way (package) to plot density from the data set in LaTeX?


title: (small) incompatibilities between LuaTeX+hyperref (pdftitle)+accents

text: The following ECM works fine when compiled with XeLaTeX, but if compiled with LuaLaTeX there is a minor problem : accented letter produces garbage in the pdftitle — but it's fine in the document . I precise (after some tests) that it is not related to a particular font.               \documentclass{minimal}     \usepackage{fontspec}     \usepackage{hyperref}     \hypersetup{pdftitle={àéèœ}}     \begin{document}     àéèœ     \end{document}      P.S. Maybe it's not relevant here, but in case : I'm on mac 10.6


title: includepdf results in undesired headings

text: \includepdf[pages={34-40},nup=2x2,frame,landscape,scale=0.8,%         pagecommand=\chapter{fracture}\section{Theoretical}]{Dam-Nonlinear.pdf}     \clearpage     \includepdfmerge[nup=1x2,frame,landscape,scale=0.8,%         pagecommand={\section{blablah}}]{ASCE-Cyclic-Joint-Model.pdf,1,%         ASCE-Cyclic-Joint-Test.pdf,1}     \includepdf[scale=0.8,nup=2x2,pages={9-13},frame,landscape,%         pagecommand=\section{Experimental Work}]{Ageing-Shaking-Cracking.pdf}     \includepdfmerge[nup=1x2,frame,landscape,scale=0.8]{cement-concrete-slowik.pdf,1,%          Optical_Fiber-in-FPZ.pdf,1}      results in   1. Correct header of chapter 1 (Fracture), and section 1.1 (Theoretical) and followed by the pdf file to be included (this takes two pages)   2. First problem, on page 3, I get: Chapter 2 Fracture and 2.1 Theoretical again, followed by blank. **Clearly wrong**   3. Then I correctly get section 2.2 blah blah followed by the pdf to be included (one page).   4. I get correctly 2.4 Experimental work on the first of two pages, **but again the same header of the second (of two) page.**


title: Change tracking while using bilatex-apa results in an error

text: I am trying to track changes with the changes package while using biblatex- apa. Now I ran into an error which leaves me clueless... Here is my example code:               \documentclass{article}     \usepackage{graphicx}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}          %bilatex-apa     \usepackage[american]{babel}     \usepackage{csquotes}     \usepackage[backend=biber,style=apa,hyperref=false,doi,url]{biblatex}     \DeclareLanguageMapping{american}{american-apa}          \usepackage{changes} %highlight changes          \begin{filecontents}{literature.bib}       @article{foo,         Author = {Umpt, E. R. and Much, I. and Numo, C.},         Journal = {A Journal},         Pages = {802-984},         Title = {Entitled},         Volume = {100},         Year = {2000}},       @inbook{bar,         Author = {Bob},         Booktitle = {Online wub},         Editor = {John},         Pages = {180-202},         Publisher = {Gotham city},         Title = {This is some title},         Year = {2002}}     \end{filecontents}     \addbibresource{literature.bib}               \begin{document}          \added{\textcite{foo} wtf.}     \deleted{test \parencite{foo,bar}}.          \printbibliography          \end{document}      This is the error message:               ! Extra }, or forgotten \endgroup.     \UL@stop ...z@ \else \UL@putbox \fi \else \egroup                                                        \egroup \UL@putbox \fi \if...     l.38 \deleted{test \parencite{foo,bar}}                                            .     ?      ! Emergency stop.     \UL@stop ...z@ \else \UL@putbox \fi \else \egroup                                                        \egroup \UL@putbox \fi \if...     l.38 \deleted{test \parencite{foo,bar}}                                            .     !  ==> Fatal error occurred, no output PDF file produced!      I'm working with pdfTeX 3.1415926-2.3-1.40.12 (TeX Live 2011) on Debian Squeeze and I updates all packages ;).


title: Separation between columns in beamer

text: I am trying to create a scientific poster (in a beamer environment) with three columns. It works very well, my only problem is that the separation between the columns is too large and I cannot find a way to overwrite the default value assigned by beamer. I know, in a tabular environment, I could have used `\renewcommand\tabcolsep{6pt}` Is there anything similar for a `column`environment? I use `\begin{columns} \column{.3\textwidth}` for my columns. And I use the `beamerposter` package, but from my understanding it is embedded in a `beamer` document class, so I assume that beamer's commands would work as well. Thank you. Here is a working example. You can see that the space between two columns is about 2 cm, I would like to be able to modify this space.               \documentclass{beamer}     \mode<presentation>          \usepackage{lipsum}     \usepackage[orientation=landscape,size=a0,scale=1.4,debug]{beamerposter}               % Display a grid to help align images     \beamertemplategridbackground[1cm]          \begin{document}     \begin{frame}[t]{}          \vspace{-40pt}     \begin{columns}[t]     \begin{column}[t]{0.305\linewidth}          \lipsum          \end{column}          \begin{column}[t]{0.305\linewidth}          \lipsum          \end{column}          \begin{column}[t]{0.305\linewidth}          \lipsum          \end{column}          \end{columns}     \end{frame}     \end{document}


title: Install custom .cls using TeX Live in local directory

text: # Background I have a `.cls` file that I would like `pdflatex` to use. I have read the following   * How to make LaTeX see local texmf tree   * Per-project texmf directory   * Create a local texmf tree in MiKTeX   * How to have local package override default package I am using TeX Live 2012, installed into `/usr/local/texlive/`. I would like to install the `.cls` file into `$HOME/.texmf` (or some other non-standard directory), rather than `$HOME/texmf`. I thought this would be:               mkdir $HOME/.texmf     initexmf --register-root=$HOME/.texmf     sudo /usr/local/texlive/2012/bin/x86_64-linux/tlmgr conf texmf TEXMFHOME $HOME/.texmf     mv amazingbook.cls $HOME/.texmf     latex amazing-stories-1.tex      # Problem The `initexmf` program does not exist (in TeX Live 2012). I have read that the `mktexlsr` command is equivalent to `initexmf`. # Update Ran:               mktexlsr $HOME/.texmf     mv amazingbook.cls $HOME/.texmf     mktexlsr $HOME/.texmf      The `.cls` file cannot be found when running:               pdflatex amazing-stories-1.tex      # Question What are the exact steps necessary to install a custom `.cls` file into a given directory and configure the environment so that the `.cls` file is visible from LaTeX using TeX Live 2012?


title: XeLaTeX stops working after a few days

text: I have recently (October) moved to a Mountain Lion-based laptop from Snow Leopard. I find that if I have not rebooted within the last week or so, XeLaTeX will just die in the middle of a run. The PDF output is empty. If I give a full reboot to my laptop, it will be just fine for the next week or so. Has anyone else had this problem and if so, is there a fix?


title: AVL Trees in TikZ: draw outside of node

text: I'm trying to draw an AVL tree with TikZ. I got the basic tree structure covered, but I'm not sure how to draw the balance factor outside of the node (see picture below). Any suggestions? ![enter image description here](http://i.stack.imgur.com/ODBIb.png)


title: Stretch the gather environment individual

text: In the lecture note, on I am working, we use lots of equations. To set them I use often the `gather` environment of the `amsmath` package. But how it standard looks, I don't really like. First of all, I have no influence to make the vertical space (before or after the equation) greater or less. That's why I made a little change on the `gather` environment and named it `Gather`   I show how it works:               \makeatletter     \newlength{\mathe}     \mathe3pt     \newlength{\mathvariable}     \mathvariable3pt     \newlength{\foren}     \newcommand{\en}{\\[\foren]}             \newcommand{\stretchtheequations}{0}          \newenvironment{Gather}[1][\stretchtheequations]{%     \setlength{\mathe}{#1\mathvariable}%     \setlength{\foren}{10.75pt+1.5\mathe}     \vskip-\parskip%     \vskip-\baselineskip%     \vskip\mathe% -24pt       \start@gather\st@rredfalse%     }{%       \math@cr \black@\totwidth@ \egroup%       $$\ignorespacesafterend%       \vskip-\parskip%       \vskip\mathe% -24pt     }     \makeatother      It based on standard `gather` environment from the `amsmath` package.   It would be added the `setlength` and `vskip` commands, the rest is from the original. The following minimal example helps me explaining what I want to do:               \documentclass[11pt]{memoir}     \parskip10pt          \usepackage[fleqn]{amsmath}     \usepackage{blindtext}     \usepackage{calc}     \usepackage{multicol}       % include here the code above          \begin{document}          \blindtext\ -- equation is compressed         \begin{Gather}[-2.5]             a+b+c+d   \en             a+b+c+d   \en             a+b+c+d            \end{Gather}     \blindtext\ -- equation is stretched         \begin{Gather}[3]             a+b+c+d   \en             a+b+c+d   \en             a+b+c+d            \end{Gather}     \blindtext          \clearpage     Look, how it looks, with columnbreak inside the multicols environment:          \begin{multicols}{2}         \blindtext         \columnbreak         \begin{gather}             a+b+c+d         \end{gather}         \blindtext         \\\bfseries The gather environment begins at the same height as the text at left side. That's exactly what I want with my new Gather environment.     \end{multicols}          \clearpage     Look, how it looks, with columnbreak inside the multicols environment:          \begin{multicols}{2}         \blindtext         \columnbreak         \begin{Gather}             a+b+c+d         \end{Gather}         \blindtext         \\\bfseries The Gather environment begins NOT at the same height as the text at left side.     \end{multicols}          \cleartoverso     \blindtext          \clearpage         \begin{Gather}             a+b+c+d         \end{Gather}     \blindtext     \end{document}      On the first page, you can see, how stretching works.   Page 3 shows that if I take the `gather` environment inside `multicols`, the first line of the equation begins exactly at the same height as the text at left side.   On page 4 you can see, that with `Gather` it is not the case.   It is the same, if I use the `Gather` environment after `\clearpage`(see pages 6 and 7). **And now the question** I would like to create an environment which works exactly like `Gather` now, with the exception, that there won't be added any vertical space before the equation if it is used immediately after commands `\clearpage`, `\pagebreak`, `\newpage`.   So the behaviour is the same like `gather` on page 3 inside the multicols environment and after `\columnbreak`.


title: Measuring height of fixed-width text box

text: Suppose some text is put inside a fixed width box. The text will then continue in vertical direction. How can you measure the total height of that text? Original text:               text text text text text       Text in a box constrained to width of `text text`               text text     text text     text      How long is this?               +     |     +


title: Specification in `theorem` environment also bold

text: I'm using the following packages/options in my article:               \documentclass[b4paper,12pt]{article}        \usepackage[english]{babel}     \usepackage{amssymb}                     \usepackage{amsmath}                     \usepackage{amsfonts}     \usepackage{amsthm}     \usepackage{hyperref}                    \usepackage{graphicx}     \usepackage{color}                        \newtheoremstyle{break}        {\topsep}{\topsep}%        {\itshape}{}%        {\bfseries}{}%        {\newline}{}%      \theoremstyle{break}          \newtheorem{theorem}{Theorem}%[section]     \newtheorem{lemma}[theorem]{Lemma}     \newtheorem{proposition}[theorem]{Proposition}     \newtheorem{corollary}[theorem]{Corollary}     \newtheorem{definition}{Definition}          \begin{definition}[Test]     This is a test definition     \end{definition}      I would like to have the name (here 'Test') not only in parentheses but also boldface. How can I achieve that? Thank you!


title: The space between the table and its caption is very small

text: I have a table written like this:               \begin{table}         \centering         \begin{tabular}{|l||c|c|}         \hline&Column 1&Column 2\\             \hline\hline         cell1 & cell2 & cell3 \\         \hline         cell1 & cell2 & cell3 \\\hline           \end{tabular}         \caption{A test caption}         \label{tab:attempt1}     \end{table}      Now the caption is VERY NEAR the table.. Additionally, there's a big vertical white space after the caption... How can I fix that to look like any normal table with a caption? This is the case only with tables, figures are working fine. ![The caption is very close to the table, and the following text is so far underneath](http://i.stack.imgur.com/fkOyb.png)


title: Drag and drop image files to LyX

text: Is it possible somehow to drag and drop image files from a browser or files directly to LyX when creating a latex document? If not, is there any other editor for OS X that can do this? I find it really slow to add images to a latex document, or if you can tell me an easy approach. Thanks


title: What is the equivalent to the german "Symbolverzeichnis" and how is it realizable in Lyx?

text: In mathematical books you have sometimes (in addition to the index of words) a list of symbols with a short description. In German it is called "Symbolverzeichnis". Is this somehowe realizable within lyx? It may look like this:               Appendix          A \bold{Symbolverzeichnis}          $\mathbb{R}$          Set of real numbers.     $\mathbb{R}_{+}$      Set of positive real numbers.     $|x|$                 Absolute value of $x$.     ...          B \bold{Index}          ...


title: Switch between right-to-left and left-to-right two-columns with long entries

text: I give here the answer of the problem of using indices for making dictionaries English-Arabic, for a book of probability, thanks to this very powerful discussion... Switch twocolumn between right-to-left and left-to-right with the package multiind in polyglossia The idea is to order the entries in Arabic order, and in English order, and after, thanks to the commands `\RTLdblcol` (Right-to-Left-double-column) `\LTRdblcol`... we obtain the two dictionaries with Arabic and English entries... I give this example to watch you what happens when the entries of index are too long (with the packages used in the file)...               \documentclass[14pt,a4paper]{extbook}%{article}%          \usepackage{titlesec}     \usepackage{titletoc}     \usepackage{etoolbox}     \usepackage{multicol}          \usepackage{amsmath,amssymb}     \usepackage[most]{tcolorbox}          \usepackage{boxedminipage}     \usepackage{slashbox}          \usepackage{enumitem}     \usepackage{minitoc}     \usepackage{rotating}     \usepackage{fmultico}     \setlength{\columnseprule}{0.1pt}          \usepackage{fancyhdr}     \pagestyle{fancy}          \usepackage{pdflscape}          \usepackage{array}               \usepackage{polyglossia}     \setmainlanguage[numerals=maghrib]{arabic}     \setotherlanguage{english}          \newfontfamily\arabicfont[Script=Arabic, AutoFakeSlant=-0.02]{Traditional Arabic}     \setsansfont[Script=Arabic,Scale=1.5]{Traditional Arabic}           \usepackage{multind}     \makeindex{dico-ar}      \makeindex{dico-eng}                               %%% OBTAIN INDEX WITHOUT NUMBERS OF PAGE %%%%%     \newcommand{\idxnopage}[1]{{}} % This line deletes index page number.     \providecommand{\gobble}[1]{{}} % This line deletes a comma.     \newcommand{\idxsechead}[1]{#1\gobble}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%      \def\RLarabic#1{\selectlanguage{arabic}\RL{#1}\selectlanguage{english}}          \def\aeindex#1#2#3#4{%       \index{dico-eng}{#3@\string\idxsechead{#4\hfill\RLarabic{#2}}|idxnopage}%       \index{dico-ar}{#1@\string\idxsechead{\RLarabic{#2}\hfill\LR{#4}}|idxnopage}%       }% End of \aeindex...               \begin{document}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   INDEX ENTRIES   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%           \aeindex{قانون ضرب}{قانون الضرب}{Multiplication rule}{Multiplication rule}     \aeindex{متساوية}{متساوية}{Equality}{Equality}     \aeindex{مقدر الاحتمال الأعظم}{مقدر الاحتمال الأعظم}{Maximum likelihood estimate}{Maximum likelihood estimate}          \aeindex{عد}{العد}{Counting}{Counting}     \aeindex{نتيجة}{نتيجة}{Outcome}{Outcome}     \aeindex{احتمال}{الاحتمال}{Probability}{The Probability}     \aeindex{تباديل}{التباديل}{Permutations}{Permutations}     \aeindex{توافيق}{التوافيق}{Combinations}{Combinations}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   END OF INDEX ENTRIES   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%                     \RTLdblcol     \printindex{dico-ar}{معجم المصطلحات العلمية   المستخدمة في الكتاب}     \LTRdblcol     \printindex{dico-eng}{\hfill\LR{Mathematical terms  used in the book}}     \end{document}      And, from now, the entry "Maximum likelihood estimate" is too long for the line, and to obtain a more beautiful entry, I work with hand on the 'dico- ar.ind" and "dico-eng.ind" of arranged entries, and replaces the entries               \item \idxsechead{مقدر الاحتمال الأعظم\hfill \LR {Maximum likelihood estimate}},              \idxnopage{1}      and               \item \idxsechead{Maximum likelihood estimate\hfill \selectlanguage {arabic}\RL {مقدر الاحتمال الأعظم}\selectlanguage {english}},              \idxnopage{1}      by respectively               \item \idxsechead{\begin{tabular}{b{3.5cm}b{2.5cm}}\LR{Maximum likelihood estimate}&\selectlanguage{arabic} %%% English index         مقدر الاحتمال الأعظم        \selectlanguage{english}         \end{tabular}\hrule\vspace*{5pt}},              \idxnopage{1}                  \item \idxsechead{\begin{tabular}{m{3.5cm}m{2.5cm}} %%% Arabic index      \selectlanguage{arabic}         مقدر الاحتمال الأعظم         &        \selectlanguage{english}Maximum likelihood estimate        \end{tabular}\hrule\vspace*{1pt}},              \idxnopage{1}      we obtain a more acceptable entries, when we recompile the file... So, I tried to make a macro for doing this automatically... when I implement The command doing exactly what I've make for the example, I obtain the command               \def\aeindex#1#2#3#4{%       \index{dico-eng}{#3@\string\idxsechead{\begin{tabular}{b{3.5cm}b{2.5cm}}\selectlanguage{english}\LR{#4}&\RLarabic{#2}\end{tabular}       \hrule\vspace*{5pt}}|idxnopage}%       \index{dico-ar}{#1@\string\idxsechead{\begin{tabular}{m{3.5cm}m{2.5cm}}   \selectlanguage{arabic}\RLarabic{#2}&\selectlanguage{english}\LR{#4}\end{tabular}\hrule\vspace*{5pt}}|idxnopage}%           }% End of \aeindex...      but, on the compilation, I have the error messages (for each entry), that I absolutely not understand..               ! Argument of \reserved@a has an extra }.     <inserted text>                      \par      l.85 ...{Multiplication rule}{Multiplication rule}          I've run across a `}' that doesn't seem to match anything.....      Someone can help me about this ? Thank you.


title: Aligning text close to column

text: ![enter image description here](http://i.stack.imgur.com/jfJ0C.png) The above text is produced by the following command:               \documentclass[a4paper]{article}     \usepackage[margin=0.8in]{geometry}     \usepackage{ifxetex}       \RequireXeTeX       \usepackage{fontspec,multicol}          \newcommand\dn{\catcode`\~=12            \fontspec[Script=Devanagari,Mapping=velthuis-sanskrit]{Sanskrit 2003}}           \setlength{\columnseprule}{1.5pt}            \setlength{\fboxrule}{2pt}         \begin{document}        \title{\fbox{{\dn\Huge lalitaa tri"satii stotram}}\vspace*{-1.8cm}}          \date{}           \maketitle            \begin{flushleft}             {\dn\Large asya "sriilalitaatri"satii stotra mahaamantrasya | bhagavaan hayagriiva .r.si.h | anu.s.tup chanda.h | "sriilalitaamahaatripurasundarii devataa | ai.m biijam | sau.h "sakti.h | klii.m kiilakam |}               \begin{multicols}{2}               {\dn\large kakaararuupaa kalyaa.nii kalyaa.nagu.na"saalinii |\\                 kalyaa.na"sailanilayaa kamaniiyaa kalaavatii ||1||          kamalaak.sii kalma.saghnii karu.naam.rta saagaraa | \\          kadambakaananaavaasaa kadamba kusumapriyaa  ||2||               \end{document}      Now my question is the width between the text in the left hand side column and the column seperator is clearly more than what we see in the right hand side column. How to rectify this.


title: Using \end in internal vertical mode

text: Please how do I stop at all cost in the following? Note: `\leavevmode` is no rescue.               \documentclass[crop]{standalone}     \def\z#1#2{%       \ifnum#1<\numexpr#2+1\relax         \noindent\hfill#1%         \ifnum#1=#2\relax           \hfill\null\endgraf         \else           \ifdefined\xz             \hfill\number\numexpr#1+1\hfill\null\endgraf           \else             \let\xz\relax\hfill\null\endgraf           \fi         \fi         \expandafter\z\expandafter{\number\numexpr#1+2\expandafter}%         \expandafter{\number#2\expandafter}%       \fi     }     \begin{document}     \z19     \stop     \end{document}       ![enter image description here](http://i.stack.imgur.com/1FPUM.png)


title: How to remove square brackets adjacent to the hyphen generated by the package "cite"?

text: I am using the following packages:               \documentclass[journal]{IEEEtran}          % *** MISC UTILITY PACKAGES ***     \usepackage{graphicx}     \usepackage[caption=false]{subfig}     \usepackage[sort,compress]{cite}     %\usepackage{caption}          % *** MATH PACKAGES ***     \usepackage[cmex10]{amsmath}     \usepackage{amssymb}     \usepackage[mediumspace,mediumqspace,Gray,squaren]{SIunits}     \usepackage[citebordercolor={0 1 0}]{hyperref}          \begin{document}     % paper title     % can use linebreaks \\ within to get better formatting as desired     \title{Fabrication}          % The paper headers     \markboth{JOURNAL OF MICROELECTROMECHANICAL SYSTEMS}%     { \MakeLowercase{\textit{et al.}}: Fabrication, Characterization and Modeling of Fully-Integrated Piston-Type Electrodynamic Microactuators}          % make the title area     \maketitle     \begin{abstract}     %\boldmath     This paper presents      \end{abstract}          \IEEEpeerreviewmaketitle          \section{Introduction}     \IEEEPARstart{E}{lectrodynamic}      harvesters\cite{f11:Kulkarni2008,f11:Sari2008,f11:Wang2009,f11:Zhu2010,f11:Peng2011}.     These devices rely.          \bibliographystyle{IEEEtran}     \bibliography{f11}               \end{document}      After I compile my document I get the following as a part of my resulting .pdf document: ![enter image description here](http://i.stack.imgur.com/OQY9X.png) I want to get rid of the square brackets adjacent to the hyphens, e.g. I want "[9-13]" and not "[9]-[13]", which is the how it is right now. Any suggestions?


title: Forcing tikz externalization to recreate all images using arara

text: I am using the externalization library of tikz to have most of the pictures compiled only once and just included in later LaTeX runs. Once in a while I would like to redo all the images, for example after making changes to the font. To achieve this I used to manually delete the externalized files, OR adding the line `\tikzset{external/force remake}` somewhere before my first picture and commenting it for the future runs. Since I just discovered `arara` I would love to have myself some automation `;)` How do I achieve with `arara` to either   * delete the content of an entire folder, not knowing how many files are in there or what they're called or   * add a line of code in the `.tex` file for one single run, in this case: `\tikzset{external/force remake}` Sorry, but I don't have a single clue on how to start with rules or directives. But this snippet could serve as a starting point               % arara: cleanfolder: { folder: tikzternalize }     % !arara: insertforceremake     % arara: pdflatex: { shell: yes }     \usepgfplotslibrary{external}     \tikzsetexternalprefix{tikzternalize/}


title: Points in Shapes

text: I need to code this in Latex. Can you help me please! ![](http://i.stack.imgur.com/8jk8K.jpg) I tried to create a shape embedding a minipage in it with no success. In fact I think this is a bad idea, but I don't know any other way to do it. EDIT: Add code from comment:               \begin{tikzpicture}[node distance=4cm]          \node (pp)[draw, diamond, shape aspect=1, rotate=0, minimum size=1]{\begin{minipage}{1cm}          \centering \tikz{ \draw (.5,2.6) node[] {.}; %... more points }          \end{minipage} };      \end{tikzpicture}


title: Unable to load citations

text: The following template               http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/ThesisStyle/CUEDThesisPSnPDF.tgz      is supposed to work absolutely fine, however, for some strange reason, it is currently unable to load citations (take as an example the line 36 of file /Chapter1/chapter1.tex):               Now I would like to cite the following: \cite{latex} and \cite{texbook}     and \cite{Rud73}.      Any suggestion would be highly appreciated!


title: \afterpage not called after page break

text: In this example               \documentclass{article}          \usepackage[a6paper,landscape,margin=1cm,bottom=2cm]{geometry}     \usepackage[english]{babel}     \usepackage{blindtext}          \usepackage{afterpage,refcount,lastpage}     \newcommand{\testafterpage}{%         \noindent{\Large\ttfamily NEW PAGE!\quad}%         \afterpage{\testafterpage}%     }     \AtBeginDocument{\testafterpage}          \begin{document}     \blindtext[3]     \end{document}      the words `NEW PAGE!` should be printed at the beginning of every page using the `afterpage` package. For some reason, `NEW PAGE!` is not inserted at the second page of the document: ![afterpage fails on 2nd page](http://i.stack.imgur.com/W2pT3.png) Is this intended behaviour? Is it possible to fix this in general? I am aware of the various packages like `atbegshi` that allow to add some content when the page is shipped out, but I don't know if this can also be used as a replacement for the strange behaviour of `afterpage`.


title: Changing the font size of the heading

text: I am writing a report (`\documentclass[a4paper,12pt]{article}`) which has an abstract in the beginning. I am using `\usepackage{abstract}` to write it. Then I am using `\begin{abstract} ... \end{abstract}` to put the abstract in the document. The problem is that the heading "Abstract" is at the same font size as the writing under it, only bold. I need to be able to control the size of this heading. Can anyone please help me.


title: Unable to load nomenclatures

text: Following my question here, there is another one issue that stills unanswered. Once gain, the following template               http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/ThesisStyle/CUEDThesisPSnPDF.tgz      is supposed to work absolutely fine, however, for some strange reason, it doesn't load the nomenclatures page at all. In fact, I can't even figure out where this information is located within the project. The only related to this issue information I managed to found is the following lines of LaTeX code:               % Nomenclature     \usepackage{nomencl}     \makenomenclature     \renewcommand\nomgroup[1]{%       \ifthenelse{\equal{#1}{A}}{%        \item[\textbf{Roman Symbols}] }{%             A - Roman         \ifthenelse{\equal{#1}{G}}{%          \item[\textbf{Greek Symbols}]}{%             G - Greek           \ifthenelse{\equal{#1}{R}}{%             \item[\textbf{Superscripts}]}{%              R - Superscripts               \ifthenelse{\equal{#1}{S}}{%                \item[\textbf{Subscripts}]}{{%             S - Subscripts             \ifthenelse{\equal{#1}{X}}{%              \item[\textbf{Other Symbols}]}{{%    X - Other Symbols             \ifthenelse{\equal{#1}{Z}}{%              \item[\textbf{Acronyms}]}%              Z - Acronyms                             {{}}}}}}}}}}      which are located in the 8th line of file Classes/CUEDthesisPSnPDF.cls Any suggestion would be highly appreciated!


title: How not to repeat info for each tabularx cell in row?

text: This produces a 2x2 table whose first row is blue with white text and whose second row is white with black text. Although it works fine it does repeat `\textcolor{white}` in each cell of the row where the cells are to have white text. Is there some way of specifying that the text in the first row should be white without having to repeatedly specify it over again for each cell of that row? Its not so bad in this small example but I am concerned that it will get tiresome on larger tables.               \documentclass{article}     \usepackage{tabularx}     \usepackage{ragged2e}             \usepackage{colortbl}     \newcolumntype{L}{>{\raggedright\arraybackslash}X}      \begin{document}     \begin{center}\Large     \noindent\begin{tabularx}{1\textwidth}{|L|L|}     \hline     % NEXT LINE REPEATS WHITE FOR EACH CELL     \rowcolor{blue}\textcolor{white}{Jan}&\textcolor{white}{Feb}\\      Mar&Apr\\      \hline     \end{tabularx}     \end{center}     \end{document}      EDIT: This question has already been answered and accepted with an answer directly addressing the `tabularx` environment in the question's example code but since then I found that the `tabu` package can do this. As this involves using a different package than that presented in the original question I am not going to put this as an answer but am just adding the following example of how to implement this using `tabu` in case anyone is interested in another approach.               \documentclass{article}     \usepackage{tabu}     \usepackage{colortbl}     \begin{document}     \begin{center}\Large     \noindent\begin{tabu} to \textwidth{|X[l,m]|X[l,m]|}     \tabucline-     \rowfont{\color{white}}\rowcolor{blue}Jan&Feb\\      Mar&Apr\\      \tabucline-     \end{tabu}     \end{center}     \end{document}


title: Adding picture to a CWEB document

text: The CWEB docs make no mention of how to include pictures. The tools I'm familiar with for including or generating graphics are designed for use in LaTeX, but CWEB outputs plain TeX. Pointers to examples of making this work would be appreciated, especially using EPS figures.


title: How can I install vim-latex on mac os x?

text: I was trying to install vim-latex (http://vim- latex.sourceforge.net/index.php?subject=download&title=Download)   1. My Vim comes with the OS X system and is located at `/usr/share/vim/vim73`   2. According to the instruction, I created a folder as `~/.vim` and unzip the source file into directory `~/.vim`   3. Then I create a file `.vimrc` at `~/` with the following content: REQUIRED. This makes vim invoke LaTeX-Suite when you open a TeX file.              filetype plugin on      IMPORTANT: Win32 users will need to have `shellslash` set so that LaTeX can be called correctly.              set shellslash      IMPORTANT: `grep` will sometimes skip displaying the file name if you search in a single file. This will confuse LaTeX-Suite. Set your `grep` program to always generate a file-name.              set grepprg=grep\ -nH\ $*      OPTIONAL: This enables automatic indentation as you type.              filetype indent on      OPTIONAL: Starting with Vim 7, the `filetype` of empty `.tex` files defaults to `plaintex` instead of `tex`, which results in vim-latex not being loaded. The following changes the default filetype back to `tex`:              let g:tex_flavor='latex'      I also `cd` into `~/.vim/ftplugin/` to create a file `tex.vim` with the following content: this is mostly a matter of taste. but LaTeX looks good with just a bit of indentation.              set sw=2      TIP: if you write your `\label`'s as `\label{fig:something}`, then if you type in `\ref{fig:` and press C-n you will automatically cycle through all the figure labels. Very useful!              set iskeyword+=:        4. In the command line I start vim and type:              :helptags ~/.vim/doc      Nothing really happens. And I simply don't know how to continue. Could you please tell me what should I do next to make it works?


title: How to get enumeration inside main enumeration of the sections?

text: I'm writing a thesis proposal, and I want to show the structure of my final report. I mean the structure of another report in my current report. Something like this:               \documentclass[10pt, a4paper]{article}          \begin{document}          \tableofcontents     \newpage     \section{TITLE}     \section{TITLE}     \subsection{Subtitle}     \subsection{Subtitle}     \section{TITLE}     \subsection{Subtitle}     \subsection{Subtitle}     \subsubsection{Title}     %Here the numbered structure of my final report, something like this, like table of contents of another report, not this, without page numbers, only text:     1. Title\\     2. Title\\     2.1 Subtitle\\     2.1.1 Title\\     3. Title     % Whole structure in this subsubsection.     \subsubsection{Title}     \subsection{Subtitle}     \section{TITLE}     \subsection{Subtitle}     \subsubsection{Title}          \end{document}


title: Can't reproduce sequence alignment using TikZ?

text: I'm new using the TikZ package. Can someone help-me to reproduce this matrix 1 using Tikz? ![Alignment between two sequences](http://i.stack.imgur.com/27BRO.png) More precisely the step in figure 2. ![Step](http://i.stack.imgur.com/bQxv3.png) I tried to do it with matrix but I can't put the number 1 [above left] the node (m-3-3) = +1               \begin{tikzpicture}         \matrix (m) [matrix of math nodes,                 nodes in empty cells,nodes={minimum width=7ex,                 minimum height=7ex,outer sep=0pt},                 column sep=1ex,row sep=-2ex]{                     & t & \mathcal{E}   & A & G & C \\             s   &   &  0            & 1 & 2 & 3 \\      \mathcal{E}    & 0 &  0                &-2 &-4     &-6     \\                   A & 1 & -2                    &+1     &-1     &-3 \\                   A & 2 & -4                    &-1 & 0     &-2     \\                   A & 3 & -6                    &-3 &-2     &-1     \\                   C & 4 & -8                    &-5 &-4     & 1     \\};                   \draw[<-] (m-2-1) -- (m-3-1);     \end{tikzpicture}


title: create label for graphics inside table cell and also add to table of contents

text: I would like to create a few command that allows me to reference figures inside a table and add the reference to the table of contents.               \newcommand\fig[2]{     \addtocounter{figure}{1}     \includegraphics[width=3in]{#2}     \phantomsection     \addcontentsline{toc}{subsection}{Figure \ref{#1} #1}     \label{#1}     }      This is what I have tried, but the figure number does not seem to increment. My goal is to generate something like in the screenshot below. Thanks for your help!!! ![enter image description here](http://i.stack.imgur.com/3DkU2.png)


title: pdflatex has stopped working

text: It has been a little while now that every time I try to compile a document with pdflatex I get an error message wich says "pdflatex.exe ha dejado de funcionar" (in English "pdflatex has stopped working"). This happened suddenly: before I had no problems for the compilation and now I try to compile the same documents and I get that error message. Is there anything I could do to try to fix it? If it is useful, my editor is Texmaker, I have MikTeX 2.9 and my OS is Windows Vista. Thank you.


title: Latex Standalone always rebuilds / apostroph in filename?

text: I have started toying around with Martin Scharrer's standalone package because tikz external does not work with todonotes and I feel that the workflow for standalone makes more sense as far as I have understood it. Now to the problem: It seems that standalone always rebuilds the subfiles that I include, no matter which mode I select. Am I getting confused by the changing filetime and is there only a touch being performed? I have only started using this, so I can't tell if I am saving compile time. I also observed that the filename for my subfile does come out as 'test3'.pdf with extra apostrophs. If I later switch to mode=image, the files are then not found. Is this related to the always-rebuilding problem? Current source is as follows: subfile called: test3.tex               \documentclass[tikz]{standalone}          \begin{document}          \begin{tikzpicture}     \draw (0,0) -- (1,1);     \end{tikzpicture}          \end{document}      Main file:               \documentclass{article}     \usepackage[mode=buildnew]{standalone}     \usepackage{tikz}          \begin{document}     \begin{figure}     \includestandalone{test3}     \caption{test}     \end{figure}     asdfasdf     \end{document}


title: Add watermark that overlays the images

text: I want to put a draft watermark using the below script but the problem is that the watermark don't come over the images and I want it to come over it.               \usepackage{draftwatermark}     \SetWatermarkText{DRAFT}     \SetWatermarkScale{1}


title: footnote with no preceding space

text: I would like my footnotes to be separate in the `.tex` file, but rendered without a space in the resulting file. Can this be done? Example: `This is some text\footnote{with a footnote}` renders as > This is some text1 whereas               This is some text     \footnote{with a footnote}      renders as > This is some text 1 I would like to avoid that extra space, but write my footnote on a different line.


title: parallel arrows in pb-diagram

text: It is possible to get two parallel maps (one pointing to the left, the other to the right) between two nodes using `pb-diagram`? I know it can be done with TikZ, and maybe with some other package, but I use `pb-diagram`. Note that the option `=` is not enough. I would like to have also the heads of the arrows (the `=` option just draws two parallel lines)...


title: Please improve my logo to resemble our TeX.SX logo

text: It is free to use TikZ or PSTricks to answer my question. I want to recreate our TeX.SX logo. But my attempt is far from perfect. Please help me to make it more similar to the original one. ![enter image description here](http://i.stack.imgur.com/NrhCN.png)               \documentclass[pstricks,border=0pt]{standalone}     \begin{document}     \begin{pspicture}(8,3)     \rput(4,1.5){\psscalebox{8}{\textcolor{gray}{\{}\textcolor{red}{\TeX}\textcolor{gray}{\}}}}     \end{pspicture}     \end{document}      The aspects I want to improve:   1. Font type.   2. Font color and its shading.


title: In a tikzpicture, how can I "shift" by a multiple of the current x-vector (say)?

text: Suppose that I have a tikzpicture begun like this:               \begin{tikzpicture}[x = 20mm, y = 10mm]      Now let us suppose that I want to put a subpart of the picture inside a "scope" environment and I want all of that part of the picture to be shifted to the right by 40mm, that is, by twice the current x-vector. But should I later change the x-vector in the "tikzpicture" options, I will want the shift amount to respect the new x-vector. For example, if I changed the x-vector from 20mm to 15mm, I would want the subpicture to then automatically be shifted by 30mm instead of 40mm, without me having to modify the "scope" options. If I do this:               \begin{scope}[xshift = 2]      then TikZ interprets this to mean that I want to shift right by a distance of 2pt, that is, the "2" is not interpreted as a multiple of the current x-vector. Conceptually, I want something like               \begin{scope}[xshift = 2 * \x]      but I don't know what the correct way is to express this to TikZ. How can I do this? ## Addendum I accepted the answer supplied by Jake, but here is how to use his technique to define a key that makes a one-dimensional shift very straightforward. Put this in the document preamble:               \tikzset{myxshift/.style = {shift = {(#1, 0)}}}     \tikzset{myyshift/.style = {shift = {(0, #1)}}}      Now you can do something like this:               \begin{scope}[myxshift = 2]


title: How to draw oval with FeynMP?

text: Is it possible to draw oval shape with FeynMP? Here is a mwe for a blob [which is a a circle]:               \documentclass[10pt,a4paper]{article}     \usepackage[latin1]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{feynmp}     \usepackage{rotating}     \setlength{\unitlength}{1mm}     \pagestyle{empty}          \usepackage{ifpdf}     \ifpdf       \DeclareGraphicsRule{*}{mps}{*}{}     \fi          \makeatletter     \def\endfmffile{%       \fmfcmd{\p@rcent\space the end.^^J%               end.^^J%               endinput;}%       \if@fmfio         \immediate\closeout\@outfmf       \fi       \IfFileExists{\thefmffile.mp}{\immediate\write18{mpost \thefmffile}}{}       \let\thefmffile\relax     }     \makeatother          \begin{document}     \begin{center}     \begin{fmffile}{lower_bloba}         \begin{fmfgraph*}(50,70)         \fmfrightn{r}{1}         \fmfleftn{l}{1}         \fmftopn{t}{1}             \fmfblob{.5w}{v1}             \fmf{fermion}{l1,v1}             \fmf{fermion}{v1,r1}             \fmf{photon}{t1,v1}     \end{fmfgraph*}     \end{fmffile}     \end{center}      \end{document}


title: Remove Subfigures from List of Figures

text: I'm using `\subfloat` and `\subref` to put 40 sub-figures into a few large figures. This is clogging up my List of Figures at the beginning of my published document. ![output](http://i.stack.imgur.com/N16Ej.jpg) How do I remove references to subfigures in the List of Figures?


title: stop \animategraphics using mouse click

text: I used following command to create an animation inside my beamer presentation. Using below command, I can run animation whenever I want during my talk on slide.                  \animategraphics[loop, width=0.45\textwidth, height=0.35\textheight]{1}{pics/animation/step_}{0}{20}}      Since I have embedded two animation inside one Slide, I would like to stop first animation using mouse click (Just as way as I run it), then I click on the second animation to run. I will appreciate if anyone can help me by giving me some hints. Thanks


title: Header in LaTeX

text: I'm trying the below script to make a header but its not working and this is very urgent if anyone could help me.               \documentclass[conference,letterpaper]{IEEEtran}     \usepackage{fancyhdr}     \setlength{\paperwidth}{215.9mm}     \setlength{\hoffset}{-9.7mm}     \setlength{\oddsidemargin}{0mm}     \setlength{\textwidth}{184.3mm}     \setlength{\columnsep}{6.3mm}     \setlength{\marginparsep}{0mm}     \setlength{\marginparwidth}{0mm}          \setlength{\paperheight}{279.4mm}     \setlength{\voffset}{-7.4mm}     \setlength{\topmargin}{0mm}     \setlength{\headheight}{0mm}     \setlength{\headsep}{0mm}     \setlength{\topskip}{0mm}     \setlength{\textheight}{235.2mm}     \setlength{\footskip}{12.4mm}          \setlength{\parindent}{1pc}          \hyphenation{op-tical net-works semi-conduc-tor}     \usepackage{cite}     \usepackage{tabularx,booktabs}     \usepackage{graphicx}     \usepackage{float}     \floatstyle{plaintop}     \restylefloat{table}     \usepackage{amssymb}     \usepackage{amsmath}     \usepackage{caption}     %\usepackage{subcaption}     \usepackage{longtable}     \usepackage{comment}     \usepackage{tabularx}     \usepackage[table]{xcolor}     \usepackage{graphicx}     \usepackage{amssymb}     \usepackage{amsmath}     \usepackage{caption}     %\usepackage{subcaption}     \usepackage{longtable}     \usepackage{comment}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{graphicx}     \usepackage{gensymb}     \usepackage{adjustbox}     \usepackage{subfig}     \usepackage{tikz}     \usepackage{afterpage}     \usetikzlibrary{calc}     \tikzset{       mynode/.style={anchor=south west,inner sep=0,outer sep=0pt}}     \usepackage{fancyhdr}     \pagestyle{fancy}     \chead{NOT FOR DISTRIBUTION}     \renewcommand{\headrulewidth}{0.4pt}


title: Insufficient width for chapter numbers in ToC

text: I'm trying to format my thesis, and I copied the formatting stuff from a friend who finished her thesis last year. Unfortunately, she only had two chapters and then subsections. I have more chapters, and since they are roman numerals, the numbers are running into my titles. This is formatted (to the best of my knowledge) correctly, but I'd like to start the title text a little more to the right:               \documentclass[12pt,fleqn, letterpaper]{report}     \usepackage{indentfirst}     \usepackage{setspace}     \usepackage{titlesec}     \usepackage[hidelinks]{hyperref}          \oddsidemargin 0in     \textwidth 6.5 in          \topmargin 0in     \headheight 0in     \headsep 0in     \textheight 8.6in     \footskip 0.4in          \makeatletter     \renewcommand*\l@chapter[2]{%       \ifnum \c@tocdepth >\m@ne         \addpenalty{-\@highpenalty}%         \vskip 1.0em \@plus\p@         \setlength\@tempdima{1.5em}%         \begingroup           \parindent \z@ \rightskip \@pnumwidth           \parfillskip -\@pnumwidth           \leavevmode \bfseries           \advance\leftskip\@tempdima            \hskip -\leftskip           #1\nobreak\normalfont\leaders\hbox{$\m@th             \mkern \@dotsep mu\hbox{.}\mkern \@dotsep             mu$}\hfill\nobreak\hb@xt@\@pnumwidth{\hss #2}\par           \penalty\@highpenalty         \endgroup       \fi}     \makeatother          \titleformat{\chapter}       {\normalfont \center}{\thechapter}{1em}{}     \titlespacing*{\chapter}{0pt}{-.5 in}{0.35in}     \renewcommand{\thechapter}{\Roman{chapter}}          \renewcommand*\contentsname{TABLE OF CONTENTS}           \begin{document}          \begin{singlespace}     \tableofcontents     \end{singlespace}          \addtocontents{toc}{\noindent CHAPTER\par}          \chapter{this is chapter I}     \chapter{this is chapter II}     \chapter{this is chapter III}     \chapter{this is chapter IV}     \chapter{this is chapter V}     \chapter{this is chapter VI}     \chapter{this is chapter VII}     \chapter{this is chapter VIII}          \end{document}


title: Proof environment - line break after the "Proof."

text: I want to make the proof environment in amsthm package to auto add a line break right after the "Proof." I tried the following code, which also removed the QED sign, but it doesn't work: No linebreak is added.               \makeatletter     \renewenvironment{proof}[1][\proofname]{\par         \normalfont \topsep6\p@\@plus6\p@\relax         \trivlist         \item[\hskip\labelsep             \itshape             #1\@addpunct{.} \newline] }%\ignorespaces}     \makeatother


title: Is is possible to show the beamer output full screen on monitor 2 like powerpoint?

text: I was wondering whether it is possible to full screen the pdf i.e beamer output in monitor 2 showing the contents in monitor 1 as well. I am using monitor extend properties in windows. Powerpoint has that feature. I don't know whether that feature is also available in pdf or not. I am using adobe acrobat X. I have a presentation tomorrow morning. Please help asap. Thanks.


title: Hyperref inserting undesired space at start of enumerate environments

text: This question arises from my attempt to answer vertical spacing on enumitem. Originally, I was able to answer the OP's question, but then the OP mentioned that the problem re-emerged if the `hyperref` package was used. The following is a MWE:               \documentclass{article}     \usepackage{hyperref}     \begin{document}          \noindent       Hello       \fbox{%         \begin{minipage}[t]{9cm}           \begin{enumerate}             \item the first item             \item the second item             \item the third item           \end{enumerate}         \end{minipage}}          \end{document}      Resulting in: ![enter image description here](http://i.stack.imgur.com/Z3lD0.png) When expecting: ![enter image description here](http://i.stack.imgur.com/iPqgK.png) which is easily obtained from the MWE by commenting out the call to use `hyperref`. After playing a bit with the contents `hyperref`, the problem seems to lie with how `hyperref` redefines how `\item` used in an `enumerate` environment. In particular, the macro `\hyper@refstepcounter` seems to be at the root of the problem since by redefining it as               \def\hyper@refstepcounter#1{\relax}      eliminates the unwanted extra vertical space. The definition of `\hyper@refstepcounter` is               \def\hyper@refstepcounter#1{%       \edef\This@name{#1}%       \ifx\This@name\name@of@eq         \@ifundefined{theHequation}{%           \make@stripped@name{\theequation}%           \let\theHequation\newname         }{}%       \fi       \HyCnt@ProvideTheHCounter{#1}%       \hyper@makecurrent{#1}%       \ifmeasuring@       \else         \Hy@raisedlink{%     %-->           \hyper@anchorstart{\@currentHref}\hyper@anchorend         }%       \fi     }         If you comment our the line following `%-->`, the extra vertical spacing disappears. The raised link seems to be the problem, is this a bug in terms of how it's essentially counteracting how `minipage` eliminates the effects of `\addvspace`? Or is there some trick that is a work around (other than commenting out this line)? **EDIT** One option for fixing this seems to be writing               \let\ifmeasuring@\iftrue          (or is this less drastic)               \measuring@true      after calling `hyperref` package. But, I'm not really sure what the raised link is supposed to be achieving here. Am I possibly throwing out too much by doing this? Or might `amsmath` simply override this later---which seems unlikely because `\measuring@false` is only called from within a group.


title: < and > symbols don't appear using mathpazo and Memoir

text: I'm using the `memoir` document class to write some documents for my master's program, including my thesis. I decided to use the font `mathpazo` (Palatino) because I think it looks awesome, but when I try to write some inequalities, the symbols less than and greater than (`<` and `>`) don't appear after compilation and there are NO errors, just a bunch of warnings. So, if I want to write the expression:               \begin{equation}     a<1 %also when I use $a<1$     \end{equation}      And the output: ![< symbol missing!](http://i.stack.imgur.com/1GBfF.png) The symbol `<` isn't there! The only workaround for this is to use `\textrm{<}`, but I guess it looks a little bit different. The most relevant warnings are shown below:               LaTeX Font Warning: Font shape `T1/pplx/bx/sc' undefined(Font) using `T1/pplx/bx/n' instead on input line 32.         Class memoir Warning: The material used in the headers is too large     (15.48003pt) for the given head height (14.5pt), it is recommended to     either increase the head height or redesign the header     (in both cases you will find help in the memoir manual). on input line 35.      I have both `amsmath` and `amsmath` packages loaded. Here is the MWE (pretty large, sorry):               \documentclass[letterpaper,12pt,openany,final]{memoir}     \usepackage[utf8x]{inputenc}     \usepackage[T1]{fontenc}          \usepackage{lmodern}     \usepackage{graphicx} %Gráficos     \usepackage[top=4cm,right=2.5cm,left=3cm, bottom=3cm]{geometry}     \usepackage{babelbib}     \usepackage{tikz}     \usepackage{ucs}     \usepackage{courier}     \usepackage{calligra}     \usepackage{xcolor}     \usepackage{color,calc,graphicx,soul,fourier}     \usepackage{float}      \usepackage{rotating}      \usepackage{parskip}      \newcommand\missing[1]{\textcolor{red}{\textbf{#1}}}     % \usepackage{pdflscape}     \usepackage[sc]{mathpazo} %Fuente     \usepackage{epstopdf}     \usepackage{tikz} %Dibujo     \usetikzlibrary{shapes,arrows}          \setlength{\evensidemargin}{\oddsidemargin}     \usetikzlibrary{calc} %Dibujo     \usetikzlibrary{decorations.pathmorphing} %Dibujo     %opening          \title{Lorem Ipsum}     \author{DOlor Sit amet}     \firmlists*     \usepackage{textcomp}     \usepackage{listingsutf8}     \renewcommand\lstlistingname{Código}     \renewcommand\lstlistlistingname{Índice de Códigos Fuente}          \lstset{         backgroundcolor=\color{white},         tabsize=4,         rulecolor=,         literate={ó}{{\'o}}1              {á}{{\'a}}1              {é}{{\'e}}1              {º}{{\textdegree}}1              {ú}{{\'u}}1,         escapeinside={\%*}{*)},         language=octave,             basicstyle=\scriptsize,             numberstyle=\tiny,             upquote=true,             aboveskip={1.5\baselineskip},             columns=fixed,             showstringspaces=false,             extendedchars=true,             breaklines=true,             prebreak = \raisebox{0ex}[0ex][0ex]{\ensuremath{\hookleftarrow}},             frame=single,             showtabs=false,             name=Feedservoplot             showspaces=false,             texcl=false,             inputencoding=latin1,             numbers=left,             firstnumber=auto,         showstringspaces=false,             identifierstyle=\ttfamily,             keywordstyle=\color[rgb]{0,0,1},             commentstyle=\color[rgb]{0.133,0.545,0.133},             stringstyle=\color[rgb]{0.627,0.126,0.941},             escapeinside={(*@}{@*)}     }          \usepackage[protrusion=true,expansion=true]{microtype}  %Alineado óptico     \usepackage{amssymb}     \usepackage{amsmath}     \setlength{\footmarksep}{-1.8em}          \setlength{\footmarkwidth}{1.8em}     \setlength{\footmarksep}{0em}     \footmarkstyle{#1\hfill}          \definecolor{nicered}{rgb}{.647,.129,.149}     \makeatletter     \newlength\dlf@normtxtw     \setlength\dlf@normtxtw{\textwidth}     \def\myhelvetfont{\def\sfdefault{mdput}}     \newsavebox{\feline@chapter}     \newcommand\feline@chapter@marker[1][4cm]{%     \sbox\feline@chapter{%     \resizebox{!}{#1}{\fboxsep=1pt%     \colorbox{nicered}{\color{white}\bfseries\sffamily\thechapter}%     }}%     \rotatebox{90}{%     \resizebox{%     \heightof{\usebox{\feline@chapter}}+\depthof{\usebox{\feline@chapter}}}%     {!}{\scshape\so\@chapapp}}\quad%     \raisebox{\depthof{\usebox{\feline@chapter}}}{\usebox{\feline@chapter}}%     }     \newcommand\feline@chm[1][4cm]{%     \sbox\feline@chapter{\feline@chapter@marker[#1]}%     \makebox[0pt][l]{% aka \rlap     \makebox[0cm][r]{\usebox\feline@chapter}%     }}     \makechapterstyle{daleif1}{     \renewcommand\chapnamefont{\normalfont\Large\scshape\raggedleft\so}     \renewcommand\chaptitlefont{\normalfont\huge\bfseries\scshape\color{nicered}}     \renewcommand\chapternamenum{}     \renewcommand\printchaptername{}     \renewcommand\printchapternum{\null\hfill\feline@chm[2.5cm]\par}     \renewcommand\afterchapternum{\par\vskip\midchapskip}     \renewcommand\printchaptertitle[1]{\chaptitlefont\raggedleft ##1\par}     }     \makeatother     \chapterstyle{daleif1}          \makechapterstyle{daleif12}{     \renewcommand\chapnamefont{\normalfont\Large\scshape\raggedleft\so}     \renewcommand\chaptitlefont{\normalfont\huge\bfseries\scshape\color{nicered}}     \renewcommand\chapternamenum{}     \renewcommand\printchaptername{}     \renewcommand\printchapternum{\null\hfill\feline@chm[2.5cm]\par}     \renewcommand\afterchapternum{\par\vskip\midchapskip}     \renewcommand\printchaptertitle[1]{\chaptitlefont\raggedright ##1\par}     }          \makeatletter     \renewenvironment{thebibliography}[1]          {\chapter*{\refname}%           \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}%           \list{\@biblabel{\@arabic\c@enumiv}}%                {\settowidth\labelwidth{\@biblabel{#1}}%                 \leftmargin\labelwidth                 \advance\leftmargin20pt% change 20 pt according to your needs                 \advance\leftmargin\labelsep                 \setlength\itemindent{-40pt}% change using the inverse of the length     % used before                 \@openbib@code                 \usecounter{enumiv}%                 \let\p@enumiv\@empty                 \renewcommand\theenumiv{\@arabic\c@enumiv}}%           \sloppy           \clubpenalty4000           \@clubpenalty \clubpenalty           \widowpenalty4000%           \sfcode`\.\@m}          {\def\@noitemerr            {\@latex@warning{Empty `thebibliography' environment}}%           \endlist}     \renewcommand\newblock{\hskip .11em\@plus.33em\@minus.07em}     \makeatother          %%=================%%     %%Header and footer%%     %%=================%%     \makepagestyle{tesis2}     \makepsmarks{tesis2}{%       \createmark{section}{left}{nonumber}{}{}        \createmark{section}{right}{nonumber}{}{}            }          \makepagestyle{TOC}     \makepsmarks{TOC}{%       \createmark{section}{left}{nonumber}{}{}        \createmark{section}{right}{nonumber}{}{}            }          \makeevenhead{TOC}{}{}{\bfseries     \leftmark}     \makeoddhead{TOC}{}{}{\bfseries     \rightmark}     \makeevenfoot{TOC}{}{\thepage}{}     \makeoddfoot{TOC}{}{\thepage}{}     \makefootrule{TOC}{\textwidth}{0.5pt}{0pt}     \makeheadrule{TOC}{\textwidth}{0.5pt}          \makepagestyle{BIB}     \makepsmarks{BIB}{%       \createmark{chapter}{left}{nonumber}{}{}        \createmark{section}{right}{nonumber}{}{}            }          \makeevenhead{BIB}{}{}{\bfseries     Referencias}     \makeoddhead{BIB}{\bfseries Referencias}{}{}     \makeevenfoot{BIB}{}{\thepage}{}     \makeoddfoot{BIB}{}{\thepage}{}     \makefootrule{BIB}{\textwidth}{0.5pt}{0pt}     \makeheadrule{BIB}{\textwidth}{0.5pt}          \makeevenhead{tesis2}{\bfseries\textsc{Sección     \thesection:}}{}{\bfseries     \rightmark }     \makeoddhead{tesis2}{\bfseries \textsc{Sección \thesection:}}{}{\bfseries     \rightmark}     \makeevenfoot{tesis2}{}{\thepage}{}     \makeoddfoot{tesis2}{}{\thepage}{}     \makefootrule{tesis2}{\textwidth}{0.5pt}{0pt}     \makeheadrule{tesis2}{\textwidth}{0.5pt}          \usepackage[activeacute,spanish] {babel}     \renewcommand\shorthandsspanish{}     \renewcommand{\arraystretch}{1.2}     \clubpenalty=10000     \widowpenalty=10000     \setcounter{tocdepth}{2}     \setcounter{secnumdepth}{2}     \setcounter{lofdepth}{2}     \usepackage[]{hyperref}     \usepackage{memhfixc}     \usepackage[inner]{showlabels}     \showlabels{cite}     \begin{document}     \setcounter{chapter}{1}          \setlength{\evensidemargin}{\oddsidemargin}          \setlength{\footskip}{30pt}          \tableofcontents{\pagestyle{tesis2}}     \pagestyle{TOC}      \newpage      \listoffigures     \pagestyle{tesis2}           \renewcommand{\baselinestretch}{1.5}     \chapter{Lorem ipsum}          Lorem ipsum dolor sit amet:          \begin{equation}      a<0     \end{equation}           \end{document}      Any ideas?


title: listings package: embed text from a .txt file in a LaTeX document

text: I'm using the `listings` package to put text from a text file into a LaTeX document               \lstinputlisting{file.txt}      However, it isn't putting in special characters correctly, `%` is displaying fine which would have been the character I expected to display differently, but `£` is displaying as `c` with a `>` sign on top with the greater than part facing upwards. Is there any way to get the characters to display correctly? * * * I can't login at the moment to update my question, but I have just been trying with a file created in notepad displaying special characters I used the phrase "£5.5K 70% 's a," and saved as a .txt encoded using either ANSI (produced the best results with only the £ symbol not looking right) and UTF 8 and Unicode both produce stranger results. Dan * * * So far this is what I have using the tools package and Knitr               <<name, echo=FALSE, results='asis', eval=TRUE>>=            encoded_text_to_latex(as.character(SQL(paste("SELECT 'This is a test £5k 2.5m 70% !£$%^&*()_-`,#' AS `.`" , sep = "")), encoding = c("latin1","latin2","latin9","UTF-8","utf8"))                                @      which gives me the following error               Error in parse(text = x, srcfile = src) :     <text>:2:0: unexpected end of input     1: encoded text to latex(as.character(SQL(paste("SELECT ’This is a test Âc5k 2.5m 70%     !Âc$%ˆ&*() -‘,#’ AS ‘.‘" , sep = "")), encoding =     c("latin1","latin2","latin9","UTF-8","utf8"))      However I can get the following `. 1 This is a test Âc5k 2.5m 70` to appear by using               <<name, echo=FALSE, results='asis', eval=TRUE>>=            SQL(paste("SELECT 'This is a test £5k 2.5m 70% !£$%^&*()_-`,#' AS `.`" , sep = ""))                @      Any suggestions? Thanks guys, I appreciate your help.


title: head don't appear with 3 figures (subfloat) in appendices

text: I make some appendices to my thesis. But I have some problems with head. There are 3 figures and each one occupies one page (all page). In first page appears everything normal. In second page too, but in third page don't appear the head. What's it wrong ?               \documentclass[12pt,twoside,a4paper,openright]{report}     \usepackage[portuguese]{babel}     \usepackage[utf8]{inputenc}     \usepackage[inner=3cm,outer=2cm,tmargin=2.0cm,bmargin=2.0cm, includefoot, includehead]{geometry}     \usepackage{fancyhdr}     \usepackage{graphicx}     \graphicspath{  {fig/} }     \usepackage{epstopdf}     \usepackage{subfig}          \usepackage[titletoc]{appendix}     \renewcommand\chaptername{Anexo}     \addto\captionsportuguese{%       \renewcommand\appendixname{Anexo}       \renewcommand\appendixpagename{Anexos}     }          \pagestyle{fancy}     \fancyhead{}     \fancyfoot{}     \fancyfoot[RO,LE]{\thepage}     \fancyhead[RO]{\slshape \rightmark}     \fancyhead[LE]{\slshape \leftmark}               \begin{document}          \appendixpage     \begin{appendices}                    \chapter{Imagens SEM}          Imagens SEM de carbonato de cálcio natural, original e modificado, com uma resolução de 7500x e 20000x.          \begin{figure}[htb]     \centering       \subfloat[H60-7500x]{%         \includegraphics[width=.45\textwidth]{H60_7500X}}\hfill       \subfloat[H60 Modificado - 7500x]{%         \includegraphics[width=.45\textwidth]{H60-M2_7500X}}\\       \subfloat[H60-20000x]{%         \includegraphics[width=.45\textwidth]{H60_20000X}}\hfill       \subfloat[H60 Modificado - 20000x]{%         \includegraphics[width=.45\textwidth]{H60-M2_20000x-_2}}\\       \caption{This is lot of figures arranged side by side in matrix form with captions for each and a main caption}\label{fig:1}     \end{figure}                    \begin{figure}[htb]     \centering       \subfloat[H90-7500x]{%         \includegraphics[width=.45\textwidth]{H90_7500X_2}}\hfill       \subfloat[H90 Modificado - 7500x]{%         \includegraphics[width=.45\textwidth]{H90-M2_-_7500x_-_2}}\\       \subfloat[H90-20000x]{%         \includegraphics[width=.45\textwidth]{H90_2000X_2}}\hfill       \subfloat[H90 Modificado - 20000x]{%         \includegraphics[width=.45\textwidth]{H90-M2-20000x}}\\       \caption{This is lot of figures arranged side by side in matrix form with captions for each and a main caption}\label{fig:1}     \end{figure}          \begin{figure}[htb]     \centering       \subfloat[H60-7500x]{%         \includegraphics[width=.45\textwidth]{H90_E7500X_2}}\hfill       \subfloat[H60 Modificado - 7500x]{%         \includegraphics[width=.45\textwidth]{H90E-M2_-_7500x}}\\       \subfloat[H60-20000x]{%         \includegraphics[width=.45\textwidth]{H90_E_20000X}}\hfill       \subfloat[H60 Modificado - 20000x]{%         \includegraphics[width=.45\textwidth]{H90E-M2_-_20000x-2}}\\       \caption{This is lot of figures arranged side by side in matrix form with captions for each and a main caption}\label{fig:1}     \end{figure}          \end{appendices}     \end{document}


title: using bar chart to compare two groups of data, how to draw one node (showing the ratio) per two bars?

text: I have two groups of data, you can think of them as one control group and one treatment group, and each data point shows the system's performance under certain parameter x. Now for each value of parameter x, I want to draw two bars (one for the control group and the other for the treatment group) that stays closely together, to compare their performance. This is already done. Furthermore, I want to draw one node per two bars, on top of the two bars, to indicate the ratio of the treatment group's performance to control group's. ![enter image description here](http://i.stack.imgur.com/hrjIX.png) Note that the red text above each pair of bars are the effect I want. Is this doable in pgfplots? I have looked at `bar shift` and `bar near coords` but still does not get a succinct way to do what I want. Specifically, the ideal case is that I provide the two groups of data to pgfplots, like               \addplot coordinates { (1,x1) (2,x2) ... (9,x9) };     \addplots coordinates { (1,y1) (2,y2) ... (9,y9) };      and some command automatically generates the nodes (y1/x1) (y2/x2) ... (y9/x9) on top of each pair of bars. Thanks in advance! The minimal code generating the diagram similar to that in the question is shown below. I have removed minor things like legend and patterns.               \documentclass{article}     \usepackage{pgfplots}     \begin{document}     \begin{tikzpicture}     \begin{semilogyaxis}[             xtick = data,             symbolic x coords={1,2,4,8,16,32,64,128,256,512,1024,2048},             x tick label style={rotate=45,anchor=east,xshift=0.5em},             ybar=0pt,             bar width=5pt,     ]     \addplot              coordinates {     (1, 12224822.47615195) (2, 30575568.537983067) (4, 56065152.09279688) (8, 119050256.55456343) (16, 261199511.2399962) (32, 539436878.3711921) (64, 884494633.5530908) (128, 1458149738.5198479) (256, 1504651025.9424655) (512, 3690489159.8036933) (1024, 4002894124.741196) (2048, 5886439904.74722)             };          \addplot             coordinates {     (1, 12120350.197539225) (2, 30647908.833372578) (4, 56033201.34011042) (8, 118156559.2107797) (16, 258243240.89016733) (32, 538593063.3199656) (64, 853738697.5167842) (128, 1323350550.6813228) (256, 1364824842.2256825) (512, 3354827274.6800394) (1024, 4111728131.806063) (2048, 6950375713.147153)             };          \end{semilogyaxis}     \end{tikzpicture}     \end{document}


title: Typesetting long equations in pnastwo document class

text: Frequently, when using `revtex4` or `revtex4.1`, in two column format, one wants to typeset a long equation. The standard way to do this is by using the `widetext` environment (see this question). Similar to `revtex4`, there is a style class called `pnastwo`, which is a two- column style class. However, unlike `revtex4`, `pnastwo` has no support for the widetext environment. How does one typeset a long equation in single-column mode when using the documentclass `pnastwo`? Here is a minimal example that compiles.               \documentclass{pnastwo}          \usepackage[pdftex]{graphicx, color}     \DeclareGraphicsRule{.pdftex}{pdf}{.pdftex}{}     \usepackage{amsmath,amssymb,latexsym}          \usepackage[english]{babel}     \usepackage{lipsum}               \contributor{Submitted to Proceedings     of the National Academy of Sciences of the United States of America}     \url{www.pnas.org/cgi/doi/10.1073/pnas.0709640104}     \copyrightyear{2008}     \issuedate{Issue Date}     \volume{Volume}     \issuenumber{Issue Number}               \begin{document}     \title{Title Goes Here.}               \author{First{1}{University of Cambridge, Cambridge,     United Kingdom},     Second{2}{Universidad de Murcia, Bioquimica y Biologia     Molecular, Murcia, Spain}, \and Third\affil{2}{}}          \contributor{Submitted to Proceedings of the National Academy of Sciences     of the United States of America}               \maketitle               \begin{article}          \begin{abstract}     \lipsum[1]     \end{abstract}                         \keywords{\LaTeX | problems}               \noindent{\bf Significance:} Why?           \vspace{5mm}     \dropcap{T}his is some sample text that I want. \lipsum[3]     % this is the wide equation I want to type     \begin{equation}     Lots of math goes here. Lots of math goes here. Lots of math goes here. Lots of math goes here. Lots of math goes here. Lots of math goes here.      \end{equation}     \lipsum[3]     \end{article}                    \end{document}


title: Counters for claims

text: I want to redefine the claim environment so that it will be numbered but I'm having a hard time with the counters. I want the following:               \begin{theorem}     thm 1     \end{theorem}     \begin{proof}       \begin{claim}       blah 1       \end{claim}            \begin{claim}       blah 2       \end{claim}     \end{proof}          \begin{theorem}     thm 2     \end{theorem}     \begin{proof}       \begin{claim}       blah 3       \end{claim}     \end{proof}      to produce:               Theorem 1: thm 1     Claim 1.1: blah 1     Claim 1.2: blah 2          Theorem 2: thm 2     Claim 2.1: blah 3


title: How to make Derive work with a parameter other than x and how to invoke Derive in postfix notation?

text: In my investigation `Derive` can only evaluate the derivative of function `f(x)` with respect to `x`. My attempt below does not produce the expected result because I try to find the derivative of `x(t)` and `y(t)` with respect to `t`.               \documentclass{article}     \usepackage{pst-plot,pst-node}          \def\x{sin(t)}     \def\y{cos(t)}          \def\xx{Derive(1,\x)}     \def\yy{Derive(1,\y)}          \begin{document}          \begin{pspicture}[algebraic](-.2,-2.2)(\dimexpr\psPiFour cm+.2cm,2.2)         \psparametricplot{0}{TwoPi 2 mul}{\xx|\yy}     \end{pspicture}          \end{document}        * Can anybody here help me to let `Derive` also work with any variable such that my project here (click) can be easily done without having to manually calculate the derivative of the given functions?   * How can we invoke `Derive` in postfix form? If it is possible then the first question can be solved just by using `ED` as follows,              <postfix expression in x>  1 Derive t /x ED


title: How can I use pst-circ package to draw this circuit?

text: ![draw multiplexer with pst-circ package](http://i.stack.imgur.com/bQ0E2.png) draw multiplexer with pst-circ package


title: LPeg alternative match?

text: Looking over the LPeg docs I do not see a way to have alternatives(OR) http://www.inf.puc-rio.br/~roberto/lpeg e.g., a | b will match a or b. Am I missing something?