title: Getting \rule to automatically break across lines

text: I am currently using `\rule` to insert blank lines into paragraphs of text in a document though the lines often go past the document margins. I know I can use `\hrulefill` to stay within the margins, but often I do not want the line to stretch across the entire page. Does anybody know a way to either have `\rule` break between lines or display wholly on the next line if it does not fit within the margins? For example: If I have: > Lorem ipsum dolor sit amet, `\rule{6em}{.5pt}` consectetur adipisicing elit, > sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim > ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip > ex ea `\rule{6em}{.5pt}` commodo consequat. Duis aute irure dolor in > reprehenderit in `\rule{6em}{.5pt}` voluptate velit esse cillum dolore eu > fugiat nulla `\rule{6em}{.5pt}` pariatur. Excepteur sint occaecat cupidatat > non proident, sunt in culpa qui officia deserunt mollit anim id est laborum How can I ensure that the `\rule`s do not cross into my document margins?


title: Remove Caption Reference First Page when appearing in LoF

text: I have a citation in a caption and in my biblography it lists the pages each reference is in. However it lists the page of my List of Figures (`ix`), but I'd like to remove that. Is there a way to remove part of the caption when putting it in the LoF or to not include prefatory pages in the reference page list?               \begin{figure}[ht!]       \centering       \includegraphics[width=\textwidth]{figure1}       \caption{caption is here (adapted from \cite{reference1}).}       \label{fig:figure1}     \end{figure}


title: Ignoring alignment for certain lines in an alignat environment

text: I am having trouble typesetting an optimization problem, and would like to know how to ignore the alignment for a certain line in an alignat environment. I've currently typeset the optimization problem as:               \begin{alignat}{4}     \centering     \min_{\lambda} \quad & \frac{1}{N} \sum_{i = 1}^N{\alpha_i} & + & C_0 \sum_{i = 1}^N{\beta_i} & + & C_1 \sum_{i = 1} ^N{\gamma_i} \\     s.t. \quad & -M\alpha + \epsilon & \leq & \lambda^T X y & \leq & M(1-\alpha) + \epsilon \\           & -\beta \bar{\lambda}  & \leq &  \lambda & \leq & \beta \bar{\lambda} \\           &-\gamma & \leq & \lambda & \leq & \gamma \\           & \lambda \in \mathbb{Z}^P & \quad & \alpha \in \{0,1\}^N  &\quad & \beta, \gamma \in \{0,1\}^P      \end{alignat}      However this runs into issues since the bottom line causes weird spacing. I would appreciate any formulations that can make this mess legible in some way... That said, I think that I can get around this problem if I can just tell the alignat environment to ignore the last line, and also center the contents between each of the & signs.


title: Keep bibliography entry on one page

text: I'm using BibTeX and `natbib`. I have a number of entries in the reference section that start at the bottom of a page and continue on the next e.g. at the bottom of a page I have > Some Author Name, Title of the Article Begins > > [NEW PAGE] > > Title continues from previous page, Journal Name, Year, Pages I need the whole entry to appear on the same page. Is there anyway to make this happen?


title: Tikz: overlay png or pdf image over another pdf figure

text: I am newbie in Tikz. I would like to place a png or pdf image on another pdf figure using Tikz overlay.Unfortunately i don't have any Tikz code for both the figures. I have looked at this answer using How to put a PDF figure on top of another one using `Tex Commands`, Drawing Image on Tikz and the closest example Image inside another image. My question is to overlay images at correct locations keeping the aspect ratios of two figures using Tikz ?. I have used `overpic` package and `Tikz` here in MWE(not working correctly now) Here is the minimal working example. The caption for Tikz is not placed properly. any idea why ? For a quick preview of output at writelatex               \documentclass[12pt]{article}     \usepackage{mwe,tikz}     \usepackage[percent]{overpic}     \pagestyle{empty}          \begin{document}          \begin{figure}       \centering        \begin{overpic}[scale=0.75]{example-image-a}          \put(3,3){\includegraphics[scale=0.21]{example-image-b}}       \end{overpic}     \caption{Using Overpic}     \end{figure}          \begin{figure}      \centering        \begin{tikzpicture}[overlay]          \node at (1,1) {\includegraphics[scale=1]{example-image-a}};          \node at (1.5,1) {\includegraphics[scale=0.25]{example-image-b}};       \end{tikzpicture}     \caption{Using Tikz Overlay}     \end{figure}          \end{document}          Result: ![Page](http://i.stack.imgur.com/fwhww.jpg)


title: Nested xy-pic diagrams

text: Is it possible to include a `xy-pic` diagram as an entry of another `xy-pic` diagram? I have a map to a group of homomorphisms and I would like to print the homomorphism image. Is there some way to do this?


title: Converting text math to TeX math (e.g. automatically filling in \left(, \right), \frac, etc)

