title: How to position tikz node relative to 2 other nodes

text: Suppose, I have this structure: ![enter image description here](http://i.stack.imgur.com/72Gq5.png) Code:               \documentclass{standalone}     \usepackage[utf8]{inputenc}     \usepackage[english]{babel}     \usepackage{tikz}     \usetikzlibrary{calc,shapes, positioning}     \begin{document}     \def\len{1cm}     \begin{tikzpicture}[node distance = \len, auto]     \tikzset{         line/.style = {draw},         block/.style = {rectangle, draw, text centered, minimum height=2em},     }     \node [block] (1-1) {1-1};     \node [block, below = of 1-1] (1-2) {1-2};     \path [line] (1-1) -- (1-2);     \node [block, below right = of 1-2] (2-1) {2-1};     \path [line] (1-2) -| (2-1);     \node [block, right = of 2-1] (3-1) {3-1};     \node [block, dotted] at(3-1|-1-2) (3-2) {3-1};     \path [line] (1-1) -| (3-1);     \end{tikzpicture}     \end{document}      How can I position node 3-1 to the right of node 2-1 and on the same level with 1-2, using calc library? I drew the desired position, using dotted borders. Please, don't suggest to use matrix. ## Update 1 approach is to use `above right = of 2-1`. It would work for this test case, but if node 1-2 is tall, it wouldn't position 1-3 vertically to the centre of it:               \documentclass{standalone}     \usepackage[utf8]{inputenc}     \usepackage[english]{babel}     \usepackage{tikz}     \usetikzlibrary{calc,shapes, positioning}     \begin{document}     \def\len{1cm}     \begin{tikzpicture}[node distance = \len, auto]     \tikzset{         line/.style = {draw},         block/.style = {rectangle, draw, text centered, minimum height=2em},     }     \node [block] (1-1) {1-1};     \node [block, below = of 1-1, text width = 1cm] (1-2) {text, text, text (!): $\frac{1}{2}$};     \path [line] (1-1) -- (1-2);     \node [block, below right = of 1-2] (2-1) {2-1};     \path [line] (1-2) -| (2-1);     \node [block, above right = of 2-1] (3-1) {3-1};     \path [line] (1-1) -| (3-1);     \end{tikzpicture}     \end{document}      Gives this: ![enter image description here](http://i.stack.imgur.com/0dub1.png) ## Update 2 @Bordaigorl suggested to use `right = 2 of 1-2`. But if 2-1 is wide, it will visually overlap with 3-1:               \documentclass{standalone}     \usepackage[utf8]{inputenc}     \usepackage[english]{babel}     \usepackage{tikz}     \usetikzlibrary{calc,shapes, positioning}     \begin{document}     \def\len{1cm}     \begin{tikzpicture}[node distance = \len, auto]     \tikzset{         line/.style = {draw},         block/.style = {rectangle, draw, text centered, minimum height=2em},     }     \node [block] (1-1) {1-1};     \node [block, below = of 1-1, text width = 1cm] (1-2) {text, text, text (!): $\frac{1}{2}$};     \path [line] (1-1) -- (1-2);     \node [block, below right = of 1-2] (2-1) {2-2-2-2-2};     \path [line] (1-2) -| (2-1);     \node [block, right = 2 of 1-2] (3-1) {3-1};     \path [line] (1-1) -| (3-1);     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/O2IwK.png) ## Possible solution I used an extra \coordinate node to the right of 2-1. Is it possible to solve the problem without it?               \documentclass{standalone}     \usepackage[utf8]{inputenc}     \usepackage[english]{babel}     \usepackage{tikz}     \usetikzlibrary{calc,shapes, positioning}     \begin{document}     \def\len{1cm}     \begin{tikzpicture}[node distance = \len, auto]     \tikzset{         line/.style = {draw},         block/.style = {rectangle, draw, text centered, minimum height=2em},     }     \node [block] (1-1) {1-1};     \node [block, below = of 1-1, text width = 1cm] (1-2) {text, text, text (!): $\frac{1}{2}$};     \path [line] (1-1) -- (1-2);     \node [block, below right = of 1-2] (2-1) {2-2-2-2-2};     \path [line] (1-2) -| (2-1);     \node [coordinate, right = of 2-1.east] (3-1) {};     \node [block] at(3-1|-1-2) (3-2) {3-1};     \path [line] (1-1) -| (3-2);     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/2Qsjq.png)


title: How to make pgfplots to center a text in a xticklabel

text: In `pgfplots` I've used the `text width` option in the definition of `xticklabel style` and I wonder how to center the labels text?


title: CJK bracket quotes for english text?

text: This is a MWE for german style quotes in english text. Now how can japanese bracket quotes be used using the enquote command? Or should another command be used? Also how do I install CJK taken from CTAN? Do I even need to install if all I want to use are the quotes? [In fact I do need to type both Chinese and Japanese text so I must load it anyway now, and I would like to use the quotes, but if there is a way to use CJK quotes without loading CJK, I would like to know about it too.]               \documentclass[12pt]{article}     \usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry}     \usepackage[utf8x]{inputenc}          \usepackage{CJK}     \usepackage[german,english]{babel}     \usepackage[style=german]{csquotes}     \usepackage[T1]{fontenc}     \usepackage{amsfonts,amsmath}     \usepackage{graphicx}          \begin{document}          \enquote{A phrase goes here.} I make a comment on it, which I quote, here. Isn't that nice? But it's in german quotes. What about nice japanese quotes?          \end{document}


title: biblatex formatting

