title: adaptively sized/positioned arrow symbol pointing to the next line

text: I would like to use a curved arrow symbol, positioned downwards, to signify "continued on the next line". I'm adjusting the arrow's size using `scalefnt` and taking the symbol indirectly from `mnsymbol` in order to avoid package conflicts.               \documentclass{memoir}     \usepackage{amsmath}     \usepackage{scalefnt}          % in order to not load package "mnsymbol":     \DeclareFontFamily{U}{MnSymbolA}{}     \DeclareFontShape{U}{MnSymbolA}{m}{n}{       <-6> MnSymbolA5       <6-7> MnSymbolA6       <7-8> MnSymbolA7       <8-9> MnSymbolA8       <9-10> MnSymbolA9       <10-12> MnSymbolA10       <12-> MnSymbolA12}{}     \newcommand*{\lcurvearrowdown}{\mathrel{\text{\usefont{U}{MnSymbolA}{m}{n}\symbol{187}}}}     \newcommand*{\nextlineref}{\raisebox{-1.25ex}[0pt][0pt]{\scalefont{1.25}\(\lcurvearrowdown\)}}          \begin{document}          This is text at normal size. \nextlineref \\     This is more text. xxxxxxxxxxxxxxxxxxxxxxx          \begin{small}     This is text at small size. \nextlineref \\     This is more text. xxxxxxxxxxxxxxxxxxxxxxx     \end{small}          \end{document}      I normally use this symbol to signify "math formula continued on the next line", but this example uses text since this is sufficient to illustrate the issue: While the symbol scales in a `small` context, **the combination of placement / size / distance to the next line appears incongruent** : it is much closer to the letters "x" in the normal-sized context. **Why is that, and how does one correct this?** Inter-line spacing might play a role here, btw. (Addendum / minor remark: Just now I realize that the arrow probably shouldn't be visually _that_ close to the "x" letters ... anyways, my question still stands in the exact same way, as it's the _consistency_ that I'm asking about; what I just noticed can so easily be adjusted through the right combination of the `\scalefont` and `\raisebox` factors, which I won't change in this post, to avoid confusion.)


title: How to get TikZ nodes not to change alignment?

text: I'm still working on rendering a nice block matrix. I've been using BMAT but it is irrelevant for the question at hand. I want to connect various entries in an array/matrix/BMAT by lines, and I'm using TikZ for that. However, I've run into this problem: When I surround an entry with a TikZ node (for drawing a path later), it changes the vertical alignment and basically screws everything up. Here's a MWE:               \documentclass{article}      \usepackage{tikz}          \begin{document}     \begin{equation}     \begin{array}{ccc}      2 & \tikz \node {$0$}; & \frac{2}{3} \\      0 & \frac{4}{3} & 0 \\      -\frac{2}{3} & \tikz \node [inner sep=0pt,outer sep=0pt]{$0$}; & \tikz \node [inner sep=0pt,outer sep=0pt]{$\frac{6}{5}$}; \\      0 & -\frac{4}{5} & 0 \\     \end{array}     \end{equation}          \end{document}      With output: ![matrix with mis-aligned entries](http://i.stack.imgur.com/KAvln.png) As you can see, The entries that have nodes around them are vertically mismached and differently aligned from the others. Setting `outer sep` and `inner sep` to zero doesn't help.... Any ideas?


title: How to make a rotated, multiple-row label of a table vertically centered?

