title: TextMate 2 and lost paths

text: This is a recent development, and I'm not sure what I've changed to make this happen… other than setting `TM_SUPPORT_PATH` to `~/Library/Application Support/TextMate/Managed/Bundles/Bundle Support.tmbundle/Support/shared`. I had to do that a month ago to get LaTeX files to compile (another mystery, since it previously compiled without issue). They seem to work fine now, but when I try to create italics (or bold, underline, etc.), TextMate spits back the error: > `Failure running “Italic”.` > > `Italic: line 4: toggle_style.rb: command not found` This same error occurs when I try to invoke other scripts contained in the LaTeX bundle (Tidy, anything invoking `texMate.py`). All of these seem to rely on `TM_SUPPORT_PATH` in the script, and yet none of these scripts resides within the `shared` directory… They're all in `~/Library/Application Support/TextMate/Managed/Bundles/LaTeX.tmbundle/Support/bin`. I could solve this problem by changing the path in all of the scripts to a `TM_LATEX_SUPPORT` path, or by moving or linking all of the scripts to the shared directory… but this doesn't seem like it should be necessary. Any ideas on what I may have broken?


title: Creating a "\label" that, if necessary, spans over several pages

text: What I want to do is the following: I want to refer to an earlier block of text. I could do this by using the `\label` and the `\ref` commands like so:               \label{x} Lorem ipsum dolor sit amet, consectetur adipiscing elit.          See page \ref{x}.      This would create something like "See page 1" out of the second line of code. However, let's say the sentence above, in the first line of code, spans over more than one page. Then I would like the readout to be "See pages 1-2". Now I could solve this by doing the following:               \label{x} Lorem ipsum dolor sit amet, consectetur adipiscing elit. \label{y}          See pages \ref{x}-\ref{y}.      This would create something like "See pages 1-2" out of the second line of code. However, this is not flexible enough. If the sentence doesn't span over several pages, I would end up with something like "See pages 1-1", something I definitely wouldn't want. So, I guess you can see my dilemma here. Is there any way for me to do what I want?


title: fancyhdr color and width of line?

text: I am using the fancyhdr package and I want to have a thicker line under my header and I want to have it colored, but my problem is, that this 2 commands:               \renewcommand{\headrule}{\vbox to 0pt{\hbox     to\headwidth{\textcolor{headercolor}{\hrulefill}}\vss}}      \renewcommand{\headrulewidth}{2pt}      Do not work together? So how can I get a more thicker line which is also colored? Here is the complete code:               \documentclass{book}     \usepackage{geometry}          \geometry{left=4cm,right=3cm, top=2cm, bottom=2cm}           \usepackage{titlesec}     \titlespacing*{\chapter}{0pt}{-30pt}{20pt}     \titleformat{\chapter}[display]{\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\Huge}     \usepackage[ngerman]{babel}     \usepackage{mathptmx}     \usepackage{helvet}     \usepackage{wallpaper}     \usepackage{color}     \usepackage[final]{pdfpages}           \usepackage{xcolor,bookmark}     \usepackage{scrextend}     \usepackage{titlepic}     \usepackage{shorttoc}     \usepackage{courier}     %\usepackage{titlesec}     %\usepackage[titles]{tocloft}          \usepackage{type1cm}              \usepackage{zref-abspage}                        \usepackage{makeidx}                      \usepackage{graphicx}                                                \usepackage{multicol}               \usepackage{thmbox}         \usepackage{shadethm}         \usepackage{amsthm}         \usepackage{amsmath}         \usepackage{marginnote}         %\usetocstyle{KOMAlike}         \usepackage{wrapfig}         \usepackage{paralist}         \usepackage{amssymb}         \usepackage[framemethod=tikz]{mdframed}         \usepackage{ulem}         \usepackage{fancyheadings}         %\usepackage{sectsty}              \definecolor{headercolor}{rgb}{0.6941,0.6745,0.4863}                   \begin{document}          \mainmatter%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \include{part1}      \pagestyle{fancy}     \fancyhf{}     \fancyhead[L]{ \textcolor{headercolor}\leftmark \text{ }\textcolor{headercolor}{\thesection}}     \fancyhead[R]{\textcolor{headercolor}{\thepage}}     %\renewcommand{\headrule}{\vbox to 0pt{\hbox     %to\headwidth{\textcolor{headercolor}{\hrulefill}}\vss}}      \renewcommand{\headrulewidth}{2pt}      test test\\ test test              \end{document}


title: Source code for navigation bullets in miniframes outer theme?

text: I would like to know the code used to obtain the navigation bullets when using mini-frames. (The idea is to make my own custom template with a bullet for each frame in current subsection.) Cheers, S.


title: representing literal characters in a \newcommand or \def

text: Consider this short LaTeX document:               \documentclass[11pt]{article}          \usepackage[T2A]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[russian]{babel}          \def\name{...}          \begin{document}     Hello: \name     \end{document}      The `\def\name` line will be generated by a program and the `...` will contain TeX required to represent a string literal whose value comes from, say a database. Think of the classic mail-merge scenario. For example, if the data value is `Foo`, then the program can generate: `\def\name{Foo}`, but if the data value is `$x+y$`, the program will need to output something like `\def\name{\$x+y\$}` in order that `$` will not be interpreted as the switch to math mode markup command. My question is: given a sequence of Unicode code-points, how can I algorithmically create a `\def` or `\newcommand` statement which when expanded will always result in that literal sequence of Unicode characters without any possibility of any characters being interpreted as markup command. I imagine the procedure might depend on which packages are in use, so you can assume that the above packages are in effect - although it would be nice to have a procedure which works independently of context.


title: Does the pgfplots manual crash your Preview and/or Skim app on OSX?

text: The `pgfplots` manual consistently crashes both my Preview.app and my Skim.app. A quick google search yields a closed bug report on the `pgfplots` Sourceforge page and a related question on apple.stackexchange.com, showing that this is a known issue. It doesn't happen on every page; it seems to prefer pages with more elaborate plots. Though this is not technically a TeX question it will only affect TeX users; according to the closed bug report it is Apple's bug and there's not much that can be done about it, I wanted to check if anyone else has encountered this problem and figured out a way—any way— _around it_ for long enough to work through one of the examples in the manual (or am I doomed to screen-capturing it?!). * * * # Edit As per Christian Feuersänger's suggestion, here are some Minimal Crashing Examples. On another note Adobe Reader (version 9) works with all of these plots, though compared to Skim or Preview, it is slow and choppy; you can almost feel it strain to get the job done. ## Parametrized plot crash               % pgfplots manual, page 121     % parametrized plot #4     % Compiled: 2012-11-02     % This one crashes unceremoniously.           \documentclass{standalone}     \usepackage{pgfplots}       \pgfplotsset{width=7cm,compat=1.7}          \begin{document}          \begin{tikzpicture}       \begin{axis}[view={60}{30}]         \addplot3[surf,shader=interp,z buffer=sort,         samples=30,domain=-1:0,y domain=0:2*pi]         ({sqrt(1-x^2) * cos(deg(y))},         {sqrt( 1-x^2 ) * sin(deg(y))},         x);       \end{axis}     \end{tikzpicture}          \end{document}          %%% Local Variables:      %%% mode: latex     %%% TeX-engine: xetex     %%% TeX-master: t     %%% End:       ## Patch Plot, biquadratic               % pgfplots manual, page 343     % patch type, biquadratic     % Compiled: 2012-11-02     % This one renders the axes and then hangs before plotting.          \documentclass{standalone}     \usepackage{pgfplots}       \pgfplotsset{width=7cm,compat=1.7}       \usepgfplotslibrary{patchplots}          \begin{document}          \begin{tikzpicture}     \begin{axis}[       title={Mesh on top of patches (i): obscured}]          \addplot3[patch,patch type=biquadratic,shader=interp,       patch refines=3]     coordinates {      (0,0,1) (6,1,1.6) (5,5,1.3) (-1,5,0)      (3,1,0) (6,3,0.4) (2,6,1.1) (0,3,0.9)      (3,3.75,0.5)     };     \addplot3[patch,patch type=biquadratic,mesh,black,       patch refines=3]     coordinates {       (0,0,1) (6,1,1.6) (5,5,1.3) (-1,5,0)       (3,1,0) (6,3,0.4) (2,6,1.1) (0,3,0.9)       (3,3.75,0.5)     };     \end{axis}     \end{tikzpicture}          \end{document}          %%% Local Variables:      %%% mode: latex     %%% TeX-engine: xetex     %%% TeX-master: t     %%% End:       ## Patch plot, bilinear               % pgfplots manual, page 343     % patch type, biliniear     % Compiled: 2012-11-02     % Not the same as the bilinear example on the pgfplots manual because that one     % reads data from a file I don't have.      % This one renders the axes and then hangs before plotting.          \documentclass{standalone}     \usepackage{pgfplots}       \pgfplotsset{width=7cm,compat=1.7}       \usepgfplotslibrary{patchplots}          \begin{document}          \begin{tikzpicture}     \begin{axis}[       title={Mesh on top of patches (i): obscured}]          \addplot3[patch,patch type=bilinear,shader=interp,       patch refines=3]     coordinates {      (0,0,1) (6,1,1.6) (5,5,1.3) (-1,5,0)      (3,1,0) (6,3,0.4) (2,6,1.1) (0,3,0.9)      (3,3.75,0.5)     };     \addplot3[patch,patch type=biquadratic,mesh,black,       patch refines=3]     coordinates {       (0,0,1) (6,1,1.6) (5,5,1.3) (-1,5,0)       (3,1,0) (6,3,0.4) (2,6,1.1) (0,3,0.9)       (3,3.75,0.5)     };     \end{axis}     \end{tikzpicture}          \end{document}          %%% Local Variables:      %%% mode: latex     %%% TeX-engine: xetex     %%% TeX-master: t     %%% End:       ## Patch plot, bicubic               % pgfplots manual, page 336     % patch type, bicubic     % Compiled: 2012-11-02     % This one renders differently than in the manual. Uglier.          \documentclass{standalone}     \usepackage{pgfplots}       \pgfplotsset{width=7cm,compat=1.7}       \usepgfplotslibrary{patchplots}          \begin{document}          % Preamble: \pgfplotsset{width=7cm,compat=1.7}     \begin{tikzpicture}     \begin{axis}[nodes near coords={(\coordindex)},       title=Single Bicubic Quadrilateral]     \addplot3[patch,patch type=bicubic,shader=interp]     coordinates {       (0,0,1) (1,0,0) (2,0,0) (3,0,0)       (0,1,0) (1,1,0) (2,1,0) (3,1,0)       (0,2,0) (1,2,0) (2,2,0) (3,2,0)       (0,3,0) (1,3,0) (2,3,0) (3,3,0)     };     \end{axis}     \end{tikzpicture}          \end{document}          %% Switched to pdflatex engine because of this error:      % ERROR: Package pgfplots Error: Sorry, surface shading (shader=interp) is NOT     % available for the selected driver `pgfsys-xetex.def'. I will use 'shader=flat'     % if you continue now.          %% Output is not as expected or as shown in the manual          %%% Local Variables:      %%% mode: latex     %%% TeX-engine: default     %%% TeX-master: t     %%% End:       ## Patch plot, bicubic (a crashing one)               % pgfplots manual, page 337     % patch type, bicubic     % Compiled: 2012-11-02     % This one renders axes and then hangs.          \documentclass{standalone}     \usepackage{pgfplots}       \pgfplotsset{width=7cm,compat=1.7}       \usepgfplotslibrary{patchplots}          \begin{document}               \begin{tikzpicture}     \begin{axis}[         title=Two Bicubic Patches]     \addplot3[patch,patch type=bicubic,shader=interp,point         meta=explicit]     coordinates {         (0,0,1)[1] (1,0,0)[0] (2,0,0)[0] (3,0,0)[0]         (0,1,0)[0] (1,1,0)[0] (2,1,0)[0] (3,1,0)[0]         (0,2,0)[0] (1,2,0)[0] (2,2,0)[0] (3,2,0)[0]         (0,3,0)[0] (1,3,0)[0] (2,3,0)[0] (3,3,0)[0]         (3,0,0)[0] (4,0,0)[0] (5,0,0)[0] (6,0,0)[0.7]         (3,1,0)[0] (4,1,.5)[1](5,1,0)[0] (6,1,0)[0]         (3,2,0)[0] (4,2,0)[0] (5,2,0)[0] (6,2,0)[0]         (3,3,0)[0] (4,3,0)[0] (5,3,0)[0] (6,3,0)[0.1]       };     \end{axis}     \end{tikzpicture}          \end{document}          %% Switched to pdflatex engine because of this error:      % ERROR: Package pgfplots Error: Sorry, surface shading (shader=interp) is NOT     % available for the selected driver `pgfsys-xetex.def'. I will use 'shader=flat'     % if you continue now.               %%% Local Variables:      %%% mode: latex     %%% TeX-engine: default     %%% TeX-master: t     %%% End:      ## Patch plot, coons               % pgfplots manual, page 337-338     % patch type, coons     % Compiled: 2012-11-02     % This one renders differently than in the manual          \documentclass{standalone}     \usepackage{pgfplots}       \pgfplotsset{width=7cm,compat=1.7}       \usepgfplotslibrary{patchplots}          \begin{document}          \begin{tikzpicture}     \begin{axis}[nodes near coords={(\coordindex)},       width=12cm,       title=A Coons Patch]     \addplot[mark=*,patch,patch type=coons,       shader=interp,point meta=explicit]     coordinates {       (0,0) [0] % first corner       (1,-1) [0] % Bezier control point between (0) and (3)       (4,0.7) [0] % Bezier control point between (0) and (3)     %       (3,2) [1] % second corner       (4,3.5) [1] % Bezier control point between (3) and (6)       (7,2) [1] % Bezier control point between (3) and (6)     %       (7,1) [2] % third corner       (6,0.6) [2] % Bezier control point between (6) and (9)       (4.5,-0.5) [2] % Bezier control point between (6) and (9)     %       (5,-2) [3] % fourth corner       (4,-2.5) [3] % Bezier control point between (9) and (0)       (-1,-2) [3] % Bezier control point between (9) and (0)     };     \end{axis}     \end{tikzpicture}          \end{document}          %% Switched to pdflatex engine because of this error:      % ERROR: Package pgfplots Error: Sorry, surface shading (shader=interp) is NOT     % available for the selected driver `pgfsys-xetex.def'. I will use 'shader=flat'     % if you continue now.               %%% Local Variables:      %%% mode: latex     %%% TeX-engine: default     %%% TeX-master: t     %%% End:


