title: Improve spider drawing in Tikz

text: This is the spider I have drawn in Tikz (for a scientific paper using a spider as a stimulus!): ![spider](http://i.stack.imgur.com/SViA9.gif) MWE:               \documentclass[tikz]{standalone}     \begin{document}     \begin{tikzpicture}     \draw [fill=black] (0,0) ellipse (1.5cm and .8cm);     \draw (0,0) parabola (3,-3);     \draw (0,0) parabola (3,-2);     \draw (0,0) parabola (3,-1);     \draw (0,0) parabola (3,-.5);     \draw (0,0) parabola (-3,-3);     \draw (0,0) parabola (-3,-2);     \draw (0,0) parabola (-3,-1);     \draw (0,0) parabola (-3,-.5);     \end{tikzpicture}     \end{document}      Can anyone improve over my attempt? UPDATE: I'm leaning towards something more like this: ![enter image description here](http://i.stack.imgur.com/o4eZ2.gif)               \documentclass[tikz]{standalone}     \begin{document}     \begin{tikzpicture}     \draw [fill=black] (0,0) circle(.5cm);     \draw [fill=black] (0,1) circle(.8cm);     \draw[thick] (0,.1) parabola (2,3);     \draw[thick] (0,.05) parabola (2,1);     \draw[thick] (0,0) parabola (2,-1);     \draw[thick] (0,0) parabola (2,-3);     \draw[thick] (0,-.3) parabola (.3,-.8);          \draw[thick] (0,.1) parabola (-2,3);     \draw[thick] (0,.05) parabola (-2,1);     \draw[thick] (0,0) parabola (-2,-1);     \draw[thick] (0,0) parabola (-2,-3);     \draw[thick] (0,-.3) parabola (-.3,-.8);     \end{tikzpicture}     \end{document}


title: Fragile frame in lyx

text: I'm working on a document in LyX and I'm trying to create a frame around some verbatim text. I've tried a number of different things including ERT `\begin{frame}[fragile]` and `\end{frame}` around the block and also using beamer-fragile module. However this simply doesn't do what I need to - the PDF, instead of the frame around the block, contains two small rectangles and text `fragile]` before the verbatim block. Here's what I've got in lyx: ![enter image description here](http://i.stack.imgur.com/FcDbv.png) And here's what I am getting in PDF: ![enter image description here](http://i.stack.imgur.com/MbSXx.png) Exactly the same result is produced if I use beamer-fragile module instead of ERT. I'm using LyX 2.0.7.1 (updated from 1.6 today) on OS X 10.9 if that matters. How can I get the frame around the block?


title: How to make the navigation bars gradually proceed in beamer

text: I found when the section increase, the text in the navigation bar will be out of bounds. Like the following picture![enter image description here](http://i.stack.imgur.com/yIPTx.jpg) My MWE is:               \documentclass[presentation]{beamer}     \let\Tiny\tiny     \usepackage{hyperref}            \usetheme{Berkeley}     \begin{document}     \part{A}     \section{A section}     \subsection{A subsection}     \begin{frame}       \frametitle{Frame title1}       \framesubtitle{frame subtitle1}       Some text s     \end{frame}     \begin{frame}       Some more text     \end{frame}     \part{B}     \section{Another section1}     \subsection{Another subsection1}     \begin{frame}       Some final text     \end{frame}     \part{C}     \section{Another section1}     \subsection{Another subsection1}     \begin{frame}       Some final text     \end{frame}     \section{Another section2}     \subsection{Another subsection2}     \begin{frame}       Some final text     \end{frame}     \section{Another section3}     \subsection{Another subsection3}     \begin{frame}       Some final text     \end{frame}     \section{Another section4}     \subsection{Another subsection4}     \begin{frame}       Some final text     \end{frame}     \section{Another section5}     \subsection{Another subsection5}     \begin{frame}       Some final text     \end{frame}     \end{document}      What I want is to make text lines of the navigation bars be limited. How can I do that? Want help. :-D


title: LaTeX File and Folder Symbols

text: Are there file and folder/directory symbols in **LaTeX**? Something like: ![file and folder symbols](http://i.stack.imgur.com/5Z9So.jpg)


title: Weirdest way of displaying "LaTeX" (Contest)

text: LaTeX is a program for making beautiful documents with elaborate code. As we all know, typesetting the name of LaTeX itself by using the command `\LaTeX` produces a pretty weird symbol combination. But we can do better than that, right? What's your weirdest way to display something that can be read as "LaTeX"?


title: german hyphenation

text: I am using `inputenc` to have umlauts etc. it works fine, if I am not change hyphenation , but I want to have german hyphenation too.               \documentclass[12pt,twoside]{report}     \usepackage[a4paper]{geometry}     \usepackage[utf8]{inputenc}     \usepackage[ngerman]{babel}     \usepackage[T1]{fontenc}     \usepackage{graphicx}     \usepackage{float}      if I am using this packages. they don`t work and I get this error               ! Argument of \language@active@arg" has an extra }.     <inserted text>      **UPDATE**               \usepackage{graphicx}     \usepackage{float}     \selectlanguage{ngerman}     \begin{document}     \chapter{Time Series}     \section{Wieso Time Series Analyse?}     Das Wachstum der Time-Series-Daten erhöht das Interesse der Forscher für die Analyse und das Mining der Time Series in sowohl Industrie als auch akademischen Bereichen. In diesem Kapitel ermitteln wir die Techniken für die Analyse und das Mining der Time Series.Zunächst gilt es, die Time Series zu definieren und zu     \begin{figure}[h]      \centering     \includegraphics[scale=.5]{"D:/MA/Bilder/AC-TSPlot-Pos-Neg"}     \renewcommand*{\figurename}{Abbildung}      \caption{Dieses Bild verdeutlicht, wo die Autokorrelation positiv und wo negativ ist. Der erste Kreis zeigt, wo die Autokorrelation negative ist, aber im zweiten und dritten Kreis ist die Autokorrelation positiv.}     \end{figure}          \end{document}      I get the error in this line:               \includegraphics[scale=.5]{"D:/MA/Bilder/AC      how can I solve this problem?


title: Change ampersand separator with parencite command in APA style

text: I'm using `biblatex-apa` to format citations and reference list. I would like to change `&` separator to `and` when using `parencite` citation command, e.g.:   * `\parencite{ref1}` --> (author and author, 2013)   * `\parencite{ref2}` --> (author, author and author, 2014) I already successfully re-declare delimiter in the reference list using the commands:               \AtBeginBibliography{\renewcommand*{\finalnamedelim}{%         \ifthenelse{\value{listcount}>\maxprtauth}           {}           {\ifthenelse{\value{liststop}>2}              {\finalandcomma\addspace{}and\space}              {\addspace{}and\space}}}}      but have no idea how to change separator for citations. Any ideas or pointers would be greatly appreciated. MWE:               \documentclass{scrbook}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[american]{babel}     \usepackage[babel]{csquotes}     \usepackage{filecontents}     \usepackage[backend=biber,style=apa,hyperref]{biblatex}     \DeclareLanguageMapping{american}{american-apa}          \begin{filecontents}{mybib.bib}     @article{ref1,         author    = {Guyon, Isabelle and Elisseeff, Andr\'{e}},         journal   = {The Journal of Machine Learning Research},         pages     = {1157--1182},         title     = {{An introduction to variable and feature selection}},         volume    = {3},         year      = {2003}     }     @book{ref2,         author    = {Michel Goossens and Frank Mittelbach and Alexander Samarin},         title     = {The LaTeX Companion},         year      = {1993},         publisher = {Addison-Wesley},         address   = {Reading, Massachusetts}     }     \end{filecontents}          \addbibresource{mybib.bib}          \begin{document}     Lorem ipsum dolor sit amet \parencite{ref1}, consectetur adipiscing elit \parencite{ref2}.          \printbibliography     \end{document}


title: Printing interlinear translation: how to mix automatically two paragraphs, printing lines alternately

text: I am writing a document on a foreigh language, say French, and want to put some paragraphs in French with their translation in English. But I would like to print one line in French, the corresponding line in English, one line in French, the corresponding line in English, and so on. For example, if I have these two paragraphs: > On ne connaît que les choses que l'on apprivoise, dit le renard. Les hommes > n'ont plus le temps de rien connaître. Ils achètent des choses toutes faites > chez les marchands. Mais comme il n'existe point de marchands d'amis, les > hommes n'ont plus d'amis. Si tu veux un ami, apprivoise-moi! > > We only know the things that we tame, said the fox. People no longer have > the time to know anything. They buy things already made for peddlers. But > since there are no peddlers of friends, they no longer have friends. If you > want a friend, tame me! I would like them to be automatically printed like this, providing interlinear translation:               On ne connaît que les choses que l'on apprivoise, dit le renard. Les hommes n'ont plus      We only know the things that we tame, said the fox. People no longer have           le temps de rien connaître. Ils achètent des choses toutes faites chez les marchands.     the time to know anything. They buy things already made for peddlers.           Mais comme il n'existe point de marchands d'amis, les hommes n'ont plus d'amis.      But since there are no peddlers of friends, they no longer have friends.           Si tu veux un ami, apprivoise-moi!     If you want a friend, tame me!       So, I am looking for a way to mix both paragraphs, eventually with a way to provide sync information to tell latex which parts have to be kept together. Ideally I would like this to be processed automatically in such a way that a modification of the layout of the page or the size of the font should not oblige me to reformat the text by myself.


title: soulutf8 strips characters from compound words

text: I use `soulutf8` for underlining in my LaTeX document. However, it seems to be stripping characters from the end of compound words, e.g.:               \ul{$n$-rozměrný}      results in > _n_ -rozměrn However, if I break the word at the hypen, i.e.:               \ul{$n$ rozměrný}      the 'ý' character re-appears: > _n_ rozměrný My document is defined as follows:               \documentclass[dvips,12pt]{article}          \usepackage[czech]{babel}     \usepackage[utf8x]{inputenc}     \usepackage[IL2]{fontenc}     \usepackage{soulutf8}      A similar problem has already been described here; however, the proposed solution doesn't seem to work in my case.


title: TexLive 2012 Ubuntu 13.04 - Correct way to set TEXMFHOME

text: I have found numerous guides on how to do this (heres a couple):   * $TEXMFHOME setting   * customizing TEXMFHOME but I have a different directory structure and none of the places present in the answers are present on my system. Using `locate` I have found these locations of existing 'texmf.conf' files:               ben@ben-OptiPlex-9010:~$ locate texmf.cnf     /etc/texmf/web2c/texmf.cnf     /usr/share/doc/texlive-doc/latex/pgfplots/texmf.cnf     /usr/share/doc/texlive-pictures-doc/latex/pgfplots/texmf.cnf     /usr/share/texlive/texmf/web2c/texmf.cnf     /usr/share/texmf/web2c/texmf.cnf      All of the `texmf.conf` files (I ignore the ones embedded in `/usr/share/doc`contain lines that say something along the lines of `do not edit this file directly`). The options provided are:   * `/usr/share/texmf/web2c/texmf.cnf & /usr/share/texlive/texmf/web2c/texmf.cnf`: Go and modify the `texmf.cnf` in `../../` which clearly does not exist. So create it? And in which location, `texmf` or `texlive/texmf`?   * `/etc/texmf/web2c/texmf.cnf`: `PLEASE DO NOT EDIT THIS FILE DIRECTLY. It is meant to be generated from files in /etc/texmf/texmf.d/` which only contains `00debian.cnf` & `80tex4ht.cnff`. Do I add a new one? Is the name important?   * Go with what is suggested in some answers and just change the `TEXMFHOME` variable as I do with any other variable in Ubuntu (`~/.pam_environment` file these days)?


title: pgfplots: Add/subtract whole columns of data files with one another?

text: I want to analyze data files with the following format               0.01    1.00    11.00    21.00     0.02    2.00    12.00    22.00     0.03    3.00    13.00    23.00     0.04    4.00    14.00    24.00     0.05    5.00    15.00    25.00      I want to create a plot with `pgfplots` that uses the first column as the x-values. The y-values shall be obtained by adding several of the other columns to one another or subtract one from the other - a little bit like a spreadsheet application could do it. How can this be achieved with `pgfplots`? And if it is possible, is it easy to do the same with lines instead of columns or perform other simple mathematical calculations (multiplication, taking the logarithm, etc.)?


title: Can parcolumns be made to expand into the margins?

text: I recently started using `parcolumns` instead of block quotes. I do this since I have a non-English source text in the right column and the English translation in the left column. Is it possible to make `parcolumns` columns eat into the margins of the document, so as to further set them off from the rest of the text? I tried using the option `colwidths` to try to make the columns larger and force them to eat into the margin equally on either side (for example with the value `colwidths={1=10cm,2=10cm}`). However, this doesn't work; the leftmost column still begin where the left margin ends. Does anyone know of a solution to this?


title: What's the difference between pdfTeX and pdfLaTeX?

text: I've been working on a project and compiled it using pdfLaTeX, then tried to compile using pdftex and got a whole lot of errors. I'd like to know why that would happen since it's a very plain file and I did not put a `pdflatex` option in `documentclass` or anything like that, and what's the real difference between them.


title: Rotate text next to right brace in multirow environment

text: The following LaTeX creates a simple table with some rows grouped with a right curly brace:               \usepackage{multirow}     \usepackage{bigdelim}     ...     \begin{tabular}{l|l|l|r}     \hline     $a$ &  $b$ & x&\\     \hline     $cccccc$ & $dddddd$ & x&      \multirow{3}{*}{}     \rdelim\}{3}{1cm}[long text here]\\     $eeeeee$ & $fffffffff$ &x&\\     $gggggg$ & $hhhhhhhhh$ &x&\\     \end{tabular}      How do I rotate `long text here` 90 degrees so that it renders vertically>


title: Is it correct to use a comma in this equation?

text: Consider:               Then, the sequence $k_i$ given by (3.38) is increasing and converges to      \begin{equation}\label{eq:weired_equation}     k^\xi = k_1\times k_2 \times c \times d,     \end{equation}     where $c$ and $d$ are defined in the Theorem 2.       I have the questions:   1. What are the grammatical errors in the above piece?   2. Should a comma be used after the equation \eqref{eq:weired_eqution}.


title: Reference to a figure

text: When referring to a figure, the output in my pdf is not a number, but 'Figure xx'. For example: if I use the phrase _This is figure \ref{test}._ the output in my pdf file is always: _This is figure Figure 1.3._ I would like to know why LaTeX shows the prefix 'Figure' and not simply the number of the figure. Here is the general code that I use for a figure:               \begin{figure}[h]         \centering         \includegraphics[scale=0.9]{Test.eps}         \caption{Test}         \label{test}     \end{figure}      Interestingly, when referring to a subfigure, this issue does not occur; it only occurs when I want to refer to a 'whole' figure. As my document is quite extend (thesis), I use a lot of packages in my preamble, but even after an extensive quest I could not figure out what the problem might be. My preamble:               \usepackage{a4wide}                              \usepackage[pdftex]{graphicx}                        \usepackage[small,bf,hang]{caption}          \usepackage[latin1]{inputenc}                                \usepackage{fancyhdr}                        \usepackage{titlesec}                        \usepackage{subfig}                          \usepackage[superscript,biblabel]{cite}      \usepackage{chngcntr}                        \usepackage[nottoc,notlot,notlof]{tocbibind}         \usepackage{fixltx2e}                        \usepackage{wrapfig}                         \usepackage{arevtext,arevmath}               \usepackage{enumitem}                        \usepackage[Gray,squaren,thinqspace,thinspace]{SIunits}           \usepackage[version=3]{mhchem}                   \usepackage{chemscheme}     \usepackage{epstopdf}                        \usepackage[varioref=true,journal=jcp]{chemstyle}       \usepackage{float}      % **_*_ ** _*_** General lay out **_*_ ** _*_**               \setlength{\parindent}{0cm}                  \renewcommand{\baselinestretch}{1.3}         \pagenumbering{arabic}                       \fancyhead[L]{\nouppercase{\leftmark}}     \fancyhead[R]{\thepage}      % **_*_ ** _*_** Font in titles and text **_*_ ** _*_**               \usepackage[scaled=.95]{helvet}              \usepackage{sectsty}     \allsectionsfont{\sffamily}     \renewcommand{\familydefault}{\sfdefault}         % **_*_ ** _*_** Fancy chapter titles **_*_ ** _*_**               \usepackage{titlesec}     \titleformat{\chapter}[display]       {\sffamily\huge\raggedleft}           {\MakeUppercase{\chaptertitlename}         \rlap{ \resizebox{!}{1.4cm}{\thechapter} \rule{5cm}{1.45cm}}}        {10pt}{\Huge}  % Chaptertitelgrootte     \titlespacing*{\chapter}{0pt}{2pt}{90pt}      % **_*_ ** _*_** Fancy captions for images **_*_ ** _*_**               \captionsetup{     margin=1ex,     font={small, sf},     labelfont={bf, sf},     labelsep= endash}      % **_*_ ** _*_ ** _*_ ** _*_ ****               \makeatletter      \def\@seccntformat#1{\llap{\csname the#1\endcsname\quad}}     \makeatother          \setcounter{secnumdepth}{3}     \setcounter{tocdepth}{3}


title: Define ring bond length in chemfig

text: How can one define the bond length for a ring system in chemfig? `**6(-[,0.5]-[,0.5]-[,0.5]-[,0.5]-[,0.5]-[,0.5])` does not work, sadly. EDIT: The answer provided resizes the ring system, but not the circle within it, _on my system_. Here's my configuration:               \documentclass[11pt]{amsart}     \usepackage[landscape, top=0.3cm, left=0.1cm, right=0.3cm, bottom=0.3cm]{geometry}                % See geometry.pdf to learn the layout options. There are lots.     \geometry{letterpaper}                   % ... or a4paper or a5paper or ...      \usepackage{graphicx}     \usepackage{amssymb}     \usepackage{epstopdf}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[version=3]{mhchem}     \usepackage{chemfig, chemmacros}     \DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}          \begin{document}


title: Changing "Contents" name in revtex4-1

text: I need to change the way "Contents" appears in `\tableofcontents` in a revtex4-1 document. Other answers indicate `\renewcommand{\contentsname}{changes!}`, however when I uncomment any of those in               \documentclass[]{revtex4-1}          \def\title{A title}     \def\author{Me}          %\renewcommand{\contentsname}{T\lowercase{able of} C\lowercase{ontents}}     %\renewcommand{\listfigurename}{L\lowercase{ist of} F\lowercase{igures}}     %\renewcommand{\contentsname}{T\lowercase{able of} C\lowercase{ontents}}          \begin{document}     \maketitle     \newpage          \section*{A\lowercase{cknowledgments}}     none!     \newpage          \section*{A\lowercase{bstract}}     \begin{center}     {``\title''}\\     \end{center}     \vspace{.3cm}     Some text.     \newpage          \setlength{\baselineskip}{12pt}     \tableofcontents     \clearpage     \setlength{\baselineskip}{20pt}          \makeatletter     \let\toc@pre\relax     \let\toc@post\relax     \makeatother           \listoffigures     \newpage          \listoftables     \clearpage          \section{\label{sec_defs}D\lowercase{efinitions}}     \end{document}      I get "Latex Error: \contentsname undefined" (or similar for `\listfigurename`). Help?


title: How to have continuation indent in algorithmicx algorithm for long comments and States

text: Assuming that I can apply the same solution to my document, previously I asked how to have continuation indent in line comments on somebody else's MWE and got an answer. However, I could not apply that solution to MY document. So I am re-posting a MWE with keeping my preamble, with following questions: 1-) How to have continuation indent in the line comment below? 2-) While you are at it, can you add continuation indent to the long `\State`, too?               % page layout ------------------------     \documentclass[]{article}     %\usepackage[paperheight=22.9cm, paperwidth=8.1cm, margin=0.1cm]{geometry}          % preamble ---------------------------     \usepackage[T1]{fontenc}     \usepackage{float}     \usepackage[ampersand]{easylist}     \usepackage{cite}     \usepackage[pdftex]{graphicx}     \graphicspath{{./}{./fig/}}     \DeclareGraphicsExtensions{.pdf,.jpeg,.jpg,.png,.svg}     \usepackage{todonotes}     \newcommand{\fixme}[1]{\todo[inline]{#1}}     \usepackage[cmex10]{amsmath}     \interdisplaylinepenalty=2500     \usepackage{tabulary}     \usepackage{algorithm}     \usepackage{algpseudocode}     \usepackage[english]{babel}     \usepackage[utf8]{inputenc}     \usepackage{authblk}     \usepackage[caption=false,font=footnotesize]{subfig}     \usepackage{bm}     \usepackage{mathtools}     \date{}                    \renewcommand{\vec}[1]{\bm{#1}}               \begin{document}                         \newcommand{\To}{\textbf{to\ }}     \newcommand{\Step}{\textbf{step\ }}     \newcommand{\Gets}{$ \gets\ $}     \renewcommand{\algorithmicforall}{\textbf{for each}}     \floatname{algorithm}{Pseudocode}          \makeatletter     \newlength{\trianglerightwidth}     \settowidth{\trianglerightwidth}{$\triangleright$~}     \algnewcommand{\LineCommentCont}[1]{\Statex \hskip\ALG@thistlm%       \parbox[t]{\dimexpr\linewidth-\ALG@thistlm}{\hangindent=\trianglerightwidth \hangafter=1 \strut$\triangleright$ #1\strut}}     \makeatother                    \begin{algorithm}[H]     \begin{algorithmic}[1]          \Procedure{Compare}{P,A,I,E}          \ForAll{$p \in P$}         \ForAll{$a \in A$}             \For{$i$ \Gets $1$ \To $I$ \Step 1}                 \LineCommentCont Run the algorithm $a$ on problem $p$ to get list of (function evaluation, corresponding global best solution value) pairs $Y$. Algorithm $a$ terminates after doing $E$ function evaluations.                      \State $Y_i$ \Gets $a(p,E)$ aaaa bbbb ccccc aaaa bbbb ccccc aaaa bbbb ccccc aaaa bbbb ccccc aaaa bbbb ccccc aaaa bbbb ccccc aaaa bbbb ccccc aaaa bbbb ccccc aaaa bbbb ccccc aaaa bbbb ccccc aaaa bbbb ccccc              \EndFor         \EndFor     \EndFor     \EndProcedure     \end{algorithmic}     \caption{T }     \label{alg:compare}     \end{algorithm}                    \end{document}      ![preview](http://i.stack.imgur.com/y7aJS.png)


title: Unwanted padding in tabular columns when cells contain multiple rows

text: Whenever I need to create a cell with multiple rows in a tabular environment, I usually create enclose the contents of the cell within a tabular environment within the cell. This has been a great fix for me since it is easy to implement and also since it takes care of vertical alignment across rows. Unfortunately, it looks like this fix also adds additional padding to the column. I have included an example below to illustrate the issue. Here, the bottom table has a row with "2 row" cells. In my opinion, both the top table and the bottom table should have equal column widths (determined by the length of "TITLE"), but this is not the case. I suspect the reason why is because the tabular environment adds padding to the column widths. ![enter image description here](http://i.stack.imgur.com/iGKWY.png)               \documentclass[letter]{article}     \usepackage{array}     \usepackage{booktabs}     \usepackage{tabularx}          \begin{document}               %normal table     \begin{table}[ht]     \begin{tabular}{cc}       \toprule     TITLE  & TITLE \\        \midrule       10 & 10  \\       10 & 10  \\        \bottomrule     \end{tabular}     \end{table}          %when I use the tabular trick     \begin{table}[ht]     \begin{tabular}{cc}       \toprule       \begin{tabular}{c}TITLE\\A\end{tabular} & \begin{tabular}{c}TITLE\\B\end{tabular} \\        \midrule       10 & 10  \\       10 & 10  \\        \bottomrule     \end{tabular}     \end{table}               \end{document}


title: Problems with the title and the margin in LyX

text: I have prepared my document and when I created the PDF I realized the problem I got with one title and the right margin. This is out of the margin. How can I fix this? (I am new with LyX)


title: Specifying part of an image to be used in cm

text: I have a multipage pdf document and would like to include only the upper part (say 3cm down and 2cm right from upper left corner) of a given page. Including part of a single page can be done with `\includegraphics`,               \documentclass[twoside,a4paper,12pt]{report}          \usepackage{graphicx}          \begin{document}     \includegraphics*[page=7,width=\textwidth,viewport=30 30 120 120]{file.pdf}          \end{document}      but how do change the units to something like cm or inches?


title: Using two different Sans Serif fonts eliminates bold font

text: Say I want to have my document in the default sans serif font, but I occasionally wish to have some other features in the document be in a different font. I am using `\usepackage{libertine}` to load this other font, and I get the libertine font to show up by using `\textsf{...}`. However, now `\textbf{}` no longer works in the document to bold the default sans serif font. How can I work around this? Edit: I found the issue. The problem was the following offending line of code:               \renewcommand\rmdefault{cmss}      I changed this to               \renewcommand{\familydefault}{cmss}      in the MWE below, and all works fine. MWE (solution found):               \documentclass[11pt]{article}          %% Import packages     %% ================================================================================================     \usepackage[numbers,sort&compress]{natbib}                      % Enable bibtex     \usepackage[hyphens]{url}     \usepackage[pdftex]{graphics,graphicx}  % Augment graphics functionality     %\usepackage{concrete}                  % Concrete roman font -- COOL MATH. This package has some conflicts with fancyhdr. Recommend not to use.     \usepackage{latexsym}                   % Symbolic fonts for LaTeX     \usepackage{amsmath}                    % AMS math formatting options     \usepackage{amsfonts}                   % AMS fonts     \usepackage{bm}                         % Bold math     \usepackage[normalem]{ulem}     \usepackage{commath}     \usepackage[tiny,compact]{titlesec}     % Allow better control over sections, headers, etc.     \usepackage{fancyhdr}                   % Allow better control over page layout     \usepackage[section]{placeins}  % Keep figures in section     \usepackage{float}                      % Define tables and floating elements     \usepackage{flafter}                    % Never put floats before their references     \usepackage{floatflt}                   % wrap text around floats     \usepackage{wrapfig}                    % wrap text around figures     \usepackage{subcaption}                     % subcaptions for subfigures. USE SUBFIG, NOT SUBFIGURE. SUBFIGURE IS DEPRECATED AND MAY CONFLICT WITH OTHER PACKAGES     \usepackage{longtable}                  % A multi-page tabular environment     \usepackage{threeparttable}             % tables with footnotes, capions all the same width     \usepackage{dcolumn}                    % decimal-aligned tabular math columns     \usepackage{multirow}                   % Allow table cells to span multiple rows     \usepackage{booktabs}                   % Formatting options for publication-quality tables     \usepackage{array}                      % Additional options for formatting columns in the array and tabular environments     \usepackage{caption}                    % Caption formatting -- use commands here instead of hangcaption     \usepackage[usenames,dvipsnames]{color}                     % Enable colors     \usepackage[table,hyperref]{xcolor}     % Better control over color     \usepackage{import}                     % Let latex import files from different directories     \usepackage{datetime}                   % Format dates and times     \usepackage{enumitem}                   % Better control over lists     \usepackage{nomencl}                    % nomenclature package     \usepackage{lscape}                     % Allow text to be written in landscape mode     \usepackage{lipsum}                     % Lorem Ipsum, for placeholder text.     \usepackage[greek,english]{babel}     \usepackage[sort&compress]{natbib}     \usepackage{setspace}          %\usepackage{cabin}     \usepackage{libertine}     \usepackage[T1]{fontenc}     %\renewcommand*\familydefault{\sfdefault}  %% Only if the base font of the document is to be sans serif               \usepackage[colorlinks=true, linkcolor=DarkBlue, citecolor=DarkBlue, urlcolor=DarkBlue, breaklinks=true]{hyperref}  % Allow for hyperlinks in documents. THIS MUST ALWAYS BE LAST     \usepackage[nameinlink]{cleveref}          \usepackage{fancyvrb}          \renewcommand{\familydefault}{cmss}                    \newlength{\tempintextsep}          \begin{document}          \setlength{\tempintextsep}{\intextsep}     \setlength{\intextsep}{0pt}     \begin{wrapfigure}[6]{l}{2.4in}     {     \setlength{\abovedisplayskip}{0pt}     $$     \left\{\;\;\;     \begin{minipage}{1.95in}     \centering     \fontsize{16pt}{19pt}\selectfont     \textsf{     This is a super awesome quote of super awesomeness.     }     \end{minipage}\;\;\;     \right\}     $$     }     \end{wrapfigure}          \lipsum[1]          \textbf{\lipsum[2]}     \setlength{\intextsep}{\tempintextsep}     \end{document}


title: Getting rid of space after \vpageref

text: I want to use `\vpageref` and have a comma right after it. The problem is that a space is inserted even though I defined `\reftextcurrent` to be `{}`. In the example below I could fix this by adding the `[]` to `\vpageref`, but in my book this trick somehow does not work. Is the additional space a bug? How can I fix it?               \documentclass{article}     \usepackage{varioref}     \renewcommand{\reftextcurrent}{}          \begin{document}          \section{Test}          I have a problem with Figure~\ref{test}\vpageref[]{test}, which I cannot solve.          \begin{figure}[b]          \caption{A figure}     \label{test}     \end{figure}               \end{document}


title: TeXlipse doesn't generate any pdf file

text: I've just installed TeXlipse using the simple installing option (Install new softwares -> http://texlipse.sourceforge.net/) on my Mac OS. I create a new LaTeX project, select output format = pdf, build command = pdflatex. However, no pdf file was generated. I tried to turn off automatically build and then clicked build but still nothing happened. In console, it's written:               /usr/bin/open -a /System/Library/CoreServices/Finder.app "/Users/myusername/Documents/workspace/TexLipse"      Can someone please explain me how to build pdf file with TeXlipse in Mac OS X?


title: How do I set a binding offset for multiple pages printed on one sheet?

text: I'm creating a PDF LaTeX document that has A4 portrait pages. But it is destined to be printed in landscaoe orientation, two-up and double-sided. That means any binding offset needs to be added to the left margin of pages 1, 5, 9 .... and the right margin of pages 4, 8, 12 .... This crude sketch may make that clear:                front side of sheet      --------------------------------------------      | bblll  page 1  rrr    lll  page 2    rrr  |      | bblllttttttttttrrr    lllttttttttttttrrr  |      | bblllttttttttttrrr    lllttttttttttttrrr  |      | bblllttttttttttrrr    lllttttttttttttrrr  |      | bblllttttttttttrrr    lllttttttttttttrrr  |      | bblllttttttttttrrr    lllttttttttttttrrr  |      | bblllttttttttttrrr    lllttttttttttttrrr  |      | bblllttttttttttrrr    lllttttttttttttrrr  |      ---------------------------------------------           reverse side of sheet      --------------------------------------------      | lll   page 3   rrr    lll  page 4  rrrbb  |      | lllttttttttttttrrr    lllttttttttttrrrbb  |      | lllttttttttttttrrr    lllttttttttttrrrbb  |      | lllttttttttttttrrr    lllttttttttttrrrbb  |      | lllttttttttttttrrr    lllttttttttttrrrbb  |      | lllttttttttttttrrr    lllttttttttttrrrbb  |      | lllttttttttttttrrr    lllttttttttttrrrbb  |      | lllttttttttttttrrr    lllttttttttttrrrbb  |      ---------------------------------------------           bb -- binding offset      ll -- left margin      tt -- text of page      rr -- right margin      The two-up printing is handled by the printer. But the printer cannot handle shifting the whole page to create the binding offsets. One solution of course is to get a better printer. One other avenue I have explored is treating the whole doc as a landscape, and using \multicols to print it in two colums. That sadly has many awkwardnesses in the formating. So what I'd really like is some magic dust in the geometry settings. Am I hoping for too much this soon after xmas?


title: Writing up past maths exam papers for collaboration

text: I am working through the past exam papers available for my course. I am then making them available for collaboration using Google Docs. However, for maths heavy material, the Google Docs equation editor sucks. In fact the MathJaX support on Mathematics here on Stack Exchange is much better. I am looking for an on-line editor for equation heavy documents that supports collaboration and sharing, and supports LaTeX. Notes: I am currently reviewing the solutions suggested here; http://en.wikibooks.org/wiki/LaTeX/Collaborative_Writing_of_LaTeX_Documents Google Docs is actually quite good. If they just supported a keyboard short- cut for inserting an equation, and had some sensible text in equation selection behaviour. I tried `latexlab.org`, but it's not a WYSIWYG editor; just an online IDE for LaTeX really (unless I missed something). `zoho` documents is another service I might look at.


title: Why doesn't the column align properly while the row does in this TikZ picture?

text: For some reason, the column doesn't align properly with matrix B. And I can't figure out why. I hate having to resort to using `yshift` this many millimeter this and this many millimeter for this. ![Column of B doesn't align with matrix B](http://i.stack.imgur.com/BxsEZ.png)               \documentclass[11pt]{standalone}          \usepackage{tikz}          \usetikzlibrary{shapes}     \usetikzlibrary{arrows}     \usetikzlibrary{positioning}     \usetikzlibrary{calc}          \definecolor{shade1}{rgb}{0.9, 0.9, 0.9}     \definecolor{shade2}{rgb}{0.8, 0.8, 0.8}     \definecolor{shade3}{rgb}{0.65, 0.65, 0.65}     \definecolor{shade4}{rgb}{0.45, 0.45, 0.45}          \begin{document}          \begingroup     \newlength{\matrixSize}     \setlength{\matrixSize}{2cm}     \newlength{\matrixSep}     \setlength{\matrixSep}{4mm}     \begin{tikzpicture}[%         auto,         box/.style={%           draw,           rectangle,         },         matrix/.style={%           box,           fill=shade2,           minimum size=2cm,           inner sep=0pt,           node distance=\matrixSep,         },         cell/.style={%           box,           fill=shade3,           minimum size=0.1\matrixSize,           inner sep=0pt,         },       ]            % Matrices       \node [matrix]             (C) {C};       \node [matrix, left=of C]  (A) {A};       \node [matrix, above=of C] (B) {B};            % Cell to calculate in C       \node [cell] at ([xshift=-0.2\matrixSize, yshift=0.2\matrixSize]         C.south east) (cell) {};            % Row from A       \path let \p1 = (cell),                 \p2 = (A.base),                 \p3 = (A.west),                 \p4 = (A.east)              in                node [%                  cell,                  minimum width=\x4-\x3-\pgflinewidth,                ] at ([yshift=\y1-\y2] A.base) (row) {};            % Column from B       \path let \p1 = (cell),                 \p2 = (B.base),                 \p3 = (B.south),                 \p4 = (B.north)              in                node [%                  cell,                  minimum height=\y4-\y3-\pgflinewidth,                ] at ([xshift=\x1-\x2] B.base) (col) {};     \end{tikzpicture}     \endgroup          \end{document}


title: Labeling equations or the use of subequations

text: I am using the `tabbing` environment for a list of 5 related equations.               \begin{tabbing} \hspace{.5cm} \= \hspace{.3cm} \= \hspace{3cm} \= \kill       \(\mathbf{\Omega}\) \> \(=\) \> \(\Omega\hat{\mathbf{k}}\)       \tagthisline\\[.3cm]       \(\mathbf{r}\) \> \(=\) \>       \(x\hat{\mathbf{i}} + y\hat{\mathbf{j}} + z\hat{\mathbf{k}}\)\tagthisline       \\[.3cm]       \(\dot{\mathbf{r}}\) \> \(=\) \>       \(\mathbf{v}_{\text{CG}} + \mathbf{\Omega}\times\mathbf{r}                                + \mathbf{v}_{\text{rel}}\)\tagthisline\\[.3cm]       \(\mathbf{v}_{\text{rel}}\) \> \(=\) \>       \(\dot{x}\hat{\mathbf{i}} + \dot{y}\hat{\mathbf{j}}                                       + \dot{z}\hat{\mathbf{k}}\)\tagthisline\\[.3cm]       \(\mathbf{a}_{\text{rel}}\) \> \(=\) \>       \(\ddot{x}\hat{\mathbf{i}} + \ddot{y}\hat{\mathbf{j}}                                     + \ddot{z}\hat{\mathbf{k}}\)\tagthisline     \end{tabbing}      `\tagthisline` picks up the appropriate numbering from the document. However, I need a `\label` for each one in the `tabbing` environment.   1. Does assigning more than one label in the same environment work?   2. Even if it does, should a different method be taken here?   3. If the answer to (2) is yes, how should I set it up?


title: Placement of subscripts using unicode-math. Is it XeTeX bug?

text: I don't like placement of subsripts when using unicode math fonts under XeLaTeX. In contrast to CM fonts the subscripts are placed at different vertical positions obviously depending on the depth of preceding symbol. Here is an example: ![enter image description here](http://i.stack.imgur.com/BFTFP.png) It is produced with the following MWE:               \documentclass{article}     \usepackage{fontspec}         \defaultfontfeatures{Renderer=Basic,Ligatures={TeX}}         \setmainfont[Numbers={OldStyle}]{Minion Pro}     \usepackage[math-style=ISO,bold-style=ISO]{unicode-math}        \setmathfont[version=asana]{Asana Math}        \setmathfont[version=cambria]{Cambria Math}        \setmathfont[version=lm]{Latin Modern Math}        \setmathfont[version=stix]{STIXGeneral}        \setmathfont[version=xits]{XITS Math}          \begin{document}%              Asana Math \mathversion{asana}         \( \nabla_{\bot}p_{\bot} + \nabla_{\parallel}p_{\parallel} + d_{s}J_{s}  \)              Cambria Math         \mathversion{cambria}         \( \nabla_{\bot}p_{\bot} + \nabla_{\parallel}p_{\parallel} + d_{s}J_{s}  \)              STIXGeneral         \mathversion{stix}         \( \nabla_{\bot}p_{\bot} + \nabla_{\parallel}p_{\parallel} + d_{s}J_{s}  \)              Latin Modern         \mathversion{lm}         \( \nabla_{\bot}p_{\bot} + \nabla_{\parallel}p_{\parallel} + d_{s}J_{s}  \)              XITS Math         \mathversion{xits}         \( \nabla_{\bot}p_{\bot} + \nabla_{\parallel}p_{\parallel} + d_{s}J_{s}  \)     \end{document}      And original PDFLaTeX with Computer Modern fonts yields subscript aligned at same vertical position: ![enter image description here](http://i.stack.imgur.com/pb1VQ.png) * * * **UPDATE** : LuaLaTeX has no such "feature": ![enter image description here](http://i.stack.imgur.com/VDE1n.png) Q#1: **Is it the XeLaTeX bug?** Q#2: **Is it possible to instruct`unicode-math` to align subscripts on same vertial position under XeLaTeX?**


title: Arithmetic overflow in psscaleboxto

text: The following example, using `\psscaleboxto`, produces an error: > "I can't carry out that multiplication or division, since the result is out > of range." Why does it happen?               \documentclass{article}     \usepackage{pstricks}          \begin{document}     \begin{pspicture}(20,20)     \psscaleboxto(1,1) {       \psframe(0,0)(5,5)     }     \end{pspicture}     \end{document}


title: align environment not entirely functional in beamer

text: I am currently working on a `beamer` project where I use the `align` enviroment. My code is as follows:               \begin{frame}     \frametitle{The Hovorka model}     \begin{tabular}{l l}     \begin{minipage}{0.5\textwidth}     The Hovorka model as an IVP:     \begin{align*}     \boldsymbol{\dot{x}}(t) = f(\boldsymbol{x}(t),d_k,u_k,\boldsymbol{\theta}_k)\\     \boldsymbol{x}(t_0) = \boldsymbol{x_0} \\     f : \left( \mathbb{R}^{n_x}, \mathbb{R}, \mathbb{R}, \mathbb{R}^{n_\theta} \right) \mapsto \mathbb{R}^{n_x}     \end{align*}     CGM model:     \begin{align*}     \frac{dG_I}{dt}(t) = -\frac{(G_I(t)-G(t))}{\tau_I} \\     G_{CGM}(t) = G_I(t) + \varepsilon_n \\     \varepsilon_n = \left( \xi +\lambda \cdot  \sinh \left(\frac{e_n - \gamma}{\delta} \right) \right)     \end{align*}     \end{minipage}     \begin{minipage}{0.5\textwidth}     \includegraphics[scale=0.15]{Hovorka}\\     16 variable parameters     \end{minipage}     \end{tabular}     \end{frame}      If I may lead your attention to the first `align*` environment I try to align the following using `&`:               \begin{align*}         \boldsymbol{\dot{x}}(t) &= f(\boldsymbol{x}(t),d_k,u_k,\boldsymbol{\theta}_k)\\         \boldsymbol{x}(t_0) &= \boldsymbol{x_0} \\         f &: \left( \mathbb{R}^{n_x}, \mathbb{R}, \mathbb{R}, \mathbb{R}^{n_\theta} \right) \mapsto \mathbb{R}^{n_x}         \end{align*}      By doing this I get approximately 20-30 error codes, where the first three is:               ! Argument of \align has an extra }.<inserted text>\par \end{frame}     ! Paragraph ended before \align was complete.<to be read again>\par \end{frame}     ! Missing $ inserted.<inserted text>$ \end{frame}      Now, I am confused why this is happening beacuse the only thing I am adding is the three `&` as usually works outside the frame environment. Somehow, it does not work inside the frame environment. Do you have any idea why I cannot align inside my frame environment?


title: Beamer handout: Problem when creating border around frames

text: I am trying to create handouts from a `Beamer` presentation. I want multiple frames to be on each sheet of printed paper, and I want the frames to have a border, say a border made with a thin line. To save ink, I do **not** want a shaded background. I have two problems that need solved. **First, how do I create a border for the frames in the handout?** The portion of the code below marked **Border** creates a border, but it also creates a border for frames that do not exist. The portion of the code below marked **Prints 8 on 1** allows me to put eight frames one each sheet of paper, but part of the top frames do not print (they're cut off). **How can this be fixed without changing printer settings?**               \documentclass[10pt,handout,mathserif]{beamer}          \usepackage{amsmath,amssymb,amsfonts,amsthm}     \usepackage{graphics}     \usepackage{color}     \usepackage{framed}     \usepackage{amsthm, array}     \usepackage{yhmath}     \usepackage{tikz}     \usepackage{pgfplots}     \usepackage{pgfpages}      %     % Prints 8 on 1     \pgfpagesuselayout{8 on 1}[letterpaper,border shrink=1mm]     %     %     % Border     \pgfpageslogicalpageoptions{1}{border code=\pgfusepath{stroke}}     \pgfpageslogicalpageoptions{2}{border code=\pgfusepath{stroke}}     \pgfpageslogicalpageoptions{3}{border code=\pgfusepath{stroke}}     \pgfpageslogicalpageoptions{4}{border code=\pgfusepath{stroke}}     \pgfpageslogicalpageoptions{5}{border code=\pgfusepath{stroke}}     \pgfpageslogicalpageoptions{6}{border code=\pgfusepath{stroke}}     \pgfpageslogicalpageoptions{7}{border code=\pgfusepath{stroke}}     \pgfpageslogicalpageoptions{8}{border code=\pgfusepath{stroke}}     %     %     \begin{document}          %Stuff goes here.          \end{document}


title: Verbatim frame latex with no waste

text: I have a frame/boarder round my Verbatim environment however the frame is extended to the page side, thus alot of wasted space. The following is my code:                   \begin{Verbatim}[frame=single]        s=0         for j = 1 : i -1            s = s + aij * akj        end         aki = (aki - s) / aii               \end{Verbatim}


title: How can I combine \seq_use:Nn and \seq_map_inline:Nn?

text: The following 'naïve' solution throws the error: > >     ERROR: Misplaced \omit. >   >     --- TeX said --- >     \multispan ->\omit >                        \@multispan >     l.13   } >              \\ >     --- HELP --- >     From the .log file... >   >     I expect to see \omit only after tab marks or the \cr of >     an alignment. Proceed, and I'll ignore this case. >                 \documentclass{article}     \usepackage{expl3}     \ExplSyntaxOn          \begin{document}          \seq_set_split:Nnn \l_tmpa_seq { , } { 1 , 2 , 3 }          \begin{tabular}{*{\seq_count:N \l_tmpa_seq}{c}}       hellow & world \\       \seq_map_inline:Nn \l_tmpa_seq {         \multicolumn{1}{|c|}{#1} &       } \\       goodbye & world     \end{tabular}     \end{document}      where I'd like to come up with a table like:                 hello    world     |   1    |   2   | 3 |      goodbye   world      What's the most efficient / clearest way to go about this?


title: I need a beamer theme simulating blackboard presentation

text: I always remember the school days, when the teacher used to write on a blackboard. I want to revive the feel of "blackboard" teaching in one of my presentation. But I do not know how to customize the existing theme or create a new one. The black board theme should have   1. Slightly grayed out background.   2. Date on left upper corner (I remember the monitor/ class room captain) used to put date there - to occupy the corner creating a sort of triangle.   3. Hand-writing font. (Should be legible off course!)   4. The animation as if someone is writing there but fast enough to justify electronic presentation. Other standard beamer things.  May be someone like the idea and help.


title: Texstudio compile not compile current document

text: I worked and compiled a document and create a new one. I attempt "Build & View" newly created document but TeXstudio compiles only old one.


title: ClassicThesis in Spanish Language Using Lyx

text: The problem is the following: I'm using classicthesis to write my thesis, and I need the names of the captions displayed in spanish (e.g. "figura" instead of "figure"), so I uncommented the next line, in the `classicthesis-config.tex`:               \PassOptionsToPackage{spanish,es-lcroman}{babel}      \usepackage{babel}      So when I make the pdf from one chapter, the captions are displayed in spanish, but when I make the pdf from Classicthesis.lyx (the master document) the output pdf have the captions in english. I tried changing the idiom of the master document and the child documents, but wasn't help. I don't know what other thing do, I hope you can help me.


title: How to change the order of the word eds. in @incollection field in a bst file?

text: I'm tweaking a customised bst file and I got stuck with this issue. I want the word eds. to appear before the editors' names, not after. I'm getting Saalfeld, Thomas. 2000. “Germany: Stable parties, Chancellor Democracy, and the Art of Informal Settlement.” In Coalition Governments in Western Europe, Wolfgang C. Muller and Kaare Strøm, eds., pages 32–85, Oxford: Oxford University Press. But should be Saalfeld, Thomas. 2000. “Germany: Stable parties, Chancellor Democracy, and the Art of Informal Settlement.” In Coalition Governments in Western Europe, eds. Wolfgang C. Muller and Kaare Strøm, pages 32–85, Oxford: Oxford University Press. The function in the bst file that has to do with it is               FUNCTION {format.in.ed.booktitle}     { format.booktitle duplicate$ empty$ 'skip$       {       format.bvolume duplicate$ empty$ 'pop$         { ", " swap$ * * }       if$       editor "editor" format.names.ed duplicate$ empty$ 'pop$         {           get.bbl.editor           swap$ "," *           " " * swap$ *           swap$           "," *           " " * swap$           * }       if$       word.in swap$ *       }       if$       }      The function that adds the word ed. is get.bbl.editor, but I have not managed to change the order where it appears. Does anyone know how to do that or is there a macro I can use in my preamble to do that? Edit: Here is my bibtex entry               @incollection{saalfeld:2000,     address = {Oxford},     author = {Saalfeld, Thomas},     booktitle = {Coalition Governments in Western Europe},     editor = {M\"{u}ller, Wolfgang C. and Str{\o}m, Kaare},     pages = {32--85},     publisher = {Oxford University Press},     title = {{Germany: Stable parties, Chancellor Democracy, and the Art of Informal Settlement}},     year = {2000}     }


title: New Format list of figure

text: This is what I want : ![enter image description here](http://i.stack.imgur.com/6L03w.jpg) I'm really being crazy with latex. this is my code for toc :               \renewcommand\tableofcontents{%     \if@twocolumn       \@restonecoltrue\onecolumn     \else       \@restonecolfalse     \fi          \chapter*{\contentsname         \@mkboth{%            \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%     {\raggedleft\normalfont Hal \par}%           \@starttoc{toc}%      \linespread{1}      \if@restonecol\twocolumn\fi     }      Hal is page number. could anyone help me please ? Many thanks in advance


title: Continuous numbering of figures and tables

text: I want the figures and tables to be numbered 1, 2, 3, ... until the end of the document instead of 1.1, 1.2, ... in chapter I, 2.1, 2.2, ... in chapter II and so on. I know how to convert the "chapter" part of figure/table numbers from Roman to arabic:               \renewcommand \thefigure         {\ifnum \c@chapter>\z@ \@arabic\c@chapter.\fi \@arabic\c@figure}     \renewcommand \thetable         {\ifnum \c@chapter>\z@ \@arabic\c@chapter.\fi \@arabic\c@table}      One could modify the above code in order to remove the "chapter" part, but the figure/table counters would still be reset to 0 at the start of new chapters.


title: Possible CSS type features?

text: Hi I am doing a project for my 10th grade Graphic design class and we have to make up an inspirational type thing with the emotion words Bold, in a bigger size and capitalized and I was wondering if there is a way in TeX to Make a predetermined list of words to have effects on them sort of like CSS for HTML were I make that list and tell it to have those effects and Whenever I type them they will output to the effects I told it to do. here is an example > **HI** how was **YOUR** day **I** hope it was **GREAT**.


title: How to efficiently define a variable for an ordered pair?

text: So, I would like to know how to efficiently define a variable (of ordered pair), so I can populate the plane with a particular polygon at certain positions. In particular, I started using this:               \begin{tikzpicture}     \foreach \y in {0} {     \foreach \x in {0,4,11} {         \draw (\x,\y) -- (\x +1,\y) -- (\x +1,\y +0.5) -- (\x +0.5,\y +0.5) -- (\x +0.5,\y +1) -- (\x,\y +1) -- (\x,\y);}}      \end{tikzpicture}      But then, I realized, that I have to change `\y` as well for certain values of `\x`. Instead, I prefer to have with something like > for (`\x`,`\y`) in {(a,b), (c,d), etc.} where I can freely define a,b,c,d... and follow this with `\draw`. Any help or suggestions would be greatly appreciated. Thanks!


title: Biblatex problem with authoryear-comp style

text: I'm having an unexpected problem with the `authoryear-comp` style in Biblatex. See this MWE:               \documentclass{article}     \usepackage[style=authoryear-comp,firstinits=true]{biblatex}     \usepackage[autostyle=false, style=british]{csquotes}          \begin{filecontents}{\jobname.bib}       @article{JoeDoe2012,         Author = {Joe Doe},         Title = {My article's title},         Journal = {My journal's title},         Editor = {Ben Editor},         URL = {http://webpage.com},       }     \end{filecontents}          \addbibresource{\jobname.bib}          \begin{document}       \cite{JoeDoe2012}       \printbibliography     \end{document}      When I compile, instead of getting `Doe 2012` when citing, I get the article's title. ![enter image description here](http://i.stack.imgur.com/64P5P.png) Is there something (obvious) I'm forgetting here?


title: Putting the symbol hat in math mode in LaTeX

text: ![enter image description here](http://i.stack.imgur.com/7k2eC.png) How to put the hat in the above symbol in LaTeX?


title: Defining \ang in siunitx

text: My Problem: I see that `siunitx` needs Latex3 support. Unfortunately I don't have this support (with respect to using latex on a server for which I am not admin). An older version of `siunitx.sty` (2009/03/29 v2.0alpha) works for me until I want to use `\ang`. So Hence My Question: what is the explicit macro I need so that I can have `\ang` and continue using the older version of `siunitx`?


title: How to create multilingual (English, Japanese) bibliographies with biblatex, biber and polyglossia

text: I would like to update my bibtex file in a way that allows me to create multilingual bibliographies. Since I publish in English and Japanese, I will need this to work in a way that: In an English paper,   * Japanese entries in the Bibliography will have the names of authors both in Kanji and in Romanization; titles will also have to be duplicated in this way, but in addition I sometimes also translate the title, so there might be three entries.    * English citations will appear as usual. In a Japanese paper   * The Japanese entries will be just author, title etc in Kanji, without additions.   * The English entries might have a translation of the title and give the Author in Japanese Katakana spelling. To enable this, I thought of extending the bibtex entries in the following way               @collection{yanagida_zengaku_sosho_1975,         Address = {京都},             Adress_Romaji = {Kyōto}         Editor = {柳田聖山},             Editor_Romaji = {Yanagida Seizan}         Publisher = {中文出版社},         Publisher_Romaji = {Chūbun shuppansha},         Title = {禪學叢書},         Title_Romaji = {Zengaku sôsho},             Title_en = {Collected Materials for the Study of Zen}         Volumes = {10},         Year = {1974-1977}}      I then hope that I will be able to pull the necessary pieces out of here and process them with biber and biblatex. How to go about that, I have no idea.


title: Creating a ConTeXt/LaTeX hybrid module

text: I have a simple titlepage, which I want to make available for ConTeXt- as well as LaTeX users. Each should just type `\usemodule[myTitlepage]`, or `\usepackage{myTitlepage}`, respectively. I want to do this by determining if LaTeX is used, and if so, define all used ConTeXt-macros to their LaTeX equivalents, so that the titlepage can be written in ConTeXt, similar to this:               \ifLaTeX         \newcommand{\starttikzpicture}[1]{\begin{tikzpicture}[#1]}         \newcommand{\stopttikzpicture}   {\end  {tikzpicture}    }         \newcommand{\crlf}{\\}         ...     \else         \doConTeXtRelatedStuff     \fi          \starttikzpicture[scale=3]         \node [text centered] {it works! \crlf or does it?};     \stoptikzpicture      What do I use instead of the pseudocode `\ifLaTeX` and will the whole idea likely work?


title: biblatex ignores own lbx file

text: I’m trying to build an own `biblatex` style named `musuos` for that I created the two style files `musuos.bbx` and `musuos.cbx` which look like the following:               \ProvidesFile{authoryear-musuos.bbx}[2011/05/06 v1.0 Musikwissenschaften Uni Osnabrueck]     \RequireBibliographyStyle{authortitle}     ...     \endinput      and               \ProvidesFile{authoryear-musuos.cbx}[2011/05/06 v1.0 Musikwissenschaften Uni Osnabrueck]     \RequireCitationStyle{verbose-ibid}     \ExecuteBibliographyOptions{         autocite=footnote,          labelyear=true,         dashed=false,         urldate=long,     }     ...     \endinput      If I load them with `\usepackage[style=musuos]{biblatex}` everything is fine. But now I need to adjust a language string. For that I built the file `german- musuos.lbx` and saved it in the same directory as the style files.               \ProvidesFile{german-musuos.lbx}[2011/09/10 v1.0  biblatex localization file]          \InheritBibliographyExtras{german}          \NewBibliographyString{bibcitedas}          \DefineBibliographyStrings{%       bibcitedas = {{zitiert als}{zit. als}},       urlseen = {am},     }          \endinput      But it seems that the `lbx` file isn’t loaded. What do I have to do to make `biblatex` use it?


title: TikZ Plotting: Braces between tickmarks

text: What is the best way to draw braces between tick marks? It would be convenient to assign nodes at tick marks, is this doable? The best method for placement that I have right now is a guess-and-check. MWE:               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{patterns,decorations.pathreplacing}     \usepackage{pgfplots}     \pgfplotsset{compat=1.10}          \begin{document}          \begin{tikzpicture}     \begin{axis}[         axis x line = middle,         axis y line = middle,         xticklabels={}         ]     \addplot [domain=-1:5] { -x * (x-4) };     \end{axis}     \draw [thick,decoration={brace,mirror},decorate] (1.2,3) -- (5.7,3) node[midway,below,yshift=-.1cm] {4};     \end{tikzpicture}          \end{document}      ![MWEpicture](http://i.imgur.com/DCnxZ4c.png)


title: "rotationally correct" AC source symbol in TikZ

text: I've been looking for a particular symbol for AC sources (the kind of circle with wavy line) and seemed to have found it here: AC source symbol in TikZ circuits.ee.IEC library. Unfortunately there is a little extra I really miss here... Once I rotate the figure 90°, the wavy line (sine inside) obviously rotates, too, something I don't want to happen. I tried a workaround by rotating the symbol back 90°, but then adding an arrow with 'direction info' will be misplaced. Another way was to draw an empty circle and make the wavy line an annotation (See section `SHAPES` and `ANNOTATIONS` in the code). Then, the arrow placed with 'direction information' is always rendered correctly, but the annotation is placed in a weird way. This can also be circumvented with extra coding, albeit not very elegantly:                   \draw (0,0) to [source={DC voltage={rotate=90,%         shift={(-1.05\tikzcircuitssizeunit,1.05\tikzcircuitssizeunit)}},%         direction info={<-}, info={above:$V_{in}$}}] (0,-2);      Does anybody happen to know a better way? Is there a possibility to prevent the                   transform shape      command used when defining the shape, to be executed on the annotation? Because that would really solve it once and for all.               \documentclass{minimal}     \usepackage{tikz}     \usetikzlibrary{circuits.ee.IEC}          \begin{document}     %SHAPES     \tikzset{circuit declare symbol=source,          set source graphic={             draw,             circuit symbol lines,             circuit symbol size=width 2 height 2,             shape=generic circle IEC,             transform shape             }         }     %ANNOTATIONS          \tikzset{circuit declare annotation=             {AC voltage}             {0\tikzcircuitssizeunit}             {(-0.6\tikzcircuitssizeunit,-1.05\tikzcircuitssizeunit) %      edge[to path={sin ++(0.3\tikzcircuitssizeunit,0.25\tikzcircuitssizeunit) %      cos ++(0.3\tikzcircuitssizeunit,-0.25\tikzcircuitssizeunit) %      sin ++(0.3\tikzcircuitssizeunit,-0.25\tikzcircuitssizeunit) %      cos ++(0.3\tikzcircuitssizeunit,0.25\tikzcircuitssizeunit)}, -] ()}         }          \begin{tikzpicture}[circuit ee IEC, thick]             \draw (0,2.25) to [source={AC voltage={rotate=90,%      shift={(-1.05\tikzcircuitssizeunit,1.05\tikzcircuitssizeunit)}},%      direction info={<-}, info={above:$V_{AC}$}}] (0,0);         \end{tikzpicture}     \end{document}      What bothers me here is that I need to specify:               shift={(-1.05\tikzcircuitssizeunit,1.05\tikzcircuitssizeunit)}}      when drawing the source rotated by 90°. If I don't do it, the wavy line is misplaced. (Try it yourself!) This is what I'd like to solve in a more elegant way. EDIT: As requested, there is a full working example (It was too long to include as a comment).


title: Automatic formatting of LaTeX table

text: I have a table `table.tex` coming from a statistical software `Stata`. I would like to know if there is a way to tell LaTeX to format, for instance, some coefficients in red and italic. Something that would automatically search and replace strings in the `table.tex` file? My setup is: WinEdt 6 on Windows 7.


title: editortype, collaborator for inproceedings

text: I can not get "in collaboration with" for @ inproceedings entry because it concerns the work and not the article as I would.               @INPROCEEDINGS{roure07,       author = {Réjane Roure},       title = {Armes et têtes coupées au Cailar (Gard): premier éléments de réflexion         sur un dépôts rituel en Gaule méditerranéenne},       booktitle = {L'âge du Fer dans l'arc jurassien et ses marges : dépôts, lieux sacrés         et territorialité à l'âge du Fer : actes du XXIX\ieme{} colloque         international de l'AFEAF, volume 2},       year = {2007},       editor = {{\relax Ph}ilippe Barral and Alain Daubigney and Cynthia Dunning         and Gilbert Kaenel and Marie-Jeanne Roulière-Lambert},       pages = {653-658},       address = {Besançon},       publisher = {Presses universitaires de Franche-Comté},       editora = {Henri Duday},       editoratype = {collaborator},       eventdate = {2005-05},       owner = {Axel},       timestamp = {2014.03.06},       venue = {Bienne}     }      A beautiful screenshot will be more understandable than my ridiculous english ![enter image description here](http://i.stack.imgur.com/WbDRP.png)               \documentclass[12pt]{report}                                                        %type de document+ police     \usepackage{fontspec}     \usepackage{xunicode}     \setmainfont[Mapping=tex-text,Numbers=OldStyle]{Linux Libertine O}          \usepackage{polyglossia}     \setdefaultlanguage{french}     %\setmonofont[Scale=0.75]{DejaVu Sans Mono}     \setotherlanguage[variant=ancient]{greek}     \setotherlanguage{english}     \usepackage{xpatch}          % Bonnes notes, sans exposant.     \makeatletter     \renewcommand\@makefntext[1]{%       \noindent\makebox[2em][r]{\@thefnmark.\space}#1}     \makeatother                    \usepackage{microtype}  %gère la microtypo     \usepackage{csquotes}     \usepackage{shorttoc}          %%% MARGES ET INTERLIGNES     \usepackage{geometry}         \geometry{a4paper}         \geometry{top=2cm, bottom=2cm, left=2cm , right=2cm}                                              %gestion interligne                                                          \usepackage{setspace}     \onehalfspacing                                                                                % interligne 1.5     \let\oldquotation\quotation                                                                     %Rédéfinit l'environnement quotation pour avoir un interligne de 1     \let\endoldquotation\endquotation     \renewenvironment{quotation}     {\begin{oldquotation}\singlespace}      {\end{oldquotation}}          %MACRO     \newcommand\cad{c’est-à-dire}     \newcommand\than{« temps d'Hannibal »}     \newcommand\avjc{av. J.-C.}     \newcommand\apjc{apr. J.-C.}     \newcommand\cnrs{C.N.R.S.}     \newcommand\dgp{deuxième guerre punique}     \providecommand{\ier}{\textsuperscript{er}}     \providecommand{\iers}{\textsuperscript{ers}}     \providecommand{\iere}{\textsuperscript{ère}}     \providecommand{\ieres}{\textsuperscript{ères}}     \providecommand{\ieme}{\textsuperscript{e}}     \providecommand{\iemes}{\textsuperscript{es}}     \providecommand{\nd}{\textsuperscript{nd}}     \providecommand{\nds}{\textsuperscript{nds}}     \providecommand{\nde}{\textsuperscript{nde}}     \providecommand{\ndes}{\textsuperscript{ndes}}     \providecommand{\no}{\textsuperscript{o}}     \providecommand{\nos}{\textsuperscript{os}}          \providecommand{\mme}{M\textsuperscript{me}\space}     \providecommand{\mmes}{M\textsuperscript{mes}\space}     \providecommand{\mr}{M.\space}     \providecommand{\mrs}{MM.\space}          %%%%%%%%%%%%%%%%%% %BILIOGRAPHIE            \usepackage[                                                                                %BILIOGRAPHIE       backend=bibtex,%       language=french,%       style=authoryear,%     firstinits,%        mergedate=false,%        style=authoryear-ibid,%        maxcitenames=2, %        maxbibnames=999,%     ]{biblatex}           \renewcommand*{\revsdnamepunct}{}     \renewcommand*{\finalnamedelim}{\multinamedelim}     \renewcommand*{\mkbibnamelast}[1]{\textsc{#1}}     \DeclareNameAlias{sortname}{last-first}     \DeclareNameFormat{last-first}{%       \iffirstinits         {\usebibmacro{name:last-first}{#1}{(#4)}{#5}{#7}}         {\usebibmacro{name:last-first}{#1}{(#3)}{#5}{#7}}%       \usebibmacro{name:andothers}}     \renewcommand*{\labelnamepunct}{\space\textendash\space}      %tiret après le label     \renewbibmacro*{date+extrayear}{}%                                          rajoute date                              \DeclareFieldFormat       [article,inbook,incollection,inproceedings,patent,thesis,unpublished]       {title}{#1}        \renewbibmacro{in:}{%                                                                 enlève guillemets articles       \ifentrytype{article}         {}         {\printtext{\bibstring{in}\intitlepunct}}}              \renewbibmacro*{issue+date}{%       \printfield{issue}%       \setunit{\addcomma\space}%       \printdate%       \newunit}          \renewbibmacro*{publisher+location+date}{%       \printlist{location}%       \setunit*{\addcomma\space}%       \printlist{publisher}%       \setunit*{\addcomma\space}%       \usebibmacro{date}%       \newunit}          \renewbibmacro*{begentry}{\printtext[bold]{\usebibmacro{cite}\addspace\addcolon\space}}            %Met les abréviations des revues     \renewbibmacro*{journal}{%       \iffieldundef{shortjournal}         {%           \iffieldundef{journaltitle}             {}             {%               \printtext[journaltitle]                 {%                   \printfield[titlecase]{journaltitle}%                   \setunit{\subtitlepunct}%                   \printfield[titlecase]{journalsubtitle}%                  }%              }%         }         {\printtext[journaltitle]{\printfield[titlecase]{shortjournal}}}%     }          %Enlever le tiret lorsqu'il y a une récurrence des auteurs     %     \makeatletter     \AtEveryBibitem{%       \global\undef\bbx@lasthash%       \clearfield{extraalpha}}     \makeatother     % "Et al." en ITALIQUE          \renewbibmacro*{name:andothers}{% Based on name:andothers from biblatex.def       \ifboolexpr{         test {\ifnumequal{\value{listcount}}{\value{liststop}}}         and         test \ifmorenames       }         {\ifnumgreater{\value{liststop}}{1}            {\finalandcomma}            {}%          \andothersdelim\bibstring[\emph]{andothers}}         {}}           %%% Histoire des noms    et al...     \makeatletter     \renewbibmacro*{begentry}{%       \renewcommand*{\mkbibnamelast}[1]{##1}%       \defcounter{maxnames}{\blx@maxcitenames}%       \printtext[bold]{\usebibmacro{cite}\addspace:\space}%       \defcounter{maxnames}{\blx@maxbibnames}       \renewcommand*{\mkbibnamelast}[1]{\textsc{\textnohyphenation{##1}}}}     \makeatother         %minuscule citation     \AtBeginDocument{\renewcommand*{\mkbibnamelast}[1]{#1}}                      %Enlève parenthèse colloque     \renewbibmacro*{event+venue+date}{                               \iffieldundef{eventtitle}         {}         {%           \bibstring{presentedat}%           \printfield{eventtitle}%         }%       \ifboolexpr{         test {\iffieldundef{venue}}         and         test {\iffieldundef{eventyear}}       }         {}         {\setunit*{\addspace}%          \printtext{%            \printfield{venue}%            \setunit*{\addcomma\space}%            \printeventdate}}%       \newunit     }                   \DefineBibliographyStrings{french}{%      byeditor = \iffieldequalstr{keywords}{source}%                               {Établit\space par}%     {dir\adddotspace\smartof},      in = {\textit{in}},%      editor           = {dir\adddotspace},%      editors          = {dir\adddotspace},%      opcit = \iffieldequalstr{entrytype}{article}{art\adddotspace cit\adddot}{\emph{op\adddotspace cit}\adddot},%     idem = {\emph{idem}},%     ibidem = {\emph{ibid\adddot}},%     %pagetotal = {p\adddot},%      %pages            = {pp\adddot},%     }     %enlève la virugule avant dir.     \makeatletter     \renewbibmacro*{bbx:editor}[1]{%       \ifboolexpr{         test \ifuseeditor         and         not test {\ifnameundef{editor}}       }         {\usebibmacro{bbx:dashcheck}            {\bibnamedash}            {\printnames{editor}%     %   \setunit{\addcomma\space}% DELETED         \setunit{\addspace}% ADDED         \usebibmacro{bbx:savehash}}%     %     \usebibmacro{#1}% DELETED          \printtext{\usebibmacro{#1}}% ADDED          \clearname{editor}}         {\global\undef\bbx@lasthash}}     \makeatother           %%modifié book pour virgule      \DeclareBibliographyDriver{book}{%       \usebibmacro{bibindex}%       \usebibmacro{begentry}%       \usebibmacro{author/editor+others/translator+others}%       \setunit{\labelnamepunct}\newblock       \usebibmacro{maintitle+title}%       \newunit       \printlist{language}%       \newunit\newblock       \usebibmacro{byauthor}%       \newunit\newblock       \usebibmacro{byeditor+others}%       \newunit\newblock       \printfield{edition}%       \newunit       \iffieldundef{maintitle}         {\printfield{volume}%          \printfield{part}}         {}%       \newunit       \printfield{volumes}%       \newunit\newblock       \usebibmacro{series+number}%       \newunit\newblock       \printfield{note}%       \newunit\newblock       \usebibmacro{publisher+location+date}%       \newunit\newblock       \usebibmacro{chapter+pages}%       \newunit\addcomma       \printfield{pagetotal}%       \newunit\newblock       \iftoggle{bbx:isbn}         {\printfield{isbn}}         {}%       \newunit\newblock       \usebibmacro{doi+eprint+url}%       \newunit\newblock       \usebibmacro{addendum+pubstate}%       \setunit{\bibpagerefpunct}\newblock       \usebibmacro{pageref}%       \newunit\newblock       \iftoggle{bbx:related}         {\usebibmacro{related:init}%          \usebibmacro{related}}         {}%       \usebibmacro{finentry}}            %Change ordre des entrées pour les in quelquechoses :        \DeclareBibliographyDriver{incollection}{%       \usebibmacro{bibindex}%       \usebibmacro{begentry}%       \usebibmacro{author/editor+others}%       \setunit{\space\textendash\space}\newblock       \usebibmacro{maintitle+title}%       \newunit\newblock          \usebibmacro{in:}%      \usebibmacro{bybookauthor}%     \newunit\newblock       \usebibmacro{byeditor+others}%       \newunit\newblock       \usebibmacro{maintitle+booktitle}%       \newunit\newblock       \printfield{edition}%       \newunit       \iffieldundef{maintitle}         {\printfield{volume}%          \printfield{part}}         {}%       \newunit       \printfield{volumes}%       \newunit\newblock       \usebibmacro{series+number}%       \newunit\newblock       \printfield{note}%       \newunit\newblock       \usebibmacro{publisher+location+date}%       \newunit\newblock       \usebibmacro{chapter+pages}%       \newunit\newblock       \iftoggle{bbx:isbn}         {\printfield{isbn}}         {}%       \newunit\newblock       \usebibmacro{doi+eprint+url}%       \newunit\newblock       \usebibmacro{addendum+pubstate}%       \setunit{\bibpagerefpunct}\newblock       \usebibmacro{pageref}%       \newunit\newblock       \iftoggle{bbx:related}         {\usebibmacro{related:init}%          \usebibmacro{related}}         {}%       \usebibmacro{finentry}}          \DeclareBibliographyDriver{inproceedings}{%       \usebibmacro{bibindex}%       \usebibmacro{begentry}%       \usebibmacro{author/editor+others}%       \setunit{\space\textendash\space}\newblock       \usebibmacro{maintitle+title}%       \newunit\newblock        \usebibmacro{in:}%       \usebibmacro{byeditor+others}%       \newunit\newblock       \usebibmacro{maintitle+booktitle}%       \newunit\newblock       \usebibmacro{event+venue+date}%       \newunit\newblock       \iffieldundef{maintitle}         {\printfield{volume}%          \printfield{part}}         {}%       \newunit       \printfield{volumes}%       \newunit\newblock       \usebibmacro{series+number}%       \newunit\newblock       \printfield{note}%       \newunit\newblock       \printlist{organization}%       \newunit       \usebibmacro{publisher+location+date}%       \newunit\newblock       \usebibmacro{chapter+pages}%       \newunit\newblock       \iftoggle{bbx:isbn}         {\printfield{isbn}}         {}%       \newunit\newblock       \usebibmacro{doi+eprint+url}%       \newunit\newblock       \usebibmacro{addendum+pubstate}%       \setunit{\bibpagerefpunct}\newblock       \usebibmacro{pageref}%       \newunit\newblock       \iftoggle{bbx:related}         {\usebibmacro{related:init}%          \usebibmacro{related}}         {}%       \usebibmacro{finentry}}          \DeclareBibliographyDriver{inbook}{%       \usebibmacro{bibindex}%       \usebibmacro{begentry}%       \usebibmacro{author/editor+others}%       \setunit{\space\textendash\space}\newblock       \usebibmacro{maintitle+title}%       \newunit\newblock        \usebibmacro{in:}%       \usebibmacro{byeditor+others}%       \newunit\newblock       \usebibmacro{maintitle+booktitle}%       \usebibmacro{bybookauthor}%       \newunit\newblock       \usebibmacro{maintitle+booktitle}%       \newunit\newblock       \printfield{edition}%       \newunit       \iffieldundef{maintitle}         {\printfield{volume}%          \printfield{part}}         {}%       \newunit       \printfield{volumes}%       \newunit\newblock       \usebibmacro{series+number}%       \newunit\newblock       \printfield{note}%       \newunit\newblock       \usebibmacro{publisher+location+date}%       \newunit\newblock       \usebibmacro{chapter+pages}%       \newunit\newblock       \iftoggle{bbx:isbn}         {\printfield{isbn}}         {}%       \newunit\newblock       \usebibmacro{doi+eprint+url}%       \newunit\newblock       \usebibmacro{addendum+pubstate}%       \setunit{\bibpagerefpunct}\newblock       \usebibmacro{pageref}%       \newunit\newblock       \iftoggle{bbx:related}         {\usebibmacro{related:init}%          \usebibmacro{related}}         {}%       \usebibmacro{finentry}}          \AtEveryBibitem{%       \iffieldequalstr{edition}{1}         {\clearfield{edition}}         {\ifboolexpr{ test {\ifentrytype{proceedings}} or test {\ifentrytype{incollection}} }            {\savefield*{edition}{\savededition}%             \clearfield{edition}}            {}}}          \DeclareFieldFormat[article,inbook,inproceedings,incollection]{pages}{pp\adddotspace #1}%               \DeclareNameAlias{sortname}{last-first}     \DeclareNameAlias{default}{last-first}


title: Is there a way to use external font files with unicode-math?

text: I use `fontspec` with LuaLaTeX to load fonts from external file even if they are not installed on the system. Such as               \usepackage{fontspec}     \setmainfont[Path=fonts/,                  Extension=.otf,                  UprightFont=*-Regular,                  ItalicFont=*-Italic,                  BoldFont=*-Bold,                  SmallCapsFont=*-AllSC,]{EBGaramond12}      I also use `unicode-math`, because it's awesome, usually with XITS Maths for the operators and numbers and EB Garamond for the letters.               \usepackage[math-style=TeX]{unicode-math}         \setmathfont{XITS Math}         \setmathfont[range=\mathbfsfit/{greek,Greek,latin,Latin}]{EB Garamond}      Is there a way to combine these packages to use the letters from the local EB Garamond instead of the system's one?


title: Revtex - using math in footnote

text: How one can use mathematics in footnote using ReVteX? I have a particular problem with `\rangle` Minimal Example:               \documentclass[aps,amsmath,amssymb, prl]{revtex4-1}          \begin{document}          TEST\footnote{footnote with math $ \langle X \rangle$ }          \end{document}      ![enter image description here](http://i.stack.imgur.com/uLI5L.png)


title: Format the LaTeX code of an array

text: Is there any editor that can nicely format the LaTeX code for an array? By nicely format I mostly have in mind aligning the `&`, as in the examples below: * * * Example 1:               \begin{array}{lcl}     z & = & a \\     & = & a \\     f(x,y,z) & = & x + y + z     \end{array}      could be formatted to:               \begin{array}{lcl}     z        & = & a         \\              & = & a         \\     f(x,y,z) & = & x + y + z     \end{array}      * * * Example 2:               \begin{bmatrix*}[r]        {1}&{ 2}  &{ \mathbf M}  \\       {48941} & {-3} &  { \mathbf M}  \\       {11} & { 6}  & {-\mathbf M}      \end{bmatrix*}      could be formatted to:               \begin{bmatrix*}[r]        {1} & { 2}  & { \mathbf M}  \\       {1} & {-3}  & { \mathbf M}  \\       {1} & { 6}  & {-\mathbf M}      \end{bmatrix*}


title: Issues using listings package

text: I am using LaTeX to write my internship report (I started to learn it one month ago), and I have some issues using the package `listings`. I'm not sure if everything is possible:   1. How can I add a specific highlighting to the code? I mean, I know how to colorize keywords or comments, but I want to add new characters or patterns (just like `@`, `$1`, `$~2` for example). Please see attached file for more information.   2. How can I switch between two languages (and therefore two different syntax highlightings) in my report? For now, I just use `command.com` (aka batch WinXP =D), but what if I want to write `C++` then, and just after, `command.com` again?   3. Then, my real problem: why do space characters become visibles at line 13 (see attachments)? To be specific, it start at line 12 when I use two double quotes (when I delete one everything is ok). I think LaTeX interprets everything as a string, but... it's not =D   4. Finally (and I think it will be tricky, and maybe impossible), is it possible to add my own language to those interpreted by `listings`? In my internship, I use mainly _WLangage_ (by PCSoft), and of course it is not known by the _listings_ package. Currently, I avoid the problem by setting my code into a `typewriter` environment and by using `\textcolor{mycolor}{mykeyword}`, which is not the best. I lost line numbers and tabulations. To understand better, here is what I got after compilation: ![Result of the compilation](http://i.stack.imgur.com/iACwc.png) And here is a minimal code of what I do:               \documentclass[10pt]{scrreprt}     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage[ansinew]{inputenc}     \usepackage[french]{babel}          \usepackage{fancyhdr}     \usepackage{numprint}     \usepackage{color}         \definecolor{bat-bg}{rgb}{.16,.19,.2}         \definecolor{bat-norm}{rgb}{.9,.9,.9}         \definecolor{bat-comm}{rgb}{.4,.45,.48}         \definecolor{bat-kw}{rgb}{.57,.78,.39}         \definecolor{bat-str}{rgb}{.2,.38,.62}                         \usepackage{listings}          \lstset{         language={[WinXP]command.com},         basicstyle=\color{bat-norm}\footnotesize\ttfamily,         numbers=left,         numberstyle=\normalsize,         numbersep=7pt,         backgroundcolor=\color{bat-bg},           commentstyle=\color{bat-comm},         keywordstyle=\color{bat-kw},         numberstyle=\tiny\color{bat-bg},         stringstyle=\color{bat-str},         tabsize=2     }          \fancypagestyle{monstyle}{         % Things that define my style         % I don't really think that fancypagestyle is the cause of the problem, but I let it     }     \pagestyle{monstyle}               \begin{document}                        \begin{lstlisting}             @echo off   rem désactive l’affichage des commandes             cls             rem efface les lignes précédentes                  rem on envoie les paramètres dans des variables             rem l’ajout du tilde supprime les double quote entourantes ("")             set requestType=%1             set params=%~2             set url=%3             set redirect=%4                  rem remplacement de "" par " et de #egal# par =             set params= %params:""="%             set url= %url:#egal#==%                  curl -X "%requestType%" %params% %url% > %redirect%         \end{lstlisting}          \end{document}      ## Update I solved my issues. To add specific highlighting to the code, I have to use `morekeywords={my, new, keywords}`, and to colorize it in an other way, I must write:               \lstdefinestyle{batch}{         language={[WinXP]command.com},         commentstyle=\color{bat-comm},         keywordstyle=\color{bat-kw},         keywords=[2]{@},         keywords=[3]{\%1,\%~2,\%3,\%4, \%params\%, \%url\%, \%redirect\%},         keywords=[4]{curl},         keywordstyle=[2]\color{bat-at},         keywordstyle=[3]\color{bat-str},         keywordstyle=[4]\color{bat-cmd}      }      And now, I know how to switch between two languages: I have to define two styles, and then use them when doing listings: `\begin{lstlisting}[style=MyOtherStyle]` And finally, to escape my double quote, I can write `escapechar={°}` in the `\lstset` and then, escape the quote in the `\begin{lstlisting}` with `°\color{mycolor}{"}°`.


title: \section and \subsection alternating in the header

text: Right now, I'm trying to finalize the layout of my diploma thesis - unfortunately I cannot figure out how to achieve the heading I want. I'm using the `amsart` document class and try to achieve the following by using the `fancyhdr` package:   * On even pages I want for the header: on the left, pagenumber on the right   * On odd pages: pagenumber on the left, on the right Here is the relevant LaTeX code:               \documentclass[twoside,12pt]{amsart}     \usepackage{amssymb,amsthm,array,arydshln}     \usepackage[toc,page]{appendix}     \usepackage{multicol}     \usepackage[usenames,dvipsnames]{xcolor}     \usepackage{tikz}     \usepackage{graphicx}     \usepackage{hyperref}     \usepackage{fancyhdr}     \usepackage{geometry}     \geometry{a4paper}          \begin{document}       \pagestyle{fancyplain}       \fancyhf{}       \lhead[\thepage]{\leftmark}       \rhead[\leftmark]{\thepage}       \title{test}       \maketitle     \end{document}      I achieved two different outputs, depending on what I put in               \lhead[\thepage]{\leftmark}     \rhead[\leftmark]{\thepage}      `\leftmark` as well as `\rightmark` will display the title instead of the title of the (sub)section; and so far, using anything else results in the display of nothing I read quite a few articles, but I am still totally lost, because none of them was written for my usage case, i.e. the `amsart` document class I appreciate any help and will provide further information if needed


title: How to find packages/classes

text: What is the "right" way to search for a package/class to solve a random problem? Whenever I need to find a new package or class, I never feel like I am doing it efficiently. I tend to use a mixture of CTAN, Google, and TeX.sx. The issue I have with CTAN is it doesn't provide any guidance on quality. Google tends to be filled with how-tos of questionable quality from various eras. TeX.sx seems to give the most up to date answer with a voting based judgment of quality (e.g., this question on CVs), but only when the question has been asked.


title: Lost my title page, author and date

text: I remember when I did type in LaTex before it would give me a front page to the document which said Title and a date.. Now it just begins right from the document body itself. No Author, No date, No front Page, No title.               \documentclass{book}     \title{The Triangulation of Titling Data in        Non-Linear Gaussian Fashion via $\rho$ Series}     \date{October 31, 475}     \author{John Doe\\ Magic Department, Richard Miles University         \and Richard Row, \LaTeX\ Academy}     \date{April 4,2013}     \begin{document}     \begin{titlepage}      Hello     \end{titlepage}     \end{document}


title: Accidental indent in multicols environment

text: I have some ugly (?) code that produces a vertical bar to the left of Sections. All is well until I introduce multicols right after the section start. That gives me an undesired indent for the first line. How can I remedy this? Visualization: ![enter image description here](http://i.stack.imgur.com/p2u4M.png)               \documentclass[11pt]{article}     \usepackage{multicol}     % Set font family to sans serif:     \renewcommand{\rmdefault}{cmss}     % Remove subsection numbering:     \setcounter{secnumdepth}{-1}     % Create PDF bookmarks:     \usepackage[pdftex,bookmarks=true]{hyperref}     % Smaller margins:     \usepackage[hmargin=3cm,vmargin=3cm]{geometry}     % Use symbols for footnotes:     \renewcommand{\thefootnote}{\fnsymbol{footnote}}     % Overload the \section command with left-hanger formatting:     \newcommand{\sectionf}[1]{%     \section[#1]{%         \rule{-2em}{0em}%         \rule[-1em]{0.125em}{3em}%         \rule{1.875em}{0em}%         #1}     }     % Bullets:     \renewcommand{\labelitemi}{$\cdot$}     \renewcommand{\labelitemii}{$\cdot$}     \renewcommand{\labelitemiii}{$\cdot$}     \renewcommand{\labelitemiv}{$\cdot$}          \begin{document}     \sectionf{Industry Experience}     \begin{multicols}{2}     Health Care\\     Health Insurance\\     Public Health\\


title: Tikz: How to display properly some linked nodes?

text: I have created the following diagram using Tikz, is there anyway to show it properly? (As it is, it is shown with all the nodes below the last one, so it is a mess)               \documentclass{article}          \usepackage[spanish]{babel}          \usepackage{tikz}     \usetikzlibrary{shapes.geometric, arrows}          \tikzstyle{io} = [ellipse, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=blue!30]     \tikzstyle{arrow} = [thick,->,>=stealth]          \begin{document}     \begin{tikzpicture}[node distance=2cm]     \node (1) [io] {1 1 1 1};     \node (2) [io, below of=1] {2 1 0 1};     \node (3) [io, below of=2] {1 0 1 2};     \node (4) [io, below of=3] {2 0 0 2};     \node (5) [io, below of=4] {0 0 2 2};     \node (6) [io, below of=5] {0 1 2 1};     \node (7) [io, below of=6] {0 2 2 0};     \node (8) [io, below of=7] {1 2 1 0};     \node (9) [io, below of=8] {2 2 0 0};          \draw [arrow] (1) -- node {t1} (2);     \draw [arrow] (2) -- node {t2} (3);     \draw [arrow] (3) -- node {t1} (4);     \draw [arrow] (4) -- node {t3} (2);     \draw [arrow] (3) -- node {t3} (1);     \draw [arrow] (2) -- node {t3} (9);     \draw [arrow] (9) -- node {t2} (1);     \draw [arrow] (1) -- node {t3} (8);     \draw [arrow] (1) -- node {t2} (5);     \draw [arrow] (5) -- node {t1} (3);     \draw [arrow] (5) -- node {t3} (6);     \draw [arrow] (6) -- node {t1} (1);     \draw [arrow] (6) -- node {t3} (7);     \draw [arrow] (7) -- node {t1} (8);     \draw [arrow] (8) -- node {t2} (6);     \draw [arrow] (8) -- node {t1} (9);          \end{tikzpicture}         \end{document}      For example, how could i show the nodes in a circle layout?


title: Open ended frame with framed.sty

text: I made a frame using the `framed` package. When a pagebreak breaks it, it is divided in two separate frames. I would like the bottom and top of these two frames to be open, and an `oframe` option is supposed to do this, but I can't seem to implement it. My frame contains multiple lines of text and `\includegraphics`. This is what I want to frame:               \begin{center}     \includegraphics[width=100mm]{image.jpg}     \end{center}     (Text)     \begin{center}     Text\\     Text\\     \end{center}      I tried this to no avail:               \begin{oframed}     \begin{center}     \includegraphics[width=100mm]{image.jpg}     \end{center}     (Text)     \begin{center}     Text\\     Text\\     \end{center}     \end{oframed}      The option `framed` instead of `oframed` works though. It seems I need to use the `\MakeFrame` command in some way.


title: Force hardspace in multiple citations

text: To cite multiple references, I'm using `\cite{foo, bar}`. Unfortunately, the second citation appears on a new page. Is there a way to force a hardspace between the two citations? This is primarily a problem because a new section begins on page 29: ![enter image description here](http://i.stack.imgur.com/8rnFj.png)


title: Aligning 3 images square in a box

text: I am trying to create a figure with 3 images: two on the left half which are on top of each other, and one on the right that spans the height of the left images. Here is what I have:               \documentclass[draft]{book}     \usepackage{graphicx}     \begin{document}         \begin{figure}             \begin{minipage}[c]{0.47\textwidth}                     \centering                     \includegraphics[width=\textwidth]{photos/image1}                     Caption                     \vfill % This does not produce the desired result                     \includegraphics[width=\textwidth]{photos/image2}                     Caption             \end{minipage}             \hfill             \begin{minipage}[c]{0.47\textwidth}                 \centering                 \includegraphics[width=\textwidth]{photos/image3}                 Caption             \end{minipage}         \end{figure}     \end{document}      Here is what the result looks like: ![enter image description here](http://i.stack.imgur.com/GAmng.png) The top of the first image on the left in not in line with the right's top, and likewise with the bottom image's border. I have `\vfill` in between the two images on the left, but I imagine it isn't functioning as the two minipages aren't the same height. Is there a way to make the minipages equal height, or perhaps there's a better way to accomplish this all together?


title: lining figures in tables and math, old style figures in text

text: I’m using TeXLive 2012, up to date on Ubuntu 12.10. When I use the `libertine` package with the option `osf` and `newtxmath` for math fonts, I get oldstyle numbers everywhere, but I only want to use them in the body, not in tables or math mode. Here’s picture of the problem and an MWE ![sample image](http://i.stack.imgur.com/XGgzE.png):               \documentclass[a4paper]{scrartcl}     \usepackage[utf8]{inputenc}     \usepackage{booktabs}     \usepackage{tabulary}     \usepackage{textcomp}     \usepackage[osf]{libertine}     \usepackage{amsmath, amsthm}     \usepackage[cmintegrals, cmbraces, libertine]{newtxmath}     \usepackage[version=3]{mhchem}          \begin{document}     Old style numbers belong in text 0123456789.     Not in equations:     \begin{equation}          \cee{C6H12O6 + 6O2 -> 6CO2 ^ + 6H2O ^ + \text{heat} ^}     \end{equation}     Nor in tables:     \begin{table}[!htb]          \begin{tabulary}{\textwidth} {LCCCCR}           \toprule           climate &           species &           mean &           median &           standard deviation &           number of experiments \          \midrule           1 & \textit{Picea abies}  & 20,3699   & 20,0335   & 4,453 & 30 \          \bottomrule           \end{tabulary}           \caption{mean, median and standard deviation}           \label{tab:mean}     \end{table}          \end{document}


title: How to make a latex document in landscape?

text: I have seen several posts related to this one, but I'm not satisfied with given explainations and examples. I can't get them working! What I want is simple landscape document. I have tried the `\usepackage{pdflscape}` but only the paper rotates not the whole thing. The coordinates(0,0) are still at the upper right. I want the origin(0,0) at the upper left just like what happens when I do MS Word Landscape layout. I really need your help. I'm using Latex.               \documentclass{article}     \usepackage[paperheight=8.5in,paperwidth=13.0in,margin=0.1in,headheight=0.0in,footskip=0.5in,includehead,includefoot]{geometry}     %%\special{papersize=279mm,216mm}     \usepackage{graphicx}     \usepackage[landscape]{geometry}     \usepackage{fancyhdr}     \usepackage{fancybox}     \usepackage{longtable}     \usepackage{setspace}     \usepackage{fmtcount}     \usepackage{color}     \usepackage{multirow}     \usepackage[absolute]{textpos}     \usepackage{yfonts}     \usepackage{rotating}     \renewcommand{\familydefault}{\sfdefault}     \pagestyle{fancy}     \renewcommand{\headrulewidth}{0pt}          \begin{document}     \begin{landscape}     {.SELECT UPPER(company_name) as c_comp,address as c_add,tel_nos as c_tel FROM tools.`clients` WHERE client_id=1}     \begin{textblock}{14}(0.75,0.08)     \raggedright{     \includegraphics[height=1.0in]{/u2/images/school/stc_logo}     }     \end{textblock}     \begin{landscape}     \end{document}


title: Arrange multiple graphics inside a subfloat

text: I'm using the `subfig` package to arrange multiple graphics inside a figure. I'm trying to arrange two graphics vertically inside a subfloat but keep getting an error. I'd like the figures to be arranged something like this:                _____   _____     |_____| |     |      _____  |     |     |_____| |_____|       (a)     (b)      But when I try               \begin{figure}     \centering     \subfloat[][]{         \includegraphics{graph1} \\         \includegraphics{graph2}     }     \subfloat[][]{         \includegraphics{graph3}     }     \end{figure}      I get the error `Something's wrong--perhaps a missing \item`. If I remove the linebreak inside the subfloat the error goes away but then my figures aren't arranged right. How should I be doing this?


title: Insert text inside a image in eps format

text: UPDATE:I tried the solution with overpic and it works fine. But the problem is, sometimes, my experimental setup changes and I have to reproduce the eps file using different parameters from Matlab. This results in me again re- adjusting the co-ordinates to align the tex code corresponding to the different objects in the image(eps format). This is difficult when I have to do it often. Is there any solution for that? QUES: I have an image of solid rectangle generated in `eps` format from Matlab. Let us say, there is no other way for me to generate the same (I have other complicated things inside this rectangle). I want to mark the co- ordinates of the corners of this rectangle. Thus, I want to insert some text of the form               $(\lambda_{min},\lambda_{max})$      inside the image. The inbuilt editor of Matlab is not satisfactory. Is there any option in LaTeX to do the same?


title: Table with cells of different widths

text: I'm trying to typeset a Word doc in LaTeX - mainly so that I can get the results I want, rather than Word (or LibreOffice) making my decisions for me. And my current difficulty consists of a few tables. One has cells with different widths in its rows:               -----------     |  |      |     -----------     |      |  |     -----------     |      |  |     -----------     |  |      |     -----------      I can get this effect with lots of multicolumns, or by doing it with TiKZ, but I would have thought there'd be an easier way. In fact, one table I have is perfectly regular, except for one cell which is divided in two, like in this second row:               -------------     |   |       |     -------------     |   |   |   |     -------------     |   |       |     -------------     |   |       |     -------------      What's the best way: tabular (or one of its variants) with multicolumn, TiKZ, or something else?


title: how to autoupdate date on beamer pdf

text: It is not uncommon (at least for me ) to compile pdf a day before. It is also not uncommon to use same pdf on some other day. So it would be handy if pdf produced displays the system date on which it is being played rather than compilation date. Is it possible?