title: threeparttables in single table environment

text: I have two `threeparttable` that I would like side by side in a single table environment. Previously I had a single `threeparttable` with a center column (of 5 columns) that had no borders, making it look like two tables within the same float. However, I'm sure this can be done, but I seem to be missing something since my tables are stacked on top of each other even though `tabular` is separated by `\qquad` and the `tablenotes` that apply to both tables are also aligned the same. MWE follows:               \documentclass[english]{report}     \usepackage{threeparttable}          \begin{document}     \begin{table}     \centering          \begin{threeparttable}     \begin{tabular}{r>{\centering}m{1.5cm}}     \toprule     \textbf{Site} & \textbf{Size}\tabularnewline     \midrule     \midrule     \textbf{Cuoli} & 3.5 ha\tabularnewline     \midrule     \textbf{Erlitou} & \textasciitilde{}5 ha \tnote{i}\tabularnewline     \midrule     \textbf{Gaoya} & 57 ha\tabularnewline     \midrule     \textbf{Huizui} & 10 ha\tabularnewline     \midrule     \textbf{Ligou} & 10 ha\tabularnewline     \midrule      \textbf{Shaochai} & n/a \tnote{ii}\tabularnewline     \midrule     \textbf{Tanxiaoguan} & 10 ha\tabularnewline     \midrule     \textbf{Wangwan} & 2 ha\tabularnewline     \midrule     \textbf{Xiaopangou} & 10 ha\tabularnewline     \midrule     \multicolumn{2}{c}{(a) Longshan Period}\tabularnewline     \end{tabular}          \qquad          \begin{tabular}{r>{\centering}m{1.5cm}}     \toprule     \textbf{Site} & \textbf{Size}\tabularnewline     \midrule     \midrule     \textbf{Cuoli} & 3.5 ha\tabularnewline     \midrule     \textbf{Erlitou} & 300 ha\tabularnewline     \midrule     \textbf{Gaoya} & 80 ha\tabularnewline     \midrule     \textbf{Huizui} & 25 ha\tabularnewline     \midrule     \textbf{Ligou} & 10 ha\tabularnewline     \midrule     \textbf{Shaochai} & 100 ha\tabularnewline     \midrule     \textbf{Tanxiaoguan} & 20 ha\tabularnewline     \midrule     \textbf{Wangwan} & n/a \tnote{iii}\tabularnewline     \midrule     \textbf{Xiaopangou} & 20 ha\tabularnewline     \midrule     \multicolumn{2}{c}{(b) Erlitou Period}\tabularnewline     \end{tabular}          \begin{tablenotes} \scriptsize \item[i] The Erlitou site is occupied during the early Longshan period (see ), but the earlier occupation has been completely subsumed by the massive growth of the subsequent Erlitou period; the size given here is only an estimate. However, we do know that the site is abandoned during the late Longshan period, and is re-occupied by phase I of the Erlitou period. \item[ii] The Shaochai site is not present during the Longshan period, not appearing until phase I of the Erlitou period. \item[iii] The Wangwan site appears not to have much of a presence by the Erlitou period, though the Wangwan excavators do mention some Erlitou traits evident in pottery forms during the site's final occupation in the late Longshan (see "Wangwan Site" description, p.\pageref{WangwanSite}). \end{tablenotes}          \caption{Site sizes, by period}     \label{tab:Site-sizes-by-Period}     \end{threeparttable}     \end{table}          \end{document}


title: use chinese in lyx beamer slide

text: I wish to use lyx beamer document type but use Chinese in document. Maybe it's possible to use CJK but not sure how to do it. Anyone can share your suggestion?


title: How can I make TikZ nodes center on a particular symbol/operator?

text: Here is a small example document.               \documentclass[a4paper]{amsart}          \usepackage{tikz}          \newcommand{\dju}{\mathbin{\coprod}}     \DeclareMathOperator{\id}{id}          \begin{document}          \begin{tikzpicture}[x = 45mm, y = 30mm]         \node (gh)   at (0, 1) {$  G  \dju   H $};         \node (fgh)  at (1, 1) {$f(G) \dju   H $};         \node (ggh)  at (0, 0) {$  G  \dju g(H)$};         \node (fggh) at (1, 0) {$f(G) \dju g(H)$};         \begin{scope}[->]             \draw (gh.east) -- (fgh.west)                   node [midway, above] {$f \dju \id_H$};             \draw (gh.south) -- (ggh.north)                   node [midway, left] {$\id_G \dju g$};             \draw (gh.south east) -- (fggh.north west)                   node [midway, above right] {$f \dju g$};             \draw (fgh.south) -- (fggh.north)                   node [midway, right] {$\id_{f(G)} \dju g$};             \draw (ggh.east) -- (fggh.west)                   node [midway, below] {$f \dju \id_{g(H)}$};         \end{scope}     \end{tikzpicture}          \end{document}      This is what the document looks like when I compile it: ![](http://junk.orderofthehammer.com/j2013/tikz-commutative-diagram-bad- alignment.png) This diagram looks fairly reasonable, but perhaps it would look nicer if the vertical and horizontal arrows were centered on the disjoint union symbol (`\coprod`). The diagonal arrow should probably remain as it is, pointing from the bottom-right corner of the right-hand summand of the domain to the top- left corner of the left-hand summand of the codomain. Here is the above picture after I messed around with it in mspaint, to show you what I mean: ![](http://junk.orderofthehammer.com/j2013/tikz-commutative-diagram-better- alignment.png) How would you go about making TikZ draw the diagram like this? One way that occurs to me is to take each of the four nodes and make the `\dju` and the two summands into separate nodes, with each summand positioned relative to the `\dju` node. However, it is not obvious that the math-mode spacing of the different symbols can be mimicked if you do this. Unrelated question: In two places in this diagram, the spacing on the right- hand side of the disjoint union symbol seems wrong. This appears to happen when the math operator `\id` is on the left-hand side and an ordinary letter is on the right. Why does this happen? It does not happen if you change the `\mathbin` in the preamble to `\mathord`, but this also makes all of the spacings bigger. The effect does disappear if the `\mathbin` is removed altogether. I confess I do not remember why I put it there in my main document.


title: How to shift arrow in diagram

text: I need to shift this diagonal arrow (in bottom box) down.               \xymatrix@R.8pc@C.8pc{       \bullet \ar[rrr]^{i'^{!}} \ar[ddd]_{Th(\Omega_{f'})} &&& \bullet \ar[ddd]^{Th(\Omega_{f})} \\       &&& \\       & \ar@{<=}[ur] && \\      \bullet \ar[rrr]^{i'^{!}} \ar[ddd]_{f'^{*}} &&& \bullet \ar[ddd]^{f^{*}}\\        & \ar@{<=}[ur]_{E_{x}^{!,*}} && \\ \\     \bullet \ar[rrr]_{i^{!}} &&& \bullet     }


title: Customized log notation

text: In my country, the base of logarithm is written in superscript before the log sign, i.e. `$^a\log b$` means log base `a` of `b`. This doesn't look nice on LaTeX, because there is a gap between `^a` and `\log`. How to remove this gap?


title: Strange symbol with \bigstar