text: How to exactly make a rotated, multiple-row label (i.e., `from`) of a table vertically centered?               \documentclass[preview,border=12pt,12pt]{standalone}     \usepackage{array,multirow,graphicx}          \begin{document}     \begin{tabular}{|*5{c|}}     \cline{3-5}     \multicolumn{2}{c|}{\multirow{2}{*}{}} & \multicolumn{3}{c|}{to}\\\cline{3-5}     \multicolumn{2}{c|}{}                     & a & b & c\\\hline     \multirow{4}{*}{\rotatebox{90}{from}} & 1 & d & e & f\\\cline{2-5}                                           & 2 & g & h & i\\\cline{2-5}                                           & 3 & j & k & l\\\cline{2-5}                                           & 4 & m & n & o\\\hline     \end{tabular}     \end{document}      ![enter image description here](http://i.stack.imgur.com/xvirD.png)


title: Template: One page homework report (defaults have too much whitespace)

text: I have been using latex for abut four months now but by all means I am a total nube. I was wondering if anyone had a template for homework (specifically a one page report). My teacher is pretty anal about the report being _just one page_ and I am finding that the article class has too much white-space. Does anyone have a template they would like to share? * * * One thing I did to reduce the white space was:               \newenvironment{mynum}{     \begin{enumerate}       \setlength{\itemsep}{1pt}       \setlength{\parskip}{0pt}       \setlength{\parsep}{0pt}     }{\end{enumerate}}      Other things that take up unproportionate amounts of whitespace include:   * the title made by `\maketitle`   * headings made by `\section`   * narrow margins


title: Long text in math equation in latex

text: How can I generate equations (mostly text) as given in the figure below: ![enter image description here](http://i.stack.imgur.com/6FTif.png) I am using `align` environment but it's not generating the intended results. Any solution would be appreciated. Thanks.


title: multiple series of endnotes in eledmac

text: What is the correct way to use multiple series of endnotes with `eledmac`? Example:               \documentclass[12pt]{memoir}     \usepackage{eledmac}          \begin{document}     \chapter{Text}     \beginnumbering     \pstart     \edtext{lemma 1}{\Aendnote{---my endnote to lemma 1}}          text text text          \edtext{lemma 2}{\Bendnote{---my endnote to lemma 2}}\\     \pend     \endnumbering          \section{A series endnotes}     \doendnotes{A}     \section{B series endnotes}     \doendnotes{B}     \end{document}      This produces garbage output: ![endnote issue output](http://i.stack.imgur.com/vpSu9.png) If the endnotes are all in the A series, they print normally. The problem also occurs with the `articl`e document class.


title: Deeper levels of (sub)sections don't appear in the LaTeX output of pandoc. Why?

text: I use pandoc to create latex and PDF from Markdown. Markdown, being designed for HTML, allows 6 levels of headers H1...H6. But when converting to PDF, via tex, I get only three levels: 1 (`\section`), 1.1 (`\subsection`) and 1.1.1 (`\subsubsection`). The tex source has no command around the deeper level headers. 1.1.1.1 simply does not exist and is treated as plain text. Where should I look, in order to get latex to support deeper levels of headers/sections? Is that possible at all? Or should I consider restructuring the document so as never to go below 1.1.1, header level three, `\subsubsection`?


title: How to show the value of a variable in vim latex-suite

text: Is there a way to show the current value of a Latex-Suite variable, e.g. g:Tex_DefaultTargetFormat, from the vim command line?


title: Parallel line segments connecting points in tikz

text: Assume that we have two coordinates `(a)` and `(b)`. I want to draw a line which is a _parallel translation_ of the line which connects `(a)` and `(b)`. I would like to have something like `\drawparallel{a}{b}{dist}` which will draw a line parallel to the one connecting `(a)` and `(b)` at ( _signed!_ ) distance `dist`. I tried many things both based on `\newcommand` and on `\tikzset` but could not make it work. Edit: To make it clearer, I want the the four points (two of the original line segment, and two of its translated copy) will form a **rectangle**.


title: Situation-dependent bookmark level of \subsubsection

text: Is it possible to have `\subsubsection`s add their bookmarks at different levels? In my case it is at the respectively lowest level that interesting features become visible, but these are (in absolute terms) not the same levels               \documentclass{report}     \usepackage{hyperref}     \setcounter{tocdepth}{4}          \begin{document}          \chapter{Sample One}     \subsubsection{Characteristic One}     \subsubsection{Characteristic Two}     \subsubsection{Characteristic Three}     \subsubsection{Characteristic Four}          \chapter{Sample Two}     \section{Subsample One}     \subsubsection{Characteristic One}     \subsubsection{Characteristic Two}     \subsubsection{Characteristic Three}     \subsubsection{Characteristic Four}     \section{Subsample Two}     \subsubsection{Characteristic One}     \subsubsection{Characteristic Two}     \subsubsection{Characteristic Three}     \subsubsection{Characteristic Four}          \chapter{Sample Three}     \section{Subsample One}     \subsection{Subsubsample One}     \subsubsection{Characteristic One}     \subsubsection{Characteristic Two}     \subsubsection{Characteristic Three}     \subsubsection{Characteristic Four}     \subsection{Subsubsample Two}     \subsubsection{Characteristic One}     \subsubsection{Characteristic Two}     \subsubsection{Characteristic Three}     \subsubsection{Characteristic Four}          \end{document}      The reason why I would like to have it all in `\subsection`s is that I would like to underline the similarities by eye-catchingly typesetting the section headers,               \titleformat{\subsubsection}[<shape>]{<format>}{<label>}{<sep>}{<before-code>}[<after-code>]      but then the bookmark tree looks very unfortunate, ![enter image description here](http://i.stack.imgur.com/T5V7C.jpg) My idea would be to overcome this letting `\subsubsection` using `\belowpdfbookmark{text}{name}` instead of `\pdfbookmark[level]{text}{name}`, but how do I do that? Or are there better approaches?


title: How to double-click in PDF document to go to source code?

text: When creating a document, I usually build a DVI document because the YAP viewer has a nice feature which allows me to double-click on a word in the DVI document which then causes the source-code window to appear with the cursor on the word (or line) in the source code corresponding to the word in the DVI document where I clicked. My understanding is that this feature is not available with PDF documents? Is this correct or can I set up a PDF viewer to cross-reference the source code when I click a word in the PDF document?


title: Configure TeXnic Center with Sumatra

text: so I've been trying for a while to configure those two programs, but I just can't get it to work. I always get the error: [ForwardSearch("%bm.pdf","%Wc",%l,0,0,... Cannot execute the command. My settings are: ![The following are my settings.](http://i.stack.imgur.com/zTQ2P.jpg)


title: Why doesn't TikZ's \foreach iterate over the last element of the list?

text: This code               \documentclass{report}          \usepackage{tikz}          \begin{document}          \begin{tikzpicture}          \draw[dashed] (1,-1) -- (1,2) node[above] {$1$};     \draw[dashed] (2,-1) -- (2,2) node[above] {$2$};          \foreach \x in {1,1.1,...,2}         {\draw[fill = yellow] (\x,1) circle (0.05);}          \foreach \x in {1,1.2,...,2}         {\draw[fill = red] (\x,0) circle (0.05);}             \end{tikzpicture}             \end{document}      produces the following output. ![enter image description here](http://i.stack.imgur.com/lYmJu.png) The first `\foreach` produces the yellow circles. There is no circle at 2, the last element in the set {1,1.1,...,2} over which it iterates. The second `\foreach` produces the red circles. There is a circle at 2, the last element in the set {1,1.2,...,2} over which it iterates. Why do these two commands behave differently?


title: Foreach loop with command inside Tikz matrix

text: This question is directly related to Foreach inside a TikZ matrix. But I can't expand it with a macro inside, such that:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{matrix}     \usepackage{etoolbox}          \begin{document}     \newcommand{\somecommand}[1]{#1}     \begin{tikzpicture}       \let\mymatrixcontent\empty       \foreach \c in {a,b,c}{%         \expandafter\gappto\expandafter\mymatrixcontent\expandafter{\somecommand{\c} \\}%         % or         % \xappto\mymatrixcontent{\expandonce{\somemacro{\c}\\}}       }       \matrix [matrix of nodes,ampersand replacement=\&] {         \mymatrixcontent       };     \end{tikzpicture}          \end{document}      I get the error: ERROR: Missing } inserted.


title: Why aren't the titles ordered in the same way data is in groupplots?

text: I'm trying to display a few plots using `pgfplots` and `groupplots` using the following example. I take the titles of each plot from a different data file than the data itself. The data appear to be plotted in the correct order, as the manual specifies, but the titles aren't applied to the correct plots (for example, "0: 0 - 5" should be in the upper right). It seems as if the `#1` argument is one greater than it should be, but then the correct data column is loaded. Why are the titles not ordered the same way as the data?               \documentclass{standalone}          \usepackage{pgfplots}     \usepackage{pgfplotstable}     \usepgfplotslibrary{groupplots}          \pgfplotsset{       compat=newest,       every minor tick={very thin, LightGray},       minor tick num=4,       enlargelimits=0.02     }          \pgfplotstableread{       Time      {Data 0}  {Data 1}  {Data 2}  {Data 3}       0         7.0       2.3       0.3       1.4       1         6.0       3.6       1.2       2.7       2         5.0       4.8       3.0       3.5       3         4.0       5.9       3.9       7.3       4         3.0       7.3       4.3       6.0       5         2.0       6.5       5.5       7.2       6         1.0       8.9       7.0       8.4     }\datatable          \pgfplotstableread{       Min  Max       0    5       6    10       11   15       20   25     }\groupmeta          \begin{document}            \begin{tikzpicture}              \begin{groupplot}[           xlabel={Time},           ylabel={Amplitude},           every axis title shift=0,           % Style list for each plot in order           cycle list={             {only marks, mark=o}           },           group style={group size=2 by 2,             xlabels at=edge bottom,             ylabels at=edge left}]                \pgfplotsinvokeforeach{0,1,2,3}{                  % Read in title             \pgfplotstablegetelem{#1}{Min}\of{\groupmeta}             \edef\min{\pgfplotsretval}             \pgfplotstablegetelem{#1}{Max}\of{\groupmeta}             \edef\max{\pgfplotsretval}             % Just to test which element this is...             \def\test{#1}                  \nextgroupplot[title=\(\test:\ \min - \max\)]             % Data             \addplot+ table[x index=0, y=Data #1] {\datatable};                }              \end{groupplot}              % Title placement         \node (dummytitle) at ($(group c1r1.north)!0.5!(group c2r1.north)$)           [above]{};         \node (title) at (dummytitle.north)           [above, yshift=\pgfkeysvalueof{/pgfplots/every axis title shift}]           {Experimental Data};            \end{tikzpicture}          \end{document}      ![Example output showing wrong title placement](http://i.stack.imgur.com/VDlfw.png)


title: LaTeX beamer package, colortheme “dolphin”: Frametitles are not displayed?

text: I want to use the LaTeX beamer package with the colortheme “dolphin” as it looks really nice, especially in combination with the outertheme “miniframes“. But using the said colortheme won’t display any frame titles. Minimal example follows:               \documentclass{beamer}          \usepackage{beamerthemeshadow}     \usecolortheme{dolphin}     \begin{document}          \begin{frame}{Oh no, I am not displayed}     Some letters to fill the slide up     \end{frame}           \end{document}      How can I get the titles displayed?


title: Picture not found in moderncv class

text: I try to compile the following simple template with pdflatex:               \documentclass[11pt,a4paper]{moderncv}     \moderncvtheme[red]{casual}                   \title{your Curriculum Vitae title}     \firstname{Name}     \familyname{Lastname}     \mobile{Mobile}     \phone{Phone}     \email{Email}     \homepage{Homepage}     \extrainfo{Extra Info}     \photo[64pt]{picture}     \quote{Subtitle}     \address{Address}{City, Country}          \begin{document}     \maketitle          \section{Section Name}     \cvline{Subject}{Description.}     \cventry{Time}{Position}{Company Name}{City}{Country}{Description}     \cvcomputer{Skill}{Description}{Skill}{Description}     \cvlanguage{Language}{Proficiency}{Description}           \end{document}      However I always get the following error message: ! LaTeX Error: File `picture' not found. I have a file picture.eps as well as a file picture in the same directory, so not sure why I get this error message. Anyone an idea what could be going wrong? Thanks!


title: Uneven spacing around ellipsis in $[A_1;\dotsc;A_n]$

text: I've noticed that when a `\dotsc` has a semicolon on each side, there's uneven space around the ellipsis created. With               \documentclass{article}          \usepackage{amsmath}          \begin{document}          \begin{align*}     &[A_1;\dotsc;A_n]\\     &[A_1;\dots;A_n]\\     &[A_1;\ldots;A_n]     \end{align*}          \end{document}      I get ![enter image description here](http://i.stack.imgur.com/kps62.gif) As you can see, both `\dots` and `\ldots` work fine. Is this a known problem? I'm using `amsmath` 2013/01/14 v2.14.


title: Unwanted line - problem

text: I have a problem with the file pdf. The line that I do not know where it came from. I wants to get rid of it but I do not know how to do it. In the file line unwanted have indicated in red. ![enter image description here](http://i.stack.imgur.com/xX7pa.png) This is the code:               \documentclass{article}          \textwidth 15.3cm     \textheight 22.2cm     \topmargin 0cm     \oddsidemargin 0.55cm     \evensidemargin 0cm     %\evensidemargin 0.55cm          \pagestyle{fancy}     \headwidth=15.3cm     \lhead{\footnotesize\nouppercase\leftmark} %\footnotesize\sl     \chead{}     \rhead{}     \lfoot{}     \cfoot{\thepage}     \rfoot{}     \renewcommand{\headrulewidth}{0.4pt}     \renewcommand{\footrulewidth}{0pt}          \newcommand{\pustastrona}{\newpage\thispagestyle{empty}\phantom{}\newpage}          \DeclareRobustCommand{\kat}[1]{     \hbox{\vtop{\vbox{%     \hrule\kern 1pt\hbox{%     $\scriptstyle #1$%     \kern 0.5pt}}\kern 0.5pt}%     \vrule\kern 1pt     }}          \begin{document}     \thispagestyle{empty}          \begin{tabular}{c@{\hspace{15mm}}|@{\hspace{3mm}}l}     \vspace{-31mm}  & \\     \multicolumn{2}{l}{\hspace{-35.5mm}\includegraphics[scale=0.25]{logoumcs}}\\     \multicolumn{2}{@{\hspace{20mm}}l}{\vspace{-4mm}} \\     \multicolumn{2}{@{\hspace{20mm}}l}{\Large UNIWERSYTET MARII CURIE-SKŁODOWSKIEJ} \\     \multicolumn{2}{@{\hspace{20mm}}l}{\vspace{-4mm}} \\     \multicolumn{2}{@{\hspace{20mm}}l}{\Large W LUBLINIE} \\     \multicolumn{2}{@{\hspace{20mm}}l}{\vspace{-4mm}} \\     \multicolumn{2}{@{\hspace{20mm}}l}{\Large Wydział Matematyki, Fizyki i Informatyki} \\     \multicolumn{2}{@{\hspace{20mm}}l}{\vspace{21mm}} \\     & Kierunek: trallaaa\\     & Specjalność:  \\     & \\     & ... \\     & nr albumu:  \\     & \\     & \\     & {\Large\textbf{tralalallaal }} \\     & {\Large\textbf{trallala.}} \\     & (trallaaa) \\     \end{tabular}     \end{document}


title: Using variables in a command results in ! Argument of \reserved@a has an extra }

text: I want to define a command, which separates a string an later adds a different `\href` to the first part, than to the second (e.g. `\qname{foaf:Person}`). But the code as I have it doesn't work, I get `! Argument of \reserved@a has an extra }.`, when I try to run it.               \RequirePackage{xstring}     \RequirePackage{hyperref}     \RequirePackage{url}              \newcommand{\prefix}{}%     \newcommand{\postfix}{}%     \newcommand{\qname}[1]{%         \IfSubStr{#1}{:}{%             \renewcommand{\prefix}{\StrBefore{#1}{:}}%             \renewcommand{\postfix}{\StrBehind{#1}{:}}%             \nolinkurl{\prefix}:\nolinkurl{\postfix}         }{%             \url{#1}%         }%     }      If I just output `\prefix` instead of `\nolinkurl{\prefix}:\nolinkurl{\postfix}` it works, but I want to have it as url. I think there is something wrong with the variable handling, but I couldn't find information about this.


title: How to get a bold wide tilde?

text: If I type               \boldmath $\widetilde T$\unboldmath      I get ![widetilde T](http://i.stack.imgur.com/cejvP.png) where unfortunately the tilde above the T is a little flimsy for my taste. Is there a better way to do this? I found a paper that has something, that appears a little bolder, in it. ![bigger tilde](http://i.stack.imgur.com/O1ywh.png)


title: Roman Page Numbering for TOC in Article

text: I'm writing something with the article class, and I'd like to have the table of contents pages numbered with roman numerals, and in addition and most importantly: to have the arabic numbers reset after the table of contents. That's because I'm printing the document as I write, and the TOC will be ready only after the work is finish (and I don't want to change the page numbers). As it's a somewhat big _article_ (~70 pages maybe) should I switch to a book class instead?


title: Why does LaTeX add 1 inch to margins?

text: LaTeX defines `\topmargin`, `\evensidemargin` and `\oddsidemargin` as follows: [reference] > `\topmargin`: Length of margin at top of page above all printing. 1 inch is > added to this value. > > `\evensidemargin`: Left margin on even numbered pages. 1 inch is added to > this value. > > `\oddsidemargin`: Left margin on odd numbered pages. 1 inch is added to this > value. Why is 1 inch added to each value?


title: Bizarre spacing of \cdot when trying to typeset a permutation type

text: I was just trying to write some cycle types in a permutation group, like so:               The conjugacy classes of the symmetric group are simply given by the     cycle types, so there are five in $S_4$: $Id$, $(\cdot \cdot)$,     $(\cdot \cdot)(\cdot \cdot)$, $(\cdot \cdot \cdot)$, and $(\cdot \cdot     \cdot \cdot)$.      But I get rather odd results: ![screenshot of output from code above](http://i.stack.imgur.com/NM74a.jpg) I guess the weird spacing is the result of LaTeX interpreting the `\cdot` as an operator and trying to space things out so that they fit on the line nicely, but the non-uniformity is disturbing. What's the correct way to do what I'm trying to do here? UPDATE: Changing the spaces to `~`'s helps, but the spacing is still a bit uneven.


title: What does this warning "** WARNING ** TrueType post table name index 32768 > 32767" mean?

text: I'm new to TeX and trying to compile this code:               \documentclass{article}     \usepackage{xeCJK}     \setCJKmainfont{WenQuanYi Zen Hei Mono}     \begin{document}     你好，\TeX！     \end{document}      I get the pdf fine, but confused by the warning.               $ xelatex t.tex      This is XeTeX, Version 3.1415926-2.3-0.9997.5 (TeX Live 2011)      restricted \write18 enabled.     entering extended mode     (./t.tex     LaTeX2e <2009/09/24>     Babel <v3.8l> and hyphenation patterns for english, dumylang, nohyphenation, ge     rman-x-2009-06-19, ngerman-x-2009-06-19, afrikaans, ancientgreek, ibycus, arabi     c, armenian, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danis     h, dutch, ukenglish, usenglishmax, esperanto, estonian, ethiopic, farsi, finnis     h, french, galician, german, ngerman, swissgerman, monogreek, greek, hungarian,      icelandic, assamese, bengali, gujarati, hindi, kannada, malayalam, marathi, or     iya, panjabi, tamil, telugu, indonesian, interlingua, irish, italian, kurmanji,      lao, latin, latvian, lithuanian, mongolian, mongolianlmc, bokmal, nynorsk, pol     ish, portuguese, romanian, russian, sanskrit, serbian, serbianc, slovak, sloven     ian, spanish, swedish, turkish, turkmen, ukrainian, uppersorbian, welsh, loaded     .     (/usr/local/texlive/2011/texmf-dist/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/usr/local/texlive/2011/texmf-dist/tex/latex/base/size10.clo))     (/usr/local/texlive/2011/texmf-dist/tex/xelatex/xecjk/xeCJK.sty     (/usr/local/texlive/2011/texmf-dist/tex/generic/ifxetex/ifxetex.sty)     (/usr/local/texlive/2011/texmf-dist/tex/latex/fontspec/fontspec.sty     (/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/expl3.sty     (/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3names.sty)     (/usr/local/texlive/2011/texmf-dist/tex/latex/etex-pkg/etex.sty)     (/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3basics.sty)     (/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3expan.sty)     (/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3tl.sty)     (/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3int.sty)     (/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3quark.sty)     (/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3seq.sty)     (/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3toks.sty)     (/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3prg.sty)     (/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3clist.sty)     (/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3token.sty)     (/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3prop.sty)     (/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3msg.sty)     (/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3io.sty)     (/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3skip.sty)     (/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3box.sty)     (/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3keyval.sty)     (/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3keys.sty)     (/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3precom.sty)     (/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3xref.sty)     (/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3file.sty)     (/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3fp.sty)     (/usr/local/texlive/2011/texmf-dist/tex/latex/expl3/l3luatex.sty)     (/usr/local/texlive/2011/texmf-dist/tex/latex/tools/calc.sty))     (/usr/local/texlive/2011/texmf-dist/tex/latex/xpackages/xbase/xparse.sty)     (/usr/local/texlive/2011/texmf-dist/tex/generic/kastrup/binhex.tex)     (/usr/local/texlive/2011/texmf-dist/tex/latex/xkeyval/xkeyval.sty     (/usr/local/texlive/2011/texmf-dist/tex/generic/xkeyval/xkeyval.tex     (/usr/local/texlive/2011/texmf-dist/tex/generic/xkeyval/keyval.tex)))     (/usr/local/texlive/2011/texmf-dist/tex/latex/fontspec/fontspec-patches.sty     (/usr/local/texlive/2011/texmf-dist/tex/latex/base/fixltx2e.sty))     (/usr/local/texlive/2011/texmf-dist/tex/latex/base/fontenc.sty     (/usr/local/texlive/2011/texmf-dist/tex/latex/euenc/eu1enc.def)     (/usr/local/texlive/2011/texmf-dist/tex/latex/euenc/eu1lmr.fd))     (/usr/local/texlive/2011/texmf-dist/tex/xelatex/xunicode/xunicode.sty)     (/usr/local/texlive/2011/texmf-dist/tex/latex/fontspec/fontspec.cfg)))     No file t.aux.     [1] (./t.aux)     ** WARNING ** TrueType post table name index 32768 > 32767      )     Output written on t.pdf (1 page).     Transcript written on t.log.      In the log, it says:                fontspec info: Font WenQuanYi Zen Hei Mono does not contain any OpenType `Scri     pt' information.          \g_fontspec_family_WenQuanYi Zen Hei Mono_int=\count177      fontspec info: Defining font family 'WenQuanYiZenHeiMono(0)' for font 'WenQuan     Yi Zen Hei Mono' with options [].          \g_fontspec_WenQuanYiZenHeiMono(0)_prop=\toks37      fontspec info: Defining shape 'normal' with NFSS spec.:     (fontspec)  <->"WenQuanYi Zen Hei Mono/ICU:"           fontspec info: Could not resolve font WenQuanYi Zen Hei Mono/B (it probably do     esn't exist).           fontspec info: Could not resolve font WenQuanYi Zen Hei Mono/I (it probably do     esn't exist).           fontspec info: Could not resolve font WenQuanYi Zen Hei Mono/BI (it probably d     oesn't exist).      My question is if XeLaTeX can't find the wqy font, how can the pdf be successfully generated?


title: \per\kWh produces a wrong output

text: I want to say 10 cent dollar per kilowatt-hour of electricity. When I compile the following,               \documentclass{article}     \usepackage{siunitx}     \begin{document}     \SI[per-mode=symbol]{0.1}[\$]{\per\kWh}     \end{document}      I get the following result that is not correct. ![enter image description here](http://i.stack.imgur.com/FpRJw.png) The correct output must be as follows: ![enter image description here](http://i.stack.imgur.com/juwDK.png) This is a bug or I forgot something to setup?


title: TeX equivalent for LaTeX's \boxed

text: Does anyone have any suggestions for recreating the `\boxed{...}` function from LaTeX in plain TeX? I'm pretty sure it's part of the `amsmath` package for LaTeX (not actually sure because I include `amsmath` it in all of my LaTeX files).


title: Matrix with only $a_{i1} \neq 0$ in first column

text: Assume that `A` is square. I would like to display this as follows (for i > 1):   1. `a_{i1}` in its position,   2. `0 ... 0` (transposed) on top and below this element, and   3. a rectangle to the right of the first column, indicating "any element" (displaying just the rectangle; this is what it stands for), spanning most or the free apace to the right inside the matrix brackets, ideally centered vertically and horizontally. How do I do this and make it look nice? Thanks! Edit per comment below: I don't actually Tex. I use this within MathJax, which - in my experience - renders most Latex packages i've seen, certainly matrices. So I just need the actual display of the matrix, not whatever comes around it - or ideally an answer by someone familiar with MathJax - see http://meta.math.stackexchange.com/questions/5020/mathjax-basic-tutorial-and- quick-reference for a quick intro (but this is only a fraction of what it renders; also http://www.mathjax.org/. How do I do this and make it look nice?


title: How to include references used in Supplementary material to main text

text: According to the guide of APS, I have to include the additional references in the supplementary material should be included in the main text. In other words, I need to put references used in one file to another file. However, I have no idea how it can be possible in latex. What is the best way to achieve this goal in latex. EDIT: I want to elaborate my problem. First, there is a main.tex that is associated to one bib file(let's say ref.bib). And there is another latex file(say supp.tex) that has some references in it. However, for some reason, I have to include those references to main.pdf and there should be no references in supp.pdf. Therefore, ref.bib contains all the information about the references of supp.tex. Then what should I do next?


title: question marks appearing using xr

text: I am creating a document in LaTeX using TeXworks and I cannot get cross- referencing between separate files working. Every time I use `\ref` to a label I get two question marks. I have three separate files: `main.tex`, `background.tex` and `implementation.tex`. The `background.tex` and `implementation.tex` files are located in a sub-directory named `sections`. I have a label in a section within `background.tex` which I want to refer to in the `implementation.tex` file. Here is how they are defined: ### `background.tex`:               \section{MySection}     \label{background:MySection}      to refer to this in `implementation.tex` I write:               As described in section \ref{background:MySection}      In my `main.tex` file I use `xr` as follows:               \usepackage{xr}     \externaldocument{sections/background}      I then compile using pdfLaTeX, then run BiBTeX for my references, then run pdfLaTeX twice. The part where I use `\ref` appears with two question marks. I get the following console output:               LaTeX Warning: Reference `background:MySection' on page 24 undefined on input line 5.      Anyone know what I am doing wrong?


title: How do I hide "Chapter 0" in this custom style when using a numberless chapter?

text: Everything works perfect when I use `\chapter{chaptername}`, but I noticed that my table of contents and other similar non-numbered chapters have a "Chapter 0" in my header.               \titleformat{\chapter}       {\normalfont\sffamily\Huge\scshape}       {}{0pt}       {\thispagestyle{empty}    % Remove page number on new chapters       \setcounter{definition}{0} % Reset Definition Counter         \begin{tikzpicture}[remember picture,overlay]         \node[yshift=-3cm] at (current page.north west)           {\begin{tikzpicture}[remember picture, overlay]             \draw[fill=cyan] (0,-1) rectangle               (25cm,3cm);             \draw[fill=cyan] (0,-24) rectangle               (25cm,-25cm);             \node[anchor=west,xshift=.21\paperwidth,yshift=-.01\paperheight,rectangle]                   {\color{white}\LARGE CHAPTER \Huge\thechapter};             \node[anchor=west,xshift=.21\paperwidth,yshift=-.065\paperheight,rectangle]                   {\color{cyan}\Huge\MakeUppercase{#1}};            \end{tikzpicture}           };        \end{tikzpicture}       }      I looked it up briefly, but I can't seem to make sense of how to use conditionals to determine certain things.


title: Is this the right way to format foot notes?

text: Using the command               \newcommand\@makefntext[1]{%     \noindent\makebox[.02\columnwidth][l]{\@thefnmark}%     \parbox[t]{.98\columnwidth}{#1}}      I got the desired result for the foot notes, as shown in the image below. I'd like to know if my code is the best way to do this. ![enter image description here](http://i.stack.imgur.com/f2Hnn.png) **edited:** using `footmisc` with the option `hang` as suggested, the format of the foot number is different so the vertical space around the foot note is changed. ![enter image description here](http://i.stack.imgur.com/6wwkQ.png)


title: Can someone please tell me how to make a title center?

text: This is my title.               \title{"IT" gas station Finder \newline Windows Mobile Application \newline \newline  PROJECT REPORT\newline \newline}%      This is the code               \documentclass[a4paper, 11pt, notitlepage]{report}          \usepackage{amsfonts}      \usepackage{graphicx}      \graphicspath{ {images/} }          \title{"IT" gas station Finder \newline Windows Mobile Application \newline \newline  PROJECT REPORT\newline \newline      Presented to     The Faculty of Computer Sciences \newline UOM \newline \newline      \includegraphics[width=0.3\textwidth]{sablogo} \newline \newline      \begin{center}      In Partial Fulfillment of the Requirements for the degree     \end{center}     Computing and Information Systems}                \date{\today}           \begin{document}     % there are some things     \end{document}


title: Latex3 input/output and expansion of macros

text: I have a package that formats a course outline and have a macro that reads a formatted user file and turns it into a section.               \documentclass{article}     \usepackage{xparse}          \ExplSyntaxOn     \tl_new:N \l_my_macro_tl     \tl_set:Nn \l_my_macro_tl {fish}          \NewDocumentEnvironment {mySection} {m}         {\noindent\textbf{\textsl{\large #1}}\hrulefill \par\smallskip}         {\par\medskip}          \NewDocumentCommand \makeOutlineSection{m}         {       \tl_clear:N \l_tmpa_tl       \ior_new:N \l_user_content_ior       \ior_open:Nn \l_user_content_ior {#1}           % read from #1       \ior_to:NN \l_user_content_ior \l_tmpa_tl       % put first line in tmpa       \begin{mySection}{\l_tmpa_tl}                   % first line is section title         \ior_to:NN \l_user_content_ior \l_tmpb_tl % rest of file in tmpb         \l_tmpb_tl                                % print tmpb       \end{mySection}       \ior_close:N \l_user_content_ior         }          \ExplSyntaxOff     \begin{document}          \makeOutlineSection{myfile.tex}          \end{document}      Where myfile.tex, for this example, has the form:               {My~Test~Section}     {       \ExplSyntaxOn       \l_my_macro_tl       \ExplSyntaxOff     }      If `myfile.tex` contains environments, such as longtable, from packages loaded in the preamble, then everything works as planned. However, it is having a hard time deciding what `\l_my_macro_tl` is. It seems that it is either that `\ExplSyntaxOn` isn't being recognized or there is some problem with expanding the macro. Could anyone explain why this is happening and possibly suggest a fix?


title: How can I fix the formatting of my axis using pgfplots so the axis titles aren't on top of the numbers?

text: How can I offset my ylabel so it doesn't smudge with the numbers? ![enter image description here](http://i.stack.imgur.com/lqhTX.png) code               \begin{figure}[H]     \centering      \begin{tikzpicture}     \begin{axis}[         scale=1.8,         xmin=-15,xmax=15,xlabel={Current $mA$}, ylabel={Residuals $mV$}     ]     \addplot [only marks, black, error bars/.cd, y dir=both, x dir=both, y explicit, x explicit, error bar style={color=mapped color}]           table[x=Residuals,y=Voltage,x error=xerr,y error=yerr]{sfnErr.dat}; % plot the data     \draw[ultra thin,gray] (axis cs:\pgfkeysvalueof{/pgfplots/xmin},0) -- (axis cs:\pgfkeysvalueof{/pgfplots/xmax},0);           \end{axis}     \end{tikzpicture}          \caption{*}     \end{figure}


title: Plotting from MATLAB with matfig2pgf: some plots do not show up in the pdf

text: I am ploting from Matlab with matfig2pgf. I plot two lines put only part of them show up in the .pdf, once it's compiled:               dat1= [-500:1000, rand(1501,1}]     dat2= [-500:1000, cos(rand(1501,1})]          XLimm=[100 300];     figure(4345)     plot(dat1(:,1),dat1(:,2),'Color',[0 1 0],'Linestyle','-','Linewidth',1.5)     plot(dat2(:,1),dat2(:,2),'Color',[1 0 0],'Linestyle',':','Linewidth',1.5)     set(gca,'XLim',XLimm)     %...     matfig2pgf('filename', 'TeXfig/figure.pgf', 'fignr', 4345,'converttexttolatex',0);      The plot in the .pdf does not show all the lines (once compiled), actually, they are missing in the .pgf already! What's the reason for that? Cheers, Jonas


title: Koma-script, change chapter appearance (how to add a circle and horizontal ruler?)

text: I'd like to get the chapter names formatted as shown below: ![enter image description here](http://i.stack.imgur.com/WyKVn.jpg) with a horizontal ruler between the circle and Chapter name, for both numbered and non-numbered chapters (I work with the `chapterprefix=on` option, so I'd like not to loose the "Chapter" word before chapter no.) The problems are:   1. Placing a horizontal ruler.   2. Having the title at the same line as "CHAPTER {number}." Thanks in advance


title: \insertshortpart is never empty?

text: I would like to use `\insertshortpart` (with some surrounding characters) in a Beamer theme, but only if a short part is actually available. However, if I try to check for emptiness with `\ifx...\empty` it turns out that this expression is never true. Here is a minimal example:               \documentclass{beamer}     \begin{document}     \begin{frame}     \ifx\insertpart\empty     empty part     \else     non-empty part     \fi          \ifx\insertshortpart\empty     empty short part     \else     non-empty short part     \fi     \end{frame}     \end{document}      This results in "empty part" and "non-empty short part". How can I check if the short part is actually empty? I had a similar problem with `\insertshortdate`, `\insertshorttitle` and `\insertshortsubtitle` which I could solve by using `\beamer@shortdate`, `\beamer@shorttitle` and `\beamer@shortsubtitle` instead, respectively. For `\insertshortpart`, however, I couldn't find a replacement. BTW, what's the difference between `\empty` and `\@empty`? In my style file both seem to work ...


title: Problem with XeTeX normalization and \char

text: Is there any way in Xe(La)TeX to enter a unicode character by its code, but still have XeTeX perform normalization on the resulting string of characters? For example, the following code does not give me a PDF with \u1F05 (ἅ), which would be my desired output (and is the character this sequence should normalize to), but instead gives me still a sequence with combining characters.               %!TEX TS-program = xelatex     %!TEX encoding = UTF-8 Unicode     \documentclass{article}     \usepackage{fontspec}     \usepackage{xunicode,xltxtra}     \setmainfont{Galatia SIL}          % [0: off; 1: NFC; 2: NFD]     \XeTeXinputnormalization=1          \begin{document}     α\char"0314\char"0301     \end{document}


title: Problem while using multirow with graphics

text: I have a problem with the multirow command.               \begin{array}{|c|c|}     \includegraphics[width=1.5in]{1}     &     \multirow{2}{*}{     \includegraphics[width=1.5in]{3}     }     \\     \hline     \includegraphics[width=1.5in]{2}     & \\     \end{array}      results in this               |1| |     ---3-     |2|3|        3        3      ![problem 1](http://i.stack.imgur.com/nLWBI.png) How to obtain the following :               |1|3|     ---3-     |2|3|     | |3|      ![Wanted](http://i.stack.imgur.com/d9xuD.png)


title: BibTex - Show ISBN number?

text: Is it possible to show the ISBN/ISSN fields of books with BibTeX? For instance, I have the following entry on my .bib file:               @book{QueueSystems,         author    = "Leonard Kleinrock",         title     = "Queueing Systems. Volume 1: Theory",         publisher = "Wiley-Interscience",         year      = "1975",         ISBN      = "0471491101"     }      With "plain" style, it's printed like this:               [11] Leonard Kleinrock. Queueing Systems. Volume 1: Theory. Wiley-Interscience, 1975.      I've tried several different styles with no success, and I can't seem to find any answer on this site or through Google...


title: advancedate and ifthenelse in latex

text: I am trying to write a course syllabus for a class that meets only certain days of the week (M, W). I want to check the day of the class and advance it by 2 days or 5 days depending on the day. The following code does not seem to work (fails at the `\ifthenelse` statement)               \documentclass{article}     \usepackage{advdate}     \usepackage[ddmmyyyy]{datetime}     \usepackage{tikz}          \newdateformat{syldate}{\THEMONTH/\THEDAY%(\shortdayofweekname%{\THEDAY}{\THEMONTH}{\THEYEAR})}           \newcommand{\class}[1]{        \def \currday {\shortdayofweekname{\the\day}{\the\month}{\the\year}}      \ifthenelse{\equal{\currday}{Mon}}{\AdvanceDate[2]}{\AdvanceDate[5]}      \section* {\syldate{\today} \quad #1}      }           \SetDate[06/01/2014]           \begin{document}      \class{First Class}       \class{Second class}      \class{Class after holiday}           \end{document}      The reason I want to do this way, is because I want to check if the `\today` is in a list of holidays and if so automatically advance to the next class day. Any advice on how to do this? More efficient code is also appreciated.


title: framed color environment is not converted in htlatex

text: I have using `pdflatex` and `htlatex` for converting framed color box in html. Successfully converted in `pdflatex` and not converting in `htlatex`. Please find the MWE below:               \documentclass{article}     \usepackage{xcolor,listings,caption}          \DeclareCaptionFont{white}{\color{white}}     \DeclareCaptionFormat{listing}{%     \parbox{\textwidth}{\colorbox{gray}{\parbox{\textwidth}{#1#2#3}}\vskip-4pt}}     \captionsetup[lstlisting]{format=listing,labelfont=white,textfont=white}     \lstset{frame=lrb,xleftmargin=\fboxsep,xrightmargin=-\fboxsep}          \begin{document}               \lstset{backgroundcolor=\color{gray}}     \begin{lstlisting}[frame=single,framerule=2pt]         for i:=maxint to 0 do         begin         j:=square(root(i));         end;     \end{lstlisting}          \begin{lstlisting}[label=some-code,caption=Program Code Here]     public void here() {         goes().the().code()     }     \end{lstlisting}          \end{document}


title: How can I change the font size of TOC, LOF and LOT?

text: I am using               \documentclass[11pt, a4paper]{memoir}          \usepackage{tocloft}     \renewcommand{\cftfigfont}{\small}          \begin{document}     \frontmatter     \tableofcontents     \cleardoublepages     \listoffigures     \cleardoublepage     \listoftables          \mainmatter     \chapter{Introduction}     Lorem ipsum blablabla...     \begin{figure}     \caption[Example]{This is caption 1.}\label{fig:ex1}     \end{figure}     As can be seen in Fig. \ref{fig:ex1}...     \end{document}      But unfortunately, my compiler keeps on telling me:               ! LaTeX Error: \cftfigfont undefined.      What's going wrong here? Or: How can I set the font size of the TOC, the LOF and the LOT one pt smaller than the standard font size?


title: Can I attach a \footnote to a \sidepar

text: Sorry for the sloppy question and editing: here my connection comes and goes in the afternoon. In a few word I need the footnote attached to a sidepar to be treated together with all the other footnotes attached to the main text. I need something like this:               \documentclass{memoir}     \settrimmedsize{340mm}{210mm}{*}     \setlrmarginsandblock{23.3mm}{46.7mm}{*}     \setulmarginsandblock{23.3mm}{54.9mm}{*}     \setmarginnotes{2.8mm}{23.3mm}{1em}     \renewcommand{\sideparfont}{\normalfont\itshape\fontsize{12pt}{12pt}\selectfont\small}     \renewcommand{\footnotesize}{\normalfont\fontsize{12pt}{12pt}\selectfont\small}     \sideparmargin{outer}               \checkandfixthelayout                    \begin{document}          A normal paragraph begins here,\sidepar{This is my Sidepar. \footnote{This is a footnote, but it appears as a sidepar footnote, if I may say so.}} it goes on and on and on and on and on and on and on and on and on and on and on and on and on on and on and on and on and on and on and on and on and on and on and on and on on and on and on and on and on and on and on and on and on and on and on and on on and on and on and on and on and on and on and on and on and on and on and on on and on and on and on and on and on and on and on and on and on and on and on on and on and on and on and on and on and on and on and on and on and on and on on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on and on on and on and on and on and on and on and on and on and on and on and on and on on and on and on and on and on and on and on and on and on and on and on and on on and on and on and on and on and on and on and on and on and on and on and on on and on and on and on and on and on and on and on and on and on and on and on on and on and on and on and on and on and on and on and on and on and on and on on and on and on and on and on and on and on and on and on and on and on and onand on and on and on and on and on and on and on and on and on and on and on and on on and on and on and on and on and on and on and on and on and on and on and on on and on and on and on and on and on and on and on and on and on and on and on on and on and on and on and on and on and on and on and on and on and on and on on and on and on and on and on and on and on and on and on and on and on and on on and on and on and on and on and on and on and on and on and on and on and on on and on and on and on and on and on and on and on and on and on and on and onand on and on and on and on and on and on and on and on and on and on and on and on on and on and on and on and on and on and on and on and on and on and on and on on and on and on and on and on and on and on and on and on and on and on and on on and on and on and on and on and on and on and on and on and on and on and on on and on and on and on and on and on and on and on and on and on and on and on on and on and on and on and on and on and on and on and on and on and on and on on and on and on and on and on and on and on and on and on and on and on and onand on and on and on and on and on and on and on and on and on and on and on and on on and on and on and on and on and on and on and on and on and on and on and on on and on and on and on and on and on and on and on and on and on and on and on on and on and on and on and on and on and on and on and on and on and on and on on and on and on and on and on and on and on and on and on and on and on and on on and on and on and on and on and on and on and on and on and on and on and on,\footnote{This is how my footnote should appear.} and finally it ends here.           \end{document}      Thank you, A * * * Following Jon's advice I made this, but it gives problems with numeration of footnotes (all notes at the foot are numbered 3).               \documentclass{memoir}      \usepackage[T1]{fontenc}      \usepackage{lipsum}                  \begin{document}           \sidepar{Lorem ipsum,\footnotemark Lorem ipsum,\footnotemark Lorem ipsum.\footnotemark}     \footnotetext{Text for note 1} \footnotetext{Text for note 2} \footnotetext{Text for note 3}%      \lipsum                                                        \end{document}      Thank you, A


title: Getting larger horizontal dots

text: I was creating some graphs related to sets in latex (cartesian graphs, arrow graphs and directed graphs). Now I noticed that `\Huge\vdots` will produce larger than normal vertical dots (although I still think they are a bit small, but that's not the issue here), but `\Huge\cdots` does not. My primary question is, how could I get larger horizontal dots? Thanks in advance.


title: Decorate a path with little arrows parallel to it

text: I want to decorate a path with little arrows (with definable length) parallel to it. I tried to modify an example from the manual, but I was only able to get arrowtips and not complete arrows where I can adjust the length. So is there a way to do this? Here is what I tried:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{decorations.markings}               \begin{document}          \begin{tikzpicture}[decoration={     markings,     mark=between positions 0 and 1 step 9.5mm with {\arrow{latex}},raise=0.1cm}     ]     \draw [help lines] grid (3,2);     \draw [postaction={decorate}] (0,0) -- (3,1) arc (0:180:1.5 and 1);     \end{tikzpicture}               \end{document}      ![arrows](http://i.stack.imgur.com/JaOMY.png)


title: Grids for A4 paper (golden ratio)

text: I'm about to construct the most important document of my life - my Ph.D. thesis. A while back I came across this for web design: Grids are Good Is there anything similar for typesetting A4 papers? Preferably that adheres to the golden ratio. I want my thesis to be as amazing as possible. Thanks in advance!


title: Wrong Subsubsection numbering

text: I have changed all headings to be indented by the same amount.               \titleformat{\section}     {\bfseries}     {\makebox[1cm][l]{\thesection}}{0cm}{}          \titleformat{\subsection}     {\bfseries}     {\makebox[1cm][l]{\thesubsection}}{0cm}{}          \titleformat{\subsubsection}     {\bfseries}     {\makebox[1cm][l]{\thesubsection}}{0cm}{}      Without having changed the numbering of them, the subsections are missing their last number (e.g. 3.1 instead of 3.1.1). However, in the toc they appear correct. How can I fix this?


title: How to set up Okular for forward/backward search with TeX Live 2011? (not trivial anymore)

text: I am working with Xbuntu 12.04 on a MacBook Air 4,1. I have Okular version 0.14.3 and TeX Live 2011 installed. I used to have perfect forward (from .tex to .pdf) and backward (from .pdf to .tex) search/sync with synctex. For some reason, it stopped working (it might be the case that I was actually originally using TeX Live 2009 which is the default under Ubuntu). Neither forward, nor backward search works anymore. The funny thing is, backward search still worked for a specific .pdf I had (an old, unchanged one). But when I hit the text selection tool in Okular, it stopped working afterwards. I even recompiled the .tex, again, not working anymore. Here is the old setup that used to work: **Old setup** This is taken from Setup SyncTeX with Emacs 1) Set up Okular: Okular -> Settings -> Editor -> change to Emacs client 2) Put in ~/.emacs:               (defun Okular-make-url () (concat                    "file://"                    (expand-file-name (funcall file (TeX-output-extension) t)                              (file-name-directory (TeX-master-file)))                    "#src:"                    (TeX-current-line)                    (expand-file-name (TeX-master-directory))                    "./"                    (TeX-current-file-name-master-relative)))     (add-hook 'LaTeX-mode-hook '(lambda ()                       (add-to-list 'TeX-expand-list                            '("%u" Okular-make-url))))     (setq TeX-view-program-list          '(("Okular" "okular --unique %u")))     (setq TeX-view-program-selection '((output-pdf "Okular") (output-dvi "Okular")))      **Problem** The question is rather simple: How can Okular (and ~/.emacs) be set up correctly to have forward and backward search with synctex (under TeX Live 2011)? **Trial** I found http://stackoverflow.com/questions/6898710/emacs-auctex-rewriting-the- okular-make-url-function-to-work-with-new-synctex-f/6904563#6904563 and tried the suggested answer. So I 1) created the "expander" as mentioned 2) put the following in ~/.emacs:               (setq TeX-view-program-list          '(("Okular" "okular --unique %o#src:%n%(dir)./%b"))); %o: TeX-output-extension; %n: TeX-current-line; %b: TeX-current-file-name-master-relative      Still, no luck. I then figured I try to start Okular from the command line to see if it can open a .pdf and display a certain line. I played with several combinations of type `okular --unique myfile.pdf#src:200/home/myuser/mypath- to-folder-of-myfile/./myfile.tex`. This opens Okular, but does not jump to line 200. It just opens the first page. So this is certainly a starting point for a fix, but I don't know how. Any ideas on how to solve this? In case this matters, I've installed TeX Live 2011 via `install-tl-unx.tar.gz` from http://www.tug.org/texlive/acquire-netinstall.html (just some weeks ago) **UPDATE** I just realized that my old setup as described above perfectly works for all files where I have a `myfile.synctex.gz` file in the current directory. Those files I newly create via `latexmk`/`pdflatex` are missing the `.synctex.gz`, so that seems to be a (maybe the) problem. Not sure what the problem is here.


title: TeXstudio: how to automate LaTeX biber sequence of compilation

text: I'm a bit confused about how to configure TeXstudio to use `biber`. It's not that I can't find a way, I'm just wondering what is the intended way, i.e. coming from WinEdt I'm used to that "Build" or "Compile" triggers a `latex biber latex latex sequence`. But I had to find out that TeXstudio is apparently not configured that way by default. By default, "Build and View" triggers `txs:///compile | txs:///view`, and `compile`, according to the manual "calls `txs:///pdflatex` that calls the actual `pdflate[x]`". There is not even a toolbar button to trigger `biber`. I had to look for it in the menus and set it off manually (or press `F11`). This makes no sense to me, so I'm wondering if I'm missing something? Here is what I've done: I now have changed the default compiler to trigger `latex biber latex latex` (or rather: `txs:///compile | txs:///bibliography | txs:///compile | txs:///compile | txs:///view`, to be precise). But then I noticed the "Repeat contained compilation commands" buttons which kinda seemed a nice idea but didnt really make sense to me, so I turned that off for the default compiler since I want to call it once before `biber` and twice after `biber`, which is not possible if it's set to repeat. So I'm kinda wondering if I'm just not getting the TeXstudio logic or why does it look like it does... It's so strange. P.S. Just to clarify: this question is not really about `biber`. It's just that I'm using `biber`. I guess the same questions would arise using `bibtex`. Update: I admit that my exact question was not so clear. I guess I am trying to understand how TeXstudio runs the compilation sequence and how it can be customized, i.e. what the logic of the (advanced) configuration options is.


title: Using Arara on windows in Texstudio to generate glossaries

text: I am trying to generate glossaries in my LaTeX document using the `article` class and am using TeXStudio I used the below code but nothing gets printed               \documentclass{article}     \usepackage{titlesec}     \usepackage[utf8]{inputenc}     \usepackage[hidelinks]{hyperref}     \usepackage{glossaries}          \makeglossaries          \newglossaryentry{culdesac}{name=cul-de-sac,description={passage or street closed at one end},plural=culs-de-sac}          \newacronym{led}{LED}{light-emitting-diode}     \begin{document}     \section{This is my section}          Some text          \end{document}      I googled and found out that I would need Arara to generate and print glossaries. I installed Arara.exe under C:\Program Files\arara\ and made a new command based on below link How to configure TexStudio editor to use glossaries package with makeglossaries and xindy or how to configure TexStudio to use arara? But I am getting the error : Error: Could not start the command: C:\Program Files\arara\arara.exe -v -l "my_text_file" Can someone help me please? I just want to print acronyms and glossaries in my article.


title: array within frac, using nath package

text: I use the nath package to get automatically-sized delimiters, but it breaks having a `\begin{array}{…}…\end{array}` within a `\frac{}{}` (simply removing the `\usepackage{nath}` below fixes the example, but I need nath for other stuff).               \documentclass{article}     \usepackage{nath}     \begin{document}     \begin{equation}       \begin{array}{c}a\\b\\c\end{array}% This works       \frac{numerator}{denominator}% This works       % I want to put the array at the numerator's place       \frac{\begin{array}{c}a\\b\\c\end{array}}{denominator}% This fails     \end{equation}     \end{document}      I'm trying to do this to typeset some simple natural deduction proofs (one or several hypotheses followed by a horizontal line, then one or several conclusions), but packages like bussproofs.sty are clearly overkill (I don't need to typeset full proofs, just a single deduction rule). While `\frac{}{}` is semantically incorrect for this use, it is simple and gives the visual result I need. **Edit** : The error message is `ERROR: LaTeX Error: Environment ARRAY undefined.`


title: Duplicating Environments

text: When I want to globally modify a command in my document, I will often use a duplicated version of the original in the stencil, with the help of the `\let` macro. For example, if I wanted to do something every time I created a section, I might say:               \let\svsection\section     \renewcommand\section[1]{\mychanges\svsection{#1}}      It just dawned on me that I don't know how or if something similar can be done for environments. What I would hope for is something like (I'm omitting arguments for the sake of simplicity, don't focus on that):               \let\svfigure\figure     \renewenvironment{figure}{\blahblah\begin{svfigure}}                              {\end{svfigure}\moreblah}      Of course, this syntax won't work because `\figure` isn't a command. But, I was hoping that the creation of environment `abc` would always be accompanied by the creation of associated constructed commands, for example, `\start@abc` and `\end@abc`, such that these associated commands could be `\let` to duplicate the original environment. I also realize that one approach may be to "patch" the original environment, but I don't think that is really what I'm asking, since I'm not sure a patch can be easily undone, whereas redoing a `\let` in the opposite direction (e.g., `\let\section\svsection`) will totally undo the effects of redefinition. It would be a handy feature to know how to duplicate an environment, so that the original copy can be `\renew`ed in the fashion I describe.


title: Reverse of \only

text: Is there a command which is the reverse of `\only`? E.g. if I want to strike out something in a table I want to strike out one cell in slide three like so:               ... & \only<3->{Data}\reverseofonly<3->{\sout{Data}} & ...      I have tried with `\invisible`, but it reserves space, thus widening my table column since it has to reserve space for the striked out "Data" prior to slide 3.


title: fontspec throwing error with lualatex - broken?

text: I get an error when I try to include the fontspec package. Here is a minimum working example:               \documentclass{article}     \usepackage{fontspec}     \begin{document}     Hello     \end{document}      I'm trying to compile this using the following build command: `lualatex --file-line-error-style "%f"`. Part of the output that I get is:               /usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty:100: Font \EU2/lmr/m/n/     10=file:lmroman10-regular:script=latn;+trep;+tlig; at 10pt not loadable: metric     data not found or bad.     <to be read again>     relax     l.100 \fontencoding\encodingdefault\selectfont     ?     /usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty:100: Emergency stop.     <to be read again>     relax     l.100 \fontencoding\encodingdefault\selectfont      269 words of node memory still in use:        2 hlist, 1 rule, 1 kern, 1 attribute, 41 glue_spec, 1 attribute_list, 2 if_st     ack, 1 write, 1 dir nodes        avail lists: 2:8,3:1,4:1,6:2,9:2     /usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty:100:  ==> Fatal error o     ccurred, no output PDF file produced!      I would greatly appreciate any insight that you may have on this issue. I am using Linux Mint 16, with the standard texlive-luatex available in the repositories. Thank you. Edit: upon request from user phg, here is the output from `luaotfload-tool --version`               luaotfload-tool version “2.3”     database version “2.207”     Lua interpreter: stock; version “Lua 5.2”      and `luaotfload-tool --diagnose=environment,permissions`               luaotfload | diagnose : Loading file hashes.     luaotfload | diagnose : =============== file permissions ==============     luaotfload | diagnose : Checking permissions of /home/alex/.texmf-var/luatex-cache/generic.     luaotfload | diagnose : Owner: 1000, group 1000, permissions rwxrwxr-x.     luaotfload | diagnose : Readable: ok.     luaotfload | diagnose : Writable: ok.     luaotfload | diagnose : Checking permissions of /home/alex/.texmf-var/luatex-cache/generic/names/.     luaotfload | diagnose : Owner: 1000, group 1000, permissions rwxrwxr-x.     luaotfload | diagnose : Readable: ok.     luaotfload | diagnose : Writable: ok.     luaotfload | diagnose : Checking permissions of /home/alex/.texmf-var/luatex-cache/generic/names/luaotfload-names.lua.     luaotfload | diagnose : Owner: 1000, group 1000, permissions rw-rw-rw-.     luaotfload | diagnose : Readable: ok.     luaotfload | diagnose : Writable: ok.     luaotfload | diagnose : Checking permissions of /home/alex/.texmf-var/luatex-cache/generic/names/luaotfload-names.luc.     luaotfload | diagnose : Owner: 1000, group 1000, permissions rw-rw-rw-.     luaotfload | diagnose : Readable: ok.     luaotfload | diagnose : Writable: ok.     luaotfload | diagnose : Checking permissions of /home/alex/.texmf-var/luatex-cache/generic/names/luaotfload-lookup-cache.lua.     luaotfload | diagnose : Owner: 1000, group 1000, permissions rw-rw-rw-.     luaotfload | diagnose : Readable: ok.     luaotfload | diagnose : Writable: ok.     luaotfload | diagnose : Checking permissions of /home/alex/.texmf-var/luatex-cache/generic/names/luaotfload-lookup-cache.luc.     luaotfload | diagnose : Owner: 1000, group 1000, permissions rw-rw-rw-.     luaotfload | diagnose : Readable: ok.     luaotfload | diagnose : Writable: ok.     luaotfload | diagnose : Everything appears to be in order, you may sleep well      Thanks for the prompt feedback!


title: Extra "appendix" when referencing using cleveref in elsarticle

text: How do I get rid of the extra "appendix" appearing when I cross-reference an appendix section? Example output is "...see appendix Appendix A". MWE as follows:               \documentclass[preprint,3p]{elsarticle}          \usepackage{cleveref}          \begin{document}          \begin{frontmatter}          \title{Title}          \author{Author}     \ead{email@uni.edu}          \address{Address Here}          \begin{abstract}     Abstract abstract abstract     \end{abstract}          \end{frontmatter}          \section{Section1}     We would like to reference \cref{sec:app}. And the same for \cref{sec:app2}.          \appendix     \section{Section One} \label{sec:app}     Something here          \section{Section Two} \label{sec:app2}          \end{document}


title: Grammar with numbered rules

text: I'd like to represent a grammar where rules are numbered (for example, the following grammar: http://en.wikipedia.org/wiki/LR_parser#Additional_Example_1.2B1), in order to refer to those rules later in an action table. However, I don't find any way to do this properly. Ideally, the rules numbers would be right-aligned, like in a `alignat` environment. Currently, I simply put the numbers directly in the grammar, and the output is not really readable. My code:               \documentclass[11pt]{article}     \usepackage{syntax}          \begin{document}          \setlength{\grammarparsep}{20pt plus 1pt minus 1pt}     \setlength{\grammarindent}{12em}     \begin{grammar}     <E> ::= <E> \lit{*} <B>    (1)         \alt <E> \lit{+} <B>   (2)         \alt <B>               (3)          <B> ::= \lit{0}            (4)         \alt \lit{1}           (5)     \end{grammar}          \end{document}      (note that the E and B were between 'less than' and 'greater than' symbols, I removed them from the listing because they seem to badly interact with stackexchange).


title: How to make the code of a circuitikz diagram more flexible?

text: I am a beginner in LaTeX, and TikZ, trying to use them for industrial documents. The sample code below (largely made with previous help) shows a circuit made with `circuitikz`. However I have now the need to make some variants of this circuit, and wonder if the code could be made more flexible using another approach, such as `\foreach` or other solution, minimizing the number of hard coded coordinates, and therefore simplifying the adjustments of some dimensions. Any help appreciated.               \documentclass{article}     \usepackage{tikz}     \usepackage{circuitikz}     \begin{document}     \begin{circuitikz}[scale =1]     % Side vertical lines     \draw [ultra thick, gray!50] (0,-5)-- (0,2);     \draw [ultra thick, gray!50] (5,-5) -- (5,2);      % Black resistors     \draw (0,1) to[R=$R_1$,*-*] (2,1);     \draw (3,0) to [R=$R_1$,*-*] (5,0);     \draw (0,-1) to[R=$R_1$,*-*] (2,-1);     \draw (3,-2) to[R=$R_1$,*-*] (5,-2);     \draw (0,-3) to[R=$R_1$,*-*] (2,-3);     \draw (3,-4) to[R=$R_1$,*-*] (5,-4);      % Blue resistors     \begin{scope}[color=blue]     \draw (2,1) to [R=$R_2$] (3,0);     \draw (2,-1) to[R=$R_2$] (3,0);     \draw (2,-1) to [R=$R_2$] (3,-2);     \draw (2,-3) to[R=$R_2$] (3,-2);     \draw (2,-3) to[R=$R_2$] (3,-4);     \end{scope}          % the side messages     \node [anchor=south,rotate=90, gray] at (current bounding box.west) {\Large\textbf {Pin side}};     \node [anchor=north,rotate=90,gray] at (current bounding box.east) {\Large\textbf{Socket side}};          \end{circuitikz}     \end{document}


title: Some issues in positioning arrows and labeling them

text: I want to draw something like this. ![enter image description here](http://i.stack.imgur.com/IitAb.png) But I am able draw this things: ![enter image description here](http://i.stack.imgur.com/AQlRn.png) So there are three problems:   1. Input and output arrows not positioned properly.   2. I want a rectangle above 5 X 1 MUX text.    3. I am not able to position text properly inside a block. Like I want x in front of every arrow.  I am attaching my tex code               \begin{tikzpicture}[thick]          \node [input, name=input] {};     \node [block, right of=input,minimum width=3cm, minimum height=2.5cm,node distance=0.5cm] (a) {Frame Encoder};     \node [block, right of=a,minimum width=3cm, minimum height=5cm,node distance=5cm] (b) {};     \node [block, right of=b, pin={[pinstyle]above:Ack},minimum width=3cm, minimum height=5cm,node distance=5cm] (c) {$5$ $\times$ $1$ MUX};     \node [output,right of=c] (output) {};          \begin{scope}[->,>=latex]          \draw[->] (input) -- (a);     \draw[->] (c) -- (output);     \foreach \i in {-2,...,2}{%        \draw[->] ([yshift=\i * 0.4 cm]a.east) -- ([yshift=\i * 0.8 cm]b.west) ;}          \foreach \i in {-2,...,2}{%        \draw[->] ([yshift=\i * 0.8 cm]b.east) -- ([yshift=\i * 0.8 cm]c.west) ;}          \end{scope}     \end{tikzpicture}      Thanks a lot for the help. My most of the problems got resolved. There is only one problem now. I want this x's to be numbered. For that, I am using count as some suggested. But now it doesn't compile. What mistake am I making?               \begin{tikzpicture}[thick]     \tikzset{input/.style={}}          \tikzset{block/.style={rectangle,draw}}     \tikzstyle{pinstyle} = [pin edge={to-,thick,black}]          \node [input, name=input] {};     \node [block, right=1cm of input,minimum width=3cm, minimum height=2.5cm] (a) {Frame Encoder};     \node [block, right of=a,minimum width=3cm, minimum height=5cm,node distance=5cm] (b) {};     \node [block, right of=b, pin={[pinstyle]above:Ack},minimum width=3cm, minimum height=5cm,node distance=5cm] (c) {$5$ $\times$ $1$ MUX};     \node [right =1cm of c] (output) {};          \begin{scope}[->,>=latex]          \draw[->] (input) -- (a);          \node at (b.center) {\footnotesize{z}};          \draw[above] ($(c.text)+(0,1)$)rectangle ($(c.text)+(1.85,2)$);          \draw[->] (c) -- (output);          \foreach \i [count=\xi]in {2,...,-2}{%      \draw[->] ([yshift=\i * 0.4 cm]a.east) -- ([yshift=\i * 0.8 cm]b.west) node[right]{\footnotesize{$x_{\xi}$}} ;}          \foreach \i in {-2,...,2}{%      \draw[->] ([yshift=\i * 0.8 cm]b.east) -- ([yshift=\i * 0.8 cm]c.west) ;}          \end{scope}     \end{tikzpicture}


title: Move hyperref anchor link in TOC

text: In the example below, the title of the starred section is moved to the left in the TOC but not the corresponding hyperref anchor link:               \documentclass{article}     \usepackage{hyperref}     \begin{document}     \tableofcontents     \section*{Introduction}     \addcontentsline{toc}{section}{\hspace*{-1cm}Introduction}     \section{Title}     \end{document}      How is it possible to move it as well? ![enter image description here](http://i.stack.imgur.com/l0Ewu.png)


title: LaTeX poetry anthology templates

text: Whenever I search for LaTeX templates for books, theses (plural of thesis), lab reports and so on, I am often overwhelmed with hundreds of beautiful templates from which I have to choose just one. However, when it comes to poetry anthologies, there is barely anything on the web (shock! horror!). I would have to build one from scratch using say, the `memoir` class, `poetrytex` or `verse`. Of course, this can be vexing if you don't have much LaTeXing experience... So I was wondering if you could build some clean and simple templates for poetry lovers to get started. Here is an example from the Oxford Book of English Verse to give you some ideas. The poetry anthology should include:   * a title page   * table of contents   * poems   * index (arranged alphabetically by author's surname)   * options for setting indentations in the stanzas (see above and below links) You could use this Tennyson poem as an example in your template.


title: Prevent overlapping of elements on page

text: Is there a command one can use in XeLaTeX and the rest of the TeX family to completely prevent any overlapping from occurring? Perhaps it could break the compilation with an error to alert you? I have found so many times that once you start playing around with embedded pdf's or even lettrines and placing text in the margins that there are almost always something ending up on top of another element. I don't provide a MWE because this problem is too general to confine it to one small example. Edit: Example of an overlap Edit 2: Working on documents of over 2500 pages it would really be helpful to detect overlaps automatically without having to manually scan through the final product each time. Edit3: It seems that the problem is that when you get a length for possible text to place by means of `\ifdimless` then when the actual text is placed it is sometimes stretched or shrunk to fit into the space available. Thus rendering the text `textwidth` which might be different from the value you have calculated previously.


title: Shortcuts for multiply accented characters

text: I am a preparing a book in a native American language that requires multiply accented characters. Entering these by, e.g., `\'{\b{a}}` is painful and makes the source code difficult to read, especially for triply accented characters. What I'd like is the following input/output pairs:               'a = \'a          ,a = \b{a}          ',a = \'{\b{a}}      Here is the full version of the problem. There are two different writing systems, based on the Roman alphabet, currently in use by the tribe. I want to define two different environments (`\PMKencoding` and `\AHWencoding`) such that the same code will output in both orthographies: all you need to do is switch the environment. The language has 6 basic vowels. In the AHW encoding, I want `a` = `a` (i.e., `a` to give `a`), `e` = `e`, `i` = `i`, `o` = `o`, `u` = `u`, and `å` = `au`). In PMK, `a` = `à`, `e` = `è`, `i` = `ì`, `o` = `ò`, `u` = `ù`, and `å` = `àu`. In AHW, the long versions of vowels are `aa`, `ey`, `ii`, `ow`, `uu`, `aw`. In PMK, they are grave + macron: `\`{\=a}}`, `\`{\=e}}`, `\`{\=i}}`, `\`{\=o}}`, `\`{\=u}}`, `\`{\=a}}u`. In addition to low tone, vowels can also have high or falling tone. They can also be nasal. Thus, each vowel can occur in 12 forms. I'd like to encode these 12 forms with something like the following input system. In all of the following, **I'm open to suggestions concerning the symbols, but I'd definitely like to avoid mixing SHIFT-accessed characters (e.g.,`~`) with non- SHIFT-accessed ones (e.g., `'`); I find such mixing leads to errors.** I've chosen characters that are intuitive from a linguist's point of view.               'a = short high a (\'{a})     ',a = short high nasal a (\'{\b{a}})     '.a = long high a (AHW \'{a}a, PMK \'{\=a})     ';a = long high nasal a (AHW \'{\b{a}}a, PMK \'{\={\b{a}}})          `a = short falling a (\^a)     `,a = short falling nasal a (\^{\b{a}})     `.a = long falling a (AHW \^{a}a, PMK \^a)     `;a = long falling nasal a (AHW \^{\b{a}}a, PMK \^{\b{a}})          a = short low a (AHW a, PMK à)     ,a = short nasal a (AHW \b{a}, PMK \`{\b{a}})     .a = long low a (AHW aa, PMK \'{\=a})     ;a = long low nasal a (AHW \b{a}a, PMK \`{\={\b{a}}})      Note. I'm also open to `'.,a` for long high nasal. Above, I've used `;` for the combination of `.` and `,`. Note 2. I would rather input grave+a than circumflex+a (I find using lots of SHIFT strokes slows typing speed and increases error). Note 3. In case you think there's been a slip up, the PMK orthography does not distinguish long from short on vowels with falling tone. Note 4. All vowels behave the same from the point of view of accents. But length is indicated by various means in the AHW orthography. The vowels `i` and `u` behave like `a` (repetition denotes length). For the sake of clarity, at the end, I've appended a list of what the other vowels should do. In addition to vowels, consonants present some demands:               .p = AHW p, PMK f     `p = AHW ph, PMK p     'p = AHW p', PMK v          .t = AHW t, PMK j     `t = AHW th, PMK t     't = AHW t', PMK th          .k = AHW k, PMK c     `k = AHW kh, PMK k     'k = AHW k', PMK q          .c = AHW ts, PMK ch     'c = AHW ts', PMK x      The letter Y has some strange grammatical properties, which call for:               .y = AHW i, PMK i     ,y = AHW y, PMK (nothing)      Finally, I need a symbol that will be a hyphen in the AHW system but a space in the PMK system.               ~ = AHW -, PMK   (i.e., a space).      I will be more than happy to acknowledge any assistance in print. Truth is, just thinking about the encoding has kept me from the project I'm about to embark on for far too long. * * * Other vowels:               'e = short high e (\'{e})     ',e = short high nasal e (\'{\b{e}})     '.e = long high e (AHW \'{e}y, PMK \'{\=e})     ';e = long high nasal e (AHW \'{\b{e}}y, PMK \'{\={\b{e}}})          `e = short falling e (\^e)     `,e = short falling nasal e (\^{\b{e}})     `.e = long falling e (AHW \^{e}y, PMK \^e)     `;e = long falling nasal e (AHW \^{\b{e}}y, PMK \^{\b{e}})          e = short low e (AHW e, PMK \`e)     ,e = short nasal e (AHW \b{a}, PMK \`{\b{e}})     .e = long low e (AHW ey, PMK \`{\=e})     ;e = long low nasal e (AHW \b{e}y, PMK \`{\={\b{e}}})               'o = short high o (\'{o})     ',o = short high nasal o (\'{\b{o}})     '.o = long high o (AHW \'{o}w, PMK \'{\=o})     ';o = long high nasal o (AHW \'{\b{o}}w, PMK \'{\={\b{o}}})          `o = short falling o (\^o)     `,o = short falling nasal o (\^{\b{o}})     `.o = long falling o (AHW \^{o}w, PMK \^o)     `;o = long falling nasal o (AHW \^{\b{o}}w, PMK \^{\b{o}})          o = short low o (AHW o, PMK \`o)     ,o = short nasal o (AHW \b{a}, PMK \`{\b{o}})     .o = long low o (AHW ow, PMK \`{\=o})     ;o = long low nasal o (AHW \b{o}w, PMK \`{\={\b{o}}})                         'å = short high au (\'{a}u)     ',å = short high nasal au (\'{\b{a}}u)     '.å = long high au (AHW \'{a}w, PMK \'{\=a}u)     ';å = long high nasal au (AHW \'{\b{a}}w, PMK \'{\={\b{a}}}u)          `å = short falling au (\^{a}u)     `,å = short falling nasal au (\^{\b{a}}u)     `.å = long falling au (AHW \^{a}w, PMK \^{a}u)     `;å = long falling nasal au (AHW \^{\b{a}}w, PMK \^{\b{a}}u)          å = short low au (AHW au, PMK \`å)     ,å = short nasal au (AHW \b{a}u, PMK \`{\b{a}}u)     .å = long low au (AHW aw, PMK \'{\=a}u)     ;å = long low nasal au (AHW \b{a}w, PMK \`{\={\b{a}}}u)


title: Computing in the list of a tikz foreach

text: If I say something along the lines of               \documentclass{article}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}     \def\I{2}     \foreach \i in { \I+1, ..., 20 }       \node at (\i,10) {+};     \end{tikzpicture}     \end{document}      I get the message               ! Illegal unit of measure (pt inserted).     <to be read again>                         +     l.560     \node[anchor=center] at (\i,10) {$+$};      How can I do arithmetic in the bounds of a foreach `...` range?


title: Rule before one new section

text: I use rule so as to separate the differents sections. I would like to automate this so as to use the following syntax :               \section*{One day}          \noindent\lipsum[1]          \section*{Another day}          \noindent\lipsum[1]          \section*{One more day}          \noindent\lipsum[1]          \newpage     \section*{One last day}          \noindent\lipsum[1]      **There are two problems to solve :**   1. The first section isn't preceded by a rule.   2. If one section is at the begining of one new page, it isn't preceded by a rule. ## Code to ameliorate               \documentclass[12pt]{article}         \newcommand{\myRule}{%             \vspace{0.5cm}\hrule%         }              \usepackage{lipsum}               \begin{document}          % No rule !      \section*{One day}          \noindent\lipsum[1]          \myRule     \section*{Another day}          \noindent\lipsum[1]          \myRule     \section*{One more day}          \noindent\lipsum[1]          \newpage     % No rule !     \section*{One last day}          \noindent\lipsum[1]          \end{document}


title: I need to make a slightly-less-than-\fullcite

text: I am attempting to adapt the tufte-latex style to typeset a Ph.D dissertation. The style currently uses the natbib/bibentry package to insert full-text citations as numbered side-notes, and also emits a full bibliography at the end of the document. I would like to modify the document to use a shorter cite format (showing "et al" rather than full author list; removing URLs/DOIs/etc) for these side-note citations, but retain the full citation at the end of the document. I'm also leaning heavily towards using biblatex instead of bibtex, for a variety of reasons. So the question: is it possible to create a custom, abbreviated citation style and instruct biblatex to use it in some places, and the primary/standard style in the main bib? I don't mind defining a new command (it's not necessary to redefine `\fullcite`, I'd rather use `\abbrevcite` or something).


Assume I have an image `fruit240.jpg` of 800 pixels by 600 pixels at resolution of 240 dpi. Normally I can scale it by half using the following way.               \documentclass{article}          \usepackage{xcolor,graphicx}          \parindent=0pt     \fboxsep=0pt     \fboxrule=5pt               \begin{document}     {\color{red}\fbox{\includegraphics[scale=0.5]{fruit240}}}     \end{document}      Doubling resolution by invoking ImageMagick's `convert` as follows apparently makes the same effect as scaling by half.               convert fruit240.jpg -density 480 fruit480.jpg                    \documentclass{article}          \usepackage{xcolor,graphicx}          \parindent=0pt     \fboxsep=0pt     \fboxrule=5pt               \begin{document}     {\color{red}\fbox{\includegraphics{fruit480}}}     \end{document}       Is it OK to scale image by changing its resolution?


title: PGF_2.10-CVS I lost the blue links when I compile the doc

text: My method to build the pgfmanual.pdf is :               $ cvs -z3 -d:pserver:anonymous@pgf.cvs.sourceforge.net:/cvsroot/pgf co -P pgf     $ cd ~/pgf/doc/generic/pgf/version-for-pdftex/en     $ mkdir plots     $ TEXINPUTS=".:~/pgf//:" make     $ TEXINPUTS=".:~/pgf//:" make dist     $ TEXINPUTS=".:~/pgf//:" make dist     $ cd ~/pgf/generic/pgf/testsuite/mathtest     $ pdflatex mathtest     $ cd ~     $ make -f pgf/scripts/pgf/Makefile.pgf_release      The result is correct. Automatic cross references in codeexamples are enabled, the links work but I lost the blue color for these links. The pgfmanual- pdftex.cfg file is unchanged . I work with MacTeX 2011 prerelease and pdflatex. I put the files here


title: Install TeX on a shared drive

text: I have several computers and I don't want to replicate the installation. Is it possible to install MikTeX (for instance) on a shared drive and call the binary file from any computer to compile the LaTeX code?


title: Hyperref warning when using amsthm and enumerate

text: `hyperref` gives the warning that something has been referenced but it doesn't exist. When I use the `enumerate` (or an `itemize`) list, I get the warning. Here is the minimal working example (MWE):               \documentclass{scrartcl}     \usepackage{amsthm}     \usepackage{hyperref}     \newtheorem{Bem}{Bemerkung}     \begin{document}     \begin{Bem}     \label{Bemelm}     \begin{enumerate}         \item      \end{enumerate}     \end{Bem}     \ref{Bemelm}     \end{document}      When I use `cleveref` or just don't use `hyperref` it gives no warning.


title: How to break the table elements in LaTeX?

text: I am setting up my bibliography in LaTeX. I have used `tabularx` but the problem is it tries to set the entire table all together, since the list is long, it will go over the limits of the page. Is there a way to correct this? I have used               \newenvironment{eventlist}{%     \newcommand*\inskip{}     \renewcommand\item[3]{%     \inskip%     {\raggedleft\sc ##1\\[1pt]}     {##2}\\[2pt]     {\Large\it ##3}     \medskip     \renewcommand\inskip{\bigskip}}}     {\bigskip}      and then use               \begin{yearlist}          \item{2013}     {}     {bibliographic info}          \end{yearlist}


title: How to leave a blank space at the top of each page only for chapter and section titles in ConTeXt?

text: I have a document that looks like this:                __________________ __________________     |                  |                  |     | Chapter Title    | Section  ....... |     |                  | .......  ....... |     | Section  ....... | .......  ....... |     | .......  ....... | .......  ....... |     | .......  ....... | .......  ....... |     | .......  ....... | .......  ....... |     | .......  ....... | .......  Section |     | .......          | .......  ....... |     | .......          | .......  ....... |     |__________________|__________________|      I want to add some white space to all of the pages in the document, so that the top of the paragraphs of text aligns on all pages and the chapter titles and section titles have their own space at the top, like this:                __________________ __________________     |                  |                  |     | Chapter Title    |                  | <-- Chapter titles     |                  |                  |     | Section          | Section          | <-- Section titles     |                  |                  |     | .......  ....... | .......  ....... | <-- Text begins here     | .......  ....... | .......  ....... |     | .......  ....... | .......  ....... |     | .......  ....... | .......  ....... |     | .......  ....... | .......  ....... |     |__________________|__________________|      Even when no chapter or section titles appear on the page, the text still begins on the page at a fixed space, so it is consistent across all pages.                __________________ __________________     |                  |                  |     |                  |                  | <-- Chapter titles     |                  |                  |     |                  |          Section | <-- Section titles     |                  |                  |     | .......  ....... | .......  ....... | <-- Text begins here     | .......  ....... | .......  ....... |     | .......  ....... | .......  ....... |     | .......  ....... |          ....... |     | .......  ....... |          ....... |     |__________________|__________________|      How can I add some white space to the top of the text such that only the chapter and section titles appears in this top area and the text appears at a fixed height?


title: Bug in polylongdiv?

text: \documentclass{article}     \usepackage{polynom}          \begin{document}          \polylongdiv{x^4-1}{x^3+x^2}          \end{document}      ![enter image description here](http://i.stack.imgur.com/pRrKH.png) It leaves out the first `x` in the quotient. How can I fix this?


title: Removing \CheckSum and \CharacterTable for some generated files

text: How can you prevent `\CheckSum` and `\CharacterTable` appearing in some of the generated files (examples include README, ChangeLog, LaTeX example files, ...)?


title: font set problems in beamer

text: i want to set the main font in my beamer as "Consolas" i do like this :               \documentclass{beamer}     \usepackage{fontspec}     \usetheme{Warsaw}     \begin{document}     \setmainfont{Consolas}     \begin{frame}     we discuss the ambiguities of existing security definitions and then provide a general framework for defining AKE security when involve strong adversary capabilities     \end{frame}     \end{document}      but after compile it , the font doesn't change, it is the same with that before the main font was set. what's the reason?


title: Array indexing does not work for the node label

text: There is something I cannot understand. I'm using array indexing and it works for determining the radius of the circles and to positioning the nodes. However it does not work as the node content.               \documentclass{standalone}     \usepackage{color}     \usepackage{tikz}     \usetikzlibrary{calc}     \begin{document}          \begin{tikzpicture}     \def\radi{{1,2,3,4}}     \foreach \x/\a [count=\n] in {0/15,1/345,2/345,3/345}         \draw[very thin, draw=red!50!white] (0,0) circle [radius={\radi[\x]}] node at (\a:{\radi[\x]}) {{\radi[\x]}};               \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/G47M9.png)


title: Scheme for Chemical Potential Energy representation

text: I wrote this code to schematically represent the concept of chemical potential energy. This image will be part of a representative diagram of energy transformations in a voltaic cell: chemical potential energy -> electrical energy (= eletrical work) (transducer: Lamp) -> radiant energy -> internal energy. I ask help for two tasks: 1) add transparency and improve the representation of the test tube, 2) improving the representation of the carrot (if possible). Thanks in advance.               \starttext          \startMPpage     picture tube, base, carrot;     path p;     pair t;     numeric xx, y;     color carrotcolor, aquaU, aquaD, tubecolor;     carrotcolor :=(235/255, 137/255, 33/255);     aquaU := (2/255, 132/255, 130/255);     aquaD := (122/255, 186/255, 122/255);     tubecolor :=(183/255, 110/255, 184/255);          %draw the essay tube     draw origin--origin shifted (3cm,0cm) withpen pencircle scaled 1cm withcolor tubecolor;     draw origin--origin shifted (3cm,0cm) withpen pencircle scaled .8cm withcolor white;     fill fullcircle shifted (-0.01cm,0) xscaled .6cm yscaled .9cm withpen pencircle scaled .1cm withcolor white;     draw fullcircle shifted (-.010cm,0) xscaled .61cm yscaled .9cm withpen pencircle scaled .1cm withcolor tubecolor;     tube := currentpicture scaled .4;currentpicture:=nullpicture;          %draw the rectangle base     linejoin := mitered; linecap := butt;     fill (0,0)--(0,2cm)--(3cm,2cm)--(3cm,0)--cycle withcolor aquaD;      draw (0,0)--(0,2cm)--(3cm,2cm)--(3cm,0)--cycle withpen pencircle scaled 1mm withcolor aquaU;     base:=currentpicture; currentpicture:=nullpicture;          % draw the carrot tubercle     p:= origin..(-.1cm,.15cm)..(-.1cm,2.15cm)..(0,2.15cm)..(.1cm,2.15cm)..(.1cm,.15cm)..cycle;     drawfill p withcolor transparent(1,.5,carrotcolor);     draw p ;          % draw the green leaves     linejoin :=mitered; linecap:=rounded;     for i=2 step .1 until 4:     t:= point i of p;     xx:=uniformdeviate( 1 )*1cm + xpart(t)-uniformdeviate( 1 )*1cm;     y:=uniformdeviate( 1.5 )*1cm + ypart(t);     draw t..(xx,y) withpen pencircle scaled 1.mm withcolor green;     endfor;     carrot := currentpicture scaled .45; currentpicture:=nullpicture;          %include all drawings     draw base;       draw tube  rotated -135  shifted (2cm,1.5cm) ;     draw carrot rotated 45  shifted (2cm,.5cm) ;          \stopMPpage               \stoptext      ![enter image description here](http://i.stack.imgur.com/xK4nh.png)


title: tikz with tkz-euclide: gaps in fill using \tkzFillAngle

text: I've been using `tikz` and `tkz-euclide`to draw a 2D diagram of a section of a triangular mesh. I have drawn the nodes, edges and angles as in the MWE below. The problem is the fill of one of the angles does not cover the whole area between the two edges. Notice the white space visible between the red fill and the edge between nodes `v0` and `v5`. I've tried many suggestions posted on this site on how to mark angles using `tikz` and/or `tkz-euclide`. This code is nearly exactly what I want - if the fill was correct.               \documentclass[]{article}     \usepackage{tikz, tkz-euclide}     \usetikzlibrary{calc,intersections}     \usetkzobj{all}     \tikzstyle{vertex}=[circle, color=black, fill=black, draw, inner sep=0pt, minimum size=6pt]     \tikzstyle{redVertex}=[circle, color=red!100, fill=red!50, draw, inner sep=0pt, minimum size=6pt]          \begin{document}         \begin{tikzpicture}[x=3cm, y=3cm]             \node (v0) at (1,1) [redVertex, label={[yshift=+0.3cm]right:$x_i$}] {};             \node (v1) at (0,1) [vertex, label=left:$x_{k1}$] {};             \node (v2) at (0,2) [vertex] {};             \node (v3) at (1,2) [vertex] {};             \node (v4) at (2,1) [vertex] {};             \node (v5) at (2,0) [vertex, label=below:$x_{k2}$] {};             \node (v6) at (1,0) [redVertex, label=below:$x_j$] {};                  \path[thick]                 (v1) edge [dashed] (v2)                  (v1) edge (v0)                 (v1) edge (v6)                 (v2) edge [dashed] (v3)                 (v2) edge [dashed] (v0)                 (v3) edge [dashed] (v0)                 (v3) edge [dashed] (v4)                 (v0) edge [dashed] (v4)                 (v0) edge (v6)                 (v0) edge (v5)                 (v4) edge [dashed] (v5)                 (v6) edge (v5)             ;                  \tkzMarkAngle[size=.3](v6,v1,v0)                     \tkzLabelAngle[pos=.15](v6,v1,v0){$\alpha_{ij}$}             \tkzMarkAngle[size=.3](v0,v5,v6)                     \tkzLabelAngle[pos=.15](v0,v5,v6){$\beta_{ij}$}             \tkzMarkAngle[size=.25](v1,v0,v6)                 \tkzLabelAngle[pos=-.20](v1,v0,v6){$\theta_{1}$}             \tkzFillAngle[fill=red!50, size=.30](v6,v0,v5)                     \tkzLabelAngle[pos=.19](v6,v0,v5){$\theta_{2}$}         \end{tikzpicture}     \end{document}      Which produces: ![enter image description here](http://i.stack.imgur.com/XH5fZ.gif)


title: PDFLaTeX cannot produce shaded TikZ objects

text: \documentclass{article}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}     \shadedraw[draw=blue]          (0,0) circle (1);     \end{tikzpicture}     \end{document}      can produce a shaded circle when it is compiled with latex-dvips-ps2pdf. However, compiling it with pdflatex only produces a circle without shading. I use the latest TeX Live 2011 distribution. I have updated the package several days ago. What is the source of problem?


title: How to display headers bold?

text: Is there a way to change the headers in XeLaTeX? Basically I just want my headers (pagenumber, author and title) to be bold, but none of the solutions suggested for LaTeX seems to have any effect on the headers. Is it because I'm using XeLaTeX? Here's my code:               \documentclass[twoside,12pt]{book}          \usepackage{fancyhdr}     \pagestyle{fancy}     \fancyhf{}          \begin{document}          \fancyhead{}     \fancyhead[LE,RO]{\bfseries \thepage}     \fancyhead[CO]{Titleoftext \bfseries}     \fancyhead[CE]{\bfseries Authoroftext}          \end{document}


title: How can two bivariate normal distributions be plotted in one plot?

text: I would like to visualize the following two bivariate normal distributions: ![enter image description here](http://i.stack.imgur.com/k1iqQ.png) I found Jakes awesome answer and adjusted it so that the plots get rotated the correct way. ## Current plot ![enter image description here](http://i.stack.imgur.com/oQmUv.png) ## Question How can I make the plot better viewable? (E.g. only displaying the function that is currently on top but keeping the correct color?) ## MWE               % Thanks to Jake for the template     % http://tex.stackexchange.com/a/31715/5645     \documentclass{standalone}          \usepackage{pgfplots}          \begin{document}          \pgfplotsset{     colormap={whitered}{color(0cm)=(white); color(1cm)=(orange!75!red)},     colormap={whiteblue}{color(0cm)=(white); color(1cm)=(blue)},     }          \begin{tikzpicture}[         declare function={mu11=60;},         declare function={mu12=20;},         declare function={sigma11=5;},         declare function={sigma12=5;},         declare function={mu21=70;},         declare function={mu22=40;},         declare function={sigma21=5;},         declare function={sigma22=5;},         declare function={rho=0.8;},         declare function={normal(\m,\s)=1/(2*\s*sqrt(pi))*exp(-(x-\m)^2/(2*\s^2));},         declare function={bivar(\ma,\sa,\mb,\sb,\rho)=             1/(2*pi*\sa*\sb*\rho) * exp(-((x-\ma)^2/\sa^2 + (y-\mb)^2/\sb^2 - (2*\rho*(x-\ma)*(y-\mb))/(\sa*\sb)))/(2*(1-\rho*\rho));}]     \begin{axis}[         width=15cm,         view={-15}{70},         enlargelimits=false,         grid=major,         domain=40:90,         y domain=0:60,         samples=26,         xlabel=$x_1$,         ylabel=$x_2$,         zlabel={$P$},         colorbar,         colorbar style={             at={(1,0)},             anchor=south west,             height=0.25*\pgfkeysvalueof{/pgfplots/parent axis height},             title={$P(x_1,x_2)$}         }     ]     \addplot3 [surf, opacity=0.8,fill opacity=0.9,colormap={whitered}{color(0cm)=(white); color(1cm)=(orange!75!red)}, samples=50] {bivar(mu11,sigma11,mu12,sigma12,rho)};     \addplot3 [surf, opacity=0.5,fill opacity=0.3,colormap={whiteblue}{color(0cm)=(white); color(1cm)=(blue)}, samples=50] {bivar(mu21,sigma21,mu22,sigma22,rho)};          \draw [black!50] (axis cs:-1,0,0) -- (axis cs:4,0,0);     \draw [black!50] (axis cs:0,-1,0) -- (axis cs:0,4,0);          \node at (axis cs:-1,1,0.18) [pin=165:$P(x_1)$] {};     \node at (axis cs:1.5,4,0.32) [pin=-15:$P(x_2)$] {};     \end{axis}     \end{tikzpicture}     \end{document}


title: \notimplies command error with breqn package

text: I'm trying to use this answer's "not imply" symbol. However I get the error:               Argument of \mathpalette has an extra }      Here is a MWE:               \documentclass{article}          \usepackage{amsmath}     \usepackage{breqn}          \newcommand{\notimplies}{%       \mathrel{{\ooalign{\hidewidth$\not\phantom{=}$\hidewidth\cr$\implies$}}}}          \begin{document}     $x\notimplies y$     \end{document}      The problem seems to be with the `breqn` package.


title: How do I add a vertical break after table captions?

text: I have noticed that in LaTeX, `article` does not create vertical whitespace after a table caption. Is there a way to make this (and only this) act like it does in `report` ?