title: Referencing of subfigures is wrong

text: After Ludovic C. solved my last problem Continous subfigure numbering I have another problem relating to the numbering of subfigures. When I reference a picture with the number (1) like this               \ref{fig:bla1}      I get Fig. 011 instead of Fig. 1. I guess it has something to do with the solution for my numbering of subfigures (see link above)! Maybe it is Fig. "chapter""figure""subfigure", but I am not sure. And it would be great to know how to change it to just "subfigure"! This is my first time using Latex and I am trying my best to use google etc., but I cannot find a solution to this. It seems to be too unique of a problem. Thank you very much for your efforts :)


title: TAB command and \caption

text: Is there a way to add a description to this collection of cells? Something like `\caption` command. I tried but to no avail               \begin{TAB}(e){|c|c|c|c|c|c|c|c|c|c|c|}{|c|c|c|c|c|c|c|c|c|c|c|}     0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10\\     t & e & s & t & 0 & x & x & x & x & x & x\\     \end{TAB}      While using \table, for example, I can add a descrition:               \begin{table}[h]     \caption{Bla Bla Bla}     \begin{center}     \begin{tabular}{|c|c|c|}     \hline     1 & 2 & 3 \\     1 & 2 & 3 \\     1 & 2 & 3 \\     1 & 2 & 3 \\     \hline     \end{tabular}     \end{center}     \end{table}


title: Present content from right to left in beamer

text: I have a frame in `beamer` which looks like this:                \begin{tabular}{ccccc}       \includegraphics[width=.15\textwidth]{imgs/a1} & \pause \       \includegraphics[width=.15\textwidth]{imgs/a2} & \pause \       \includegraphics[width=.15\textwidth]{imgs/a3} & \pause \       \includegraphics[width=.15\textwidth]{imgs/a4} & \pause \       \includegraphics[width=.15\textwidth]{imgs/a5} \\      \end{tabular}           \begin{tabular}{ccccc}       \includegraphics[width=.15\textwidth]{imgs/b1} & \pause \       \includegraphics[width=.15\textwidth]{imgs/b2} & \pause \       \includegraphics[width=.15\textwidth]{imgs/b3} & \pause \       \includegraphics[width=.15\textwidth]{imgs/b4} & \pause \       \includegraphics[width=.15\textwidth]{imgs/b5} \pause \\      \end{tabular}      What I want to do is display the images in the second table in order _from right to left_ , that is, after the first table is displayed, I want `b5` to appear first (at the rightmost position), then `b4`, etc. Is there an "elegant" way to do so (i.e. not abusing `\only<>`)? Is `tabular` the proper environment for something like this?


title: How can i use this font in Pdflatex?