text: I would like to insert a star into my latex document. So, i tried this command: `\bigstar` But, i get this result instead of a star: ![Result](http://i.stack.imgur.com/STmp5.png) Do you know how i can fix it? Thank you


title: xetex and tikz fadings dont work

text: Here is the following siple code               \begin{tikzpicture}          \fill[black] (0,0) rectangle (8,1);     \fill[white,fading=west] (0,0) rectangle (8,1);          \end{tikzpicture}      i use it with the following library `\usetikzlibrary{fadings}` but it won't compile and i get the following message:               Package pgf Warning: Your graphic driver pgfsys-xetex.def does not support fadi     ngs. This warning is given only once on input line 31.      Any clues?


title: Need recommendations for a drawing tool in LaTeX

text: I have never used a graphing tool in LaTeX but now I need to draw a picture. It is not very complicated: an xy-plane with axis; a number of points; a number of straight lines and finally two hyperbolas. My question is what tool I should pick? I have seen TikZ but I am told it takes quite some time before you can actually use it.


title: What makes LaTeX typeset basic \rightarrow arrowheads differently?

text: Recently I typeset the same document on two different computers--once on my Mac and once on a machine running Ubuntu. (Both have the latest release of TeX Live, or whatever the standard distro is.) The two PDFs were identical, except that the heads of the `\rightarrow`s (hence `\to`s) the Ubuntu machine produced were slightly fatter (and uglier) than those the Mac produced. Does this style feature vary across versions of LaTeX, and how can I control which arrowheads are typeset? The code               \documentclass{article}          \begin{document}          This document was created on the Ubuntu machine, using \TeX\ Live 2009, \LaTeX\ 2e, etc.     Here is an arrow:         \[ \rightarrow\]          \end{document}      on the Ubuntu machine generated arrowtest.pdf. And the code               \documentclass{article}          \begin{document}          This document was created using the Mac, using \LaTeX\ 2e, etc.     This is an arrow:         \[ \rightarrow \]          \end{document}      on my Mac generated arrowtest2.pdf.


title: How to redefine (via `environ` package) the `pmatrix` environment?

text: I want to redefine the `pmatrix` environment provided by the `amsmath` package (and changed by the `mathtools` package) for adding good-looking delimiters. The code is below:               \documentclass{article}     \usepackage{amsmath,mathtools,environ}     \RenewEnviron{pmatrix}{\PARENS{\begin{matrix}\BODY\end{matrix}}}      The `\PARENS` command is provided by the `mtpro2` package to get curved left/right parentheses. But it does not work. Furthermore, there's a starred version `pmatrix*` (with an optional arg `l`/`c`/`r`): I don't have any idea either. The code I can give is below:               \documentclass{article}     \usepackage{amsmath,mathtools,environ}     \RenewEnviron{pmatrix*}[1][c]{\PARENS{\begin{matrix*}[c]\BODY\end{matrix*}}}      I mailed to `environ` package's author Will Robertson, but there's no reply. He may come here usually. So I logged in and posted. (The question is copied from http://stackoverflow.com/questions/4802117/how- to-redifine-via-environ-package-the-pmatrix-environment.)


title: How to get rid of blank page after Appendix title

text: After I have my page which says `Appendix` my document has a blank page before the page starting `Appendix A`. How can I get rid of this. I have `\include{appendix}` in my main file and in my appendix file I have               \appendix%*{Appendix}          \appendixpage          \addappheadtotoc          \chapter{Title}


title: Write Latex code for appendix within chapter but typeset at end of book

text: Is it possible to enter the source code for an appendix section within the actual chapter but get it typeset after the last chapter of book? For example something that looks like this in the code:               \chapter{Chapter 1}     \section{Section 1}     This is the first section of the first chapter. For details see Appendix 1.     \begin{appendices}     \section{Appendix for Chapter 1, Section 1}     Here is additional information that is typeset at the end of the book.     \end{appendices}     \chapter{Chapter 2}     \section{A new section}     This is a new section in the second Chapter. Even though I add a new appendix here, it will become consolidated with the first appendix at the end of the book.     \begin{appendices}     \section{Appendix for a new section}     This is the appendix for "A new section" in Chapter 2     \end{appendices}      and produces this as the output: > Chapter 1 > > 1.1 Section 1 > > This is the first section of the first chapter. For details see Appendix 1. > > Chapter 2 > > 2.1 A new section > > This is a new section in the second Chapter. Even though I add a new > appendix here, it will become consolidated with the first appendix at the > end of the book. > > Appendices > > A. Appendix for Chapter 1, Section 1 > > Here is additional information that is typeset at the end of the book. > > B. Appendix for a new section > > This is the appendix for "A new section" in Chapter 2


title: microtype with latex+dvips+ps2pdf

text: I would like to use microtype with the latex, dvips, ps2pdf workflow. Is it possible to use it in this workflow? If it can be used are there any options that I need to call when using microtype?


title: How do package authors find the time?

text: Not sure if this question belongs here, on the main site, or not on TeX.SX at all. Let me know if it belongs somewhere else. I have recently made some leaps in my knowledge of LaTeX, in particular its packages. I am very impressed by projects like `beamer` and `tikz`, so I really wonder: _how do package authors find the time_? It appears many are in academia. Being in academia myself, I know how time-pressured it can be. When Knuth wrote his computer programming book, he got side-tracked and developed TeX for many years. On a smaller scale, there appears to be years of time in some. Do authors receive specific grants for package development, or do they really work crazy hours in evenings and weekends (where other academics would spend time on their science)?


title: LaTeX not finding my local files

text: I've tried following the advise in other postings here, but nothing is working and I'm now afraid I'm going to break something. I've tried setting:               export TEXINPUTS=.:~/projects/ini/latex/texmf:$TEXINPUTS      I've tried running               sudo texhash ~/projects/ini/latx/texmf      But neither work. The files I'm expecting LaTeX to find are               ~/projects/ini/latex/texmf/tex/latex/stages/stages.tex     ~/projects/ini/latex/texmf/tex/latex/choices/choices.tex      What am I not doing or doing wrong?


title: Figure from PDF is always at new page

text: I have a figure in pdf file, which I want to include to my latex file. In the PDF file is only one figure, nothing else. This is code, how I iclude it:               \documentclass[a4paper,11pt]{article}          \usepackage[english]{babel}     \usepackage[utf8]{inputenc}     \usepackage{array}     \usepackage{algpseudocode}     \usepackage{float}     \usepackage{graphicx}     \usepackage{mathtools}     \usepackage{amssymb}     \usepackage{hyperref}     \usepackage{caption}     \usepackage{pdfpages}          \hypersetup{         pdfborder = {0 0 0},         colorlinks=true,         linkcolor=blue,         urlcolor=blue         }          \author{Jozef Mrkvicka}     \title{Lorem Ipsum \\ (FF-FFF) }          \begin{document}         \maketitle         \begin{figure}[H]         \includegraphics[width=1.0\textwidth]{logo.pdf}          \end{figure}              \newpage         \section{Introduction}               \end{document}      The problem is that figure is always on new blank page, but I want it in the first page under title. Could someone help me, how to solve this problem?


title: Beamer: change default color of item's indicator in itemize

text: I'm using beamer with               \usecolortheme{dolphin}      and all the items' indicators in itemize (e.g., bullets, numbers, etc.) are blue (which is the main color of the dolphin theme). What's the command to change the default color of the item's indicator? I want it to be of the same color of the text.


title: Multiple tensor indices with breqn package

text: When I try to use the `tensor` style file to create multiple tensor indices with the `breqn` style file, I run into the following problem shown in this (minimal) code:               \documentclass{article}     \usepackage{breqn}     \usepackage{tensor}     \begin{document}     $\tensor{F}{_a}$     \end{document}      I get the following error:               ERROR: Package tensor Error: Sub/Superscript items out of order on input line 5,           --- TeX said ---     (tensor)                some index tokens may now have been lost.          See the tensor package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.5 $\tensor{F}{_a}                        $     --- HELP ---     From the .log file...          An index string has an extra or missing `^' or `_' token.      I suspect this has to do with how `breqn.sty` redefines `^` and `_` as the user egreg talked about here. If I take out the `breqn` package, everything compiles nicely. My question is: Is there something I can put in the preamble or elsewhere to return functionality to the `\tensor` command while still using the `breqn` package? **OR** Is there something I can use that is _not_ the `tensor.sty` style file to create tensors like `\tensor[^{ab}_c]{F}{_{def}^g_h}` which would produce something that looks like this: ![image](http://i.stack.imgur.com/XY1iu.jpg) while still using the `breqn.sty` package?


title: Styling long equations - is there any convention ?

text: I was wondering if there is any convention for styling long mathematical equation ? I have an exuation which originaly took more than a pagewidth so I splited it using               eqnarray      however I think it still doesn't look good - the equation number is overlaping (a bit) with actual equation - it looks quite ugly. Is there any better way to format this equation                \begin{eqnarray*}      \left( R_{j}p_{ij}^* \right)^T  \left( \frac{\partial R_{j} }{\partial \phi_{j}}p_{ij}^* \right)       & = &   \left( p_{ij}^* \right)^T      \left(     \begin{array}{cc}     \cos{\phi_{j}} & \sin{\phi_{j}} \\     -\sin{\phi_{j}} & \cos{\phi_{j}}     \end{array}     \right)     \left(     \begin{array}{cc}     -\sin{\phi_{j}} & -\cos{\phi_{j}} \\     \cos{\phi_{j}} & -\sin{\phi_{j}}     \end{array} \right)     p_{ij}^*       \\ & = & \left( p_{ij}^* \right)^T     \left(     \begin{array}{cc}     0 & -1 \\     1 & 0     \end{array}\right) p_{ij}^* = 0     \end{eqnarray*}      any suggestion would be great :) EDIT It seems to be a problem with rendering equations


title: Adding a dash between words in List of Figures

text: Yesteday I was Searching in this site some help to construct my dissertation, my trouble was modify the style of the list of figures in LaTeX, more specificaly, add the word "Figure 1" before each entry in list of figures, then this answer helpS, look: enter link description here But, moreover I need iserting a little dash between the word figure and the entry of the list. I need something like this: Figure 1 - Entry of the list For now, I don't have that little dash, someone can help with this, I'd be thankful! I have this:               \documentclass{report}     \usepackage{chngcntr}       \usepackage{tocloft}     \usepackage{hyperref}          \counterwithout{figure}{chapter}     \counterwithout{table}{chapter}          \renewcommand{\cftfigpresnum}{Figure\ }     \renewcommand{\cfttabpresnum}{Table\ }          \newlength{\mylenf}     \settowidth{\mylenf}{\cftfigpresnum}     \setlength{\cftfignumwidth}{\dimexpr\mylenf+1.5em}     \setlength{\cfttabnumwidth}{\dimexpr\mylenf+1.5em}               \makeatletter     \newcommand\listoftablesandfigures{%         \chapter*{List of Tables and Figures}%         \phantomsection     \@starttoc{lof}%     \bigskip     \@starttoc{lot}}     \makeatother          \begin{document}     \listoftablesandfigures          \chapter{Test one}     \section{Test one one}          \begin{table}       \caption{Test table one}     \end{table}          \begin{figure}       \caption{Test figure one}     \end{figure}          \chapter{Test two}     \section{Test two two}          \begin{table}       \caption{Test table two}     \end{table}          \begin{figure}       \caption{Test figure two}     \end{figure}          \end{document}      The result is this ![enter image description here](http://i.stack.imgur.com/rpMrd.png) How can I add a little dash between the words "Figure 1" and "Test of figure one"?


title: Latexmk says the file is up-to-date, while it's not

text: For some reason the `pdflatexmk` typesetter is sometimes not recognising changes in my file and it returns:               Latexmk: All targets (main.pdf) are up-to-date      while the target is not up-to-date. When I type something in `three.tex`, click save and then typeset, sometimes it typesets fine, sometimes it shows the above message. When the above message is shown I need to type some more text, and try to typeset again. After several tries it will typeset normally. I've included a stripped down version of my files below: `main.tex`:               % !TEX TS-program = pdflatexmk          \documentclass[12pt,a4paper,titlepage,final]{report}          \usepackage[paper=a4paper, hmargin=2.5cm, vmargin=0cm]{geometry}      \usepackage{caption}                         \usepackage{geometry}     \usepackage{fancyhdr}                        \usepackage{graphicx}                        \usepackage[toc,nonumberlist]{glossaries}            \usepackage{pdfsync}                         \usepackage[T1]{fontenc}                         \usepackage[applemac]{inputenc}              \usepackage[section]{placeins}                         \usepackage{parskip}                         \usepackage{amsmath}                         \usepackage{natbib}                      \usepackage{tikz}                            \usepackage{pgfplots}                        \usetikzlibrary{plotmarks}                    \includeonly{chapters/three}          \begin{document}     \include{chapters/one}     \include{chapters/two}     \include{chapters/three}          \bibliographystyle{apalike}     \biblipgraphy{refs}     \addcontentsline{toc}{chapter}{Bibliography}          \end{document}      `three.tex` (located in folder `./chapters`):               % !TEX root = ../main.tex     \chapter{Three}     \label{chap:three}          Text, figures and equations      I'm using TeXShop 3.23 on Mac OSX 10.8.4. It all worked fine for months with this setup, but now something has changed (no clue what). **Update:**   I found a file in the main directory named `pdflatex24719.fls` that contained the following:               PWD /Users/user/Documents/Dropbox/main     INPUT /usr/local/texlive/2012/texmf.cnf     INPUT /usr/local/texlive/2012/texmf/web2c/texmf.cnf      I've never seen the file before, so I decided to delete it. After deletion all worked fine again as it should. **Update 2:** And the behaviour is back again. Although I have changed the text in `three.tex` `pdflatexmk` still says it's up-to-date. **Update 3:** I found out that the `.pdf` is updated. When I open it with Preview.app I see the updated version. However, the TexShop preview window keeps showing the old `.pdf` file. **Update 4:** Following the advice of texenthusiast I created a sample bibliography `refs.bib` and a sample tex file `sample.tex`. The latter looks as follows:               \documentclass[12pt,a4paper,titlepage,final]{report}     \begin{document}          test citing~\cite{Rom1992}          \bibliographystyle{apalike}     \bibliography{refs}     \end{document}      While in the folder of the `sample.tex` I ran `latexmk -pdf sample.tex` in the Terminal and checked the pdf file. After I made an edit to the `.tex` file I ran the command again. The change was reflected in the pdf file.


title: Citation undefined

text: i'm trying to build my bibliography. i'm using Texstudio & jabref. The first book that i added to jabref was with the ISBN code - worked fine. the second book was found using google scholar in jabref, when i'm trying to cite it               \cite{bookname}      i get a question mark near the text               [?]      followed with error in the log               Citation "bookkname" on page undefined       i'm new with latex so please be patience with me... if more info is needed i will provide it thx


title: Inserting Symbols into my graphics

text: I am trying to show two braids are equivalent, I have my code as follows               \begin{figure}[htb]                \centering             \begin{tikzpicture}                 \braid [line width=.4mm] a_2^{-1} a_1^{-1} a_2^{-1} a_1^{-1};             \end{tikzpicture}                  \begin{tikzpicture}                 \braid [line width=.4mm] a_1^{-1} a_2^{-1} a_1^{-1} a_2^{-1};             \end{tikzpicture}              \caption{Represents how two $3$-braids can be equivalent.}     \end{figure}      which gives me my two braids side by side, only problem is I can't get my equivalence sign inbetween them, I want this guy: ~ to be centered in the middle of the two braids. Can anyone help?


title: contents in list of figures are crossing the border

text: ![enter image description here](http://i.stack.imgur.com/NryT7.png) Please look at the figure above. The contents in the List of Figures are crossing the border and they are not appearing fully. This is the code that I found in the source latex file.                \newpage      \makeatletter      \let \asas \ps@plain      \let \ps@plain \ps@empty      \makeatother \large      \tableofcontents      %\makeatletter      %\let \ps@plain \asas      %\let\asas\relax      %\makeatother      %\thispagestyle{empty}      \listoffigures      %\thispagestyle{empty}      \listoftables       %\thispagestyle{empty}      What can be done ?


title: punctuation after authors/editors in bib latex

text: Using the following code               \DeclareFieldFormat       [article,inbook,incollection,inproceedings,patent,thesis,unpublished]       {title}{#1\adddot\nopunct\isdot}      I can remove punctuation from around titles and end the field in a dot. However extending the idea to try to insert a comma between author lists and year has no effect, viz:               \DeclareFieldFormat       [article,book,inbook,incollection,inproceedings,patent,thesis,unpublished]       {author}{#1\addcomma\isdot}      I would be grateful for any assistance. MWE:               \RequirePackage[l2tabu, orthodox]{nag}          \documentclass[a4paper,twoside]{memoir}      % Unix options     \isopage     \usepackage{xpatch,etex,setspace,excludeonly,ifthen,etoolbox,logreq,makeidx,cals,graphicx}     \usepackage[english]{babel}     \usepackage[style=british]{csquotes}     \usepackage[style=philosophy-classic,firstinits=true,uniquename=init,natbib=true,backend=biber,indexing=true,defernumbers=true]{biblatex}          \DeclareNameAlias{sortname}{last-first}           \addbibresource{thesis.bib}            % Bibliography customisation     \renewcommand*{\newunitpunct}{\addcomma\space}          \DeclareFieldFormat       [article,inbook,incollection,inproceedings,patent,thesis,unpublished]       {title}{#1\adddot\nopunct\isdot}          \DeclareFieldFormat       [article,book,inbook,incollection,inproceedings,patent,thesis,unpublished]       {author}{#1\addcomma\isdot}          \renewbibmacro{in:}{%         \printtext{\bibstring{In}\addcolon\space}%     }          % Remove parentheses from year     \renewbibmacro*{date+extrayear}{%           \begingroup%             \clearfield{month}%             \clearfield{day}%         \ifboolexpr{%           test {\iffieldundef{date}}           and           test {\iffieldundef{year}}         }%           {\iftoggle{bbx:nodate}{\printtext{%             \midsentence\bibstring{nodate}}}{}}%           {\printtext{\printdateextra}}%            \endgroup}%          % Dot after year     \renewcommand{\labelnamepunct}{\adddot\space}          % Put number in parentheses     \DeclareFieldFormat[article]{number}{\mkbibparens{#1}}          \renewbibmacro*{volume+number+eid}{%       \printfield{volume}%     %  \setunit*{\adddot}% DELETED       \printfield{number}%       \setunit{\addcomma\space}%       \printfield{eid}}          \begin{document}     \printbibliography     \end{document}


title: Tests for checking kerning and sidebearings

text: To test the kerning and sidebearings of digital fonts, Bringhurst suggests the following methods:   * To check the sidebearings typeset consecutive pairs of letters and check the symmetry.    * For the kerning typeset the letter combinations. He also shows a test text which shows the usual badly kerned combinations of letters. Has someone prepared TeX files with such text that can be readily run for different fonts? and want to share them? :-)


title: Custom enumerate margin with enumitem

text: I'd like to tell to enumitem to customize the enumerate environment so that, with the following code, I'd get the result pictured below ('a' labels for 1.(a) and 2.(a) should be aligned). How can I do? Update: The important point is that I'd like the text to be aligned with the previous paragraph (except for the first line) and that each new level of enumeration should add a leftmargin. I produced the example below using `\parshape` and some dirty hacks with `\hspace{\parindent}`: this is why the first (a) label ["1.(a)"] is not properly aligned with the second (a) label ["2.(a)"]. ![enter image description here](http://i.stack.imgur.com/4qyPW.png)               \documentclass{article}     \usepackage{enumitem}     \begin{document}          Text text text text Text text text text Text text text text Text text     text text Text text text text Text text text text Text text text text     Text text text text Text text text text Text text text text Text text     text text Text text text text Text text text text           \begin{enumerate}     \item Text text text text Text text text text Text text text text Text     text text text Text text text text Text text text text Text text text     text Text text text text Text text text text Text text text text Text     text text text Text text text text Text text text text     \begin{enumerate}     \item Text text text text Text text text text Text     text text text Text text text text Text text text text Text text text     text Text text text text Text text text text Text text text text Text     text text text Text text text text Text text text text Text text text     text     \item Text text text text Text text text text Text     text text text Text text text text Text text text text Text text text     text Text text text text Text text text text Text text text text Text     text text text Text text text text Text text text text Text text text     text     \end{enumerate}     \item \begin{enumerate}       \item Text text text text Text text text text Text     text text text Text text text text Text text text text Text text text     text Text text text text Text text text text Text text text text Text     text text text Text text text text Text text text text Text text text     text     \item Text text text text Text text text text Text     text text text Text text text text Text text text text Text text text     text Text text text text Text text text text Text text text text Text     text text text Text text text text Text text text text Text text text     text     \end{enumerate}     \item Text text text text Text text text text Text text text text Text     text text text Text text text text Text text text text Text text text     text Text text text text Text text text text Text text text text Text     text text text Text text text text Text text text text     \end{enumerate}     \end{document}


title: Spacing between letters of multi-letter identifier changes randomly

text: I use multi-letter identifiers in my thesis, for which I wrote macros, for example:               \newcommand{\spec}{\mathit{Spec}}      In a text, I always refer to these identifiers as:               some words $\spec$ even more words      In some texts however, latex changes the spacing between the letters: The output looks like "some words S p e c even more words" instead of the usual "some words Spec even more words". How do I prevent latex from adding spaces and always output the latter? EDIT: Here is a minimal example. The spacing on page one is weird, the spacing on page two is correct. Any ideas?               \documentclass[%     twoside=true,     paper=a4,     BCOR=5mm,     headinclude=true,     footinclude=true,     fontsize=10pt,     titlepage=true,     abstract=off,     parskip=half-,     headsepline,     footsepline,     cleardoublepage=empty,     open=right,     numbers=noenddot,     fleqn,     index=totoc,     listof=totoc,     american     ]{scrreprt}          \PassOptionsToPackage{%     drafting,           % timestamp on every page     pdfspacing         % makes use of pdftex’ letter spacing capabilities     }{classicthesis}          \PassOptionsToPackage{american}{babel}     \usepackage{babel}               \usepackage{classicthesis}     \newcommand{\spec}{\mathit{Spec}}     \newcommand{\sd}{\mathit{stopdead}}     \newcommand{\bb}{\mathit{b}}               \begin{document}          \chapter{$\bb$-conformance}          Some words $\spec$ some more words.     This is very weird $\sd$-semantics behavior and $\sd$-semantics looks really ugly.          \newpage          Some words $\spec$ some more words.     This is normal $\sd$-semantics behavior.          \end{document}


title: LaTeX fonts for NSF Proposals

text: I'd like to use LaTeX to format an NSF proposal, but am nervous about the differences in fonts between standard LaTeX tools and the NSF Guidelines. The guidelines state: > Use one of the following typefaces identified below: Arial, Courier New, or > Palatino Linotype at a font size of 10 points or larger Times New Roman at a > font size of 11 points or larger; or Computer Modern family of fonts at a > font size of 11 points or larger. Does anybody know how these constraints translate for purposes of LaTeX formatting? In particular, I'd like to know what range of typesetting options are permissible for meeting their page requirements.


title: Alphadin BibTeX: DOI displayed twice

text: I'm not quite sure how to explain my problem. Please telle if you need more information. My document is very large and has a lot of settings. I'm using TeXnicCenter with the BibTex-Compiler 2.8. When I'm constructing the PDF (LaTeX->DviPS->PS2PDF), I'm getting this: ![enter image description here](http://i.stack.imgur.com/xnimY.png) The BibTex-entry:               @incollection{Agrawal.2008,      author = {Agrawal, Motilal and Konolige, Kurt and Blas, Morten Rufus},      title = {{C}en{S}ur{E}: {C}enter {S}urround {E}xtremas for {R}ealtime {F}eature {D}etection and {M}atching},      pages = {102--115},      volume = {5305},      publisher = {Springer},      isbn = {978-3-540-88692-1},      series = {Lecture Notes in Computer Science},      editor = {Forsyth, David and Torr, Philip and Zisserman, Andrew},      booktitle = {{C}omputer {V}ision -- {E}{C}{C}{V} 2008},      year = {2008},      address = {Berlin und Heidelberg},      doi = {10.1007/978-3-540-88693-8\_8}     }      What's my problem? The DOI is displayed twice. And I only want the last notation (DOI.10.1007 ...). I've tried the doi-package but this causes a lot of trouble with my tex-files. Could you please help me? I will try to give further informations. Minimal example:               \documentclass[a4paper,11pt]{scrreprt}     \usepackage[komastyle,automark]{scrpage2}     \usepackage[latin1]{inputenc}     \usepackage{graphicx}     \usepackage[a4paper,left=2.5cm,top=2.5cm,bottom=2.5cm,includeheadfoot,width=16cm]{geometry}     \bibliographystyle{alphadin2}     \usepackage[hyphens]{url}     \begin{document}          \chapter{TEST}     This is a test \cite{Agrawal.2008}.          \newpage     \addcontentsline{toc}{chapter}{Bib}     \bibliography{minimalbib} %Add the entry i this file     \end{document}


title: What do ExplSyntaxOn and ExplSyntaxOff do?

text: Related to the question What do \makeatletter and \makeatother do? for LaTeX2e, here related to LaTeX3 **What do`\ExplSyntaxOn` and `\ExplSyntaxOff` do?**


title: Static analysis of LaTeX documents?

text: For programming languages like `C`, `C++`, `C#`, `Java` and so on there always exist some kind of static analysers, tools that check the sourcecode for unreachable code, unused variables, memory leaks and other kind of stuff which is not relevant for compiling (and so the compilers don't report or notice it at all). **Are there similar tools for LaTeX?** Of course, there are some packages, like `onlyamsmath` or `nag` that check for outdated macros or packages, and `refcheck` that checks for unused labels. But are there packages and/or tools that check for or hint to   * unreachable code: `\if\else\fi` constructions where one or more paths can never be reached?   * inefficient loops, like `\foreach`'s that could be simplified?   * unused macro defintions?   * suggesting the use of `\newcommand*` instead of `\newcommand` where appropiate?   * suspicious lack of possible brackets or whitespaces? Like:      1. `a^b c` - clear     2. `a^{bc}` - clear     3. `a^bc` - suspicious: renders like 1. but maybe 2. was intended?   * suspicious empty lines (paragraphs)? For example between text and equation?   * suspicious or missing end line comments?   * whatever else you can think of that is very often wrong or inefficient or unclear to the human eye?


title: Listing with mixed english and russian symbols in comments

text: I'm using the `listings` package for formatting `.cpp` code in LaTeX. My code needs to have mixed English and Russian words in comments. The font must be monospaced (preffered `Courier` family).               /* Prints Hello World */        #include <stdio.h>        int main (void){            printf ("Hello World!"); // This is an english commentary            return 0; // А это русский комментарий         }      I`m using the following code as an example:               \documentclass{article}     \usepackage{fontspec}     \setmainfont{Times New Roman}     \setsansfont{Arial}     \setmonofont{Courier New}     \newfontfamily\cyrillicfont[Script=Cyrillic]{Times New Roman}     \newfontfamily\cyrillicfontsf[Script=Cyrillic]{Arial}     \newfontfamily\cyrillicfonttt[Script=Cyrillic]{Courier New}     \usepackage{polyglossia}     \setdefaultlanguage{russian}     \usepackage{listings}          \lstdefinestyle{CppCodeStyle}{     basicstyle=\footnotesize\ttfamily,     language={[ANSI]C++},     keywordstyle=\bfseries,     showstringspaces=false,     morekeywords={include, printf},     commentstyle={},     }          \begin{document}          \begin{lstlisting}[style={CppCodeStyle}]     /* Prints Hello World */     #include <stdio.h>     int main (void){         printf ("Hello World!"); // This is an english commentary         return 0; // А это русский комментарий     }     \end{lstlisting}          \end{document}      As I result XeLaTeX (in MiKTeX 2.9) produces following PDF:               /* Prints Hello World */        #include <stdio.h>        int main (void){            printf ("Hello World!"); // This is an english commentary            return 0; // Аэторусскийкомментарий         }      Sorry, I don't have enough reputation to post images `:(` As you can see, **all spaces in Russian are ignored**. How can I fix it?


title: Vertical parallel lines/arrows

text: How can I draw with `tikz-cd`   1. two vertical parallel lines    2. two vertical parallel lines pointing in opposite directions?


title: Tikz: Using standalone

text: The following program copied from Mindmap/trees in TikZ is compiling independently. * * *               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{mindmap}               \begin{document}     \begin{tikzpicture}[       mindmap,       every node/.style={concept, execute at begin node=\hskip0pt},       root concept/.append style={         concept color=black, fill=white, line width=1ex, text=black       },       text=white, grow cyclic,       level 1/.append style={level distance=4.5cm,sibling angle=90},       level 2/.append style={level distance=3cm,sibling angle=45}     ]          \node[root concept] {Computational Complexity} % root     child[concept color=red] { node {Computational Problems}     child { node {Problem Measures} }     child { node {Problem Aspects} }     child { node {Problem Domains} }     child { node {Key Problems} }     }     child[concept color=blue] { node {Computational Models}     child { node {Turing Machines} }     child { node {Random-Access Machines} }     child { node {Circuits} }     child { node {Binary Decision Diagrams} }     child { node {Oracle Machines} }     child { node {Programming in Logic} }     }     child[concept color=orange] { node  {Measuring Complexity}     child { node {Complexity Measures} }     child { node {Classifying Complexity} }     child { node {Comparing Complexity} }     child { node {Describing Complexity} }     }     child[concept color=green!50!black] { node {Solving Problems}     child { node {Exact Algorithms} }     child { node {Randomization} }     child { node {Fixed-Parameter Algorithms} }     child { node {Parallel Computation} }     child { node {Partial Solutions} }     child { node {Approximation} }     };     \end{tikzpicture}     \end{document}      * * * However, when I try to include this file in my main document using the following, I get an error.               \begin{figure}[h!]          \includestandalone[width=.8\textwidth]{figures/mindMapExample}          \end{figure}      The error says: `pgfkeys: I do not know the key '/tikz/mindmap' and I am going to ignore it. Perhaps you misspelled it. ]` How to resolve it?


title: ConTeXt center tabular

text: In ConTeXt, a tabular environment evidently does not behave a centered context. e.g.:               \startalignment[center]         \starttabular             \NC item one \NC item two \NC\NR             \NC item three \NC item four \NC\NR         \stoptabular     \stopalignment      will still result in the table being up against the left side of the page. One answer here advises using `\midaligned {}` around tables to center them, but this technique seems to throw an error when applied to tabulars. What's the correct way to center a tabular block?


title: Boolean operators: can I use AND, OR in `\ifthenelse`? How?

text: Can I use AND, OR in `\ifthenelse`? How, can you show me examples and documents? This would make my life easier.


title: Did the "Computer Modern" font families become a default because they're well tested and proven, or chance?

text: I'm deciding on the Font Families to use in LyX for a planned novel. Computer Modern is the default (Roman, Sans and Typewriter). I'm interested in the number of font faces and the versatility in styling of text. The number one priority is the ease of reading lots of text, and it not appearing unusual or odd. I don't want something "unique" looking, but rather something that the reader would never think twice about...because they're too busy reading to notice an artistic font. I hear about everyone having a personal favorite and recommending this or that, but never have heard once, "stick with Computer Modern font families" I can't find a reason to change the fonts from default. After looking over test prints, Computer Modern Roman seems excellent to my eye. I particularly like that there is a very noticeable and distinguishing contrast between regular and bold text. The italics is also noticeably different from a similarly curvy but more vertical font face that I think would be great to use with inset monologues and poetry sections, and there is a decent small caps face. If someone were to recommend another font, I'd hope its as versatile and readable. I haven't looked at the Computer Modern Italics or Computer Modern Typewriter font families, and so I don't have an opinion on them yet. MY QUESTION is simple: Did these font families become the default because they've withstood the test of time and no one has been able to argue that CM is inferior to another font family. Or, like so many other traditions, is it the default because it was the first, and no one ever bothered to change it to something that perhaps had the consensus of being an improvement. And so, understanding that this isn't a discussion forum, but limited to question and answers, please let me know if the Computer Modern font families have ever been lambasted for having defects, or for having a general consensus of being "unreadable" for novel length works.


title: pgfplots: Aligning multiple bars and marks horizontally along symbolic X-axis

text: I want to plot average values of some measure as bar charts with error bars and its maximal values as marks above the bars. I use two separate plots for that now. The problem is aligning marks with bars: right now all marks are positioned at the same symbolic-X position, whereas I want each mark to be above the corresponding bar (and have the same colour, but that's probably not that big a problem). Here's a not-so-minimal example:               \documentclass{report}     \usepackage{pgfplots}     \begin{document}     \begin{tikzpicture}         \begin{axis}[                 ybar,                 ymin=0, yticklabel style={/pgf/number format/fixed},                 symbolic x coords={0,1,2,3}, enlarge x limits=0.15,                 legend style={at={(0.5,-0.2)}, anchor=north, legend columns=-1},             ]                         \addplot+ [nodes near coords, point meta=explicit symbolic, error bars/.cd, y dir=both, y explicit]                 table[x index=0, y index=1, y error index=2, meta index=3] {     0   0.1 0.0040  0     1   0.0358  0.0017  224     2   0.0358  0.0017  224     3   0.0358  0.0017  224     };             \addplot+ [nodes near coords, point meta=explicit symbolic, error bars/.cd, y dir=both, y explicit]                 table[x index=0, y index=1, y error index=2, meta index=3] {     0   0.1 0.0041  0     1   0.0322  0.0016  224     2   0.0321  0.0014  252     3   0.0321  0.0014  266     };             \addplot+ [only marks] table[x index=0,y index=1] {     0   0.2     1   0.06     2   0.06     3   0.06     };             \addplot+ [only marks] table[x index=0,y index=1] {     0   0.15     1   0.04     2   0.04     3   0.04     };             \legend{P1,P2}         \end{axis}     \end{tikzpicture}     \end{document}


title: Beamer: show subitem at the same time as the item

text: In Beamer whenever you have               \begin{itemize}[<+->]     \item A     \begin{itemize}     \item a1     \item a2     \end{itemize}     \item B     \item C     \end{itemize}      subitem a1 appears after item A. What if I want that when A appears the first subitem also appear? Thank you


title: Creating .bib file containing only the cited references of a bigger .bib file

text: Normally, LaTeX will only create references for the BibTeX entries cited in the text. Is there a way of extracting these entries into a different `.bib` file automatically? For example if I have a `.bib` file with two entries, and only one is cited in a particular text, I need a way of creating a new `.bib` file with just that reference.


title: Table Limit: Sweave

text: I'm running into an issue. It seems that when I try to output more than 17 or 18 tables to a pdf document the remaining tables are ignored. When I split them across multiple Rnw files, there is no problem loading any of them. It's not returning any errors, nor does the output of the first 17 or 18 tables seem to be anything other than expected.   * Windows 7 Pro    * Miketex 2.29    * RStudio (Using CompilePdf())    * R Version 2.14.1 I'm using the following packages:               \documentclass[12pt]{report}     \usepackage[landscape]{geometry}          % PREAMBLE          \usepackage{wallpaper}     \usepackage[linktoc=Section]{hyperref}     \usepackage{fullpage}      Any ideas? Or things that I can double check?


title: Vertical alignment of TikZ within text

text: I have a bit of `TikZ` in my text, namely:               \documentclass[]{standalone}       \usepackage{tikz}       \begin{document}         Some text (\tikz{\node[scale=0.5,solid,draw,thick,blue,rectangle,fill=white] {A};}), and some more       \end{document}      This produces the blue rectangle as expected, but it is not aligned with the bottom of the parentheses, which I want. Is there a simple way to shift an object or even text within a line vertically, while keeping the rest? Or is there some workaround in `TikZ` that might be able to do so?


title: Errors using tikz-cd and TikZ

text: I was trying to install the tikz-cd package into my miktex in order to draw commutative diagram. However, I encountered the following error and I don't know how to solve it. The situation: ![enter image description here](http://i.stack.imgur.com/Zg7nM.png) In the bottom, it says               "! Undefined control sequence.     l.19 \usetikzlibrary                         {matrix}     ? "      Could anyone please help?


title: Multiple Dictums for a chapter

text: I would like to have more than one quote at the start of a chapter. I am using the `dictum` environment with `scrreprt`. If I do two back to back dictums, it simply ignores the first and proceeds with the second. Any solutions?


title: How can I make a beautiful form to input in latex?

text: I want to make a form, with multiple choice, or buttons or whatever... And I want that this form will give me an output that I can use in LaTex, but I don't know how make this. an output like: \newcommand{1st answer} \newcommand{2nd answer} \newcommand{3rd answer} Do you have some idea??? I don't want to do a form in latex, I want to do a form for people that don't understands LaTex input a database that gives some commands and fills some parts of a document in LaTex. Is this possible??


title: Matching Brackets in TeX output

text: Is there any ways or features to make pdf-files using one of TeX systems so that when I move the cursor to one of brackets (either open or closed brackets) in pdf, then the bracket and the other matching bracket are changed in its color, e.g., in red? For example (see below), I want in pdf document, when I put my cursor on the first squared bracket, then its color and the color of the matching square bracket (in this case, the last one) are turned into other color. When there is no matching bracket, then it would be changed in other color than that in matching case. (Ex) [(a + 3(b-c)) + 2*7]


title: Libertine + newtxmath gaps in big brackets

text: I have a problem when combining Libertine with newtxmath. When using large brackets in equations the brackets have strange gaps. ![enter image description here](http://i.stack.imgur.com/SKrBZ.png)               \documentclass[fontsize=12pt,DIV=12,oneside,a4paper]{scrreprt}         \usepackage[ngerman]{babel}                      \usepackage[ansinew]{inputenc}               \usepackage[oldstyle]{libertine}              \makeatletter         \renewcommand*\libertine@figurestyle{LF}         \makeatother         \usepackage[libertine]{newtxmath}         \makeatletter         \renewcommand*\libertine@figurestyle{OsF}         \makeatother              \usepackage{amsmath,amssymb}                                         \begin{document}              \begin{equation}         \gamma_{1,i}=\dfrac{\left[\dfrac{1}{K\sum\limits_{j=1}^{N_s}R_{ij}}\sum\limits_{j=1}^{N_s}\sum\limits_{n=(j-1)K}^{jK-1}r_1^2[n]R_{ij}\right]-\left[\dfrac{1}{K\sum\limits_{j=1}^{N_s}|R_{ij}-1|}\sum\limits_{j=1}^{N_s}\sum\limits_{n=(j-1)K}^{jK-1}r_1^2[n]|R_{ij}-1|\right]}{\dfrac{1}{K\sum\limits_{j=1}^{N_s}|R_{ij}-1|}\sum\limits_{j=1}^{N_s}\sum\limits_{n=(j-1)K}^{jK-1}r_1^2[n]|R_{ij}-1|}         \end{equation}              \end{document}      ![enter image description here](http://i.stack.imgur.com/MDnCD.png) The gaps do show up on print, albeit not as visible as on screen, so it's not just a viewer issue. Is there any fix for this?


title: Problems with paragraphs in margins

text: I am writing some papers for my class, and want to number the tasks with two or three levels. The first level should be a simple number like 1), while the next level should be labeled by numbers. Looking at this question How can I number paragraphs (and sections) in the margin? it almost answers what I need. I tried changing the numeration myself, but ran into some difficulties. ![enter image description here](http://i.stack.imgur.com/W2l1K.png) As one can see the first subparagraph is skipped and is replaced with a ). I do not know if my code is the best, and if anyone have a better way to obtain a similar output I would be glad to hear it. I find it a tad strange mixing \section and \subsection levels with the \paragraph ones.               \documentclass[10pt,a4paper]{article}     \usepackage{amssymb,mathtools}      % Matematikk.     \usepackage{enumitem}                        % Mer muligheter for lister     \usepackage{titlesec}     \usepackage{etoolbox}          \setcounter{secnumdepth}{5}     \renewcommand\thesection{\bfseries\small\arabic{section})}          % this length controls tha hanging indent for titles     % change the value according to your needs     \newlength\titleindent     \setlength\titleindent{1cm}          \pretocmd{\paragraph}{\stepcounter{subsection}}{}{}     \pretocmd{\subparagraph}{\stepcounter{subsubsection}}{}{}          \newcounter{problem}[section]     \setcounter{problem}{1}          \renewcommand{\theproblem}{\bfseries\small\alph{problem})}          \titleformat{\paragraph}[runin]       {\normalfont\large}{\llap{\parbox{\titleindent}{\thesection\hfill}}\stepcounter{section}}{0em}{}          \titleformat{\subparagraph}[runin]     {\normalfont\large}{\llap{\parbox{\titleindent}{\theproblem\hfill}}\stepcounter{problem}}{0em}{}          \titlespacing*{\paragraph}{0pt}{3.25ex plus 1ex minus .2ex}{0em}     \titlespacing*{\subparagraph}{0pt}{3.25ex plus 1ex minus .2ex}{0em}          \setcounter{section}{1}          \begin{document}          \paragraph{}     Given an element $x$, $x_v$ is its value and $x_s$ its unit.      Let the set $D$ be a standard deck of $52$ cards.           \subparagraph{}      Find the cardinality of the following sets:     \begin{enumerate}[leftmargin=*]     \item $S = \left\{ x \in D \mid x_s = \text{spades} \right\}$     \item $B = \left\{ \text{the set of court cards in } D \right\}$     \item $S \cap B$     \item $S \cup B$     \item $S\,\backslash\,B$     \item $S \times B$     \item $\left\{ (x,y) \in D \times D \mid x = y \right\}$     \end{enumerate}          \subparagraph{}      Fill in the correct symbol $\in,\,\subseteq\,\, \nsubseteq$          \begin{enumerate}[leftmargin=*]     \item ace of hearts     \item ace of hearts     \item S D     \item S B     \end{enumerate}          \subparagraph{Fee fuu foo}          \end{document}


title: Problem between unicode-math and babel option frenchb in LuaLaTeX

text: I've got a strange problem in LuaLaTeX with both `babel`, option `frenchb`, and `unicode-math`. My TeX Distribution is TeX Live 2013 (installed with MacTeX on a OS X.8.5 system). If I run the following program:               \documentclass{minimal}     \usepackage{unicode-math}         \setmathfont{XITS Math} % or any other math font     \usepackage[frenchb]{babel}     \begin{document}         \relax     \end{document}      I obtain this error message:               (/usr/local/texlive/2013/texmf-dist/tex/luatex/hyph-utf8/luatex-hyphen.lua)))     ! Extended mathchar used as mathchar (6300214).     <to be read again>      =     l.244   \initiate@active@char{:}                               %     ? h     A mathchar number must be between 0 and "8000.     I changed this one to zero.     ?       However, it works flawlessly either if I use XeLaTeX, or if I don't use the `\setmathfont` command, or if I load `babel` option `frenchb` _before_ `unicode-math`:               \documentclass{minimal}     \usepackage[frenchb]{babel}     \usepackage{unicode-math}         \setmathfont{XITS Math} % or any other math font     \begin{document}         \relax     \end{document}      Any idea of what is going wrong?


title: Putting Figures Side-By-Side Using Minipage

text: I am trying to put two figures next to each other. However, it is not working. Here is my code:               \begin{figure}[h]     \centering          \begin{minipage}{1.0\textwidth}     \centering     \includegraphics[width=0.3\linewidth, height=0.15\textheight]{prob1_6_2}     \caption{$dt=0.1$}     \label{fig:prob1_6_2}     \end{minipage}          \begin{minipage}{1.0\textwidth}     \centering     \includegraphics[width=0.3\linewidth, height=0.15\textheight]{prob1_6_1}     \caption{$dt =$}     \label{fig:prob1_6_1}     \end{minipage}          \end{figure}      In my preamble I have `\usepackage{minipage}`. But it hasn't worked. And yes, I have searched through other posts.


title: typesetting column vector

text: I would like to define a command which typesets a column vector. For one vector I can have something like:               \left(     \begin{array}{c}     a\\     b\\     \end{array}     \right)      I would like the command to produce such a vector, for either 2 or 3 arguments. `\colvec{a}{b}{c}` should produce the same vector as above only with one more entry where `\colvec{a}{b}` will produce the above vector. How should I do it? I tried to overload a command name but that's impossible.


title: Four panel, image with borders

text: I am trying to make a landscape PDF with borders (4) where I will place 4 figures. Ideally the line would be 3 point in width...I have attached a JPG of what I am thinking. I would like to place figures in the areas a-d. ![enter image description here](http://i.stack.imgur.com/BvN3k.png) Can someone give me a starting point?


title: Cite video using BibTeX in BibDesk

text: I am having trouble citing a video in BibDesk. It doesn't have a field for Producer. The desired output format is apa6. example APA format: American Psychological Association. (Producer). (2000). Responding therapeutically to patient expressions of sexual attraction [DVD]. Available from http://www.apa.org/videos/ I'm writing a paper in LaTeX and using apacite. How would I create that entry? Thanks, Dan * * *               @misc{ex65-3,       author    = {{\bibcorporate{American Psychological Association (Producer)}}},       firstkey  = {{American Psychological Association [APA]}},       key       = {{APA}},       year      = {2000},       title     = {Responding Therapeutically to Patient Expressions of                Sexual Attraction: A Stimulus Training Tape},       type      = {Motion picture},       note      = {Available from the American Psychological Association,                750 First Street, NE, Washington, DC 20002-4242},     }


title: Highlight table cells using thick, colored border

text: I'd like to highlight certain cells of my table. In particular, I'd like to set the border of these sells colored and thick. These cells should also have a background color. Here's a minimal example of my table:               \documentclass{article}     \usepackage{array,colortbl,xcolor}          \begin{document}           \begin{tabular}{p{1.4cm}p{2.55cm}p{2.55cm}p{2.55cm}p{2.55cm}}     \hline     \multicolumn{1}{c}{} & \multicolumn{2}{c}{\textbf{Football}} & \multicolumn{2}{c}{\textbf{Basketball}} \\\hline     \multicolumn{1}{c}{} & \multicolumn{1}{c}{\textbf{1. League}} & \multicolumn{1}{c}{\textbf{2. League}} & \multicolumn{1}{c}{\textbf{1. League}} & \multicolumn{1}{c}{\textbf{2. League}} \\ \hline     \textbf{Average} & 10000000000 & \cellcolor{lightgray}20000000000 & 30000000000 & 40000000000\\ \hline     \textbf{Total} & 50000000000 & 60000000000 & 70000000000 & \cellcolor{lightgray}80000000000\\ \hline          \end{tabular}     \end{document}      I tried to set the border of specific cells using a combination of multicolumn and hhline but failed miserably :-( (One of the problems was that the cell background partially covers the border). I also tried tikz but failed to paint exactly on the cell's border, especially when a linebreak occurs. Here's how it should look optimally: ![enter image description here](http://i.stack.imgur.com/dPgFR.png) Can someone please help me to get this working?


title: Shadow blocks in Beamer

text: Some beamer themes such as Berlin, Warsaw use shadow environment for theorems, definitions, proofs. How can I get rid of it and have the same look as in CambridgeUS for example?


title: Skip given vertical space accross pages if needed

text: I would like to leave a vertical space of a given length, say 10cm, in my tex document. In fact, I want to leave enough space in a proof environment for the proof to be written at hand once the document is printed... I tried `\vspace` and its starred version but the space does not span across pages when there is not enough space remaining. Is there a way to leave exactly 10cm vertical space?


title: Input figures from sub-folders

text: I'm writing a big thesis using latex and I'm trying to keep organised. **File-tree:** > ../Thesis/mainfile.tex > > ../Thesis/Section1/section1.tex > > ../Thesis/Figures/figure1.png > > ../Thesis/Figures/figure1.tex _ > **mainfile.tex**               \documentclass{article}%     \begin{document}     \input{Section1/section1.tex}     \end{document}      > **section1.tex** :               \input{Figures/figure1.tex}     \input{../Figures/figure1.tex}     \input{../../Figures/figure1.tex}      Tried these lines. None of them work. > **figure1.tex**               \begin{figure}     \centering     \includegraphics[width=0.3\linewidth]{../Figures/figure1.png}     \caption{This is Figure 1}     \label{fig:figure1}     \end{figure}      The problem is how I call for the 'figure1.tex' from 'section1.tex'. I'm trying to input file one directory up and in another subfolder. I keep getting this message. File `../Figures/figure1.tex' not found. \input{../Figures/figure1.tex}


title: Sorting swedish index with makeidx correctly

text: I have a problem getting makeidx sort the special characters of the swedish alphabet, å,ä and ö. They are supposed to be the last three positions, but they appear in the index before "A". How can makeidx behaviour be changed to the correct sorting?


title: Where does MacTeX store fonts in texmf?

text: Where does MacTeX store fonts in texmf? Specifically, I want to know where it stores XITS and whether or not I have to add it to the fonts list to use XITS with XeTeX.


title: Problem with preview package (and standalone class) with tikz

text: I updated MacTeX recently with TeX Live Manager and I installed the last `tikz/pgf` CVS (02/12/2011) and I got a problem with the `standalone` class. The size of the picture seems fine but nothing is drawn. I don't know if it's possible to find a workaround. I compiled the next code with `latex` no problem with `pdflatex`.               \documentclass{article}     \usepackage{tikz}      \usepackage[active,tightpage]{preview}     \PreviewEnvironment{tikzpicture}            \begin{document}     \begin{tikzpicture}         \draw[fill] (0,0)rectangle(5,5);      \end{tikzpicture}     \end{document}        or with               \documentclass{standalone}     \usepackage{tikz}     \begin{document}      \begin{tikzpicture}     \draw[fill] (0,0)rectangle(5,5);       \end{tikzpicture}        % or  \tikz \draw[fill] (0,0) rectangle (5,5);       % or  \tikz{\draw[fill] (0,0) rectangle (5,5)} % with pgf 2.10 cvs     \end{document}      The log file gives : > This is dvips(k) 5.991 Copyright 2011 Radical Eye Software > (www.radicaleye.com) ' TeX output 2011.12.12:0630' -> standalone.ps . 1 > Error: /undefined in pgfo Operand stack: Execution stack: %interp_exit > .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push > --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1894 1 > 3 %oparray_pop 1893 1 3 %oparray_pop 1877 1 3 %oparray_pop 1771 1 3 > %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- > --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- Dictionary > stack: --dict:1154/1684(ro)(G)-- --dict:0/20(G)-- --dict:81/200(L)-- > --dict:100/300(L)-- Current allocation mode is local Last OS error: 2 > Current file position is 9241 GPL Ghostscript 9.02: Unrecoverable error, > exit code 1 If you want the `tikz/pgf` CVS package with pgfmanual_cvs.pdf, you can find it here.


title: Error "Dimension too large" (\@tempdima) when using HTML color 097054 with beamer's \setbeamercovered{transparent} option

text: The code               \documentclass{beamer}     \mode<presentation>{\setbeamercovered{transparent}}     \begin{document}       \begin{frame}         \onslide<2>{\textcolor[HTML]{097054}{foo}}       \end{frame}     \end{document}      results in the error `! Dimension too large`: `\@tempdima`. Is there a known/simple fix for this?


title: How would I recursively add the document source code to an appendix?

text: For kicks, I would like to include the source code as an appendix. It's rather superfluous, yes, but it's puzzling. I commonly have documents that are structured thusly:               main.tex     includes: part_1.tex               includes: subsection_a.tex               includes: subsection_b.tex               .... etc     includes: part_2.tex     .... etc ....     includes: appendix.tex      I'd like to programatically traverse my document (as a whole), and extract the source code for everything except code listings, then include this extracted source-code as a code listing in the appendix. Does anyone have an idea on where to start?


title: Dissertation: How to customize *.bst?

text: I am almost finished with my PhD thesis (of course in TeX) :) I was looking for hours for a nice bib style which fits the requirements of the Prof, then I looked into the `*.bst` which rather confused me. Unfortunately, I was not able to generate a bibliography, got me alot of errors. Anyway, the closest `*.bst` is `cj.bst`, but the YEAR should be in between the VOLUME and PAGES. Here is an example how it should look like: > Wester, H.J.; Herz, M.; Weber, W.; Heiss, P. Synthesis and radiopharmacology > of O-(2- [18F]fluoroethyl)-L-tyrosine for tumor imaging. _J Nucl Med_ **40** > (1999) 205–212. I really hope you can help me!


title: chemfig chemname alignment in schemes

text: After careful consultation of the chemfig documentation and looking up a couple of questions here, I am struggling to find a solution to get these![alignment problems in a scheme with different height molecules](http://i.stack.imgur.com/xPrYV.png) correctly aligned. They are inside a box which is inside a figure float, 80% textwidth wide and positioned in the middle via hfills. My reason for using the scheme-scheme so far is, that aligning the bodys works like a charm, but as it seems, chemname doesn't align correctly anymore. You find the code here:               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[ngerman]{babel}          \usepackage{chemfig}          \usepackage{lipsum}% dummy text     \begin{document}          \lipsum[1]          \begin{figure}[!tph]     \hfill{}%     \begin{minipage}[t]{0.9\textwidth}%     \begin{center}     \schemestart     \chemnameinit{\definesubmol{R1}{-R_1}\definesubmol{R2}{-R_2}\definesubmol{R3}{-[,0.5]R_3}\chemfig{([:-18]N*5((!{R1})-(!{R3})=\chemabove{N}{\quad\scriptstyle\oplus}([:342]!{R2})-=-))}}     \definesubmol{R1}{-R_1} \definesubmol{R2}{-R_2} \definesubmol{R3}{-[,0.5]R_3} \chemname{\chemfig{([:-18]N*5((!{R1})-(!{R3})=\chemabove{N}{\quad\scriptstyle\oplus}([:342]!{R2})-=-))}}{Imidazolium}     \arrow{0}     \chemname{\chemfig{[:60]\chemabove{N}{\oplus}*6((([:342]-R_1)([:198]-R_2))------)}}{Piperidinium}     \arrow{0}     \definesubmol{R1}{R_1}     \chemname{\chemfig{[:54]\chemabove{N}{\oplus}*5((([:198]-!{R1})([:342]-R_2))-----)}}{Pyrrolidinium}     \schemestop     \chemnameinit{}     \par\end{center}%     \end{minipage}\hfill{}          \protect\caption{Gängige Kationen ionischer Flüssigkeiten.}               \end{figure}          \end{document}      Other questions related but which didn't enable me to solve the problem:   * chemfig chemname alignment   * Chemfig - Name some compounds under a single label Would be very glad if someone knows a solution. Update 13.08.14: Updated with a MWE.


title: How to properly draw a table using tabular

text: How to draw a table using tabular               \documentclass{beamer}     \begin{document}     \begin{frame}{Cs}     \centering     \begin{table}     \centering     \caption{C}     \begin{tabular}{|l|l|}     \hline     u & i\\     \hline     ~58Ko & ~1Mo.\\     \hline     DqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsd. & FDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsdDqsdqsdqsdqsd.     \end{tabular}     \end{table}     \end{frame}     \end{document}      Using this I get a large table which overflow the frame. How to fix this, please?


title: Compiling issues

text: I made my a latex file on Kile in Ubuntu. The script that I used was               \documentclass{article}          \title{Hello, Cruel World!}     \author{Obedient Grad Student}          \begin{document}     \maketitle          \section{Introduction}     This is where you tell people why they should bother reading your article.          \section{Literature Review}     This is the section that is invariably much longer than it should be, and     where everyone tries to impress peers about how easy it is to locate various     references in online databases.          \section{Conclusion}     Not much of a paper, but it's a start.          \end{document}      The first problem is that the title and the text start on the same line. The title and the author are on the same line. Secondly the documentclass is getting pinted i.e. the article starts with the word article! Hope someone can help.


title: How to change horizontal spacing before section number

text: How do i change the small horizontal spacing that is present before a section number? I have used the command `\titlespacing` from package `titlesec` to set the left spacing to 0, but it is still present. Small example               \documentclass[12pt,a4paper,titlepage]{article}     \usepackage{titlesec}     \titleformat{\section}[display]{\normalfont \bfseries}{\hspace{0mm} \thesection}{1em}{}     \titlespacing{\section}{0pt}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex}     \begin{document}     \section{Section title}          Lorem ispum dolor sit amet Lorem ispum dolor sit amet Lorem ispum dolor sit amet Lorem ispum dolor sit amet Lorem ispum dolor sit amet Lorem ispum dolor sit amet Lorem ispum dolor sit amet Lorem ispum dolor sit amet           \end{document}      If you look at the output, "Section title" is aligned to the second line of text perfectly, whereas the section number "1" is slightly moved to the right.


title: Is there a reliable footnote command?

text: The command `\footnote` is really annoying me. I have to use hacks to use it in section headings, epigraphs, tables, minipages and whatnot. Can it be fixed? Has someone already implemented a footnote command that Just Works™?


title: How can I determine the size of an array?

text: After a long search period, I was not able to figure out how to determine and use the `len` of an array like this:               \def\mar{ 1,2 }     \path let \p1=($(rec.west)-(rec.east)$),                   \p2=($(rec.north)-(rec.south)$),                   \p3=($len{\mar}$),                   \n1 = {veclen(\p1)*0.16}                  %width                   ,\n2 = {veclen(\p2)/\p3}                    %height                   in node[mynode,                           minimum width=\n1                           ,minimum height=\n2                           ,anchor=north west                           ] at (rec.north west) {foobar                           };


title: Escaping special LaTeX characters in user-defined input text

text: # Background Users can provide text, which is transformed using XSL into a LaTeX document. The XSL template that transforms the XML document (containing user-defined text) currently resembles:               <xsl:template match="user-text">       <xsl:text>  \item </xsl:text>       <xsl:apply-templates />     </xsl:template>      This is then transformed into:               \item This is the text the user provided.      # Problem This allows the user to submit maliciously crafted LaTeX:               \item This is the \{latex} the user provided.      # Ideas Some ideas:   * `\begin{verbatim}` and `\end{verbatim}` cause the text to appear without formatting (i.e., a monospace font).   * Write an XSLT function that escapes the special characters. # Question What is the simplest way to ensure user-defined text does not get interpreted as LaTeX code? Something like `\begin{verbatim}` would be perfect if it didn't change the font, and prevent text from wrapping. # Related   * http://stackoverflow.com/questions/2627135/how-do-i-sanitize-latex-input/2627303#2627303   * calling latex from php: security issues


title: pgfplots: wrong domain, wrong axis, uncentered graph... is it a bug?

text: ## Question I get a very strange graph with `pgfplots`, see the picture below. What is going wrong? ## Code and picture               \documentclass{article}     \usepackage{pgfplots}     \begin{document}          \begin{tikzpicture}     \begin{axis}[     axis x line = middle,      axis y line = middle,      xmin = -1,      xmax = 1,       grid = major,      clip = false]     \addplot[color=orange, smooth, ultra thick] {sin(deg(x))} node[right] {$\sin$};     \end{axis}     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/6St40.png)


title: Latex tag for making a comment appear or disappear in pdf?

text: Is it possible to tag sections of your .tex file so that you can make text appear or not? I have a long document and would like to be able to comment a certain section in each chapter, and produce two different pdfs, one with the comments, and one without. I read about the `\begin{comment}` tag in the `verbatim` package. Is it possible to make this appear if I redefined the comment tag? How is this done? (On suggestion, migrated this question from StackOverflow: http://stackoverflow.com/questions/3696128/latex-tag-for-making-a-comment- appear-or-disappear-in-pdf)


title: included graphics is placed over the section

text: I have one section and below it i have this code. That image is placed over the print of section text, what is that? How can i place it under it? I am using package graphicx.               \documentclass[11pt, a4paper]{article}          \usepackage[left=2.0cm, text={17cm, 24cm}, top=3.0cm]{geometry}     \usepackage[utf8]{inputenc}     \usepackage[IL2]{fontenc}     \usepackage[czech]{babel}     \usepackage{times}     \usepackage{amsmath}     \usepackage{amsthm}     \usepackage{amsfonts}     \usepackage{multirow}     \usepackage{graphicx}     \usepackage{float}          \begin{document}          \section{A}     ...some text...          \begin{figure}[H]     \centering     \scalebox{0.3}{\includegraphics[viewport=0 0 1 1]{etiopan.eps}     \reflectbox{\includegraphics[viewport=0 0 1 1]{etiopan.eps}}     }     \end{figure}     \end{document}      EDIT: the problem is causing that viewport settings, but if i am not using it, that reflected images are not each next to other, but one is anchored on left side of page and one on right side.


title: How to modify columns/column environments so they resize automatically to the largest column ?

text: This question was originally a duplicate of How can I add vertical space to a beamercolorbox to make it align with another one?. The response to that question was to add a vertical space according to the largest column, as Seamus explains in the comments. I would like, however, to do this in an automatic way. I rephrase my question. First, here is the original question, which I leave with minor modifications so that the motivation remains clear. Then, I will analyze and explain the new, rephrased question. * * * **Original question** When using the `columns` environment in beamer, I sometimes find myself with these situation: two columns with some contents (like a `block`) whose height are different. The result is that each element appears with its height: I think that if both columns had the same height (the max of all columns), the presentation would be more elegant (at least with the presentation that I am currently creating). Normally I add some `\vspace` with a length determined by trial-and-error. Needless to say, this is an annoying process. I would like to force the contents of a `column` to have the same height as the largest column. The example above was generated by this code:               \documentclass{beamer}          \usetheme{Darmstadt}     \usefonttheme[onlylarge]{structurebold}     \setbeamerfont*{frametitle}{size=\normalsize,series=\bfseries}     \setbeamertemplate{navigation symbols}{}               \begin{document}          \begin{frame}{A frame}       \begin{columns}[T]         \begin{column}{0.5\linewidth}           \begin{block}{A block}             Hello           \end{block}         \end{column}         \begin{column}{0.5\linewidth}           \begin{block}{Another block}             This one has a larger height since it has an itemize             \begin{itemize}             \item item a             \item item b             \end{itemize}           \end{block}         \end{column}       \end{columns}     \end{frame}          \end{document}      * * * **New question** I have examined `beamerbaserequires.sty` looking for the definition of the `columns` and `column` environment. In order to resize each column, I think it is necessary to rewrite part of the code, since a `column` is implemented as a `minipage` without a height parameter. My new question is, as the title says, **How to modify`columns/column` environments so they resize automatically to the largest column ?** My first thoughts on how to achieve this are the following:   1. Resizing each `column` to the largest one may not be possible with one pass. It is only when the `columns` environment is closed that we could know the correct size and at that time it is too late to modify each column.   2. At the code that "closes" a `column` could add a vertical space equal to the size of the largest `column` so far.   3. The size of the largest column could be written and read from the aux file or some other temporal file, so that, in a second pass, all columns are resized correctly. These guidelines are probably incorrect, implausible or too difficult to implement, since I have nearly no experience coding in TeX/LaTeX. Any comments regarding these ideas are welcome as well. PS. I hesitate whether this question has become too specific (or even too broad), or if it should become a community wiki...


title: Diagonal cell division with tikz figure on same row and into `X` column from longtabu

text: MWE (with full package list)               \documentclass[english, bibliography=totoc]{scrreprt}          %%% PAGE DIMENSIONS     \usepackage{geometry}      \geometry{verbose,a4paper,tmargin=3.5cm,bmargin=2.5cm,lmargin=2.6cm,rmargin=2.6cm,headheight=1.3cm,headsep=1cm}     \pagestyle{headings}          %%% PACKAGES     \usepackage{array} % for better arrays (eg matrices) in maths     \usepackage{paralist} % very flexible & customisable lists (eg. enumerate/itemize, etc.)     \usepackage{verbatim} % adds environment for commenting out blocks of text & for better verbatim     \usepackage{subfig} % make it possible to include more than one captioned figure/table in a single float     \usepackage{amsmath, amsthm, amssymb, url}     \usepackage{enumitem}     \usepackage{mathrsfs}     \usepackage[english]{babel}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \usepackage{tabu,longtable,booktabs,caption}     \usepackage[pdftex]{graphicx,color}     \usepackage{scrpage2,datetime,tikz}     \usepackage[unicode=true]{hyperref}     \usepackage[numbered]{bookmark}     \usepackage{makecell}          %%% OPTIONS     \bibliographystyle{plain}     \setcounter{secnumdepth}{3}     \setlength{\parindent}{1em}     %\setlist{nolistsep}     \tabulinesep=^1.5mm_1.5mm     \tikzset{>=latex}     \hypersetup{         colorlinks,         citecolor=black,         filecolor=black,         linkcolor=black,         urlcolor=black     }          %%% DEFINITIONS     \newenvironment{myfont}{\fontfamily{phv}\selectfont}{\par}     \renewcommand{\dateseparator}{.}     \DeclareMathOperator{\sgn}{sgn}     \DeclareMathOperator{\Wrap}{Wrap}          \begin{document}          {\centering     \begin{longtabu} to \linewidth {|[1.5pt] X[1,m,c] |[1.5pt] >{\centering\arraybackslash}m{5cm} |[1.5pt] >{\centering\arraybackslash}m{5cm} |[1.5pt]}     \tabucline[1.5pt]{-}  \endhead          \tabucline[1.5pt]{-} \multicolumn{3}{|[1.5pt]c|[1.5pt]}{{Continued on next page}} \\ \tabucline[1.5pt]{-} \endfoot          \endlastfoot          \diaghead{\hskip\hsize}{Relative Distance}{Turn Direction}     & \begin{tikzpicture} \draw [->] (0,0) arc [radius=0.5, start angle=180, end angle= -90]; \draw [->] (2,0) arc [radius=0.5, start angle=180, end angle= -90];   \end{tikzpicture}     & \begin{tikzpicture} \draw [->] (0,0) arc [radius=0.5, start angle=180, end angle= -90]; \draw [->] (2.5,-0.5) arc [radius=0.5, start angle=-90, end angle= 180];   \end{tikzpicture} \\ \tabucline[1.5pt]{-}          & & \\ \tabucline[1.5pt]{-}          \end{longtabu}}          \end{document}      I end up having: ![enter image description here](http://i.stack.imgur.com/Pwfqa.png) My problems with it are:   * the diagonal line is too thin   * the diagonal line does not touch the corners of the cell Anyone has suggestions on how to achieve what I would like? I already checked here and that's how I found the `makecell` package and `\diaghead`, but with poor results, as you can see.


title: Use MiKTeX option through latexmk

text: When I use MiKTeX normally, I call this:               pdflatex --aux-directory="C:\Users\doncherry\Documents\LaTeX\AUXI_global" foo.tex For latexmk outputting pdf (via pdfLaTeX) with continuous previewing, my attempt is               latexmk -pvc -pdf foo with a file in the same directory called `latexmkrc` (see p. 9 of the manual), containing               $pdflatex = 'pdflatex --aux-directory="C:\Users\doncherry\Documents\LaTeX\AUXI_global" %O %S';     $pdf_previewer = 'start "C:\Program Files (x86)\SumatraPDF\SumatraPDF.exe" %O %S'; This doesn't work, latexmk just runs `pdflatex` once and the table of contents isn't generated. Latexmk produces the error message:               Latexmk: Errors, so I did not complete making targets     Latexmk: (Pdf)LaTeX failed to generate a log file How can I use the `\--aux-directory` option through latexmk?


title: How to center blocks and columns in beamer

text: On a slide with two blocks aligned using columns, the spacing on the left and the right is not equal, ie the pair of columns in not centered on the page as in this example. I've tried enclosing the columns in `\begin{centering}` but that doesn't seem to work. How can I make the pair of columns centered?               % Preview source code          %% LyX 2.0.3 created this file.  For more info, see http://www.lyx.org/.     %% Do not edit unless you really know what you are doing.     \documentclass[english]{beamer}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \setcounter{secnumdepth}{3}     \setcounter{tocdepth}{3}          \makeatletter     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.      % this default might be overridden by plain title style      \newcommand\makebeamertitle{\frame{\maketitle}}%      \AtBeginDocument{        \let\origtableofcontents=\tableofcontents        \def\tableofcontents{\@ifnextchar[{\origtableofcontents}{\gobbletableofcontents}}        \def\gobbletableofcontents#1{\origtableofcontents}      }      \long\def\lyxframe#1{\@lyxframe#1\@lyxframestop}%      \def\@lyxframe{\@ifnextchar<{\@@lyxframe}{\@@lyxframe<*>}}%      \def\@@lyxframe<#1>{\@ifnextchar[{\@@@lyxframe<#1>}{\@@@lyxframe<#1>[]}}      \def\@@@lyxframe<#1>[{\@ifnextchar<{\@@@@@lyxframe<#1>[}{\@@@@lyxframe<#1>[<*>][}}      \def\@@@@@lyxframe<#1>[#2]{\@ifnextchar[{\@@@@lyxframe<#1>[#2]}{\@@@@lyxframe<#1>[#2][]}}      \long\def\@@@@lyxframe<#1>[#2][#3]#4\@lyxframestop#5\lyxframeend{%        \frame<#1>[#2][#3]{\frametitle{#4}#5}}      \newenvironment{topcolumns}{\begin{columns}[t]}{\end{columns}}      \def\lyxframeend{} % In case there is a superfluous frame end          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.      \setbeamertemplate{blocks}[shadow=false]     \beamertemplatenavigationsymbolsempty     \usecolortheme{rose}     \useinnertheme{circles}          \makeatother          \usepackage{babel}     \begin{document}          \lyxframeend{}\lyxframe{My slide}     \begin{center}     \begin{topcolumns}%{}     \noindent           \column{0.5\textwidth}     \begin{exampleblock}     {A short list\inputencoding{latin1}{\phantom{g}}\inputencoding{latin9}}     \begin{itemize}     \item Item 1     \item Item 2     \item Item 3     \end{itemize}     \end{exampleblock}          \column{0.5\textwidth}     \begin{exampleblock}     {A long list}     \begin{itemize}     \item Item 1     \item Item 2     \item Item 3     \item Item 4     \item Item 5     \item Item 6     \end{itemize}     \end{exampleblock}     \end{topcolumns}%{}     \end{center}     \lyxframeend{}     \end{document}      ![Image of the compiled LaTeX document](http://i.stack.imgur.com/ky6oX.png)


title: Digital signature

text: I have recently been asked to add a digital signature to a report (which I wrote using pdflatex). Is there such a mechanism in the TeX/LaTeX world or am I better of using external software to verify the validity of the report. I don't necessarily want to password protect the document...or prevent people from copying the text as they commissioned the report! This may not be limited to TeX so my apologies if in the wrong forum...


title: symmetric matrices

text: what are your solutions to properly place the shortcut 'sym' in symmetric matrices? Thank you               \documentclass{book}     \usepackage{amsmath}     \begin{document}     \begin{equation}     \begin{bmatrix}u,_1+x_3\theta_2,_1-x_2\theta_3,_1&\frac{1}{2}(v,_1-x_3     \theta_1,_1-\theta_3) & \frac{1}{2}(w,_1+x_2\theta_1,_1+\theta_2)\\     \text{Sym.} & {0} & {0} \\ {} & {} & {0}      \end{bmatrix}     \end{equation}     \end{document}      [text edited for a more complex configuration]


title: How does one generate a side pane of contents in pdf using Latex?

text: Like the way it is mentioned here: http://www.latex- community.org/forum/viewtopic.php?f=5&t=7400 It says use hrref package but doesn't give no straight example. Can you please help?


I'm getting this error message in a document, which contains three tables. > Error: Missing } inserted. \end{center} (followed by: ) I have no idea why, I reviewed it like ten times, but might overvlook something. Have a look at my code:               \documentclass[a4paper]{article}          \usepackage[german]{babel}     \usepackage[utf8]{inputenc}     \usepackage[margin={2cm,2cm}]{geometry}     \usepackage{color, colortbl}          \title{Addendum \\ Beispieldatenbanken}     \author{}     \date{}          \definecolor{Gray}{gray}{0.9}          \begin{document}          \setlength{\parindent}{0pt}     \maketitle          \section{Kunden}         \begin{center}             \tiny             \bgroup             \def\arraystretch{1.5}             \begin{tabular}{|l|l|l|l|l|}                 \hline                 \rowcolor{Gray}                 KNr & Name & Stadt & Saldo & Rabatt \\                  \hline                 1 & Legrand & Genf & -1080,00 & 0.10 \\                 \hline                 2 & Mart & Basel & -800,00 & 0.20 \\                 \hline                 3 & Frei & Basel & 0,00 & 0.10 \\                 \hline                 4 & Janvier & Genf & 0,00 & 0.10 \\                 \hline                 5 & Rosi & Lugano & 0,00 & 0.05 \\                 \hline                 6 & Meier & Z"urich & -3800,00 & 0.05 \\                 \hline             \end{tabular}         \end{center}          \section{Produkte}              \begin{center}             \tiny             \bgroup             \def\arraystretch{1.5}             \begin{tabular}{|l|l|l|l|l|l|}                 \hline                 \rowcolor{Gray}                 Pnr & Bez & Gewicht & Preis & Lagerort & Vorrat \\                  \hline                 1 & Papier & 2000 & 20.00 & Basel & 10000 \\                 \hline                 2 & Platte & 1000 & 2500.00 & Z"urich & 400 \\                 \hline                 3 & Drucker & 5000 & 2000.00 & Genf & 200 \\                 \hline                 4 & Bildschirm & 5000 & 3000.00 & Genf & 80 \\                 \hline                 5 & CDs & 0.500 & 20.00 & Basel & 5000 \\                 \hline                 6 & Maus & 0.250 & 100.00 & Basel & 200 \\                 \hline                 7 & Speicher & 0.100 & 200.00 & Bern & 2000 \\                 \hline             \end{tabular}         \end{center}                  (...) % two other tables of the same form              \end{document}      This error message appears at every `\end{center}` line. How can I fix this?


title: Making a character active vs assigning it a specific catcode

text: My query arises from my answer to Tab not as extra alignment tab and Andrey's rather nicer version. The question at hand involved making the TAB character usable for aligning tables. I assigned it to catcode 4, alignment, whereas Andrey used catcode 13, active characters, and then `gdef`'d it to `&`. So my general question is: supposing we want to make a new character act like `&` or `^` or whatever, _when is it best to reassign a character to a more specific catcode (like 1-4, 7, or 8), and when is it best to use the all- purpose catcode 13?_ (In the related question Active characters let to a (non-active) character it was mentioned that it may not be a good idea to redefine existing characters in these categories to active versions of themselves, but I'm talking here about making new characters.)


title: Creating a custom songbook with the songs package

text: Friends, I usually create songbooks with the help of `songs` package (I guess the CTAN version is a little old, the newest one can be downloaded from here). Consider the follow example (taken from the author's webpage):               \documentclass[letterpaper]{article}     %\usepackage[chorded]{songs}     \usepackage[lyric]{songs}          \newindex{titleidx}{cbtitle}          \begin{document}          \begin{songs}{titleidx}          \beginsong{Amazing Grace}[       by={John Newton},       sr={Luke 15:4; 2 Corinthians 4:8,9; Ephesians 2:8; Revelation 14:3},       cr={Public domain.}]          \beginverse     A\[E]mazing \[E/D#]grace! How \[A/C#]sweet the \[E/B]sound     That \[E]saved a \[E/C#]wretch like \[B7]me!     I \[E]once was \[E/D#]lost, but \[A/C#]now am \[E/B]found;     Was \[A]blind, but \[A/B]now I \[E]see.     \endverse          \beginverse     T'was ^grace that ^taught my ^heart to ^fear,     And ^grace my ^fears re^lieved;     How ^precious ^did that ^grace ap^pear     The ^hour I ^first be^lieved!     \endverse          \endsong          \end{songs}          \end{document}      The output is according to the parameter provided in `\usepackage[<<type of songbook>>]{songs}`: ![Songbook output](http://i.stack.imgur.com/fwxvi.png) I always use the `chorded` parameter for musicians and the `lyric` one for the rest of the audience. As you can see in the code, using the `^` symbol will make the other verses repeat the chords in those positions. Most of the songs have the same melody, so I'd love to save some space and spare some trees by putting the chords in the first verse and leaving the other verses untouched, like this:               \beginverse     A\[E]mazing \[E/D#]grace! How \[A/C#]sweet the \[E/B]sound     That \[E]saved a \[E/C#]wretch like \[B7]me!     I \[E]once was \[E/D#]lost, but \[A/C#]now am \[E/B]found;     Was \[A]blind, but \[A/B]now I \[E]see.     \endverse          \beginverse     T'was grace that taught my heart to fear,     And grace my fears relieved;     How precious did that grace appear     The hour I first believed!     \endverse          \endsong      Sadly, the `chorded` output still preserves the spaces between lines: ![Songbook output](http://i.stack.imgur.com/ELwMB.png) My idea was something like this: when chords were provided, display them like the `chorded` option, otherwise keep the `lyric` one. This is the output I'd like to obtain: ![I have a dream](http://i.stack.imgur.com/RvgO0.png) I read the `songs` documentation but could not find any references on how to mix chorded and lyrics styles the way I want. I'd like to stick with the `songs` package, as it has great index features and since I have already a book with thousands of songs. Of course, if not possible, I'm open to other suggestions on packages. =)


title: Correct line-breaking of long math expression

text: What is the correct way of breaking such unnumbered equation into multiple lines?               \begin{equation*}          \lim_{\bigtriangleup t \to 0^+}\int_{\bigtriangleup t}^{T} \! \int_{\Omega} \! D(t_1,x) \frac{\varphi(t_1-\bigtriangleup t,x)-\varphi(t_1,x)}{(-\bigtriangleup t)} \, \mathrm{d}x \, \mathrm{d}t_1           =\lim_{\bigtriangleup t \to 0^+} \int_{0}^{T} \! \int_{\Omega} \! D(t_1,x) \frac{\varphi(t_1-\bigtriangleup t,x)-\varphi(t_1,x)}{(-\bigtriangleup t)} \chi_{(\bigtriangleup t,T)}(t_1) \, \mathrm{d}x \, \mathrm{d}t_1           = \int_{0}^{T} \! \int_{\Omega} \! D(t_1,x) \frac{\partial \varphi}{\partial t_1} (t_1,x) \, \mathrm{d}x \, \mathrm{d}t_1 .          \end{equation*}      It's not an equation actually, I'm proving something in my thesis and I'm just modifying a math expression. So `\multline` is not this case I think. I used `\split` but then it can be aligned to the right side or the left side only because the expressions are too long and it would overfull.


title: BibTeX in LaTeX document

text: For referencing in my LaTeX documents, I use the `thebibliography` command. However most of the times I find the information of my citations in BibTeX format. Manually editing BibTeX file to convert them to `\bibitem` is exhausting. I want to know if there is any method for importing a bibTeX file or a command which could understand the text structure of a BibTeX file in LaTeX?


title: Emphasize word beginning with uppercase letters in code with lstlisting package

text: Hi I am using the lstlisting package to format my Prolog code within my tex file. In Prolog all variables begin with an uppercase letter. I would like to emphasize them. Is there a way to for example add all uppercase letters to the keyword list or adjusting their style. I imagine there is something like this:               \lstset{emph={\wordsbeginninguppercase},emphstyle=\bfseries}      I tried               \lstset{identifierstyle=\bfseries}.      That made everything except for strings bold. The solution should also only apply to the actual programming language, s.t. uppercase words within strings and comments are not changed. In the following example FoundClass and Message would be emphasized, but Find and Found not since they are either within a comment or a string.               somerule(Message,FoundClass) :-         %Find property         look_for_class_with_property(FoundClass),         atomic_list_concat(['Found class which fulfills property:' ,FoundClass],Message).      Thanks for your help.


title: How do I include a click-to-zoom thumbnail picture in a non-beamer document?

text: The Beamer class for presentations provides a way (using the \framezoom command) to include a picture in the document on which one can click to zoom in, and then zoom back out with another click. How can I get the same effect in a non-beamer document; more specifically, in an article-class document compiled using XeLaTeX? Is there a package that provides this functionality to a document in the article class?


title: Editor for DTX files

text: DTX files are based on LaTeX comments, which means that any editor that can highlight LaTeX code will print most of the DTX files - all the documentation - as a comment and thus _not_ highlight the code. I found that Emacs can handle that problem, however I rather do not want to learn how to use Emacs just because of that. WinEdt should be able to handle the problem as well, but that is not Open Source. TeXworks does not handle it (I am using Window). I read that gedit should be able to do it, but it also only highlights standard LaTeX Code. In Editors/IDEs for LaTeX documented source (.dtx) files a script for highlighting in TeXworks was introduced, but I have not idea how to tell TeXworks to use that. The settings dialog does not allow to do it.


title: How to typeset Haskell ++ operator and friends?

text: Usually, the list concatenation operator in Haskell is printed as overlapping double plus signs in books. (In ASCII it is just ++) How can I typeset this sign in Haskell (in and perhaps outside of math mode)? What are other Haskell operators which could be typeset more beautiful in LaTeX?


title: Problem with putting an hrule in an subsubsection-like environment, when inside item environment?

text: I have made this command:               \newcommand*{\example}[1]{%     \needspace{3\baselineskip}     \subsubsection{{\bf Example #1}{{\color{lightgray}\hrule width 22mm height 1.5pt}\hfill}}%     }      and it's working fine, unless if I m trying to put an \example inside an itemize or enumerate environment, in which case the line is not indented, and so it's not aligned nicely underneath the indented "Example". I thought about using a rule instead of an hrule `{\color{lightgray}\rule{\linewidth}{1.5pt}}` but this doesn't seem to work inside the subsubsection. It produces an error. Any suggestions? I'd prefer to avoid using extra packages if possible. Thanks!