text: I'm preparing my CV in latex using a slightly modified template with respect to the one found here http://robjhyndman.com/research/cv.sty. I like it very much, in particular the fact that bibliography can be splitter in several type of contribution. I've have also applied the trick described here Underline my name in the bibliography by Andrzej. The problem is that the first author in the bibliography is formatted differently from the others, as Surname, Initial, SecondAuthorInitial Surname. So that the trick applied to underline my name do not applied to all the entries where I'm the first author. I would like to change the way the first author appear in order to be compliant with the other. So in this way I think that the trick for the underlying should work. As asked I post the code relating to the bibliography setting               \documentclass[a4paper,11pt]{article}     \usepackage[sorting=ynt,bibstyle=authoryear-comp,labelyear=false,labelyear=false,defernumbers=true,maxnames=100,uniquename=init,backend=bibtex8,dashed=false,arxiv=abs]{biblatex}     \DeclareFieldFormat{url}{\url{#1}}     \DeclareFieldFormat[article]{pages}{#1}     \DeclareFieldFormat[inproceedings]{pages}{\lowercase{pp.}#1}     \DeclareFieldFormat[incollection]{pages}{\lowercase{pp.}#1}     \DeclareFieldFormat[article]{volume}{\textbf{#1}}     \DeclareFieldFormat[article]{number}{(#1)}     \DeclareFieldFormat[article]{title}{\MakeCapital{#1}}     \DeclareFieldFormat[inproceedings]{title}{#1}     \DeclareFieldFormat{shorthandwidth}{#1}     \DeclareBibliographyDriver{article}{%     \usebibmacro{bibindex}%     \usebibmacro{begentry}%     \usebibmacro{author/editor}%     \setunit{\labelnamepunct}\newblock     \MakeSentenceCase{\usebibmacro{title}}%     \newunit     \printlist{language}%     \newunit\newblock     \usebibmacro{byauthor}%     \newunit\newblock     \usebibmacro{byeditor+others}%     \newunit\newblock     \printfield{version}%     \newunit\newblock     %  \usebibmacro{in:}%     \usebibmacro{journal+issuetitle}%     \newunit\newblock     \printfield{note}%     \setunit{\bibpagespunct}%     \printfield{pages}     \newunit\newblock     \printfield{issn}%     \newunit\newblock     \printfield{doi}%     \newunit\newblock     \usebibmacro{eprint}     %\newunit\newblock     %\usebibmacro{url+urldate}%     \newunit\newblock     \printfield{addendum}%     \newunit\newblock     \usebibmacro{pageref}%     \usebibmacro{finentry}}          % Remove dot between volume and number in journal articles.     \renewbibmacro*{journal+issuetitle}{%     \usebibmacro{journal}%     \setunit*{\addspace}%     \iffieldundef{series}     {}     {\newunit      \printfield{series}%      \setunit{\addspace}}%      \printfield{volume}%      %\setunit*{\adddot}%      \printfield{number}%      \setunit{\addcomma\space}%      \printfield{eid}%      \setunit{\addspace}%      \usebibmacro{issue+date}%      \newunit\newblock      \usebibmacro{issue}%      \newunit}                %added a trick to underline my surname     \renewbibmacro*{name:first-last}[4]{%     \usebibmacro{name:delim}{#2#3#1}%     \usebibmacro{name:hook}{#2#3#1}%     \ifthenelse{\equal{#1}{Vianello}}% matches last name against YourLastName     {       \uline{% wrapped with \uline       \ifblank{#2}{}{\mkbibnamefirst{#2}\isdot\bibnamedelimd}%       \ifblank{#3}{}{%         \mkbibnameprefix{#3}\isdot%         \ifpunctmark{'}%           {}%           {\ifuseprefix{\bibnamedelimc}{\bibnamedelimd}}}%       \mkbibnamelast{#1}\isdot%       \ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}}}%     {% original       \ifblank{#2}{}{\mkbibnamefirst{#2}\isdot\bibnamedelimd}%       \ifblank{#3}{}{%         \mkbibnameprefix{#3}\isdot%         \ifpunctmark{'}%           {}%           {\ifuseprefix{\bibnamedelimc}{\bibnamedelimd}}}%       \mkbibnamelast{#1}\isdot%       \ifblank{#4}{}{\bibnamedelimd\mkbibnameaffix{#4}\isdot}}}       \usepackage{filecontents}            \begin{filecontents}{biblio.bib}        @article{PhysRevLett.106.125002,        author = {Vianello, Nicola and Naulin, V and Schrittwieser, R and M uller, H. W. and    Zuin, M and Ionita, C and Rasmussen, J J and Mehlmann, F and Rohde, V and Cavazzana, R and Maraschek, M},        title = {{Direct Observation of Current in Type-I Edge-Localized-Mode Filaments on the     ASDEX Upgrade Tokamak}},        journal = {Physical Review Letters},        year = {2011},        volume = {106},        number = {12},        pages = {125002},        month = mar        }       \end{filecontents}            \addbibresource{biblio.bib}       \begin{document}       \nocite{*}       \printbibliography       \end{document}      Now I think the example should work once one provide a biblio.bib file (any bibliographic file you have should work. The only trick is the surname you chose, mine being Vianello) I apologize for the problems in the example provide


title: Horizontal spacing between lines in split enviroment

text: I have a math expression that looks like this               \documentclass[a4paper,12pt,amsmath,amssymb]{article}          \usepackage[utf8x]{inputenc}     \usepackage{ucs}     \usepackage[T1]{fontenc}     \usepackage{tgtermes}     \usepackage[croatian]{babel}     \usepackage{mathtools}          \begin{document}               \begin{equation*}     \begin{split}     &(m-n)[L_{m+n},L_p]+(n-p)[L_{n+p},L_m]+(p-m)[L_{p+m},L_n]=0\\       &(m-n)\left[(m+n-p)L_{m+n+p}+c(m+n)\delta_{m+n,-p}\right]+\\     &(n-p)\left[(n+p-m)L_{m+p+n}+c(n+p)\delta_{n+p,-m}\right]+\\     &(p-m)\left[(p+m-n)L_{p+m+n}+c(p+m)\delta_{p+m,-n}\right]=0\\      &(m-n)c(m+n)\delta_{m+n,-p}+(n-p)c(n+p)\delta_{n+p,-m}+\\     &+(p-m)c(p+m)\delta_{p+m,-n}=0\\      &(m-n)c(m+n)\delta_{m+n,-p}+(n+m+n)c(n-m-n)+\\     &+(-n-m-m)c(-n-m+m)=0\\      &(m-n)c(m+n)\delta_{m+n,-p}+(m+2n)c(-m)+(-n-2m)c(-n)=0\\      &\left[(m-n)c(m+n)-(n+2m)c(m)+(n+2m)c(n)\right]\delta_{n+p+m,0}=0     \end{split}     \end{equation*}                         \end{document}      Now I tried by setting `\hspace{5mm}` between lines that have `=0` in them (first line, fourth line, etc.), so that I have some kind of self contained portions in the expression, so that the reader could see that this is just a manipulation of the first expression. But `\hspace` did nothing. Is there a way to do this? I would like to separate certain parts, so that they stand out a bit, but not actually separating the whole expression (I hope I'm clear enough). EDIT: Here's a sketch what I want ![enter image description here](http://i.stack.imgur.com/YoDTG.jpg) I might mean vertical spacing, I always confuse those two xD


title: Installation/usage of latexdiff on Windows 7

text: ## Description I'm new to both Perl and `latexdiff`. I'd like to use `latexdiff` to track changes between versions of my LaTeX documents. However I couldn't get it to work. I have MikTeX 2.9, and `latexdiff.exe` (and other variants) in               C:\Program Files (x86)\MiKTeX 2.9\miktex\bin      and Strawberry Perl 5.16.3.1 in               C:\StrawberryPerl      When I execute the command               latexdiff old.tex new.tex > diff.tex      I got the following messages:               latexdiff: The Perl script could not be found     latexdiff: Data: scripts/latexdiff/perl/latexdiff.pl      I found a similar question here on tex.se, but I'm not sure if my problem is the same as the one posted there, because I couldn't find the subfolder `latexdiff` in `\MiKTeX 2.9\scripts`. Also I don't have any pop-up window asking for installation of other stuff (which is the case in the mentioned post). ## Question   1. Based on the above description, have I installed both Perl and `latexdiff` properly? Or should they be put on the same path?   2. If I've installed stuff properly, is there a way to get `latexdiff` to work (if this is not a bug with MikTeX 2.9)?


title: percent signs in luacode* environment (LuaLaTeX)

text: Can someone explain what happens here:               \documentclass{article}     \usepackage{luacode}     \begin{document}          \begin{luacode*}     tex.print("xx\%a","yy\\%b","zz\\\%c")     \end{luacode*}          \end{document}      The result is `xxyy%b zz%c`. (The xx,yy,zz is clear.) The `\%a` is "ignored", the `\\%b` and the `\\\%c` results in the "same" `%b` (or c). What is the preferred way to get a `%` in the PDF output? Why is the `\%a` ignored? What does TeX see after returning from the lua call?


title: LaTeX listing counter counts with every \pause-command?

text: I'm writing a TeX-File for a beamer presentation and have a problem with the `\pause`-command and the listing counter: The Listing counter increments its count with every `\pause` command – although I don't change the frame or anything at the code. This looks very ugly. So I need to either stop the counter from incrementing its count with every `\pause` command or turn off the counter at all – and I couldn't even find out how this works. Can someone please help me? Here some of my listings-Setting:               \definecolor{kit-gray}{RGB}{224,224,224}     \definecolor{kit-green}{RGB}{32,149,128}     \usepackage{listings}     \usepackage{courier}     \lstset{          basicstyle=\scriptsize\ttfamily,           numbers=left,                        numberstyle=\tiny,                   %stepnumber=2,                           numbersep=5pt,                        tabsize=2,                                   extendedchars=true,                   breaklines=true,                         %keywordstyle=\color{red},          frame=t,               %frameround=tftf,           keywordstyle=[1]\textbf,                 stringstyle=\color{blue}\ttfamily,               showspaces=false,                        showtabs=false,                          xleftmargin=17pt,          framexleftmargin=17pt,          framexrightmargin=6pt,          framexbottommargin=4pt,          backgroundcolor=\color{kit-gray},          commentstyle=\color{kit-green},          showstringspaces=true                    %numberbychapter=false     }


title: Force articles to openright with combine class

text: I'm using the `combine` class to combine several articles into a single document. I would like each document to start on the right, similar to the `openright` option available on the book class. Is this something that is possible?


title: Is it possible to invert/substitute the colors of included graphics?

text: I want to use the `beamer` package with a white on black style to create presentations. I included a simple switch to choose black on white for printout. Is there any possibility to also invert the colors of included graphics (maybe only black on white) or define some substitution rules for colors in included graphics?


title: Include Date in Table of Contents of Combine Document

text: Is it possible to include the date in the Table of Contents when using the `combine` class? I have a document that is a collection of many articles that have been written over a long period of time and would like it include the dates in the ToC.


title: TikZ library for optics?

text: Is there a library (or something similar) available for optics including e.g. convex and concave lenses? I fount this but it seems that this is not available as an official library …


title: the unthinkable: use of Metafont for greek minion letters in black board style

text: would it be possible to create our own greek letters in black board style from the Minion family using Metafont? It is just a matter of adding a vertical bar somewhere... Thanks


title: Insert quotes (single and double)

text: how do we insert quotes 'text' and ''text'' ? **LaTeX** ![image1](http://i.stack.imgur.com/y74yw.png) **Output** ![image2](http://i.stack.imgur.com/ZNEPU.png) why is the quotes curled in the same directions? Should it not be in and out ... like this ... ![image3](http://i.stack.imgur.com/d0Mr5.gif) I am using TeXnicCenter v2.


title: How to use multiple arguments in \lstnewenvironment

text: How can I have more than one optional argument to be passed to `\lstnewenvironment`? I only need a fixed number of options and all will be present. I want to pass the `frame` type and `font size` as arguments to my custom `lstlisting`. **Update** My current definition. I am currently passing the `font size`. I need `frame` type also (like `single`, `leftline` etc.)               \lstnewenvironment{pyout}[1][\tiny]{         \lstset{ %                 basicstyle=\ttfamily#1\setstretch{1},                 showstringspaces=false,                 upquote=true,                 aboveskip=0pt,                 belowskip=2pt,                 breaklines=true,                 frame=leftline,         }     }{}


title: How can I get the yellow box in tableofcontents?

text: I'm writing an article with LaTeX and I'm wondering how to get this yellow boxes around the clickable elements of table of contents not just see the hand (mouse).


title: tlmgr cannot setup TLPDB

text: I'm trying to update my installation of texlive 2013 under Ubuntu 13.10. However, I followed the instruction on this answer, but I get an error > (running on Debian, switching to user mode!) cannot setup TLPDB in > /home/USER/texmf at /usr/bin/tlmgr line 5308. I tried searching for this error but got me nowhere. I'm used to work with MikTex on Windows, but now I'm migrating to Ubuntu and get no idea what went wrong nor where. Any pointers are welcomed.


title: Using $1\over2$ instead of $\frac{1}{2}$ under amsmath

text: I know that you should use `$\frac{1}{2}$` instead of `$1\over2$` to prevent warnings when you're using `amsmath`. But do those two expressions print differently? I know why, according to the `amsmath` technical notes, the `\over` syntax was probably not the best one for TeX to use, but currently, does `$\frac{1}{2}$` have any capabilities that `$1\over2$` doesn't have? If a person wrote an article using `amsmath` and `\over` throughout, would there be any gain in changing all the `\over`'s to `\frac`'s?


title: \beamergotobutton size

text: How do I change the default size of the button? Right now I have a frame looking like this:               \documentclass[T]{beamer}          \definecolor{links}{HTML}{2A1B81}     \hypersetup{colorlinks,linkcolor=,urlcolor=red}          \usetheme{Frankfurt}     \usecolortheme{dolphin}     \usefonttheme{structuresmallcapsserif}     \usefonttheme{serif}     \usepackage{multicol}     \usepackage{graphicx}     \usepackage{xcolor}     \usepackage{caption}     \usepackage{hyperref}          \begin{document}          \begin{frame}         \frametitle{WEPRC 2012 Overview}         \begin{itemize}         \centering         \begin{Large}         \item \hyperlink{PARTICIPANTS}{\beamergotobutton{Participants}}          \item \hyperlink{PRESENTERS}{\beamergotobutton{Presenters}}         \item \hyperlink{KEYNOTESPEAKER}{\beamergotobutton{Keynote Speaker}}         \item \hyperlink{SPONSOR}{\beamergotobutton{Sponsors}}         \end{Large}          \end{itemize}         \end{frame}          \end{document}


title: How to exclude citations in frontmatter from bibliography ordering using bibtex?

text: In my PhD thesis I have to include a few pages in the `frontmatter` that disclose that some chapters have been published as papers, including citations to the papers. These citations then appear as `[1]`, `[2]`, etc. since they are the first to be used. As a result, in my introduction, the first citation ends up as `[5]`. Is there a way to force bibtex to actually start ordering my citations from the introduction (in `mainmatter`) so that these citations start at `[1]`, and those in the `frontmatter` are counted at the end? I'm using the `unsrt` style with no extra packages, and the `report` document class.


title: Reference to a manually numbered equation

text: I want my equation's number to be "1'". I have done so through `\tag{1'}`. But now I don't know how to refer it in my document. Is there a method to call it or numbering equations like 1, 1', 1''?


title: Not getting the correct polar plot

text: \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{3d,calc}     \usetikzlibrary{calc}               \begin{document}      \begin{tikzpicture}       \draw[domain=0:2*3.14159265] plot (xy polar     cs:angle=\x r,radius={2 -sin(4\x r)});      \end{tikzpicture}          \end{document}      this is the example I am using, where I want to plot $$r =2 - \sin(4\theta)$$ in the [0:2*pi] range. here for example one can see the correct plot. What am I missing?


title: Diagonal text in diagonal matrix

text: I have a tridiagonal matrix whose diagonals `d_{-1}`, `d_0`, `d_1` (thought as vectors) can be written as vector expressions. Is there a way to nicely represent this, e.g. via a matrix which is blank everywhere except from the diagonals which report the expression (written diagonally) and maybe continuous lines elsewhere? (Please see the attached picture). ![enter image description here](http://i.stack.imgur.com/Hkxnk.jpg) Any help appreciated.


title: Where do I put .BST files

text: I am sorry but I really not an expert with with Latex. I know that there are several posts about it, I tried to follow many of them but I still have no results. I have Windows OS and I am using Texworks, compiling with command pdflatex+makeindex+bibtex. I want to use the hieeetr style for the bibliography, but I do not know where to save the .bst file. Any help? thanks in advance


title: Is there a mechanism to provide a dimension or scale as input to an instance of a symbol?

text: I realize that a symbol, by design, will have mostly static features. The exceptions are annotations. A particular instance of a symbol may have property values associated with it which are variable between instances. A resistor, for instance, will have the same lines on the background path between instances, but we may indicate different values by a string, _property_ = _value_ _unit_ , placed at a node. I would like to create a symbol for a resistor-like symbol which has two parts; the body is simply divided into two sections by means of a vertical line. I would, however, like to be able to adjust the relative horizontal position of the vertical line such that the relative widths of the compartments could be varied. I am not aware of a mechanism that would allow one to pass a scale value to the particular instance of the symbol. Maybe the same way we adjust the overall size of the symbol, we can adjust the position of the vertical line/divider. **Code** :               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage{tikz}     \usepackage[active,tightpage]{preview}     \PreviewEnvironment{tikzpicture}     \usetikzlibrary{circuits,circuits.ee.IEC}     \makeatletter     \pgfdeclareshape{symbol shape}{%         \inheritsavedanchors[from=rectangle ee]         \inheritanchor[from=rectangle ee]{center}         \inheritanchor[from=rectangle ee]{north}         \inheritanchor[from=rectangle ee]{south}         \inheritanchor[from=rectangle ee]{east}         \inheritanchor[from=rectangle ee]{west}         \inheritanchor[from=rectangle ee]{north east}         \inheritanchor[from=rectangle ee]{north west}         \inheritanchor[from=rectangle ee]{south east}         \inheritanchor[from=rectangle ee]{south west}         \inheritanchor[from=rectangle ee]{input}         \inheritanchor[from=rectangle ee]{output}         \inheritanchorborder[from=rectangle ee]         \inheritbackgroundpath[from=rectangle ee]         \behindbackgroundpath{%         \pgf@process{\pgfpointadd{\southwest}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}%         \pgf@xa\pgf@x\pgf@ya\pgf@y         \pgf@process{\pgfpointadd{\northeast}{\pgfpointscale{-1}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}}%         \pgf@xb\pgf@x\pgf@yb\pgf@y         \pgfpathmoveto{\pgfqpoint{\pgf@xa}{0pt}}%         \pgfpathlineto{\pgfqpoint{1.5\pgf@xa}{0pt}}%         \pgfpathmoveto{\pgfqpoint{\pgf@xb}{0pt}}%         \pgfpathlineto{\pgfqpoint{1.5\pgf@xb}{0pt}}%         \pgfpathmoveto{\pgfqpoint{0pt}{\pgf@ya}}%         \pgfpathlineto{\pgfqpoint{0pt}{\pgf@yb}}%         }     }     \makeatother     \tikzset{         circuit declare symbol=symbol,         set symbol graphic={         shape=symbol shape,         draw,         transform shape,         circuit symbol size=width 8.12936 height 2.03233,     }     }     \begin{document}     \begin{tikzpicture}[circuit ee IEC]     \node[symbol] at (0,0) (thesymbol) {};     \end{tikzpicture}     \end{document}      The vertical separating line is currently defined by the code:               \pgfpathmoveto{\pgfqpoint{0pt}{\pgf@ya}}%     \pgfpathlineto{\pgfqpoint{0pt}{\pgf@yb}}%      The x-component/first argument of the \pgfqpoint command is what I'm interested in making variable. Appropriate lower and upper bounds are \pgf@xa and \pgf@xb. Note that the code here was largely written by forum user Qrrbrbirlbel in an answer to this question. Any suggestions are welcomed.


title: Subscript in macro

text: I would like to define a new command like the following. The latex when compiling should emit `I_{wr}` when given without arguments, or the optional arguments should come as a subscript.               \newcommand{\myCommand}[1][]{I_{wr#1}}      So If I give `$\myCommand{2}$`, then it would emit the text as `I_{wr}2`. The `2` does not come in the subscript form. Could anyone please tell me how to do this correctly? Thank You


title: Multiset notation in LaTeX

text: Does anyone know how to make (nice looking) double bracket multiset notation in LaTeX. i.e something like `(\binom{n}{k})` where there are two outer brackets instead of 1 as in binomial? You can see an example of what I mean in http://en.wikipedia.org/wiki/Multiset under the heading "Multiset coefficients" with the double brackets. In wikpedia they typset it as: `\left(\!\!{n\choose k}\!\!\right)` but although this works well for LaTeX in maths mode, with inline equations the outer bracket becomes much larger than the inner bracket. I have also tried using `\genfrac{((}{))}{0pt}{}{n}{k}` but it has an error with the double brackets. I am using `\binom` as well in my document, so I would like the bracket sizes to be similar for `\binom` and `\multiset`. Thanks for any help. I'm surprised I can't find a solution on google.


title: Using TikZ, how to draw an elliptical arc starting from point A to point B with the origin as its center where both radii are given?

text: I am new to TikZ and reading its manual now. For the sake of exercises, I want to draw Batman's logo as follows: ![enter image description here](http://i.stack.imgur.com/xsdWm.png) Using TikZ, how to draw an elliptical arc starting from point A to point B with the origin as its center?               \documentclass{article}     \usepackage{tikz}               \usepackage[active,tightpage]{preview}     \PreviewEnvironment{tikzpicture}     \PreviewBorder=12pt               \begin{document}     \begin{tikzpicture}              \filldraw[fill opacity=0.5,fill=yellow] (0,0) ellipse (7.0 and 4.3);         \draw[line width=5mm] (0,0) ellipse (6.5 and 3.8);         \draw[line width=2pt,dashed,white] (0,0) ellipse (6.0 and 3.3);              \draw[line width=2pt]                                    (0,2.7) -- (0.5,2.7) -- (1,3.25)                                  .. controls (1.2,1.3) and (1.3,1.0) ..                                  (2.0,1.0)                                  .. controls (3.0,1.0) and (3.0,2.2) ..                                  (2,3.1);              %How to draw an elliptical arc from (2,3.1) to (3.2,-2.8)?         %\draw ()   arc ();              \draw[line width=2pt]                  (3.2,-2.8)                  .. controls (4,-2) and (4,0) ..                 (2.2,-1.8)                 .. controls (1.5,-1) and (1,-1) ..                 (0,-3.2);     \end{tikzpicture}     \end{document}      Note: Horizontal and vertical radii are given. Bonus question: Instead of drawing the left part by using the same method as I did for the right part, how to use reflection technique to get a complete Batman's logo?


title: parcolumns, Vertical Misalignment of Columns

text: The columns produced by parcolumns are not vertically aligned. Why, and how can this be fixed _using the parcolumns package as intended_? I have found similar questions with answers that I find unsuitable here:   1. vspace has no effect in parcolumns   2. Parcolumns: Matching height of two adjacent columns Question (2) is essentially the same; however, I do not consider the accepted answer satisfactory. Thanks to the comments below, the following code produces vertically aligned columns.               \documentclass[graybox,envcountchap,sectrefs]{svmono}          \usepackage{parcolumns}          \begin{document}          \begin{parcolumns}{2}     \colchunk{%     \section{Introduction}\null}     \colchunk{%     \section{Einf{\"u}hrung}\null}     \end{parcolumns}          \end{document}


title: No PDF bookmarks when using llncs class

text: When using hyperref together with Springer's LNCS class (llncs), only the title of the document shows up in the PDF bookmarks. Here is a MWE:               \documentclass{llncs}     \usepackage{hyperref}     \title{Foobar}          \begin{document}     \maketitle     \section{Foo}     \section{Bar}     \end{document}      When you compile this document, the only entry in the PDF bookmarks is one for "Foobar" (which shouldn't be there) and there are no entries for the sections. Does anybody have an idea what the problem could be? I'm using TeX Live 2011 and llncs 2.17.


title: Make the toolbar of TeXnicCenter 2.02 French

text: I use TeXnicCenter Version 2.02. and I like to make the toolbar French. So I just need a `TxcResFrench.dll` file to put in the language folder (`c:\program files\TeXnicCenter\language`). So, I did search on the net the French dictionary which contains this file, but I have not found it. Can someone direct me?


title: How can I have a footnote with an \url in a section title?

text: When I have a footnote with an `\url` in the section-header, the table of contents shows nothing with it. Why and how can I fix the issue?


title: Removing the bullets of the subsections in toc?

text: I am working with the `beamer`, to create some slides. How can I remove the bullets of the subsections in the table of contents ?


title: nomencl manually sorting

text: I have a problem with manually sorting the entries for my nomenclature by the prefixes, and I cannot get it to work. Here is my code; they are supposed to be sorted by the numbers in the prefixes, i.e. in the order they are written here:               \documentclass[12pt]{scrartcl}     \usepackage[english]{babel}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{pslatex}     \usepackage[intoc]{nomencl}          \makenomenclature          \begin{document}          % cd C:\THE FOLDER\makeindex reportneu.nlo -s nomencl.ist -o reportneu.nls          \printnomenclature[2cm]     \nomenclature[1]{$A,B$}{Countries $A,B$.}     \nomenclature[2]{$C$}{Fixed cost}     \nomenclature[3]{$\underline{C}$}{The lower bound}%     \nomenclature[6]{$E$}{The equilibrium tax rates for the symmetric case.}     \nomenclature[8]{$n$}{The size factor}     \nomenclature[9]{$\overline{n}$}{The value}     \nomenclature[10]{$p_A,p_B$}{The price}     \nomenclature[15]{$\Pi_{kl}$}{The total operating profits }     \nomenclature[20]{$\emptyset$}{The non-entry option}          \end{document}      where `makeindex reportneu.nlo -s nomencl.ist -o reportneu.nls` is what I enter in the command line (filename is reportneu.tex) Here is what I tried: \- rename the file, and change the code "makeindex reportneu.nlo -s nomencl.ist -o reportneu.nls" accordingly, to run it freshly - result: the nomenclature stayed in the same order (the default order, apparently; it goes: $A,B$ < $p_A,p_B$ < $\Pi_{kl}$ < ... < $\overline{n}$)   * delete all latex files except for the .tex-file in the directory - no effect   * delete one row in the above nomenclature and run the makeindex-command again: Effect: the nomenclature did not include that entry anymore, but the remaining order stayed the same.   * try both `\usepackage[intoc,noprefix]{nomencl}` and `\usepackage[intoc]{nomencl}` \- no effect there is also no error when I execute the `makeindex`-command, look:               C:\Arbeit\Unisachen\Fall 2012\Managerial Economics>makeindex reportneu.nlo -     s nomencl.ist -o reportneu.nls     This is makeindex, version 2.15 [MiKTeX 2.9 64-bit] (kpathsea + Thai support).     Scanning style file C:/Program Files/MiKTeX 2.9/makeindex/nomencl/nomencl.ist...     .......done (10 attributes redefined, 3 ignored).     Scanning input file reportneu.nlo....done (20 entries accepted, 0 rejected).     Sorting entries....done (104 comparisons).     Generating output file reportneu.nls....done (46 lines written, 0 warnings).     Output written in reportneu.nls.     Transcript written in reportneu.ilg.      (there are 20 entries in total, I left most out here). Any help is looked forward to and greatly appreciated!


title: Online LaTeX diagram graphical editor

text: Is there an online tool that generates the corresponding LaTeX code of a diagram which can be drawn using a graphical interface? A tool such as `latexdraw` but only using a web browser (like Detexify)?


title: Per-section cited and uncited reference list with biblatex

text: I'm using the example in section `3.11.3: Multiple Bibliographies` of the Biblatex Documentation. I want to combine it with this example to get per- section `cited` and `uncited` bibliographies. It's not working, and I'm not sure why. Here's an example:               \documentclass{report}     \usepackage[defernumbers=true,sorting=none]{biblatex}     \DeclareBibliographyCategory{cited}     \AtEveryCitekey{\addtocategory{cited}{\thefield{entrykey}}}          \addbibresource{foo.bib}     \nocite{*}          \begin{document}     \begin{refsection}     Hello, World~\cite{foo}.     \printbibliography[title={My References},heading=subbibliography,category=cited]     \printbibliography[title={Future Reading},heading=subbibliography,notcategory=cited]     \end{refsection}     \end{document}      The contents of `foo.bib`:               @techreport{foo,         Author = {Nault, R. M.},         Institution = {The World},         Title = {A report on things that matter.},         Year = {2005}}          @techreport{bar,         Author = {Bar, A. F.},         Institution = {Moon Ltd},         Title = {Moon-based Research On Moon Rocks},         Year = {2005}}      This is giving me the `cited` references, but not producing a `future reading` section: ![enter image description here](http://i.stack.imgur.com/QIvoy.png) How can I successfully combine the two examples to produce a per-section `cited` and `uncited` reference list?


title: How can I draw a vertical line in a table cell?

text: I hope the explanation will be clear: I have a table with 4 rows, and one of the columns there is a value that is identical in all rows. I want instead of copying it 4 times for each row, just put it in the middle (between the 2nd and 3rd row) and have two vertical lines stretching above and below it up to to the 1st row and 4th row. I managed to put the number using `multirow` in the middle, but I don't know how to draw the two vertical lines. Any ideas? EDIT: I want the vertical lines to stretch from the middle above the number -- up and one from the middle below the number down.


title: TikZ Tree Rectangle around nodes

text: below you can see my code of a tree besides a table. Now I would like to insert some rectangles and ellipses around the nodes. Can someone show me how I can do this. I tried it but it did not work. Thank you!               \documentclass[doc,apacite]{apa}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     %%%%Tikz%%%%%%     \usepackage{tikz}     \usetikzlibrary{trees,matrix,fit}     %%%%%%%%%%%%%%     %%%%Table%%%%%     \usepackage{ctable} % needed for \cmidrule{}     \usepackage{multirow} % needed for \multirow{}     %%%%%%%%%%%%%%     \usepackage{pgfkeys}          \begin{document}              \begin{tikzpicture}[             grow=right,             sloped,             bag/.style={text width=4em, text centered},             end/.style={circle, minimum width=3pt,fill, inner sep=0pt,font=\tiny},             sibling distance=\sibdist,             level 1/.style={level distance=2.0cm},             level 2/.style={level distance=2.5cm},             every node/.style={font=\strut},             ]           \node(n){x}               child {                   node{U2}                               child {                           node[label=right:                               ]{D2} {}                                   child {node[end, label=right:                                   {R1}] {}                                   edge from parent                                   node[above] {$1-R$}                                   node[below]  {}}                                   child {node[end, label=right:                                   {R2}] {}                                   edge from parent                                   node[above] {$R$}                                   node[below]  {}}                                   child[missing]                           edge from parent                           node[above] {$1-D$}                           node[below]  {}                       }                       child {%empty child on level 2                         child{                             node[end, label=right:                                 {D1}] {}                             edge from parent                             node[above] {$D$}                             node[below]  {}                         }                       }                       child[missing]                       edge from parent                        node[above] {}                       node[below]  {$1-u$}               }               child {                   node{U1}                               child{% empty child on level 2                         child{                             node[end, label=right:                                 {$T$}](e) {}                             edge from parent                             node[above] {}                             node[below]  {}                         }                       }                   edge from parent                                node[above] {$u$}                       node[below]  {}               };           \matrix[               matrix of nodes,               anchor=m-4-1.west,               xshift=1cm,               nodes={inner xsep=\tabcolsep,minimum height=\sibdist}             ](m)at(n-1-1-1){%               c&b&a&c&bd&a\\               a&c&b&a&a&c\\               x&g&f&c&d&b\\%[1cm]               ta&g&a&x&p&d\\           };           \foreach \i in {1,...,6}\node[draw,fit=(m-1-\i) (m-2-\i) (m-3-\i) (m-4-\i),inner sep=-.5\pgflinewidth](c\i){};           \foreach \i in {1,...,3}\draw([yshift=-.5*\sibdist]m-\i-1.center-|c1.west)--([yshift=-.5*\sibdist]m-\i-1.center-|c6.east);         \end{tikzpicture}          \end{document}


title: How can I use \linebreak inside a node, in tikz?

text: This is my code, which doesn't work:               \documentclass{article}     \usepackage{tikz}     \begin{document}     \tikz \node {start\linebreak{}stop};     \end{document}      The `\linebreak` command doesn't work. In order to make it working I have to say `\node[text width=5em]..`. Is there any other method to make it working, without explicit specification of the node text width?


title: Setting \setcounter{tocdepth} for an individual chapter

text: Hiya, Is it possible to set the `\setcounter{tocdepth}{..}` for one chapter only? The default depth is fine for the entire document, except for the last chapter- I only want the chapter title to appear in the table of contents (all sections, subsections etc should not appear). I could adjust all of my sections to use an asterisk, eg `\section*{...}` which will cause them to not be numbered and not show up in the ToC, however I want these sections to be numbered! (I have references to these numbers elsewhere). I have tried placing `\setcounter{tocdepth}{1}` to the chapter I want this to apply to, and have tried adding it to my main tex file before the `\include` of that chapter, doesn't seem to work (I guess because `\maketitle` has already been called by that stage?) Any suggestions?


title: Tagged Sections

text: A professor I work with has loads of exam problems in LaTeX. However, he wants to index them in some sort. He wants to be able to tag them according to topic, last year it was used and so on, and then be able to sort and search them according to these tags. The only answer I came up with was index and makeindex, however that seems a bit overkill. Is there any package that can accomplish this?


title: \numberwithin makes the first equation unnumbered

text: I might be doing something stupid, but the following code produces a document with the first equation unnumbered (only an empty set of parentheses is given). The second equation is correctly numbered as 1.1.2. If I remove the change to `\theequation`, then everything is counted normally.               \documentclass[draft,fleqn,openany]{book}     \usepackage[tbtags]{amsmath}     \usepackage{amssymb}     \usepackage[no-math]{fontspec}     \usepackage{xkeyval}     \usepackage{polyglossia}     \setmainfont[BoldFont={* Bold},ItalicFont={* Italic},BoldItalicFont={* Bold Italic},SlantedFont={Linux Libertine Slanted O}]{Linux Libertine O}     \usepackage[letterpaper]{geometry}     \renewcommand{\theequation}{\numberwithin{equation}{section}}     \allowdisplaybreaks[1]     \setdefaultlanguage[variant=british]{english}     \begin{document}     \frontmatter     \title{A test document}     \author{AstroPig7}     \date{}     \maketitle     \tableofcontents     \mainmatter     \chapter{One}     Test document.     \section{Two}     Test document.     \begin{equation}     \text{Test.}     \end{equation}     \subsection{Three}     \begin{equation}     \text{Test.}     \end{equation}     \end{document}      I’ve also tried removing various non-essential declarations from the preamble with no success.


title: What are a good set of macros for writing beamer presentations?

text: I previously asked about tricks for reducing typing when writing beamer presentations. I thought it might be useful to write a few macros for common commands. E.g., something like this:               \newcommand{\bi}{\begin{itemize}}     \newcommand{\ei}{\end{itemize}}     \newcommand{\be}{\begin{enumerate}}     \newcommand{\ee}{\end{enumerate}}     \newcommand{\bb}{\begin{block}}     \newcommand{\eb}{\end{block}}      I'm always a little wary about defining macros in case it introduces issues. In particular, I encountered problems when trying to write a macro for `\begin{frame}`. Has anyone already done this and worked out a good set of macros? I'd also be interested in whether experienced users think macro redefinition in this case is worth the bother.


title: error with hyperref and the krantz class

text: I'm using the krantz.cls to write a book, and I ran into an error with the `hyperref` package. Here is a minimal example (`test.tex`):               \documentclass{krantz}     \usepackage{hyperref}     \begin{document}     \chapter{Introduction}     \end{document}      When I compile it with `pdflatex test.tex`, I get this error:               Runaway argument?     {Introduction}]{[}{Introduction}]{Introduction} \end {document}      ! File ended while scanning use of \Hy@org@chapter.     <inserted text>                      \par      <*> test.tex      Without `hyperref`, it compiles fine. I appreciate if anyone can tell me why this happens and how to fix it.               $ pdflatex --version     pdfTeX 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian)     kpathsea version 6.1.0     Copyright 2012 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).     There is NO warranty.  Redistribution of this software is     covered by the terms of both the pdfTeX copyright and     the Lesser GNU General Public License.     For more information about these matters, see the file     named COPYING and the pdfTeX source.     Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).     Compiled with libpng 1.2.49; using libpng 1.2.49     Compiled with zlib 1.2.7; using zlib 1.2.7     Compiled with poppler version 0.20.4          $ head `kpsewhich hyperref.sty` -n 34 | tail -n 4     \NeedsTeXFormat{LaTeX2e}[1995/12/01]     \ProvidesPackage{hyperref}       [2012/05/13 v6.82q %       Hypertext links for LaTeX]      * * * ## Update I contacted the author of this package and the problem was solved. See the corrected krantz.cls. ## Does not work with recent versions of HyperRef I figured out that the recent versions of the krantz class do not work with the latest version of `hyperref`. I systematically tried versions from: ftp://download.gnu.org.ua/pub/release/hyperref/ The crash occurs at starting at version File: `hyperref-6.83b.tds.zip` 3925 KB 18/08/2012 12:00:00 AM and higher (crashes with 6.83c, 6.83f, 6.83k, 6.83m) and will compile with the earlier version File: `hyperref-6.83a.tds.zip` 3915 KB 13/08/2012 12:00:00 AM The older version 6.83a has lines like:               \hyper@linkstart{link}{#4}{#2}\hyper@linkend      and has been replaced in the newer version 6.83b with               \hyper@linkstart{link}{\Hy@tocdestname}{#2}\hyper@linkend      The error that is generated when compiling with 6.83b is               ! Undefined control sequence.     <argument> \Hy@tocdestname          l.6 \tableofcontents          ?      My guess is that is the region causing the errors. So the work around is to use `hyperref` version 6.83a.


title: Add NON-English spell-checker and/or dictionary to Kile?

text: I'm running Kile 2.1.0 on Debian 7.3 _Wheezy_ , KDE desktop, 32-bit processor. I'm trying to add Italian dictionary and spell-checker to Kile's configuration. I've followed the instructions of user **np8** in this tex.SX discussion but it didn't work. I downloaded the *.oxt file from OpenOffice.org/LibreOffice extension's web-site, changed the ending into *.zip, unzipped it to obtain the *.dic and *.aff files. Then I transferred those into the folder `~/.config/enchant/` where only `en_US.dic` and `en_US.exc` were present (they were practically 0 Byte files, empty, since I had turned Kile's spell checker off till that point). Still not working, Kile doesn't see those files, only English and Hebrew are available: ![enter image description here](http://i.stack.imgur.com/u9YzU.jpg) Anyone know what I can try next? Also, I think I have a slightly bugged version of Kile since for no rhyme or reason it keeps adding a single quote mark `'` every time I happen to type `I'm` or `it's`, see this other discussion.


title: problem with tikz-qtree

text: When I type set this example, I get > I, love, my , country as four different nodes. I know I am not able to get a syntax for enclosing MULTIPLE words together for tikz-qtree. I tried to look into various examples in manual, but manual has used single words only to exemplify.               \begin{tikzpicture}         \tikzset{edge from parent/.style=         {draw,         edge from parent path={(\tikzparentnode.south)         -- +(0,-8pt)         -| (\tikzchildnode)}}}         \Tree [.S [.I love my country [.Det the ] [.N cat ] ]         [.VP [.V sat ]         [.PP [.P on ]         [.NP [.Det the ] [.N mat ] ] ] ] ]         \end{tikzpicture}


title: How to use the new zoterordfxml feature of Biber?

text: I use `zotero` to manage my bibliography and `Biblatex` \+ `biber` to use it. For now, I export a .bib file and use it with `Emacs+AUCTex`. I can cite in a very easy way by using `Ctrl``[` (`AUCTex` cite feature with Regex) and writing the name of the author I want to cited. I can choose, then, the article I want to cite. I automatized the .bib export at each change with autozotbib plugin. _But_ , it is not perfect : I have some problems with Biblatex fields (zotero seems to export using the Bibtex fields and not biblatex ones). And, I am not refused a way to interconnect more closely zotero and Biblatex (than the simple .bib export). I read in biber project page : > Experimental support for RIS, Endnote XML and Zotero RDF/XML When surfing on the web, you can found mention of zoterordrdfxml feature of biber (there is a man page for ubuntu and a google groups thread). The biber manual says only : > Other datasource types : For datasources other than BTEX, (e.g. ris, > endnotexml and zoterordfxml), the source entrytypes and fields are usually > very differently modelled and named. For example, here is how to drop > dc:subject fields from various entrytypes in Zotero XML RDF format data > sources:               <maps datatype="zoterordfxml" map_overwrite="1">     <map>     <per_type>journalArticle</per_type>     <per_type>book</per_type>     <per_type>bookSection</per_type>     <map_step map_field_set="dc:subject" map_null="1"/>     </map>     </maps>      These informations are not sufficient (for me) to use the zoterordfxml (experimental) feature. **Does someone set successfully Biber to use a zotero database without exporting a .bib file ? (by the help of zoterordfxml feature or not)**


title: \answerline to the right of a question with dot line between answer line and question

text: I see a nice feature \answerline to the right of a question. The answer is put to the right of a question. What I want is:   1. the number before the answer line should be removed, because I think the number before answer line is redundant.    2. dotted line between the question end and the answer. Is that possible?


title: Filtering key-value options

text: I want to define a new environment whose implementation depends on another environment. The first environment should accept a list of key-value options. Some of these options are for use only on this first environment. All options not known to the first environment are to be passed to the other environment. Is there any package for dealing with options filtering in LaTeX?


title: How to include Appendices' name in LOF?

text: I would like to know how to show Appendices' name in LOF if they contain figures.                   % % % % % % % % % % PACKAGES % % % % % % % % % % % % %          \documentclass[11pt,a4paper]{report}              \usepackage[english]{babel}     % english language         \usepackage{graphicx}           % images in the document         \usepackage{float}              % containers         \usepackage{wrapfig}            % wrap text around figure         \usepackage{subfig}             % some images in a environment              \usepackage{appendix}         \usepackage{titlesec}         \usepackage{chngcntr}              % code to put chapter name in LOF (hyperref must be loaded after it)         \usepackage{etoolbox}         \makeatletter         % initial definitions of the chapter info (name and number)         \def\thischaptertitle{}\def\thischapternumber{}         \newtoggle{noFigs}              \apptocmd{\@chapter}%           {\gdef\thischaptertitle{#1}\gdef\thischapternumber{\thechapter}%             \global\toggletrue{noFigs}}{}{}              % the figure environment does the job: the first time it is used after a \chapter                         command it writes the information of the chapter to the LoF         \AtBeginDocument{%           \AtBeginEnvironment{figure}{%             \iftoggle{noFigs}{               \addtocontents{lof}{\protect\contentsline {chapter}%                 {\protect\numberline {\thischapternumber} {\thischaptertitle}}{}{} }               \global\togglefalse{noFigs}             }{}           }%         }              % hyperlinks typesettings         \usepackage[             % comment this out to avoid backref in bibliography             %backref=true,    % allows to add links inside...             %pagebackref=true,% ...the bibliography             hyperindex=true, % add links in the index             bookmarks=true,  % show bookmarks bar when displaying the document}                {hyperref}         ]{hyperref}         \hypersetup{         colorlinks=true, % colored links         breaklinks=true, % allows return line in too long links         urlcolor= blue,  % links color         linkcolor= blue, % internal links color         citecolor= blue, % green by defaut, color of citation links (bibliography)         bookmarksopen=true,         }              % code to make appendices' sections look like chapters and subsections like sections in the body of the document         \makeatletter         \newcommand\changesections{%         \renewcommand\thesection{\Alph{section}}         \counterwithin{figure}{section}         \counterwithin{table}{section}         \renewcommand\thefigure{\thesection.\arabic{figure}}         \titleclass{\section}{top}         \newcommand\sectionbreak{\cleardoublepage}         \titleformat{\section}[display]         {\normalfont\huge\bfseries}{\chaptertitlename\ \thesection}{20pt}{\Huge}         \titlespacing*{\section}           {0pt}{50pt}{40pt}         \titleformat{\subsection}           {\normalfont\Large\bfseries}{\thesubsection}{1em}{}         \titlespacing*{\subsection}           {0pt}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex}         }         \makeatother                   % % % % % % % % % % RAPPORT % % % % % % % % % % % % %          \begin{document}              \listoffigures         \newpage              % chapter 1:         \chapter{Introduction}         \section{Problem overview}         \begin{figure}[H]             \caption{Comparative table 1}         \end{figure}              \section{Application description}         \begin{figure}[H]             \caption{Comparative table 2}         \end{figure}         \newpage         % end chapter 1               % appendices         \appendix         \clearpage % or \cleardoublepage         \appendixpage         \addappheadtotoc         % code to show appendices at section level in TOC         \begin{appendices}         \changesections         \section{Installation requirements}             \section{Performance evaluation I appendix}              \subsection{Strahov}         \begin{figure}[H]             \caption{Comparative table 3}         \end{figure}              \subsection{University laboratory}         \begin{figure}[H]             \caption{Comparative table 4}         \end{figure}              \end{appendices}         % end appendices              \end{document}      Now, LOF is displayed like this: ![LOF](http://i.stack.imgur.com/g0K37.png) Notice the piece of code to show Chapters' name in LOF if they contain figures, and the piece of code to make appendices' sections look like chapters and subsections like sections in the body of the document.


title: Creating hyperlinks with imakeidx using cleveref

text: I'm using `imakeidx` to create the index of my thesis and I would like to have hyperlinks to the pages that are hereby cited. Unlike this discussion, I'm using the `cleveref` package. Here is the MWE that reproduces the problem:               \documentclass{scrbook}     \usepackage{classicthesis}     \usepackage{imakeidx}     \makeindex     \usepackage{cleveref}     \begin{document}          \chapter{First chapter}     This is the first definition:\index{First definition}     \begin{equation}     a=\frac{b}{c}     \end{equation}          \chapter{Second chapter}     This is the second definition\index{second definition}     \begin{equation}     b=a\times c     \end{equation}          \printindex          \end{document}      Every suggestion is welcome.


title: Output TeX into a PDF template

text: I'm writing a cover letter that I want to have on university letterhead, which I have a full-sized electronic copy of (in PDF as well as JPG). Is there an easy way to make TeX do this?


title: LaTeX installation query

text: I have just installed TeX Live 2011 using the `install-tl` Perl script on my extenal hard drive. What do I have to do next in order to get LaTeX up and running? EDIT: i am using ubuntu 11.10. Terribly sorry if the earlier version was vague, i thought mentioning the install-tl script would be specific enough. I type `latex file.tex` into the commandline, and it does not work.


title: Customization of middle axis lines

text: I'm trying to customize a bit the axis lines extension of `pgfplots`. Here is my code and what I get now. ![enter image description here](http://i.stack.imgur.com/sRkMj.png)               \documentclass{standalone}     \usepackage{pgfplots}     \pgfplotsset{%       compat = 1.7,       every non boxed x axis/.style = {%         enlarge x limits = true,         x axis line style = {-stealth}       },       every non boxed y axis/.style = {%         enlarge y limits = true,         y axis line style = {-stealth}       },       axis x line = middle,       axis y line = middle,       every axis x label/.style = {%         at = {(xticklabel cs:1)},         anchor = north},       every axis y label/.style = {%         at = {(yticklabel cs:1)},         anchor=east}     }     \begin{document}     \begin{tikzpicture}       \begin{axis}[xlabel = $x$,                     ylabel = $\sin x$]         \addplot+[domain=-10:.5,samples=40] {sin(deg(x))+2};       \end{axis}     \end{tikzpicture}     \end{document}      I'd like to do four things automatically and I'm struggling with the doc...   1. Both axis must intersect at `(0,0)` whatever the function ploted is.   2. The `xlabel` must be below the `xaxis` at its end and the `ylabel` at left of the `yaxis` at its end (similar to the ticklabels).   3. I want the `ticklabel` `0` to appear below left `(0,0)` once (say only as a `xticklabel`).   4. Whatever the function ploted is, I'd like the axis to intersect at `(0,0)` and go at least a bit in the four directions (up, down, left and right, like a `+`). In the example above, I only get a `_|_`).


title: Figure and text vertical alignment in two column document

text: I am trying to set a layout for a twocolumn book with a particular page layout (specified with the `geometry` package) and with the _text in both columns aligned to each other_. For this I've already adjusted the lengths of the spaces between paragraphs and before and after floats:               %%% adjust all spacings to \baselineskip to align text paragraphs and floats      \usepackage{setspace}     \setstretch{1.5}     \setlength{\parskip}{\baselineskip}     \usepackage{etoolbox}     \BeforeBeginEnvironment{figure}{\kern \baselineskip}      and it works out fine for the standard page layout*: ![enter image description here](http://i.stack.imgur.com/xLE7f.jpg) However, once I alter the page layout, specifically the body text, with the `geometry` package it stops working. ![enter image description here](http://i.stack.imgur.com/tRf7C.jpg) Can somebody explain me why this happens and how I can fix it? Here's the MWE.               \documentclass[twocolumn]{book}          % page layout settings with geometry      \usepackage[papersize={240mm,300mm}                 ,hmargin={25mm}                 ,top={20mm}                 ,columnsep={10mm}                 ,body={190mm, 220mm} % <- when textbody is changed, fig/float placement changes!                 ]{geometry} %,          \usepackage{lipsum}         % generates filler dummy text               \usepackage[demo]{graphicx} % demo option replace images with black rectangles for testing purposes     \usepackage{caption}          % adjust all spacings to \baselineskip to align text paragraphs and floats      \usepackage{setspace}     \setstretch{1.5}     \setlength{\parskip}{\baselineskip}     \usepackage{etoolbox}     \BeforeBeginEnvironment{figure}{\kern \baselineskip}          \begin{document}          \lipsum[4]              \begin{figure}[tb]       \centering       \includegraphics[width=0.8\columnwidth]{castle}       \caption{This is a caption This is a caption This is a caption This is a cThis is a captionThis is a captionThis is a captionThis is a captionaption This is a caption.}     \end{figure}          \lipsum          \end{document}


title: How do I typeset the concatenation of strings properly?

text: I am looking for a good way to typeset the concatenation of two strings. This is standard notation in descriptive set theory to join an m-tuple `x` to an n-tuple `y` to get an (m+n)-tuple `x^y`, that is, a small slightly raised circumflex or frown joining the upper parts of the characters together. I currently use the straightforward               x^\smallfrown y      which doesn't look terribly good. Semantically, this is a binary operation, but it shouldn't have the usual spacing on the right and the left and it should be higher up than a minus sign, say. Here's a sample screen shot from Moschovakis's _Descriptive set theory_ (p.76 of the pdf) which is approximately what I'd like to do, but I'd prefer a frown: ![Sample screen shot from Moschovakis](http://i.stack.imgur.com/3oRF7.png) * * * Looking around on this site, I found the question String/vector concatenation symbol but it is concerned with _which_ symbol to use for the operation, so it doesn't address my question.


title: Providing optional (unused) parameter to macro along with \tikzmark introduces spurious space

text: In my _overkill_ solution to Enclose an entry in an enumerate list in parentheses there is spurious space at the beginning of _some_ (not all) uses of `\SpecialItem`. I have narrowed it down to the MWE below where the macro `\SpecialItem` is defined with two optional first parameters, the first of which defaults to `\DrawLines`:               \NewDocumentCommand{\SpecialItem}{O{\DrawLines} o}{...code...}      In the `\SpecialItem` macro defined here, the first optional parameter is not used (the macro `\DrawLines` is not even defined). So, using:               \SpecialItem  ...text...      is just fine. But if I specify the first optional parameter:               \SpecialItem[\DrawLines]  ...text...      I get spurious space introduced following the `\item`'s label as in the third list item: ![enter image description here](http://i.stack.imgur.com/VDEbd.png) ## Notes:   * If `\tikzmark` is not used, or defined to be `{}`, then there is no spurious space. I don't think this problem is related to `\tikzmark` as I have used that numerous time and not noticed this problem earlier.   * Moving the `\tikzmark` to be _before_ the `\item` also does not produce this spurious space. But, I need it to be after the label as I want a reference to the start of this `\item`, and not to the end of the previous `\item`.   * In this answer to strange interaction between `mdframed` and item, egreg mentions that > Redefining `\item` can be dangerous and have impredictable results Even though in the actual usage I am redefining `\item`, in this MWE `\item` is not redefined, just called via another macro. Hence, I do not think that the problem is related to this. ## Code:               \documentclass{article}     \usepackage{xparse}     \usepackage{tikz}     \usepackage{showframe}          \newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node (#1) {};}     %\renewcommand{\tikzmark}[1]{}%  Using this does not produce spurious space          \NewDocumentCommand{\SpecialItem}{O{\DrawLines} o}{%         % #1 is not really used in this MWE, but is used in actual application         \IfNoValueTF{#2}{%             \item\tikzmark{MarkStart}%         }{%             \item[#2]\tikzmark{MarkStart}%         }%     }%               \begin{document}     \begin{enumerate}     \item item     \SpecialItem SpecialItem without optional param     \SpecialItem[\DrawLines] SpecialItem with optional param     \item item     \end{enumerate}     \end{document}


title: If I have a list of numbered questions, how can I align my questions to the right of the number?

text: I'm editing a paper with a bunch of questions numbered from 1 to 10. In the example that my professor gave me, he had it formatted so that the number of the question would be listed, and then the question itself would be aligned with it's own margin next to the number. I know in Microsoft Word, for example, it aligns itself automatically, but I don't know how to do that in TeXStudio. Is there some command that I don't know about?


title: Removing dot after section letter

text: Right now this I'm getting this for my first subsubsection: > G.1.1. I would like for this to be > G1.1. Does anybody know if it is possible to remove the first dot and put G and 1 together without a space between? Code below:               \documentclass{article}          \begin{document}          \renewcommand{\thesection}{\Alph{section}}     \setcounter{section}{7}     \setcounter{subsection}{1}     \subsubsection{Hello World} % G.1.1 I want it to be G1.1          \end{document}


title: Bibliography & \include

text: I am working on a big project divided, and i've decided that the best way to go about it is to write separately each chapter and then simply used the \include command on the main document. However, I will also need to bibliography. I thought about using the thebibliography environment but i am confused. where would i need to do this? In the main document? if so, would I still be able to use the \cite function on each of the individual documents? Thank you in advance.


title: prevent indentation of a paragraph

text: In Lyx, by default most paragraphs are indented (except at beginning of section and after lists). How can I cancel the indentation for specific paragraphs?


title: Are there external graphics files with natural depth?

text: The `\includegraphics` command from the `graphicx` package provides options `height` and `totalheight` for resizing embedded graphics. As long as the graphics file doesn't possess a natural depth, it doesn't make a difference whether the one or the other option is used. Therefore I wonder why `totalheight` is provided at all. Are there graphics file formats that allow for natural depth? I have never met one so far, but I am willing to accept the contrary.


title: pgfplots - How can I increase TeX's capacity for plotting large datasets? (TeX Live on Windows)

text: There are several questions and replies on this topic, yet so far I haven't found one which reliably details the steps for **TeX Live and TeXstudio on Windows**. Of course the editor might be an irrelevant part here if this will lead to the permanent solution via the `texmf.cnf` file, but I'd be happy to try the other method as well (i.e. to call pdflatex differently). The bits I found so far:   * Increase TeX capacity, as non-root A 3 year old question which lead to the guide in the pgfplots manual (page 458), which is for Ubuntu/Linux.   * Increasing TeX's main memory Also about a TeX Live install on a Linux system, it is about 1.5 years old.   * How to use very large data sets with pgfplots w/o making pdf take a very long time to load? For Ubuntu again, about 3 years old. I have Windows, Windows 7 to be specific and am using TeX Live (2013) with TexStudio. I am wondering how the steps are for this case? I think this is worth a (new) question since I am arguably not the only one not experienced enough to transfer the steps for Linux to Windows. Then there are the possibilities named:   * Externalization and   * Bitmap graphics export. The catch is, the first one is of course very good for any runs of pdflatex except the first one, as I am experiencing this issue when I try to plot the dataset for the first time while using the externalization library. :( For the second bit, I am a bit foggy on that since I couldn't gather enough facts. Christian states it might not be that useful for someone with descriptions in it, yet the same code except for some lines in the end is used (see the TikZ manual on page 689). But that might be an entirely different issue and worth its own question.


title: How to use \limits correctly?

text: I have used `\limits` in `\[\bigcup\limits_{\i \in I}\]` in order to make subscripts displayed in bottom of `\bigcup`. However, it looked the same as `\[\bigcup_{\i \in I}\]`. I.e. it didn't work. Why? Didn't I used it in the correct way? * * * Update MWE:               \documentclass{aomart}          \DeclareMathOperator{\Union}{\mathop{\bigcup}}     \begin{document}     \[\Union\limits_{i \in I}\]     \end{document}


title: A package to make stickers?

text: I would like to make stickers for envelopes. Each sticker would contain data about one recipient of the letter. I would like to be able to have this data in some text format (CSV) and that LaTeX would take it and format it for printing, of multiple stickers on one page. Is there a package for something like this? Is there some other efficient way to do it?


title: Setting unit length in TikZ?

text: As I understand it, the basic unit length in TikZ is 1cm, so that for example               \draw (0,0) -- (1,0);      draws a line 1cm in length. What I want to do is to redefine that length so that all drawings in my document are a different size. Using ConTeXt, how can I do this?


title: Color legend in Y axis

text: I have the following multiple y-axis plot that results in the image on the top image. However, I want to add a sort of legend in each of the Y axis, similar to what I manually drew in the bottom image. Any idea how can I add color tags into the Y axis labels? ![enter image description here](http://i.stack.imgur.com/6D4IZ.png) ![enter image description here](http://i.stack.imgur.com/8ZDJT.png)               \pgfplotsset{compat=1.5}     \begin{tikzpicture}          \begin{axis}[%     grid=major,grid style={dashed},     width=3in,     height=3in,     scale only axis,     xmin=2,     xmax=21,     separate axis lines,     every outer y axis line/.append style={black},     every y tick label/.append style={font=\color{black}},     ymin=0,     ymax=0.02,     ytick       ={    0, 0.005,  0.01, 0.015,  0.02},     ylabel      ={Maximun displacement error},     yticklabels ={    0, 0.005,  0.010, 0.015,  0.020},     xtick       ={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21},     xticklabels ={0.00,,,,,0.005,,,,,0.010,,,,,0.015,,,,,0.020},     %xtick      ={0,2.5,5,7.5,10,12.5,15,17.5,20,21},     %xticklabels    ={0.00,,0.005,,0.010,,0.015,,0.020,},     ]     \addplot [     color=red,     solid,     line width=2.0pt,     forget plot     ]     table[row sep=crcr]{     1 0\\     2 0\\     3 0.00199752\\     4 0.00299752\\     5 0.00399893\\     6 0.00499837\\     7 0.00599192\\     8 0.00699623\\     9 0.00799115\\     10 0.00899543\\     11 0.00999383\\     12 0.0109399\\     13 0.0119664\\     14 0.0129645\\     15 0.0139899\\     16 0.0148372\\     17 0.0159921\\     18 0.0164528\\     19 0.0179454\\     20 0.018987\\     21 0.0197936\\     };     \end{axis}          \begin{axis}[%     width=3in,     height=3in,     scale only axis,     xmin=2,     xmax=21,     every outer y axis line/.append style={black},     every y tick label/.append style={font=\color{black}},     ymin=0,     ymax=1,     ytick={   0, 0.25,  0.5, 0.75,    1},     yticklabels ={    0$\%$, 25$\%$,  50$\%$, 75$\%$,  100$\%$},     ylabel={Percentatge of corrected area},     axis x line*=bottom,     axis y line*=right,     xtick={},     xticklabels={},     ]     \addplot [     color=green,     solid,     line width=2.0pt,     forget plot     ]     table[row sep=crcr]{     1 1\\     2 1\\     3 0.904386951631046\\     4 0.526809148856393\\     5 0.314585676790401\\     6 0.202474690663667\\     7 0.182602174728159\\     8 0.164604424446944\\     9 0.142482189726284\\     10 0.0941132358455193\\     11 0.0761154855643045\\     12 0.0712410948631421\\     13 0.0663667041619797\\     14 0.0626171728533933\\     15 0.0543682039745032\\     16 0.0284964379452568\\     17 0.0273715785526809\\     18 0.0269966254218223\\     19 0.0232470941132358\\     20 0.0213723284589426\\     21 0.0206224221972253\\     };     \end{axis}     \end{tikzpicture}%


title: Turn each single dash into en-dashes for page ranges in biblatex

text: I use `biblatex` with the setting,               \usepackage[backend=biber, sorting=nyt, citestyle=ieee-alphabetic,                  bibstyle=ieee-alphabetic,  maxnames=3,minnames=1,maxbibnames=99]{biblatex}      and my bib source coming from Mendeley has some articles,   * with no pages   * with a single page   * with a page range with a single dash `123-293`   * with a page range with an en-dash `123--293` Is it possible to automatically turn the single dashes into the en-dashes in the preamble of my TeX file ? This would cope well with the updates of the source file from Mendeley as I add more papers to it.


title: Align bar charts from different sources with one xlabel each

text: I have a pgfplot that reads from two files. I want a bar chart where the values (bars) of one file appear over one xlabel and the values from another file over another (A and B in this example). My current solution comes fairly close but is 1) a bit hackish as it arranges the entries in the cycle list so the charts are aligned properly and 2) does not align the bars properly with the xticks.               \documentclass[border=5mm]{standalone}     \usepackage{pgfplots}     \usepackage{pgfplotstable}               \pgfplotsset{         cycle1/.style={green},         cycle2/.style={orange},         cycle3/.style={blue},         cycle4/.style={purple},      }          \pgfplotscreateplotcyclelist{mycyclelist}{         cycle1\\%         cycle1\\%         cycle2\\%          cycle2\\%          cycle3\\%         cycle3\\%         cycle4\\%         cycle4\\%     }          \begin{document}               \pgfplotstableread{     123 11778.83 18995.27 19049.38 22236.73     }\dataA          \pgfplotstableread{     123 1925.39 7014.29 10721.35 24199.01     }\dataB          \begin{tikzpicture}     \begin{axis}[                 ybar=-1pt,                 bar width=5,                  ymin=0,                  cycle list name = mycyclelist,                  xtick={0, 1},                 xticklabels = {                     A, B                 },                 enlarge x limits={abs=0.75},              ]                  \foreach \y in {1, 2, 3, 4} {                 \addplot plot table [x expr=0, col sep=semicolon, header = true, y expr=\thisrowno{\y} / 1000]                         \dataA;                 \addplot plot table [x expr=1, col sep=semicolon, header = true, y expr=\thisrowno{\y} / 1000]                         \dataB;             }     \end{axis}     \end{tikzpicture}          \end{document}      What I am looking for is a solution that aligns the bars properly to the xticks (even better if the cycle-list-trick can be resolved). The goal would be something like this: ![goal](http://i.stack.imgur.com/zPRrx.png) Whereas in the MWE, the A bars are shifted a bit to the left and the B bars a bit to the right: ![improperly aligned](http://i.stack.imgur.com/F15e9.png)


title: Change color of figure caption text

text: In my code below, I wanted to change the color of the text for the table and figure caption. I am using this:               \usepackage[svgnames]{xcolor}     \definecolor{ocre}{RGB}{243,102,25}     \usepackage{caption}     \usepackage[labelfont={color=ocre,bf}]{caption}          \renewcommand{\thefigure}{\textcolor{ocre}{\bfseries\itshape\thechapter.\arabic{figure}}}     \renewcommand{\figurename}{\textcolor{ocre}{\bfseries\itshape Fig.}}     \renewcommand{\thetable}{\textcolor{ocre}{\bfseries\itshape\arabic{table}}}     \renewcommand{\tablename}{\textcolor{ocre}{\bfseries\itshape Table}}      This is what I get as the output. ![enter image description here](http://i.stack.imgur.com/kK9hO.png) Can you tell me how to get the caption text the same color as the Fig.1.1 text?


title: How can I keep my TikZ overlay picture on the same page?

text: I needed to draw squares to highlight submatrices and I found on the internet (perhaps here) a snippet that uses TikZ. By the way I found that if the math expression is at the end of the page, the square is drawn in the next page. Please compile the following code with `pdflatex` to understand what I mean. If you remove an 'a' paragraph, you get the correct behavior. How do I solve the problem? Are there better solutions?               \documentclass[11pt,a4paper]{article}      \usepackage{blindtext}     \newcommand{\pder}[2]{\frac{\partial #1}{\partial #2}}          \usepackage{tikz}     \usetikzlibrary{decorations.pathreplacing,intersections,shapes.arrows}     \usetikzlibrary{calc}     \usetikzlibrary{matrix,positioning}          \newcommand{\tikzmark}[1]{\tikz[overlay,remember picture]\node(#1){};}     \newcommand{\DrawBox}[1][]{%         \tikz[overlay,remember picture]{         \draw[#1]           ($(left)+(-0.5em,1.2em)$) rectangle           ($(right)+(0.5em,-0.5em)$);}     }          \begin{document}              \blindtext[3]              a              a              a              a              a              a              a                  \[             J(\psi \circ \phi^{-1})\big|_{\phi(q)} = \left(             \begin{array}{cccc}                 \tikzmark{left}\pder{y^1}{x^1} & \ldots &\pder{y^1}{x^{n-1}} &\pder{y^1}{x^{n}} \\                 \vdots & &\vdots &\vdots \\                 \pder{y^{n-1}}{x^1} &\ldots &\pder{y^{n-1}}{x^{n-1}}\tikzmark{right} &\pder{y^{n-1}}{x^n} \\                 0 &\ldots &0 & \pder{y^n}{x^n} \\             \end{array}\right) \phi(q)             \]             \DrawBox[dashed]                  \blindtext[6]     \end{document}


title: inclusion + nested section

text:
I'm generating some TeX code with XSLT that will be included in a main document. I've have no prior knowledge of the place where it will be included: it could be within a `section` or a `subsection`. How can I create a section just like a set of nested UL in html

Hello

World

      I tried something like:               \begin{section}     Hello     \begin{section}     World     \end{section}     \end{section>      but it didn't work: they all have the same depth.


title: Keywords with spaces in Listings

text: I want _spaced keywords_ in `listings` (that is, keyword, with spaces in between). Now, there are some questions in this site already answered, like this one, where the official answer is that “it is not possible”. But, of course, like almost everything, there are workarounds that let you do it. However, I've seen in the documentation of `microtype` correctly highlighted keywords that _do_ contain spaces (e.g., `no ligatures`, `outer kerning`, `outer spacing`). That's all. If I didn't make myself clear, please, leave a comment. That's the question: _I want to reproduce the system used in`microtype`'s documentation_. * * * # Update As @Robert noted, he used `latin1` encoding in the documentation. Which seems to work nice with `lstlisting` (apart from non-breaking spaces, it even accepts, e.g., `á`, `ü` by default). But I use `utf8` (not for anything special, but because it's recommended everywhere), which doesn't behaves well with `listings`. Since I like this idea of using non-breaking spaces to define keywords with spaces, I will rewrite my question ## Is there a way to teach `utf8`/`listings` to _understand_ non-breaking spaces inside of keywords? Here is a minimal non-working example: **NOTE:** the space between `spaced` and `keyword` is a non-breaking space (as you can see in the image below).               \documentclass{scrartcl}          %\usepackage[T1]{fontenc}     \usepackage[utf8]{inputenx} % With latin1 it works perfectly          \usepackage{listings}     \lstset{keywords={spaced keyword}, columns=fullflexible}          \begin{document}     \begin{lstlisting}       notakeyword spaced keyword notakeyword     \end{lstlisting}     \end{document}      ![enter image description here](http://i.stack.imgur.com/HVYGD.png)


How do you reference (in your document) enumerated items listed in your reference list? i.e. I have the code:               ~\ref{itm:ref1}      In the body of my document and:               \label{itm:ref1}      In my reference list after my first reference. For some reason (that I hope you'll explain to me) this doesn't suffice in helping me back-reference the first item in my reference list. For additional information or clarification this is how the section with my `~\ref` tag in it looks:               \section*{Symptoms: Influenza}     The flu has the following symptoms:~\ref{itm:ref1}      Whereas in my reference list, I have:               \section*{References}          \begin{enumerate}     \item{BETTER HEALTH CHANNEL, 'Flu (influenza)', \textit{Better Health Channel} [web page] (2012), \hyperref{http://www.betterhealth.vic.gov.au/bhcv2/bhcarticles.nsf/pages/flu_influenza?open}{}{}{Flu (influenza)}, accessed 10 Mar. 2013.}     \label{itm:ref1}     \end{enumerate}


title: Specify Perl location for makeglossaries

text: I am using the `glossaries` package to typeset some glossaries, on a MikTeX+TexnicCenter (Windows) setup. There are administrative restrictions on the machine which means that I cannot install Perl, which is required in order to run the `makeglossaries` script. I have downloaded the portable version of Strawberry Perl. But, I am not able to specify the `bin` directory of portable Perl and so `makeglossaries` script is not able to find the Perl interpreter. Is there any way I can add the location of the Perl to `makeglossaries`? Thanks.


title: Non-PDF special ignored! -- TeXLive / PSTricks / OSX Mac

text: I'm using TeXLive with OSX/Mac, and building with `latexmk`. I need three (3) vertical lines spanning the entire page (inside the margins), and one (1) vertical line of numbers 1 through 28 (inside the margin -- manually typed, not auto line numbering). The internet searches I found relating to my error messages ("Non-PDF special ignored!") discussed putting a `[pdf]` between usepackage and pstricks (i.e., `\usepackage[pdf]{pstricks}`, or adding `\usepackage{auto-pst-pdf}`. And, to use a command line of `pdflatex -shell- escape <file>` or `pdflatex -enable-write18 <file>`. Well, I've tried every combination I could think of in terms of using a command line with the suggested options, and I've tried varying the above packages -- all to no avail. The document sometimes builds correctly (even with the error messages); however, sometimes the *.pdf has errors in the region of the marginnotes. Any ideas on how to eliminate the error messages, and build the document correctly?               \documentclass{article}     \usepackage[top=1in, bottom=.65in, left=1in, right=.5in, marginparwidth=8mm, marginparsep=5mm]{geometry}          \usepackage{ifpdf}     \ifpdf     \usepackage{auto-pst-pdf}     \else     \usepackage{pstricks}     \fi              \usepackage{eso-pic}     \usepackage{calc}     \usepackage{setspace}         \doublespacing     \usepackage{lipsum}          \usepackage{marginnote}     \renewcommand*{\raggedleftmarginnote}{\centering}     \reversemarginpar          \newcommand{\pleading}{\marginnote{\doublespacing 1 \\ 2 \\ 3 \\ 4 \\ 5 \\ 6 \\ 7 \\ 8 \\ 9 \\ 10 \\ 11 \\ 12 \\ 13 \\ 14 \\ 15 \\ 16 \\ 17 \\ 18 \\ 19 \\ 20 \\ 21 \\ 22 \\ 23 \\ 24 \\ 25 \\ 26 \\ 27 \\ 28} }          % BEGIN left and right vertical lines, and marginnote.     \newlength{\leftruleA}     \setlength{\leftruleA}{3.2\leftmargin-\marginparsep}          \newlength{\leftruleB}     \setlength{\leftruleB}{3.0\leftmargin-\marginparsep}          \newlength{\rightrule}     \setlength{\rightrule}{2.6\leftmargin+\textwidth+\marginparsep}          \AddToShipoutPicture{%       \AtPageLowerLeft{%         \put(\LenToUnit{\leftruleA},0){\rule{1pt}{\paperheight}}  % First rule on the left         \put(\LenToUnit{\leftruleB},0){\rule{1pt}{\paperheight}}  % Second rule on the left         \put(\LenToUnit{\rightrule},0){\rule{1pt}{\paperheight}}  % Rule on the right         \rput(1,25.23){\pleading} % second numeric figure is the top positioning of the marginnote.      }     }     % END left and right vertical lines, and marginnote.          \begin{document}          \lipsum[1-15]          \end{document}


title: Kiviat Diagram with scale always aligned to first axis

text: I'm using Kiviat Diagram to draw graphs, sample code for same is mentioned below:               \begin{center}     \psframebox*[fillcolor=white]{     \begin{pspicture}(-6,-5)(5,5)     \psset{unit=1.2}     \psKiviat[rotate=0.5,yLabels={Skill3, Skill2, Skill1,Skill9}, labelsep=10pt]{4}{3}     \psKiviatTicklines[Dx=0.5,linecolor=black!30]{4}{3}     \psKiviatAxes[linecolor=black!30]{4}{3}     \psKiviatLine[linewidth=1pt,linecolor=black,fillstyle=solid,opacity=0.5,fillcolor=green]{\pskillc, \pskillb, \pskilla, \pskillj}     \multido{\rA=0.5+0.5,\iA=20+20}{5}{\uput[3](0,\rA){\iA}}     \end{pspicture}     }     \end{center}      Output with three axis: ![enter image description here](http://i.stack.imgur.com/c3Qg4.png) Output with Four axis: ![enter image description here](http://i.stack.imgur.com/u5CC0.png) Is there any better way to represent legend scale of `20`,`40`,`60`,`80`,`100`? Is it possible to align scale to first axis?


title: Sublime Text 3 LatexTools

text: I just installed ST3 and installed the LatexTools package using Package control. Everything seems to have gone fine except when I compile using CMD+b nothing seems to happen. On the terminal I get the following error:               Unable to find target command: make_pdf      I am not being able to understand the error. Can someone please help?


title: \vbox and vertical spacing between lines

text: When I put a text in a `\vbox` and `\unvbox` it, I have extra space between line. Why? See the MWE:               \documentclass{article}     \begin{document}     \newbox\titi     \newcommand{\toto}[1]{\setbox\titi=\vbox{#1}\unvbox\titi}     {\LARGE\toto{Lorem ipsum dolor amet. Sic transit gloria mundi. Fiat Lux. In principio erat verbum.}}          {\LARGE Lorem ipsum dolor amet. Sic transit gloria mundi. Fiat Lux. In principio erat verbum.}     \end{document}


title: Basic skills needed to draw simple functions like polynomials, trigonometry, exponential, logarithm, etc

text: I am really new to graphics in LaTeX, I have understood the skills needed to draw basic straight lines and circles; I am now learning how to make simple functions like polynomials, trigonometric, exponential, logarithm, etc., and I am new to this site, so apologize if a similar question had been asked. The book that I am currently using is The Not So Short Introduction to LaTeX2e, the wikibook, but they all mentioned about the Bezier curve. I understand the basic idea of the Bezier curve through this website http://pomax.github.io/bezierinfo/. But it is still doesn't make my graph drawing easy. Those books that I am reading do not seem to teach us how to find the control points when drawing the Bezier curves. My questions are:   1\. Are there any quick way to draw the bezier curve without calculating the control points, by the way, is it a MUST for us to calculate the control points in order to draw a Bezier curve, or do we do it by trial-and-error?   2\. Besides using the Bezier curve, is there any simpler method to draw simple functions for example the command `\drawsin(x^2)` or something like that or any other methods?   3\. I have also read about the TikZ picture environment, but it doesn't seem to be any simpler? What are the advantages and disadvantages of using TikZ compared to Bezier curve? Can we draw simple functions like polynomials using TikZ?   4\. It is possible to show me the code (using any methods) needed to draw say the very basic graph like `y=x^2` including the documentclass and appropriate packages. I apologise I had not made any useful attempt because this is really new to me. I am trying to make some notes to my students about functions and I need a quick and neat way to draw graphs. I will appreciate any helps and explanations.


title: How to ensure that LaTeX-generated pdfs print correctly from print-on-demand services

text: I've just bought printed copies of a pdf-booklet I've made using luaLaTeX. The "print ready copy" created during the Lulu upload process looks fine in the electronic version and when printed on my local printer. However, the printed copies from Lulu lack some characters from one of the fonts used in the document. The document is typeset in Biolinum with a couple of symbols from MarVoSym and FontAwesome and a couple of characters from Computer Modern. The font- information extracted using `pdffonts` on the "print ready copy" from Lulu indicates that all fonts are embedded and subsetted: > >     name                                 type              emb sub uni > object ID >     ------------------------------------ ----------------- --- --- --- > --------- >     QNTGDG+LinBiolinumO                  CID Type 0C       yes yes yes > 9  0 >     YCZZZO+LinBiolinumOB                 CID Type 0C       yes yes yes > 16  0 >     TIILYD+LinBiolinumOI                 CID Type 0C       yes yes yes > 32  0 >     NJDZPD+MarVoSym                      Type 1            yes yes no > 39  0 >     ZRZEPL+FontAwesome                   CID Type 0C       yes yes yes > 43  0 >     KVFQUZ+CMSY8                         Type 1            yes yes no > 71  0 >     YGYBQB+CMMI8                         Type 1            yes yes no > 75  0 >     TXCQMU+LinBiolinumOBO                CID Type 0C       yes yes yes > 106  0 >   The missing characters are from FontAwesome. Specifically, the two used symbols from FontAwesome are InfoSign (U+F05A) and ExclamationSign (U+F06A). These symbols are the only two symbols used from FontAwesome and were inserted in the document using the `\faInfoSign` and `\faExclamationSign` commands from the `fontawesome` package. Can I do something from the LaTeX-end to ensure that all fonts in my pdf will show up in the printed copy? Some forum posts on the Lulu.com site indicate that fonts must not only be embedded as a subset but rather be fully embedded. Is it possible to configure luaLaTeX to not subset the embedded fonts? Any other advice on ensuring compatibility with online print on demand services is greatly appreciated.


title: PDF/A with hyperref on TeX Live 2013

text: I am trying to make PDF/A from LaTeX ( _not_ from LuaTeX etc.) with TeX Live 2013 on Fedora Linux. This works:               \documentclass{article}          \begin{document}          What cat says? \label{meow}          See question on page \pageref{meow}.          \end{document}      With commands `latex`, `dvips` and last               gs -dPDFA -dBATCH -dNOPAUSE -dNOOUTERSAVE -dUseCIEColor     -sProcessColorModel=DeviceCMYK -sDEVICE=pdfwrite     -sOutputFile=meow.pdf meow.ps      Now, when I add `\usepackage[pdfa]{hyperref}` I got validation errors like               dc:description :: Wrong value type. Expected type 'lang alt'.     The XMP property 'dc:title' is not synchronized with the document     information entry 'Title'.     A device-specific color space (Annotation C or IC) without an     appropriate output intent is used.      Documentation of hyperref says > \-- result is usually not in PDF/A, because many features aren't controlled > by hyperref -- but how to control those? Should I even try this path? There are alternatives like `pdfx`. Which path to use?


title: Page number won't appear on the first page Chapter

text: I' using the following code to create the table of contents, list of figures, and so on:               \documentclass[12pt,envcountsame,envcountchap]{svmono}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc} % high quality pdf     \usepackage{ucs} % unicode for mac os x     \usepackage{geometry} % Flexible and complete interface to document dimensions.     \geometry{a4paper}     \usepackage{graphics}     \usepackage{caption}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{epstopdf} % eps to pdf     \usepackage{rotating} % rotate stuff     \usepackage{lmodern} %Type1-font for non-english texts and characters     \usepackage{graphicx}        % standard LaTeX graphics tool when including figure files     \usepackage{multicol}        % used for the two-column index     \usepackage[bottom]{footmisc}% places footnotes at page bottom, etc.     \usepackage{url}     \linespread{1.2}     \usepackage{color}     \usepackage{array}     \usepackage[toc,page]{appendix}     \usepackage[acronym]{glossaries}     \usepackage{glossaries}     \usepackage{listings}     \usepackage{longtable}     \usepackage{subcaption}          \captionsetup{compatibility=false}     \interfootnotelinepenalty=10000     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          %% Use of Times New Roman font     \usefont{T1}{ptm}{m}{n}     \selectfont          \loadglsentries{001-acronyms}   % Load list of acronyms     \loadglsentries{001-symbols}        % Load list of frequent symbols     \makeglossaries     \glsaddall          \begin{document}     \frontmatter     \pagenumbering{roman}            \include{100-cover}     \pagestyle{plain}      \tableofcontents     \listoffigures       \addcontentsline{toc}{chapter}{List of Figures}      \listoftables     \addcontentsline{toc}{chapter}{List of Tables}     \lstlistoflistings     \end{document}      The `\tableofcontents` generates two pages, but the page number only appears on the second page. Since other commands (`\listoffigures`, `\listoftables`, `\lstlistoflistings`) only generate one page, the page number doesn't appear at all. I would like to have page number present on all this pages. Is there any way to achieve this?


title: Fill of a thermometer

text: The objective here is to create a fill of the thermometer to a desired degree being this in Celsius or Fahrenheit. Of course optimizations in the code below are welcomed like how I create the labels or the diagram itself. Here is the MWE:               \documentclass[letterpaper]{article}     %\usepackage[showframe]{geometry}     \usepackage{fourier}     \usepackage[dvipsnames]{xcolor}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}[y=0.5pt, x=0.5pt,yscale=-1, inner sep=0pt, outer sep=0pt]     \path[draw=black,fill=white,miter limit=4,even odd rule,line width=2.5pt,fill=gray!20]       (280.0313,169.3125) .. controls (263.9888,169.3125) and (250.6461,179.3446) ..       (247.8125,192.5625) --        (247.3438,563.7500) .. controls (235.7346,573.2243) and (228.3438,587.6282) ..       (228.3438,603.7813) .. controls (228.3438,632.3161) and (251.4651,655.4688) ..       (280.0000,655.4688) .. controls (308.5349,655.4688) and (331.6563,632.3161) ..       (331.6563,603.7813) .. controls (331.6563,587.6282) and (324.2654,573.2243) ..       (312.6563,563.7500) --        (312.2500,192.5625) .. controls        (309.4164,179.3446) and (296.0737,169.3125) .. (280.0313,169.3125) -- cycle;     \foreach \y/\x in {190/100,                        227/90,                        264/80,                        301/70,                        338/60,                        375/50,                        412/40,                        449/30,                        486/20,                        523/10,                        560/0%                        }         {         \draw (210,\y)--(190,\y) node[left](\x){\x\textdegree C~};         }     \foreach \u/\v in {189.999/212,                        231.111/192,                        272.222/172,                        313.333/152,                        354.444/132,                        395.555/112,                        436.666/92,                        477.777/72,                        518.888/52,                        559.999/32%                        }         {         \draw (350,\u)--(370,\u) node[right](\v){\v\textdegree F};         }     \draw (200,190)node[yshift=4ex, OrangeRed] {Celsius} --(200,560) ;       \draw (360,190)node[yshift=4ex, Cerulean] {Fahrenheit}--(360,560);     \draw node[xshift=-5em, OrangeRed] at (100) {Water boils};     \draw node[xshift=5em, Cerulean] at (212) {Water boils};     \draw node[xshift=-5em, OrangeRed] at (0) {Water freezes};     \draw node[xshift=5em, Cerulean] at (32) {Water freezes};     \end{tikzpicture}     \end{document}      This is a sample out of the above code: ![enter image description here](http://i.stack.imgur.com/sveW6.png)