text: ![enter image description here](http://i.stack.imgur.com/axNfV.png) This font is Garamond written by mathtype. Is there a latex command that gives this. the command `\usepackage[urw-garamond]{mathdesign}`doesn't give the same font.


title: How to use a specific chapter heading

text: What packages/commands can I use to create headings like this one: ![enter image description here](http://i.stack.imgur.com/oWGrW.jpg)


title: Color all vowels differently in a LaTeX document

text: Is it possible to give the letters a,e,i,o,u,y a different color in a piece of text? For instance, color all the a's red, the e's blue, the i's green, etc. **EDIT:** _Without doing it manually of course._


title: Document class not available

text: I'm new to LyX, and using LyX 2.0 for Windows. When I select a template from "File"->"New from template" it shows a alert with title > "document class not available" containing the text like selected document class > book(KOMA-Script) require an unavailable external file and asks for > `scrbook.cls` Where can I get the `scrbook.cls` and how to install it?


title: Positioning of images/graphics in tables

text: I need to create a table where cells in one columns are images, not text. This is the code I'm using:               \begin{table}[hbtp]     \centering     \begin{tabu} to \textwidth {|c|c|c|c|}         \hline         \textbf{Motif}                                                                                & \textbf{\textit{P}-value} & \textbf{Rank} & \textbf{Match} \\ \hline         \includegraphics[width=0.4\linewidth,height=\textheight,keepaspectratio]{../Img/05Core/Motif1} & 1E-27                     & 1             & TF1                    \\ \hline         \includegraphics[width=0.4\linewidth,height=\textheight,keepaspectratio]{../Img/05Core/Motif2} & 1E-25                     & 2             & TF2                    \\ \hline         \includegraphics[width=0.4\linewidth,height=\textheight,keepaspectratio]{../Img/05Core/Motif3} & 1E-23                     & 3             & TF3                    \\ \hline     \end{tabu}     \caption{Significantly enriched motifs retrieved.}     \label{tab:Motifs}     \end{table}      Now, the images I'm using are cropped PDF files so I would need to have some white margin around them inside each cell. It turns out the code above automatically creates some padding left, right and below the picture, but the boundary at the top of it is overlapping with the upper limit of the cell, like so: ![enter image description here](http://i.stack.imgur.com/rNf15.png) **How do I center the picture in the cell so that it has the same margin from the top and the bottom of the cell?** Also, how do I align the text in the other cells to the middle of the cell?


title: How to use tikz package with devanagari, in miktex 2.8

text: I have to use `tikz` graphics with my PDF file, written in MiKTeX 2.8 LaTeX. When I write `\usepackage{tikz}` with `\usepackage{devanagari}`, LaTeX produces an error               l.264           catcode '\"=12


title: How to make hyperlinked tabs with specific colors?

text: I modified this project How to print section titles like tab-list? in the following way: usletter, 8 tabs on the edge of paper, odd pages only, text within the tab is set by the user (\TabText), "non"-functioning hyperlinks within the tabs... Now, I'm puzzled by my remaining challenges:   * Set one specific color for each tab (= set of 8 TabColors)   * Set specific colors for the hyperlinked text within each tab (= set of 8 TabTextColors)   * Functional hyperlinks within each tab and selectedtab (clickable text and/or clickable colored rectangle tabs) Here is my code:               %!TEX TS-program = pdflatex          % compile at least three times **          \documentclass[usletter,openright]{book}     \usepackage[vmargin=2cm]{geometry}      \usepackage{background}     \usepackage{etoolbox}     \usepackage{totcount}     \usepackage{lipsum}     \usepackage{changepage}  % for oddpages only          \RequirePackage{hyperref}     \hypersetup{colorlinks=true,          breaklinks=true,          linkcolor=magenta,    % how to specify linkcolor according to chapter / contents ?          bookmarks=true,           pageanchor=true}                    \newcommand{\TabText}[1]{     \ifnum#1=0  \hyperlink{HyperTableOfcontents}{Contents} Contents \fi     \ifnum#1=1   \hyperlink{HyperChapterOne}{Chapter1 Chapter1}\fi     \ifnum#1=2   \hyperlink{HyperChapterOne}{Chapter2 Chapter2}\fi     \ifnum#1=3   \hyperlink{HyperChapterOne}{Chapter3} Chapter3 \fi     \ifnum#1=4  Chapter4 Chapter4\fi     \ifnum#1=5    Chapter5 Chapter5\fi     \ifnum#1=6   Chapter6 Chapter6\fi     \ifnum#1=7   Chapter7 Chapter7\fi     \ifnum#1=8   Chapter8 Chapter8\fi     }          %  Doesn't function well / color of text within each tab / superseded by "linkcolor"     %        %% \TabTexTColor{\valchapter}     %   \newcommand{\TabTexTColor}[1]{     %   \ifnum#1=0 blue \fi     %   \ifnum#1=1 red  \fi     %   \ifnum#1=2 yellow \fi     %   \ifnum#1=3 black \fi     %   \ifnum#1=4  green \fi     %   \ifnum#1=5  cyan \fi     %   \ifnum#1=6  magenta \fi     %   \ifnum#1=7   orange\fi     %   \ifnum#1=8  black\fi     %   }               \regtotcounter{chapter}     \newlength\mylen      \newlength\mylena                 \tikzset{tab/.style={       text width=\mylena,anchor=south,       draw=green,thick,rectangle,rounded corners=12pt,rotate=270,   % how to specify draw color according to chapter / contents ?       align=center,text height=20pt,       text depth=1cm,inner sep=0pt,fill=gray!20,    % how to specify fill color according to chapter / contents ?       yshift=-1.5cm,font=\sffamily\LARGE}}               \tikzset{selectedtab/.style={tab,color=white,fill=blue!90}}  % how to specify fill color according to chapter / contents ?          \AtBeginDocument{%      \setlength\mylen{\dimexpr\textheight+4cm\relax}     \ifnum\totvalue{chapter}>0     \setlength\mylena{\dimexpr\mylen/(\totvalue{chapter}+1)\relax}\fi               \SetBgScale{1}     \SetBgColor{blue}  % how to specify background color according to chapter / contents ? It regulates the color of the text in the non-selected tabs     \SetBgAngle{0}     \SetBgOpacity{1}               \SetBgContents{       \begin{tikzpicture}[remember picture, overlay]       \checkoddpage     \ifoddpage     %  to put tabs only on odd pages        \node[inner sep=0pt,text width=\the\dimexpr\textwidth+1.5cm\relax]          at (current page.center)  {\rule{0pt}{\dimexpr\textheight+2cm\relax}};       \foreach \valchapter in {0,...,\numexpr\totvalue{chapter}\relax}       {         \node[\ifnum\thechapter<\numexpr\valchapter\relax tab\else         \ifnum\thechapter>\numexpr\valchapter\relax tab\else          selectedtab\fi\fi,         xshift=(0.5+\valchapter)*\mylena]            at (current page.north east) (tab-\valchapter)            {\TabText{\valchapter}};}     \fi      \end{tikzpicture}}     }               \begin{document}          \frontmatter           \hypertarget{HyperTableOfcontents}{\tableofcontents}          \mainmatter          \hypertarget{HyperChapterOne}{\chapter{Chapter One}}     \section{Section One Chapter One}     \lipsum     \section{Section Two Chapter One}     \lipsum     \lipsum     \lipsum          \hypertarget{HyperChapterTwo}{\chapter{Chapter Two}}     \lipsum     \section{Section One Chapter Two}     \lipsum     \section{Section Two Chapter Two}     \hyperlink{HyperTableOfcontents}{Contents} % test: link is well functioning     \hyperlink{HyperChapterOne}{Chapter1} % test: link is well functioning     \lipsum     \lipsum     \lipsum          \hypertarget{HyperChapterThree}{\chapter{Chapter Three}}     \lipsum     \section{Section One Chapter Three}     \lipsum     \section{Section Two Chapter Three}     \lipsum     \lipsum          \hypertarget{HyperChapterFour}{\chapter{Chapter Four}}     \lipsum     \lipsum     \lipsum     \lipsum          \hypertarget{HyperChapterFive}{\chapter{Chapter Five}}     \lipsum     \lipsum     \lipsum     \lipsum          \hypertarget{HyperChapterSix}{\chapter{Chapter Six}}     \lipsum     \lipsum     \lipsum     \lipsum          \hypertarget{HyperChapterSeven}{\chapter{Chapter Seven}}     \lipsum     \lipsum     \lipsum     \lipsum          \end{document}


title: Why do you need (to use) texindy (to call xindy) when you want to use xindy?

text: If I replace the word `texindy` with `xindy` in the following answer the code compiles and produces same output (at least using TeXShop). `texindy` is there for a reason, and at least one expert uses it instead of using `xindy` directly. (See the comments after the answer.) What can go wrong (in what situations) if I use `xindy` directly without using `texindy` to call it?


title: "The Errors of TeX" with hyperlinks

text: I was reading the appendix to "The Errors of TeX" by Knuth (`errorlog.tex`, written with plain TeX) and I noticed that there is a PDF file `errorlog.pdf` with nice hyperlinks and I was wondering how that is possible. It looks like magic to me, since the plain TeX file apparently has nothing related to hyperlinks. I've noticed that the PDF file was generated with `pdftex`, so I was wondering if there is some `pdftex`-specific technique allowing such hyperlinks. Does anybody know what kind of modifications are necessary (if any) in order to compile Knuth's file with `pdftex` and get those hyperlinks?


title: Disable author names in the bottom line of my LaTeX slides

text: In my presentation with LaTeX slides the author name appears in the bottom line of every slide. Is there a way, to disable the appearance of the name in the bottom line, whereas I want to put the names as               \author{...}      so that it appears on the title page? So to ask it in another way: is there a command to just disable the output of the author name in the bottom line? * * * Preamble:               \documentclass[hyperref={pdfpagelabels=false}]{beamer}     \usepackage{verbatim}     \usepackage{lmodern}     \title{....}     \author{....}     \date{\today}     \setbeamertemplate{navigation symbols}{}     \usepackage{beamerthemeshadow}     \beamersetuncovermixins{\opaqueness<1>{25}}{\opaqueness<2->{15}}     \begin{document}


title: What does Tex Live have to do with ruby?

text: I installed TeXlive for Ubuntu and it changed my ruby installation so that my ruby programs using statsample no longer run. If I repair my ruby installation, what is a good way to install TeXlive that won't mess up my ruby?


title: Ticks misaligned in ternary plot

text: I am using `TikZ` for ternary plots and have problems with a misalignment of ticks after changing the axis range. An example is given below where `ymax` is set to `0.8` but actually seem to get a maximum value of `0.8/0.99` in the plot. It is however only the ticks that are in the wrong position. The plotted values are in the correct position as demonstrated by the x in the minimal working example. This misalignment is value dependent and does for example not happen if `ymax` is set to `0.6`. How can I get rid of this misalignment? Minimal working example is given below.               \documentclass[10pt]{scrartcl}          \usepackage[utf8x]{inputenc}          \pagestyle{empty}          \usepackage{pgfplots}          \pgfplotsset{compat=newest}          \usepgfplotslibrary{ternary}          \usepackage{tikz}          \usepackage{tikz-3dplot}          \usepackage[active,tightpage]{preview}          \PreviewEnvironment{tikzpicture}          \begin{document}          \begin{tikzpicture}          \begin{ternaryaxis}[     ternary limits relative=false,     width=7.5cm,     height=7.5cm,     ymax=0.8,     ]          \addplot3[only marks, mark = x]     table{     0    0.8    0     };          \end{ternaryaxis}          \end{tikzpicture}          \end{document}


title: How to create a color wheel shading with other colors?

text: In the pgf manual one can get a circle with a jet-colormap color-wheel-shading with:               \tikz \shade[shading=color wheel] (0,0) circle (1.5);      How can I get the same but with another colormap? This 'other' colormap probably needs to be cyclic (the first color needs to be equal to the last color) for it to work in a color wheel. But other solutions would be also appreciated. Thanks!


title: Allow line breaks but not page breaks in inline formulas

text: It often happens that LaTeX breaks up an inline formula over two lines. However, I find it quite distracting when it breaks an inline formula over multiple pages. For example:               \documentclass{article}     \usepackage{lipsum}     \begin{document}     \lipsum[1-5]          We could go on like this for some time.  We eventually get $x = 15y + 4z + 3w + 2u - 5v$, which is unpleasant.  In contrast, something like $x = 2y + 3z - 4w - 15u - 4v$ is no problem.     \end{document}      Is there a global way (or, failing that, a local way) of forbidding breaks over multiple pages while allowing breaks over multiple lines?


title: How to keep the same mark colour when using meta data for marker size?

text: Probably an easy answer to this, but I can't get it to work, and I obviously don't understand the manual or the other answers given to similar questions here on tex.sx (see 1,2, and 3). Basically I want to use the values of an additional column in a table to specify the size of the markers, but keeping the colour the same for each marker (e.g., a colour defined by `\definecolor{name}{rgb}{x1,x2,x3}`). An MWE doing _almost_ what I want; the size of the markers is controlled by the third column as desired, but obviously the colour as well. What do I need to change in order to keep the colour constant for all the markers?               \documentclass[tikz]{standalone}     \usepackage{pgfplots}     \pgfplotsset{compat=newest}     \usetikzlibrary{plotmarks}     \usepackage{amsmath}          \begin{filecontents*}{temp.dat}     1   1   100     2   2   200     3   3   300     4   4   400     5   5   500     6   6   600     7   7   700     8   8   800     9   9   900     10  10  1000     \end{filecontents*}          \begin{document}     \begin{tikzpicture}          \begin{axis}[%     width=4.5in,     height=3.5in,     scale only axis,     xmin=0,     xmax=10,     ymin=0,     ymax=10,     axis x line*=bottom,     axis y line*=left     ]     \addplot[%     scatter,     only marks,     mark=*,     color=blue,     visualization depends on={\thisrowno{2} \as \perpointmarksize},     scatter/@pre marker code/.append style={/tikz/mark size=\perpointmarksize/50}] plot table[row sep=crcr]{temp.dat};     \end{axis}     \end{tikzpicture}%     \end{document}


title: Fun unicode characters with pandoc

text: Silly question: I want to use a heart (♥) character in my presentation. I'm already using xelatex as engine so it doesn't complain for the character itself but it doesn't render it. Just a blank space where the character should be. Here is the snippet of the offending code:                   (Celery + RabbitMQ) ♥  Django      Notice that I'm using markdown for the input format. This is how I make the pdf               pandoc -t beamer --latex-engine=xelatex \         in.md -oout.pdf --slide-level=2      I'm new to pandoc and latex in general. ♥ Thanks ♥


title: RefTeX how to search for multiple articles to be included in a single cite macro

text: The RefTeX manual clearly describes how to mark multiple entries in a search buffer an insert them into a single `\cite` command, but how can you get the search buffer to contain results from multiple search terms? For example, if I want to cite two books with different authors I need to use two different search terms to find the entries in my BibTEX database but I want them to appear in the same cite command I need them to be in the same search buffer. I have tried regular expressions like `author1|author2` and `author1,author2`.


title: APA Style: Journal Vol(Num) sometimes, but only Vol other times

text: In another question, I noticed the difference between APA Style Guide 6th ed and `biblatex-apa` output. Specifically, > APA 6th ed (which foregoes the Number of the journal and lists instead only > the Volume (perhaps because the page numbers uniformly increase throughout > the volume regardless of number, and so perhaps number is redundant? A few minutes ago, I just noticed that the APA elaborates on this in an October blog post. Although it's obvious from the comments in the blog post that this rule is overwhelmingly unpopular (and in my opinion too, it is an idiotic rule), it seems unlikely that the APA will be revising this rule any time soon (especially with their having reimplemented the two-space rule for sentence- ending punctuation with their 6th edition after having previously removed it in older editions after originally requiring it in even older editions). So I'm guessing that there's no way to automate this, right? It seems like it would require `biblatex` having knowledge of every published journal's pagination scheme (either by issue number or uniformly increasing throughout a volume; perhaps there are other schemes too) which strikes me as a Sisyphean task. I wonder about automating this not because I'm lazy (although I am lazy in a sense, for I'm always looking for the easiest way to do something), but instead because I'd like to keep a `.bib` database with as much information in it as I know (for my own uses) for each of the references I have in it (even such trivial details as translator and stuff that most style guides don't require or even desire). But now that I see exactly what the APA rule is on this matter (in particular that in some cases (pagination by issue or number), it wants Vol(Num) whereas in other cases (pagination by volume), it wants only Vol and no (Num)), I wonder if there is any way to do this in an APA-compliant manner with `biblatex` other than leaving the `Number` field in the `.bib` entry blank for those journals (which I determine manually) to be paginated by volume. Sorry for the long-winded background, but in summary, I guess my question is: "Using `LaTeX` and associated tools, what's the best way to handle this arcane and unnecessary rule that was published by the APA just 2 years ago in 2009?"


title: What packages does beamer load automatically?

text: I just learned that `beamer` loads `amsmath` and `graphicx` packages automatically, what other packages does it load?


title: highlighting some areas in a picture by making the rest of the picture transparent

text: In my `beamer`-document, I'm drawing on a picture as described in this question. I'm trying to hilight particular areas of my picture by making the rest of the picture "fade out", like this: ![enter image description here](http://i.stack.imgur.com/o7SzQ.png) In my current implementation, I thought I got the desired effect by drawing a rectangular region around the entire picture, then drawing some rectangles inside in the same path, and then filling it with white with opacity 0.9. But it's not working well, because for some reason I don't understand the area outside the rectangles gets "filled", whereas the area outside the circle does not. I guess I'm not supposed to fill paths that are not closed. The fact that I'm trying anyway probably means it's not very stable. This is my current attempt:               \documentclass[12pt]{beamer}     \usepackage{tikz}     \begin{document}          \begin{frame}          \begin{tikzpicture}         \node[anchor=south west,inner sep=0] (image) at (0,0) {\includegraphics[width=8cm]{BlueMarble}};          \begin{scope}[x={(image.south east)},y={(image.north west)}]           \path<2->[fill=white,opacity=.9,draw=black] (0,0) -- (1,0) -- (1,1) -- (0,1) -- cycle                      (0.1,0.5) rectangle (0.3,0.6)                     (0.5,0.4) rectangle (0.6,0.5)                     (0.75, 0.55) circle [radius=0.1];     %                (0.15,0.5) -- (0.15,0.6) -- (0.25,0.6) -- (0.15,0.6) -- cycle;     \draw[help lines,xstep=.1,ystep=.1] (0,0) grid (1,1);     \foreach \x in {0,1,...,9} { \node [anchor=north] at (\x/10,0) {0.\x}; }     \foreach \y in {0,1,...,9} { \node [anchor=east] at (0,\y/10) {0.\y}; }         \end{scope}     \end{tikzpicture}     \end{frame}          \end{document}      What would be a better way of achieving this effect? Ideally, I would like to first make the entire image 90% transparent, and then define some areas that are only 10% transparent. But transparency adds up so it doesn't work that way. Or does it, just differently?


title: pdf into latex: suggestions

text: I would like to ask you how to insert a PDF in a LaTeX page. I did, but it does not look very nice: ![enter image description here](http://i.stack.imgur.com/ORM6z.png) Could you suggest me some improvement?


title: How to put a brace and a title?

text: I would like to put a brace between the Q_s and Q_d of the following diagram                   \begin{tikzpicture}[domain=0:5,scale=1,thick]     \usetikzlibrary{calc}   %allows coordinate calculations.          %Define linear parameters for supply and demand     \def\dint{4.5}          %Y-intercept for DEMAND.     \def\dslp{-0.5}         %Slope for DEMAND.     \def\sint{1.2}          %Y-intercept for SUPPLY.     \def\sslp{0.8}          %Slope for SUPPLY.          \def\pfc{2.5}           %Price floor or ceiling          \def\demand{\x,{\dslp*\x+\dint}}     \def\supply{\x,{\sslp*\x+\sint}}          % Define coordinates.         \coordinate (ints) at ({(\sint-\dint)/(\dslp-\sslp)},{(\sint-\dint)/(\dslp-\sslp)*\sslp+\sint});         \coordinate (ep) at  (0,{(\sint-\dint)/(\dslp-\sslp)*\sslp+\sint});         \coordinate (eq) at  ({(\sint-\dint)/(\dslp-\sslp)},0);         \coordinate (dint) at (0,{\dint});         \coordinate (sint) at (0,{\sint});         \coordinate (pfq) at  ({(\pfc-\dint)/(\dslp)},0);         \coordinate (pfp) at  ({(\pfc-\dint)/(\dslp)},{\pfc});         \coordinate (sfq) at  ({(\pfc-\sint)/(\sslp)},0);         \coordinate (sfp) at  ({(\pfc-\sint)/(\sslp)},{\pfc});          % DEMAND         \draw[thick,color=blue] plot (\demand) node[right] {$P(q) = -\frac{1}{2}q+\frac{9}{2}$};          % SUPPLY         \draw[thick,color=purple] plot (\supply) node[right] {Supply};          % Draw axes, and dotted equilibrium lines.         \draw[->] (0,0) -- (6.2,0) node[right] {$Q$};         \draw[->] (0,0) -- (0,6.2) node[above] {$P$};              %Price floor and ceiling lines         \draw[dashed,color=black] plot (\x,{\pfc}) node[right] {$P_c$};         \draw[dashed] (pfp) -- (pfq) node[below] {$Q_d$};         \draw[dashed] (sfp) -- (sfq) node[below] {$Q_s$};          \draw[->,baseline=5] ($(0,{\pfc})+(-1.5,0.7)$) node[label= left:Price Ceiling] {} -- ($(0,{\pfc})+(-.1,0.1)$);          \end{tikzpicture}      The result of the code above WITHOUT the brace wanted is: ![enter image description here](http://i.stack.imgur.com/oSoWH.png) Also I would like to know how to make a title when I'm making the above diagram using               \documentclass[class=minimal,border=0pt]{standalone}


title: Using Nomenclature and emacs

text: I'm learning how to `\usepackage{nomencl}`. So far so good. I added the nomenclature compile option to the Emacs commands by editing my .emacs file, adding:               ;; nomenclature for latex     (eval-after-load "tex"       '(add-to-list 'TeX-command-list              '("Nomenclature" "makeindex %s.nlo -s nomencl.ist -o %s.nls" TeX-run-command nil t :help "Create nomenclature file")))      to it, this works: when I press `C-c C-c` (the shortcut for `TeX-command-list` I can use the `Nomenclature` command and the appropriate file is generated. I am unhappy though, for the following reason: When I run BibTeX, and then press `C-c C-c` again, Emacs offers to run LaTeX (as appropriate, and if references have changed, it will offer `Command: (default) LaTeX` again, finally, it will offer `Command (default) View`, once the .log doesn't report references have changed. When I run Nomeclature, the next command offered by Emacs is `Command (default) View`, which is always inappropriate. > How can I tell Emacs to default to LaTeX as the next `TeX-command-list` > command after running Nomenclature (same behavior as BibTeX)?


title: fourier font and \nmid

text: The `fourier` package does not provide a `\nmid` command. Using the `\nmid` from `amssymb` looks very different from the fourier's `\mid`. Is there a way to produce a "compatible" symbol in fourier? The two vertical lines should have the same height and width, but the `\mid` should have some extra space as to match the `\nmid`'s width when they are typeset in two lines above each other, as shown below. I tried importing both from `MnSymbol` but couldn't figure out how they are defined there in the first place.               \documentclass{minimal}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage[widespace]{fourier}          \begin{document}          \begin{align*}       a&=b & v\mid\infty\\       c&=d & v\nmid\infty     \end{align*}          \end{document}


title: How can I add a background to a logo?

text: Is there a way of making the white areas in a picture transparent, so that when placed on a background, the background colour appears on the picture where there was previously white? In fact I’m trying to insert a logo on a blue background. I just want the logo to appear on top of the background, but when I insert it on the background, a white rectangular box appears around the logo, because the white parts in picture file containing the logo aren’t transparent. Can anyone help? ![enter image description here](http://i.stack.imgur.com/dmcmn.jpg)


title: Add space between margin and footnote marker

text: Consider the following minimal working example:               \documentclass{amsart}     \usepackage[hang]{footmisc}     \setlength{\footnotemargin}{1em}          \begin{document}     Content.\footnote{Footnote}     \end{document}      I want to add a small space (say, 1 em) between the margin and the footnote marker while leaving everything else unchanged.


title: pdfLaTeX, Beamer, and PSTricks

text: I have been trying to get pdfLaTeX, Beamer, and PSTricks to be friendly. The following code compiles without hiccup, and a `pics.pdf` file containing my diagram is created, but the output presentation is completely blank.               \documentclass{beamer}     \usepackage[pdf]{pstricks}     \begin{document}     \begin{frame}     \begin{pspicture}(1,1)     \psline(0,0)(1,1)     \end{pspicture}     \end{frame}     \end{document}      Thanks in advance for your help.


title: Enable XeTeX for LyX

text: I am trying to enable XeLaTeX for LyX, but I have some problems. I am using Ubuntu 11.04 and LyX 2.0. I followed an online tutorial in order to install XeTeX. Then I opened LyX, but I can't enable the option to "use non TeX fonts via XeTeX/LuaTeX": ![screenshot](http://i.stack.imgur.com/YimsW.png) ps1: LyX's interface is in Greek language ps2: I have to enable first this option and then use a code in preamble in order to use a font right? :roll:


title: Apacite: suppress initials intext?

text: I am writing a doctoral thesis and I am using APAcite to set the references in APA (American Psychological Association) format. Mostly this has worked perfectly fine, but I would like to suppress the author initials from the compiled version (in-text, not in the end references section). This happens because there are multiple authors with the same name e.g., > Smith and Jones (1992) or Wells and Smith (1901) are typeset in-text as: > I. Smith and Jones (1992) or Wells and D. Smith (1901). Although it may be correct to have the initial in-text in APA format, in reality I am using BPS (British Psychological Society) format, which uses an adapted APA format (and you guessed it, they don't like the initial in text). Thus in-text should look like the first example above (without initial) but looks like the second (with). To clarify: Any ideas on how to suppress the initial in-text in apacite? Thanks. ps. I understand that I could do it with a different bibtex style, but my question pertains to apacite.


title: Problem when using pgfplots and pgfornament

text: I am trying to solve a peculiar problem, but until now no success. Here is the issue:   1. I am writing a long document (a thesis) which consists of plots, decorations, and tables.   2. When I plot the graph using pgfplots, I get the plot as below: ![The correct plot as it should have been](http://i.stack.imgur.com/c4FaL.png)   3. But when I include the pgfornament package, then I get the following plot: ![Wrong Plot after using pgfornament](http://i.stack.imgur.com/dV9qi.png) Here are the list of included packages before using pgfornament, and which gives the correct plot.               \documentclass[12pt,english]{report}     \usepackage{setspace}     \usepackage{babel}     \usepackage{buthesis}     \usepackage{amsmath,amssymb,graphicx,amsfonts,amsthm}     \usepackage{verbatim}     \usepackage{epsfig}     \usepackage{wrapfig}     \usepackage{latexsym,amsfonts,amscd}     \usepackage{changebar}     \usepackage{enumerate}     \usepackage{tikz}     \usetikzlibrary{decorations}     \usetikzlibrary{shadows}     \usepackage{pgfplots}     \pgfplotsset{compat=1.3}          % Used only for example text     \usepackage{lipsum}          \usepackage[footnotesize,bf]{caption}  % Reduces caption font sizes          %%%%%%%%%%%%%%%%% Fancy chapter headings %%%%%%%%%%%%%%%%%%%     \usepackage[Bjarne]{ThesisFncychap}     \include{BjarneThesisTitles}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          %-----------------------------------------------------------------     %% Control the fonts and formatting used in the table of contents, list of     %% figures, and list of tables     \usepackage[titles]{tocloft}          \setlength{\cftbeforechapskip}{-1ex}     \setlength{\cftbeforesecskip}{-3.5ex}     \setlength{\cftbeforesubsecskip}{-3.5ex}     \setlength{\cftbeforetabskip}{-3.5ex}     \setlength{\cftbeforefigskip}{-3.5ex}     %-----------------------------------------------------------------          \dissertation      Below is the code that gives the scrambled plot. The only difference between the first and the code below is that I have included this line: `\usepackage[object=vectorian]{pgfornament}`. Also, I have about 10 plots like this which should automatically adjusted in two pages by latex. But after using the pgfornament package, the plots do not automatically adjust in two pages, but are in one page and some get hidden in the margin.               \documentclass[12pt,english]{report}     \usepackage{setspace}     \usepackage{babel}     \usepackage{buthesis}     \usepackage{amsmath,amssymb,graphicx,amsfonts,amsthm}     \usepackage{verbatim}     \usepackage{epsfig}     \usepackage{wrapfig}     \usepackage{latexsym,amsfonts,amscd}     \usepackage{changebar}     \usepackage{enumerate}     % Do you use TikZ?     \usepackage{tikz}     \usetikzlibrary{decorations}     \usetikzlibrary{shadows}     \usepackage[object=vectorian]{pgfornament}     \usepackage{pgfplots}     \pgfplotsset{compat=1.3}          % Used only for example text     \usepackage{lipsum}          \usepackage[footnotesize,bf]{caption}  % Reduces caption font sizes          %%%%%%%%%%%%%%%%% Fancy chapter headings %%%%%%%%%%%%%%%%%%%     \usepackage[Bjarne]{ThesisFncychap}     \include{BjarneThesisTitles}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          %-----------------------------------------------------------------     %% Control the fonts and formatting used in the table of contents, list of     %% figures, and list of tables     \usepackage[titles]{tocloft}          %% Aesthetic spacing redefines that look nicer to me than the defaults.     \setlength{\cftbeforechapskip}{-1ex}     \setlength{\cftbeforesecskip}{-3.5ex}     \setlength{\cftbeforesubsecskip}{-3.5ex}     \setlength{\cftbeforetabskip}{-3.5ex}     \setlength{\cftbeforefigskip}{-3.5ex}     %-----------------------------------------------------------------          \dissertation         1. The word Data is ok, because I have set it myself using `\centerline{Data}` Edited: The above code is from the document on which I am working. To make the task simpler for the readers, I am posting a very simplified version of the code where the problem still persists. This can be regarded as a minimum working code.               \title{A Very Simple \LaTeXe{} Template}     \author{     }     \date{\today}          \documentclass[12pt]{report}     \usepackage[object=vectorian]{pgfornament}     \usepackage{pgfplots}     \pgfplotsset{compat=1.3}               \begin{document}     \maketitle          \pgfplotsset{grid style={dashed}}     \pgfkeys{/pgfplots/MyLineStyle/.style={samples=50, ultra thick}}     \pgfkeys{         /pgf/number format/precision=3,         /pgf/number format/fixed zerofill=true }          \pgfplotsset{     tick label style={font=\LARGE},     label style={font=\LARGE},     legend style={font=\LARGE},     title style={font=\LARGE}     }     \tikzset{every mark/.append style={scale=2}}          \centerline {\textbf{Data}}     \begin{tikzpicture}[scale=0.70]     \begin{axis}[title={Data-Segment},     xlabel=Z,     ylabel=P,     xticklabel style={/pgf/number format/fixed,                       /pgf/number format/precision=0},     grid=major,     ]     \addplot+[color=black,mark options={black},mark size = 2,line width=1.5pt,mark =*,style=densely dashed] coordinates {     (10,0.331)     (20,0.329)     (30,0.323)     (40,0.328)     (50,0.322)     (60,0.325)     (70,0.323)     (80,0.320)     (90,0.321)     (100,0.319)     };\label{p5}     \addplot+[color=black,mark options={black},mark size = 2,line width=1.5pt] coordinates {     (10,0.32)     (20,0.32)     (30,0.319)     (40,0.318)     (50,0.315)     (60,0.315)     (70,0.315)     (80,0.31)     (90,0.310)     (100,0.310)     };\label{p6}     \end{axis}     \end{tikzpicture}     \begin{tikzpicture}[scale=0.70]     \begin{axis}[title={Data-Segment},     xlabel=Z,     ylabel=P,     legend style={ at={(1,0.5)},     anchor=east},     xticklabel style={/pgf/number format/fixed,                       /pgf/number format/precision=0},     grid=major]     \addplot[color=black,mark options={black},mark size = 2,line width=1.5pt,mark =*,style=densely dashed] coordinates {     (10,0.331)     (20,0.329)     (30,0.323)     (40,0.328)     (50,0.322)     (60,0.325)     (70,0.323)     (80,0.320)     (90,0.321)     (100,0.319)     };     \addplot+[color=black,mark options={black},mark size = 2,line width=1.5pt,mark=square*] coordinates {     (10,0.32)     (20,0.32)     (30,0.32)     (40,0.319)     (50,0.317)     (60,0.312)     (70,0.312)     (80,0.31)     (90,0.309)     (100,0.31)     };     \end{axis}     \end{tikzpicture}     \newline     \begin{tikzpicture}[scale=0.70]     \begin{axis}[title={Data-Segment},xlabel=Z,ylabel=P,legend style={ at={(1,0.5)}, anchor=east},grid=major,xticklabel style={/pgf/number format/fixed,                       /pgf/number format/precision=0},     ]     \addplot[color=black,mark options={black},mark size = 2,line width=1.5pt,mark =*,style=densely dashed] coordinates {     (10,0.331)     (20,0.329)     (30,0.323)     (40,0.328)     (50,0.322)     (60,0.325)     (70,0.323)     (80,0.320)     (90,0.321)     (100,0.319)     };     \addplot+[color=black,mark options={black},mark size = 2,line width=1.5pt,mark=square*] coordinates {     (10,0.320)     (20,0.319)     (30,0.319)     (40,0.320)     (50,0.314)     (60,0.318)     (70,0.319)     (80,0.32)     (90,0.322)     (100,0.328)     };     \end{axis}     \end{tikzpicture}     \bibliographystyle{abbrv}     \bibliography{simple}          \end{document}      ![Correct Output](http://i.stack.imgur.com/jVIjC.png) ![enter image description here](http://i.stack.imgur.com/G9cCJ.png)


title: Using tree-dvips with XeLaTeX

text: I try to switch to XeLaTeX, but the package `tree-dvips` causes problems. It seems to require PostScript and `pdftricks` which causes a lot of other problems (puts a `\begin{center}` environment around everything, which adds to much space and so on). I can run the following code under `latex` + `dvips` + `ps2pdf` but when I call XeLaTeX I get warnings and the connections between the nodes are not drawn.               ** WARNING ** Unknown token "@beginspec"     ** WARNING ** Interpreting PS code failed!!! Output might be broken!!!     ** WARNING ** Interpreting special command ps: (ps:) failed.     ** WARNING ** >> at page="1" position="(261.137, 712.838)" (in PDF)     ** WARNING ** >> xxx "ps:@beginspec/nodemargin 2.0 pt def 0.3 pt setlinewidth [] 0..."     ** WARNING ** >> Reading special command stopped around >>/nodemargin 2.0 pt def 0.3 pt setlinewidth [] 0 setdash/arro...<<     ** WARNING ** Unknown token "@beginspec"     ** WARNING ** Interpreting PS code failed!!! Output might be broken!!!     ** WARNING ** Interpreting special command ps: (ps:) failed.     ** WARNING ** >> at page="1" position="(117.303, 680.041)" (in PDF)     ** WARNING ** >> xxx "ps:@beginspec/nodemargin 2.0 pt def 0.3 pt setlinewidth [] 0..."     ** WARNING ** >> Reading special command stopped around >>/nodemargin 2.0 pt def 0.3 pt setlinewidth [] 0 setdash/arro...<<     ** WARNING ** Unknown token "@beginspec"      Any suggestions for fixing this or for getting rid of `tree-dvips` in a painless way (I have tons of trees already done ...) are welcome. Here is my code:               \documentclass{scrbook}          \usepackage{graphicx}               \usepackage{tree-dvips}          \begin{document}          This is some text and the figure should be the size of the text not larger and not smaller.     \begin{figure}[h]     \resizebox{\linewidth}{!}{     \begin{tabular}{@{}ccccc@{}}             \multicolumn{5}{c}{\node{sign}{sign}}\\[5ex]             \multicolumn{2}{c}{\node{root}{root}} &        & \node{word}{word}       & \node{phrase}{phrase}\\[3ex]             \node{noun}{noun-root} & \multicolumn{2}{c}{\node{verb}{verb-root}}  &  & \node{hp}{headed-phrase} \\[3ex]             & \node{iv}{intransitive-verb} & \multicolumn{2}{c}{\node{tv}{transitive-verb}}            & \node{hap}{head-complement-phrase}\\[3ex]             & \node{siv}{strict-intr-verb}                 & \node{stv}{strict-transitive-verb} & \node{dv}{ditransitive-verb} \\[3ex]             & \node{schlaf}{schlaf-}           & \node{lieb}{lieb-}                  & \node{geb}{geb-}\\             & (`to sleep') & (`to love') & (`to give')\\     \end{tabular}%     \nodeconnect{sign}{root}\nodeconnect{sign}{word}\nodeconnect{sign}{phrase}%     \nodeconnect{root}{noun}\nodeconnect{root}{verb}\nodeconnect{phrase}{hp}%     \nodeconnect{hp}{hap}%     \nodeconnect{verb}{iv}\nodeconnect{verb}{tv}\nodeconnect{tv}{stv}\nodeconnect{tv}{dv}%     \nodeconnect{iv}{siv}%                 {\makedash{4pt}%                   \nodeconnect{siv}{schlaf}\nodeconnect{stv}{lieb}\nodeconnect{dv}{geb}%                 }%     }     \end{figure}          This is some text and the figure should be the size of the text not larger and not smaller.          \end{document}


title: verbatim environment does not work with powerdot

text: I'm trying to include a verbatim environment in a powerdot slide as follows, but that does not work:               \documentclass{powerdot}          \begin{document}          \begin{slide}{title of the slide}       \begin{itemize}     \item  \begin{verbatim}                abcdefghijklmnop...            \end{verbatim}     \end{itemize}     \end{slide}           \end{document}      I get the following message in the log :               ! Argument of \verbatim@ has an extra }.


title: elsarticle figure to left in LyX

text: I use `elsarticle` 2 docment page in LyX. I put figure in left column partion and use               \resizebox{3.4in}{!}{ Figure.png }       to make it smaller But I still need to align the figure to left of the page How to do this in LyX?


title: Customised section overlapping in margin

text: How can I fix the following overlap happening in the margin? I want the numbers to follow each other with a comma in between them. Edit: Clarification of the question. The text needs to be flowing from one line to the next with the section numbering in the margin. However when there are two or more numbers in the same line on the margin they should be separated by a comma or placed one (slightly) above the other. MWE:               \documentclass{article}     \newcommand{\marginsec}[1]{%       \refstepcounter{marginsec}%       \mbox{\strut#1}\vadjust{\vbox to 0pt{         \sbox0{\bfseries\themarginsec\quad}         \kern-\ht0         \kern-\dp\strutbox         \llap{\box0 }         \vfill         }       }%     }     \newcounter{marginsec}          \begin{document}     \marginsec{Babel} and hyphenation patterns for english, dumylang, nohyphenation,     \marginsec{CATALAN}, pinyin, coptic, croatian, czech, danish, dutch, ukenglish,     usenglishmax, esperanto, estonian     \end{document}      ![MWE output](http://i.stack.imgur.com/uRZOU.png) # Edit 4: Cleaner explanation: This is the way the verses work in the Bible. Since the copies of manuscripts we have from the Bible has all the text written basically with all the letters back-to-back in the original languages the chapter and verse method has been applied to make it more readable and easier to reference a certain point in the text. You have a 66 books, broken into multiple chapters each. Every chapter is then broken into many verses. The way I need my verses numbered is by using the chapter number as the number for the very first verse. See the two screenshots below of Genesis chapter 1 and chapter 2. The numbers of the verses then increments onward until you get to the next chapter. ![Page1](http://i.stack.imgur.com/QdFR2.png) Turning to page 3 where the next chapter starts it should look like this: ![Page2](http://i.stack.imgur.com/0gwHO.png) BUT based on Marc's excellent solution below the verse numbers are all still being displayed as well as the chapter number, resulting in the following: ![Page1w](http://i.stack.imgur.com/4k7gj.png) And also: ![Page2w](http://i.stack.imgur.com/lYpdg.png) Here is an example to reproduce where I'm at at the moment. However you might not have the embedded image file so just remove that code in the `wrapfigure` tags. Edit 5: Here's my file. Demo File


title: What are the unit of measurement in Tikz?

text: I want to know what are the units of measurement (of length) in `tikz` are available. I know that `pt`, `in`, `mm` like units are available , but what more are allowed in `tikz`? I work sometimes with `qss` language and with `px` like units (in `tikz` this causes illegal unit of measurement).


title: Revtex's tensor macro interferes with nested amsmath split and align environments

text: I've encountered a strange collision between RevTeX and AMSLaTeX. If I nest a `split` environment inside an `align` environment, it works as it should, but then the next time I use the RevTeX `\tensor{}` macro in the document, it repeats the last line of the `split` equation. Here is a minimal "working" example:               \documentclass[12pt,prd,amsmath]{revtex4}     \begin{document}     Here is a split inside an align     \begin{align}       A &= B  \\       \begin{split}         C &= D \\           &= E       \end{split}     \end{align}     And now we write a tensor $\tensor{T}$ which grabs the second line.     \end{document}      ![enter image description here](http://i.stack.imgur.com/gDP7V.png)


title: How to write "note:" in front of an indented paragraph

text: I have a question similar to this one: How to mark book paragraphs as note, warning, tip etc.? I'd like to have my paragraph indented and the text "note:" appear just before it. Ideally this would be a kind of macro that I could reuse anywhere in my text. The rendered text should be similar to this:               Duis porttitor nisi et orci pellentesque feugiat. Aenean id     turpis vel purus tincidunt sodales. Class aptent taciti     sociosqu ad litora torquent per conubia nostra, per inceptos     himenaeos. Cras semper dui et nulla feugiat at convallis dolor     tincidunt. Lorem ipsum dolor sit amet, consectetur adipiscing     elit.          Note:  Lorem ipsum dolor sit amet, consectetur adipiscing elit.            Aenean et erat quis turpis tristique ultricies at in est.            Nunc quis volutpat neque. Nunc sit amet turpis nec risus            vehicula tristique ac ac risus. Cras interdum vehicula            metus. Nulla facilisi. Duis faucibus porttitor elit            mattis venenatis.      By the way, I'm using the "book" documentclass.


title: TikZ change coordinate system so Y points downwards

text: How can I change the default coordinate system of TikZ, so the Y coordinates go downwards, instead of upwards. This is because in the picture I'm trying to draw it is more natural to reference points this way. I was trying to use negative values in the declaration, but some drawing commands don't really like it, like the `grid`, where horizontal lines simply don't get drawn this way:               \begin{tikzpicture}[x=1cm,y=-1cm]     \draw (0, 0) grid (7, 7);     \end{tikzpicture}      Result: ![non-working grids](http://i.stack.imgur.com/r5oee.png)


title: algorithm2e and enumerate

text: I would like to put one algorithm inside one enumerated list like in the following code.               \documentclass[10pt,a4paper]{article}     \usepackage[utf8x]{inputenc}     \usepackage{ucs}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage[ruled,french]{algorithm2e}     \usepackage{lipsum}          \begin{document}          \lipsum[1]          \begin{enumerate}         \item Bla, bla...          \begin{algorithm}[H]         \caption{Le crible d'Eratosthène}              \KwData{la liste $L$ des naturels compris de $2$ à $N$.}         \KwResult{la liste $P$ des nombres premiers compris entre $2$ et $N$.}         \BlankLine         \For{$i = 2$ \KwTo $N$}{             \If{$i$ n'est pas barré dans la liste $L$}{                 Barrer dans la liste $L$ les mutltiples $ki$ où $k \geq 2$.             }         }         \Return{la liste $P$ des nombres non barrés.}     \end{algorithm}               \item Bla, bla...     \end{enumerate}          \end{document}      The problem I met is that I obtain the following output where the algorithm is misplaced (or too width). ![enter image description here](http://i.stack.imgur.com/A7rlF.png) If someone can give one solution with the algorithm centered regarding to the page, and not to the item content, it would be great.


title: How can I keep browsing my pdf with synctex at the same time as LaTeX is rebuilding it?

text: As discussed here pdflatex preview problem: white pdf pages with only hyperref-rectangles visible during compile? when working on my dissertation which takes a long time to compile (even when compiling single chapters with `includeonly` it takes 1..3 minutes to compile with latexmk, I can not view the last version of the pdf to continue working during compiling time which breaks my workflow and makes me wasting time waiting while I could continue editing my document. I'm working with TeXShop 2.43 on MacOS 10.6.8 with TeXLive 2011. The question is   * how can I keep browsing my pdf (in the last compiled version) as long as pdflatex compiles   * and how can I use `synctex` for jumping from the source file to the pdf and back? A first suggestion (thanks, jonalv) was               latexmk -pdf text.tex && mv text.pdf viewMe.pdf      However `synctex` will not be working with the changed file name, especially as it is different from the name of the main file. Is there a way to do it with synctex working?


title: Automatically typeset math in section headings in bold-face

text: This question is motivated by a question asked me by a friend who is working on his thesis in mathematics. His section headings occasionally contain math, which:   * he would like to be in boldface to match the rest of the section title; but   * he would like to be medium-weight when it occurs in the table of contents, as with the rest of the section title. He was using `\mathbf` to make the math boldface in his section headings; this of course also made them bold in the table of contents. I gave him a simple solution which inserted code at the beginning of the table of contents, which would make `\mathbf` pass its arguments unchanged. Of course, `\mathbf` also makes its arguments upright rather than math-italics, which I would also consider less than desirable; and it has no effect on _e.g._  greek characters, for which you would have to use something like the `\bm` command of `bm.sty` instead. (You could play the same trick with `\bm` as with `\mathbf` in the table of contents, but having to repeatedly use different math macros for all math in section headings to me seems inelegant.) What would be the most elegant way to automatically render all math (including non-latin characters) in bold-face for section headings, but the normal medium-weight everywhere else (including the entries of the table of contents)?


title: Graphing trigonometric functions, axes labeled with tick marks

text: I am providing the code for graphing three trigonometric functions. (In the preamble, I had to put a `%` before the command `\usetikzlibrary{calc,angles,quotes}` because LaTeX could not compile it with the command. It gave me the error `can't find file 'tikzlibraryangles.code.tex'`. MikTeX2.9 is compiling the code.) How do I add the labels "$\scriptstyle{y = \sin(x)}," "$\scriptstyle{y = \cos(x)}," and "$\scriptstyle{y = \tan(x)}" directly under the y-axis to the corresponding graphs? Arrowheads should be at both ends of the axes. They are currently at one end. Is there a code for putting labels (in nodes) for the tick marks over other features of the graphs? How does the code instruct TikZ to marks the tick marks in half-unit increments? How do I get the code to instruct TikZ to mark the tick marks in increments of integral multiples of \pi/2? In the graphs of the tangent function, the asymptotes are solid lines. How do I get dotted lines? In the code for graphing the tangent function, there is "scaled x ticks={real:3.1415}, xtick scale label code/.code={}". What does "{real:3.1415}" and "code/.code={}" instruct TikZ to draw on the x-axis?               \documentclass{article}     \usepackage{amsmath}     \usepackage{tikz}     %\usetikzlibrary{calc,angles,quotes}     \usepackage{pgfplots}               \pgfkeys{/pgfplots/Axis Style/.style={         width=13.5cm, height=5cm,         axis x line=center,          axis y line=middle,          samples=100,         ymin=-1.5, ymax=1.5,         xmin=-7.0, xmax=7.0,         domain=-2*pi:2*pi     }}               \begin{document}          \begin{tikzpicture}     \begin{axis}[         Axis Style,         xtick={             -6.28318, -4.7123889, -3.14159, -1.5708,             1.5708, 3.14159, 4.7123889, 6.28318         },         xticklabels={             $-2\pi$, $-3\pi/2$, $-\pi$, $\pi/2$,             $\pi/2$, $\pi$, $3\pi/2$, $2\pi$         }     ]     \addplot [mark=none, ultra thick, blue] {sin(deg(x))};     \end{axis}     \end{tikzpicture}          \begin{tikzpicture}     \begin{axis}[         Axis Style,         xtick={             -6.28318, -4.7123889, -3.14159, -1.5708,             1.5708, 3.14159, 4.7123889, 6.28318         },         xticklabels={             $-2\pi$, $-3\pi/2$, $-\pi\hspace{0.30cm}$, $\pi/2$,             $\pi/2$, $\pi\hspace{0.10cm}$, $3\pi/2$, $\hspace{0.25cm} 2\pi$         }     ]     \addplot [mark=none, ultra thick, red] {cos(deg(x))};     \end{axis}     \end{tikzpicture}          \begin{tikzpicture}     \begin{axis}[         Axis Style,         xtick={-6.28318, -4.7123889, ..., 6.28318},         scaled x ticks={real:3.1415},         xtick scale label code/.code={},     ]     \addplot [mark=none, thin, brown] {tan(deg(x))};     \end{axis}     \end{tikzpicture}               \end{document}


title: undesired heading with \includepdf

text: I only want a header on the first page, but instead LaTeX produces a header on all pages. Is there a way to remove these? code:               \includepdf[pages={1,2,3}, pagecommand=\section{Appendix A: The SF-36 Health Survey}]{SF36form.pdf}


title: Installing ornaments

text: I am trying to install the Ornaments package: http://altermundus.com/pages/downloads/packages/pgfornament/ I am using a Mac with MacTeX 2012. I have followed the instructions in the package ReadMe file without success. I see many answers saying that packages need to be installed at `~/Library/texmf/tex/latex/` - however the Library folder I have at that location does NOT contain a folder called `texmf`. Could someone please provide me with the COMPLETE path that each of the files contained in the package need to be placed at?


title: Is there any analog to #pragma once in (La)TeX?

text: In `C`, I can write `#pragma once` as a preprocessor directive at the top of a header file, which tells any compiler that supports it to include the file a maximum of one time per compilation cycle, regardless of how many times I `#include` that header file in the other source files. It is a common alternative to `#ifndef`/`#define`/`#endif` include guards, despite not being an officially documented/supported part of the standard. La(TeX) has several facilities for so-called "include guards", many of which are outlined in the answers to Conditional typesetting / build. My question is: Does there exist (or is there a possibility of) a construct in (La)TeX analogous to `#pragma once` in the `C` language; that is, a directive set on one line of a file which causes that file to be input only one time during the compilation? ## MWE for Testing:               \documentclass{article}     \usepackage{filecontents}          \begin{filecontents*}{mydefs.tex}     %<-- insert magic *#pragma once*-like line here to prevent errors     \newcommand{\foo}{foo}     \newcommand{\baz}{baz}     \end{filecontents*}          \begin{document}     \input{mydefs}     \input{mydefs}     \foo\ \baz\ test.     \end{document}      ## Note: You might say to just use `\providecommand` and be done with it, which is a valid answer. But I would like to know if what I've proposed is possible with (La)TeX, _for science!_


title: Cheatsheet template

text: I would like to create a cheatsheet with a number of boxes positioned on the page. Each box would contain a title and examples of that category. Boxes could vary in length, so this is not a rigid grid. I've only found a single cheatsheet format in LaTeX, and it's nothing like this, mainly a very dense conglomeration of text on the page. Here's a mockup of what I would like to have. Is there any template that gives me a fairly good headstart in achieving this? ![enter image description here](http://i.stack.imgur.com/AdqhA.png)


title: TikZ: using the draw let in syntax to create an arc but the arc and its difference angle doesnt add up to 360

text: Consider this code snippet:               \draw[-latex] let             \p0 = (P6),             \p1 = (P5),             \p2 = (P4),             \n1 = {atan2(\x1 - \x0, \y1 - \y0)},             \n2 = {atan2(\x2 - \x0, \y2 - \y0)},             \n3 = {.75cm},             \n4 = {(\n2 + \n1) / 2}           in (P6) +(\n1:\n3) arc[radius = \n3, start angle = \n1, end angle = \n2];      This comes from the code below (at the bottom):               \documentclass[convert = false]{standalone}          \usepackage{tikz}     \usetikzlibrary{calc, intersections, backgrounds, arrows}          \begin{document}          \tikzset{circle with radius/.style = {shape = circle, inner sep = 0pt,           outer sep = 0pt, minimum size = {2 * (#1)}}}       \begin{tikzpicture}[line join = round, line cap = round,         every label/.append style = {font = \scriptsize},         dot/.style = {inner sep = +0pt, shape = circle,           draw = black, label = {#1}},         small dot/.style = {minimum size = .05cm, dot = {#1}},         big dot/.style = {minimum size = .1cm, dot = {#1}},         ]         \begin{scope}           %\clip ($(B) + (1.5, -2)$) rectangle ($(B) + (-3, 2)$);                                       \coordinate (O) at (0, 0);                \pgfmathsetmacro{\as}{3}           \pgfmathsetmacro{\bs}{2.25}           \pgfmathsetmacro{\c}{sqrt(\as^2 - \bs^2)}           \pgfmathsetmacro{\al}{3.75}           \pgfmathsetmacro{\bl}{2.9}           \pgfmathsetmacro{\cl}{sqrt(\al^2 - \bl^2)}           \pgfmathsetmacro{\xs}{abs(\c - \cl)}                \coordinate (O) at (0, 0);                \node[fill = black, big dot = {below left: \(F\)}] (F) at (\c, 0) {};                \path[name path global = line1] (\c, 0) -- ++(60:{\as} and \bs);           \path[name path global = line2] (\c, 0) -- ++(150:6cm);              \draw[name path global = ell1, blue] (O) ellipse             (\as cm and \bs cm);                  \draw[name path global = ell2, red] (-\xs, 0)             ellipse (\al cm and \bl cm);                \path[name intersections = {of = line1 and ell1, by = P1}];           \node[fill = black, big dot = {right: \(A\)}] (A) at (P1) {};                \path[name intersections = {of = line2 and ell2, by = P2}];           \node[fill = black, big dot = {above: \(B\)}] (B) at (P2) {};                \begin{scope}[declare function = {doubleA = 5.8cm;},             ]             \clip ($(A.center) + (1, 0)$) rectangle ($(B.center) + (0, 1)$);             \begin{pgfinterruptboundingbox}               \path let                 \p1 = ($(A) - (F)$),                 \p2 = ($(B) - (F)$),                 \n1 = {veclen(\x1, \y1)},                 \n2 = {veclen(\x2, \y2)}               in               (A) node[name path global = aCircle, circle with radius = doubleA-\n1]               {}               (B) node[name path global = bCircle, circle with radius = doubleA-\n2]               {}               (F) node[name path global = fCircle,               circle with radius = .5 * doubleA] {};                    \tikzset{name intersections = {of = aCircle and bCircle, name = F'} }               \foreach \solA in {2} {                 \path ($(F)!.5!(F'-\solA)$) coordinate (C'-\solA)                 ($(C'-\solA)!doubleA/2!(F)$) coordinate (xDir-\solA)                 (F'-\solA) node[name path global/.expanded = f'Circle-\solA,                 circle with radius = .5 * doubleA] {};               }                         %!?                     \foreach \solA in {2} { %!?                                                                \path[name intersections = {of = fCircle and f'Circle-\solA,                   by = {yDir-\solA}}]                 ($(xDir-\solA)-(C'-\solA)$) coordinate (xDir'-\solA)                 ($(yDir-\solA)-(C'-\solA)$) coordinate (yDir'-\solA)                 ;               }             \end{pgfinterruptboundingbox}             \foreach \solA in {2}             \draw[x = (xDir'-\solA), y = (yDir'-\solA), name path global = traj]             (C'-\solA) circle [radius = 1];           \end{scope}                \path[name path = circ] (B) circle [radius = 1bp];                \draw[name intersections = {of = circ and traj}, -latex] (B) --           ($(intersection-1)!1.25cm!(intersection-2)$) coordinate (P3);           \draw[name intersections = {of = circ and ell2}, -latex, red] (B) --           ($(intersection-1)!2cm!(intersection-2)$) coordinate (P4);           \draw[-latex, name path = line3] (P3) -- (P4);           \draw[name path = line4] (B) -- ($(B)!2.1cm!-90:(F)$) coordinate (P5);                \path[name path = circ2] (P3) circle [radius = 1bp];           \path[name intersections = {of = circ2 and line3}, name path = line5]           (P3) -- ($(intersection-1)!2cm!(P3)$);           \path[name intersections = {of = line5 and line4, by = P6}];                \path[name intersections = {of = circ and traj}] (B) --           ($(intersection-1)!1.5cm!(intersection-2)$) coordinate (P7);                \path[name intersections = {of = circ and ell2}] (B) --           ($(intersection-1)!2.5cm!(intersection-2)$) coordinate (P8);                \draw[-latex] let             \p0 = (P6),             \p1 = (P5),             \p2 = (P4),             \n1 = {atan2(\x1 - \x0, \y1 - \y0)},             \n2 = {atan2(\x2 - \x0, \y2 - \y0)},             \n3 = {.75cm},             \n4 = {(\n2 + \n1) / 2}           in (P6) +(\n1:\n3) arc[radius = \n3, start angle = \n1, end angle = \n2];         \end{scope}       \end{tikzpicture}          \end{document}      So in this draw command, I set 0th point as the focus, the 1st point as the starting angle line, and the 2nd point as the ending angle line. However, the TikZ picture arcs the opposite direction (see below): ![enter image description here](http://i.stack.imgur.com/x5JXG.png) So I then took `\n2 = {2 * pi - atan2(..)}` which should be wedge not encircled with the arc but this generate this picture: ![enter image description here](http://i.stack.imgur.com/PY1QP.png) Those two arcs should theoretically add up to a full circle. > What is going wrong? > > How can I get the command to arc to the correct distance? If I compile both commands, we can see without a doubt they aren't adding up: ![enter image description here](http://i.stack.imgur.com/1YoN2.png) * * * **Edit 2:** Consider the image below: ![enter image description here](http://i.stack.imgur.com/UWPHH.png) As to why I used the code above as MWE, we can see that I have arcs in the same vicinity that had negative angles as well. I defined those arcs just as I did the one that posed a problem. Therefore, it appeared to be an issue with that area not negative angles. For instance, gamma2 was defined focus, lower line, and upper line but it drew the arc without needing special treatment unlike the phi angle I asked here about.


title: Questions on the adjustment of bibliography style

text: I am writing a document with loads of references using `bibtex`. However, I want to change the style of how latex layouts the references in the document. Currently it looks like:               [1] Reference 1     [2] Reference 2      What I want to achieve are the following adjustments:   * Remove brackets `[ ]` from the reference numbering   * Enlarge distance between all references   * Add additional space between the reference number and the reference itself. The result should look like:               1    Reference 1          2    Reference 2      I am new to LaTeX and when I googled for enlarging the space between the references I found solutions for `biblatex` rather than `bibtex`. Thus, I tried to get biblatex running and even though it looks not too difficult I never succeeded. Therefore, I was wondering whether one can achieve my wanted adjustments using `bibtex` or is t preferable to use `biblatex`? Furthermore, I want to change the style of how the references are printed. I haven't yet tried all of the available styles for `bibtex` but `biblatex` seem to have many more features for that. However, it looks pretty difficult to adjust everything by hand.


title: Page number of ToC should be in the header

text: The page number is in the footer not in the header, I used the answer of @cmhughes in this link and it was good but as it is well known that the ToC may last for 4 or 5 pages not only one, that is, the first page numbering is still in the footer while the other pages were corrected. I need to make the page number of the first page of the ToC to be in the right side of the header. I used this code in the class:               %%%%%%%%%%% Table of Contents started here %%%%%%%%%%%%%%%%%%%          \renewcommand{\contentsname}{TABLE OF CONTENTS}     \addtocounter{secnumdepth}{1}     \setcounter{tocdepth}{6}     \newcounter{dummy}     \newcommand\addtotoc[1]{     \refstepcounter{dummy}     \addcontentsline{toc}{chapter}{#1}}     \renewcommand\tableofcontents{     \btypeout{TABLE OF CONTENTS}          \begin{spacing}{1}{          \setlength{\parskip}{1pt}     \if@twocolumn       \@restonecoltrue\onecolumn     \else       \@restonecolfalse     \fi     \chapter{\contentsname         \@mkboth{            \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}     \@starttoc{toc}     \if@restonecol\twocolumn\fi     \cleardoublepage     }\end{spacing}     }     %%%%%%%%%%% Table of Contents ended here %%%%%%%%%%%%%%%%%%%      and in the main file of my thesis I used this code:               \fancyhf{}     \fancyhead[R]{\thepage}     \pagestyle{fancy}     \tableofcontents  % Write out the Table of Contents     \cleardoublepage


title: Using mathspec to change digits font in math mode isn't working

text: I'd like to use the Linux Libertine font with a document, and I'm running into a problem with digits in math mode. Here is a MWE:               \documentclass[11pt]{article}          \usepackage[math]{mathspec}     \setprimaryfont{Linux Libertine O}          \begin{document}     1 $1$ $\mathrm{1}$ $\text{1}$     \end{document}      which, when compiled with XeLaTeX, produces the following (no errors reported): > ![enter image description here](http://i.stack.imgur.com/1HgCR.png) As you can see, `$1$` still gives Computer Modern. But my understanding from the `mathspec` documentation is that `\setprimaryfont` should apply to digits in math mode: > ![enter image description here](http://i.stack.imgur.com/QkZfY.png) Perhaps I'm misunderstanding something about the documentation, or perhaps I have a problem with my fonts. I'm using TeXstudio 2.6.6 with MiKTeX 2.9 on Windows 7 64-bit. Any help with getting `$1$` to make a Linux Libertine `1` would be appreciated.


title: What packages are required for "setmainfont" and "setCJKmainfont"?

text: I've searched for this extensively but couldn't find anything that could help me, but if you know of some previous question that might help, feel free to point me to it. I have a document with Japanese characters and Latin characters. I'd like to make it clear that it used to work fine, I was able to see both set of glyphs. I left it alone for some time and when I re-took the document and typeset it, the Japanese glyphs disappeared. It worked everything except for the Japanese characters that were not printed. So I tried other packages but nothing worked. Finally I tried setting two fonts, one for the Japanese part and one for the Latin characters. The reason behind this is that I need some words to be in italic and some to be Small Caps (for the Latin characters) since I failed to find a single font that supported Japanese and these two things as well. However if I try to write: `\setmainfont{CMU Serif}   \setCJKmainfont{Hiragino Mincho Pro}` I get this:               LaTeX Warning: Command \selectfont has changed.     Latex Error: ...tex:37 LaTeX Error: Environment CJK undefined.     Latex Error: ...tex:175 LaTeX Error: \begin{document} ended by \end{CJK}.      So my question is: Is there a font that might support all of that? Alternatively, what packages are required for me so that I can set two fonts and so that Latex automatically recognizes when to use each? I'd prefer a minimal approach over huge preamble codes to set this up. Here is the MWE:               \documentclass{article}     \usepackage[a4paper, margin=1cm, landscape]{geometry}     \usepackage[document]{ragged2e}     \usepackage{fontspec} % I was experimenting     \usepackage{setspace}     \usepackage{lineno}     \usepackage[english]{babel}     \usepackage{CJKutf8}     \usepackage[table]{xcolor}    % loads also »colortbl«     \usepackage{tabu}     \usepackage{multirow}     \usepackage{colortbl}     \usepackage{booktabs}     \usepackage{array}     \usepackage{arydshln}          \pagestyle{empty}          %\setmainfont{CMU Serif}     %\setCJKmainfont{Hiragino Mincho Pro}          \begin{document}           Regular, \emph{italic} text, but also in \textsc{small caps}. And now for some 日本語 $\leftarrow$ Japanese.          \end{document}      **Output:** > ![enter image description here](http://i.stack.imgur.com/JYw8u.png)


title: Macro for \textwidth, \textheight and keepaspectratio

text: I'm using many pictures within my `beamer` presentation. Somehow I'm tired of writing:               \begin{figure}         \includegraphics[width=0.8\textwidth,height=0.8\textheight,keepaspectratio]{source}     \end{figure}      It works fine and does what I want, but I want to write less code :-)) e.g.:               \begin{figure}         \includegraphics[shrink=0.8]{source}     \end{figure}      Yes, I know `scale` but it works relative to the image size, but not (what I want) relative to the page size … Is there a lightweight and genuine way to achieve this?


title: Using 'xfrac' with 'mathrsfs'

text: I'm attempting to move from the `nicefrac` package to `xfrac`. The following source compiles, but with a warning:               \RequirePackage{fix-cm}     \documentclass{article}     \usepackage{xfrac}     \usepackage{mathrsfs}     \begin{document}       $\sfrac{1}{2}$     \end{document}      `LaTeX Font Warning: Font shape 'U/rsfs/m/n' in size <3.49998> not available` It appears as though `xfrac` attempts to load _all_ current math alphabets in its typeset size, even if they are not used in the fraction. Is there a variant of `rsfs` that supports fractional sizes? Or a way to prevent `xfrac` from loading it unless it is needed? Basically, I'd like to suppress this warning unless LaTeX is actually typesetting a glyph from `rsfs` at a fractional size. Is this possible?


title: Problem with references \here \where

text: Hi I have a problem with referencing which I cannot reproduce with the MWE. Here is what the problem is. I need to write next to the page number of my reference also if that page comes before and or after (Cf. above P. X - cf. below P. Y). For that I am using following definition:               \makeatletter%     \newcount\here@undef%     \newcommand{\here}[1]{%       \@ifundefined{here@#1@undef}{}{\advance\here@undef by -1}%       \@namedef{here@#1}{}}%     \newcommand{\where}[1]{%       \@ifundefined{here@#1}{%         unten\space%         \@ifundefined{here@#1@undef}{%           \@namedef{here@#1@undef}{}%           \advance\here@undef by 1%         }{}%       }{%         oben%       }%     }%     \AtEndDocument{%       \ifnum\here@undef>0%         \GenericWarning{}{There were undefined above/below labels}%       \fi}%     \makeatother%      and than in the text I put: `\here{x}\label{x}` and `\footnote{Siehe dazu \where{x} S. \pageref{x}.}` Now that works fine for the most parts but there are some entries where it doesn't meaning it tells above when its below or below when its above. Here is an example: ![enter image description here](http://i.stack.imgur.com/Em3Cb.png) The page number is ok but it should be oben (above) instead of below (unten). This happens only with few references - not with all, but still thats a problem and it shouldn't happen. I can't figure out why it does this.In the .aux file it looks like this:               \@writefile{toc}{\defcounter {refsection}{0}\relax }\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.2.2}Homoousianismus}{36}{subsubsection.1.2.2}}     \newlabel{hmsnsnms}{{1.2.2}{36}{Homoousianismus}{subsubsection.1.2.2}{}}     \newlabel{ZGHPAZ8A62}{{1.2.2}{36}{Homoousianismus}{subsubsection.1.2.2}{}}     \newlabel{ZGGRAAN9M3}{{1.2.2}{36}{Homoousianismus}{subsubsection.1.2.2}{}}     \newlabel{ZGF97PS312}{{1.2.2}{37}{Homoousianismus}{subsubsection.1.2.2}{}}     \newlabel{ZENP2OXA6Z}{{1.2.2}{37}{Homoousianismus}{subsubsection.1.2.2}{}}     \newlabel{ZDNOW6A981}{{1.2.2}{38}{Homoousianismus}{subsubsection.1.2.2}{}}     \newlabel{athglbkntns}{{1.2.2}{38}{Homoousianismus}{subsubsection.1.2.2}{}}     \newlabel{ZBT29MH2LW}{{1.2.2}{38}{Homoousianismus}{subsubsection.1.2.2}{}}     \newlabel{ZAPYHEWQ07}{{1.2.2}{39}{Homoousianismus}{subsubsection.1.2.2}{}}     \newlabel{ZA4HNDP59U}{{1.2.2}{39}{Homoousianismus}{subsubsection.1.2.2}{}}     \newlabel{Z546N43KIX}{{1.2.2}{39}{Homoousianismus}{subsubsection.1.2.2}{}}     \newlabel{Z50RQN9QUC}{{1.2.2}{39}{Homoousianismus}{subsubsection.1.2.2}{}}     \newlabel{Z4RSFUMEBP}{{1.2.2}{39}{Homoousianismus}{subsubsection.1.2.2}{}}     \newlabel{Z2ZXAGGBHJ}{{1.2.2}{39}{Homoousianismus}{subsubsection.1.2.2}{}}     \newlabel{doppltexath}{{2}{40}{Homoousianismus}{Item.29}{}}     \newlabel{Z0H2OLHK3K}{{1.2.2}{42}{Homoousianismus}{Item.30}{}}      The problematic reference is:               \newlabel{doppltexath}{{2}{40}{Homoousianismus}{Item.29}{}}      and I get it that the reason for this is that here I have `{2}`(second chapter) instead of `{1.2.2}` (first chapter), but I can't figure out why he is doing this with exactly this entry which is just a normal entry like any other (nothing special about it). Here is a MWE but as I mentioned I can't reproduce this behaviour:               \documentclass[a4paper,11pt]{scrartcl}     \usepackage[latin1]{inputenc}     \usepackage{csquotes}     \usepackage{blindtext}     \usepackage{filecontents}     \usepackage{hyperref}     \hypersetup{         colorlinks,          citecolor=black,          filecolor=black,          linkcolor=black,          urlcolor=black     }     \makeatletter%     \newcount\here@undef%     \newcommand{\here}[1]{%       \@ifundefined{here@#1@undef}{}{\advance\here@undef by -1}%       \@namedef{here@#1}{}}%     \newcommand{\where}[1]{%       \@ifundefined{here@#1}{%         unten\space%         \@ifundefined{here@#1@undef}{%           \@namedef{here@#1@undef}{}%           \advance\here@undef by 1%         }{}%       }{%         oben%       }%     }%     \AtEndDocument{%       \ifnum\here@undef>0%         \GenericWarning{}{There were undefined above/below labels}%       \fi}%     \makeatother%     \begin{filecontents}{\jobname.bib}      @incollection{athanasius1857,         Address = {Parisiis},         Author = {{Athanasius Alexandrinus}},         Booktitle = {S. P. N. Athanasii archiepiscopi Alexandrini opera omnia quae exstant},         Editor = {Jacques Paul Migne},         Keywords = {source},         Pages = {14013-1422},         Publisher = {Accurante J.-P. Migne},         Series = {Patrologia Graeca},         Shortauthor = {Ath.},         Shorttitle = {ep. fest. 12.},         Title = {Epistola XII heortastica},         Volume = {26},         Year = {1857}}     @book{athanasius1858,         Address = {Parisiis},         Author = {{Athanasius Alexandrinus}},         Booktitle = {S. P. N. Athanasii archiepiscopi Alexandrini opera omnia quae exstant},         Editor = {Jacques Paul Migne},         Keywords = {source},         Pages = {1403-1412},         Publisher = {Accurante J.-P. Migne},         Series = {Patrologia Graeca},         Shortauthor = {Ath.},         Shorttitle = {ep. fest. 11.},         Title = {Epistola XI heortastica},         Volume = {26},         Year = {1857}}     \end{filecontents}     \usepackage[ngerman]{babel}     \usepackage[style=historische-zeitschrift, maxnames=2, hyperref=true, backref=true, backrefstyle=none, backend=bibtex,idemtracker=true]{biblatex}     \bibliography{\jobname}     %     \begin{document}     \blindtext\footnote{Siehe dazu \where{x} S. \pageref{x}ff.}     \pagebreak     \blindtext\here{x}\label{x}     \pagebreak     \blindtext\footnote{Siehe dazu \where{x} S. \pageref{x}ff.}     \pagebreak     \printbibliography          \end{document}      **Also and I think that is very important this only happens with`Cf. below` and not with `Cf. above` references!** I also uploaded my .tex and .aux files here if someone wants to take a look at them: https://dl.dropboxusercontent.com/u/17374757/Inhalt.tex https://dl.dropboxusercontent.com/u/17374757/struktur.aux Thanks for your help!


title: mindmap problem

text: When compiling (on debian) the example in http://www.texample.net/tikz/examples/computer-science-mindmap/ I get a strange behavior of the central node (see attached image). have you any suggestion ? (I'm sorry it was a problem of my pdf viewer) Regards, Mohamed


title: Solid heading for onecolumn and twocolumn document

text: I need advice on creating a consistent solid heading style for a document that has both one column and two column pages. In one column mode, the heading should fill the entire page, but in two column mode, the heading should only fill the width of the column. Something like this almost works:               \documentclass{article}     \usepackage{xcolor}     \usepackage{lipsum}          \newcommand{\solidheading}[2][blue]{       \sffamily\colorbox{#1}{\bfseries\textcolor{white}{#2}\hspace{0.6\linewidth}}     }          \begin{document}          \onecolumn          \solidheading{Page wide heading}          \lipsum          \twocolumn          \solidheading{Column wide heading}          \lipsum          \solidheading{Another column wide heading}          \lipsum               \end{document}      But the heading width is a little too wide in the `\twocolumn` environment and a little too narrow in a `\onecolumn` environment. Any advice will be greatly appreciated. **Update** After a bit of struggling, I realised that I was being silly and added the line width to the text. So changing this line:               \sffamily\colorbox{#1}{\bfseries\textcolor{white}{#2}\hspace{0.6\linewidth}}      To this:               \noindent\sffamily\colorbox{#1}{\makebox[1.0\linewidth][l]{\bfseries\textcolor{white}{#2}}}      Helps a lot, but then the following lines in two column mode are thrown out a little. So it's not correct yet.


title: What are the differences between TeX counts and LaTeX counters?

text: The title already states the whole question. It has been answered by Joseph Wright at http://www.texdev.net/2009/11/17/tex-counts-and-latex-counters/, but I have not seen the according answer here at tex.stackexchange.com yet.


title: Suppress left indentation in itemize environment

text: I used itemize code as follows: \begin{itemize} \item \item \item \end{itemize}, and the assoicated results are displayed as: ![enter image description here](http://i.stack.imgur.com/2skmq.png) But I want no left indentation about the round point mark. I want the following results which produced in Word editor: ![enter image description here](http://i.stack.imgur.com/HFjAA.png) Any suggestion will be appreciated.


title: Custom, space-saving ellipse as TikZ node shape?

text: in some applications, one wants to use ellipses as node shapes in figures, e.g., when in the literature on a subject typically uses ellipses to denote certain things in figures. The problems with normal ellipses is that they often waste a lot of space: ![http://i.stack.imgur.com/0wAeX.png](http://i.stack.imgur.com/0wAeX.png) When a figure is already very wide, then the large "end caps" at the left and right ends of the ellipse can be very annoying, as they consume some space. It would be nice if there was another node shape type that is still round, but more space saving. With flatter end caps, an ellipse around some text can have some lower width: ![http://i.stack.imgur.com/0wAeX.png](http://i.stack.imgur.com/Ksrwb.png) The first of these ellipses is still a normal one, but the other ones are "morphed" a bit. They are still recognizable as ellipses, though (although they strictly speaking aren't). The process of building custom node shapes for this is a bit over my head, especially since the math that would be involved for computing the correct boundaries for some node context is probably complicated to do in Tikz. Here is the Python code that I used for constructing these examples: one can see that using an exponential function does the trick. But for using the node shape in practice, it's probably a bit more important to have the functionality of drawing such shapes in LaTeX itself.               #!/usr/bin/python     import math          def moreimpact(x,base):         if x<0:             return -math.pow(-x,base)         else:             return math.pow(x,base)          print "\\documentclass{article}"     print "\\usepackage{tikz}"     print "\\usetikzlibrary{shapes}"     print "\\begin{document}"     print "\\begin{tikzpicture}"     print "\\node[draw,shape=ellipse,inner sep=1pt] (f1) at (0,2) {This is a long text that leads to a very large ellipse};"          for j in xrange(0,4):         print "\\draw",         for i in xrange(0,360):             if i!=0:                 print " -- ",             xpos = math.cos(i/180.0*math.pi)             ypos = math.sin(i/180.0*math.pi)             print "(%f,%f)" % (5*moreimpact(xpos,1.0-0.1*j),0.3*moreimpact(ypos,1.0-0.1*j)-j*1.2),         print " -- cycle;"     print "\\end{tikzpicture}"     print "\\end{document}"      Does anyone know how to define a new node shape for such a "compressed ellipse" or something similar in TikZ (optimally parametrized by what I called "impact" in the code above)? The answer is probably helpful for many people, as I think that this node shape is quite useful in situations in which there is little space for a figure (e.g., presentations), and rectangles or rectangles with rounded corners are already taken for denoting something different. **EDIT:** Qrrbrbirlbel provided a link to a post about a "superellipse", which contains some code for a new TikZ node shape called "superellipse". This is precisely what has been asked for. It's just a pity that the size computation doesn't really work:               \node[shape=superellipse,superellipse parameter=3] at (2,3) {This is a long text that leads to a very large ellipse};      ![A node that is too large](http://i.stack.imgur.com/qX5Ww.png) This can be worked around by adding negative spaces, but it's just a workaround.


title: How to install dsfont package?

text: Hi I tried to install the package by               tlmgr install dsfont      but I only get               tlmgr: package repository http://ftp.gwdg.de/pub/ctan/systems/texlive/tlnet     package dsfont not present in package repository.      I also installed the package doublestroke since I read somewhere that this package contains dsfont, but if I include dsfont I still get an error message.. Does anyone know how to help me?


title: How to convert isodate to x unit in pgfgantt

text: I'm trying to find a solution to my problem : How to draw vertical lines using pgfgantt package. So I decided to take a look to the package source code and I found this :               \def\@tempa{none}%         \edef\@tempb{\ganttvalueof{today}}%         \ifx\@tempa\@tempb\else%           \draw [/pgfgantt/today rule]             (\ganttvalueof{today} * \ganttvalueof{x unit}, \y@upper pt) --             (\ganttvalueof{today} * \ganttvalueof{x unit}, \y@lower pt);%           \node at (\ganttvalueof{today} * \ganttvalueof{x unit}, \y@lower pt)             [anchor=north] {\ganttvalueof{today label}};%         \fi%      I understood what the code does so I decided to do like that :               \draw [/pgfgantt/today rule]             (\ganttvalueof{2014-05-19} * \ganttvalueof{x unit}, \y@upper pt) --             (\ganttvalueof{2014-05-19} * \ganttvalueof{x unit}, \y@lower pt);%           \node at (\ganttvalueof{2014-05-19} * \ganttvalueof{x unit}, \y@lower pt)             [anchor=north] {Validation date};%      The problem of solution is that `\ganttvalueof` take a key name not the key value. How to do get the coordinate of date? Someone could show me how to do to make this code work. **Edit** I changed my code :               \draw [/pgfgantt/today rule]             (\pgfcalendardatetojulian{2014-05-19}{} * \ganttvalueof{x unit}, \y@upper pt) --             (\pgfcalendardatetojulian{2014-05-19}{} * \ganttvalueof{x unit}, \y@lower pt);%           \node at (\pgfcalendardatetojulian{2014-05-19}{} * \ganttvalueof{x unit}, \y@lower pt)             [anchor=north] {Validation date};%      It's still not working. What's the second argument of `\pgfcalendardatetojulian`? **MWE**               \documentclass{article}     \usepackage[frenchb]{babel}       \usepackage{pgfgantt}     \usetikzlibrary{shadows}          \begin{document}     \begin{tikzpicture} % optional        \begin{ganttchart}[x unit=1.8mm,                        y unit chart=0.87cm,                        time slot format=isodate,                        vgrid=*{5}{dotted},                      ]                       {2014-04-14}{2014-07-11}            \gantttitlecalendar{month=name} \\                  \ganttbar[progress=100]{title1}{2014-04-14}{2014-04-15} \\                 \ganttbar[progress=100]{title2}{2014-04-15}{2014-04-17}        \end{ganttchart}     \end{tikzpicture}     \end{document}      What I want to do is to have a command `\verticalline[style=style, label=some label]{date}` that will draw a vertical line like the vertical line for `today` but at a specified date.


title: mathdesign compiles ß to SS

text: I'd like to use the package `mathdesign`, but it somehow makes problems with the german letter `ß`. My question is related to XeTeX: “ß” compiles as “SS”, German umlauts work but different because the reason seems to be `mathdesign` here.   The effect is best show with the following minimal example               \documentclass{standalone}     \usepackage{polyglossia}     \setdefaultlanguage[spelling=new,babelshorthands=true]{german}%     %\usepackage{utopia}\usepackage[utopia]{mathdesign}     \begin{document}     The german ß compiles to SS when used with \emph{mathdesign} package.     \end{document}      beeing compiled with line 4 uncommented resulting in _![desired result](http://i.stack.imgur.com/gbYDy.png)_or with line 4 activated resulting in _![unwanted](http://i.stack.imgur.com/Aw977.png)_.   Ä, Ö, Ü and so on works fine.


title: Number subsections and subsubsections, but not sections

text: I'm working on an article and I don't want to number my sections. However, I do want my subsections and subsubsections to be numbered. Right now my document has this numbering, but the 0 in 0.X.Y should not be there. How can I fix that?               Currently:     Section     0.1 subsection     0.2 subsection     0.2.1 subsubsection     0.3 subsection          Should be:     Section     1. subsection     2. subsection     2.1 subsubsection     3. subsection      This is my code:               \documentclass{article}          \begin{document}          \section*{Section}          \subsection{subsection}          \subsection{subsection}          \subsubsection{subsubsection}     blah     \subsection{subsection}          \end{document}      PS: I _did_ search a on the web and found a lot on this topic, but not a solution to this particular thing.


title: Keep track of changes in LaTeX document

text: I see that in documentation for many LaTeX packages authors keep track of changes with a `\changes{}` macro, which then produces a nice index style list of changes. I would like to do the same for edits to my PhD thesis. Is there a way to use this facility, or a similar one, outside the `ltxdoc` document class?


title: Subcaption: wrong subfigure labels

text: I am having a problem with `\subcaption` labeling subfigures (c) and (d) instead (a) and (b). I don't know where the problem originates from. I have many figures that contain two subfigures and most of them are labelled correctly, i.e. (a) and (b). But for some particular locations within the code, the labels come out as (c) and (d), no matter which figures how I use. I tried reverting to using `\subfigure` instead but the labels also come out as (c) and (d) instead of (a) and (b) at those particular locations within the code. Below is the block of code that I use to have two figures placed next to each other with subcaptions. Many thanks for your help.               \usepackage[bf]{caption}     \usepackage[hypcap=true]{subcaption}          \begin{figure}[h]          \centering         \subcaptionbox{Figure a\label{fig:a}}             {\includegraphics[width=0.45\textwidth]{figure-a}}         \subcaptionbox{Figure b\label{fig:b}}             {\includegraphics[width=0.45\textwidth]{figure-b}}         \caption{Figure a and b}         \label{fig:figure}     \end{figure}      EDIT: The following code is the shortest reproduction of the problem I could achieve. I cut down my original document.               \documentclass[12pt,a4paper]{report}     %Declaring packages for use     \usepackage[utf8]{inputenc}     \usepackage{graphicx}     \usepackage[bf]{caption} %Bold equation and figure captions     \usepackage[hypcap=true]{subcaption}               \begin{document}     \chapter{Intro}     \section{The first chapter}          If we remove this big figure then no bad labeling          \begin{figure}[tbhp]         \centering         \Large K         \caption{big figure}         \label{fig:big}     \end{figure}          \section{MIS}     If we remove this than no bad labeling          \begin{figure}         \begin{minipage}[b]{.5\linewidth}             \centering\large A             \subcaption{A subfigure}\label{fig:1a}         \end{minipage}%         \begin{minipage}[b]{.5\linewidth}             \centering\large B             \subcaption{Another subfigure}\label{fig:1b}         \end{minipage}         \caption{A figure}\label{fig:1}     \end{figure}                    \chapter{Some chapter}     \section{Some Section}     Some section          \subsection{Transfer}     If we remove this then no bad labeling          \begin{figure}[tbhp]         \centering         \Large K         \caption{big figure}         \label{fig:big}     \end{figure}          \subsection{BAD LABELING HAPPENS HERE}          Here is the bad labeling          \begin{figure}         \begin{minipage}[b]{.5\linewidth}             \centering\large A             \subcaption{A subfigure}\label{fig:1abad}         \end{minipage}%         \begin{minipage}[b]{.5\linewidth}             \centering\large B             \subcaption{Another subfigure}\label{fig:1bbad}         \end{minipage}         \caption{A figure}\label{fig:bad}     \end{figure}               \end{document}


title: Aligning function arguments in "algorithm" environment.

text: In the "algorithm" environment, when a function call spans multiple lines, I would like to have its arguments aligned, like so:               MyFunction(long_arg_name0,                long_arg_name1,                long_arg_name2);      How can I achieve this effect? **(second) EDIT** : Here's a minimal example that fails to achieve the desired effect:               \documentclass{article}          \usepackage{algorithmicx}     \usepackage{algpseudocode}     \usepackage{algorithm}          \begin{document}          \begin{algorithm}[t]     \begin{algorithmic}       \While{true}       \State MyLongWindedFunction(LongArgument0,\\ LongArgument1,\\ LongArgument2,\\ LongArgument3)       \EndWhile     \end{algorithmic}     \end{algorithm}          \end{document}      When I stick the standard alignment marker `&` between the arguments, I get the error message:               ! Misplaced alignment tab character &.     l.10   \State MyLongWindedFunction(LongArgument0,&                                                    \\ LongArgument1, &\\ Lon...


title: Reference format that write 'and' instead of '&' and also indents the lines after the first

text: I am writing a thesis. Please which bibliography style will write `and` instead of `&` and also indents the lines after the first in each references. I am using bibliography style `bbs`.               \bibliographystyle{bbs}     %\bibliographystyle{siam}     %\bibliographystyle{chicago}     \bibliography{references}


title: Comma between author and pagenumber

text: I need help with my term paper. When I quote with `\cite[px]{author}`, I want to remove the comma between the author and the pagenumber (px). I get this: (author, px) I need this: (author px) Thank you! Here's the file:               \documentclass[12pt]{scrartcl}          \usepackage{geometry}                % See geometry.pdf to learn the layout options.     There are lots.          \geometry{a4paper, top=25mm, left=35mm, right=35mm, bottom=25mm}                      \usepackage{graphicx}     \usepackage{amssymb}     \usepackage{epstopdf}     \usepackage[latin1]{inputenc}     \usepackage[english]{babel}     \usepackage[T1]{fontenc}     \usepackage{ulem}     \usepackage{enumitem}     \usepackage{stmaryrd}     \usepackage{makeidx}     \makeindex     \usepackage{amsmath}     \numberwithin{equation}{section}     \usepackage{hyperref}     \usepackage{underlin}     \usepackage{qtree}     \usepackage{tipa}     \usepackage{natbib}     \usepackage{subfigure}     \usepackage{ifthen}          \makeatletter     \renewcommand\@cite[2]{     ({ #1\ifthenelse{\boolean{@tempswa}}{ \nolinebreak[3] #2}{}})     }     \makeatother                    \DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}               \newpage                                        % Activate to display a given date or no date          \begin{document}     \newcommand{\attrib}[1]{\nopagebreak{\raggedleft\footnotesize #1\par}}                       \tableofcontents     \thispagestyle{empty}     \newpage         \section{Introduction}     As a young author "who was yet to find a public he was cautious about immediately   identifying himself with a work hat he himself regarded as shocking"     \cite[x]{Ziff}     \setcounter{page}{1}     \renewcommand{\baselinestretch}{1.50}\normalsize          \newpage     \begin{thebibliography}{------}          \bibitem[Ziff]{Ziff}     Ziff, Larzer. "Introduction" \textit{Maggie: A Girl of the Streets and Other Tales of New York.} Stephen Crane. London: Penguin Books, 2000. vii-xxv.      \end{document}      Okay, here I added all the usepackages and the part of the bibliography that is relevant for the example I gave you above in the section. The output is a comma between the author Ziff and the pagenumber x. I would like to remove the comma so that the new output is (Ziff x) and not (Ziff, x). I hope you can help me!


title: How can I provide a verbatim (unescaped) commandline for executing with \write18?

text: When using `\write18` to execute shell commands, there are some cases where lots of backslash strings, and other 'special' LaTeX characters are required in the commandline to be executed (e.g. if a regular-expression is needed, or when using awk). It would be convenient to have a way of typing the command exactly as it should appear when used on the commandline (i.e. without needing to use `\string`, etc.), and having it parsed verbatim, and given as an argument to `\write18`. What ways are there of accomplishing this?


title: How to redirect SAS output to LaTeX?

text: I'm wondering how can the _**SAS**_ output directly be redirect to LaTeX as we can do by using Sweave with _**R**_. Thanks


title: First paragraph of section becomes indented after setting \setbeforesecskip (memoir class)

text: I am trying to adapt my thesis draft to the format specifications of my university, which mandates among other things the number of line skips before and after section and subsection titles. I am using the memoir class and the following code to enforce the line skip rules:               \setbeforesecskip{2em}     \setbeforesubsecskip{2em}     \setbeforesubsubsecskip{2em}     \setaftersecskip{1em}     \setaftersubsecskip{1em}     \setaftersubsubsecskip{1em}      My problem is that when I add the above lines to the document preamble, the first paragraph after each section and subsection is indented. If I remove them, the behavior reverts back to the default of no indentation for the first paragraph, which I want. Could you please help with this puzzling behavior?