title: Remove a section number

text: I'm sure this is a basic question asked before but my search of the site did not yield a result (likely b/c I don't know what I'm searching for). I want to print out a reference section that is included in the bookmarks but the header gets centered and it has no number next to it. Here is a minimal sample and a bib file (PS not sure how to include the bib file in code as I call a separate outside file). I also included all calls to packages because I find this information is sometimes needed by people helping.               \documentclass{scrartcl}     %\documentclass{article}     \usepackage[american]{babel}     \usepackage{csquotes}     \usepackage[style=apa, backend=biber]{biblatex}     \addbibresource{proj.bib}     \DeclareLanguageMapping{american}{american-apa}          \usepackage[sc]{mathpazo}     \usepackage{geometry}     \geometry{verbose,tmargin=2.5cm,bmargin=2.5cm,lmargin=2.5cm,rmargin=2.5cm}     \setcounter{secnumdepth}{2}     \setcounter{tocdepth}{2}     \usepackage{url}     \usepackage[unicode=true,pdfusetitle,      bookmarks=true,bookmarksnumbered=true,bookmarksopen=true,bookmarksopenlevel=2,      breaklinks=false,pdfborder={0 0 1},backref=false,colorlinks=false]      {hyperref}     \hypersetup{pdfstartview={XYZ null null 1}}     \usepackage{enumerate}     \usepackage{booktabs}     \usepackage{siunitx}     \usepackage[justification=justified,singlelinecheck=false]{caption}     \usepackage{hyperref}               \defbibheading{bibliography}{%     \section{\normalfont\refname}}          \begin{document}          \section{guy}     a     \section{gal}     b \cite{test}     \printbibliography     %\appendix     %\section{}          \end{document}      bib file:               @Booklet{test,       author       = {Joseph (Yossi) Gil},       TITLE        = {{\LaTeXe} for Graduate Students},       year         = {2002},       howpublished = {manuscript},       address      = {Haifa, Israel},     }      Currently the pdf output looks like this:               1 guy          a           2 gal          b Gil, 2002          3 References     Gil, J. ( (2002). LATEX 2ε for graduate students. manuscript.      I'm hoping to make it:               1 guy          a           2 gal          b Gil, 2002                                    References     Gil, J. ( (2002). LATEX 2ε for graduate students. manuscript.


title: Matrix doesn't shrink when put in fraction.

text: This is my minimal example, the problem is the different size of the two x. I would expect the matrix to be shrunken too, but it isn't. Why is this and how is it corrected?               \documentclass[a4paper,12pt]{article}     \begin{document}     $\frac{\begin{pmatrix}x\end{pmatrix}x}{2}$     \end{document}      **edit** : I just realized: this is not matrix specific. `\underbrace` does it too. seems like the information to be smaller doesn't get through these "frames":               \documentclass[a4paper,12pt]{article}     \begin{document}     $\frac{\begin{pmatrix}x\end{pmatrix}x}{2}e^{\begin{pmatrix}x\end{pmatrix}x}\int_{\begin{pmatrix}x\end{pmatrix}x}$     $\frac{\underbrace{x}x}{2}e^{\underbrace{x}x}\int_{\underbrace{x}x}$     \end{document}


title: How to fix caption in moderncv?

text: I'm using moderncv and I want to add a caption to an inserted graphic. I'm currently using this code               \begin{minipage}{.5\textwidth}       \centering       \includegraphics[width=0.5\textwidth]{fixed_button_settings.png}       \captionof{figure}{Some figure}                \end{minipage}      and this is the result ![fixed_button_settings.png](http://i.stack.imgur.com/T0AxK.png) For further notice, this line of code               \captionof{figure}{Some figure}       results in an error: Package caption Error: No float type 'figure' defined. I have added this in the main.tex preamble               \usepackage{float}     \usepackage{caption}      What should I do to make the caption appear as: "Figur 1: Some figure"? ("Figur" is not a typo, it's Swedish.)


title: How to set the justification for all the standard paragraphs in a LyX document

text: This must be trivial. I am new to LyX but I have read most of the 183 page User Guide and not found the answer. When I change the justification setting (to remove right justify) it only does it for the current paragraph. Document- Settings-Textlayout offers very limited ability to make changes. If I open the Customization Guide, the heading says "Features for the Advanced User". Surely something as trivial as turning off justification does not require advanced user customization. It looks like local layout may be the answer. But the customization guide says enter a format tag and searching the guide for "format tag" yields no results. Is there an easy way to do this?


title: Automatic german quotation marks

text: I would like to compile a file according to German standards, in which quotation marks are to be put like this: `\glqq text \grqq` In my LaTeX document I use quotation marks in the standard way: `''text''` Is there a possibility to change in the preamble that `''` will be compiled - depending on its location to `\glqq` or `\grqq`? Or an even simpler solution? EDIT: Sorry for the incomplete desciption. I was referring to the german standards which are: „“


title: minipage environment with bottom-aligned

text: I would like to make my figures with bottom-aligned, but the arrows are still in the center. Here is my code:               \begin{figure}[!ht]     \centering     \begin{minipage}[c]{0.2\textwidth}       \includegraphics[width=1\textwidth]{dicore1.eps}     \end{minipage}     $\rightarrow$     \begin{minipage}[c]{0.2\textwidth}      \centering      \includegraphics[width=1\textwidth]{dicore2.eps}     \end{minipage}     $\rightarrow$     \begin{minipage}[c]{0.2\textwidth}      \centering     \includegraphics[width=0.8\textwidth]{dicore3.eps}     \end{minipage}     $\rightarrow$     \begin{minipage}[b]{0.2\textwidth}      \centering     \includegraphics[width=0.6\textwidth]{dicore4.eps}     \end{minipage}     \caption{A series of retractions.}     \label{fig:Retr}     \end{figure}      It strangely looked like this: ![enter image description here](http://i.stack.imgur.com/o7LuU.png) If I make all of them to be \begin{minipage}[b], then they are indeed bottom- aligned, but the arrows are also bottom aligned. How could I solve it?


title: Color of bar plot depending on the bar height (pgfplot)

text: Does there exist any command to make the bar color depend on the bar size ? For example, the color of a bar of size x (between 0 and 100) should be filled of x percent of black, as displayed below. The aim is to be able to import data from a table and let LaTeX choose the color automatically. ![enter image description here](http://i.stack.imgur.com/XDgvC.png)               \documentclass{standalone}     \usepackage{pgfplots}     \pgfplotsset{compat=newest}               \begin{document}     \begin{tikzpicture}       \begin{axis}[         xbar, xmin=0,         width=12cm, height=5cm, enlarge y limits=0.5,         xlabel={\#participants},         symbolic y coords={maybe,no,yes},         ytick=data,         nodes near coords, nodes near coords align={horizontal},         ]         \addplot coordinates {(30,no) (40,yes) (80,maybe) };       \end{axis}     \end{tikzpicture}     \end{document}


title: TeXLive portable without tlmgr

text: I have successfully installed a portable TeXLive following the instruction given by W32TeX, with a full installation selection on windows 7. The path environment was added with TeXLive bin path, but there is nothing about tlmgr except a manual, i browser stackexchange to find the solutions, google the tlmgr package, and get nothing about the problem. where and how can i get tlmgr working? thanks


title: Cannot install \usepackage{url}

text: Can you just guide me out with how to install package from the MiKTeX Package Manager. I cannot install it.


title: missing { inserted

text: \documentclass{article}     \usepackage{graphicx}     \usepackage{caption}     \usepackage{graphicx,layout}     \usepackage{feynmf}     \usepackage{latexsym,amsmath,amssymb}     \usepackage{multicol}     \usepackage[utf8]{inputenc}     \usepackage[spanish]{babel}     \topmargin -2.0cm \oddsidemargin -0.04cm \evensidemargin -0.04cm     \textwidth 16cm \textheight 24.0cm     \parskip 7.2pt     \begin{document}     \title         {Física Hadrónica\\         Master Inter-universitario en Física Nuclear\\         Universitat de Barcelona}     \author{Martí Florit Gual (UB)\\ \\         Profesora: Laura Tolós}     \date{}     \maketitle     \newpage     \section{Calcular el potencial nucleón-nucleón debido al intercambio de un escalar.\\     \textit{Ayuda}:\\     {(a)} trabaja en el sistema centro de masas. Si $\vec{p}_1$ y $\vec{p}_2$ son el momento de las partículas iniciales 1 y 2, respectivamente, y $\vec{p^'}_1$ y $\vec{p^'}_2$ los momentos de las partículas finales 1 y 2, entonces podemos definir  $\vec{p}_1=- \vec{p}_2=\vec{p}$ y $\vec{p^'}_1=- \vec{p^'}_2=\vec{p^'}$. Con estas definiciones, introducimos los siguientes vectores: $\vec{k}=1/2(\vec{p}+\vec{p^'})$ y $\vec{q}=\vec{p^'}-\vec{p}$.\\     {(b)} trabaja en la aproximación no relativista: $E+M$ \~ $2M$}     \end{document}


title: Formatting a table

text: I am trying to format a table but everything errors since I am trying to put a display environment in an `array` (I also tried a `tabular`) environment.               \documentclass{article}     \usepackage{mathtools}     \begin{document}     \begin{table}     \centering     \begin{tabular}{l@{\hspace{.3cm}}l}     Spherical &      \begin{align*}      x &= r\cos(\theta)\sin(\phi)\\     y &= r\sin(\theta)\sin(\phi)\\     z &= r\cos(\theta)     \end{align*}\\     name &     \end{tabular}     \caption{caption}     \end{table}     \end{document}      Next to spherical I want to add the spherical coordinates maybe as a `cases` or just `align` but nothing I try works. Also, I want it to have a clean look as well in case others know of a better way to do this.


title: LatinModern is messing up with my ToC

text: Today I asked a question about the ToC formatting and I came up with a very unique macro that resolve all of my problems, but when I just began to enjoy the "answer" given another problem took me at the starting point: the adding of this line               \usepackage{lmodern}      _Takes the page numbers back into upright and not small caps._ > ![enter image description here](http://i.stack.imgur.com/1c7OF.png) Here is the MWE:               \documentclass[11pt,a4paper,twoside,british,italian]{article}     %     \usepackage[T1]{fontenc}     %     \usepackage{lmodern}  % inserting this line messes up evwrything but I'd like to use the same font.     %     \usepackage{fancyhdr}     \pagestyle{fancy}     \usepackage{babel}     \usepackage{lipsum}     %     \usepackage[unicode=true,      bookmarks=true,bookmarksnumbered=true,bookmarksopen=false,      breaklinks=false,pdfborder={0 0 1},backref=false,colorlinks=true]     {hyperref}     %     \makeatletter     % Newly defined command for Hyperref/Correct symbols     \@ifpackageloaded{hyperref}{%      \newcounter{forfunnysections}%       \newcommand{\addtoMYcontents}[3]{%        \addtocontents{#1}{%        \protect\contentsline{#2}{#3}{{\bfseries\scshape\thepage}}{\@currentHref}%       }\stepcounter{forfunnysections}\pdfbookmark[1]{#3}{funny.\arabic{forfunnysections}}%      }%     }{%      \newcommand{\addtoMYcontents}[3]{%        \addtocontents{#1}{%        \protect\contentsline{#2}{#3}{{\bfseries\scshape\thepage}}%       }%      }%       }     %     % define the page style, note \pagestyle{fancy} already in the preamble     \renewcommand{\sectionmark}[1]{\markboth{Sezione\ \thesection.\ #1}{}}     \renewcommand{\subsectionmark}[1]{\markright{#1}}     \fancyhf{}     \fancyhead[RE]{\nouppercase{\slshape \leftmark}}     \fancyhead[LO]{\nouppercase{\slshape \lastrightmark}}     \fancyhead[LE,RO]{\itshape \thepage}     \renewcommand{\headrulewidth}{0.4pt}     \renewcommand{\footrulewidth}{0pt}     %     % create new \fancypagestyles in respect to short sections     \usepackage{slantsc}     \usepackage{extramarks}      %     \fancypagestyle{plain}{%     \fancyhf{}      \fancyfoot[CE,CO]{\slshape{\scshape \thepage}}  % Page numbers with my defined style     \renewcommand{\headrulewidth}{0pt}%     }     \fancypagestyle{nonTOCplain}{%     \fancyhf{}      \fancyhead[LE,RO]{\itshape \thepage}     \renewcommand{\headrulewidth}{0pt}%     }     \fancypagestyle{TOCplain}{%     \fancyhf{}      \fancyhead[RE]{\nouppercase{\slshape \leftmark}}     \fancyhead[LO]{\nouppercase{\slshape \lastrightmark}}     \fancyhead[LE,RO]{\slshape{\scshape \thepage}}  % Page numbers with my defined style     \renewcommand{\headrulewidth}{0.4pt}%     }      %       % the pages of the ToC/LoF/LoT are numbered Lowercase Roman      \let\myTOC\tableofcontents     \renewcommand\tableofcontents{%      \pagenumbering{roman}   % I don't want "Roman" because there are too big letters!      \thispagestyle{plain}      \myTOC%     }     %     \makeatother     %     \begin{document}     %     \thispagestyle{plain}     \addtoMYcontents{toc}{section}{Indice Generale}     \tableofcontents{}     \clearpage{}     %     \thispagestyle{TOCplain}     \cleardoublepage{}     %     \thispagestyle{TOCplain}     \addtoMYcontents{toc}{section}{Elenco delle Figure}     \listoffigures     \clearpage{}     %     \thispagestyle{TOCplain}     \cleardoublepage{}     \pagenumbering{arabic}     %     \thispagestyle{nonTOCplain}     \section{Introduzione}     \lipsum[1]     %     \cleardoublepage{}     %     \thispagestyle{nonTOCplain}     \section{Prima sezione }     \lipsum[3]     \subsection{Prima sottosezione }     \lipsum[3]     %     \end{document}      The main question is that I do not know how a simple font could interact with the commands above, it's like the definition of SmallCaps that generates this issue but I'm not sure, so I wanted to know if _there exist a soliution that will keep me using`lmodern` but without the upright page numbers_


title: Displaying Cherokee text

text: I have a XeTeX document in Cherokee, but when it compiles to PDF, all of the Cherokee glyphs show up as boxes. Here's an example:               \documentclass[12pt,a4paper]{book}     \usepackage{fontspec}     \setmainfont{Times New Roman}          \begin{document}     ᎪᎯ ᎤᎵᏍᏆᎸᏗ ᏕᎨᏌᏗᏒ ᎢᎩᏁᏤᎸ ᎤᏪᏥ ᎤᏮᏔᏅ, ᎾᏍᎩ ᎤᏪᎧᏅ ᎤᏤᎵ ᎢᏳᎵᏍᏙᏗᏱ ᏂᎦᏗᏳ ᏧᏓᎴᏅᏛ, ᎾᏍᎩ ᎾᏍᏉ ᎬᏗᏍᎬ ᎡᎶᎯ ᏚᏬᏢᏁᎢ;     ᎾᏍᎩ ᏗᎦᎸᏌᏓᏗᏍᎩ ᏥᎨᏒᎩ ᎤᏤᎵ ᎦᎸᏉᏗᏳ ᎨᏒᎢ, ᎠᎴ ᎾᏍᎩᏯ ᏗᏟᎶᏍᏔᏅᎯ ᏥᎨᏒᎩ ᎾᏍᎩ ᏄᏍᏛᎢ, ᎠᎴ ᏂᎦᏗᏳ ᏧᏓᎴᏅᏛ ᏥᏚᏍᏆᏂᎪᏗᏕᎬᎩ ᏥᎬᏗᏍᎬᎩ ᎤᎵᏂᎩᏗᏳ ᎧᏁᎬᎢ, ᎾᎯᏳ ᎤᏩᏒ ᎤᏓᏛᏔᏅ ᎤᏅ ᎦᎸᎭ ᎢᎩᏍᎦᏅᏨᎢ, ᎤᏪᏁᎢ ᎠᎦᏘᏏᏗᏢ ᎦᎸᏉᏗᏳ ᎨᏒ ᎦᎸᎳᏗ.     ᎾᏍᎩ ᎢᎦᎢ ᎤᏟ ᎢᏳᏓᎵᏁᎯᏯᏛ ᎾᎬᏁᎴ ᎡᏍᎦ ᏗᏂᎧᎿᏩᏗᏙᎯ, ᎾᏍᎩ ᎤᏘᏯᏍᏓᏁᏗ ᎨᏒ ᎤᏟ ᎢᎦᎸᏉᏗ ᏧᏙᏍᏙᏗ ᏧᏩᏛᏔᏅ.     ᏗᏂᎧᎿᏩᏙᎯᏰᏃ ᎨᏒ ᎦᎪ ᎢᎸᎯᏳ ᎯᎠ ᏄᏪᏎᎶᎢ, ᎠᏇᏥ ᏂᎯ ᎪᎯ ᎢᎦ ᏍᏆᏕᎲᏏ? ᎠᎴ ᎾᏍᏉ ᎯᎠ; ᎠᏴ ᏥᎦᏴᎵᎨ ᎨᏎᏍᏗ, ᎾᏍᎩᏃ Ꮎ ᎠᏯᏥ ᎨᏎᏍᏗ?     ᎠᎴ ᎾᏍᏉ, ᎾᎯᏳ ᎢᎬᏱ ᎤᏕᏁᎸᎯ ᎡᎶᎯ ᎤᎾᏄᎪᏫᏒ ᎯᎠ ᏄᏪᏎᎢ; ᎠᎴ ᎾᏂᎥ ᏗᏂᎧᎿᏩᏗᏙᎯ ᎤᏁᎳᏅᎯ ᏧᏤᎵ ᏫᎬᏩᏓᏙᎵᏍᏓᏏ.     ᏗᏂᎧᎿᏩᏗᏙᎯᏃ ᎯᎠ ᏂᏕᎦᏪᏎᎭ, ᎾᏍᎩ ᏗᏂᎧᎿᏩᏗᏙᎯ ᏧᏤᎵ ᎤᏃᎴ ᏥᏂᏕᎬᏁᎭ, ᎠᎴ ᎠᏥᎸ ᎠᏓᏪᎳᎩᏍᎩ ᏧᏅᏏᏓᏍᏗ ᏥᏂᎬᏁᎭ.     ᎤᏪᏥᏍᎩᏂ ᎯᎠ ᏂᎦᏪᏎᎭ, ᏣᏤᎵ ᎦᏍᎩᎸ, ᏣᏁᎳᏅᎯ, ᏂᎪᎯᎸ ᎠᎴ ᏂᎪᎯᎸ ᏂᎬᏩᏍᏗᏉ; ᎠᏙᎳᏅᏍᏗ ᏚᏳᎪᏛ ᎠᏛᏁᏙᏗ ᎾᏍᎩ ᎠᏙᎳᏅᏍᏗ ᎪᎱᏍᏗ ᏨᏗᎭ ᎾᎿ ᏣᎬᏫᏳᎯ ᎨᏒᎢ.     \end{document}      What do I need to do in order to render the Cherokee text correctly?


title: Modifying bibliography items to have alias names

text: I defined the following macro:               \newcommand{\cmdAlias}[2]{\defcitealias{#1}{#2}\citetalias{#1} \citep{#1}}      Can I modify the `.bib` file such that the alias name is automatically retrieved from the bibliography (instead of running: `\cmdAlias{author:year}{AuthorFirstName AuthorLastName}`) For example, how can I modify the following reference to include an alias name for it, something like adding an `alias` key:               @article{dasi2007vorticity,       alias = {Dasi {\it et. al}}       title={Vorticity dynamics of a bileaflet mechanical heart valve in an axisymmetric aorta},       author={Dasi, LP and Ge, L and Simon, HA and Sotiropoulos, F and Yoganathan, AP},       journal={Physics of Fluids},       volume={19},       pages={067105},       year={2007}     }


title: How to rotate Circuitikz circuit as a whole?

text: I've drawn a circuit path using CircuiTikZ library. Now I want to rotate the circuit as a whole. The nodes of circuit are transform correctly. However the circuit elements do not get rotated at all. By using a scope environment with the rotate parameter               \begin{scope}[rotate=30]         \draw (0,2) to[L] (4,2)             to[short] (4,-2)             to[C] (0,-2)             to[short] (0,2);     \end{scope}      I end up with this: ![Failed rotation of CircuiTikZ path.](http://i.stack.imgur.com/qn3f0.png) If it matters, I'm drawing this inside a _tikzpicture_ environment.


title: Drawing Hex Boards with specific boundary

text: I would like to draw hexagons with specific layout and boundary like: ![cellular network](http://i.stack.imgur.com/VwJaJ.png) Ideally, the shape of the board of hexagons could be change easily, and the boundaries could be drawn automatically. I did search for answers, and tried out different implementations. Currently, the closest one is this answer from question Drawing Hex Boards. But I don't know:   1. how to draw the path,   2. how to generate the indices like what it shown in the figure above


title: TikZ and auto-pst-pdf break Ghostscript

text: After profiting enormously from other people's questions here, I finally need to ask one myself: since I updated my MiKTeX 2.9 installation a week ago, I can't compile my PhD thesis anymore. I use `pdflatex` in conjunction with the `auto-pst-pdf` package to include graphics obtained with `matlabfrag`. I also need TikZ for a couple of diagrams and custom chapter and section headings that I programed using the features of the memoir class. In this configuration, Ghostscript 9.05 (the one included in MiKTeX 2.9) crashes with an irrecoverable error. Here's a minimal example to reproduce the problem:               \documentclass{article}          % (A) alternatively, comment the following two lines     \usepackage{tikz}     \usetikzlibrary{arrows}          \usepackage{psfrag}     \usepackage{auto-pst-pdf}          \begin{document}          % (B) or those two lines in order to prevent the Ghostscript error     \begin{center}     \end{center}          \input{brachistochroneA1.tex}     \includegraphics[width=\textwidth]{brachistochroneA1}          \end{document}      The weird thing is that Ghostscript doesn't break if either the TikZ import or the `\begin{center}` and `\end{center}` block is commented out. (I expect that this also holds for other blocks, but I haven't tested it yet.) I'd greatly appreciate any help! Also, as an alternative, I tried `pstool` (since the `auto-pst-pdf` manual suggests its use as replacement), but this gives me different trouble: the `\includegraphics{...}` directive takes subdirectories (as usual) with a forward slash `/`, but since I'm on Windows, these need to be translated into backslashes `\` for shell-escape commands. Unfortunately, `pstool` seems not to be doing this, resulting in command line errors when copying the bbl file. (Should I ask this in a separate question?)


title: How to create a larger symbol?

text: How can I insert a larger symbol of `textreferencemark`. Exactly how can I use a larger font for the the output of the command               \textbf{\textreferencemark}


title: MikTeX 2.8, WinEdt 5.4, Adobe Acrobat X

text: I am using MikTeX 2.8, WinEdt 5.4 and Acrobat X, and `pdftexify` always produces an error, even though the pdf document is actually produced: it opens up a document in WinEdt called "Acrobat OpenDoc.edt" and displays a warning: > "Cannot Open DDD Link to: "C ... Acrobat.exe" Service: acroview Topic: > control DDEOpen(%$("AcroRead"),"acroview","control"); Help, anyone?


title: Line-break inside a `\verb'

text: I have set my text editor to wrap text at 76 columns. When including verbatim text in-line, my text editor did an auto-word-wrap and I ended up with something that looked like:               \item Just another boring explanation about some code and, e.g. \verb|foo     = function (bar, baz);| More stuff      i.e. a line-break in between verbatim code. `pdflatex` didn't like this: > LaTeX Error: \verb ended by end of line. How/should I try to get around this? Or is the only way out an early line break?


title: Getting rid of numbers

text: How would I get rid of the date, and the numbers 1 and 2? My latex code is below. I cant post images as Im a new user, sorry!               \documentclass[10pt]{article}               \begin{document}          \title{Banana Cake}     \maketitle               \section{Ingredients}          \begin{itemize}       \item The first item       \item The second item       \item The third etc     \end{itemize}          \section{Method}     \begin{enumerate}       \item The first item       \item The second item       \item The third etc     \end{enumerate}                    \end{document}


title: How do I use the Harvard citation style?

text: I am writing a 6000 word essay on the economic implications of cryptography and was wondering how to use Harvard referencing on latex as support seems somewhat limited. If the support of Harvard referencing is poor, which referencing system would you advise for the field of computer science? Any further questions, please leave a comment.


title: Problem getting preview to work in Auctex on Windows 7

text: I'm trying to get preview of math formulas to work in AUCTeX. When running `M-x preview-buffer` on simple test document I get the following error:               Preview-DviPS finished at Wed Dec 28 00:53:14     DviPS sentinel: Searching for program: no such file or directory, GSWIN32C.EXE      However `gswin32c.exe` does exist in my path. It works from Cygwin and I have also added the path to Emacs `exec-path` variable. Maybe it is a problem with case? But I couldn't find a way to redefine the program name in emacs. I'm using Emacs 23.3, AUCTeX 11.86 and MikTeX 2.9 on Windows 7. I followed these Instructions when installing AUCTeX.


title: Why don't we always use \long\def instead of \def?

text: Why don't we always use `\long\def` instead of `\def`? It seems that `\long\def` is more complete than `\def`.   By the way, I know the difference between these two commands.


title: Rotating pictures and labels together with pics in TikZ

text: I have created a pic with TikZ 3.0 that includes an `\includegraphics` statement, and a label above a path with the arguments `[sloped, above, midway]`. The intention of the pic is to reuse it in other parts of my code. At times, I want to rotate the entire pic. However, the graphic and the label are unaffected. Here is an MWE:               \documentclass{article}          \usepackage{tikz}          \begin{document}     \tikzset{         testpic/.pic={             \node at (3,0) {\includegraphics[width=1cm] {Rock.png}};              \draw (0,0) -- (1,1) node [midway, sloped, above] {test};          }     }          \begin{tikzpicture}         \pic[rotate=90] {testpic};     \end{tikzpicture}          \end{document}      Here is the output: ![The unrotated picture and label](http://i.stack.imgur.com/7831j.png) As you can see, the rock is _not_ rotated by 90 degree. It is intended that it is also rotated, as if I specified `\includegraphics[angle=90]`. The label above the path is also not rotated. How can this be fixed? * * * Asset: ![enter image description here](http://i.stack.imgur.com/C5nsA.jpg)


title: set section environment to be math only, amsmath's begin{gather}

text: I want to create a small formulary, and for that virtually every line has to be math formulas. I use the `gather`-environment from the package `amsmath`, for example:               \documentclass[10pt,a4paper]{article}          \usepackage{amsfonts}     \usepackage[fleqn]{amsmath}%fleqn for align left          \newcommand \ul \underline  %next 3 rows for subsection title underline     \newcommand{\tmpsection}[1]{}     \let\tmpsection=\subsection     \renewcommand{\subsection}[1]{\tmpsection{\underline{#1}}}               \begin{document}          \subsection{PSM}     \begin{gather*}           \ul{u_s} = r_s\ul{i_s} + \frac{d}{dt}\ul{\Psi_s}           +j\omega_k\underline{\Psi_s}\\           \ul{\Psi_s}=l_s\ul{i_s}+\ul{\Psi_m}\\           \omega_m=\omega_s\\           \end{gather*}          \end{document}      It seemed a good idea to incorporate the `\begin{gather}` environment into `\subsection`, and for that the redefinition of `\subsection` by `\newcommand` seemed probable, but I haven't been able to figure out what keywords to search for. Only found redefinitions of text style so far, but is it possible to include a `\begin`-`\end` environment into `\subsection`? If not, i could use this environment shorthand i guess, but still..


title: Unable to create multiple timelines using chronology.sty

text: I wanted to create a document that contains multiple timelines on one page. I am using chronology.sty, which uses TikZ, to accomplish this. However, I get an error when I try to create more than one timeline in a document. Here's a block that works and it creates a document with a single timeline:               \documentclass{article}     \usepackage{chronology}     \begin{document}     \begin{chronology}[2]{2000}{2012}{5ex}{\textwidth}     \event{2004}{single event}     \event[2007]{2009}{Multi-year event}     \end{chronology}     \end{document}      But now I want to add another timeline underneath the above:               \documentclass{article}     \usepackage{chronology}     \begin{document}     \begin{chronology}[2]{2000}{2012}{5ex}{\textwidth}     \event{2004}{single event}     \event[2007]{2009}{Multi-year event}     \end{chronology}          \begin{chronology}[2]{2000}{2012}{5ex}{\textwidth}     \event{2002}{single event 2}     \event[2006]{2008}{Multi-year event 2}     \end{chronology}     \end{document}      This produces the error:               ! LaTeX Error: Command \c@step already defined      It appears the problem is caused by a counter variable that chronology.sty creates:               \newcounter{step}      Is the error that every time I create a chronology environment, LaTeX tries to re-define 'step'? If so, how do I get around this? **EDIT:** I made an error copying my code over here. My first chronology environment IS properly closed, and I still get the error. Apologies for the typo.


title: How to generate templates for charts

text: Most of us create charts that have to be repeated a number of times with only the data varying. Applying DRY (do not repeat yourself) programming principles to such problems is not an easy task. To achieve this, one has to separate the _data_ from the _presentation_. This has the added advantages of providing better semantics for authors and can hide the verbosity of the `pgf` and friends libraries. It also makes progressive editing of the looks of the charts easier. For example consider the charts shown below, the data part consists of the title, the month label and two data series: ![enter image description here](http://i.stack.imgur.com/WPXYT.png) These are produced using an environment as follows:               \begin{monthlyChart}       \addTitle{AHU (October)}       \addMonth{Oct-11}       \addPlanned{10}{20}{30}{40}       \addActual {9}{18}{31}{39}     \end{monthlyChart}      **Question** How can I abstract the creation of the environment, i.e., to consider the original bar chart as a _master template_ from which other variations can be defined -- rather than repeating the process. For example, to create a slightly different chart, I have used the same environment as follows:               \begin{monthlyChart}       \addTitle{Turnover $\times 10^3$}       \addMonth{Jan-11}       \addPlanned{300}{400}{500}{600}       \addActual {300}{400}{500}{600}     \end{monthlyChart}      giving a chart that can now be used for a different purpose, resulting in: ![enter image description here](http://i.stack.imgur.com/NJUqh.png) I am looking for a way to define a `createNewChartType` sort of command, which will use a predefined template and adjust a few parameters, more like a relationship between a template and a theme as used in web development. Lengthy and verbose minimal follows:               \documentclass[12pt]{article}     \usepackage{tikz}     \usetikzlibrary{patterns}     \usepackage{pgfplots}     \makeatletter     \newcommand\progressChart[8]{       \def\week##1##2{         \footnotesize         \begin{tabular}{c}##1\\             ##2\\\end{tabular}       }     \begin{tikzpicture}            \begin{axis}[           width=6.9cm,height=5cm,           bar width=0.3cm,           title={\ctitle},           ymin=0,          % ytick={0,25,50,100,125},           ylabel=Total,           ybar=0,symbolic x coords={A, B, C, D},            xtick=data,           xticklabels={              \week{\Month}{week-1},              \week{\Month}{week-2},               \week{\Month}{week-3},              \week{\Month}{week-4}           },enlarge x limits=true,         legend style={                 at={(.43,.98)}, font=\footnotesize }],          \addplot[draw=none, fill=gray] coordinates {            (A,#1)            (B,#2)            (C,#3)            (D,#4)          };          \addplot[draw=none,fill=orange!90] coordinates {            (A,#5)            (B,#6)            (C,#7)            (D,#8)           };        \legend{Planned, Actual}        \end{axis}        \end{tikzpicture}}          \newenvironment{monthlyChart}{%       \def\addMonth##1{\def\Month{##1}}       \def\addTitle##1{\def\ctitle{\small\textbf{##1}}}       \def\addPlanned##1##2##3##4{%       \def\one{##1}\def\two{##2}\def\three{##3}\def\four{##4}}       \def\addActual##1##2##3##4{%         \progressChart{\one}{\two}{\three}{\four}{##1}{##2}{##3}{##4}        }%        \parindent0pt}{}     \makeatother     \begin{document}               \begin{monthlyChart}       \addTitle{AHU (October)}       \addMonth{Oct-11}       \addPlanned{10}{20}{30}{40}       \addActual {9}{18}{31}{39}     \end{monthlyChart}     \begin{monthlyChart}       \addTitle{AHU (November)}       \addMonth{Nov-11}       \addPlanned{30}{40}{50}{60}       \addActual {30}{40}{60}{60}     \end{monthlyChart}     \begin{monthlyChart}       \addTitle{AHU (December)}       \addMonth{Dec-11}       \addPlanned{30}{40}{50}{60}       \addActual {30}{50}{58}{70}     \end{monthlyChart}     \begin{monthlyChart}       \addTitle{AHU (January)}       \addMonth{Jan-11}       \addPlanned{30}{40}{50}{60}       \addActual {30}{40}{50}{113}     \end{monthlyChart}          \begin{monthlyChart}       \addTitle{Turnover $\times 10^3$}       \addMonth{Jan-11}       \addPlanned{300}{400}{500}{600}       \addActual {300}{400}{500}{600}     \end{monthlyChart}          \end{document}


title: Beamer - Add all references in a slide at the end

text: I am trying to do what should be a simple task: Add all references at once in the last slide in Beamer. I have done the following MWE, but BibTeX exits with errors and the references are not added... Maybe I don't have the `authortitle1` file? Should it be included by default? If I try it with my own `bst` file generated with `makebst` I get multiple errors of the type > "Undefined control sequence", "Missing number" etc. This is the MWE:               \documentclass{beamer}          \usepackage{lmodern}     \usepackage{cite}     \usepackage[labelformat=empty,font=scriptsize,skip=0pt,justification=justified,singlelinecheck=false]{caption}               \begin{document}          \begin{frame}     \frametitle{Phenotypic variability}     \begin{minipage}{.35\textwidth}         \includegraphics[width=\linewidth]{example-image}         \captionof{figure}{\cite{Waddington1959}}     \end{minipage}\hfill     \begin{minipage}{.6\textwidth}         \begin{itemize}             \item This is a test             \item This is a test \cite{VanDyk1989}         \end{itemize}     \end{minipage}\hfill     \begin{itemize}         \item This is a test     \end{itemize}     \end{frame}          \begin{frame}         {\footnotesize         \bibliographystyle{authortitle1}         \bibliography{TEST}         }     \end{frame}          \end{document}      `TEST.bib` is the following:               @article{Waddington1959,     abstract = {THE battle, which raged for so long between the theories of evolution supported by geneticists on one hand and by naturalists on the other, has in recent years gone strongly in favour of the former. Few biologists now doubt that genetical investigation has revealed at any rate the most important categories of hereditary variation; and the classical 'naturalist' theory-the inheritance of acquired characters-has been very generally relegated to the background because, in the forms in which it has been put forward, it has required a type of hereditary variation for the existence of which there was no adequate evidence.},     author = {Waddington, C H},     doi = {10.1038/1831654a0},     isbn = {0201483645},     issn = {0028-0836},     journal = {Nature},     keywords = {Genetics},     pages = {1654--1655},     pmid = {13666847},     title = {{Canalization of development and genetic assimilation of acquired characters.}},     volume = {183},     year = {1959}     }     @article{VanDyk1989,     abstract = {The way in which proteins attain and maintain their final form is of fundamental importance. Recent work has focused on the role of a set of ubiquitous proteins, termed chaperonins, in the assembly of phage and multisubunit proteins. The range of chaperonin action is unknown; they could interact with most cellular polypeptides or have a limited subset of protein partners. Included in the chaperonin family is the essential heat-shock regulated Escherichia coli groEL gene product. Over-expression of the groE operon in E. coli causes enhanced assembly of heterologously expressed ribulose bisphosphate carboxylase subunits and suppresses the heat-sensitive mutant phenotype of several dnaA alleles. It has been inferred that suppression of heat-sensitive mutations is confined to dnaA alleles and that this confinement could reflect an interaction between the groE operon products and a dnaA protein aggregate at the replication origin. We now report that multiple copies of the groE operon suppress mutations in genes encoding several diverse proteins. Our data indicate a general role for the groE operon products, the GroEL and GroES proteins, in the folding-assembly pathways of many proteins.},     author = {{Van Dyk}, T K and Gatenby, A A and LaRossa, R A},     issn = {0028-0836},     journal = {Nature},     pages = {451--453},     pmid = {2573840},     title = {{Demonstration by genetic suppression of interaction of GroE products with many proteins.}},     volume = {342},     year = {1989}     }      **EDIT:** If I remove `\usepackage{cite}` and use `apalike` instead of `authortitle1` it works. So my new questions are:   1. How do I know which bibliography styles I have and which I don't? I only have the following `bst` files at  > /usr/share/texlive/texmf-dist/bibtex/bst/base/ Where can I get more?               abbrv.bst  acm.bst  alpha.bst  apalike.bst  ieeetr.bst  plain.bst  siam.bst  unsrt.bst        1. How can I remove the line breaks in the reference section?


title: How to stop opening new window in browser with hyperref

text: I wonder if there is any way to stop `hyperref`'s `\href{url}{text}` command from opening a new window of a browser each time. What I mean is this. Suppose you use a web address for `url`, say, `www.mywebsite.com/page.html`. On a compiled PDF, you click on it, and it opens the website. Click on it again, or on another `\href` with the same address: it opens the same page with another window. I would rather just come back to the page opened earlier.


title: Too much space at end of chapter

text: When writing my thesis in LyX, I encountered the following problem: After finishing a chapter, I wrote `\break` in order for LyX to start writing the next section in the next page. The problem is that LyX automatically spaced the last page of the first section, so that the last word will appear in the end of the page. It caused a very big space between the beginning of this page and its ending. Does someone know how to fix it?


title: Problem of Arabic numbers in math mode with 'New TX' math font option [Libertine] compiled by XeLaTeX

text: Recently i decided to use the Libertine font to write my dissertation, because finally there is kinda math font for Libertine: `\usepackage[libertine]{newtxmath}`. Since I want to enable of the beautiful historical ligature supported by this font, XeLaTeX is used to compile the `.tex` file. However, it seems that the Arabic font seems to look like CM font, which is quite bigger than the original Libertine number fonts. As with `pdflatex`, there is no problem but the ligature feature can not be activated. In Ubuntu system   1. `xelatex` + `libertine` + `newtxmath` + ligature on              \usepackage[T1]{fontenc}       \usepackage[lining]{libertine}     \usepackage[libertine]{newtxmath}       \addfontfeature{RawFeature=+hlig}      ![enter image description here](http://i.stack.imgur.com/cyczj.png) The text looks really great except the Arabic numbers in math mode.   2. `pdflatex` + `libertine` + `newtxmath`              \usepackage[lining]{libertine}     \usepackage[T1]{fontenc}       \usepackage[libertine]{newtxmath}      ![enter image description here](http://i.stack.imgur.com/wWZeX.png) The Arabic font in math mode is identical to text font in this case. I just wonder the New TX math font is only based on pdflatex?


title: Bold and italic section headings with biolinum-type1

text: I am using the `memoir` class and am trying to set the section headings to be both bold and italic with `biolinum-type1` font but I only seem to be able to manage one or the other even though the tex catalogue would indicate that both should be possible with this font. Any help would be greatly appreciated. Minimum working example:               \documentclass[]{memoir}          \usepackage{biolinum-type1}     \usepackage[T1]{fontenc}          % Section titles in sans serif          \setsecheadstyle{\sffamily\bfseries\itshape\raggedright}          \begin{document}          \chapter{Test}     \section{Test Section}               \end{document}


title: Narrow underscore in listings package

text: I've been using the listings package for a while, but have only recently noticed that the underscore is rendered with less width than the other characters. I'm working on some code snippets now which use a lot of variables containing an underscore, and so I see the effect more than ever. Is there any way to prevent this?


title: Good LaTeX preambles for math thesis

text: Can someone provide me an example of a nice preamble to write a math thesis? I am currently using                \documentclass[12pt]{article}      \topmargin -15mm          \textheight 24truecm        \textwidth 16truecm         \oddsidemargin 5mm     \evensidemargin 5mm        \setlength\parskip{10pt}     \pagestyle{empty}                    \usepackage{boxedminipage}     \usepackage{amsfonts}     \usepackage{amsmath}      \usepackage{amssymb}     \usepackage{graphicx}     \usepackage{amsthm}     \usepackage{t1enc}     \usepackage{subfig}          \newtheorem{theorem}{Theorem}[section]     \newtheorem{lemma}[theorem]{Lemma}     \newtheorem{proposition}[theorem]{Proposition}     \newtheorem{corollary}[theorem]{Corollary}     \newtheorem{definition}[theorem]{Definition}     \newtheorem{example}[theorem]{Example}


title: Adding metadata using pdfx fails

text: I'd like to generate a PDF/A-compliant document. Thus I need to embed the metadata using XMP but somehow the following MWE doesn't work.               \RequirePackage{pdf14}     \documentclass{article}          \usepackage[a-1b]{pdfx}     \newcommand{\Subject}[1]{\gdef\xmpSubject{#1}}          \usepackage{filecontents}     \begin{filecontents*}{\jobname.xmpdata}     \Subject{Foo}     \Title{My Sample Title}      \Author{Me}      \end{filecontents*}          \begin{document}         Foobar     \end{document}      How can I fix this and what's up with packages like hyperxmp?


title: Using \DTLforeach for defining multiple \newtcolorbox

text: Concerning this project, I'm now trying to define an own tcolorbox environment for every conversational partner by creating a "conversational partner database" with the `datatool` package and then using `\DTLforeach`. I wanted the first box to be blue and have the title "John Doe", but for some reason, the two boxes are both red and have the same title "Jane Stag". What do I have to change to make it work? Or is there a more suitable way for creating this kind of database (without using external files)?               \documentclass{article}          \usepackage{lipsum}     \usepackage{tcolorbox}     \usepackage{datatool}          \begin{document}          \DTLnewdb{cp}% "cp" for "conversational partners".          \DTLnewrow{cp}     \DTLnewdbentry{cp}{name}{John Doe}     \DTLnewdbentry{cp}{shortcut}{JD}     \DTLnewdbentry{cp}{pfc}{blue}% "pfc" for "personal frame color"          \DTLnewrow{cp}     \DTLnewdbentry{cp}{name}{Jane Stag}     \DTLnewdbentry{cp}{shortcut}{JS}     \DTLnewdbentry{cp}{pfc}{red}          \DTLforeach{cp}{\NAME=name, \SHORTCUT=shortcut, \PFC=pfc}{%     \newtcolorbox{\SHORTCUT}{%         colframe={\PFC},         title={\NAME}     }     }          \begin{JD}%should be blue and have the title "John Doe", but is also red and has the title "Jane Stag".     \lipsum[1]     \end{JD}          \begin{JS}     \lipsum[1]     \end{JS}          \end{document}      ![Output](http://i.stack.imgur.com/elLOE.png)


title: Hindi words not displayed properly in pdf (generated by xelatex)

text: The words are not getting displayed properly in the pdf even though they are getting displayed correctly in source file. And when I tried to copy words from the pdf file and paste them, they are pasted as what they should be (as they are in the source file) and not identical to pdf display. Example: The following content               "जिले का रहने वाला हूँ! मैने संगणक विज्ञान में स्नातक किया है|"       is getting displayed as: ![enter image description here](http://i.stack.imgur.com/zfZMo.png) I am working on ShareLatex website. I have configured xelatex in the settings. And I have defined the following in my latex file:               \usepackage{polyglossia}     \setmainlanguage[numerals=Devanagari]{hindi}     \setotherlanguage{english}     \usepackage{fontspec}     \newfontfamily\hindifont[ExternalLocation]{AnnapurnaSIL-R}     \setdefaultlanguage{hindi}


title: Increasing the height of footline in a beamer slide

text: I am using the following to customise my footline, but it does not seem to change the height of the footline. What am I missing               \setbeamertemplate{footline}     {       \leavevmode%     \makebox[\paperwidth]     {\begin{beamercolorbox}[wd=\paperwidth,ht=2.25ex,dp=1.5cm, leftskip=.3cm,rightskip=.3cm plus1fill]{author in head/foot}%        {\large \url{www.yahoo.com}}      \end{beamercolorbox}%          }%      \vskip0pt%     }


title: Block comments with *% and %*

text: I know the package `comment` which allows to use :               \begin{comment}     Lines     to     comment     \end{comment}      This is not very friendly to use. I would like to have the following possibility:               *%     Lines     to     comment     %*      This is similar to the multiline version of comment in JavaScript, C or C++. This kind of syntax is very useful because I could then use... ## Comment               *%     Lines     to     comment     %*      ## No comment               %*%     Lines     to     comment     %*      Is there a way to use `*%` and `%*` instead of `\begin{comment}` and `\end{comment}` respectively?


title: Improving typesetting of sums with long limits

text: This piece of code               \documentclass{article}     \usepackage{mathtools}     \begin{document}     \[\smashoperator[r]{\sum_{s=n-t+1}^{j-1}}s-(n-t)=\sum_{s=1}^{j-1-(n-t)}s=\frac{\bigl(j-1-(n-t)\bigr)\bigl(j-(n-t)\bigr)}{2}\]     \end{document}      produces ![enter image description here](http://i.stack.imgur.com/9RkiV.png) I’d like to have ![enter image description here](http://i.stack.imgur.com/3vvGJ.png) commands like `\smashoperator` or `\mathclap` are of no use as the width of the upper limit is correctly pushing the equal signs apart. How can I give TeX a hint that I want to move the summand s close to the sigma and under the upper limit?


title: How to do a surface with pstricks using data from a surveying?

text: For each point of the grid a have the coordinates (X,Y) and height (Z), like:               X     1 2 3     1 2 3     1 2 3          Y     1 1 1     2 2 2     3 3 3          Z     2 1 0     4 5 1     8 4 3


title: Modify plot style in a tkz-fct-plot for a whole tikzpicture at once

text: Is it possible to modifiy the plot style (for example color) for every plot in a tikzpicture environment at once? I tried this, but it didn't work:               \documentclass{article}          \usepackage{pgfplots}     \usepackage{tkz-fct}     \usetkzobj{all}          \begin{document}          \begin{tikzpicture}[scale=.5,every plot/.style={color=green,thick}]     \tkzInit[xmax=10,ymax=10]     \tkzAxeXY     \tkzGrid     \tkzFct[domain=0:10]{\x}     \tkzFct[domain=0:10]{\x**2}     \end{tikzpicture}               \end{document}


title: How to input \Sexpr{ as verbatim in Sweave?

text: Building on my question here: Include Sweave input as verbatim Is there a way to include the term `\Sexpr{` in the Sweave document as verbatim. For example, to write:               R code can be evaluated inline with the \Sexpr{} function:      Followed by an example of LaTeX code with the \Sexpr{} command in a verbatim environment. My first guess was to write an R function that generates it:               sxpr <- function(x)     {       paste(paste("\\\\","Se","","xpr{",sep=""),x,"}",sep="")     }      So that I could write `\Sexpr{sxpr('')}`, however, apparently Sweave runs many times and this does not work. My second guess was to make a seperate file with only `\Sexpr{` in it and input it. This works, but not in a verbatim environment. Is it possible?


title: Label appendix as Appendix I, II, III rather than Appendix A, B and C

text: When I am using the `\appendix` it is automatically naming the Appendix as Appendix A, A.1, A.2 etc. Is there a way to change it to Appendix I, I.1, I.2, II.1, etc? here is my current appendix commands:               \appendix     \include{AppendixA}     \cleardoublepage     \include{AppendixB}     \cleardoublepage


title: What are the situations where you have to compile a document more than once?

text: You have to compile a file twice to get the desired output in the accepted answer to Lineno for 2 column. The accepted answer to How can I avoid compiling twice? provides a way to avoid compiling multiple times. My question is, what are those situations where you have to compile a file more than once?   (We know of at least two such situations with reference to the linked questions.)


title: How can I implement a twocolumn template

text: How can I implement such template (two columns): ![screenshot](http://i.stack.imgur.com/7RSzB.jpg) In my case additional panel can contain images.


title: Auctex and Skim - basics

text: I am new to Emacs and Auctex. For a couple of days I've been experimenting with the programms adding codes from the internet to my init.el, sadly most of the codes are very complicated to understand for me and do not exactly do what I want. I would like Auctex to do the following:   * Using Skim as PDF-Viewer   * If Skim is already open the pdf should be updated after the next compilation.   * Using SyncTeX   * reftex Is there anybody who can help me with that? Thanks Matthias **EDIT:** > If Skim is already open the pdf should be updated after the next > compilation. I think I've got it. In the skim preferences (sync) you can click a button "lock for changes".


title: Jabref, ref of company website

text: I am using Jabref to manage biblografy. I want to get Z+F Imager, 2013: Retrieved 18 / 09 / 2013, from http://www.zf-laser.com: Here is a minimal example.   % my Question               \documentclass[12pt,twoside]{report}% Use this line for the print version of the thesis          \usepackage{natbib}     \begin{filecontents}{\jobname1.bib}     @MISC{Imager2013,       url = {http://www.zf-laser.com},       year = {2013},       author = {Z+F Imager},       title = {Z+F Imager web-site},       howpublished = {2013},       month = {09},       owner = {sS},       timestamp = {2013.09.16}          }          \end{filecontents}          \begin{document}          %%%%%%%%%%%%% begin Bibliography %%%%%%%%%%%%%%%%%     \citet{Imager2013}\\          \bibliographystyle{apalike}          \bibliography{\jobname1}          \end{document}      % output%               Imager, Z. (2013). Z+f imager web-site. 2013.      How can I manage my fields to get required output.


title: How to use \sout{} inside the \title{} using beamer class

text: The problem is on the title. Here is the minimal code               \documentclass[11pt,a4paper]{beamer}     \usepackage{ulem}          \title{\sout{text}}     \begin{document}     \frame{\maketitle}     \end{document}      The errors are               Paragraph ended before \let was complete \begin{document}     Undefined control sequence \begin{document}     File ended while scanning use of \KVS@@Process


title: Combine two .tex files

text: I'm making my phd dissertation in LaTeX. Although I am a noob, everything works like a charm, but now I have to make the titlepage. My university had a LaTeX `.tex` file (with `.sty` file,...) which produces a titlepage. I tried to include this titlepage with `\include`, but it won't work. Probably since both have a different documentclass etc. Is there any possibility to make one single `.tex` file (which refers to the titlepage `.tex` file?)


title: Beamer allowframebreaks default option

text: How do I tell beamer that I want `allowframebreaks` allowed by default? Something like `noitemsep` for itemize: `\setlist[itemize]{noitemsep}` So that I don't have to do:               \begin{frame}[allowframebreaks]         something     \end{frame}      but just:               \begin{frame}         something     \end{frame}


title: Table of subfloats

text: I'm trying to sort figures (using subfloat) in a table, with labels for each subfigure. My point is, using only subfloat, that the subfigures are referred in the text as figure a, b, ... and so on. But I'd like to sort them in column too, so that they will be referred as 1a, 1b, 1c, 2a, 2b, ... Is there a way to do that using the `subfig` package (through the subfloat command)? Or is there another package? EDIT: The solution does not completely do what I would like ... Here is some precision. I would like to have two kind of figures: the one where each subfloat is different, and has its own "number", and the one where subfloats have to be sorted by column and row. Here is an example based on the first answer:               \documentclass{article}     \usepackage[margin=1in]{geometry}     \usepackage[demo]{graphicx}     \usepackage{tabularx}     \usepackage[lofdepth,listofformat=parens]{subfig}     \usepackage{etoolbox}     \newcounter{subfigRow}     \makeatletter     \newcommand{\newRow}{\refstepcounter{subfigRow}\setcounter{sub\@captype}{0}}     \makeatother     \AtBeginEnvironment{figure}{\setcounter{subfigRow}{1}}     \DeclareCaptionLabelFormat{parens}{(\thesubfigRow#2)}     \DeclareSubrefFormat{parens}{(\thesubfigRow#2)}     \DeclareCaptionListOfFormat{parens}{(\thesubfigRow#2)}          \begin{document}     \listoffigures     \begin{figure}[htb]     \begin{tabular}{lccc}     1 &     \subfloat{\label{one}\includegraphics[width=.3\textwidth,height=.25in]{foo}} &     \subfloat{\label{two}\includegraphics[width=.3\textwidth,height=.25in]{foo}} &     \subfloat{\label{three}\includegraphics[width=.3\textwidth,height=.25in]{foo}}\\     \newRow     2 &     \subfloat{\label{four}\includegraphics[width=.3\textwidth,height=.25in]{foo}} &     \subfloat{\label{five}\includegraphics[width=.3\textwidth,height=.25in]{foo}} &     \subfloat{\label{six}\includegraphics[width=.3\textwidth,height=.25in]{foo}}\\      & (a) & (b) & (c)     \end{tabular}     \caption{A bunch of figures}\label{fig:first}     \end{figure}          \begin{figure}[htb]     \subfloat[A subcaption][A subcaption\label{seven}]         {\includegraphics[width=.3\textwidth,height=.25in]{foo}}     \qquad     \subfloat[A subcaption][A subcaption\label{eight}]         {\includegraphics[width=.3\textwidth,height=.25in]{foo}}     \qquad     \subfloat[A subcaption][A subcaption\label{nine}]         {\includegraphics[width=.3\textwidth,height=.25in]{foo}}     \qquad     \subfloat[A subcaption][A subcaption\label{ten}]         {\includegraphics[width=.3\textwidth,height=.25in]{foo}}     \qquad     \subfloat[A subcaption][A subcaption\label{11}]         {\includegraphics[width=.3\textwidth,height=.25in]{foo}}     \qquad     \subfloat[A subcaption][A subcaption\label{12}]         {\includegraphics[width=.3\textwidth,height=.25in]{foo}}     \qquad     \caption{Another bunch of figures}\label{fig:second}     \end{figure}     As seen in \subref{one} and \subref{six} of Figure~\ref{fig:first} and     \subref{eight} of Figure~\ref{fig:second}     \end{document}      that gives ![enter image description here](http://i.stack.imgur.com/UDxBU.jpg) My point is to have the number removed in the second case.


title: Creating a new bibliography entry format for a clinical trial

text: I am writing a document in Latex and using Jabref for my bibliography. I need to cite a clinical trial in the following format but I don't know how to make it format the entry in the right order. The rest of my bibliography is in the format 'natbib.' The correct output is: > Author; Author. Title. In: ClinicalTrials.gov [Internet]. Bethesda (MD): > National Library of Medicine (US). 2000- [cited date]. Available from: URL > of the record NLM Identifier: NCTXXXXXXXX. The fields for the Jabref entry should be:   * Author   * Title   * Cited date   * Url The part that says "In: ClinicalTrials.gov [Internet]. Bethesda (MD): National Library of Medicine (US). 2000-" is generic for any clinical trial entry. I tried to make a customized entry by going to _Options -> Customize Entry Types_, but when it compiles the bibliography, it formats the entry incorrectly. I do not have a lot of experience with Latex bibliographies. Three potential solutions that I thought of but don't know how to execute are:   1. Make Latex format this specific entry without using the 'natbib' style, if possible   2. Create a new entry type in Jabref, call it Clinical, and then add to the natbib.tex file and tell it how I would like to format that entry type.   3. If there is a Latex bibliography entry that doesn't require a year, then I'm content putting the Authors and then typing the rest of it as the Title, if that is the easiest. All of the entries want a year of publication and if I try to use another type like 'article,' then (????) shows up after the author in the bibliography when I compile the document.


title: How to change only the color of curly brace made by \underbrace but keep the content color remain unchanged?

text: I have to set globally the color of every math to blue. However, if I need to annotate an expression by using `\underbrace`, the curly brace must be in black (for example). The following are my MWE and its corresponding output in which I failed to accomplish my objective. ![enter image description here](http://i.stack.imgur.com/q7MzK.png)               \documentclass[preview,border=12pt]{standalone}     \usepackage{amsmath}     \usepackage{xcolor}     \everymath{\color{blue}}     \newcommand\HighlightedTerm[2]{%             \color{black}%             \underbrace{#1}_{\color{red}\text{#2 term}}%     }     \begin{document}     Consider an expression $2a^3b^2cd^7e-ab^2cde^3$. It has 2 terms as shown in the following,     \[     \HighlightedTerm{2a^3b^2cd^7e}{1st}\HighlightedTerm{-ab^2cde^3}{2nd}     \]     Do you understand?     \end{document}      Could you help me to realize my objective? Please don't advice me to use TikZ or PSTricks. :-)


title: scrheadings: no pagemark in the list of contents

text: everything works fine with my pagenumbers and headers. There is one problem: How Can I exclude the first pages (list of contents, glossar ...) from the page numbers? The numbers should start at the 5th page - NOT earlier. Is that somehow possible? Till now it looks like that:               \pagestyle{scrheadings}     \clearscrheadfoot     \cfoot {}     \ohead{\headmark}     \ihead{{\footnotesize title of the document}}     \ofoot{\pagemark}      ... If I apply the idea of Hackbart_C it looks like that:               \pagestyle{scrheadings}     \clearscrheadfoot     \ohead{\headmark}     \ihead{{\footnotesize title}}     \begin{document}     \input{./titlepage.tex}     \clearpage     \tableofcontents     \newpage     \input{./glossar.tex}     \clearpage     \ofoot{\pagemark}     \pagenumbering{arabic}     \input{./FirstSection.tex}      The Problem: a) the glossar appears in the list of contents with pagenumber 5 (but is not numbered on the page itself) b) the "real" numbering starts at the page 2 of the fist section - not at page one from the first section What can I do?


title: How to add the name of the supervisor in a @thesis field?

text: In the `biblatex` doc, it says ( Version 1.7, p.11): > thesis > > A thesis written for an educational institution to satisfy the requirements > for a degree. Use the type field to specify the type of thesis. > > Required fields: author, title, type, institution, year/date > > Optional fields: subtitle, titleaddon, language, note, location, month, > isbn, chapter, pages, pagetotal, addendum, pubstate, doi, eprint, > eprintclass, eprinttype, url, urldate I would like to know if there is any "canonical" way to add the name of the supervisor(s) in a field of the `.bib` file (no `.bbl` manipulation please, I want my bibliography to be usable "as it" in several documents). The expect result could be something like : > Meand Myself. “A brilliant result, explained”. PhD thesis**, under the joint > supervision of Pr. Toto and Pr. Tata**. Université Paris 24, Nov. 2013. The "under the (joint) supervision" could be a string that would be declined in four ways:   * under the supervision of    * under the joint supervision of   * and the abridged forms


title: Linux Libertine ligatures / T1

text: The `libertine` package documentation says > It is recommended that the font encoding be set to T1 or LY1 but the default > OT1 encoding is also supported.               \documentclass{article}     % \usepackage[T1]{fontenc}     \usepackage[lining, tabular]{libertine}     \usepackage[libertine, cmintegrals]{newtxmath}          \begin{document}         \Huge The \{ stuffing \} 123 $f(x) = \int \sqrt{x}\,dx$     \end{document}      (Using `pdflatex`.) With `\usepackage[T1]{fontenc}`: ![](http://i.stack.imgur.com/0AamF.png) Without T1: ![](http://i.stack.imgur.com/Numoo.png) > LaTeX Font Warning: Font shape `OMS/LinuxLibertineT-TLF/m/n' undefined   >  LaTeX Font Warning: Some font shapes were not available, defaults > substituted.    The " **Th** " ligature is desirable, but the `{` and `}` characters are wrong without T1. What can I do about this? (If using XeLaTeX is the only solution, what is the simplest set of packages and settings commands that I need?)


title: Chinese typing on mac

text: I want to type Chinese with latex. I have new installed mac OS system (English). I use texshop as IDE. And now I keep getting simsun or simhei not found error. I guess these fonts are windows fonts. Could anyone **_summarize_** how to prepare the Chinese fonts on a English mac system?               \documentclass[UTF8]{ctexart}     \begin{document}     文章内容。     \end{document}      Error log:               !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!     !     /usr/local/texlive/2014/texmf-dist/tex/latex/ctex/fontset/ctex-xecjk-winfonts.d     ef:5: fontspec error: "font-not-found"     !      ! The font "SimHei" cannot be found.     !      ! See the fontspec documentation for further information.     !      ! For immediate help type H <return>.     !...............................................            l.5   {SimSun}


title: Spacing problem at List of Figures

text: I use Lyx 2.1, document class : Report. My problem is that the titles of figures are written on the numbers at List of Figures. ![enter image description here](http://i.stack.imgur.com/91PdQ.png)


title: tikz: Can we set the corner coordinates of a rectangle?

text: I already have               \tikzstyle{block} = [draw, fill=yellow!20, text centered, rectangle,     minimum height=0.8cm,minimum width=6em, align=right]      First, I can obtain a rectangle by               \node (rect) [block] at (0,0) {test};      Second, I can also obtain a rectangle by               \draw (0,0) rectangle (1,1);      **Question** : I want to use the first way to create a rectangle, whose properties have been predefined using \tikzstyle. If using the second way, I have to define the properties of the rectangle again. I know the coordinates of the corners of the rectangle can be obtained by   * rect.north east    * rect.north wast    * rect.south east    * rect.south west **Can I create a rectangle using the first way and specify the four corner coordinates of the rectangle?**


title: TeX engine can't write on hidden aux files in Windows

text: To make my latex folder clean, I tried to hide all auxiliary files with the following DOS command:               attrib +S +H *.aux     ......     attrib +S +H *.toc      But when I tried to compile my latex file again, `xelatex` and `pdflatex` in MiKTeX threw the following error:               I can't write on file `somename.aux'.      Is it possible to enable `xelatex` and `pdflatex` to write on auxiliary files, while these files remain hidden? BTW: I don't want to put auxiliary files to other folder, since this way causes other problems.


title: How can I fix the width of the table?

text: I have a multi-column table but the width of last three column is float. I want it change line automatically when the text exceeds the table of too long to write in one line. Here is the image and the code: ![image](http://i.stack.imgur.com/pdYak.jpg) Actually, I have 4 columns since the second line, and I also want to have three columns at the last line. But I am busy doing the first several lines and did not deal with the last row so far. Code:               \begin{table}[H]   % added on 12172013 for caption and label     \centering     \caption{Table}     \label{tb32}     \begin{tabular}{|p{5em}|c|c|l|}     \rowcolor{c1}     \textcolor{white}{Measure}              & \multicolumn{2}{l|}{\textcolor{white}{Description}}                                              &   \textcolor{white}{NO.}  \\     \hline   % multicolumn{2}{?|} can be set to 'c' or 'l'.          \arrayrulecolor{white}          \rowcolor{c2}     Mfadfads Number    &   $N_i$    &   $N_i$ is the number of detected fdasfas of     the $i^th$ asdfas.    & $M_1$                 \\     \hline          \rowcolor{c2}     Mean value of FT of fdsafa  & $mean(MFT_i)$  &   $MFT_i$ is the Fourier transform of a linear combination of 3 components of dsafasdfadafa                          \\     \hline          \rowcolor{c2}     DFDF   & fdsafdas  &   asdfasdf                          \\     \hline          \rowcolor{c2}     DFDF   & fdsafdas  &   asdfasdf                          \\     \hline          \rowcolor{c1}     DFDF   & fdsafdas  &   asdfasdf                          \\     \hline     \end{tabular}     \end{table}


title: Contents in heading where I want preface

text: I'm trying to start a book in LaTeX, and I have a preface, which is in the frontmatter of the book. Unfortunately, it keeps showing 'Contents' in the header after the table of contents. Basically, what I want is for it to show 'Contents' in the first two pages of the front matter (the pages actually devoted to the table of contents), and then the chapter title in the headings after that. My main document:               \documentclass[12pt]{book}          \begin{document}     \frontmatter     \title{A Book}     \author{Jwir3}          \maketitle          \tableofcontents     \include{preface}          \mainmatter          \end{document}      My preface.tex document (included):               \cleardoublepage     \addcontentsline{toc}{section}{Preface}          \chapter*{Preface}          Blah blah blah.. rambling for a couple of pages...


title: How can I center a header and restrict it to the first page?

text: Can anyone tell me how to center the header and display it only on the first page?


title: existence of package to customize section

text: I'm asking if does it exist a package to customize section or subsection as `fncychap` is used to customize chapter. I would have my section more fancy maybe adding some hrule or some decorations.


title: "Misplaced \omit" error in automatically generated table

text: Firstly, I have read Werner's answer to "! Misplaced \omit" error but my problem is not solved there. A few days ago I made a table very similar to the one below, except that one had one less row and column. There were no problems. Now I get an error. This monstrosity was created using esttab, a tool that exports STATA regression tables to latex. Relevant part of my preamble:               %---------TABLES---------     \usepackage{booktabs}     \usepackage{tabu}     \usepackage{threeparttable}     \usepackage{multirow}     \usepackage{subcaption}     \usepackage{rotating}     %indents in tables (custom command)     \newcommand*{\TableIndent}{\hspace*{0.5cm}}     %-------END TABLES--------          %---- This is a crazy patch to make sure that tabu works with threeparttable %     \usepackage{etoolbox}     \makeatletter     \chardef\TPT@@@asteriskcatcode=\catcode`*     \catcode`*=11     \expandafter\patchcmd\csname\string\threeparttable\endcsname       {\TPT@hookin{tabular}}       {\TPT@hookin{tabular}\TPT@hookin{tabu}}       {}{}     \catcode`*=\TPT@@@asteriskcatcode     \makeatother     %-----END TABLES-----%      Table:               \begin{sidewaystable}[!H]{     \def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}     \centering     \caption{Incidence Rate Ratios of job separation on 2004 self--reported willingness to take risks in general}     \resizebox{0.80\textwidth}{!}{%     \label{tab5}     \begin{tabular}{l*{12}{l}}     \toprule               &  \multicolumn{6}{c}{Poisson estimates} & & \multicolumn{5}{c}{Negative Binomial estimates} \\ \cmidrule(l){2-7} \cmidrule(l){9-13}               &\multicolumn{1}{l}{(1)}&\multicolumn{1}{l}{(2)}&\multicolumn{1}{l}{(3)}&\multicolumn{1}{l}{(4)}&\multicolumn{1}{l}{(5)} &\multicolumn{1}{l}{(6)}&$\qquad$&\multicolumn{1}{l}{(7)}&\multicolumn{1}{l}{(8)}&\multicolumn{1}{l}{(9)}&\multicolumn{1}{l}{(10)}\multicolumn{1}{l}{(11)}\\     \midrule          Self--reported willingness to take risks in general&    1.046\sym{*}  &    1.029         &    1.030         &    1.037         &    1.037\sym{*}  &    1.043\sym{*}  & &    1.046\sym{*}  &    1.029         &    1.030         &    1.037         &    1.037\sym{*}  \\                     &  (0.022)         &  (0.020)         &  (0.021)         &  (0.022)         &  (0.019)         &  (0.021) &        &  (0.022)         &  (0.020)         &  (0.021)         &  (0.022)         &  (0.019)         \\     \addlinespace     Time tracked in sample     &                  &    1.359\sym{***}&    1.403\sym{***}&    1.404\sym{***}&    1.476\sym{***}&    1.513\sym{***}&    &              &    1.359\sym{***}&    1.403\sym{***}&    1.404\sym{***}&    1.476\sym{***}\\                     &                  &  (0.027)         &  (0.030)         &  (0.029)         &  (0.030)         &  (0.033)  &       &                  &  (0.027)         &  (0.030)         &  (0.029)         &  (0.030)         \\     \addlinespace     Education (\textsc{casmin})\textdagger&     &             &                  &                 &                 &                  &                 &                  &                  &                 &                 &                  \\     \addlinespace     1. Inadequately Completed&                  &                  &    1.453         &    1.556\sym{*}  &                  &   1.153         & &                 &                  &    1.453         &    1.557\sym{*}  &                  \\                     &                  &                  &  (0.291)         &  (0.323)         &                  &  (0.264)         &                  &                  &  (0.291)         &  (0.323)         &                  \\     \addlinespace     2. General Elementary School&                  &                  &    0.696\sym{*}  &    0.727\sym{*}  &                  &    0.644\sym{**} &  &                &                  &    0.696\sym{*}  &    0.727\sym{*}  &                  \\                     &                  &                  &  (0.107)         &  (0.113)         &                  &  (0.099) &         &                  &                  &  (0.107)         &  (0.113)         &                  \\     \addlinespace     4. Intermediate General Qualification&                  &                  &    0.725\sym{**} &    0.721\sym{**} &                  &    0.762\sym{*}  & &                 &                  &    0.725\sym{**} &    0.721\sym{**} &                  \\                     &                  &                  &  (0.089)         &  (0.089)         &                  &  (0.087) &        &                  &                  &  (0.089)         &  (0.089)         &                  \\     \addlinespace     5. Intermediate Vocational&                  &                  &    0.573         &    0.600         &                  &    0.570       &  &                  &                  &    0.573         &    0.600         &                  \\                     &                  &                  &  (0.232)         &  (0.259)         &                  &  (0.169) &        &                  &                  &  (0.232)         &  (0.259)         &                  \\     \addlinespace     6. General Maturity Certificate&                  &                  &    0.877         &    0.908         &                  &    0.940       &  &                  &                  &    0.877         &    0.908         &                  \\                     &                  &                  &  (0.094)         &  (0.132)         &                  &  (0.111)  &       &                  &                  &  (0.094)         &  (0.132)         &                  \\     \addlinespace     7. Vocational Maturity Certificate&                  &                  &    0.629\sym{*}  &    0.662         &                  &    0.608\sym{*} & &                  &                  &    0.629\sym{*}  &    0.662         &                  \\                     &                  &                  &  (0.146)         &  (0.182)         &                  &  (0.144) &        &                  &                  &  (0.146)         &  (0.182)         &                  \\     \addlinespace     8. Lower Tertiary Education&                  &                  &    0.134\sym{*}  &    0.153\sym{*}  &                  &    0.254      &   &                  &                  &    0.134\sym{*}  &    0.153\sym{*}  &                  \\                     &                  &                  &  (0.109)         &  (0.127)         &                  &  (0.187) &        &                  &                  &  (0.109)         &  (0.127)         &                  \\     \addlinespace     9. Higher Tertiary Education&                  &                  &    0.671         &    0.780         &                  &    0.924     &    &                  &                  &    0.671         &    0.780         &                  \\                     &                  &                  &  (0.213)         &  (0.295)         &                  &  (0.223) &        &                  &                  &  (0.213)         &  (0.295)         &                  \\     \addlinespace     Male          &                  &                  &                  &    0.826\sym{*}  &                  &    0.899   &      &                  &                  &                  &    0.826\sym{*}  &                  \\                     &                  &                  &                  &  (0.071)         &                  &  (0.071) &        &                  &                  &                  &  (0.071)         &                  \\     \addlinespace     Age             &                  &                  &                  &    0.987         &                  &    1.005 &        &                  &                  &                  &    0.987         &                  \\                     &                  &                  &                  &  (0.019)         &                  &  (0.012) &        &                  &                  &                  &  (0.019)         &                  \\     \addlinespace     Average job duration&                  &                  &                  &                  &    0.719\sym{***}&    0.725\sym{***}& &                  &                  &                  &                  &    0.719\sym{***}\\                     &                  &                  &                  &                  &  (0.021)         &  (0.022) &        &                  &                  &                  &                  &  (0.021)         \\     \addlinespace     Total unemployment in years during 2004-2012&                  &                  &                  &                  &    0.885\sym{**} &    0.919  &       &                  &                  &                  &                  &    0.885\sym{**} \\                     &                  &                  &                  &                  &  (0.041)         &  (0.042) &        &                  &                  &                  &                  &  (0.041)         \\     \addlinespace     Intercept        &    0.628\sym{***}&   0.0962\sym{***}&   0.0912\sym{***}&    0.122\sym{***}&    0.108\sym{***}&   0.0946\sym{***}& &    0.628\sym{***}&   0.0962\sym{***}&   0.0912\sym{***}&    0.122\sym{***}&    0.108\sym{***}\\                     &  (0.080)         &  (0.017)         &  (0.018)         &  (0.051)         &  (0.018)         &  (0.029)   &      &  (0.080)         &  (0.017)         &  (0.018)         &  (0.051)         &  (0.018)         \\     \midrule     Log pseudolikelihood         &        -796         &    -690              &     -599             &      -598    &       -634       &    -554          &              &                  &                  &                  &                  \\     $\alpha_i$        &                  &                  &                  &                  &                  &                  &    0.185\sym{***} & 0.255e-06\sym{***} & 0.118e-6\sym{***} & 6.36e-08\sym{***}& 7.66e-08\sym{***}\\                     &                  &                  &                  &                  &                  &                  &  (0.082)         &  (0.000)         &  (0.000)         &  (0.000)         &  (0.000)         \\     \midrule     $N$    &      659         &      659         &      595         &      595         &      659         &      595         &      659         &      659         &      595         &      595         &      659         \\     \bottomrule     \multicolumn{13}{l}{\footnotesize\emph{Notes:} Robust Standard errors in parentheses.}\\     \multicolumn{13}{l}{\footnotesize \sym{*} $p<0.05$, \sym{**} $p<0.01$, \sym{***} $p<0.001$.}\\     \multicolumn{13}{l}{\footnotesize \textdagger Omitted base category is CASMIN classification 0: ``In school''. CASMIN classification 3. ``Basic vocational qualification'' has been dropped due to the low number of respondents (2).}\\     \end{tabular}%     }     }     \end{sidewaystable}      The error I get is               Error in thesis.tex (line 351): Misplaced \omit.     \multispan ->\omit \@multispan l.351 } I expect to see \omit only after tab marks      or the \cr of an alignment. Proceed, and I'll ignore this case.       line 351 is towards the end of the table:               \end{tabular}%     }    <<< This is line 351     }     \end{sidewaystable}      Everything renders out fine and looks great, but I really hate creating a document with errors.


title: custom plural for the short form of an acronym using glossaries

text: I'm using `glossaries` and would like to use a custom short form plural (it should be the same as the short form singular). I've tried using `\glsshortpluralkey`, but this only affects how the short form plural appears the first time the acronym is used (MWE below). I've also tried using `\glsshortpluralaccess` and `\glsshortplural`, but both are 'undefined control sequences'. I'm using TeX Live 2013.               \documentclass{article}     \usepackage[colorlinks]{hyperref}     \usepackage[acronym]{glossaries}          \makeglossaries          \newacronym[\glsshortpluralkey=cM]{cM}{cM}{centiMorgan}          \begin{document}          First use: \glspl{cM}. Second use: \glspl{cM}.          \printglossary[type=acronym,title=List of Abbreviations]          \end{document}      Edited to clarify: the desired output is: > First use: centiMorgans (cM). Second use: cM.


title: Is there an equivalent to "big pi" for tensor products?

text: I'd like to be able to rewrite expressions like               $$[f(i,j,k,\ldots)]^{\otimes n}$$      in a form analogous to               $$\prod_{j\in J}f(i,j,k,\ldots)$$      so that I can distinguishing the index being varied and specify its domain. Is there a notation for tensor products that corresponds to `$\prod$`?


title: How to remove the whitespace BEFORE itemize/enumerate?

text: I'm somewhat of a LaTeX noob, and this is driving me completely nuts. When I type               \documentclass{article}     \usepackage{enumitem}          \begin{document}         Some text         \begin{itemize}[noitemsep]             \item Item 1             \item Item 2             \item Item 3         \end{itemize}     \end{document}      **I don't want the space** which appears _in between_ the text "Some text" and the itemization to be there: ![screenshot](http://i.imgur.com/B8k4O.png) When I search around on Google all I see is tons of long, complicated advice on this site, StackOverflow, forums, etc. on how to **_not_** fix the problem ("`parskip` is evil", etc.), or tons of vague/confusing answers on what package to look at, with no actual example for me to learn from. So while this question is already asked many times, I have never found a single concrete answer to this question. The question couldn't be simpler: _How do I "properly" get rid of this extra space?_


title: Setting logical page number of first page to zero (displayed in viewer)

text: I'm not an expert in LateX and I encounter the following problem when writing a report for my internship: I've the following structure of my document (MWE down below):   1. titlepage (no number)   2. table of contents (start roman numbering)   3. first section (start arabic numbering) The problem is that, when viewed with Adobe Reader, it shows "1" for the first page (titlepage) and then it shows "i,ii..." for the table of contents... **I just want the (logic) numbering to go like 0,i,ii,1,2,3...** In the PDF itself the numbering is correct. I tried use the `\setcounter{page}{0}` command but I couldn't get it right. I've spent hours on the Internet but couldn't find an answer, even in these (related) questions: How to change page numbers displayed in a pdf viewer? and Page number and logical pages Here is my structure (it should be in the article-class):               \documentclass[12pt, a4paper]{article}          \usepackage{fullpage}     \usepackage{hyperref}          \begin{document}          \newpage     \thispagestyle{empty}     \input{FrontPage} %it's a titlepage-environment          \newpage     \pagenumbering{roman}     \tableofcontents          \newpage     \pagenumbering{arabic}     \input{Introduction} %just plain text     \end{document}      Thanks in advance! Lennert


title: How to write Stirling numbers of the second kind?

text: What is the best way to write a Stirling number of the second kind? Isn't there any standard command in LaTeX? For example, a command `\binom` is for binomial coefficients. In the wikipedia article on Stirling number of the second kind, they used `\atop` command. But people say `\atop` is not recommended.


title: pgfgantt "title list options" incompatible with beamer

text: Creating a Gantt chart using the `pgfgantt` package, with days of the weeks as the titles, can be done using `title list options` as demonstrated in the package manual. But it doesn't seem to agree with `beamer`:               \documentclass{beamer}     %\documentclass{article}     \usepackage{pgfgantt}     \usepackage{pgfcalendar}          \begin{document}          \begin{frame}     \begin{ganttchart}[x unit = 3em]{7}     \gantttitlelist[title list options={var=\y, evaluate=\y as \x using "\pgfcalendarweekdayshortname{\y}"}]{0,...,6}{1}\\     \end{ganttchart}     \end{frame}          \end{document}      Error message:               ! Use of \\gantttitlelist doesn't match its definition.     \kernel@ifnextchar ...rved@d =#1\def \reserved@a {                                                       #2}\def \reserved@b {#3}\f...     l.11 \end{frame}          ? x      Is there any workarounds?


title: Installing upgreek.sty with macports

text: How to install `upgreek.sty` using macports? Which of texlife-* packages should I install for it?


title: Fourier Transform (super-fancy) "f"?

text: What's a "fancy" `f` I can use to denote a Fourier transform?   (I mean something fancier than what `\mathcal{F}` provides.)


title: Convert all formulas to image hevea

text: I'm using Hevea to translate TeX to HTML. I want to convert all the formulas enclosed by `$ ... $` to images. But I'm trying to avoid the using of:               \begin{toimage}        $ ... $      \end{toimage} \imageflush      There is some way to redefine the dollar sign, (perhaps using a `\hevea` macro) so as append all the `toimage` environments in a transparent way? I mean just using the dollar sign. Nothing else. I've tried the approach described in here but the macro cannot be parsed by hevea. Example added: I just want to translate everything like (this is an example, I want every formula written in math mode to be modified).               \documentclass[a4paper,10pt]{article}     \usepackage[utf8]{inputenc}     \begin{document}                 $ \textbf{\overrightarrow{x}} = ( \frac{3}{2} x,y,z) $     \end{document}      to               \documentclass[a4paper,10pt]{article}     \usepackage[utf8]{inputenc}     \begin{document}         %\begin{toimage}          $ \textbf{\overrightarrow{x}} = ( \frac{3}{2} x,y,z) $         %\end{toimage} \imageflush     \end{document}      Because is the way I know to make hevea translates something written in math mode to an image. Hevea parse that commets %\begin{toimage}, etc and generate the images. I don't know is there a options of hevea to make that. But i couldn't find it so i try this approach, i.e. modifying the dollar sign.


title: Beamer fonts in article

text: I would like to use `beamer`'s fonts in a standard LaTeX article. Something like:               \documentclass{article}          \begin{document}     bla     $bla$     \end{document}      But with everything with `beamer`'s fonts inside? I have found how to change the math fonts only (using `sansmath` package) but I would like to change also the text fonts.


title: Formatting \listoftables and \listofalgorithms

text: I need a special format for the \listoffigures and the \listofalgorithms. It should be:               List of Tables           Table 1: T1.....................1      and respective               List of Algorithms           Algorithm 1: A1.................1      For the Table I found:               \renewcommand*\cfttabpresnum{Table~}     \settowidth{\cfttabnumwidth}{\cfttabpresnum}     \renewcommand{\cfttabaftersnumb}{$\;$$\;$:~}      which works perfectly. For the Algorithms I found               \let\oldlistofalgorithms\listofalgorithms     \renewcommand{\listofalgorithms}{%       \begingroup%       \let\oldnumberline\numberline%       \renewcommand{\numberline}{Algorithmus:~\oldnumberline}%       \oldlistofalgorithms%     \endgroup}      from here: Add the word "Algorithm" before each entry in the List of Algorithms which also works. But the style is                List of Algorithms              Algorithm 1 A1................1      so the ":" is missing. I tried to solve it by myself but I couldn't figure out. Could you held me please? Greets,Tony


title: Adding vertical stretch at a table row?

text: I have a `longtable` that is used to produce checklist forms. The basic layout is shown below, ![alt text](http://i.stack.imgur.com/si6CG.png) ![alt text](http://i.stack.imgur.com/F7qyb.png) The second page (if there is one - some forms are quite short) would be better if it had the bottom row of the table extend vertically to meet the top of the `signature block` below - which is a separate `tabular`. Is there a way to add vertical stretch like a `\vfill` effect in a table row? Any other suggestions. A trimmed working minimal version of the code is listed below               \documentclass[11pt]{article} % use larger type; default would be 10pt     \usepackage{longtable}          \usepackage{amssymb}[2002/01/22] %% for the Box          %% Set up counters for the check items     %% The counters are defined globally in a header     %% so we only step the counters here     %%     %% qnumber is the question counter          \newcounter{qnumber}     \setcounter{qnumber}{0}               %% new counter for headings in forms     %%      \newcounter{hcounter}     \setcounter{hcounter}{0}               %% We define the yesno macro that is used     %% by the questions to print the Yes No and      %% tick boxes     \newcommand{\yesno}{\textsf{Yes}\hskip9pt\textsf{No} {\Large ~$\Box$}~~~~{\Large $\Box$}}          %% we now define the questions     %% since they are not all questions a better term     %% would be added on the next revision     %     \newcommand{\question}[1]{     \stepcounter{qnumber}%     \hfill\thehcounter.\theqnumber\hfill\hfill &\textsf{#1} &{\small\yesno}&    {\small\yesno}&{\small\yesno}\\ \hline%     }          %% we now define the question headings     %% Every time a heading is called     %% The hcounter is incremented and the qnumber set to 1          \newcommand{\heading}[1]{%     \stepcounter{hcounter}%       \setcounter{qnumber}{0}%     \hfill\textbf{\thehcounter.0}\hfill\hfill&\multicolumn{4}{|l|}{\bf\textsf{#1}}\\ \hline %     }          \begin{document}          \begin{longtable}{|p{7mm}|p{8.61cm}|p{1.5cm}|p{1.5cm}|p{1.55cm}|}     \heading{Controls}       \question{Control valves/actuators properly installed.}       \question{Control valves/actuators operable.}       \question{BMS signals operable.}       \question{Control valves/actuators properly installed.}       \question{Vibration isolation devices installed?}     \heading{Other}        \question{Access doors are operable and sealed? }        \question{Casing undamaged?}       \question{Insulation undamaged?}       \question{Condensate drainage is unobstructed?}     %% the end portion of the environment     %% add the remarks columns and close the longtable     \multicolumn{5}{|l|}{\bf {\textsf{DISCREPANCIES}}}\\     \multicolumn{5}{|l|}{}\\     \multicolumn{5}{|l|}{}\\     \multicolumn{5}{|l|}{}\\     \multicolumn{5}{|l|}{}\\     \hline%     \end{longtable}     \end{document}


title: How to copy/paste from Word to LaTeX avoiding error?

text: With a few school mates, we have written a report in Word/Google Drive. I would like to format it in LaTeX. However, when I copy paste I see that certain characters are not as usual and trigger errors. Besides, I am writing in French, which means there are many characters with accents. I tried using `\usepackage[tipa,combine]{ucs}` I was able to compile the document but all the accents are gone. The other solution I have is to Find/Replace the accents but I would rather be able to copy/paste it properly. Is there some shortcuts or another package that would allow that? Preamble:               \documentclass[12pt,a4paper]{article}     \usepackage[utf8x]{inputenc}     \usepackage[francais]{babel}     \usepackage[T1]{fontenc}     \usepackage{mathptmx}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}      Sample of text that trigger errors: > Pour répondre à cette problématique, deux axes majeurs ont été abordés. > D'une part, l'analyse du profil des consommateurs a été réalisée en > déployant une étude quantitative au niveau régional. D'autre part, le > changement de packaging - au stade de la veille de son lancement au moment > de la clôture de l'analyse quantitative - a été analysé en soumettant le > nouveau packaging aux consommateurs lors d'une table ronde. Error log: > ! Package ucs Error: Please activate option 'combine'. See the ucs package > documentation for explanation. Type H for immediate help. ... l.34 ...�, car > la fermentation spontanée du moû t de céréales par des le... Composed > characters can only be rendered correctly, when the option 'combine' i s > activated


title: How to fix "LaTeX Error: File `somepackage.sty' not found"?

text: I am using TeXworks 0.4.5 r1280 with MikTeX 2.9 on Windows 7 64-bit. When I add               \usepackage{datetime}      and try to typeset the document, I get a dialog window like this: ![Package Installation Window](http://i.stack.imgur.com/ktQhu.png) I select "Install", confirm UAC request and then get the following error on the console:               ! LaTeX Error: File `datetime.sty' not found.      If I try to typeset the document again - the dialog and the error appear again. Same thing happens when I've tried installing `wrapfig` and a few other packages at random: `cases`, `comma`, `dowith`, `microtype`. Other packages have installed fine before. What is wrong with my setup? Please let me know if you need more info about my setup in comments. I've tried this solution: *.sty file not found. Didn't work.


title: How does one TeX a blank?

text: By blank, I'm looking to TeX something like this: `$\\{\emptyset\\}$ _ $\\{\emptyset,\\{\emptyset\\}\\}$`, but I want the `_` to look more like a longer blank as you'd see in a fill-in-the-blank type of question. Thanks.


title: Printing stamp albums

text: Is there any TeX package well suited for producing stamp albums? Some examples of stamp album pages can be seen here, here, here or here. In particular, captions can go anywhere around the frames and might be common to 2 or more frames.


title: sender address in letter

text: I have a very simple question:               % Cover letter using letter.cls     \documentclass{letter} % Uses 10pt     \usepackage[utf8]{inputenc}     \usepackage[colorlinks, linkcolor = black, citecolor = black, filecolor = black, urlcolor = blue]{hyperref}     \usepackage[pdftex]{graphicx}     %\usepackage{helvetica} % uses helvetica postscript font (download helvetica.sty)     %\usepackage{newcent}   % uses new century schoolbook postscript font      % the following commands control the margins:     \topmargin=-1in    % Make letterhead start about 1 inch from top of page      \textheight=8.5in    % text height can be bigger for a longer letter     \oddsidemargin=0pt   % leftmargin is 1 inch     \textwidth=6.5in     % textwidth of 6.5in leaves 1 inch for right margin          \begin{document}          %\signature{}           % name for signature      \longindentation=0pt                       % needed to get closing flush left     \let\raggedleft\raggedright                % needed to get date flush left               \begin{letter}{address\\ of receiver}     %\begin{\left}     {\large\bf My Name}      %\end{left}     \medskip\hrule height 1pt     %\begin{center}     \hfill prime stree, moon  \\      \hfill T: first phone, M:second phone \\      \hfill Email: \href{mailto:mymail}{mymail}     %\end{center} \vfill % forces letterhead to top of page               \opening{Dear Sir/Madam}           \noindent first part          \noindent main part          \noindent whatever          \noindent etc. etc.          \closing{Yours faithfully,}      \fromname{XYZ}     %\encl{}                    % Enclosures          \end{letter}               \end{document}      I would like to have the first and second phone as well as my email on the top right. How can this be achieved? Here is a picture: ![enter image description here](http://i.stack.imgur.com/3g4jz.png) Note, using `\hfill` for all three lines i.e. prime street moon, T:... and Email:... displays just "prime street moon" on the top right.


title: Scaling a tikz scope to the width of another tikz scope

text: Is there a way to scale tikz scope to the width of another tikz scope? I have an approach in which I put each of the scopes in an individual tikzpicture which is enclosed in a resizebox. This works fine as long as there are no lines to be drawn between coordinates in these respective scopes. If I draw a line between to coordinates (one coordinate in each scope) after rescaling, the coordinates are not in their original position anymore and the line is in a wrong position. If I would be able to scale a scope with respect to another scope (or with respect to linewidth), I could put everything in one tikzpicture and would not have a problem with wrong coordinates. I have a code example (unscaled and scaled): ## Code:               \documentclass{article}          \usepackage{tikz}               \begin{document}               \begin{tikzpicture}[remember picture]         \begin{scope}             \node[circle, thick, minimum width = 3cm, color=blue, draw] (n1) {};         \end{scope}     \end{tikzpicture}          \begin{tikzpicture}[remember picture]         \begin{scope}             \node[circle, thick, minimum width = 2cm, color=green, draw] (n2) {};         \end{scope}     \end{tikzpicture}          \begin{tikzpicture}[overlay, remember picture]         \path[thick, red, draw] (n1.east) edge (n2.east);     \end{tikzpicture}          \resizebox{0.5\textwidth}{!}{         \begin{tikzpicture}[remember picture]             \begin{scope}                 \node[circle, thick, minimum width = 3cm, color=blue, draw] (s1) {};             \end{scope}         \end{tikzpicture}     }          \resizebox{0.5\textwidth}{!}{         \begin{tikzpicture}[remember picture]             \begin{scope}                 \node[circle, thick, minimum width = 2cm, color=green, draw] (s2) {};             \end{scope}         \end{tikzpicture}     }          \begin{tikzpicture}[overlay, remember picture]         \path[thick, red, draw] (s1.east) edge (s2.east);     \end{tikzpicture}          \end{document}      ![coordinates wrong after rescale](http://i.stack.imgur.com/82B8K.jpg)


title: How to increase (relevant) verbosity of compilation errors with Emacs+AucTeX?

text: I often debug LaTeX files and Emacs+AUCTeX does not show many informations about errors. I always have the following message in the minibuffer:               LaTeX errors in `*~/my/file output*'. Use C-c ` to display.      and if I press `C-c ``               TeX-error: Error occured after last TeX file closed      which is completely useless. If I want to track errors, I have to change buffer (go to output buffer) and looking by myself where is the problematic part inside a big file where 99% of informations are not errors. At the opposite, Texmaker shows precisely the error message as you can see: ![enter image description here](http://i.stack.imgur.com/7HdZN.png) Therefore sometimes I use Texmaker to debug LaTeX file instead of Emacs. _I'm looking any solution to improve the way Emacs notify errors. How can have a concise view of errors which is really useful to debug with Emacs?_


title: Horizontal enumeration in multiple columns with reasonable spacing

text: I'm trying to create enumeration with horizontal lists and someone already provide the solution:               \documentclass{article}          \setlength{\parindent}{0mm}          \usepackage{paralist}     \usepackage{tabto}          \newenvironment{tabbedenum}[1]      {\NumTabs{#1}\inparaenum\let\latexitem\item       \def\item{\def\item{\tab\latexitem}\latexitem}}      {\endinparaenum}          \begin{document}          \begin{tabbedenum}{3}     \item text     \item text     \item text     \item text     \item text     \item text     \end{tabbedenum}     \end{document}      It works fine for text. However in I put math expressions the items will become too close to the each other and to the preceding paragraph. What should I put in the environment to adjust the preceding spacing, spacing between the items and after the items?


title: How can I place a node relative to a legend?

text: I'd like to place custom formatted nodes relative to the legend in a plot. The answer to Placing node relative to legend is a solution per se, but related to op's actual intent so it isn't helpful to me. It's not what I want, as the picture below should show: one could wish to either place the node below of the legend. In this case it should be, imho, aligned be the right border of both nodes. If the legend were placed somewhere else, or the node, obviously the alignment could be along the top borders of both elements... and so forth. So far I started to fiddle around with some T&E to get there but it isn't satisfactory yet, by far. Besides, having a good method for anchoring the node should be way faster. Please disregard the overlapping of the graph and the node. ## Picture ![enter image description here](http://i.stack.imgur.com/swNxm.png) ## MWE               \documentclass[     a4paper     ]{scrartcl}          \usepackage{     amsmath,     tikz,     pgfplots,     }          \usepackage{lmodern}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}               \begin{document}     \begin{center}     \begin{tikzpicture}[font=\small]     \begin{axis}[     xlabel={Bla},     ylabel={Process},     %     legend style={label=below:bla},     ]     \addplot+ {rand};     \addlegendentry{Stuff}     %     \node[fill=white, draw, align=center, font=\scriptsize, anchor=north east] at (axis cs:5.5,0.5) {Word: Text}; %<----- What I would actually like to use!     \end{axis}     \end{tikzpicture}     \end{center}     \end{document}