title: Why do some vector graphics included into a document force rasterization of the whole page and subsequently ruin the look of the text in cups?

text: When I `\includegraphics` certain PDF files (for example this SVG converted with Inkscape), the output produced by LuaLaTeX or PDFLaTeX will be such that when the page containing the picture is printed with CUPS, the whole page will be rasterized which looks like the bottom example in the picture below (I have the CUPS option to "force rasterization" which produces the same bad printout with any page so CUPS or my configuration of it is surely partly to blame). The first line is the same page without that PDF included. Other PDFs work just fine, as do all raster images (which is kind of paradoxical). ![comparison of scans of printed text](http://i.stack.imgur.com/KrkLo.png) These are scans of the result of course, so please excuse the bad quality. You should still be able to see the wavy look of the "l"s and other slanted vertical lines. * * * Here for a comparison the rasterized output as a PDF: ## ![pdf rendering](http://i.stack.imgur.com/vQOfN.png) I experimented a bit with different PDF viewers and printing to PDF instead of wasting paper. Here is what okular produced: ![okular output](http://i.stack.imgur.com/sZrO8.png) And this is acroread at the same zoom level: ![acroread output](http://i.stack.imgur.com/FEg0W.png) If you watch closely, acroread might just have a slight edge ;) Even when forcing acroread to "print as image" as I suppose the "force rasterization" option is named here, the result looks much better: ![acroread output when forcing image](http://i.stack.imgur.com/yLnIa.png) I don't know if it looks like the insane 2400 dpi it's supposed to be but still (these pictures are printed at about the text size of `\small`) .


title: style/class file for LACUS

text: Are there any linguists here who know of a style/class file for the LACUS conference? My tex-fu isn't quite good enough to make my own. The guidelines for it are here, but lacus.org doesn't seem to have any template that can be used, except a Word template for abstracts. What makes things worse, googling for "latex lacus" brings up all of these documents with "Nam lacus libero" and other Latin phrases.


title: Kile KDE installation under window 7

text: I've encountered a problem very similar to this: I'm trying to run Kile 2.9.60 on windows through KDE 4.8.00. After successfully installing Kile with the dependent packages (Kile, Kate, kde-baseapps,kde-workspace,okular), I've managed to run it but I cannot compile PDF files. I get the following error: > [Kile] Unknown tool LivePreviewPDFLaTeX. Has anyone else encountered this problem? Is there is a known solution, googling the phrase above did not yield anything interesting.


title: Equal spacing for figures and listings

text: I want to include figures and listings in my document and I want them to have the same spacings to text and captions.               \documentclass[a4paper,12pt,openany,parskip,oneside,ngerman,headsepline]{scrbook}     \usepackage{float}     \usepackage{graphicx}     \usepackage{caption}     \captionsetup{font=small,labelfont=bf}     \usepackage{listings}     \lstset{captionpos=b,frame=single}          \begin{document}     Some text          \begin{lstlisting}[caption={Some caption}]     Some code     \end{lstlisting}          Some text          \begin{figure}[H]         \includegraphics[width=\textwidth]{image.png}         \caption{Some caption}         \label{fig:test}     \end{figure}          Some rext     \end{document}      The result is following (I added boxes to show the spacing). ![Spacings](http://i.stack.imgur.com/DxM7p.jpg)   1. As you can see, the red boxes have the same spacing. How can I make the spacing start above/below the frame?   2. The spacing below the figure is bigger than the listing. How can I make them the same?


title: Multiple footnotes at one point

text: I'm trying to create multiple footnotes referencing from one point, that look like this: > lorem1,2 Searching for "multiple footnotes" shows up almost exclusively solutions for multiple references to one footnote. Here I have two separate footnotes, pointing from one place. I also don't want to merge them into one, because I tried it and it looks ugly. Currently I resolved it in a quick and dirty way, writing:               lorem\footnote{foot1}$^{,}$\footnote{foot2}      Which shows up in the resulting PDF just fine, but I feel somehow bad about it. Is there a better way to do it?


title: Recommended color for hyperlinks in a CV

text: I'm using the `hyperref` package, and I'm curious if there is a recommended color for hyperlinks. At the moment I am using `urlcolor=BlueViolet` which looks great onscreen, but when printed in b&w it looks a little grainy. Is there a recommended color that can satisfy the criteria of looking good onscreen and one that is printable in b&w?


title: order of appearance of authors in bibliographic entries

text: Im trying to have the bibliographic list defined for my document using `natbib`. While styles such as `unsrtnat` gives me a the references in order of appearance in text, however, I have a problem that cannot get around. Basically if a reference is supposed to look like: > Tyson J.P. Dikstra M. Holmes F.M.R. Theoretical Analysis on Effect of > Anomalous Low Friction. International journal of Placticity, 34(3-4):413, > 1997. after typesetting it appears as : > Dikstra M. Holmes F.M.R. Tyson J.P. Theoretical Analysis on Effect of > Anomalous Low Friction. International journal of Placticity, 34(3-4):413, > 1997. In other words, it puts the first author in the last place. Is there any method of getting around this?               \usepackage[round,comma]{natbib}          \begin{document}               As an alternative method of analysis,\citep{Tyson1997} ...               \bibliographystyle{unsrtnat}      \bibliography{refs}               \end{document}      The entry as it appears in the .bib file is :               @ARTICLE{Tyson1997,     author={Tyson, J.P., Dikstra, M., Holmes, F.M.R.},     title={Theoretical Analysis on Effect of Anomalous Low Friction.},     journal={International journal of Plasticity},     year={1997},     volume={34},     number={3-4},     pages={413},     document_type={Article}     }      Sorry egreg, This is my 1st post. I was not aware of the rules.


title: Adding Arrows to Lines Drawn in TikZ

text: I am using the markup listing from Draw comparison lines between two listings.               \documentclass{article}     \usepackage{listings}% http://ctan.org/pkg/listings     \usepackage{tikz}% http://ctan.org/pkg/pgf     \usetikzlibrary{calc}          % http://tex.stackexchange.com/questions/1559/adding-a-large-brace-next-to-a-body-of-text/1570#1570     \newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node (#1) {};}          \lstset{         frame=single,         mathescape % Allows escaping to (La)TeX mode within $..$     }          \begin{document}          \noindent\begin{minipage}{.45\textwidth}     \begin{lstlisting}[caption={Original code}]       1 $\tikzmark{L1line1}$       2       3       4 $\tikzmark{L1line4}$     \end{lstlisting}       \end{minipage}\hfill       \begin{minipage}{.5\textwidth}     \begin{lstlisting}[caption={Code after insertion of detour}]      $\tikzmark{L2line1}$ 86      $\tikzmark{L2line4}$ 4     \end{lstlisting}        \end{minipage}          \tikz[overlay,remember picture] \draw[color=red] ($(L1line1)+(0pt,0.7ex)$) -- ($(L2line1)+(0pt,0.7ex)$);     \tikz[overlay,remember picture] \draw[color=blue] ($(L1line4)+(0pt,0.7ex)$) -- ($(L2line4)+(0pt,0.7ex)$);     \end{document}      This results in the following: ![](http://i.stack.imgur.com/39uH8.png) I want to add arrowheads on the end of each line - 4 in this case. I've attempted to edit the markup with the help of Drawing Arrows in Tables but haven't been able to progress much. Could someone please show me how arrowheads could be plotted in this case?


title: How to typeset some text including math content in sans serif

text: I have a blurb of text in an external macro `\SomeText`, which I want to typeset in sans serif. However, `\sffamily\SomeText` does not change the math font and `\sffamily\mathsf{\SomeText}` does not work, as I am not in math mode. So how can I typeset material in sans serif, whether it does or does not include math stuff?               \documentclass{article}     \usepackage{lmodern}          \newcommand{\SomeText}{This is some ($words \geq 5$) Text with math stuff in it: $a^2+b^2=c^2$}          \begin{document}       \begin{description}         \item[Roman:] \SomeText         \item[Sans:] {\sffamily \SomeText \\ (however, the math is still Roman)}          %    LaTeX Error: \mathsf allowed only in math mode     %    \item[AllSans:] {\sffamily\mathsf \SomeText}       \end{description}     \end{document}


title: How to define an environment only if it is not defined yet using etoolbox

text: I am not sure which test to use. This seems to work:               \ifcsmacro{myenvironment}{}{         \newenvironment{myenvironment}{Not seen so far.}{End.}     }      Is that ok, or should I use another test? Moreover, should I not use etoolbox? I am using etoolbox for other tasks, so using it here seems natural.


title: Horizontal hierarchy tree in tikz-qtree: bad layout for longer node-names

text: I'm trying to set a number of hierarchy trees directly in LaTeX and found `tikz-qtree` quite helpful for this task. Since the descriptions for the nodes and children are rather long words, the layout doesn't seem optimal in a vertical tree. Additionally, I'll merge those trees in a bigger tree and then things start getting crowded. So, I thought of a horizontal tree. They're nice, too. But I just cannot get them to work properly. The `tikz-qtree`-manual is pretty short and the containing example-nodes consist of a small number of letters only. What I'm trying to achieve is something like the first tree, but "rotated" by 90°. The titles of nodes and children will be long (sometimes several words) and it will be a total of three levels in the end. Simply growing the first tree to the right does not suffice. :) Where can I find documentation about the properties of the "edge from parent path"-parameter? I didn't find them in the `tikz`-manual either. I looked into the regular `tikz`-package, too, but ran into similar issues there. `tikz-qtree` has a prettier syntax, so I stuck with it.. Maybe something like `dirtree` would be suited better? Anyway, here's a minimal working example:               \documentclass{article}          \usepackage{tikz}     \usepackage{tikz-qtree}          \begin{document}          Nice vertical tree. Bad for lots of subcategories.     \begin{figure}[h!]     \centering     \begin{tikzpicture}     \tikzset{edge from parent/.style=                  {thick, draw,                     edge from parent path={(\tikzparentnode.south)                                             -- +(0,-8pt)                                             -| (\tikzchildnode)}}}     \Tree          [. parent              [. {nice child0} ]             [. child1 ]              [. child2 ]             [. child3 ]         ]     \end{tikzpicture}     \end{figure}          Vertical tree with different growth direction. Doesn't look quite right. o\_O     \begin{figure}[h!]     \centering     \begin{tikzpicture}     \tikzset{grow'=right, edge from parent/.style=                  {thick, draw,                     edge from parent path={(\tikzparentnode.east)                                             -- +(0,-8pt)                                             -| (\tikzchildnode)}}}     \tikzset{every tree node/.style={anchor=base west}}      \Tree          [. parent              [. {nice child0} ]             [. child1 ]              [. child2 ]             [. child3 ]         ]     \end{tikzpicture}     \end{figure}          Nice horizontal tree. Good for lots of subcategories, but `wrong' edges.     \begin{figure}[h!]     \centering     \begin{tikzpicture}     \tikzset{grow'=right,level distance=32pt}      \tikzset{execute at begin node=\strut}      \tikzset{every tree node/.style={anchor=base west}}      \Tree            [.p             [.c0 ]             [.c1 ]             [.c2 ]             [.c3 ]         ]     \end{tikzpicture}      \end{figure}          Almost identical horizontal tree as above, but messed up layout for longer node-names.      \begin{figure}[h!]     \centering     \begin{tikzpicture}     \tikzset{grow'=right,level distance=32pt}      \tikzset{execute at begin node=\strut}      \tikzset{every tree node/.style={anchor=base west}}      \Tree            [.parent             [.c1 ]             [.c2 ]         ]     \end{tikzpicture}      \end{figure}          \end{document}      Thank you guys for any pointers and your help!


title: bibtex large spacing

text: I couldn't find a solution to my problem searching. Apologies if it has been asked before. My problem is: on a few of my bibliography entries, there are massive spaces in the text to pad out the lines, how can I avoid this to improve the appearance? ![enter image description here](http://i.stack.imgur.com/al4oP.png)


title: Optional ornament

text: For chapters that end with a mostly empty page, I'd like to insert some form of ornament. The ornament should not be inserted if there is not enough room in the page. Is there some way of testing available vertical space? (I don't need any help for inserting the ornament per se, only with testing the availability of vertical space in the current page. What I want to avoid is the ornament ending up all by itself on a useless otherwise blank page.)


title: Representing linguistic text annotations in LaTeX

text: I'm writing a document describing the semantics of opinion phrases in English, and in order to do so, I'm annotating particular spans of text as having particular semantic functions within the opinion. So far, my results look something like this (with the TeX code that typesets each one underneath). ![Example #31](http://i.stack.imgur.com/nNp9b.png)               \enumsentence{         \target{The Lost World}         was a          \comparator{\attitude{better}}         \superordinate[1]{book}         \comparatorthan{than}         \superordinate[2]{movie}.     }      ![Example #34](http://i.stack.imgur.com/qU659.png)               \enumsentence{         \evaluator{I} thought         \target[1]{they} were          \comparator{less} \attitude{controversial} \comparatorthan{than}         \target[2]{the ones I mentioned above}.     }      ![Example #42](http://i.stack.imgur.com/GYN4n.png)               \enumsentence{         \target{A real rav muvhak ends up knowing you very well,         very intimately one might say}          - in a way that I am not sure is actually          \attitude{very appropriate}          or easy to negotiate          \aspect{when the sexes differ}.     }      The different annotation commands `\target`, `\attitude`, `\aspect`, `\superordinate`, and `\comparatorthan` are all defined to set the formatting to italic or bold-italic text, surround the text that's annotated in brackets and place the annotation name in subscript outside the brackets. The problem is that I don't really like this notation. The subscript annotation names make it hard to easily identify the words in the sentence, and long annoation names have the tendency to cause overfull hboxes. Overlapping annotations are also not as nice as they could be. So here's my request. Can you all think of more creative, nicer ways to present the same information? Note: preferably I'd like to do this by only redefining the annotation commands (and not changing the commands found in the 100 or so examples that are in this document already). Also, annotations are supposed to overlap in some cases, like in example 31, so any solution needs to account for that. Also note that in example 42, one of the annotations has to wrap.


title: How to avoid orphan or widow when using tcolorbox?

text: My MWE below should not be simplified anymore to avoid breaking my real scenario. The settings are tightly coupled. ![enter image description here](http://i.stack.imgur.com/sSUk0.gif)               \documentclass{article}     \usepackage[a6paper,vmargin=15mm,hmargin=5mm]{geometry}     \usepackage{times}     \usepackage{helvet}     \usepackage{courier}     \usepackage[T1]{fontenc}     \usepackage{mathtools}     \allowdisplaybreaks     \usepackage{amssymb}% for \mathbb     \usepackage{tcolorbox}     \usepackage{cancel}     \usepackage{microtype}               \tcbuselibrary{breakable}     \newcounter{exercise}[subsection]     \makeatletter     \@addtoreset{exercise}{section}               \renewcommand{\theexercise}{%         \ifnum\value{subsection}>0\relax             \thesubsection         \else             \thesection         \fi         .\arabic{exercise}%     }          \newenvironment{exercise}     {\par\smallskip\refstepcounter{exercise}     \begin{tcolorbox}[breakable,title=Exercise \theexercise,left=0mm,lefttitle=2mm,shrink break goal=18pt]\ignorespaces}     {\end{tcolorbox}\par\smallskip\ignorespacesafterend}               \makeatother          \def\IncludeGraphics{\rule{4cm}{1.5cm}}          \begin{document}     \begin{exercise}     xxxxxxxx xxxxxxxxx xxxxxxx.     \begin{enumerate}         \item $-2x>4$         \item $7x-1<13$         \item $\tfrac{x-1}{2}\leq\tfrac{x+1}{3}$         \item $x^2 -5x +6 \geq 0$         \item $x^2 < 16$         \item $(x-1)^2(x+2)^3 > 0$         \item $\frac{(x-1)^2}{(x+2)^3} \geq 0$     \end{enumerate}     \tcblower     \begin{enumerate}     \item      $\!     \begin{aligned}[t]     -2x &>4\\     x   &< \frac{4}{-2} &&\text{\parbox{5cm}{\color{red}\scriptsize xxxx xxxxx xxxx xxxxxx $-2$. xxxxx xxxxxxxxxxxxxx xxxxx xxxxxxx xxxx xxxxxxx xxxx xxxxxxx xxxxxx xxxxxxxx xxxxxxx}}\\     x       &< -2     \end{aligned}     $     \item     $\!     \begin{aligned}[t]     7x -1   &< 13\\     7x      &< 13 +1\\     7x      &< 14\\     x           &< \frac{14}{7}\\     x       &< 2     \end{aligned}     $     \item      $\!     \begin{aligned}[t]     \frac{x-1}{2} &\leq \frac{x+1}{3}\\     \frac{x-1}{2} \times 2 \times 3 &\leq \frac{x+1}{3} \times 2 \times 3\\     \frac{x-1}{\bcancel{2}} \times \bcancel{2} \times 3 &\leq \frac{x+1}{\bcancel{3}} \times 2 \times \bcancel{3}\\     3(x-1) &\leq 2(x+1) \\     3x-3 &\leq 2x +2\\     3x-2x &\leq 2 +3\\     x &\leq 5     \end{aligned}     $     \item      xxxxxxxx xxxx xxxxx xxxx xxxxxx xxx xxx xxxxxxxxx xxxxxxxx xx xxxx xxxx.     \begin{align*}         x^2 -5x +6 &\geq 0\\         x^2 -3x -2x +6 &\geq 0\\         x(x-3) -2(x-3) &\geq 0\\         (x-3)(x-2) &\geq 0     \end{align*}     {\color{red}xxxxxx xxxxxxx xxxxxxx xxx!     \begin{align*}         x-3&\geq 0 &&\text{or} & x-2&\geq 0\\         x&\geq 3 && \text{or} & x&\geq 2     \end{align*}\par}     xxxxxxxxxxx xxxxx xxxxxxxx~\ref{enum:xxxxxxx-xxxxxxxxxxxxxx}. xxxxxxx xxx xxxxxx xxxxxxxxxx.     \begin{center}     \IncludeGraphics     \end{center}     xxxxxxx xxxxxxxx xxxxxx $\{\, x\in \mathbb{R} \mid x\leq 2\vee x\geq 3\,\}$ xxxxxx xxxxxx $\vee$ xxxxxx ``xxxx''.     \item      xxxxxxxx xxxx xxxxx xxxx xxxxxx xxx xxxxxxxx xxxxxxxxx xxxx xxxx.     \begin{align*}     x^2 &< 16\\     x^2 -16 &< 0\\     x^2 -4x +4x -16 &< 0\\     x(x-4) +4(x-4) &< 0\\     (x-4)(x+4) &< 0     \end{align*}     {\color{red}xxxxxx xxxxxxxxx xxxxxxx xxxxxxxxxxx     \begin{align*}     x-4 &<0 &&\text{or} & x+4 &< 0\\     x &<4 &&\text{or} & x &<-4     \end{align*}\par}     xxxxxxxxxxxxx xxxxxxxxx xxxxxxxx~\ref{enum:xxxxxxx-xxxxxxxxxxx}. xxxxxxxxx xxxxxxxx xxxxxx xxxxxxxxxx.     \begin{center}     \IncludeGraphics     \end{center}     xxxxxxx xxxxxx xxxxxxx $\{\, x\in \mathbb{R} \mid x > -4 \wedge x < 4\,\}$ xxxxxxx xxxxxxxx $\wedge$ xxxx ``xxx''. xxxxxxxxx $\{\, x\in \mathbb{R} \mid x > -4 \wedge x < 4\,\}$ xxxxxx xxxxxxxxxx xxxxxxxxxx $\{\, x\in \mathbb{R} \mid -4 < x < 4\,\}$.     \item      xxxxxxxx xxxxx xxxxxxx xxxxxx xxxxxxxxxx xxx xxx xxxxx xxxxx xxxxxxx xxxxxxx xxxxxxx xxxxx xxxxx xxxx xxxxxxxxxx xx xxxxxxxx.     \begin{align*}     (x-1)^2(x+2)^3 > 0     \end{align*}     xxxxxxxxxxxxx xxxxxxxxx xxxxxxxx~\ref{enum:xxxxxxx-xxxxxxxxxxx}. xxxxxxxxx xxxxxxxx xxxxxx xxxxxxxxxx.     \begin{center}     \IncludeGraphics     \end{center}     xxxxxxxxx xxxxxxx xxxxxxxx $\{\, x\in \mathbb{R} \mid x > -2 \wedge x \ne 1\,\}$ xxxxx xxx $\wedge$ xxxxxxx ``xxxx''.     %     \item      xxxxxxxxx xxxx xxxxx xxxxx xxxxxx xxx xxx xxxxxxx xxxx xxxxx. xxxxx xx xxxx xxxxx xxxxxxx xxxxx xxx xxxxx xxxxx xxx.     \begin{align*}     \frac{(x-1)^2}{(x+2)^3} \geq 0\\     (x-1)^2(x+2)^3 \geq 0 && \text{xxxx $x\ne -2$}     \end{align*}     xxxxxxxxxxxxx xxxxxxxxx xxxxxxxx~\ref{enum:xxxxxxx-xxxxxxxxxxx}. xxxxxxxxx xxxxxxxx xxxxxx xxxxxxxxxx.     \begin{center}     \IncludeGraphics     \end{center}     xxxxxxx xxxxxx xxxxxx $\{\, x\in \mathbb{R} \mid x > -2 \,\}$.     \end{enumerate}     \end{exercise}     \end{document}      ## Problems:   1. There are unwanted blank pages.   2. The inconsistent color scope occurs. The continued parts in different broken page loses the color scope of the previous pages.    3. There is an unwanted orphan/widow effect.   4. The last `\item` cannot be removed without affecting the color scoping. How to fix these issues? ## Edit: The problem fixed! I am trying to find another bug. :-)


title: calling latex from php: security issues

text: I am trying to program a web interface for automated generation of calculus tests. The idea is to take some input from user, say number of problems and name of instructor, and then by means of php generate the latex file, process it with pdflatex and let user download it. The procedure seems to be quite straightforward. But what if somebody enters for instructor name something like "Mr. Mackey \input{/etc/hosts}" ? looks like one can retrieve any file accessible to web server. How to prevent this? May be there are natural php ways? I am very new to php, and would appreciate any advice.


title: Error when using colour in \author

text: I am getting an error when I try to use `\color{}` in the the author field with `beamer`, even though the file compiles and I get the the words I want coloured in the author field. This is the error description: > ERROR: Argument of \beamer@stripands has an extra }. > > --- TeX said --- \par l.8 ...\ \small \vspace{1cm} \color{viv} My name} > > --- HELP --- From the .log file... > > I've run across a `}' that doesn't seem to match anything. For > example,`\def\a#1{...}' and `\a}' would produce this error. If you simply > proceed now, the`\par' that I've just inserted will cause me to report a > runaway argument that might be the root of the problem. But if your `}' was > spurious, just type`2' and it will go away. My MWE:               \documentclass{beamer}          \usepackage{color}     \definecolor{viv}{RGB}{255,109,254}     \title[]{\Large Credit and Banking in a DSGE Model\\ of the Euro Area}      \author[]{\Large Gerali, Neri, Sessa and Signoretti (2010) \\ \small \vspace{1cm} \color{viv} My name}          \begin{document}         \begin{frame}       \titlepage     \end{frame}       \end{document}      This MWE compiles and gives me the words "My name" coloured as desired. If I get rid of `\color{viv}` I no longer get the error message, but then, I don't get the colouring as I wish. Does anyone know why I am getting this error message and how I can fix it?


title: Href in \subtitle

text: How can i put `href` at the page subtitle? I have a:               \usepackage[%       verbose,       colorlinks=true,       naturalnames=true,       linkcolor=blue,     ]{hyperref}     \begin{document}          %     % Title page     %     \title{Title}     \subtitle{Subtitle}     \setkomafont{subtitle}{\normalfont\Large}     \href{http://www.wikibooks.org}{Wikibooks home}     \maketitle     \end{document}      But i'm getting link at the another page. How can i make it correctly? Thank you.


title: Top margin, memoir class and geometry package

text: I'm trying to set a very basic front page for a document with the MWE below. I'd like to have a vertical stripe running along the left margin and have all the margins set to 0pt. The layout is based on the memoir class and the page layout resorts to the geometry package. My problems are (1) that I haven't been able to set the top margin effectively to 0pt -- not even with the commented memoir class commands in the MWE below --, and (2) that the page "overflows" to a verso page -- I believe this is related to setting the minipage environment to the text height and having that undesired non-zero top margin. In the MWE I have loaded some packages that I do not really use here, but I don't think they have anything to do with the problem I'm facing. Any ideas on how to get a "real" 0pt top margin? EDIT: This is just one of the approaches I've tried to this getting this layout done, but none of the other worked either (e.g., those that included using the `adjustbox` package).               \documentclass[a4paper,11pt,extrafontsizes,twoside]{memoir}          \usepackage{xkeyval,calc,etex,etoolbox}     \usepackage{graphicx}     \usepackage[dvipsnames,svgnames]{xcolor}     \usepackage[pagecolor={none}]{pagecolor}     \usepackage{ifthen,ifpdf,ifxetex}     \usepackage[utf8]{inputenx}     \usepackage{newunicodechar,adjustbox}          %\settrimmedsize{\stockheight}{\stockwidth}{*}%      %\settrims{0pt}{0pt}     %\setulmargins{0pt}{*}{*}          \usepackage[margin=0pt]{geometry}          \begin{document}     \pagecolor{blue}%     \pagestyle{empty}%     \newlength{\spinelen}%     \setlength{\spinelen}{\paperwidth * 1/8}%     \vspace*{0pt}%     \hspace*{\spinelen}%     \colorbox{white}{%     \begin{minipage}[t][\textheight]{\linewidth - \spinelen}     \vspace*{0pt}%     \vspace*{\stretch{1}}\par\noindent%     \textcolor{blue}{\fontsize{36pt}{40pt}\selectfont Title}     \par\vskip\baselineskip\noindent     \textcolor{blue}{\fontsize{25pt}{28pt}\selectfont Subtitle}     \par\vspace*{\stretch{5}}\par\noindent%     \normalcolor\Large%     Author1%     \par\noindent%     Author2%     \par\vskip2\baselineskip%     \par\vspace*{\stretch{2}}\noindent\normalcolor     \end{minipage}}     \clearpage     \ifxetex\pagecolor{white}\else\nopagecolor\fi%     \end{document}


title: Hyperlink to figure (reference) in PDF links to incorrect figure

text: I have a document with a few sections, I'm new to LaTeX so I'm just using the `article` class. I want the figure numbers to restart in each section. I did this with `\setcounter{figure}{0}` at the start of each section, and I figure this is somehow related to (causing) my problem but I just can't figure out a solution. The problem is when I click on a hyper-link in a figure reference to, say, Figure 1 in Section 2, it will take you back to the first figure one (back in Section 1 in this case), even if the reference specifies the correct figure by name/label. I'm using XeLaTeX and the `multicols` environment so I've included that in my MWE but I don't think they are related to the problem. I'm also using a custom `\Figure` so that the figure fits in the column nicely. Here is the MWE:               \documentclass[10pt, letterpaper]{article}      \usepackage{geometry}      \geometry{letterpaper, hmargin=1.5in, vmargin=1in, marginparsep=7pt, marginparwidth=.6in}     \usepackage{multicol}     \usepackage[small,bf,hypcap=false]{caption}     \usepackage{graphicx}     \usepackage[unicode, bookmarks, colorlinks, breaklinks]{hyperref}       \newenvironment{Figure}       {\par\medskip\noindent\minipage{\linewidth}}       {\endminipage\par\medskip}     \begin{document}          \begin{multicols}{2}[\section*{section1}]     (Figure~\ref{fig:fig1}     \begin{Figure}     \centering     \includegraphics[width=\textwidth]{apple.jpg}     \captionof{figure}{caption}     \label{fig:fig1}     \end{Figure}     \end{multicols}          \newpage     \setcounter{figure}{0}     \begin{multicols}{2}[\section*{section2}]     (Figure~\ref{fig:fig2}     \begin{Figure}     \centering     \includegraphics[width=\textwidth]{apple.jpg}     \captionof{figure}{caption}     \label{fig:fig2}     \end{Figure}     \end{multicols}          \end{document}      Here is a compiled PDF for your convenience: http://dl.dropbox.com/u/3730003/mwe6.pdf To easily witness the problem, go to the 2nd page and click on the hyperlink in the reference to the figure, it will take you back to the first page. I've been trying to use:               \renewcommand*{\theHfigure}{\arabic{section}.\arabic{figure}}       after the start of each section and this works if I use `section{}` instead of `section*{}` but with 'section*' the 'section' number stays at 0 with `\arabic{section}` and `\thesection`. Note: I'm not completely sure what `hypcap=false` does but I was getting errors from the `caption` package with the default `hypcap=true` so I switched it to `false` but it doesn't seem to change anything.


title: Horizontal array of enumerated equations

text: This is for use in work assignments for math students. I'd like to post multiple parts for a given question, without sacrificing too much space for this. So I want a bunch of equations arrayed horizontally. Each equation should be labeled as a), b) and so on. The labels should be aligned with the top of (the largest of) the boxes. And it would be nice if the space between equations were maximized to fill the whole width of the page. At the moment, I use a single `align*` environment, with the spacing between colums that this provides. I use a `\raisebox` with a manually tuned length to create place the labels in front of each. I haven't managed to span the whole width yet. The result looks like this: ![Sample image](http://i.stack.imgur.com/VE0Gr.png) I thought that maybe the adjustbox package might be able to help me automate the vertical alignment, and allow me to put `\hfill` between boxes to use the whole width, but so far I haven't managed to get my equations into such boxes. Do you have any experience in putting display math into an adjustbox?   Do you know of any other package or environment which might help me in this task?


title: Can we get .pfb files from .ttf or .otf files?

text: Say, I have a `font.ttf` or `font.otf` file. Is there any method by which we can get the `font.pfb` file from them? In other words, Can we convert `ttf` to `type1` fonts? If yes, somebody please tell me how or direct me to the right path.


title: Error using tufte-book class and biblatex

text: > **Possible Duplicate:**   >  Can I use biblatex with Tufte classes? Although there is a patch for using `biblatex` in the Tufte classes, it doesn't seem to work for me. First thing is, the `hyphenat` package produces an error stating that `\nohyphens` is already defined. Without the `hyphenat` package this error doesn't occur, but `biblatex.sty` instead states that `\bibhang`, `\bibfont` and `\citename` are already defined. I guess the `nobib` option for `tufte-book` doesn't work properly and `natbib` clashes with `biblatex`. Is this possible? And what can I do?               \documentclass[nobib]{tufte-book}          \usepackage{hyphenat}     \usepackage[                style=authoryear                ]{biblatex}     \bibliography{test.bib}               \begin{document}          Lorem ipsum dolor sit amet, consectetur adipisicing elit \parencite{someone1900}.          \printbibliography           \end{document}      * * * First of all thank you for your fast answers. Now you were right, I had the wrong `tufte-common.def`. I fixed that, but now the problem is that obviously the `hardwrap` package is also required. Since I use ubuntu linux and therefor don't have tlmgr, I installed tufte-latex by hand in the directory `/usr/share/texmf/tex/latex`, which works for tufte but not for the hardwrap package. So hardwrap has to be put somewhere else, but i don't know where. Do you have an idea? * * * The ouput of `kpsewhich -var-value TEXMFHOME` states that this directory is located in my home directory. But this directory doesn't seem to exist, because I can't change to it: if I want to do that, i.e. change to the directory as it was located by `kpsewhich -var-value TEXMFHOME`, the system states that this directory doesn't exist. Is it possible to leave the installation of `tufte-latex` intact and put the revised `tufte-common.def` in the directory I want to work in?


title: Hypcap not working with custom figure environment

text: I'm trying to use `caption` with `hypcap=true` so that cross-reference hyperlinks will go to the figure instead of the figure caption. However, I'm using a `multicol` environment with a custom figure environment so that the floats place well in the two-column document. Here is a MWE:               \documentclass[10pt, letterpaper]{article}      \usepackage{multicol}     \usepackage[small,bf,hypcap=true]{caption}     \usepackage[demo]{graphicx}     \newenvironment{Figure}       {\par\medskip\noindent\minipage{\linewidth}}       {\endminipage\par\medskip}     \usepackage[unicode, bookmarks, colorlinks, breaklinks]{hyperref}      \usepackage[all]{hypcap} %I don't know if this line is needed          \begin{document}     \begin{multicols}{2}[\section{section1}]     Figure~\ref{fig:fig1}     \begin{Figure}     \centering     \includegraphics[width=\textwidth]{apple.jpg}     \captionof{figure}{caption}     \label{fig:fig1}     \end{Figure}     \end{multicols}     \end{document}      I'm using XeLaTeX but I don't think that changes anything.


title: Column description not centered in moderncv?

text: I use my own solution/workaround to get a table formatted listings of the certificates in my CV. I don't like the fact that the description of the \cvline is centered, e.g. I have the following code:               \documentclass[11pt,a4paper]{moderncv}     \moderncvtheme[green]{classic}                       \usepackage[utf8]{inputenc}                       \usepackage{floatflt}     \usepackage{fancyhdr}      \usepackage{geometry}     \geometry{a4paper,left=2cm,right=1cm, top=2cm, bottom=1.5cm,headheight=21pt}      \usepackage{tikz}      \usepackage{wrapfig}     \usepackage{lipsum}      \usepackage[english]{babel}     \firstname{C}     \familyname{}     \title{Curriculum vitae}                   \address{}{}       \photo[128pt]{picture}                                  \begin{document}               \section{certifications}     \cvline{Microsoft}{\begin{tabular}{ l @{\hskip 0.5in} l }     Microsoft SharePoint 2010 & Sep 19, 2011\\      Microsoft Word 2010 Expert & Sep 14, 2011\\      Microsoft Access 2010 & Sep 05, 2011\\     Microsoft PowerPoint 2010 & Aug 29, 2011 \\      Microsoft Excel 2010 Expert & Aug 09, 2011\\      Microsoft Excel 2010 & Jul 14, 2011\\     &\\      Microsoft Office Master Specialist & Sep 14, 2011\\     &\\     NAV 2009 Trade \& Inventory & Mar 22, 2012\\     NAV 2009 Manufacturing & Mar 14, 2012\\     NAV 2009 Core Setup and Finance & Mar 08, 2012\\     NAV 2009 Installation \& Configuaration & Oct 04, 2011\\     \end{tabular}     \newline}     \cvline{SAP}{Terp10 SAP ERP}          \end{document}      This gives the following output: ![t1](http://i.stack.imgur.com/sSnoT.png) But I do not like that the "Microsoft" is vertically centered. So I want to have the Microsoft on the same level as the first Microsoft certification. How can I get this? So that it is on the level with the sharepoint certification?


title: Biblatex + Biber + Texmaker + MiKTeX

text: Will someone please help me to both configure Texmaker and use it so that I can use the `backend=biber` option with biblatex package. I am using MiKTeX 2.8 and Texmaker 3.1. **Please** do not simply tell me to read the manuals as I have spent most of the afternoon on them and the "working examples," rather than spending it on actually producing a paper. I think what needs to be fixed is one or both of the BIBTEX command and my QUICKBUILD command in the configuration. What I have done is to put the `biber.exe` file into the `bin` directory in my LaTeX tree which is located in `C:/Latex/MyLatex`. I tried to set the BIBTEX command to `"C:/Latex/MyLatex/bin/biber.exe" %.aux` and then used the "Quick Build Wizard" to run PDFLATEX -> BIBTEX -> PDFLATEX. The minimum working example I'm attempting is posted below. It works using `bibtex` (and deleting `backend=biber`). I would really appreciate if one of you could provide me some direct guidance.               %%% Tex File     \documentclass{article}          \usepackage[american]{babel}     \usepackage{csquotes}          %\usepackage[style=apa,sortcites=true,sorting=nyt,backend=biber]{biblatex}     %\usepackage[style=apa,sorting=nyt,backend=biber]{biblatex}     \usepackage[backend=biber]{biblatex}          \DeclareLanguageMapping{american}{american-apa}          \addbibresource{NumFactorsTest.bib}          \begin{document}          Some text is here.     \textcite{Akaike1973}     \textcite{Akaike1987}               \printbibliography          \end{document}               %%% BIB file     @InProceedings{Akaike1973,        author = {H. Akaike},        title = {Information theory and an extension of the maximum likelihood principle},        editor = {B. N. Petrov and F. Csaki},        booktitle = {2nd International Symposium on Information Theory},        pages = {267-281},        year = {1973},        location = {Budapest: Akademiai Kiado}      }          @article{Akaike1987,        author = {Akaike},        title = {Factor analysis and AIC},        journal = {Psychometrika},        volume = {52},        number = {3},        pages = {317-332},        year = {1987}     }


title: Use of a macro to set counter value in another macro

text: I am trying to simply set the value of the counter `try` which I defined previously to the value of the output of the `\foo` command. However this does not work. I guess that the problem is coming from the fact that in the `\test` macro the `\foo` one is not expanded at the right time of compilation. Since I know really few concerning macros and their expansion I am not able to find the solution here.               \documentclass{book}          \usepackage{ifthen}          \newcounter{try}          \newcommand{\foo}[1]{\ifthenelse{#1=1}{1}{0}}          \newcommand\test[1]{\setcounter{try}{\foo{#1}}%     \arabic{try}}          \begin{document}          Result of foo\{3\}: \foo{3}     Result of test\{3\}: \test{3}          \end{document}


title: Printing \ref as a letter

text: When using `\label` and `\ref`, can I get the `\ref` to display as a letter instead of a number (so if `\ref` is `3`, it will print `c` instead)?


title: Looking for LaTeX consultant

text: Is there anybody who would be interested in working with me as a LaTeX / Beamer consultant? I can do my best to post minimum working examples and to incorporate the advice I'm given. I will continue to do so, but I can't always do it; my skills are not that good. And I'm ok with my bad LaTeX skills. I would just really want to have someone look at my code and help me work through a few things. Is there a way to communicate via email?


title: Disable decoration for pgfplot nested in tikzpicture

text: I have the following MWE:               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{decorations,decorations.pathmorphing}     \usepackage{pgfplots}     \pgfplotsset{compat=1.9}          \begin{document}     \begin{tikzpicture}          \draw node[draw, decorate, decoration={random steps}] (box) at (0,0) {         \begin{tikzpicture}             \tikzset{decorate=false} % does not affect axes             \begin{axis}                 \addplot[] table[row sep=crcr] {                     30 4\\                     42 4\\                     42 3.5\\                     50 3.5\\                 };             \end{axis}         \end{tikzpicture}     };     \end{tikzpicture}          \end{document}      `\tikzset{decorate=false}` works to disable decoration on the graph itself, but not on its axes: ![](http://i.stack.imgur.com/eilSv.png) How to disable decoration for the whole plot?


title: Why doesn't fancyhdr like random numbers?

text: In the following MWE I use \lhead{\stepcounter{step}\arabic{step}} and it works perfectly, incrementing by 1 each page. I also use \chead{\setrand{100}\arabic{rand}} and get the same number every page. If I call \setrand somewhere on the page, it works. If it is checking the value of rand, why doesn't it check the value of step?               \documentclass{article}     \usepackage{fancyhdr}          \makeatletter     % The following is taken from \cite{Numerical Recipes in C}.     % The resulting MAX_RAND = 134456     % Proven good statistics (relatively speaking) but designed for speed.     % Uses 8 entry shuffle.     % Output through counter rand     %     % \randinit required for initialization     % \setrand{n} outputs rand between 0 and (n-1)     % \nextrand uses same scale computed by last \setrand          \newcounter{rand}%scaled random number     \newcounter{index}% used by shuffle          \global\newcount\idum     \global\newcount\im     \global\newcount\ia     \global \newcount\ic     \im = 134456\relax     \ia = 8121\relax     \ic = 28411\relax          \newcount\temp          \def\step@rand{% computes next value for \idum (internal only)      \multiply\idum by\ia      \advance\idum by\ic      \temp = \idum% compute idum mod im      \divide\temp by\im      \multiply\temp by\im      \advance\idum by -\temp     }          \global\newcount\shuffle     \shuffle = 16807\relax     \global\newcount\storeA     \global\newcount\storeB     \global\newcount\storeC     \global\newcount\storeD     \global\newcount\storeE     \global\newcount\storeF     \global\newcount\storeG     \global\newcount\storeH          \def\shuffle@rand{% random shuffle (internal only)      \step@rand      \c@index = \idum      \step@rand      \divide\c@index by\shuffle      \advance\c@index by 1      \c@rand = \csname store\Alph{index}\endcsname      \csname store\Alph{index}\endcsname = \idum     }          \newcommand{\randinit}{% required to initialize PRNG      \idum = \day      \multiply\idum by 1440\relax      \advance\idum by \time      \step@rand%warmup      \step@rand      \step@rand      \step@rand      \storeA = \idum% fill shuffle array      \step@rand      \storeB = \idum      \step@rand      \storeC = \idum      \step@rand      \storeD = \idum      \step@rand      \storeE = \idum      \step@rand      \storeF = \idum      \step@rand      \storeG = \idum      \step@rand      \storeH = \idum     }          \global\newcount\scale          \newcommand{\setrand}[1]{% scales rand between 0 and (#1 -1)      \scale = 1\relax      \ifnum #1 > 0%check for valid #1         \scale = \im         \divide\scale by #1\relax         \fi      \shuffle@rand      \divide\c@rand by\scale     }          \newcommand{\nextrand}{% uses same scale as before      \shuffle@rand      \divide\c@rand by\scale     }     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \makeatother          \newcounter{step}          \begin{document}     \randinit     \pagestyle{fancyplain}     \lhead{\stepcounter{step}\arabic{step}}     \chead{\setrand{100}\arabic{rand}}          \setrand{100}\arabic{rand}\par     \setrand{100}\arabic{rand}\par     \setrand{100}\arabic{rand}\par     \setrand{100}\arabic{rand}\par     \setrand{100}\arabic{rand}\par     \setrand{100}\arabic{rand}\par          \newpage     This page intentionally left blank.          \newpage     This page intentionally left blank.          \end{document}


title: Longtable leaves the header only at the first page: how can I fix it?

text: I am using MiKTeX 2.9 and XeLaTeX. Here is minimal working example:               \documentclass[oneside,final,14pt]{extreport}     \usepackage[top=2.0cm,bottom=2.0cm,left=2.0cm,right=1.0cm]{geometry}     \setlength\parindent{1.5cm}     \usepackage[cm-default]{fontspec}     \usepackage{xunicode}     \usepackage{xltxtra}     \setmainfont[Mapping=tex-text]{Times New Roman}     \setsansfont{Calibri}     \setmonofont{Consolas}     \defaultfontfeatures{Scale=MatchLowercase, Mapping=tex-text}          \usepackage{array}     \usepackage{longtable}     \usepackage{multirow}          \begin{document}     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc sagittis pretium felis, id malesuada enim. Nam nunc odio, tempor eu pharetra a, aliquam non dui. Mauris ac vulputate quam. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec euismod lacinia ante, id pretium nulla molestie quis. Duis dignissim massa odio, a cursus arcu ornare nec. Maecenas mollis rhoncus nisl ac luctus. Praesent sollicitudin, arcu ac fringilla semper, massa justo venenatis sapien, eget gravida tellus metus nec ipsum. Praesent convallis consectetur orci, nec placerat dolor tristique nec. Curabitur vel quam et felis luctus interdum. Sed lacinia enim quam, at commodo lorem suscipit a. Nullam posuere nulla mi, nec convallis libero pharetra sed. Aliquam venenatis fringilla sapien eget suscipit. Nulla bibendum consequat lectus, non consequat dui tempus sed.          Nam sed sapien auctor, consectetur augue vel, consectetur nisi. Morbi venenatis massa eget venenatis facilisis. Nullam dapibus nibh eget purus malesuada facilisis. Duis molestie nisl in est posuere mollis. Vestibulum gravida blandit gravida. Cras eu magna posuere, egestas enim vel, auctor nibh. Donec porta interdum lorem ut ornare. Nulla facilisi.          Quisque laoreet, dolor sed gravida posuere, metus nulla sagittis est, vel porttitor justo neque eget lectus. Phasellus quis urna pulvinar, vehicula tortor eget, laoreet lectus. Sed eget mi ut massa egestas venenatis in ac ligula. Nulla eget malesuada purus. Curabitur mollis ligula sit amet urna auctor, nec auctor tellus pellentesque. Maecenas ligula quam, lacinia eu lorem non, malesuada sagittis mauris. Aliquam sapien arcu, aliquet a malesuada eget, accumsan a quam. Donec iaculis auctor elit, non lobortis magna pharetra commodo. Proin convallis neque id libero varius posuere eget eget orci. Aenean sit amet neque non erat pulvinar sodales at ac ligula. Suspendisse potenti. Donec euismod blandit eros, vel imperdiet augue dignissim mattis.          Sed dapibus augue ac felis tincidunt commodo. Quisque ante lacus, condimentum eget justo nec, accumsan vestibulum tellus. Praesent lobortis in dui et vehicula. Nam elit turpis, vehicula consequat lectus in, scelerisque vulputate tortor. Vestibulum ut dolor eu turpis luctus pellentesque at ut risus. Integer et cursus orci, a consectetur metus. Praesent tempus pellentesque diam, sit amet sodales lorem pharetra et. Integer vulputate risus ac ultrices tempus.          Phasellus aliquet gravida eros, at iaculis enim vestibulum at. Sed semper pharetra ipsum, non posuere purus aliquet eu. Mauris bibendum consectetur facilisis. In nec elit pharetra, fringilla elit ut, consequat felis. Maecenas sollicitudin nisi dapibus neque tristique, quis elementum mi posuere. In vestibulum leo a lectus dapibus tincidunt. Quisque in nisl non magna sollicitudin cursus. Praesent sodales rhoncus pulvinar. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Curabitur dapibus egestas suscipit.          \begin{longtable}{|m{3cm}|m{3cm}|m{3cm}|}     \caption{Long long table (for example)}     \label{tab:example}     \\\hline     Lorem ipsum & Dolor sit & Consectetur \\     \endfirsthead     \caption*{Table~\ref{tab:example} (cont.)}     \\\hline     Lorem ipsum & Dolor sit & Consectetur \\     \endhead          \hline     Phasellus & aliquet & gravida \\\hline     eros & at iaculis & enim vestibulum at \\\hline     Sed semper & pharetra ipsum & non posuere \\\hline     \end{longtable}          Morbi in leo non purus dignissim pulvinar a in erat. Donec in lorem non nisl ultricies elementum. Praesent rutrum libero vitae purus suscipit, venenatis convallis neque aliquam.     \end{document}      And this is what I got: ![example1](http://i.stack.imgur.com/nKALm.jpg) ![example2](http://i.stack.imgur.com/qJuSL.jpg) How can I prevent longtable from dividing it in that strange way? The desirable result is to leave the header _and_ the first row on the first page - and if there is no space, to move the whole table to the next page and put next paragraph instead of it. This is source file, result file and two examples of the correct behavior: example.zip


title: Draw an automatic "bounding box"?

text: I have some Tikz figures in my document and want to draw a frame around it. The width of this frame should be always \textwidth. The height should be automatically adjusted to the height of the actual Tikz object. Is there a general solution which is independent of the Tikz object size? Here my first try, which doesn't work. How can I overlap the red and black frame? (This is just an example to illustrate the problem. Usually the black rectangle is an arbitrary Tikz object.)               \documentclass{scrbook}     \usepackage{tikz}     \usepackage{blindtext}          \begin{document}     \blindtext     \begin{figure}[h]     \begin{tikzpicture}       \node(boundbox) [draw=red] {         \begin{tikzpicture} % could be an arbitrary complex Tikz object           \draw (0,0) rectangle (\textwidth,0.5);          \end{tikzpicture}       };     \end{tikzpicture}     \end{figure}     \blindtext     \end{document}


title: Use et al. in biblatex custom style

text: I have been working on a custom biblatex style, for which I want the bibliography to display at most 2 authors, meaning that the entries should be either:   * First (single author)   * First & Second (two authors)   * First et al. (three and more) I came up with the following name format, to which I feed the first three authors using `\printnames[][1-3]{author}\space` in the `\DeclareBibliographyDriver` commands.               %%%% authors     \DeclareNameFormat{author}{%         \ifthenelse{\value{listcount}=1}%             {#1 \ifblank{#4}{}{\addcomma\space #4}}%             {%                 \ifthenelse{\value{liststop}=2}%                     {\space\&\space\ifblank{#4}{}{#4\space}#1}%                     {%                         \ifthenelse{\value{listcount}=3}%                             {\space}%                             {, et~al.}%                     }%             }%         }%      It's working just fine, but given that I intend to move to biblatex, I'd like to have a very clean code, so the question is basically: how can it be improved?


title: How can I create a 'Nutrition Facts' label?

text: I'd like to make the Nutrition Facts below. I'm pretty new to LaTeX. I can modify templates I find on the web, define new commands, redefine commands, but I have no idea what a macro is, all my LaTeX script is always on one page. Even with comments, my LaTeX script is atrociously horrendous to look at, especially with tons of math symbols. I'm wondering what's the recommended way to create this Nutrition Facts label, being able to change the size (obviously smaller), and being able to put multiple Nutrition Facts label in my document. So maybe it's like some sort of `\newcommand`? That's what I'm thinking. It seems like the grey lines can be made with `\hrule`, with different widths. I'm not sure. What do you guys recommend? Thanks. ![http://www.nacheez.com/wordpress/wp- content/themes/nacheez/img/mildNutrFacts.gif](http://i.stack.imgur.com/aSR8S.gif)


title: bashrc export TEXEDIT emacs

text: If PDFLaTeX fails to compile with > See the LaTeX manual or LaTeX Companion for explanation. Type H for > immediate help. I want to press `e` to get an instance of Emacs. The cursor should be on the position of the error (if TeX knows it) I guess i should insert               export TEXEDIT="emacs magic"      to my .bashrc but what should i type instead of magic?


title: Counting the total number of theorems

text: I have:               \usepackage{amsthm}     \newtheorem{problem}{Problem}     ....     \begin{problem}...\end{problem}...     ...     \begin{problem}...\end{problem}...      In the first page of the document, how can I know the number of the problem environments used in the document? That is, I want to know the value of the last `problem` counter.


I have a batch file that will compile the same input file with 3 compilers one after another as shown below. This mechanism is used to see the file size of the resulting PDF (before and after compression) generated by each compiler.               rem ============= LaTeX =============     latex %1     dvips %1     ps2pdf %1.ps     rename %1.pdf %1-LaTeX.pdf     copy %1-LaTeX.pdf %1-LaTeX-Compressed.pdf     compress %1-LaTeX-Compressed.pdf     cleanup %1               rem ============= PdfLaTeX =============     pdflatex %1     rename %1.pdf %1-PdfLaTeX.pdf     copy %1-PdfLaTeX.pdf %1-PdfLaTeX-Compressed.pdf     compress %1-PdfLaTeX-Compressed.pdf     cleanup %1               rem ============= XeLaTeX =============     xelatex %1     rename %1.pdf %1-XeLaTeX.pdf     copy %1-XeLaTeX.pdf %1-XeLaTeX-Compressed.pdf     compress %1-XeLaTeX-Compressed.pdf     cleanup %1      The problem occurs when the input file cannot be compiled with a certain compiler. If the input file, for example, contains PSTricks code then the `pdflatex` must skip the compilation and just produces a PDF output with a warning message _"Compilation has been interrupted."_. Another example is that an input file imports PDF image that cannot be compiled with `latex`. I need something like the followings: ## Case 1               \documentclass{article}     \usepackage{ifxetex}          \ifxetex       \begin{document}              \end{document}     \fi          \iflatex         \begin{document}              \end{document}     \fi          \ifpdflatex         \begin{document}              \end{document}     \fi      ## Case 2               \documentclass{article}     \usepackage{ifxetex}          \iflatex         \begin{document}              \end{document}     \fi               \ifpdflatexorxelatex         \begin{document}              \end{document}     \fi      How to control the PDF output based on the compiler being used?


title: Mindmap sibling angle in Tikz

text: I am using the following tikz example (original source) **MWE:**               % Author: Till Tantau     % Source: The PGF/TikZ manual     \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{mindmap,trees}     \begin{document}     \pagestyle{empty}     \begin{tikzpicture}       \path[mindmap,concept color=black,text=white]         node[concept] {Computer Science}         [clockwise from=0]         child[concept color=green!50!black] {%           node[concept] {practical}           [clockwise from=90]           child {node[concept] {algorithms} }           child {node[concept] {data structures} }           child {node[concept] {pro\-gramming languages} }           child {node[concept] {software engineer\-ing} }         }           child[concept color=blue] {%           node[concept] {applied}           [clockwise from=-30]           child {node[concept] {databases} }           child {node[concept] {WWW} }         }         child[concept color=red] {node[concept] {technical} }         child[concept color=orange] {node[concept] {theoretical} };     \end{tikzpicture}\end{document}      **Output:** ![enter image description here](http://i.stack.imgur.com/U73nr.png) Where each child is spread 60 degrees apart. I presume you control this spacing with `sibling angle=60` (got the idea from here), but I can't use it to change the spacing. Could someone modify the MWE to illustrate how to use it. I would very much appreciate it if you could use a different angle for each branch (including the main branch). Thank you. **EDIT:** There seems to be some confusion as people think I want to space things out randomly. What I want is this instead, if a node has two children, I want to define the spacing to be 180 degrees, if it has 3 children, I want the spacing to be 120 degrees, 4 children, 90 degrees, 5 children 72 degrees and so on. As is, I must have 6 children for it to not look weird.


title: Conditionally transparent surface in PGFPLOTS

text: I am plotting 3D bars using PGFPLOTS, following the example and using the script given by Anton in his answer (the second one) to this question: 3-dimensional histogram in pgfplots. My code is the following:               \documentclass{minimal}          \usepackage{pgfplots}          \pgfplotsset{compat=1.9}          \begin{document}          \begin{tikzpicture}[scale=0.7]         \begin{axis}[         view = {120}{25},% important to draw x,y in increasing order         xmin = 0,         ymin = 0,         xmax = 9,         ymax = 7,         zmin = -0.20,         zmax = 0.20,         unbounded coords = jump,         point meta min=-0.2, point meta max=0.2,         colormap={pos}{color(0cm)=(blue); color(1cm)=(white); color(2cm)=(red)},         xtick={1.5,3.5,5.5,7.5}, xticklabels={N,P,As,Sb},         ytick={1.5,3.5,5.5}, yticklabels={Al,Ga,In},         ztick={-0.2,-0.1,0,0.1,0.2}         ]         \addplot3[surf,mark=none,mesh/cols=16,faceted color=black] file {ratio};         \end{axis}     \end{tikzpicture}          \end{document}      To run it you need this file called `ratio`. The output looks like this: ![enter image description here](http://i.stack.imgur.com/kPrTl.png) I would like to make the white surface (value z=0) transparent so I can see the blue bars for negative values. I can use the `opacity=` option to change the transparency of the whole plot, but I only want the white horizontal surface to be transparent. _Schematically_ , this would be any correct equivalent of `if (z == 0) then opacity = 0.5 ; else opacity = 1 ; fi`. Can something like this be implemented?


title: Calligraphic logo in tikz

text: Yep, it's that time again. I want to design a calligraphic logo and my obvious choice as LaTeX enthousiast is TikZ as implementation. Only, I lack the proper skills to do so and need some inspiration. In particular, that of the "Copenhagen Suborbitals" caught my eye. How can I achieve something similar? For reference: ![enter image description here](http://i.stack.imgur.com/RrMTU.png)


title: Are there LaTeX packages able to plot Grace language files?

text: **EDIT** The below output file _as identified below in the comments (thank you)_ is in the `Grace` language for plotting. I was wondering if there are any packages capable of using the Grace language to include graphs in LaTeX rather than the standard .eps or .png etc.               @version 50109     @default linewidth 1.5     @g0 on     @with g0     @    world xmin      0.00     @    world xmax    754.92     @    world ymin     -0.25     @    world ymax      2.50     @    view xmin 0.150000     @    view xmax 0.602214     @    view ymin 0.150000     @    view ymax 0.850000     @    xaxis  bar linewidth 1.5     @    xaxis  tick major linewidth 1.5     @    xaxis  tick minor linewidth 1.5     @    xaxis  tick major  136     @    xaxis  label "Cutoff energy (EV)"     @    yaxis  bar linewidth 1.5     @    yaxis  tick major linewidth 1.5     @    yaxis  tick minor linewidth 1.5     @    yaxis  tick major    1.0000     @    yaxis  label "Energy error (EV/atom)"     @g1 on     @with g1     @    world xmin      0.00     @    world xmax    754.92     @    world ymin     -4.00     @    world ymax      1.00     @    view xmin 0.717657     @    view xmax 1.169872     @    view ymin 0.150000     @    view ymax 0.850000     @    xaxis  tick major  136     @    xaxis  label "Cutoff energy (EV)"     @    yaxis  label "Log10 |Energy error| (EV/atom)"     @target G0.S0     @type xy        53.9491654150072        16.5784258405490             108.459781227830        1.37706700787840             162.989051467077       3.431021246137789E-002        216.282381168537       1.945370131102209E-002        264.211994723891       7.044388309623173E-003        316.934569634781       1.883579609511798E-003        374.450105901206       1.072583647783176E-003        420.610728941616       7.798143890340725E-004        486.513947975269       5.595554691808502E-004        539.208152497737       3.921376373909879E-004        594.355578932754       2.913218597768719E-004        652.441864522262       1.875952541467996E-004        692.582915874872       1.474738464821712E-004        754.919784783225       1.057575141203415E-004     &     @target G0.S1     @type xy       0.000000000000000E+000   2.00000000000000             754.919784783225        2.00000000000000          &     @target G0.S2     @type xy       0.000000000000000E+000  0.300000000000000             754.919784783225       0.300000000000000          &     @target G0.S3     @type xy       0.000000000000000E+000  0.100000000000000             754.919784783225       0.100000000000000          &     @target G0.S4     @type xy       0.000000000000000E+000  1.000000000000000E-002        754.919784783225       1.000000000000000E-002     &     @target G1.S0     @type xy        53.9491654150072        1.21954329091756             108.459781227830       0.138955073476815             162.989051467077       -1.46457659262531             216.282381168537       -1.71099775649645             264.211994723891       -2.15215671231883             316.934569634781       -2.72501601961201             374.450105901206       -2.96956882841683             420.610728941616       -3.10800875552859             486.513947975269       -3.25215685504253             539.208152497737       -3.40656147209213             594.355578932754       -3.53562692620556             652.441864522262       -3.72677815275828             692.582915874872       -3.83128499213042             754.919784783225       -3.97568876603266          &     @target G1.S1     @type xy       0.000000000000000E+000  0.301029995663981             754.919784783225       0.301029995663981          &     @target G1.S2     @type xy       0.000000000000000E+000 -0.522878745280338             754.919784783225      -0.522878745280338          &     @target G1.S3     @type xy       0.000000000000000E+000  -1.00000000000000             754.919784783225       -1.00000000000000          &     @target G1.S4     @type xy       0.000000000000000E+000  -2.00000000000000             754.919784783225       -2.00000000000000          &


title: Local central figures repository

text: > **Possible Duplicate:**   >  Automatically Locate Included Figures and Graphics This question is related to the workflow with LaTeX, more then it actually related to LateX... However, I would be happy to know what is the best practice, and I guess this can be of interest to the community. **Goal:** Different project (in the general sense) have different .tex files and will most likely live in different locations on the system. Nevertheless, the projects may share one or more components, e.g. figures. It is very likely that `fig.png` will be used in both `~/project1/project1.tex` and in `~/project2/project2.tex`. I want to have a central location where I will store _all_ my images and the different TeX files will use the same location. **Possible Solution:** Use symbolic links. Create a directory `~/figures_repository` and add symbolic link in `~/project1` and `~/project2` to the figures directory. This works nicely. But it introduces problems. **The problem:** I can think of two problems with this approach:   1. When trying to share `project1` with someone using something like `zip`, then all the files in the repository will be added to the zip file. This is most likely bad.   2. Version controlling systems (SVN, GIT etc.): How do they handle this? Will they also control _all_ the figures in the repository? **Possible Alternatives:**   1. Somehow do it the other way around. That is, in each project's directory have a figures folder `~/project1/figures`, and link all the figures from this directory to the repository.   2. Mac users may be able to use the `smart folders`. Somehow create a smart folder which finds all the figures in all projects. **The Question:** What is the best way to accomplish this?


title: optional arguments to tikzpicture to set style globally

text: I can't get my head around how to get tikz and pgfkeys to do what I want. I would like to define a command which draws a little tikz picture. I'd like this command that would take optional keyval arguments that get passed to the optional argument of `\tikz` and that get dealt with appropriately. This last stage is causing me trouble. Here's what I have so far               \documentclass{article}     \usepackage{tikz}     \usepackage{xparse}     \tikzset{         foo/.style={color=#1},       foo/.default=black,       bar/.style={color=#1},       bar/.default=black,     }          \NewDocumentCommand{\drawthing}{o}{       \tikz[#1]{\draw[thick,foo] (0,1)--(1,0);         \draw[thick,foo] (0,0)--(1,1);         \draw[thick,bar] (0,0) -- (0,1);       }     }          \begin{document}     Here is text\drawthing[foo=red,bar=blue]     \end{document}      So what this does is `\drawthing` draws three lines. Two are "`foo`" lines and one is a "`bar`" line. I'd like to be able to control the colours of these two types of thing individually. The default style should be that both are black. The problem is I'm not understanding something about how the keys work. I'm sure it's a simple thing but I am really struggling with it. So it looks like `foo=red` is having no effect. When I write `\draw[thick,foo=green]` that works fine. But I want to have this set globally for this picture, so I want to have an option that works as an argument to the tikzpicture as a whole. What obvious and simple trick have I missed?


title: Highlight certain texts in listings or minted

text: > **Possible Duplicate:**   >  Manual highlight of TeX code in a verbatim environment I want to highlight certain parts of a program output listing which represent user input. For example I want to use `\textbf` in this way:               $ \textbf{dmesg | tail}          ...     [ 6854.215650] sd 7:0:0:0: [sdc] Mode Sense: 0b 00 00 08     [ 6854.215653] sd 7:0:0:0: [sdc] Assuming drive cache: write through     [ 6854.215659] sdc: sdc1     [ 6854.218079] sd 7:0:0:0: [sdc] Attached SCSI removable disk     [ 6854.218135] sd 7:0:0:0: Attached scsi generic sg2 type 0     ...      I am unable to do it in `listings` and `minted`. Moreover I can't find a list of supported languages by minted in order to set it to bash output.


title: WinEdt failing to consider multibib bibliographies outside the main tex file

text: I'm using `multibib` with WinEdt. If my main `.tex` file has:               \usepackage{multibib}     \newcites{acks}{Acknowledgement page references}      then the `pdflatexify` process results in all the necessary output files. Also, when I press the `B` button, BibTeX gets called both for my main bibliography and for the acks bibliography. However, if I relegate these lines to a style file, outside the main `.tex` file, then WinEdt fails to create the relevant `.aux` file, and does not attempt to BibTeX the `.bib` file (which is in a subdirectory, by the way). Is there any way to get around this?


title: auto-pst-pdf or pdftricks2?

text: When I compile a LaTeX documents containing PSTricks code, I normally use the package `auto-pst-pdf`, but recently I found `pdftricks2`. Should I use `auto-pst-pdf` or `pdftricks2` and what are the differences between the two packages? P.S. Shouldn't I use one of the packages above at all when compiling documents containing PSTricks code via PDFLaTeX, but a third one? If so, which one?


title: hyperref: pdftitle and wrong character encoding

text: > **Possible Duplicate:**   >  Using non ASCII characters in author names and titles within hyperref > pdfinfo               \documentclass[12pt,a4paper]{mwrep}     \usepackage{polski}     \usepackage[utf8]{inputenc}     \usepackage[hidelinks,unicode,pdftitle=Some title żźćąęśćół]{hyperref}     \begin{document}     Text     \end{document}      How can I make pdftitle correctly generated? I'm getting (checked with Adobe Reader X):   `Sometitle»¹¢¡¦±¢ó`   There are no spaces and there are fizzled Polish diacritics. How can this be fixed?


title: pdf properties with french accents

text: > **Possible Duplicate:**   >  Using non ASCII characters in author names and titles within hyperref > pdfinfo I can write the accents in the properties of a PDF document using macros, like `\'e` when i want the `é` in "mathématiques"               \documentclass[]{book}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}          \usepackage[pdfsubject={Math\'ematiques}]{hyperref}          \begin{document}     toto     \end{document}      Is it possible to write directly accents without using macros like `\'e`?               \usepackage[pdfsubject={Mathématiques}]{hyperref}      Google guided me to the package `ucs` and the macro `PrerenderUnicode` but i can't find the good way to use that. Edit: I found the error i made : The character encoding of my document was iso-8859, i change it to utf8 and all is working.


title: Cannot insert multirow within multicolumn

text: I want to make a matrix that incorporates both multirow and multicolumn. However the code doesn't work. Sorry if the question is stupid, I am playing with matrices the whole day and probably I am tired and missing something obvious.               \usepackage{arydshln}          \usepackage{array}          \usepackage{amsmath}          \usepackage{multirow} \begin{document}          \begin{align*}          & \hspace{0.3cm}\overbrace{\hphantom{\begin{array}{ccc}     a&b&c \end{array}}}\\\          &\left[     \begin{array}{ccc:ccc:ccc}          a&a&a&b&b&b&c&c&c\\          \multicolumn{3}{c}{0}&\multicolumn{3}{c}{0}&\multicolumn{3}{c}{\multirow{2}{c}{0}}\\\          1&2&3&4&5&6&&&\\          \end{array} \right]          \end{align*}           \end{document}


title: alternative bibliography with specific entries, without assuming a global bibliography

text: Following question to this one. I have a long document with a (single) bibliography at the end. For some reason, at two different points in my document I cite 3 sources, and need to typeset the bibliography for the 3 entries right there on the spot. These sources are _not_ in the global bibliography. How can I do that? I'm using bibtex, but not biblatex. (For now.) Also, I'm not interested in typesetting the cite keys or the title of the bibliograpy. That can be in the solution, I'm just going remove it for my own purposes. My current idea: Using `multibib`:               \usepackage{multibib}     \newcites{acks}{Acknowledgement page references}     \bibliographystyleacks{alpha}     ...     \nociteacks{GKNR-foracks}     \nociteacks{FR2011-foracks}     \nociteacks{FR2007-foracks}     \begingroup     \renewcommand{\section}[2]{}%     \renewcommand{\chapter}[2]{}%     \bibliographyacks{front/acks}     \endgroup      The thing is, I don't want to actually issue a `\bibliographyacks` command, which typesets a bibliography - mainly because I don't want the cite keys, nor the indentation etc. I would like to be able to do something along the lines of the solutions to my other question ; that makes it easy for me to fiddle with the bibitems, enclose in a frame/minipage, change sizes etc.


title: gnuplot: plotting multiple functions with different ranges

text: I would like to plot the inverse of y=xe^x, with dashed lines leading to the point (-exp(-1), -1)               set parametric          set arrow 1 from -4,0 to 4,0 nohead     set arrow 2 from 0,-4 to 0,4 nohead          set trange[-4:4]     set xrange[-4:4]     set yrange[-4:4]          set xlabel "x"     set ylabel "y"          plot [-4:4] t*exp(t), t lt rgb "black" ,  -exp(-1),t lt rgb "black", t, -1 lt rgb "black"      I would like to restrict the vertical line to running from y=-1 to y=0, and the horizontal line from x=-exp(-1) to x=0. How can this be done? Also, is there an easier way to set the line colour for all plots, rather than specifying it for each one? my plot


title: Force use of tex live in /usr/local/ instead of old copy in /usr/bin

text: The TeX live installation bundled with TeXmaker in ubuntu (Xubuntu 11.10) is ancient and was breaking the `acronym` package (and who knows what else) so I though I'd update by installing using `tl-install` direct from CTAN. But after removing TeXmaker through ubuntu software centre and installing the new copy, I still have a whole Tex live install under `/usr/bin`, and the new install under `/usr/local/texlive/2013/bin/x86_64-linux`. Although I've added the latter location to my path (as prompted by tl-install), `which pdflatex` still tells me it's using the copy in `/usr/bin`. I need a way of forcing the new version to be used. It took 3 hours maxing out my bandwidth to install, so removing all packages with `tex` in the name (or similar) and reinstalling isn't really an option. I don't have to uninstall all the old stuff - I'm not short of disk space. The easiest way is presumably to delete all the tex-related binaries in `/usr/bin` - but how do I find them all?


title: Advanced footnote layout with word definition

text: I am struggling since a few days on a special requirement asked by an author. Suppose you have a text in which you have foot notes, and you want to define the meaning of words. For example in french "amour" can either be "love" or "like". Therefore the author would like to have in the text "amour1" when it is "love" and "amour2" when it is "like" and display the definition after the footnote. For a better understanding I have done "by hand" and example to show you what he wants. First the footnotes and after the definition of words in alphabetic order of appearance. * * * ![enter image description here](http://i.stack.imgur.com/UYCU7.png) * * * or even better should be to have the definition of the words on the right (2 columns ?) like that * * * ![enter image description here](http://i.stack.imgur.com/xV130.png) * * * I have looked in the standard footnotes, in bigfoot, in footmise and in multifoot, but I do not find a way to match the requirement. * * * **FINAL SOLUTION** I validated the solution of @Steven B. Segletes as it was the closest to what I asked and greatly help me in pointing out the path to follow. I updated/modified the solution he gave, adding the `perpage` and including `manyfoot` to have something with two separated footnote streams. Now I need to find out how to put the second footnote stream on the right and I asked a new question for that : Laying out two footnote streams one beside the other The solution I ended up with is the following :               \documentclass[a4paper,11pt]{book}     \usepackage{scrextend, perpage}     \usepackage[ruled]{manyfoot}     \MakePerPage{footnote}          \DeclareNewFootnote{A}               \def\resetfootnotemarks{%       \deffootnote[1em]{0em}{1em}{$^{\alph{footnote}}$}%       \deffootnotemark{\textsuperscript{\alph{footnote}}}%     }     \resetfootnotemarks          \newcommand\footdef[3]{%       \deffootnotemark{\textsuperscript{\thefootnotemark}}%       \setcounter{footnoteA}{#1}%       \addtocounter{footnoteA}{-1}%         \setbox0=\hbox{#2$^{\thefootnotemark}$:\ }%       \deffootnote[\wd0]{0em}{1em}{#2$^{\thefootnotemark}$:\ }%       #2\footnoteA{#3}%         \resetfootnotemarks%     }          \newcommand\footdefmark[2]{%       \deffootnotemark{\textsuperscript{\thefootnotemark}}%       #2\footnotemark[#1]%       \deffootnotemark{\textsuperscript{\alph{footnote}}}%     }          \textheight5in     \begin{document}     This is a test\footnote{this is a standard footnote} and      another\footnote{Another footnote} of normal footnotes.     Now we wish to test the use of footnote definitions.     This is a \footdef{1}{test}{noun meaning of test}      of the Emergency broadcast system in which ``test'' is used as a noun.     But we can also \footdef{2}{test}{verb meaning of test} the verb meaning     of the word.  I can repeat a \footdefmark{1}{test} of something already done.     I can choose a new \footdef{4}{word}{a sequence of letters with meaning}     and differentiate it from a \footdef{3}{word}{a grouping of $n$ bytes     forming the bit width of the processor} for the Z80 processor.     And this is back to\footnote{A Normal Footnote} a normal footnote.     This is a test\footnote{this is a standard footnote} and      another\footnote{Another footnote} of normal footnotes.     Now we wish to test the use of footnote definitions.     This is a \footdefmark{1}{test}{noun meaning of test}      of the Emergency broadcast system in which ``test'' is used as a noun.     But we can also \footdefmark{2}{test}{verb meaning of test} the verb meaning     of the word.  I can repeat a \footdefmark{1}{test} of something already done.     I can choose a new \footdefmark{4}{word}{a sequence of letters with meaning}     and differentiate it from a \footdefmark{3}{word}{a grouping of $n$ bytes     forming the bit width of the processor} for the Z80 processor.     And this is back to\footnote{A Normal Footnote} a normal footnote.     \end{document}      And the result is : ![enter image description here](http://i.stack.imgur.com/G27xu.png)


title: PythonTeX: importing python files

text: I'm trying to import a personal python module using python tex, but pythontex doesn't find the module. My attempt: The LaTeX File:               % !TEX TS-program = pythontex     \documentclass[11pt]{article}     \usepackage[makestderr]{pythontex}          \begin{document}          \begin{pyconsole}     import os     os.getcwd()     import sayhi     \end{pyconsole}          \end{document}      The Python module sayhi.py, in the same directory (/Users/christopherchudzicki/Desktop/pythontex/importproblem) as the LaTeX file:               def hi():         print("hi")      LaTeX Output: ![LaTeX Output](http://i.stack.imgur.com/H1iOM.png) I'd like to be able to call sayhi.hi() from within the pyconsole environment.


title: LaTeX/XeLaTeX runs fine with TeXShop but not with bash

text: I always used TeXShop in the Mac for the last 7 years but now I need to run the compilation remotely. If I run in the terminal (bash shell): XeLaTeX file.tex I get `kpathsea: Running mktexfmt XeLaTeX.fmt I can't find the format file`XeLaTeX.fmt'!` - my guess it is some basic PATH information is missing. I tried man XeLaTeX but I get no manual entry for XeLaTeX. Is there a way I could just extract the settings TeXShop is using? In this question I can't find the format file xelatex.fmt the answers are suggestion to re-install texlive but the op there said this did not solve the problem. And here since TeXShop works fine, re-installing does not seem a good idea. The file exists here: /usr/local/texlive/2014/texmf- var/web2c/xetex/xelatex.fmt I did sudo hash again as Sean Alfred suggested and this time, it worked. Now it compiles fine.


title: How to get a \mid binary relation that grows

text: This question relates to one about getting a vertical bar longer than `\mid`. How to get a vertical bar which is longer than \mid ? However while the given `\middle|` solution works for me, it no longer behaves as a binary relation and so loses the space to the left-and-right of it that `\mid` puts in. (I know I could manually add space, but I want the _right_ way to do this.) In fact I want a "growable `\mid`" that works like `\left\\{` and its relatives.


title: Eurobraille in Latex

text: I want to use eurobraille (also known as 8 point braille or computer braille) in latex. I am aware of the braille package (http://mirrors.ibiblio.org/CTAN/macros/latex/contrib/braille/braille.html). But it does not support eurobraille.


title: Double spacing does not work

text: I cannot generate double spacing. I tried the following, but without success:               \documentclass[a4paper,12pt]{report}     \usepackage[ngerman]{babel}     \usepackage[T1]{fontenc}     \usepackage[ansinew,latin1]{inputenc}          \usepackage{setspace}           \onehalfspacing                 \begin{document}               AAAAAAAAAAAAAAAAAAAAAAAAAAA     \doublespacing     BBBBBBBBBBBBBBBBBBBBBBBBBBB          \end{document}      Can someone help me to get doublespacing between the two lines?


title: Acro package with capital Greek symbols

text: I have used "Acro" package for my thesis nomenclatures. The problem is with the Capital Greek symbols, but the small Greek symbols work perfectly. Here my principal code:               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \documentclass[a4paper,12pt,oneside]{scrbook}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %%%%                        Packages list                          %%%%%     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \usepackage[us,nodayofweek,12hr]{datetime}     \usepackage{fancyhdr}     %\paperwidth 8.25in     \paperheight 10.5in     \usepackage{graphicx}     \usepackage{subfigure}     \usepackage{grffile} %Prevent the file path of an image appearing above the image     \usepackage[T1]{fontenc}     \usepackage{textcomp}     \usepackage[latin1]{inputenc}     \usepackage[cyr]{aeguill}     \usepackage{longtable}     \usepackage{dcolumn}% Align table columns on decimal point     \usepackage{bm}% bold math     \usepackage{makeidx}     %\usepackage{amsmath}     \usepackage{mathtools}     \usepackage{amssymb}     \usepackage{textgreek} %Add greek symbolin the text mode not mathematic     \usepackage{nicefrac}     \usepackage{rotating}     \usepackage{multirow}     \usepackage{array}     \usepackage{booktabs}     \usepackage{hologo}     \usepackage[Bjornstrup]{fncychap} %Chapter style choise     \usepackage{microtype}     \usepackage{floatrow}     \usepackage{chemist}     %\usepackage{scrhack}     %\usepackage{hyperref}     \usepackage{cite}     \usepackage{pifont}% add a special quik symobols     \usepackage[]{footnote} %add footnote to tables     \floatsetup[table]{capposition=top}%put the title of tables on the top     \usepackage{enumitem} %for acro package     \usepackage[accsupp]{acro}% for list of sympbols     \usepackage{titlesec} %, increase the levelof sectioning number     \setcounter{secnumdepth}{3}     \setkomafont{disposition}{\normalcolor\bfseries} %change the typeface          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %%%%%%%Symbols%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \acsetup{list-type=table,list-style=longtable,list-heading=subsection*,hyperref=false,extra-style=bracket}          \DeclareAcronym{TPE}{       short = TPE ,       long  =  Thermoplastic elastomers  ,       %sort  = A ,       class = nomencl     }     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %Greek symbols     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \DeclareAcronym{tau}{       short = $\tau$ ,       long  = Interaction parameter ,       sort  = $\tau$ ,       class =  Gresym     }     \DeclareAcronym{delta}{       short = \ensuremath{\delta} ,       long  = Change ,       sort  = delta ,       class =  Gresym     }     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \begin{document}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \chapter{Abbreviations, Nomenclatures and Symbols}     \printacronyms[include-classes=nomencl,name=Nomenclature]     \printacronyms[include-classes=Gresym,name=Greek symbols]     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \mainmatter          The ratio of the standard fugacities, \acs{tau} can directly be expressed by the change of the Gibbs energy \acs{delta} \textit{g}$_{IV}$. In the case of polymers like \ac{TPE}.               HERE THE EXAMPLE WORKS PERFECTLY. BUT ONCE YOU TRY TO INCORPORATE THE UPPER CASE OF THE GREEK SYMBOLS, IT DOES NOT WORK.          ALSO, I GAVE YOU ALL MY PREAMBLE, MAY BE IT IS USEFUL.     \end{document}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%      Please help me. Thanks


title: How to do not add a references to beamer's toc?

text: How to do not add reference's title to beamer's toc, please ? I'm currently using this code :               \documentclass{beamer}          \usetheme{Warsaw}     \usepackage{biblatex}     \addbibresource{xampl.bib}          \begin{document}          \begin{frame}       \nocite{*}     \end{frame}          \begin{frame}[t,allowframebreaks]       \frametitle{References}       \printbibliography      \end{frame}          \end{document}      bibli.bib                   @MISC{Stack1,        author = {Caesar, Gaius J.},        title = {My long title},        year = {2005},        addendum={Lorem ipsum dolor sit amet, consectetur adipisicing elit,      sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.}      }     @MISC{Stack2,        author = {Caesar, Gaius J.},        title = {My long title},        year = {2005},        addendum={Lorem ipsum dolor sit amet, consectetur adipisicing elit,      sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.}      }     @MISC{Stack3,        author = {Gaius J., Caesar},        title = {My long title},        year = {2005},        addendum={Lorem ipsum dolor sit amet, consectetur adipisicing elit,      sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipisicing elit,      sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.}      }     @MISC{Stack4,        author = {Caesar, Gaius J.},        title = {My long title},        year = {2005},        addendum={Lorem ipsum dolor sit amet, consectetur adipisicing elit,      sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipisicing elit,      sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.}      }     @MISC{Stack5,        author = {Gaius J., Caesar},        title = {My long title},        year = {2005},        addendum={Lorem ipsum dolor sit amet, consectetur adipisicing elit,      sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipisicing elit,      sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.}      }      Thanks a lot!


title: Creating letters with zero-margin colored headers, in addition to the regular letterhead

text: I'm trying to use LaTeX for creating corporate letters. What I have found is that there are many tools to write letters, but they are mostly focused on letters of more personal nature rather than corporate letters, in the sense that I can not find many ways to configure colored styles that are more common in corporate letters. What do I refer to? Something like this (taken from this site): ![enter image description here](http://i.stack.imgur.com/17t6F.gif) This letter consists of two 'headers':   * The orange header with the logo and some text (part of the corporate style)   * The contact / meta info of the letter (organization contact details, reference, etc).  In most examples and documentation (eg the this wiki entry), it is explained how to set up textual letterhead, but not the header that forms part of the corporate style. So my question is: what is the proper way to do this? I have found similar information, for instance here:   * Fancy Chapters   * How to get a colored box as the header? But the problem is that they are not letter documents, and I feel these solutions are not the correct way to do this. Also, in a letter this header part is logically repeated on every page, and that is not the case in the samples either. I am also considering using the `background` package for this top header (the orange part), but I am not sure if this is correct either. What is the right way to set this up?


title: Remote bibliography files in Texlipse

text: I am using Texlipse and I have several Tex projects. One project, the _MainProject_ contains a folder _references_ that holds all the bibliography ( _.bib_ ) files that are referenced by the smaller other projects. In the smaller project, how do I reference the .bib file in _MainProject_?               \usepackage[backend=bibtex8, citestyle=numeric, sorting=none,     bibstyle=numeric, maxcitenames=3, mincitenames=1,     maxbibnames=99, minbibnames=99 ]{biblatex}          \addbibresource{references/books.bib} %books.bib is located in MainProject/src/references/%      In the smaller project's properties, I have _MainProject_ in the Project References section. That did not help. Thank you!


title: Left to right alignment in multicol

text: I'm writing an Hebrew lyx document, when I use multicol to use multiple columns it does makes the columns left to right, how can I change it to right to left? thanks


title: MLA citations in LyX

text: I tried several times to get MLA citations working, but I always hit some wall (mostly the problem is that LyX doesn't build in project directory - only files that it's aware of are being copied to a temporary build directory). ## My question How can one get working MLA citations in LyX with functional citation tools of LyX (I mean working `Insert -> Citation...` and `Insert -> List/TOC -> BibTeX bibliography`). * * * Please, do not post general LaTeX/TeX answers - I found several of them, but I was unable to make it working in LyX.


title: Problems with Beamer and diagrams in Tikz

text: I did a commutative diagram with `tikz` in the article class and everything works. The next code is the MWE in article class.               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{matrix}          \begin{document}     \begin{center}     \begin{tikzpicture}       \matrix(m)[matrix of math nodes,row sep=2em,column sep=4em,minimum width=2em]       { A & B \\         C & D \\};       \path[-stealth]         (m-1-1) edge node [above] {e} (m-1-2) edge node [left] {f} (m-2-1)         (m-1-2) edge node [right] {g} (m-2-2)         (m-2-1) edge node [below] {h} (m-2-2);     \end{tikzpicture}     \end{center}     \end{document}      But, when I copy the code in a Beamer document, something is wrong, as the following code.               \documentclass{beamer}          \usepackage{tikz}     \usetikzlibrary{matrix}          \begin{document}     \begin{frame}     \begin{center}     \begin{tikzpicture}       \matrix(m)[matrix of math nodes,row sep=2em,column sep=4em,minimum width=2em]       { A & B \\         C & D \\};       \path[-stealth]         (m-1-1) edge node [above] {e} (m-1-2) edge node [left] {f} (m-2-1)         (m-1-2) edge node [right] {g} (m-2-2)         (m-2-1) edge node [below] {h} (m-2-2);     \end{tikzpicture}     \end{center}     \end{frame}     \end{document}      Any idea? Am I doing something wrong?


title: defining macros in lyx

text: I am having a problem defining a script that I got as a macro in LyX (or even making it "work" in LyX).   The script I have is the following:               \newcommand{\from}{\mathbin{\vbox{\baselineskip=3pt\lineskiplimit=0pt                          \hbox{.}\hbox{.}\hbox{.}}}}      It suppose to be three dots, kind of like `\vdots` , but just lower.. Do you have a clue how to make it work in LyX? I don't even know if this script (which is I suppose in Latex) is suitable to LyX. thanks, Boaz.


title: Can I write a range in [0-1) style with siunitx?

text: I want to give a range of degree in my document. One end is explicitly inside the range, while the other is outside. Is there a "correct" SI way of writing a range with an inclusive and exclusive end (i.e., left-open right-closed interval or vice versa)? I'm already using siunitx for ranges: `\SIrange{0}{180}{\degree}` -> 0 bis 180° There is one example in the documentation (page 46) that seems to be somewhat similar, but i don't think that it applies to my problem: `\SIrange[range-units = brackets]{2}{4}{\degreeCelsius}` -> `( 2 to 4 ) °C`


title: Options to change a path on a elegant way in TikZ

text: I'm building a figure of a finite state automate. However the edge of F to C seems to make the image less readable. Using bend options doesn't solve the problem. is there a way to solve this problem? Introducing a phantom node could be a solution I think, but I don't know any option that generates an edge through that phantom node. ![enter image description here](http://i.stack.imgur.com/dNZbS.png)               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{positioning,automata}     \begin{document}     \begin{tikzpicture}[->,shorten >=1pt,auto,node distance=2cm,on grid,semithick,state/.style=state with output,every state/.style={draw=black!50,very thick,fill=black!20,scale=0.75}]     \node[state] (E) {$e$\nodepart{lower} $1$};     \node[state] (F) [right=of E] {$f$\nodepart{lower} $1$};     \node[state] (A) [below=of E] {$a$\nodepart{lower} $0$};     \node[state] (B) [below=of F] {$b$\nodepart{lower} $0$};     \node[state] (C) [below=of A] {$c$\nodepart{lower} $0$};     \node[state] (D) [below=of B] {$d$\nodepart{lower} $0$};     \path (A) edge[loop left] node {00} (A)           edge[bend left] node {01} (B)           edge[bend left] node {10} (C)           (B) edge[bend left] node {00} (A)           edge[loop right] node {01} (B)           edge node {11} (F)           (C) edge[bend left] node {00} (A)           edge[loop left] node {10} (C)           edge[bend left] node {11} (D)           (D) edge node {00} (B)           edge[bend left] node {10} (C)           edge[loop right] node {11} (D)           (E) edge node {00} (A)           edge[loop left] node {01} (E)           edge[bend left] node {11} (F)           (F) edge[bend left] node {01} (E)           edge[loop right] node {11} (F)           edge node {10} (C);     \end{tikzpicture}     \end{document}


title: How to make part of x-axis normal scale and other logarithmic scale in pgfplots?

text: I'm trying to make such graph (made in Origin), using PGFplots: ![enter image description here](http://i.stack.imgur.com/N8nOk.png) But I do not know hot to make x-axis correctly. This is my MWE:                   \documentclass[tikz,12pt]{standalone}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[english]{babel}     \usepackage{mathptmx}     \usetikzlibrary{pgfplots.groupplots}     \usepackage{pgfplots}     \pgfplotsset{width=12cm,compat=1.9}     \usepackage{filecontents}     \begin{filecontents}{1.csv}         -.5 0         1   0.02         2   0.03         3 0.035         4   0.04         5   0.05         10 0.06         100 0.15         200 0.17         500 0.18         1000    0.2         15000   0.22     \end{filecontents}     \begin{filecontents}{2.csv}         -2  -.5         0   2         1   5         2 1         3   7         4   8         5 9         50  10         250 15         1000    20         5000    14         20000   12     \end{filecontents}     \begin{document}     \pgfplotsset{every axis/.append style={     %font=\footnotesize,     line width=1 pt,     tick style={line width=.6pt}}}     \begin{tikzpicture}      \begin{axis}[     clip mode=individual,     xmode=log,     height=8cm,     width=12cm,     ymax=.2,     ylabel={$\Delta$O.\,D.},     xlabel={Time delay, ps},     minor x tick num=4,     minor y tick num=4,     ]     \addplot[green,mark=*] table [x index=0,y index=1] {1.csv};     \end{axis}     \begin{axis}[     clip mode=individual,     xmode=log,     height=8cm,     width=12cm,     hide x axis,     axis y line*=right,     ]     \addplot[red,mark=square*] table [x index=0,y index=1] {2.csv};     \end{axis}     \end{tikzpicture}     \end{document}      With this example,of course I cannot see negative values of my data.


title: Circuitikz place text above and below component

text: Lets say I create a component like this               (0,0) to [R, l^=$R1$] (0,2)      How can I make it so that the value, R1, is say, on the right hand side, and the resistance, say, 1kohm is on the left hand side? I've tried               (0,0) to [R, l^=$R1$, l_=$\SI{1}{\kilo\ohm}$] (0,2)      but that does not work because it just overwrites (or ignores) the first l^=... Thanks. Edit: Added example code that compiles and a picture of what I'm after.               \documentclass[a4paper,journal]{IEEEtran}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage[american]{circuitikz}               \begin{document}          \begin{circuitikz}[scale=1,transform shape]     \draw         % Left half of circuit.         (0,0)   to [sV, l=$v_\mathrm{s}$]           (0,2)                 to [short, -o]                      (1.5,2)                 to [R, l=$R_\mathrm{G}$, -o]            (4,2)                 to [open, v^=$v_\mathrm{gs}$]       (4,0)                 to [short, o-o]                     (1.5,0)                 to [short]                          (0,0)              % Right half of circuit.                 (7,2)   to [cI, i_=$g_m v_\mathrm{gs}$]     (7,0)         (7,2)   to [short, -*]                      (8.5,2)                 to [R, l=$r_    \mathrm{o}$]                (8.5,0)                 to [short, *-]                      (7,0)              (8.5,2) to [short, -o]                      (9.5,2)                 to [short, -o]                      (13,2)  node[right] {$v_\mathrm{o}$}              (8.5,0) to [short, -o]                      (9.5,0)                 to [short]                          (12,0)              (10.5,2)    to [R, l=$R_\mathrm{D}$, *-*]       (10.5,0)         (12,2)  to [vR, l=$R_\mathrm{l}$, *-]       (12,0)              (3.5,0) to [short, -*]                      (7,0)              (1.5,0) node[below] {S}         (9.5,0) node[below] {S}         (1.5,2) node[above] {G}         (9.5,2) node[above] {D}         ;     \end{circuitikz}               \end{document}      ![Circuit](http://i.stack.imgur.com/kLvAz.png)


title: How can I get aligned equations not to be spoiled by an item?

text: Is it possible to use `itemize` between align? For instance one wants to list some equations with previous explanations following an `item`, but one wants the explanations not to break the align structure, so that, say, the equal signs are aligned? What I want is: ![enter image description here](http://i.stack.imgur.com/jLQwN.png) My attempts to interlace an item in an give an error. In this MWE:               \documentclass{standalone}     \usepackage{amsmath}     \begin{document}      \begin{itemize}      \item This is the expansion for $f$:     \begin{align}     f(X) = & \sum_n {t_n+x_n-s_n-2} X^n       \end{align}      \item This is the expansion for $g$:      \begin{align}     g(X) = & \sum_m {r_m} X^m        \end{align}     \end{itemize}     \end{document}      I get the equations unaligned.