text: At some point, it occurred to me that another level of abstraction may be possible on top of LaTeX. For example, why should I type               \left( \frac{\frac{a}{b + c} \frac{w + \lambda}{z}}{x\left[ \frac{c_n}{d}\right]} \right)\left \{\frac{x_0}{y_0} : x_0 > 0 \right \}      when I could say the same thing, more compactly, with               ({{a}/{b + c} {w + \lambda}/{z}}/{x[{c_n}/{d}]} ){{x_0}/{y_0} : x_0 > 0}      or even               ({a/{b + c} {w + \lambda}/z}/{x[c_n/d]} ){x_0/y_0 : x_0 > 0}      Sure, conversion from the latter to the former may not be general enough for all use cases, but it should be okay for many of them. It's also somewhat easier to read/debug, what with the fewer words running around. I think I am going to try to implement such a command, `\textmath{...}` in LuaTeX (the `{}` should not be a problem since the parentheses are supposed to be balanced) that does precisely this conversion. But before I attempt this, my question is: is there already a package that does something similar? After all, I'd hate to reinvent the wheel, and I suspect this question may be also on some other peoples' minds. Thank you! Note: this question isn't about the macros that many TeX editors have, convenient as they may be. While they may allow you to perform the topmost expansion automatically, that does not help readability in the long-run :(


title: How to start text and image on the same baseline

text: I need text and images to start at the same level on each page. With standard LaTeX settings the image seems to start a few points higher then a text. I believe this is due to `\topskip`. `\topskip=0pt` should solve the problem, but... I have a MWE with package `geometry` where I settle the `\texthight` in two ways (both have disadvantages):   1. `textheight={190mm},heightrounded` which results in ragged bottom of the page (unacceptable)    2. `lines=40` which gives a proper bottom but there a text is slightly lower then the image (if now other solution the editor will accept this).  What to do to have both text and images start at the same level?               \documentclass{article}     \usepackage[demo]{graphicx}     \usepackage{lipsum}     \usepackage[draft,columns=1]{typogrid}     \topskip=0pt     \usepackage[a4paper,layoutsize={176mm,250mm},%       layouthoffset={20mm},layoutvoffset={28.5mm},%       textwidth={115mm},lines=40,%       %textheight={190mm},heightrounded,%       headsep={10pt},hcentering,vcentering]{geometry}     \pagestyle{empty}          \begin{document}     \lipsum[1-5]     \newpage     \includegraphics[width=4cm,height=1cm]{}     \end{document}      To Steven B. Segletes: This what I need ![](http://mleczko.students.wmi.amu.edu.pl/frame.png) This was done by Urlike's answer with +7pt


title: Coloured numbering in a list?

text: Is there a way to obtain coloured numbering in an `enumerate` list?               \begin{enumerate}     \item First     \item Second     \item Third     \end{enumerate}      I'd like the 1, 2, 3 to be in blue. I thought this should be simple, but could find nothing on this. I also tried with               \usepackage{enumitem}      and               \begin{enumerate}[label={\color{blue}}]      but this simply generated a list with no numbering.


title: Alignment of table header in column with decimal numbers using siunitx

text: I have a table with decimal numbers aligned at decimal point. In the column header, I have a % sign. In the code snippet given below, the percent sign is aligned at the left in the column, but I would like it to be either aligning with the decimal points or to the right. How can I achieve this? Current result: ![enter image description here](http://i.stack.imgur.com/hjhku.png)               \documentclass[ngerman]{scrbook}     \usepackage{siunitx}          \begin{document}          \begin{tabular}{l S[table-format=3.2]}         \textbf{fruit} & \textbf{\%} \\         apple   & 12,34 \\         banana  & ,1 \\         cherry  & 1,2345 \\         coconut & 100 \\     \end{tabular}          \end{document}


title: Good LaTeX template for book about maths

text: As I want to write a short "book" about Analysis I would like to work with a template which is good enough for readability, looks good and furthermore can handle dozens of my theorems, axioms, corollaries etc. by layouting them as good as possible. Can anyone suggest or even provide a good template which satisfies my needs?


title: How to deal with two different authors with the same surname and same first name initials in biblatex?

text: I am citing two papers by two different groups of authors. The first authors have the same surname and additionally their first names have the same initials (but are not the same names). Their middle names are different. The first author of one of the papers additionally is the second author of the other paper. Also the publications are from the same year.               \documentclass{article}          \usepackage[style=authoryear-comp,maxcitenames=2,maxbibnames=10,url=false,doi=false,isbn=false,dashed=false,firstinits=true]{biblatex}          \DeclareNameAlias{sortname}{last-first}          \begin{filecontents}{biblio.bib}     @article{smithaa,     title = {Some title},     year = {2000},     author = {Smith, Aaron A and Meyer, M and Fitzgerald, F},     journal = {Some journal}     }     @article{smithaz,     title = {Another title},     year = {2000},     author = {Smith, Anton Z and Smith, A A and Doe, John},     journal = {Another journal}     }     @article{differentxy,     title = {Just something else},     year = {2003},     author = {Different, Jason J and Person, Other O and Human, Another A},     journal = {Different Journal}     }     \end{filecontents}          \addbibresource{biblio.bib}          \begin{document}     \parencites{smithaa}{smithaz}.          \parencite{differentxy}.          \printbibliography     \end{document}      With this I get an in-text citation like this:               (Smith et al. 2000a; Smith et al. 2000b).     (Different et al. 2003).      And bibliography entries like this:               Different, J., Person, O., and Human, A. (2003). “Just something else”. In: Different Journal.     Smith, A. A., Meyer, M, and Fitzgerald, F (2000a). “Some title”. In: Some journal.     Smith, A. Z., Smith, A. A., and Doe, J. (2000b). “Another title”. In: Another journal.      However, I think, this is very confusing as it suggests that both publications are written by the same Smith. I would rather get something like this in the text:               (Smith, A. A. et al. 2000; Smith, A. Z. et al. 2000).     (Different et al. 2003).      In the 'normal' citation (Different et al.) the name should still be shown without the initials. In the bibliography there should be no "a" and "b" behind the dates:               Different, J., Person, O., and Human, A. (2003). “Just something else”. In: Different Journal.     Smith, A. A., Meyer, M, and Fitzgerald, F (2000). “Some title”. In: Some journal.     Smith, A. Z., Smith, A. A., and Doe, J. (2000). “Another title”. In: Another journal.


title: Beamer-titlepage-picture

text: I'd like to be able to add tow picture before the title on the titlepage in Beamer as below: ![enter image description here](http://i.stack.imgur.com/tkFxN.jpg) i used this command `\titlegraphic{\includegraphics[height=4cm]{Picture}}` but i didn't reach the goal               \documentclass{beamer}     \titlegraphic{\includegraphics[height=4cm]{picture1}}     \titlegraphic{\includegraphics[height=4cm]{picture2}}     \title{TITLE}     \subtitle{\textbf{Subtitle}}     \author{Author}     \institute{University }          \setbeamercolor{title}{bg=orange,fg=white}               \begin{document}          \maketitle               \end{document}


title: How to create new shortcuts on kile?

text: The shortcut `Alt` + `SHIFT` + `(` insert `\left( \right)` in line. How to create new shortcuts on kile to insert `[] {}`. Attention, than the plug-in kile.


title: Vertical space between align and alignat environments

text: I have a problem with the vertical space between `align` (1) and `alignat` (2). How can I reduce this space to the same vertical space as before (1)? How can I completely erase the vertical space? I know I can do this globally with `abovedisplayskip` and `belowdisplayskip`, but it doesn't work simply within these environments and I don't want to change anything globally. Here is the MWE:               \documentclass[a4paper, 12pt, headsepline]{scrreprt}     \usepackage[onehalfspacing]{setspace}     \usepackage{amsmath, amssymb, mathtools}     \usepackage{mathptmx}     \usepackage[a4paper]{geometry}     \geometry{left=2cm,right=5cm,top=2cm,bottom=2cm}               \begin{document}     Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text     \begin{align}     X_{t+1} &=  \frac{Z_{t+1}+X_{t+1}}{Y_M}  \\     N_{t}  &=  \frac{X_{t+1}+X_{t+1}}{T_{t+1}} \notag      \end{align}      % Reduce the vertical space here. Ideally to the same distance as from align to the above text, or whatever there is (eg other environments?)     \begin{alignat}{3}     &\text{as:} \quad & \gamma_{xyz} = \frac{a} {b} \qquad & \text{and}  & \qquad      \gamma_{zhk} = \frac{b}{a} \notag     \end{alignat}     Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text Text text     \end{document}      As you can see, there is an undesired, too big vertical space between `align` and `alignat`.


title: Document class breaking references

text: I am using this document class for a resume, however when I include the class, I cannot reference labels. I get the error:               LaTeX Warning: Reference `LastPage' on page 1 undefined      As you can see I am attempting to get the page count. I originally attempted this with the lastpage package, but I have also attempted to put a label on the last page manually and reference it with \pageref{mylabel}. This gives the same undefined reference error. If I do not use that document class and use a standard document class, the references work fine. I know that is a big class, so I'm not expecting someone to comb through it and find the answer, but could anyone point me in the right direction of finding what might be causing this problem? What type of thing in a document class could prevent all references from working?


title: Navigator package error: ‘I can't find file `yax' \input yax’

text: With TeXLive 2013, under Linux Mint KDE 16, when I try to embed a file with the `navigator` package, I get the following errors pointing to navigator.tex and the source won't compile:               line 14: I can't find file `yax' \input yax     line 14: Emergency stop \input yax      I can also reproduce the error with the following minimal working example (I can replace the file name with a concrete name of any file, whether it exists or not, but the result is still the same):               \documentclass{article}          \usepackage{navigator}     \embeddedfile{sourcecode}{\jobname.tex}          \begin{document}     The document     \end{document}      How can I fix this?


title: Passing aux directory option to AUCTeX

text: I use Emacs and MikTeX. With the latter comes a `PDFLaTeX` option to move clutter in a `temp-dir` directory: `-aux-directory temp-dir`. I am tentatively trying to pass it to AUCTeX with:               (setq tex-start-options "-aux-directory temp-dir")      Doesn’t work! I am not very knowledgeable with AUCTeX internals. Can you give some hints and examples on `LaTeX-command`, `latex-run-command`, `tex-start- options` and `tex-start-commands` and the likes?


title: TikZ - Adjusting the Node distance for Individiual nodes

text: I am drawing E-R diagrams using the tikz-er2 package. In the `begintikzpicture` environment, there is an optional argument `node distance`. This is global for all the nodes. Now, If I give a small distance, The nodes intersect and if I give an average distance, the nodes appear too far. How do I set the distance for individual nodes? The `tikz-er2` package **sty** file and **user manual** can found here. Here is a MWE:               \documentclass[12pt,draft]{article}     \usepackage{tikz-er2}     \begin{document}     \tikzstyle{every entity} = [draw=blue,fill=blue!20,text=red]     \tikzstyle{every attribute} = [fill=yellow!20]     \tikzstyle{every relationship} = [fill=red!20]     \tikzstyle{every edge} = [link]     \begin{tikzpicture}[node distance=8em]         \node[entity] (student) {Student};         \node[attribute] (stud-id) [left of=student] {\key{student-id}} edge (student);         \node[attribute] (name) [above left of=student] {Name} edge (student);         \node[attribute] (fname) [above left of=name] {First-Name} edge (name);         \node[attribute] (lname) [above right of=name] {Last-Name} edge (name);         \node[attribute] (cgpa)  [above right of=student] {CGPA} edge (student);         \node[relationship] (joins) [right of=student] {joins} edge [total] (student);         \node[entity] (pgroup) [right of=joins] {Project-Group} edge [<-] (joins);     \end{tikzpicture}     \end{document}      I have enabled the draft mode. It seems there is a bad box. How do I remove that too? ![enter image description here](http://i.stack.imgur.com/H6JJR.png)


title: How to use short subsection title in header but not in table of contents?

text: I have a (onesided) document with fancyhdr and pagestyle fancy so it displays the section-title on the right header and the subsection-title on the left header. If section and subsection titles are lengthy they start to overlap each other. Example:               \documentclass[a4paper,10pt]{scrartcl}     \usepackage[utf8x]{inputenc}     \usepackage{lipsum}     \usepackage{fancyhdr}     \pagestyle{fancy}          \begin{document}          \section{some section with quite a lengthy title}     \lipsum     \subsection{very very very long title of subsection}     \lipsum          \end{document}      I know of two solutions:   1. give short section/subsection headings like in              \documentclass[a4paper,10pt]{scrartcl}     \usepackage[utf8x]{inputenc}     \usepackage{lipsum}     \usepackage{fancyhdr}     \pagestyle{fancy}          \begin{document}          \section[short section]{some section with quite a lengthy title}     \lipsum     \subsection[short subsection]{very very very long title of subsection}     \lipsum          \end{document}      I don't like this because I don't want to have the short version in my toc.   2. use `\sectionmark` like in               \documentclass[a4paper,10pt]{scrartcl}     \usepackage[utf8x]{inputenc}     \usepackage{lipsum}     \usepackage{fancyhdr}     \pagestyle{fancy}          \begin{document}          \section{some section with quite a lengthy title}     \sectionmark{short section}     \lipsum     \subsection{very very very long title of subsection}     \subsectionmark{short subsection}     \lipsum          \end{document}      But this just doesn't work right - the short subsection mark is not obeyed on page 2, but is used correctly on page 3. That feels just really wrong. So, how can I make version 2 work 'right'?


title: How to specify the arrow length in TikZ?

text: I've a small problem in Tikz. I try to draw arrows within 4 dimensions. Every arrow should have equal length. My implementation right now works with coordinates. There is a rectangle with a center point and in each direction a point at the edge. I'd like to draw an arrow from the center in each direction with the same size. Right now I draw between the center and this construct: `($(center)!0.5!(borderpoint)$)`. The problem with that is, it differs between the short an width edges but I'd like to have the same length in every direction. Example:               \draw[thick] (0,0) -- (6,0) -- (6,3) -- (0, 3) -- cycle;     \draw[->, thick] (3,1.5) -- ($(3,1.5)!0.5!(0,1.5)$);     \draw[->, thick] (3,1.5) -- ($(3,1.5)!0.5!(6,1.5)$);     \draw[->, thick] (3,1.5) -- ($(3,1.5)!0.5!(3,3)$);     \draw[->, thick] (3,1.5) -- ($(3,1.5)!0.5!(3,0)$);     \shade[shading=ball, ball color=black!90] (3,1.5) circle (0.25em);      ![Arrows](http://i.stack.imgur.com/SFccQ.png) I wish to: _draw_ an _arrow from Startpoint_ in _direction of DestPoint_ for an _length of X_. :))


title: Command \color already defined

text: I have the following code in my latex command .               \newcommand{\color}[1]{\lceil (#1+2)^2/2\rceil}      After that I have inserted the following command for insertion of code in LATEX documents .               \usepackage{listings}     \usepackage{color}          \definecolor{dkgreen}{rgb}{0,0.6,0}     \definecolor{gray}{rgb}{0.5,0.5,0.5}     \definecolor{mauve}{rgb}{0.58,0,0.82}          \lstset{frame=tb,       language=Java,       aboveskip=3mm,       belowskip=3mm,       showstringspaces=false,       columns=flexible,       basicstyle={\small\ttfamily},       numbers=none,       numberstyle=\tiny\color{gray},       keywordstyle=\color{blue},       commentstyle=\color{dkgreen},       stringstyle=\color{mauve},       breaklines=true,       breakatwhitespace=true       tabsize=3     }      But TEXMAKER compiler shows me error that command `\color` is already defined. Why does compiler show error for insertion of these code ? Can you suggest me an way to solve this issue ?


title: A question about a macro definition error

text: Given:               \documentclass{minimal}     \newcommand{\emrule}[1]{\rule[4pt]{#1em}{0.2pt}}     \newcommand{\endash}{\emrule{.5}}     \begin{document}     2000\endash2013     \end{document}      I get:               ! LaTeX Error: Command \endash already defined.                    Or name \end... illegal, see p.192 of the manual.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.3 \newcommand{\endash}{\emrule{.5}}          ?       So my first question is what manual---`see p.192 of the manual.`? Through experimentation I believe that what is going on here is a name clash. The processor sees `\end` and hits the brake with an attendent error message. For instance `\EMdash` and `\enrule` both work without error. Since I lack sufficient macro-foo, could someone with greater knowledge than I please clarify? BTW if I comment out the definition of `\endash` it fails with a message about `\endash` not defined:               ! Undefined control sequence.     l.5 2000\endash                    2013     ?       Which leads me back to my contention that this is a name clash with just `\end`.


title: Adjusting longtable fontsize in latex

text: I am not very good at Latex. I have to write a table spanning multiple pages. The following code produces the a table exactly the way i want, however it reduces the font size. If i do not use the \footnotesize the table does not fit in the page horizontally. I looked older post but i could not find the exact solution i am looking. Is there anything i can add to make the font size normal while keeping everything as it is?               \documentclass[12pt]{article}     \usepackage{longtable}     \begin{document}     \footnotesize              \begin{longtable}[c]{@{\extracolsep{\fill}}|l|l|l|l|@{}}          \caption{Literature review}\\     \hline     Sample & Selection Criteria & Results and Discussions & Reference \\     \hline     \endfirsthead     \multicolumn{4}{c}%     { } \\     \hline     Sample & Selection Criteria & Results and Discussion & Reference \\     \hline     \endhead     \hline \multicolumn{4}{r}{\textit{Continued on next page}} \\     \endfoot     \hline     \endlastfoot     1275 LSC &Radial Velocity &$\ast$anisotropic distribution & Flin \&\\     galaxies&RV)$<$2600 &$\ast$SVs of galaxies tend to lie&Godlwoski\\     UGC)&km\,s$^{-1}$&parallel to the plane&(1986)\\     \end{longtable}     \end{document}


title: Expanding arguments to pgf/tikz styles

text: In an answer on this site is proposed a method to draw arrows on paths. For example, using the style `[arrow inside={pos=0.2}]` will put an arrow at position `0.2` on the path :               \begin{tikzpicture}     \tikzset{       set arrow inside/.code={\pgfqkeys{/tikz/arrow inside}{#1}},       set arrow inside={pos/.initial=.5, end/.initial=>},       arrow inside/.style={         set arrow inside={#1},         postaction={           decorate,           decoration={             markings,             mark=at position \pgfkeysvalueof{/tikz/arrow inside/pos} with \arrow{\pgfkeysvalueof{/tikz/arrow inside/end}}           }         }       },     }          \draw[arrow inside={pos=0.2}] (0,0) -- (5cm,5cm);     \end{tikzpicture}      Now, I would like to do something like               \draw[arrow inside={pos=0.2}, arrow inside={pos=0.8}] (0,0) -- (5cm,5cm);      and end up with two arrows, one at position 0.2 and the other at position 0.8. This does not work, because the second call to `set arrow inside` modifies the value of the key `/tikz/arrow inside/pos` and hence the style (only the second arrow is drawn). I tried to play with expansion rules, but I fail to wrap my mind around these things, so I hope perhaps somebody else will manage to do so (or perhaps the problem is somewhere else, and then I hope somebody will point out where !). For the record, the original answer also provides another way to circumvent this problem by modifying the syntax a little, and that solution may be useful in practice. (However, I for one am interested in a solution to the evaluation order problem.) Thanks in advance !


title: How to install mathgifg.sty package on Windows with TeX Live 2013

text: How do I install the `mathgifg` package on Windows using TeX Live 2013? I am using `pdflatex`.


title: How can I get titles on the top of grouped bars?

text: I have a bar plot with grouped bars. Each group should contain the total sum on top of the group. Example: ![enter image description here](http://i.stack.imgur.com/80stD.png) My example has two problems:   * The x-position is estimated   * The y-psition (height) depends on the 2nd bar How can I get the sums to their correct positions? The example is created with this code:               \documentclass[border=5mm] {standalone}     \usepackage{pgfplots, pgfplotstable}          \begin{document}            \begin{tikzpicture}       \begin{axis}[         title={Test},         ybar, ymin=3,           bar width=5mm,         enlarge y limits ={value=0.3,upper},         symbolic x coords={a,b,c,d},         xtick=data,         nodes near coords,          nodes near coords align={anchor=north},%Move values in bar anchor=mid       ]       %Active       \addplot [fill=blue] coordinates {         ({a},15) [xa]         ({b},25)         ({c},35)         ({d},55)};       \addlegendentry{Active}       %Inactive       \addplot [fill=red] coordinates {         ({a},60)         ({b},50)         ({c},40)         ({d},30)}           [yshift=5mm]           node[pos=0] {a: 75}           node[pos=.25] {b: 75}           node[pos=.5] {c: 75}           node[pos=1] {d: 45};           \addlegendentry{Inactive}         \end{axis}       \end{tikzpicture}     \end{document}      Remarks:   * This is a follow up of another question: How can I get a stacked bar with single values and sum on top.   * There is already a similar question using bar chart to compare two groups of data, how to draw one node (showing the ratio) per two bars?   * There is no need to calculate the sum. The code is generated and my generator can calculate the sum. But it would be nice, if it would be possible to calculate sum of each group.


title: !file ended error when using \nobibliography*

text: I have the following setup                \documentclass[oneside,12pt]{Classes/CUEDthesisPSnPDF}          \usepackage{bibentry}          \begin{document}          \nobibliography*          \section{Introduction}          \begin{itemize}     \item \bibentry{bob}     \end{itemize}          \end{document}      However when I try to compile I get the following error.               ! File ended while scanning use of \BR@c@bibitem.<inserted text>\par \nobibliography      I assumed this was a missing } somewhere in my bib file but I have had a look and there are no such errors. I'm at a bit of a loss as to what the issue could be. Could anyone point me in the right direction?   * full class available here http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/ThesisStyle/


title: Custom chapter style with Tikz and the report class

text: I'm trying to use the same procedure than Customizing chapter style with tikz, for the report class and twoside printing. However for even pages i'm having an unespected behavior (see Fig 2). While for odd pages i'm not having problems (see Fig 1). **Figure 1** ![Fig1](http://i.stack.imgur.com/4QOlT.png) **Figure 2** ![Fig2](http://i.stack.imgur.com/bXjZS.png) I read in the documentation for titlesec one could use the extra option `\titleformat{name=\chapter,page=even/odd}` for even or odd pages, however when i compile a simpler version of the code the color boxes are not shown in the pdf.               \documentclass[11pt, a4paper,twoside]{report}     \usepackage{lipsum}     \usepackage[explicit]{titlesec}     \usepackage{fourier}     \usepackage{tikz}     \usepackage{epigraph}     \usepgflibrary{qrr.shapes.openrectangle}          \definecolor{mybluei}{RGB}{0,173,239}     \definecolor{myblueii}{RGB}{63,200,244}     \definecolor{myblueiii}{RGB}{199,234,253}          \tikzset{     mynode/.style={       rounded corners=30pt,       shape=open rectangle,       open rectangle fill=myblueii,       open rectangle sides=#1,       }     }          \titleformat{name=\chapter,page=even}[display]       {\usefont{T1}{qhv}{b}{n}\selectfont}       {}       {20pt}       {%       \begin{tikzpicture}[remember picture,overlay]       \node[         anchor=west,         rectangle,         minimum height=4cm,         text width=\paperwidth,         xshift=-\the\dimexpr\oddsidemargin+1in\relax,         outer sep=0pt,         fill=myblueiii] (titlerect) {};       \node[         anchor=south west,         xshift=2cm,         text width=\textwidth]          at ([yshift=5pt]titlerect.south west) {\huge #1};       \node[         mynode=nw,         anchor=south east,         fill=myblueii,         inner xsep=1.5cm,         outer sep=0pt,         font=\color{white},         minimum height=30pt]          at (current page.east|-titlerect.north)          {\bfseries\MakeUppercase{\chaptertitlename}\ \thechapter};       \end{tikzpicture}%       }     \titleformat{name=\chapter,page=odd}[display]       {\usefont{T1}{qhv}{b}{n}\selectfont}       {}       {20pt}       {%       \begin{tikzpicture}[remember picture,overlay]       \node[         anchor=west,         rectangle,         minimum height=4cm,         text width=\paperwidth,         xshift=-\the\dimexpr\oddsidemargin+1in\relax,         outer sep=0pt,         fill=myblueiii] (titlerect) {};       \node[         anchor=south west,         xshift=2cm,         text width=\textwidth]          at ([yshift=5pt]titlerect.south west) {\huge #1};       \node[         mynode=nw,         anchor=south east,         fill=myblueii,         inner xsep=1.5cm,         outer sep=0pt,         font=\color{white},         minimum height=30pt]          at (current page.east|-titlerect.north)          {\bfseries\MakeUppercase{\chaptertitlename}\ \thechapter};       \end{tikzpicture}%       }     \titleformat{name=\chapter,numberless}[display]       {\usefont{T1}{qhv}{b}{n}\selectfont}       {}       {20pt}       {\huge #1}     \titlespacing*{\chapter}       {0pt}{-20pt}{60pt}               \begin{document}          \chapter{Chapter odd}     \lipsum[2]     \chapter{Chapter even}     \lipsum[2]     \chapter*{Numberless chapter}          \end{document}      How can i solve this problem?.


title: flush bottom an environment

text: Suppose, I have defined an environment called `myenvironment` which typesets multiple lines of text using various formats. So, the height of the environment depends on the text that it has which is different each time. What I need it to place the text at the bottom of the page. If in the definition of this environment I use `\vspace*{\fill}`, it does not work. Any solution for this? MWE:               \newenvironment{myenvironment}{\vspace*{\fill}       \begin{minipage}{\textwidth}         \begin{center}         OUTLINE OF THIS CHAPTER         \end{center}         \vspace*{-6pt}\sffamily\fontsize{12}{14}%         \setlength{\parindent}{0pt}%         \hrule height 0.5pt width \textwidth \vspace*{10pt}%         }%End of the begining commands       {\vspace*{10pt}%       \hrule height 0.5pt width \textwidth       \end{minipage}}


title: circuitikz 0.3.0 label relative position

text: I'm trying to draw a simple example circuit:               \documentclass[a4paper,oneside,titlepage]{article}      \usepackage[utf8]{inputenc}     \usepackage[siunitx]{circuitikz}     \usepackage{tikz}     \usepackage{siunitx}          \begin{document}     \begin{circuitikz}[scale=1.4]\draw      (0,0) to[C, l=\SI{10}{\micro\farad}] (0,2) -- (0,3)      to[R, l=\SI{2.2}{\kilo\ohm}] (4,3) -- (4,2)      to[L, l=\SI{12}{\milli\henry}, i=$i_1$] (4,0) -- (0,0)      (4,2) to[D*, *-*] (2,0) to [D*, -*] (0,2)      to[R, l=\SI{1}{\kilo\ohm}] (2,2) to[cV, v=\SI{0.3}{\kilo\ohm} $i_1$] (4,2)      (2,0) to[I, i=\SI{1}{\milli\ampere}, -*] (2,2)     ;     \end{circuitikz}     \end{document}      and I have a problem about the label of the current generator 'I': the presence of the two components (diodes) both on its right and left does not allow the label to be shown properly, overlapping the diodes. I would like the label to be positioned like the following figure: ![enter image description here](http://i.stack.imgur.com/aQ13s.png) (from this page) In that case, for the 'I' component, this line has been used:               (2,0) to[I, i=$1\milli\ampere$:15, -*] (2,2)      where you can see the `:15` directive, which in my case cannot be used (error). I suppose this is due to the package version. I hope I gave all the possible details to understand and reproduce the problem.


title: How can I access a specific glyph in LuaLaTeX/Fontspec?

text: The OTF version of Minion Pro contains several Dingbats glyphs I would like to access. Some of them are not unicode, so I can not just copy the specific unicode character I want to access into my text editor.   In specific, I am looking for the bold looking Moon on page 3 of this document: http://www.adobe.com/type/browser/pdfs/1719.pdf After searching, I could not figure out how to include a specific character from a font to my document. I found out that I can use the command `\symbol{glyph number}`, but don't see how I should obtain that number. Thus I ask my question more generally: how can I use a specific glyph from a font using LuaLaTeX?


title: tabular can't vertically align the cell to the top

text: I have the following code:               \documentclass[11pt]{article}     \usepackage{array}     \begin{document}          \begin{tabular}{|p{1cm}|m{1cm} | @{}m{0pt}@{}}         \hline             1-1 & 1-2&\\[1cm]             \hline             2-1 & 2-2 &\\[1cm]         \hline     \end{tabular}     \end{document}      Had to use a hack to make the last column align middle: Vertical alignment in table: m-column, row size - problem in last column Wikipedia says: >   1. p{'width'} --- paragraph column with text vertically aligned at the top > >   2. m{'width'} --- pragraph column with text vertically aligned in the > middle (requires array package) > > So I inspected the 1-st column to be top aligned, and the 2-nd to be middle aligned. But instead, both columns are middle aligned: ![enter image description here](http://i.stack.imgur.com/CLp3M.png) How to make the 1-st column cells top aligned?


title: Strange "missing \item" problem in enumerate

text: According to this website, the following should work:               \begin{enumerate}[I]         \item foobar     \end{enumerate}      Yet, I always get the same error, with any of the `[]` options:               ! LaTeX Error: Something's wrong--perhaps a missing \item.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.143   \item f                   oobar     ?       When I leave the `[]` options out, I get no error whatsoever, and it works like it should. I need to use capital Roman letters as symbols though, so I need to solve this problem. Does anybody know what I might have done wrong?


title: Tikzexternal and References

text: I understand that `tikzexternal` has difficulty when graphics objects contain references (cite, ref, etc...), due to issues with getting lock on the aux file: References in externalized pgfplots However, in my case, I am ONLY interested in externalizing the objects during draft runs, when the draft option is specified. At such time, the references are not important, only during the final run. How can I use tikzexternal in manner such that when the document is in draft, all the embedded references simply get ignored, therefore avoiding the aux file lock conflict. During the final run, I switch of tikzextrnal **entirely** via the `\tikzexternaldisable` command, so that the final graphics is rendered with the appropriate references.


title: Longtable monospace font

text: How do I format all the text in a longtable to monospace. Adding `\texttt{` before or after the `\begin{longtable}` and a `}` at the end gives me a               Runaway argument?     { \begin {longtable}{lll}      ! Paragraph ended before \text@command was complete.      error.


title: Force pgfplots to draw legend according to cycle list instead of the first plots

text: I use pgfplots to plot multiple curves from a file. The graph is plotted in two steps   1. Draw only the marks, taking the original values from the file   2. Draw only the lines, approximating the curve of the values with gnuplot So it looks something like this (the following only illustrates the reason why I face this problem):               \foreach \r in {1,...,9} { % first loop, marks         \addplot+[only marks]             plot table [x index=0, y index=\r]{file.csv};     }     \foreach \rg in {2,...,10} { % second loop, lines (gnu starts with 1)         \addplot+[no markers]             gnuplot [raw gnuplot]                 {                     f(x)=a*x+b;                     a=1; b=0.1;                     fit f(x) 'file.csv' using 1:\rg\space every ::1 via a;                     plot [x=0:10] f(x);                 };     }      Now the problem is that pgfplot seems to use the style of the first few plots it comes across. This leaves all legend entries without lines since the style of the first plots is only marks. Therefore, the following MWE produces an output like this, leaving the legend entries without lines:![enter image description here](http://i.stack.imgur.com/M57Ng.png)               \documentclass{standalone}     \usepackage{pgfplots}               \pgfplotscreateplotcyclelist{mycyclelist}{         {loosely dashed, blue}, {red}     }          \begin{document}     \begin{tikzpicture}        \begin{axis}[cycle list name = mycyclelist, legend entries={a, b}, legend pos=north west]         % only marks             \addplot+[only marks]             coordinates             {                 (0,0)                 (10,5)             };             \addplot+[only marks]             coordinates             {                 (0,0)                 (10,7)             };                  % no markers             \addplot+[no markers]             coordinates             {                 (0,0)                 (10,5)             };             \addplot+[no markers]             coordinates             {                 (0,0)                 (10,7)             };         \end{axis}          \end{tikzpicture}     \end{document}


title: Bibliography doesnt work -> missing item

text: My bibliography of my tex document doesnt work and i cant find out why. I created 2 books in bibTex, but if I refer to them via                %%% Main Document         \bibliography{Seminar}         \begin{thebibliography}         \bibitem[Knuth98]{ComProgram} \emph{The Art of Computer Programming}         \end{thebibliography}      the compiler says missing item on these lines. I did it just as in the tutorial in wich i found these lines. The bib file is also in the same folder as the document. I found many tutorials on google but i just dont seem to get it.


title: pstool fails where preamble in document works

text: In my template I make us of a command `\ExecuteAfterPackage` defined in `templatetools`. If I use that I get in trouble with the way `pstools` loads the preamble. For example this code                \documentclass{scrbook}           \usepackage{templatetools}      %% Definition of \ExecuteAfterPackage      %\newcommand{\ExecuteAfterPackage}[2]{%      %  %% #1: after this package      %  %% #2: code to execute      %  \AfterAtEndOfPackage{#1}{      %    #2%      %  }      %  \AtEndPreamble{%      %    \IfPackageNotLoaded{#1}{%      %      #2%      %    }      %  }      %}           % Load after: setspace       % Load before: hyperref      \ExecuteAfterPackage{setspace}{%       %      \usepackage[%         bottom,      % Footnotes appear always on bottom. This is necessary                      % especially when floats are used         stable,      % Make footnotes stable in section titles         perpage,     % Reset on each page         %para,       % Place footnotes side by side of in one paragraph.         %side,       % Place footnotes in the margin         ragged,      % Use RaggedRight         %norule,     % suppress rule above footnotes         multiple,    % rearrange multiple footnotes intelligent in the text.         %symbol,     % use symbols instead of numbers      ]{footmisc}      }           \usepackage[crop=pdfcrop]{pstool}           %\usepackage{setspace}           \begin{document}           \psfragfig*{images/pstool/testpic}{}           \end{document}      fails with               ! LaTeX Error: Command \FN@pp@footnote@aux already defined.                    Or name \end... illegal, see p.192 of the manual.      in `testpic-pstool.tex` Why is this not working together with `pstool` ?


title: Why is this elsarticle code not correctly compiling my .bib file?

text: I'm using an example code from a previous question. The code for the elsarticle document class from that past question is:               %%%%%%%%%%%%%%%%%%%%%%%%%%%%% test_els.tex %%%%%%%%%%%%%%%%%%%%%%%%%%%     \documentclass[preprint,12pt]{elsarticle}          \begin{document}     \section{Introduction}     Several researchers studied ruin probability, but for a survey see\cite{AsmussenandAlbrecher2010}.     For bulk arrival queues see \cite{ChaudhryandTempleton1983}          \bibliographystyle{model1-num-names}     \section{\refname}          \nocite{*}     \bibliography{mybib}          \end{document}      I copied that word-for-word into my MikeTex. Accompanying that was my .bib file (mybib):               %%%%%%%%%%%% mybib.bib %%%%%%%%%          @BOOK{AsmussenandAlbrecher2010,       author  = {Asmussen, S. and Albrecher, H.},       title   = {Ruin probabilities},       edition = {2nd ed.},       address = {Singapore},       publisher = {World Scientific},       year    = {2010}     }          @ARTICLE{Botta1987,       author  = {Botta, R. F. and Harris, C. M. and Marchal, W. G.},       title   = {Characterisation of generalised hyperexponential distribution functions},       journal = {Stochastic Models},        volume  = {3},       year    = {1987},       pages   = {115-148}     }          @BOOK{ChaudhryandTempleton1983,       author  = {Chaudhry, M. L. and Templeton, J. G. C.},       title   = {A First Course in Bulk Queues},       address = {New York},       publisher = {Wiley},       year    = {1983}     }      After saving that .bib, I ran the .tex file in MikeTex (PDFLatex > BibTex > PDFLatex > PDFLatex). I cannot seem to avoid getting this output. The code is so simple, yet I can't find what I'm doing wrong. Any advice?


title: TikZ picture: two arrow; one over the other

text: I have the following code:               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{matrix,arrows}          \begin{document}       \[             \begin{tikzpicture}              \matrix (m) [matrix of math nodes,row sep=3em,column sep=1em,minimum width=2em]{                   A &   & G \\                     & S &   \\              };              \path[-stealth]                 (m-1-1) edge node [above] {$f$} (m-1-3)                 (m-1-1)  edge [bend right] node [left] {$p\;$} (m-2-2)                 (m-1-3) edge node [right] {$\;q$} (m-2-2)                 (m-2-2) edge node [right] {$\epsilon$} (m-1-1);              \path[-stealth]                 ([yshift=5pt]m-1-1) edge node [right] {$g$} ([yshift=5pt]m-1-3);             \end{tikzpicture}         \]     \end{document}      I dare you to compile it. Then you will get a disgusting output. What I want is to get the two arrow on top one over the other (just like corolary 1.3.1.5, page 70, in the notes on http://math.umn.edu/~kwlan/articles/cpt-PEL-type- thesis-revision.pdf). Can anyone help? I would love if the solution didn't modify too much the way I coded the diagram since it is the way I always do it (with the matrix) but beggers can't be choosers, so.


title: How to insert an image inside a paragraph?

text: I'd like to insert a small image inside a paragraph, aligning it with the text. The following snapshot depicts what I have in mind. Notice the image at the end of the last line. ![Snapshot](http://i.stack.imgur.com/7FRHm.png)


title: Add Overbrace to describe a column of matrix

text: I want to add some over-braces to a matrix to get the following output: ![enter image description here](http://i.stack.imgur.com/Y5Tsv.png) However, this this what I managed to get: ![enter image description here](http://i.stack.imgur.com/XLJko.png) I don't know how to get the neuron 1 and neuron 2 headings...I was thinking of overbraces but not sure how to use it in this case. The stuff on the right of the matrix is not aligned properly...My equation number is moving to the next line as well..Can anyone help me please. My code is as follows (I am using amsmath package):                   \begin{equation}              \begin{matrix}          J          =          \begin{bmatrix}          \frac{\delta e_{1,1}}{\delta w_{1,1}}  & \frac{\delta e_{1,1}}{\delta w_{1,2}} &          \cdots & \frac{\delta e_{1,1}}{\delta w_{j,1}}  & \cdots \\[0.5em]               \frac{\delta e_{1,2}}{\delta w_{1,1}}  & \frac{\delta e_{1,2}}{\delta w_{1,2}} &           \cdots & \frac{\delta e_{1,2}}{\delta w_{j,1}}  & \cdots \\[0.5em]               \cdots & \cdots & \cdots &          \cdots & \cdots \\[0.5em]               \frac{\delta e_{1,M}}{\delta w_{1,1}}  & \frac{\delta e_{1,M}}{\delta w_{1,2}} &           \cdots & \frac{\delta e_{1,M}}{\delta w_{j,1}}  & \cdots \\[0.5em]               \cdots & \cdots & \cdots &          \cdots & \cdots \\[0.5em]               \frac{\delta e_{P,1}}{\delta w_{1,1}}  & \frac{\delta e_{P,1}}{\delta w_{1,2}} &           \cdots & \frac{\delta e_{P,1}}{\delta w_{j,1}}  & \cdots \\[0.5em]               \frac{\delta e_{P,1}}{\delta w_{1,1}}  & \frac{\delta e_{np,2}}{\delta w_{1,2}} &          \cdots & \frac{\delta e_{P,2}}{\delta w_{j,1}}  & \cdots \\[0.5em]               \cdots & \cdots & \cdots &          \cdots & \cdots \\[0.5em]                \frac{\delta e_{P,M}}{\delta w_{1,1}}  & \frac{\delta e_{P,M}}{\delta w_{1,2}} &            \cdots & \frac{\delta e_{P,M}}{\delta w_{j,1}}  & \cdots \\[0.5em]           \end{bmatrix} %\!\!            \begin{aligned}           &\left.\begin{matrix}           m = 1  \\[0.5em]           m = 2  \\[0.5em]           \cdots \\[0.5em]           m = M  \\[0.5em]           \end{matrix} \right\} %           p = 1\\           &\begin{matrix}           \phantom{\cdots}\cdots\\[0.5em]           \end{matrix}\\ %           &\left.\begin{matrix}           m = 1  \\[0.5em]           m = 2  \\[0.5em]           \cdots \\[0.5em]           m = M\\[0.5em]           \end{matrix}\right\}%           p = P\\          \end{aligned}          \end{matrix}          \end{equation}


title: Left margin for 'custom' item of enumeration

text: I'm recently started making my homework in LaTeX. I'm using the following style.               \begin{enumerate}[leftmargin=0.5cm]       \begin{enumerate}         \item Question         \item[answer (a)] Answer       \end{enumerate}     \end{enumerate}      But what happens is that answer "(a)" is aligned all the way to the left, not directly underneath the "(a)" of the question. How can I align it alright? I'm already using the enumitem package.


title: How do I switch between Vector and Raster (bitmap) Fonts?

text: **Q. What do you exactly need?** **A.** I need to compile twice one and the same document in **PDFLaTeX** using   * vector fonts from **CM-Super** package   * standard raster **Computer Modern** fonts * * * **Q. Why do you need that?** **A.** Because **CM-Super** fonts are produced by auto-tracing. They are suitable for on-screen reading, but not quite for print. * * * **Q. But then why not use AMS-BlueSky fonts or Latin Modern?** **A.** They either do not have **Cyrillic** letters, or if they have, they are of rather poor quality, and do not have optical sizes. * * * **I have a solution** - using two instances of **MiKTeX Portable**. One having all needed vector fonts packages, and the other with all these packages removed. Then having two **PDFLaTeX** profiles in the editor - on for every **MiKTeX Portable** instance. **But that solution is not convenient...**


title: Making A Collection of Files Searchable

text: I have a request, one of which I am not certain attainable. Recently I have gone from taking notes in Evernote, to just taking notes using my latex distribution, by reason of the fact that whenever I had to type of an equation in Evernote, I had to go to the website http://www.codecogs.com/latex/eqneditor.php, and generate an image, which I found particularly annoying. I also like using latex because it is allows for a lot of customization. However, one thing that I did enjoy about Evernote was the fact that all my notes were contained in one area, and every single note was capable of being searched at once. Here comes my request: Does anyone know of a way of making all of the pdf files that I generate from my latex distribution searchable, without actually having to open each individual pdf, and searching through it?


title: When will TeX Live 2013 ISO file be released?

text: In this page, I couldn't understand the date for releasing TeX Live 2013 ISO file. So when will TeX Live 2013 ISO file be released?


title: LaTeX document to epub or mobi ebook formats (with mathematical formulas)

text: Recently I purchased an ebook reader (Kindle), and I want to export some of my document in LaTeX to an ebook format. I tried exporting from LaTeX to PDF, but isn't perfect because I have to zoom in-out and move around the page many times (isn't confortable like when you read a normal ebook purshased in book stores). I tried too exporting to RTF, but **_none** of my mathematical formulas_ were in the output document. So, do you know a better way to export from LaTeX documents to ebook formats that includes **mathematical formulas**? And, that works with Kindle (mobipocket)!


title: Are the talks from TUG 2012 available online as videos?

text: Are the talks from TUG 2012 available online as videos somewhere? Talks from TUG 2007 to 2011 can be watched at River Valley TV, but I can't find anything from TUG 2012. Are the 2012 talks online? If yes, where should I be looking?


title: a bolder \overline

text: This is similar but hopefully not repetitive with other questions answered here... I want to use a straight line decoration above a formula to denote the mean value over observations. My main problems with `\overline` is that it is too light. I've tried the `\bm` option but it only seems to work with `\bar`, not `\overline`. It would also be great to slightly trim the `\overline` decoration as is done with the `\overbar` command, described in another answer on this forum


title: LaTeX/XeTeX setup Tamil/Indic languages

text: I use TexMaker and LyX in Ubuntu. I'd like to typeset Tamil/Telugu/Hindi text, and so far I've been unsuccessful. Please suggest me a working TeX/LaTeX/variants setup for Indic languages, especially Tamil. edit: XeTeX seems to have good Unicode support, and I read TexMaker has XeteX support too. I installed all XeTeX, latex-tamil packages etc. But couldn't make them work yet. Documentations talk about Arabic or Korean text. Nothing mentioned about Tamil/Indic text.


title: Problem when running babel

text: I am using `babel` installation (used Miktex 2.9 package manager to install) and the Culmus MiKTeX package (retrieved from http://www.ma.huji.ac.il/~sameti/tex/culmusmiktex.html)               \documentclass{article}     \usepackage[english,hebrew]{babel}     \begin{document}     שלום     \end{document}      When running the code I get the following error (shown in the `.log` file)               This is pdfTeX, Version 3.1415926-1.40.11 (MiKTeX 2.9) (preloaded format=pdflatex 2014.3.5)  5 MAR 2014 15:14     entering extended mode     **letter.tex     (<file path omitted>     LaTeX2e <2009/09/24>     Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar     abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,      croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga     lician, german, german-x-2009-06-19, greek, gujarati, hindi, hungarian, iceland     ic, indonesian, interlingua, irish, italian, kannada, kurmanji, lao, latin, lat     vian, lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerm     an, ngerman-x-2009-06-19, nynorsk, oriya, panjabi, pinyin, polish, portuguese,      romanian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swis     sgerman, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, u     senglishmax, welsh, loaded.     ("C:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls"     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     ("C:\Program Files\MiKTeX 2.9\tex\latex\base\size10.clo"     File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)     )     \c@part=\count79     \c@section=\count80     \c@subsection=\count81     \c@subsubsection=\count82     \c@paragraph=\count83     \c@subparagraph=\count84     \c@figure=\count85     \c@table=\count86     \abovecaptionskip=\skip41     \belowcaptionskip=\skip42     \bibindent=\dimen102     )     ("C:\Program Files\MiKTeX 2.9\tex\latex\babel\babel.sty"     Package: babel 2013/12/03 3.9h The Babel package          ("C:\Program Files\MiKTeX 2.9\tex\generic\babel\switch.def"     File: switch.def 2008/07/08 v3.8m Babel language switching mechanism     )     *************************************     * Local config file bblopts.cfg used     *     ("C:\Program Files\MiKTeX 2.9\tex\latex\00miktex\bblopts.cfg"     File: bblopts.cfg 2006/07/31 v1.0 MiKTeX 'babel' configuration     )     ("C:\Program Files\MiKTeX 2.9\tex\generic\babel\english.ldf"     Language: english 2005/03/30 v3.3o English support from the babel system          ("C:\Program Files\MiKTeX 2.9\tex\generic\babel\babel.def")     ("C:\Program Files\MiKTeX 2.9\tex\generic\babel\babel.def")     ("C:\Program Files\MiKTeX 2.9\tex\generic\babel\babel.def")     ("C:\Program Files\MiKTeX 2.9\tex\generic\babel\babel.def")     ("C:\Program Files\MiKTeX 2.9\tex\generic\babel\babel.def")     ("C:\Program Files\MiKTeX 2.9\tex\generic\babel\babel.def")     ("C:\Program Files\MiKTeX 2.9\tex\generic\babel\babel.def")     ("C:\Program Files\MiKTeX 2.9\tex\generic\babel\babel.def")     ("C:\Program Files\MiKTeX 2.9\tex\generic\babel\babel.def")     ("C:\Program Files\MiKTeX 2.9\tex\generic\babel\babel.def")     ("C:\Program Files\MiKTeX 2.9\tex\generic\babel\babel.def")     ("C:\Program Files\MiKTeX 2.9\tex\generic\babel\babel.def")     ("C:\Program Files\MiKTeX 2.9\tex\generic\babel\babel.def")     ("C:\Program Files\MiKTeX 2.9\tex\generic\babel\babel.def")     ("C:\Program Files\MiKTeX 2.9\tex\generic\babel\babel.def")     ("C:\Program Files\MiKTeX 2.9\tex\generic\babel\babel.def")     ("C:\Program Files\MiKTeX 2.9\tex\generic\babel\babel.def")     ("C:\Program Files\MiKTeX 2.9\tex\generic\babel\babel.def")     ("C:\Program Files\MiKTeX 2.9\tex\generic\babel\babel.def")     ("C:\Program Files\MiKTeX 2.9\tex\generic\babel\babel.def")     .... last line repeated hundreds of times      Looking at the `.log` it seems that Hebrew is not one of the supported languages. However, removing the `hebrew` option (e.g. `\usepackage[english]{babel}` has the same output). What's going on here?


title: siunitx's \ang errors with variable

text: When I put a number into a variable and put that variable into `\ang`, I get an `siunitx` error:               \documentclass{article}     \usepackage{siunitx,pgfplots}          \begin{document}     \def\degreed{129.2234}     \pgfkeys{/pgf/number format/.cd,int trunc}     \pgfmathprintnumberto{\degreed}{\degree}     \degree\\     \ang{\degree}% Returns:     %! siunitx error: ``restricted-number''     %!     %! Token '$' forbidden in restricted numerical input.          \ang{129}%works     \end{document}      Is it possible to put a variable into `\ang`?


title: ContinuedFloat, and Subfloat

text: In my thesis I have a lot of figures with a common caption and multiple subfigures (a,b,c..etc). I wanted to split them between the pages because I don't want to fit them all in one page, therefore I used the commands `\subfloat` and `\ContinuedFloat`. It helped, BUT:   1. The numbering of the figures started from 0, i.e. Fig.1.0 which it shouldn't.   2. The numbering was not in sequence, it started like that: Fig.1.0, Fig.1.1, Fig.1.2, then went back Fig.1.1, then Fig.1.2....etc and even in the subfigures the numbering was not in sequence, it was like: Fig.1.0 (a) and Fig.1.1 (b) instead of Fig.1.0 (b).... This is the code I used:               %\clearpage     \begin{figure}[h!]     %\subfigure[]{     \centering     \subfloat{\includegraphics[width=1.0\columnwidth]{fig1.eps} } \,      \label{int1}}%     \end{figure}     %\clearpage     \begin{figure}[h!]     \ContinuedFloat     %\subfigure[]{     \centering     \subfloat{\includegraphics[width=1.0\columnwidth]{fig2.eps} } \,      \label{int2}}%     \caption{my figures (a) and (b).}     \label{int}     \end{figure}      Then it was a matter of copying and pasting for the other figures (and subfigures).


title: How to show ~(tilde) in footnote?

text: > **Possible Duplicate:**   >  Correctly typesetting a tilde I can show ~(tilde) in normal text, using text as follows,               \begin{quote}     \verb|~|     \end{quote}      But the problem is when I try to put this in footnote{}. Error will be thrown, how should I do this?


title: The use of \pause in beamer is causing the unnecessary addition of headers

text: I'm trying to use Beamer to create a presentation however I've got a problem when trying to use `\pause` to create an overlay. The following is the code I'm working with...               \documentclass{beamer}     \usepackage{lmodern}          \title[Gene Gain and Loss in the White Rust Pathogen]{Gene Gain and Loss during Evolution of Obligate Parasitism in the White Rust Pathogen of \textit{Arabidopsis thaliana}}     \subtitle[]{\scriptsize Eric Kemen, Anastasia Gardiner, Torsten Schultz-Larsen, Ariane C. Kemen,      \\Alexi L. Balmuth,     Alexandre Robert-Seilaniantz, Kate Bailey, Eric Holub,\\ David J. Studholme, Dan MacLean,     Jonathan D. G. Jones}     \author[Ben]{Ben}     \date[30/01/2013]{30$^\text{th}$ January 2013}     \institute{Imperial College London}          \usetheme{Dresden}     \usecolortheme{beaver}          \begin{document}          \begin{frame}     \titlepage     \end{frame}          \begin{frame}     \frametitle{Study Background}          \section{Study Background}     \begin{itemize}     \item It has been proposed, but not shown, that obligate biotrophy results from:     \begin{enumerate}     \item Reduced selection for maintenance of biosynthetic pathways \pause     \item Gain of mechanisms to evade host recognition or suppress host defence \pause      \end{enumerate}     \item Previous research on powdery mildew fungus \textit{Blumeria graminis} or downy mildew oomycete \textit{Hyaloperonospora arabidopsidis} reveals a close correlation between the parasitism and massive gene losses in primary and secondary metabolism     \end{itemize}     \end{frame}          \section{Study Methodology}     \begin{frame}     \frametitle{Study Methodology}          \end{frame}          \section{Study Results}     \begin{frame}     \frametitle{Study Results}          \end{frame}          \section{Author's Discussion}     \begin{frame}     \frametitle{Author's Discussion}          \end{frame}          \section{Conclusions}     \begin{frame}          \frametitle{Conclusions}     \framesubtitle{Implications, and Future Directions}     \end{frame}          \end{document}      After using the `\pause` commands in the "Study Background" slide I get the same section appended to the header of each slide for each pause.. more visually I mean this ![Unnecessary addition of section headers](http://i.stack.imgur.com/M1xP4.png) Any idea how to rectify this so there's just one section header as I suspect should be the case?


title: punctuation after a fraction in math mode

text: I use to punctuate my equations. In math mode, when the last "word" is a fraction, I raise the final point using `\cdot` like in               x = \frac{3}{2} \cdot      so that the "." is at the same height as the fraction bar. So my questions are:   * Is it good practice?   * Is there an equivalent of `\cdot` for the comma?


title: How I can define last row on each page on multipage table?

text: Is there any way of determination last row of each page in multipage tables. For example if I want add double line on end of each page, or some special content of cells in last row. I use the `longtable` package. Here should be considered, that last rows on pages can be changes, I mean that last row can become the first on the next page, when some additional content will be added to before table.


title: Ignore citations in captions in list of figures when numbering

text: When using the `\cite` command in figure captions and the `ieeetr` bibliography style, then BibTeX numbers the citations as appearing earlier than they do in reality (i.e. the first citation in the document ends up being [42]). Is there any way to get BibTeX to ignore the `\listoffigures` section when numbering?


title: Reference numbers out of order using BibTex

text: I'm using `natbib`, `cleveref`, `bibtex` and `.bib` files to generate my references, using `\cite{reference}`. At first, it does it very well, but when a re-compiling is done---with the same commands---, the appearing number of the references changes, instead of having 1, it has 2. The code:               \documentclass[10pt,letterpaper,hidelinks]{book}     \usepackage{hyperref}     \usepackage{graphicx}     \graphicspath{{figures/}}     \usepackage[numbers,sort&compress]{natbib}     \usepackage{cleveref}          \begin{document}     \frontmatter     \tableofcontents     \listoffigures     \listoftables          \bibliographystyle{unsrtnat}          \mainmatter     \include{fileWithReferences}          \appendix          \backmatter          \bibliography{articles,reports,books}          \end{document}      Since running latex -> bibtex -> latex -> latex is time consuming at first run, how can I fix the 're-ordering'? The fileWithReferences.tex looks like:               \chapter{Energy}          Some text \cite{Turcotte2002}, some other text \cite{Anderson1989}. In \cref{figure:AltEn} there's a reference to a book.          \begin{figure}[!ht]         \centering         \includegraphics[scale=.1]{Alternative_Energies.jpg}         \caption{Alternative energies \cite{Anderson1989}}         \label{figure:AltEn}     \end{figure}          Here another reference \cite{Turcotte2002}.      And the books.bib file looks like:               @book{Turcotte2002,     author = {D.L. Turcotte and G. Schubert},     title = {Geodynamics},     year = {2002},     OPTedition = {2nd.},     }          @book{Anderson1989,     author = {Don. L. Anderson},     title = {Theory of the Earth},     year = {1989},     }      Output (first run): ![Output \(first run\)](http://i.stack.imgur.com/NPntO.png) Output (second run): ![Output \(second run\)](http://i.stack.imgur.com/4i4Kn.png)


title: References numbering

text: Latex is numbering my references from the very document beginning including the List of Figures. As a consequence, the first reference to be cited (in the introduction) is already number 5. How can I set LaTeX to start the counting in introduction only?


title: Modifying section, subsection based on scope?

text: Using MS Word 2013 I mocked up what I would like to create using LaTeX: ![MS word simulation](http://i.stack.imgur.com/hYZr6.png) I tried exporting it in LibreOffice using its writer2latex; but that didn't work. So starting from the sectionbox LaTeX package, I wrote this:               \begin{sectionbox}{Title}         \subsection{Description}         \subsection{Design}         \subsection{Tasks}         \begin{itemize}             \item         \end{itemize}     \end{sectionbox}      Without modifying how `section`, `subsection` and `subsubsection` are treated everywhere else (using IEEE template), how do I get this to work?


title: Amsmath: Using \tag{name} when you have a long name

text: When the name is long, the centering of the equations is off even though the tagged name wouldn't overlap the content. How can I center equations with a long name?               \documentclass{article}     \usepackage{amsmath}     \begin{document}     \begin{align*}       1 &= 1\\       2 &= 2\tag{This is a long tag}\\       3 &= 3     \end{align*}     \end{document}      From the image below, we can see that there is enough space to center the equations with the document and not have overlap. ![enter image description here](http://i.stack.imgur.com/bRM7F.png)


title: Circular Arrows and Text on Path

text: I did some basic tikz figures, but i have absolutely no idea how to do a figure like this: ![enter image description here](http://i.stack.imgur.com/GvOxH.jpg) Each text block should be aligned on a circular path and centered within the arrows. Could anyone please provide me an example how to get such a figure or give me a brief idea of where to start?


title: Rightarrow with a Delta on it (for use with the mhchem package)

text: I have a small problem with arrows. I need a `\rightarrow` with a `\Delta` on it. Can you help me, please? I use the chemistry package `\usepackage[version=3]{mhchem}`.


title: How can I prevent breaks in a custom environment?

text: I have a custom example environment:               \newcounter{examplecounter}     \renewcommand{\theexamplecounter}{\arabic{examplecounter}}     \newenvironment{Beispiel}[1][]{%     \goodbreak%     \refstepcounter{examplecounter}%     \begin{list}{}{\setlength{\rightmargin}{\leftmargin}}%     \item[{\textbf{Beispiel~\theexamplecounter:}}]#1\item[]}{%     \end{list}}      This works fine, except if there is a bad page break: ![enter image description here](http://i.stack.imgur.com/257dq.png) It's ok to break this environment (in fact it is necessary as some examples are very long), but I would like to force LaTeX to keep the title with some text (lets say at least two lines or a complete table / image). How can I get that? ## Complete minimal example               \documentclass[a4paper]{scrartcl}     \usepackage{blindtext}          \newcounter{examplecounter}     \renewcommand{\theexamplecounter}{\arabic{examplecounter}}     \newenvironment{Beispiel}[1][]{%     \goodbreak%     \refstepcounter{examplecounter}%     \begin{list}{}{\setlength{\rightmargin}{\leftmargin}}%     \item[{\textbf{Beispiel~\theexamplecounter:}}]#1\item[]}{%     \end{list}}          \begin{document}     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla quam      elit, vestibulum nec facilisis at, condimentum id enim. Sed iaculis      lacinia quam, vel accumsan eros tempor in. Integer ipsum metus,      accumsan sit amet commodo a, egestas vitae sem. Mauris ut orci ut      dolor viverra convallis nec a erat. Aenean consequat elit vel eros      fermentum vestibulum id at ipsum. In vitae orci mauris, et rhoncus      odio. Pellentesque habitant morbi tristique senectus et netus et      malesuada fames ac turpis egestas.          \blindtext[4]          \begin{Beispiel}[A title]     \begin{tabular}{ccc}         1 & 2 & 3\\         4 & 5 & 6\\         7 & 8 & 9       \end{tabular}     \end{Beispiel}     \end{document}


title: biblatex2 style file not found

text: After following the instructions here :A complete Biblatex example - from start to end and using the sample `test1.tex` file, I am unable to figure out why I keep getting the error message               ! LaTeX Error: File `biblatex2.sty' not found.      I am eventually attempting to implement OSCOLA via TexMaker but I can't even get a basic file using Biblatex working. Thanks in advance.


title: Is microtype fully supported now by XeLaTeX? If not, how can I keep myself up-to-date?

text: Is `microtype` fully supported now by XeLaTeX? If not, how can I keep myself up-to-date on this argument?


title: Lualatex, fontspec and externalized tikz problem in MacTeX

text: To enable faster compilation of large documents I'd like to externalize tikz pictures. I also have to use lualatex and fontspec. EDIT: After further testing it seems that this is a problem only when using MacTeX version of TeXLive. The following minimal example fails to compile for me unless I comment out fontspec               \documentclass{article}     %Comment the following line to get this to work!     \usepackage{fontspec}     \usepackage{pgfplots}        \pgfplotsset{compat=1.7}       \pgfplotsset{plot coordinates/math parser=false}       \newlength\figureheight       \newlength\figurewidth          \usetikzlibrary{external}      \tikzset{external/system call={lualatex         \tikzexternalcheckshellescape -halt-on-error         -interaction=batchmode -jobname "\image" "\texsource"}}     \tikzexternalize[shell escape=-enable-write18]          \begin{document}     \begin{figure}\tikzexternalize       \centering       \setlength\figureheight{4.00cm}        \setlength\figurewidth{6.00cm}        \begin{tikzpicture}         \begin{axis}[width=\figurewidth,height=\figureheight,           scale only axis,xmin=1,xmax=3,ymin=1,ymax=6,name=plot]           \addplot[color=blue,solid]           table[row sep=crcr]{             1 2\\             3 4\\             5 6\\           };         \end{axis}       \end{tikzpicture}%     \end{figure}     \end{document}      Error message is:               ===== 'mode=convert with system call': Invoking 'lualatex -halt-on-error      -interaction=batchmode -jobname "main2-figure0" "\def\tikzexternalrealjob{main2}     \input{main2}"' ========     This is LuaTeX, Version beta-0.70.2-2012062819 (TeX Live 2012)      restricted \write18 enabled.     Syntax Error: Couldn't find trailer dictionary     Syntax Error: Couldn't read xref table          !LuaTeX error (file main2-figure0.pdf): xpdf: reading PDF image failed      ==> Fatal error occurred, no output PDF file produced!          LaTeX exited abnormally with code 70 at Wed Apr  9 13:01:46      As suggested I've removed the externalization and added `\listfiles` which results in the following files:               This is LuaTeX, Version beta-0.76.0-2013061817 (rev 4627)  (format=lualatex 2014.4.10)  10 APR 2014 12:30         \write18 enabled.                   *File List*     article.cls    2007/10/19 v1.4h Standard LaTeX document class     size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)     fontspec.sty    2013/05/20 v2.3c Font selection for XeLaTeX and LuaLaTeX     expl3.sty    2012/02/08 v3343 L3 Experimental code bundle wrapper     l3names.sty    2011/12/30 v3113 L3 Experimental namespace for primitives     l3bootstrap.sty    2011/12/29 v3110 L3 Experimental bootstrap code     luatex.sty    2010/03/09 v0.4 LuaTeX basic definition package (HO)     infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)     ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)     etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)     luatex-loader.sty    2010/03/09 v0.4 Lua module loader (HO)     pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)     ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)     ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)     color.sty    1999/02/16     color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive     pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX     graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)     trig.sty    1999/03/16 v1.09 sin cos tan (DPC)     graphics.cfg    2010/04/23 v1.9 graphics configuration of TeX Live     l3basics.sty    2012/02/06 v3317 L3 Experimental basic definitions     l3expan.sty    2012/01/15 v3196 L3 Experimental argument expansion     l3tl.sty    2012/02/06 v3316 L3 Experimental token lists     l3seq.sty    2012/01/09 v3158 L3 Experimental sequences and stacks     l3int.sty    2012/02/06 v3315 L3 Experimental integers     l3quark.sty    2012/01/08 v3148 L3 Experimental quarks     l3prg.sty    2012/02/08 v3338 L3 Experimental control structures     l3clist.sty    2012/01/09 v3157 L3 Experimental comma separated lists     l3token.sty    2012/02/06 v3316 L3 Experimental token manipulation     l3prop.sty    2012/01/09 v3158 L3 Experimental property lists     l3msg.sty    2012/02/06 v3316 L3 Experimental messages     l3io.sty    2012/01/28 v3245 L3 Experimental input-output operations     l3file.sty    2012/01/31 v3287 L3 Experimental file operations     l3skip.sty    2012/02/06 v3313 L3 Experimental dimensions and skips     l3keys.sty    2011/12/22 v3086 L3 Experimental key-value interfaces     l3fp.sty    2012/02/06 v3315 L3 Experimental floating-point operations     l3box.sty    2012/01/09 v3158 L3 Experimental boxes     l3coffins.sty    2012/01/08 v3155 L3 Experimental coffin code layer     l3color.sty    2011/09/07 v2776 L3 Experimental colour support     l3luatex.sty    2012/01/09 v3158 L3 Experimental LuaTeX-specific functions     xparse.sty    2012/02/08 v3342 L3 Experimental document command parser     luaotfload.sty    2014/02/05 v2.4-3 OpenType layout system     luatexbase.sty    2013/05/11 v0.6 Resource management for the LuaTeX macro progr     ammer     luatexbase-compat.sty    2011/05/24 v0.4 Compatibility tools for LuaTeX     luatexbase-modutils.sty    2013/05/11 v0.6 Module utilities for LuaTeX     luatexbase-loader.sty    2013/05/11 v0.6 Lua module loader for LuaTeX     luatexbase-regs.sty    2011/05/24 v0.4 Registers allocation for LuaTeX     luatexbase-attr.sty    2013/05/11 v0.6 Attributes allocation for LuaTeX     luatexbase-cctb.sty    2013/05/11 v0.6 Catcodetable allocation for LuaTeX     luatexbase-mcb.sty    2013/05/11 v0.6 Callback management for LuaTeX     fontspec-patches.sty    2013/05/20 v2.3c Font selection for XeLaTeX and LuaLaTeX          fixltx2e.sty    2006/09/13 v1.1m fixes to LaTeX     fontspec-luatex.sty    2013/05/20 v2.3c Font selection for XeLaTeX and LuaLaTeX     fontenc.sty     eu2enc.def    2010/05/27 v0.1h Experimental Unicode font encodings     eu2lmr.fd    2009/10/30 v1.6 Font defs for Latin Modern     xunicode.sty    2011/09/09 v0.981 provides access to latin accents and many othe     r characters in Unicode lower plane     eu2lmss.fd    2009/10/30 v1.6 Font defs for Latin Modern     graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)     keyval.sty    1999/03/16 v1.13 key=value parser (DPC)     fontspec.cfg     pgfplots.sty    2012/10/26 v1.7 Data Visualization (1.7-2-ge24fff4)     tikz.sty    2010/10/13 v2.10 (rcs-revision 1.76)     pgf.sty    2008/01/15 v2.10 (rcs-revision 1.12)     pgfrcs.sty    2010/10/25 v2.10 (rcs-revision 1.24)     everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS)     pgfrcs.code.tex     pgfcore.sty    2010/04/11 v2.10 (rcs-revision 1.7)     pgfsys.sty    2010/06/30 v2.10 (rcs-revision 1.37)     pgfsys.code.tex     pgfsyssoftpath.code.tex    2008/07/18  (rcs-revision 1.7)     pgfsysprotocol.code.tex    2006/10/16  (rcs-revision 1.4)     xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)     color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive     pgfcore.code.tex     pgfcomp-version-0-65.sty    2007/07/03 v2.10 (rcs-revision 1.7)     pgfcomp-version-1-18.sty    2007/07/23 v2.10 (rcs-revision 1.1)     pgffor.sty    2010/03/23 v2.10 (rcs-revision 1.18)     pgfkeys.sty         pgfkeys.code.tex     pgffor.code.tex     tikz.code.tex     t3cmr.fd    2001/12/31 TIPA font definitions     supp-pdf.mkii     epstopdf-base.sty    2010/02/09 v2.5 Base part for package epstopdf     grfext.sty    2010/08/19 v1.1 Manage graphics extensions (HO)     kvdefinekeys.sty    2011/04/07 v1.3 Define keys (HO)     kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)     kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO)     etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)     epstopdf-sys.cfg    2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live


