title: problem about drawing a map

text: I want to draw the map below. ![enter image description here](http://i.stack.imgur.com/Rb131.jpg) The input is `N,e,R`, output is `R^d`. In the box, `S` is in `\mathcal{S}`; so is `M`. It seems a little hard for me. Who can help me ? I drew a box with the following code :               \documentclass{article}     \usepackage{amsmath}          \setlength{\fboxrule}{2pt}      \setlength{\fboxsep}{1cm}          \begin{document}          $\xrightarrow{N,e,R}$      \fbox{$\mathcal{M}$ $\updownarrow {mOT}$      $\mathcal{S}$         }     $\xrightarrow{R^{d}}$          \end{document}      it like this above ![enter image description here](http://i.stack.imgur.com/uXrRb.png). A little far from what i want, and also a little ugly.


title: Writing in an invisible table

text: I'd like to list a few phrases in one language, and their meanings in another language. I thought about doing it like that:               Sentence 1 ---------- Translation 1     Longer Sentence ----- Longer Translation      Without the hyphens, of course. The point is that I want to break the page into two parts, and be able to write a line in the first part, then line in the second part, etc., just like an invisible table in Word.


title: export graphics on excel with quality

text: I want to export graphs on excel to latex. How I can do it ? Save graph as image ?


title: Set delimiters with accents

text: I'm trying to set a set delimiter using some mathematical accents For example:               \documentclass{acm_proc_article-sp}     \usepackage{amsmath}     \begin{document}     $\left\{{$\hat{P}$,$\hat{Cl}$}\right\}$           \end{document}      and it fails to compile. I don't know where the error is. I'm using Texmaker on Linux (if that helps)


title: XITS and \not\models

text: When using XITS (with xelatex), the `\not` is displayed way too high on certain commands. For instance:               \documentclass{standalone}     \usepackage{unicode-math}     \setmathfont{XITS Math}          \def\nerode{\equiv}     \begin{document}     \huge$\not\models \not\nerode \not\equiv$     \end{document}      is displayed: ![enter image description here](http://i.stack.imgur.com/ucK3y.png) That is, only the `\not\equiv` which is probably a glyph by itself, is properly printed. Compare the above result with the following (without `unicode-math` and `XITS Math`): ![enter image description here](http://i.stack.imgur.com/s7iqi.png) What is the way to go to fix that? Thanks!


title: How can I add label and reference to each row of a table?

text: I have 2 tables, and they have a common column so I want each row from the first table to point to the corresponding row of the second and the other way around. And also, if it is possible that the label be the value inside the cell. Here is part of the first table:               \begin{table}[h]     \centering     \caption{Test files}     \label{my-label}     \resizebox{\textwidth}{!}{%     \begin{tabular}{|l|l|l|l|}     \hline     File name & Number of depots & Number of vehicles & Number of customers \\ \hline     0.txt        \label{0txt1}   \ref{0txt2}      & 2                & 4                   & 18                  \\ \hline     1.txt        \label{1txt1}   \ref{1txt2}      & 4                & 16                 & 50                  \\ \hline     2.txt        \label{2txt1}   \ref{2txt2}      & 4                & 8                   & 50                       \end{tabular}     }     \end{table}      Here is part of the second table:               \begin{table}[h]     \centering     \resizebox{\textwidth}{!}{%     \begin{tabular}{l|l|l|l|l|l|l|l|l|l|l|l|l|}     \cline{2-13}                                          & \multicolumn{12}{c|}{\textit{\textbf{COST}}}                                                                                \\ \cline{2-13}                                           & \multicolumn{3}{c|}{\textbf{NO OPTION}}                                                                     & \multicolumn{3}{c|}{\textbf{REINITIALIZATION}}                                                              & \multicolumn{3}{l|}{\textbf{PERMUTATION}}                                                                   & \multicolumn{3}{l|}{\textbf{PERTURBANCE}}                                                                   \\ \hline     \multicolumn{1}{|c|}{\textit{File name}} & \multicolumn{1}{c|}{\textit{None}} & \multicolumn{1}{c|}{\textit{2Opt}} & \multicolumn{1}{c|}{\textit{All}} & \multicolumn{1}{c|}{\textit{None}} & \multicolumn{1}{c|}{\textit{2Opt}} & \multicolumn{1}{c|}{\textit{All}} & \multicolumn{1}{c|}{\textit{None}} & \multicolumn{1}{c|}{\textit{2Opt}} & \multicolumn{1}{c|}{\textit{All}} & \multicolumn{1}{c|}{\textit{None}} & \multicolumn{1}{c|}{\textit{2Opt}} & \multicolumn{1}{c|}{\textit{All}} \\ \hline     \multicolumn{1}{|l|}{0.txt        \label{0txt2}   \ref{0txt1}}              &                                    &                                    &                                   &                                    &                                    &                                   &                                    &                                    &                                   &                                    &                                    &                                   \\ \hline     \multicolumn{1}{|l|}{1.txt        \label{1txt2}   \ref{1txt1}}              &                                    &                                    &                                   &                                    &                                    &                                   &                                    &                                    &                                   &                                    &                                    &                                   \\ \hline     \end{tabular}     }     \end{table}      This is how the labels and references look for the first and second table: `\label{0txt1} \ref{0txt2}` `\label{0txt2} \ref{0txt1}`. At the moment I can only go from the second table to the first not the other way around.


title: Gaussian reduction of matrices

text: I have to show a Gaussian reduction in an assignment, and I was wondering what the more space-efficient and neatest way of expressing this is. I thought about using `\begin{smallmatrix}` (it's only a 2x2 matrix) and arrays, but I'm wondering if perhaps there is a better way. Any suggestions?


title: arrow heads on arc curves

text: How can I have arrow head appear properly on the arced curve?               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{arrows,decorations.markings,calc,fadings,decorations.pathreplacing, patterns, decorations.pathmorphing, positioning}     \begin{document}     \begin{tikzpicture}[line cap = round, line join = round, >=triangle 45]     \draw[->] (-3,0) -- (3,0) node[above, scale = .75] {$\rho$};     \draw[->] (0,0) -- (0,4) node[right, scale = .75] {$z$};     \draw (-3,4) parabola bend (0,0) (3,4);     \filldraw[top color = yellow!70, bottom color = green!80] (1.5,1) circle (.15cm);     \draw[fill = white] (-.15,3) arc (135:340:.2cm and .1cm);     \draw[->] (-.15,3) arc (135:340:.2cm and .1cm);     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/ZelXV.png)


title: Using ntheorem with beamer?

text: I am trying to prepare a mathematical presentation using LaTeX's `beamer` class. Since I already have an `article` on the subject, I want to copy various parts of it into the presentation, in particular various `ntheorem`-environments. But even in the MWE below, this seems not possible. Is there some incompatibility between `ntheorem` and the `beamer` class?               \documentclass{beamer}          \usepackage{ntheorem}          \theoremstyle{plain}          \newtheorem{Def}{Definition}          \mode<presentation>{\usetheme{Frankfurt}}          \begin{document}     \begin{frame}{Test}         \begin{Def}             blabla         \end{Def}     \end{frame}               \end{document}


title: Can't part siblings in a tikz tree picture

text: I'm having some trouble parting siblings in a tree drawn by tikz. I'm making a parsing tree for an assignment. I have already made the tree, but there is some overlapping. I tried to use the                   level 4/.style={sibling distance=2.3cm}      style, and it have worked great for parts of the tree, but when I use it on the fifth level, (where the problem is) other parts of the tree, also on level 5, gets messed up!. I then tried to use the command                   child{[sibling distance = 3cm]node{$ElementBody$}      method, for that specific node, but there is no difference in the tree, when compiling the code, and i have no idea why! Here is my code:               \[        \begin{tikzpicture}     [level distance=12mm,     sibling distance = 12mm,     level 3/.style={sibling distance=8cm},     level 2/.style={sibling distance=3cm},     level 4/.style={sibling distance=2.3cm}      ]     \node {$XMLFile$}       child {node {$TaggedElement$}         child{node {$StartTag$}       }       child{node {$ElementBody$}             child{node{$ElementBody$}               child{node{$Element$}                 child{node{$TaggedElement$}                     child{node{$StartTag$}                     }                     child{node{$Element$}                     }                     child{node{$EndTag$}                     }                 }               }                           }             child{[sibling distance = 3cm]node{$ElementBody1!$}                 child{node{$ElementBody$}                     child{node{$Element$}                         child{node{$TaggedElement$}                             child{node{$StartTag$}                             }                             child{node{$Element$}                             }                             child{node{$EndTag$}                             }                         }                     }                               }                 child{node{$ElementBody$}                     child{node{$Element$}                         child{node{$TaggedElement$}                             child{node{$StartTag$}                             }                             child{node{$Element$}                             }                             child{node{$EndTag$}                             }                         }                     }                               }               }           }           child{node {$EndTag$}           }     };     \end{tikzpicture}     \]       Any help is greatly appreciated!


title: Index sorting where numbers are indexed

text: I have a vast document where I have a separate index of dates (really only the year or year range of particular events). I'm using `memoir`. Sometimes the year is known exactly               \index[dates]{1875!Event xyz}      Sometimes the year is a range               \index[dates]{1822--1867!Event abc}      These sort in index as > 1822-1897   >  Event xxxx 77,87   >  Event pppp 73 > > 1829-1844   >  Event zzz 79 > > 1756   >  Event xxx2 99 In other words, date ranges sort alphabetically and are separated from the single numeric entries which sort numerically yielding an odd ordering. Is there any way I get numbers to sort alphabetically and not numerically so that I can get ordering > 1   >  1--5   >  2   >  3   >  3--5   >  4 rather than   > 1--5   >  3--5   >  1   >  2   >  3   >  4   > The index entries are via a macro                 \newcommand{\indexdate}[2]{#1\index[dates]{#1!{#2}}}      And so a single change to the macro might achieve what I want without having to manually edit every one of a couple of thousands of entries to impose a sort order. I have hit a roadblock on this one. I don't think a MWE would be of additional use here, but happy to post one.


title: \graphicspath and pax package

text: Pax is used to restore URLs inside PDFs that are embedded with `\includegraphics`. First, for every included PDF you create a .pax file, which sits in the same directory as the figure it is related to. Then, you simply add `\usepackage{pax}` to .tex and compile your project. All works great. However, if the default graphics path has been changed, `pax` no longer sees its auxiliary files and fails to fix metadata in the resulting PDF. Here is an example:               deps/           diagram.pdf           diagram.pax     test.tex      This works:               ...     \usepackage{pax}     ...     \includegraphics{deps/diagram.pdf}      This does not (the links inside included PDFs disappear):               ...     \usepackage{pax}     ...     \graphicspath{./deps/}     \includegraphics{diagram.pdf}      If I put `diagram.pax` into the project’s root directory, the second example starts functioning. This workaround is fine if you don’t mind your root directory to be cluttered, however, it can’t be applied in absolutely all cases. For example, if my latex project consists of chapters, and I want dependencies to go into `deps/a/`, `deps/b/`, etc., I might end up having two pax files with the same name and won’t be able to keep them all in the root directory. I assume this issue should be handled by pax developers, but what if there is still an easy solution someone in my situation could use? Any suggestions?


title: Numering equations within tabular

text: My first post here so please bear with me! I am looking to submit a paper to a SIAM Journal, which requires me to use their template. I have my manuscript complete, but when copied/pasted into the template, I get about 300 errors, pretty much always related to the use of align. In order to get around using align, I have considered the use of table/tabular instead (which is included in the template). In terms of appearance, I have been able to achieve the basic look that I had with align, but I cannot label individual equations (meaning I cant reference them later). Therefore, i'd like to know if its possible to be able to reference an equation with a table/tabular environment? I have tried using minipage in order to include begin/end equation, but I find that the number given sits in the middle of the page and not at the end of the line where it should. Would anyone be able to provide a quick and straightforward solution to this issue, bearing in mind that I cannot use any additional packages than those available in the SIAM Journal template. Here is a quick MWE for you to play with:               \begin{table}     \begin{center}     {\centering{     {\resizebox{0.5\textwidth}{!}{     \def\arraystretch{1.5}     \begin{tabular}{ l l l l l }     $\min\limits_{x}$&  &$ Y(x) $&& \\     subject to:& &$a(x,y)=Y(y)$& $\hspace{0.3in} \forall y\in H^1(\Omega)$,&\\     &&$x \in J.$&&     \end{tabular}      }}}}     \end{center}     \end{table}      Thanks


title: How to refer to a footnote?

text: how to refer to a footnote? example...               blablablabla\footnote{ble blev blev v}\label{footnote_1}      this means that you make reference to the footnote then to put               As mentioned in note \ref{footnote_1}      but if it works ...


title: Emacs + SyncTex + Evince

text: I am trying to setup forward search and inverse search between Emacs 24.3.1 and Auctex under Ubuntu 14.04. Forward search is working fine by enable TeX-source-correlate-mode in Emacs but while performing this search, the focus also moves to PDF. I would like to keep the focus on .tex file during forward search. Is there any hack or command available to achieve this. I would also like to setup inverse-search. I have tried Ctrl + left click but it doesn't work.


title: Preserve table cell width across pages using supertabular

text: I'm using `supertabular` to break a table across two pages, but when the table continues on the second page, it resets the width of the table cells based on the first row that carries over to the second page. I would like the table cell widths to take into account the content of the cells in the full table, and thus remain constant.               \documentclass[12pt]{article}     \usepackage{lipsum,supertabular}     \begin{document}     \lipsum[1-3]     \begin{supertabular}{ll}         123456789 & abcdefghijklmnopqrstuvwxyz\\         123456789 & abcdefghijklmnopqrstuvwxy\\         123456789 & abcdefghijklmnopqrstuvwx\\         123 & abcdefghijklmnopqrstuvwxyz\\         123 & abcdefghijklmnopqrstuvwxy\\         123 & abcdefghijklmnopqrstuvwx\\         123 & abcdefghijklmnopqrstuvw\\         123 & abcdefghijklmnopqrstuv\\         123 & abcdefghijklmnopqrstu\\     \end{supertabular}     \end{document}


title: Is there a TeX for OS X that I can compile from sources myself without major troubles?

text: I ask because I have traditionally used TeTeX, which is perpetually included with Slackware Linux. However, I downloaded the source code for TeTeX, and it appears to be a bit tricky to build on Mac OS X, which I now use 99% of the time. As a rule, for security reasons I don't download prebuilt binaries from just anybody—I need to build it from sources myself.


title: How to position nodes around another node in TiKZ?

text: I'd like to position some nodes in TiKZ around a given node. I could do that manually, by setting each node position, but why not looking for an easier way that looks better? I thought about using a path and stick the nodes to the path but I have no idea about doing this, and I also wonder: is the path the best solution? An example would be the following where the base node is A (there is a node below it, but it's not a problem; also note that if you don't include the arrows in your answer, it's ok, I know that part): ![enter image description here](http://i.stack.imgur.com/nnawD.png) My code so far has reached this stage (if you think some option in the code could be changed to make things easier or better, please let me know):               \documentclass{minimal}     \usepackage{tikz}     \usepackage{verbatim}               \usetikzlibrary{arrows,positioning}      \tikzset{         %Define standard arrow tip         >=stealth',         %Define style for boxes         punkt/.style={                rectangle,                rounded corners,                draw=black, thin,                text width=6.5em,                minimum height=2em,                text centered},         % Define arrow style         pil/.style={                ->,                thin,                shorten <=2pt,                shorten >=2pt,}     }          \begin{document}              \center\begin{tikzpicture}[node distance=5mm,         terminal/.style={         % The shape:         rectangle,minimum size=6mm,rounded corners=3mm,         % The rest         very thick,draw=black!50,         top color=white,bottom color=black!20,         font=\ttfamily}]              \node (nodezero) [terminal] {another node below A};              \node (a) [terminal, above=3em of nodezero] {A};              \node (01) [terminal] {1};         \node (02) [terminal] {2};                 \node (03) [terminal] {3};         \node (04) [terminal] {4};         \node (05) [terminal] {5};         \node (06) [terminal] {6};         \node (07) [terminal] {7};         \node (08) [terminal] {8};         \node (09) [terminal] {9};          \end{tikzpicture}          \end{document}


title: abovedisplayskip vs abovedisplayshortskip

text: What is the difference between these two? http://en.wikibooks.org/wiki/TeX/abovedisplayskip http://en.wikibooks.org/wiki/TeX/abovedisplayshortskip I don't know why, but it seems to work unusually.               \setlength{\abovedisplayskip}{5pt}     \setlength{\belowdisplayskip}{50pt}     \setlength{\abovedisplayshortskip}{2pt}     \setlength{\belowdisplayshortskip}{2pt}           \begin{equation}     u_{i,t} = u_{i,t-1} + v_t     \end{equation}     \begin{equation}     u_{i,t-1} = u_{i,t-2} + v_{t-1}     \end{equation}     \begin{equation}     \Delta u_{it} = u_{i,t} - u_{i,t-1} = u_{i,t-1} + v_t - u_{i,t-1} =     v_t     \end{equation}      So why does it look like this: ![the formulae](http://i.stack.imgur.com/aMRyp.png) I expected the short display skip to be between consecutive formulae and the regular skip to be before and after the first and last in the series, or something like that. In any case, why the heck would it do this?


title: fontspec: Configuring project-local opticals font

text: I absolute adore Adobe's Garamond Premier Pro (the full set of opticals). In normal circumstances, I can just use it with `\setmainfont{Garamond Premier Pro}` when I'm working on my desktop, or laptop. However, for various reasons I need to do my typesetting on the go. Naturally I can't (and won't) install Garamond Premier Pro on every single computer I use, so I need to make use of it as a "local" font, same with the other fonts I use in the document. The problem is, I cannot for the life of me, figure out the how to configure fontspec to actually use all of it. Here is a barebones, minimum example of my file:               \documentclass[letterpaper,10pt]{article}     \usepackage[letterpaper]{geometry}     \usepackage{fontspec}          \defaultfontfeatures{Ligatures=TeX}     \setmainfont[         Path = fonts/Garamond/ ,         Extension = .otf ,         SizeFeatures={             {Size=-8,UprightFont=*-Capt,BoldFont=*-BdCapt,ItalicFont=*-          ItCapt,BoldItalicFont=*-BdItCapt},             {Size=8-14,UprightFont=*,BoldFont=*-Bd,ItalicFont=*-          It,BoldItalicFont=*-BdIt},             {Size=14-21,UprightFont=*-Subh,BoldFont=*-BdSubh,ItalicFont=*-          ItSubh,BoldItalicFont=*-BdItSubh},             {Size=21-,UprightFont=*-Disp,BoldFont=*-BdDisp,ItalicFont=*-          ItDisp,BoldItalicFont=*-BdItDisp}}         ]{GaramondPremrPro}     \setsansfont[Path = fonts/Optima/ ,         Extension = .otf ,         UprightFont = * ,         BoldFont = *-Bold ,         ItalicFont = *-Italic ,         BoldItalicFont = *-BoldItalic         ]{OptimaLTStd}     \setmonofont[Path = fonts/OCR/ ,         Extension = .otf ,         UprightFont = *,         BoldFont = *         ]{OCRAStd}          \begin{document}         Hello, world! \quad \textit{Hello, world!} \quad \textbf{Hello, world!}           \quad \textbf{\textit{Hello,world!}}              \textsf{Hello, world! \quad \textit{Hello, world!} \quad \textbf{Hello,           world!} \quad \textbf{\textit{Hello,world!}}}              \texttt{Hello, world!}     \end{document}      The way I have Optima and OCR A setup works just fine; point in fact I tried setting up Adobe's Caslon using a similar configuration as for the Optima and OCR A fonts, and the file compiles just perfectly. The error I get when I attempt to compile anything is:               (E:\PORT\MiKTeX\tex\latex\fontspec\fontspec.cfg)))          !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!     !     ! LaTeX error: "kernel/key-unknown"     !     ! The key 'fontspec/Size' is unknown and is being ignored.     !     ! See the LaTeX3 documentation for further information.     !     ! For immediate help type H <return>.     !...............................................          l.14 ^^I]{GaramondPremrPro}          ?      I'm not sure of the precise version of fontspec my version of MiKTeX (portable) is running; but I only just installed MiKTeX (portable) on my flash drive a week ago, and it only downloaded fontspec from the package repository a few days back (I want to say three, but I may be incorrect). All in all, what I'm looking for is some help in figuring out that fontspec error message, and actually finding a way to setup Garamond Premier Pro. Though this would apply to any other time one would need to setup a local opticals font. * * * **EDIT** Many thanks to Ulrike Fischer for pointing out an error in my MWE. However the problem still persists, now with a different error:               !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!     !     ! LaTeX error: "kernel/key-unknown"     !     ! The key 'fontspec/UprightFont' is unknown and is being ignored.     !     ! See the LaTeX3 documentation for further information.     !     ! For immediate help type H <return>.     !...............................................          l.14 ^^I]{GaramondPremrPro}          ?


title: How to attach True Type Fonts in TeX Live LaTeX

text: The problem is: where one can read _precise instruction_ on how to effectively install Windows "Truefonts" (`.ttf` files) in TeX Live LaTeX environment installed in Windows XP? But please, do not drive me to (from the other hand valuable) article written by S. Kroonenberg called Font installation the shallow way. I know it.


title: Undefined Macro in Package xstring

text: I have a very basic problem. I am trying to use the `xstring` package in a Latex document and I keep getting the following error message for an undefined control sequence:               (c:/Program Files (x86)/PCTeX/PCTeXv6/texmf-dist/tex/generic/xstring/xstring.sty          (c:/Program Files (x86)/PCTeX/PCTeXv6/texmf-dist/tex/generic/xstring/xstring.tex               ****! Undefined control sequence.**          **\@xs@buildlines ...\expandafter {\number \numexpr                                                        #1+1-1}\edef \@xs@reserved...**          **l.427 \@xs@newmacro\StrRemoveBraces{}{1}{1}                                                {%******          Typesetter process aborted      I downloaded and installed this package from CTAN; it is the 2013-07-29 version.


title: TikZ overwrites gnuplot .gnuplot file

text: I do not know if what I am bringing up is a feature or a bug. I am trying to get a `cos x` trig plot in degrees generated by `gnuplot` and plotted by `TikZ`. My `.gnuplot` file looks like this:               set table "trig.cosinex.table"; set format "%.5f"     set angles degrees; set samples 500; plot [x=0:360] cos(x)      When I compile my `.tex` file with Tikz/lualatex, the `.gnuplot` file becomes               set table "trig.cosinex.table"; set format "%.5f"     set samples 500; plot [x=0:360] cos(x)      The `set angles degrees;` part is deleted. The gnuplot-relevant line in my `.tex` file is:               \draw [domain=0:360, samples=500, smooth] plot[id=cosinex] function {cos(x)}; % anm I missing a prefix here?      Kindly note that: a. I hand generate the `.table` file from the `.gnuplot` file by running it through `gnuplot.` b. TikZ/lualatex does not generate a `.table` file even if it does not exist (contrary to manual?) but only overwrites the `.gnuplot` file. My questions are:   1. How can I get `TikZ` to specify the angles to be degrees in the `.gnuplot` file that it overwrites? [If overwriting cannot be prevented.]   2. How to prevent `TikZ` from overwriting my `.gnuplot` file in the first place? [After hand-compilation with `gnuplot`, the `.table` is left untouched by `TikZ` during multiple compilations as specified but the `.gnuplot` file is altered as above. So, repeat hand-compilation produces a wrong `.table` file and does not give correct results.] Thanks.


title: How to redefine \d within classicthesis?

text: For some unknown reason the following produces an error in classicthesis:               % at the beginning of classicthesis-config.tex     \renewcommand{\d}{\mathbf{d}}          \begin{document}     $\d$     \end{document}      The error says \d is invalid in math mode and $ is missing. It doesn't occur with a simple test case, for sure it's related to the template settings.


title: Multiple references with \autoref

text: I am currently using the `\autoref` command from the `hyperref` package to refer to my theorems etc. However, I want to be able to (easily) refer to two or more theorems/lemmas/..., e.g. by calling something like `\autoref{lemma1,lemma2,lemma5}` \-- where of course lemmas 1, 2 and 5 are labeled `lemma1`, `lemma2` and `lemma5` respectively -- so that the reference shows: "Lemmas 1, 2 and 5". Can anyone help me with this? It doesn't seem to me like the `hyperref` package provides this functionality. Minimal example               \documentclass{memoir}     \usepackage{amsmath,amssymb}     \usepackage{mathtools}     \usepackage{cleveref}     \mathtoolsset{showonlyrefs,showmanualtags}     \begin{document}     This is the first equation     \begin{equation}     a^2 + b^2 = c^2     \end{equation}     and this is the second equation     \begin{equation}     \label{test}     \alpha^2 + \beta^2 = \gamma^2     \end{equation}     Referring to second equation here: \eqref{test}.     \end{document}


title: An environment for writing regular-font pseudocode

text: I want to create a pseudocode environment that looks like this: ![source cl.ly/3O2W203g3j1I3T080x37](http://i.stack.imgur.com/RLdy7.png) Basically, the font doesn't change - it's just the same as that of the surrounding text. It allows mathmode. And there is a box around it that fits the content vertically and horizontally (with some pre-defined margin), and then horizontally centers the entire box on the page. How can I accomplish this?


title: Manual citation of specific references with biblatex-chicago

text: How can I tell `Biber` that I have just manually cited a specific citation? This question is _not_ about `\mancite`. In `biblatex-chicago` there is a command called `\mancite` which allows you to signal to the ibid-tracker that something has been cited without a `\cite{...}` (or similar) command, so that               \cite[30]{smith:ref}.     And see \emph{Reference X}.     See also \cite[31]{smith:ref}.      does not produce > John Smith, _Reference_ (Place: Publisher, Year), 30. And see _Reference X_. > See also ibid., 31. but rather > John Smith, _Reference_ (Place: Publisher, Year), 30. And see _Reference X_. > See also Smith, _Reference 1_ , 31. What I have _not_ been able to figure out is how to signal that a _specific reference_ is being cited (for example, for the first time) but that I am manually formatting this particular citation of it. I would like to do this so that   1. subsequent citations of the same reference are in the short format; and   2. the reference appears in the bibliography even if I do not cite it again. In other words, suppose I define a reference in my `.bib` file which is:               @book{CMAG:alchemy,         Address = {Brussels},         Editor = {Bidez, Joseph},         Shorthand = {\emph{CMAG}},         Title = {Catalogue des manuscrits alchimiques grecs},         Volumes = {8},         Year = {1924--1932}}      What I would like is to be able to write something like:               This is my own way of referring to the CMAG for the first time, p. 10.     \MANUALCITATION{CMAG:alchemy}     [...]     See \cite[11]{CMAG:alchemy}.      and have it result in: > This is my own way of referring to the CMAG for the first time. […] See > _CMAG_ , vol. 2, p. 11. instead of: > This is my own way of referring to the CMAG for the first time. … See Joseph > Bidez, ed., _Catalogue des manuscrits alchimiques grecs_ , 8 vols. > (Brussels, 1924–1932), vol. 2, p. 11 (hereafter cited as CMAG).


title: Things you can't change with custom.bib

text: I am using `custom.bib` to create my own citation stile, and I quite like the result! The only thing I couldn't find, was how I can change some things in the citations in the text. What I miss, is the possibility to reduce the cited name only to the surname > (Mueller, 2012) or change the bracket style to these brackets `[]`. Now it is only like this > (Johannes Mueller, 2012) which I think is too long. If you can give me the solution right away I'd be glad, but I also want to know how to change some things of the `custom.bib` file afterwards by myself and without having to ask every single time. Edit: A test file, the edited .bst file and the used .bib file here: https://drive.google.com/folderview?id=0B07uks0ZD0GGUTROd1o4MW1WNG8&usp=sharing Additionally to say. I'm using LyX and I've activated the natbib package in there and set as option author-year. But I must say it now, that I concentrated a bit more on it, it behaves very strange... LyX doesn't accept any options like `square` for square brackets. They do appear if i use the standard (numerical) option on LyX. If I switch too much between the processor (bibtex8/bibtex/biber/standart) it refuses to do anything and just shows > ??? What the heck? I mean, is this behavior normal with LyX? I don't feel confident enough to switch to LaTeX because I just can't handle so much code :/


title: Rewriting a template from amsthm to thmtools

text: I've been using the Legrand Orange Book template on a project of mine with a friend and coworker. This template uses `amsthm` and `mdframed` to format a bunch of environments and I'm rewriting them to use `thmtools` instead. Here's an example of the sort of things they are doing:               \definecolor{ocre}{RGB}{243,102,25}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %% theorem     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \newtheoremstyle{ocrenumbox}% % Theorem style name     {0pt}% Space above     {0pt}% Space below     {\normalfont}% % Body font     {}% Indent amount     {\small\bf\sffamily\color{ocre}}% % Theorem head font     {\;}% Punctuation after theorem head     {0.25em}% Space after theorem head     {\small\sffamily\color{ocre}\thmname{#1}\nobreakspace\thmnumber{\@ifnotempty{#1}{}\@upn{#2}}% Theorem text (e.g. Theorem 2.1)     \thmnote{\nobreakspace\the\thm@notefont\sffamily\bfseries\color{black}---\nobreakspace#3.}} % Optional theorem note     \renewcommand{\qedsymbol}{$\blacksquare$}% Optional qed square          \newcounter{dummy}      \numberwithin{dummy}{section}     \theoremstyle{ocrenumbox}     \newtheorem{theoremeT}[dummy]{Theorem}          % Theorem box     \newmdenv[skipabove=7pt,     skipbelow=7pt,     backgroundcolor=black!5,     linecolor=ocre,     innerleftmargin=5pt,     innerrightmargin=5pt,     innertopmargin=5pt,     leftmargin=0cm,     rightmargin=0cm,     innerbottommargin=5pt]{tBox}          \newenvironment{theorem}{\begin{tBox}\begin{theoremeT}}{\end{theoremeT}\end{tBox}}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %% example     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%         \newtheoremstyle{blacknumex}% Theorem style name         {5pt}% Space above         {5pt}% Space below         {\normalfont}% Body font         {} % Indent amount         {\small\bf\sffamily}% Theorem head font         {\;}% Punctuation after theorem head         {0.25em}% Space after theorem head         {\small\sffamily{\tiny\ensuremath{\blacksquare}}\nobreakspace\thmname{#1}\nobreakspace\thmnumber{\@ifnotempty{#1}{}\@upn{#2}}% Theorem text (e.g. Theorem 2.1)         \thmnote{\nobreakspace\the\thm@notefont\sffamily\bfseries---\nobreakspace#3.}}% Optional theorem note          \theoremstyle{blacknumex}     \newtheorem{exampleT}{Example}[chapter]          \newenvironment{example}{\begin{exampleT}}{\hfill{\tiny\ensuremath{\blacksquare}}\end{exampleT}}      and here's how I'm trying to rewrite them:               \definecolor{bookcolor}{RGB}{243,102,25}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %% theorem     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \declaretheoremstyle[         headfont=\small\bf\sffamily\color{bookcolor},         notebraces={[}{]},         bodyfont=\normalfont\itshape,         headpunct={\;},         postheadspace=0.25em,         spacebelow=0pt,         spaceabove=0pt,         mdframed={             backgroundcolor=black!5,              skipabove=7pt,             skipbelow=7pt,             innerleftmargin=5pt,             innerrightmargin=5pt,             innertopmargin=5pt,             leftmargin=0cm,             rightmargin=0cm,             innerbottommargin=5pt             linecolor=bookcolor}        ]{Tstyle}          \declaretheorem[         style=Tstyle,         name=Theorem,         numberwithin=section     ]{theorem}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %% example     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \declaretheoremstyle[         headfont=\small\bf\sffamily,         notebraces={[}{]},                                                                                bodyfont=\normalfont,         headpunct={\;},         postheadspace=0.25em,         spacebelow=5pt,         spaceabove=5pt,         postfoothook=\hfill{\tiny\ensuremath{\blacksquare}}     ]{Estyle}          \declaretheorem[         style=Estyle,         name=Example,         numberwithin=chapter     ]{example}      My question is: How do I implement the formatting in the last box of the `\newtheoremstyle` command? E.g.               {\small\sffamily\color{ocre}\thmname{#1}\nobreakspace\thmnumber{\@ifnotempty{#1}{}\@upn{#2}}% Theorem text (e.g. Theorem 2.1)     \thmnote{\nobreakspace\the\thm@notefont\sffamily\bfseries\color{black}---\nobreakspace#3.}}      From what I can tell this appears to be the `headformat` key but It looks like it is strongly objecting to passing the #1 and #2 here If i just copy the `newtheoremstyle` line http://mirrors.ibiblio.org/CTAN/macros/latex/exptl/thmtools/thmtools.pdf I would prefer solutions using thmtools because I am interested in using other features such as `restatable` for the theorems.


title: Making the dots in a TOC go all the way up to a number (using titletoc)

text: I’m using the `titletoc` package to create a TOC. How can I make sure that my dotted lines always touch the number? More precisely, I want the dotted lines to look as in the following image: ![enter image description here](http://i.stack.imgur.com/kRMlz.png)


title: How can I had Annex and Appendix?

text: I'm trying to use both appendices and annexes in a document. I understand that annexes are not native to latex so I searched the web and found this solution:               %% Annex     \newcommand{\annexname}{Annex}     \makeatletter     \newcommand\annex{\par       \setcounter{chapter}{0}%       \setcounter{section}{0}%       \gdef\@chapapp{\annexname}%       \gdef\thechapter{\@Roman\c@chapter}}     \makeatother      But when I do:               \appendix     \include{appendix1}          \annex     \include{annex1}      All my annexes end up inside the appendices entry on the TOC. Hope you can help me.


title: how to annotate the following trapezoid picture?

text: I have this trapezoid in Tikz, and I would like to put some text inside the trapezoid, next to the angles, and also place next to each vertex, outside of the trapezoid, one of the letters A,B,C,D. I have a feeling I need to annotate (0,0) etc. for all of this, but not sure how and how to set the placement. Any ideas?                \begin{tikzpicture}      \newdimen\R      \R=1cm       \newdimen\S        \S=1.5cm         \draw[xshift=10.5\R] (0,0) -- (2.8\S,0)          -- node[rotate=-52]{} (2\S,1.1\S) -- (.8\S,1.1\S)         -- node[rotate=52]{} (0,0);         \draw[xshift=10.5\R] (1.4\S,-.5) node {}         ++ (0,-.5) node {};      \end{tikzpicture}


title: Comma in bibliography item of weblinks

text: I need to cite few website links in my report. I am getting the reference listed in bibliography like following.               , , “Title of the webpage”, http://www.somesite.com, accessed: 2013-07-22.      How do I remove the two commas at the beginning ? (The two fields before the two commas are `Author` and `Year` in my bibliography style. Unfortunately, the `Author` and `Year` information are not available for the website links) The `bibtex` entry is               @misc{weblinkkey,       title = {Title of the webpage},       howpublished = {\url{http://www.somesite.com}},       note = {Accessed: 2013-07-22}     }      Note: A solution without changing the `.bst` file will be of great help. I am using a custom made bibliography style, created using custom-bib/makebst.


title: Not repeating myself so much in TikZ diagrams

text: I am writing a document which defines a network protocol. I illustrate key message exchanges with diagrams like this: ![Two vertical lines labeled C and S with a bunch of horizontal arrows going back and forth between them.  Each horizontal arrow is labeled with a mathematical expression.](http://i.stack.imgur.com/rCEoJ.png) The TikZ source for this diagram is:               \documentclass{article}     \usepackage{tikz}     \usepackage{amsmath}     \usetikzlibrary{arrows}     \begin{document}     \begin{tikzpicture}     \node (C0) at (0.2,7.7) {$C$} ;     \node [coordinate] (Cn) at (0.2,0)   {} ;     \node (S0) at (4.8,7.7) {$S$} ;     \node [coordinate] (Sn) at (4.8,0)   {} ;          \begin{scope}[shape=coordinate]     \draw (C0) -- (Cn)       node[pos=.10] (C1) {}       node[pos=.19] (C2) {}       node[pos=.32] (C3) {}       node[pos=.45] (C4) {}       node[pos=.58] (C5) {}       node[pos=.67] (C6) {}       node[pos=.80] (C7) {}     ;          \draw (S0) -- (Sn)       node[pos=.10] (S1) {}       node[pos=.19] (S2) {}       node[pos=.32] (S3) {}       node[pos=.45] (S4) {}       node[pos=.58] (S5) {}       node[pos=.67] (S6) {}       node[pos=.80] (S7) {}     ;     \end{scope}     \begin{scope}[above,->,>=angle 60] \footnotesize     \draw (C1) -- node {$C^\prime_\alpha[\alpha,99,l_r,,\cdots]$} (S1) ;     \draw (C2) -- node {$C^\prime_\alpha[\alpha,100,l_s,\text{\textsc{fin}},\cdots]$}                   (S2) ;     \draw (S3) -- node{$S^\prime_\alpha[\alpha,60,l_t,,\cdots]$} (C3) ;     \draw (C4) -- node{$C^\prime_\alpha[\alpha,101,0,,]$}        (S4) ;     \draw (S5) -- node{$S^\prime_\alpha[\alpha,61,l_u,,\cdots]$} (C5) ;     \draw (S6) -- node{$S^\prime_\alpha[\alpha,62,l_v,,\cdots]$} (C6) ;     \draw (C7) -- node{$C^\prime_\alpha[\alpha,102,0,,]$}        (S7) ;     \end{scope}     \end{tikzpicture}     \end{document}      This feels a bit repetitive already, but worse than that, there are six of these diagrams and the source is almost the same for each, except for the labels on the arrows, how many there are, and which way they're going. (Two of the diagrams have arrows that are not just horizontal lines -- they turn and cross another arrow -- but it is okay if I have to do something special for those.) Please suggest ways to reduce the repetitiveness both within the diagram and between successive diagrams. I could also very much use a way to position the arrow endpoints that was an _absolute_ distance along the relevant line, rather than a _relative_ distance; having coded all the diagrams like this, it turns out that they're all too tall, but I can't chop off the extra space at the bottom without changing all the `[pos=X]` annotations as well.


title: vim-latex templates last change dynamic

text: So I am using `vim-latex` suite and want the **Last Change** information to change dynamically with every edit/ save. It's found in the preamble if you're using one of the templates e.g               %        File: raid.tex     %     Created: Tue Apr 01 09:00 AM 2014 E     % Last Change: Tue Apr 01 09:00 AM 2014 E     %      It currently does not change at all. Thanks! **Edit: Update** Adding sample template file               <+  +>      !comp!  !exe!     %        File: !comp!expand("%:p:t")!comp!     %     Created: !comp!strftime("%a %b %d %I:00 %p %Y ").substitute(strftime('%Z'), '\<\(\w\)\(\w*\)\>\(\W\|$\)', '\1', 'g')!comp!     % Last Change: !comp!strftime("%a %b %d %I:00 %p %Y ").substitute(strftime('%Z'), '\<\(\w\)\(\w*\)\>\(\W\|$\)', '\1', 'g')!comp!     %     \documentclass[a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}          \author{Author Name}<++>     \title{<++>}     \begin{document}     \maketitle     <++>     \end{document}      A sample file generated with the template:               %        File: samplefile.tex     %     Created: Tue Apr 01 03:00 PM 2014 E     % Last Change: Tue Apr 01 03:00 PM 2014 E     %     \documentclass[a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}          \author{Author Name}     \title{<++>}     \begin{document}     \maketitle     <++>     \end{document}      Thanks!


title: What is the increment step of \fnpnodes?

text: Case 0 uses `\fnpnodes` and case 1 uses `\curvepnodes` to create nodes based on the given function(s).               \def\method#1{%         \ifcase#1             \fnpnodes[plotpoints=8]{1}{8}{\f[x]}{P}             \psxTick(/dx \pst@number\pst@dimb\space def dx 4 mul 1 add){x_j}         \or              \curvepnodes[plotpoints=8]{1}{8}{t|\f[t]}{P}                 \psxTick(dt 4 mul 1 add){x_j}         \fi}      I have known that `dt` is the increment step of `\curvepnodes`. Now I am looking for the increment step of `\fnpnodes`. I tried using `/dx \pst@number\pst@dimb\space def dx` but it does not seem to work.               \documentclass[pstricks,border=12pt]{standalone}     \usepackage{pst-plot,pst-node}     \psset     {         algebraic,         ticks=none,         labels=none,         plotpoints=100,     }          \def\f[#1]{sin(3*#1)/2+#1/3+1}          \makeatletter     \def\method#1{%         \ifcase#1             \fnpnodes[plotpoints=8]{1}{8}{\f[x]}{P}             \psxTick(/dx \pst@number\pst@dimb\space def dx 4 mul 1 add){x_j}         \or              \curvepnodes[plotpoints=8]{1}{8}{t|\f[t]}{P}                 \psxTick(dt 4 mul 1 add){x_j}         \fi}     \makeatother          \begin{document}              \begin{psgraph}(0,0)(-.5,-.5)(9.5,5){12cm}{!}         \method{1} % \method{0} does not work!         \multido{\iL=0+1,\iR=1+1}{\Pnodecount}{\pspolygon[fillstyle=solid,fillcolor=cyan!15](P\iL|0,0)(P\iL)(P\iR)(P\iR|0,0)}         \psplot[linecolor=cyan!75!blue]{0}{9}{\f[x]}         %\psxTick(N-P4.x){x_j} recommended     \end{psgraph}          \end{document}      ![enter image description here](http://i.stack.imgur.com/CLXNk.png) What is the increment step of `\fnpnodes`?


title: Redefining the \part environment to add a page border

text: 1. How can I redefine the \part environment, in a book documentclass, to add a page border at the page margins?   2. By the way, it must be possible (since everything is possible in LaTeX) to get a shaded page border with thicker left and lower lines. The first question is more important to me.


title: Tikz for drawing grid-like graph: strange behaviour

text: I would like to draw a grid-like graph (see the figure below). The following code gives the result shown in the figure. I don't understand why the edges are not vertical. In addition, the commented code is for drawing the horizontal edges. However, it causes errors. Could anyone please explain? Thanks in advance for your help.               \tikzstyle{vertex}=[circle,draw,minimum size=1cm]     \tikzstyle{every node}=[vertex]     \begin{tikzpicture}      \foreach \x in {1,3,5,7}      {               \foreach \y in {1,3,5,7}              {                     \node (\x \y) at (\x,\y) {\x, \y};                     \ifnum\y>1                              \pgfmathparse{\y-2}                                                           \draw  (\x \y)  -- (\x \pgfmathresult);                      \fi      %                 \ifnum\x>1     %                        \pgfmathparse{\x-2}                                  %                        \draw  (\x \y)  -- (\pgfmathresult \y);     %                 \fi               }      }        \end{tikzpicture}      ![enter image description here](http://i.stack.imgur.com/FNwO3.png)


title: Articleno in biblatex?

text: Does biblatex have an `articleno` field or equivalent? In addition, can I use article number in page ranges? The problematic article in questions has the following:               pages = {19:1--19:39},     articleno = {19},      and can be found here: http://dl.acm.org/citation.cfm?id=2431218


title: KOMA - Set documentclass font to 9.5pt

text: I am using scrbook as documentclass and would like to setup the default font of the whole document to 9.5pt. Just like you do with 9pt, 10pt, ... :               \documentclass[fontsize=9.5pt, DIV=calc]{scrbook}           \usepackage[ngerman]{babel}      \usepackage{blindtext}      \usepackage{lmodern}     \usepackage[T1]{fontenc}     \usepackage[paperwidth=170mm, paperheight=240mm, top=25mm, bottom=25mm, left=25mm, right=20mm, headsep=10mm, footskip=10mm]{geometry}     \usepackage[onehalfspacing]{setspace}          \begin{document}           \tableofcontents      \Blinddocument           \end{document}      This code leads to this warnings:   * Using fallback calculation to setup font sizes for basic size '9.5pt' on input line 1655    * Font shape 'OT1/cmr/m/n' in size <9.5> not available    * Size substitutions with differences up to 0.5pt have occurred I did a little bit of research and found out that you can change the fontsize in KOMA with this command:               \fontsize{Xpt}{Ypt}\selectfont      Where Xpt is the font size and Ypt is the baseline skip (which is nearly 120% of fontsize). So I changed the code to this:               \documentclass[DIV=calc]{scrbook}           \usepackage[ngerman]{babel}      \usepackage{blindtext}      \usepackage{lmodern}     \usepackage[T1]{fontenc}     \usepackage[paperwidth=170mm, paperheight=240mm, top=25mm, bottom=25mm, left=25mm, right=20mm, headsep=10mm, footskip=10mm]{geometry}      \usepackage[onehalfspacing]{setspace}          \begin{document}      \fontsize{9.5pt}{11.4pt}\selectfont     \tableofcontents      \Blinddocument           \end{document}      No errors and no warnings, but now the main-text is only setup to 9.5pt the captions, header, footer and so on, are setup to 10pt... Also it seems that there is a problem with setting the **baseline skip** and **onehalfspacing**. If I add to the code fontsize=9pt to the documentclass, the captions, header, footer and so in, are setup to 9pt and the spacing changed again, and it does not look right... Is there no way to set the hole fontsize to 9.5pt so Latex can manage the scale of the footer, header, captions and the spacing like it does when you set fontsize to 9pt?


title: correct alignment of \tldatelabelcventry to the text

text: \documentclass{moderncv}     \moderncvstyle{casual}     \usepackage[firstyear=1999,lastyear=2012]{moderntimeline}          \makeatletter     \pgfmathsetmacro\tl@textstartabove{\tl@width-2pt}     \makeatother          \tltextstart[north]{\scriptsize}     \tltextend[south]{\scriptsize}          \firstname{John}     \familyname{Doe}          \begin{document}          \makecvtitle          \tlcventry[cyan!60!black]{2007}{2010}{test}{test}{test}{}{test}     \tllabelcventry[cyan!60!black]{2007}{2010}{Test}{test}{test}{test}{}{test}     \tldatelabelcventry{2008}{Okt. 2008}{Test}{}{}{}{}{}          \tldatecventry[brown]{2011}{test}{}{test}{test}{}{test}          \end{document}      The alignment of the `\tldatelabelcventry` seems not working correctly. It is: ![enter image description here](http://i.stack.imgur.com/EmZ2Y.png) And it should be: ![enter image description here](http://i.stack.imgur.com/snM71.png)


title: Numbering all equations

text: How can I number the equations of a document all at once? I've tried to find an option in LyX but I didn't find any.


title: Problem with pgfplots/pgfkeys: "I do not know the key '/tikz/use units'"

text: **Problem in short:** I'm using pgfplots but I can't use units in the labels. I tried this minimal example (from http://pgfplots.sourceforge.net/gallery.html) and get an error message:               \documentclass{article}     \usepackage{pgfplots}     \pgfplotsset{compat=1.10}           \begin{document}          \begin{tikzpicture}       \begin{axis}[use units,         x unit=m,x unit prefix=k,         y unit=N,y unit prefix=m,         xlabel=Distance,ylabel=Force]         \addplot coordinates {             (1,2.3)             (2,2.7)             (3,2.1)             (4,1.8)             (5,1.5)             (6,1.1)         };       \end{axis}     \end{tikzpicture}          \end{document}      Here's the error:               Package pgfplots notification 'compat/show suggested version=true': document has been generated with the most recent feature set (\pgfplotsset{compat=1.10}).          ! Package pgfkeys Error: I do not know the key '/tikz/use units' and I am going to ignore it. Perhaps you misspelled it.     See the pgfkeys package documentation for explanation.      Type  H <return>  for immediate help.      ...                                                        l.20   \end{axis}      **Background:** I use Ubuntu 14.04 which comes with pgfplots 1.9. Since I got above error I upgraded to 1.10 and the first line in the of above output shows it actually uses 1.10. kpsewhich also confirms that:               $ kpsewhich pgfplots     /home/simon/texmf/tex/plain/pgfplots/pgfplots.tex      I realize I could simply write the units into the labels by hand, but there is another issue. I'd like to scale the x axis units since I'm importing data from a file. But pgfkeys fails to recognize the respective command as well. To demonstrate, another minimal example from the sourceforge pgfplots gallery:               \documentclass{article}     \usepackage{pgfplots}     \pgfplotsset{compat=1.10}           \begin{document}          \begin{tikzpicture}       \begin{axis}[change x base,         x SI prefix=kilo,x unit=m,         y SI prefix=milli,y unit=N,         xlabel=Distance,ylabel=Force]         \addplot coordinates {             (1000,1)             (2000,1.1)             (3000,1.2)             (4000,1.3)         };       \end{axis}     \end{tikzpicture}          \end{document}      Gives me:               Package pgfplots notification 'compat/show suggested version=true': document has been generated with the most recent feature set (\pgfplotsset{compat=1.10}).          ! Package pgfkeys Error: I do not know the key '/tikz/change x base' and I am going to ignore it. Perhaps you misspelled it.      Thanks for any help!


title: Align comments in algorithm with package algorithm2e

text: I am using the package algorithm2e. When using comments like this               \documentclass[11pt,a4paper,twoside,openright]{book}     \usepackage[algochapter,linesnumbered,ruled,lined,boxed]{algorithm2e}     \begin{document}     \begin{algorithm}         \tcp{not aligned comment}         \If(\tcp*[h]{comment next to if}){constraint}{               c  \tcp*[l]{bla}              $d = \min \{c,e\}$ \tcp*[l]{minimum}         }                \end{algorithm}     \end{document}      the result is               // not aligned comment     if constraint then // comment next to if         c; // bla        d = min{c,e}; // minimum     end      I would like to have the comments aligned, that is               // not aligned comment     if constraint then       // comment next to if        c;                    // bla        d = min{c,e};         // minimum     end      I only found an answer for the package algorithmicx: Algpseudocode (algorithmicx) package comments.


title: Are command tips in Texstudio editable

text: Texstudio has the nice feature that when I hover the cursor over a command the correct syntax of the command and some helpful hints are shown in a window. I was wondering if the content of these windows is editable and if so where this contents reside and how I can add content for my own commands.


title: How to debug METAPOST inlined in ConTeXt? (Or "message" primitive and "loggingall;" in inlined METAPOST)

text: I have a METAPOST program that works fine with mpost, but fails when I try to run it inline in ConTeXt. In order to debug it, I would like to see the usual METAPOST logging and/or to use the METAPOST "message" primitive. However, whenever I add "loggingall;" or a message statement to my ConTeXt file, I encounter errors like this               metapost        > initializing instance 'metafun' using format 'metafun'     metapost        > loading 'metafun': D:/texlive/2012/texmf-dist/metapost/context/base/metafun.mpiv     ! terminal:      What is the appropriate way to debug problems with inline METAPOST code in ConTeXt? My example file is:               \loggingall          \starttext     \framed{Hello world.}     This is a simple_test.          \startMPpage     loggingall;     fill fullcircle scaled 1in withcolor blue;     label.top(btex This is a test. etex, origin);     \stopMPpage          \stoptext      I am using TeXLive 2012 on Windows. I apologize for any vagueness in this question. I’m not really sure how the various pieces fit together.


title: Tables and Figures towards the end

text: I'm submitting a manuscript and the editing team asked for the following two changes: 2) Please remove the figures from the main text file as they are already uploaded separately in the Figures section. Figure legends, however, must be included in the main manuscript text file at the end of the document (after references), rather than being a part of the figure file. For each figure, the following information should be provided: Figure number (in sequence, using Arabic numerals - i.e. Figure 1, 2, 3 etc); short title of figure (maximum 15 words); detailed legend, up to 300 words. Please note that it is the responsibility of the author(s) to obtain permission from the copyright holder to reproduce figures or tables that have previously been published elsewhere. 3) Tables: please place your tables after the figure legends and references. Is there an easy command that I can set both of these up? Thanks!


title: Merging plots in TikZ

text: Is there a way to get the second plot at position "HERE" of the first plot? MWE:               \documentclass[12pt]{article}     \usepackage{tikz}          \begin{document}          %% First plot     \begin{tikzpicture}[scale=1.5, domain=0:2*pi]         \draw[very thin,color=gray] (0, 2*pi);          \draw[->] (0,0) -- (2*pi,0) node[right] {$x$};         \draw[->] (0,-1.2) -- (0,1.2) node[above] {$y$};         \draw[color=blue]   plot (\x,{sin(\x r)});         \node[below left, red] at (0, -1.2) {HERE};     \end{tikzpicture}          % Second plot     \begin{tikzpicture}[scale=1.5, domain=0:2*pi, rotate=-90]         \draw[very thin,color=gray] (0, 2*pi);         \draw[->] (0,0) -- (2*pi,0) node[right] {$x$};          \draw[->] (0,-1.2) -- (0,1.2) node[above] {$y$};         \draw[color=blue]   plot (\x,{cos(\x r)});     \end{tikzpicture}          \end{document}


title: Can (pdf)LaTeX recognize text strings and replace (expand) them?

text: I'd like LaTeX to replace `e^` with `\mathrm{e}^`. I know I could just make a macro `\e` that does this, but I know I'll forget using it.. Can LaTeX find and replace and replace letter combinations (I don't mean a _find and replace_ function of the editor, I mean a true TeX, macro-like expansion).


title: Abbreviations and spacing

text: I'm sure this is a pretty standard questions that's been asked (and answered!) a hundered times before, so apologies for boring people. In LaTeX, I'd like to write a macro for abbreviations, such as, "e.g." or "i.e." but I'd like LaTeX to get the spacing after the trailing dot right: sometimes I enclose the "e.g." in commas and sometimes I don't, depending on the document I'm writing:               A lot of fruits contain vitamin C, e.g., lemons and oranges.          To practice a sport like e.g. rugby, a good level of fitness is adviced.      (Please let's not discuss whether this use of commas is correct or not.) How can I write a macro `\eg` that gets the spacing right automatically for both cases?


title: Combining citations at some instance

text: I use Jabref to manage my citations. Each entry has it own bibkey. There are some instance where I would like to cite 2 or more articles but I want them consolidated in one reference since there all talk about the same thing. For instance in my text; `"... previous work involving MEAM[10]...."` and in the references [10] should look like this: > `[10] M. I. Baskes, Phys. Rev. Lett. 59, 2666 (1987); M. I. Baskes, J. S. > Nelson, and A. F. Wright, Phys. Rev. B 40, 6085 (1989); M. I. Baskes, Phys. > Rev. B 46, 2727 (1992); M. I. Baskes, Mater. Chem. Phys. 50, 152 (1997).` I do not want this: `"... previous work involving MEAM[10-13]..."` where in the reference each article is cited as : > `[10] M. I. Baskes, Phys. Rev. Lett. 59, 2666 (1987).` > > `[11] M. I. Baskes, J. S. Nelson, and A. F. Wright, Phys. Rev. B 40, 6085 > (1989).` > > `[12] M. I. Baskes, Phys. Rev. B 46, 2727 (1992).` > > `[13] M. I. Baskes, Mater. Chem. Phys. 50, 152 (1997).`


title: Create new paragraph style in LyX

text: ## Background In OpenOffice and Microsoft Word it takes seconds to create a new paragraph style. Here is how I currently use LyX with the KOMA Script document class to mark text as a quotation:   1. Type some text.   2. Click the layouts drop-down.   3. Click **Quotation**. At this point, the text typed in step 1 is rendered as a quotation. The look of the quotation (for example, adding a border or changing its colour) can be altered by adding code to the preamble. All good here. ## Problem The Customization guide for LyX talks about adding a new document class, new styles, new layouts, etc. But the documentation does not say how to create a new text layout (like quotation) and have it show up in the menu. I could create the new layout in the preamble, then insert LaTeX code before and after the text that I want to stylize. But that seems to run counter to how to wield LyX. ## Question   1. What is the formal name for the layouts in the drop-down? (Style, layout, template, paragraph style, etc.? It is difficult to search for something when the name seems to have several synonyms.)   2. Without copying and pasting KOMA Script's **.class** file, what are the exact steps needed to add a new layout, such as a "warning" box, and make it available from the LyX drop-down? For example:   1. Create a new file called **warning.inc**.   2. Copy the contents from pastebin.com/etc.   3. Copy **warning.inc** into `$HOME/.lyx/layouts`.   4. Update the document preamble as follows:              \expandafter\def\expandafter\warning\expandafter{\warning\colorbox{}}        5. Click **Tools » Reconfigure**.   6. Restart LyX.   7. Type some text.   8. Click **Warning** from the drop down.   9. Render the PDF to see the text in a box with a red border. A _simple_ , working example of steps, such as the above, to create a new "paragraph style" would be fantastic. Nearly all the documentation I have read shows how to set up a Document Class and define your own Templates (or Styles). Unless I have misunderstood something, I already have a Document Class: KOMA Script v2. I don't want to copy it (because if a new version is released, I have to merge if I upgrade): I want to extend it. Thank you!


title: Table and Figure in one table

text: I want to put table and figure side by side in one table...I used this code lines but not working ....could you help me out....               \begin{table}[t]\fbox{     \begin{minipage}[b]{.50\textwidth }%     \footnotesize     \begin{tabular}{|l|l|}         \hline         $\bf Parameters$ & $\bf Values$ \\ \hline         $L_d/L_R/L_u$(mm) & 20/14/10  \\ \hline         $\theta_d/\theta_R/\theta_u(^0)$ & 2.4/0/3.2\\ \hline         Smoothing $L_{s,d}/L_{s,u}$(mm) & 3.2/3.2 \\ \hline         $R_R/R_i/R_b$(mm) & 33/10/11.4\\ \hline         $\theta_i(^0)$ & -1\\ \hline         \end{tabular}%     \caption{results in this table}\label{validation}%     \end{minipage}}%     \fbox{\begin{minipage}[b]{.45\textwidth}%     \hspace*{0pt}\includegraphics[width=0.45\textwidth]{12a}%     \captionof{figure}{This is a figure not a table}%     \end{minipage}}     \end{table}


title: Figure and Table next to each other (memoir class)

text: To save space, I would like to place the following table next to each other. Each has a separate caption. I have this, ![enter image description here](http://i.stack.imgur.com/VRjzS.png) I want this, ![enter image description here](http://i.stack.imgur.com/n5Ram.png) Sample code,               \documentclass[]{memoir}     \usepackage[utf8x]{inputenc}     \usepackage{graphicx}     \usepackage{amssymb}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{algorithmic}     \usepackage{algorithmicthesis}          \begin{document}          \begin{figure}     \centering     \includegraphics[scale=0.2]{figure.png}     \caption{This is the caption for figure}     \end{figure}     \begin{table}     \centering     \caption{This is the caption for table}     \begin{tabular}{cc}     1 & Item 1 \\     3 & Item 2 \\     4 & Item 3 \\     5 & Item 4 \\     5 & Item 5 \\     \end{tabular}     \end{table}          \end{document}      The solution mentioned here doesn’t allow two captions.


title: single column footnote in multicols environment?

text: I use the multicols environment (multicol package). I have two columns. If I simply use `\footnote{the footnote text, which is quite long}` the footnote behaves as if there was just one big column (as in a "normal document"). It seems that there is no regular way to obtain a footnote which only spans one of my two columns. But I guess there is a workaround like there is e.g. [1] for placing floating objects inside the multicol environment. I would be grateful for any hint. [1] http://www-h.eng.cam.ac.uk/help/tpl/textprocessing/multicol_hint.html


title: Cannot determine size of graphic in * (no BoundingBox)

text: I use `convert filename.gif filename.eps` to produce EPS from images before include them into TeX document, and get error:               ! LaTeX Error: Cannot determine size of graphic in filename.eps (no BoundingBox).      Environment: OpenSUSE 11.3 and oficial versions of texlive-latex and ImageMagick.


title: Statistical and systematics uncertainties with siunitx

text: I am writing a paper and need to include statistical and systematic errors with units. Using siunitx I would like to be able to do the following (for example)               \SI{1 \pm 0.3 (sys) \pm 0.1 (stat)}{\meter}      But when I do I get the following errors               siunitx error: "misplaced-sign-token"          Misplaced sign token '\pm'      For having multiple `\pm` (without text) and I get               siunitx error: "invalid-token-in-uncertainty"          Invalid uncertainty in numerical input '1 \pm 0.3 (sys)'.      If I get rid of the stat error. I guess a minimal example would be               \documentclass{article}     \usepackage{siunitx}     \sisetup{separate-uncertainty=true}     \begin{document}       \SI{1 \pm 0.3 (sys) \pm 0.1 (stat)}{\meter}     \end{document}      Thanks in advance for the help


title: Editing math.py for pygment

text: I'm using the minted package to syntax my code. When I'm doing so in I'm using the Matlab language. When to continue on the next line, we do so in Matlab by entering `...` before the next row. However, the output in the pdf marks the actual row with a red square. Now I'm inside the Matlab lexer math.py file and looking for way to add `...` to be accepted and not to be treated as an error in my code. How should I put it? Currently inside minted:               \begin{minted}[frame=lines, framesep=3mm, linenos=true, mathescape]{matlab}     function X = c(a, b,...         c)     \end{minted}      The dots above yields the red square.


title: How to plot planar source-sink network

text: I was wondering in LaTex, how to plot planar sourc-sink network, such as the following ones I am trying to reproduce: ![enter image description here](http://i.stack.imgur.com/tGFTK.png) ![enter image description here](http://i.stack.imgur.com/JWgQy.png) Thanks and regards!


title: using a macro to define the body of a tabular / & separator problem

text: I'd like to create a macro that can create and fill a multiline tabular with 4 entries per line from something like `\bidding{3H,4S,5C,X,XX,-}` where the number of entries is of course dynamic. I have tried different ways but I cannot overcome the problem to get latex to interpret the `&` separator correctly. I always end up with either the & being not interpreted at all or with the               Misplaced alignment tab character &.      error message. Trying to derive this from another solution found here that does the recursive part, the latest failure (ending up with the error message) looks like this:               \documentclass{article}     \usepackage{kvsetkeys}     \usepackage{etexcmds}     \makeatletter     \newcommand*{\commut}[2]{{#1}&{#2}}     \newcommand*{\qcommut}[1]{%       \let\commut@list\relax       \comma@parse{#1}\@qcommut       \typeout{\meaning\commut@list}% for debugging       \expandafter\commut@list     }     \def\@qcommut#1{%       \ifx\commut@list\relax         \def\commut@list{#1}%       \else         \edef\commut@list{%           \noexpand\commut{%         \etex@unexpanded\expandafter{\commut@list}%           }{#1}%         }%       \fi     }     \makeatother          \begin{document}     \begin{tabular}{ccccc}     \qcommut{A,B,C,D,E}     \end{tabular}     \end{document}      This will not provide me with the groups of 4 a line, but I am just eager to get the `&`-problem solved, the rest should be easy... Any help appreciated.


title: Macros in TeXStudio

text: I noticed in this post, when the user hits `((` what actually generates in the editor is `\left( \right)`, where the cursor is positioned between the first parenthesis and before `\right`. How does one do this with TeXStudio?


title: Where are the LaTeX binaries stored in linux? (latexDraw configuration)

text: I just made a nice diagram in latexDraw but the problem I am having is that I cannot seem to add mathematical symbols. I am guessing it is because of the configuration so I looked to see if I could fix it (see image). I am running xubuntu linux if that helps. ![latexdraw preferences in linux](http://i.stack.imgur.com/iTb1E.png) In the preferences is asks me for the location of the binaries and I don't know where they are. Is it the .sty files they mean or something else? will this even fix it? Update: I followed the advice below and typed in               >which latex      It returned                >/usr/bin/latex      So I stuck that in but I am still having problems. Also when I clicked on the folder it went to `usr/bin` but the only folder it could see inside was `X11` Example of problem and code produced.                   % Generated with LaTeXDraw 2.0.8     % Sun Jan 27 00:59:07 GMT 2013     % \usepackage[usenames,dvipsnames]{pstricks}     % \usepackage{epsfig}     % \usepackage{pst-grad} % For gradients     % \usepackage{pst-plot} % For axes     % User packages:     %\usepackage{graphicx}     %\usepackage[utf8]{inputenc}     %\usepackage{amsmath}     %\usepackage{pgfplots}     %\usepackage{amsmath,amsfonts,amsthm}     \begin{figure}[p]     \scalebox{1} % Change this value to rescale the drawing.     {     \begin{pspicture}(0,-2.9492188)(18.655624,2.9392188)     \psframe[linewidth=0.04,dimen=outer](4.42,1.5292188)(3.52,0.24921875)     \psline[linewidth=0.04cm](7.5,0.8492187)(4.38,0.8492187)     \psline[linewidth=0.04cm](3.56,-1.3107812)(3.56,-2.470781)     \psline[linewidth=0.04cm](3.76,-1.7107812)(3.76,-2.190781)     \pscircle[linewidth=0.04,dimen=outer](7.52,-1.0707812){0.74}     \pscircle[linewidth=0.04,dimen=outer](0.74,1.1892188){0.74}     \psline[linewidth=0.04cm](7.5,0.82921875)(7.5,-0.35078126)     \psline[linewidth=0.04cm](3.76,-1.9507812)(7.54,-1.9507812)     \psline[linewidth=0.04cm](2.04,0.88921875)(2.04,-1.9307814)     \psline[linewidth=0.04cm](3.74,0.24921875)(3.74,-0.55078125)     \psline[linewidth=0.04cm](3.96,1.5292188)(3.94,1.8092188)     \psline[linewidth=0.04cm](7.52,-1.8107812)(7.52,-1.9707812)     \psline[linewidth=0.04cm](3.52,0.88921875)(2.02,0.88921875)     \psline[linewidth=0.04cm](3.56,-1.9307814)(2.04,-1.9307814)     \psline[linewidth=0.04cm](0.75785375,0.42925632)(0.74214625,-0.5908188)     \psline[linewidth=0.04cm](0.74,1.9092188)(0.74,2.6492188)     \psline[linewidth=0.04cm](3.9400015,2.6294518)(0.72,2.6692188)     \psline[linewidth=0.04cm](1.9,-0.53078127)(0.72,-0.55078125)     \usefont{T1}{ptm}{m}{n}     \rput(3.9606247,0.86921877){\small Ge }     \usefont{T1}{ppl}{m}{n}     \rput(0.720625,1.1542188){\Large V}     \usefont{T1}{ppl}{m}{n}     \rput(7.5406246,-1.0657812){\Large A}     \usefont{T1}{ptm}{m}{n}     \rput(5.2698436,-2.5907812){\small DC Voltage Supply}     \psframe[linewidth=0.04,dimen=outer](2.2,-0.8907812)(1.9,-1.6307813)     \psline[linewidth=0.04cm,arrowsize=0.05291667cm 2.0,arrowlength=1.4,arrowinset=0.4]{->}(1.52,-0.81078124)(2.62,-1.7907811)     \psline[linewidth=0.04cm](3.32,-2.0507812)(3.32,-2.2907813)     \psline[linewidth=0.04cm](3.46,-2.1707811)(3.18,-2.1707811)     \psline[linewidth=0.04cm](4.22,-2.1907814)(3.94,-2.1907814)     \psframe[linewidth=0.04,dimen=outer](12.68,1.3892188)(11.78,0.10921875)     \psline[linewidth=0.04cm](15.8,0.74921876)(12.68,0.74921876)     \psline[linewidth=0.04cm](11.8,-1.8107812)(11.8,-2.4107811)     \psline[linewidth=0.04cm](12.0,-1.5907812)(11.98,-2.7307813)     \pscircle[linewidth=0.04,dimen=outer](15.78,-1.2107812){0.74}     \pscircle[linewidth=0.04,dimen=outer](9.0,1.0492188){0.74}     \psline[linewidth=0.04cm](15.78,0.74921876)(15.78,-0.53078127)     \psline[linewidth=0.04cm](12.02,-2.0907812)(15.8,-2.0907812)     \psline[linewidth=0.04cm](10.3,0.74921876)(10.3,-2.0707812)     \psline[linewidth=0.04cm](12.22,0.08921875)(12.22,-0.7107813)     \psline[linewidth=0.04cm](15.78,-1.9507812)(15.78,-2.1107812)     \psline[linewidth=0.04cm](11.78,0.74921876)(10.28,0.74921876)     \psline[linewidth=0.04cm](11.82,-2.0707812)(10.3,-2.0707812)     \psline[linewidth=0.04cm](9.0,0.32921875)(8.98,-0.69078124)     \psline[linewidth=0.04cm](9.0,1.7492187)(9.0,2.4892187)     \psline[linewidth=0.04cm](12.28,2.4892187)(8.98,2.5092187)     \psline[linewidth=0.04cm](10.16,-0.67078125)(8.96,-0.69078124)     \usefont{T1}{ptm}{m}{n}     \rput(12.220625,0.7292187){\small Ge }     \usefont{T1}{ppl}{m}{n}     \rput(9.000625,0.9742187){\Large V}     \usefont{T1}{ppl}{m}{n}     \rput(15.800625,-1.2057812){\Large A}     \usefont{T1}{ptm}{m}{n}     \rput(13.529843,-2.7307813){\small DC Voltage Supply}     \psframe[linewidth=0.04,dimen=outer](10.46,-1.0307813)(10.16,-1.7707813)     \psline[linewidth=0.04cm,arrowsize=0.05291667cm 2.0,arrowlength=1.4,arrowinset=0.4]{->}(9.78,-0.9507812)(10.88,-1.9307811)     \psline[linewidth=0.04cm](11.58,-2.2307813)(11.58,-2.4707813)     \psline[linewidth=0.04cm](11.72,-2.3507812)(11.44,-2.3507812)     \psline[linewidth=0.04cm](12.52,-2.3707812)(12.24,-2.3707812)     \psline[linewidth=0.06cm,arrowsize=0.05291667cm 2.0,arrowlength=1.4,arrowinset=0.4]{<-}(16.54,1.1087693)(17.407234,1.6736897)     \psline[linewidth=0.06cm,arrowsize=0.05291667cm 2.0,arrowlength=1.4,arrowinset=0.4]{<-}(17.42,2.9092188)(17.421688,1.700552)     \psline[linewidth=0.06cm,arrowsize=0.05291667cm 2.0,arrowlength=1.4,arrowinset=0.4]{->}(17.421688,1.6736897)(18.6,1.6492188)     \usefont{T1}{ptm}{m}{n}     \rput(18.525469,1.4342188){x}     \usefont{T1}{ptm}{m}{n}     \rput(17.673437,2.7942188){z}     \usefont{T1}{ptm}{m}{n}     \rput(16.747812,1.0342188){y}     \psdots[dotsize=0.12](7.5,0.82921875)     \psdots[dotsize=0.12](7.54,-1.9707812)     \psdots[dotsize=0.12](15.82,-2.1107812)     \psdots[dotsize=0.12](15.8,0.70921874)     \psarc[linewidth=0.04](2.04,-0.53078127){0.18}{0.0}{180.0}     \psline[linewidth=0.04cm](3.74,-0.49078125)(2.22,-0.49078125)     \psarc[linewidth=0.04](10.3,-0.69078124){0.18}{0.0}{180.0}     \rput{87.473885}(5.7319264,-2.1319435){\psarc[linewidth=0.04](3.98,1.9292188){0.18}{0.0}{180.0}}     \psline[linewidth=0.04cm](3.96,2.6692188)(3.96,2.1292188)     \psline[linewidth=0.04cm](12.22,1.3692187)(12.2,1.6492188)     \rput{87.473885}(13.507985,-10.498628){\psarc[linewidth=0.04](12.24,1.8092188){0.18}{0.0}{180.0}}     \psline[linewidth=0.04cm](12.26,2.5092187)(12.26,1.9692187)     \psline[linewidth=0.04cm](10.5,-0.69078124)(12.22,-0.7107813)     \psline[linewidth=0.04cm](11.22,0.74921876)(11.22,1.8892188)     \psline[linewidth=0.04cm](11.2,1.8492187)(12.96,1.8492187)     \psline[linewidth=0.04cm](12.96,1.8292187)(12.96,0.7292187)     \psline[linewidth=0.04cm](4.74,1.9492188)(4.74,0.8492187)     \psline[linewidth=0.04cm](3.04,0.82921875)(3.04,1.9692187)     \psline[linewidth=0.04cm](3.0,1.9292188)(4.76,1.9292188)     \usefont{T1}{ptm}{m}{n}     \rput(5.2814064,1.3942188){\psframebox*[framesep=0, boxsep=false,fillcolor=white] {$\Omega$}}     \psdots[dotsize=0.12](3.08,0.87921876)     \psdots[dotsize=0.12](4.76,0.89921874)     \psdots[dotsize=0.12](11.24,0.75921875)     \psdots[dotsize=0.12](13.02,0.7992188)     \usefont{T1}{ptm}{m}{n}     \rput(13.541407,1.4142188){\psframebox*[framesep=0, boxsep=false,fillcolor=white] {$\Omega$}}     \end{pspicture}      }     \end{figure}      The `userpackages` bit is my contribution that I put in. ![the picture produced. The math package is being ignored](http://i.stack.imgur.com/UUdSF.png)


title: User command shortcut for limits

text: I'm a grey headed guy taking a calculus class. I'm trying to figure out how to make a user command with two arguments to generate limit statement with right arrow. I keep having to type `\lim_{x \rightarrow \infty}` blah blah. So, I would like shortcut with first param as in `x` above and second param where the limit is going to.


title: Footline colobox spacing problems in Beamer?

text: I've been trying to customize the footline in a `beamer` template but when I added a fourth box, the spacing went wacko. Here's my template:               \DeclareOptionBeamer{compress}{\beamer@compresstrue}     \ProcessOptionsBeamer          \mode<presentation>          \useoutertheme[subsection=false]{miniframes}          % Define colors     \definecolor{beamer@blendedblue}{RGB}{26,89,142}     \definecolor{beamer@darkblue}{RGB}{17,59,94}          % Title block     \setbeamercolor*{title}{use=structure,fg=white,bg=beamer@darkblue}     \setbeamertemplate{title page}[default][colsep=-4bp,rounded=true,shadow=true]          % Bottom infolines     \setbeamertemplate{footline}     {     \leavevmode%     \hbox{%     % Name and institution     \begin{beamercolorbox}[wd=0.3\paperwidth,ht=2.3ex,dp=1.25ex,center]{title in head/foot}%     \usebeamerfont{title in head/foot}\insertshortauthor~~\beamer@ifempty{\insertshortinstitute}{}{(\insertshortinstitute)}     \end{beamercolorbox}%     % Short title     \begin{beamercolorbox}[wd=0.4\paperwidth,ht=2.3ex,dp=1.25ex,center]{author in head/foot}%     \usebeamerfont{anthor in head/foot}\insertshorttitle     \end{beamercolorbox}%     % Date     \begin{beamercolorbox}[wd=0.2\paperwidth,ht=2.3ex,dp=1.25ex,center]{title in head/foot}%     \usebeamerfont{title in head/foot}\insertshortdate{}     \end{beamercolorbox}     % Frame counter          \begin{beamercolorbox}[wd=0.1\paperwidth,ht=2.3ex,dp=1.25ex,center]{title in head/foot}%     \usebeamerfont{title in head/foot}\insertframenumber{}\hspace*{1pt}/\hspace*{1pt}\inserttotalframenumber     \end{beamercolorbox}}%     \vskip0pt%     }          % Set themes     \useinnertheme{circles}     \usecolortheme{whale}     \usecolortheme{orchid}          % Set colors     \setbeamercolor{structure}{fg=beamer@blendedblue}     \setbeamercolor{titlelike}{parent=structure}     \setbeamercolor{frametitle}{fg=black}     \setbeamercolor{title}{fg=white}     \setbeamercolor{item}{fg=beamer@blendedblue}          \mode     <all>      And my MWE is:               \documentclass[compress]{beamer}          \usetheme{Bread} % Custom theme (listed above)          \title[Uncertainty in Life]{Uncertainty in Life}     \author[Mr. Smith]{John Smith}     \institute[UN]{University of Nowhere}     \date{November 28, 2012}          \begin{document}     \begin{frame}     \end{frame}     \end{document}      As you can tell from the example, there is a slight space between the first and second box, and a large space between the third and fourth box.


title: How to create simple funnel in LaTeX?

text: I have a problem trying to create a simple funnel, as it can be seen on the attached file: ![enter image description here](http://i.stack.imgur.com/MfqCJ.png) I have tried to look at the internet, trying to write the lines, but it won't work. I am using TikZ. The basic idea with the figure is to show the reader, that I do a delimitation. If someone can help me or have another better option, I would be glad to hear about that.


title: Missed page number in Beamer

text: In this MWE, I want to show the missed page number in frame one :               %% BEAMER THEME SAKLY 2014: Main tex file for compiling     %$ Compile this file (XeLateX)     %% Copyright 2014 by SAKLY Hamdi          %%%%%%%%%%%%%%%%     %=====Preambule========%     %%%%%%%%%%%%%%%%     \documentclass[10 pt]{beamer}     \usepackage{etex}     \usetheme{default}     \usepackage{amsmath}%loads amsmath that should go before unicode-math     \setbeamertemplate{navigation symbols}{}      %%%%%%%%%%%%%%%%%%%%%%%%     % =======Usual LaTeX Packages======== %     %%%%%%%%%%%%%%%%%%%%%%%%     \usepackage{graphicx}     %\usepackage{stackrel}     %\usepackage{mathrsfs}     %\usepackage{bbm}       %\usepackage{pifont}     \usepackage{multicol}     %\usepackage{bbding}     \usepackage{enumitem}     %\usepackage{wasysym}          %%%%%%%%%%%%%%%%%%%%%%%%%     %========Frame Number Customization=====%     %%%%%%%%%%%%%%%%%%%%%%%%%%     \defbeamertemplate{footline}{centered page number}     {%       \hspace*{\fill}%       \usebeamercolor[brown]{page number in head/foot}%       \usebeamerfont{page number in head/foot}%       \insertframenumber%       \hspace*{\fill}\vskip2pt%     }     \setbeamertemplate{footline}[centered page number]     %=================LaTeXDraw==========     \usepackage{wrapfig}     \usepackage[usenames,dvipsnames]{pstricks}     \usepackage{epsfig}     \usepackage{pst-grad} % For gradients     \usepackage{pst-plot} % For axes     \usepackage{pst-3dplot}     \usepackage{pst-solides3d}     %=====Tikz=======================================%     \usepackage{tikz}     %\usetikzlibrary{decorations}     %\usetikzlibrary{shapes.symbols}     %\usetikzlibrary{shapes.callouts}     \usepackage{xparse}     %========================================%     \begin{document}     \tikzstyle{every picture}+=[remember picture]      %---------------------------------------------------------------     % FRAME     %---------------------------------------------------------------     \begin{frame}[c]{Diffraction des ondes \'electromagn\'etiques par un objet p\'en\'etrable}          \begin{columns}     \column{.35\textwidth}     \begin{figure}[ht]     \centering     \psscalebox{.4 .4} % Change this value to rescale the drawing.     {     \begin{pspicture}(0,-4.321954)(8.656472,4.321954)     \psbezier[linecolor=brown, linewidth=0.08, fillstyle=solid,fillcolor=brown](2.3564725,4.178046)(3.1458247,4.791987)(5.6229916,1.9758314)(5.5564723,0.97804624)(5.4899535,-0.019738894)(2.6635792,-2.5290606)(1.9564724,-1.8219538)(1.2493657,-1.114847)(1.5671202,3.5641057)(2.3564725,4.178046)      \onslide<2->{\psline[linecolor=brown, linewidth=0.06, arrowsize=0.04cm 2.0,arrowlength=2.1,arrowinset=0.0]{->}(1.5964724,1.3380463)(-0.16352756,1.5380462)}     \end{pspicture}     }     \end{figure}     \column{.7\textwidth}     \begin{itemize}     \item[$\bullet$]$\Omega\subset R^3$: domaine born\'e \`a bord Lipschitzien     \item<2->[$\bullet$]$n$ : vecteur normal unitaire sortant     \end{itemize}     \end{columns}          \begin{tikzpicture}[overlay]                  \node at (0.17,3.8) {$\Gamma$};             \node at (0.8,5) {$\Omega$};             \onslide<2->\node at (-0.1,5.45) {$n$};          \end{tikzpicture}     \end{frame}     \end{document}


title: MinionPro package semibold / medium fonts

text: How can the medium and semibold weights of Adobe Minion Pro be accessed in pdfLaTeX with the MinionPro package? I am confused by the package documentation, which indicates initially that the `fullfamily` package option enables Medium and Semibold fonts, but then in section 8 suggests that these are only available through substitutions. I am aware of the two answers to this question, the first of which is not a pdfLaTeX solution, and the second of which gives a 'Missing $ inserted' error for me. Unfortunately I am not familiar enough with macros to debug this error, or to work out whether MinionPro is actually providing the appropriate `\DeclareFontShape` as required. A minimal (non-working) example follows, where the {m} font series is rendered as Minion Regular, and the {sb} font series is rendered as bold, rather than Medium and Semibold as desired.               \documentclass[a4paper]{minimal}     \usepackage[fullfamily]{MinionPro}     \begin{document}     text     \fontseries{m}\fontshape{n}\selectfont text      \fontseries{sb}\fontshape{n}\selectfont text      \fontseries{bx}\fontshape{n}\selectfont text     \fontseries{eb}\fontshape{n}\selectfont text     \end{document}      If the answer is that the MinionPro package does not fully support these weights, is there something I can put in the preamble to enable their use?


title: Fixing overfull `\vbox`

text: With the code:               $$A=\msq{\mat{ccccc}     2 & -1 & & \multi[2][2]{\Huge{$0$}} \\     -1& 2 & -1 \\     & \ddots & \ddots & \ddots \\     \multi[2][2]{\Huge{$0$}} & \ddots & \ddots & \ddots \\     & & & -1 & 2     \emat}.$$      I get:               Overfull \vbox (6.0pt too high) detected at line 45          Overfull \vbox (6.0pt too high) detected at line 45      where the code ends at line 45. How can I fix that? NB `\multi` is as in Problem with abbreviation of `\multirow` and `\multicolumn` (LaTeX), `\msq` is `\msq{#1}=\left[\!\!\!\!#1\!\!\!\!\right]` and `\mat=\begin{array}`, `\emat=end{array}`.


title: Adding a "take away" box to a beamer slide

text: In Powerpoint presentations (especially with slides produced by consultants), it's common to add a box at the bottom of a slide that indicates the main point. What would be some LaTeX code for adding such a box? I would want it to have a fixed-position on the page and a colored fill with a constant font. Some like ![enter image description here](http://i.stack.imgur.com/cBtxg.png)


title: BibTeX: Defining own styles?

text: I'm using LaTeX with BibTeX to display the literature of my thesis. We have to adapt our work to several custom 'styles' from the university. That's why I want to somehow define my own styles: For each entry type the given style can be different and further, the displaying in the bibliography and in a cite is different. I don't know if it's quite 'easy' to define my own styles in BibTeX so that I could 'invent' new entry types, let's say               entryTypeA     entryTypeB     entryTypeC      and than define the style of each how to display it in the bibliography and how when citing it with `\cite{}` and how when citing it with `\footcite{}`, etc.? Something like               entryTypeA:     bibliography="@Autor, @Title in year @Year, @Publisher"     cite="@Autor, @Year"          entryTypeB:     bibliography="@Autor, @Year, @Title, @Address"     cite="@Autor: @Title"      etc. (just examples).


title: Where should I report wrong Unicode mappings?

text: I found an issue about mapping of Unicode characters (clockwise and anti- clockwise open circle arrow) in some fonts and already reported that to the unicode-math maintainer but I actually think, this is not the problem of the package. Has there been some change in the Unicode numbering? Should I report that to the font maintainers or to Unicode?               % arara: lualatex          \documentclass{article}     \usepackage{unicode-math}     \usepackage{fontspec}     \usepackage{xcolor}          \begin{document}     Unicode Character ANTICLOCKWISE OPEN CIRCLE ARROW (U+21BA)          \verb+\acwopencirclearrow+          {\huge     \setmathfont{stixmath-regular.otf}     $\symbol{"021BA}$     \setmathfont{xits-math.otf}     $\symbol{"021BA}$     \setmathfont{asana-math.otf}     $\symbol{"021BA}$     \setmathfont{texgyretermes-math.otf}     $\color{red}\symbol{"021BA}$     \setmathfont{texgyrebonum-math.otf}     $\symbol{"021BA}$     \setmathfont{texgyrepagella-math.otf}     $\color{red}\symbol{"021BA}$     \setmathfont{texgyreschola-math.otf}     $\symbol{"021BA}$     \setmathfont{latinmodern-math.otf}     $\color{red}\symbol{"021BA}$}          Unicode Character CLOCKWISE OPEN CIRCLE ARROW (U+21BB)          \verb+\cwopencirclearrow+          {\huge     \setmathfont{stixmath-regular.otf}     $\symbol{"021BB}$     \setmathfont{xits-math.otf}     $\symbol{"021BB}$     \setmathfont{asana-math.otf}     $\symbol{"021BB}$     \setmathfont{texgyretermes-math.otf}     $\color{red}\symbol{"021BB}$     \setmathfont{texgyrebonum-math.otf}     $\symbol{"021BB}$     \setmathfont{texgyrepagella-math.otf}     $\color{red}\symbol{"021BB}$     \setmathfont{texgyreschola-math.otf}     $\symbol{"021BB}$     \setmathfont{latinmodern-math.otf}     $\color{red}\symbol{"021BB}$}     \end{document}      ![enter image description here](http://i.stack.imgur.com/8dxnO.png)


title: Tikz for Commutative Diagrams

text: I need to use `tikz` package because of the quality of commutative diagrams it produces as I've seen in some manuals. I've tried it severally but all to no avail. I'm using MiKTeX with TeXmaker editor on windows. The MiKTeX was installed last year september (2012). I'll like to know   1. if I need to install any specific package or need to install the latest version of MiKTeX    2. exactly what and and what do I need to specify or include in my preamble, bearing it in mind that the document I'm writing is a thesis in algebraic category. * * *               \documentclass[12pt]{book}     \usepackage{amsmath,amssymb,amsthm,latexsym}     \usepackage{tikz-cd}     \usetikzlibrary{matrix,arrows}          \begin{document}          \begin{tikzcd}[column sep = 1.3cm]       K         \arrow{r}{\kappa}         & L         \arrow[transform canvas = {yshift = 0.7ex}]{r}{\alpha}                 \arrow[transform canvas = {yshift = -0.7ex},leftarrow]         {r}{\beta}       & M      \end{tikzcd}     \end{document}


title: Design of index change, when I push makeindex

text: Are there somebody who can help me to solve this problem. I have downloaded a template from this website. Before I push on the `makeindex` it looked like this: ![enter image description here](http://i.stack.imgur.com/GltWo.jpg) and after it looked like that: ![enter image description here](http://i.stack.imgur.com/HYrvv.jpg) But when I compile the index and the bibliography the design changes, why does it?


title: Randomised LaTeX based multiple choice test

text: I would like to create a multiple choice test with LaTeX. It has the following boundary conditions:   * 20 questions (`q`) per test .   * 20 students (`s`) take the test, the order of the question should be different for every student.   * The order of the possible answers should also vary between the students. So if `q1` of `s1` is equal to `q5` of `s2` answer `A` of `s1` should not be the same as answer `A` of `s2`. I use MiKTex 2.9.


title: XeLaTeX fontspec Century Gothic not using ligatures

text: I'm trying to use my Century Gothic TrueType font in a document, but it's failing to use the fl and fi ligatures. The input's below:               \documentclass{article}     \usepackage{xltxtra}     \setmainfont[Mapping=tex-text]{Century Gothic}     \begin{document}     ff fi fl     \end{document}      I'm using Win7; running `charmap`, I can see Century Gothic has the ligatures at `0xFB01` and `0xFB02`, so I'd expect XeLaTeX to be able to pick them up. The document compiles with no errors, but no ligatures either. I'm running MiKTeX, and the package update program tells me I'm on the latest version of everything. **Update** : Raphink's suggestion to specify `Ligatures=Rare` or `Ligatures=Historical` has no effect on the produced document, and results in the console output having a few repeats of errors similar to the below:               *************************************************     * fontspec warning: "icu-feature-not-exist-in-font"     *      * OpenType feature 'Ligatures=Rare' (+dlig) not available for font 'Century     * Gothic' with script '' and language ''.     *************************************************      **Update 2** : As suggested by Ulrike Fischer, possibly relevant output from running `xelatex --output-driver="xdvipdfmv -vv"` with `\XeTeXtracingfonts= 1` in the file produced console output including the following lines that look vaguely relevant (it means nothing to me, but I'm hoping it might make sense to some of you):               <AGL:texglyphlist.txt>[1<CenturyGothic(Century Gothic:Regular)@9.96pt<NATIVE-FONTMAP:CenturyGothic/H/65536/0/0>     fontmap: CenturyGothic/H/65536/0/0 -> C:/Windows/Fonts/GOTHIC.TTF(Identity-H)          pdf_font>> Input encoding "Identity-H" requires at least 2 bytes.     pdf_font>> The -m <00> option will be assumed for "C:/Windows/Fonts/GOTHIC.TTF".     (CID:CenturyGothic)     pdf_font>> Type0 font "C:/Windows/Fonts/GOTHIC.TTF" cmap_id=<Identity-H,0> opened at font_id=<CenturyGothic/H/65536/0/0,0>.     >]     otf_cmap>> Creating ToUnicode CMap for "C:/Windows/Fonts/GOTHIC.TTF"...     (CID:C:/Windows/Fonts/GOTHIC.TTF[BNGDWL+CenturyGothic][CIDFontType2][5 glyphs (Max CID: 79)][12097 bytes])      There's also the following from the log file:               .................................................     . fontspec info: "no-scripts"     .      . Font Century Gothic does not contain any OpenType `Script' information.     .................................................     …     .................................................     . fontspec info: "defining-font"     .      . Font family 'CenturyGothic(0)' created for font 'Century Gothic' with     . options [Ligatures=TeX].     .      . This font family consists of the following shapes:     .      . * 'normal' with NFSS spec.:     . <->"Century Gothic/ICU:mapping=tex-text;"     .      . * 'bold' with NFSS spec.:     . <->"Century Gothic/B/ICU:mapping=tex-text;"     .      . * 'italic' with NFSS spec.:     . <->"Century Gothic/I/ICU:mapping=tex-text;"     .      . * 'bold italic' with NFSS spec.:     . <->"Century Gothic/BI/ICU:mapping=tex-text;"     .................................................      **Update 3** : Note this is a TrueType font, not an OpenType one. Still, the ligatures exist, so I see no reason why I shouldn't be able to use them…


title: Wrong numbering of lines in lstlistings when using escaped commands

text: I'm using the listings package to format some Java code in my document. I want it to number lines (1 number every 5 lines), and I need to highlight some keywords inside the code with the following command:               \newcommand{\ca}[1]{\color{red}{#1}}      (escaped with "`" inside the lstlisting environment). However, if I use this command on any line, the next line will be numbered, regardless of its number. Here is a simplified example:               \documentclass{article}     \usepackage{listings}     \usepackage{xcolor}          \lstset{       language=Java,       numbers=left,       stepnumber=5,       numberfirstline=true,       numbersep=5pt,       escapechar=\`     }          \newcommand{\ca}[1]{\color{red}{#1}}          \begin{document}     \begin{lstlisting}     public class Color {       private int R, G, B;       public `\ca{final static}` Color red = `\ca{new}` Color(255, 0, 0);       public `\ca{final static}` Color magenta = `\ca{new}` Color(255, 0, 255);       public `\ca{final static}` Color lightgray = `\ca{new}` Color(192, 192, 192);       // ...     }     \end{lstlisting}     \end{document}      (in my real document it's much more complex: Beamer, TikZ, etc.) Here is the result I get: ![incorrect numbering](http://i.stack.imgur.com/Dfeum.png) Lines 4 and 5 should not be numbered, and if I just remove the "`" they _are not_ numbered. Any idea how to fix this? Did I do something wrong, or is it a bug in listings?


title: Custom reference field line in scrlttr2

text: Following on from a previous question, I took the route of co-opting the location field to display some invoice related information in the top right corner of the letter. Now I'd like to do something similar with the reference fields line and use it for a purpose other than its own. I have used `\removereffields` to empty the reference fields line, now it just displays a date. I can't see an easy way of using the reference fields line like it was possible with the location field `\setkomavar{location}{... stuff here ...}`. I have read the `scrlttr2.cls`, and it seems that the reference field is just 'magically' rendered if any of the reference fields are set. Is it possible to use the reference fields line for my purposes and what is the easiest way to go about this? Thanks!


title: LaTeX is not compiling consistently

text: I am really new to LaTeX, so it's possible I'm making some egregious error that I'm not aware of, but my documents are compiling inconsistently. By that I mean it compiles correctly maybe one in twenty times. When it does it looks fine, but it rarely does. I've been sent documents from other people that they have compiled successfully and they get completely ruined. I'm using these packages in the preamble:               \documentclass[11pt]{article}     \usepackage{mathtools}     \usepackage{enumerate}     \usepackage{graphicx}     \usepackage{amssymb}     \usepackage{latexsym}     \usepackage{amsfonts}     \RequirePackage[l2tabu, orthodox]{nag}     \usepackage{microtype}     \usepackage[a4paper]{geometry}     \usepackage{microtype}     \DisableLigatures{encoding=*,family=*}      One thing that seems to frequently be going wrong is that the following command               \begin{equation}     \frac{d^n}{dx^n}f(x) = \lim_{h\to 0}\frac{1}{h^n} \displaystyle\sum\limits_{j=0}^n \frac{n!}{j!(n-j)!}(-1)^j f(x-jh)     \end{equation}      is getting me incomprehensible garbage. ~~I would post a picture, but I don't have enough reputation points.~~ The weird thing is that it's fine most of the time. The font also changes from compilation to compilation. This is happening across all documents. Sometimes even viewing a PDF that was written in LaTeX online gets my heaps of crap like this and I have to reload pages a few times before I get anything legible. Any thoughts? ![enter image description here](http://i.stack.imgur.com/MLhHA.png)