title: Font problem with XeLaTeX

text: When trying to compile my `.tex` file using the `xelatex` command in TeXmaker (with MiKTeX), I get this error message: > ! fontspec error: "font-not-found"   >  !   >  ! The font "Linux Libertine O" cannot be found.   >  !   >  ! See the fontspec documentation for further information. I have looked at the `fontspec` documentation, but haven't found anything helpful. My `.tex` file looks like this:               \documentclass[11pt]{article}     \usepackage{fontspec}     \setmainfont[Ligatures=TeX]{Linux Libertine O}     \begin{document}     \section{Unicode support}          \subsection{English}     All human beings are born free and equal in dignity and rights.          \subsection{Íslenska}     Hver maður er borinn frjáls og jafn öðrum að virðingu og réttindum.          \section{Ligatures}     \fontspec[Ligatures={Common, Historical}]{Linux Libertine O Italic}     Questo è strano assai!          \section{Numerals}     \fontspec[Numbers={OldStyle}]{Linux Libertine O}Old style: 1234567\\     \fontspec[Numbers={Lining}]{Linux Libertine O}Lining: 1234567          \end{document}      Does anyone have an idea of how I could fix this problem?


title: Error after creating pdf/a

text: I must create my thesis in `pdf/a` format. I'm using the package `pdfx` calling in the preamble:               \usepackage[a-1b]{pdfx}      When I open the pdf with Adobe I got the blu bar says me that file is in PDF/A format. Unfortunately when I validate the file using always Adobe I got many strange error. I don't know how to resolve the problem. here it is the file:               \documentclass[12pt,a4paper,twoside,openright]{book}          \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[english,italian]{babel}     \usepackage{mathptmx}          \usepackage[hmargin=3cm,vmargin=3cm,bindingoffset=0.5cm]{geometry}          \usepackage{setspace} %setta l'interlinea a 1,5     \onehalfspacing          \usepackage{lipsum}          %PDF METADATA     %-----------------------------     \usepackage[a-1b]{pdfx}     \usepackage{filecontents}     \begin{filecontents*}{\jobname.xmpdata}     \Title{Ttitle}     \Author{Salvatore Mazzarino}     \Keywords{Mobile Cloud\sep     Energia\sep     Green Networking\sep     Network Coding\sep     User Cooperation\sep     RLNC\sep}     \Org{Università degli Studi di Catania}      \end{filecontents*}     %-----------------------------          \begin{document}          \lipsum[1-4]          \end{document}      Here it is the errors I got: ![enter image description here](http://i.stack.imgur.com/PuPIH.png)               Validating file "prova.pdf" for conformance level pdfa-1b     The separator after an 'obj' must be an EOL. (2)     The separator before an 'endobj' must be an EOL. (2)     The separator before 'endstream' must be an EOL.     XML line 21:27: Input is not proper UTF-     Bytes: 0xE0 0x20 0x64 0x65.", 1     The value of the key N is 4 but must be 3.     The document does not conform to the requested standard.     The file format (header, trailer, objects, xref, streams) is corrupted.     The document doesn't conform to the PDF reference (missing required entries, wrong value types, etc.).     The document's meta data is either missing or inconsistent or corrupt.     Done.      ![enter image description here](http://i.stack.imgur.com/HcGHF.png)


title: Set font expansion so that distortion is not noticeable

text: In a comment to The kerning option of microtype Karl Karlsson writes: > Most of the typographers agree, that **Font expansion** distorts the font. > Personally, I see it, and I agree - the distortion is quite visible for the > trained reader. I've always thought font expansion was great because it reduced hyphenation and I haven't noticed any distortion. The reason that I haven't noticed any distortion is probably because I've read documents on screen or draft/economy mode inkjet prints. When I recently got a document printed on a laser printer I noticed the distortion and it was irritating. The font I noticed it for is Latin Modern in 12 pt with the default font expansion settings. Before I only had documents printed on laser printer as two pages per paper (same font and font size) and then I did not notice any distortion. In the microtype manual I read that the amount of font expansion can be configured by changing stretchability and shrinkability of a font via `stretch` and `shrink` and that their default value is 20 (§3.3). My question is: what is the greatest value for font expansion for which distortion is not noticeable when printing documents on a laser printer? I haven't got a laser printer so it's hard for me to test different values. Also, I'd appreciate any information on fonts for which distortion due to font expansion is rarely noticeable.


title: Force sidewaysfigure to be in a specific position

text: I'm trying to force a sideways figure to be drawn in a specific point of the text, but I haven't found any valid solution. In particular, I need to achieve the following layout:   * page 1 - contains only text   * page 2 - contains the sideways figure   * page 3 - text and figures Here the code I'm using.               \begin{sidewaysfigure}[counterclockwise]       \centering         \scalebox{0.99}         {\includegraphics[width=0.99\textwidth]{myfigure}}         \caption{def}         \label{def}     \end{sidewaysfigure}      When I compile, `myfigure` figure is rendered only after page 3, but it's not I want to achieve. Any suggestions?


title: Wrap caption around image and wrap text around this construction

text: Package `wrapfigure` aligns capture under the image and caption is big. Making a full size picture does not make to much sense due to a very little amount of details so I would like to wrap image and with caption and with text. I want to have something like in the sketch this: * * * |...................||.C....||...........................................| |...................||.a....||...........................................| |..Text...........||.p....||....Image.............................| |...................||.t....||...........................................| |...................||.i....||...........................................| |...................||.o....|| ** ___ __ ___ __ ___ __ ___ __ ___ __ ___ __ ___ __ ___ ___**| |...................||.n....| ** ___ __ ___ __ ___ __ ___ __ ___ __ ___ __ ___ __ ___ ____**| |...................||.........Caption...............................| |...................|....................................................| |...................| ** ___ __ ___ __ ___ __ ___ __ ___ __ ___ __ ___ __ ___ __ ___ __ ___ ___**| |........................................................................| |........................................................................| |........................................................................| | ** ___ __ ___ __ ___ __ ___ __ ___ __ ___ __ ___ __ ___ __ ___ __ ___ __ ___ __ ___ __ ___ __ ___ ___**|


title: decoration nodes not being placed on the circle they are intended to be on

