title: siunitx package does not work ubuntu

text: I would like to use the `siunitx` package to organize numbers in a table by digits according to Jörg Weber's recommendation. After a lot of searching I suspected that his solution does not work because I have an obsolete version of the package. According to other suggestions I decided to install everything fresh. I followed the instructions here to remove my existing install, then did the steps here to install "vanilla" TeXLive. According to `tlmgr update --list`, there is no package to update now. Still, when I would like to use the package in a simple example (see below), it gives the following errors.               ./siunitx.sty:3931: Package siunitx Error: Failed to load file si-prefix.cfg. [  physical,abbr}]     ./siunitx.sty:3931: Package siunitx Error: Failed to load file si-named.cfg. [  physical,abbr}]     ./siunitx.sty:3931: Package siunitx Error: Failed to load file si-addn.cfg. [  physical,abbr}]     ./siunitx.sty:3931: Package siunitx Error: Failed to load file si-prefixed.cfg. [  physical,abbr}]     ./siunitx.sty:3931: Package siunitx Error: Failed to load file si-accepted.cfg. [  physical,abbr}]     ./siunitx.sty:3931: Package siunitx Error: Failed to load file si-physical.cfg. [  physical,abbr}]     ./siunitx.sty:3931: Package siunitx Error: Failed to load file si-abbr.cfg. [  physical,abbr}]      * * * Example:               \documentclass{article}     \usepackage{siunitx}              \begin{document}              Try to use siunitx.     \si{\kilogram\metre\per\second}              \end{document}


title: Cite a standard, specification or data sheet from a company/institution but without an author

text: As an electronic engineer I often cite technical standards, specifications or data sheets. They come usually from a specific company or institution but do not have a specific author. I like to have them in my bibliography using all the required information like title, institution, year, version/revision/edition and type ("whitepaper", "data sheet", "standard" etc.). Unfortunately I failed to come up with a general solution for this. Often I used the `misc` or `manual` type but it often does not include all information. What would be a suitable way to handle such citations? I need to use the `IEEEtran` class with the `vancover` (or similar) style for my current journal paper, but I also would welcome a general solution using `biblatex` (which I use for my thesis).


title: Difference between align and alignat environments

text: What is the difference between align and alignat environments?


title: wrapfigure cuts off images at the end of the page

text: I used the code from here to get text to wrap around images, but whenever I have a long image near the end of the page, it runs off the page and gets cut off. How do I fix this?


title: Internal link with tooltip

text: How can I combine the `acronym` package with the `pdfcomment` package? I want that a tool tip will aprear on hovering to a acronym link. How can I combine that?               \documentclass{article}     \usepackage{hyperref}     \usepackage[all]{hypcap}     \usepackage[printonlyused]{acronym}     \usepackage{pdfcomment}          \begin{document}     \section{Content}     I'm using a \ac{PKI}... A \pdftooltip{special}{With a tool tip!} word.          And here comes something about \pdftooltip{\acp{CA}}{\aclp{CA}}, but this don't work.          \section{Acronyms}     \begin{acronym}       \acro{PKI}{Public Key Infrastructure}       \acro{CA}{Certificate Authority}     \end{acronym}     \end{document}


title: Producing a diagram showing relations between sets?

