title: Errors using mdframed and also framed packages with tex4ht to put a frame around text

text: I googled around, and did not see something about this. I just found out that one gets an error using mdframed with tex4ht.               \documentclass{article}%     \usepackage{mdframed}     \begin{document}     \begin{mdframed}     text     \end{mdframed}     \end{document}          htlatex foo.tex      gives               (/usr/local/texlive/2013/texmf-dist/tex/latex/graphics/trig.sty)     (/usr/local/texlive/2013/texmf-dist/tex/latex/latexconfig/graphics.cfg))          ! LaTeX Error: Something's wrong--perhaps a missing \item.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.6 \end{mdframed}          ?       The above compiles with no problem using pdflatex and with latex. So it is clearly an issue with tex4ht. Strange that it compiles ok with `latex foo.tex`, yet the error above says `Latex Error:` Is this a known issue? Anyone knows of a workaround? I would have to try to find alternative to mdframed since I need to compile document using pdflatex and htlatex. I just needed to put a frame around large text blocks that can contain more than one paragraph. I am sure I will find other ways to do this that will also work with tex4ht. Using texlive 2013, on Linux **Update** Text4ht also failed with packaged `framed` !               \documentclass{article}%     \usepackage{framed}     \begin{document}     \begin{framed}     text          test     \end{framed}         \end{document}          htlatex foo.tex      gives               (/usr/local/texlive/2013/texmf-dist/tex/generic/tex4ht/html4-math.4ht))     (./foo.aux)     ! You can't use `\prevdepth' in horizontal mode.     \nointerlineskip ->\prevdepth                                    -\@m \p@      l.8 \end{framed}          ?       May be putting frame around text with tex4ht can not be done. Will keep trying....


title: MacTeX-2013 didn't install TeXLive 2013

text: I deleted my old TeXLive 2012 from my Mac (10.5.8). I downloaded the new MacTeX package and installed it successfully. TeXLive is found on directory `usr/local/texlive/2013` BUT the GUI application is not in `applications/tex`. I could run my `CV.tex` file that uses `moderncv` in TeXWorks but I would like to use the GUIapp to update packages and such. Any ideas? EDIT1: texhash gives me this message, I don't know if it has any significance: texhash: /usr/local/texlive/2013/../texmf-local: directory not writable. Skipping... texhash: /usr/local/texlive/2013/texmf-config: directory not writable. Skipping... texhash: /usr/local/texlive/2013/texmf-dist: directory not writable. Skipping... texhash: /usr/local/texlive/2013/texmf-var: directory not writable. Skipping... texhash: Done.


title: What are all the font styles I can use in math mode?

text: ![](http://i.stack.imgur.com/fDWTH.png) As can be seen in above picture, there are lots of fonts or font styles that can be used in math mode. **What are all the fonts or font styles I can use in math mode, and which packages are required in order to use them?** Let's assume I'm using standard Computer Modern or Latin Modern (`lmodern`) fonts. _Edit:_ It'd be great to see **examples** of what the different styles look like, probably via **images**. * * * I'm not interested in a reproduction of the picture, which can be found at What type of font is this?; the picture is for illustration purposes only. Furthermore, this is supposed to become a one-catches-all question for questions like the beforementioned. If I actually were looking for these fonts, I wouldn't just lazily ask here but look e.g. at The Not So Short Introduction to LaTeX2e, tables 3.14 and 6.4 first.)


title: script F (or something like it)

text: ![enter image description here](http://i.stack.imgur.com/03xNU.png) How can I enter this 'F' in LaTeX? `\mathcal{F}` looks quite similar to it, but a little bit different. I prefer not to use additional package if possible.


title: Getting error while inserting image

text: I am trying to insert a image which is in `.eps` format from my computer into latex file. But I always get an error if I add the scale part but works fine without scale. Here is my code below. Works fine:                   \begin{figure}         \centering         \includegraphics{Plot1}         \caption{Sales vs Assets}         \end{figure}        Doesn't work fine:               \begin{figure}             \centering             \includegraphics[scale=.8]{Plot1}             \caption{Sales vs Assets}             \end{figure}


title: TikZ in LyX: Package tikz error?

text: I am trying to compile a document that uses the tikzpicture and pgf packages, but I am getting this error ![enter image description here](http://i.stack.imgur.com/uqN7a.png) **UPDATE** Code:                   \begin{tikzpicture}          \begin{semilogyaxis}[              width=0.75\columnwidth,              xtick={10,20,...,40},              xlabel=Tamaño del arreglo (miles),              ylabel=Tiempo (ms),              legend pos=outer north east,              title=\textbf{Comparación}]         \addplot coordinates{(10,100) (20,300) (30,400) (40,600)};         \addplot coordinates{(10,400) (20,600) (30,200) (40,400)};         \addplot coordinates{(10,600) (20,500) (30,100) (40,200)};         \addplot coordinates{(10,600) (20,100) (30,500) (40,100)};         \addplot coordinates{(10,300) (20,100) (30,200) (40,500)};         \addplot coordinates{(10,600) (20,200) (30,400) (40,500)};         \legend{Selección,Inserción,Mezcla,Montículos,Rápido,Residuos}         \end{semilogyaxis}     \end{tikzpicture}      Latex preamble:               \usepackage{lmodern}     \usepackage{graphicx}     \usepackage{fancyheadings}     \usepackage{chngcntr}     \counterwithout{figure}{section}     \usepackage{tikz}     \usetikzlibrary{calc}     \usepackage{pgfplots}     \usepgfplotslibrary{groupplots}     \usepgfplotslibrary{units}     \date{}


title: Multilingual document with specified font size, bad-looking greek words

text: I have a multilingual (four languages) document which looks like this:               \documentclass[11pt]{report}     \usepackage[utf8]{inputenc}     \usepackage[greek,english,russian,ukrainian]{babel}     \usepackage{cmap}     \usepackage{lipsum}          \begin{document}          Деякий \emph{український} текст із \textbf{грецьким} словом \textgreek{paide\'{i}a} усередині.          Некоторый \emph{русский} текст с \textbf{греческим} словом \textgreek{paide\'{i}a} внутри.          Some \emph{English} text and with \textbf{Greek} word \textgreek{paide\'{i}a} inside.          \end{document}       with the font size specified (11pt). This code produces nice-looking English, Ukrainian and Russian words, **but** bad-looking Greek words. When I remove the font specification in the preamble (`[11pt]`) all four languages looks nice. But I'd like to save 11 pt text. What's the solution to this problem?


title: Vector PDF graph become blank after system reinstall

text: I used illustrator to create vector graphs and saved them as PDF files and used in latex file. I compiled the .tex file with xelatex (I use MikTeX on Windows 7) and everything was OK. The vector graphs are shown correctly in the final PDF. The code is as follows:               \usepackage{graphicx}     \includegraphics[width=0.8\textwidth]{Graphs/Example} % Example.pdf      Now, when I reinstalled the system and re-compile the .tex file, everything else was right and there was no errors for the compilation. But all the vector graphs created by illustrator are now shown as blank in the final PDF. Other graphs (.png, .jpg) are still shown correctly in the final PDF. Am I doing something wrong? Thank you very much for your help. -Richard


title: Ways to grab and store larger amount of text

text: A standard way to grab and store a short text (say, a title of a document) is to use something like               \def\title#1{\def\@title{#1}}.      But if the content to be stored is longer (say, an abstract}, I guess it is considered more elegant to specify it by something like               \begin{abstract}       ...     \end{abstract}      on the user side. So, the question is: what techniques are available to do something like this? (Some that spring to my mind immediately are: use a `\vbox`, use delimited arguments, use the `environ` LaTeX package, use ConTeXt `\grabbufferdata` (if I am not mistaken as to the name of that macro)...) I'd be delighted to see all kinds of answers, for various engines (Knuthian vanilla TeX, eTeX, luaTeX) and formats (plain TeX, LaTeX2e, LaTeX3, ConTeXt).


title: Include LaTeX version in document

text: Is there any command or package to insert the version of LaTeX used to create a document? I am looking for a header or footer in the first page that says something like `compiled with pdfTeX 3.1415926-1.40.11-2.2 (TeX Live 2010)`.


title: How to draw dashed area in graph (TiKz)

text: I'd like to draw three graphs like these ones below: ![enter image description here](http://i.stack.imgur.com/rTYm2.png) Is there an easy way to draw these dashed areas? This is what I have so far: ![enter image description here](http://i.stack.imgur.com/XJeCe.png) from the following code:               \documentclass[11pt]{article}          \usepackage{tikz}          \begin{document}          Damping:\\     \begin{tikzpicture}[scale=0.6]     \draw[->] (-4.5,0) -- (1.5,0);     \draw[->] (0,-4.5) -- (0,4.5);          \foreach \x in {-4,-3,-2,-1,0,1}         \draw (\x cm,1.5pt) -- (\x cm,-1.5pt);     \foreach \y in {-4,-3,-2,-1,0,1,2,3,4}         \draw (1.5pt,\y cm) -- (-1.5pt,\y cm);              \draw[thick,red] (0,0)--(-4,4);         \draw[thick,red] (0,0)--(-4,-4);     \end{tikzpicture}          Settling Time:\\     \begin{tikzpicture}[scale=0.6]     \draw[->] (-4.5,0) -- (1.5,0);     \draw[->] (0,-4.5) -- (0,4.5);          \foreach \x in {-4,-3,-2,-1,0,1}         \draw (\x cm,1.5pt) -- (\x cm,-1.5pt);     \foreach \y in {-4,-3,-2,-1,0,1,2,3,4}         \draw (1.5pt,\y cm) -- (-1.5pt,\y cm);              \draw[thick,blue] (-1,-4)--(-1,4);     \end{tikzpicture}          Frequency:\\     \begin{tikzpicture}[scale=0.6]     \draw[->] (-4.5,0) -- (1.5,0);     \draw[->] (0,-4.5) -- (0,4.5);          \foreach \x in {-4,-3,-2,-1,0,1}         \draw (\x cm,1.5pt) -- (\x cm,-1.5pt);     \foreach \y in {-4,-3,-2,-1,0,1,2,3,4}         \draw (1.5pt,\y cm) -- (-1.5pt,\y cm);              \draw[thick,orange] (-4,4)--(1,4);     \draw[thick,orange] (-4,-4)--(1,-4);     \end{tikzpicture}          \end{document}


title: Fit float to page

text: This is a follow-up question to Best figure size adjustment when dealing with different image sizes. I want to resize a figure in a way, that the figure including the caption fits the page. Resizing just the figure has been explained in the previously mentioned question. The solution looked as follws:               \documentclass[a4paper,10pt]{scrartcl}       \usepackage{graphicx}       \begin{document}       \begin{figure}       \centering       \includegraphics[width=\textwidth,height=\textheight]{AnyGraphic}       \caption{Some random caption. This sholud be long enough to create at least one linebreak, as the overall size of the float naturally depends on the size of the caption}       \end{figure}       \end{document}      Without the caption, everything is fine. But including a caption will result in a `Float too large for page` warning.   Thus the question: How can I fit a float including the caption to a page?   Note: I want to do this for many floats with captions of different lenghts. I would thus prefer a solution that works for captions of arbitrary lengths


title: Subfigures in beamer documents

text: I'm using beamer package to produce slides. I put many figures on a slide by using the subfigure package. The problem is that for captions, the subfigure are labeled "a", "b".. "m", "n" and so on, for subfigures appearing on different slides. How could I reset the subfigure numbering when passing to a new slide?


title: Remove unnecessary page before bibliography

text: I'm writing a thesis which is an aggregate of articles. In one article, there's a blank unnecessary page that appears between the final lines of my document and the bibliography when I put it in the thesis. I don't get this behaviour when I compiled the article separately with article class. I've tried commands like `\vspace{-10cm}` but to no avail. The extra page is still here. How to get rid of this page? The thesis is a compilation of articles with each article having its own bibliography. And I'm using `\include` to include each article. Each article has its own `\bibliography` command at the end. Thanks a lot... updated information: I'm using the chapterbib package to put the multiple bibliographies. And the documentclass is set as:               \documentclass[fleqn,a4paper,twoside,11pt]{book}      I don't have openright option. I'm fixing this myself with adding a balnk page as necessary. I'm putting each article as:               \begingroup          \renewcommand{\appendix}{%     \par     \setcounter{section}{0}%     \renewcommand{\thesection}{\thechapter.\Alph{section}}%     }          \input{article1}          \endgroup      See also this link: Getting correct section numbering for Appendix in a large document


title: images background in htlatex

text: i'm looking for something that allow me to customize the png output of htlatex, in the sense of making images not only transparet, but with a chosen background color. someone can help me?


title: Inline math: Line breaking and stretching only in specified places

text: Is it possible to have document-wide solution for all inline formulas was breakable and stretchable only in pointed positions? Like               $longformula1 \/ longformula2 \/ longformula3$      was able to break only in points `\/` (but not be forced to break on each) and all formulas 1,2,3 had fixed unstretched size. An example - how my document does but shouldn't look like               \documentclass[10pt,british,english]{article}     \usepackage[T1]{fontenc}          \makeatletter          \usepackage{multicol}          \makeatother          \usepackage{babel}     \begin{document}     \begin{multicols*}{2}          \selectlanguage{british}          \noindent text $t:\mathcal{T}_{\mathcal{F}}$ text $0\leq a\leq b$     teeeeeeeeeeext $\left\{ s_{i}\right\} :\mathcal{T_{F}^{\mathnormal{\ast|\omega}}}$     teeeeeeeeeeeeeeeeeext          \end{multicols*}     \end{document}


title: How do I create an expandable conditional with a loop inside?

text: I need to create an expandable conditional that uses a loop (that is, a `..._map_function:`). It should either return `true` from inside the loop, or return `false` otherwise. In a 'normal' programming language it would look something like this (where `p` is some predicate):               for each e in S {         if p(e) {             return true;         }     }     return false;      A naive translation to LaTeX3 would look something like this (using l3prop as an example):               \cs_new:Nn \loop_body:nn {         \bool_if:nn             { p(#1, #2) }             { \prg_return_true: }     }          \prop_map_function:NN \l_prop \loop_body:nn     \prg_return_false:      But that doesn't work, because `\prg_return_false:` will always appear in the input stream, even after a possible `\prg_return_true:`, and that is not allowed. So how can this be done?


title: How to print a bibliography for a particular author only?

text: Background: I have all bibliographic entries in one giant .bib file. In my CV, I'd like to have a section that lists all my articles and another section that lists all my conference presentations. My current approach is this: I tag my own entries with the keyword "own" and then use biblatex:               \printbibliography[type=article,keyword=own,heading="Articles"]     \printbibliography[type=inproceedings,keyword=own,heading="Conference Presentations"]      This approach has two drawbacks. First, I have to tag all my entries and it happened that I missed some. Second, I have to nocite all my entries, which is another great opportunity to make mistakes. The first problem can be addressed using bib2bib, which allows me to extract my own articles from the big .bib file by specifying a filter for the `author` field. However, I was wondering if there is a simpler solution using only tools within LaTeX. `\printbibliography` already seems to have some filtering facility but from reading the manual I couldn't figure out how to filter entries based on the values of their fields.


title: PGF's `foreach` recognises when there are no list items and doesn't run the code. Is this guaranteed?

text: The PGF `\foreach` macro behaves differently when the item list is totally empty than it does when a single item happens to be empty.               \documentclass{article}          \usepackage{pgffor}          \begin{document}          \foreach \x in {,} {Hello}          \foreach \x in {} {How are you}          \end{document}      Gives this result:               HelloHello      This behaviour is quite convenient if you are programming macros that take comma-separated strings as user input. It means that you do not have to add logic to check whether there are truly any list items. However, it does not seem to be mentioned in the PGF manual. Is it guaranteed not to change in future versions of PGF/TikZ?


title: Is it possible to make LaTeX read the sectioning in reverse direction?

text: I want to make a note (for internal use only) while I am reading a book. For the sake of convenience, I want to put a note about the current topic I am reading on the first page of the PDF output to avoid pressing the END button to go the last page. I am sorry. I am a bit lazy to make use of a separate file for sectioning. It is my real scenario. Therefore, the heading structure must be reversed as follows.               \documentclass{book}     \usepackage{tipa}     \begin{document}          \chapter{Book Printing versus Ordinary Typing}               % end of chapter 1     \ldots     \section{Pronounction of \TeX}         \TeX\ is often pronounced \textipa{/\textprimstress t\textepsilon k/} in English.          \section{Root of the name \TeX}     \TeX\ is the upper case of $\tau\epsilon\chi$ which is a Greek word that means art as well as technology.          \chapter{The Name of the Game}     \end{document}      Having completed the book, I want to reverse the heading structure to the normal order. But doing this by hand seems to be tedious and cumbersome. Shortly speaking, is it possible for LaTeX to read the heading structure in reverse direction? I mean I want LaTeX to read the above code as if it is written as follows.               \documentclass{book}     \usepackage{tipa}     \begin{document}     \chapter{The Name of the Game}          \section{Root of the name \TeX}     \TeX\ is the upper case of $\tau\epsilon\chi$ which is a Greek word that means art as well as technology.          \section{Pronounction of \TeX}         \TeX\ is often pronounced \textipa{/\textprimstress t\textepsilon k/} in English.          \ldots               % end of chapter 1          \chapter{Book Printing versus Ordinary Typing}     \end{document}      Edit: I think the most convenient marks I can adopt are as follows.               % begin     \section{Root of the name \TeX}     \TeX\ is the upper case of $\tau\epsilon\chi$ which is a Greek word that means art as well as technology.     % end


title: I had an install error and all of the default layout/class files are missing. How do I fix this?

text: During the installation process there was an error and it seems that none of the default class layouts are available. I have tried looking at the LyX wiki but it seems that only user made layouts are available there. Is there somewhere I can download all of the layouts and a zip file or similar. As an added complication, the computer I am using is from Japan and I don't understand what is happening during the install procedure, and some of the error dialogs are in Japanese. Thanks. Edit: Further Information: Due to my work internet settings, I was not able to update Miktek during the installation. Edit 2 log file extracts:               problem: C:\Program Files (x86)\MiKTeX\miktex/bin\MiKTeX209-core-PS.dll does not exist     problem: C:\Program Files (x86)\MiKTeX\miktex/bin\MiKTeX209-core.dll does not exist     problem: C:\Program Files (x86)\MiKTeX\miktex/bin\MiKTeX209-packagemanager-PS.dll does not exist     problem: C:\Program Files (x86)\MiKTeX\miktex/bin\MiKTeX209-packagemanager.dll does not exist          An error occurred:       source file: Libraries\MiKTeX\Core\Process.cpp       source line: 305       message: The operation failed for some reason.       info: C:\Program Files (x86)\MiKTeX\miktex/bin\initexmf.exe


title: Citing multiple authors with alternate separator than "and" using BibTeX

text: I'm using LyX on Linux Mint 14 ... Using BibTeX with the `apalike` style and some modifications in the preamble, I've managed to get the bibliography as it should be except for one thing. When I cite a work with multiple authors it gets printed with the separator "and" which isn't correct for my language (Danish). Curiously it's displayed correctly in the user interface of Lyx - for example "(Wittgenstein og Waismann 2003 - which led me to believe everything was ok but in the pdf the separator "and" is used both in the reference and in the bibliography. Is there any way to fix this using BibTeX, or can it only be done with biber 1.5, as suggested in the last comment here: How to write properly multiple authors in bibtex file? I really hope their is because getting biber to work using the following guide has thus far proven to be impossible: http://wiki.lyx.org/BibTeX/Biblatex Help much appreciated ... I really hope I won't have to relapse into setting my master thesis up in LibreOffice.


title: Numbering subsections in one section only

text: I have a document in which I generally do not want to number the chapters, sections and subsections. Only one section should contain roman numbered subsections, how do I achieve that? I tried               \documentclass{report}     \setcounter{secnumdepth}{-1}          \begin{document}          \chapter{mwe}     \section{unnumbered subsections}     \subsection{unnumbered}          \section{roman numbered subsections}     \setcounter{secnumdepth}{2}     \renewcommand{\thesubsection}{\textnormal{\roman{subsection}}.}          \subsection{roman one}     \subsection{roman two}     \end{document}      However, this gives me an error at the `\section{roman one}` stating: Missing number treating as zero. Any suggestions for correction or ideas on alternative approaches?


title: TikZ: trouble with node placement when I want to reference from a point other than the origin

text: \documentclass{article}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}[     every label/.append style = {font = \scriptsize},     dot/.style = {inner sep = +0pt, shape = circle,       draw = black, label = {#1}},     small dot/.style = {minimum size = .05cm, dot = {#1}},     big dot/.style = {minimum size = .1cm, dot = {#1}},     ]     \node[fill = black, big dot = {below left: \(F\)}] (F) at (2, 0) {};     \node[fill = black, big dot = {above left: \(A\)}] (A) at (2, 0) -- ++({2 * cos(45)}, {3 * sin(45)}) {};     \end{tikzpicture}     \end{document}      I want my node to be 45 degrees from the point `(2, 0)` and not the origin. How can I do this? With Jakes comment, the node is placed correctly but the dot isn't the correct size.                \path (2, 0) -- ++({2 * cos(45)}, {3 * sin(45)})      node[fill = black, big dot = {above right: \(A\)}] (A) {x};      ![enter image description here](http://i.stack.imgur.com/laEgZ.png) By removing the `{x}` as suggested by Qrrbrbirlbel, Jakes comment worked perfectly.                \path (2, 0) -- ++({2 * cos(45)}, {3 * sin(45)})      node[fill = black, big dot = {above right: \(A\)}] (A) {};


title: Four Node Commutative Diagram in LaTeX

text: I am quite new to LaTeX and I was curious if anyone knew how to make these sorts of diagrams. I saw one other picture on here but it was a three node diagram and I wasn't sure how to make LaTeX recognize to make a square when I inserted another node. Any ideas? Edit: Specifically, this works:               \begin{tikzpicture}[every node/.style={midway}]     \matrix[column sep={4em,between origins},             row sep={2em}] at (0,0)     { \node(R)   {$R$}  ; & \node(S) {$S$}; \\       \node(R/I) {$R/I$};                   \\};     \draw[<-] (R/I) -- (R) node[anchor=east]  {$\chi$};     \draw[->] (R/I) -- (S) node[anchor=north]  {$\psi$};     \draw[->] (R)   -- (S) node[anchor=south] {$\phi$};     \end{tikzpicture}      But I need to change the starting points and destinations of arrows to allow for four nodes.


title: fp package documentation

text: Where can I find more information on the `fp` package? I have been to ctan and the author even has better documentation as a todo. http://www.ctan.org/tex-archive/macros/latex/contrib/fp/ The reason I ask is because sometimes when I use `fixed point arithmetic` in some `TikZ` pictures I receive errors but other times it works just fine. Therefore, I want to identify why it wont work in some instances.


title: Macro for set intersection

text: I want to create a macro for intersections that can switch between `cap` and `bigcap` depending on the situation. Here is what I came up with based on browsing other posts on the forum. Are there any hazards to this approach? Is there a better way?               \documentclass{article}          \makeatletter     \newcommand{\intersect}{\@ifnextchar_{\bigcap}{\cap}}     \makeatother          \begin{document}          \[         A \cap B     \]     \[         A \intersect B     \]     \[         \bigcap_{i=1}^{n} A_{i}     \]     \[         \intersect_{i=1}^{n} A_{i}     \]          \end{document}


title: How to vertically center the fraction line?

text: I feel a bit weird because this is a really simple issue that apparently nobody has brought up so far but I find that very simple fractions produce output that looks vertically unbalanced. The following example uses Iwona as math font because there it's really obvious – with the gap between numerator and fraction line being almost 1.5 times as large as the space between denominator and the line.               \documentclass{standalone}     \usepackage[math]{iwona} % Iwona as math font     \begin{document}     $\frac{1}{2}\frac{1}{N}$     \end{document}      ![1/2 1/N in Iwona Math](http://i.stack.imgur.com/D23U4.png) It's not completely a font issue though. I measured Computer Modern and the imbalance factor there is about 1.3, too. ![1/2 1/N in Computer Modern](http://i.stack.imgur.com/FFcDq.png) I find this visually unpleasant and somewhat surprising – given how much LaTeX is hailed for its math typesetting, there is probably a reason for this imbalance. Either way, is there an easy way to fix this feature?


title: How to determine whether a list of figures is empty?

text: I want to check whether the document has any figures so as to decide whether or not to have a list of figures. Is this possible? Feasible without doing something like parsing the lof file? Note that checking whether the lof file is empty is not a good enough solution for me, as some code may be writing things other than table lines into it (e.g. `babel`).


title: Parsing a macro argument character-by-character for conditional execution

text: In an attempt to specify a seemingly endless amount of arguments to a macro, I would like to supply only one `#1`, where `#1` is a string that contains a bunch of _specific_ characters. For example               \mymacro{1jq4PK2/62Bb/-krkR/...}      Then, I'd like to sequentially parse `#1` on a character-by-character basis and do something based on the character. As in the example above, characters could be anything from numbers `0...9`, letters `a...z` and `A...Z` (so conditioning should be case sensitive) or symbols `-`,`/`,... The bigger picture here is create a macro that uses `chessfss` to typeset a chess board or arbitrary shape using FEN notation. The symbol `-` will denote a blank square, numbers will denote empty squares (with no piece on it), `/` will denote the next rank, and letters will denote the colour (via capitalization) and type (via the specific letter) of the piece. The code provided by the `skak` package is limited to a fixed 8-rank (or file) chess board. Specifically, `skak` provides `\InitBoard` that is defined as               \def\InitBoard(#1/#2/#3/#4/#5/#6/#7/#8){%       %<code>     }      where each one of the 8 arguments is processed in a very "nested fashion" using (I'm skipping some intermediate steps for the sake of brevity):               \def\FenConvert#1{%       \EqStr{8}{#1}%       {EEEEEEEE}%       {\EqStr{7}{#1}%         {EEEEEEE}%         {\EqStr{6}{#1}%           {EEEEEE}%           {\EqStr{5}{#1}%             {EEEEE}%             {\EqStr{4}{#1}%               {EEEE}%               {\EqStr{3}{#1}%                 {EEE}%                 {\EqStr{2}{#1}%                   {EE}%                   {\EqStr{1}{#1}%                     {E}%                     {#1}}}}}}}}}          \def\ParseFenRank#1{\ParseFenRankA(#1Z)}     \def\ParseFenRankA(#1#2){%       \EqStr{Z}{#1}%       {}%       {\FenConvert{#1}\ParseFenRankA(#2)}}      I would like to steer clear from this since it is not entirely reader-friendly and somewhat unappealing, and rather use some "case statement", where I condition on the characters in the macro argument, one by one. The `boolexpr` package provides such a `switch` environment, but I'm not sure how to extend it to work in the way I want to.