title: How remove title page's set date

text: how to delete the surrounded date without deleting the footer's date? ![enter image description here](http://i.stack.imgur.com/ZonDP.png) I've tried `\date{}`, but this would remove the footer's date too.


title: How to use \mylabel in a \frametitle

text: I need to refer in `\frametitle` to a section that I have labelled with a new command `\mylabel`. Here is the code               \documentclass{beamer}                \makeatletter     \newcommand*{\mylabel}[2]{%     \@bsphack     \begingroup     \def\@currentlabel{#2}%     \label{#1}%     \endgroup     \@esphack          }     \makeatother               \begin{document}                    \section[Title 1]{This is a long title that gos on very long long long long long        long long title more long long }{\mylabel{LabelTopic1}{This is a long title that        gos on very long long long long long long long title more long long }}                    \frame<presentation>{\frametitle{\ref{LabelTopic1}}}                         \end{document}      This is what I have got ![enter image description here](http://i.stack.imgur.com/I3OYT.jpg) The problem is that the name is too long and does not fit in one line of frametitle and the line does not break. I think that something is missing in the command `\mylabel`. But I don't know what. Thank you for any help


title: How to install "tabto" macro?

text: I am trying to install the "tabto.sty" and I am using the vanilla TeXLive from CTAN. The tabto macro is archived in the CTAN at the following directory --               1. http://www.ctan.org/tex-archive/macros/latex/contrib/tabto      but my TeXLive repository is looking for it in this location --               2. http://mirrors.ibiblio.org/pub/mirrors/CTAN/systems/texlive/tlnet      and it does not contain tabto. I know that I can directly download the sty file (or zip archive) from the CTAN url (link 1 above) and use it. But I do not want to do that. How do I make my TeXLive to fetch all required stuffs from both of the above URLs? Is there any "tlnet" compatible link for the CTAN repository (link 1) that I could use with tlmgr ?


title: Saturn rings with TikZ

text: The planet and a ring are easily drawn. The challenge is to layer them in such a way that the far side of the ring is hidden from view behind the planet, and the near side of the ring eclipses the planet in the foreground. My instinct tells me that this can be done using clipping, scopes, or the backgrounds package, but I apparently lack the cleverness to turn the trick. Here's the code for Saturn and one ring:               \documentclass{article}          \usepackage{tikz}          \begin{document}          %Saturn on top     \begin{tikzpicture}     \draw[fill=blue] (0,-.2) circle [x radius=4, y radius=1];     \draw[fill=white] (0,0) circle [x radius=3, y radius=.5];     \draw[fill=red] (0,0) circle [radius=2];     \end{tikzpicture}          \bigskip          %ring on top     \begin{tikzpicture}     \draw[fill=red] (0,0) circle [radius=2];         \draw[fill=blue] (0,-.2) circle [x radius=4, y radius=1];     \draw[fill=white] (0,0) circle [x radius=3, y radius=.5];         \end{tikzpicture}          \end{document}


title: Line shown behind filled rectangle made with TikZ

text: I need to create a TikZ style that is a filled rectangle with a line crossing it. The problem I'm facing now is that when the rectangle is filled with a color, then the line is drawn behind the rectangle, and I need it above. The MWE:               \documentclass[12pt]{standalone}          \usepackage{tikz}     \usetikzlibrary{calc, shapes.geometric}          \tikzstyle{mainfig} = [         minimum width=16mm,         minimum height=5mm,         text centered,         draw=black,         fill=orange!80,         line width=1pt,         rectangle,         append after command={           \pgfextra{             \draw [line width=2pt]                 ($(\tikzlastnode.north west)+(3mm,5mm)$)--                 ($(\tikzlastnode.south west)+(3mm,-5mm)$);           }          }        ]           \begin{document}            \begin{tikzpicture}[font=\footnotesize]         \node (test) [mainfig] {\ldots};       \end{tikzpicture}          \end{document}      This is what I get: ![enter image description here](http://i.stack.imgur.com/9VtnA.png) How can I force the line drawn after `append after command` to be drawn above the filled figure? * * * **Update:** I've confirmed that this code doesn't work with pgf 2.10, nor with 3.0.0. Also, I've seen that this problem is perfectly solvable using pgf 3.0.0, thanks to the answers of @PaulGessler and @PaulGaborit, but for now I should like a solution working for both versions of pgf. I hope that is not too much to ask for. In particular, I need a working solution with pgf 2.10 support, because I will use this code in a project to be worked collaboratively, and as of now, both ShareLaTeX and writeLaTeX use that version of pgf. If nothing new appears, I will gladly accept the most voted of those answers.


title: Can maths adornments know the "type" of their contents?

text: By "maths adornments" I mean things like `\widehat` (from the ams) and their ilk. Perhaps the following best illustrates what I mean: ![widehat spacing](http://i.stack.imgur.com/K84cj.png) Code to reproduce:               \documentclass{standalone}     \usepackage{amsmath}          \begin{document}     \begin{gather*}     A \widehat{\otimes} B \\     A \otimes B \\     A \mathbin{\widehat{\otimes}} B     \end{gather*}     \end{document}      Would it be possible to make `\widehat` (and others) "aware" of the type of their input? By "type" I mean whether the argument is a relation, operator, alphanumeric character, or ... are there any more? What it would do is to set itself to be the corresponding type. Thus, in my example above, `\widehat{\otimes}` would result in `\mathbin{\widehat{\otimes}}` whilst `\widehat{A}` would result in `\mathalpha{\widehat{A}}`. I realise that there's a potential issue in that the input might be many characters, but for a single character it should be reasonably safe (and one could supply an optional argument to the augmented `\widehat` to override its choice if one disagreed). (I just noticed this due to a fairly obvious spacing jump in a beamer presentation where I want to add a hat to a character on a slide. In the end, my transition command looked like:               \alt<3->{\mathbin{\widehat{\otimes}}}{\vphantom{\widehat{\otimes}}\otimes}      if one isn't bothered about spacing, one can write `\only<3->{\widehat}\otimes`.)


title: How to put table and PNG next to each other in the same figure?

text: How can I put a table and a PNG (using `\includegraphics`) next to each other in the same figure, in the following way?                            +----+         +-----+  |png |         |table|  |png |         |table|  |png |         +-----+  +----+       Figure 4.1: Caption      So the table and the PNG are aligned at the bottom. I tried to just put both in a table (2 columns), but the objects are not aligned at the bottom.


title: How to find the right package

text: > **Possible Duplicate:**   >  How to find a package name by a command name? Sorry to ask such a simple question, but I wonder if there is any listing or any site that I can easily find the package for a command. For instance I want to use '\includegraphics{}' but I don't know how to find the appropriate package to use. This question applies in the other way as well. If I want to know what are the functions inside a package.


title: Why do TeX list items use two backslashes?

text: In TeX packages one finds definitions of lists as:               \def\l{\\\alpha\\\beta\\\gamma}      The one backslash is understandable, it represent the active character for the macro i.e, \gamma, but what do the other two do, why are they there?


title: Colors Not Rendering Correctly

text: After invoking the 'color' package with the command > \usepackage[pdftex]{color} I defined a new color using CMYK values. More specifically, I set > \definecolor{mybluegray}{cmyk}{.33,.11,.01,0} However, the color rendered in the document is not the same with color rendered in, say, Adobe Photoshop. To be more precise, I opened the PDF file in Photoshop and checked the CMYK values there, and Photoshop says the color in my document has CMYK values {.25,.08,.04,0}. Can anyone give me some clue on what's going on? (By the way, I compiled my document on both Mac and Linux machines, and they produce the same color.)


title: Why only Bakoma TeX?

text: I have used Bakoma TeX and LyX, and many other LaTeX editors. I really liked Bakoma's WYSIWYG, but it is so expensive. Why is there so few WYSIWYG among the numerous LaTeX editors. Is the technology of Bakoma TeX unknown? is it tricky? or is it patented? I am hoping to see the price to be competitive (or to see some other alternative editors with better icons).


title: How do I ‘expand’ a control sequence `\let` to a character?

text: Consider the following:               \let\1=X     \edef\2{\1}     \show\1 \show\2      The result is               > \1=the letter X.          > \2=macro:     ->\1.      Is it possible to ‘expand’ the meaning of `\1` so that `\2` contains just `X`? The only solution I can think of is to use `\meaning` on `\1` and cut out the prefix, but that doesn't seem very elegant. (Context: I'm writing a scanning function that looks ahead at the next token and then either adds it to a scratch variable or terminates the scanning. Can't add it to the scratch variable without expanding it first, though! But it's not the context that I care about, since I can do the loop in another way; I'm interested in this particular question.)


title: Different spacing caused by \newcommand and \def

text: From the answer to my other question " define something like \lim but for another name", I tried:               \def\ext{\qopname\relax m{ext}}      and:               \newcommand{\ext}{\qopname\relax m{ext}}      In " What is the difference between \def and \newcommand?", it is said that they are basically the same and `\newcommand` is a bit more clever and does some extra checks. But it suggests that they should behave in just the same way. But actually they do not. For the `\def` case, it seems to add extra spacing around `\ext` when I use it (just like `\lim` would). And `\newcommand` does not. Why? What exactly is the different behavior for those more generally?


title: TeXstudio: Can a script read its trigger?

text: I would like to write a macro with a trigger `#[a-z]` that, dependent on the character in the trigger, writes the corresponding Greek letter. That is, the trigger `#a` should produce `\alpha`, the trigger `#b` should give `\beta` in the editor, and so on. The trouble is that the trigger is removed immediately after it is written so that the script does not know if `a`, `b`, or another letter has been used. Of course I could write specific macros for each Greek letter, but this would exhaust even the limit of 40 macros easily (if also capital letters are used). I know I could place the macro under the first ten macros and use the shortcut `Shift`+`F1` or the like, but this is less intuitive. Does anyone know of a method to access the trigger letter? _Edit_ : I now use a workaround. If the order of trigger and letter is reversed, the problem disappears. Instead of `#a`, the trigger is now universally `#`. Writing `a#`will remove the `#` and leave the `a` which can then be used in the script to be converted to `\alpha`. However, this cramps my typewriting style somewhat so that I would still like to know the answer to the question.


title: MakeIndex Style and pdfLaTeX Format Not Found

text: When I try to compile my document I get the following errors:   1. Index style file PhD_Research_Proposal.ist not found   2. pdflatex.exe: The memory dump file could not be found   3. texify: pdflatex.exe failed for some reason (see log file) ![enter image description here](http://i.stack.imgur.com/6ko7h.png)


title: Vertical alignment of images in longtable

text: I am trying to create a longtable where the first column contains only images. The longtable is defined as (with only one row):               \begin{longtable}{m{0.2\linewidth} m{0.7\linewidth}}         \hline         \includegraphics[keepaspectratio,width=\linewidth]{RectSolid.eps} & $\!\begin{aligned}         A &= b\cdot{}h\\         P &= 2(b+h)\\         y &= \dfrac{h}{2}\\         I_y &= \dfrac{1}{12}b\cdot{}h^3         \end{aligned}$         \\\hline     \end{longtable}      The result I get is (the image is tightly cropped, with no white-space padding): ![enter image description here](http://i.stack.imgur.com/iWJmF.png) It seems as though the image's baseline is at its bottom, so that it rests at the midpoint of the row. Or perhaps longtable expects text and therefore places the basepoint not at the midpoint, but at "midpoint - textHeight". Regardless, this is clearly not good enough. I've seen at Vertical aligning in longtable environment the suggestion of using `\raisebox{-\height}{\includegraphics{....}}` (or `\normalbaselineskip-\height` or, on my own `0.5\height`), but the results aren't much better: ![enter image description here](http://i.stack.imgur.com/jfWaE.png) Another suggestion given in a comment by @egreg in that link is the use of `adjustbox`, but I unfortunately can't even see if that'd work for me because I'm forced to use a .cls file given by my university which doesn't compile with that package (the university's .cls file is garbage, using a bunch of depreciated packages). So the question is: is it possible to vertically align figures in a longtable without the `adjustbox` package? It doesn't need to be the `longtable` package, but the table needs to span multiple pages. So if there's some other package that pulls that off, I'm willing to give it a try. **EDIT 1:** People have asked for a MWE, so here it is. I placed it in the public directory of my Dropbox and it can be downloaded **here**. I can't simply put the code because the `\documentclass` is given by my university's .cls file (ThesisPKKN2, which is actually a modification of the original I created to use `subcaption` instead of the outdated `subfigure` package). **EDIT 2:** The MWE linked above actually uses Andrew Swann's idea of `\vcenter`, but even though it clearly works wonders in the example he presents, in my case this is the result:               \begin{longtable}{m{0.2\linewidth} m{0.7\linewidth}}     \hline     $\vcenter{\includegraphics[keepaspectratio,width=\linewidth]{RectSolid.eps}}$ & $\!\begin{aligned}     A &= b\cdot{}h\\     P &= 2(b+h)\\     y &= \dfrac{h}{2}\\     I_y &= \dfrac{1}{12}b\cdot{}h^3     \end{aligned}$     \\\hline     \end{longtable}      ![enter image description here](http://i.stack.imgur.com/6S2Vb.png) I'd say this is the best result so far, but there still seems to be more space below than above the image. **EDIT 3:** Here is the MWE code itself.               \documentclass[dissertacao,brazil]{ThesisPKKN2}     \usepackage{array}     \usepackage{amsmath}     \usepackage{epstopdf}     \usepackage{etoolbox}     \usepackage{fixltx2e}     \usepackage{longtable}     \graphicspath{{./figures/}} % graphicx          \begin{document}     \begin{longtable}{m{0.2\linewidth} m{0.7\linewidth}}         \hline         $\vcenter{\includegraphics[keepaspectratio,width=\linewidth]{RectSolid.eps}}$ & $\!\begin{aligned}         A &= b\cdot{}h\\         P &= 2(b+h)\\         y &= \dfrac{h}{2}\\         I_y &= \dfrac{1}{12}b\cdot{}h^3         \end{aligned}$         \\\hline     \end{longtable}     \end{document}      **EDIT 4:** As commented, I just realized this is an issue using GIMP, not with TeX. My trimmed image is getting massive padding around it which is what is causing the image to be off-center. For whatever reason, this image ![enter image description here](http://i.stack.imgur.com/2smr0.png) when exported into .eps and placed in TeX becomes ![enter image description here](http://i.stack.imgur.com/FG5Bv.png) Regardless, this is a GIMP issue, not a TeX issue. Nevermind. That being said, Swann's `\vcenter` method actually works like a charm.


title: date not in title page, can't find isodate package

text: Between begin and end titlepage, I use `\date{\today}`. C-c C-c does not complain, but no date shows up. I saw another guy using `isodate`, but I don't have that package. On `aptitude search ~n^texlive`, there seems to be nothing date-related (?).


title: Images, titles and margins

text: I am writing a report and I need two things: there must be an image in the title page at the top left and I have to add a 5mm left margin to odd pages and a 5mm right margin to even pages, how can i do these things? for the image I'm trying with               \begin{figure}[t]\flushleft       \includegraphics[width=.35\textwidth]{pic.jpg}     \end{figure}      but the following text will go along with the image, and I want it to stay centered vertically and horizontally:               { \huge \bfseries Title}\\[1.5cm]     \textsc{\LARGE Subtitle}\\[1.5cm]      How can I do it?


title: Drawing a rectangle box around code fragment

text: How to produce the effect of drawing a rectangle box surrounded the code, and put it in the figure? (Any methods including non-tikz-pgf method that helps is welcome) ![enter image description here](http://i.stack.imgur.com/LXnkS.png)


title: Can I make LuaLaTeX use \input files that are ANSI encoded?

text: I include/`\input` automatically generated files (tables generated by Stata) into my main document. I would like to compile that document with LuaLaTeX. Unfortunately the generated files are ANSI-encoded (Stata does not support unicode). LuaLaTeX thus throws a `"String contains an invalid utf-8 sequence"` error at me. At the moment, the problem is only a single character, namely ¤ (U00A4 according to Windows Character Map). With XeLaTeX or without the character the document compiles fine. I would prefer to not search and replace the character (with e.g. \textcurrency, though something that works in math-mode as well would be preferred), since it involves many included files that change often. For the same reason I would prefer to not convert the encoding of the included files by hand. I would also prefer a more robust solution, i.e. not only for single characters. So is there a way to make LuaLaTeX use included files that are ANSI encoded, comparable to using \inputencoding with pdflatex? Alternatively, is it possible to automatically search and replace when compiling? Here is a MWE:               \documentclass{article}     \usepackage{luatextra, luaotfload}     \usepackage[vargreek-shape=unicode]{unicode-math} %      \defaultfontfeatures{Renderer=Basic,Scale=MatchLowercase, Ligatures={TeX}}      \setmainfont{Cambria}       \setmathfont{Cambria Math}           \begin{document}          A currency symbol in the main document: ¤            \input{input.tex}          \end{document}      input.tex just has one line, but is ANSI-encoded.               A currency symbol in the included document: ¤


title: Inconsistent spacing with parskip option of KOMA script and amsthm

text: This problem is similar to Question 25346, however the proposed solution does not solve my problem.               \documentclass[parskip=full]{scrreprt}          \usepackage{amsmath, amsthm}          \theoremstyle{definition}     \newtheorem{definition}{Definition}[chapter]          \begin{document}          Lorem ipsum dolor sit amet, consectetur adipiscing elit.          \begin{definition}      In luctus mattis felis ac tristique.     \end{definition}          Nunc vulputate lectus at eros vehicula.          Aliquam fermentum eu justo in lobortis.      \end{document}      produces inconsistent spacing: * * * ![enter image description here](http://i.stack.imgur.com/tpc9S.png) * * * Adding               \begingroup         \makeatletter         \@for\theoremstyle:=definition,remark,plain\do{%             \expandafter\g@addto@macro\csname th@\theoremstyle\endcsname{%                 \addtolength\thm@preskip\parskip                 }%             }     \endgroup      to the preamble, as suggested in Question 25346 produces * * * ![enter image description here](http://i.stack.imgur.com/HFBso.png) * * * but this space is now significantly bigger than the paragraph skip. I would like the the text-to-theorem-skip be identical in size to the parskip. Thanks!


title: trouble with table borders - some are incomplete

text: I am having trouble with my table borders again. I want to produce something like this: ![enter image description here](http://i.stack.imgur.com/h5mE1.png) or like this: ![enter image description here](http://i.stack.imgur.com/L6xnR.png) But I keep getting this: ![enter image description here](http://i.stack.imgur.com/GZqYG.png) These are my commands:                   \begin{table}[ht!]     \renewcommand{\arraystretch}{1}     \small     \doublespacing     \begin{center}         \caption{The Estimated Effect of Cultural Distance on Protectionism, Treatment Received}         \begin{tabular}{c|c|c|}         \cline{2-3}         & \multicolumn{2}{c}{\textbf{Treatment Received}}\\ \cline{2-3}         & All Respondents & Prejudiced Respondents\\ \cline{1-3}         Culturally Foreign & 25.6 & 44.4\\          Culturally Familiar & 20.0 & 19.0\\         Difference & 5.6 & 25.4*\\         (95\% Confidence Interval) & (-1.1 to 12.4) & (6.6 to 44.1)\\         p-value & 0.101  & 0.009\\ \hline     \end{tabular}     \end{center}     \end{table}


title: Unable to find the documentation of TikZ/PGF 3.0

text: After upgrading to the latest version of TikZ/PGF I cannot access, using `texdoc`, the newer version of the documentation. When I invoke `texdoc tikz` it tries to open the version that used to reside in:               ~/Library/texmf/doc/generic/pgf/pgfmanual.pdf      (corresponding to `2.10CVS`). Somehow I cannot find a way to tell `texdoc` to open the right version which is located in:               /usr/local/texlive/2013/texmf-dist/doc/generic/pgf/pgfmanual.pdf      A temporary workaround I use is to have a symbolic link from the former location to the latter. However, this is really ugly solution... I don't remember how I managed to tell `texdoc` to override the shipped documentation back when I manually installed the `CVS` version; thus I cannot simply undo it. ## Edit: @AndrewSwann: The output of `texdoc -l tikz` is:               1 /Users/username/Library/texmf/doc/generic/pgf/pgfmanual.pdf     2 /usr/local/texlive/2013/texmf-dist/doc/generic/pgf/pgfmanual.pdf      and the list go on... My question can be also stated: How can I remove `1` and make `2` the first one?


title: change the formatting of the chapter

text: I am trying to change the formatting of my chapter. The class i am using is report. I want it to be bold centered. I used the following but no effect. .               \renewcommand{\@makechapterhead}[1]{%     \vspace*{50\p@}%     {\parindent \z@ \raggedright \normalfont     \hrule     \vspace{5pt}%     \ifnum \c@secnumdepth >\m@ne     \huge\scshape \@chapapp\space \thechapter     \par\nobreak     \vskip 20\p@     \fi     \interlinepenalty\@M     \Huge \scshape #1\par     \vspace{5pt}%     \hrule     \nobreak     \vskip 40\p@     }}     \renewcommand{\@makeschapterhead}[1]{%     \vspace*{50\p@}%     {\parindent \z@ \raggedright     \normalfont     \hrule     \vspace{5pt}%     \interlinepenalty\@M     \Huge \scshape #1\par     \vspace{5pt}%     \hrule     \nobreak     \vskip 40\p@     }}


title: Reconstructing this website's banner / heading?

text: I'd sometimes like to generate some desktop wallpapers; in particular, I'd like a design like this website's banner (bg-graph-top.png):   * Grayish vibe   * Bit of mathish 2D lines/surfaces   * Some fleuron art (sprites-extra.png)   * That writing (from Lord of the Rings?) in Elvish (?) is awesome too `:)` The thing is, I don't really have an idea of how to start about doing that, or which packages I'd need: I guess I'd need `standalone`, `xcolor` and `tikz` at the least; but don't have much overview over the free fleuron or alternative font packages... So I'd like to ask, if someone from the community wouldn't mind putting a compilable MWE together, that would reconstruct something like this website's banner, as a reference and starting point? (I could probably skip the equations and legible writing myself, but good to have them for completeness). (Tagged this `diagrams`, because that's the only tag I've seen which is general enough; I guess this is more about `vector art` or `graphic design`, but there are no such tags here. Also, will flag this for a community wiki)


title: Converting LyX Nomenclature to Glossaries

text: I would like to add a nomenclature to my LyX document. Currently LyX only supports the nomencl package. However, since this package has not been updated since 2005 I would like to use the glossaries package. I think it should be possible to create a workaround, much like the Biblatex workaround in Lyx. I would this this would looks something like this:   1. Add a LyX nomenclature   2. Encapsulate the nomenclature `item` in a LyX comment   3. Call the glossaries package in the document preamble   4. Since there is no compatibility option in glossaries, redefine the commands like `\let\nomenclCommand\glossariesCommand` Would this be possible?


title: Decimal Long Division

text: Does anyone know of a package or macro that handles decimal long division? For example, I want to convert 3/8 to a decimal and show all of the steps. I found a macro for longdiv that works great for integers, but was wondering if anyone knew of something that worked with decimals. If this doesn't exist yet, how would I go about writing something to do this? Thanks!


title: Graphics equations: put text on equations

text: ![enter image description here](http://i.stack.imgur.com/8nWHB.jpg) I have a big question that I cannot solve by myself. I would like to add text on my equations, but I like to have some graphics on those. For instance, I would like to explain why I am doing something, e.g. by saying which theorem/result i am using to get to a precise point on my equation. However, I don't want to use only text, but emphasizing with graphics and text box linked with some arrows is preferred. The image you find is similar to what I am thinking. I thank you for the help Best


title: Decreasing the outer margin

text: How can I decrease the outer margin for the pages of my `memoir` book, without decreasing the inner margin? I want to alter the settings I already have, given here:               \documentclass[10pt]{memoir}          \setstocksize{9in}{6in}     \settrimmedsize{\stockheight}{\dimexpr 6in-15mm}{*}     \settypeblocksize{510pt}{270pt}{*}          \setlrmargins{*}{*}{4}     \setulmargins{*}{*}{2}     \setmarginnotes{5mm}{45.23mm}{\onelineskip}     \setlength{\footskip}{3.0\baselineskip}     \checkandfixthelayout          \usepackage{lipsum}          \begin{document}     \lipsum[1-5]     \end{document}


title: framebox does not work for lstlisting environment

text: I am looking a way to wrap something with a frame. I try different approaches but finally choose to use `fancybox` package and `minipage` (because I need to control the width of the frame). It works pretty good for text-only content               \usepackage{fancybox}          \begin{document}       \fbox{%         \begin{minipage}{\textwidth}           \textbf{Why we use negative angle in above calculate?}\newline            Since .... we have to ....         \end{minipage}       }     \end{document}      However, if we add any environment like `lstlisting` or `verbatim`, it doesn't work                 \fbox{%         \begin{minipage}{\textwidth}           \textbf{Why we use negative angle in above calculate?}\newline            Since .... we have to ....            \begin{lstlisting}               A = x+y;               B = x^2-2y;            \end{lstlisting}         \end{minipage}       }      Is that any way to make it work? p.s. I have created a webpage for the user to type the latex stuff inside and whatever they type, I will like to wrap that with a framebox and generated a pdf with pdflatex. I cannot control what they type, they might type text, math, environment and/or mix all of those. So any better way to frame whatever the latex stuff inside?


title: Alignment of colorbar with colorbar to name

text: I am trying to make a group of plots with `groupplots` sharing the same `colorbar` and the same y axis. An example:               \documentclass{standalone}     \usepackage{pgfplots}     \usepgfplotslibrary{groupplots}     \begin{document}     \begin{tikzpicture}     \begin{groupplot}[%     point meta min=0, point meta max=25,     group style={group size=2 by 1,         yticklabels at=edge left, ylabels at=edge left,     },     colorbar,     colorbar to name=commonbar,     ]     \nextgroupplot     \addplot[scatter, scatter src=y] {x^2};     \nextgroupplot     \addplot[scatter, scatter src=y] {x^2};     \end{groupplot}     \end{tikzpicture}     \ref{commonbar}     \end{document}      Here, the `colorbar to name` option takes care of using the same `colorbar` for all plots (there is a warning from pdflatex on "multiply defined labels" -- to be expected, I suppose, and no problem as long as the range of the `colorbar` is specified). The `colorbar` is then "placed" by the `\ref{commonbar}` command. How can I align the `colorbar` properly with the figures? I have tried placing the `\ref` command in several places (the placement above gives the best result I've seen so far). You may say I'm looking for the equivalent of `yticklabels at=edge left` for colorbars.


title: Beamer: change size of figure caption

text: I am creating a `beamer` presentation and I would like to change the size of the caption under the figures. I am using the `Madrid` theme. I tried the obvious way:               \caption{\scriptsize{Text of the caption.}}      and               \setbeamerfont{caption}{size=\scriptsize}      in the preamble of the document. However none of that seems to have any effect.


title: How can I hide image (tree for example) in progressbar theme of beamer

text: How can I hide the image (tree for example) in progressbar theme of `beamer`? I would like to change the color of title of section too. Is it possible? MWE               \documentclass[compress, 14pt]{beamer}          \usetheme{progressbar}     \progressbaroptions{headline=normal}          \begin{document}          \section{First}     \begin{frame}{Title}     Content     \end{frame}          \section{Second}*\color{yellow} here for example     \begin{frame}{\color{yellow}Teste 1}     Content     \end{frame}     \end{document}


title: Ignore keyword in Listings

text: Consider the following minimal example:               \documentclass{standalone}     \usepackage{listings}     \begin{document}     \begin{lstlisting}[keywordstyle = \textbf, language = SQL, deletekeywords = {time}]     create table Event (id integer primary key, time date);     \end{lstlisting}     \end{document}      This prints ‘time’ in boldface, using the `listings` package revision 15878 (1.4), TeX Live 2012. How can I make Listings ignore the ‘time’ keyword?


title: Beautiful presentations done with TeX and related systems

text: I recently had to persuade a fellow student that you can create beautiful presentations with LaTeX and beamer. Luckily, I already had some examples. But I'm sure that there are better presentations, not necesarily done with beamer but with TeX and related systems. I remembered that I saw some beautiful examples in other questions. So I would like to get a persuasive list of presentations so that I can simply send people who are in doubt about the power of TeX to these answers. **Which beautiful presentations done with TeX and related systems do you know?** Please add   * at least one screenshot (I guess one of the title page and an example page with width 300px would be good),   * a link to the complete source code (if possible)   * and a link to the rendered PDF (when you like, I could add it to my examples on GitHub)


title: Letterspacing/font expansion in LuaLaTeX

text: I am a few months into learning LaTeX. I would like to use `microtype` with LuaLaTeX and I would like to obtain letter spacing for my smallcaps. I've tried to follow some of the threads on the subject but when I try to implement the suggestions I just end up with errors. The minimal example below works as far as protrusion/expansion, but the letterspacing is just ignored. Please excuse my frankenCode... I cobbled it together from a bunch of different threads on this forum... any advice would be much appreciated. I _need_ the font expansion due to very narrow columns and I need to use LuaLaTeX due to some packages I'm working with.               \documentclass[article]{memoir}          \usepackage{fontspec}     \defaultfontfeatures{Ligatures=TeX}     \newfontfeature{Microtype}{protrusion=default;expansion=default}          \directlua{fonts.expansions.setups.default.stretch=5.5}     \setmainfont[Microtype,Numbers=OldStyle]{Arno Pro}          \usepackage{microtype}          \newfontfamily{\regBlackSmallCaps}%     [Letters={SmallCaps},     LetterSpace=3.0, Scale=.95]     {ArnoPro-regular}          \begin{document}          {\regBlackSmallCaps This is a test}          \end{document}      EDIT: Thank you Mico for responding. After going though the answers to similar posts I've managed to get a little further. Using `Renderer=Basic` and making sure I have updated versions of `fontspec` and `microtype`, the code below works. The first line spaces correctly, the second line doesn't. I'm wondering if there is a way to Incorporate the `\textls{\addfontfeatures{Renderer=Basic}` into the newfontfamily specifications.               \documentclass{article}     \usepackage{fontspec,microtype}          \setmainfont[     ]{Arno Pro}          \newfontfamily{\smBlackSC} %Small | Black | Smallcap     [Letters={UppercaseSmallCaps, SmallCaps},     LetterSpace=9 .0,      Scale=.9,     Numbers={OldStyle,Proportional}]     {ArnoPro-regular}          \begin{document}          {\smBlackSC{\textls{\addfontfeatures{Renderer=Basic}Lorem Ipsum}}}          {\smBlackSC Lorem Ipsum}          \end{document}


title: Highlight a table row with a rectangular overlay

text: I am trying to highlight the row of a table by drawing a rectangle over that row. A wrinkle is that the code for the table is pre-written from external statistical software and then included in the main document using the `\input` command. For this reason, I'd like to avoid placing code within the table, if at all possible. I have included a simple example:               \documentclass{article}          \begin{document}          \begin{center}     \input{table.tex}     \end{center}          \end{document}      And the code for `table.tex` is:               \begin{tabular}{l*{3}{c}}     & A & B & C \\     \hline     1 & blah & blah & blah \\     2 & blah & blah & blah \\     3 & blah & blah & blah \\     \hline     \end{tabular}      I'd like to add a red rectangle (perhaps rounded) around the second row, possibly using tikz or some other solution. If it matters, the table will ultimately be in a `beamer` slide, but I figured that including that code was not necessary.


title: Convince employer to use TeX over MS Word

text: I would not be surprised if this was closed because it isn't considered constructive. So lets all dispense with the fanboi comments. I have read a few of the posts on this site. I am in a struggle with my employer. We have to compile three training manuals for the users of a major 3rd party application. This application is produced by a major software vendor. Our in-house manuals are produced by our group, and are geared toward the way our organization use the app. I have shown my boss what the manuals can look like if written using LaTeX (MikTeX). He is un-impressed, and is able to deflate my arguments for LaTeX with the following comment. > These manuals need to be written collaboratively; by all four of us. I don’t > have time to learn to us another word processor, and neither does the rest > of the group. Word is what we have, and will use. The IT crowd here will not > install this on our machines. These need to be written using the default > software installed on these machines. I don’t care how nice they can look, > how easy they are [for you] to update. I don’t care how simplistic it is to > update the style and transpose that among all of our documents. Does anyone have a convincing rebuttal to this kind of thinking? It sounds like the “my hands are tied, “argument.


title: natbib: use the harvard referencing system

text: I've been scouting various websites, including stackexchange looking for an easy solution to make natbib work within my tex file so to use the harvard referencing system. I've only managed to get one reference working, the rest have made a bit of a mess of my document. I am looking to have the format (Author last name, year) and my bib file (bibfile.bib) is as shown below (given a few examples at least):                @comment{ Aardvark, T. (2012) China Bans It's Airlines From Taking Part In EU             Emissions Trading Scheme. [online] Available at:             http://toryaardvark.com/2012/02/06/china-bans-its-airlines-from-taking-part-in-eu-emissions-trading-scheme/             [Accessed: 10 Mar 2013].  }     @book{aardvark2013china,      author = "Aardvark, T.",      title = "China Bans It's Airlines From Taking Part In {EU} Emissions Trading Scheme",      publisher = "[online] {Available} at: http://toryaardvark.com/2012/02/06/china-        bans-its-airlines-from-taking-part-in-eu-emissions-trading-scheme/         [{Accessed}: 10",      month = mar,      year = 2013"     ]}      @comment{ Aef.org.uk (1990) Aviation Environment Federation » Short haul                 flights should be “progressively replaced” by rail, says                 transport minister. [online] Available at:                 http://www.aef.org.uk/?p=803 [Accessed: 10 Mar 2013].  }     @article{aef2013org,      author = "Aef",      title = "org",      journal = "uk",      volume = "10",      month = mar,      year = 2013,       url = "http://www.aef.org.uk/?p=803"     }      My document itself has :               \usepackage[numbers]{natbib}     \bibliographystyle{plainnat}     \begin{document}     AEF have been doing so and so \citep{aef2013org} etc.     \bibliography{bibfile}      Please help! The constant searching through endless websites is driving me crazy and I have a two reports due in this week!


title: How can I create airfoil images for fluid mechanics presentations in Tikz?

text: I need some help on how to create good looking vectorized images of these kinds of themes: ![example1](http://upload.wikimedia.org/wikipedia/en/archive/b/bf/20130530105837!Nature_of_laminar_separation_bubble_on_a_turbine_blade.gif) ![example2](http://authors.library.caltech.edu/25019/1/figs/fig305.gif) I work a lot with Latex when it comes to typesetting so I have some basic experience with Tikz. However I feel that if I need to make complicated images like the ones above I find myself a bit lost. I would very much appreciate if someone could point me in the right direction as to how i could go about making these kinds of images.


title: Nested enumerate (enumitem) interferes with suppressing vertical space after theorem heads.

text: In the post How to suppress vertical space between theorem heads and enumitem environments? David Carlisle suggested a piece of code that helps suppressing vertical space between theorem heads and an enumerate environments. The code worked well, but I recently realized there is now additional vertical space inserted between enumerate environments when they are nested. How can this be avoided (without losing the feature of having vertical space suppressed after theorem heads)?               \documentclass{article}          \usepackage[T1]{fontenc}     \usepackage[american]{babel}     \usepackage{enumitem}     \usepackage{amsthm}          \newtheoremstyle{mythmstyle}%     {0.5em}% space above     {0.5em}% space below     {}% body font     {}% indent amount     {\sffamily\bfseries}% head font     {}% punctuation after head     {\newline}% space after head     {\thmname{#1}\ \thmnumber{#2}\ \thmnote{(#3)}}% head spec     \theoremstyle{mythmstyle}     \newtheorem{theorem}{Theorem}          % list settings     \setlist{% general list settings (enumitem's itemize, enumerate, and description)       align=left,% left-aligned enumerate       labelsep=*,% align all item bodies vertically       leftmargin=*,% no left indent       topsep=1mm,% space before enumerate       itemsep=0mm% space between enumerate items     }     \setlist[enumerate,1]{label=\alph*)}% enumerate label on level 1     \setlist[enumerate,2]{label=\roman*)}% enumerate label on level 2          % vertical spacing after theorem heads (suggested by David Carlisle)     \makeatletter     \def\enumfix{%     \if@inlabel      \noindent\par\nobreak\vskip-\parskip\vskip-\baselineskip\hrule\@height\z@     \fi}     \let\oldenumerate\enumerate     \def\enumerate{\enumfix\oldenumerate}     \makeatother          \begin{document}     \begin{theorem}% perfectly fine with David's solution: no vertical space       \begin{enumerate}       \item Foo       \item Bar       \end{enumerate}     \end{theorem}     \bigskip          \begin{enumerate}     \item Foobar     \item \begin{enumerate}% vertically not correctly aligned; comment out David's code above to see how it should look like       \item Foo       \item Bar       \end{enumerate}     \end{enumerate}     \end{document}


title: FancyHdr top rule that is not full width

text: By default, `fancyhdr` includes a headrule separator line that spans the text width at the top of the page. **Is there a (simpler) way to get the headrule (or footrule, for that matter) to span only, say, 50% of the text width?** For instance, consider this MWE that does (roughly) what I've asked using a tabular to add a line manually with a little space around the title itself:               \documentclass[12pt]{article}          \newcommand\mytitle{Title of Document}          \usepackage{fancyhdr}     \fancyhf{}     \fancyhead[c]{\begin{tabular}{c}\hspace{1in}\textsc{\mytitle}\hspace*{1in}\\\hline\end{tabular}}     \renewcommand{\headrulewidth}{0pt}     \pagestyle{fancy}          \usepackage{blindtext}     \begin{document}     \blinddocument     \end{document}      Is there a more straightforward way to accomplish this? The ideal solution would **not be dependent on the length of the title** , and would have an adjustable width in terms of percentage of the `\textwidth` dimension. ## Epilogue I ended up using               \makeatletter     \def\headrule{\nointerlineskip\if@fancyplain\let\headrulewidth\plainheadrulewidth\fi%         {\hfil\rule{0.5\headwidth}{\headrulewidth}} \vskip-\headrulewidth}     \makeatother      in order to stay as close to the original definition made by `fancyhdr` as possible.


title: Error during installation of TeXLive 2012 in Fedora

text: I am facing problems while trying to install TeXLive 2012 on fedora. I did the following-   1. Unzipped the package.   2. Navigated to the location of `install-tl`.   3. Typed in `./install-tl` I got the following message               Can't locate Digest/MD5.pm in @INC (@INC contains: ./tlpkg /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at tlpkg/TeXLive/TLUtils.pm line 199.     BEGIN failed--compilation aborted at tlpkg/TeXLive/TLUtils.pm line 199.     Compilation failed in require at ./install-tl line 53.     BEGIN failed--compilation aborted at ./install-tl line 53.      What am I doing wrong? How do to I fix this?


title: Abbreviations in math mode

text: I am trying to adapt Martin Scharrer's solution from Macros for common abbreviations to be able to use them in math mode. Yes I realize I am about to incur some criticism that I should just use `\text{}`, but I'd prefer the macros to do the thinking for me.   1. I have three different versions of the `\ie` macro below and not sure which one is the correct one to use. The third one (`\ieC`, which is what I have been using) seems to yields slightly different spacing. ![enter image description here](http://i.stack.imgur.com/FvO1F.png)   2. I am not able to figure out how to adapt the `\etc` macro for math mode to properly handle the case where there is a subsequent period as in `\etc.`. Furthermore, it appears as if the addition of `\ifmmode` screws up the `\etc` macro such that it no longer works properly even in text mode if there is a trailing period. ![enter image description here](http://i.stack.imgur.com/Um3hv.png) If there was a version of the `\xspace` macro that worked in math mode that would be great. ## References:   * Macros for common abbreviations   * Canonical way to typeset spacing in abbreviations ## Code:               \documentclass{article}          \usepackage{amsmath}     \usepackage{xspace}          \newcommand*{\ieA}{%     \ifmmode%         \text{i.e.}\ %     \else%         i.e.\@\xspace%     \fi%     }%          \newcommand*{\ieB}{%     \ifmmode%         \text{i.e.~}%     \else%         i.e.\@\xspace%     \fi%     }%          \newcommand*{\ieC}{%     \ifmmode%         \text{i.e. }%     \else%         i.e.\@\xspace%     \fi%     }%               \makeatletter     \newcommand*{\etc}{%         \ifmmode%             \@ifnextchar{.}{\text{etc}}{\text{etc.}}%         \else%             \@ifnextchar{.}%                 {etc}%                 {etc.\@\xspace}%         \fi%     }%     \makeatother          \begin{document}\noindent         $\ieA x < 2$ \quad \verb|\text{i.e.}\ |\par\noindent         $\ieB x < 2$ \quad \verb|\text{i.e.~}|\par \noindent         $\ieC x < 2$ \quad \verb|\text{i.e. }|\par\noindent              \medskip\noindent         $a \ne 0, b \ne 0, \etc$\par\noindent         $a \ne 0, b \ne 0, \etc.$\par\noindent              \medskip\noindent         $a \ne 0, b \ne 0, \text{\etc}$ \quad \verb|\text{\etc}|\par\noindent         $a \ne 0, b \ne 0, \text{\etc.}$\quad \verb|\text{\etc.}|\par\noindent              \bigskip         \noindent         Outside of math mode \verb|\etc| no longer works at the end of sentence              \noindent         You should eat more fruit, \ieA apples, bananas, \etc. Next sentence.              \noindent         You should eat more fruit, \ieA, apples, bananas, \etc but also tomatoes.     \end{document}      * * * The above MWE was for testing purposes, so I agree that the abbreviations there are not necessary to be within the math environment in those cases. But for my actual use case is in display mode where it is clearer to put that text as part of the formula as opposed to on the next line. For example: ![enter image description here](http://i.stack.imgur.com/NyWj5.png)


title: Access the title when defining page headers?

text: I'm trying to wrap up some stuff into a document class that I have always coded manually into the document files so far. During this, I ran into a problem. Given the following MWE               \documentclass{scrartcl}     \usepackage[headsepline,footsepline]{scrpage2}     \usepackage{lipsum}     \title{Of Foo And Bar}     \author{Me And Myself}      \pagestyle{scrheadings}     \clearscrheadfoot     \ihead{Of Foo And Bar\\\headmark}     \automark{section}     \begin{document}     \maketitle     \tableofcontents       \clearpage     \section{Foo}     \lipsum[1]     \subsection{Bar}     \lipsum[2-3]     \subsection{Baz}      \lipsum[4-6]     \section{Boo}     \lipsum[1]     \subsection{Bar}      \lipsum[2-3]     \subsection{Baz}      \lipsum[4-6]     \end{document}      I need to remove the redundant title in the call to `\ihead` and replace it with something that inserts the title I specified earlier using `\title{...}`. How do I access the title that was set with `\title`?


title: too many curly brace using verbdef

text: I would like to create an inline verbatim text for a regular expression. The verbdef package does not like when I put curly braces into its second argument. I tried with escaping backslashes but that did not work.               \documentclass{article}          \usepackage{verbdef}     \verbdef{\re2}{([^/]*/){3}}          \begin{document}          What is the meaning of the \re2 regular expression?          \end{document}      I got the following error message: > (/usr/share/texmf/tex/latex/ltxmisc/verbdef.sty) > > ! Too many }'s. > > l.4 \verbdef{\re2}{([^/]*/){3}} I looked for a long name of curly brace like `\curlybraceleft` but did not find one. How can I solve this typesetting problem?


title: Preview-latex background color

text: I'm using AUCTeX + preview-latex to preview math formulas. In addition, I'm using the zenburn color scheme, which has a dark background. Unfortunately, the rendered math previews have a white background, which looks very ugly. How is it possible to change the default background color in the rendered math formulas?


title: How do I draw curve crossing one edge of a tree (using tikz-qtree)?

text: I am using `tikz-qtree`, and I'd like to draw a curve separating a set of nodes from the rest of the tree. For example,               \documentclass{article}     \usepackage{tikz}     \usepackage{tikz-qtree}          \begin{document}     \begin{tikzpicture}[every node/.style={circle,draw,                     top color=white,bottom color=yellow!80,                     very thin},                     level distance=1.5cm,                     sibling distance=0.6cm]       \Tree[.{$+$}                [.{$*$}                    [.{$\cos$}                        [.{$a$} ] ]                    [.{$2$} ] ]                    [.{$y$} ] ]     \end{tikzpicture}     \end{document}      produces this (sorry, I don't know yet how exactly to upload pictures to tex.stackexchange, so this ended up a bit small): ![enter image description here](http://i.stack.imgur.com/rI74G.png) Now, I'd like to draw a (dotted) curve that crosses one edge (for example, the edge from `*` to `cos`) -- splitting the set of nodes in two (`cos` and `a` and all the others). I know I can use the `fit` library to draw an ellipsis around the nodes, but I'd like an open line instead (more like a circumference arc, or a bezier curve). What's the easiest way to do this?


title: Curvy arrow with TikZ

text: Can you show me how to draw this with TikZ? ![enter image description here](http://i.stack.imgur.com/W8Vvb.png)


title: APA Style: publisher as author

text: On page 203 of the APA style guide (6th ed), it reads: > When the author and publisher are the same, use the word _Author_ as the > name of the publisher. An example of this is shown in the Basics Of APA Style Tutorial at apastyle.org and below. I'm now using `biber` 0.9.6 (`biblatex` 1.7) (thanks for the tip) and I don't get this behavior by default, and I looked in **biblatex.pdf** and also **biblatex-apa.pdf** (v4.2), and I don't see this mentioned specifically in either one (although I did find section 2.3.3 Corporate Authors and Editors in **biblatex.pdf** ) Does `biblatex-apa` have this automated somehow, or do I need to write the word "Author" in the publisher field to get this type of source line in the reference list (or other work-around)? ![Author as Publisher](http://i.stack.imgur.com/5WW18.png)


title: kvoptions and conditional environment

text: I'm trying to create a package with a single option, which provides an environment, which behaves differently if called by latex or pdflatex XeLaTeX. I tried to use kvoptions, but I'm a little lost. Suppose that the package name is "myexample" with the only option [pdf] and an environment called "example". The idea is as follows:   1. If I load the package without options, and run XeLaTeX Latex or the environment "example" works in one way, and you can not use this if you run pdflatex or lualatex.   2. If I load the package with [pdf] and run pdflatex or lualatex or XeLaTeX, the environment "example" works differently, and you can not use this if you run LaTeX I read some forum and I think the solution is to use "kvoptions" and "ifpdf, ifluatex, ifxetex". The code I have is as follows:                   \RequirePackage{filecontents}         \begin{filecontents}{myexample.sty}         \NeedsTeXFormat{LaTeX2e}         \def\filedate{2013/11/22}         \def\fileversion{v0.1}         \ProvidesPackage{myexample}[\filedate\space\fileversion\space]         \RequirePackage{ifpdf,ifluatex,ifxetex}         \RequirePackage{kvoptions}         \usepackage{tcolorbox}         \tcbuselibrary{listings,breakable,skins}         \SetupKeyvalOptions{           family=@pste,           prefix=@pste@         }         % This option for latex|xelatex.(default)         \DeclareBoolOption[true]{latex}         % This option for pdflatex|lualatex|xelatex.         \DeclareBoolOption{pdf}              \ProcessKeyvalOptions*         % Its no option examples is newtcblisting for latex|xelatex         \if@pste@latex%      \tcbset{below/.style={colback=white,text and listing},myexample/.style={colframe=gray}}%     \newtcblisting{example}[1]{myexample,#1}         % if [pdf] option if true, example is newcolorbox for pdflatex|lualatex|xelatex         \if@pste@pdf%         \ifpdf         \tcbset{below/.style={colback=red,sidebyside},myexample/.style={colframe=blue}}%         \newtcolorbox{example}[1]{myexample,#1}         \else          \fi         \fi         \end{filecontents}         \documentclass{article}         \usepackage[pdf]{myexample}         \begin{document}         \begin{example}{below}         Text         \end{example}         \end{document}      Is it possible to do this? I appreciate the comments and help. Pablo **EDIT 1:** Update the code using the idea proposed by @Marco Daniel, but I'm still lost, insert the code, but does not do what I want. Let me explain: The "example" environment has two definitions   1. no options(default) \tcbset{below/.style={colback=white,text and listing},myexample/.style={colframe=gray}}% \newtcblisting{example}[1]{myexample,#1} should be defined only for LaTeX and XeLaTeX, and give an error message if used (pdf|lua)LaTeX.   2. option [pdf] \tcbset{below/.style={colback=red,sidebyside},myexample/.style={colframe=blue}}% \newtcolorbox{example}[1]{myexample,#1} should be defined only (Xe|pdf|lua) LaTeX and give an error message if used LaTeX whit this option. **EDIT 2:** This works (based on @Marco Daniel solution), leave it as it is useful to a user:               \RequirePackage{filecontents}     \begin{filecontents}{myexample.sty}     \NeedsTeXFormat{LaTeX2e}     \def\filedate{2013/11/24}     \def\fileversion{v0.2}     \ProvidesPackage{myexample}[\filedate\space\fileversion\space]     \RequirePackage{ifpdf,ifluatex,ifxetex}     \RequirePackage{kvoptions}     \RequirePackage{etoolbox}     \RequirePackage{tcolorbox}     \tcbuselibrary{listings,breakable,skins}     \SetupKeyvalOptions{       family=@pste,       prefix=@pste@     }     \DeclareBoolOption{pdf}% default is false          \ProcessKeyvalOptions*          \def\@pste@compile@noexample{}% do what you want     \def\@pste@compile@pdftrue{}% do what you want     \def\@pste@compile@pdffalse{}% do what you want          % if package load [pdf] option, example enviroment is a newtcolorbox for (xe/lua/pdf)latex     % and not defined for standar latex     \if@pste@pdf%     \ifboolexpr{ bool {pdf}  or bool {xetex}  or bool {luatex} }%            {% (xe/lua/pdf)latex is true             \@pste@compile@pdftrue                     \tcbset{below/.style={colback=blue!50!white},myexample/.style={colframe=gray}}                 \newtcolorbox{example}[1]{myexample,#1}            }%            {% If use (pdf/lua) latex whitout [pdf] show error       \@pste@compile@noexample%         \PackageError{mysty}{%            \MessageBreak%            Not use option [pdf] for example enviroment in LaTeXenviroment \MessageBreak%        }         }%     \else%     % if load whitout [pdf] (no option given) example enviroment is a newtcblisting for (xe/la)tex %     % and disable for (xe/lua/pdf)latex     \ifboolexpr{not bool {pdf}}%            {% xelatex or latex is true          \@pste@compile@pdftrue                 \tcbset{below/.style={colback=gray!50!white,text and listing},myexample/.style={colframe=gray}}                 \newtcblisting{example}[1]{myexample,#1}                 }%                 {% If use (pdf/lua) latex whitout [pdf] show error                 % no  example environment                 \@pste@compile@noexample%                 \PackageError{mysty}{%            \MessageBreak%            Need option [pdf] for example enviroment \MessageBreak%        }             }%     \fi     \end{filecontents}     \documentclass{article}     \usepackage[pdf]{myexample}     \begin{document}     \begin{example}{below}     This is \TeX\ upper     \tcblower     This is \TeX\ lower     \end{example}     \end{document}


title: Bussymbol for tikz circuit lib

text: I am looking for a way to draw a symbol to indicate a bus/multiple wires. I have seen (though I am unable to google reference pictures) schematics with a wire that has a diagonal line (45°) across it, next to which is a number. The number indicates the number of actual wires represented by the line. I figured this would be a good job for tikz circuits, however I have not found a defined shape for that (neither in the circuit library nor in the tikz symbols), thus I don't know how to define such a symbol(I don't feel that I have the time to work into the pgf basics of defining a shape that I then can define as a tikz- circuitlib element). Am I missing something that is already there/available or could I get some pointers for a quickstart tod define this one shape? Here a quick doodle of what I imagine(1 wire representing an 8 bit bus): ![A wire indicating a 8-bit bus](http://i.stack.imgur.com/i9CVZ.png) edit: I actually found one reference, however this is of little value: see the second entry for bus under the misc section (i do not care abour the arrows at the endof the path): http://www.rapidtables.com/electric/electrical_symbols.htm


title: Different Results for distance by sqrt and veclen

text: I'm trying a simple task of drawing a tangent to a circle. While I already succeded with the tangent cs option, I also want to use the library `calc` for the exact intersection points. I simply start from the middle of the circle and calculate the respective angle to the intersection point by acos of the adjacent leg and the hypotenuse. The first one is the radius, the second one I want to have calculated by the `calc` library. This is what I tried:               \begin{tikzpicture}     \coordinate (A) at (13,9);     \coordinate (T) at (10,2);     %     \draw (T) circle (2);     \draw let \p1 = ($(A)-(T)$) in (T) --++ ({acos(divide(2,veclen(\x1,\y1)))}:2)--(A);     \draw (T) --++ ({acos(2/sqrt(3^2+7^2))}:2)--(A);     \draw (T) -- (A);     \end{tikzpicture}      However, neither of the two intersection points are correct. Why is that?


title: Aligning subplots in a pgfplots figure

text: I have the following figure (a very, very stripped down version of a figure I created using matlab2tikz) ![enter image description here](http://i.stack.imgur.com/3Iu5x.png) My problem is that the subplots are not aligned correctly due to the fact that the y axis labels for the 2nd and 4th subplots (the ones on the second column) have different widths. The code for this MWE is               \documentclass{standalone}     \usepackage{pgfplots, tikz}     \pgfkeys{/pgf/number format/.cd,fixed,precision=3}     \pgfplotsset{         compat=1.3,          every axis/.append style={scale only axis, axis on top,         height=4.25cm, width=4.5cm, xmin=-1, xmax=240,         }     }          \begin{document}     \begin{tikzpicture}              \begin{axis}[%         name=plot1,         ymin=-0.5, ymax=0]         \end{axis}              \begin{axis}[%         name=plot2,         at=(plot1.right of south east), anchor=left of south west,         ymin=-6.5, ymax=0.2]         \end{axis}              \begin{axis}[%         name=plot4,         at=(plot2.below south west), anchor=above north west,         ymin=-1.2, ymax=0]         \end{axis}              \begin{axis}[%         name=plot3,         at=(plot4.left of south west), anchor=right of south east,         ymin=-1, ymax=0]         \end{axis}          \end{tikzpicture}     \end{document}      I have thought about this and I have found three ways to get the plots to be aligned:   1. I could insert invisible things in the y-axis labelling for the second subplot, making it as wide as the y-axis of the fourth subplot, by adding two lines to the second axis:              \begin{axis}[%     name=plot2,     at=(plot1.right of south east), anchor=left of south west,     ymin=-6.5, ymax=0.2,     ytick={-6,-4,-2,0},     yticklabels={{\color{white} 0.}$-6$,$-4$,$-2$,$0$} ]     \end{axis}        2. Instead of defining the subplots and their positioning in the order 1 -> 2 -> 4 -> 3, I could do it as 1-> 3 -> 4 -> 2. That would entail changing the order in which the axes are defined, but also the lines defining positioning. The full code can be seen here, but the lines of interest in the order in which they appear would be              name=plot1,          name=plot3,     at=(plot1.below south east), anchor=above north east,          name=plot4,     at=(plot3.right of north east), anchor=left of north west,          name=plot2,     at=(plot4.above north west), anchor=below south west,        3. I could force all numbers to have one decimal point (and hence all the y labelling to have the same width) by changing the line (the third in the code)              \pgfkeys{/pgf/number format/.cd,fixed,precision=3}      to                   \pgfkeys{/pgf/number format/.cd,fixed,fixed zerofill,precision=1}      I like the results from solutions 1 and 2, which produce identical figures like this ![Figures from solutions 1 and 2](http://i.stack.imgur.com/mdPIO.png) but the way it is implemented is flawed and might be difficult to apply when there are more than 4 subplots (plus solution 2 might not even work!). I like the way the 3rd solution is implemented: a global setting which makes it all work, but I really don't like the final result (those `.0` are really ugly!): ![Figure from solution 3](http://i.stack.imgur.com/JOsUb.png) **My question is then** : how can I solve this optimally? Is there a global setting I can apply which would force all the subplots to be aligned without having to resort to invisible writings, fake decimal points or changing the order the plots are defined?


title: How to change the nested itemize bullet characters?

text: When creating a nested `itemize` environment in LaTeX as follows:               \begin{itemize}      \item one \dots{}          \begin{itemize}              \item Language Models             \item Vector Space Models          \end{itemize}     \item two \dots{}     \item three \dots{}     \end{itemize}      I have tried to change the inner item characters by adding the following line after line 3               \renewcommand{\labelitemi}{$\star$}      Nothing changes! However, if it is only one "not nested", it works just fine as in the following:               \begin{itemize}      \renewcommand{\labelitemi}{$\star$}     \item one \dots{}     \item two \dots{}     \item three \dots{}     \end{itemize}      Many thanks in advance.


title: How can I have a word index for each chapter as well as a word index for the whole book?

text: In other words, just the way I get a table of contents at the beginning of each chapter with `titletoc`, I would like to have a word index at the end of each chapter. (In addition to the index for the whole book at the end of the book.)


title: Trouble with the showkeys package

text: I am using `showkeys` package in LaTeX so my labels inside `\\[ \\]` math statements show up. Usually `\\[ \\]` does not show any numbering, I both want to use `\\[ \\]`, and numbering, this was the only solution I could find. In any case, with `showkeys`, the label numbers show up in little squares. Is there a way to change that square into parens, or maybe brackets?


title: Floats in multicols require case-by-case manual placing

text: I have struggled with this issue for a while now. Judging by the number of similar questions, I'm not the only one. I find Herbert's solution to this question by far the best available. There is only one problem I have with it -- it requires placing the image in very specific places in the text, otherwise, a lot of empty space gets created between paragraphs to fill the column. Sometimes, the column also doesn't break properly. Since the document I work on constantly changes, I need to go back to previous pages and fiddle with the images (try putting them in different places in the text), so they look right. Any idea how to improve this behavior? I know floats and multicols don't play well together, but maybe someone knows how to improve Herbert's solution.. Thanks for help! Here is a simple example:               \documentclass{memoir}     \usepackage{multicol}     \usepackage{caption}     \usepackage{fullpage}     \usepackage{lipsum}     \usepackage{graphicx}          \newenvironment{Figure}       {\par\medskip\noindent\minipage{\linewidth}}       {\endminipage\par\medskip}          \newcommand{\colfig}[2]{     \begin{Figure}          \centering          \includegraphics[width=\linewidth]{#1}           \captionof{figure}{#2}     \end{Figure}     }          \begin{document}     \begin{multicols}{2}     \lipsum[5-7]     \colfig{figure1}{This is some long caption under an image inside a column}     \lipsum[10-12]     \end{multicols}          \end{document}      ![Problem Example](http://i.stack.imgur.com/zlylV.jpg)


title: Creating an academic portfolio with bibtex

text: Any one know of a good script to turn a bibtex file into a nice academic portfolio that:   * links to electronic versions where known (from url or doi)   * works with local files (e.g. with bibdesk's format or otherwise)   * automatically creates a thumbnail of the first page and generally produces a polished web page suitable for showing off your work?


title: Hexagonal diagrams

text: I would like to draw a hexagonal diagram made up of many small equilateral triangles, and be able to label specific vertices in the diagram. In particular, something like this: ![enter image description here](http://i.stack.imgur.com/ZdkEQ.gif) But ideally rotated so that one of the sides is on top rather than a vertex. Could someone point me in the right direction?


title: How can I streamline insertion of LaTeX-math-mode symbols in AUCTeX?

text: In AUCTeX, you can enable a minor mode called `LaTeX-math-mode` that instructs the prefix character ``` to insert various common macros. For example, `` t` inserts `\tau@` when you are in a math environment (where `@` is where point is left). This is wonderful when you are in a math environment already. However, I often refer to these symbols in the running text, and just doing the same `` t` inserts just `\tau{}@` in text mode. How can I instruct AUCTeX to, when in text mode, _enter_ math mode like so: `` t` yields `$\tau$@`?


title: How to generate LaTeX documents with Perl

text: I have to generate Software Requirement Specification documents in LaTeX. I have to use Perl to accomplish this. The documents consist of tables, lists, pictures, TOC, table of figures, headings and so on ... Can you give me some general advice on how to approach such a task? Are there maybe some Modules you found useful or "traps" I have to be aware off?


title: The affiliation and footnote superscripts overlap in the authblk package

text: I'm using the `authblk` package with the following code:               \documentclass{sig-alternate}          \usepackage[english]{babel}     \usepackage{authblk}          \begin{document}     \title{The Title}          \author[1]{Alice}     \author[2]{Bob\thanks{Corresponding author}} % a footnote indicating Bob is the corresponding author     \affil[1]{University A}     \affil[2]{University B}          \renewcommand\Authfont{\large}     \renewcommand\Affilfont{\small}          \maketitle          \begin{abstract}     \end{abstract}          \end{document}      The output is like this: ![enter image description here](http://i.stack.imgur.com/TuChp.png) Notice that the affiliation superscript `2` and the footnote superscript `*` overlapped, which is unreadable. Can someone suggest what should I do to fix this, more specifically, getting the below expected output? ![enter image description here](http://i.stack.imgur.com/cfbFK.png)


title: What is "\usetikzlibrary"? Shouldn't usepackage tikz just give me everything I need?

text: I'm new to LaTeX and maybe this has been answered somewhere already. But I don't understand why I have to use the command `\usetiklibrary{...}`. Why doesn't `\usepackage{tikz}` give me all the libraries? Are there other packages beside `tikz` that do a similar thing? My guess at why it does this is because `tikz` might be a big library so it doesn't want to load all of it at once? Basically what is the difference between the two?


title: Print $ inside \tt

text: How do I print a `$` inside `\tt`? I tried escaping with a backslash, but didn't work.               \tt{\$}      throws an error. > ! Argument of \OT1\^ has an extra } **Update** Sorry, the issue was not with `$`, but with `^` in the next line. Used `\textasciitilde` and everything worked fine.


title: How to indent the item in the theorem environment of ams-gsm package

text: I use gsm package to write my latex file. Normally, in the theorem environment, the item are indented a small space from the left margin. I want to indent it all to the left margin like the following picture: ![enter image description here](http://i.stack.imgur.com/xT1Ml.png) Here is a minimal working example:               \documentclass{gsm-l}     \usepackage{amsmath}     \newtheorem{theorem}{Theorem}     \begin{document}     \begin{theorem} This is the theorem.     \begin{enumerate}     \item The first item     \item The second item     \item Are they indented as my purpose?     \end{enumerate}     \end{theorem}     \end{document}      Please help me.


title: Recreating a table from MS Word (with a mix of rotated and non-rotated text)

text: I have the following table which is created in MS Word: ![enter image description here](http://i.stack.imgur.com/YP6Ga.jpg) I want to recreate it in LaTeX as it is (keeping the same rotation of column headers) and I must keep the vertical and horizontal lines as it is. Any "cosmetic" changes to make the first column appear "nicer" would be good too. I tried the following, but it doesn't seem very right.                   \usepackage{tabularx}              \begin{document}                        \begin{tabularx}{\textwidth}{| X | c | c | c | c|c|c|c| >{\centering\arraybackslash} c|}           \hline         Description (all named investigators on any proposal or grant/project/fellowship in which a participant is involved, project title, source of support, scheme and round) &  \rot{Same Research Area (Yes/No)}  & \rot{Support Status (Requested/Current/Past)} & \rot{Proposal/Project ID} & \rot{2013 (\$'000)} & \rot{2014 (\$'000)} & \rot{2015 (\$'000)} & \rot{2016 (\$'000)} & \rot{2017 (\$'000)} \\         \hline         \textbf{Investigators:}         In         \textbf{Project Title:}          Identifying Challenges and         Opportunities in Socially Responsible Investments         \textbf{Funding Body:} ARC         \textbf{Fund Scheme Round:}         DP15          & Yes & Requested & DP150102407 &  &   & 186 & 196 & 192          \\         \hline         \end{tabularx}                         \end{document}


title: How to simulate a bold font if I only have a Regular Height TTF file?

text: How can I simulate a bold font if I only have a Regular Height TTF file? I'm trying to use **Ibarra Real** font, but I have only Italic and Regular font files. Using xelatex and a preamble like:               \usepackage{fontspec}     \setmainfont[Extension=.ttf,BoldFont=IBregular,ItalicFont=IBitalic,Numbers=OldStyle]{IBregular}      I can see it, but `\textbf` is the same as normal text. Is it possible to modify font weight in latex?


title: Citing a url with bibtex using \url does not show url

text: I am using BibTeX with `ieeetran.bst` to format my bibliography and I would like to cite a URL. Initially I tried using the following code:               @electronic{Nobelprize.org2009,         Author = {Nobelprize.org},         Booktitle = {Nobel Media AB},         Howpublished = {http://www.nobelprize.org/nobel_prizes/physics/laureates/2009/},         Title = {{The Nobel Prize in Physics 2009}},         Year = {2013}}      Everything works fine except the URL is not broken. After searching for a while I found that I should use `\url` or `\href` for the correct line breaking. However, when I use               @electronic{Nobelprize.org2009,             Author = {Nobelprize.org},             Booktitle = {Nobel Media AB},             Howpublished = {\url{http://www.nobelprize.org/nobel_prizes/physics/laureates/2009/}},             Title = {{The Nobel Prize in Physics 2009}},             Year = {2013}}      the URL doesn't show at all. I am clueless as to why this may be happening. I tried including both the `url` and `hyperref` packages and although the `\url` command works in the main document, it seems it has some kind of problem when I use it in bibliography. Your help would be much appreciated. Edit1: I should mention that I am using an adapted version of `ieeetran.bst` that correctly outputs the `howpublished` parameter. Edit2: I solved the problem. It appears that the `IEEEtran.bst` file that I downloaded directly from IEEE was not the most recent version of this file. The one which comes with MacTeX is from 2008 while the one from IEEE is from 2007. Updating to this recent version solved my problem.


title: Building bibliography out-of-source: couldn't open `blx.bib`

text: My `Makefile`:               MK=lualatex -output-directory=$(TARGET)     TEX_FILE=report     TARGET=./target          $(TEX_FILE):             $(MK) $(TEX_FILE).tex             bibtex $(TARGET)/$(TEX_FILE)             $(MK) $(TEX_FILE).tex             $(MK) $(TEX_FILE).tex      So, on run, the command executed is: `lualatex -output-directory=./target report.tex` In `report.tex`:               \usepackage[...]{biblatex}     \bibliography{report}      Bib(la)tex runs fine, producing `target/report-blx.bib` But on the second run, `lualatex` complains:               I couldn't open database file report-blx.bib     ---line 18 of file ./target/report.aux      : \bibdata{report-blx      :                    ,report}


title: How should I format header of a book according to my specifications?

text: I want to format header of my book manually with chapter name & no. on odd pages and section name & no. on even pages as depicted below ![even page with section name and number ](http://i.stack.imgur.com/AO6Cy.jpg)![odd page with chapter name and number](http://i.stack.imgur.com/4Lq1B.jpg)


title: url at the end of description

text: I would like to add an url at the end of each description.               \documentclass[12pt,BCOR=15mm]{scrbook}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[ngerman]{babel}     \usepackage{hyperref}          \usepackage[xindy,nonumberlist]{glossaries}     \GlsSetXdyCodePage{duden-utf8}     \makeglossaries          \begin{document}          \newglossaryentry{glossaries}     {       name=Glossaries,       description={...},       url={http://test.de}     }               \glsaddall     \printglossary[title={\LaTeX-Pakete},toctitle={\LaTeX-Pakete}]          \end{document}      The output is: > Glossaries ... and I need a new line with the url: > Glossaries ... > > http://...


title: How to page break a code print in a latex document into more pages instead of one

text: After this question How to show similar display of codes of different programming languages in LaTeX which prints a code in a standalone pdf document (for instance 1000 lines of code in only one pdf page), I have problem with using that code alongside my main thesis tex file. I mean, because the document type of the codes document and my document code seems tobe different, the tex stops in the middle of compiling the tex coces. Also, it is not possible to import long codes as a figure to the main tex file (because it is larger than a standard A4 pdf file.) How can I adjust this answer's code to be able to print it in two or three pdf pages instead of a single long pdf page?


title: How to highlight a path in Tikz with two different colours?

text: I have a small graph drawn in Tikz with two paths through it highlighted in different colours. However, these paths are going to share an arrow. What I would like is to highlight this arrow with both colours, one above and one below so that it the reader can distinguish between these two paths. Is there a way to do this within Tikz? Below is my Tikz code for generating the picture:               \begin{tikzpicture}     \tikzset{edge/.style = {->,very thick}}     \tikzset{p1/.style={preaction={%But before that     draw,yellow,-,% Draw yellow without any arrow head     double=yellow,     double distance=.4\pgflinewidth,     }}}     \tikzset{p2/.style={preaction={%But before that     draw,green,-,% Draw green without any arrow head     double=green,     double distance=.4\pgflinewidth,     }}}     \tikz {     %%First graph     \draw[edge,densely dashed](0,0) node[label={[xshift=-.2cm,yshift=-.4cm]$w$}]{} -- (1,0) ;     \draw[edge,red,p1] (1,0) -- (2.45,.5) ;     \draw[edge,densely dashed,p1] (2.5,.5) node[label={[xshift=0cm,yshift=-.2cm]$w'$}]{} .. controls (3.25,1) .. (4.95,0.15);     \draw[edge,blue,p2] (1,0) -- (2.45,-.5);     \draw[edge,blue,densely dashed] (2.5,.5) -- (3.35,.10);     \draw[edge,red,densely dashed] (2.5,-.5) -- (3.35,-.10);     \draw[edge,densely dashed] (3.8,0) node[label={[xshift=-.2cm,yshift=-.4cm]$w'''$}]{}-- (5,0) node[label={[xshift=.2cm,yshift=-.4cm]$W$}]{};     \draw[edge,densely dashed,p2] (2.45,-.5) node[label={[xshift=0cm,yshift=-.8cm]$w''$}]{} .. controls (3.25,-1) .. (4.95,-0.15);     }     \end{tikzpicture}      I have just learned how to do this kind of thing in Tikz so apologies for what I'm sure is very bad coding style. I'm wanting the result to look similar to question "Two coloured arrow" but with the black dashed arrow still being visible (and in Tikz if at all possible). Thank you so much for any help you can give! Edit: Here is a picture of what I'm getting at to make it clearer. Thanks again. ![Double Coloured Arrow](http://i.stack.imgur.com/lFR9I.jpg)


title: Problem when using Tikz in Lyx

text: I am using Lyx 2.1 on a windows 7 machine with MikTex 2.9. When I embed even very simple tikz code in a Lyx document it appears to go off into a loop and eventually generates the error message               The command pdflatex -syntex=1 "file.tex" has not yet completed.      It seems to happen with most tikz code I try, but a specific example is, in the preamble I included               \usepackage{tikz}      In an ERT box within a preview box I have               \begin{tikzpicture}     \draw (0,0)--(1,2)--(2,0)     \draw[help lines] (0,0) grid (2,3)     \end{tikzpicture}      My guess is that it is something to do with SyncTex, but I have configured Lyx and the document not to use it. Any ideas what I am doing wrong (or is this a bug)?


title: Use verbatim inside \texttt

text: Why can't I use `\begin{verbatim}` inside `\texttt`?               \texttt{ \small \begin{verbatim}      iab <key> <expansion>     <key> is the string which should be expanded to <expansion>     \end{verbatim}}      This throws an error. I can do this without any problem,               {\tt \small \begin{verbatim}      iab <key> <expansion>     <key> is the string which should be expanded to <expansion>     \end{verbatim}}      but I read, `\tt` is gone now.


title: Locally change float parameters

text: I have a specific page in which I want to change the float settings, but I do not want to change them globally. Specifically, I would like to increase the `\bottomfraction` of a page. Is this possible?


title: How to include an image and to set items at right of it

text: How to set items at right of an image of a frame?               \documentclass{beamer}          \begin{document}          \begin{frame}          \begin{itemize}         \item A.         \item B.     \end{itemize}          \end{frame}          \end{document}      I'm just trying to include an image at left-center of the page and to include some items at its right. Thanks a lot!


title: How can I easily use the same preamble on all my documents?

text: I use multiple computers (Mac and PC), so creating a path (e.g. `\input{c:/folder/Preamble}`) won't work. I really want to assign a URL (in Dropbox) to the file and input the file via the URL, but I don't know what command to use to achieve that. Suggestions?


title: tikz picture inside main code or include tikz output

text: Suppose that someone wants to include a `tikz picture` inside a `LaTeX` document. Suppose that a simple `tikz` code is the following               \documentclass{standalone}          \usepackage{tikz}          \begin{document}      \begin{tikzpicture}       \draw[step=1cm,gray!50,very thin] (-1.9,-1.9) grid (5.9,5.9);       \draw[very thick,->] (0,0) -- (4.5,0) node[anchor=north west] {\bf{x axis}};       \draw[very thick,->] (0,0) -- (0,4.5) node[anchor=south east] {\bf{y axis}};       \foreach \x in {0,1,2,3,4}         \draw (\x cm,1pt) -- (\x cm,-1pt) node[anchor=north] {$\mathbf{\x}$};       \foreach \y in {0,1,2,3,4}         \draw (1pt,\y cm) -- (-1pt,\y cm) node[anchor=east] {$\mathbf{\y}$};       \draw[thick, ->] (3,2) arc (0:270:1cm);% syntax (starting point coordinates) arc (starting angle:ending angle:radius)      \end{tikzpicture}     \end{document}      with the output ![enter image description here](http://i.stack.imgur.com/wLBRH.png) I was wondering on what's the best in terms of mainly quality and secondly process speed and perhaps memory usage or output file size :   1. To include the `tikz` code inside the document"   2. To produce the picture in a `standalone` code and then import it as a figure using `\includegraphics{tikzpicture.pdf}`