text: I "placed" some nodes on a circular path but they aren't showing up in the correct place and they aren't even on the circle. What is going wrong? ![enter image description here](http://i.stack.imgur.com/kzzn1.png)               \begin{document}          \usepackage{tikz, pgfplots}          \usetikzlibrary{arrows, decorations.markings, calc, fadings,  decorations.pathreplacing, patterns,decorations.pathmorphing, positioning}          \begin{document}     \begin{center}        \begin{tikzpicture}[line join = round, line cap = round, >=triangle 45]          \filldraw[blue, opacity = .3] (0,0) circle (2cm);          \draw[dashed] (-4,0) -- (5,0);          \begin{scope}[decoration = {markings, mark = at position 0.25 with {\arrow{>}},            mark = at position 0.75 with {\arrow{>}},            mark = at position 0.2 with {\node[draw, circle, inner sep = .05cm, fill = white            , scale = .75] {1};}, }]            \draw[postaction = decorate] (0,0) circle (2.5cm);            \filldraw[black] (2.5,0) circle (.05cm);            \node[scale = .75] at (2.7,.2) {$A$};          \end{scope}          \begin{scope}[decoration = {markings, mark = at position 0.25 with {\arrow{>}},            mark = at position 0.75 with {\arrow{>}},            mark = at position 0.2 with {\node[draw, circle, fill = white, inner sep = .05cm, scale = .75]            {2};},            mark = at position 0.35 with {\filldraw[black] circle (.05cm);}, } ]            \draw[postaction = decorate] (0,0) circle (3.75cm);          \end{scope}            \filldraw[black] (3.75,0) circle (.05cm);            \node[scale = .75] at (3.95,.2) {$B$};            \filldraw[black] (-3.75,0) circle (.05cm);            \node[scale = .75] at (-3.95,.2) {$C$};        \end{tikzpicture}      \end{center}      \end{document}


title: Indentation of a block in beamer

text: I'm facing problem with indenting a paragraph in beamer. How can I do that?               \documentclass{beamer}     \begin{document}          \begin{frame}     \indent ffffffffffffffffffffffffffffffffddddddddddddddddddd     ddddddddddddddddddddddddddddddddd     dddddddddddddddddddddddd     \end{frame}               \end{document}


title: Learning Plain TeX via ConTeXt's LuaTeX-plain Format

text: Succinctly as I can: Want to learn Plain TeX (but with modern conveniences such as UTF-8, mplib, TiKz, etc.) Have much respect for the ConTeXt group of people. Liked the idea, when I stumbled upon it, of a LuaTeX with OTF support & mplib, provided via their `luatex-plain.fmt`. Want to later use ConTeXt, so proceeded with installing ConTeXt and making the mentioned format. Spreading wings, also installed TeX Live 2013 (MacTeX & Windows), and learned to use _that_ version of plain LuaTeX (`plain.fmt`), together with `luaotfload.sty` and `luamplib.sty`. Happy to proceed with either, but have problems:   * TeXLive2013 LuaTeX plain: Cannot setup the math fonts (but did get it to work with ConTeXt's LuaTeX-plain with this). It finds personal files in `$HOME/texmf`.   * ConTeXt LuaTeX-plain: Cannot get it to find non-system-installed fonts, or input files, in `$HOME/texmf`, or `$TEXMF/tex/texmf-local`, `$TEXMF/tex/texmf-projects`, or `$TEXMF/tex/texmf-fonts`, even though these directories are referenced in the config file at `$TEXMF/tex/texmf/web2c/texmf.cnf`, which I assumed filename resolving use. Must be missing something fundamental. Which would be the easiest to fix? The math fonts in TL's LuaTeX plain, or resolving files and fonts in ConTeXt's LuaTeX-plain? Before you jump to conclusions, these commands were run with every retry and moving of files (some of which may be redundant, but no way to know):               mktexlsr     mtxrun --script base --generate      luatools --generate      context --generate     luatools --self-update     context --self-update     mtxrun --script fonts --update --force      mtxrun --script fonts --udpate --simple      Furthermore, `luatools --find-file` and `mtxrun --locate`, find the files/fonts in question. `kpsewhich/where` only finds it if they are in `$HOME/texmf`. But using `\input <filename>`, or `\font\x = name:xxxx`, or `\font\x = file:xxxx`, does not work when running `luatex --fmt luatex-plain <filename>.tex`. Any ideas? Tired / embarrassed spamming ConTeXt mailing list with fundamental newbie questions. Don't just want to hack it, also want to produce quality, albeit manually typeset, documents in the meantime, learning "from the ground up" in the process.


title: Is there a script converting Latex code into orgmode code?

text: After various tentatives to write drafts of article directly in org-mode for Emacs, hoping to take advantage of various of its features (e.g. exporting to html, easier scope exporting than with \includeonly, automatically generating example based on inline code, etc...), I decided that I was more at ease writing my articles directly in latex (under auctex mode in Emacs). Yet I find myself still converting large fragments of latex code to orgmode (e.g. \textemf{blabla} to /blabla/) for inclusion in org-mode documents (e.g. to export to a webpage). I do so via search and replace with regular expression, and I am thinking about writing a general script to automatize the task, but I thought that someone else might have done so already. A quick search on Google and Stacks Exchange did not yield any useful answer.


title: Insert text in a pie chart

text: I try to insert text in nodes and need help. How to fix the placement of each text ? Thanks               \documentclass[border=10pt]{standalone}%{article}     %\usepackage[papers=30cm,paperwidth=35cm,margin=1in,heightrounded]{geometry}     \usepackage{tikz}     \usetikzlibrary{calc}          \begin{document}     \thispagestyle{empty}     \fbox{\begin{tikzpicture}[scale=0.2] % pour rester dans la page     % center     \path  (0,0) coordinate(A);     % circles     \foreach \rr in {12,...,25}{       \draw  (A) circle (\rr);     }     \def\pp{4} % nb of slices     % Assume the percentage is 20,10,20,10 respectively for the 4 slice     \foreach \aa in {0,20,30,50,60}{     \draw ($(A)+({\aa*36/10}:12)$) --  ($(A)+({\aa*36/10}:25)$);     }     Insert text       \draw ($(A)+(0/\pp*360+60.5:18)$) node[rotate=(100/\pp*60)]{\textcolor{blue}{long text1}};     \draw ($(A)+(0/\pp*360+50.5:21.5)$) node[rotate=(120/\pp*70)]{long text };     \draw ($(A)+(0/\pp*360+40.5:21.5)$) node[rotate=(120/\pp*70)]{\textcolor{red}{long text}};     \draw ($(A)+(0/\pp*360+30.5:21.5)$) node[rotate=(120/\pp*70)]{\textcolor{yellow}{long text}};     \draw ($(A)+(0/\pp*360+20.5:21.5)$) node[rotate=(120/\pp*70)]{\textcolor{blue}{long text}};          \end{tikzpicture}}     \end{document}      ![Result](http://i.stack.imgur.com/E9nZW.png)


title: How to put an itemize label on multiple lines?

text: I was wondering if it was possible nicely display a long label when using the itemize environment? e.g.:               \begin{itemize}       \item[long ugly displaying label] Stuff         \subitem more stuff         ...     \end{itemize}      The label always goes over on the left of the picture. What I thinking is to split the labels on multiple lines? Or having a limit on how far to the left of the page the label is displayed and move the "Stuff" on the next line. Any good idea (or nice way to deal with long labels) would be nice.


title: What's the difference between \|, \textdoublevertline, \textdoublepipe and \parallel?

text: I'm currently writing my bachelors thesis about on-line handwriting recognition of mathematical formulae (see http://write-math.com). I'm currently only recognizing symbols with the same technique as detexify uses (I know that it's the same technique, because I read the diploma thesis of detexify). One thing that I always thought could be better in detexify is "similarity groups". So some symbols seem to be rendered the same and only have semantic difference or a difference when you have context (that means other symbols). One example is `\Sigma` and `\sum`. I think those symbols should be treated the same when it comes to pure symbol recognition. Only when you have context, you can distinguish them. After drawing tons of symbols and looking at their classification, I've just found those four   * `\|` (math mode)   * `\textdoublepipe` (text mode)   * `\textdoublevertline` (text mode)   * `\parallel` (and, obviously different but not that much: `\shortparallel`) Is there any difference between `\|` and `\parallel` in terms of context- dependant rendering? Is there any difference between `\textdoublepipe` and `\textdoublevertline` in terms of context dependant rendering or semantics?


title: pdfpages, XeTeX, and transparency

text: I'm using `pdfpages` to include a cover made in Inkscape into a PDF. The PDF has transparent objects. When building with `pdflatex`, the transparency is kept in the final PDF, but when I build with `xelatex`, I lose the transparency in the final PDF. My cover PDF is http://r.pinson.free.fr/calvary/pdf/cover_fr.pdf and a MWE is the following:               \documentclass{scrbook}         \usepackage{pdfpages}     \begin{document}     \includepdf{cover_fr.pdf}     \end{document}      which generates http://r.pinson.free.fr/calvary/pdf/test_pdftex.pdf with `pdflatex` and http://r.pinson.free.fr/calvary/pdf/test_xetex.pdf with `xelatex`. Am I missing an option? Is there a better way to include PDFs in XeTeX, or should I maybe convert it to a PNG instead? **Edit:** I mean a _gradient_ , not _transparency_. The original PDF has a yellow gradient behind the word "ou", which does not appear in the PDF generated with XeTeX. **Note:** When I build, I have the following warnings:               ** WARNING ** Version of PDF file (1.5) is newer than version limit specification.      Maybe I should export the PDF as 1.4 from Inkscape before importing it with XeTeX?


title: Customising emacs to use biblatex-biber instead of bibtex

text: I use biblatex, but I still go through running bibtex on my .bib files, rather than biblatex-biber, which is/will be preferred. How do I arrange for `C-c C-c` to run the relevant biber command, rather than bibtex?


title: Rotate table with caption on the same page

text: I want to rotate a table because it is too wide. I'm forced to use `\documentclass[11pt,a4paper]{article}`, so changing that **is not a solution**. Many packages rotate the whole page, but I just wan't to rotate the table. I have a design sample of a table, that I must use. In my tex code that is my first table. ![enter image description here](http://i.stack.imgur.com/8oshd.png) The second snippet is how I can rotate a table. Yet I'm missing a required caption on the table. ![enter image description here](http://i.stack.imgur.com/AWzDU.png) The third snippet is what I actually want, but I'm getting a `LaTeX Error: Not in outer par mode` . I found a similar question Rotate table with caption: "Not in outer par mode. \begin{table}[h]" but the answer provided a solution with sidewaystable and that is just plain ugly in my case, because then the rotated table occupies a whole page on its own.               \documentclass[11pt,a4paper]{article}     \usepackage[graphicx]{realboxes}     \usepackage{verbatim}     \begin{document}     \begin{table}[htb]     \begin{center}     \begin{tabular}{|l|c|c|c|c|c||c|c|c|c|c||c|c|c|c|c|}     \hline     \bf Some text & \rotatebox{90}{column 1  } &  \rotatebox{90}{column 2} & \rotatebox{90}{column 3  } & \rotatebox{90}{column 4 } & \rotatebox{90}{column 5 }  & \rotatebox{90}{column 6  } &  \rotatebox{90}{column 7} & \rotatebox{90}{column 8 } & \rotatebox{90}{column 9 } & \rotatebox{90}{column 10 } & \rotatebox{90}{column 11 } &  \rotatebox{90}{column 12} & \rotatebox{90}{column 13 } & \rotatebox{90}{column 14  } & \rotatebox{90}{column 15 }\\     \hline \hline     first row lorem ipsum & 692 & 535 & 85 & 48 & 24 & 692 & 535 & 85 & 48 & 24 & 2 & 3 & 3 & 4 & 5 \\     \hline     \end{tabular}     \end{center}      \caption{My caption lorem ipsum}\label{tab_aaa}     \end{table}               %rotated     \rotatebox{90}{     \begin{tabular}{|l|c|c|c|c|c||c|c|c|c|c||c|c|c|c|c|}     \hline     \bf Some text & \rotatebox{90}{column 1  } &  \rotatebox{90}{column 2} & \rotatebox{90}{column 3  } & \rotatebox{90}{column 4 } & \rotatebox{90}{column 5 }  & \rotatebox{90}{column 6  } &  \rotatebox{90}{column 7} & \rotatebox{90}{column 8 } & \rotatebox{90}{column 9 } & \rotatebox{90}{column 10 } & \rotatebox{90}{column 11 } &  \rotatebox{90}{column 12} & \rotatebox{90}{column 13 } & \rotatebox{90}{column 14  } & \rotatebox{90}{column 15 }\\     \hline \hline     first row lorem ipsum & 692 & 535 & 85 & 48 & 24 & 692 & 535 & 85 & 48 & 24 & 2 & 3 & 3 & 4 & 5 \\     \hline     \end{tabular}     }          \begin{comment}     %% what i want     \rotatebox{90}{     \begin{table}[htb]     \begin{center}     \begin{tabular}{|l|c|c|c|c|c||c|c|c|c|c||c|c|c|c|c|}     \hline     \bf Some text & \rotatebox{90}{column 1  } &  \rotatebox{90}{column 2} & \rotatebox{90}{column 3  } & \rotatebox{90}{column 4 } & \rotatebox{90}{column 5 }  & \rotatebox{90}{column 6  } &  \rotatebox{90}{column 7} & \rotatebox{90}{column 8 } & \rotatebox{90}{column 9 } & \rotatebox{90}{column 10 } & \rotatebox{90}{column 11 } &  \rotatebox{90}{column 12} & \rotatebox{90}{column 13 } & \rotatebox{90}{column 14  } & \rotatebox{90}{column 15 }\\     \hline \hline     first row lorem ipsum & 692 & 535 & 85 & 48 & 24 & 692 & 535 & 85 & 48 & 24 & 2 & 3 & 3 & 4 & 5 \\     \hline     \end{tabular}     \end{center}      \caption{My caption lorem ipsum}\label{tab_b}     \end{table}     }     \end{comment}     \end{document}      How can I add a caption to the second snippet?


title: How to place two columns of graph on the same page

text: Please I need someone to help me out with this task. I used the code listing below to achieve the graph shown in Figure1.               \documentclass[12pt,a4paper,notitlepage]{article}     %\documentclass[12pt,a4paper,notitlepage]{report}     \usepackage[numbers, authoryear]{natbib}     \usepackage[english]{babel}     \usepackage{amsmath,amssymb,amsthm,mathtools}     \usepackage{graphicx}     \usepackage{color}     \usepackage{subfig}     \usepackage[a4paper,bindingoffset=0.0in,left=0.7in,right=0.7in,top=0.7in,bottom=0.7in,footskip=0.5in]{geometry}     \begin{document}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \begin{figure}[!ht]         {\begin{minipage}{\dimexpr\linewidth-2.50cm+2.5cm}             \centering             \rotatebox{90}{\makebox[0pt]{{CM Double Differential Cross--section (mb/MeV/sr)}}}             {\begin{minipage}{10.82cm+1cm}%                 \raisebox{\dimexpr-.5\height-1em}{\includegraphics[width=10.82cm]{Figures/sum36ho1.eps}}\ \\                 \raisebox{\dimexpr-.5\height-1em}{\includegraphics[width=10.82cm]{Figures/sum36ho2.eps}}\ \\                 \raisebox{\dimexpr-.5\height-1em}{\includegraphics[width=10.82cm]{Figures/sum36ho3.eps}}\                       %% use hspace to center the x-axis lable and then add some space at the end for the subfloat labels.                 \vspace*{0.1cm}\hspace*{\fill}{Alpha Particle Energy (MeV)}\hspace*{\fill}%\hspace*{0.5cm}             \end{minipage}}%             %\caption{As in Figure~\ref{fig:sum36sn} but for $^{165}$Ho.}             \caption{}         \end{minipage}}     \end{figure}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \end{document}      What modification can I add to the code to allow me include three more charts so that the graph can look like Figure2. Thanks in anticipation. ![Figure1](http://i.stack.imgur.com/c2tqG.jpg) ![Figure2](http://i.stack.imgur.com/Jw8fV.jpg)


title: Changing math font to OTF in XeTeX using plaintex-format

text: How does one change the math font?


title: Is there a way to dissect math lists?

text: In the course of trying to answer this question, I now realize that I need to be able to construct a math list and then check if it consists of a single character atom. What I would like to be able to do is to deconstruct the math list similar to "Dissecting paragraphs with `\lastbox`" in _TeX by Topic_. As described in this answer, one can use `\showlists` to write a representation of the partial lists to the log file. That doesn't seem to help me unless I want to parse the log file. (I don't.)


title: Remove quotes from inbook reference title with biblatex

text: I use BibTeX and `biblatex` to create a bibliography. In my BibTeX database I define a `@inbook` reference with author, title, year and booktitle. Now the problem is that the reference is rendered as: > Author (year): “Title”. In: BookTitle. I need to remove the quotes around the title. I already have a custom cite style file with some other definitions, but I did not find where to remove these quotes.


title: RefTex Multiple files problems

text: I have multi files and each file refers to the master file properly and the document can be compiled without problems .... `RefTeX` can only refer to the environments , `figures`, `equations`, etc when it is stated in the master file ... rather than this `C-c )` can't see the other labels in any other file than the master ... kindly advise. The following are the minimal files               %%% Local Variables:     %%% mode: latex     %%% TeX-master: t     %%% End:          \documentclass{book}     \begin{document}     \chapter{chapter 1 }     \label{cha:chapter-1}     \ref{cha:chapter-1}          \end{document}      and the second file `slave.tex`               \chapter{Chapter 2 }     \label{cha:chapter-2}          %%% Local Variables:     %%% mode: latex     %%% TeX-master: "master"     %%% End:      `init.el`               (setq TeX-auto-save t)     (setq TeX-parse-self t)     (setq TeX-save-query nil)     (setq TeX-PDF-mode t)     (setq-default TeX-master nil)     (require 'tex-site)     (setq reftex-enable-partial-scans t)     (setq reftex-save-parse-info t)     (setq reftex-use-multiple-selection-buffers t)     (setq reftex-plug-into-AUCTeX t)     (autoload 'reftex-mode "reftex" "RefTeX Minor Mode" t)     (autoload 'turn-on-reftex "reftex" "RefTeX Minor Mode" nil)     (autoload 'reftex-label "reftex-label" "Make label" nil)     (autoload 'reftex-reference "reftex-reference" "Make label" nil)     (autoload 'reftex-citation "reftex-cite" "Make citation" nil)     (autoload 'reftex-index-phrase-mode "reftex-index" "Phrase Mode" t)     (add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode     ;(add-hook 'reftex-load-hook 'imenu-add-menubar-index)     (add-hook 'LaTeX-mode-hook 'turn-on-reftex)     (setq LaTeX-eqnarray-label "eq"      LaTeX-equation-label "eq"      LaTeX-figure-label "fig"     LaTeX-table-label "tab"     LaTeX-myChapter-label "chap"     TeX-auto-save t     TeX-newline-function 'reindent-then-newline-and-indent     TeX-parse-self t     TeX-style-path     '("style/" "auto/"     "/usr/share/emacs21/site-lisp/auctex/style/"     "/var/lib/auctex/emacs21/"     "/usr/local/share/emacs/site-lisp/auctex/style/")     LaTeX-section-hook     '(LaTeX-section-heading     LaTeX-section-title     LaTeX-section-toc     LaTeX-section-section     LaTeX-section-label))     (eval-after-load        "latex"      '(TeX-add-style-hook        "cleveref"        (lambda ()          (if (boundp 'reftex-ref-style-alist)              (add-to-list               'reftex-ref-style-alist               '("Cleveref" "cleveref"                 (("\\cref" ?c) ("\\Cref" ?C) ("\\cpageref" ?d) ("\\Cpageref" ?D)))))          (add-to-list 'reftex-ref-style-default-list "Cleveref")          (TeX-add-symbols           '("cref" TeX-arg-ref)           '("Cref" TeX-arg-ref)           '("cpageref" TeX-arg-ref)           '("Cpageref" TeX-arg-ref)))))     (add-to-list 'load-path "/home/msalem/.emacs.d/predictive")     (add-to-list 'load-path "/home/msalem/.emacs.d/predictive/latex")     (add-to-list 'load-path "/home/msalem/.emacs.d/predictive/texinfo")     (add-to-list 'load-path "/home/msalem/.emacs.d/predictive/misc")     (add-to-list 'load-path "/home/msalem/.emacs.d/predictive/html")     (require 'predictive)     (setq predictive-main-dict 'rpg-dictionary          predictive-auto-learn t          predictive-add-to-dict-ask nil          predictive-use-auto-learn-cache nil          predictive-which-dict t)          (custom-set-variables      ;; custom-set-variables was added by Custom.      ;; If you edit it by hand, you could mess it up, so be careful.      ;; Your init file should contain only one such instance.      ;; If there is more than one, they won't work right.     '(TeX-source-correlate-method (quote synctex))     '(TeX-source-correlate-start-server t)     '(TeX-view-program-list (quote (("Okular" "okular -unique %o#src:%n%b"))))     '(TeX-view-program-selection (quote ((output-pdf "Okular") ((output-dvi style-pstricks) "dvips and gv") (output-dvi "xdvi") (output-pdf "Evince") (output-html "xdg-open"))))     '(inhibit-startup-screen t))     (custom-set-faces      ;; custom-set-faces was added by Custom.      ;; If you edit it by hand, you could mess it up, so be careful.      ;; Your init file should contain only one such instance.      The reference only can see the labels in the master file , and C-c ) when invoked from the slave.tex can't recognize the label to the chapter in the same file..... ;; If there is more than one, they won't work right. ) Edit 1: Forgot to mention that I import and include the slave into the master file. It is pretty complex on my side as with this minimal file, I am able to reference whatever exists in master only or slave only. On the main document I am building, I am able to reference only whatever is in the master! Edit 2: The problem was mainly due to using `\import` to include the files rather than `\input`. I noticed also that there is a need to reset `RefTex` every time I try to add a new file. I will try also to check `\cite` and whether it is updated in the new scheme. I will also keep using the `init.el` that you sent... again thanks a lot Jon and I do appreciate this feedback and resolution very much...


title: Problem redefining an internal macro of a sty file

text: [I posted this question first on stackoverflow since I wasn't aware of the existence of this site] Hi, I am using a special usepackage to write my thesis in tex and I need to adjust one of the provided macros. Usually there would be the way to use \renewcommand but in this case it doesn't work. Either the command is not changed or I get the error message that the overridden macro is not set, although I set it. The defined macro I'd like to change is as follows:               \gdef\TUD@thesis@referee{\PackageError{\@currname}{No '\noexpand\refereegiven!\MessageBreak See documentation for details.}\@ehc}     \def\referee#1#2{\@ifnextchar[{\TUD@thesis@referee@three{#1}{#2}}{\TUD@thesis@referee@two{#1}{#2}}}     \def\TUD@thesis@referee@two#1#2{       \gdef\TUD@thesis@referee{1. Gutachten: #1\\2. Gutachten: #2}     }     \def\TUD@thesis@referee@three#1#2[#3]{       \gdef\TUD@thesis@referee{1. Gutachten: #1\\2. Gutachten: #2\\3. Gutachten: #3}     }     \newcommand{\gutachter}[2]{%       \referee{#1}{#2}       \PackageError{\@currname}{Command '\noexpand\gutachter deprecated! Use '\noexpand\referee` instead.}\@ehc%     }      ` the way I use the command is:               \referee{ref1}{ref2}      and instead of having               {1. Gutachten: #1\\2. Gutachten: #2}      I would like to have               {Betreuer:\\#1\\#2}      I can solve this by simply modifying this part within the sty file but that means I have to adjust the file on every machine I possibly work on. I tried to use               \renewcommand{\referee}[2]{Betreuer:\\#1\\#2}      But that obviously didn't work^^. Thanks for your help.


title: gnuplot + epslatex

text: I'm using gnuplot with terminal epslatex in order to plot graphs containing LaTeX labels. In particular I've got something like this on Y tics:               $\\frac{ L_{seq} }{ 8 }$      Everything works, but the output graph has a lot of white space between the Y axis label and the Y tics. I guess that's because gnuplot parses `$\\frac{ L_{seq} }{ 8 }$` as a normal string and reserves space for it, but the resulting string (after pdflatex renders it) will actually be shorter. Any way to solve this?


title: How to nest strings inside hyperlinks

text: I want a bibliography item to generate a hyperlink in which the clickable text is composed by a string defined with `@string{foo = "foo"}` and a not- predefined string concatenated to it by `#`. In short, I want the entry               note = {Also found in } # foo # {bar}      to generate something like `Also found in \href{<address>}{foobar}`. I know that the style `apsrev4-1` does something similar with the `doi` entry, composing a series of strings containing journal data into a single hyperlink. Is there any way to do this at the `.bib` file level?


title: Tikz problem - compilation seems to go on forever!

text: I am trying to compile this not-too-complicated figure, but pdflatex and latex both seem to be taking forever. They have never completed successfully even after multiple attempts and waiting for upto 5 mins. Anyone else getting this bug? Or is there something wrong with the document?               \documentclass[twocolumn]{article}     \usepackage{tikz}     \begin{document}     \begin{figure}       \centering       \begin{tikzpicture}         [auto,         block/.style         ={rectangle, draw=blue, thick, fill=blue!20,           text width=5em,align=center, rounded corners,           minimum height=3em},         line/.style         ={draw, shorten >=2pt},         \matrix [column sep=5mm,row sep=7mm]         {           % row 1           \node [text width=4.5em,align=center,font=\large] {Geography\\Dimension}; & &           \node [text width=4.5em,align=center,font=\large] {Time\\Dimension};\\           % row 2           \node [block] (country) {Country}; & &           \node [block] (year) {Year}; \\           % row 3           \node [block] (state) {State}; & &           \node [block] (month) {Month}; \\           % row 4           \node [block] (city) {City}; & &           \node [block] (day) {Day};\\         };         \begin{scope}[every path/.style=line]           \path           (country)           -- (state);           \path            (state)           -- (city);           \path           (year)           -- (month);           \path           (month)           -- (day);         \end{scope}       \end{tikzpicture}       \caption{Dimension-levels example}       \label{fig:dimlevels}     \end{figure}          \end{document}      The last few lines of the terminal output:               ...     (/usr/local/share/texmf/tex/generic/pgf-2.10/tex/generic/pgf/utilities/pgffor.c     ode.tex))     (/usr/local/share/texmf/tex/generic/pgf-2.10/tex/generic/pgf/frontendlayer/tikz     /tikz.code.tex     (/usr/local/share/texmf/tex/generic/pgf-2.10/tex/generic/pgf/libraries/pgflibra     ryplothandlers.code.tex)     (/usr/local/share/texmf/tex/generic/pgf-2.10/tex/generic/pgf/modules/pgfmodulem     atrix.code.tex)     (/usr/local/share/texmf/tex/generic/pgf-2.10/tex/generic/pgf/frontendlayer/tikz     /libraries/tikzlibrarytopaths.code.tex))) (./test2.aux)     ABD: EveryShipout initializing macros


title: Biblatex: changing the order of entries

text: I switched to biblatex only recently and I'm still struggling with understanding how to do things properly. My question is: How to change the order of entries/units/blocks in the bibliography? The style I'm using is "numeric". Now, the default order is: > B. B. Aggarwal, Y. Takada, and O. V. Oommen. “From chemoprevention to > chemotherapy: common targets and common goals”. In: _Expert Opin Investig > Drugs_ 13.10 (Oct. 2004), pp. 1327–1338. Basically, I need commas as separators, a comma between the journal title and the volume; "In:" should be removed, the volume and the number should have prefixes and comma as a separator, and, finally, the date should go at the end, without the brackets. Something like this: > B. B. Aggarwal, Y. Takada, and O. V. Oommen, “From chemoprevention to > chemotherapy: common targets and common goals”, _Expert Opin Investig Drugs_ > , vol. 13, no. 10, pp. 1327–1338, Oct. 2004. If there is a step-by-step tutorial about how to customize bibliography or how to crate a bibliography style for use with biblatex, I'll be most grateful for it. Thanks. Here's a code for testing purposes:               \begin{filecontents}{mybib.bib}     @article{Aggarwal2004b,     author = {Aggarwal, B. B. and Takada, Y. and Oommen, O. V.},     journal = {Expert Opin Investig Drugs},     month = oct,     number = {10},     pages = {1327--1338},     publisher = {Informa Pharma Science},     title = {{From chemoprevention to chemotherapy: common targets and common goals}},     volume = {13},     year = {2004}     }     \end{filecontents}     \documentclass{article}     \usepackage[style=numeric]{biblatex}     \bibliography{mybib}       \begin{document}     Test~\cite{Aggarwal2004b}.     \printbibliography     \end{document}


title: Problem with XeLaTeX xdv2pdf mode and font compilation

text: I recently upgraded to TexLive2013 (Basic) and this broke the setup I use for letters of recommendation. I need to use a legacy university font which requires XeLaTeX in the mode xdv2pdf. MWE is below               %!TEX TS-program = XeLaTeX-xdv2pdf     \documentclass[12pt]{article}     \usepackage[T1]{fontenc}     \usepackage{xltxtra} % Loads fontspec, xunicode, metalogo, fxltx2e, and some extra customizations for XeLaTeX     \setmainfont{YaleAdmin}     \begin{document}           Look at the following data from six different languages and answer the questions below:     \end{document}      I get the following errors:               (/usr/local/texlive/2013basic/texmf-dist/tex/latex/realscripts/realscripts.sty     *************************************************     * LaTeX warning: "xparse/redefine-command"     *      * Redefining document command \textsubscript with arg. spec. 's' on line 25.     *************************************************     *************************************************     * LaTeX warning: "xparse/redefine-command"     *      * Redefining document command \textsuperscript with arg. spec. 's' on line 28.     *************************************************     ) (/usr/local/texlive/2013basic/texmf-dist/tex/latex/metalogo/metalogo.sty))     kpathsea: Running mktextfm YaleAdmin     /usr/local/texlive/2013basic/texmf-dist/web2c/mktexnam: Could not map source abbreviation Y for YaleAdmin.     /usr/local/texlive/2013basic/texmf-dist/web2c/mktexnam: Need to update /usr/local/texlive/2013basic/texmf-dist/fonts/map/fontname/special.map?     mktextfm: Running mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input YaleAdmin     This is METAFONT, Version 2.718281 (TeX Live 2013)               kpathsea: Running mktexmf YaleAdmin     ! I can't find file `YaleAdmin'.     <*> ...jfour; mag:=1; nonstopmode; input YaleAdmin          Please type another input file name     ! Emergency stop.     <*> ...jfour; mag:=1; nonstopmode; input YaleAdmin          Transcript written on mfput.log.     grep: YaleAdmin.log: No such file or directory     mktextfm: `mf-nowin -progname=mf \mode:=ljfour; mag:=1; nonstopmode; input YaleAdmin' failed to make YaleAdmin.tfm.     kpathsea: Appending font creation commands to missfont.log.               !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!     !     ! fontspec error: "font-not-found"     !      ! The font "YaleAdmin" cannot be found.     !      ! See the fontspec documentation for further information.     !      ! For immediate help type H <return>.     !...............................................            l.7 \setmainfont{YaleAdmin}      The font is installed in the same directory as other fonts that fontspec can find.


title: A figure and table side by side

text: I tried to insert my plot in many ways in this code but did not work. Can someone kindly please tell me where can I insert my plot below code; especially I dont understand whats `\rule{}` is also.               \documentclass{article}          \usepackage{floatrow}     % Table float box with bottom caption, box width adjusted to content     \newfloatcommand{capbtabbox}{table}[][\FBwidth]          \usepackage{blindtext}          \begin{document}          \blindtext          \begin{figure}     \begin{floatrow}     \ffigbox{%       \rule{3cm}{3cm}%     }{%       \caption{A figure}%     }     \capbtabbox{%       \begin{tabular}{cc} \hline       Author & Title \\ \hline       Knuth & The \TeX book \\       Lamport & \LaTeX \\ \hline       \end{tabular}     }{%       \caption{A table}%     }     \end{floatrow}     \end{figure}          \end{document}


title: Build tabular content via \foreach

text: I am trying to build up tabular data using the solution at How do I use the ampersand (&) inside a foreach or conditional (or other group/environment) when building tables?, but not having any success. There is some expansion issue that I am not able to figure out. I have counters which are declared based on the content of a list and I need to output the value of these counters in the output and hence trying to use `\eAddTableTokens`. The MWE below yields:                Undefined control sequence.      \\  ->\let \reserved@e                              \relax \let \reserved@f \relax \@ifstar {\let \reserv...      l.47 ^^I}      ## Code:               \documentclass{article}     \usepackage{tikz}          %% This is based on:     %%     http://tex.stackexchange.com/questions/165126     %%     \newcommand*{\MyTempTableTokens}{}%     \makeatletter         \newtoks\@tabtoks         %%% assignments to \@tabtoks must be global, because they are done in \foreach         \newcommand\AddTableTokens[1]{\global\@tabtoks\expandafter{\the\@tabtoks#1}}         \newcommand\eAddTableTokens[1]{%              \edef\MyTempTableTokens{#1}%             \expandafter\AddTableTokens\expandafter{\MyTempTableTokens}%             }         %%% variable should always be operated on always locally or always globally         \newcommand*\ResetTableTokens{\global\@tabtoks{}}         \newcommand*\PrintTableTokens{\the\@tabtoks}     \makeatother          \newcommand*{\MyList}{ABC, DE, FG}%          \begin{document}         % Confirm basic functionality         \ResetTableTokens%         \foreach \Entry in \MyList {%             \AddTableTokens{22 & 44 \\}%         }%         \begin{tabular}{ll}             \multicolumn{2}{c}{Basic Testing} \\             \PrintTableTokens         \end{tabular}%              %%% Processing:         %%%    Counters get declared and appropriate values are computed,          %%%    but for MWE these are all just a fixed number.         \foreach \Entry in \MyList {%             \newcounter{Count\Entry}%             \setcounter{Count\Entry}{77}%         }%         %%%         %%% Printing         \ResetTableTokens%         \foreach \Entry in \MyList {%             \edef\TempCountExpanded{\arabic{Count\Entry}}%             \eAddTableTokens{\Entry & \TempCountExpanded \\}%         }%         \begin{tabular}{ll}             \multicolumn{2}{c}{Actual Use Case} \\             \PrintTableTokens         \end{tabular}%     \end{document}


title: hyperref pdf bookmarks back to roman number page

text: My bibliography shows bookmarks to the footnotes like "5, 27, 28" which link to where I cited the book. However I also cite some books in my glossary which resides on roman numbered pages before the main part (which starts with page 1 again). For those cases the links in my bibliography read "(document)" and link to the front page (not the glossary). **Solution:** I misunderstood the naming scheme. In fact "document" means that the reference is contained in the main text. It will only give numbers to footnote. This behaviour can be changed with backref und pagebackref options so that instead of "document" it will give the page number or whatever. For further tweaks one might use `\renewcommand*\backref[1]{\ifx#1\relax \else (page #1) \fi}` to add the word "page" before each backlink. It's confusing but there you go.


title: Use both Acronym and Glossary for one term

text: I want to specify both the acronym meaning and the glossary description for some acronyms. For examples I need to specify what's description of API, and also what acronym mean for it. Is there a solution? I found this, but is not really good solution...               \newglossaryentry{API}{       type=\acronymtype,       name=API,       first=Application Programming Interface (API),       see=[Glossary:]{\gls{APIG}},        description=\glslink{APIG}{Description of API}     }      Whats the best practice to add a description to an acronym?


title: Numerating verses with multiple stanzas

text: I am scratching my head over the twist in the verse numeration when the poem is divided over multiple stanzas. It seems that last verse of the first stanza is not counted.               \documentclass{article}          \usepackage{verse}     \verselinenumbersleft     \poemlines{2}     \setlength{\vrightskip}{-3em}          \begin{document}          \poemtitle{Garden}          \begin{verse}     I used to love my garden \\     But now my love is dead \\     For I found a bachelor's button \\     In black-eyed Susan's bed.           I used to love my garden \\     But now my love is dead \\     For I found a bachelor's button \\     In black-eyed Susan's bed.     \end{verse}          \end{document}      ![enter image description here](http://i.stack.imgur.com/TGjN0.png)


title: How to get for to stand separate in an equation?

text: I have the following equation:               \begin{equation}         C_k = \frac{1}{N}\sum\limits_{n=1}^N k_n           for k \in {1,\dots,K}     \end{equation}      How can I get the for, and everything after it, to stand 'separate' from the equation?


title: Broken text on bottom of pgfplots

text: I am using code below to create a graph. On the bottom there are two braces denoted $t_1$ and $t_2$. However numbers 1 and 2 are broken (lower part is not displayed). What is wrong with my code? I also tried to solve this problem using `\pgfplotsextra` to no awail. Also, related to the code below, I would like to put into `.style` that all graphs have limit enlarged by _fixed distance_ , i.e. **1 cm**. If I understand the question Enlarge limits by absolute value when using symbolic coordinates right, this is not possible at all?               \documentclass[12pt,a7paper,landscape]{scrartcl}     \usepackage{pgfplots}          \pgfplotsset{standard/.style={axis x line=middle,axis y line=middle,every axis x label/.style={at={(current axis.right of origin)},anchor=north},every axis y label/.style={at={(current axis.above origin)},anchor=east}}}          \begin{document}     \begin{tikzpicture}     \begin{axis}[standard,width=8cm,height=5cm,enlarge x limits=0.11,enlarge y limits=0.19,xlabel=$t$,ylabel=$v$,xtick={20,60},xticklabels={,},ytick={25},yticklabels={$v'$}]          \addplot[thick,color=black] coordinates { (0,0) (20,25) (60,25) };     \addplot[dashed,very thin,color=black] coordinates { (20,0) (20,25) (0,25) };     \addplot[dashed,very thin,color=black] coordinates { (60,0) (60,25) };          \node at (axis cs:13.3,8.3) {$s_1$};     \node at (axis cs:40,12.5) {$s_2$};          \draw [decorate,decoration={brace,mirror,raise=2pt}] (axis cs:0,0) -- (axis cs:20,0) node [midway,below=1pt] {$t_1$};     \draw [decorate,decoration={brace,mirror,raise=2pt}] (axis cs:20,0) -- (axis cs:60,0) node [midway,below=1pt] {$t_2$};          \end{axis}      \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/kWrI8.png)


title: References section at the bottom of a page

text: I'm fairly new to Latex, but I'm writing a paper using Latex and Bibtex. In the end I have section with all the references I quoted:               \newpage     \bibliography{bib}     \bibliographystyle{plain}      Is it possible to place the references at the bottom of the previous page (there's enough space) rather than putting it on a whole new page? What command would that be?


title: Installing MinionPro in TeX Live 2011

text: I am having great difficulty to install the font MinionPro in TeX Live 2011. I followed all the steps in the README file on CTAN, but I get the following error when compiling the text:               Process started: xelatex -interaction=nonstopmode "Teste8".tex          kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 1+0/600 --dpi 600 MinionPro-ItLCDFJ.pfb          mktexpk: don't know how to create bitmap font for MinionPro-ItLCDFJ.pfb. mktexpk: perhaps MinionPro-ItLCDFJ.pfb is missing from the map file.          kpathsea: Appending font creation commands to missfont.log. ** WARNING **     Could not locate a virtual/physical font for TFM "MinionPro-It--lcdfj". **      WARNING ** >> This font is mapped to a physical font "MinionPro-     ItLCDFJ.pfb". ** WARNING ** >> Please check if kpathsea library can find      this font: MinionPro-ItLCDFJ.pfb ** ERROR ** Cannot proceed without .vf or     "physical" font for PDF output... Output file removed.          Process exited normally      `.pfb` files were generated and copied to the correct directory. Also all related files are already located at TeX Live as `MinionPro.map`, etc... However, I noticed that files ending in LCDFJ can not be opened because they have 0 kb. It has something to do? Note: The file compiles normally with pdfLaTeX. I can not compile when using LaTeX ... which may be the problem? I need the file to be compiled with LaTeX, because I use a plugin that does not work with XeLaTeX, just with LaTeX.


title: \ref not working with achemso

text: I'm trying to write a document with the `achemso` package, but my `\ref` are not working right. `achemso` links to a package called `cleveref`, then renames `cleveref`'s `\cref` into `\ref`, so any answers for `cleveref` should work here. Example one:               \documentclass[journal=jacsat,layout=traditional]{achemso}     \usepackage{achemso} %loaded last due to clerverRef          \author{Canageek}     \title{Title}     \email{fake@email.ca}     \affiliation[University]{University, Canada}          \begin{document}     \section{Introduction \label{intro}}     blah blah blah blah          \section{two}     Will this work? See~\ref{intro}.          \end{document}      Produces as it's body text: > Introduction > > blah blah blah blah > > two > > Will this work? See Footnote ∗. Next example, since there is mention of a error with references in section titles in the `cleveref` manual.               \documentclass[journal=jacsat,layout=traditional]{achemso}     \usepackage{achemso} %loaded last due to clerverRef          \author{Canageek}     \title{Title}     \email{fake@email.ca}     \affiliation[University]{University, Canada}          \begin{document}     \section{Introduction}      \label{intro}     blah blah blah blah          \section{two}     Will this work? See~\ref{intro}.          \end{document}      This gives the same output as above. Oddly enough neither produce anything odd that I can find in the `.log` file.               \documentclass[journal=jacsat,layout=traditional,hyperref]{achemso}     \usepackage{hyperref}     \usepackage{achemso} %loaded last due to clerverRef               \author{Canageek}     \title{Title}     \email{fake@email.ca}     \affiliation[University]{University, Canada}          \begin{document}     \section{Introduction}      \label{intro}     blah blah blah blah          \section{two}     Will this work? See~\ref{intro}.          \end{document}      Gives a different output: It replaces the `*` with a `??`. The `.log` file for this one also has the message > LaTeX Warning: cref reference format for label type `' undefined on input > line 17. Can anyone tell me what I'm doing wrong? I made sure to update my TeX Live install this morning when I had another problem, so everything should be up to date. Oh, and yes, I've made sure to delete everything but the `test.tex` file from the folder between compiles.


title: Why is the default line length in the KOMA scrreprt documentclass longer than recommended?

text: When using the documentclass `scrreprt` (KOMA scripts) with the default parameters (`a4paper`, `11pt`, `DIV10`), I observe line lengths between 81 and 85 characters (including spaces and punctuation, 78 to 85 without the package microtype). This is noticeably longer than the usually considered optimal lengths of 60 to 70 characters, also described as such in the KOMA manual. The manual also puts an (absolute) upper limit of 80 characters that should not be exceeded. Thus my question: Am I doing something wrong? Or is this just the reality of the A4 paper size colliding with the theory of optimal line length? Here, the rather trivial MWE:               \documentclass[a4paper,11pt]{scrreprt}       \begin{document}       Suspendisse vel felis. Ut lorem lorem, interdum eu, tincidunt sit amet, laoreet vitae, arcu. Aenean faucibus pede eu ante. Praesent enim elit, rutrum at, molestie non, nonummy vel, nisl. Ut lectus eros, malesuada sit amet, fermentum eu, sodales cursus, magna. Donec eu purus. Quisque vehicula, urna sed ultricies auctor, pede lorem egestas dui, et convallis elit erat sed nulla. Donec luctus. Curabitur et nunc. Aliquam dolor odio, commodo pretium, ultricies non, pharetra in, velit. Integer arcu est, nonummy in, fermentum faucibus, egestas vel, odio.     Sed commodo posuere pede. Mauris ut est. Ut quis purus. Sed ac odio. Sed vehicula hendrerit sem. Duis non odio. Morbi ut dui. Sed accumsan risus eget odio. In hac ha- bitasse platea dictumst. Pellentesque non elit. Fusce sed justo eu urna porta tincidunt. Mauris felis odio, sollicitudin sed, volutpat a, ornare ac, erat. Morbi quis dolor. Donec pellentesque, erat ac sagittis semper, nunc dui lobortis purus, quis congue purus metus ultricies tellus. Proin et quam. Class aptent taciti sociosqu ad litora torquent per co- nubia nostra, per inceptos hymenaeos. Praesent sapien turpis, fermentum vel, eleifend faucibus, vehicula eu, lacus.       \end{document}


title: Putting a function into a new command with optional arguments

text: I know I have asked this before. But I just can not wrap my head around some things in LaTeX. Like the optional arguments. I have gotten some clues how to do it for comands, but not quite sure how to do it for commands. What I am looking for is putting @egreg's answer here into my own environment. Best way to create an system of equations enviroment? Now here is how I would like the output to be               \begin{SysOfEq}      ax^2 + bx + c = 0,      3y^2 + 8x - 5 = 0,       z   +  x     = 0     \end{SysOfEq}           \begin{SysOfEq}[2pt]      ax^2 + bx + c = 0,      3y^2 + 8x - 5 = 0,       z   +  x     = 0     \end{SysOfEq}      Now if I am not using the optional argument, the default spacing should be `3pt`. When using the optional spacing, it should be `3pt` \+ input. The code alone, without the optional arguments looks like this               \documentclass[10pt,a4paper]{article}     \usepackage[hmargin=3cm,vmargin=3.5cm]{geometry}     \usepackage[utf8]{inputenc}     \usepackage[norsk]{babel}     \usepackage{amsmath}     \usepackage{mathtools}     \usepackage{systeme}          \makeatletter     \def\SYS@makesyspreamble@i#1{%       \ifnum#1<\SYS@preamblenum         \SYS@addtotok\SYS@systempreamble{\hfil$##$&\hfil$##$&}%          \expandafter\SYS@makesyspreamble@i\expandafter{\number\numexpr#1+    \@ne\expandafter}%       \else         \SYS@addtotok\SYS@systempreamble{\hfil$##$&$##$&\hfil$##$\null}%          \ifSYS@extracol           \SYS@addtotok\SYS@systempreamble{&\SYS@extracolstart##\SYS@extracolend    \hfil\null}%          \fi         \SYS@addtotok\SYS@systempreamble{\cr\SYS@strutup}%        \fi     }     \makeatother          \newcommand{\SysOfEq}[1]{$     \syslineskipcoeff{1.2}\setlength{\tabskip}{#1}     \sysdelim..\systeme{#1}$}               \begin{document}          \SysOfEq{1cm}{          ax^2 + bx + c = 0,          3y^2 + 8x - 5 = 0,           z   +  x     = 0}          \end{document}      The code above does not work. The clock is almost 4am here, so I should really go to bed. It is just kind of frustrating to not complete something as simple as the code above.   * Make a new command that uses the code above (from @egreg).    * Optional argument for horizontal spacing (perhaps also vertical).   * These new values should just add to the existing ones.


title: Is it possible to install ConTeXt on Windows without admin rights?

text: Well, the title says all. On contextgarden it is written: NOTE: You will need admin rights to your Windows to manage the installation process. If you don't have that, get somebody who does. Is this absolute, or is there a solution for a portable version, which can be installed and maintained without admin rights? I am using Win7 and have MixTeX portable installed.


title: AUCTeX write only region file

text: Since I'm used to use `latexmk -pvc` I'd like to do the following:   * Run `latexmk -pvc` (externally) on the `_region_.tex` file   * Use AUCTeX to just write the region file instead of compiling. Is there a way to achieve this? This way I do not block emacs all the time compiling and if an error occurs I use my standard `C-c C-c` command.


title: beamer hyperlinks not correct

text: I've got the following problem. When clicking on a section in a presentation using hyperref, I'm not brought to the page itself, but a little bit below. What could be causing this? ![enter image description here](http://i.stack.imgur.com/hOU7M.png) MWE as follows.               \documentclass[xcolor=dvipsnames]{beamer}     \usepackage{hyperref}     \usepackage{color}     \title[]{MWE}     \begin{document}     \section{VAA}     \begin{frame}     \titlepage     \end{frame}     \section{John Doe}     \begin{frame}[t]{Slide 1}     \end{frame}     \begin{frame}[t]{Slide 1}     \end{frame}     \begin{frame}[t]{Slide 1}     \end{frame}     \end{document}


title: how to comment text depending on a number

text: I have a latex document with 24 questions labeled with numbers from 1 to 8. I want to give a number x between 1 and 8 to latex in the preamble so that all the questions become commented except the ones numbered by x. Is it possible to do that? My idea was to write something like:               \def\label{3} %this number says which question is not going to be commented.          \newcommand\qone[1]{\ifstrequal{label}{1}{#1}{}}     \newcommand\qtwo[1]{\ifstrequal{label}{2}{#1}{}}     \newcommand\qthree[1]{\ifstrequal{label}{3}{#1}{}}     \newcommand\qfour[1]{\ifstrequal{label}{4}{#1}{}}     \newcommand\qfive[1]{\ifstrequal{label}{5}{#1}{}}     \newcommand\qsix[1]{\ifstrequal{label}}{6}{#1}{}}     \newcommand\qseven[1]{\ifstrequal{label}{7}{#1}{}}     \newcommand\qeight[1]{\ifstrequal{label}{8}{#1}{}}      and then enclose question 1 in `\qone{...}`, question 2 in `\qtwo{...}` and so on. I know that this won't work, but I can't figure how to write it from the etoolbox userguide.


title: Trouble formatting createspace template in memoir

text: I have just begun to use `memoir` and I am already having trouble understanding exactly how to make this work. I will refer to the manual but I would like the experts here to explain to me in simple language exactly how this works. Below is the code of document which I got from Painless Memoir Class Book Template               \documentclass[10pt,twoside,openright]{memoir}     %\usepackage{createspace}     %\usepackage[size=pocket,noicc]{createspace}     \usepackage[paperwidth=4.25in, paperheight=6.875in,bindingoffset=.75in]{geometry}     %\usepackage[T1]{fontenc}     \usepackage[latin1]{inputenc}     \usepackage[spanish]{babel}     \usepackage{tgtermes}          %\usepackage{mathpazo}     \usepackage[protrusion=true,expansion=true]{microtype}     %\usepackage{type1cm}     %\usepackage{lettrine}          %\checkandfixthelayout          % See the ``Memoir customise'' template for some common customisations     % Don't forget to read the Memoir manual: memman.pdf          %\title{TITLE OF BOOK}     %\author{NAME OF AUTHOR}     %\date{} % Delete this line to display the current date          %% BEGIN TITLE          \makeatletter     \def\maketitle{%       \null       \thispagestyle{empty}%       \vfill       \begin{center}\leavevmode         \normalfont         {\LARGE\raggedleft \@author\par}%         \hrulefill\par         {\huge\raggedright \@title\par}%         \vskip 1cm     %    {\Large \@date\par}%       \end{center}%       \vfill       \null       \cleardoublepage       }     \makeatother     \author{NAME OF AUTHOR}     \author{NAME OF AUTHOR}     \title{TITLE OF BOOK}     \date{}                                                       %%% BEGIN DOCUMENT          \begin{document}          \let\cleardoublepage\clearpage               \maketitle                                   \frontmatter          \null\vfill          \begin{flushleft}     \textit{NAME OF BOOK}               © COPYRIGHT INFO               ISBN--INFO          ISBN--13:      \bigskip                              ALL RIGHTS RESERVED OR COPYRIGHT LICENSE LANGUAGE                         \end{flushleft}     \let\cleardoublepage\clearpage          \mainmatter     \sloppy          BOOK TEXT GOES HERE          \end{document}      I do not have trouble understanding things such as adding chapters, subsections etc. But the main problem, I am having is setting the various margins (gutter margin, outside margin) and the exact requirements of createspace. For example, the size of my book is 5in x 8in but I do not understand how to change that in the code above. Furthermore, how can I add the various margins such as the gutter margins and the outside margins? If someone could provide a small example as to how to do this, it would be great. Thanks a lot for your time! EDIT: I have managed to change the paper height and width of the document but now I just need to know how to adjust the margins so it fits with the format of createspace.


title: Table of 2x2 tikzpictures

text: I'm attempting to condense 4 tikzpictures into a smaller space in my document. The solution I have is as follows:               \documentclass{article}     \usepackage[paperwidth=6in, paperheight=4in]{geometry}     \usepackage[english]{babel}     \usepackage[utf8x]{inputenc}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{tikz}     \usepackage{multicol}          \begin{document}          Examples          \begin{multicols}{2}          \begin{tikzpicture}[xscale=.5, yscale=.5]     \draw [<->,thick] (0,5) |- (5,0);     \draw [thick] (4,1) --(4,4) node [right] {$A$ is not open in $\mathbb{R}^{2}$.};     \draw [thick, dashed] (4,1) -- (1,1) -- (1,4) -- (4,4);     \draw [fill] (4,1) circle [radius=0.1];     \draw [fill] (4,4) circle [radius=0.1];     \node at (2.5,2.5) {$A$};     \end{tikzpicture}          \begin{tikzpicture}[xscale=.5, yscale=.5]     \draw [<->,thick] (0,5) |- (5,0);     \draw [thick, dashed] (1,1) to [out=90, in=280] (1,4) to [out=30, in=150] (2,3.5) to [out=30, in=200] (4,4) to [out=40, in=90] (5,3) to [out=270, in=90] node [right] {$A$ is open.} (4,1) to [out=180, in=30] (1,1);     \node at (2.5,2.5) {$A$};     \end{tikzpicture}          \begin{tikzpicture}[xscale=.5, yscale=.5]     \draw [<->,thick] (0,5) |- (5,0);     \draw [fill] (4,1) circle [radius=0.1];     \draw [fill] (2,1) circle [radius=0.1];     \draw [fill] (3,5) circle [radius=0.1];     \draw [fill] (1,3) circle [radius=0.1];     \node at (5,3) {$A$ is not open.};     \end{tikzpicture}          $\newline$          \begin{tikzpicture}[xscale=.5, yscale=.5]     \draw [<->,thick] (0,2) |- (5,0);     \draw [ultra thick] (1,0) --(3,0) node [above] {$A$};     \node at (7,-1) {$A$ is not open in $\mathbb{R}^{2}$ but open in $\mathbb{R}$.};     \draw [fill=white] (1,0) circle [radius=0.1];     \draw [fill=white] (3,0) circle [radius=0.1];     \end{tikzpicture}          \end{multicols}          \end{document}      This produces: ![My \(ugly\) solution to condensing 4 tikzpictures.](http://i.stack.imgur.com/rlaw8.png) The solution involves creating columns and placing the tikzpictures within the columns and forcing them to separate with a \newline. But this is, in my opinion, an ugly solution. I'd like to be able to place the 4 tikzpictures in a 2x2 grid, each tikzpicture horizontally and vertically centered within it's cell plus turning each node that currently acts as a label (e.g. "A is open.") into a caption for that tikzpicture. I tried to do this before by placing each tikzpicture within a minipage, but then this can't be captioned (something about float and absolute figures?), also I tried putting \figures of minipages of tikzpictures which, obviously, didn't work and became messy quickly. Is there a simple solution to this?


title: topfigrule only for figure but not for tables

text: My tables have the captions above and are set with `booktabs`'s `\bottomrule` at the end. I would like to separate figure (having their caption below) from the text with a `\topfigrule`               \newcommand{\topfigrule}{\hrule}      _but_ not for tables, as they are already separated enough by the `\bottomrule`. How can I configure `\topfigrule` to be active only for figures? Assume that there is always only one float at the top of the page, either a table _or_ a figure. MWE: first page with table, second page with figure. The first page should not get a topfigrule.               \documentclass[captions=tableheading]{scrbook}     \usepackage{booktabs}     \usepackage{blindtext}          \newcommand{\topfigrule}{\vspace{0.5cm}\hrule}     \setlength{\textfloatsep}{0.5cm}          \begin{document}          \blindtext          \begin{table}       \caption{Foo}       \centering       \begin{tabular}{@{}ccccc@{}}         \toprule          1 & 2 & 3 & 4 & 5\\\midrule          a & b & c & d & e\\          \bottomrule       \end{tabular}     \end{table}          \clearpage          \blindtext          \begin{figure}       \centering       \caption{Bar}       \rule{2cm}{2cm}     \end{figure}          \end{document}


title: Align text and use indent

text: I want to align my text and also use indent at each paragraph.But it seems i can use only one of them (either alignment or indent).               \usepackage{indentfirst}          \begin{flushleft}          \section {Heading}          \indent Here is text.....          \par\indent Another text,....          \end{flushleft}


title: How to combine characters with macron, acute, caron, and grave accents in ConTeXt?

text: I am using a font which does not contain all of the symbols I need. I have managed to use the information in this article about Adobe Glyph List For New Fonts, and have successfully added many characters with these accents to my document, e.g. using the commands from that list, such as `\amacron`, etc., but I cannot understand how to add macron, acute, caron, and grave accents to the letters “ü”, “Ü”, “r”, and “R”. This article at the ConTeXt wiki, about making new characters says that I can use `{\buildtextcedilla b}` to combine a “b”with a cedilla, which works well, but `\buildtextacute`, etc., are not defined, so I cannot see any way to add these four accents to other letters in this manner.   * How can I add these four accents to “ü” and “r”?


title: Color a line in array

text: Is it possible to change a color of a single line inside an `array` environment? I have an array of possible solutions and I'd like the best one to be highlighted, the array is declared like               \usepackage{amsmath}     % <...>     \begin{array}{rcc@{+}c@{+}c@{+}cl}       solution&=&\min\{         &0&34&0&6, \\         &&0&23&5&18, \\         &&5&15&10&16, \\         &&10&10&9&10, \\         &&19&5&10&16, \\         &&23&0&7&5, \\         &&30&0&9&0         &\}     \end{array}      I can get some result using               \usepackage{amsmath}     \usepackage{color}     \usepackage[usenames,dvipsnames,svgnames,table]{xcolor}     % <...>     \begin{array}{rcc@{+}c@{+}c@{+}cl}       solution&=&\min\{         &0&34&0&6, \\         &&0&23&5&18, \\         &&5&15&10&16, \\         &&10&10&9&10, \\         &&19&5&10&16, \\         &&{\color{Emerald}23}&{\color{Emerald}0}&{\color{Emerald}7}&{\color{Emerald}5}, \\         &&30&0&9&0         &\}     \end{array}      But actually this requires too many TeX commands — couldn't it be done simplier? And this solution does not highlight pluses between columns. I want these pluses to be separators so that numeric substitutions be more clear throughout my solution.


title: Plain TeX font cyrillic

text: I am using XeTeX and love it very much. When I use helatex, I have no problems at all. But I want to try do it «True Way»: plainTex. XeTeX takes all annoyance with unicode from me, but sample like this               \font\foo=bar     \foo     {\bf Привет, мир!}               {Jellios}     \bye      fails, because font have not cyrillic symbols. So, my question is example of font(with tfm file), that have cyrillic symbols. My system is Arch GNU/Linux.


title: Incompatibility between pagesel and pgfgantt

text: The following code               \documentclass{scrartcl}     \usepackage[-6,nonofiles]{pagesel}     \usepackage{lipsum}     %\usepackage{pgfgantt}     \begin{document}     \lipsum[1-100]     \end{document}      works fine, but if you comment out the fourth line the PDF produced includes a blank page for each discarded page. Any solution/explanation to this problem? A fix is to place `\usepackage{pgfgantt}` before `\usepackage[-6,nonofiles]{pagesel}`, but still some explanation would be welcome.


title: Does the intlimits option work in amsmath package?

text: AMSMath manual states that > (1) "`sumlimits` (default) Place the subscripts and superscripts of > summation symbols above and below, in displayed equations." > > (2) "`intlimits` Like `sumlimits`, but for integral symbols." > > (3) "To use one of these package options, put the option name in the > optional argument of the `\usepackage` command—e.g., > `\usepackage[intlimits]{amsmath}`." There are two problems. (1) Apparently, there is some "option clash" when I use the amsart document class.               \documentclass[11pt]{amsart}     \usepackage[intlimits]{amsmath}     \begin{document}     \(\int_0^3xdx\)     \end{document}           !LaTeX Error: Option clash for package amsmath      (2) There is no "clash" with the article document class. But the output does not agree with the stated outcome of the manual.               \documentclass[11pt]{article}     \usepackage[intlimits]{amsmath}     \begin{document}     \(\int_0^3xdx\)     \end{document}      ![enter image description here](http://i.stack.imgur.com/qvKQR.png) This must be a known problem. However, I could not find any reference to it at Tex.SX.


title: How to change default for spacing around binary relations?

text: In TeX and LaTeX, the math binary relations (like `=`, `\parallel`, `<`, `\le` ...) have a default (rubber-length) spacing to either side, which is too large for my liking. How can reduce it?


title: Blank or no arrow in a commutative diagram

text: I learned from this nice post that a commutative diagram with the CD environment can have arrows pointing and their commands:   * right              @>>>        * left              @<<<        * down              @VVV        * up              @AAA      **Question** : what is the case that if I just like to keep a blank spacing without arrow? What is the command? Thank you!


title: How do I add Greek as a language on my .tex file?

text: When I am writing Greek on Texmaker, the words are underlined as mistakes as seen below: ![enter image description here](http://i.stack.imgur.com/9G180.png) The result is what I wanted: ![enter image description here](http://i.stack.imgur.com/l6b6X.png) But is there any way to add Greek as a language in my .tex file, in order not to get the red underlines? It's really annoying when my text is lbig.


title: CSS border-top, border-bottom, border-right LaTeX equivalent

text: Is there an equivalent in LaTeX to the CSS border-top, border-bottom, border- right properties? I would like to underline and overline text with with a border on the right, not simply underline or overline it. So instead of a simple underline the text would get underlined/overlined with a border on the right. Here's an example of what I would like to do (in CSS): http://accent.u-biq.org/english.html I saw PDFs with such annotation before, so I'm pretty sure it can be done. (Four tags for Google search: Japanese pitch accent annotation)


title: How can I prevent microtype from modifying individual wordspaces

text: I have created a package that inserts symbol characters from a certain font or little pdf files containing symbols into LaTeX text (http://www.ctan.org/tex- archive/macros/luatex/latex/lilyglyphs). It works pretty well (partially thanks to stackexchange :-) ), but there is one issue I'm currently noticing. The package works with XeLaTeX and LuaLaTeX (due to its use of `fontspec`), but when I compile a document with LuaLaTeX and `microtype` the symbols are often too cramped between the normal text around them. I assume this is because `microtype` takes these symbols as 'words' (because they have spaces before and after them) and uses these wordspaces to 'optimize' paragraph formatting. So I'm looking for a way to prevent microtype to squeeze the wordspace before and after any given 'word' individually. I think I should add such a solution to the commands but make sure they only take effect when microtype is loaded. All commands make use of a small set of internal commands that actually access the glyphs or pdf files, so it should be reasonably possible to modify these internal commands without having to update all 'frontend' commands.


title: Using a coordinate with a pin, on an edge with TiKz

text: I am trying to get a `pin` `edge` to touch another `edge`, under the influence of `shorten`:               \begin{tikzpicture}[s/.style={->,shorten >=1ex,shorten <=1ex}]        \node (a) at (180:1) {$a$};        \node (b) at (270:1) {$b$};        \path[s,bend right=10] (a) edge node[pin={[pin edge={line to,-,shorten >=0ex,shorten <=0ex}]45:test}]{} (b);     \end{tikzpicture}      yields ![pin edge not touching edge](http://i.stack.imgur.com/u8HBx.png) This is due to the fact that the node created has an amount of space, so I thought of doing a _coordinate_ style:               \begin{tikzpicture}[s/.style={->,shorten >=1ex,shorten <=1ex}]        \node (a) at (180:1) {$a$};        \node (b) at (270:1) {$b$};        \path[s,bend right=10] (a) edge node[coordinate,pin={[pin edge={line to,-,shorten >=0ex,shorten <=0ex}]45:test}]{} (b);     \end{tikzpicture}      ... which leads to this funny looking construction, where the first edge looses the `s` style, but keeps the `bend left` property: ![edges touch, but first edge is drawn wrong](http://i.stack.imgur.com/A2MTo.png) Just for fun I tried using `coordinate` instead of `node[coordinate]`               \begin{tikzpicture}[s/.style={->,shorten >=1ex,shorten <=1ex}]        \node (a) at (180:1) {$a$};        \node (b) at (270:1) {$b$};        \path[s,bend right=10] (a) edge coordinate[pin={[pin edge={line to,-,shorten >=0ex,shorten <=0ex}]45:test}] (b);     \end{tikzpicture}      Which was clearly a bad idea ![have no idea what happened here](http://i.stack.imgur.com/hO6h1.png)


title: change fontshape for lewis dot in chemfig chemmacro

text: I wish to draw a chemical reaction showing a radical chain reaction. I am using `chemfig` and `chemmacros` and `beamer`. `beamer` uses sans serif fonts which is good for display and less fussy. When I write my structure as shown in the manual I end up with my reaction in `sans serif` but the radical and atom attached to it in `serif`, Initiation reaction {1} in example below. I have used a phantom atom to get around this as shown in Propagation reation {2} in example below. The difference is between the Cl. radical on right hand side of {1} and Cl. radical on left hand side of {2}. Although I have furnished a workaround, my question is: Is there a way to have the lewis fontshape set to the global font shape? `\chemsetup[chemformula]{font-shape=sf}` did not change anything!               \documentclass{beamer}     \usepackage{chemfig}     \usepackage{chemmacros}     \begin{document}     \chemsetup[chemformula]{font-shape=sf}     \begin{frame}     \begin{reactions}      Cl-Cl ->[$\Delta$][$h\nu$] 2 "\Lewis{0.,Cl}"  \label{react:init}\\     R3H + Cl "\Lewis{0.,\vphantom{H}}" -> R3 "\Lewis{0.,\vphantom{H}}" + HCl \label{react:propagation}     \end{reactions}     \end{frame}     \end{document}      ![radical_reactions](http://i.stack.imgur.com/a90bM.png)


title: Styling latin letters

text: How do I produce this symbol: ![enter image description here](http://i.stack.imgur.com/r22Qz.png) I have tried, `\mathbf{O}`, `\mathcal{O}`, `\mathsf{O}` `\mathcal{O}` was close but not close enough. **EDIT:** `\usepackage{txfonts}` redefines symbols, try to avoid using it if possible. A somewhat dirty hack is found here


title: Centering siunitx columns

text: I have the following table, with the decimal aligning handled by `siunitx` (MWE):               \documentclass{scrartcl}               \usepackage{booktabs}     \usepackage{multirow}          \usepackage{siunitx}         \sisetup{             detect-mode,             group-digits            = false,             input-symbols           = ( ) [ ] - +,             table-align-text-post   = false,             input-signs             = ,             decimalsymbol=comma,             locale = DE,             }   \usepackage{siunitx}     \begin{document}     \begin{table}     \centering     \begin{tabular}{ccS[table-format = 2.8]S[table-format = 2.8]}     \toprule     & Parameter & {Estimate} & {Standard Error} \\     \midrule     EUR/USD model & $\hat \sigma_{X}$ & 0,0315 \\     [\defaultaddspace]     \multirow{4}{*}{GBP/USD model} & $\hat \omega$ & 0,000050 & 0,000045 \\      & $\hat \alpha_{Y}$ & 0,0860 & 0,0454 \\     & $\hat \beta_{Y}$ & 0,8585 & 0,0838 \\     & $\hat \nu$ & 7,6367 & 2,4094 \\     \bottomrule     \end{tabular}     \end{table}     \end{document}      This gives me: ![table](http://i.stack.imgur.com/W3ZmT.png) What I would like is for the entries in the "Estimate" and "Standard Error" columns to be centered under the column titles (with the decimals still aligned properly). I suspect that I have to change the `table-format` but I haven't been able to figure out the right options. Thanks!


title: tcolorbox listing error using beamers begin{frame}

text: I've just started using the tcolorbox package for slides for a LaTeX course. It works nicely to box LaTeX code, interacting with the `listings` package. However, I ran into trouble when I tried to make a box of example code for a `beamer frame`, it fails.               \documentclass{beamer}     \usepackage[listings]{tcolorbox}          \begin{document}     \begin{frame}[fragile]{Example}          \begin{tcblisting}{listing only}      \begin{frame}{equation}     $a =  b$     \end{frame}     \end{tcblisting}          \end{frame}     \end{document}      I get errors "undefined control sequence \end{tcblisting}" and other errors Commenting the `\end{frame}` before the `\end{tcblisting}` outputs ok. Also, running the code inside an `article` documentclass instead of a `beamer` class is also ok. Can anyone point out what I'm doing wrong here? thanks


title: Auctex, how to use doc-view-mode?

text: Newbie here. I have just installed emacs/auctex on my mac. I don't like xdvi to view the dvis, I like to use emacs' builtin pdf viewer to view pdf on its own split window on the right. It used to be so with emacs if I remember correctly, but after I installed the auctex, it seems it by default is using the xdvi. How can I switch back to use doc-view-mode to view my pdf then? Thanks


title: Clustered Stacked bar Chart Overlapping Labels

text: I have following code by which I generate the following graph   ![enter image description here](http://i.stack.imgur.com/vSKk0.png)               \documentclass{article}     \usepackage{pgfplots}     \usepackage{tikz}     \usepackage{xcolor}     \usetikzlibrary{arrows,automata,calc,shapes, positioning}               \makeatletter     \newcommand\resetstackedplots{         \makeatletter         \pgfplots@stacked@isfirstplottrue         \makeatother         \addplot [forget plot,draw=none] coordinates{(1,0) (5,0) (10,0) (15,0) (20,0)};     }     \makeatother          \begin{document}     \begin{tikzpicture}          \definecolor{satPointsColor}{HTML}{D7191C}     \definecolor{unsatPointsColor}{HTML}{FDAE61}     \definecolor{timedOutPointsColor}{HTML}{ABDDA4}     %\definecolor{rendering}{HTML}{2B83BA}              \begin{axis}[ybar stacked,                legend style={             legend columns=3,             at={(xticklabel cs:0.5)},             anchor=north,             draw=none             },               xtick=data,             bar width=2mm,             ymin=0,             axis y line*=none,             axis x line*=none,             tick label style={font=\footnotesize},             legend style={font=\footnotesize},             label style={font=\footnotesize},             xlabel style={yshift=-4ex},             xticklabel style={yshift=-10ex},             xlabel={$\alpha$},             ylabel={Total Points Explored},             area legend,             every node near coord/.append style={                             anchor=east,                             font=\tiny,                     rotate=90}]                  \addplot [bar shift=-0.3cm, satPointsColor,fill=satPointsColor,nodes near coords=2-clusters] table[x=Clusters,y=2] {satPoints.txt};             \addlegendentry{sat points};             \addplot [bar shift=-0.3cm, unsatPointsColor,fill=unsatPointsColor] table[x=Clusters,y=2] {unsatPoints.txt};             \addlegendentry{unsat points};             \addplot [bar shift=-0.3cm, timedOutPointsColor,fill=timedOutPointsColor] table[x=Clusters,y=2] {timedoutPoints.txt};             \addlegendentry{timed out points};                  \resetstackedplots                  \addplot [satPointsColor,fill=satPointsColor,nodes near coords=8-clusters] table[x=Clusters,y=8] {satPoints.txt};             \addplot [unsatPointsColor,fill=unsatPointsColor] table[x=Clusters,y=8] {unsatPoints.txt};             \addplot [timedOutPointsColor,fill=timedOutPointsColor] table[x=Clusters,y=8] {timedoutPoints.txt};                  \resetstackedplots                  \addplot [bar shift=0.3cm,satPointsColor,fill=satPointsColor,nodes near coords=16-clusters] table[x=Clusters,y=16] {satPoints.txt};             \addplot [bar shift=0.3cm, unsatPointsColor,fill=unsatPointsColor] table[x=Clusters,y=16] {unsatPoints.txt};             \addplot [bar shift=0.3cm, timedOutPointsColor,fill=timedOutPointsColor] table[x=Clusters,y=16] {timedoutPoints.txt};         \end{axis}     \end{tikzpicture}          \end{document}      satPoints.txt               Clusters    2   8   16     1           1   0   0     5           3   0   0     10          5   2   0     15          2   0   0     20          1   2   1      timedoutPoints.txt               Clusters    2   8   16     1           0   0   0     5           0   6   0     10          1   4   6     15          6   2   0     20          0   5   4      unsatPoints.txt               Clusters    2   8   16     1           5   9   9     5           37  8   9     10          49  8   3     15          3   3   1     20          4   4   5      Now we can see that the text `Clusters-2, Clusters-8` and `Clusters-16` is overlapping. I want to know what do I do to make it non-overlapping and appearing it under the bar? I think the problem is due to the `bar shift` I added to the code. Thanks ! **==UPDATE==** I can make the code as follows -               \addplot [bar shift=-0.3cm, satPointsColor,fill=satPointsColor,nodes near coords=2-clusters,nodes={xshift=-3mm}] table[x=Clusters,y=2] {Figures/experiments/julien/satPoints.txt};      However, the labels are not well-aligned.


title: Installing a font under Mac OS

text: I would like to install this font http://www.exljbris.com/fontin.html for laTeX on my Mac but I can't find how. The other threads seems to have success with               getnonfreefonts      whick I have installed but it does not seem to work with this package for Mac.


title: Avoiding warning message with "each nth point" option in pgfplots

text: Let assume I have a signal with a very large number points. Once I obtain the associated TikZ file, I may run out of memory for compilation... Ok, so one way to solve this issue is to use the option "each nth point" that allows for skipping a few data points. Is there a way to get rid of the warning message : " **NOTE: coordinate (X,Y) has been dropped because of a coordinate filter.** " during the compilation ? By nature, the option is only used for very large number of data points, thus this message appears a crazy number of times and I tend to believe this slows down the compilation... Thank you for your help.


title: How can I set up nested keys using pgfkeys

text: I've got several documents that I would like to be able to format in different styles depending on the context of the presentation. The content should stay the same, but the formatting may need to change dramatically. I would like to be able store the content in key values to be able to more flexibly organize the formatting. Here's a relatively minor MWE that nevertheless illustrates the underlying concept:               \documentclass{article}     \usepackage{amsmath,amssymb}     \usepackage[margin=0.5in]{geometry}     \usepackage{pgfkeys}     \usepackage{etoolbox}     \usepackage{booktabs}     \usepackage{array}     \makeatletter     %-@-(1)---------------------------------------------------------------------     %% Inner workings which the user should not have to touch                        %% assuming that I've set this up correctly.                                     \pgfkeys{/ae/present/info/.cd,       presentation style/.store in=\ae@style,       resource/.code=\ae@resource@code{#1},     }     \pgfkeys{/ae/resource/code/.cd,       name/.store in=\ae@name,       information/.code=\ae@information@code{#1},     }     \pgfkeys{/ae/information/code/.cd,       given/.store in=\ae@given,       aka/.store in=\ae@aka,       conclusion/.store in=\ae@conclusion,     }          \long\def\presentinfo#1{\pgfkeys{/ae/present/info/.cd,#1}}          \long\def\ae@resource@code#1{%%       \pgfkeys{/ae/resource/code/.cd,#1}       \csname ae@finalize@formatting@\ae@style\endcsname     }          \long\def\ae@information@code#1{%%       \bgroup         \pgfkeys{/ae/information/code/.cd,#1}         \csname ae@build@presentation@\ae@style\endcsname       \egroup     }          %% Internal macros for formatting content     \def\ae@style{A}     \def\ae@name{}     \def\ae@given{}     \def\ae@aka{}     \def\ae@empty{}     \def\ae@conclusion{}     \def\ae@content@body{}          %% why do I have to "hide" \midrule like this?     \def\ae@midrule{\midrule}          %-@-(2)---------------------------------------------------------------------     %% User can play with the following macros to change the formatting              %% of the output.                                                                %%--------------------------------------------------------------------------     %% STYLE="A"                                                                     %%--------------------------------------------------------------------------     \def\ae@build@presentation@A{%%       \xdef\ae@content@body{\expandonce\ae@content@body\noexpand\\                                \noexpand\ae@midrule                                \expandonce\ae@given     \noexpand &                                 \expandonce\ae@aka       \noexpand &                                 \expandonce\ae@conclusion }}          \def\ae@finalize@formatting@A{%%       \par\vspace{2ex}%%       \noindent       \textbf{\ae@name:}\par\vspace{2ex}       \begin{tabular}{>{\raggedright}p{3in}cp{3in}}         \textsf{Given} & \hspace{3em} & \textsf{Conclusion}         \ae@content@body       \end{tabular}\par\vspace{1ex}       \gdef\ae@content@body{}%%     }          %%--------------------------------------------------------------------------     %% STYLE="B"                                                                     %%--------------------------------------------------------------------------     \long\def\ae@build@presentation@B{%%       \xdef\ae@content@body{\expandonce\ae@content@body         \noexpand\item             \noexpand\textsf{Given:}                 \noexpand\parbox[t]{\noexpand\dimexpr\noexpand\linewidth-2.5cm}{\noexpand\raggedright\expandonce\ae@given}              \noexpand\hspace*{\noexpand\fill}%%             \ifx\ae@aka\ae@empty\else$\rightarrow$\fi             \noexpand\textsf{\ae@aka}             \noexpand\par           \noexpand\textsf{Conclude:} \expandonce\ae@conclusion       }}          \long\def\ae@finalize@formatting@B{%%       \par       \noindent       $\left.       \begin{minipage}{4in}       \begin{itemize}       \ae@content@body       \end{itemize}       \end{minipage} \right\}${\large if working with \sffamily\ae@name}\par \vspace{4ex}       \def\ae@content@body{}%%     }          \makeatother     \begin{document}          \presentinfo{%%'       presentation style=A,       resource={%%         name=Triangles,         information={%%'           given=Three pairs of sides are congruent,           aka=SSS,           conclusion=The two triangles are congruent.},         information={           given=Two pairs of sides are congruent and 1 pair of included angles is congruent,           aka=SAS,           conclusion=The two triangles are congruent,}       },        resource={%%         name=Transversal,         information={%%           given=Alternate interior angles are congruent,           conclusion=The  two lines are parallel.},         information={%%           given=Same side interior angles are supplementary,           conclusion=The two lines are parallel.},       }       }          \end{document}      When using `presentation style=A`, the resulting document appears as > ![enter image description here](http://i.stack.imgur.com/HSNMN.png) When using `presentation style=B`, the resulting document appears as > ![enter image description here](http://i.stack.imgur.com/RzloU.png) This gives me a wide degree of latitude in how I format my document. But my approach seems a bit too convoluted. Is there a better approach? I would like to stick with `pgfkeys`. Is there a way in `pgfkeys` to avoid the nested calls to further key definitions? I tried creating a `.style` that would accomplish what I wanted but that didn't go anywhere. On something of tangent to my primary question: I was having problems getting `\midrule` to behave. I had to bury it inside another macro. Otherwise, even with `\noexpand\midrule` I got alignment errors. Any ideas?


title: How to set Tikz scatter marker weight?

text: I'm using tikz to produce scatter plots as shown in this question. I can define the marker size with `\tikzset{mark size=8}` but now I'm looking for a way to make the line of the marker thicker in a similar way. Is this possible with `\tikzset`?


title: changing font style/size for proof, adding a square after example

text: Is is possible to change font size/(or style) for a proof? I was also thinking to add a small hollow square at the end of every example to separate the text a little. Something similar that works like \qedhere symbol.               \documentclass[11pt,a5paperfootinclude=true,headinclude=true]{scrbook} % KOMA-Script book     \usepackage[T1]{fontenc}     \usepackage{lipsum}     \usepackage[linedheaders,parts,pdfspacing]{classicthesis} % ,manychapters     \usepackage[bitstream-charter]{mathdesign}     %\usepackage[osf]{libertine}     \titleformat{\section}      {\normalfont\bfseries}{\thesection}{1em}{}     \usepackage{amsthm}     \usepackage{amsmath}      \usepackage{multicol}      \usepackage{IEEEtrantools}     \usepackage{anysize}     \usepackage{stmaryrd}     \usepackage{bbding}     \usepackage{chngcntr}%added to reset footnote for each chapter     \counterwithout{footnote}{chapter}%added to reste footnote for each chapter      \marginsize{0.1\paperwidth}{0.1\paperheight}{2cm}{2cm}     \newcommand{\bigslant}[2]{{\raisebox{.2em}{$#1$}\left/\raisebox{-.2em}{$#2$}\right.}}     \usepackage{enumerate}     \theoremstyle{plain}     \newtheorem{thm}{Theorem}[chapter] % reset theorem numbering for each chapter     \theoremstyle{definition}     \newtheorem{defn}[thm]{Definition} % definition numbers are dependent on theorem numbers     \newtheorem{exmp}[thm]{Example}     \theoremstyle{corollary}     \newtheorem{cor}[thm]{Corollary}     \theoremstyle{lemma}     \newtheorem{lem}[thm]{Lemma}     \theoremstyle{proposition}     \newtheorem{prop}[thm]{Proposition}     \newcommand{\ndiv}{\hspace{-4pt}\not|\hspace{2pt}}     \DeclareMathOperator{\disc}{disc}     %\renewcommand{\qedsymbol}{\rule{0.7em}{0.7em}}     \renewcommand\qedsymbol{\RectangleBold}     \def\quotient#1#2{%         \raise1ex\hbox{$#1$}\Big/\lower1ex\hbox{$#2$}%     }     \DeclareMathOperator{\order}{\mathcal{O}_{K}} %defined myself     \DeclareMathOperator{\z}{\mathbb{Z}} %defined myself     \DeclareMathOperator{\q}{\mathbb{Q}} %defined myself     \DeclareMathOperator{\C}{\mathbb{C}} %defined myself     \begin{document}     \begin{proof}     This is my proof     \end{proof}     \begin{exmp}     Want a hollow square at the end of this example.     \end{exmp}     \end{document}      Which produces ![enter image description here](http://i.stack.imgur.com/hVTAN.jpg)


title: In Lyx, how to change "Part I" with some other text

text: I'm using the article class. When creating a new part, I would like to change "Part 1" to "Experiment 1", "Part 2" to "Experiment 2" and so on, followed by my part title. How can I do that? I've found this question, but the answers didn't work for me In Lyx, how to change the "Part" section to "Chapter"? Thank you! :) Edit: This is my preamble:               \usepackage[version=3]{mhchem}     \date{}     \usepackage{fancyhdr}     \usepackage{titlesec}     \setlength{\headheight}{15.2pt}     \pagestyle{fancy}     \renewcommand{\headrulewidth}{0pt}     \renewcommand{\footrulewidth}{0pt}     \lhead[]{}     \rhead[]{}     \lhead[]{}     \rhead[]{}     \lfoot[\thepage]{}     \rfoot[]{\thepage}     \renewcommand{\partname}{Experiment}%added later      EDIT: The `\renewcommand{\partname}{Experiment}` line works fine with the language set to English, but i need to make this work in other languages, because now if I add the toc it's called "Contents", while I need an italian "Indice". Edit: self-answer (for all who may find this helpful): use `\renewcommand\contentsname{Indice}` to change "Content" to "Indice" or whatever.


title: nomencl package doesn't allow exclamation marks in keys

text: I am using the `nomencl` package, and so far it has worked out flawlessly. However, today I decided to introduce some notation that includes an exclamation mark, and it failed. There is a minimal example here:               \documentclass{article}     \usepackage{nomencl}     \makenomenclature          \begin{document}     \nomenclature{$n!$}{factorial of $n$}     \[      n! = \prod_{i=1}^n i     \]     \printnomenclature     \end{document}        * `pdflatex text.tex` runs OK   * `makeindex test.nlo -s nomencl.ist -o test.nls` runs OK, and reports "1 entries accepted, 0 rejected)", etc (no problem).   * `pdflatex text.tex`, ran for the second time after `makeindex`, fails. The error is this:               Writing nomenclature file test.nlo     (./test.aux) (./test.nls     ! Missing $ inserted.     <inserted text>                      $     l.6     \subitem                      [{$n     ?       If I remove the exclamation mark, like this:               \nomenclature{$n$}{factorial of $n$}      then the document compiles and produces the correct output. I have tried using `$n{!}$` and `$n\!$`, but that didn't fix the problem. What would be the right way to include $n!$, or $!n$, or other expressions with exclamation marks in nomenclature?


title: figures in sidewaysfigure environment are not listed in List of Figures

text: I was writing my thesis and found that all figures I included in `sidewaysfigure` environment are not listed in `\listoffigures`. How can I make those figures listed in List of Figures? What I did is like:               \begin{sidewaysfigure}[ht!]       \centering       \subfloat[figure caption]{\label{fig:figuelabel}       \includegraphics[width=8cm,trim=0cm 0cm 1cm 1cm, clip=true]{Figures/figureFilename.pdf}}       \caption[]{my caption}       \label{fig:labelname}     \end{sidewaysfigure}


title: Biblatex multible bibliographies using keywords not working

text: I'm trying to print a sperate bibliography for references for figures but only one of the bibliographies prints at the end of the document. Warnings in the document:               Keyword 'primary' not found on input line 8.     Empty bibliography on input line 8.      Minimal working example:               \documentclass{article}      \usepackage{biblatex}      \addbibresource{bib.bib}          \begin{document}      Hello\cite{KandR} and Goodbye\cite{CUEDCplusplus}          \printbibliography[keyword=primary, title={Primary references}]     \printbibliography[notkeyword=primary, title={Other references}]     \end{document}      bib.bib               @book{KandR,        author  = {Kernighan, Brian W. and Ritchie, Dennis M.},        title  = {The C Programming Language Second Edition},        publisher = {Prentice-Hall, Inc.},        year = {1988}     }          @online{CUEDCplusplus,        keyword={primary},        author  = {Love, T.P.},        title   = {CUED C++},        url = {http://www-h.eng.cam.ac.uk/help/tpl/languages/C++.html},        urlyear = {2010}     }      Screenshot of the result ![Only one bibliography prints](http://i.stack.imgur.com/KgbQs.png)