title: large braces for specifying values of variables by condition

text: How do I typeset something like, X = 0 if a=1, 1 otherwise, using those huge left braces and specifying each condition in a line?


title: How to write commands for cases?

text: For writing cases like a definition of a function having two or more conditions compiled by large braces ({), do I have to use `\begin{equation}` and `\begin{cases}` within, or there is some other command which can be used even inside `$$ ... $$` ?


title: If statement in math notation using latex

text: I am trying to find a way to write mathematical notation for an if statement in LaTeX. For example I would like to have this python code in mathematical notation:               def my_function(x):         result = []         for ele in x:             if ele > 0:                 result.append(ele * 2)             else:                 result.append(0)         return result      I want every element of x to double if the element is above zero, and the the element is not zero, I want it to be set to zero. `x = [1,3,4, -1,2,-3]` should become `[2, 6, 8, 0, 4, 0]`. When Googling around for the answer I came across Iverson Bracket, but this is not quite what I need, though it is close. My final result should look something like this:               result = {if x > 0 => x * 2              {else x => 0      With one big `{`, and prettier looking, but I don't know how to do this in LaTeX.


title: How to include un-numbered sections in additional ToC?

text: This is a follow-up question to: Contents page in two different languages Now with a working second language table of contents I have tried including parts of the article such as the table of figures, tables and nomenclature. This is the code that works to achieve the second ToC.               \usepackage{etoolbox,pdftexcmds}     \let\englishtableofcontents\tableofcontents     \patchcmd\englishtableofcontents{{toc}}{{tec}}{}{}     \preto\englishtableofcontents{\begin{otherlanguage}{english}}     \appto\englishtableofcontents{\end{otherlanguage}}          \let\englishlistoffigures\listoffigures     \patchcmd\englishlistoffigures{{lof}}{{lef}}{}{}     \preto\englishlistoffigures{\begin{otherlanguage}{english}}     \appto\englishlistoffigures{\end{otherlanguage}}          \let\englishlistoftables\listoftables     \patchcmd\englishlistoftables{{lot}}{{let}}{}{}     \preto\englishlistoftables{\begin{otherlanguage}{english}}     \appto\englishlistoftables{\end{otherlanguage}}          \newcommand{\addetoc}[2]{%       \addcontentsline{tec}{#1}{\protect\numberline{\csname the#1\endcsname}#2}%     }     \makeatletter     \newcommand{\englishcaption}[1]{%       \ifnum\pdf@strcmp{\@captype}{figure}=\z@         \addcontentsline{lef}{figure}{\protect\numberline{\thefigure}#1}%       \else         \addcontentsline{let}{table}{\protect\numberline{\thetable}#1}%       \fi     }     \makeatother      In order to add in the sections I have included simply the following line after printing the nomenclature:               \printnomenclature     \addetoc{section}{Nomenclature}      This however includes it as a section with the number '0.' since it occurs before the ToC itself. How could I, for example, do the equivalent of a \section* within this function so I have no section number appearing in the ToC of the second language. Thank you in advance.


title: Is there a placeholder for the drive letter of the TeXnicCenter installation?

text: Because I want to run TeXnicCenter and MikTeX on an USB-Drive, I have to variable the drive letter within the output profiles. Is there any possibility? The TeXnicCenter-placeholders only have a placeholder for the drive letter of the project main file or the current file. And even this one ("%rm\") did't work.


title: Bib entry cannot be encoded in ansinew

text: I'm compiling the following files which are enconded in Western-1252. Using biber to compile the bib **example.tex**               \documentclass[11pt, twoside, a4paper]{memoir}          \usepackage[ansinew]{inputenc}     \usepackage[spanish, es-noquoting, es-tabla]{babel}     \usepackage[spanish]{translator}     \usepackage[OT1]{fontenc}          \usepackage[firstinits=true, url=true, doi=false, style=alphabetic, sorting=nyt, maxnames=5]{biblatex}     \DefineBibliographyStrings{spanish}{         urlseen = {Última visita},         urlfrom = {from},         url = {url},     }     \DeclareFieldFormat{url}{\textsc{\bibstring{url}}:\space\url{#1}}     \addbibresource{example.bib}          \begin{document}          Hola que tal \cite{Doe:2009:Online}          \end{document}      **example.bib**               @ONLINE{Doe:2009:Online,     author = {Doe, Ringo},     title = {This is a test entry of type {@ONLINE}},     month = jun,     year = {2009},     url = {http://www.test.org/doe/?a},     urldate = {2008},     }      If I include a ? or a % in the url I get the following error: _The entry 'Doe:2009:Online' has characters which cannot be encoded in 'ansinew'. Recoding problematic characters into macros._ Any idea why is that? the question mark exists in ansinew. How can I escape the code in the url? * * * **Edit:** Another try using this, didn't work:               \usepackage[firstinits=true, url=true, doi=false, style=alphabetic, sorting=nyt, maxnames=5, bibencoding=utf8]{biblatex}      * * * **Edit2:** I have realized the problem is somewhere with the final pdflatex execution:               []\OT1/cmr/m/n/10.95 MAGNET. \OT1/cmr/m/it/10.95 Pro-ject Na-me\OT1/cmr/m/n/10.95 . 2004. \OT1/cmr/m/sc/10.95 Url\OT1/cmr/m/n/10.95 : [][]$\OT1/pcr/m/n/10.95 http :$     [28]     ! Missing $ inserted.     <inserted text>     $          @STRING{NAME = "ProjectShort"}     @STRING{NAME_LONG = "{ProjectLong}"}          @MISC{MAGNET:PROJECT,      author = {{NAME}},     title = NAME_LONG,     subtitle = {{FP6-IST-1234}},     year = "2004",     url = {http://www.proect.org},     urldate = {2008},     }


title: How to generate multiple authors with multiple institutions in ACM style

text: The default ACM style looks like this ![enter image description here](http://i.stack.imgur.com/lWrlM.jpg) However, I need the style as follows. The `cls` of the template can be found here. ![enter image description here](http://i.stack.imgur.com/K06q4.jpg)


title: A layout for writing a budget?

text: I have to write the costs of a project in a budget. I would like to learn a fancy way to do it in LaTeX. Does anyone know where to find a layout for that? :)


title: Why do some font commands behave differently?

text: I've always been confused by the differences in behavior of font commands. For example, we have `\mathrm{}` and `\texttt{}`, which can be used like this: `\texttt{hello} world`. And then we have `\it` and `\bf` which must be used as `{\it hello} world`. If one uses `\it{hello} world`, both words are italicized. Internally, what is the difference here? And was this difference a conscious design decision? If so, why?


title: Centering on the decimal separator, figure font selection

text: I'd like to format a column with numbers with a decimal point. In my body text I use old-style figures for numbers, and lining figures in equations. If I use `dcolumn` my tables use lining figures, instead of old-style figures. I've fiddled around with the definitions in `dcolumn.sty` already, but it seems to rely on math mode to get the dot 'right', so removing all the `$`-characters leads to breakage. Temporarily changing the math font to use old-style figures seems to be a pretty difficult thing as well, this is all set up during the loading of the font package... Using `siunitx` with `\sisetup{mode=text}` I _do_ get old-style figures, but then `\figureversion{tab}`, which I use to switch to tabular figures, is ignored, and the figures also don't line up nicely. Does anyone have a good suggestion to either use `dcolumn` in non-math mode, or to get `siunitx` to use old-style tabular figures? A minimal example, using siunitx:               \documentclass{standalone}     \usepackage[mathlf]{MinionPro}     \usepackage{siunitx}     \sisetup{mode=text}     \begin{document}     {\figureversion{tab}       \begin{tabular}{SSS[table-format=4.1]}         {A wide heading} & $x$ & {more data} \\         14.1 & 14.1 & 1111.1 \\         1.674 & 1.671 & 4882.8 \\       \end{tabular}}     \end{document}


title: Stacking Text Arguments

text: I was wondering was is the best method in (general) I guess to stack text on top of text in very small areas as in this example: ![enter image description here](http://i.stack.imgur.com/lww44.png) I used the `\stackrel` (which I think is for math more so) command but with this LaTeX makes some pre-determined assumptions and makes the top argument smaller than the bottom as seen above. I wanted all the text to be the same size. I tried several ways, but only to come up with this way which works, but is _not_ optimal.


title: How to change the page number from even to odd while keeping the page as verso?

text: I'm writing a two-sided document with a binding margin. For certain reasons, I need to change the page number at some point, so what used to be an even- numbered page is now odd-numbered. This makes the `geometry` package arrange this page as a recto (right-of-margin) rather than a verso (left-of-margin) page - while I need the recto-verso pairs to continue, i.e. I need the page to be a verso. MWE follows (the showframe illustrates that the margins are the same rather changing from recto to verso).               \documentclass{article}     \usepackage[showframe,twoside]{geometry}     \begin{document}     This is the first page. It should be a right-of-binding page (recto).     \clearpage     \setcounter{page}{3}     This is the second page; it should be a left-of-binding page (verso) - but it isn't.     \clearpage     This is the third page; it should be a right-of-binding page (recto) - but it isn't.     \end{document}       **Background:** I'm writing my Ph.D. thesis, which is mostly English but has a Hebrew part, which must be numbered differently. Also, Hebrew is an right-to- left language so the pages go in on the other end of the binding, i.e. the Hebrew cover page is a left-of-binding page which goes in 'last' when leafing through the bound booklet left-to-right. I output the Hebrew sheets from first to last, after the last English sheets, then take the whole bunch of Hebrew sheets, and flip them all together and re-place them to get the effect I described. The Hebrew part numbering begins at 1 on a left-of-binding page (not the Hebrew cover page btw.) **Notes:**   1. Please don't suggest I not do this, or change the page number to something even instead of odd, etc. This is a legitimate need. Other people might want to output a two-sided document with binding margins in which page numbers go 1,1,2,2,3,3,4,4.   2. A workaround is to 'manually' flip the margins, as suggested by Schweinebacke. But this is not satisfactory as there is also the issue of margin notes and possibly other LaTeX code which might depend on whether the page is a verso or a recto rather than the margin sizes.   3. A solution should not assume any of the details from my background. Specifically, do not assume that the content on the re-numbered page is in Hebrew, or Right-to-Left etc.


title: Distributing two small images in a document (horizontally) evenly

text: Consider the following code (no special packages added)               \begin{document}     Text Text Text Text Text Text Text Text Text Text Text Text Text Text     Text Text Text Text Text Text Text Text Text Text Text Text Text Text     Text Text           \begin{center}     \includegraphics{black_square} and \includegraphics{black_square}     \par\end{center}          Text Text Text Text Text Text Text Text Text Text Text Text Text Text     Text Text Text Text Text Text Text Text Text Text Text Text Text Text     Text Text      \end{document}      that produces the output ![enter image description here](http://i.stack.imgur.com/ZKMBD.jpg), where the black squares stand for some image I wand to put in my document. My questions are:   1. Is this the right way to add images to a document ? I'm vaguely aware that there are some floating environments available for this, but I want the images at exactly this specific place.   2. How can I rearrange the black square so that they are horizontally evenly distributed and the "and" is vertically in the middle, i.e. more like this: ![enter image description here](http://i.stack.imgur.com/5DUnH.jpg)


title: Redraw a kernel scheme diagram

text: I'm trying to redraw a kernel scheme diagram for a university lecture note. This is how far I got:               \documentclass{article}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[magyar]{babel}          \usepackage{tikz}     \usetikzlibrary{positioning,fit}          \usepackage[active,tightpage]{preview}     \PreviewEnvironment{tikzpicture}               \begin{document}          \begin{tikzpicture}[font=\sffamily]         \tikzstyle{title}=[rectangle]         \tikzstyle{wrapper}=[anchor=west, draw]         \tikzstyle{bigblock}=[rectangle, minimum width=10cm, minimum height=1cm, anchor=west, draw]         \tikzstyle{Nbigblock}=[rectangle, minimum width=10cm, minimum height=1cm, anchor=north, draw]         \tikzstyle{Sbigblock}=[rectangle, minimum width=10cm, minimum height=1cm, anchor=south, draw]         \tikzstyle{medblock}=[rectangle, minimum width=6cm, minimum height=1cm, anchor=south, draw]         \tikzstyle{smallblock}=[rectangle, minimum width=3cm, minimum height=1cm, anchor=west, draw]              \node (kernel) [title] {Kernel};         \node (syscalls) [bigblock, below=of kernel] {Rendszerhívások};         \node (filesystems) [smallblock, below=of syscalls.west] {Fájlrendszerek};         \node (networklayer) [smallblock, below=of filesystems] {Hálózati réteg};              \node (processhandling) [title,below=of syscalls.east] {Processzkezelés};         \node (scheduler) [smallblock, below=of processhandling] {Ütemező};         \node (memhandling) [smallblock, below=of scheduler] {Memóriakezelés};         \node (IPC) [smallblock, below=of memhandling] {IPC};              \node (processhandlingwrapper) [wrapper, fit={(processhandling) (scheduler) (memhandling) (IPC)}] {};              \node (periphhandling) [bigblock, below=of processhandlingwrapper.south east] {Perifériák kezelése};              \node (kernelwrapper) [wrapper, fit={(kernel) (filesystems) (syscalls) (networklayer) (processhandling) (periphhandling)}] {};              \node (hardver) [below=of kernelwrapper.south, Nbigblock] {Hardver};              \node (syslibs) [above=of kernelwrapper, medblock] {Rendszerkönyvtárak};              \node (usrprocesses) [above=of syslibs, Sbigblock] {Felhasználói processzek};     \end{tikzpicture}          \end{document}      On the left you can see the diagram I want to redraw using TikZ, on the right side is my approach, where you can see wrong positioning and the lack of arrows. ![Kernel scheme](http://i.stack.imgur.com/gadNW.png) ![Kernel scheme](http://i.stack.imgur.com/0jCPy.png) Could you help me correct the positioning and draw the arrows to the right places? Thanks!


title: How can I change the font size of the authors and the affiliation in Latex?

text: I have something like this:               \documentclass[11pt,a4paper, twocolumn]{article} % 11pt for all the article     \begin{document}     \font\myfont=cmr12 at 16pt     \title{{\myfont MY TITLE}}%Title in 16pt     \author{MY NAME}% **I need it in 12pt**     \affil{University of...}% **I need it in 9pt**      How can the font sizes be changed?


title: Adding vertical space between figure and numbering

text: I have the following MWE:               \documentclass[a4paper,10pt]{article}     \usepackage{graphicx}     \usepackage{subfig}          \makeatletter     \newbox\sf@box     \newenvironment{SubFloat}[2][]%     {\def\sf@one{#1}%     \def\sf@two{#2}%     \setbox\sf@box\hbox     \bgroup}%     { \egroup     \ifx\@empty\sf@two\@empty\relax     \def\sf@two{\@empty}     \fi     \ifx\@empty\sf@one\@empty\relax     \subfloat[\sf@two]{\box\sf@box}%     \else     \subfloat[\sf@one][\sf@two]{\box\sf@box}%     \fi}     \makeatother               \begin{document}          \begin{figure}[!ht]     \centering     % \captionsetup[subfigure]{labelformat=empty} % Removes a), b) labels     %     \begin{SubFloat}     {\label{fig:1} }     \includegraphics[width=0.42\textwidth]{fig.png}%     \end{SubFloat}     \vspace{1cm}     \qquad     \begin{SubFloat}     {\label{fig:2} }     \includegraphics[width=0.42\textwidth]{fig.png}%     \end{SubFloat}          \begin{SubFloat}     {\label{fig:3} }     \includegraphics[width=0.42\textwidth]{fig.png}%     \end{SubFloat}     \qquad     \begin{SubFloat}     {\label{fig:4} }     \includegraphics[width=0.42\textwidth]{fig.png}%     \end{SubFloat}          \caption{Caption blah blah.}     \label{figure-temp}     \end{figure}          \end{document}      which gives me this: ![output](http://i.stack.imgur.com/uLtwq.png) I need some way to add vertical space between the caption of each figure ("X AXIS") and the letter assigned to it (a, b, c, d) Not to the whole article, but to this figure in specific. Cheers!


title: Multiply matrix and letter

text: I want to multiply a matrix with a letter, it looks like that:               \documentclass{report}          \usepackage{ngerman}     \usepackage{amsmath}     \begin{document}      \[ \left( \begin{array}{ccc}      | &  & |  \\     f_1 & \dots & f_n \\      | &  & | \end{array}\right)  \mathcal{A} =      \left( \begin{array}{ccc}      | &  & |  \\     q_1 & \dots & q_n \\      | &  & | \end{array} \right)\]           \end{document}      Is there a chance, that the letter is not so small in comparison to the matrix, so that they have about the same size?


title: Centering wide supertabular tables with \makebox

text: I am trying to use `\makebox` to center a wide `\supertabular` table, but if the table spans more than one page, latex gives a `! Missing \endgroup inserted`. Any ideas on how to center a wide `supertable`? Here is an example, which works fine if you remove a line so that the table fits on one page:               \documentclass{article}          \usepackage{supertabular}          \begin{document}          \tablehead{     \hline \hline     1 & 2 & 3 & 4 & 5 \\ \hline     }          \tabletail{     \hline \hline     }          \noindent\makebox[\textwidth]{     \begin{supertabular}{ c c c c c c}     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     \end{supertabular}     }          \end{document}      Also, the captions for `supertable` seem to have problems, including a `\tablecaption` results in `! Missing \endgroup inserted`:               \documentclass{article}          \usepackage{supertabular}          \begin{document}          \tablehead{     \hline \hline     1 & 2 & 3 & 4 & 5 \\ \hline     }          \tabletail{     \hline \hline     }           \tablecaption{example table}          \noindent\makebox[\textwidth]{     \begin{supertabular}{ c c c c c c}     AAAAAAAAAA & BBBBBBBBBB & DDDDDDDDDDD & EEEEEEEEEE & FFFFFFFFFF \\     \end{supertabular}     }               \end{document}


title: Matrixcells problem with the y-axis only

text: I observe a strange behavior with `matrixcells.dtx` by @AndrewStacey. The cells give me a complete tiling but when some rows are _taller than average_ the tiling is shifted (see pictures and example below). Strangely, when some columns are _wider than average_ the tiling is correct. I have been looking through `matrixcells.dtx` from Launchpad for a while now, trying to figure out what the problem is, but have not been able to solve it. Any help or pointers would be greatly appreciated. Below is an example clearly showing the problem:               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{backgrounds}     \usetikzlibrary{fit}     \usetikzlibrary{matrix}     \usepackage{matrixcells}          \begin{document}          \begin{figure}     \begin{tikzpicture}[every node/.style={draw}]          \matrix (m) [matrix of nodes, label cells, inner sep=0pt, nodes={inner sep=0.2cm}] {     1 & $\frac{20}{\frac{30}{40}}$ \\     1 & $\frac{20}{\frac{30}{\frac{40}{\frac{50}{60}}}}$\\     10 & 2 \\     };          \begin{pgfonlayer}{background}     \node [fit = (m-cell-1-1) (m-cell-1-2), fill=red!7, inner sep=0pt] {};     \node [fit = (m-cell-2-1) (m-cell-2-2), fill=blue!7, inner sep=0pt] {};     \node [fit = (m-cell-3-1) (m-cell-3-2), fill=red!7, inner sep=0pt] {};     \end{pgfonlayer}               \end{tikzpicture}     \end{figure}          \begin{figure}     \begin{tikzpicture}[every node/.style={draw}]          \matrix (m) [matrix of nodes, label cells, inner sep=0pt, nodes={inner sep=0.2cm}] {     1 & $\frac{20}{\frac{30}{40}}$ & 20 \\     1 & $\frac{20}{\frac{30}{\frac{40}{\frac{50}{60}}}}$ & 0 \\     10 & 2000000000000000 & 1 \\     };          \begin{pgfonlayer}{background}     \node [fit = (m-cell-1-1) (m-cell-3-1), fill=red!7, inner sep=0pt] {};     \node [fit = (m-cell-1-2) (m-cell-3-2), fill=blue!7, inner sep=0pt] {};     \node [fit = (m-cell-1-3) (m-cell-3-3), fill=red!7, inner sep=0pt] {};     \end{pgfonlayer}               \end{tikzpicture}     \end{figure}          \end{document}      The second picture is properly displayed as follows: ![Correct behavior](http://i.stack.imgur.com/wIDKN.png) The first one on the other hand displays improperly as follows: ![Incorrect behavior](http://i.stack.imgur.com/7CNbY.png)


title: How to remove sep. rule from blank pages when using two-column mode?

text: In the following example:               \documentclass[twocolumn]{memoir}          \usepackage{lipsum}          \setlength{\columnseprule}{0.4pt}          \begin{document}       \twocoltocetc       \tableofcontents            \chapter{test}            \lipsum[1]          \end{document}      ![enter image description here](http://i.stack.imgur.com/ZRqYw.png) ![enter image description here](http://i.stack.imgur.com/5bP2z.png) ![enter image description here](http://i.stack.imgur.com/zYlZQ.png) I get a vertical line one the blank pages, which looks ugly. How can I force to only have the vertical column line where there's content?


title: TiKZ node name prefixes in scopes

text: I am using TiKZ to draw two copies of the same graph above each other, and now I want to add edges between a vertex in one copy and a vertex in the other copy. It suddenly occurred to me that it would be nice if I could put each copy in a separate scope, give each scope a name, and refer to nodes inside the scope in an "object oriented" way by referring to the node as `<scope name>.<node name>`. To illustrate, it would be cool if I could do something like this:               \documentclass{article}          \usepackage{tikz}          \begin{document}          \tikzstyle{vertex}=[circle,draw,fill=black!20]          \begin{tikzpicture}          % ---- Copy 1     \begin{scope}[yshift=-32pt,name=G1]       \node[vertex] (u) at (0, 0) {u};       \node[vertex] (v) at (0, 0) {v};     \end{scope}          % ---- Copy 2     \begin{scope}[yshift=32pt,name=G2]       \node[vertex] (u) at (0, 0) {u};       \node[vertex] (v) at (0, 0) {v};     \end{scope}          \draw (G1.u) -- (G2.v);          \end{tikzpicture}          \end{document}      Here, I refer to node `u` of scope `G1` as `G1.u`, and to node `v` of scope `G2` as `G2.v`. Is something like this possible in TiKZ?


title: Labelling Ax = b under an actual Matrix

text: I wish to achieve the following in Latex:               | a b | x | x1 | = | b1 |     | c d |   | x2 |   | b2 |        A         x       b      Where I write the labels A, x, and b under the respective matrices. The code I'm using to write the Matrices is (feel free to improve the my code -- I am suffering from over a decade of LateX abstinence).               \documentclass{article}     \usepackage{amsmath}     \begin{document}     \begin{align}     \begin{pmatrix}         a & b \\         c & d     \end{pmatrix}     \times     \begin{pmatrix}         x1 \\         x2     \end{pmatrix}     =     \begin{pmatrix}         b1  \\         b2      \end{pmatrix}     \end{align}     \end{document}      Thanks.


title: Using a macro with ifx inside of a bmatrix

text: The following code does not compile if I don't have the extra braces around the entries of the matrix, and I don't know why. Can I modify `\switcher` to obviate the need for these extra braces?               \documentclass{article}         \usepackage{amsmath}              \newcommand{\switcher}[2][]         {             \ifx&#1&%                 #2             \else                 #1             \fi         }          \begin{document}          \[         \begin{bmatrix}             {\switcher{2}} \\             {\switcher[1]{2}}         \end{bmatrix}     \]          \end{document}


title: Making mesh grid lines transparent in surface plot with pgfplots

text: I need to make a partly transparent, one color, surface plot. Additionally I want to control the transparency of mesh lines. Running this code:               \documentclass{standalone}     \usepackage{tikz,pgfplots}     \pgfplotsset{compat=newest}     \begin{document}     \begin{tikzpicture}     \begin{axis}[]     \addplot3[surf, color=blue, opacity=0.5, domain=-2:2, faceted color=blue] {exp(-x^2-y^2)};     \end{axis}     \end{tikzpicture}     \end{document}      Produces the desired result only for the faces. Does pgfplots provide an option to control the transparency of mesh lines too? ![Transparent surface with mesh lines visible](http://i.stack.imgur.com/aTM8D.png)


title: LaTeX hungs on EPS processing

text: The pdflatex.exe process hungs. I have two TeX files, FIRST imports SECOND (by using combine class). SECOND file has `\includegraphics{DDS_images_eps/SIN_0.eps}`, and compiles fine. But FIRST hungs. In FIRST file I commented all unnecessary fields. Ending of FIRST file Log is               Package epstopdf Info: Source file: <DDS_images_eps/SIN_0.eps>     (epstopdf)                    date: 2011-04-24 06:05:44     (epstopdf)                    size: 130169 bytes     (epstopdf)             Output file: <DDS_images_eps/SIN_0-eps-converted-to.pdf>         (epstopdf)                    date: 2012-10-31 15:46:56     (epstopdf)                    size: 8670 bytes     (epstopdf)             Command: <epstopdf --outfile=DDS_images_eps/SIN_0-eps-converted-to.pdf DDS_images_eps/SIN_0.eps>     (epstopdf)             \includegraphics on input line 479.     Package epstopdf Info: Output file is already uptodate.          <DDS_images_eps/SIN_0-eps-converted-to.pdf, id=94, 676.5275pt x 126.4725pt>     File: DDS_images_eps/SIN_0-eps-converted-to.pdf Graphic file (type pdf)         <use DDS_images_eps/SIN_0-eps-converted-to.pdf>     Package pdftex.def Info: DDS_images_eps/SIN_0-eps-converted-to.pdf used on input line 479.     (pdftex.def)             Requested size: 155.99762pt x 29.16139pt.     Package epstopdf Info: Source file: <DDS_images_e      What's the problem? UPDATE:MWE SECOND file               \documentclass[12pt,notitlepage]{article}     %\usepackage{graphicx}     %\usepackage{subfig}     \begin{document}     \begin{figure}[!h]          \includegraphics[width=0.4\textwidth]{SIN_1800.pdf}          \caption{Ground state}     \end{figure}     \end{document}      FIRST file               \documentclass[report,12pt,a4paper,twoside]{combine}      \usepackage{graphicx}     \usepackage{subfig}     \begin{document}     \begin{papers}         \import{MWE_child}     \end{papers}     \end{document}      MWE work if I disable `subfig` package or `\caption{..}`. But I can't disable it. Rest of the file can use it. Nevertheless, when I compile SECOND file(with uncomment packages) it work fine.


title: Inserting EMFs to LaTeX using graphicx

text: > **Possible Duplicate:**   >  Inserting a .EMF file into a LaTeX document. After years of playing around with different figure formats in R I have found the one to hold its quality best is an EMF. I have just started using LaTeX and cannot get LaTeX to read my EMFs. I am using the `graphicx` package (which I have read here supports EMF files) but its still not reading it.               \usepackage{graphicx}     \begin{figure}[h]      \centering     \includegraphics*[width=1\textwidth]{combined_DMC}     \caption{Frequency of fires for each month of the year}     \label{fig_fire_month}     \end{figure}      I am not sure if I am telling LaTeX to use the `graphicx` package (as opposed to the standard `graphics` package) by using `\includegraphics*`.


title: Can't modify document settings on LyX

text: I'm running `Lyx 2.0.7dev` on Ubuntu 12.04 LTS. I modified a document's language, but the "ok" and "apply" buttons are disabled... why? I already checked the file's permissions and they're "read & write". Any ideas? ![LyX screenshot](http://i.stack.imgur.com/WAkhV.png)


title: Can I just use Mac Grapher to copy LaTeX Expression on this site?

text: There is a APP on Mac called Grapher,and when you type a mathematics equation,you can use "copy LaTeX Expression",my question is can the expression I used work on this site?I mean just copy and paste.Or more specific ,can it run on Mathematics Exchange? Example,I type x^2 in Grapher,and use"copy LaTeX Expression",I get "y=x^{2}",can I just copy "y=x^{2}"into this site,and it will show beautiful equation?


title: Image undesired displacement using pstricks

text: The following code:               \documentclass[letterpaper]{article}     \usepackage{amsmath,amssymb,xcolor}     \usepackage{pst-all}     \usepackage{lipsum}     %\usepackage{pstricks}     \begin{document}     \lipsum[1-2]     \begin{pspicture}     \psset{unit=1.5,linewidth=0.7mm,linecolor=red,fillstyle=solid,fillcolor=yellow}     %,showpoints=true,dotsize=0.2}     \pspolygon(0,1.21)(2,1.21)(0.38,0)(1,2)(1.62,0)     \end{pspicture}     \vskip\baselineskip     The \rnode{A}{dog} has eaten \rnode{B}{his} bone.     \ncbar[angle=-90,nodesep=3pt,arm=.3]{->}{B}{A}     \end{document}      yields: ![enter image description here](http://i.stack.imgur.com/qIq6C.png) Why is the image displaced to the bottom of the page? Usually in TiKZ, which by the way I use more often, I just write the code and the image appears where it is supposed to be. How can I correct this?


title: Mixed superscript, subscript and widehat

text: What is the correct way to write this equation and make both L_s matrices look the same? I tried this but the widehat and superscript L_s matrix' subscript is positioned slightly lower than the no-widehat no-superscript L_s.               \dot{\mathcal{L}} = - \lambda \mathbf{e}^\mathrm{T} \mathbf{L}_\mathbf{s} \widehat{\mathbf{L}_s^{+}} \mathbf{e}      UPDATE: This is the code output for me. Note that the first subscript s is higher than the second. ![Code output](http://i.stack.imgur.com/Iv1tD.png) This is more noticeable when regular font size is used: ![Regular font size](http://i.stack.imgur.com/ckbc8.png) This minimal example seem to produce correct output.               \documentclass{article}     \usepackage{mathtools}     \begin{document}     \[     \cramped{\mathbf{L}_\mathbf{s}}     \widehat{\mathbf{L}_\mathbf{s}^{+}}     \]     \end{document}      But when used inside my document (thesis) it produces the output described above. I have no idea what causes this, but it's probably some other obscure configuration of the cls file I'm using (from the thesis reference model).


title: Left indent for figure with program

text: In my document, I have some pseudocode sections created using the `program` environment (tried several alternatives, but liked that one most, so I want to stick to that). Now I would simply like to indent the pseudocode sections on the left by some millimeters to make it more stand out from the body text, as depicted here: ![IndentProgram](http://i.stack.imgur.com/d6o7M.png) Is there some simple way to achieve that (globally, if possible)? MWE for the given example:               \documentclass[ngerman]{scrbook}     \usepackage{program}     \usepackage{lipsum}     \begin{document}          \begin{figure}         \begin{program}             \BEGIN             a=a+1;             \END         \end{program}         \caption{Example code}         \label{alg:exampleCode}     \end{figure}           \lipsum[25]      \end{document}


title: Missing space between author and page with biblatex-mla

text: I am trying to use biblatex-mla to create a bibliography and cite works from it. Here is an example text with some citations:               \documentclass{article}          \usepackage[utf8]{inputenc}     \usepackage[british]{babel}     \usepackage[babel]{csquotes}          \usepackage{filecontents}     \begin{filecontents*}{references.bib}         @book{saussure,             author    = "Ferdinand de Saussure",             title     = "Course in General Linguistics",             year      = "1966",             publisher = "McGraw-Hill",             editor    = "Charles Bally and Albert Sechehaye and Albert Riedlinger",             address   = "New York",             edition   = "3"         }     \end{filecontents*}          \usepackage[backend=bibtex,style=mla]{biblatex}     \addbibresource{references.bib}                    \begin{document}          While the horizontal axis (AB) depicts the coexistence of several entities at a specific     moment in time, the vertical axis (CD) additionally represents the changes of these     entities over time \autocite[80]{saussure}. By virtue of the complexity of the system of     language, it seems obligatory for the linguist to draw a distinction between the two axes     \autocite[81]{saussure}.          \printbibliography          \end{document}      The problem is that the space between the author name and the page number is missing. I have tried to illustrate this in the following picture. ![Screenshot](http://i.stack.imgur.com/t65Kv.png) I am (and must be) running on ShareLaTeX – hence the `backend=bibtex` option to the `biblatex` package, as suggested by their BibLaTeX example. I have tried to use Biber as a backend on my local machine instead, though, and got the same faulty results. Does anyone know how to fix this?


title: Prepackaged tikz routine

text: I would like to have a single definition of my company logo. Right now, I have it defined to just fit on a letter sized paper. It is completely defined in TikZ filled paths. As you would expect, it scales well and is legible down to sizes well below what I ever expect to need. I have a custom document header also drawn in TikZ. I want to put the logo in the header at a scale of 0.1. I realize I could just draw the logo at that scale, taking all the points of my current definition and scaling them to the size I need. That leads to a lot of work and duplication… which feels like the wrong way to go about it. Is there a way I can, in a separate file or in the preamble somewhere, define a TikZ picture that can them be embedded at one scale in my TikZ picture and then called again at another scale somewhere else in the document? The major objective being reuse of a single definition of the logo. I have tried a few different tricks I found around the forums that allude to but don't directly address my problem, but I am afraid I don't grok LaTeX well enough yet to pull this off without your help.


title: Position TikZ node relative to bounding box of overall picture

text: I would like to draw some points in TikZ, and position them relative to the bounding box of the overall picture. Specifically, I would like to give their y-coordinate explicitly, and have their x-coordinate taken from the left-edge of the picture's bounding box. How can I do this? Here is an example. Each time I invoke `\myCircle` or `\mySquare`, the circle/square is drawn, and a little "notch" is drawn on the left-hand side. (The purpose of the notch is to be a drawing aid, so users can see where shapes are positioned.) The y-coordinate of the notch is taken from the centre of the circle/square. The x-coordinate is currently fixed at `0`, but I would prefer that to be something like `bounding box of overall picture.west`.               \documentclass[border=5mm]{standalone}     \usepackage{tikz}          \newcommand\myCircle[2]{%       \fill[red] (#1,#2) circle (5);       \draw (-2,#2) -- (0,#2);     }     \newcommand\mySquare[2]{%       \fill[red] (#1-5,#2-5) rectangle (#1+5,#2+5);       \draw (-2,#2) -- (0,#2);     }          \begin{document}       \begin{tikzpicture}[x=1mm,y=1mm]         \myCircle{7}{5}         \mySquare{26}{0}         \myCircle{8}{20}       \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/cjLJM.png)


title: How can I figure out why biber stopped working all of a sudden?

text: **edit on 2013-08-28** It just happened again. What are the steps I can take to possibly figure out what went wrong? I have no idea what's going on. Just 30 minutes ago everything was fine and 5 minutes ago it stopped working. Here's an MWE:               \documentclass[     12pt,     a4paper,     english,     ]     {scrreprt}          \usepackage[T1]{fontenc}     \usepackage{lmodern}          \usepackage[     language=auto,     style=authoryear,     backend=biber,     ]{biblatex}          \usepackage{xpatch}          \begin{filecontents*}{lit.bib}     @Book{augustine,       hyphenation     = {american},       author      = {Augustine, Robert L.},       title       = {Heterogeneous catalysis for the synthetic chemist},       shorttitle      = {Heterogeneous catalysis},       publisher   = {Marcel Dekker},       location    = {New York},       date        = {1995},         edition={1},       annotation      = {A plain \texttt{book} entry}     }     }     \end{filecontents*}          \renewbibmacro*{publisher+location+date}{%     \newunit     \printlist{publisher}%     \newunit     \printlist{location}%     \newunit}          \addbibresource{lit.bib}          \begin{document}     \chapter{First Chapter}     \begin{itemize}         \item Some words for the \verb+book+.\footcite[See][p. 19]{augustine}     \end{itemize}     \printbibliography     \end{document}      This is the code of the error (in German, unfortunately):               Problemsignatur:       Problemereignisname:  APPCRASH       Anwendungsname:   biber.exe       Anwendungsversion:    0.0.0.0       Anwendungszeitstempel:    51194dbe       Fehlermodulname:  perl516.dll       Fehlermodulversion:   0.0.0.0       Fehlermodulzeitstempel:   5093098b       Ausnahmecode: c0000005       Ausnahmeoffset:   00001427       Betriebsystemversion: 6.1.7601.2.1.0.256.48       Gebietsschema-ID: 1031       Zusatzinformation 1:  4c0d       Zusatzinformation 2:  4c0d4d78887f76d971d5d00f1f20a433       Zusatzinformation 3:  4c0d       Zusatzinformation 4:  4c0d4d78887f76d971d5d00f1f20a433          Lesen Sie unsere Datenschutzbestimmungen online:       http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0407          Wenn die Onlinedatenschutzbestimmungen nicht verfügbar sind, lesen Sie unsere Datenschutzbestimmungen offline:       C:\Windows\system32\de-DE\erofflps.txt      My system:   * Win 7 64 bit   * TXC 2 Beta 2 64 bit The output profile in TXC: ![enter image description here](http://i.stack.imgur.com/MOe18.png)


title: Why is the first section indented

text: I have been using LaTeX for a week now, How come the section title for a plan of investigation and the subsection title, research question aren't aligned with the rest of the document:               \documentclass[11pt, a4paper]{article}          \usepackage[nochapters]{classicthesis}          \begin{document}          \title{History IA}     \author{Kabelo Moiloa}     \date{15 May 2014}     \maketitle          \renewcommand\thesection{\Alph{section}}          \tableofcontents          \section{Plan of investigation}          \subsection*{Research Question}     \quote "To what extent does the book, Homage to Catalonia accurately portray life under Anarchism in Revolutionary Spain between 1931-1939?"          \section{Method of Investigation}     This investigation evaluates the extent to which George Orwell's Novel, Homage to Catalonia can be used as a reliable historical source in evalating life under Anarchism in Revolutionary Spain. To this end, source evaluation will be used in order to compare Revolutionary Spain as portrayed in Homage to Catalonia to other sources, in particular: Revolution and War in Spain (1931-1939),  Democracy and Civil War in Spain 1931-1939, Spain's Civl War and finally The Battle for Spain.          \section{Summary of Evidence}          \section{Evaluation of Sources}          \section{Analysis}                         \pagebreak          \end{document}


title: 'proper' clickable hyperlinks with biblatex, natbib and hyperref -- (Author, Year) style

text: **Based on some experimenting and some reading (here onhttp://tex.stackexchange.com) I might have solved first issue I had. I have kept a strikeout-version of the first issue so that people have a change to correct me if my solution is faulty (see update from 2013-11-04 16:25:35Z below). Please feel free to let me know if the striked out text is ~~utterly~~ confusing to read.** I am using the `biblatex` package–with `natbib` _capabilities_ –and the `hyperref` package, using the (Author, Year) style citations, and `pdflatex` as the engine. I have run into ~~two~~ one issue ~~s~~. ~~First,`\citeyear{}` and the custom-made command `\citejournal{}`, thanks to Gonzalo Medina's answer (with the help of Audrey), do not produce clickable hyperlinks (see screenshot below this ¶). ![enter image description here](http://i.stack.imgur.com/G1TSM.png) It kinda makes sense to my why `\citejournal{}` does not work, but I do not understand why `\citeyear{}` doesn't work. According to the reference manual for the `biblatex` package (p. 88 [PDF link!])  "[t]he text commands (`\citeauthor`, `\citeyear`, etc.) are […] supported." Also, the `hyperref` should work, as long as the transformations of citations _into clickable hyperlinks_ is _support by the selected citation style_ (p. 47 in the reference manual for the `biblatex` package [PDF link!]). I got the `\citetitle{}` and `\citeauthor{}` working with the help of this (`\citetitle{}`) and this (`\citeauthor{}`) answer, both by Audrey. I tried reproducing Audrey's method for `\citeyear{}` and `\citejournal{}`, but I got stuck. Can anyone show me how I get the `\citeyear{}` and maybe the custom-made command `\citejournal{}` to create a link to the biography? (see below for reproducible example). ~~ ~~Furthermore,~~ the ~~second~~ issue, from this beautiful example from Audrey I realized that it is possible to fix the links to include the postnote and bracket so that it is not only the year that is clickable but the whole parenthesis. I've tried reproducing his example, but I cannot get this to work with `biblatex`. Any suggestions to how I can _expand_ the clickable hyperlinks?               \documentclass[11pt]{article}     \usepackage[utf8]{inputenc}          \usepackage[backend=bibtex,     style=authoryear, natbib=true,              ]{biblatex}          \usepackage{hyperref}     \hypersetup{pdfborderstyle={/S/U/W 1}}          % thanks to http://tex.stackexchange.com/a/26684/22939     \DeclareCiteCommand{\citejournal}       {\usebibmacro{prenote}}       {\usebibmacro{citeindex}%         \usebibmacro{journal}}       {\multicitedelim}       {\usebibmacro{postnote}}          \DeclareCiteCommand{\citebooktitle}       {\usebibmacro{prenote}}       {\usebibmacro{citeindex}%         \usebibmacro{booktitle}}       {\multicitedelim}       {\usebibmacro{postnote}}          \DeclareCiteCommand{\citeintitle}% Based on \citetitle from biblatex.def       {\boolfalse{citetracker}%        \boolfalse{pagetracker}%        \usebibmacro{prenote}}       {\ifciteindex          {\indexfield{indextitle}}          {}%        \iffieldundef{journaltitle}          {\iffieldundef{booktitle}             {\iffieldundef{maintitle}               {\printfield[citetitle]{labeltitle}}% Behave like \citetitle if no "main" title               {\printtext[maintitle]{\printfield[titlecase]{maintitle}}}}             {\printtext[booktitle]{\printfield[titlecase]{booktitle}}}}          {\printtext[journaltitle]{\printfield[titlecase]{journaltitle}}}}       {\multicitedelim}       {\usebibmacro{postnote}}               %  Thanks to [Audrey](http://tex.stackexchange.com/a/108349/22939)     \DeclareCiteCommand{\citetitle}       {\boolfalse{citetracker}%        \boolfalse{pagetracker}%        \usebibmacro{prenote}}       {\ifciteindex          {\indexfield{indextitle}}          {}%        \printtext[bibhyperref]{\printfield[citetitle]{labeltitle}}}       {\multicitedelim}       {\usebibmacro{postnote}}               %  Thanks to [Audrey](http://tex.stackexchange.com/a/75916/22939)       \DeclareCiteCommand{\citeauthor}       {\boolfalse{citetracker}%        \boolfalse{pagetracker}%        \usebibmacro{prenote}}       {\ifciteindex          {\indexnames{labelname}}          {}%        \printtext[bibhyperref]{\printnames{labelname}}}       {\multicitedelim}       {\usebibmacro{postnote}}               \begin{filecontents}{bibfile.bib}     @article{einstein,       author =       "Albert Einstein",       title =        "{Zur Elektrodynamik bewegter K{\"o}rper}. ({German})                      [{On} the electrodynamics of moving bodies]",       journal =      "Annalen der Physik",       volume =       "322",       number =       "10",       pages =        "891--921",       year =         "1905",       DOI =          "http://dx.doi.org/10.1002/andp.19053221004"     }          @book{latexcompanion,         author    = "Michel Goossens and Frank Mittelbach and Alexander Samarin",         title     = "The \LaTeX\ Companion",         year      = "1993",         publisher = "Addison-Wesley",         address   = "Reading, Massachusetts"     }     \end{filecontents}               \addbibresource{bibfile}          \begin{document}          \noindent     cite: \cite{einstein}, \cite{latexcompanion} \\     citet: \citet{einstein}, \citet[see][p. 20]{einstein} \\     multi citet: \citet{latexcompanion,einstein} \\     citep: \citep{einstein}, \citep[see][p. 20]{latexcompanion} \\     multi citep: \citep{latexcompanion,einstein} \\     citetext, citealp: \citetext{see \citealp{latexcompanion}, or even better \citealp{einstein}} \\     citeauthor: \citeauthor{einstein}, \citeauthor{latexcompanion} \\     citeyear: \citeyear{einstein}, \citeyear{latexcompanion} \\     citetitle: \citetitle{einstein} and \citetitle{latexcompanion} \\     citejournal: \citejournal{einstein}\\          \medskip          \printbibliography          \end{document}      ## Update 2013-11-04 16:07:35Z I have written this _update_ to `\DeclareCiteCommand{\citejournal}`               \DeclareCiteCommand{\citejournal}       {\boolfalse{citetracker}%        \boolfalse{pagetracker}%        \usebibmacro{prenote}}       {\ifciteindex          {\indexfield{journal}}          {}%        \printtext[bibhyperref]{\printfield[journal]{journaltitle}}}       {\multicitedelim}       {\usebibmacro{postnote}}        I've not updated the initial code I posted as I don't full understand––to say the least––what I am doing, but the above code seem to work. ## Update 2013-11-04 16:25:35Z Encouraged by moewe's comments I have reproduced the `\DeclareCiteCommand{\citejournal}` for the `\DeclareCiteCommand{\citeyear}`. As follows,               \DeclareCiteCommand{\citeyear}       {\boolfalse{citetracker}%        \boolfalse{pagetracker}%        \usebibmacro{prenote}}       {\ifciteindex          {\indexfield{year}}          {}%        \printtext[bibhyperref]{\printfield[journal]{year}}}       {\multicitedelim}       {\usebibmacro{postnote}}        Again, I have not updated the initial code I posted as I don't really understand what I am doing yet, but the above code seem to work.


title: hide proof environment for restructuring

text: I am writing my thesis, and i am in restructuring phase - sorting theorems where they should belong thematically. And it would be helpful to have all the proofs hidden so i am not laden with the additional information. Is it possible to add something like `hideproof` to `documentclass` options to omit them when compiling the latex file.


title: How to double space the \thanks footnote?

text: The journal I intend to submit my paper to requires all the text, including footnotes and acknowledgments, be double spaced. I use the setspace package and put `\doublespacing` and `\renewcommand{\footnotelayout}{\doublespacing}` in the preamble. Everything works well except for the fact that the \thanks footnotes are not double spaced. How can I solve this? An mwe:               \documentclass[12pt, a4paper, oneside]{article}     \usepackage[margin=1in]{geometry}     \usepackage{graphicx}     \usepackage{setspace}     \usepackage[utf8]{inputenc}     \usepackage{footmisc}     \usepackage{lipsum}          \renewcommand{\footnotelayout}{\doublespacing\normalsize}          \title{How to double space the ``thanks'' footnote?\thanks{\normalsize Some random text. Some random text. Some random text. Some random text. Some random text. Some random text. Some random text. Some random text. Some random text. Some random text.}}     \author{John Smith\thanks{\normalsize Some random text. Some random text. Some random text. Some random text. Some random text. Some random text. Some random text. Some random text. Some random text. Some random text.}}     \date{\today}          \doublespacing          \begin{document}          \begin{titlepage}          \maketitle          \lipsum[3]          \thispagestyle{empty}          \end{titlepage}          \section{Introduction}          Some random text. Some random text. Some random text. Some random text. Some random text. Some random text. Some random text. Some random text. Some random text. Some random text.\footnote{\lipsum[5]}          \end{document}


title: Using the xr package in LyX (for cross-referencing an external LyX document)

text: **Question** : What steps are required to use the `xr` package in LyX in order to reference items in other, independent LyX documents? **Steps already taken** :   1. The `tools` package (that contains the `xr` package) has been installed in MikTeX.   2. The `xr` package has been used in the referencing document (by adding `\usepackage{xr}` to the referencing document's preamble).   3. A pointer to the referenced document has been set in the referencing document (by adding `\externaldocument{referenced.lyx}` to the referencing document's preamble).   4. A label in the referenced document has been cross-referenced in the the referencing document using the `\ref` tag. **Observed (undesired) behavior** : The reference appears as "BROKEN" in the LyX editor. The PDF output shows "??" where the reference number is expected. **Relevant links** :   1. A thread on a LyX usegroup   2. Another thread on a LyX usegroup **Software used** : LyX + MiKTeX + BibTeX on Windows 7 **My level of Lyx/LaTeX proficiency** : Beginner+


title: Integral sign inside equation array becomes too small

text: \documentclass[12pt,a4paper]{report}     \usepackage{palatino}          \begin{document}          \begin{equation}\label{good}     \int_{0}^{1}     \end{equation}          \begin{equation}\label{ugly}     \begin{array}{c}     \int_{0}^{1}\\     \int_{0}^{1}\\     \end{array}         \end{equation}     \end{document}      as the labels suggest, my problem is that these two seemingly identical uses of the integral sign compile well and not-so-well respectively. The first yields a nice two-lines-tall integral sign, the second two annoying one-line- tall little integrals (even if I add blank lines to the array). Is there a _real_ solution to this problem? Any help greatly appreciated :) P


title: Bold author if source is an article

text: i got some articles i cite in my thesis. The author should be bold in the bibliography but i dont know how. I tried to use `\textbf` in the bibtex file but then the format isn't correct anymore. Would be nice if someone can help me. i already got this to define the entries. just copied and pasted it.               \DeclareNameAlias{default}{last-first}     \renewbibmacro*{author/editor+others/translator+others}{%     \mkbibbold{% ADDED       \ifboolexpr{     test \ifuseauthor     and     not test {\ifnameundef{author}}     }     {\usebibmacro{author}}     {\ifboolexpr{        test \ifuseeditor        and        not test {\ifnameundef{editor}}      }        {\usebibmacro{editor+others}}        {\usebibmacro{translator+others}}}}     }% ADDED          \renewcommand*{\multinamedelim}{\addsemicolon\space}     \renewcommand*{\finalnamedelim}{\addsemicolon\space}          \renewcommand*{\labelnamepunct}{\addcolon\space}          \renewbibmacro*{publisher+location+date}{%     \printlist{location}%     \iflistundef{publisher}     {\setunit*{\addcomma\space}}     %%    {\setunit*{addcolon\space}}% DELETED     {\setunit*{~:\space}}% ADDED     \printlist{publisher}%     \setunit*{\addcomma\space}%     \usebibmacro{date}%     \newunit}          \DeclareFieldFormat{edition}{%       \ifinteger{#1}     %%    {\mkbibordedition{#1}~\bibstring{edition}}% DELETED         {\mkbibordedition{#1}\bibstring{edition}}% ADDED         {#1\isdot}}


title: Labeled linear program with labeled equations and wide objective function

text: Can anybody help me stating a linear program in latex with the following requirements?   1. The LP itself shall be numbered on the left-hand side (although in the remaining document the equations' labels are on the rhs), with a certain tag, e.g. "(P)" which should be associated with an equation label.   2. The LP part consists of 5 columns:     * for "max" and for "subject to"     * for the lhs of the constraints     * for the relations $\leq$, etc.     * for the rhs of the constraints     * for quantification (e.g. $\forall v \in V$)   3. The objective function (which does not have a lhs/rhs) may be wide and should span over the three middle columns.   4. Every row should itself have an equation label which is right-justified. So far I used an equation environment together with the array environment and the multicolumn command to get the layout right. But the constraint labels don't work here. On the other hand, using align doesn't seem to help since even the wide objective didn't work very nicely (I used \mathclap). The following picture shows how it should look like ![this](http://www.math.uni-magdeburg.de/~walter/downloads/latex-lp- labels.png) Here is a MWE rendering the centered part - but I have no clue how to add the single equation labels nor the left-aligned equation label given that other equations are right-aligned.               \documentclass{article}     \usepackage{amsmath}     \begin{document}     \begin{equation*}       \begin{array}{lrcll}         \max          & \multicolumn{4}{l}{\sum\limits_{v \in V} x_v + \sum\limits_{e \in E} y_e + 10000\gamma } \\         \text{s.t.}         & x_v + x_w & \geq & 0 & \forall \{v,w\} \in E \\         & y_e & \geq & 0 & \forall e \in E \\         & y(\delta(U)) & \geq & \frac{1}{2}(|U|-1) & \forall U \subseteq V       \end{array}     \end{equation*}     \end{document}


title: Creating an Environment to Mimic News Websites

text: Sometimes literature and linguistic papers deal with journalistic texts. Therefore researchers need an environment that creates something looking like the beginning of this link (from the line "Japan" to the last headline of the bold part "zunächst nicht vor"): I suppose an environment can be created by the use of three arguments (one for the first headline, one for the second headline and one for the bold text) which are specified by colour, font and vertical distance. But I am not able to create it myself. So my question is: Is anyone out there who knows how to create an environment that mirrors the beginning of the article.


title: How to set my preferred Bibliography Style

text: I'm including the Bibliography to my thesis with the simple `thebibliography` environment provided by latex. Here is a sample of its content:               \begin{thebibliography}{39}          \bibitem{backprop}                         Rumelhart David E.,                  Geoffrey E. Hinton                          and Ronald J. Williams.                  \textit{``Learning representations by back-propagating errors.''}                  Nature 323.6088 (1986): 533-536.          \bibitem{SIFT}      Lowe, David G.                  \textit{``Distinctive image features from scale-invariant keypoints.''}                      International journal of computer vision 60, no. 2 (2004): 91-110.          \end{thebibliography}      If I understood correctly the content of this page, the number 39 I put between the brackets corresponds to a certain style the bibliography should have. In particular 39 corresponding to `alpha` which you can find at page 39 of this pdf. Nevertheless when I compile my document I will still continue to see the citations in the `[1]` style and not with the `[CODE]` one.   * What is going wrong here?   * Moreover, I'd like to know how are the codes computed from the citation, e.g.: > [KK90] K.S.Narendra and K.Parthsarathy. Identification and control of > dynamical system using neural networks. IEENN, 1(1):4–27, 1990. and where, if possible, can I find them on the web?   * Is there a way to automatically alphabetically order the entries of the bibliography, or should I just pull up my sleeves and do it? ;) Thanks in advance for any help you can provide.


title: Shortcuts for Lemma, Claim, Theorem etc

text: I'm using Lyx 2.0.2 I would like to define keyboard shortcuts for creating mathematical sections such as Theorem, Lemma etc. I'm pretty sure those do not exist ...


title: Polar plots, add degree symbol and hide the radius axis labels

text: I'm using sublime text 2 with skim, on Mac OSX 10.8.3. I'm plotting microphone pick up patterns as follows:                   \begin{tikzpicture} % p56         \begin{polaraxis} [ytick=\empty,legend entries={Omnidirectional,Figure-8,,Subcardioid,Cardioid,Supercardioid,,,,Hypercardioid,,,,},legend cell align=left,legend style={at={(1.7,0.5)},anchor=east}]             %Ominidirectional         \addplot[style=thick,domain=0:360, samples=100]{1};             %Figure 8 (Bidirectional)         \addplot[style=thick,color=blue,domain=0:180, samples=100]{cos(x)};         \addplot[style=thick,color=blue,domain=180:360, samples=100]{-cos(x)};             %subcardiod         \addplot[style=thick,color=green,domain=0:360, samples=100]{0.7 + 0.3*cos(x)};             %cardiod         \addplot[style=thick,color=brown,domain=0:360, samples=100]{0.5 + 0.5*cos(x)};             %Supercardioid         \addplot[style=thick,color=red,domain=0:126, samples=100]{0.37 + 0.63*cos(x)};         \addplot[style=thick,color=red,domain=126:234, samples=100]{-0.37 - 0.63*cos(x)};         \addplot[style=thick,color=red,domain=234:360, samples=100]{0.37 + 0.63*cos(x)};             %Hypercardioid         \addplot[style=thick,color=violet, domain=0:110, samples=100]{0.25 + 0.75*cos(x)};         \addplot[style=thick,color=violet,domain=110:250, samples=100]{-0.25 - 0.75*cos(x)};         \addplot[style=thick,color=violet,domain=250:360, samples=100]{0.25 + 0.75*cos(x)};         \end{polaraxis}     \end{tikzpicture}      This creates the correct polar plots, but the angles are without the degree symbol. How can I add the degree symbol and also how can I remove the black radial line running from the centre horizontally to the right?


title: tikz nodes for subformulae (nested in nodes)

text: One of the features I really valued in pstricks (I have long changed to tikz and this is the only feature I am missing) is that I could just designate any fragment as a node and then connect that to other nodes I had lying around. Here is a specific example I came up while converting legacy code for my lecture.               \begin{tikzpicture}[yscale=1.5]       \node (love) at (2,0) {$\text{love}$};        \node (aform) at (0,1) {$\forall{X}\text{man}(X)\rightarrow\Box$};       \node (eform) at (4,1){$\exists{X}\text{woman}(X)\wedge\Box$};       \node (top) at (2,2) {$\Box$};       \draw[dashed,->] (top) --node[left] {1} (aform);       \draw[dashed,->] (top) --node[right] {2} (eform);       \draw[dashed,->] (aform.east) --node[left] {3} (love);       \draw[dashed,->] (eform.east) --node[rightl] {4} (love);     \end{tikzpicture}      But I am cheating in the last two lines of the picture. What I really want to do is to link the boxes in the nodes `aform` and `eform` to the node `love`. In `pstricks` I would just have used the `\rnode` macro and done something like               \node (aform) at (0,1) {$\forall{X}\text{man}(X)\rightarrow\rnode{abox}{\Box}$};     \node (eform) at (4,1){$\exists{X}\text{woman}(X)\wedge\rnode{ebox}{\Box}$};      and used the node labels simply with (now pure tikz again)               \draw[dashed,->] (abox) --node[left] {3} (love);     \draw[dashed,->] (ebox) --node[rightl] {4} (love);      I have tried various things, e.g. using `\tizk[remember picture]\node (abox) {\Box};` but nothing I came up with worked. I would be grateful to learn how to do this.


title: Can TeX detect a newline at the end of the file?

text: Is TeX able to distinguish beween a file containing, say, the single character `a`/ byte 97; and a file containing this same character followed by a newline marker (which is system-dependent)? I had a bit of trouble creating a file with no trailing newline, so in case you need it, here is one way:               luatex "\directlua{io.output('test1.txt'):write('a') io.output('test2.txt'):write('a\string\n')}\bye"      Can TeX distinguish `test1.txt` from `test2.txt` (besides their name)? It seems that `\read` and `\readline` both discard a trailing newline and set `\ifeof` to true at the same time regardless of the presence of a trailing newline.


title: Printing value of a unique counter outside mdframed

text: I have defined commands for a unique counter, i can retrieve the values if the counter unique name is not defined inside mdframed, what could be the problem, i cant seem to retrive the value if counter name defined inside mdframed?               \documentclass{article}     \usepackage{uniquecounter}     \usepackage{mdframed}     \UniqueCounterNew{answers}     \pagestyle{plain}     \makeatletter          \newcommand*{\DefNewAnswersName}[2]{%       % #1 is unique counter value       % #2 is name of anchor       \@namedef{answers@#2}{a#1}%     }     \newcommand*{\NewAnswersName}[1]{%       \UniqueCounterCall{answers}\DefNewAnswersName{#1}%     }     \newcommand*{\PrintAnswersName}[1]{%       \@nameuse{answers@#1}%     }     \makeatother               \begin{document}      \NewAnswersName{first}%      \NewAnswersName{second}%     \begin{mdframed}     %inside md framed environment it has problems       \NewAnswersName{third}%     \end{mdframed}      \noindent       first: \PrintAnswersName{first}\\%       second: \PrintAnswersName{second}\\       third: \PrintAnswersName{third}     \end{document}


title: Is there a document class or package specifically for drafting United States legal documents?

text: I recently drafted a non-disclosure agreement in TeX using the document class article. I liked doing this a lot and I intend to continue doing my legal paperwork in TeX. > Do document classes or packages exist specifically for writing U.S. legal > documents? Of course, I can continue to write them as articles, but if tools have already been created to do this, I'd like to take advantage of them.


title: Adding a string "Chapter" to selected chapter numbers in TOC

text: Any idea how to add a string "Chapter" to TOC to a selected positions in TOC? For now, TOC looks like this:               Chapter without any number A     Chapter without any number B     1. This is chapter 1.     2. This is chapter 2.     3. This is chapter 3.     4. This is chapter 4.      I want to add "Chapter" to some of them. The result should be like that:               Chapter without any number A     Chapter without any number B     1. This is chapter 1.     2. This is chapter 2.     Chapter 3. This is chapter 3.     Chapter 4. This is chapter 4.