title: Scale Axis in PGFPlots without changing orientation

text: I'm trying to plot a data matrix using pgfplots and a surface plot. The method described in this question worked well for me: Using pgfplots, how do I arrange my data matrix for a surface plot so that each cell in the matrix is plotted as a square? Each square should be quadratic, so I tried to set the sizes by using "x = 1cm, y = 1cm", as described in this answer: http://tex.stackexchange.com/a/31028/29619 Unfortunately, this results in a mangled plot and a warning. This code compiles to a flat plot with non-square rectangles:               \documentclass[a4paper,10pt]{article}     \usepackage{tikz}     \usepackage{pgfplots}     \usepackage{pgfplotstable}     \begin{document}          \pgfplotstableread{         0 0 0.77         0 1 0              1 0 0         1 1 0     }\data          \begin{tikzpicture}        \begin{axis}[         width=5cm,         title={\texttt{Minimal purity plot}},         view={0}{90},         colormap={bluenew}{rgb255(0cm)=(255,255,255); rgb255(1cm)=(40,40,240)},         colorbar,         colorbar style={                 at={(1.5, 0.5)},                 anchor=west,                 xticklabel pos=right,         },         xmin=0,         xmax=1,         ymin=0,         ymax=1,         xtick=data,         ytick=data,         point meta min=0,         point meta max=1,         xlabel=x,         ylabel=y]     \addplot3 [surf, shader=flat corner] table {\data};     \end{axis}     \end{tikzpicture}     \end{document}      When I add "x = 1cm, y = 1cm" to the axis settings, a warning occurs about a missing size for set. If I add "z = 1cm" as well, it looks like a 3D-box again. It ought to look like in the MWE, but with different sizes. Is there a way to do this? Changing the width in the axis description did not help. **EDIT** Thanks to percusse's suggestion, the cells are now squares. I'd still like to have different plots with consistent cell sizes accross plots.               \pgfplotstableread{         0 0 0.77         0 1 0.5     0 2 0              1 0 0         1 1 0.3     1 2 0          2 0 0.9     2 1 0     2 2 0     }\datan          \begin{tikzpicture}     \begin{axis}[     title={\texttt{Second working plot}},         view={0}{90},         colormap={bluenew}{rgb255(0cm)=(255,255,255); rgb255(1cm)=(40,40,240)},         colorbar,         colorbar style={                 at={(1.5, 0.5)},                 anchor=west,                 xticklabel pos=right,         },         xmin=0,         xmax=2,         ymin=0,         ymax=2,         xtick=data,         ytick=data,         point meta min=0,         point meta max=1,         xlabel=x,         ylabel=y,     axis equal]     \addplot3 [surf, shader=flat corner] table {\datan};     \end{axis}     \end{tikzpicture}      In this second example, the cells are much smaller, since more of them are fitted in the same plot. I'd like the cell sizes to be consistent and the plot size to change instead.