text: I'm just starting to use Latex and I was wondering if it's possible to produce a graphic like the following. ![Relations](http://i.imgur.com/t47ERWf.png) It seems like I would have to start with something like a table and then somehow add in the arrows. Any pointers to produce something like this would appreciated.


title: special symbol for matrix index l

text: In the following image there are two different styles used for matrix index `l`. The first one is the default one. How can one get the second one? ![enter image description here](http://i.stack.imgur.com/2iqyk.png) The code is for the first equation is               $\sum_{kl}V_{ki}V_{lj}A_{kl}$


title: Vertical lines for blocks of pseudocode

text: > **Possible Duplicate:**   >  Linebreak in Package algorithm2e Is it somehow possible to generate vertical alines that connect the start and end of a block in `algpseudocode` (as provided by the `algorithmicx` package) or any other algorithm environment? E.g. something like this:               for ... do     |    for ... do     |    |    if ... then     |    |        ...     |    |    end if     |    end for     end for      Thin and possibly grey lines where the `|` are would be appreciated. It would make rather long and deeply nested code more readable. (I know splitting the code into several functions could help sometimes, but still this would be nice to have.) I don't know how to deal with line breaks in pseudocode that would overlap with these lines. I guess it would be best if they would interrupt the lines, such as this:               for ... do     |    for ... do     |    |    a very long line (e.g. introduced by a comment) that     continues here and interrupts the lines on the left     |    end for     end for      But this is a minor detail, of course.


title: Big Decorative Quotes

text: I want to make some definition in my thesis very clear, by putting it in its own line, with stylish, decorative (or whatever you call it) quotes. How can I do that in Latex?


title: vertical alignment of multiline equations

text: I tried in many ways to vertically align these equations but I failed to get it right.               \documentclass[11pt,a4paper,oneside]{report}      \usepackage[T1]{fontenc}      \usepackage{fouriernc}     \usepackage{mathtools}     \usepackage{amsthm}            \begin{document}     first attempt     \begin{equation}     \begin{aligned}     &-\omega\cdot \alpha_{1}=\bigl|B_{1}A_{2}A_{3}\bigr|\cdot \alpha_{1}+\bigl|A_{1}B_{1}A_{3}\bigr|\cdot \alpha_{2}+\bigl|A_{1}A_{2}B_{1}\bigr|\cdot \alpha_{3}     \\      &-\omega\cdot \alpha_{2}=\bigl|B_{2}A_{2}A_{3}\bigr|\cdot \alpha_{1}+\bigl|A_{1}B_{2}A_{3}\bigr|\cdot \alpha_{2}+\bigl|A_{1}A_{2}B_{2}\bigr|\cdot \alpha_{3}     \\     &-\omega\cdot \alpha_{3}=\bigl|B_{3}A_{2}A_{3}\bigr|\cdot \alpha_{1}+\bigl|A_{1}B_{2}A_{3}\bigr|\cdot \alpha_{2}+\bigl|A_{1}A_{2}B_{2}\bigr|\cdot \alpha_{3}     \\     &-\theta\cdot \alpha_{1}=\bigl|A_{1}B_{2}B_{3}\bigr|\cdot \alpha_{1}+\bigl|B_{1}A_{1}B_{3}\bigr|\cdot \alpha_{2}+\bigl|B_{1}B_{2}A_{1}\bigr|\cdot \alpha_{3}     \\     &-\theta\cdot \alpha_{1}=\bigl|A_{1}B_{2}B_{3}\bigr|\cdot \alpha_{1}+\bigl|B_{1}A_{1}B_{3}\bigr|\cdot \alpha_{2}+\bigl|B_{1}B_{2}A_{1}\bigr|\cdot \alpha_{3}     \end{aligned}     \end{equation}          second attempt     \begin{alignat*}{3}     &-\omega\cdot \alpha_{1}=&&\bigl|B_{1}A_{2}A_{3}\bigr|\cdot \alpha_{1}+&&\bigl|A_{1}B_{1}A_{3}\bigr|\cdot \alpha_{2}+\bigl|A_{1}A_{2}B_{1}\bigr|\cdot \alpha_{3}  \\     &-\omega\cdot \alpha_{2}=&&\bigl|B_{2}A_{2}A_{3}\bigr|\cdot \alpha_{1}+&&\bigl|A_{1}B_{2}A_{3}\bigr|\cdot \alpha_{2}+\bigl|A_{1}A_{2}B_{2}\bigr|\cdot \alpha_{3} \\     & -\theta\cdot \alpha_{3}=&&\bigl|B_{3}A_{2}A_{3}\bigr|\cdot \alpha_{1}+&&\bigl|A_{1}B_{2}A_{3}\bigr|\cdot \alpha_{2}+\bigl|A_{1}A_{2}B_{2}\bigr|\cdot \alpha_{3}  \\     &-\theta\cdot \alpha_{1}=&&\bigl|A_{1}B_{2}B_{3}\bigr|\cdot \alpha_{1}+&&\bigl|B_{1}A_{1}B_{3}\bigr|\cdot \alpha_{2}+\bigl|B_{1}B_{2}A_{1}\bigr|\cdot \alpha_{3}       \end{alignat*}          third attempt     \begin{equation}     \begin{split}     &-\omega\cdot \alpha_{1}=\bigl|B_{1}A_{2}A_{3}\bigr|\cdot \alpha_{1}+\bigl|A_{1}B_{1}A_{3}\bigr|\cdot \alpha_{2}+\bigl|A_{1}A_{2}B_{1}\bigr|\cdot \alpha_{3}     \\      &-\omega\cdot \alpha_{2}=\bigl|B_{2}A_{2}A_{3}\bigr|\cdot \alpha_{1}+\bigl|A_{1}B_{2}A_{3}\bigr|\cdot \alpha_{2}+\bigl|A_{1}A_{2}B_{2}\bigr|\cdot \alpha_{3}     \\     &-\omega\cdot \alpha_{3}=\bigl|B_{3}A_{2}A_{3}\bigr|\cdot \alpha_{1}+\bigl|A_{1}B_{2}A_{3}\bigr|\cdot \alpha_{2}+\bigl|A_{1}A_{2}B_{2}\bigr|\cdot \alpha_{3}     \\     &-\theta\cdot \alpha_{1}=\bigl|A_{1}B_{2}B_{3}\bigr|\cdot \alpha_{1}+\bigl|B_{1}A_{1}B_{3}\bigr|\cdot \alpha_{2}+\bigl|B_{1}B_{2}A_{1}\bigr|\cdot \alpha_{3}     \\     &-\theta\cdot \alpha_{1}=\bigl|A_{1}B_{2}B_{3}\bigr|\cdot \alpha_{1}+\bigl|B_{1}A_{1}B_{3}\bigr|\cdot \alpha_{2}+\bigl|B_{1}B_{2}A_{1}\bigr|\cdot \alpha_{3}     \end{split}     \end{equation}          \end{document}      produces ![enter image description here](http://i.stack.imgur.com/FZSik.jpg) The first attempt aligns only first three rows, but not the last two (they are aligned with one another but not with the rest), while the second attempt almost fixes everything except the third and the fourth column but I don't get a numbering in the middle. The last one seems to be like the first one. Could someone help me with this? Thank you.


title: Horizontal alignment of long equations

text: I hope that the following question is not a duplicate but I could not find a definite answer. I'm trying to obtain the the same result as Formula (1) in the picture next, but I feel that my approach is not optimal and somewhat dirty. ![enter image description here](http://i.stack.imgur.com/65PKt.png) I produced the output with the following code:               \documentclass{scrartcl}          \usepackage{amsmath}          \begin{document}          \begin{equation}     \begin{aligned}     X & = \{ x \mid \text{a very very very long condition} \} \cup \\       & \phantom{{}={}} \{ y \mid \text{another very very very long condition} \}     \end{aligned}     \end{equation}          \begin{equation}     \begin{split}     X & = \{ x \mid \text{a very very very long condition} \} \cup \\     & \quad \{ y \mid \text{another very very very long condition} \}     \end{split}     \end{equation}          \begin{equation}     \begin{aligned}     X = & \{ x \mid \text{a very very very long condition} \} \cup \\       & \{ y \mid \text{another very very very long condition} \}     \end{aligned}     \end{equation}          \begin{equation}     X =      \begin{array}[t]{l}       \{ x \mid \text{a very very very long condition} \} \cup \\       \{ y \mid \text{another very very very long condition} \}     \end{array}     \end{equation}          \end{document}      Formula (1) is the output I desire. However, I can't imagine that using `\phantom` is the right way to go. Formula (2) is according to the examples in the amsmath package documentation. And it looks ugly. Formula (3) is better, but the kerning is wrong. However, I somehow feel that using the alignment in this way is the right approach. Finally, Formula (4) uses an array, but also here the kerning is screwed. Can anyone hint me in the right direction? Thanx!


title: Can the acronym package be told to use a certain style?

text: I'm using the `acronym` package and I'm trying to add generic styling. Specifically, I want the first mention of the acronym to expand the long form in italics. What I've done so far is to say:               \acrodef{label}[short]{\textit{long form}}      And that seems to work as long as you don't need to _repeat_ the long form (which I don't). However it clashes when you need the plural form `\acp{lable}`, as the plural "s" will not be typeset in italics: > _long form_ s <\- wrong   >  _long forms_ <\- correct Is there a way to tell the acronym package to typeset the long form in italics?


title: Auctex block indent

text: Is there a way to block indent whole paragraphs in `emacs` \+ `auctex`? I'm thinking in that functionality in such editors as `WinEdt`. I've search in different fora, and in the available documentation, but what I've found doesn't seem to work in `LaTeX` mode.


title: Sharing custom entry type with other users

text: A nice feature of jabref is the ability to create custom entries as seen here: http://jabref.sourceforge.net/help/CustomEntriesHelp.php Is there a way to export these to other users to enable them to import the custom entry so they too can have the same custom entry on their system with minimal effort? I thought maybe if you exported the file output with every field filled in the user's system would update to have this entry available?


title: How do I do a one-shot MathOperator?

text: The amsmath packages helpfully define a macro `\DeclareMathOperator` which does what it says on the tin: it declares a mathematical operator such as `\sin` or `\Null` or whatever and typesets it all nice and dandy. If I want to do a one-shot operator, it seems a bit of a fuss to `\DeclareMathOperator` it if I'm only going to use it once. So: Is there a command that typesets its contents in the same way that `\DeclareMathOperator` does? (And I'd like it to be _exactly_ how `\DeclareMathOperator` does since I sometimes mess with fonts and colours and would like them consistent.)


title: LaTeX poker package

text: I have downloaded this package that allows to me to include poker card symbols in my LaTeX document. I followed this post to install the new package, except that I installed the package into `/usr/share/texmf-texlive/tex/latex/poker`. Following the doc inside the package I have tried to compile these few lines               \documentclass[11pt,twoside,a4paper]{article}     \usepackage{poker}     \begin{document}     \begin{cards}     \crdAs      \end{cards}     \end{document}      LaTeX localizes the package, but is unable to understand new commands               (/usr/share/texmf-texlive/tex/latex/txfonts/ot1txr.fd)     ! Undefined control sequence.     <argument> \scaleboxto                         (\pkr@pvw ,\pkr@pvh ){\pkr@col \sf \pkr@val }     l.5 \crdAs      returning me weird output. Have I made some mistake? Where is the error?               >latex --version     pdfTeX 3.1415926-1.40.10-2.2 (TeX Live 2009/Debian)     kpathsea version 5.0.0     Copyright 2009 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).     There is NO warranty.  Redistribution of this software is     covered by the terms of both the pdfTeX copyright and     the Lesser GNU General Public License.     For more information about these matters, see the file     named COPYING and the pdfTeX source.     Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).     Compiled with libpng 1.2.46; using libpng 1.2.46     Compiled with zlib 1.2.3.4; using zlib 1.2.3.4     Compiled with poppler version 0.18.2


title: Radial Labels on Mindmap - Part I

text: How can I modify the orientation of text in the nodes of a mindmap, such that the text is oriented radially from the center in the case of the outermost nodes. For example, in the below diagram, I seek for the text INSIDE the orange circled nodes to be rotated so that it is in alignment with the direction of the orange lines respectively. ![Radial Mindmap](http://i.stack.imgur.com/04Ahn.png) Code for the above mindmap is as follows:               \begin{tikzpicture}       \path[small mindmap,concept,text=white]         node[concept] {Bla} [clockwise from=-15]         child[concept color=red,text=black]{           node[concept]at(1,0){Bla Bla}[clockwise from=90]           child[concept color=red!95!black,text=black]{             node[concept]{A}[clockwise from = 120]                 child {node[concept,scale=0.5] {A.A}}                 child {node[concept,scale=0.5] {A.B}}                 child {node[concept,scale=0.5] {A.C}}           }           child[concept color=red!75!black,text=white,grow=50]{             node[concept]{B}[clockwise from = 80]                 child {node[concept,scale=0.5] {B.A}}                 child {node[concept,scale=0.5] {B.B}}                 child {node[concept,scale=0.5] {B.C}}           }           child[concept color=red!50!black,text=white ,grow=10]{             node[concept]{C}[clockwise from = 40]                 child {node[concept,scale=0.5] {C.A}}                 child {node[concept,scale=0.5] {C.B}}                 child {node[concept,scale=0.5] {C.C}}           }           child[concept color=red!25!black,text=white,grow=-30]{             node[concept]{D}[clockwise from = 0]                 child {node[concept,scale=0.5] {D.A}}                 child {node[concept,scale=0.5] {D.B}}                 child {node[concept,scale=0.5] {D.C}}           }           child[concept color=red!10!black,text=white,grow=-70]{             node[concept]{D}[clockwise from = -40]                 child {node[concept,scale=0.5] {D.A}}                 child {node[concept,scale=0.5] {D.B}}                 child {node[concept,scale=0.5] {D.C}}           }         }         child[concept color=green,text=black, grow=195]{           node[concept]{Bla Bla}[clockwise from=80]           child[concept color=green!10!black,text=white]{             node[concept]{Bla}[counterclockwise from = 50]                 child {node[concept,scale=0.5] {A.A}}                 child {node[concept,scale=0.5] {A.B}}                 child {node[concept,scale=0.5] {A.C}}           }           child[concept color=green!25!black,text=white,grow=120]{             node[concept]{Bla}[counterclockwise from = 90]                 child {node[concept,scale=0.5] {A.A}}                 child {node[concept,scale=0.5] {A.B}}                 child {node[concept,scale=0.5] {A.C}}           }           child[concept color=green!50!black,text=white,grow=160]{             node[concept]{Bla}[counterclockwise from = 130]                 child {node[concept,scale=0.5] {B.A}}                 child {node[concept,scale=0.5] {B.B}}                 child {node[concept,scale=0.5] {B.C}}           }           child[concept color=green!75!black,text=white ,grow=200]{             node[concept]{Bla}[counterclockwise from = 170]                 child {node[concept,scale=0.5] {C.A}}                 child {node[concept,scale=0.5] {C.B}}                 child {node[concept,scale=0.5] {C.C}}           }           child[concept color=green!95!black,text=black,grow=240]{             node[concept]{Bla}[counterclockwise from = 210]                 child {node[concept,scale=0.5] {D.A}}                 child {node[concept,scale=0.5] {D.B}}                 child {node[concept,scale=0.5] {D.C}}           }         }         child[concept color=orange,text=black, grow = -90] {           node[concept]at(-1.5,-2.5){Bla Bla}[clockwise from=10]             child[concept color=orange!95!black]{                 node[concept]{Bla}[clockwise from = 40]                     child {node[concept,scale=0.5] {A.A}}                     child {node[concept,scale=0.5] {A.B}}                     child {node[concept,scale=0.5] {A.C}}             }             child[concept color=orange!75!black, grow = -30]{                 node[concept]{Bla}[clockwise from =0]                     child {node[concept,scale=0.5] {B.A}}                     child {node[concept,scale=0.5] {B.B}}                     child {node[concept,scale=0.5] {B.C}}             }             child[concept color=orange!50!black, text=white, grow=-70]{                 node[concept]{Bla}[clockwise from =-40]                     child {node[concept,scale=0.5] {C.A}}                     child {node[concept,scale=0.5] {C.B}}                     child {node[concept,scale=0.5] {C.C}}             }             child[concept color=orange!25!black, text=white, grow=-110]{                 node[concept]{Bla}[clockwise from =-80]                     child {node[concept,scale=0.5] {D.A}}                     child {node[concept,scale=0.5] {D.B}}                     child {node[concept,scale=0.5] {D.C}}             }             child[concept color=orange!10!black, text=white, grow=-150]{                 node[concept]{Bla}[clockwise from =-120]                     child {node[concept,scale=0.5] {E.A}}                     child {node[concept,scale=0.5] {E.B}}                     child {node[concept,scale=0.5] {E.C}}             }         }            ;     \end{tikzpicture}      UPDATE: Continue this topic in Part II, seeking elliptical or rectangular radially rotating nodes.


title: How to add the pdf-bookmark of TOC without its name "Contents" in TOC

text: Since the link of TOC itself in TOC looks stupid, ![enter image description here](http://i.stack.imgur.com/bAaPe.png)               \usepackage[nottoc]{tocbibind}  % no `Contents` in TOC      is used to remove it. However, The _Bookmark_ `Contents` will disappear in the index (on the left side). and               \pdfbookmark{\contentsname}{toc}     \tableofcontents      seems solved this problem, BUT it points to the page before TOC. So how to figure this out? PS: `book` class is used in Texlive 2012.


title: problem with name being too long for moderncv title

text: Is there a way to fit the whole "jesse jaanila | curriculum vitae" title on the same row with the banking style. My simplified code shows that with the font fouriernc that I like, it doesn't seem to fit on a single row.               \documentclass[12pt,a4paper,finnish]{moderncv}      \moderncvstyle{banking}     \moderncvcolor{blue}      \usepackage{babel}      \usepackage[latin1]{inputenc}       \usepackage[T1]{fontenc}      \usepackage{fouriernc}      \usepackage[scale=0.75]{geometry}           \firstname{XXX}      \familyname{XXX}           \title{Curriculum Vit\ae{}}          \mobile{+358 45 2580 777}               \begin{document}     \thispagestyle{empty}     \pagestyle{empty}      \makecvtitle      \end{document}


title: Cite two papers with same first author and year

text: I am using `chicago.sty` to reference papers. At one point, I have to reference two papers with the same first author and the same year. I don't want to use the cite option that shows all the authors. Instead I would like something like "Smith et al. (2009a)" and "Smith et al. (2009b)". Is there a way I can do this (without changing to natbib)? Here is an example:               \documentclass{report}     \usepackage{chicago}     \usepackage{filecontents}     \usepackage[colorlinks=true,citecolor=red]{hyperref}     \begin{document}          \begin{tabular}{llll}                       shortcite     & \shortcite{Smith2012}                            citeyear      & \citeyear{Smith2012}  \\             \end{tabular}              \begin{tabular}{llll}                                      shortcite     & \shortcite{Smith2012b}                                        citeyear      & \citeyear{Smith2012b}         \end{tabular}         \bibliographystyle{chicago}     \bibliography{references}     \end{document}


title: How to use a macro inside \includegraphics options?

text: I have to do several figures like this:               \begin{figure}[h!]       \centering         \includegraphics[trim = 9.55cm 1.8cm 10.25cm 4.05cm, clip,width=1\textwidth]{./../ficherosComunes/images/capturaapp/01-actividadprincipal.png}       \caption{Captura de pantalla de ActividadPrincipal.java}     \end{figure}          \begin{figure}[h!]       \centering         \includegraphics[trim = 9.55cm 1.8cm 10.25cm 4.05cm, clip,width=1\textwidth]{./../ficherosComunes/images/capturaapp/02-listadoficheros.png}       \caption{Captura de pantalla de ActividadFicheros.java.}     \end{figure}          \begin{figure}[h!]       \centering         \includegraphics[trim = 9.55cm 1.8cm 10.25cm 4.05cm, clip,width=1\textwidth]{./../ficherosComunes/images/capturaapp/03-listadoficherodetalles.png}       \caption{Captura de pantalla de ActividadFicheroDetalles.java.}     \end{figure}      As it can be seen there's all times repeated `trim = 9.55cm 1.8cm 10.25cm 4.05cm, clip,width=1\textwidth` Would it be possible to write it in a variable? I have tried to define a `\newcommand{\texttrim}{trim = 9.55cm 1.8cm 10.25cm 4.05cm, clip,width=1\textwidth}` but it doesn't work if I put it as an option. I have also tried to define lengths (to have at least the trimming lengts defined) but they don't work either.


title: "Dimension too large" error with XY-pic

text: What's wrong with the following?               \documentclass{amsart}     \usepackage[all]{xy}     \begin{document}     \xymatrix{             \text{Long string of text that causes an error during the compilation of this document} \\             X     }     \end{document}      Strangely if there's no second row it compiles fine.


title: Converting bib database into csv

text: I have a bibliography on a subject (don't matter what subject it is, there is about 20 different files and about 1000 records). I need to convert it into csv (or any other table format which can be opened in Excel/LibreOffice Calc etc.) Can anyone name a tool for this?


title: Place group of text and image on same exported PDF page

text: I am new to Tex and this question maybe is not written well, so I will try to explain it better. I am writing a reference manual where there are a lot of "blocks" that all have the same structure: a piece of text (maybe one or two short paragraphs) and then an image (tipically a screenshot). I would like to be able to define such a block in a way that, when exporting document to PDF, the output is on the same page. I understand that there will be some pages half-filled when this "block" begins and does not fit into the current page. In these cases, I expect the block to be placed entirely at the next page. I have been playing with `\begin{samepage}`, `\begin{minipage}` and things like that (searching a lot in this same web) with no luck. Obviously I am doing something wrong, or taking a bad approach to solve the problem. Take a look at my code:               Lorem ipsum dolor sit amet, consectetur adipiscing elit.          Phasellus leo ipsum, dictum non auctor quis, euismod vitae enim. Mauris varius.          \begin{figure}[h]       \begin{center} \includegraphics[scale={0.7}]{IMG1} \end{center}       \caption{Image caption}       \label{fig:IMG1}     \end{figure}      I would like all this piece of text (2 paragraphs) and one figure to be always in the same page. Can this be achieved? In fact I thought I got it when I discovered `\begin{minipage}`! If this is the case, can you please write down a short code showing how to use it? (remember I am a newbie and some obvious things are not so obvious for me right now). **Edit:** I will try @Werner tip, but I am already using a \newcommand to short all the previously written \begin{figure} environment. As this:               \newcommand{\figureSF}[4]{       \begin{figure}[h]         \begin{center} \includegraphics[scale={#4}]{#1} \end{center}         \caption{#2}     \label{#3}     \end{figure}     }      So the previous piece of code turns into:               Lorem ipsum dolor sit amet, consectetur adipiscing elit.          Phasellus leo ipsum, dictum non auctor quis, euismod vitae enim. Mauris varius.          \figureSF{IMG1}{Image caption}{fig:IMG1}{0.7}      As this new command accept only 4 parameters, is there an easy way to modify it to handle the situation you are describing?


title: MiKTeX, and custom classes

text: > **Possible Duplicate:**   >  Create a local texmf tree in MiKTeX OK, so today is the very first time I've decided to try using TeX, and I have a few questions. I've finally, after much fussing around, managed to get the basic tools up and running for me to make basic documents, but I'd like to make my own class definitions. Problem is, I don't want to (if possible) put my custom class files in the MikTeX folder structure. Is there a way I can configure it to reference a custom class folder where I store my stuff?


title: installing imsart

text: I am experiencing difficulties with installing `imsart` package. I am using Windows 7, 64-bit system. My TeX directory look like this:               C:\Program Files (x86)\MiKTeX 2.9      and               C:\Program Files (x86)\TeXworks,      but this one is not relevant, this is just an editor. There I installed files from the link above into three different destinations, three newly created directories `imsart`:               C:\Program Files (x86)\MiKTeX 2.9\imsart     C:\Program Files (x86)\MiKTeX 2.9\tex\imsart     C:\Program Files (x86)\MiKTeX 2.9\tex\latex\imsart      I replaced the header `\documentclass{article}` by `\documentclass[aap]{amsart}` However, the compiler says:               File `imsart.cls' not found.     Type X to quit or <RETURN> to proceed,     or enter new name. (Default extension: cls)     Enter file name:       In an attempt to overcome this problem, I integrated root directories. I registered MiKTeX 2.9 as a user-managed texmf directory. This did not work.


title: Where to save custom .bst files

text: > **Possible Duplicate:**   >  Create a local texmf tree in MiKTeX I'm trying to create my first bibliography with BibTeX. I want to use the Geological Society of America's `.bst` file for my style. I'm not sure where to save the file so that LaTeX will find it (I'm using TeXworks as my editor). I'm also not sure what needs to be added to the preamble. I'm going to save the file as `gsa.bst`, so I'm aware that I need to add `\bibliographystyle{gsa}` in the bibliography section. Forgot to add that I already tried `\Program Files\MiKTeX2.9\bibtex\bst\base\gsa.bst`


title: \rowcolor truncating cells in table

text: I am working on formatting a table a coauthor originally created for publication, and running into a problem when trying to color-code rows. The degree symbol in the first data row is formatted in an odd way (by using an extra column), and this is likely the source of error, but I am unsure of an alternative that accomplishes the same thing (columns aligned, degree symbol not part of alignment). Anyway, when I add a row color, the entries in the Mean and Max Error columns are truncated:![the generated output.](http://i.stack.imgur.com/fbAgk.png) How can I get rid of this truncation while maintaining the current alignment?               \documentclass{article}     \usepackage[table]{xcolor}     \begin{document}     \begin{tabular}{l | r | r @{}l | r @{} l }     Name & Bits & Mean Error &  & Max Error &  \\     \hline      \hline     A & 15 & $1.45262$&$^{\circ}$ & $3.26743$&$^{\circ}$ \\      \hline     \rowcolor{gray}     B & 16 & $0.37364$& & $1.29985$& \\      C & 16 & $0.36114$& & $1.05603$& \\      \end{tabular}     \end{document}


title: Standalone package creates a page with a fixed width

text: Recently I found the standalone package. I am using it to create figures and such in external files. But everytime content is created the width of the page seems to be fixed, it does not shrink to the minimal width. Here my example *.tex file:               \documentclass{standalone}     \usepackage{tikz}          \begin{document}          Test          \end{document}      And the produced content (the actual document is the white stuff with the Text 'Test' on it): ![enter image description here](http://i.stack.imgur.com/fcEJW.jpg) I am using pdflatex (MiKTeX 2.9).


title: Crop in Standalone class

text: > **Possible Duplicate:**   >  Standalone package creates a page with a fixed width How do I get the class standalone crop the image just as you would preview the package? I must get over the side that is because the package tkz-euclide.               \documentclass{standalone}     \usepackage{tikz}       \usetikzlibrary{arrows}     \usepackage{tkz-euclide}       \usetkzobj{all}     \usepackage[pdfpagelayout=SinglePage]{hyperref}          \begin{document}          \begin{tikzpicture}       \tkzInit       \tkzDefPoint(0,0){A}       \tkzDefPoint(4,0){B}       \tkzDefTriangle[equilateral](A,B)       \tkzGetPoint{C}       %angulos       \tkzMarkAngle[fill=green!50,size=5mm](B,A,C) %\apha       \tkzMarkAngle[fill=green!50,size=5mm](A,C,B) %\beta       \tkzMarkAngle[fill=green!50,size=5mm](C,B,A) %\gamma       %rotulos       \tkzLabelPoints[below](A,B)       \tkzLabelPoints[above](C)       \tkzLabelAngle[pos=.7](B,A,C){$\alpha$}       \tkzLabelAngle[pos=.7](C,B,A){$\beta$}       \tkzLabelAngle[pos=.7](A,C,B){$\gamma$}       \tkzLabelSegment[above right](B,C){$a$}       \tkzLabelSegment[above left](C,A){$b$}       \tkzLabelSegment[below](A,B){$c$}       %triangulo equilatero       \tkzDrawPolygon(A,B,C)       %pontos       \tkzDrawPoints[fill=blue](A,B,C)     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/yhn1P.png) Does not show here, but the image was not cut from the right side.


title: Difference with standalone and preview?

text: I have a table, but for cleanliness (I'll use the figure in a paper and in talks), I'd like to compile to a single PDF and include it with `includegraphics` instead of having the table rendered within the paper. In the paper, it renders fine. I use these options:               \documentclass[11pt,twocolumn]{article}     \usepackage{graphicx}     \usepackage[margin=1in]{geometry}      But when I move the table into a `standalone` document with preview, the graphics are far too big for the page. **Of course, I can still simply render the figure in its own table inside paper.tex, but I'd like to figure out why this happens. Can you figure it out?** **Here is the preview document:**               \documentclass[preview=true]{standalone}          \usepackage{standalone}     \usepackage{rotating}     \usepackage{array}          \usepackage{graphicx}     \usepackage{multirow}          \pagestyle{empty}          \begin{document}          \begin{tabular}{m{0.1in}m{1.4in}m{1.4in}m{1.4in}m{1.4in}m{1.4in}}       &     \multirow{3}{*}{\begin{minipage}{1.4in}\centering {\bf (a)} Control-control densities \end{minipage}} &      % 1.4 * 3      \multicolumn{3}{c}{ \begin{minipage}{4.2in}\centering {\bf (b)} Case-control vs. control-control log densities \end{minipage} } \\      & & \multicolumn{3}{c}{ \begin{minipage}{4.2in}\centering {\includegraphics[width=4.2in]{colorbar.pdf}} \end{minipage} }\\           & & \begin{minipage}{1.4in} \centering {0 differential} \end{minipage} & \begin{minipage}{1.4in} \centering {53 differential} \end{minipage} & \begin{minipage}{1.4in} \centering {302 differential} \end{minipage}\\           \begin{sideways}Replicate 1\end{sideways} &        \includegraphics[width=1.4in]{null_1-crop.pdf} &       \includegraphics[width=1.4in]{rep_1_0-crop.pdf} &       \includegraphics[width=1.4in]{rep_1_53-crop.pdf} &       \includegraphics[width=1.4in]{rep_1_302-crop.pdf} \\           \begin{sideways}Replicate 2\end{sideways} &        \includegraphics[width=1.4in]{null_2-crop.pdf} &       \includegraphics[width=1.4in]{rep_2_0-crop.pdf} &       \includegraphics[width=1.4in]{rep_2_53-crop.pdf} &       \includegraphics[width=1.4in]{rep_2_302-crop.pdf} \\     \end{tabular}          \end{document}


title: Label in caption

text: For certain styles it appears that the `\label` statement must be included in `\caption` to preserve good referencing. Why is that?


title: Purpose of local texmf trees

text: In Tex Live there are several local texmf trees (`TEXMFLOCAL` for admin and `TEXMFHOME` for user, compare comments and answers to What are TeXLive's four different texmf folders?), in MiKTeX I manually can add them, see Create a local TeXMF tree in MiKTeX, but: _What's the purpose of a local texmf directory tree?_


title: line styles not applied in gnuplot (epslatex)

text: Hello i would like to draw 2 curves in a same plot using gnuplot (epslatex terminal). I am using a gnuplot script, which works just fine, except it doesn't apply line colors defined using command `set style line`. Here is the script:               set terminal epslatex color colortext size 9cm,5cm     set size 1,1     set output "lorenzov_faktor.tex"          set xrange [0:10]     set yrange [0:10]          set xtics ("$0c$" 0, "$c$" 10)     set ytics ("$0$" 0, "$1$" 1, "$\\infty$" 10)          set style line 1 lc rgb "#FF0055"     set style line 2 lc rgb "#2C397D"          unset grid          set ylabel "$\\gamma$"     set xlabel "$u$"          set key left top          f(x) = 1/sqrt(1 - (x/10)**2)      g(x) = 1          set xrange [0:11]     set yrange [0:9]          plot f(x) ls 2 lw 3 lt 1 title "$\\gamma$", g(x) ls 1 lw 1 lt 2 notitle      It produces a plot where colors dont match my definitions of line styles: ![enter image description here](http://i.stack.imgur.com/9uMqX.png)


title: How to make multiple lines precisely converge in one point on an axis?

text: I am trying to produce a sequence/time diagram showing the synchronisation process of a master and slave in the Precision Time Protocol using TikZ. Being very new to TikZ I don't know much more than the primitives for drawing lines and placing nodes, which seems almost enough for such a simple diagram. The problem I am having is that I cannot figure out how to make lines and arrows converge precisely in a single point on an axis. Here is what it looks like now (not the actual diagram but close): ![](http://i.stack.imgur.com/1JEGk.png) Up close: ![](http://i.stack.imgur.com/pKPmF.png) As you can see there is quite a gap between the three lines converging on the t-axis. How do I remove such gaps and have the lines converge precisely in one point on the t-axis? Or is there a better way to draw such diagrams? Here is a MWE:               \documentclass[]{article}          \usepackage{tikz}          \begin{document}     \begin{tikzpicture}         \draw [->,thick] (0,8) node (Master) [above] {Master} -- (0,0) node [below right] {t};         \draw [->,thick] (5,8) node (Slave) [above] {Slave} -- (5,0) node [below right] {t};              \node (t1) at (0,7) [left] {$t_1$};         \node (t2) at (5,6) [right] {$t_2$};         \node (t3) at (0,3) [left] {$t_3$};         \node (t4) at (5,1) [right] {$t_4$};                   \draw[->] (t1) -- (t2);         \draw[->] (t2) -- (t3);         \draw[->] (t3) -- (t4);              \draw[very thin,dashed] (t2) -- ++(-6,0);         \draw[very thin,dashed] (t3) -- ++(6,0);         \draw[very thin,dashed] (t1) -- ++(6,0);         \draw[very thin,dashed] (t4) -- ++(-6,0);     \end{tikzpicture}     \end{document}      Thanks in advance!


title: Capitalization of references

text: This question is probably beyond the scope of just TeX, but certainly interesting to many. When referencing a figure, a lemma, or an equation in a paper, is there a general rule of whether or not to capitalize the respective identifier, i.e., whether to write > [...] as in equation (3) [...] or > [...] as in Equation (3) [...] This is essentially the question if "Equation (3)" is a proper noun, or rather merely a description (much like "page 3" which I suppose everyone would agree on not to capitalize).


title: How to modify the typesetting of nomencl header?

text: The **nomencl** package typesets the header of the `nomenclature` list as a `\section*` in the `article` document class. How can I change it to `\subsection*`?


title: Footnotes with no superscript but indent

text: > **Possible Duplicate:**   >  How to set superscript footnote mark in the text body but normalsized in > the foot? I cannot find a way to have footnotes with no superscript number in the footnotes, but superscript in the text and with an indent. If I use a macro like               \makeatletter     \renewcommand\@makefntext[1]{%          \parindent 1em%          \@thefnmark.~#1$\qquad$}     \makeatother      or               \makeatletter     \renewcommand\@makefntext[1]         {%         \makebox[9,5pt][r]{\@thefnmark\space}#1}     \makeatother      I get the result that the numbers are not superscript, but there is no way to have the indent, even if I add something like that to the preamble:               \usepackage[hang]{footmisc}     \footnotemargin1.8em      If I use this last command and the following macro               \makeatletter         \renewcommand\@makefnmark{{{\normalfont\@thefnmark}}.\ }%     \makeatother      I get both the indent and the non-superscript number, but then the superscript is absent also in the main text. (I am using the document class `book`, but could switch to `memoir`, if it would help.)


title: How can I control the height of my left-right delimited equation part?

text: I have a simple equation, much like the following (I use the `braket` package) :               \begin{equation}     \mathcal{Y} = \Set{ x \in \mathcal{G} | \Vert x \Vert > d }     \end{equation}      My gripe with this equation's rendering is that the | and || are close to eachother and of the exact same height - I'd like the | bar to be bigger to make the symbols more distinct. One way to do this would be to make the whole `Set`, or left-right environment, a bit taller. How can I do this? Can I insert an invisible character that will make the whole thing bigger? Should I insert a higher | bar manually?


title: font-not-found error: font "HoeflerText" cannot be found -- LuaLaTex error!

text: I am running this CV/Resume example from here: Here is a relevant fraction of the code:               \documentclass[10pt]{article}     %!TEX encoding =  UTF-16     % See geometry.pdf to learn the layout options. There are lots.     \usepackage[hmargin=1.25cm, vmargin=1.5cm]{geometry}     %symbols - the ones you see on the left of the email and of the phone     \usepackage{bbding}     \usepackage{amssymb}     \usepackage{eurosym}     %Colors/Graphics     \usepackage{color,graphicx}     \usepackage[usenames,dvipsnames]{xcolor}          %Fonts and Tweaks for XeLaTeX     \usepackage{fontspec,xltxtra,xunicode}     \defaultfontfeatures{Mapping=tex-text}     \setromanfont[Mapping=tex-text]{Hoefler Text}     ...      So... when compiling with LuaLaTeX (part of MiKTeX on Windwos XP x64), I am getting the following error:               ...     luaotfload | Font names database loaded: C:/Documents and Settings/Ampleforth/L     ocal Settings/Application Data/MiKTeX/2.9/luatex-cache/generic/names/otfl-names     .lua     luaotfload | Updating the font names database:     luaotfload | Scanning TEXMF and OS fonts...     luaotfload | Font names database saved: %s      : C:/Documents and Settings/Ampleforth/Local Settings/Application Data/MiKTeX/2     .9/luatex-cache/generic/names/otfl-names.lua          !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!     !      ! fontspec error: "font-not-found"     !      ! The font "HoeflerText" cannot be found.     !      ! See the fontspec documentation for further information.     ! For immediate help type H <return>.     !...............................................            l.28 \setromanfont[Mapping=tex-text]{Hoefler Text}      What is wrong? How can I install this font so LuaLaTeX is picking it up? Where to download? Any other thoughts about this?


title: How to make nice braids diagrams

text: > **This question led to a new package:**   >  `braids` — Blog: The Braids Package I search to draw braids diagram, if possible in xy-pic. I already know how to do that with the knot module and some low-level instructions and I search a nicer way to do that. The actual code :               \documentclass{minimal}     \usepackage[all,knot]{xy}     \begin{document}     \[\vcenter{\xy 0;/r1pc/:         @={(0.5,-0.5),(0,0)}, @@{*{\vtwistneg}},(0,-2),\vtwist,         @i@={(0,-1),(2,0),(2,-2)} @@{="save";"save"-(0,1),**@{-}}\endxy}         \quad = \quad         \vcenter{\xy 0;/r1pc/:         @={(0.5,0),(0,-0.5),(0.5,-1)}, @@{*{\vtwistneg}},         @i@={(0,0),(2,-1),(0,-2)} @@{="save";"save"-(0,1),**@{-}}\endxy}\]     \end{document}      And the desired result ![enter image description here](http://i.stack.imgur.com/clNSg.png)


title: Smooth curves with variable width

text: > **Possible Duplicate:**   >  ‘Poster’ fountain pen nib style text Does exist any TikZ library with the help of which it is possible to draw smooth curved lines with variable width? I mean to set just one path, something like calligraphy letters.


title: Biblatex: Linked \parencitetitle

text: How can I define a citation command that works like biblatex's `\citetitle` but is in parentheses and linked to the corresponding bibliography entry? (`\citetitle` itself is not linked)


title: blank page shows up after adding \usepackage[pdfpagelabels]{hyperref}

text: I have `index.tex` that I made a copy of it. renamed the copy to `index_bad.tex`, and added the line               \usepackage[pdfpagelabels]{hyperref}      to its preamble. So the 2 files are identical other than this one change. Then compiled `index.tex` with `pdflatex` 3 time and looked at the index.pdf, and it is ok. (i.e. no blank page). Compiled `index_bad.tex` with `pdflatex` 3 times. Now `index_bad.pdf` has an extra blank page inserted between first section and the second section. This is the general layout of the document:               \documentclass[12pt]{article}     \usepackage{tikz}     \usepackage{fancyvrb}     \usepackage{graphicx}     \usepackage[left=.7in,right=.5in,top=.7in,bottom=.9in]{geometry}     \usepackage[pdfpagelabels]{hyperref}     \begin{document}     ....     \section{....}     \subsection{...}     \begin{Verbatim}[frame=single,framesep=1mm,samepage=true,fontsize=\footnotesize]     .....     \begin{Verbatim}[frame=single,framesep=1mm,samepage=true,fontsize=\footnotesize]     ....     \end{document}      When including `hyperref` a blank page shows up between first section, and the second section. No blank page shows up when this package is not included. **question is** why does this happen? and how to fix it? Since this document includes 2 images and large verbatim, I've zipped the whole folder so it is all self contained. Unziping the zip file will create a folder. Inside the folder there is `index.tex` and `index_bad.tex` and the 2 images used. Running `pdflatex` on the files will show the problem above. The zip file is http://12000.org/tmp/072113/latex_problem.zip Using TL 2013 on Linux mint virtual machine hosted on windows. ![enter image description here](http://i.stack.imgur.com/1rpA2.jpg)


title: XeLaTeX and missing spaces in PDF text

text: I use xelatex to compile a PDF from this tex-file:               \documentclass[14pt]{scrartcl}          \usepackage{fontspec}     \usepackage{xunicode}     \usepackage{xltxtra}     \usepackage{polyglossia}     \usepackage{lipsum}     \setmainfont{Times New Roman}          \begin{document}     \lipsum     \end{document}      When I copy text from the PDF (in Foxit Reader or SumatraPDF), in some lines there are no spaces. For example, there is line:               metusami. Morbiacorcietnislhendreritmollis. Suspendisseutmassa. Crasnecante.      If I comment out `\setmainfont{Times New Roman}`, all the spaces appear. How can I font selection and have normal text copying from my PDF files? P.S.: Miktex 2.9, Windows


title: Macro to capture until end-of-line as argument

text: Is it possible to capture the contents to the end-of-line as a macro argument? For example, consider the following naive visualization: ![enter image description here](http://i.stack.imgur.com/8UkCS.png)               \documentclass{article}     \newenvironment{myitemize}       {\def\item{\textbullet\ }}       {}     \begin{document}     \begin{myitemize}       \item First       \item Second       \item Third       \item Last     \end{myitemize}     \end{document}      I'd like to define `\item` using something like               \def\item#1\par{<do stuff with #1>}      but this requires an empty line between items to pick up `\par`: ![enter image description here](http://i.stack.imgur.com/Kt4wy.png)               \documentclass{article}     \newenvironment{myitemize}       {\def\item##1\par{\textbullet\ ##1\par}}       {}     \begin{document}     \begin{myitemize}       \item First            \item Second            \item Third            \item Last          \end{myitemize}     \end{document}      Looking at `\obeylines` in `latex.ltx` I thought this may have something to do with `^^M`, but I'm not sure how I can incorporate that into the definition of `\item`.


title: How to fix TikZ corners in 3D

text: Am trying to draw a simple rectangle and there seems to be minor issue with two of the endpoints ( **f** and **d** in the following). I tried `line cap=rect` as suggested by Bad intersection of lines in TikZ but that did not seem to work. The resulting image: ![enter image description here](http://i.stack.imgur.com/vssU9.png)               \documentclass{standalone}     \setlength\PreviewBorder{5pt}%          \usepackage{tikz}          \newcommand*{\Width}{2.0}     \newcommand*{\Height}{3.0}     \newcommand*{\Depth}{1.0}          \begin{document}     \begin{tikzpicture}%         \coordinate (A) at ( 0,       0,     \Depth);%         \coordinate (B) at (\Height,  0,     \Depth);%         \coordinate (C) at (\Height,  0,      0);%         \coordinate (D) at (\Height, \Width,  0);%         \coordinate (E) at ( 0,      \Width,  0);%         \coordinate (F) at ( 0,      \Width, \Depth);%         \coordinate (G) at (\Height, \Width, \Depth);%         \coordinate (H) at ( 0,       0,      0);%         %         \draw [blue, ultra thick,line cap=rect]%             (A) -- (B) -- (C) -- (D) -- (E) -- (F) -- cycle;%         \draw [blue, ultra thick,line cap=rect]%             (B) -- (G) -- (F) -- (E) -- (D) -- (G) -- cycle;%              \path (D)  [right] node {$d$};% Problem Point 1         \path (F)  [left ] node {$f$};% Problem Point 2     \end{tikzpicture}%     \end{document}      This problem about TikZ: changing colour of a path half way along seems related, but I do not understand how to adapt that to my problem.


title: Plot basic complex transformation in LaTeX

text: I want to first draw a shaded region on a xy-plane: > 0≤x > > 0≤y≤π and then the image of the above region mapped onto a uv-plane by the transformation `f=exp(z)`, i.e. the shaded region: > exp(0)≤ρ > > 0≤θ≤π However, I don't even know where to start as I am new to LaTeX plotting. Any idea involving tools such as TikZ, `pgfplots`, and even GNUplot is welcome. More about the question: Basically what I want is graphs that looks like these ![enter image description here](http://i.stack.imgur.com/GsmVp.png) except that in my case A will be (0,0) and D will be (0,π) and B, C will be at infinity (so, two rays) for the left graph; for the right one A' will be (e,0) and D' will be (-e,0) and A' D' are connected by a semicircle.


title: Spacing depending on optional subscripts and superscripts

text: I am totally new to LaTeX (use it for 2 days), so I am sorry if this has already been asked, but I spent the last 6 hours searching for a solution, but to no avail. (I stumbled upon a package xpeek which might be able to do what I want (or maybe not), but the documentation was way to complex for me to get anything out of it.) I am using the _ansmath_ package to write some formulas. I want to introduce a new command for formating my matrix variables. My first attempt was:               \newcommand{\mtrx}[1]{\boldsymbol{#1}}      which looks fine, except when I use subscripting. In this case, my lower indices are too far away to look nice. E.g. `$\mtrx{P}_{\mu\nu}$` Because P is in italics, the space between the P and the subscript is disturbingly large. Using `$\mtrx{P\!}_{\mu\nu}$` looks fine, but I get into trouble when using a superscript too: In `$\mtrx{P\!}_{\mu\nu}^{*}$`, the * is way too close, and in `$\mtrx{P}_{\mu\nu}^{*}$` the space between P and `\mu` is too large. So, my desired behaviour is to write my macro `\mtrx` in a way, that it has a look at the tokens after the macro. If there is a subscript present, it inserts a `\!` after the `#1`. If there is a subscript and a superscript, it inserts a `\;` in the superscript. If there is no subscript nothing is changed. I tried a bit with               \makeatletter       \newcommand{\mtrx}[1]{%         \@ifnextchar_{\boldsymbol{#1}\!}{\boldsymbol{#1}}}     \makeatother      but was not able to detect if there is also a superscript present - or at all how to read past the first character after the macro. I guess, this should somehow be possible with `\@car` and `\@cdr`, but I have no real clue on how to use them. Any help is appreciated. Thank you for your time. [EDIT] Ok, finally I found a solution. I stumbled upon a version of `\@ifnextchar` which removes the character in case of a match here. I have no clue how it works, but it works. By using it to remove the `_` and `^` characters, I was able to call some other macros turning `A_{B}` into something like `\@mtrx@sub{A}{B}`. Just in case, someone is searching for a similar problem, here is my solution.   1. `\removeifnextchar` is taken from the link above and acts similar to `\@ifnextchar`, except it removes the character on match.   2. `\mtrx` only formates its argument into bold face and calls `\@mtrx@chk` to check for sub- and superscripts   3. `\@mtrx@chk` peeks the next character using `\removeifnextchar` and calls `\@mtrxsub` or `\@mtrx@sup`, respectively, or returns its argument in case the next character is neither `_` nor `^`.   4. `\@mtrx@sub` and `\@mtrx@sup` take 2 arguments each, attach them in subscript or superscript fashion and call `\@mtrx@chk` again with this new argument in order to evaluate the next sub- or superscript. Maybe this is not the best solution, but I am really glad that I finally found it. Anyway, in order to learn from this, please feel free to comment and/or improve.               \makeatletter       \newcommand{\removeifnextchar}[3]{%         \begingroup         \ltx@LocToksA{\endgroup#2}%         \ltx@LocToksB{\endgroup#3}%         \ltx@ifnextchar{#1}{%           \def\next{\the\ltx@LocToksA}%           \afterassignment\next           \let\scratch= %         }{%           \the\ltx@LocToksB         }%       }            \newcommand{\mtrx}[1]{             \ensuremath         \@mtrx@chk{\boldsymbol{#1}}           }       \def\@mtrx@chk#1{%         \removeifnextchar{_} %         {\@mtrx@sub{#1}}         { \removeifnextchar{^} %           {\@mtrx@sup{#1}}           {#1}         }       }       \def\@mtrx@sub#1#2{%         \@mtrx@chk{#1_{\!#2}}       }       \def\@mtrx@sup#1#2{%         \@mtrx@chk{#1^{\:#2}}       }     \makeatother


title: titlesec errors out with res documentclass?

text: \documentclass{res}      \usepackage[compact]{titlesec}     \begin{document}               \end{document}      gives               ! Argument of \section has an extra }.       error and few other errors. Is there anything wrong with what I have, or will it just not work ? I am running MiKTeX on windows 7 I am also wondering if there is a way to change the space after section without `titlesec` sense it's giving me this error


title: Can we mirror a part in tikz?

text: After drawing a part in **TikZ** , is it possible to **mirror** that part with respect to some axis or line? MWE                \documentclass{standalone}           \usepackage{tikz}           \begin{document}           \begin{tikzpicture}      \draw[step=1.0,gray,thin] (0,0) grid (4,3);      \draw [thick](1,1) -- (0,0) -- (1,2); % Original Image      \draw [ultra thick,red] (2,0) -- (2,3); %axis      % code for Mirror Image      \draw [thick,blue](3,1) -- (4,0) -- (3,2); % Mirror Image      \end{tikzpicture}           \end{document}      ![enter image description here](http://i.stack.imgur.com/fWQXZ.jpg)


title: No spacing between enumerated items with \usepackage{enumerate}

text: I use this code now:               \documentclass[11pt]{article}     \usepackage{enumerate}     \begin{document}     \begin{enumerate}     \item a     \item b     \item c     \end{enumerate}     \end{document}      I want to decrease the line spacing between a,b,c. Can someone help me do this? And how do I remove the space BEFORE enumerate?


title: Automatically define macros in LyX documents

text: I'm using LyX all the time and over the last 2 years I've accumulated some very handy macros for my lecture notes. As it is today, every time I start a new document, I copy and paste the macros from one of my other documents. Is it possible, somehow, to automatically load macros for all files? (I asked this on SO a while back and got no answers. I hope in this new home I'll get a response).


title: Alignment spacing for negatives - Why am I unable to properly align my equations?

text: Although I searched the Web and indeed found an answer here, I still seem unable to address my issue of aligning two rows in my step-by-step process for solving a very basic equation. Just in case it matters, I am using MathJax, which is a JavaScript library that renders LaTeX in various forms of output (in my case, as MathML and HTML/CSS). My code:               \begin{eqnarray}         \hphantom{-} 9 + x &=& 12   \\         -9 \hphantom{+ x} &=& -9    \\         \hline                      \\         \implies x &=& 3     \end{eqnarray}      My goal is to get the "9" to align in the first two rows, however, the `\hphantom` macro in the first row isn't adjusting the `9 + x = 12` at all. I came up with the code using the help of people who answered a similar alignment question elsewhere here. I noted that when I reversed the first two rows in my code, `\hphantom` did indeed align the 9 correctly. I would appreciate anyone helping me determine if there is an issue with my LaTeX. If not, I can investigate the HTML/CSS layout issues.


title: Long equation with left and right justified

text: Good day to all, I have below equation, the first equation exceeds my margin if written in one line. So I want it appear in two lines which the first line is justified at the left side and the second line is justified at the right. Is this is a good practice or I have to put it in other way, which is accepted by mathematician especially. ![This is the output of my latex command](http://i.stack.imgur.com/rhsS8.png)               \documentclass{report}     \usepackage{amssymb,amsmath}          \begin{document}          \begin{eqnarray}\nonumber     \mathbf{c}_m^t(b_0\mathbf{I}_m +b_{1}\mathbf{Q}_{m}+b_{2}\mathbf{Q}^2_{m}+\cdots +b_n \mathbf{Q}_m^n)\mathbf{H}_m=&\\ \label{panjang}     =\mathbf{eQ}_m^{\alpha}(a_0 \mathbf{I}_m^{}+a_1\mathbf{Q}_m+a_2\mathbf{Q}_m^{2}+\cdots+a_n\mathbf{Q}_m^{n})\mathbf{H}_m     \end{eqnarray}     where \(\mathbf{e}=\begin{bmatrix}\sqrt{m} & 0 & \cdots & 0\end{bmatrix}\). Rewrite Eqn. \ref{panjang} with     \begin{eqnarray}g_1(\mathbf{Q}_{m})=a_0 \mathbf{I}_m+a_1\mathbf{Q}_m^{}+a_2\mathbf{Q}_m^{2}+\cdots+a_n\mathbf{Q}_m^{ n}\end{eqnarray}      and      \begin{eqnarray}     g_2(\mathbf{Q}_{m})=b_0\mathbf{I}_m +b_{1}\mathbf{Q}_{m}+b_{2}\mathbf{Q}^2_{m}+\cdots +b_n \mathbf{Q}_m^n\end{eqnarray} it becomes     \begin{eqnarray}     \mathbf{c}_m^t g_{2}(\mathbf{Q}_{m})&=&     \mathbf{e}\mathbf{Q}_m^\alpha g_1(\mathbf{Q}_{m}).     \end{eqnarray}          \end{document}


title: Torn paper: matching up the torn edges

text: I recently asked a question on creating a torn paper effect. JLdiaz provided an absolutely beautiful answer, which I have used (with a very minor modification) to indicate the way in which a document is being cut up into sections by a program: ![enter image description here](http://i.stack.imgur.com/RGiEZ.png) [JLDiaz's original had flat top edges; I essentially copied the method he used for the bottoms and wrapped it around the `-- (A.north east)` in his source to get torn top edges as well as bottom edges.] This is far better than anything I thought achievable, but there is a tweak that would make it even better --- in fact, it's taken from a comment on JLDiaz's website. Would it be possible to make the torn edges of the adjacent 'pieces of torn paper' line up, so that the bottom of 58 matches the top of 59 (and so on)? Final result: ![enter image description here](http://i.stack.imgur.com/hGc5G.png)


title: Wrong width in multicolumn tabularx cells

text: I'm trying to create a table with fixed column widths. As most rows have a different number of cells (with LCM 12) I defined a 12 column wide table, where I add multicolumns of the wanted size. The problem is, that the sizes are only calculated correctely for the 6 double-column fields. The 12-column captions and the 4 three-column fields are wrong. Minimal example (including color, to make the problem more obvious):               \documentclass[a4paper,12pt]{book}     \usepackage[table]{xcolor}     \usepackage{tabularx}          \begin{document}          \rowcolors{1}{green}{red}     \newcommand{\mc}[2]{\multicolumn{#1}{|>{\setlength{\hsize}{#1\hsize} }X|}{#2}}     \begin{tabularx}{\textwidth}{|X|X|X|X|X|X|X|X|X|X|X|X|}     \mc{12}{Caption 1} \\     \mc{2}{Field 1.1} & \mc{2}{Field 1.2} & \mc{2}{Field 1.3} & \mc{2}{Field 1.4} & \mc{2}{Field 1.5} & \mc{2}{Field 1.6} \\     \mc{12}{Caption 2} \\     \mc{3}{Field 2.1} & \mc{3}{Field 2.2} & \mc{3}{Field 2.3} & \mc{3}{Field 2.4} \\     \end{tabularx}          \end{document}      Where does this comes from and how I can get it to work like it should? Different approaches to the problem with the varying amount of cells are also welcome, the cell width per row has to stay the same for all the rows cells though.


title: How to fix venn diagram

text: I would like to make a venn diagram with Tikz, but instead of labeling A, B or C each circle I'd like to give some other names. However, having read the manual I've changed their labels but each new word doesn't fit in each shape. My code so far is:               \documentclass[12pt,a4paper]{article}     \usepackage[english,greek]{babel}     \usepackage{ucs}      \usepackage[utf8x]{inputenc}     \usepackage{venndiagram}     \begin{document}     \begin{venndiagram3sets}[labelA={υλικά}, labelB={καταναλωτικά}, labelC={διαρκή}, labelABC={ΑΑΑΒΒΒΨΨΦΦΔ}]     \fillACapBCapC     \end{venndiagram3sets}     \end{document}      My diagram I'd like to be like: ![enter image description here](http://i.stack.imgur.com/PEHJT.png) How can I change how big a circle can be?


title: Centering text in a tabular environment

text: Good day to all, This look not beautiful for me, I want the text is centred in the box, especially `$\frac{1}{s^n}$`. Your help is much appreciated.               \documentclass{report}          \usepackage{amsmath}           \begin{document}     \begin{table}[H]\centering\label{laplaceintegral}     \begin{tabular}{|c|c|c|}     \hline      Item & $\text{Functions ($t$ domain)}$ & $\text{Laplace Transforms ($s$ domain)}$\\     \hline\hline     1&$\int_0^t x(\tau)d\tau$ & $\displaystyle\frac{1}{s}\cdot X(s)$\\ \hline     2&$\underbrace{\int_0^{t}\ldots\int_0^{t_3}\int_0^{t_2}}_{n\text{times}} %         x\left(\tau_1\right)d\tau_1dt d\tau_2\ldots d\tau_n$ %         & $\displaystyle \frac{1}{s^n}\cdot X(s)$ \\ \hline     \end{tabular}     \caption{Laplace transform of integral}     \end{table}          \end{document}      thank you in advance.


title: A couple of specific beamer questions

text: Alright, I m currently pimping my `beamer` skills and have a little trouble figuring out a couple of issues. Here we go:   * logos: From what I gather, `\logo{\includegraphics[scale=0.4]{something.jpg}}` should be the way to go, but it just does nothing for me. No errors, but no effects as well. I tried it in the preamble and the beginning of the document. What's wrong here?   * I'd like to enlarge the title on the title page. However `\title{{\Huge Title}}` has the disadvantage that it enlarges the title not only on the title page, but on every page, making it basically a non-option. What's the better way to go about it?   * I like the `beamer` themes with sidebars, but I would like to customize it a little. Apparently, the `textpos` package or `\setbeamertemplate` commands are the way to go, but how would I for example remove the mention of the authors on the sidebar?   * `\titlegraphic` puts its graphic below everything else on the title page for me. Can I reposition it freely? Thats about everything I can up with right now, and I would be very grateful for every piece of advice! `=)`


title: Color \skippedwords in bytefield package respectively background color in general

text: The manual of the **bytefield** package explains how to color a normal bitfield with a colored `\rule`. I'm also using the `\skippedwords` command in my figures. I would like to also color that fields. However, it seems that there is no option in the bytefield package for a general color changing. Does somebody has an idea how to accomplish that, a workaround or a package suggestion? I know that I could draw everything with tikz but I would like to avoid that.


title: longtabu, column width

text: having an issue with longtabu and setting columns to a percentage of the table width. I've achieved what i want with tabularx:               \documentclass{report}          \usepackage{tabularx}     \begin{document}          \begin{tabularx}{\textwidth}{         >{\hsize=.1\hsize}X         >{\hsize=.1\hsize}X         >{\hsize=.1\hsize}X         >{\hsize=.7\hsize}X} % 70% of table width         \hline          \textbf{Time End of Step} &          \textbf{Step} &          \textbf{Event} &         \textbf{Description}          \\ \hline          12:18:52 & 1 & 1 & this is a description for the event \\         12:18:52 & 1 & 1 & this is a description for the event \\         12:18:52 & 1 & 1 & this is a description for the event \\     \end{tabularx}          \end{document}      then i try with tabu:               \documentclass{report}          \usepackage{longtable,tabu}     \begin{document}          \begin{longtabu} to \textwidth {         >{\hsize=.1\hsize}X         >{\hsize=.1\hsize}X         >{\hsize=.1\hsize}X         >{\hsize=.7\hsize}X} % 70% of table width         \hline \hline         \textbf{Time End of Step} &          \textbf{Step} &          \textbf{Event} &         \textbf{Description}          \\ \hline \hline \hline \hline         12:18:52 & 1 & 1 & this is a description for the event \\         12:18:52 & 1 & 1 & this is a description for the event \\         12:18:52 & 1 & 1 & this is a description for the event \\     \end{longtabu}          \end{document}      So this produces an error, saying dimension too large. Anyone know how to use this hsize in longtabu? Thanks!


title: `multind` prints empty index

text: I'm trying to run a document with multiple indices after reading this and its reference, but my pdf's indices have no content. I've even run MakeIndex on the file, although I don't know if that applies when using `multind`. A short example I'm not able to run successfully is:               \documentclass{article}     \usepackage[utf8]{inputenc}          \usepackage{multind}     \makeindex{books}     \makeindex{authors}          \begin{document}     Text\index{books}{b1}, text\index{authors}{a1}.          Text\index{books}{b2}\index{authors}{a2}. End of text.          \printindex{books}{The Books index}     \printindex{authors}{The Authors index}     \end{document}      The idx files are there and they have the info. What little trick am I missing?


title: opening pdf at the cursor on lyx

text: While creating a preview on lyx , I expect the pdf to show me the position of the text at which cursor is positioned. The default behaviour seem to open pdf at first page. How can I change this behaviour?


title: Can't enter calculation in table

text: I'm kind of new to LaTeX and I want to put these 3 calculations in a table. But I'm getting errors               \begin{tabular}{ l | c | r }       \begin{math}        \frac{9250}{7650} = 1,21 &       \frac{10126}{7986} = 1,27 &        \frac{10210}{7850} = 1,30      \end{math}     \end{tabular}      Maybe someone can see what is wrong? The error:               Extra }, or forgotten $.      But I don't see where I might have forgotten that.


title: Problem regarding parcolumns package

text: I needed to use `parcolumns` packages which was not available on my system. I installed it and now am having some trouble. I followed following steps:   * Locate the package `sauerj` on CTAN website. I downloaded the zip, extracted the folder `sauerj` and ran following command for each `.ins` file in the folder: `latex filename.ins` which created `.sty` files in the same directory.   * Copy the entire directory to `/usr/share/texmf-texlive/tex/latex` and `cd` to that directory.   * I ran following commands in that directory: `sudo mktexlsr`, `texhash`. Now I try to compile a simple code:               \documentclass[a4paper,20pt]{article}          \usepackage[total={6.5in,8.75in}, top=1.2in, left=0.9in]{geometry}     \usepackage{fancyhdr}     \usepackage{multicol}     \usepackage{ragged2e}     \usepackage{hyperref}     \usepackage{parcolumns}          \pagestyle{fancy}      I get following error:               ! LaTeX Error: File `processkv.sty' not found.      If I remove `\usepackage{parcolumns}` line, the script works. But I need to use `parcolumns` package. BTW, the `sauerj.zip` had files related to `processkv`.


title: Why do I suddenly get an auto expansion error?

text: On files that have worked previously, I'm suddenly getting the following error               ! pdfTeX error (font expansion): auto expansion is only possible with scalable fonts.      This error does not appear if I switch back to TexLive-2012, did not appear until recently in TexLive-2013, and seems to be triggered by the use of the `mathdesign` package's `expert` option along with the Charter typeface and `microtype`: that is               \RequirePackage[bitstream-charter,expert]{mathdesign}      produces the error, while               \RequirePackage[bitstream-charter]{mathdesign}      does not. To support the `expert` option, I have (purchased) `bchrc8a.pfb` located in `/usr/local/texmf-local/fonts/type1/bitstrea/charter/`, and if I disable `microtype` I get a different error:               !pdfTeX error: pdflatex (file bchrc8a): Font bchrc8a at 600 not found      so I suspect that my problems result from TexLive-2103 not finding this file, but I'm at a loss as to how to fix it. * * * This error only appears in fairy complex and lengthy documents, so it is hard for me to produce an good MWE (I'm working on it) but since it seems to be the result of some higher-level configuration issue, I'm hoping that this can be resolved without resorting to a specific example file. A "partial" MWE, that produces only the second, file not found, error is:               \documentclass[]{article}          \RequirePackage[bitstream-charter,expert]{mathdesign}     %omitting 'expert' above produces no error          \begin{document}         \textsc{Small Caps}         Regular text.         \end{document}      In my working files, I use a custom document class based on Tufte-LaTeX, if that rings any bells.


title: Table with percentage sign for a specific line

text: I am importing a table from a file and I would like to add a percentage sign for all figures on the third row. The code works well for a specific cell in the table using the command               every row 2 column 0/.style      but when I use the following code instead, nothing happens :               every row no/.style      Here is the full code with the corresponding result : ![enter image description here](http://i.stack.imgur.com/NXguy.jpg)               \documentclass{standalone}     \usepackage{pgfplotstable}          \begin{document}          \pgfplotstabletypeset[every row 2 column 0/.style={postproc cell content/.style={@cell content=\textbf{##1\%}}},col sep=&,row sep=\\]{     colA & colB & colC \\     11 & 12 & 13 \\     21 & 22 & 23 \\     33 & 43 & 12 \\     }          \end{document}


title: Function in the half of arrow with tikzcd

text: I'd like to do a diagram in which a function f appears in the half of the arrow, like this: ![enter image description here](http://i.stack.imgur.com/M3TZT.png) Is it possible doing this with tikzcd package?


title: colored rule and reference current column width in vwcol

text: I would like to have   1. colored vertical rules separating columns in the vwcol package and   2. some method of referring to the current column width in the vwcol package. We show a vwcol example and then extend it with these two features using multicol package. Is there some way of achieving them in vwcol? (This post inspired some of the code below and may be of some relevance to the second point although that post deals with the tabu package and not with vwcol.)               \documentclass{article}     \usepackage{graphicx}     \usepackage{multicol}     \usepackage{vwcol}     \usepackage[table]{xcolor}          \begin{document}          Seems ok but does not have a couple of features we would like:     \begin{center}     \begin{vwcol}[widths={.5,.5}]     \includegraphics[width=.45\textwidth]{myfig}     \includegraphics[width=.45\textwidth]{myfig}     \end{vwcol}     \end{center}          Here is an example using multicol that illustrates two things we     would like to add: (1) set color of vertical rule and (2) some     counterpart to \verb|\columnwidth|.  Using \verb|.45\textwidth| as we      do above with vwcol is not ideal since it effectively means specifying      width information twice.          \begin{center}     \setlength{\tabcolsep}{8pt}     \setlength{\columnseprule}{1pt}     \renewcommand\columnseprulecolor{\color{blue}}     \begin{multicols}{2}     \includegraphics[width=\dimexpr\columnwidth-2\tabcolsep\relax]{myfig}     \includegraphics[width=\dimexpr\columnwidth-2\tabcolsep\relax]{myfig}     \end{multicols}     \end{center}          Is this possible with vwcol as it stands now?          \end{document}      EDIT: Added the output shown below. Here is what the output from the above latex code looks like: ![enter image description here](http://i.stack.imgur.com/QnGD6.png) Creative commons info on elephant image is available here.


title: Problem coloring an entire table due to \raisebox

text: I'm trying to make an ENTIRE table gray (see picture ![enter image description here](http://i.stack.imgur.com/iSops.png) but I can't get it to work with \raisebox. Here's my code:               \documentclass[a4paper,11pt]{article}     \usepackage{color,amsmath,amsfonts,amssymb}     \usepackage{rotating}     \usepackage{colortbl}          \definecolor{Gray}{gray}{0.9}          \newcolumntype{g}{>{\columncolor{Gray}}c}     \begin{table}[h]     \begin{center} {\footnotesize     \begin{tabular}{lccg}     \hline      & \multicolumn{3}{c}{AFC Window 1}    \\       & \multicolumn{1}{c}{gmt} & \multicolumn{1}{c}{jfk} &     \multicolumn{1}{c}{fbi}\\\hline     \rowcolor{Gray}     & $0.025^*$ & -0.002 & $1.155^*$ \\[-2ex]     \rowcolor{Gray}     \raisebox{2ex}{Constant} & (1.22) & (2.22) & (0.56)\\[0ex]     & $0.025^*$ & -0.002 & $1.155^*$ \\[-2ex]     \raisebox{2ex}{Constant} & (1.22) & (2.22) & (0.56)\\[0ex]     & $0.025^*$ & -0.002 & $1.155^*$ \\[-2ex]     \raisebox{2ex}{Log(assets)$^a$} & (1.22) & (2.22) & (0.56)\\[0ex]     \hline     \end{tabular} }     \end{center}     \caption{\footnotesize Number of turns and distance between top and bottom.}     \label{turns}     \end{table}               \end{document}      Thanks guys.


title: My newcommand does not work within other environments (align*)

text: Minimal Example that demonstrates the problem:               \documentclass[12pt]{article}     \usepackage{amsmath}          %%% variable declaration:     \newlength{\temp}%     \newlength{\tempp}%     \newlength{\Flinewidth}%     \setlength{\Flinewidth}{0.5pt}%     \newlength{\Fraiseheight}%     \setlength{\Fraiseheight}{1ex}%     \addtolength{\Fraiseheight}{-\Flinewidth}%     \newlength{\Fantecedentheight}%     \newlength{\Fconsequentdepth}%     \newsavebox{\Fantecedent}%     \newsavebox{\Fconsequent}%          %%% conditional stroke \Fconditional[content]{consequent}{antecedent}:     \newcommand{\Fconditional}[3][]%     {%       \unskip       \sbox{\Fantecedent}{%         \rule{0pt}{\baselineskip}% this is a strut         \ensuremath{#3}}%       \settoheight{\Fantecedentheight}{%         \rule{0pt}{\baselineskip}%         \ensuremath{#3}}%         \sbox{\Fconsequent}{%         \rule[-0.3\baselineskip]{0pt}{0.3\baselineskip}% this is a strut         \ensuremath{#2}}%       \settodepth{\Fconsequentdepth}{%         \rule[-0.3\baselineskip]{0pt}{0.3\baselineskip}%         \ensuremath{#2}}%       \setlength{\temp}{\lineskip}%       \addtolength{\temp}{\Fantecedentheight}%       \addtolength{\temp}{\Fconsequentdepth}%       \setlength{\tempp}{\temp}%       \addtolength{\tempp}{-\Fraiseheight}%       \mbox{%         \ensuremath{#1\unskip}%         \kern-\Flinewidth%         \rule[-\tempp]{\Flinewidth}{\temp}%         \settowidth{\temp}{\usebox{\Fconsequent}\\\usebox{\Fantecedent}}%         \parbox[t]{\temp}{\usebox{\Fconsequent}\\\usebox{\Fantecedent}}}%     }%          \begin{document}       $\Fconditional[A]{B}{C}$       $\Fconditional[A]{B}{C\Fconditional{D}{E}}$       \begin{align*}         \Fconditional[A]{B}{C}       \end{align*}     \end{document}      This command does exactly what it is supposed to do as called in in-line maths mode like so:               $\Fconditional[A]{B}{C}$      Thanks to the comment about removing definitions from the macro, the command now also works nested in itself like so:               $\Fconditional[A]{B}{C\Fconditional{D}{E}}$      However if I call the same command within an align* environment like so:               \begin{align*}       \Fconditional[A]{B}{C}     \end{align*}      I get the following error message: > ! Misplaced alignment tab character &.   >  \math@cr@@@ ->&   >  \omit \global \advance \row@ \@ne \ifst@rred \nonumber \fi \i...   >  l.51 \end{align*} This happens regardless of whether I actually use any & characters in the align* environment. Ignoring the error produces part of the output. Sorry I did not include a proper minimal example earlier.


title: How to fit this table into Latex

text: The margin on the left is quite huge. I was wondering what was the optimal way of fitting this into one latex page. Anyway here is my code:                \begin{table}[htbp]\centering     \def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}     \caption{Table 1: Naive OLS regressions of consumption on hourly wholesale price}     \begin{tabular}{l*{5}{c}}      \hline\hline                 &\multicolumn{1}{c}{Consumption}&\multicolumn{1}{c}{LogConsumption}&   \multicolumn{1}{c}{Log Consumption}&\multicolumn{1}{c}{Consumption}&\multicolumn{1}{c}{Consumption}\\     \hline     Hourly price    &    0.237\sym{***}&  0.00215\sym{***}&                    &                  &    0.500\sym{***}\\                 & (0.0333)         &(0.0000844)         &                  &                  & (0.0828)         \\     [1em]     Log hour Price  &                  &                  &    0.191\sym{***}&                  &                  \\                 &                  &                  &(0.00727)         &                  &                  \\     [1em]     Hourly price sq.&                  &                  &                  & 0.000612\sym{***}& -0.00103\sym{***}\\                 &                  &                  &                  &(0.000120)         &(0.000298)         \\     [1em]     Constant        &    213.9\sym{***}&    4.372\sym{***}&    3.727\sym{***}&    229.3\sym{***}&    200.4\sym{***}\\                 &  (3.318)         &(0.00842)         & (0.0322)         &  (1.831)         &  (5.123)         \\     \hline     Observations    &   165600         &   162290         &   161806         &   165600         &   165600         \\     Adjusted \(R^{2}\)&    0.000         &    0.004         &    0.004         &    0.000         &    0.000         \\     \hline\hline     \multicolumn{6}{l}{\footnotesize Standard errors in parentheses}\\     \multicolumn{6}{l}{\footnotesize  }\\     \multicolumn{6}{l}{\footnotesize \sym{*} \(p<0.05\), \sym{**} \(p<0.01\), \sym{***} \(p<0.001\)}\\     \end{tabular}     \end{table}


title: BibTex Style File for UWE Harvard

text: In 2011 the University of the West of England developed its own version of the Harvard referencing system [1]. Unfortunately they do not officially support BibTex and therefore do not provide a bst file. I was wondering if any former or current student has created such a file and is willing to share it. [1] http://www1.uwe.ac.uk/students/studysupport/studyskills/referencing/uweharvard.aspx


title: How to: Tex fonts

text: I want to learn something about how TeX fonts works.   * But I don't know where to start?   * Is there any book about it?    * Where I can find some library of the TeX fonts? (with preview)


title: Overlay two .tikz files from input

text: I have some plots generated from matlab2tikz which I would like to overlay. Each plot is a seperate .tikz file which I input using \input. My code currently is:               \pgfplotsset{     every axis/.append style={     scale only axis,        },     /tikz/every picture/.append style={     trim axis left,     trim axis right,         }     }          \newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}     \begin{table}[h!]\centering            \begin{center}          \begin{tabular}{P{6cm} P{6cm}}          \toprule           R220expt21 & R60expt\\           \cmidrule(r){1-1}\cmidrule(l){2-2}           \scalebox{0.4}{\input{images/expt21nrmse.tikz}}\llap{\raisebox{0.5cm}{\scalebox{0.2}                  {\input{images/expt21nrmse.tikz}}}}           \scalebox{0.4}{\input{images/expt21fitD.tikz}}                   &                \scalebox{0.4}{\input{images/expt2nrmse.tikz}}           \scalebox{0.4}{\input{images/expt2fitD.tikz}}           \\ \bottomrule           \end{tabular}           \caption{Fitted results for two samples. (top) NRMSE values for each q. (bottom) Fitted diffusion. (bottom insert) 2 Highlighted DICF and theoretical fits.}           \label{tbl:1}           \end{center}     \end{table}      Currently this code produces: ![Output from code](http://i.stack.imgur.com/aREMG.png) As you can see the inset of the top left image is looking fine, but I would like to shift it around horizontally too. I tried the solutions in the topic "Horizontal equivalent to \raisebox?" but I get an error about being in horizontal mode. My questions are:   * Is there a method, keeping with what I do currently in using \input, to neatly position a subplot?   * Is my method bad practice, if so what should I be doing? Thanks for your time. Edit 2: FULL MWE:               \documentclass[11pt,a4paper]{report}          \usepackage[a4paper,vmargin={30mm,30mm},hmargin={30mm,30mm}]{geometry}     \usepackage{graphicx,array,booktabs,pgfplots}     \usetikzlibrary{calc}          \newsavebox{\mybox}     %\sbox{\mybox}{\input{images/exp5nrmse.tikz}}     \sbox{\mybox}{%   Just use \input{images/exp5nrmse.tikz} instead of following      \begin{tikzpicture}     \begin{axis}[%     width=4.52083333333333in,     height=3.565625in,     scale only axis,     xmin=1,     xmax=511,     xlabel={$q (\mu m^{-1})$},     ymin=0.5,     ymax=1,     ylabel={Normalized RMS error}     ]     \addplot [color=blue,solid,line width=1.0pt,forget plot]       table[row sep=crcr]{     10  0.49608542  \\     11  0.5509195   \\     12  0.54464869  \\     13  0.54379236  \\     14  0.60808362  \\     15  0.49726539  \\     16  0.61919337  \\     17  0.66339954  \\     18  0.72671426  \\     19  0.71607429  \\     };     \end{axis}     \end{tikzpicture}%     }          \pgfplotsset{     every axis/.append style={     scale only axis,        },     /tikz/every picture/.append style={     trim axis left,     trim axis right,         }     }          \begin{document}          \newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}     \begin{table}[htb!]      \centering          \begin{tabular}{P{5.5cm} P{5.5cm}}          \toprule           R220expt21 & R60expt\\           \cmidrule(r){1-1}\cmidrule(l){2-2}           \tikz[remember picture,baseline=(a.base)]\node[scale=0.4,outer sep=0pt]                    (a){\usebox{\mybox}};            %%% Change dimensions in $(a.east)+(-0.9,0cm)$           \tikz[remember picture,overlay]\node[anchor=east,outer sep=0pt,scale=0.2] at                    ($(a.east)+(-0.9,0cm)$){\usebox{\mybox}};           \scalebox{0.4}{\usebox{\mybox}}           &           \scalebox{0.4}{\usebox{\mybox}}           \scalebox{0.4}{\usebox{\mybox}}           \\ \bottomrule           \end{tabular}           \caption{Fitted results for two samples. (top) NRMSE values for each q. (bottom) Fitted diffusion. (bottom insert) 2 Highlighted DICF and theoretical fits.}           \label{tbl:1}     \end{table}          \end{document}


title: Pass package options at loading time or later?

text: (This isn't really about a LaTeX issue but more about personal taste and arguments herefore.) Do you prefer to pass package options at loading time with, say,               \usepackage[something]{geoemtry}     \usepackage[something]{siunitx}      or later in the preamble with               \geometry{something}     \sisetup{something}      ? I'm asking because I can't make a decision about what to do. An argument for doing it at loading time is than not all packages have other ways of selecting package options than at loading time (see, e.g., Options for ``footmisc'' package) and then the first choice makes the preamble more consistent.


title: Longtable and threeparttablex: wrong position of tablenote when table is textwidth

text: I have a problem with `longtable` and the position of a table note created by `threeparttablex`, as the MWE below demonstrates. The first table stretches to the full textwidth and the position of the table note is incorrect. The second table does not specify any table size and the table note is correct. Am I doing something wrong?               \documentclass[11pt]{scrartcl}          \usepackage[showframe]{geometry}     \usepackage{longtable,threeparttablex,booktabs}          \begin{document}          \begin{ThreePartTable}      \begin{TableNotes}[para,flushleft]This is a wrong tablenote\end{TableNotes}      \setlength\LTleft{0pt}      \setlength\LTright{0pt}      \begin{longtable}{@{\hskip\tabcolsep\extracolsep\fill}l*{3}{c}}       \caption{Longtable with Full Textwidth}\\       \toprule        Variable 1 & 1.85   & 0.92   & 1.11   \\                   & (0.34) & (0.24) & (0.14) \\       \bottomrule       \insertTableNotes      \end{longtable}     \end{ThreePartTable}          \begin{ThreePartTable}      \begin{TableNotes}[para,flushleft]This is a good tablenote\end{TableNotes}      \begin{longtable}[c]{l*{3}{c}}       \caption{Normal Longtable}\\       \toprule        Variable 1 & 1.85   & 0.92   & 1.11   \\                   & (0.34) & (0.24) & (0.14) \\       \bottomrule       \insertTableNotes      \end{longtable}     \end{ThreePartTable}          \end{document}      ![enter image description here](http://i.stack.imgur.com/RKM5b.png)


title: How to draw an inductive coupling with circuitikz and TikZ?

text: I'd want to draw a circuit with an inductive coupling, as you can see in the following image: ![enter image description here](http://i.stack.imgur.com/VOZh9.png) What I need now is putting the dots related to the inductive coupling, as well as the power lines. I think I could draw these last ones using TikZ if they were flat, but as they are wavy, I don't know how to do it. This is the code I've written till now (I've put two lines between both coupled inductors):               \documentclass[border=2pt]{standalone}     \usepackage{circuitikz}           \begin{document}     \begin{figure}     \centering     \begin{circuitikz}       \draw (0,0) to [short,o-o] (8,0);       \draw (0,1.5) to [short,o-] (3,1.5);       \draw (5,1.5) to [short,-o] (8,1.5);       \draw (3,1.5) to [inductor] (5,1.5);       \draw (6,2.5) to [short] (5,2.5) to [inductor] (3,2.5) to [short] (2,2.5) to [short] (2,3.5) to [C] (6,3.5) to [short] (6,2.5);       \draw (2,3.5) to [short] (2,4.5) to [inductor] (6,4.5) to [short] (6,3.5);       \draw (2,4.5) to [short] (2,5.5) to [resistor] (6,5.5) to [short] (6,4.5);       \draw[-] (3.5,1.95) -- (4.5,1.95) node{};       \draw[-] (3.5,2.05) -- (4.5,2.05) node{};     \end{circuitikz}      \end{figure}     \end{document}      How could I complete this drawing? Thank you.


title: Alignment in math equations

text: How can I align my equations as in the image below? ![enter image description here](http://i.stack.imgur.com/Dfv6h.png) I know               \begin{equation}         \begin{split}             x_1'(t) &= x_1(t)+2 x_2(t) \\             x_2'(t) &= 3 x_1(t)         \end{split}     \end{equation}      but it will only align the equal signs and not the variables.


title: Two \social icons for one account name in moderncv header?

text: I use the default template of moderncv (can be used as MWE) classic style with awesome moderncvicons compiled in LuaLaTeX. I have the same account name for Twitter and Github, and I would like to have both icons in the same line preceding my account name in the header info. Here is the part of the template:               \social[linkedin]{john22.doe}     \social[twitter]{jdoe}     \social[github]{jdoe}      How can I do this? Thanks for your replies.


title: Numbers and programming code

text: This happens when I use programming code and enumeration, how can I add a gap between the numbering and the line numbers of the code. ![enter image description here](http://i.stack.imgur.com/3A1lZ.png) I'm using this in LaTeX Preamble:               \usepackage{listings}     \lstset{language=java,numbers=left,tabsize=2,showstringspaces=false,showspaces=false}


title: Using XeTeX for automatic transliteration of cyrillic letters

text: This is a follow-up question to the following question: Serbian Cyrillic using LuaTeX and XeTeX. I actually often need character substitution the other way around, that is, I write cyrillic, but want transliterated output, e.g. I type _добрый_ but get _dobryj_ in the result document. This is very handy, and I use the following mappings with pdflatex to achieve this (I'm including this so people can reuse it):               \DeclareUnicodeCharacter{1040}{A}     \DeclareUnicodeCharacter{1041}{B}     \DeclareUnicodeCharacter{1042}{V}     \DeclareUnicodeCharacter{1043}{G}     \DeclareUnicodeCharacter{1044}{D}     \DeclareUnicodeCharacter{1045}{E}     \DeclareUnicodeCharacter{1046}{Ž}     \DeclareUnicodeCharacter{1047}{Z}     \DeclareUnicodeCharacter{1049}{J}     \DeclareUnicodeCharacter{1050}{K}     \DeclareUnicodeCharacter{1051}{L}     \DeclareUnicodeCharacter{1052}{M}     \DeclareUnicodeCharacter{1053}{N}     \DeclareUnicodeCharacter{1054}{O}     \DeclareUnicodeCharacter{1055}{P}     \DeclareUnicodeCharacter{1056}{R}     \DeclareUnicodeCharacter{1057}{S}     \DeclareUnicodeCharacter{1058}{T}     \DeclareUnicodeCharacter{1059}{U}     \DeclareUnicodeCharacter{1060}{F}     \DeclareUnicodeCharacter{1062}{C}     \DeclareUnicodeCharacter{1063}{Č}     \DeclareUnicodeCharacter{1064}{Š}     \DeclareUnicodeCharacter{1069}{Ė}     \DeclareUnicodeCharacter{1070}{Ju}     \DeclareUnicodeCharacter{1071}{Ja}     \DeclareUnicodeCharacter{1025}{Ë}     \DeclareUnicodeCharacter{1072}{a}     \DeclareUnicodeCharacter{1073}{b}     \DeclareUnicodeCharacter{1074}{v}     \DeclareUnicodeCharacter{1075}{g}     \DeclareUnicodeCharacter{1076}{d}     \DeclareUnicodeCharacter{1077}{e}     \DeclareUnicodeCharacter{1078}{ž}     \DeclareUnicodeCharacter{1079}{z}     \DeclareUnicodeCharacter{1080}{i}     \DeclareUnicodeCharacter{1081}{j}     \DeclareUnicodeCharacter{1082}{k}     \DeclareUnicodeCharacter{1083}{l}     \DeclareUnicodeCharacter{1084}{m}     \DeclareUnicodeCharacter{1085}{n}     \DeclareUnicodeCharacter{1086}{o}     \DeclareUnicodeCharacter{1087}{p}     \DeclareUnicodeCharacter{1088}{r}     \DeclareUnicodeCharacter{1089}{s}     \DeclareUnicodeCharacter{1090}{t}     \DeclareUnicodeCharacter{1091}{u}     \DeclareUnicodeCharacter{1092}{f}     \DeclareUnicodeCharacter{1094}{c}     \DeclareUnicodeCharacter{1095}{č}     \DeclareUnicodeCharacter{1096}{š}     \DeclareUnicodeCharacter{1101}{ė}     \DeclareUnicodeCharacter{1102}{ju}     \DeclareUnicodeCharacter{1103}{ja}     \DeclareUnicodeCharacter{1105}{ë}     \DeclareUnicodeCharacter{1110}{i}     \DeclareUnicodeCharacter{1030}{I}     \DeclareUnicodeCharacter{1108}{je}     \DeclareUnicodeCharacter{1028}{Je}     \DeclareUnicodeCharacter{1061}{X}     \DeclareUnicodeCharacter{1093}{x}     \DeclareUnicodeCharacter{1048}{I}     \DeclareUnicodeCharacter{1065}{ŠČ}     \DeclareUnicodeCharacter{1066}{'}     \DeclareUnicodeCharacter{1067}{Y}     \DeclareUnicodeCharacter{1068}{'}     \DeclareUnicodeCharacter{1097}{šč}     \DeclareUnicodeCharacter{1098}{'}     \DeclareUnicodeCharacter{1099}{y}     \DeclareUnicodeCharacter{1100}{'}      My question is: is there a straight-forward way of reusing this very mapping in XeTex? I assume: no, I need to input all the UTF-8 codes, right? But maybe somebody else has already done that. Is there any repository of mapping files?


title: Avoid acronym list when acronym environment is \include[d]

text: I want to keep my `acronym` environment in a separate file and avoid printing out the whole acronym list. Still the option `[nolist]` of the `acronym` package seems not to work when the acronym environment is included into the main document. Please consider the following MWE               \documentclass{article}          \usepackage[nolist]{acronym}     \usepackage{filecontents}          \begin{filecontents}{acronym.tex}          \begin{acronym}       \acro{NLP}{Natural Language Processing}     \end{acronym}          \end{filecontents}               \begin{document}          First use of \ac{NLP}. Second use of \ac{NLP}.          \include{acronym}          \end{document}      which gives ![enter image description here](http://i.stack.imgur.com/1HnXb.png) Yet when I take the option `[nolist]` out I get the correct ![enter image description here](http://i.stack.imgur.com/hLYCE.png)


title: Vertical alignment of tables when using numbered list in LyX

text: I have a table on my numbered lists but the number is appearing in the middle, I want it to be at the top like normal. This is what it looks like when using tables. (Screenshot below) I've attached a picture, I want the number 6 to be the top not the middle. ![enter image description here](http://i.stack.imgur.com/KpDeP.png)


title: Beamer - gradual exposure in the same frame

text: I want to reveal gradually several items **in the same frame** in a certain order. In the following MWE I want to reveal item 1 (make item 1 appear first), then reveal table 1, then reveal item 2, then reveal table 2. How can I do that?               \documentclass{beamer}          \begin{document}         \begin{frame}             \begin{itemize}                 \item                  item 1                      \item                  item 2             \end{itemize}                  \vspace{1.5\baselineskip}                  \begin{minipage}{0.4\textwidth}                 \begin{tabular}{c|c}                     table1 & trial \\                     \hline                     \hline                     1 & 2 \\                     3 & 4                 \end{tabular}             \end{minipage} \qquad             \begin{minipage}{0.4\textwidth}                 \begin{tabular}{c|c}                     table2 & trial \\                     \hline                     \hline                     5 & 6 \\                     7 & 8                 \end{tabular}             \end{minipage}                \end{frame}     \end{document}


title: ASCII graphs in LaTeX document?

text: I have ASCII graphs which I want to get nicer like the below. How can I embed ASCII graphs nicely converted to LaTeX document? **Input**                   11              11     01      10  <-> 10      01         00              00      **Intended Output** ![enter image description here](http://i.stack.imgur.com/ZoI8v.jpg)


title: How to control the back address ident and remove the sender address in scrlttr2

text: I'd like to remove the box which holds the sender data and only have the backaddress. Is this possible ?


title: How can I place a marginnote inside a description (or other list environment)

text: I have a macro (defined with the xparse package) that creates a `marginnote`. It works as I would like when prepended to normal paragraph text:               \NewDocumentCommand\dates{m g}{%        \IfNoValueTF{#2}            {\marginnote{\scriptsize{#1}}}            {\marginnote{\scriptsize{#2\\#1}}}}      I'd like to use it in a similar way against an `item` in a `description` environment, something like:               \begin{description}         \item[Coding and data representation] \dates{June 2009}{September 2009} Some description     \end{description}      However the above snippet places the margin note under the label text, I would like it to appear on the far left of the page lined up with with item. I am happy to create a `NewDocumentEnvironment` with xparse if that would help me achieve this easier and I am open to better ways of achieving this sort of layout. Here is a minimal example replicating the issues:               \documentclass{article}     \usepackage{xparse}     \usepackage{marginnote}     \begin{document}     \NewDocumentCommand\dates{m g}{%       \IfNoValueTF{#2}         {\marginnote{\scriptsize{#1}}}         {\marginnote{\scriptsize{#2\\#1}}}}     \renewcommand*{\raggedleftmarginnote}{}     \setlength{\marginparsep}{7pt}     \reversemarginpar          \begin{description}         \item[Coding and data representation] \dates{June 2009}{September 2009} Some description     \end{description}          \end{document}


title: How can I hatch the areas delimited by two intersecting curves like so?

text: This is a follow-up to one of my earlier questions: Fill area between curves. I want to color three regions delimited by two curves and a vertical line. Each should have its own shading and color. The problem is that, no matter what I do, I still don't get it right.   1. First area is from the leftmost to the vertical line below the left curve. The abscissa for the vertical bar should be 6.   2. Second area should be the common area below two curves delimited on the right by the vertical bar.   3. Third area is delimited above by the right curve, below the left curve and by the right bar. The image below shows the output I expect: ![enter image description here](http://i.stack.imgur.com/ldOlB.png) Here is my attempt:               \documentclass[8pt]{beamer}     \usepackage{tikz}     \usetikzlibrary{patterns}     \usepackage{pgfplots}          \pgfmathdeclarefunction{dnorm}{2}{%       \pgfmathparse{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))}%     }               \begin{document}          \begin{frame}       \begin{tikzpicture}         \begin{axis}[domain=-1.5:12,samples=101,height=8cm,width=12cm, xticklabel=\empty,         yticklabel=\empty]                    \addplot [fill=yellow,draw=none,domain=-1:6,stack plots=y] {max(dnorm(3,1.5)-dnorm(6,1.5),0) } \closedcycle;          \addplot [draw=none,pattern=north west lines,pattern color=orange,domain=-1.5:6,stack plots=y] {min(dnorm(3,1.5),dnorm(6.5,1.5)) } \closedcycle;               \addplot [draw=none,pattern=grid,pattern color=gray,domain=-1.5:6,stack plots=y] {max( dnorm(6,1.5) - dnorm(3,1.5),0)} \closedcycle;               % Draw curves     \addplot [thin, smooth, color=black] {dnorm(3,1.5)};     \addplot [thin, smooth, color=black] {dnorm(6,1.5)};          % Draw vertical bar:     \draw [red, thick] ({rel axis cs:0,0}-|{axis cs:6,0}) -- ({rel axis cs:0,1}-|{axis cs:6,0});          \end{axis}     \end{tikzpicture}          \end{frame}          \end{document}