title: Help about tcboutputlisting and tcblisting (tcolorbox package}

text: When using the tcolorbox package and creating latex exercises with solutions, I have a problem of inserting tcblisting in _tcboutputlisting_ (solution). The listing which appeared in the solution is that of the last one included in the text, and not the one inside tcboutputlisting (solution) Does anyone know how to resolve this? Taamangtchu My tex document:               \documentclass[12pt,a4paper,twoside]{book}%     \usepackage{graphicx,amsmath,amsfonts,amssymb,mathptmx}     \usepackage[french]{babel}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{fancybox}   % définit des macros pour des boîtes, des cadres, etc.     \usepackage[svgnames,x11names,hyperref]{xcolor} % définit les couleurs par noms     \usepackage{colortbl,array}     \usepackage[section]{algorithm}   %Gère les algorithmes     \usepackage{algpseudocode} % Codes semblables à fortran ou pascal ou C     \usepackage{multicol,wrapfig,lmodern}     \usepackage[bf,textfont={footnotesize,it}]{caption}     \usepackage[toc,page,title,titletoc,header]{appendix}     \usepackage[margin=2cm,includefoot,includehead]{geometry}     \setlength{\parindent}{4ex}     % indentation au début de chaque paragraphe     \setlength{\parskip}{2ex plus 0.5ex minus 0.2ex} % espace vertical entre      \usepackage[colorlinks,linkcolor=black,pageanchor]{hyperref}%     \usepackage[plainheadsepline,nouppercase]{scrpage2}     \pagestyle{scrheadings}     \renewcommand{\chaptermark}[1]{\markboth{{\thechapter. #1}}{}}     \renewcommand{\sectionmark}[1]{\markright{ \thesection.\ #1}{}}      \newcommand\chapterstring{Chapitre}     \usepackage{titlesec}     %     % chapitres dans un box     \titleformat{\chapter}[frame] {\bfseries\sffamily\color{Blue4}} {\filright     \enspace \Large \chapterstring~\thechapter} {14pt} {\Large\filcenter}          %     % sections avec rule     \titleformat{\section}{\vspace{0mm plus 1cm}\addpenalty{-1000}\color{Blue4}      \Large\bfseries\sffamily}{\thesection}{1em}{}[{\color{Blue4}\titlerule[0.5pt]}]     %     % sous-sections     \titleformat{\subsection}{\addpenalty{-500}\large\bfseries\sffamily}{     \thesubsection}{1em}{}      %     % sous-sous-sections      \titleformat{\subsubsection}{\penalty-500\vspace{0pt plus 2pt}{}\bfseries      \sffamily}{\thesubsubsection}{}{}[\vspace{-14pt}]          %     % Divers macros tcolorbox     %-----------------------------------------------------------------------------     % Divers Box en couleur avec le package tcolorbox     % Faire attention à l'ordre des options!!!     \usepackage[theorems,minted,listingsutf8,documentation,breakable]{tcolorbox}     \usepackage{varioref}     %     % command shell     \newtcblisting{commandshell}{colback=white,colupper=black,colframe=yellow!75      !black,listing only,listing options={style=tcblatex,language=sh},every listing      line={\textcolor{red}{\small\ttfamily\bfseries root \$> }}}     %     % Mots clés en couleur dans les listings      % Compiler avec pdflatex -shell-escape input      %     % Script entre un \begin et un \end avec caption     \newtcblisting[auto counter,number within=section]{mlstlisting}[1]{listing      engine=minted,minted style=default,minted language=python,      minted options={fontsize=\small,linenos,numbersep=3mm,mathescape},     colback=blue!3!white,colframe=blue!75!black,listing only,left=5mm,enhanced,     overlay={\begin{tcbclipinterior}\fill[red!20!blue!20!white] (frame.south west)     rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},breakable,     title=Script QuTiP \thetcbcounter: #1     }     %     % Script dans un fichier qu'on charge avec caption et label     \newtcbinputlisting[use counter from=mlstlisting]{\mlstinputlisting}[2][]{%     listing engine=minted,minted language=python,minted style=default,     minted options={fontsize=\small,linenos,numbersep=3mm,mathescape},listing      file={#2}, colback=violet!3!white,colframe=violet!85!black,fonttitle=\bfseries,     listing only,left=5mm,enhanced,     overlay={\begin{tcbclipinterior}\fill[red!20!blue!20!white] (frame.south west)     rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},breakable,     title=Script QuTiP \thetcbcounter: #1     }     % Output du Script précédent     \newtcbinputlisting[use counter from=mlstlisting]{\mclstinputlisting}[2][]{%     listing engine=minted,minted language=python,minted style=default,     minted options={fontsize=\small,linenos,numbersep=3mm,mathescape},listing      file={#2}, colback=blue!3!white,colframe=blue!60!white,fonttitle=\bfseries,     listing only,left=5mm,enhanced,     overlay={\begin{tcbclipinterior}\fill[red!20!blue!20!white] (frame.south west)     rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},breakable,     title=Script Ouput QuTiP \thetcbcounter: #1     }     % Procédure d'ouverture et de fermeture du fichier des solutions     %     \newcounter{texercise}     %     \newwrite\solout     \def\openoutsol{\immediate\openout\solout\jobname.sol}     \def\solfile#1{solutions/texercise#1.tex}     \def\writesol#1{\immediate\write\solout{\noexpand\processsol{\thetcbcounter}{#1}     }}%     \def\closeoutsol{\immediate\closeout\solout}     \def\inputsol{\IfFileExists{\jobname.sol}{\input{\jobname.sol}}{}}     %     % Excercises Style     \tcbset{     texercisestyle/.style={arc=0.5mm, colframe=blue!25!yellow!90!white,     colback=blue!25!yellow!5!white, coltitle=blue!25!yellow!40!black,     fonttitle=\small\sffamily\bfseries, fontupper=\small, fontlower=\small}     }     %     % Noyau de l'environnement Exercice avec les labels exercice (exe:#2) et      % solution (sol:#2)     \newtcolorbox[auto counter,number within=section,list inside=exam]%     {texercise}[2][]{texercisestyle,listing file={\solfile\thetcbcounter},      label={exe:#2},phantom={\writesol{#2}},title={Exercice      \thetcbcounter\hfill\mdseries Solution à la page \pageref{sol:#2}},     list entry={\protect\numberline{\thetcbcounter}Exercice avec solution à la     page \pageref{sol:#2}},breakable,#1}     %     %     % Solution part     % \usepackage{hyperref} % for \phantomsection     \newcommand{\processsol}[2]{%       \tcbinputlisting{texercisestyle,text only,         phantom={\phantomsection\label{sol:#2}},%         title={Solution Exercice \ref{exe:#2} de la page \pageref{exe:#2}},         listing file={\solfile{#1}},breakable}}     %     %-----------------------------------------------------------------------------     % Macro des ``theorems'' colorés          % Théorème avec caption et label     \newcounter{mytheorem}[section]     \def\themytheorem{\thesection.\arabic{mytheorem}}          \tcbmaketheorem{theorem}{Théorème}{fonttitle=\bfseries\upshape,        fontupper=\slshape,arc=0mm, colback=red!3,colframe=red!75!black,       separator sign dash,breakable}        {mytheorem}{th}     %     % Définition avec caption et label     \newcounter{mydefi}[section]     \def\themydefi{\thesection.\arabic{mydefi}}          \tcbmaketheorem{definition}{Définition}{fonttitle=\bfseries\upshape,        fontupper=\slshape, arc=0mm, colback=blue!3,colframe=blue!75!black,       separator sign dash,breakable}           {mydefi}{df}     %     % Principe avec caption et label     \newcounter{myprinc}[section]     \def\themyprinc{\thesection.\arabic{myprinc}}          \tcbmaketheorem{principe}{Principe}{fonttitle=\bfseries\upshape,        fontupper=\slshape, arc=0mm, colback=green!3,colframe=green!35!black,       separator sign dash,breakable}           {myprinc}{pr}     %     % Proposition avec caption et label     \newcounter{myprop}[section]     \def\themyprop{\thesection.\arabic{myprop}}          \tcbmaketheorem{proposition}{Proposition}{fonttitle=\bfseries\upshape,        fontupper=\slshape, arc=0mm, colback=green!3,colframe=green!35!black,       separator sign dash,breakable}           {myprop}{prp}     %     % % Remarque avec caption et label     \newcounter{myrmq}[section]     \def\themyrmq{\thesection.\arabic{myrmq}}          \tcbmaketheorem{remark}{Remarque}{fonttitle=\bfseries\upshape,        fontupper=\slshape, arc=0mm, colback=yellow!3,colframe=yellow!35!black,       separator sign dash,breakable}           {myrmq}{rq}          %     % % Exemple avec caption et label     \newcounter{myexpl}[section]     \def\themyexpl{\thesection.\arabic{myexpl}}          \tcbmaketheorem{example}{Exemple}{fonttitle=\bfseries\upshape,        fontupper=\slshape, arc=0mm, colback=red!50!yellow!5!white,      colframe=red!50!yellow!50!black, separator sign dash,breakable}        {myexpl}{exp}          %-----------------------------------------------------------------------     %     \setcounter{MaxMatrixCols}{30}     \setlength{\abovecaptionskip}{0pt}     \setlength{\belowcaptionskip}{0pt}          % Macro des abbréviations     \newenvironment{proof}[1][Preuve]{\noindent\textbf{#1.} }{\ \rule{0.5em}{0.5em}}     % Prise en compte du numéro de la section dans les différentes numérotations     \numberwithin{equation}{section}     \numberwithin{figure}{section}     \numberwithin{table}{section}     % Ramener la typologie française à la typologie standard (anglo-saxone)     \frenchbsetup{StandardLayout}     % Défintion des commandes raccourcies personnelles     \newcommand{\opn}[1]{\ensuremath{\operatorname{#1}}} % Operatorname     \newcommand{\bls}[1]{\ensuremath{\boldsymbol{#1}}} %Boldsymbol     \newcommand{\av}[1]{\ensuremath{\langle{#1}\rangle}} %Average     \newcommand{\bra}[1]{\langle{#1}\vert} %Dirac ket     \newcommand{\ket}[1]{\vert{#1}\rangle} % Dirac bra     %     %     %     \begin{document}     \chapter{Calculs quantiques}          % Ouverture du fichier Solution     \openoutsol     %          \section{Interpreteur Spyder}               \begin{commandshell}     sudo apt-get install spyder     \end{commandshell}          \begin{texercise}{CX}     %     \begin{tcboutputlisting}     En vertu de la relation (\vref{eq:CX}), on a le script \texttt{IPhyton}      ci-dessous.     \begin{mlstlisting}     In [2]:      CX=tensor(basis(2,0)*basis(2,0).dag(),qeye(2))+tensor(basis(2,1)*basis(2,     1).dag(),sigmax())          In [3]: CX     Out[3]:      Quantum object: dims = [[2, 2], [2, 2]], shape = [4, 4], type = oper, isherm =      True     Qobj data =     [[ 1.  0.  0.  0.]      [ 0.  1.  0.  0.]      [ 0.  0.  0.  1.]      [ 0.  0.  1.  0.]]     \end{mlstlisting}          \end{tcboutputlisting}     %     Proposer un script QuTiP, qui donne la matrice de la porte logique      quantique $CX$, sans utiliser la fonction \texttt{qutip.cnot}.     %     \end{texercise}          \begin{texercise}{separable_state}     %     \begin{tcboutputlisting}     %     The state (\vref{eq:GEntSt}) can be equivalently rewritten as     \begin{equation}     \ket{\psi}=a\{\ket{00}+b_0e^{i\varphi_0}\ket{01}+b_1e^{i\varphi_1}     \ket{10}+b_1b_0e^{i(\varphi_0+\varphi_1)}\ket{11}\}.     \label{eq:GEntSt2}     \end{equation}     The application of \texttt{CNOT}\ gate to (\vref{eq:GEntSt2}) leads to     \begin{equation}     \mathtt{CNOT}\ket{\psi}=a\{\ket{00}+b_0e^{i\varphi_0}\ket{01}+b_1     e^{i\varphi_1}\ket{11}+b_1b_0e^{i(\varphi_0+\varphi_1)}\ket{10}\}     \end{equation}     which is separable if and only if $b_0e^{i\varphi_0}=1$. Thus, \texttt{CNOT}     generated an entangled state if and only if at least one of the following 2     conditions is fulfiled:%     \begin{equation}     b_0\neq1,\,\varphi_0\neq0     \end{equation}          \end{tcboutputlisting}     %     The most general separable state of the two qubits can be written, up to an     overall phase, as%     \begin{equation}     \ket{\psi}=a(\ket{0} +b_1e^{i\varphi_1}\ket{1})\otimes(\ket{0}     +b_0e^{i\varphi_0}\ket{1}),     \label{eq:GEntSt}     \end{equation}     where $a$ is set to the completure. What conditions should the real     coefficients $b_0$, $b_1$, $\varphi_0$ and $\varphi_1$ satisfy in     order that $\mathtt{CNOT}\ket{\psi}$ be entangled?     %     \end{texercise}          % Fermeture du fichier Solution     \closeoutsol     %     %     \tcblistof[\subsection]{exam}{Solutions des Exercices%       \label{listofexercises}}       %     %   \newpage     % Charger les Solutions des Exercices du cours      \inputsol     \end{document}


title: Using Vim Latex-live-preview with minted package

text: I was wondering if anyone had succeeded to make vim-live-preview with the package minted. When I tried to edit the pdflatex command winthin the script.vim by adding the `-escape-shell` switch, but here's the output for : ![Output](http://i.stack.imgur.com/EKaC2.png) (for real fullsize picture: http://i.stack.imgur.com/EKaC2.png) However when I use the following command (manually in a shell) it works fine:               pdflatex -shell-escape myfile      I was wondering if it didn't work because `minted` uses external stuff to work, therefore the live processing can't happen. Is this an output generated by a badly installed `minted` or just something else? For those interested in knowing more about the vim plugin, this is where I downloaded it: Vim Latex-Live-Preview edit: Here's the .log of the failure (I've only put the interesting stuff)               ! Package minted Error: You must invoke LaTeX with the -shell-escape flag.          See the minted package documentation for explanation.     Type  H <return>  for immediate help.      ...               l.3 \begin               {document}     Pass the -shell-escape flag to LaTeX. Refer to the minted.sty documentation for      more information.          runsystem(which pygmentize && touch tp2.aex)...disabled.      ...               ! Package minted Error: You must have `pygmentize' installed to use this packag     e.          runsystem(pygmentize -S default -f latex > tp2.pyg)...disabled.           (/tmp/tmpI8agTH/tp2.pyg)     \openout3 = `tp2.pyg'.          runsystem(pygmentize -l c -f latex -F tokenmerge             -P "verboptions= "      -o tp2.out.pyg tp2.pyg)...disabled.          ! LaTeX Error: File `tp2.out.pyg' not found.      ...               l.9 \end{minted}^^M          *** (cannot \read from terminal in nonstop modes)


title: Multiple lines in equation environment

text: I have to put an two equations inside one `equation` environment. I could do it with this piece o code:               \begin{equation}     \begin{array}{ccl}          \nabla \cdot F & = & \left(\frac{\partial}{\partial x}i + \frac{\partial}{\partial y}j + \frac{\partial}{\partial z}\right) \cdot (F_{1}i + F_{2}j + F_{3}k) \\                    & = & \frac{\partial F_{1}}{\partial x}+ \frac{\partial F_{2}}{\partial y} + \frac{\partial F_{3}}{\partial z}     \end{array}!     \end{equation}      Which gives me this image: ![enter image description here](http://i.stack.imgur.com/Ma6VT.png) The problem is cause when I use the `array`, my fractions get smaller. Here is a single line equation and how I would like to preserve my fraction size in a environment with more than 1 equation. ![enter image description here](http://i.stack.imgur.com/F4YkW.png) Can I achieve this result?


title: Convert from historic LaTeX-based software called "The Publisher"

text: I am corresponding with a mathematician colleague who typesets his documents in what is apparently quite old software called "The Publisher". It creates an array of LaTeX related files as part of the publication process including a .tex file. However the grammar of these files is nothing like contemporary .tex grammar, so it won't compile with TeXLive, nor is Lyx able to parse it. I cannot find information on this software anywhere. I am enclosing some sample text from it with redacted contents in case the grammar looks familiar to anyone? Can these files be converted to Lyx or modern TeX?               \Para[\ParaType{B}]\tyxtstxit[]Remark\tyxtstxendit[] 1. The preceding     approach [redacted] \newlinetag[]     \Endpara[]      While an equation looks like:               \InlEqn[]\LmthEqn[]     \Gamma _{0} [redacted]     \LmthEndeqn[]\EndInlEqn[]      **Update:** I was provided with an old utility called "pub2latex" which still worked in Linux, provided the .pub doc was exported as an .sgml file. The conversion is not to straight LaTeX though but to some combination of LaTeX and XML. A sample is here:               <topic>\subsection{Purposes}     \par     The object of interest [redacted]     <inline-equation>     <f>     Y</f>     </inline-equation> with piecewise smooth boundary <inline-equation>     <f>     <g>6</g>Y</f>     </inline-equation> of class <inline-equation>     <f>     C1</f>     </inline-equation> in three dimensional space <inline-equation>     <f>     <blkbd>R</blkbd>3</f>     </inline-equation>.      I am wondering if anyone has seen a TeX / XML combination like this so that this document could now be parsed and converted? Additional historical info: The Publisher runs on Sun Sparc workstations. Perhaps it was the only TeX client to operate on a Sparc?


title: I need to provide a duotone pdf, what do I need to do with my figures?

text: I need to provide a duotone pdf (say black and cyan). My figures are made with tikz, pgfplots and asymptote (3D but no prc), some with opacity effects. I compile with pdftex and luatex.   1. What do I have to do so that it works smoothly? I can think of defining new cycle list for pgfplots and, of course, not using blue or red in tikz or in asymptote. Is there something else? Will opacity work?   2. What kind of colors can I use? How can I define them with xcolors? What rationale do one use to name those colors?   3. Regarding color pictures. Do I need to convert them outside of TeX or is there a way to do it from TeX?


title: Align text in minipage at same height

text: I need to put some text at the same height in my page, and I'm trying to do it with a `minipage`, but I'm not able to do it since they get centre-aligned. ![enter image description here](http://i.stack.imgur.com/Se5RJ.png) This is the LaTeX for the figure I've uploaded:               \begin{minipage}[]{0.5\textwidth}         \begin{flushleft}             {\large \textit{Author}:\vspace*{0.5cm} \\              Me}         \end{flushleft}     \end{minipage}%     %     \begin{minipage}[]{0.5\textwidth}         \begin{flushright}             {\large \textit{Supervisor}:\vspace*{0.5cm} \\              Him}\\             \vspace*{0.5cm}             {\large \textit{Advisor}:\vspace*{0.5cm} \\              Other Guy}         \end{flushright}         \end{minipage}%      Can you please explain me what I'm doing wrong?


title: How to get bold times new roman in math

text: I'm using `\usepackage{mathptmx}` to use times new roman font in math. But I can't make the font bold by using `\boldmath`, which works fine with default computer modern font. I'm using `\renewcommand{\rmdefault}{ptm}` to use times new roman for the whole document. How to get bold times new roman font in math so that it blends well with other text?


title: error bars with pgfplots in foreground

text: I am plotting with pgfplots a plot with error bars with the following code:               \documentclass[12pt,twoside, a4paper]{report}     \usepackage{tikz}      \usepackage{pgfplots}     \pgfplotsset{compat=1.6}          \begin{document}          \begin{tikzpicture}     \begin{axis}[xmin=0,xmax=5,ymin=0,ymax=4,      enlargelimits=false,axis on top=true,xlabel=$x$,ylabel=$y$]     %Add first Data     \addplot[color=blue,thick,only marks,mark=*]     plot[/pgfplots/error bars/.cd,x dir=none,y dir=both,y explicit,     error mark=-,error bar style={color=blue}]     table[x=xValue1,y=yValue1, y error=Deltay1] {TableForErrorBarQuestion.txt};     %Add second Data     \addplot[color=red,thick,only marks,mark=*]     plot[/pgfplots/error bars/.cd,x dir=none,y dir=both,y explicit,     error mark=-,error bar style={color=red}]     table[x=xValue2,y=yValue2, y error=Deltay2] {TableForErrorBarQuestion.txt};     \end{axis}     \end{tikzpicture}          \end{document}      As you can see from the screenshot, this works quite fine. ![graphical support](http://i.stack.imgur.com/IacVE.png) But I want to have all parts of my red error bars in the foreground (on the top layer). I thought this would work if I add my red data points after the blue one in the code – but unfortunately this does not work. I would be happy if someone of you could give me a hint! Here is the data I am using in my example.               xValue1 yValue1     Deltay1         xValue2 yValue2     Deltay2     1       1.918332609 1.048808848     1       1.818332609 0.524404424     2       1.886796226 1.048808848     2       1.386796226 0.524404424     3       1.954482029 1.048808848     3       1.854482029 0.524404424     4       1.939071943 1.048808848     4       1.839071943 0.524404424


title: Name prefix missing in the text, but correct in the bibliography (biblatex/biber)

text: The following is my entry in the `.bib` file:               @inbook{deckerdejong,       author = {Wolfram Decker and Theo de Jong},         title = {Gr\"obner bases and invariant theory},         booktitle = {Gr\"obner Bases and Applications},         publisher = {Cambridge University Press},         year = 1998,         pages = "61-89"     }      Now when I quote this in the text by `\citet{deckerdejong}`, I get "Decker and Jong (1998)" as output. But I need it to be "Decker and de Jong (1998)". How do I accomplish this? I already tried out some answers of the "van noort" example, but they didn't work for me. I use `biblatex` with the `authoryear` style and biber.


title: Referring to theorems

text: I have the following: I have a lemma whose "number" as of yet is not certain (right now it's Lemma 0.1), and then a theorem in which I wish to refer to this lemma X, "let such and such be as in Lemma X". I could write "...as in Lemma 0.1" and change it once I'm done with the thesis, but is there a way to refer to lemma 0.1 so that if (when) it becomes, say, lemma 5.2, so that when this changes, my reference in the theorem also changes? Wonderful wording, hope you get the point :P


title: Obtaining the behavior of both subfigure and subcaptionbox in the subcaption package

text: In the `subcaption` package, the default way to create subfigures is when the `subfigure` environment:               \documentclass{article}     \usepackage{caption}     \usepackage{subcaption}     \begin{document}     \begin{figure}      \centering      \begin{subfigure}{0.4\textwidth}       \centering       Subfigure1 is located here       \caption{Subfigure1 caption}       \label{subfig:1}      \end{subfigure}      \begin{subfigure}{0.4\textwidth}       \centering       Subfigure2 is located here       \caption{Subfigure2 caption}       \label{subfig:2}      \end{subfigure}      \caption{Figure caption}      \label{fig}     \end{figure}     \end{document}      I like this syntax, especially in that the figure comes first, then the caption, then the label for the caption. However, I don't like having to specify the `\textwidth` within the environment. I would prefer that this parameter be optional with the default value being the width of the figure. One solution to fix this problem is to use a savebox, but then source for the figure is (slightly) divorced from its primary location of use. The `subcaption` package provides a solution for this problem via the `\subcaptionbox` command:               \documentclass{article}     \usepackage{caption}     \usepackage{subcaption}     \begin{document}     \begin{figure}      \centering      \subcaptionbox{Subfigure1 caption\label{subfig:1}}{       \centering       Subfigure1 is located here}      \subcaptionbox{Subfigure2 caption\label{subfig:2}}{       \centering       Subfigure2 is located here}      \caption{Figure caption}      \label{fig}     \end{figure}     \end{document}      Now specifying `\textwidth` is optional and defaults to the width of the figure, but the source is much less readable. I dislike this solution for several reasons:   1. It is easier to write, read, and understand large amounts of code placed within `\begin{}...\end{}` then within `\someCommand{...}`. (It is so easy to use the wrong number of curly braces.)   2. The figure, caption, and label out written out of order from the way they are typeset (by default), which is the order in which I think about them.   3. The location to place the caption is not explicit. (It is just a required value to the `\subcaptionbox` placed between some `{}`'s, so a fellow coauthor that doesn't know this syntax won't know how to add a caption if it is currently blank.) ## Question: Is there a way to get the best of both worlds? How can I get behavior equivalent to using the `subfigure` environment but with the specification of `\textwidth` being optional (and defaulting to the width of the figure)? (This question is about the `subcaption` package because it seems that this is the best package for subfigures. I am open to suggestions that another package is better and fulfills my requirements.)


title: Set the columns' width of a row under multicolum row

text: I want to make a table like this one: ![enter image description here](http://i.stack.imgur.com/2K8Ao.png) I've using: ![enter image description here](http://i.stack.imgur.com/0kB0V.png) and got the table ![enter image description here](http://i.stack.imgur.com/IRHHW.png) Please help me to adjust the width of columns Y1, Y2, and Y3 equally. Many thanks!


title: Making math-extern in LyX behave in display mode like it does in inline mode

text: In LyX you have the option to call an external math program(CAS or numerical) on a formula. In inline mode it works fine - it takes the last part of your equation, computes it, and appends it after an equation symbol. In display mode, however, it has a different behaviour - it takes the first part of the equation, computes it, deletes everything after it, and puts the result, together with the first part, in an `eqnarray`. For example, if I have `x+x=1+1`, and I run `math-extern maxima` in inline mode, I get `x+x=1+1=2` \- like expected. But if I do the same thing in display mode, I get `x+x=2x` \- which is not what I want. Now, I've managed to partially solve it by using a command sequence to switch to inline mode, compute, and switch back to display mode: `command-sequence math-display; math-extern maxima; math-display`. But while this keymap fixes display mode - it wrecks inline mode, because when I run it in inline mode it does the exact opposite... So, is there a way to make both modes behave like the default behaviour of inline mode?


title: Circuitkz arrowhead scaling

text: I have problem with scaling of the arrowhead (see figure below). I found some examples, but unfortunately it does not work: question 1, question 2, question 3. I would like to reduce arrowhead of the current (for better proportion with arrows of the voltage). ![enter image description here](http://i.stack.imgur.com/u0bVY.png)                 \documentclass{article}       \usepackage{circuitikz}         \usepackage{tikz}         \usetikzlibrary{decorations.markings}       \usepackage{wrapfig}       \usepackage{subfig}           \begin{document}       \begin{figure}[htp]         \centering         \subfloat[ ]   {             \begin{circuitikz}[scale=1, every node/.style={scale=1}]               \draw (0,0) node[ocirc] {} --+ (1,0) coordinate(A);                \coordinate (B) at ([yshift=-2.5cm]A);               \draw (A) to[R] (B) --+ (-1,0) coordinate(D) node[ocirc] {};                     \begin{scope}[shorten >= 10pt,shorten <= 10pt]                      \draw[arrows={-open triangle 45}]                    ([xshift=.6cm,yshift=-0.5cm]A) -- node[right] {$i(t)$} ([xshift=.6cm,yshift=0.5cm]B);                  \draw[->]  (0,0) -- node[left] {$u(t)$} (D);                           \end{scope}                      \end{circuitikz}             }         \subfloat[ ]   {             \begin{circuitikz}[scale=1, every node/.style={scale=1}]               \draw (0,0) node[ocirc] {} --+ (1,0) coordinate(A);                \coordinate (B) at ([yshift=-2.5cm]A);               \draw (A) to[L] (B) --+ (-1,0) coordinate(D) node[ocirc] {};                     \begin{scope}[shorten >= 10pt,shorten <= 10pt]                 \draw[arrows={-open triangle 45}]  ([xshift=.6cm,yshift=-0.5cm]A) -- node[right] {$i(t)$} ([xshift=.6cm,yshift=0.5cm]B);                  \draw[->]  (0,0) -- node[left] {$u(t)$} (D);               \end{scope}                      \end{circuitikz}         }          \end{figure}      \end{document}


title: Thesis template - LyX

text: I have two questions and I cannot find a solution up to now:   1. I open a predifined template from thesis (i.e. `chapter-1.lyx`) and all the mathematical equations that I insert with `Ctrl`+`Shift`+`M` are aligned left. How can I have a centered alignment?   2. In `thesis.lyx`, how can I add a new chapter? Only `chapter1` and `chapter2` are predefined but what to do if I want to insert another `chapter3` from external file?


title: How to 'Go to Source' for a .Rnw file with knitr on TexStudio

text: So, I am TeXStudio and R on Windows 8 and have configured with knitr as follows: "C:\Program Files\R\R-3.0.3\bin\Rscript" -e "library(knitr, lib.loc='C:/Users/User/Documents/R/win-library/3.0'); knit2pdf('%.Rnw')"| -synctex=1 -interaction=nonstopmode %.tex. The other options are at their defaults. but do not know any means of synching ('Go to source')from the pdf viewer to the .Rnw file. I run into the problem that it calls the .tex file instead. Is there any way to fix this from the build options? Thanks.


title: Legend entry with curve fits

text: I am plotting two data sets with curve fits added manually (by defining two functions). How can I edit my legend entry to combine the data points and lines into one icon? So instead of having four legend entries, I only have two.


title: Natbib \citet style: move optional argument outside bracket

text: I am trying to use bibtex+natbib to deal with the citations in my thesis. Some citations are of the style `\citet{author_year}` and work as expected. However, when I use `\citet[pXX]{author_year}`, then I get Author (Year, pXX) instead of the desired Author (Year), pXX How can I achieve the desired style for this second kind of citations with additional information like page number etc. Based on the first answer from @Audrey I made this MWE:               %this documents is compiled with xetex     \documentclass[11pt,british,english,ngerman,footnotes=multiple]{scrreprt}     \usepackage{fontspec}     \usepackage[a4paper]{geometry}     \geometry{verbose,tmargin=2cm,bmargin=2cm,lmargin=3cm,rmargin=3cm}     \setcounter{secnumdepth}{3}     \setcounter{tocdepth}{3}     \usepackage{array}     \usepackage{rotfloat}     \usepackage{booktabs}     \usepackage{footmisc}     \usepackage{graphicx}     \usepackage{setspace}     \usepackage[authoryear]{natbib}     \PassOptionsToPackage{normalem}{ulem}     \usepackage{ulem}     \onehalfspacing          \usepackage{babel}     %\usepackage{hyperref}     \usepackage{apacite}     \usepackage{makerobust}     \DeclareRobustCommand{\citep}[2][]{\cite[#1]{#2}}     \DeclareRobustCommand{\citealp}[2][]{\citeNP[#1]{#2}}     \DeclareRobustCommand{\citet}[2][]{\citeA[#1]{#2}}          \usepackage{chngcntr}     \counterwithout{figure}{chapter}     \counterwithout{table}{chapter}     \counterwithout{footnote}{chapter}          \bibpunct[, ]{(}{)}{,}{a}{,}{,}          \usepackage{etoolbox}     \makeatletter     \patchcmd{\NAT@citex}       {\ifNAT@swa\else\if*#2*\else\NAT@cmt#2\fi        \if\relax\NAT@date\relax\else\NAT@@close\fi\fi}       {\ifNAT@swa\else\if*#2*\else\ifNAT@par\else\NAT@cmt#2\fi\fi        \if\relax\NAT@date\relax\else\NAT@@close%        \if*#2*\else\ifNAT@par\NAT@cmt#2\fi\fi\fi\fi}{}{}     \makeatother          \begin{filecontents}{\jobname.bib}     @Book{companion,       author = {Goossens, Michel and Mittelbach, Frank and Samarin, Alexander},       title = {The LaTeX Companion},       edition = {1},       publisher = {Addison-Wesley},       location = {Reading, Mass.},       year = {1994}}     @Book{adams,       title = {The Restaurant at the End of the Universe},       author = {Douglas Adams},       series = {The Hitchhiker's Guide to the Galaxy},       publisher = {Pan Macmillan},       year = {1980}}     \end{filecontents}          \begin{document}     \noindent     \cmd{citet}: \citet[e.g.][100]{adams}, \citet[pp. 1--10]{companion,adams} \\     \cmd{Citet}: \Citet[pp. 1--10]{adams}, \Citet[pp. 1--10]{companion} \\     \cmd{citet*}: \citet*[pp. 1--10]{companion,adams} \\     \cmd{Citet*}: \Citet*[p. 10]{companion} \\     \cmd{cite}: \cite[e.g.][100]{adams}, \cite{companion} \\     \cmd{citep}: \citep[e.g.][p. 20]{adams}, \citep[1--10]{companion,adams} \\     \cmd{citetext}, \cmd{citealp}:     \citetext{see \citealp{companion}, or even better \citealp{adams}} \\     \cmd{citeauthor}: \citeauthor{adams}, \citeauthor{companion} \\     \cmd{citeyear}: \citeyear{adams}, \citeyear{companion} \\     \bibliographystyle{plainnat}     \bibliography{\jobname}     \end{document}      Does anyone understand how to tame the `apacite` beast in combination with `natbib`?


title: How do I group curves in 2-D plots with pgfplots

text: ![enter image description here](http://i.stack.imgur.com/CFKAc.jpg) In the above image, you can see that there are 4 curves. I have two techniques (black and red). I test them on two different experimental scenarios. So corresponding to each scenario, I get one red and black curve each. I want to point out that one set of black and red curve belong to one experimental scenario. Hope that clears it. While I am familiar with plotting this curves in pgfplots using the given data, I can't figure how to group them as shown in the image. The plot was generated using matlab.   * How do I group curves in a given pgfplot?   * In your opinion, are there better ways on grouping curves in a plot?


title: How to put a series of figures in annex

text: I want to put 51 figures , with names 0001.png ,....., until 0051.png, in annex ans I'm wondering if I can do something similar to this in latex . for i series_of_figures; put figure in annex , with the name_of_figures("0001.png", .., "0051.png") in the caption . I hope that you understood my problem and thanks for your help .


title: Easy chemical reactions

text: I'm trying to convert some of my lecture slides to LaTeX. What's the best way to convert a number of slides (similar to the one below) into nice notes? I am aware of mhchem and chemstyle, but I don't think either does what I want. I also have ChemDraw, but creating each of these seems like an extremely slow process unless I'm just missing some features. Is ChemFig a good alternative? ![Oxymercuration/demurcuration slide](http://i.stack.imgur.com/GIDpu.png)


title: Trying to stop altering symbols in URLs

text: I am trying to create a bibliography and my main source of information are websites. The problem I'm having is when copying the URL into the bibliography, LaTeX doesn't like typesetting all the symbols. I have tried simply going through each URL and changing each symbol to be shown correctly but it is taking up far too much time. Is there a way to enclose the URL in speech marks for instance and have it just show the URL without me having to alter each symbol. Something like raw text or creating a string?               \bibitem{wikisocialnetwork01}     Social network,     Wikipedia contributors,     Wikipedia, The Free Encyclopedia,     Date of last revision: 6 March 2012,     http://en.wikipedia.org/w/index.php?title=Social_network&oldid=480326647


title: Overlaying tables

text: I have two tables as follows: Table 1:               Row/Column | C1 | C2 | C3     ROW 1      | v  | v  | v     ROW 2      | v  | v  | v     ROW 3      | v  | v  | v     ROW 4      | v  | v  | v     ROW 5      | v  | v  | v     ...     ROW n    | v | v | v      Table 2:               Row/Column | C1      Row1       | v     Row2       | v     Row3       | v      I want to have table 1 as a background (possibly transparent) and Table 2 on top of 1 as if it summarize the content of table 1 from ROW 1 up to ROW 4. What packages do you recommend for doing this?


title: Intermediate page numbering

text: I want to use both regular page numbering (as in 1, 2, 3, etc) and n-m page numbering (1-1, 1-2, 2-1, 2-2, etc) in a document I'm preparing. This far I've been playing around with custom counters but the obvious answer, using `\addtocounter` to subtract the page where the current chapter started from `\thepage` defeats that purpose because I still want regular page numbers. I can't really post an MWE because it's something I don't really know how to do. On the "pseudo-MWE" below `\nmpage` is a hypothetic command that outputs the page number in the format `<chapter>-<page_of_chapter>`, so the 5th page of chapter 2 would be 2-5. Any ideas on how I could achieve that?               \documentclass[12pt,a4paper,openany]{book}     \usepackage{fancyhdr}         \pagestyle{fancy}         \renewcommand{\chaptermark}[1]{%           \markboth{#1}{}}         \renewcommand{\sectionmark}[1]{%           \markright{\thesection #1}}         \fancyhf{}         \fancyhead[LE,RO]{\thepage}%          \fancyhead[LO]{\rightmark}%         \fancyhead[RE]{\leftmark}%         \fancyfoot[LE,RO]{\nmpage}%            \begin{document}          \chapter{Chapter 1}          Onononononon          \chapter{Chapter 2}          Yada yada yada.          \end{document}


title: Output to PDF doesn't print out everything

text: I have the following text in a file:               1 A2:          1.1 General Information          1.1.1 About This Manual          1.1.2 Typographical and Syntax Conventions          1.1.3 Overview of the MySQL Database Management System          1.1.4 What Is New in MySQL 5.5          1.1.5 MySQL Development History          1.1.6 MySQL Information Sources          1.1.7 How to Report Bugs or Problems          1.1.8 MySQL Standards Compliance          1.1.9 Credits          1.2 Installing and Upgrading MySQL          1.2.1 General Installation Guidance          1.2.2 Installing MySQL from Generic Binaries on Unix/Linux          1.2.3 Intalling MySQL on Microsoft Windows          1.2.4 Intalling MySQL on Mac OS X          1.2.5 Intalling MySQL on Linux          1.2.6 Intalling MySQL Using Unbreakable Linux Network (ULN)          1.2.7 Intalling MySQL on Solaris and OpenSolaris          1.2.8 Intalling MySQL on HP-UX          1.2.9 Intalling MySQL on FreeBSD          1.2.10 Intalling MySQL from Source          1.2.11 Postinstallation Setup and Testing          1.2.12 Upgrading or Downgrading MySQL          1.2.13 Environment Variables          1.2.14 Perl Installation Notes          1.3 Tutorial          1.3.1 Connecting to and Disconnecting from the Server          1.3.2 Entering Queries          1.3.3 Creating and Using a Database          1.3.4 Getting Information About Databases and Tables          1.3.5 Using MySQL in Batch Mode          1.3.6 Examples of Common Queries          1.3.7 Using MySQL with Apache          1.4 MySQL Programs          1.4.1 Overview of MySQL Programs          1.4.2 Using MySQL Programs          1.4.3 MySQL Server and Server-Startup Programs          1.4.4 MySQL Installation-Related Programs          1.4.5 MySQL Client Programs          1.4.6 MySQL Administrative and Utility Programs          1.4.7 MySQL Program Development Utilities          1.4.8 Miscellaneous Programs          1.5 MySQL Server Administration          1.5.1 The MySQL Server          1.5.2 MySQL Server Logs          1.5.3 Running Multiple MySQL Instances on One Machine          1.5.4 Tracing MySQL Using DTrace          1.6 Security          1.6.1 General Security Issues          1.6.2 The MySQL Access Privilege System          1.6.3 MySQL User Account Management          1.7 Backup and Recovery          1.7.1 Backup and Recovery Types          1.7.2 Database Backup Methods          1.7.3 Example Backup and Recovery Strategy          1.7.4 Using mysqldump for Backup          1.7.5 Point-in-Time (Incremental) Recovery Using the Binary Log          1.7.6 MyISAM Table Maintenance and Crash Recovery          1.8 Optimization          1.8.1 Optimazation Overview          1.8.2 Optimizing SQL Statements          1.8.3 Optimization and Indexes          1.8.4 Optimizing Database Structure          1.8.5 Optimizing for InnoDB Tables          1.8.6 Optimizing MyISAM Tables          1.8.7 Optimizing for MEMORY Tables          1.8.8 Understanding the Query Execution Plan          1.8.9 Buffering and Caching          1.8.10 Optimizing Locking Operations          1.8.11 Optimizing the MySQL Server          1.8.12 Measuring Performance (Benchmarking)          1.8.13 Internal Details of MySQL Optimizations          1.9 Language Structure          1.9.1 Literal Values          1.9.2 Schema Object Names          1.9.3 Reserved Words          1.9.4 User-Defined Variables          1.9.5 Expression Syntax          1.9.6 Comment Syntax          1.10 Globalization          1.10.1 Character Set Support          1.10.2 Setting the Error Message Language          1.10.3 Adding a Character Set          1.10.4 Adding a Collation to a Character Set          1.10.5 Character Set Configuration          1.10.6 MySQL Server Time Zone Support          1.10.7 MySQL Server Locale Support          1.11 Data Types          1.11.1 Data Type Overview          1.11.2 Numeric Types          1.11.3 Data and Time Types          1.11.4 String Types          1.11.5 Data Type Default Values          1.11.6 Data Type Storage Requirements          1.11.7 Choosing the Right Type for a Column          1.11.8 Using Data Types from Other Database Engines          1.12 Functions and Operators          1.12.1 Function and Operator Reference          1.12.2 Type Conversion in Expression Evaluation          1.12.3 Operators          1.12.4 Control Flow Functions          1.12.5 String Functions          1.12.6 Numeric Functions and Operators          1.12.7 Date and Time Functions          1.12.8 What Calendar Is Used By MySQL          1.12.9 Full-Text Search Functions          1.12.10 Cast Functions and Operators          1.12.11 XML Functions          1.12.12 Bit Functions          1.12.13 Encryption and Compression Functions          1.12.14 Information Functions          1.12.15 Miscellaneous Functions          1.12.16 Functions and Modifiers for Use with GROUP BY Clauses          1.12.17 Spatial Extensions          1.12.18 Precision Math          1.13 SQL Statement Syntax          1.13.1 Data Definition Statements          1.13.2 Data Manipulation Statements          1.13.3 MySQL Transactional and Locking Statements          1.13.4 Replication Statements          1.13.5 SQL Syntax for Prepared Statements          1.13.6 MySQL Compound-Statement Syntax          1.13.7 Database Administration Statements          1.13.8 MySQL Utility Statements          1.14 Storage Engines          1.14.1 Setting the Storage Engine          1.14.2 Overview of MySQL Storage Engine Architecture          1.14.3 The InnoDB Storage Engine          1.14.4 New Features of InnoDB 1.1          1.14.5 The MyISAM Storage Engine          1.14.6 The MEMORY Storage Engine          1.14.7 The CSV Storage Engine          1.14.8 The ARCHIVE Storage Engine          1.14.9 The BLACKHOLE Storage Engine          1.14.10 The MERGE Storage Engine          1.14.11 The FEDERATED Storage Engine          1.14.12 The EXAMPLE Storage Engine          1.14.13 Other Storage Engines          1.15 High Availability and Scalability          1.15.1 Oracle VM Template for MySQL Enterprise Edition          1.15.2 Using MySQL with DRBD          1.15.3 Using Linux HA Heartbeat          1.15.4 Using MySQL within an Amazon EC2 Instance          1.15.5 Using ZFS Replication          1.15.6 Using MySQL with memcached          1.15.7 MySQL Proxy          1.16 Replication          1.16.1 Replication Configuration          1.16.2 Replication Implementation          1.16.3 Replication Solutions          1.16.4 Replication Notes and Tips          1.17 MySQL Cluster NDB 7.2          1.17.1 MySQL Cluster Overview          1.17.2 MySQL Cluster Installation          1.17.3 MySQL Cluster Configuration          1.17.4 MySQL Cluster Programs          1.17.5 Management of MySQL Cluster          1.17.6 MySQL Cluster Replication          1.17.7 Changes in MySQL Cluster          1.18 Partitioning          1.18.1 Overview of Partitioning in MySQL          1.18.2 Partitioning Types          1.18.3 Partition Management          1.18.4 Partition Pruning          1.18.5 Restrictions and Limitations on Partitioning          1.19 Stored Programs and Views          1.19.1 Defining Stored Programs          1.19.2 Using Stored Routines (Procedures and Functions)          1.19.3 Using Triggers          1.19.4 Using the Event Scheduler          1.19.5 Using Views          1.19.6 Access Control for Stored Programs and Views          1.19.7 Binary Logging of Stored Programs          1.20 INFORMATION_SCHEMA Tables          1.20.1 The INFORMATION_SCHEMA COLLATIONS Table          1.20.2 The INFORMATION_SCHEMA COLLATION_CHARACTER_SET_APPLICABILITY Table          1.20.3 The INFORMATION_SCHEMA COLUMNS Table          1.20.4 The INFORMATION_SCHEMA COLUMN_PRIVILEGES Table          1.20.5 The INFORMATION_SCHEMA ENGINES Table          1.20.6 The INFORMATION_SCHEMA EVENTS Table          1.20.7 The INFORMATION_SCHEMA GLOBAL_STATUS and SESSION_STATUS Tables          1.20.8 The INFORMATION_SCHEMA GLOBAL_VARIABLES and SESSION_VARIABLES Tables          1.20.9 The INFORMATION_SCHEMA KEY_COLUMN_USAGE Table          1.20.10 The INFORMATION_SCHEMA PARAMETERS Table          1.20.11 The INFORMATION_SCHEMA PARTITIONS Table          1.20.12 The INFORMATION_SCHEMA PLUGINS Table          1.20.13 The INFORMATION_SCHEMA PROCESSLIST Table          1.20.14 The INFORMATION_SCHEMA PROFILING Table          1.20.15 The INFORMATION_SCHEMA REFERENTIAL_CONTRAINTS Table          1.20.16 The INFORMATION_SCHEMA ROUTINES Table          1.20.17 The INFORMATION_SCHEMA SCHEMATA Table          1.20.18 The INFORMATION_SCHEMA SCHEMA_PRIVILEGES Table          1.20.19 The INFORMATION_SCHEMA STATISTICS Table          1.20.20 The INFORMATION_SCHEMA TABLES Table          1.20.21 The INFORMATION_SCHEMA TABLESPACES Table          1.20.22 The INFORMATION_SCHEMA TABLE_CONSTRAINTS Table          1.20.23 The INFORMATION_SCHEMA TABLE_PRIVILEGES Table          1.20.24 The INFORMATION_SCHEMA TRIGGERS Table          1.20.25 The INFORMATION_SCHEMA USER_PRIVILEGES Table          1.20.26 The INFORMATION_SCHEMA VIEWS Table          1.20.27 INFORMATION_SCHEMA Tables for InnoDB          1.20.28 INFORMATION_SCHEMA Tables for MySQL Cluster          1.20.29 Thread Pool INFORMATION_SCHMA Tables          1.20.30 Extendions to SHOW Statements          1.21 MySQL Performace Schema          1.21.1 Performance Schema Quick Start          1.21.2 Performance Schema Configuration          1.21.3 Performance Schema Queries          1.21.4 Performance Schema Instrument Naming Conventions          1.21.5 Performance Schema Status Monitoring          1.21.6 Performance Schema General Table Characteristics          1.21.7 Performance Schema Table Descriptions          1.21.8 Performance Schema System Variables          1.21.9 Performance Schema Status Variables          1.21.10 Performance Schema and Plugins          1.21.11 Using the Performance Schema to Diagnose Problems          1.22 Connectors and APIs          1.22.1 MySQL Connector/ODBC          1.22.2 MySQL Connector/Net          1.22.3 MySQL Connector/J          1.22.4 MySQL Connector/C++          1.22.5 MySQL Connector/C          1.22.6 MySQL Connector/Python          1.22.7 MySQL Connector/OpenOffice.org          1.22.8 libmysqld, the Embedded MySQL Server Library          1.22.9 MySQL C API          1.22.10 MySQL PHP API          1.22.11 MySQL Perl API          1.22.12 MySQL Python API          1.22.13 MySQL Ruby API          1.22.14 MySQL Tcl API          1.22.15 MySQL Eiffel Wrapper          1.23 Extending MySQL          1.23.1 MySQL Internals          1.23.2 The MySQL Plugin API          1.23.3 Adding New Functions to MySQL           1.23.4 Debugging and Porting MySQL           1.24 MySQL Enterprise Monitor          1.25 MySQL Enterprise Backup          1.26 MySQL Workbench          1.27 MySQL for Excel          1.27.1 Installing and Configuring          1.27.2 Edit MySQL Data          1.27.3 Import MySQL Data          1.27.4 Append MySQL Data          1.27.5 Export MySQL Data          1.28 A. Licenses for Third-Party Components          1.28.1 Anti-Contrib License          1.28.2 ANTLR 3 License          1.28.3 ANTLR 3.3 License          1.28.4 Boost Library License          1.28.5 dtoa.c License          1.28.6 Editing Library (libedit) License          1.28.7 FindGTest.cmake License          1.28.8 Fred Fish's Dbug Library License          1.28.9 getarg License          1.28.10 GLib License (for MySQL Proxy)          1.28.11 GNU General Public License Version 2.0, June 1991          1.28.12 GNU Lesser General Public License Version 2.1, February 1999          1.28.13 GNU Libtool License          1.28.14 GNU Readline License          1.28.15 Google Controlling Master Thread I/O Rate Patch License          1.28.16 Google Perftools (TCMalloc Utility) License          1.28.17 Google SMP Patch License          1.28.18 lib_sql.cc License          1.28.19 Libaio License          1.28.20 libevent License          1.28.21 Libiconv License          1.28.22 libintl License          1.28.23 Linux-PAM License          1.28.24 LPeg Library License          1.28.25 Lua (libiua) License          1.28.26 LuaFileSystem Library License          1.28.27 md5 (Message-Digest Algorithm 5) License          1.28.28 memcached License          1.28.29 nt_serv (Windows NT Service class library) License          1.28.30 OpenPAM License          1.28.31 Paramiko License          1.28.32 PCRE License          1.28.33 Percona Multiple I/O Threads Patch License          1.28.34 Python License          1.28.35 Red HAT RPM Spec File License          1.28.36 RegEX-Spencer Library License          1.28.37 RFC 3174 - US Secure Hash Algorithm 1 (SHA1) License          1.28.38 Richard A. O'Keefe String Library License          1.28.39 SHA-1 in C License          1.28.40 Simple Logging Facade for Java (SLF4J) License          1.28.41 zlib License          1.28.42 ZLIP.NET License          1.29 B. MySQL 5.5 Frequently Asked Questions          1.29.1 MySQL 5.5 FAQ: General          1.29.2 MySQL 5.5 FAQ: Storage Engines          1.29.3 MySQL 5.5 FAQ: Server SQL Mode          1.29.4 MySQL 5.5 FAQ: Stored Procedures and Functions          1.29.5 MySQL 5.5 FAQ: Triggers          1.29.6 MySQL 5.5 FAQ: Views          1.29.7 MySQL 5.5 FAQ: INFORMATION_SCHEMA          1.29.8 MySQL 5.5 FAQ: Migration          1.29.9 MySQL 5.5 FAQ: Security          1.29.10 MySQL FAQ: MySQL 5.5 and MySQL Cluster          1.29.11 MySQL 5.5 FAQ: MySQL Chinese, Japanese, and Korean Character Set          1.29.12 MySQL 5.5 FAQ: Connectors & APIs          1.29.13 MySQL 5.5 FAQ: Replication          1.29.14 MySQL 5.5 FAQ: MySQL Enterprise Scalability Thread Pool          1.29.15 MySQL 5.5 FAQ: MySQL, DRBD, and Heartbeat          1.30 C. Errors, Error Codes, and Common Problems          1.30.1 Sources of Error Information          1.30.2 Types of Error Values          1.30.3 Server Error Codes and Messages          1.30.4 Client Error Codes and Messages          1.30.5 Problems and Common Errors          1.31 D. MySQL Change History          1.31.1 Changes in Release 5.5.x (Production)          1.31.2 MySQL Connector/ODBC (MyODBC) Change History          1.31.3 MySQL Connector/Net Change History          1.31.4 MySQL Visual Studio Plugin Change History          1.31.5 MySQL Connector/J Change History          1.31.6 MySQL Connector/C++ Change History          1.31.7 MySQL Proxy Change History          1.31.8 MySQL for Excel Change History          1.31.9 MySQL Installer Change History          1.32 E. Restrictions and Limits          1.32.1 Restrictions on Stored Programs          1.32.2 Restrictions on Condition Handling          1.32.3 Restrictions on Server-Side Cursors          1.32.4 Restrictions on Subqueries          1.32.5 Restrictions on Views          1.32.6 Restrictions on XA Transactions          1.32.7 Restrictions on Character Sets          1.32.8 Restrictions on Performance Schema          1.32.9 Restrictions on Pluggable Authentication          1.32.10 Limits in MySQL          1.33 F. MySQL Glossary          1.34 General Index          1.35 C Function Index          1.36 Command Index          1.37 Function Index          1.38 INFORMATION_SCHEMA Index          1.39 Transaction Isolation Level Index          1.40 Join Types Index          1.41 Operator Index          1.42 Option Index      It is divided into sections, subsections and sub subsections. But the output to PDF comes out as a 2 page document as follows (the first page is blank):               ￼1     1 A2:     1.1 General Information     1.1.1 About This Manual     1.1.2 Typographical and Syntax Conventions     1.1.3 Overview of the MySQL Database Management System     1.1.4 What Is New in MySQL 5.5     1.1.5 MySQL Development History     1.1.6 MySQL Information Sources     1.1.7 How to Report Bugs or Problems     1.1.8 MySQL Standards Compliance     1.1.9 Credits     1.2 Installing and Upgrading MySQL     1.2.1 General Installation Guidance     1.2.2 Installing MySQL from Generic Binaries on Unix/Linux     1.2.3 Intalling MySQL on Microsoft Windows     1.2.4 Intalling MySQL on Mac OS X     1.2.5 Intalling MySQL on Linux     1.2.6 Intalling MySQL Using Unbreakable Linux Network (ULN)     1.2.7 Intalling MySQL on Solaris and OpenSolaris     1.2.8 Intalling MySQL on HP-UX     1.2.9 Intalling MySQL on FreeBSD     1.2.10 Intalling MySQL from Source     1.2.11 Postinstallation Setup and Testing     1.2.12 Upgrading or Downgrading MySQL     1.2.13 Environment Variables     1.2.14 Perl Installation Notes     1.3 Tutorial     1.3.1 Connecting to and Disconnecting from the Server     1.3.2 Entering Queries     1.3.3 Creating and Using a Database     1.3.4 Getting Information About Databases and Tables     2     1.3.5 Using MySQL in Batch Mode     1.3.6 Examples of Common Queries     1.3.7 Using MySQL with Apache     1.4 MySQL Programs     1.4.1 Overview of MySQL Programs     1 A2:      ￼Not sure what's going on. Why is LyX messing up with the output? (Just to clarify, the output document does not have all the text. It gets cut down to one page; the first page is empty and the second page has some of the text, resulting in a 2 page document.) The document layout is set to fancy. Everything else is on its default settings. I'd really appreciate help on this. And I apologize if this has already been asked before. Here's the file in .lyx format: http://www.4shared.com/file/bDbqV2kd/testTex1.html Here's the output to the file in PDF: http://www.4shared.com/office/bazrKiBG/testTex1.html If 4shared asks for an account and password, please use the following that I created just for you guys: User Email: paininbuttocks2012@gmail.com Password: passwordfortex Here's the link to the whole LyX document (as a simple text file) on pastebin: http://pastebin.com/iPPzVYmw


title: Is this branching code I wrote a bit obfuscated?

text: I've been away for a while and I forget if this sort of question is appropriate, but here goes. Recently I wrote some code (in `expl3` but I hope it's clear enough) and in hindsight I wonder on its style. Some comments after the snippet (slightly adapted from `unicode-math`):               \cs_new:Nn \um_if_char_spec:nNNT       {         % case 1:         \seq_if_in:NnT \l_um_mclass_range_seq {#3} { \use_none_delimit_by_q_nil:w }              % case 2:         \seq_if_in:NnT \l_um_cmd_range_seq {#2} { \use_none_delimit_by_q_nil:w }              % case 3:         \seq_map_inline:Nn \l_um_char_range_seq           {             \um_int_if_slot_in_range:nnT {#1} {##1}               { \seq_map_break:n { \use_none_delimit_by_q_nil:w } }           }              % this executes if no match was found:         \use_none:nnn         \q_nil         \use:n           {             \clist_put_right:Nx \l_um_char_num_range_clist { \int_eval:n {#1} }             #4           }       }      The idea is that three possibilities can cause a match and execute some additional "true" code. Checking for these matches can be time-consuming so any true occurrence should immediately jump to the end. This is done by `\use_none_delimit_by_q_nil:w` which skips ahead to the `\q_nil` token and ignores everything in its way. At which point it executes the "true" code. This could normally be done with a set of nested conditionals like so:                iftrue-(code)-else-(iftrue-(code)-else-(iftrue-(code))))      but I guess I didn't want to write out the `(code)` section several times — it seemed inelegant and error-prone. So what do you think? Is this code ugly? How would you write it?


title: Keyword-Based Documentation Help

text: When refering to shell commands and system calls, `man` provides a consistent, systematic, offline reference. The python interpreter's `help` command does the same for python. Does *tex have an equivalent?


title: Using \SplitArgument with r() arguments in xparse

text: I have been experimenting with using the `xparse` package for custom document macros with a Markdown-like syntax. For example, I used to write `\cut{x}{P}{Q}` to produce ![cut output](http://i.stack.imgur.com/3NAc7.png). With the help of `xparse`, I would like to instead write `\cut(x)(P | Q)` \-- I find this Markdown-like syntax much easier to read in the document's source. (In case you're not convinced of the benefit, also compare `\send{y,x'}{x}{y,x'}{P}{Q}` with `\send (y,x')(x<y,x'> | P | Q)` as a means of producing ![send output](http://i.stack.imgur.com/LlFHI.png).) The code that I'm currently using to define `\cut` is:               \documentclass{article}     \usepackage{xparse}          \ExplSyntaxOn     \NewDocumentCommand{\cut}{r() >{\SplitArgument{1}{|}}r()}{%       (\nu #1)(\use_i:nn#2 \mid \use_ii:nn#2)%     }     \ExplSyntaxOff          \begin{document}       Example 1: $\cut(x)(P | Q)$ % Works great!            % Example 2: $\cut(x)(P | \cut(y)(Q_1 | Q_2))$ % Fails with error            Example 3: $\cut(x)(P | {\cut(y)(Q_1 | Q_2)})$ % Works, but slightly annoying     \end{document}      When `\cut`s are not nested (as in Example 1 above), then everything works perfectly. However, I sometimes need to nest `\cut`s (as in Example 2 above). Unfortunately, I then get an `xparse/split-excess-tokens` error: "Too many `|` tokens when trying to split argument." **Question:** Is there any way to force `xparse` to treat `r()` as groups when splitting arguments so that this error is avoided? Alternatively, can I turn off or reduce this error to a warning by setting some `xparse` option? Of course, I can add a group explicitly myself (as in Example 3 above), but this is somewhat annoying. Another compromise is to make the second argument to `\cut` an `m`-type argument and write `\cut(x){P | \cut(y){Q_1 | Q_2}}`, but I'd rather avoid this if possible.


title: How to make bold all of the TOC by default?

text: Is there a way to make all the table of contents bold by default?


title: how to test if tikz library is loaded

text: I want to write some demo code showing code with examples for tikz. However I want the resulting pdf to be automatically depended on the tikz libraries and therefore I must test which are loaded. Is this functionality implemented in tikz already or can I test for the existence of special commands? EDIT: Example which shows that the code does not work outside the preamble. I however need code that works everywhere:               \documentclass[]{scrbook}          \usepackage{pgf}     \usepackage{tikz}          \usetikzlibrary{circuits}          \makeatletter     \newcommand*\@tikzextension{code.tex}     \def\IfTikzLibraryLoaded#1{%        \@ifl@aded\@tikzextension{tikzlibrary#1}     }     \makeatother          \listfiles          \begin{document}         \IfTikzLibraryLoaded{circuits}{is loaded}{not loaded}     \end{document}


title: How to label Table and Figure side-by-side with combined caption

text: Adapted from Thorsten Donigs answer in Table and Figure side-by-side with independent captions The Caption correctly numbers the figure and table but how does the correct setup of the labels independently for the figure and the table for referencing in the text work in this example?               \documentclass[11pt,a4paper,english]{report}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{babel}     \usepackage[font=small,labelfont=bf]{caption}     \usepackage{hyperref}     \usepackage{graphicx}          \DeclareCaptionLabelFormat{andtable}{#1~#2  \&  \tablename~\thetable}          \begin{document}          \begin{figure}[!ht]         \centering            \rule{3cm}{3cm}         \caption{pic1}     \end{figure}          \autoref{tab:table123} %will give Figure 2 instead of Table 1.          \begin{figure}[!ht]         \centering            \rule{3cm}{3cm}         \hfill         \begin{tabular}[b]{cc}\hline           Table head & Table head \\ \hline           Some values & Some values \\           Some values & Some values \\\hline         \end{tabular}         \captionlistentry[table]{entry for table}         \captionsetup{labelformat=andtable}         \caption{some caption for both.}         \label{tab:table123}         \label{fig:pic2}     \end{figure}          \end{document}


title: How to globally set \verb font style to match the default document style?

text: I would like to set the `\verb{}` font so to correspond to the current family and size of my document. That is, the output must be indistinguishable by the rest of the text body whatever style is set as default.


title: tikz example from manual fails

text: I have copied an example from the tikz manual, but it fails to compile               \documentclass[]{scrbook}          \usepackage{pgf}     \usepackage{tikz}          \usetikzlibrary{circuits}     \usetikzlibrary{circuits.logic.IEC}          \listfiles          \begin{document}     \begin{tikzpicture}[rotate=-90,                     circuit ee IEC,                     x=3.25cm,y=2.25cm,semithick,                     every info/.style={font=\footnotesize},                     small circuit symbols,                     set resistor graphic=var resistor IEC graphic,                     set diode graphic=var diode IEC graphic,                     set make contact graphic= var make contact IEC graphic]     % Let us start with some contacts:     \foreach \contact/\y in {1/1,2/2,3/3.5,4/4.5,5/5.5}     {       \node [contact] (left contact \contact) at (0,\y) {};       \node [contact] (right contact \contact) at (1,\y) {};     }     \end{tikzpicture}     \end{document}      Some samples of the errors messages: > Package pgfkeys Error: I do not know the key '/tikz/circuit ee IEC' > > Package pgfkeys Error: I do not know the key '/tikz/set resistor graphic'


title: Using tocloft getting chapter height problems

text: As shown in my MWE I'm using `tocloft` to add dots next to my chapters in the TOC. It works, but for a reason I don't know, the headings of the TOC, LOF, LOT are not on the same height as the regular chaptertitles anymore. MWE:               \documentclass[pdftex, 12pt, oneside]{book}     \usepackage[english]{babel}     \usepackage{tocloft}      \renewcommand\cftchapaftersnum{.}      \renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}}     \usepackage{titlesec}      \titleformat{\chapter}{\huge\bfseries}{\thechapter}{20pt}{\huge}      \titlespacing*{\chapter}{0pt}{10pt}{30pt}     \usepackage[paper = a4paper, margin = 1in]{geometry}          \begin{document}      \frontmatter       \tableofcontents      \mainmatter       \chapter*{Chapter without number}        \addcontentsline{toc}{chapter}{Chapter without number}         Hello world!       \chapter{Chapter with number}         Hello world, again!     \end{document}      Does anyone has an idea why that's so and has a solution for my problem?


title: Naming the nodes of `nodes near coords` for later use

text: I would like to use `pgfplots` command `nodes near coords` to get a list of named node (`(no1)`, `(no2)`, `(no3)` etc.) that I can use afterwards to draw some paths that I fail to construct with `pgfplots` only. I suppose it would need to use `scatter/@post marker code` but I did not understand very well that part of the manual (p. 82). Actually, if `nodes near coords` is a redefinition of `scatter/@pre marker code` so I suppose I don't really need `nodes near coords` and could use a altered scatter. I did not find however the code defining `nodes near cords` in the manual and got lost into the huge code files of `pgfplots`. Here is an example taken from the `pgfplots` manual that could constitute a minimum example:               \begin{tikzpicture}     \begin{axis}[nodes near coords]     \addplot+[only marks] coordinates {     (0.5,0.2) (0.2,0.1) (0.7,0.6)     (0.35,0.4) (0.65,0.1)};     \end{axis}     \end{tikzpicture}      Unfortunately I just do not know if that is really part of the answer.


title: Patchplots not working recently?

text: While modifying some images that I created using the `patchplots` library from `pgfplots` I noted that the actual colors inside the axis are missing (I had not touched these images for a few weeks and updated MiKTeX in the meantime). Trying to boil down the problem it turns out that not even the example from the manual seems to work anymore. Trying to fix the issue I also updated TikZ and pgfplots to their most recent versions but this did not help. Can anybody reproduce this issue? Here is my MWE (basically copied from the manual):               \documentclass{standalone}          \usepackage{tikz}     % build 2013-06-16          \usepackage{pgfplots}     % 2013-06-28 Revision 1.8-39-g32728b1     \pgfplotsset{compat=1.8}           \usepgfplotslibrary{patchplots}          \begin{document}          \begin{tikzpicture}              \begin{axis}[small,view={0}{90}, colorbar]             \addplot3[surf,shader=interp,patch type=bilinear]   coordinates {(0,0,0) (1,0,0) (0,1,0) (1,1,1)};         \end{axis}          \end{tikzpicture}          \end{document}      Which yields the following output: ![enter image description here](http://i.stack.imgur.com/C536V.png)


title: Use of unicode-math results in "unprintable" PDF

text: In the following example, if I uncomment the inclusion of `unicode-math`, I still get an PDF that shows up fine in my PDF Viewer (Evince), but none of the equation shows up in print. Why is that?               \documentclass{scrartcl}          \usepackage{fontspec}     %\usepackage{unicode-math}     %\setmathfont{Asana Math}     % uncomment the previous two lines to get ``unprintable'' PDF          \begin{document}          magnetic constant $\mu_0 = 4\pi·10^{-7} \frac{\mathrm{H}}{\mathrm{m}}$           \end{document}      **Edit:** After updating to TL2013, the problem still persists. I guess some printer drivers have problems with the generated PDF (trying it on a Brother HL-5350DN btw). When I convert the PDF to PostScript with pdftops, the resulting *.ps file prints just fine. I'll try with my Canon printer at home later. **Edit 2:** My Canon printer (MP-600R, with the default Ubuntu drivers) is doing the same thing, no equation. **Edit 3:** Output of `pdffonts`:               name                                 type              encoding         emb sub uni object ID     ------------------------------------ ----------------- ---------------- --- --- --- ---------     CELWMH+LMRoman10-Regular             CID Type 0C       Identity-H       yes yes yes      4  0     TRFNXO+Asana-Math                    CID Type 0C       Identity-H       yes yes yes      5  0     GZWLZZ+Asana-Math                    CID Type 0C       Identity-H       yes yes yes      6  0


title: Format of unnumbered chapter in TOC to be equal to the format of numbered chapter

text: I am using `classicthesis` and `arsclassica` to write my thesis. I have used `\addchap` to add a unnumbered chapter, that is automatically added to the TOC. However, the graphic format/font of those unnumbered chapters is different, and I would like to make it equal to the format of the numbered chapters? ![Imgur](http://i.imgur.com/AxrMJwR.png) In the image, I would like to change "Sommario,Abstract,Introduzione" to be equale to LOREM (and also, if possible, to align them to the L)               \documentclass[10pt,%                                        a4paper,%                                      twoside,openright,%             %              oneside,openany,%                             titlepage,%                                   headinclude,,footinclude,%                      BCOR5mm,%                                      cleardoublepage=empty,%                        captions=tableheading,%                           ]{scrreprt}         \usepackage[T1]{fontenc}          \usepackage{lipsum}     \usepackage[utf8]{inputenc}     \usepackage[english,italian]{babel}                 \usepackage[eulerchapternumbers,%                         beramono,%                                    eulermath,%                                     pdfspacing,%                                  listings,%                       %           parts,%                                        ]{classicthesis}        \usepackage{arsclassica}         \begin{document}     \hypersetup{pageanchor=false}     \pagestyle{scrheadings}      \pagenumbering{gobble}               \cleardoublepage     \pdfbookmark{\contentsname}{tableofcontents}     \setcounter{tocdepth}{2}     \tableofcontents     \markboth{\spacedlowsmallcaps{\contentsname}}{\spacedlowsmallcaps{\contentsname}}      \cleardoublepage          \hypersetup{pageanchor=true}     \pagenumbering{arabic}          \deftripstyle{pgnumtopouter}{}{}{\pagemark}{}{}{}     \renewcommand{\chapterpagestyle}{pgnumtopouter}          \cleardoublepage     \phantomsection     \pdfbookmark{Sommario}{Sommario}     \begingroup     \let\clearpage\relax     \let\cleardoublepage\relax     \let\cleardoublepage\relax          \addchap{Sommario}          Qui Abstract in italiano          \lipsum     \lipsum     \lipsum     \lipsum     \lipsum     \vfill          \selectlanguage{english}     \pdfbookmark{Abstract}{Abstract}          \addchap{Abstract}     \lipsum     \lipsum     \lipsum     Qui abstract in inglese          \selectlanguage{italian}          \endgroup                     \vfill          \chapter{Lorem}     \label{cap:lorem}     \lipsum     \lipsum     \lipsum     \lipsum     \end{document}      Thank you


title: How can I suppress a terminal ligature?

text: The standard techniques for suppressing ligatures, such as inserting an empty group, or placing the characters that would normally form a ligature individually in groups, do not seem to work for ligatures that are formed on account of being terminal. For example:               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage[longs]{pacaslon}     \begin{document}     foss. fosse.     \end{document}      Here, the double ess in "foss" becomes an long-ess-short-ess ligature (the character is basically the same as an eszet, and uses that codepoint in the Adobe fonts), while that in "fosse" becomes a double-long-ess ligature. There is a rule that when a double-ess occurs at the end of an abbreviation before a full stop (period), it should not remain a double-long-ess ligature, not a long-ess-short-ess. So my question is, how can I suppress that ligature? Note that double ess becomes long-ess-short-ess at the end of a word, so merely writing e.g. "{foss}." won't change the outcome. Also, writing "fo{ſ}{ſ}" (i.e. separately grouping two long esses) won't work, as I want a long ess ligature. And that doesn't have a code point, so I can't easily write it, but if I could, it would immediately, finding itself at the end of a word, turn back into a long- ess-short-ess. Currently, the only solution I can find is to remove the ligatures turning double-long-ess into long-ess-short-ess before period from the TFM files, but then I have manually to add an empty group {} before almost every period (i.e. every period EXCEPT those denoting an abbreviation), which is error-prone and tedious. Since I can't find the acaslon package online any more, I've put a copy up at: http://rrt.adsensus.net/acaslon.zip


title: Using \jot crashes \intertext’s spacing

text: As mentioned in Intertext vertical spacing, there seems to be some inconsistencies in spacing around AMS’ macro `\intertext`, even without changing the length of `\jot`. But if I’m using a longer `\jot` to get mor space between equations in array, the problem gets a real problem. This is an example showing the problem:               \documentclass[11pt,fleqn,ngerman,DIV=8]{scrartcl}     \usepackage{lmodern}          \usepackage{amsmath}     \setlength{\jot}{2\baselineskip}          \begin{document}     Text Text Text Text Text Text Text Text Text Text Text      \begin{equation}         m\cdot a\cdot t\cdot h = 0     \end{equation}     Text Text Text Text Text Text Text Text Text Text Text     \begin{align}         m &= 0\\     \intertext{Intertext Intertext Intertext Intertext Intertext}         a &= t\cdot h/2     \end{align}     Text Text Text Text Text Text Text Text Text Text Text     \begin{align}         (a+b)^2 &\neq \left(a^2+b^2\right)\cdot\left(a^2+b^2\right)\\         &=\left(a^2+2ab+b^2\right)     \end{align}     \end{document}      Does anybody know how to get exactly the same spacing with `\intertext` as without it?


title: Sans-serif to go with EB Garamond (no math)?

text: Suggestions for a good sans-serif font to go with (compliment) EB Garamond? Math and non-Western European support are _not_ required. Text is fiction, not academic or scientific. English with an occasional word or phrase in French. I'm using LuaLaTeX from TexLive 2013 on Windows 7 but that should not matter. Too many choices, too little time.


title: Two titles on a beamer presentation

text: I am presenting two papers at once and I'd like to put both titles on the same page. The papers have different sets of authors too, so I'd like to display that. Any suggestion on how to accomplish this is much appreciated.


title: Equation counter automatically resets after using \tag

text: I am currently writing my master thesis, and I have just noticed that I have a problem, that I don't know how to solve. My thesis is divided into several chapters. In the first chapter I have an equation, which I want to state again in the second chapter, with the same equation number. To do this I use \tag, by writing `\tag{\ref{eq:1}}`. The problem is that after doing this, the equation counter resets. So now I have two different equations labeled (2.1). I have been trying to cook up a minimal working example, but I can't really spot the error. So I have made an example to show what I am doing, but when I compile it, it looks as it should.               \documentclass[12pt]{memoir}     \usepackage[english]{babel}     \usepackage[ansinew]{inputenc}     \usepackage{mathtools}     \mathtoolsset{showonlyrefs,showmanualtags}          \begin{document}     \chapter{First}     First equation     \begin{equation}     \label{eq:1}     abc     \end{equation}          \chapter{Second}     Second equation     \begin{equation}     \label{eq:2}     xyz     \end{equation}     \eqref{eq:2}          Lets recap \eqref{eq:1}     \begin{equation}     \label{eq:3}     abc \tag{\ref{eq:1}}     \end{equation}     Ref: \eqref{eq:3}          And another equation     \begin{equation}     \label{eq:4}     ijk     \end{equation}     Ref: \eqref{eq:4}          \end{document}      Does anyone have an idea what the problem is - or even more importantly, how I solve it?


title: How to redefine definition theoremstyle to use a letter instead of a number

text: I need to redefine the theorem style. Is it possible to change the numbers to letters?               \theoremstyle{definition}     \newtheorem{problem}{Problem}     \begin{problem}     fff     \end{problem}     \begin{problem}     ccc     \end{problem}      I need to do this: > Problem A. fff > > Problem B. ccc instead of using numbers.


title: Recent (one year) change in the handout mode of Beamer?

text: Help requested for the handout mode of the beamer class. I have been using it fairly minimally for a few years. About a year ago the handout mode stopped producing all the pages. The presentation mode works fine. This is my preamble for the handout:                \documentclass[xcolor=pst,dvips,11pt,handout]{beamer}      %      \usepackage{pgfpages}      \pgfpagesuselayout{4 on 1}[letterpaper, border shrink=4mm,landscape]      \mode<handout>{\setbeamercolor{background canvas}{bg=black!5}}      Used to work fine, now does not. Any clue would be appreciated. Running latest TexLive version on linux, Mint 17.


title: Drawing Loops in TikZ

text: I need your kind help to convert this image in TikZ/PGF, if possible: ![enter image description here](http://i.stack.imgur.com/ZzJuy.png) FYI , I want to use the image on a `beamerslide` and a standard `article` type document (A4 paper). I used Inkscape (`.svg > .png`), which does the job OK. But it doesn't provide any `TikZ` code - instead give `PSTricks` type code, which is even more confusing to me. Is there any GUI for `TikZ/PGF`?


title: Beamer ignoring a \label when used inside certain \only's

text: For space reasons I want to break up the contents of an `itemize` list into separate slides, which I have been doing without much problem using `\only`. However, the following minimal document complains that the label `eq:formula` is not defined:               \documentclass{beamer}     \begin{document}     \begin{frame}{Title}      \begin{itemize}      \only<1>{       \item Item 1.      }             % Comment       \only<2>{     % these lines       \item Item 2, with equation       \begin{equation}        \label{eq:formula}        xyz       \end{equation}            \item Item 3, with reference \eqref{eq:formula}.      }      \end{itemize}     \end{frame}     \end{document}      As you can see, it is clearly defined. The problem goes away if you comment out the marked lines (thus, printing everything on one slide). I see using `\tracingmacros` that there is a serious redefinition of `\label` in beamer, and as such it appears that this is a bug with detecting what slide the label is printed on. Is that right, and what is the solution?


title: weird symbols when opening a file written in arabic

text: When I open a TeX file containing arabic letters, I only see weird letters. I tried WinEdt, Emacs, TeXMaker. But when I open the same file using Notepad, it looks OK. What shoud I do?


title: siunitx with reciprocal option misses \cdot between numerator and denominator

text: I have a minimal example of an `siunitx` usage which has some unwanted behavior, maybe a little bug.               \documentclass[a4paper,11pt,fleqn]{book}          \usepackage[inter-unit-product=\ensuremath{{}\cdot{}}]{siunitx}     \DeclareSIQualifier{\cat}{cat}          \begin{document}          \si[per-mode=reciprocal-positive-first]{\mole\square\meter\per\second\per\kilogram\cat}          \end{document}      It produces this: ![enter image description here](http://i.stack.imgur.com/pl2LH.png) Actually there should be a multiplication sign between the numerator and the denominator. Am I doing something wrong or does somebody agree with me that `siunitx` is behaving strangely?


title: using biblatex -formatting References section

text: I am studying `biblatex` and I'm using just a basic file...               \documentclass[12pt,a4paper]{article}     %\usepackage[style=authortitle]{biblatex}     %\usepackage[style=authoryear]{biblatex}     %\usepackage[style=numeric]{biblatex}     \usepackage[style=verbose]{biblatex}          %\labelnamepunct     \addbibresource{animation}          \begin{document}          he said this \footcite{Branston2006}     ...     and he said that\parencite{Branston2006}          Edwards\footcite{Edwards2005}          Hammel\footcite{Hammel2007}          Hornung\footcite{Hornung2005}          Maestri\footcite{Maestri1996}          \printbibliography     \end{document}      Which gives me the References section. But with the second line of each reference INDENTED.   1. How can I get rid of that indentation so that it simply flows on to the next line?   2. How can I rename the 'References' section to 'List of References'?


title: How to use \Large and its variants

text: I came across a German LaTeX page and found instructions like:   1. `\Large{bit bigger}`   2. `{\Large a bit bigger}`   3. `\begin{Large} ... \end{Large}` Is it true that all three are "correct"? I only remember the second one being correct for 1) `\Large` and others don't take an argument and perhaps I forgot about 3). Can somebody enlighten me?


title: Reduce natbib bibliography to one line

text: I would like my references to look like > Foo et al. 2008, Nature, 100, 200 • Bar & Baz et al. 2010, Science, 300, 400 > • Einstein, 1905, New Scientist, 5, 6 where "•" is perhaps some configurable delimiter character, rather than like: > Foo et al. 2008, Nature, 100, 200 > > Bar & Baz et al. 2010, Science, 300, 400 > > Einstein, 1905, New Scientist, 5, 6 One (the crucial?) difference between my question and a similar previous question is that I use natbib and author-year citations. Here's a minimal example, that uses Stefan's answer, but has a couple of problems:               \documentclass{article}     \usepackage{natbib}          \usepackage{paralist}     \renewenvironment{thebibliography}[1]{%       \section*{\refname}%       \let\par\relax\let\newblock\relax%       \inparaenum[{\textbullet}]}{\endinparaenum}     \renewcommand{\bibitem}[1]{\item}          \usepackage{filecontents}          \begin{filecontents}{\jobname.bib}     @article{Author,         Author = {{Author}, A.},         Journal = {Science},         Month = dec,         Pages = {493-+},         Title = {{Title A}},         Volume = 490,         Year = 1922,         }          @article{Buthor,         Author = {{Buthor}, B.},         Journal = {Nature},         Month = nov,         Pages = {748-+},         Title = {{Title B}},         Volume = 136,         Year = 1962,         }     \end{filecontents}          \begin{document}          Citations: \cite{Author,Buthor}          \bibliography{\jobname}     \bibliographystyle{plain}          \end{document}      The problems are: (1) The citations in the text are question marks (I get errors like `Package natbib Warning: Citation `Author' on page 1 undefined on input line 37.)` and (2) I'm redefining the list environment to put a bullet every time, which feels wrong semantically, and results in `Package paralist Warning: Incorrect label; no or multiple counters.` The third (and I think separate) problem is to do with my BiBTeX style file, `mn.bst`. If I use that rather than, e.g. `plain`, not only are the citations questions marks, but the references are screwed up and look like > • Author(1922)]Author Author A., 1922, Science, 490, 493 • > Buthor(1962)]Buthor Buthor B., 1962, Nature, 136, 748 Note the citations and references look fine if I comment out the material between `\usepackage{paralist}` and `\usepackage{filecontents}`. Guidance on any or all of these problems would be very welcome, and guidance that postpones my inevitable migration to biblatex especially so! :-)


title: How do I use \show?

text: Q: How do I use `\show` to determine macro definitions?. I've followed advice here: The definitions of LaTeX commands and here: \show with fewer lines? and am still struggling. I've naively tried running `\show\section` (to learn about the macro `\section`) in the WinEdt terminal. No luck. I've placed this code in a simple `.tex` document to be compiled. No luck. Note: this is a follow-up to my question: LaTeX equivalent to R's `help foo`?


title: In dvipng output, why does one side of equation expand to size of fractional side?

text: I have been using dvipng to produce png images of latex equations to be embedded in html, and the output is very nice. However, for equations with a fraction, the non-fraction side produces a font which is too big, almost as though it has expanded to respect the height of the fraction. My latex is:               \documentclass[12pt]{article}          \usepackage{amssymb}     \usepackage{color}     \usepackage{amsfonts}          \pagestyle{empty}     \begin{document}          $\nabla \times \mathbf{E} = \frac{\rho}{\varepsilon_0}$          \end{document}      and my command line arguments are               latex file.tex     dvipng -D 200 file.dvi -T tight -bg transparent      So for example, in this Maxwell equation, the 'del cross E' is noticably too large, whereas in a normal latex document this problem does not exist. ![image](http://i.stack.imgur.com/jRdrE.png) Is there anything wrong with my input?


title: Google searching LaTeX commands?

text: Q: How can I best search the web for **exact** LaTeX commands (e.g., `\show` as opposed to `show`)? It appears that Google will not allow us to escape the `\` character. So, searches for `\show` are interpreted as `show`. Needless to say, results would be tremendously more helpful if the search were interpreted as the former. (note: `"\show"` doesn't help either) Q: Has anyone had success searching LaTeX commands using **other** search engine? More generally, does anyone know of search engines that are particularly well-suited for searching non-standard characters?


title: Outputting parameter of \index

text: When I indicate an index entry using `\index` I have to type the text of the indexed word twice, in context and as a parameter of `\index`:                This is an index: Hello! \index{Hello} And ....      And when I decide to change the indexed word I have to make the change for two words. How can I force TeX to output the parameter of `\index` ? (Perhaps `\index*`!)


title: Beamer: tabular out of the boder

text: I am writing slides under `beamer`. A tabular is out of the boder of the slides. What shoud I do? Resize? ![enter image description here](http://i.stack.imgur.com/dRukb.png)               \begin{tabular}{ccc}       $\hat{\tmmathbf{v}}^1 = \frac{1}{\sqrt{N}} \left(\begin{array}{c}         1\\         1\\         1\\         \vdots\\         1       \end{array}\right)$, & $\hat{\tmmathbf{v}}^2 = \frac{1}{\sqrt{N}}       \left(\begin{array}{c}         1\\         \zeta^2\\         \zeta^3\\         \vdots\\         \zeta^{N - 1}       \end{array}\right)$, & $\hat{\tmmathbf{v}}^3 = \frac{1}{\sqrt{N}}       \left(\begin{array}{c}         1\\         \zeta^{2 \cdot 2}\\         \zeta^{3 \cdot 2}\\         \vdots\\         \zeta^{( N - 1) \cdot 2}       \end{array}\right)$,     \end{tabular}


title: Enumerate after \label

text: I have the following code:               \usepackage{hyperref}     \newtheorem{thm}{Theorem}          \begin{thm} \label{mythm}        \begin{enumerate}           \item         \end{enumerate}     \end{thm}          \ref{mythm}      The ref prints the right number. However, when I click on it, it will lead me to a wrong page (basically, to the beginning of the document). pdflatex also has some warning. If I add $ $ between `\begin{thm}` and `\begin{enumerate}`, the problem disappears, but now, the enumeration starts a new line. Is there any way to fix this?


title: reference link in pdf file is not working correctly (problem with enumerate?)

text: In the following example a bug appears which I cannot explain. in the pdf- output, the link to Theorem 1 does not work correctly, clicking it jumps to the beginning of the document BLABLA. The printed reference is correct, just the link is broken.               \documentclass{article}          \usepackage[ngerman]{babel}     \usepackage{amsthm}               \newtheorem{Thm}{Theorem}          \usepackage{hyperref}          \begin{document}          BLABLA     \newpage          \begin{Thm}\label{label1}       % a theorem     \begin{enumerate}     \item item1     \end{enumerate}     \end{Thm}          blublblbu reference~\ref{label1}        %references the theorem     \end{document}      Somehow it seems to be related with `enumerate`, since the problem vanishes when I replace                \begin{enumerate}        \item item1       \end{enumerate}      by just some text


title: captions on animation within tabular

text: I am trying to make a beamer frame with 4 animations on it. I am currently arranging them in a tabular with 2 col and 2 rows.                \begin{tabular}{cc}               \animategraphics[...animation arguments ...]{}{}    &          \animategraphics[...animation arguments ...]{}{}  \\          \animategraphics[...animation arguments ...]{}{}  &          \animategraphics[...animation arguments ...]{}{}            \end{tabular}      I would like to add captions, but I do not know how, I tried putting caption before the cell delimiters, and after the cell delimiters. Any advice?


title: BioC packages in a text

text: how is it possible to have the following font for a Bioconductor library (for example "limma") in a text? Best e ![Example](http://i.stack.imgur.com/fKEaP.png)


title: Problems with alignment of sequences

text: I want to align two sequences: a_1, b_1, c_1, d_1, e_1 etc. a_2, b_2, c_2, d_2, e_2 etc. here's what I wrote                   \begin{align}         \notag &a_1,\ &b_1,\ &c_1,\ &d_1,\ &e_1\ \mbox{etc.}\\         \notag &a_2,\ &b_2,\ &c_2,\ &d_2,\ &e_2\ \mbox{etc.}         \end{align}      but it turns out that the first two columns are perfect, but then there is a large space between the second and third column. How can I solve this? Any help is appreciated.


title: How do I make a framed coffin with correct alignment?

text: I'm playing with coffins for a title page and would like to have a square framed box that aligns with the topline and baseline of text within a rotated coffin. I have a couple of issues with this so far that I need some help with:   1. There appears to be a margin to the left and right of the frame that produces space between the handles and the frame. Why is this here and how can I fix it?   2. The framed box, in addition to not being square, is too large. How can I set the size of the framed box to match the height of the text? ![enter image description here](http://i.stack.imgur.com/Jv0x3.png) From the image (edited a bit to show the problem) the handles on the text appear to be where I would expect as are the handles on the top and bottom of the framed box. MWE below.               \documentclass{article}     \usepackage{tgheros}     \usepackage[T1]{fontenc}     \usepackage{xcoffins}     \usepackage{xcolor}     \renewcommand*\familydefault{\sfdefault}          \begin{document}         \NewCoffin \result         \NewCoffin \TRBlock         \NewCoffin \LeftMar              \SetHorizontalCoffin \result {}                   \SetHorizontalCoffin \LeftMar {\fontsize{52}{50}\selectfont\color{gray}D}         \SetHorizontalCoffin \TRBlock {             \fbox{\begin{minipage}[c][\CoffinHeight\LeftMar]{\CoffinHeight\LeftMar}\centering A\end{minipage}}         }              \RotateCoffin \LeftMar {90}         \JoinCoffins\result[vc,hc]\LeftMar[r,vc]         \JoinCoffins\result[\LeftMar-B,\LeftMar-r] \TRBlock[r,b]         \TypesetCoffin \result     \end{document}


title: How to make a multi-definition inside table

text: I have a function with multi-definition And I want to take it into a table. But i don't know how do that. Please help me, the image below is the result I want to have. ![enter image description here](http://i.stack.imgur.com/YvcuM.jpg)


title: "Dimension too large" error with pgfplot generated with matlab2tikz

text: I would like to insert a tikz plot generated with matlab2tikz in my code. This is the code to generate the matlab image               X1=[7.4632    8.0349    8.5251    8.8176    9.2251    9.5559    9.9214   10.1924   10.4235   11.0197   12.0898   13.0078   13.9837];     X2=[5.7940    7.0416    8.2893    9.0191    9.5370    9.9386   10.2668   10.5443   10.7846   11.1863   11.7919   12.4340   13.1638];     Y1=[0.025    0.0500    0.1000    0.1500    0.2000    0.2500    0.3000    0.3500    0.4000    0.5000    0.7000    1.0000    1.5000];     figure1 = figure;          axes1 = axes('Parent',figure1);     box(axes1,'on');     grid(axes1,'on');     hold(axes1,'all');          % Create plot     plot(X1,Y1,'Parent',axes1,'LineWidth',2,'Color',[0 0 1],...     'DisplayName','Experimental profile');          % Create xlabel     xlabel('Mean wind speed [m/s]','FontSize',12);          % Create ylabel     ylabel('height above the ground [m]','FontSize',12);          % Create plot     plot(X2,Y1,'Parent',axes1,'LineStyle','--','Color',[0 0 1],...     'DisplayName','Log profile z_0= 0.001');          % Create legend     legend1 = legend(axes1,'show');     set(legend1,...     'Position',[0.228476914414414 0.766652157055919 0.396513030888031 0.094037760105238],...     'FontSize',12);      The generated tikz code is               \begin{tikzpicture}          \begin{axis}[%     width=0.00358392700912386in,     height=0.00486727016265824in,     scale only axis,     xmin=5,     xmax=14,     xlabel={Mean wind speed [m/s]},     xmajorgrids,     ymin=0,     ymax=1.5,     ylabel={height above the ground [m]},     ymajorgrids,     legend style={at={(0.228476914414414,0.766652157055919)},anchor=south     west,draw=black,fill=white,legend cell align=left}     ]      \addplot [color=blue,solid,line width=2.0pt]     table[row sep=crcr]{7.46324069270281    0.025\\     8.03494715464159    0.05\\     8.5251477423859 0.1\\     8.81756139289803    0.15\\     9.22514701029531    0.2\\     9.55588642181522    0.25\\     9.92139059174763    0.3\\     10.1923874711796    0.35\\     10.4235048516839    0.4\\     11.0197367245308    0.5\\     12.0898028668318    0.7\\     13.0078093923308    1\\     13.9837144687306    1.5\\     };     \addlegendentry{Experimental profile};          \addplot [color=blue,dashed]     table[row sep=crcr]{5.79397648476276    0.025\\     7.04164140977066    0.05\\     8.28930633477856    0.1\\     9.01914352937326    0.15\\     9.53697125978646    0.2\\     9.93862965215204    0.25\\     10.2668084543812    0.3\\     10.5442796780702    0.35\\     10.7846361847944    0.4\\     11.1862945771599    0.5\\     11.7919446030781    0.7\\     12.4339595021678    1\\     13.1637966967625    1.5\\     };     \addlegendentry{$\text{Log profile z}_\text{0}\text{= 0.001}$};          \end{axis}     \end{tikzpicture}      * * * I read the answers to many similar post both here and all around the web, but the problems seams to be different time to time. I updated all my packages few hours ago to see if a newer version of pgf plot could solve. I use the latest version of matlab2tikz too. Do you have any hints for me? Thank you very much Bye


title: Adding contents for the end of the document in the preamble

text: I create lots of LaTeX documents and put all my declarations into a `header.tex` that I use with `\input{header.tex}` at the beginning. However, I am migrated that into a `header.sty` and just use `\usepackage{header}` now. Either way, my document always contains the same last lines that include a bibliography. I would like to move that into my `header.sty` as well. Is there some way to add end-of-document content into the preamble somehow? The code that I have in mind is:               \IfFileExists{\bibliographyfile}{         \printbibliography     }{}      The `\bibliographyfile` is defined in the preamble already.


title: two pages on one and exact crop marks

text: the page size of my document is A5 and has about 100 pages. For printing I need to put two pages on one in A4 and rearrange them in a specific way due to my thumb index at eachside of the page. That's the code I got so far:               \documentclass[a4paper]{article}     \usepackage{pdfpages}     \usepackage{forloop}          \begin{document}          \pagestyle{plain}     \newcounter{i}     \newcounter{p}     \newcounter{pp}     \newcounter{ppp}     \newcounter{pppp}          \forloop{i}{1}{\value{i} < 34}{%     \setcounter{p}{\thei*4+2}     \setcounter{pp}{\thei*4-1}     \setcounter{ppp}{\thei*4}     \setcounter{pppp}{\thei*4+1}          \includepdfmerge[nup=1x2, landscape]{file.pdf, \thep,\thepp,\theppp,\thepppp}%     }          \end{document}      ![enter image description here](http://i.stack.imgur.com/PW9k4.png) I'd like to add crop marks like this: ![enter image description here](http://i.stack.imgur.com/HyGTQ.png) 3mm margin for printing area and 3mm crop marks.


title: Passing * arguments using xparse

text: In `xparse` I want to define a command Command-One which calls a command Command-Two and calls the *ed version if and only if the *ed version of Command-One was called. Specifically I would like to do something like:               \DeclareDocumentCommand{\CTwo}{s o m}     {\IfBooleanTF{#1}{#2}{#3}}          \DeclareDocumentCommand{\CTest}{s o}     {\CTwo#1[#2]{testing}}          \CTest*[work]      and have it output "work". I realize I can do this with               \DeclareDocumentCommand{\CTest}{s o}     {\IfBooleanTF{#1}       {\CTwo*[#2]{testing}}       {\CTwo[#2]{testing}}}      but this is inelegant, plus I will be defining several distinct commands each with a different value of `#3` in `\CTwo` and it will get repetitive having to always copy If-Then statement multiple times (as well as having to copy the specific argument twice) * * * Here is a more detailed example using environments. Specifically I would like to be able to define an environment template which I can then use to define several different environments by simply passing it parameters.               \documentclass{amsart}     \usepackage{amsthm}     \usepackage{xparse, l3fp,l3tl}     \begin{document}          \ExplSyntaxOn     \def\TheoremDepth{section}     \theoremstyle{plain}     \newtheorem{theorem}{Theorem}[\TheoremDepth]%     \newtheorem*{theoremstar}{Theorem}%          \DeclareDocumentEnvironment{TheoremTemplate}{s o m m}     {     \IfBooleanTF{#1}         { Do something         \begin{#1}}         { Do something else         \begin{#2} }         }     {     \IfBooleanTF{#1}         { Do something         \end{#1}}         { Do something else         \end{#2} }     }          \DeclareDocumentEnvironment{MyTheorem}{s o}     {     \begin{TheoremTemplate}#1[#2]{theorem}{theoremstar}     }     {     \end{TheoremTemplate}     }     \ExplSyntaxOff     \end{document}      I would then like to be able to call both \begin{theorem} and \begin{theorem}* and have them do the corresponding things.