title: Help me to recover the seed ! pdfuniformdeviate

text: I made a BIG mistake : I compiled a file and used some macro with `pdfuniformdeviate`. But I did not realized I will need to recompile this (official) document with the SAME random sampling. I keep all the file from the first compilation (log, aux, pdf). Is there a way to recover the seed from those files and set it to ensure the next compilation will all use the same original seed ?


title: Bibtex style help - alphabetical sort

text: I have found a Bibtex style that suits my requirements very well as it presents my sources exactly how I want. I am using the `\nocite{*}` command to display all my bibliography sources from my `.bib` file. My issue is that the sources then appear in the order that they are in the Bib file rather than in alphabetical order by author surname. Is there any way someone can tell me how to edit the bst file to make the references appear in alphabetical order rather than in the listed order? I have been searching around for ages trying to sort this myself but to no avail.


title: determine character code in LaTeX3 (equivalent for backtick notation)

text: Is there some dedicated `expl3` command that is equivalent to the backtick notation of TeX in order to determine the character code?


title: Texmaker and moderncv with TeX Live 2011

text: I'm trying to do my CV with `moderncv` but Texmaker show me an error               !LaTeX Error:File 'moderncv.cls' not found.       But the `moderncv` macro is installed in TeX Live 2011.


title: WinEdt 7: How has Unicode support changed from version 6?

