title: Modifying the section style

text: \documentclass[12pt]{book}     \usepackage{tikz}     \usepackage{lipsum}     \usepackage[explicit]{titlesec}     \usetikzlibrary{shapes.misc,arrows}     \newcommand\titlebar{%     \tikz[baseline,trim left=0.5cm,trim right=2.5cm] {%         \node [             text = red!70!green,             anchor= base east,             minimum height=3.5ex] (a) at (2.5cm,0.6ex) {%         };        \path[fill=red!70!blue] (a.east) circle (.5ex);        \draw[color=red!70!blue, thick,rounded corners=1ex] (a.east) |- (\textwidth+3cm,-0.75ex);     }     }          \newcommand\subtitlebar{%     \tikz[baseline,trim left=1cm,trim right=3.05cm] {%         \node[             text = red!70!green,             anchor= base east,             minimum height=3.5ex] (b) at (3.05cm,0.6ex) {%         };        \path[fill=red!70!blue] (b.east) circle (.5ex);        \draw[color=red!70!blue, thick,rounded corners=1ex] (b.east) |- (\textwidth+2cm,-0.75ex);     }%     }          \titleformat{\subsection}{\normalfont\sf}{\subtitlebar}{0.2cm}{\textcolor{blue!60!green}{#1}}     \titlespacing*{\subsection}{-2cm}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex}     \titlespacing*{name=\subsection,numberless}{0cm}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex}     \renewcommand*{\thesubsection}{\arabic{subsection}}               \titleformat{\section}{\large\sf}{\titlebar}{0.25cm}{\textcolor{blue!60!green}{#1}}     \titlespacing*{\section}{-2.15cm}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex}     \titlespacing*{name=\section,numberless}{0cm}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex}     \renewcommand*{\thesection}{\arabic{section}}     \begin{document}     \chapter{This is a test}     \section{Section}     \lipsum[4-5]     \subsection{Subsection}     \lipsum[9]     \end{document}      This code , generates the section styles as follows : How do I remove the lines (the red lines). and increase the font size of the section name and change the font size ![enter image description here](http://i.stack.imgur.com/btp57.png)


title: TeXmaker for plain TeX

text: Sorry if this has already been asked, but, if there is something similar like this TeXmaker for plain TeX?


title: Non-raised tildes in a minted environment

text: Consider the following minimal example that combines Beamer + Minted:               \documentclass[11pt,utf8]{beamer}     \usepackage{minted}          \begin{document}     \begin{frame}[fragile]     \frametitle{Foobar}     \begin{minted}{ocaml}     let foobar ~x ~y = x + y     \end{minted}     \end{frame}     \end{document}      The problem is that the tilde characters in function `foobar` inside the minted environment are rendered almost as superscripts. I want them to be rendered as is customary in monospaced fonts: vertically centered. Any ideas?


title: Table of Contents with headings on every page

text: I am writing my doctoral thesis using LaTeX and now I face the following problems. On every page of the ToC, the headings must be printed. For example, on the first page and consecutive pages of the ToC, I want the following to be printed:               **Chapter no                Contents                     Page no**      The same applies to List of Figures and List of Tables. How can I achieve that?


title: What is a more efficient way to draw this tree?

text: I have drawn the following tree in TikZ. What I don't like about it is   1. that I have to manually adjust the `sibling distance` for each level; and   2. the syntax is too cumbersome. It has been suggested to me by @percusse and @AlanMunn that using `tikz-qtree` and/or `forest` may be a more efficient way to produce the same result. But I don't have experience in using either package. It would be nice if someone can reproduce my example using either of these packages, so that I can have quick example to learn from instead of reading a 150-page manual trying to find an answer. ![enter image description here](http://i.stack.imgur.com/J1w9D.png)               \documentclass{standalone}     \usepackage{tikz}     \usepackage{amsmath}          \begin{document}          \tikzset{       % Two node styles for game trees: solid and hollow       solid node/.style={circle,draw,inner sep=1.2,fill=black},       hollow node/.style={circle,draw,inner sep=1.2},     }          % macro for entering payoffs     \newcommand\payoff[1]{       $\begin{pmatrix} #1 \end{pmatrix}$     }          \begin{tikzpicture}[font=\footnotesize]       \tikzset{         level 1/.style={level distance=15mm,sibling distance=65mm},         level 2/.style={level distance=15mm,sibling distance=30mm},         level 3/.style={level distance=15mm,sibling distance=15mm},         level 4/.style={level distance=15mm,sibling distance=10mm},       }            \node[hollow node,label=above:{Nature}]{}         child{node[solid node,label=left:{P1}]{}           child{node(l1)[solid node]{}             child{node[solid node,label=below:{\payoff{1\\-1}}]{}edge from parent node[left]{L}}             child{node[solid node,label=below:{\payoff{0\\0}}]{}edge from parent node[right]{R}}             edge from parent node[left]{U}           }           child{node(l2)[solid node]{}             child{node[solid node,label=below:{\payoff{0\\0}}]{}edge from parent node[left]{L}}             child{node[solid node,label=below:{\payoff{2\\-2}}]{}edge from parent node[right]{R}}             edge from parent node[right]{D}           }           edge from parent node[left,xshift=-10]{A}         }         child{node[solid node,label=right:{P1}]{}           child{node(r1)[solid node]{}             child{node[solid node,label=below:{\payoff{-2\\2}}]{}edge from parent node[left]{L}}             child{node[solid node,label=below:{\payoff{0\\0}}]{}edge from parent node[right]{R}}             edge from parent node[left]{U}           }           child{node(r2)[solid node]{}             child{node[solid node,label=below:{\payoff{0\\0}}]{}edge from parent node[left]{L}}             child{node[solid node,label=below:{\payoff{-1\\1}}]{}edge from parent node[right]{R}}             edge from parent node[right]{D}           }           edge from parent node[right,xshift=10]{B}         }       ;            \draw[dashed](l1)--(l2)--node[midway,above]{P2}(r1)--(r2);     \end{tikzpicture}          \end{document}


title: Astronomical symbols in LaTeX dwarf planet Vesta and Ceres

text: What package is need to make the Vesta symbol in LaTeX? I am using `wasysym` (maybe misspelled here) package which generates `\earth` and the other planets. However, I would like the symbol for Vesta and Ceres.


title: (How) Can I vertically align parts of cell contents differently?

text: I am trying to create the following game matrix and am wondering how exactly can I vertically align the cell contents? Especially since I need them to be offset differently in the same cell.Is this doable or should I cheat with with a separate column? Either ways what's the simple and best way to offset the contents? ![enter image description here](http://i.stack.imgur.com/msqII.jpg)


title: Change direction of a textbox, taking up space from above instead from below

text: I am designing a custom theme for my LaTeX presentations. This is my title page:![It is okay this way](http://i.stack.imgur.com/Kv6so.png) Now when I have a longer title, this happens: ![This happens](http://i.stack.imgur.com/SqwZn.png) Here's my code (according to this post):               \defbeamertemplate*{title page}{pure}[1][]     {         \vskip5.5cm         \begin{beamercolorbox}[wd=11cm,leftskip=3cm]{rule}           \textcolor{black!70}{\rule{8cm}{.2mm}}         \end{beamercolorbox}         \vskip0.2cm         \begin{beamercolorbox}[wd=11cm,leftskip=3cm,#1]{title page header}           \usebeamerfont{title}\inserttitle\par         \end{beamercolorbox}         \vskip0.75cm         \begin{beamercolorbox}[wd=11cm,leftskip=3cm,#1]{author}           \usebeamerfont{author}\insertauthor         \end{beamercolorbox}          \vskip0.2cm         \begin{beamercolorbox}[wd=11cm,leftskip=3cm,#1]{date}           \usebeamerfont{author}\insertdate         \end{beamercolorbox}       \vfill     }      What can I do? I do not want to adjust my `\vskip` in the style definition every time. Can I tell LaTeX to invert the direction so that my textbox grows to the top instead of pushing everything to the bottom?


title: register-true in multicols environment

text: I have a `multicols*` environment with sections and subsections and list environments and I want the text "registertrue", i.e. the lines are all on the same level ACROSS the columns.(If you were to extend the baseline of a line in a column to the left or right, it would be on the exact same level as the baseline of the line in the other column). Not only do the sections mess up the line spacing, floating pictures (inside a single column) or list environments do it, too. The parskip is set to 0pt.


title: Theorem environment - centered line

text: \begin{theorem}     Let apples be fruits and let tomatos be a veg. Then the following is true:     \centerline{apples are veg}     \end{theorem}      I just read that one shouldn't use centerline because it's TeX and not LaTeX. The article says one should use `{\centering ... }`. I now wonder if there's a more appropriate command for a centered line within a theorem environment?


title: exam class : question with circles of same size

text: Using code mentioned below : i'm able to circle question numbers :               \documentclass{exam}     \usepackage{tikz}          \newcommand*\circled[1]{\tikz[baseline=(char.base)]{                 \node[shape=circle,fill,inner sep=1.5pt, text=white] (char) {#1};}}     \renewcommand{\questionlabel}{\circled{\thequestion}}     \begin{document}     \begin{questions}     \question[4] Choose the correct reponse:      \begin{choices} \choice Option A     \choice Option B     \choice Option C     \choice Option D      \end{choices}     \end{questions}     \end{document}      But as question number increases from one digit to two digit number, circle size changes. ![enter image description here](http://i.stack.imgur.com/yXU4r.png) Can you suggest how can we've circle of constant size for all numbers. [1-100]


title: Write environment body verbatim to a file

text: How can one write the body of an environment verbatim to an external file. I tried the following but get problems if the body contains undefined macros (error) or e.g. a `%` (disappears in the output). **Try 1**   Using `environ` to get the environment content.               \ProvidesPackage{tofile1}          \RequirePackage{environ}          % counter for external files     \newcounter{TF@File}          \newwrite\TF@out          \NewEnviron{tofile}{%         \stepcounter{TF@File}         \edef\TF@outFile{ext-\jobname-\theTF@File.tex}         \typeout{Name: \TF@outFile}         \immediate\openout\TF@out=\TF@outFile         \typeout{\TF@outFile\space opened}         \immediate\write\TF@out{\BODY}         \typeout{\TF@outFile\space written}         \immediate\closeout\TF@out         \typeout{\TF@outFile\space closed}     }                    % test.tex     \documentclass{article}          \usepackage{tofile1}          \begin{document}     Test          \begin{tofile}     That's {a short Test}     which works     but ignores line breaks     \end{tofile}          Text          \begin{tofile}     \xx That's {another Test}%     This one doesn't work ...     it gives an error because \xx is undefined     \end{tofile}     \end{document}      This one creates the two desired files `ext-test-1.tex` and `ext-test-1.tex` but linebreaks are ignored and an undefined control sequence (`\xx`) causes an error. Furthermore the percent char is interpreted as comment not as simple character. I guess come catcode magic could help. **Try 2**   Using the `filecontents` package.               \ProvidesPackage{tofile2}          \RequirePackage{environ}     \RequirePackage{filecontents}          % counter for external files     \newcounter{TF@File}          \newwrite\TF@out          \newenvironment{tofile}{%         \stepcounter{TF@File}         \edef\TF@outFile{ext-\jobname-\theTF@File.tex}         \begin{filecontents}{\TF@outFile}     }{         \end{filecontents}     }                    Same test file as above ...      This one creates only the first file `ext-test-1.tex` and the an error occurs because the end of `filecontens` can’t be determined correctly. Is there another way do do this, maybe a package?


title: Installing KOMA for Mac (Lyx)

text: I'm new to using Lyx and installing packages, so please be kind and patient. :) I've downloaded the entire KOMA package and folder, but have yet to install it. I will get error messages from Lyx that says I haven't installed KOMA. I usually get these error messages when I preview my document as a PDF. Any help/guidance to how to install it? I'm using the current version of Lyx (2.1) and current version of Mac (10.9- Mavericks) Once again, I'm a noob. Thanks for your help!


title: Scale figure to a percentage of \textwidth

text: I would like to change my figure's width to a precentage of my `\textwidth`: `\textwidth /2` would scale to 50% of the `\textwidth`. What is the proper syntax (if any) to do this ?


title: How to move chapter number in classicthesis class

text: I am using `classicthesis` for my thesis. In each chapter LaTeX puts its number, but I need to move it. Here you have an screenshot example, in this image I wish to move "4" number to the left. ![screenshot](http://i.stack.imgur.com/1qkou.png)


title: List item text alignment

text: I have nested enumeration with a long labels. As a result, the text in items becomes very shifted to the right. I want that this text in items won't be moved at all (the same horizontal offset as the text without enumeration). MWE               \documentclass[a4paper, 10pt, twocolumn]{article}     \usepackage{fontspec}     \usepackage{polyglossia}     \usepackage[hmargin=0.1cm,vmargin=2cm]{geometry}     \usepackage{enumitem}          \setlength{\columnsep}{0.2cm}     \setlength{\columnseprule}{0.4pt}          \setlist[enumerate,1]{label=\bfseries\thesubsection.\arabic*}     \setlist[enumerate,2]{label*=\bfseries.\arabic*}      \setlist[enumerate,3]{label*=\bfseries.\arabic*}      \setlist[enumerate,3]{label*=\bfseries.\arabic*}     \setlist[enumerate]{leftmargin=*}          \begin{document}     \raggedbottom          \section{Section 1}          \section{Section 2}     Section Line     \subsection{Subsection 1}     \subsection{Subsection 2}          \begin{enumerate}         \item Item 1 \\         Line 1         \item Item 2 \\         Line 2     \end{enumerate}          \end{document}      Line 1 and Line 2 in my example must have the save horizontal offset as Section Line.


title: Creating a titlepage

text: I want to create a titlepage as the one shown here. But I don't know how to put a line under the logo and get the text and all the stuff in the right position. I've tried some things with:               \begin{titlepage}          \pagecolor{blue}     \includegraphics{logo.jpg}     \title{TITLE}          \end{titlepage}      but it's still not looking like the pdf. Any ideas, suggestions or solutions?


title: Draw only some segments of a path in TikZ?

text: Is there a good way to create a path in TikZ only some segments of which are stroked? I want to create the whole path in a single command so that it can be filled, but I also want to stroke some parts of the boundary of the filled region, but not all of them. The best solution I've thought of so far is to use `edge` operations in the middle of the path to do the stroking; for instance here is a green-filled square with one edge stroked:               \path[fill=green] (0,0) -- (1,0) edge (1,1) -- (1,1) -- (0,1) -- cycle;      This is a little better than               \path[fill=green] (0,0) -- (1,0) -- (1,1) -- (0,1) -- cycle;     \draw (1,0) -- (1,1);      but it still requires giving the command that draws the segment from (1,0) to (1,1) twice, which is annoying and error-prone if it's a more complicated command like a Bézier curve, and impossible if it's something like a circular arc that can't be drawn by a `edge` command (at least, not without writing a custom "to path"). Any suggestions?


title: Attach files to PDF with dvipdfmx

text: The attachfile package allows files to be embedded within the output PDF of a pdfLaTeX document, and the attachfile2 extends this for `dvips` use as well. In an article, the author of `dvipdfmx` gives a recipe for doing the same thing with that driver instead:               \begin{filecontents*}{example.txt}     this is a text file to be embedded     \end{filecontents*}          \documentclass{article}     \begin{document}     test     \special{pdf:fstream @myfile (example.txt)}%     \special{pdf:ann bbox 0 0 10 10 <<       /Subtype /FileAttachment /FS <<          /Type /Filespec /F (example.txt)           /EF << /F @myfile >> >>        /Name /PushPin >>}     \end{document}      However, when I compile this with `latex`+`dvipdfmx`, I get the following warning:               ** WARNING ** Could not open file: example.txt     ** WARNING ** Interpreting special command fstream (pdf:) failed.     ** WARNING ** >> at page="1" position="(168.14, 707.125)" (in PDF)     ** WARNING ** >> xxx "pdf:fstream @myfile (example.txt)"     ]     ** WARNING ** Object @myfile used, but not defined. Replaced by null.      Does anyone know what I'm going wrong? (TeX Live 2010, Mac OS X.) It would be great to be able to embed files using this method, since that would facilitate XeTeX use with the attachfile packages. **Update** : things seem to work fine in TeX Live 2009. I'm thinking that this is a bug in the latest version of dvipdfmx. Any confirmation on this?


title: Beamer: how to convince "includeslide" to include the last slide of a frame

text: I'm using `\includeslide` to create copies of my Beamer presentation slides in handouts, but have hit a small snag. By default, it appears to choose the _first_ slide in a frame unless I specify the page number with an option or a suffix:               % assume 4 slides in the frame     \includeslide{mylabel}  % this shows the first slide     \includeslide{mylabel<4>} % this shows the fourth slide      Now, my presentation is very big, so I'm using a lot of new commands and environments to speed things up. Is there some way I can convince `\includeslide` to default to the _last_ slide in a frame? e.g. is there a Beamer variable that contains the number of slides, or an option to pgfimage I can somehow hack into a new version of includeslide?


title: Should numbers in inline math equations be displayed using CM math font or Times?

text: I received a proof for a journal paper (IEEE) where some of the numbers in the inline equations of my manuscript were changed to Times font (font used for text in the template IEEEtran.cls) and some others were not changed to Times and left as CM math font (font used for math in IEEEtran). I would like to be consistent throughout the document and know which one to use. For example, should I use:               $x=1$ m      or               $x=$ 1 m      (where m is for meters)? Another example would be: `$x=2y$` or `$x=$ 2$y$`?


title: print \filelist to pdf

text: I know that there are many packages to modify the output of `\listfiles`. However, I would like to print this list not to the log file but in a nice way to the pdf. This makes sence for my template documentation where I want to add a list of all files used in the template in the order of loading.


title: Making 1 skinny column in TikZ binomial tree

text: I have a binomial tree with arrows pointing backwards. I currently have short arrows pointing towards the left-most node (which is invisible). This first colum is taking up very little visual space, except it's pushing my `tikz` lattice to the right by a whole column's width. How to fix?                    \documentclass{article}         \usepackage{tikz}         \usetikzlibrary{matrix,fit,backgrounds}              \begin{document}                           \begin{tikzpicture}[>=stealth,sloped]               \matrix (tree) [%                 matrix of nodes,                 minimum size=1cm,                 column sep=2.7cm,                 row sep=0.4cm,               column 4/.style={nodes={draw,fill=cyan!30,rounded corners}},               ]               {               &                    &                                               &  $^\tau S_0$     \\               &                    &  $R^{-1}(p (_\tau S_0) + (1-p) (_\tau S_2))$  &              \\               & ...                &                                               &  $^\tau S_1$     \\         $  $   &                    &  $R^{-1}(p (_\tau S_1) + (1-p) (_\tau S_2))$  &              \\               & ...                &                                               &  $^\tau S_2$     \\               &                    &  $R^{-1}(p (_\tau S_2) + (1-p) (_\tau S_3))$  &              \\               &                    &                                               &  $^\tau S_3$     \\               };               \draw[<-,shorten <=2cm,double,double distance=1pt] (tree-4-1) -- (tree-3-2) node [midway,above] {};               \draw[<-,shorten <=2cm,double,double distance=1pt] (tree-4-1) -- (tree-5-2) node [midway,above] {};                    \draw[<-,double,double distance=1pt] (tree-3-2) -- (tree-2-3) node [midway,above] {};               \draw[<-,double,double distance=1pt] (tree-3-2) -- (tree-4-3) node [midway,below] {};               \draw[<-,double,double distance=1pt] (tree-5-2) -- (tree-4-3) node [midway,above] {};               \draw[<-,double,double distance=1pt] (tree-5-2) -- (tree-6-3) node [midway,below] {};               \draw[<-,double,double distance=1pt] (tree-2-3) -- (tree-1-4) node [midway,above] {};               \draw[<-,double,double distance=1pt] (tree-2-3) -- (tree-3-4) node [midway,below] {};               \draw[<-,double,double distance=1pt] (tree-4-3) -- (tree-3-4) node [midway,above] {};               \draw[<-,double,double distance=1pt] (tree-4-3) -- (tree-5-4) node [midway,below] {};               \draw[<-,double,double distance=1pt] (tree-6-3) -- (tree-5-4) node [midway,above] {};               \draw[<-,double,double distance=1pt] (tree-6-3) -- (tree-7-4) node [midway,below] {};                  \end{tikzpicture}              \end{document}


title: miktex, ucs, uni-global.def and empty unicode directory

text: I'm trying to compile a cv with LaTeX and the `europecv` class. Compilation fails because a file named `uni-global.def` is missing. After a Google search, I found that file should be into the `miktex/tex/latex/unicode/data` directory. However, that directory contains a `data` and a `contrib` folders, both empty. What can I do to solve that error? Below is the code i wrote.               \documentclass[helvetica,narrow,italian,logo,totpages,booktabs]{europecv}     \usepackage[utf8]{inputenc}     \usepackage[italian]{babel}     \usepackage[T1]{fontenc}     \usepackage{textcomp}     \usepackage{graphicx}     \usepackage{geometry}     \geometry{verbose,a4paper,tmargin=1.27cm,bmargin=2cm,lmargin=1cm,rmargin=1cm}     \usepackage{microtype}          \ecvname{Albert Einistein}     \ecvnationality{Dutch}     \ecvemail{albert.einstein@relativitytheory.de}     \ecvgender{Maschio}          \begin{document}          \begin{europecv}          \ecvpersonalinfo % prints the personal info, defined in the preamble          \end{europecv}          \end{document}


title: How to make table numbering as table section_number alpha

text: I would like the numbering of tables in a section to be in the following format: Table section_number alpha: table caption. For examples, tables of section 4.3 should look like: **Table 4.3 a** : Table one of section 4.3 **Table 4.3 b** : Table two of section 4.3 How can I do it? Thanks!


title: Vertical left branch in qtree

text: Let's consider a really simple tree like the following :               \documentclass[12pt]{beamer}     \usepackage{qtree, tikz-qtree, tikz}     \begin{document}          \begin{frame}{Title}     \begin{tikzpicture}     \Tree          [.XP         [.X ] [.compl ] ]        \end{tikzpicture}     \end{frame}          \end{document}      In its natural form, it looks like two symetric branches /\ . How can I make it looks like |\ (or eventually the reverse, /|). In other words, given that I only use binary branches, how can I "tell my tree" to put a branch straight, and the other one oblic left of oblic right? I may eventually want to draw a tree like this :                |\      |\     /|


title: Footnote rule in beamer showing too early with overlays

text: Consider the following MWE :               \documentclass{beamer}          \begin{document}          \begin{frame}          \begin{itemize}[<+->]     \item item     \item item\footnote<.->{footnote}     \item item     \end{itemize}          \end{frame}          \end{document}      The horizontal rule which is displayed between the main text and the footnote is showing on the first slide, although the footnote itself is uncovered only on the second slide. Is there a way for this rule to be printed only with the footnote and not before?


title: Global definition of pgfplots axes style conflicts with colorbar

text: I am trying to plot an individual colorbar (with no axis), using the code below (MWE):               \documentclass{standalone}     \usepackage{pgfplots}         \pgfplotsset{compat=1.3}          \begin{document}         \begin{tikzpicture}             \begin{axis}[                 hide axis,                 scale only axis,                 colorbar,                 point meta min=0,                 point meta max=1,                 colorbar style={height=5cm}]                 \addplot [draw=none] coordinates {(0,0)};             \end{axis}         \end{tikzpicture}     \end{document}      It works perfectly, but if I add the following options into my preamble:               \pgfplotsset{every linear axis/.append style={         /pgf/number format/.cd,         use comma,         1000 sep={\,},     }}      the compiling fails, giving that error message:               ! Package pgfkeys Error: I do not know the key '/pgf/number     format/xshift', to  which you passed '0.3cm', and I am going to ignore     it. Perhaps you misspelled it.      Since I do need those options for other plots, how can I get rid of this error? And how can I define the formatting options for the colorbar ticks? Thanks.


title: Why can't I get pstricks with auto-pst-pdf (and cropping) running on MikTeX?

text: \documentclass{minimal}     \usepackage[pdf]{pstricks}          \begin{document}          \begin{pspicture}(-5.25,-5.25)(5.25,5.25)%       \pscircle*[linecolor=cyan]{5}       \psgrid[subgriddiv=0,gridcolor=lightgray,gridlabels=0pt]       \Huge\sffamily\bfseries       \rput(-4.5,4.5){A} \rput(4.5,4.5){B}       \rput(-4.5,-4.5){C}\rput(4.5,-4.5){D}       \rput(0,0){auto-pst-pdf}       \rmfamily       \rput(0,-3.8){PSTricks}       \rput(0,3.8){\LaTeX}     \end{pspicture}          \end{document}      I run it with:               pdflatex -shell-escape Test.tex > log.txt 2>&1      But stdout says:               PDFCROP 1.33, 2012/02/01 - Copyright (c) 2002-2012 by Heiko Oberdiek.     !!! Error: Ghostscript exited with error code 1!      The same happens when using `\usepackage{pstricks} \usepackage{auto-pst-pdf}`. If I use `\usepackage{pstricks} \usepackage[crop=off]{auto-pst-pdf}` then it works! I use Windows 7 x64, MikTeX 2.9 x86 (complete system) with latest packages, installed latest ActivePerl x86 and also applied the pdfcrop fix (as the related problem appeared earlier). You see all details in the logs for stdout, Test.log, and Test-autopp.log. Any ideas? **UPDATE:** I tried to manually run pdfcrop and got the same error. When I run it with --debug I see that it can't locate the Ghostscript executable `gswin32c.exe`. I looked into the MikTeX bin/ folder because I thought it is there, but it isn't. Do I have to install Ghostscript separately?


title: Even spacing between successive textblocks (or equivalent)

text: I am writing a poster in LaTeX (`\documentclass[a0,portrait]{a0poster}`) Each block of the poster is created with textblock, like:               %MOTIVATION     \begin{textblock}{16.4}(.3,1.8)       \begin{tikzpicture}         \node [mybox] (box){%           \begin{minipage}{0.45\textwidth}              ---Some Text----           \end{minipage}         };         \node[fancytitle, right=30pt,rounded corners=10pt] at (box.north     west) {\Huge{Introduction}};       \end{tikzpicture}     \end{textblock}      The problem is that `textblock` takes an absolute position; so, for each textblock, I have to place the new block manually; it is impossible to place the blocks with regular spacing (i.e. keep `\vgap` between two blocks identical). Is it possible to place the textblock with something like               \textblock{size}{x-coor, "\vspace{1cm} from the bottom of the last block"}      I don't have any commitment to `textblock`, so any other way of achieving this will be appreciated. I tried to get rid of `textblock` alltogether, with `\vspace` at the bottom of each `textblock`, like               \vspace{1cm}          %MOTIVATION     %\begin{textblock}{16.4}(.3,1.8)       \begin{tikzpicture}         \node [mybox] (box){%           \begin{minipage}{0.45\textwidth}              ---Some Text---           \end{minipage}         };         \node[fancytitle, right=30pt,rounded corners=10pt] at (box.north     west) {\Huge{Introduction}};       \end{tikzpicture}     %\end{textblock}      The problem is that, as my poster has a 2-column, top-down layout, I cannot place "blocks" in the 2nd column.


title: nomenclature hyphenation

text: I'm using \makenomenclature and \printnomenclature.. I have searched since yesterday for solution with nomenclature, but found nothing. Do anybody have a solution? I don't want do it with glossary, because the documentclasse is book and I have a lot of tex files. When I use glossary, I have to search every word in nomenclatur in many tex files. I have a problem. My nomenclature shows like this for example                  AAAA      AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA            BBBB      BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB        number angelsperunitz The number of angels per unit are      This is the nomenclaturecode..                  \nomenclature{number angelsperunitz }{The number of angels per unit area}      I want it shows like this, because the acronym is too long and I want this in the next line. How can I do this? I use hyphenation without success.                   AAAA         AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA          BBBB         BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB         number angelsp-         erunitz The number of angels per unit are      Here is the code..               \documentclass{book}          \usepackage[ngerman]{babel}      \usepackage[T1]{fontenc}     \usepackage[ansinew]{inputenc}     \usepackage{nomencl}     \makenomenclature     \begin{document}          \nomenclature{AAAA}{AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA}%     \nomenclature{BBBB}{BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB}%     \nomenclature{number angelsperunitz}{The number of angels per unit are}%               \backmatter     \addcontentsline{toc}{chapter}{Nomenclature}     \printnomenclature[2.8 cm]          \end{document}


title: Extend page "width" or "margin" for todonotes comments or other package comments to sit in

text: Basically, I would like to know how to achieve margin/width extension, similar to what Word/OpenOffice does when users insert comments. I am using the `todonotes` package and am collaborating on a document, but because it is twin column the margins are too narrow and the notes become distorted, reducing their utility.


title: Indentation of Lists in Environments

text: Based on the answer of Markus Scharrer, I am using the custom `lstnewenvironment` to get code and Section with my environment. Since I use an environment in an environment (I know it may not be the best approach, but I have to do it like this) I am not able to set the indentation of my list.. Here's my MWE:                \documentclass[a4paper,11pt]{article}      \usepackage{listings}      \usepackage{enumitem}           \lstnewenvironment{method}[2]          {\section{#1}\label{sec:#1}\def\MethodDescription{#2}}          {\MethodDescription}                \newenvironment{returnvalues}          {Return value:          \begin{itemize}[labelindent=\parindent, leftmargin=*, labelsep=0.5cm,itemsep=0.8pt]}           {\end{itemize}}            \newcommand{\returnvalue}[2] %Name, Description          {\item #1: #2}      which I am using like this:                 \begin{document}       \begin{method}{SaveDocument}{Description of the Method \\       \begin{returnvalues}       \returnvalue{True}{Saved successfully.}       \returnvalue{False}{otherwise}       \end{returnvalues}}       Method Boolean SaveDocument()       \end{method}       \end{document}      Any idea why my list is not indented like I customized? I could change leftmargin to anything with no influence..


title: Multiline equation and text

text: I would really like to get a multiline equation with text explaining each step. I've got close with               \begin{equation*}     \begin{split}         A \simeq & B  \mbox{[Lemma 8.35(iii)]} \\           \simeq & C \mbox{[exactness of first column - see Ex. 5.3]} \\           etc     \end{split}     \end{equation*} `      But I can't get tab spacing between the equation and the message box. Maybe an mbox is not the best way?


title: Conditioning behaviour of a macro on whether on top of a new page

text: Is there a way to find out, whether the currently typeset material will go to top of a page? I am trying to write a macro which, when invoked, typesets a horizontal divider to separate the subsequent content from the preceding one. However, if the subsequent content goes to top of the next page, the horizontal divider should be suppressed. How could I do that? I am aware `\pagetotal` and `\thepage` are not the way to go (the page- breaking algorithm often decides where to put the break when the material is already typeset and my macro has been invoked).


title: Section Symbol and Number

text: How does one get the symbol `\S` to appear before a number in `\section{}`?


title: Longtable caption below table in LyX

text: In LyX I've created a longtable. In LyX the caption is below the table but in the PDF it is shown above the table. Is there a way to force the caption to be below the table in the PDF without converting the table to LaTeX code? Thanks.


title: Latex: Pinyin below Chinese characters

text: I would like to enter a Chinese (Simplified) Characters in a TeX doc that is rendered by XeTeX and have the Pinyin transcription automatically added below the according characters. So, I only enter the Chinese characters and the Pinyin should be looked up through a library. I have seen that ChinesePod does something similar, so I imagined that someone else must have thought of that and written something for TeX already. Do you know any tools/packages for that for TeX? Here is a picture of how it should look like: http://cl.ly/35Lr


title: Non-italicized text in a \newfixedcaption

text: This is a very specific follow-up question to this answer given to this question. I want to insert a picture, and use `overpic` to label it, in between two paragraphs of text in a `thm` environment (using the `memoir` class). I use the `center` environment for the picture, and a `\newfixedcaption` to label it. However, within the caption, the text is still italicized--as if it were part of the `thm` environment--when it really shouldn't be. Here is my MWE:               \documentclass[11pt,a4paper]{memoir}     \usepackage{amsthm}     \usepackage[demo]{graphicx}     \usepackage{overpic}          \newtheorem{thm}{Theorem}[chapter]     \newfixedcaption{\figcaption}{figure}          \begin{document}          \begin{thm}     \noindent Here is my first paragraph of text.          \begin{center}     \begin{overpic}[width=0.5\textwidth]{./mypicture.pdf}     \put(20, 20){$A$}     \end{overpic}     \figcaption{This is mypicture.pdf, with the label $A$.     For some reason, this caption is italicized.}     \end{center}          \noindent Here is my second paragraph of text.     In order to understand this paragraph, you first need to see the picture.     \end{thm}          \end{document}


title: Applying \nouppercaseheads to section headers only in memoir

text: How would one apply `\nouppercaseheads` only to section headers when using the `memoir` document class?               \documentclass[a4paper]{memoir}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{lipsum}     % Define a new pagestyle 'rgheadings'     \copypagestyle{rgheadings}{headings}     \makeheadrule{rgheadings}{\textwidth}{\normalrulethickness}     % remove 'chapter' of headings style     \addtopsmarks{rgheadings}{}{       \createmark{chapter}{both}{shownumber}{}{. \space}     }          % remove number section of headings style     \addtopsmarks{headings}{}{       %i need \nouppercaseheads only section       \createmark{section} {right}{nonumber}{}{}     }          % define secao com letra minuscula     \def\sectionmark#1{\markright{#1}}          \begin{document}     \pagestyle{rgheadings}          \chapter{Memoir with headings style}          \section{Mysection}          \lipsum[1-30]          \end{document}


title: How to force a picture's location and still use overpic

text: I want to insert a picture, and use `overpic` to label it, in between two paragraphs of text, like so:               Here is my first paragraph of text.     \begin{figure}[htb] \centering     \begin{overpic}[width=0.5\textwidth]{./figure/mypicture.pdf}     \put(20, 20){$A$}     \end{overpic}     \caption{This is mypicture.pdf, with the label $A$.}     \end{figure}     Here is my second paragraph of text.     In order to understand this paragraph, you first need to see the picture.      But depending on the content of those paragraphs, and on other pictures that are inserted before or after them, mypicture.pdf doesn't always end up in the right place. Is there a way to force it to be there (as in `\includegraphic`), while still being able to use `overpic`?


title: Nested footnotes

text: The footception post (Footception: Footnote within a footnote within a footnote) describes how to recursively footnote. I am trying to make a nested footnote that is placed in the same footnote apparatus as the calling footnote, but the numbering goes awry. Here is a MWE that demonstrates the problem:                   \documentclass{article}         \begin{document}         This is a footnote\footnote{Here is a footnote within the footnote\footnotemark{}. And here is another one\footnotemark{}.}         \footnotetext{This footnote should be labeled `2'}         \footnotetext{This footnote should be labeled `3'}         \end{document}      Here is the output: ![footnotemark_fail](http://i.stack.imgur.com/a8FIF.png) Note the errant footnote numbering. How can this be rectified? I would like to use automatic footnote enumeration, therefore temporary solutions like `\footnotemark[2]{}` and `\footnotetext[2]{}` should be avoided. **Major Edit #1:** The package `bigfoot` was suggested by **jon** as offering a solution to this problem; however, while `bigfoot` permits construction of multiple footnote apparatus and allows commenting from a superior apparatus to an inferior one, the below MWE shows that `bigfoot` fails to permit intra- apparatus footnoting (as well as footnoting from an inferior to a superior apparatus):                   \documentclass{article}         \usepackage{fullpage}         \usepackage{bigfoot}         \DeclareNewFootnote{default}         \DeclareNewFootnote{B}[alph]         \MakeSortedPerPage{B}         \begin{document}         This text has a footnote in the default apparatus%         \footnote{Here.}%         as well as an alphabetical apparatus%         \footnoteB{Here.}.         \verb+bigfoot+ allows subordinate footnotes from a superior apparatus to an inferior apparatus%         \footnote{Like this\footnoteB{See.}.}, but not from an inferior apparatus to a superior apparatus%         \footnoteB{Like this\footnote{Error.}.}. %         Likewise, \verb+bigfoot+ forbids making a nested footnote from one apparatus to the same apparatus%         \footnote{Like this\footnote{Error}.}\footnoteB{And like this\footnoteB{Error}.}. %         A quick look at \verb+bigfoot.sty+ shows this to be true: \textit{``Higher-placed footnotes can't be anchored %         in inferior ones.''} This means one cannot call a footnote from an inferior to superior apparatus or even from %         one apparatus to the same apparatus. I am particularly interested in footnoting from one apparatus to the same %         apparatus. I do not want multiple apparatus \footnote{Yes this is the correct plural\footnote{Fail.}.}.         \end{document}      For convenience, I have posted the output as a .tif image: ![bigfoot_fail](http://i.stack.imgur.com/yIK3O.png)


title: How does \footnotesize map to \fontsize{size}{baselineskip}

text: We can change font size using `{\fontsize{size}{baselineskip} \selectfont .....}` with the `anyfontsize` package. I want to know what `size` and `baselineskip` values the following commands result in:   1. `\scriptsize`   2. `\footnotesize`


title: Theorems in a book

text: I would like to write a theorem in the format of a book. So I write               \documentclass[12pt]{book}      but after that I write               \begin{theom}      and it does not compile. Can someone please help me write a theorem in a book?


title: Another body text in the margin

text: I saw a book that besides its main content had the text from _another_ book squeezed in the bottom margin. I'm wonder whether this is possible to do with LaTeX? More specifically I'm wondering whether it's possible to have two separate text and produce output such that one text goes in the main content area of the page and the other in the margin? Note that both texts may not fit on one page but needs to run over several pages.


title: How to get a more detailed error message in TextMate?

text: I use TextMate because I can have one single editor to latex, program, etc. However, one thing I find annoying is the error message when I compile latex file in TextMate. A typical error message looks like this:               Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     Latex Error: ./xxx.tex:129 Undefined control sequence.     Output written on xxx.pdf (x pages, xxxxxx bytes).      from which I know something goes wrong in line 129. But I wish the message could tell me more about the error. For instance, TexShop could tell the exact position of the error in that line and even let me go directly to that position. Is there a way to configure the LaTeX bundle in TextMate so that the error message contains more information?


title: How to make Vim LaTeX Suite show errors when compile

text: Compiling TeX with command               : silent call Tex_RunLaTeX()      The `gvim` window turns grey when there are errors. One needs to press `Enter` for each error to continue. It will be better if the error messages show up in the process as in the console output. Can I configure the latex-suite to achieve that?


title: Unequal margins for two column document

text: I am trying to create a conference paper using template provided here: http://iel.ucdavis.edu/code/ASME/conf-1.7b.html But, when I compile the document, the right margin(for the document) is much much less than left margin when in fact they should be equal or at least comparable. Is there something wrong with template or am I doing something wrong? My MWE is somewhat like this(although I have a lot more than this in my document):               \documentclass[twocolumn,10pt,cleanfoot]{asme2e}     \special{papersize=8.5in,11in}     \usepackage[T1]{fontenc} % Use 8-bit encoding that has 256 glyphs     \confshortname{}     \conffullname{Name}     \confdate{May 2}     \confyear{2014}     \confcity{}     \confcountry{USA}     \papernum{Number}     \title{}     \author{author 1 info         \affiliation{         }        }     \author{author 2 info         \affiliation{         }        }     \author{author 3 info         \affiliation{         }        }     \begin{document}     \maketitle     My content goes here     \bibliography{MyBIB}     \appendix       %%% starting appendix     \section*{Appendix A: Head of First Appendix}     \section*{Appendix B: Head of Second Appendix}     \subsection*{Subsection head in appendix}     \end{document}      I am using MikTeX for Windows. I get same results when I compile the sample tex file that comes with the template. What am I doing wrong?


title: Properly top align caption beside threeparttable using KOMA-script

text: Things look pretty good without `threeparttable`. ![Without threeparttable](http://i.stack.imgur.com/gZp65.png) Uncomment threeparttable and tablenotes results in the caption riding up into the previous paragraph. ![With threeparttable](http://i.stack.imgur.com/YhMI6.png)               \documentclass{scrbook}                                                                                %                                                                                \usepackage[english]{babel}                                                                                \usepackage{caption}                                                                                \usepackage{threeparttable}                                                                                \usepackage{lipsum}                                                                                %                                                                                \KOMAoptions{captions=topbeside}                                                                                \setcapindent*{0pt}%                                                                                \begin{document}                                                                                \chapter{Crapper}                                                                                \lipsum[1]                                                                                \begin{table}[h]%                                                                                \label{tab:psource:final-params}%                                                                                \begin{captionbeside}{This is the captions which should be top aligned}[l]%                                                                       \raisebox{\dimexpr0.5\baselineskip-0.5\totalheight\relax}{%                                                                                %\begin{threeparttable}                                                                                \begin{tabular}{cccc}                                                                                \hline                                                                                Test & Test & Test & Test \\                                                                                Test & Test & Test & Test\tnote{1} \\                                                                                Test & Test & Test & Test \\                                                                                Test & Test & Test & Test \\                                                                                Test & Test & Test & Test\tnote{2} \\                                                                                \hline                                                                                \end{tabular}                                                                                %  \begin{tablenotes}                                                                                %    \item[1]{Test note}                                                                                %    \item[2]{Test note}                                                                                %    \end{tablenotes}                                                                                %\end{threeparttable}%                                                                                }%                                                                                \end{captionbeside}                                                                                \end{table}                                                                                \end{document}


title: How to use a TeX macro with a CSV list to filter an external file

text: The code below produces the results I desire, which is a list of the lines with `XXX={<value>}` with a `<value>` which is not one of the allowed list of values: ![enter image description here](http://i.stack.imgur.com/lU6xW.png) However, this solution requires me to have the same information in two places which is very error prone. So, is there a way I can generated the sequence of the `grep -v` macros based on the contents of `\ListOfAcceptableValues`. A brute force solution I can think of is to use multiple files for each element in the list of allowed values, but am thinking that there is probably a more elegant way to do this. ## Notes:   * I only need it to work on MacOS, so all the Unix utilities are available.   * Am using `cat` here as it better emulates the actual usage of this macro. ## Code:               \documentclass{article}     \usepackage{datatool}          %\usepackage{filecontents}% Commented out to prevent overwriting FileA.tex     \begin{filecontents*}{FileA.tex}         XXX={AA}     some other tex content         XXX={YY}         XXX={BB}     and some more tex content         XXX={ZZ}         XXX={CC}     \end{filecontents*}          \begin{document}          \newcommand*{\ListOfAcceptableValues}{AA,BB,CC}%          %% How do I rewrite this to make use of \ListOfAcceptableValues     \immediate\write18{%           cat FileA.tex         | grep "XXX="         | grep -v AA         | grep -v BB         | grep -v CC         > FileB.tex     }          \DTLloadrawdb[noheader,keys={Problem}]{MyDB}{FileB.tex}%     \DTLdisplaydb{MyDB}     \end{document}


title: Xindy and indexentries spanning multiple pages

text: # The Problem I have the following MWE which does the pageranging wrong:               \documentclass{scrartcl}     \usepackage{blindtext}     \usepackage{makeidx}     \makeindex     \begin{document}     \index{Eine Seite|(}\index{Drei Seiten|(}     \blindtext     \index{Eine Seite|)}     \index{Zwei Seiten|(}\index{Zweimalig}     \Blindtext[4]     \index{Zwei Seiten|)}\index{Zweimalig}     \Blindtext[5]     \index{Drei Seiten|)}     \printindex     \end{document}      Compiled with `xelatex main && xindy -M texindy -M range-pages -C utf8 -L german-duden main.idx && xelatex main` it creates the following index:               Index     D     Drei Seiten, 1–3     E     Eine Seite, 1     Z     Zwei Seiten, 1, 2     Zweimalig, 1, 2      This seems odd to me, since it suggests, that I have at least two independent entrys of "Zwei Seiten" on the pages 1 and 2. Using `makeindex` instead creates an index as I would do it by "hand":               Index     Drei Seiten, 1–3     Eine Seite, 1     Zwei Seiten, 1–2     Zweimalig, 1, 2      Here we can see clearly, that "Zwei Seiten" has an explanation that begins at page 1 and ends at page 2 whilest "Zweimalig" is mentioned independently at least two times at pages 1 and 2. How can I make `xindy` behave _exactly_ as `makeindex` does with the page- ranges? I still need `xindy`s caption of the lettergroup and unicode capabilities (If there weren't the last requirement I had already switched to `makeindex`). Exactly the same behaviour means:   * If we have a spanning index (`\index{a|(}\index{a|)}` that spans multiple pages, I want to see a range like "1-2" or "2-5" or whatever.   * If there are onetime mentions (`\index{a}`) on consecutive pages, I want to have them listed separated by commas like "1, 2", "2, 3, 4", but I am fine if large numbers of 5 or more consecutive pages would be consolidated to a range. **Before answering or commenting** Please compare the output of `xindy` and `makeindex` especially with "Zweimalig" und "Zwei Seiten", I want the output of `makeindex` but want to use `xindy`!


title: Omega, varpi or 'double upsilon' greek symbol?

text: How to produce symbol like this: ![omega- pi](http://i.stack.imgur.com/VzFyo.png) Is this a special form of `\varpi`, 'double upsilon' or omega?


title: Why is LaTeX always divided in two programs?

text: If we want to write a document using LaTeX, whatever is our operational system, we need to download two programs, for example, WinShell and TexWorks. Why can't we use one single program?


title: How can I produce a graph from a table?

text: What I want to do is plot a graph for a given data set. This must be simple to do, but I just _cannot_ find a simple explanation of how to do it... I have the following table (no problem so far):               \begin{table}     \centering     \begin{tabular}{|c|c|}     \hline % Horizontal overbar     X & Y \\\hline     0 & 0 \\     1 & -40.0975460694 \\     2 & -46.1181459826 \\     3 & -49.6399711638 \\     4 & -52.1387458959 \\     5 & -54.0769461561 \\     6 & -55.660571077 \\     7 & -56.9995068696 \\     8 & -58.1593458092 \\     9 & -59.1823962581 \\     10 & -60.0975460694 \\     \end{tabular}     \caption{An example table.}     \end{table}      I want to plot the data in the second column against those in the first one. How can I do that? **Edit** :               \begin[tikzpicture]     \begin[axis]     \addplot table[x = MyX] from testdata.txt;     \addplot table[y = MyY] from testdata.txt;     \end[axis]     \end[tikzpicture]      testdata.txt               MyX MyY     0   0     1   -40.0975460694     2   -46.1181459826     3   -49.6399711638     4   -52.1387458959     5   -54.0769461561     6   -55.660571077     7   -56.9995068696     8   -58.1593458092     9   -59.1823962581     10  -60.0975460694      I'm getting an error: `bad math environment` on the line containing `\begin[axis]`. I do load both the `pgfplots` and `pgfplotstable` packages...


title: Symbol for relative entropy

text: Could you help me with typesetting the following symbol (marked by red frame): ![image](http://i.imgur.com/1AOcAzU.png) I searched over all possible manuals but was not able to find it. It looks like capital D, but actually it is not the same.


title: Issue using \ensuremath in glossaries

text: I'm trying to get the `\ensuremath` function to work within `glossaries` for the following:               \newglossaryentry{CSPB}{name={CSP\ensuremath{\parallel}B},       description={A hybrid formal language combining CSP and the B-Method},sort=CSPB}      However I get an error message:               ! Incomplete \iffalse; all text was ignored after line 120.      If I take the `\ensuremath{\parallel}` out there is no problem. Any ideas why this isn't working as the manual suggests?


title: Source of \bar{} accent in math mode

text: I have a font that I have installed with `fontinst` in `psnfss` and which I use for math italic. But it is clear from the PDF files generated with that font that the bar accent in math mode is not generated from the overbar character in the font (they clearly don't have the same shape), and I don't want to use `\overline` to achieve the same effect. I do the usual   * `latex fontinst.sty`   * `\latinfamily{eaq}{}\bye`   * `for i in *.pl ; do pltotf $i ; done`   * `for i in *.vp; do vptovf $i ; done`   * copy the file to the right directories (including the `.fd`) in the the TeX live kpathsea tree   * add the right entries to `pdftex.map` (yes, I know I should be using the `updmap` machinery do to this) It's clear that the PDF files generated with this routine that the overbar accent is not the one included in the font.


title: Is PostScript access from TeX (via PSTricks or TikZ) safe?

text: PSTricks and TikZ grant us access to PostScript. Is it safe? I meant: Is there a vulnerability hole open for someone to exploit? Edit: I just found that compiling PSTricks with `xelatex` might be unsafe because `dNOSAFER` must be enabled as explained in "News" section on date 2012-05-26. Is it correct?


title: Complex formatting of page numbers (postnote) in biblatex citations

text: I'm trying to change the way that page numbers are displayed in `biblatex` citations to mimic a journal's (moderately) complex style. The problem is that the formatting changes depending on whether the citation ends with a page range (like a full article or incollection citation) or without (like a book citation). If the citation ends with a page range the formatting is: space|'at'|space|pagenumber. E.g: > Malcolm. ‘The Line and the Cave’ [‘Line & Cave’], _Phronesis_ , 7 (1962), > 38-45 at 38 If the citation doesn't end in a page range the formatting is: comma|space|pagenumber. E.g: > Irwin, _Plato's Ethics_ (Oxford: Oxford University Press, 1995), 38 This much I can do using `\DeclareFieldFormat` to format article citations and book citations separately. BUT since the style uses shorthands for all but the first citation of an article, articles should only use the 'at' for the first citation. E.g, the second citations should be like this: > Line & Cave, 38 So what I'm trying to do is format the page reference of an article citation differently depending on whether it is the first and full citation or a subsequent and shorthand citation. Here's a minimal working example (although I've just used the standard verbose style for simplicity):               \documentclass{article}          \begin{filecontents}{\jobname.bib}     @ARTICLE{Malcolm1962,       author = {John Malcolm},       title = {The Line and the Cave},       year = {1962},       volume = {7},       pages = {38-45},       shorthand = {Line \& Cave},       journal = {Phronesis}     }          @BOOK{Irwin1995,       author = {Terence Irwin},       title = {Plato's Ethics},       year = {1995},       publisher = {Oxford University Press},       address = {Oxford},       shorthand= {Ethics}     }     \end{filecontents}              \usepackage[british]{babel}     \usepackage{csquotes}     \usepackage[style=verbose]{biblatex}          \addbibresource{\jobname.bib}          \DeclareFieldFormat{pages}{#1}      \renewcommand{\postnotedelim}{}     \DeclareFieldFormat[article, incollection]{postnote}{ at #1}     \DeclareFieldFormat[article, incollection]{multipostnote}{ at #1}     \DeclareFieldFormat[book]{postnote}{, #1}     \DeclareFieldFormat[book]{multipostnote}{, #1}          \begin{document}      \cite[38]{Malcolm1962}          \cite[101]{Irwin1995}          \cite[40-42]{Malcolm1962}%Produces 'at 40-42' when it should produce ', 40-42'     \end{document}


title: How to specifiy xticks in log-axis mode (tikzpicture) to be written in non-exponential format?

text: I want to specify some xticks in a log-log plot (tikzpicture). This works fine, but they are always printed in exponential format (with basis 10). In general this is fine, but for one plot I would like to changes this. Is it possible?


title: Theorem/Definition/Lemma/etc independent numbering in Lyx

text: I am using the Koma-script book class in Lyx. By default, theorems, definitions, lemmas, and so on, follow the same numbering. So after "Theorem 1" comes "Definition 2", then "Lemma 3", and so on, even though "Definition 2" is actually the first definition in the document. I would like theorems and definitions to be numbered independently. How do I accomplish this (in Lyx)?


title: Latex compile errors with copernicus discussions template

text: I'm trying to compile a paper using the template for Copernicus publishing. In particular, I'm trying to use the Ocean Science Discussion option. Here is a code snippet:               \documentclass[osd, hvmath]{copernicus_discussions} %Ocean Science Discussion     \begin{document}     \linenumbers     \title{title}     \author[1]{me}     \affil[1]{Institute}     \runningtitle{title}     \runningauthor{me}     \correspondence{me}          \firstpage{0}     \maketitle       \begin{abstract}     a     \end{abstract}     \introduction      blah blah blah     \conclusions       conclude     \begin{thebibliography}{0}     \bibitem{label}     \end{thebibliography}     \end{document}      This is just a cleaned up version of the template given in the link above. But for some reason, I get a bunch of errors when I try to compile (with latex or pdflatex). I can post the errors if it would help, but most say the error is on line 21 (i.e. `\end{document}`), and don't really seem (to me) to suggest what might be the problem. I was wondering if anyone would mind trying to build that simple document to a pdf, using the class files in the link above. At least this would tell me if the problem is local to my machine (for eg. a missing package or something) or if it's a problem with the template. Thanks in advance.


title: Problematic interaction between ltxdoc and tikz matrices

text: I have been spending some time trying to solve a problem in the interaction between TikZ matrices and the `ltxdoc` document class. While using `ltxdoc`, I cannot use the `|[options]|` syntax at the beginning of a cell to change the properties of a specific node in a `matrix of nodes`. This functionality is documented on page 375 of TikZ manual. The following snippet provides a minimal example reproducing the problem.               \documentclass[a4paper]{ltxdoc}     \usepackage{tikz}     \usetikzlibrary{matrix}     \begin{document}     \begin{tikzpicture}       \matrix[matrix of nodes, nodes in empty cells]{          % if |[red]| is removed, or the documentclass is          % changed to article, it works all right          first & |[red]| second & third \\       };     \end{tikzpicture}     \end{document}      Compilation fails with the following message:               ! Argument of \tikz@lib@matrix@with@options has an extra }.      Everything works fine if I change the `documentclass` (e.g., to `article`) or if I remove the `|[red]|` part. I am using extensively this functionality, and I had no problem whatsoever until I switched to `ltxdoc`. I inspected things in `tikzlibrarymatrix.code.tex`, but everything seems all right there. I am using `ltxdoc` version `2007/11/11 v2.0u` and TikZ 2.10.


title: Can one set a specific font variant in xelatex for uppercase letters only?

text: I would like to typeset a short, letter-like document using the `Zapfino` font, with the following twist: I'm OK using Zapfino's "standard" (i.e., Variant 0) glyphs for lowercase letters, but I'd like to use the Variant 1 glyphs for _uppercase_ letters. (In case you're curious, they look more "swash-y" than the Variant 0 uppercase glyphs...) To use a concrete example, I'd like to get ![enter image description here](http://i.stack.imgur.com/dZjB9.png) instead of ![enter image description here](http://i.stack.imgur.com/wKlII.png) Note the different appearance of the uppercase letters. As of now, I can only achieve this look using the brute-force approach, viz., by defining the command `\newcommand{\varone}[1]{{\fontspec[Variant=1]{Zapfino}#1}}` and then encasing each uppercase letter `X` inside `\varone{X}`. I've perused the `fontspec` manual and found the `\newfontfeature` command on p. 55, but I can't seem to be able to figure out how to apply this method to my objective, which is to set the font variant separately for uppercase and lowercase letters. Anyone have an idea? In case it matters, I'm running MacTeX2011 under MacOSX 10.6.8. The Zapfino font I have is the one that comes installed with the OS. **Answer** , based on a minimally changed version of @AndreyVihrov's solution below:                   % !TEX TS-program = xelatex     % !TEX encoding = UTF-8     \documentclass[letterpaper]{article}          \usepackage{fontspec}     \setmainfont{Zapfino}          % Prepare a separate "font" for Latin uppercase letters     \newfontfamily\upfont[Ligatures=TeX,Variant=1]{Zapfino}          \XeTeXinterchartokenstate=1     \newXeTeXintercharclass \uppercaseclass          % Assign the new XeTeX character class to all Latin uppercase letters     \makeatletter     \@tempcnta=`\A     \loop\unless\ifnum\@tempcnta>`\Z       \XeTeXcharclass \@tempcnta \uppercaseclass       \advance \@tempcnta by 1     \repeat     \makeatother          % Implement the font change     \XeTeXinterchartoks 0 \uppercaseclass   = {\begingroup\upfont}     \XeTeXinterchartoks \uppercaseclass 0   = {\endgroup}     \XeTeXinterchartoks 255 \uppercaseclass = {\begingroup\upfont}     \XeTeXinterchartoks \uppercaseclass 255 = {\endgroup}          \begin{document}     Once Upon a Time, Prince Charming saw \ldots     \end{document}      ![enter image description here](http://i.stack.imgur.com/cV6Ch.png)


title: Size of equations in tables

text: I'm trying to insert multiple equations in a `tabular` environment in LaTeX. My problem is simple yet I haven't found any particular solution to it: the equations displayed are too small, and I'd like to increase their size so that I can obtain something less ugly than that (especially the last equation): ![What I got so far...](http://i.stack.imgur.com/v4M27.png) I tried various tricks found here and there (`\displaystyle`, `\def\arraystretch{3}`, etc.), but nothing work really well.


title: The text "height" keeps popping up in tables

text: In my LaTeX document, I have some simple code for the simplest of tables. But, when I let TeXnicCenter output it to PDF, the text 'height' is suddenly in the first cell and on the first cell in a new row I didn't define. Of course googling for the height and table gives lots of results, but not to this question               \begin{table}[h]         \begin{tabular}{|l|l|l|l|l|}             \hline             ~ & $\theta$      & d   & a  & $\alpha$ \\ \hline             1 & 0             & 100 & 0  & $\pi$    \\              2 & 0             & 0   & 90 & 0        \\              3 & $\frac{\pi}{2}$ & 50  & 0  & 0      \\             \hline         \end{tabular}     \end{table}      ![Rendered output](http://i.stack.imgur.com/e2oyK.png)


title: Split expressions with parentheses in align environment

text: I am writing down a rather long expression, which has to be splitted in a `align` environment. The thing is that this expression has parentheses which have to be splitted too. I don't want to use `resizebox`, as this won't look pretty. My code is               \documentclass[a4paper,11pt]{article}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{amsfonts}     \newcommand{\diff}{\mathop{}\!\mathrm{d}}     \begin{document}          \begin{align*}     \bullet \int\limits_V\!G(\mathbf{x,x^\prime})\rho(\mathbf{x^\prime})\;\diff^3x=&     \sum_{l=0}^{\infty}\dfrac{Q}{8\pi^2R^2(2l+1)}\cdot\left(\int\limits_{a}^{b}\!\left[r_{<}^l-    \dfrac{a^{2l+1}}{r_<^{l+1}}\right]\left[\dfrac{1}{r_<}-\dfrac{r_<^l}    {b^{2l+1}}\right]\delta(r-R)\;\diff r\right)\\         \cdot &     \left(\int\limits_{0}^{\pi}\!P_l(\cos{\theta^\prime})P_l(\cos{\theta})\cos{\theta}\;\diff     \theta\right)\cdot \underbrace{\left(\int\limits_{0}^{2\pi}\!\diff \phi\right)}_{2\pi}\\         =& \sum_{l=0}^{\infty}\dfrac{Q}{4\pi R^2(2l+1)}\cdot \left(     \int\limits_{a}^{R}\!\left[r_{<}^l-\dfrac{a^{2l+1}}{r_<^{l+1}}\right]\left[\dfrac{1}{r_<}-    \dfrac{r_<^l}{b^{2l+1}}\right]\delta(r-R)\;\diff r_<\\         +& \int\limits_{R}^{b}\!\left[r_{<}^l-\dfrac{a^{2l+1}}{r_<^{l+1}}\right]\left[\dfrac{1}    {r_<}-\dfrac{r_<^l}{b^{2l+1}}\right]\delta(r-R)\;\diff r_> \right)\\%here's the error          \cdot &     \left(P_l(\cos{\theta^\prime})\int\limits_{0}^{\pi}P_l(\cos{\theta})\underbrace{\cos{\theta    }}_{P_1}\;\diff\theta\right)     \end{align*}          \end{document}      My output is ![](http://i.imgur.com/LoIcQ.jpg)


title: Presenting multiple figures in a proper and readable way under a same caption

text: I have 6 figures and I wanted to plot them in a proper way in a single page. It is important to remain readability. Moreover, including the sub-caption and sub-label is important. Possibly including a border for set of figures is better. Any suggestions: Figures: ![enter image description here](http://i.stack.imgur.com/MbZOC.png) ![enter image description here](http://i.stack.imgur.com/VBUDq.png) ![enter image description here](http://i.stack.imgur.com/vd2QM.png) ![enter image description here](http://i.stack.imgur.com/lZ5rh.png) ![enter image description here](http://i.stack.imgur.com/Qx3hb.png) ![enter image description here](http://i.stack.imgur.com/sHV0o.png)


title: How to align all description labels with section

text: I am using this code               \documentclass[paper=a4, paper=portrait, pagesize=auto]{scrartcl}          \usepackage[inline]{enumitem}        \usepackage[table]{xcolor}     \definecolor{orange}{HTML}{FFC296}     \begin{document}      \SetLabelAlign{rightbox}{\hss\llap{#1\quad}}     \setlist[description,1]{align=rightbox,labelsep=0pt,leftmargin=0pt}     \section{Student 93b427156c}     \begin{description}         \item[number] 93b4s27156c                       \item[name] Note that this analysis of a formative as a pair of sets of features is necessary     to impose an interpretation on an important distinction in language use.     \end{description}     \end{document}      and its giving this output ![enter image description here](http://i.stack.imgur.com/j6oME.png) Is there any way to align all the labels under Student Section not the left side of Section


title: How to correctly set up Palatino font with math (related to pxfonts)

text: I've read many times here in TeX.SE that `pxfonts` has a lot of spacing inconsistencies, and that it's better to use `mathpazo`. The problem is that `mathpazo` doesn't load all the math symbols to match the font style. But `pxfonts` does, and, also adds a bold version of every symbol. Moreover, there exists the `tgpagella` package, which only loads the text font. So here appears my first question: which is the _best_ way of loading palatino (or a clone) fonts (I use LaTeX, not XeLaTeX)? I suppose that the answer is `mathpazo` because of the problems of `pxfonts`. But I don't know what `tgpagella` offers that `mathpazo` doesn't. And, my second problem. Once set up the palatino fonts (normal, italic, bold, … ), I want the math symbols (and math alphabets, like blackboard) of `pxfonts`. How can I do that? Do they suffer from spacing problems or not? If so, how can I solve it? In short, **which is the best way of setting up palatino (or a palatino clone) fonts and`pxfonts` symbols?**


title: Paragraphs new lines or indent

text: I am writing an article with for springer lncs. My problem is that sometimes new paragraphs are separated by a new line, and sometime just by indentation. I would like to force only indentation. I have:                  First paragraph text line 1.     First par line 2.              Second par line 1.     Second par line 2.       I want:                  First paragraph text line 1.     First par line 2.         Second par line 1.     Second par line 2.


title: How to make a new environment behave like an existing environment?

text: I wish to create an environment that behaves alternately like a footnote, an endnote or a comment (i.e. hidden). For starters i've defined an environment "note" thus:               \newenvironment{note}      { \footnote{ }      { } }      expecting that now               Hello\begin{note}world\end{note}      would expand into               Hello\footnote{world}      but this doesn't seem to be the case. The document compiles with no warnings, and the pdf output does in fact contain a footnote, but the footnote is empty. What might the problem be, and how can i fix it?


title: pgfplots: Coloring a Single Column in a Histogram Differently

text: I have a huge data file and want to visualize the data using histograms. I would like to color a single columns differently than the rest. Here's an example from the documentation (Section 5.11.2 Histograms):               \documentclass{article}          \usepackage{pgfplots}     \pgfplotsset{compat=newest}     \usetikzlibrary{pgfplots.statistics}          \begin{document}          \begin{tikzpicture}     \begin{axis}[     ybar interval,     xticklabel=     \pgfmathprintnumber\tick--\pgfmathprintnumber\nexttick     ]     \addplot+[hist={bins=3}]     table[row sep=\\,y index=0] {     data\\     1\\ 2\\ 1\\ 5\\ 4\\ 10\\     7\\ 10\\ 9\\ 8\\ 9\\ 9\\     };     \end{axis}     \end{tikzpicture}          \end{document}      I get: ![enter image description here](http://i.stack.imgur.com/4hR2O.png) Now I want manually decide which column to color differently like (done with Paint...): ![enter image description here](http://i.stack.imgur.com/50bYC.png) Has anyone an idea? For normal plots one would just put two plots in one diagram. But here I do not know how to do it. * * * This is maybe related.


title: biber cannot find my .bib file

text: (Please bear with me I am new here so hope this question is not off-topic as my previous-first one was). I am using TeXShop, biblatex and biber, but my biber does not seem to be able to locate my .bib file in the location specified in the path. If put the .bib in the local folder (that is in the folder where my .tex is) it finds it but if I use the central bibliography file (needing a relative location) it doesn't. Here is what I am doing:               \documentclass[12pt]{article}     \usepackage[british]{babel}      \usepackage{csquotes}      \usepackage[style=authoryear]{biblatex}     \addbibresource{/home/ifuchs/Documents/Work/Gender.bib}     \usepackage[colorlinks, allcolors=blue, breaklinks]{hyperref}          \begin{document}          \autocite{myKey}          \printbibliography          \end{document}      > >     INFO - Found 44 citekeys in bib section 0 >     INFO - Processing section 0 >     INFO - Looking for bibtex format file > '/home/ifuchs/Documents/Work/Gender.bib' for section 0 >     ERROR - Cannot find '/home/ifuchs/Documents/Work/Gender.bib'! >     INFO - ERRORS: 1 >


title: How to change the distance between a pin label and the pin line?

text: The distance between the pin line and the plot can be changed by `inner sep`. How to change the distance between the pin label and the pin line?               \documentclass{article}     \usepackage{pgfplots}         \pgfplotsset{compat=1.5.1}          \begin{document}     \begin{tikzpicture}         \begin{axis}             \addplot[domain=1:6]             {exp(x)};             54.59815             \node[coordinate,pin={[pin edge={blue,ultra thick}]left:{A pin!} } ]                 at (axis cs:4,54.59815) {};         \end{axis}     \end{tikzpicture}     \end{document}      Results in: ![enter image description here](http://i.stack.imgur.com/wuTlR.png) How to get something like this: ![enter image description here](http://i.stack.imgur.com/FKf3E.png)


title: Strange bug with multibib

text: Could someone help me with multibib? On windows machine with texlive 2011 installed the following file hangs during compilation:               \documentclass{article}     \usepackage{multibib}     \newcites{pub}{Publications}     \newcites{con}{Conferences}     \begin{document}     \end{document}      Of course, it is a minimal not-working example and it is not very informative. But the error is the same and this latex file is supposed to be correct. The compilation stops at the following lines:               Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (c:/texlive/2011/texmf-dist/tex/latex/base/size10.clo))     (c:/texlive/2011/texmf-dist/tex/latex/multibib/multibib.sty) (./pub.aux)     (./con.aux      It just stops. If I do ctrl+c I see the following:               ! Interruption.     <argument> ...@auxout\@suffix name\endcsname .aux}                                                       \endgroup \immediate \open...     l.5 \newcites{con}{Conferences}          ?      I have no idea where this problem comes from. I have tried to google, but it seems that this error is not something well-known. **UPD** It seems that it is a bug of texlive at windows. I would be hapy if someone gave me any clue how to find where exactly the problem occurs.


title: own class with twocolumns activated in \ifdefined for KOMA and xelatex

text: I want to do something like in http://stackoverflow.com/questions/1465665/passing-command-line-arguments-to- latex-document.   For better explanation I'll show a minimal running example:   My `test.cls`:               \NeedsTeXFormat{LaTeX2e}     \ProvidesClass{test}[2012/01/11 helper class]     \ifdefined\bastitwocolumns%     \LoadClass[DIV14,parskip=full,twocolumns,landscape]{scrartcl}%     \else     \LoadClass[DIV14,parskip=full]{scrartcl}%     \fi      and now my `test.tex`:               \listfiles     \def\bastitwocolumns{}     \documentclass{test}     %\ifdefined\bastitwocolumns\documentclass[DIV14,parskip=full,landscape,twocolumn]    {scrartcl}\else\documentclass[DIV14,parskip=full]{scrartcl}\fi     \usepackage{polyglossia}\setdefaultlanguage[spelling=new,babelshorthands=true]{german}      \usepackage{blindtext}     \begin{document}     \blindtext\blindtext\blindtext\\     \blindtext     \par     \blindtext\blindtext\blindtext\\     \blindtext     \end{document}      Compiling with `xelatex` first the way the files are, results in a one column document a4. Activating line 4 and commenting out line 3 results in a two column (so sad portrait) a4 document. The orientation problem might be ignored.   Can anyone explain, why I can not enable this two column setting in my class? Okay, here is another minimal running example, which shows the problems more precise: XeLaTeX-file:               \listfiles     \def\bastitwocolumns{}     \documentclass{ebelinguebung}     %\ifdefined\bastitwocolumns\documentclass[DIV14,parskip=full,landscape,twocolumn]    {scrartcl}\else\documentclass[DIV14,parskip=full]    {scrartcl}\fi\usepackage{beamerarticle}\usepackage{oldebelinguebung}     \usepackage{blindtext}     \begin{document}     \blindtext\\ \blindtext \par \blindtext     \end{document}      Class-file:               \NeedsTeXFormat{LaTeX2e}     \ProvidesClass{ebelinguebung}[2012/01/11 helper class]     \ifdefined\bastitwocolumns%     \LoadClass[DIV14,parskip=full,landscape,twocolumn]{scrartcl}%     \else     \LoadClass[DIV14,parskip=full]{scrartcl}%     \fi     \RequirePackage{beamerarticle}     \RequirePackage[l2tabu,orthodox]{nag}     \RequirePackage{polyglossia}\setdefaultlanguage[spelling=new,babelshorthands=true]    {german}      \RequirePackage{hyperref}      Style-file:               \NeedsTeXFormat{LaTeX2e}     \ProvidesPackage{ebelinguebung}[2012/01/11]     \RequirePackage[l2tabu,orthodox]{nag}     \RequirePackage{polyglossia}\setdefaultlanguage[spelling=new,babelshorthands=true]{german}      \RequirePackage{hyperref}      And now switching active lines 3 or 4 I get different results (one portrait, one landscape), which I like to understand. Okay, after many tries I found one solution - which I do not really understand - but by the way:   In the logfile for twocolumn compilation with my class typearea shows (of course) the portrait sizes for the paper. But in the logfile for the package solution, typearea also tells               Package typearea Info: You've used standard option `landscape'.     (typearea)             This is correct!     (typearea)             Internally I'm using `paper=landscape'.     (typearea)             If you'd like to set the option with \KOMAoptions,     (typearea)             you'd have to use `paper=landscape' there     (typearea)             instead of `landscape', too.      First trying `paper=landscape` direct into the class options only removes those hint. Second trying to set `\KOMAoptions{paper=landscape,twocolumn}%` (and removing the class options) within the if clause did, what I wanted.   Can anyone explain that?


title: Creating stacked shapes for tikzstyle with

text: I'm working on a diagram, and I'm exploring TikZ for doing it. I searched, and looks like there is no easy way of doing diagrams, like pgfplots for plotting. So, I need to create some special node shape like this one: ![artifact sample](http://i.stack.imgur.com/YycYS.png) However, when I try to set a fixed size for the rectangle in the `tikzstyle` the things get ugly. Moreover, I have no clue on how to set several rectangles in the same style. I tried moving them in the style with something like: `\tikzstyle{rectangle(0,0,2,1), draw, rectangle(1,1,3,2),draw}`, but obviously that doesn't work. What I'm missing to define a style like the one in the picture?


title: Does LaTeX allow for namespaces to eliminate the risk of package clashes?

text: I often get conflicts between distinct `sty` files, due to things as simple as variable names. The latest one was between `proof.sty` (which permits to more proofs automatically to the appendix) and `llncs.sty` (which is required by many conference and journals to insure a homogeneous look and feel), which both define a variable named `exercise` and hence produce a conflict. One solution would be to expect each `sty` file to prefix all its variables with the name of the library implemented, but this is not a clean solution. Is there any way in LaTeX to provide some encapsulation, or at least to define some local variables, as I think is the usage in modern programming languages?


title: Use sections "inline"

text: How can I get the startpoints for my sections (see top part of MWE) as one inline text, similar to what can be done with the bottom part of my MWE? I need the `sections` since my `title marks` etc work off them. Have a look at the part where the word "CATALAN" is in the example.               \documentclass{article}     \usepackage{titlesec, marginnote}          % turns sections into arabic numbers     \renewcommand{\thesection}{\arabic{section}}     \renewcommand{\thesubsection}{\arabic{subsection}}          % sections and subsections formatting     % package = titlesec     \titleformat{\section}{}{\lettrine{\thesection}}{0em}{}[\vskip-1\baselineskip]     \titleformat{\subsection}[leftmargin]{\small\bfseries}{\thesubsection}{1em}{}     \titlespacing{\section}{\howwide}{-1pt}{0pt}     \titlespacing{\subsection}{0pt}{0pt}{1em}          \begin{document}          \subsection{}Babel and hyphenation patterns for english, dumylang, nohyphenation, german-x-2011-07-01, ngerman-x-2011-07-01, afrikaans, ancientgreek, ibycus, arabic, armenian, basque, bulgarian,     \subsection{}CATALAN, pinyin, coptic, croatian, czech, danish, dutch, ukenglish, usenglishmax, esperanto, estonian, ethiopic, farsi, finnish, french, galician, german, ngerman, swissgerman, monogreek, greek, hungarian, icelandic          \reversemarginpar          \marginnote{{\bf 1}}Babel and hyphenation patterns for english, dumylang, nohyphenation, german-x-2011-07-01, ngerman-x-2011-07-01, afrikaans, ancientgreek, ibycus, arabic, armenian, basque, bulgarian,     \marginnote{{\bf 2}}CATALAN, pinyin, coptic, croatian, czech, danish, dutch, ukenglish, usenglishmax, esperanto, estonian, ethiopic, farsi, finnish, french, galician, german, ngerman, swissgerman, monogreek, greek, hungarian, icelandic          \end{document}      ![MWE](http://i.stack.imgur.com/u7D92.png)


title: Left align caption and underline it (Memoir)

text: im using LyX and documentclass memoir. I would like to have a set up like in the attached file when inserting figures and tables, however, I just don't know how to implement it in LyX. Can you help me? ![enter image description here](http://i.stack.imgur.com/20YDr.png)


title: How can I use an ampersand in an arara command line?

text: I have an arara rule file that needs to construct an URL with parameters (https://gist.github.com/ReichenHack/0dd80e12870366d5f51f), but anytime I pass one of the options, I get the error               'exportNotes' is not recognized as an internal or external command, operable program or batch file.      I obviously need to quote the '&' but I haven't found a variation that'll work yet.


title: Set frame title as \title or pdftitle

text: I'm preparing a series of `beamer` documents with different `\title`s, and the first slide of each document has the same title as the document `\title`. I want to be able to just change the content of `\title` for each document, and then the title of the first slide will be updated automatically.               \documentclass{beamer}          \title{Some Title}       \makeatletter       \hypersetup{pdftitle=\@title}       \makeatother          \begin{document}          \begin{frame}{Some Title}     frame content     \end{frame}          \end{document}      Since the frame title is the same as `\title` and `pdftitle`, is there a way to set the frame title to be the same as `pdftitle` or `\title` without typing it again? I tried               \begin{frame}{\@title}      Obviously this didn't work.


title: Problem with margins

text: I need to set margins. The odd pages should have left margin 3.5 cm and right margin 2.5 cm. The even pages should have left margin 2.5 cm and right margin 3.5 cm. I tried to do it but for example by option `\oddsidemargin` the left margin on odd page moves to the right but the right margin shrinks. The `.cls` file is HERE. Document:               \documentclass[thesis=B,czech]{FITthesis}[2012/06/26]          \usepackage[utf8]{inputenc}          \usepackage{graphicx}          \department{text}     \title{text}     \authorGN{text}     \authorFN{text}     \authorWithDegrees{text}     \supervisor{text}     \acknowledgements{text}     \abstractCS{text}     \abstractEN{text}     \placeForDeclarationOfAuthenticity{text}     \declarationOfAuthenticityOption{1}     \keywordsCS{text}     \keywordsEN{text}          \begin{document}          \begin{introduction}         %     \end{introduction}          \chapter First               \begin{conclusion}         %     \end{conclusion}          \appendix          \end{document}


title: Automatically copying over files required to compile a tex file

text: I want a command which takes as input, a tex file, and a list of directories. It should (recursively) identify any files the tex file depends on (`\include` or `\includegraphics`) and **copy** them into the current directory. The advantage of this is the ability to reuse and modify material from old papers and talks to new ones (without destroying the old ones). Typical scenario: I want to give a talk which introduces the same material as a previous talk. I copy the beamer presentation from the previous talk and strip out the irrelevant stuff. Now I manually copy over the images I want to keep. I then modify some of those images and create the rest of the presentation... Does this exist already?


title: longtable does not break

text: I am using a longtable environment to put some graph images in (perfectly works in all the other figures with tabular environments that i have produced already) However, when in comes to the longtable, the page is not breaking and i cannot find the issue. Any help appreciated. * * *               \begin{figure} [htbp]     \begin{center}     \begin{longtable}{l l}     \endfirsthead     {{\bfseries \tablename\ \thetable{} -- continued from previous page}} \\     \endhead     \endfoot     \endlastfoot     \textbf{a)} & \textbf{b)} \\     \includegraphics[width=\figwidth]{images/FAs1} & \includegraphics[width=\figwidth]{images/FAs2}\\     \textbf{c)} & \textbf{d)} \\     \includegraphics[width=\figwidth]{images/FAs3} & \includegraphics[width=\figwidth]{images/FAs4}\\     \textbf{e)} & \textbf{f)} \\     \includegraphics[width=\figwidth]{images/FAs5} & \includegraphics[width=\figwidth]{images/FAs6}\\          \newpage          \textbf{g)} & \textbf{h)} \\     \includegraphics[width=\figwidth]{images/FAs7} & \includegraphics[width=\figwidth]{images/FAs8}\\     \textbf{i)} & \textbf{j)} \\     \includegraphics[width=\figwidth]{images/FAs9} & \includegraphics[width=\figwidth]{images/FAs10}\\     \caption{Fatty acids found in \nig in \wt and \crt }     \label{fig:FAs}     \end{longtable}     \end{center}     \end{figure}      > Many thanks!


title: Is the number of authors restricted in article?

text: At the begining of the `.tex` file I put               \title{title here}          \author{name 1            \and name 2            \and name 3             \and name 4             \and name 5 \\             \small institution\\            \small department \thanks{thanks here}}      but in the PDF file (`\maketitle`) it gets 2 names in the same line, and the other names and institution are in separate lines. How can I fix this so I can have all the names in separate lines? I tried with `\\\` between the ones that are in the same line but it doesn't work?


title: comma like \cdot

text: What is the `\cdot` alternative for comma, or any other punctuation symbol? I want to raise comma symbol in a list of fractions to the fraction line. Comma is placed below when used next to fraction.


title: Additional bookmarks with moderncv

text: I finished my cv with moderncv and have some trouble getting rid of the errors, hope someone can help me out. I use moderncv 1.4 and tried to add additional bookmarks to the document for the attachments like in this MWE:               \documentclass[a4paper, 11pt, sans]{moderncv}          \firstname{My}     \familyname{Name}     \address{MyAddress}{MyCity}     \phone{MyPhone}     \mobile{MyMobile}     \email{MyMail}          \moderncvtheme[blue,sans]{casual}          \usepackage{pdfpages}     \usepackage{bookmark}          \begin{document}          \bookmark[page=\thepage,level=0]{First attachment}     attachment 1          \bookmark[page=\thepage,level=0]{Second attachment}     attachment 2          \end{document}      Problem is I get an option clash for package hyperref: "The package hyperref has already been loaded with options: [] There has now been an attempt to load it with options [unicode]". How should I fix this? Another thing that bothers me is that the first bookmark is greyed out, I don´t know what that means in Acrobat Reader, but it can´t be right, can it? ![enter image description here](http://i.stack.imgur.com/yWw8C.png)


title: Make §...§ marker for textmode INSIDE math mode

text: I want to definde §...§ as markers for textmode inside math mode. This would be useful for example inside "cases" environments, to add text defining the cases; or for defining sets. Instead of having to write               \{ x \mid x \text{ is prime.}\}      I want to be able to use               \{ x \mid x § is prime.§\}      Currently I achieve this in a very primitive way:               \def§#1§{\text{#1}}%      But this does not nest (text inside math inside text inside math...) unlike when using the \text command. I tried reading about catcodes, mathcodes, etc.pp. but unfortunately this is nowhere documented well enough for me to understand. Also it seems to me that the fact that I want to use § as opening AND closing symbol makes things a lot more complicated. Can you help me?


title: Shorthand overlay specifications for bold text

text: The following MWE shows the list piece by piece and each item is alert when displayed and back to normal when the next item is displayed. How can I add more default overlay specifications to the itemize list? Say, make the text bold and alert as it appears and return to normal when the next item is displayed?               \documentclass{beamer}     \begin{document}     \begin{frame}     \begin{itemize}[<+-| alert@+>]     \item Apple     \item Peach     \item Plum     \item Orange     \end{itemize}     \end{frame}     \end{document}


title: Chronicle of email correspondences

text: I'd like to collect all my old private email correspondences in a LaTeX document. The document should become a kind of "diary". (I also want to bind it to a book someday.) So what I want to create should basically look like this:               \documentclass{myemailchronicle}          \begin{document}          \begin{conversation}{NameOfConversationalPartner}{EmailAddressOfConversationalPartner}{SubjectOfThisConversation}          \partner{DateAndTime}{%     Dear Max,     what an outstanding party last week, (...)     Yours Kate     }          \me{AnotherDateAndTime}{%     Hello Kate,     oh yeah it was SO GREAT, (...)     See you, Max     }          %Some more "\partner"s and "\me"s          \end{conversation}          %More conversations similar to the one shown above          \end{document}      Now, I don't have any experience with creating things like document classes or packages. I just don't know where to start... What do you think is the best way to realize the things I want? Is there a more simple way, without using an own document class?


title: How to prevent a listing from straddling two pages

text: If I have a small listing that happens to be at the end of a page, how can I force LaTeX to place it on a new page so that it does not straddle two pages, which looks ugly for a small listing.


title: Misplaced supertabular at the bottom of a page

text: I want to write a table which is too long to fit in the middle of a page. So I thought of using `supertabular`. My code is               \documentclass[11pt]{article}     \usepackage{supertabular}     \begin{document}     \begin{center}          \tablefirsthead{\hline             \multicolumn{3}{|c|}{$\mathbf{^{210}Po/V_{drift}=800V}$} &     \multicolumn{3}{|c|}{$\mathbf{^{55}Fe/V_{drift}=800V}$}\\         \hline}          \tablehead{%     \hline     \multicolumn{6}{|r|}{next page $...$ } \\     \hline     }     \tabletail{%     \hline        \multicolumn{6}{|r|}{next page $...$ } \\     \hline     }     \tablelasttail{     \hline     }     \bottomcaption{electron  transparency}         \label{tab:mm3trans}     \begin{supertabular}[H]{|C{1cm}|C{2cm}|C{1cm}||C{1cm}|C{2cm}|C{1cm}|}     %       \hline     %       \multicolumn{3}{|c|}{$\mathbf{^{210}Po/V_{drift}=800V}$} & \multicolumn{3}    {|c|}{$\mathbf{^{55}Fe/V_{drift}=800V}$}\\     %       \hline             $V_{mesh}$ \newline ($V$) & Centroid & Gain & $V_{mesh}$ \newline ($V$) & Centroid & Gain \newline ($10^3$)\\             \hline             ${}$ & ${}$ & ${}$& ${}$ & ${}$ & ${}$  \\             \hline             $500$ & $30$ & $220$ & $560$ & $22$ & $1.06$ \\             \hline         $535$ & $67$ & $490$ & $565$ & $25$ & $1.20$ \\         \hline         $540$ & $76$ & $556$ & $570$ & $29$ & $1.39$ \\         \hline         $545$ & $85$ & $622$ & $575$ & $33$ & $1.58$ \\         \hline         $550$ & $97$ & $710$ & $580$ & $38$ & $1.82$ \\         \hline         $555$ & $103$ & $754$ & $585$ & $43$ & $2.06$ \\         \hline         $560$ & $116$ & $849$ & $590$ & $48$ & $2.30$ \\         \hline         $565$ & $131$ & $959$ & $595$ & $56$ & $2.69$ \\         \hline         $570$ & $150$ & $1098$ & $600$ & $63$ & $3.02$ \\         \hline         $-$ &   $-$ &   $-$ &     $605$ & $72$ & $3.46$ \\         \hline         $-$ &   $-$ &   $-$ &     $610$ & $83$ & $3.98$ \\         \hline     $-$ &   $-$ & $-$ &     $615$ & $94$ & $4.51$ \\         \hline         $-$ &   $-$ & $-$ &     $620$ & $106$ & $5.09$ \\         \hline         $-$ &   $-$ & $-$ &     $625$ & $122$ & $5.86$ \\         \hline         $-$ &   $-$ & $-$ &     $630$ & $138$ & $6.62$ \\         \hline         $-$ &   $-$ & $-$ &     $635$ & $156$ & $7.49$ \\         \hline         $-$ &   $-$ & $-$ &     $640$ & $180$ & $8.64$ \\         \hline         $-$ &   $-$ & $-$ &     $645$ & $204$ & $9.79$ \\         \hline         $-$ &   $-$ & $-$ &     $650$ & $235$ & $11.3$ \\         \hline         $-$ &   $-$ & $-$ &     $655$ & $263$ & $12.6$ \\         \hline         \end{supertabular}     \end{center}     \end{document}      What is disturbing is that a have a page which is half-full. So I want to add this table in the middle of page. Unfortunately the table is printed on the next page, where it splits at some point and it continues on the next page. ![](http://i.imgur.com/Fw59p.jpg) Any ideas on that?


title: Portable LaTeX?

text: This isn't explicitly a question on TeX syntax, but is there a program available (or a flag for latex itself) that will create a complete standalone LaTeX file from one that has multiple dependencies?


title: Clock with powerdot and beamer

text: I would like to use powerdot to compose a document. I want to have a clock in the pdf file, but it does not show. If I am using Beamer, then how can I have a clock as in powerdot? Please help me.               \documentclass[size=12pt,     % style=husky,     % style= default     % style= elcolors       style=tycja,       paper=screen,       mode =present,       orient=landscape,       display = slidesnotes,       nopagebreaks,fleqn,clockformat]{powerdot}          \usepackage{fouriernc}          \begin{document}          \begin{slide}{First}         Let $ABC$ be a triangle.     \end{slide}          \end{document}


title: Is it possible to type LaTeX code and see its real time preview in LyX?

text: ![Screen shot](http://i.imgur.com/K18eZmls.png) I'm new to LyX. I have just given it a try and written my first article. I discovered a panel from `Menu > View > View Source`. It shows the source code of my article. But as far as I see, I am not able to edit this code preview panel. I want to edit both the panels. I want the other panel automatically update itself as I type one panel (like the split panels of code/design in Adobe Dreamweaver). If editing both the panels is not possible, at least I want to do it on the reverse; I only want to work on code and see its preview real time. Is this possible in LyX?


title: How to make a tikz node, top-aligned with the rest of the text?

text: If I write               before-text \begin{minipage}[t]{5cm} line1\\line2\\line3\\ \end{minipage} after-text      I get a box, whose top is aligned to the top of "before text". I would like to have the same, when using a `tikz` node (with `line1\\\line2\\\line3\\\`) instead of `minipage`. But the default behaviour is to align the bottom of the node with the bottom of the "before text". How can I do this?


title: How to synchronize sidewaystable with the odd/even page?

text: I have two tables, T1 and T2. I want these to appear in two pages as if the head-side of the table remains at the binding side of the book. Like this > |||||>|<||||| > > |||||>|<||||| > > |||||>|<||||| I have used,               \begin{sidewaystable}      \begin{center}     \caption{My caption}      \begin{tabular}{ ... ...}      This indeed rotates the tables, but the top-side of the tables go to the edge- side of the page. Any idea how to fix it? I would prefer to use rotate and tell to move X degree manually.