text: The popular WinEdt editor has been just updated to version 7. It is claimed that now WinEdt supports Unicode. However it was also possible to compile Unicode texts in 6th version. I did not notice big difference between 6th and 7th version except that new version uses Unicode dictionaries. Could one explain item by item what has changed? The WinEdt website has only very brief statement on that issue. Note that answers to XeLaTeX, WinEdt 6.0 and UTF-8 might be helpful but not exhaustive.


title: Bitstream Charter = smaller font size and line spacing?

text: I'm currently writing a paper. I have to follow certain formatting guidelines one of which states that the font size is to be 12 pt. I also have to have 1.5 line spacing. In my preamble I therefore set               \documentclass[12pt,a4paper,oneside]{scrartcl}     \usepackage[onehalfspacing]{setspace}       This seems to work (i.e. the font size "looks like" 12 pt). I've since decided to use Bitstream Charter as my main body font, so I use               \usepackage[bitstream-charter]{mathdesign}      This results in my serif font being changed to Bitstream Charter as I wanted. However, the font "looks smaller" (and possibly also the line spacing). I've attached two screenshots one with the default font and one with Bitstream (same zoom level). My question is: Am I imagining this? If not, is there anything I can do to make the font size 12 pt? ![Bitstream](http://i.stack.imgur.com/w3pGd.png) ![Default](http://i.stack.imgur.com/oo5Ar.png)


title: amsart and titlesec - title font won't change

text: Ok, I am very new to LaTeX. I am using a default template. I have been trying to figure out how to change the font sizes and other formatting. Reading forums convinced me to try `titlesec`. All `titlesec` formatting is added to the template (which I don't really understand). The section headings will change size - but not the title. It stays at 12pt. And why is it in all caps? I think it has something to do with `amsart`, but I could really use some help. My setup looks like this:               \documentclass[12pt]{amsart}     \usepackage{geometry}                % See geometry.pdf to learn the layout options.      \geometry{letterpaper}                   % ... or a4paper or a5paper or ...      %\geometry{landscape}                % Activate for for rotated page geometry     %\usepackage[parfill]{parskip}    % Activate to begin paragraphs with an empty line rather than an indent     \usepackage{graphicx}     \usepackage{amssymb}     \usepackage{epstopdf}     \usepackage{titlesec}          \newcommand*{\justifyheading}{\raggedright}     \titleformat {\title}       {\normalfont \HUGE \bfseries \justifyheading}{\thesection}{1em}{}     \titleformat {\section}       {\normalfont \large \bfseries \justifyheading}{\thesection}{1em}{}     \titleformat {\subsection}       {\normalfont \large \bfseries \justifyheading}{\thesubsection}{1em}{}          \DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}          \title{Recall Some Preliminaries}     \begin{document}     \maketitle     \section*{Tensor Calculus}     %\subsection{}          whatever          \end{document}        The section headings will change size - but not the title. It stays at 12pt.


title: No page break before a heading, while preserving some vertical space before heading?

text: How can I prevent a page break before a run-in section heading while preserving vertical spacing before the heading? Based on the suggestion in How to prevent a page break before an itemize list?, I have defined a run-in heading as               \makeatletter     \newcommand{\runinheading}{\@startsection{paragraph}{4}{\z@}%                                              {2.1ex \@plus1ex \@minus 0.64ex}{-1em}%                                              {\sffamily\normalsize\bfseries}}     \newcommand{\nobreakruninheading}{\par\nobreak\@afterheading\runinheading}     \makeatother      I use this heading in the following way:               ..., but the process assignment is still in bijective     correspondence with the proof rules.          \nobreakruninheading*{Cut reduction as computation.}     The principal cut reduction is     \begin{equation*}     \text{several lines of math go here}     \end{equation*}     When annotated according to the process interpretation,     we can extract the process reduction      Indeed, LaTeX does not insert a page break before the run-in heading. However, there is no vertical space between the end of the paragraph (`... with the proof rules.`) and the run-in heading. I do know that there is enough room on the page with `1.6ex` of vertical space prior to the heading because if I instead define `\nobreakruninheading*` as `\vspace{1.6ex}\noindent{\sffamily\normalsize\bfseries #1}\hspace{1em}`, everything fits the way I want. I'd like to avoid resorting to this alternate definition, if possible, because it does not match the other section headings in my paper (which use `\@startsection`).


title: pdfpages doesn't allow me to draw a thick horizontal line in "tabular"

text: I have the following code:               \documentclass{article}     \usepackage{amssymb}     \usepackage{caption,sansmath}     \usepackage{array}     \DeclareCaptionFont{sansmath}{\sansmath}     \captionsetup{textfont={sf,sansmath}}          \newlength\Origarrayrulewidth          % horizontal rule equivalent to \cline but with 2pt width     \newcommand{\Cline}[1]{%      \noalign{\global\setlength\Origarrayrulewidth{\arrayrulewidth}}%      \noalign{\global\setlength\arrayrulewidth{2pt}}\cline{#1}%      \noalign{\global\setlength\arrayrulewidth{\Origarrayrulewidth}}%     }          % draw a vertical rule of width 2pt on both sides of a cell     \newcommand\Thickvrule[1]{%       \multicolumn{1}{!{\vrule width 2pt}c!{\vrule width 2pt}}{#1}%     }          % draw a vertical rule of width 2pt on the left side of a cell     \newcommand\Thickvrulel[1]{%       \multicolumn{1}{!{\vrule width 2pt}c|}{#1}%     }          % draw a vertical rule of width 2pt on the right side of a cell     \newcommand\Thickvruler[1]{%       \multicolumn{1}{|c!{\vrule width 2pt}}{#1}%     }          % Square cells in the matrix, so we just increase the space between rows     \renewcommand{\arraystretch}{1.5}          \begin{document}          \begin{table}     \parbox{.45\linewidth}{     \centering             \begin{tabular}{ c |c|c|c|c|c|}                 \multicolumn{1}{c}{~} & \multicolumn{1}{c}{$c_{1}$} & \multicolumn{1}{c}{$c_{2}$} & \multicolumn{1}{c}{$c_{3}$} & \multicolumn{1}{c}{$c_{4}$} & \multicolumn{1}{c}{$c_{5}$} \\ \cline{2-6}                 $r_{1}$ & 2     & 8     & 4     & 5     & 3     \\ \cline{2-6}                 $r_{2}$ & 4       & 9     & 6     & 7     & 1     \\ \cline{2-6}                 $r_{3}$ & 3       & 4     & 2     & 0     & 9     \\ \cline{2-6}                 $r_{4}$ & 1       & 0     & 9     & 8     & 4     \\ \cline{2-6}                 $r_{5}$ & 8       & 3     & 7     & 6     & 5     \\ \cline{2-6}             \end{tabular}             \caption{}         }         \hfill     \parbox{.45\linewidth}{     \centering             \begin{tabular}{ c |c|c|c|c|c|}                \multicolumn{1}{c}{~} & \multicolumn{1}{c}{1} & \multicolumn{1}{c}{2} & \multicolumn{1}{c}{3} & \multicolumn{1}{c}{4} & \multicolumn{1}{c}{5} \\ \Cline{2-2}\cline{2-6}                1 & \Thickvrule{\hspace{0.8em}}       & \hspace{0.8em}     & \hspace{0.8em}     & \hspace{0.8em}     & \hspace{0.8em}     \\ \Cline{2-3}\cline{3-6}                2 &  \hspace{0.8em}  & \Thickvrule{~}    & \hspace{0.8em}    & \hspace{0.8em}     &\hspace{0.8em}     \\ \cline{2-3}\Cline{3-4}\cline{4-6}                3 & \hspace{0.8em}       & \hspace{0.8em}     & \Thickvrule{\hspace{0.8em}}     & \hspace{0.8em}     & \hspace{0.8em}     \\ \cline{2-4}\Cline{4-5}\cline{6-6}                4 & \hspace{0.8em}       & \hspace{0.8em}    & \hspace{0.8em}     & \Thickvrule{\hspace{0.8em}}     & \hspace{0.8em}     \\ \cline{2-5}\Cline{5-6}                5 & \hspace{0.8em}      & \hspace{0.8em}     & \hspace{0.8em}    & \hspace{0.8em}     & \Thickvrule{\hspace{0.8em}}     \\ \cline{2-6}\Cline{6-6}             \end{tabular}             \caption{}     }     \end{table}          \end{document}       This code was copied from here: Change border of a few cells in a table The code is correct. When I am trying to use the `pdfpages` package, the thick horizontal line is not shown. Could you please answer what is the reason? When I remove this package, the line is shown successfully. I have a lot of matrices in the article, I can't remove them or rewrite, but also I must add an appendix at the end of the document. After redefining \setlength I have the error:               ! Missing number, treated as zero.     <to be read again>                         (     l.1584 \includepdf[pages=-]{nosingl1.pdf}          A number should have been here; I inserted `0'.     (If you can't figure out why I needed to see a number,     look up `weird error' in the index to The TeXbook.)          ! Illegal unit of measure (pt inserted).     <to be read again>                         (     l.1584 \includepdf[pages=-]{nosingl1.pdf}          Dimensions can be in units of em, ex, in, pt, pc,     cm, mm, dd, cc, nd, nc, bp, or sp; but yours is a new one!     I'll assume that you meant to say pt, for printer's points.     To recover gracefully from this error, it's best to     delete the erroneous units; e.g., type `2' to delete     two letters. (See Chapter 27 of The TeXbook.)      If I don't redefine it, the code is compiled successfully, that is the compilation error occurs when I am including a pdf file:               \includepdf[pages=-]{nosingl1.pdf}     \includepdf[angle=90]{nosingl2.pdf}     \includepdf[angle=90]{nosingl3.pdf}


title: convert Mathematica LaTeX to regular LaTeX

text: I often want to copy formulas from Mathematica into a LaTeX document. Mathematica has a “copy as LaTeX” function, but it gives me not really the results that I want:               \text{Cos}[x]+\text{Sin}[x]      I rather would like to have the following:               \cos(x)+\sin(x)      I tried to use regular expressions in Python, which kind of work, but I cannot match matching brackets or parenteses. That would be very handy, since there could be anything in the cosine. What would be a doable way to convert this?


title: Fonts for PolyTonic Greek

text: I am using XeLaTeX with the `fontspec` package for Polytonic Greek character support (Unicode solutions only, no hacks). The default font doesn't display most of the desired characters, but I like the default font for all of the Latin characters. What are some fonts that support the full range of Polytonic Greek characters (with diacritics) but also look similar to the default font? The only font I know of that supports all the characters is DejaVu Serif, which I don't like the look of at all. I am also open to a solution that will automatically render Greek characters in an alternate font but let me use the standard font for all Latin characters. I'd be happy to do something like `\greek{Βίβλος γενέσεως Ἰησοῦ Χριστοῦ υἱοῦ Δαυὶδ υἱοῦ Ἀβραάμ.}` as well if that puts it into a different font that works (but please suggest fonts or help me find a list).


title: Displaying BibTeX item in References without label

text: I'm using apalike-letters bibliography style and the references are displayed like this: ![enter image description here](http://i.stack.imgur.com/a7SJX.png) Is it possible to hide the label in each reference? So that the display be: > Alsop, K., Fereday, S., Meldrum, C., Defazio, A., Emmanuel, C., George, J., > Dobrovic, A., Birrer, M. J., Webb, P. M., Stewart, C., Friedlander, M., Fox, > S., Bowtell, D., and Mitchell, G. (2012). BRCA Mutation Frequency and > Patterns of Treatment Response in BRCA Mutation-Positive Women With Ovarian > Cancer: A Report From the Australian Ovarian Cancer Study Group. J Clin > Oncol. (without the label in square braces). I know it's stupid but I have such requirements… Please note that I don't want to use natbib because I have very large document and natbib generates some strange errors while compiling… You can find the whole project (with the style file in it) at http://piec.info/apalike-letters_test.zip [76 KB].


title: logo in the first page only

text: I want to insert the logo in the title page only. However, it displays on all pages! How can I make these two figurs display as logo in the title page only? I type in the preamble:               \logo{%        \includegraphics[scale=.2]{fig1.pdf}\hspace*{4.75cm}~%        \includegraphics[scale=.2]{fig2.jpg}\hspace*{0.75cm}%        }      then               \begin{document}          \maketitle          \begin{frame}     \frametitle{}     ...     \end{frame}


title: Citing patents using rsc bib-style

text: I am using rsc bibliography style at the moment. A problem I observe is that when I cite a patent no patent number appears in bibliography entry. Is there any option I can at that adds the number to the entry.


title: How to increase the dpi without increasing the size of the picture via dvipng?

text: There is a useful tool in MikTeX called dvipng, which can transform dvi file to png file. My question is about the useage of this command. I usually use it with options > -T tight -D 120 -z 9 -bg Transparent , but sometimes pictures output are not clear enough when printed on papers, ![enter image description here](http://i.stack.imgur.com/6y5xT.png) so I increased the dpi to 1200 in order to make them more clear: > -T tight -D 1200 -z 9 -bg Transparent . Despite of it goes more clear indeed, the size of the picture, out of my expectation, increased 99 times at the same time. ![enter image description here](http://i.stack.imgur.com/vDjFC.png) I want to increase the dpi without increasing the size of the picture, so how to realize it?