title: fancyhdr - Header Line is removed on beginning of chapter

text: When compiling the code below, there is no line in the header in the beginning of the chapter. How do I change it such that the header looks the same on all pages? Thanks               \documentclass{report}     \usepackage{fancyhdr}     \usepackage[USenglish]{babel}     \usepackage{blindtext}          \pagestyle{fancyplain} %eigener Seitenstil     \fancyhf{} %alle Kopf- und Fußzeilenfelder bereinigen     \fancyhead[L]{Titel} %Kopfzeile links     \fancyhead[C]{} %zentrierte Kopfzeile     \fancyhead[R]{Name} %Kopfzeile rechts     \renewcommand{\headrulewidth}{0.4pt} %obere Trennlinie          \begin{document}     \renewcommand{\chaptername}{Lektion}     \chapter{velo}     \blindtext \blindtext \blindtext \blindtext \blindtext \blindtext \blindtext \blindtext \blindtext \blindtext     \chapter{tram}     \blindtext \blindtext \blindtext \blindtext \blindtext \blindtext \blindtext \blindtext \blindtext \blindtext     \end{document}


title: Phantom malfunction in algorithm caption

text: I am trying to use `\phantom` in the context of an algorithm caption. I am using the `algorithm` and `algorithmic` packages. `\phantom` will work properly in normal text in my document, but not in a caption. Is there a workaround to get whitespace into a caption? I have tried things like `\hbox` and using `\includegraphics[width=0.25in]{smallWhiteImage.png}` to create some space. None of these have worked yet. Any help would be great! Please see the code example below. What I have:               \begin{algorithm}     \caption{ TestAlgorithm \newline     \textbf{SomeInputs} input1, \newline $\cdots$ input2, input3, input4, \newline $\cdots$ input5, input6, input7 \newline     \textbf{AnOutput} output1 }     \label{algo:TestAlgorithm}     \begin{algorithmic}[1]     \STATE $oh yeah!$     \end{algorithmic}     \end{algorithm}      What I want:               \begin{algorithm}     \caption{ TestAlgorithm \newline     \textbf{SomeInputs} input1, \newline \phantom{$\cdots$} input2, input3, input4, \newline \phantom{$\cdots$} input5, input6, input7 \newline     \textbf{AnOutput} output1 }     \label{algo:TestAlgorithm}     \begin{algorithmic}[1]     \STATE $oh yeah!$     \end{algorithmic}     \end{algorithm}


title: How to produce such centred effect?

text: I want to put my problem description the way it is done in the image i.e. centred, justified and with a little margin on both sides. I am able to do the rest of math correctly ![problem description](http://i.stack.imgur.com/MCuWL.png)


title: How do I reset paragraph numbering only after new chapter?

text: I'm writing a report that needs some annoying formatting. The `\chapter`s and `\paragraph`s need to be numbered using arabic numbers. The paragraph numbering needs to be reset at the commencement of each new chapter. The `\section`, `\subsection`, and `\subsubsection` headings should not be numbered, nor should they have any effect on the `\paragraph` numbering. I can't figure out how to:   1. Reset the `\paragraph` numbering to 1 at the start of each `\chapter`.   2. Prevent the `\paragraph` numbering from being reset at the start of a new `\subsubsection`. Bearing in mind I have used the `titlesec` package to change the appearance of my titles, what is the easiest way to achieve the desired outcome?               \documentclass[a4paper,11pt,twoside]{report}     %  Paragraph counter     \setcounter{secnumdepth}{5}     \renewcommand\theparagraph{\arabic{paragraph}}     \usepackage{graphicx,amssymb,amstext,amsmath,calc}     % Section headings     \usepackage[noindentafter,calcwidth]{titlesec}     \titleformat{\chapter}         [hang]         {\normalfont\uppercase}         {\bf{\thechapter.}}         {1em}         {\bfseries\filcenter}         []     \titleformat{\section}         [hang]         {\normalfont\uppercase}         {}         {0pt}         {\bfseries}         []     \titleformat{\subsection}         [hang]         {\normalfont}         {}         {0pt}         {\bfseries}         []     \titleformat{\subsubsection}         [hang]         {\normalfont}         {}         {0pt}         {}         [{\titleline*[l]{\titlerule}}]     \titleformat{\paragraph}         [runin]         {\normalfont}         {\theparagraph.}          {1em}         {}         []     \titlespacing*{\paragraph}         {0pc}         {11pt}         {11pt}         []     \begin{document}     \chapter{First Chapter}     \paragraph{}First paragraph, numbered 1.     \section{First Section}     \paragraph{}Second paragraph, numbered 2.     \subsection{First Subsection}     \paragraph{}Third paragraph, numbered 3.     \subsubsection{First Subsubsection}     \paragraph{}Fourth paragraph, should be numbered 4.     \chapter{Second chapter, numbered 2.}     \paragraph{}This paragraph should be numbered 1.     \end{document}


title: File `subfigure.sty' not found

text: `File subfigure.sty not found.` How can I fix this error? I compile my `.tex` file without any error with my laptop but I get this error when I compile with my office PC.


title: Controlling the way bibliography data are printed

text: I'm preparing the bibliography for my thesis and, while I am overall satisfied with the result, a couple of things are not under my control.   1. I want to cite a document classified as `@inproceedings`: I filled in the obligatory fields and also some other optional field ('booktitle' and 'editor', that I would like to print) as follows:               @inproceedings{DiVecchia:2008,         author         = "{Di Vecchia}, Paolo",         title          = "The birth of {String Theory}"         booktitle      = {String theory and fundamental interactions},         year           = "2008",         editor         = "Gasperini, Maurizio and Maharana, Jnan",         note           = "65th birthday of {Gabriele Veneziano}"      }      The problem is that I can't have printed anything more than the author and the title of the article appearing in the proceedings volume.   2. The second issue is about hyperlinks to the `arXiv.org` page of several articles. I would like to have the same layout for the link, for example `[hep-th/###],[hep-ph/###]`, but sometimes I get just `hep-th/###` (without brackets), or even `###` (without both brackets and primary class (as it seems to be called). A couple of examples with a different behaviour are the following:               @article{Staessens:2010vi,           author         = "Staessens, Wieland and Vercnocke, Bert",           title          = "{Lectures on Scattering Amplitudes in String Theory}",           year           = "2010",           eprint         = "1011.0456",           archivePrefix  = "arXiv",           primaryClass   = "hep-th",       }      which gives 1011.0456 and               @article{Bern:1993mq,           author         = "Bern, Zvi and Dixon, Lance J. and Kosower, David A.",           title          = "{One-loop corrections to five-gluon amplitudes}",           journal        = "Phys. Rev. Lett.",           year           = "1993",           eprint         = "hep-ph/9302280",           archivePrefix  = "arXiv",           primaryClass   = "hep-ph",      }      which gives [hep-ph/9302280].   If I try to set `eprint = "hep-th/1011.0456"` in the first item, then I get an error. How can I solve these problems? Unfortunately I cannot decypher the bibliography style file... It is difficult for me to produce a MWE, since I am using a template (this one) and I had little luck in trying to modify it, I am sorry. However, I am using the package `natbib` (with BibTeX, of course) and the custom bibliography style downloaded from the source code of this article (one of the two mentioned above). Thanks for your time! P.S.: Just one last question. Is it better to write the bibitem data inside curly braces or inside double quotes?


title: How to solve Undefined-Control-Sequence Error for biblatex in AucTeX

text: After reading many great things about biblatex in the forum, I would like to start using it. I tried the steps given in What to do to switch to biblatex? on a file on which I am already using BibTeX, but received an Undefined- Control-Sequence error on `\addbibresource`. I set up an example document copying from the files in http://www.ctan.org/tex-archive/macros/latex/contrib/biblatex//doc/examples, (`01-introduction.tex` and `biblatex-examples.bib`) and got the same error. I am using AucTeX 11.866 with TeXLive 2009. Below is the document I am trying to compile, along with the error it outputs. I am using the Default engine and generating a PDF (or trying to). What should I do to make this work?               \documentclass[10pt]{article}     \usepackage[T1]{fontenc}          \usepackage[american]{babel}          \usepackage{csquotes}          \usepackage[style=authoryear]{biblatex}          % biblatex-examples.bib is located in ~/Library/texmf/bibtex/bib/     \addbibresource{biblatex-examples.bib}          \begin{document}          \section*{Name of first section here}          This is just filler text \parencite{companion}.          This is just filler text \parencite[59]{companion}.          This is just filler text \parencite[see][]{companion}.          This is just filler text \parencite[see][59--63]{companion}.          \printbibliography          \end{document}      Here's the error:               ERROR: Undefined control sequence.          --- TeX said ---     l.11 \addbibresource                         {biblatex-examples.bib}     --- HELP ---     TeX encountered an unknown command name. You probably misspelled the     name. If this message occurs when a LaTeX command is being processed,     the command is probably in the wrong place---for example, the error     can be produced by an \item command that's not inside a list-making     environment. The error can also be caused by a missing \documentclass     command.


title: altering the orientation of column headers

text: I would like to generate a table that has each column header displayed sideways. For example:               \documentclass{article}     \usepackage{rotating}     \begin{document}         \begin{sidewaystable}         \begin{tabular}{cccc}         Name & Location & Latitude & Longitude\\         name1 & loc1 & lat1 & lon1\\         name2 & loc2 & lat2 & lon2\\         \end{tabular}         \end{sidewaystable}     \end{document}      From this example I would like the first 4 arguments (i.e. the column headers) to be orientated vertically. How can this be achieved?


title: How can I automatically copy a LyX-generated .aux file to the working directory for cross referencing?

text: This is a follow up to: Using the xr package in LyX (for cross-referencing an external LyX document) I have two LyX documents, called `draft.lyx` and `supplement.lyx`. I need to compile them into separate documents and be able to cross reference from the supplement to the draft. I am attempting to use xr per the instruction linked to above. Normally, I use a little python script to call LyX sequentially to compile each file from the command line. However, it seems that the temp folder only persists while LyX is running, so the necessary .aux file is deleted before it can be referenced. Is there a way to automatically copy the .aux file or to force the temp directory to persist?


title: Picture breaking listing

text: When putting long code using lstlisting on a page it breaks, which is fine. When placing a picture in a floating figure environment, it gets between the two parts of the listing, which obviously is not as it is supposed to be. I’m sorry for not being able to explain my problem better; therefore, here is a picture: ![Picture for better explanation](http://i.stack.imgur.com/kVz0v.png) A MWE with a different part of the document, though with the same result:               \documentclass[11pt]{scrartcl}     \usepackage[utf8]{inputenc}     \usepackage[german]{babel}          \usepackage{graphicx}     \usepackage{listings}               \begin{document}     \section*{B.3}     \begin{lstlisting}[language=Java, caption=B.3a)]         float s = 1.8f;         int tx = 20;         int ty = 50;         int r = 50;              public void setup() {             size(500, 500);             background(255, 255, 0); // aus draw zu setup              } // setup              public void draw() {             scale(s);             translate(tx, ty);             rotate(radians(r));                  stroke(0, 0, 255);             strokeWeight(4);             fill(0, 255, 0);             triangle(5, 20, 55, 3, 105, 20);             fill(255, 0, 0);             rect(25, 20, 60, 60);              } // draw     \end{lstlisting}          \begin{figure}[htb]     \caption{B.3a)}      \includegraphics[scale=0.7]{Screenshots/B3a.PNG}     \end{figure}          \begin{lstlisting}[language=Java, caption=B.3b)]         float s = 1.8f;         int tx = 20;         int ty = 50;         int r = 50;                public void setup() {             size(500,500);             background(255,255,0); //aus draw zu setup                     } //setup                     public void draw() {               translate(tx,ty);               scale(s);               rotate(radians(r));                    stroke(0,0,255);               strokeWeight(4);               fill(0,255,0);               triangle(5,20,55,3,105,20);               fill(255,0,0);               rect(25,20,60,60);                        } //draw       \end{lstlisting}     \end{document}      I already tried to change the parameters for the figures (using h, htbp or !h) but that didn’t help. So my question: What do I have to change to have the listing in one block – page breaks are okay – without images interfering?


title: Configuring auctex for pdf viewer

text: I'm on Ubuntu 13.10, Emacs 24.3.50.1, TeX Live 2013, AucTeX 11.87.2 (from ELPA). I've followed the instructions given by this page on enabling Okular (I'd rather use Evince, though), but this doesn't seem to work. `C-c C-c` on an opened .tex file, gives me the choice `Command: (default) LaTeX` in the minibuffer, then again and the minibuffer returns, so I would have to type in a viewer name. I type okular . . . and nothing -- that is, Okular starts, but there's no pdf of the tex showing. Any ideas what I'm doing wrong?


title: Riemann Sum Conundrum

text: The following approach to Riemann Sums first draws an arbitrary curve (which may later be tweaked), then forms rectangles based upon intersections. Unfortunately, the filled rectangles hide portions of the curve. The path and rectangles, however, can not be interchanged since the rectangles depend upon the path coordinates. How can this problem be avoided without dramatically altering the approach? Ps. I tried simply redrawing the curve after the rectangles but, for some reason, I cannot draw ANYTHING beyond the given code without prompting an error message. Something is wrong.               \documentclass{article}          \usepackage{tikz}      \usetikzlibrary{intersections}          \begin{document}          \begin{tikzpicture}     %axis      \draw (-.5,0) -- (6.5,0);            %curve       \draw[yshift=1cm,name path=curve] (-.5,0) %vertically shiftable         to[out=70,in=180] (.7,1.5)         to[out=0,in=180] (2,.5)         to[out=0,in=180] (4.5,2.5)         to[out=0,in=160] (6.5,1);          %rectangles     \foreach \x in {0,1,2,5}{         \path[name path=line \x] (\x,0) -- (\x,4);         \path[name intersections={of=curve and line \x, by={isect \x}}];             \draw[fill=gray!50] (isect \x) rectangle (\x+1,0);         \draw[fill] (isect \x) circle [radius=2pt];         }     \end{tikzpicture}          \end{document}


title: How can I know the default PGF line width?

text: Is there some macro that will tell me what the default PGF line width is? I have tried creating my own macro by cloning `\pgflinewidth` before it has been modified, i.e.               \let\defaultlinewidth\pgflinewidth      but `\defaultlinewidth` seems to be affected by `\pgfsetlinewidth` anyway, and change to whatever `\pgflinewidth` is. So, the problem is that after I have called `\pgfsetlinewidth`, I don't know what the default pgf line width is anymore. Is there some way to get around this?


title: tikz bug when creating stackoverflow tags?

text: I am still working on my template for stackexchange like resume, and I noticed that if I issue the `\LaTeX` macro inside a Tikz box, the `A` gets trimmed. The header of my document contains:               \usetikzlibrary{shapes.geometric}     \newcommand{\tagf}[2][]{     {     \scalefont{0.8}     \begin{tikzpicture}[baseline={(TAG.base)}]     \node[draw,#1] (TAG) {#2};     \node[font=\tiny,draw,#1] (TAG) {#2\strut};     \end{tikzpicture}     }     }      I want to do the following:                \tagf[blue!80, fill=blue!20,  rounded corners, font=\fontsize{0.1}{.1}]{Makefile}\hspace{-0.25cm}      \tagf[blue!80, fill=blue!20,  rounded corners, font=\fontsize{0.1}{.1}]{GCC}\hspace{-0.25cm}      \tagf[blue!80, fill=blue!20,  rounded corners, font=\fontsize{0.1}{.1}]{Python}\hspace{-0.25cm}      \LaTeX      \tagfb[blue!80, fill=blue!20,  rounded corners, font=\fontsize{0.1}{.1}]{\LaTeX}\hspace{-0.25cm}      The odd result is: ![Latex trimmed](http://i.stack.imgur.com/FRdWy.png) ## Update I compiled a complete snippet, which works:               \documentclass{article}     \usepackage{xcolor}     \usepackage{tikz}     \usepackage{scalefnt}     \usepackage{times} %if use this, the macro is broken.     %\usepackage{times} %commenting this lines out works      \usetikzlibrary{shapes.geometric}          \newcommand{\tagf}[2][]{%     \begin{tikzpicture}[baseline={(TAG.base)}]     \node[draw,#1] (TAG) {#2};     \node[font=\tiny,draw,#1] (TAG) {#2\vphantom{y}};     \end{tikzpicture}     }          \newcommand{\tagfb}[2][]{%     \begin{tikzpicture}[baseline={(TAG.base)}]     \node[draw,#1] (TAG) {#2};     \node[font=\tiny,draw,#1] (TAG) {#2\strut};     \end{tikzpicture}     }          \tikzset{My Tag Style/.style={blue!80, fill=blue!20,  rounded corners, , font=\fontsize{0.1}{.1}}}          \begin{document}     \foreach \x in {SAMBA, Red Hat, Windows, NFS, Python, Shell, \LaTeX, MySQL} {%         \tagf[My Tag Style]{\x}     }          \foreach \x in {SAMBA, Red Hat, Windows, NFS, Python, Shell, \LaTeX, MySQL} {%         \tagfb[My Tag Style]{\x}     }     \end{document}       Original question is: is this a bug? If not, how can I fix this behavior? **Updated question:**   I think this is not a 100% bug, and if so, not sure that it is in `Tikz`, maybe in the `times` package. So, how can I cause just the tags to have the correct font, and the rest of document have the font `times`? ![enter image description here](http://i.stack.imgur.com/3AJip.png)


title: How can I get correct picture?

text: I used Geogebra to draw the graph of the function $y = 2x^2 - 4x$. This is my code               \documentclass[10pt]{article}     \usepackage{pstricks-add}     \pagestyle{empty}     \begin{document}     \psset{xunit=1.0cm,yunit=1.0cm,algebraic=true,dotstyle=o,dotsize=3pt 0,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25}     \begin{pspicture*}(-2,-2.44)(3.92,5)     \psaxes[labelFontSize=\scriptstyle,xAxis=true,yAxis=true,Dx=1,Dy=1,ticksize=-2pt 0,subticks=2]{->}(0,0)(-2,-2.44)(3.92,5)[,140] [y,-40]     \psplot[linewidth=1.6pt,plotpoints=200]{-2.0}{3.9165217391304363}{2*x²-4*x}     \psline[linewidth=1.6pt,linestyle=dashed,dash=3pt 3pt](1,-2)(1,0)     \psline[linewidth=1.6pt,linestyle=dashed,dash=2pt 2pt](1,-2)(0,-2)     \begin{scriptsize}     \psdots[dotstyle=*,linecolor=blue](1,-2)     \rput[bl](1.02,-1.93){\blue{$A$}}     \psdots[dotstyle=*,linecolor=blue](1,0)     \rput[bl](1.02,0.08){\blue{$B$}}     \psdots[dotstyle=*,linecolor=blue](0,-2)     \rput[bl](0.02,-1.93){\blue{$C$}}     \end{scriptsize}     \end{pspicture*}     \end{document}      I use Texmaker and compiler with keys F2 -> F4 ->F8 ->F7. But I got ![enter image description here](http://i.stack.imgur.com/TuWdN.jpg) How can I get correct picture?


title: Macro defining macro

text: I have the following:               \newcommand{\makeWord}[1]{%     \newcommand{\#1}{\textrm{#1}}}          \makeWord{AdditiveGroup}     \newcommand{\AdditiveGroup}{\textrm{AdditiveGroup}}      Unfortunately, I did not properly define the makeWord macro. How do I fix this?


title: How to align objects within a side bar in beamer

text: I'm using Beamer with the Marburg theme to create a presentation. I have a custom vertical navigation bar on the left side of the slides and I'd like to add the frame number as well as a small logo on it. The problem is that I'd like both objects to be horizontally centered, but when I try to use the \centering or \begin{center}... commands, the objects go off the navigation bar, so I have to center them manually, so it's not perfect. I must say though, that the author and the title are horizontally centered. Here I provide the MWE.               \documentclass[serif]{beamer}          \usepackage[utf8]{inputenc}     \usepackage{graphicx}     \usepackage[spanish]{babel}     \usepackage{mathpazo}     \linespread{1.05}           \author{Lorem ipsum}     \title{Lorem ipsum}     \setbeamertemplate{navigation symbols}{}      \usetheme[hideallsubsections,left,width=2cm]{Marburg}          \usecolortheme{rose}      \setbeamercolor{titlelike}{bg=structure,fg=white}          \logo{ \includegraphics[height=1.5cm]{Logo.png}}            \setbeamertemplate{sidebar left}{           \vspace{-2\baselineskip}           \insertlogo                \vspace{\baselineskip}           \color{white}{\insertshorttitle[width={2cm},center,respectlinebreaks]}          \insertshortauthor[width={2cm},center,respectlinebreaks] \vspace{\baselineskip}          \insertverticalnavigation{2cm}          \vspace{4\baselineskip}          \insertframenumber            }               \begin{document}               \section{Lorem Ipsum}          \begin{frame}     \begin{minipage}[t]{0.45\textwidth}     fgns          \end{minipage}     \hfil     \begin{minipage}[t]{0.45\textwidth}     dtyjdy          \end{minipage}     \end{frame}     \section{Lorem Ipsum1}     \begin{frame}     \begin{minipage}[t]{0.45\textwidth}     fgns          \end{minipage}     \hfil     \begin{minipage}[t]{0.45\textwidth}     dtyjdy          \end{minipage}     \end{frame}               \end{document}      Any suggestions? Thanks in advance, Charlie


title: Howto hide a Listings or Verbatim environment using a \newif enable command

text: Due to make life easier I want to create a Exercise sheet for a lecture including the corresponding solutions. Therefore I defined a `\newif` to control whether the solution should be included or not. That worked fine until I need a `lstlisting` or a `verbatim` environment in it. The following code is the minimal example for the error, it works with `verbatim` too.               \documentclass[a4paper,10pt]{article}     \usepackage[utf8]{inputenc}     \usepackage{listings}          \newif\ifsolution      \solutionfalse          \ifsolution     \newcommand{\solution}[1]{#1}     \else     \newcommand{\solution}[1]{}     \fi          \begin{document}     This is always shown.      \solution{The listing is only shown if ifsolution is true.     \begin{lstlisting}      Test     \end{lstlisting}     }     \end{document}      Setting `solution` to true produces the error. How can I defined a command or an environment with this function?


title: Linebreak and \enquote

text: Using the `\enquote{}` command from the `csquotes` package my quotes seem to be wrapped to the next line a lot of times like this: > This is an "example   >  " sentence. Without the extra whitespace. Now I know I could use an `\mbox{}` around the `\enquote{}` command but this doesn't work for longer quotes, since they would protrude outside the page margin. Basically I want LaTeX to properly hyphenate words including their quotes. **Edit:** Thanks for the reply but there is no white space in my quotes environment. **Edit 2:** Oh poo. I think I have found the error. It seems to be a bug in the `xeCJK` package which is very unfortunate since I depend on it a lot. This also makes it impossible to use the `\enquote{}` environment inside of `\chapter{}` commands. **Edit 3:** Alright, there are two distinctive errors here:   1. The quotes problem. This one disappears after disabling either the `xeCJK` package or the `babel` package. Any solutions for this?   2. There are loads of errors when using the `\enquote{}` command inside the `\chapter{}` command. This seems to stem from an incompatibility of the `xeCJK` package with the `csquotes` package. Any tips for resolving this one? The buggy `xeCJK` is really quite terrible as I only have another two weeks to hand in my paper. Any help would be greatly appreciated. Here is my minimal working example that produces the error if you remove the chapter command. Otherwise nothing is working at all:               %%%%%% Grunddeklarationen           \documentclass[fontsize=12pt, parskip=half+]{scrreprt} % Parskip für den Abstand zwischen Absätzen          %%%%% Pakete          \usepackage[style=authortitle-dw, idembib=true, firstfull=true, nopublisher=false, idembibformat=dash, backend=biber, eprint=false, isbn=false, doi=false, url=false]{biblatex} %für deutsche bibliographie     \usepackage{fontspec} %Wichtig um Fonts systemweit zu benutzen     \usepackage{xunicode} %Unicode für Akzente? Bei Bedarf.     \usepackage{xltxtra} %xetex Extras     \usepackage[german]{babel} %Deutsche Sprachunterstützung     \usepackage[babel,german=quotes]{csquotes} % Für gute Anführungszeichen     \usepackage{xeCJK} %japanisch/chinesisch          \setmainfont[Mapping=tex-text,Ligatures=Common, Numbers=OldStyle]{Chaparral Pro}     \setsansfont[Mapping=tex-text]{Trade Gothic LT Std}     \setmonofont[Mapping=tex-text]{Lucida Sans Typewriter Std}     \setCJKmainfont{Ryo Text PlusN} %Hauptfont mit Serifen     \setCJKsansfont{Ryo Gothic PlusN} %Serifenlose Schrift          \KOMAoptions{DIV=11} % Kram für den Satzspiegel damit ca. 256 Wörter auf einer Seite sind          %%%%%%%% AB HIER FRONTMATTER %%%%%%%%%%%%%%%%%%%%%%%%          \begin{document}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %%%%%%%%%%%%%% AB HIER HAUPTTEXT PASTEN %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%           text text text text text text text text text      text text text text text text text text text      \enquote{foo}          \chapter{Testing \enquote{test}}          \end{document}


title: Two line hfill in custom chapter

text: \def\thickhrule{\leavevmode \leaders \hrule height .5pt \hfill \kern \z@}     \def\position{\centering}     %% Note the difference between the commands the one is      %% make and the other one is makes     \renewcommand{\@makechapterhead}[1]{%       \vspace*{10\p@}%       {\parindent \z@ \position \reset@font            % {\Huge \scshape  \thechapter }             \par\nobreak             \vspace*{5\p@}%             \interlinepenalty\@M             \thickhrule             \par\nobreak             \vspace*{2\p@}%                 % hacken om nummer 0 niet te weergeven              \hfill {\Huge \bfseries \ifthenelse{\value{chapter}>0}{\thechapter{}}{} #1\par\nobreak}             \par\nobreak             \vspace*{2\p@}%             \thickhrule         \vskip 50\p@       }}          %% This uses makes          \def\@makeschapterhead#1{%       \vspace*{10\p@}%       {\parindent \z@ \position \reset@font             %{\Huge \scshape \vphantom{\thechapter}}             \par\nobreak             \vspace*{5\p@}%             \interlinepenalty\@M             \thickhrule             \par\nobreak             \vspace*{2\p@}%             {\hspace*{0pt}\hfill \Huge \bfseries #1\par\nobreak}             \par\nobreak             \vspace*{2\p@}%             \thickhrule         \vskip 50\p@       }}     \endinput      The above code defines a Sony style chapter heading, which looks nice in my point of view. For proper lay-out, I right align the chapter. However, for long chapter titles this yields a problem, the extra line gets centred. How to fix this in the above code?


title: Get page numbering & page count of a given style

text: Given a set of page styles, for example `plain` and `butter`, in the memoir class how can get the page number and count for that given style? This seems like something that would already have been solved, but I cannot seem to find a solution that someone else has already worked out. A simple example:               \documentclass{memoir}     \copypagestyle{butter}{plain}     \begin{document}        \pagestyle{plain}        Page \thepage{} of \thelastpage. % should be "1 of 2" but is "1 of 1"        \newpage        Page \thepage{} of \thelastpage. % should be "2 of 2" but is "1 of 1"        \newpage        \pagestyle{butter}        \setcounter{page}{1}             % reset page to 1        Page \thepage{} of \thelastpage. % correctly "1 of 1"     \end{document}      I gather the `lastpage` counter uses the last page of the document, being 1 in this case because we reset it. How could one go about getting the page count of `plain` pages? In the degenerate case where one wanted to ignore the `butter` pages in the total page count, and there are two styles, is there a simple way one could one get the count of `plain` pages? (aside perhaps from putting the `butter` pages before the `plain` ones)


title: Looking for an ebook about typography that used to be part of a package

text: Sorry for asking, but an iron-curtain seems to have settled in my brain... I'm looking for a ebook about typography and how to best write/typeset a book. It used to be part of the documentation for some TeX/LaTeX package (I assume to help typeset books and similar), but was later split into a separate package. It's available both as a TeX/LaTeX-sourcefile and as a PDF. The book gives a brief history of and introduction to typography - Gutenberg, lead-types, old-style printing-presses, different measurements used; as well as a descriptions of the various parts of a typical book - foreword, introduction, title-page, copyright-page (what that string of number means), and so on. I only read the two first chapters, but I got the impression the book would be about how to typeset and section books. Anyway, since I don't remember the name of the packages (the original and the one with just the book), the webpage (I think it had one), the author nor the title; I'm asking here - does anybody remember this ebook?


title: The GPL and LaTeX packages

text: The GPL is viral. How does this apply to the LaTeX eco system if one uses a package licensed under the GPL2++?   1. If I _use_ it in a document, must _the document_ also be licensed under the GPL?   2. If I _use_ it in a package, must _that package_ also be licensed under the GPL?   3. If I _use_ it in a document class, must _the document class_ also be licensed under the GPL?   4. If I create a program that creates LaTeX code which _uses_ 1, 2 or 3 - must _that program_ also be licensed under the GPL?


title: PgfPlots duplicate x-axis labels

text: I have some repeated numbers on my X-Axis. Here is my code-               \begin{tikzpicture}         \pgfplotstableread{Figures/measurements.dat}         \datatable         \begin{axis}[symbolic x coords={1.2.1.a,1.2.3.b,1.1.3.c,1.1.1.d,1.3.1.e,1.3.3.f,3.3.3.g,1.3.3.h,1.1.3.i,1.1.1.j,1.2.1.k,1.3.1.l},         x tick label style={rotate=90,anchor=east},         grid=major,         xlabel=Processor Configuration,         ylabel=Clock Cycles,         legend pos=outer north east,         legend columns=1,         cycle list name=exotic,         %xtick=data,         xticklabels={1.2.1,1.2.3,1.1.3,1.1.1,1.3.1,1.3.3,3.3.3,1.3.3,1.1.3,1.1.1,1.2.1,1.3.1},         x label style={at={(0.5,-0.1)}},         ]            \addplot table[y=App_Stop] from \datatable ;         \addlegendentry{App Stop};     \end{axis}     \end{tikzpicture}      And here is my data file -               Proc_config App_Stop     1.2.1.a     138      1.2.3.b     923     1.1.3.c     1708     1.1.1.d     923     1.3.1.e     138     1.3.3.f     923     3.3.3.g     923     1.3.3.h     1427     1.1.3.i     923     1.1.1.j     923     1.2.1.k     138     1.3.1.l     923      Now you can see I have 2 entries for example for 1.2.1 renamed as 1.2.1.a and 1.2.1.k. So in order to avoid these a,b,c...,l in the x-axis tick labels I have added the command `xticklabels=` in the code. However, it does not display every label I have added. However, if I comment this line and uncomment the xtick=data line, I get the correct output, however it has all the suffixes a,b,c...l for every entry. How can I overcome this situation?


title: Adding lighting effect to a rectangular glow box in TikZ

text: I would like to add to my first MWE in Can I have a glow around a box in TikZ? a lighting effect as shown in this example of the pgfmanual: ![enter image description here](http://i.stack.imgur.com/VEVyD.png) By modifying the previous MWE:                \documentclass{article}         \usepackage{tikz}         \usetikzlibrary{calc}         \begin{document}         \def\shadowradius{3pt}         %         \newcommand\drawshadowbis[1]{             \begin{pgfonlayer}{shadow}         %                 \fill[inner color=blue,outer color=blue!10!black] ($(#1.south east)$) circle (\shadowradius);                 \fill[inner color=blue,outer color=blue!10!white] ($(#1.north west)$) circle (\shadowradius);                 %\fill[inner color=blue,outer color=blue!10!black] ($(#1.south west)$) circle (\shadowradius);                 %\fill[inner color=blue,outer color=blue!10!white] ($(#1.north east)$) circle (\shadowradius);                 %                 \fill[ top color=blue, bottom color=blue!10!black] ($(#1.south west)+((0,-\shadowradius)$) rectangle ($(#1.south east)$);                 \fill[left color=blue,right color=blue!10!black] ($(#1.south east)$) rectangle ($(#1.north east)+((\shadowradius,0)$);                 \fill[bottom color=blue,top color=blue!10!white] ($(#1.north west)$) rectangle ($(#1.north east)+((0,\shadowradius)$);                 \fill[right color=blue,left color=blue!10!white] ($(#1.south west)$) rectangle ($(#1.north west)+(-\shadowradius,0)$);         \end{pgfonlayer}         }         %         \pgfdeclarelayer{shadow}          \pgfsetlayers{shadow,main}         \begin{tikzpicture}            \node [fill=blue,rectangle,rounded corners=0pt,draw=blue, ultra thick, text=white] (box) {Test!!!};            \drawshadowbis{box}         \end{tikzpicture}         \end{document}      I get this: ![enter image description here](http://i.stack.imgur.com/QDBhX.png) but I do not know how to define the colours of the missing angles. Any help will be really appreciated!


title: How do I create this text delimiter?

text: I want to create a delimiter between two regular paragraphs of text as in the end of page 6 of this pdf. > ![enter image description here](http://i.stack.imgur.com/u45Em.png) One way out could be the Vmatrix environment but then I dont know how to make the right delimiter disappear. Quick googling suggested only the usual way of using \right. to make a delimiter disappear but that wont work here. How do I do this?


title: Inserting a vertex correction in Feyn - the Lyx Feynman package

text: I can't seem to be able to draw a standard Feynman diagram and add a vertex correction like here: http://commons.wikimedia.org/wiki/File:Feynman_second_order_vertex.svg When I try, my fermionic lines become disconnected. Help! Here's my attempt at it:               \Diagram{fd &  &  &  &  &  & fu\\      & \vertexlabel^{q'}fdA &  &  &  & fuA\vertexlabel^{l}\\      & gv & fd & g\vertexlabel^{W^{\pm}}g & fu\\      & gv & fu &  & fd\\      & \vertexlabel^{\bar{q}}fuV &  &  &  & fdV\vertexlabel^{\nu}\\     fu &  &  &  &  &  & fd     }


title: pgfplots with nonlinearly scaled color maps

text: This here is a question which came on the pgfplots mailing list; I answer it here since this allows an answer of higher quality. * * * I have a picture that uses a diverging color map. In this case, minimum and maximum don’t have the same absolute value (but -0.2 and +0.5 instead) I want to be able to do a "centered color map", where “0” is the middle color, all points >0 use the upper half of the map, and all <0 the lower half. The color bar should be skewed according to the real values (i.e. the lower half of the map should take up 2/7 of the bar,a nd the upper half the remaining 5/7)               \documentclass{standalone}     \usepackage{pgfplots}     \pgfplotsset{compat=1.9}                \begin{document}     \begin{tikzpicture}          \begin{axis}[         enlargelimits=false,         % I want the color to be distributed in a nonlinear way, not like this         % I want the tick labels to reflect the centered colorbar         colorbar,     ]         \addplot[line width=3pt,mesh,domain=-0.2:0.5] {x};     \end{axis}     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/RSwhy.png) maybe a point meta center=[auto,] key, with auto meaning a calculated value of (point meta max + point meta min) ÷ 2


title: Babelbib: combine bababbrv-lf and babunsrt-lf

text: I am using babelbib in order to generate my bibliography. However, it won't satisfy all my needs. I just want the entrys to be formatted like > [1] Knuth, D. and Torvalds, L.: We didn't write anything together etc. > > [2] Abraham, A. and Barbara, B.: Our entry is not at the first place So it has to fulfill:   * Order items as they appear within the text (and use numbers)   * Abbreviate names   * Names must all be in the order of "lastname, firstname" I was using either               \bibliographystyle{bababbrv-lf}          \bibliographystyle{babunsrt-lf}      Each one only achieves 2 of the 3 points above. How can I get the whole thing to work? Below, you see a minimal working example, compiled with               pdflatex mwe.tex     bibtex mwe     pdflatex mwe.tex     pdflatex mwe.tex     pdflatex mwe.tex      ## mwe.tex * * *               \documentclass[a4paper]{scrbook}          \usepackage[ngerman]{babel}     \usepackage{babelbib}          \begin{document}         \chapter{One}         Once, Lastname1 Firstname1 wrote a story~\cite{randomGuyStory}. And so did Derpina Derp~\cite{randomDerpinaStory}.         \backmatter         \bibliographystyle{babunsrt-lf}     %    \bibliographystyle{bababbrv-lf}         \bibliography{mwebib}     \end{document}      ## mwebib.bib * * *               @article{randomDerpinaStory,       title={The Story of tl;dr},       author={Derp, Derpina and Herp, Herpington},       journal={Journal of Sunday-workers},       volume={284},       number={46},       pages={31548--31554},     }     @MASTERSTHESIS{randomGuyStory,         author = {Lastname1, Firstname1 and Lastname2, Firstname2 and Lastname3, Firstname3},         title = {Cool Story Bro},         school = {Random University},         year = {2012}     }


title: The simplest way to input π in text mode (textual)?

text: What is the simplest way to input π in text mode if there is only this one greek letter in the whole English text? May be there is one line of code can make it. The following excellent example is suggested by Manuel:               %%xelatex     \documentclass{article}     \usepackage{fontspec}\setmainfont{Linux Libertine O}     \begin{document}     this is letter π     \end{document}


title: How to format CE/BCE?

text: Yes, there is the `abbrevs` package. It provides me with AM, PM, BC and AD. But what would be a sensible way to format the "Common Era" / "Before Common Era" prefixes / suffixes?


title: 3d graphics/diagrams

text: Is there a convenient way to create a 3d graphic/diagram like the following in LaTeX (e.g. with tikz)? I'm aware that convenience is a point of view, however I would describe myself as a newbie to tikz. ![flow of energy](http://i.stack.imgur.com/cEkqx.png)


title: Sane spacing after min max

text: The default definitions of `\min` and `\max` insert basically no space after them, which looks really awful when stating optimisation problems, etc., in display equations. I could not figure out any way automatically insert space after them? The following, for one, did not work:               \renewcommand{\min}{\expandafter\,\operatorname*{min}}      The space still came before min. Is there a way that still causes super- and subscripts to be parsed correctly? **Addition:** What I basically want is               \min_u\, G(u) + F(Ku)      in a display equation, without having to enter \, manually. A more complete statement, giving a better idea of the type of expressions, would be               \min_{u \in X}\, G(u)+F(Ku) \quad\text{subject to}\quad Au=b.      You really want that extra space there, but it would be nice not have to enter it manually.


title: Geometric markings in the text for line segments and angles

text: I am looking for commands that puts marks for line segments, angles, and other geometrical entities around letters in a text. Many geometry books use a line segment with dots at the end and place it over two letters to indicate a particular line segment. Same for an arc between two points on a circle. Plain LaTeX does not allow for this. A package must be downloaded. Please give me these commands and the commands for the symbols for angles, triangle, and parallel lines.


title: Sideways Table not created - Missing number, treated as zero

text: \documentclass[twoside,11pt]{article}     \usepackage[english]{babel}     \usepackage[hang]{caption2}     \usepackage{enumitem}     \usepackage{graphics}     \usepackage{psboxit}     \usepackage{amsmath}     \usepackage{multirow}     \usepackage{fancyhdr}     \usepackage{color}     \usepackage{colortbl}     \usepackage{colortab}     \usepackage[T1]{fontenc}     \usepackage{rotating}     \renewcommand{\textwidth}{135mm}     \renewcommand{\textheight}{195mm}     \pagestyle{fancy}     \fancyhead{}          \begin{document}          \begin{sidewaystable}     \begin{tabular}{ccc}     11 & 12 & 13 \\     21 & 22 & 23 \\     31 & 32 & 33 \\     \end{tabular}     \end{sidewaystable}          \end{document}      errors:               line 23: ! Missing number, treated as zero. <to be read again> \let \begin     line 23: ! Illegal unit of measure (pt inserted). <to be read again> \let \begin


title: Draw sphere with some portion is dotted

text: I need to draw the following figure : ![enter image description here](http://i.stack.imgur.com/GS9AD.jpg) I have used the following code to get it :               \documentclass{article}     \usepackage{tikz}          \begin{document}     \begin{tikzpicture}     \draw (2,2) circle (3cm);     \draw (2,2) ellipse (3cm and 1cm);     \end{tikzpicture}     \end{document}          which produces : ![enter image description here](http://i.stack.imgur.com/rdsjN.png) How can I draw my desired figure using tikzpicture ? Is there any way to draw an arbitrary curve with some portion of it is dotted?


title: Arrow in chemical reaction

text: I want to write these equations: ![enter image description here](http://i.stack.imgur.com/I3eGm.png) I used this code:               \documentclass[12pt,twoside,a4paper,openright]{report}     \usepackage{color}     \usepackage[portuguese]{babel}     \usepackage[utf8]{inputenc}     \usepackage[lmargin=3.0cm,rmargin=2.0cm,tmargin=2.0cm,bmargin=2.0cm, includefoot, includehead]{geometry}     \usepackage{graphicx}     \usepackage{chemformula}     \usepackage{chemfig}     \usepackage{chemmacros}          \begin{document}          \begin{reactions*}     "(1)"  && CaCO3  &-> CaO + CO2 && "{\small Calcinação}" \\     "(2)"  && CaO + H2O &-> Ca(OH)2  && "{\small Hidratação}" \\     "(3)" && Ca(OH)2 +  CO2 &-> !((PCC)) (CaCO3) + H2O && "{\small Precipitação}"     \end{reactions*}          \end{document}      Is it possible put arrows?


title: How to add synctex feature in my custom tex editor and pdf viewer(okular or evince)?

text: I have created a custom tex editor using html and php.I need to add synctex feature in my editor and pdf viewer.Am using okular and evince as pdf viewer.In pdflatex command am adding --synctex=-1 command to create that feature but I dont know how to add synctex in pdf viewer.Due to synctex command synctex.gz.zip files are generated but how to get forward and inverse search in both custom editor and pdf viewer.just I need step by step ans. And also the issue is,its my own tex editor,so how to let pdf viewer to know that its custom editor. Thanks for reading!


title: applying math formatting to a non-math font

text: This post summarizes a digression that began in comments to a different post with User JFBU. The basic question here is what commands are needed to get the full character- set of a non-math font (in this case, TeX Gyre Termes) to be accessible in math mode, for the sake of the diverse formatting that is possible in math mode. I would like to open this question to the TeX.SE community now.


title: Use common latex quotes with csquote in french mode and keeping specific highlight in SublimeText

text: I'm using Sublime Text3 with Latexing, and i search to know if it's possible to replace automatically during compilation the regular quote for latex `''mytext""` by `\enquote{}` That seems silly but, a) if i want to display french quotes, and not english quote "", i need to use csquote. b) If i use csquote i need to to write `\enquote{}` and in consequence, **i lost the pretty highlighting** for this specific syntax `''mytext""` So i search to keep the pretty highlight with csquotes package in french mode, do you think it's possible ?


title: Reduce spacing in bibliography using biblatex

text: How can you control (in my case reduce) the spacing of the bibliography in biblatex? I used to use               \begin{spacing}{0.9}     \bibliographystyle{plain}     \bibliography{refs}     \end{spacing}      and `\setlength{\bibsep}{0.0pt}`. But how do you do the equivalent in biblatex? EDIT: I should maybe have mentioned I am using               \begin{refsection}          \printbibliography[heading=subbibliography]          \end{refsection}          [..]               \begin{refsection}      to get multiple bibliographies and I would like to be able to control the spacing per bib.               \printbibliography[heading=subbibliography]          \end{refsection}


title: How can I get the actual relative path using \import and \subimport?

text: I have structured my PDFLaTeX document in folders. Inside them there are `.tex` files, `.PDF` figure files. And all works using `\import` and `\subimport` commands from the `Import` package:               Main/      |-- main.tex      |-- work.svg      |-- Chapter1/             |-- body.tex           |-- notwork.svg           |-- figure.PDF           |-- figure.SVG      So in `main.tex`:               ...     \import{Chapter1/}{body.tex} %% OK     ...       In `body.tex`:               ...     \includegraphics{figure.PDF} %% OK (so relative path is working)     ...      Now, I'd like to use SVG figures and InkScape and automate the process as explained in: http://www.tex.ac.uk/tex-archive/info/svg-inkscape/InkscapePDFLaTeX.pdf It uses `\pdffilemoddate` command in `\executeiffilenewer` called by `\includesvg`. If I change in `body.tex`:               ...     \includesvg{figure}     ...      then `\executeiffilenewer` macro doesn't invoke InkScape because `\pdffilemoddate` can't find the file (if `figure.SVG` and `figure.PDF` are located in Main folder it works so it's a problem with the file path). How can I handle this? I think I need to access the actual path constructed by `\import` to modify `\executeiffilenewer`, but I don't know how. # Working Example You need 2 aditional SVG files (`work.SVG` and `notwork.SVG` located as in the tree above) File `Main.TeX`               \documentclass[10pt]{minimal}          \usepackage{import}     \usepackage[pdftex]{graphicx}          \newcommand{\executeiffilenewer}[3]{       \ifnum\pdfstrcmp         {\pdffilemoddate{#1}}         {\pdffilemoddate{#2}}         >0         {\immediate\write18{#3}}       \fi%     }          \newcommand{\includesvg}[1]{       \executeiffilenewer{#1.svg}{#1.pdf}         {inkscape -z -D --file=#1.svg --export-pdf=#1.pdf --export-latex --export-area-drawing}       \import{}{#1.pdf_tex}     }          %% This is a not working try     \newcommand{\includepathsvg}[2]{       \executeiffilenewer{#1#2.svg}{#1#2.pdf}         {inkscape -z -D --file=#2.svg --export-pdf=#2.pdf --export-latex --export-area-drawing}       \import{#1}{#2.pdf_tex}     }          \begin{document}          %% Delete all PDF figure files in Main and Chapter1 folder and uncomment some lines to test:          %SVG: \includesvg{work}     %SVG: \includesvg{Chapter1/notwork} %% InkScape invoked but notwork.pdf_tex can't find notwork.pdf because unknown relative path     %SVG: \includepathsvg{Chapter1/}{notwork} %% InkScape not invoked becaude \pdffilemoddate can't find notwork.svg          File Body.tex:          \import{Chapter1/}{body.TeX}          \end{document}      File `Body.TeX` in `Chapter1` folder:               %% Delete all PDF figure files in Main and Chapter1 folder and uncomment some lines to test:          %SVG: \includesvg{Chapter1/notwork} %% WORKS but I have to include the relative path      %SVG: \includesvg{notwork} %% InkScape not invoked becaude \pdffilemoddate can't find notwork.svg     %SVG: \includepathsvg{Chapter1/}{notwork} %% Problem with path: Chapter1/notwork.svg when invoking InkScape


title: Should \tikzset or \tikzstyle be used to define TikZ styles?

text: The PGF/TikZ manual states in section 12.4 _Using Graphic Options_ , page 120 (v2.10), that TikZ styles can be set using:               \tikzset{my style/.style={<tikz options>},...}      However, in several places in the same manual the otherwise undocumented macro `\tikzstyle` is used for settings styles:               \tikzstyle{my style}=[<tikz options>]      I also have seen this usage in several online code examples. Why are there two ways to set TikZ styles and which one should be used for new code? Note: I actually know the answer but think that such a question with good answers would be beneficial for other users.


title: how to avoid drawing of graph through inset

text: I have a figure which requires an inset. Using pdfplots i am nearly there but have the main graph plotting through the inset. ![mainandinset](http://i.stack.imgur.com/eBnuj.png) How can i avoid the drawing through the inset? Also is it possible to move the x/y-labels of the inset closer to their respective axes? A copy of the code:               \documentclass{standalone}          % Setting graphing environment     \usepackage{pgfplots}     \pgfplotsset{compat=newest}      \pgfplotsset{plot coordinates/math parser=false}          \begin{document}          % declare inset:     \newsavebox\inset          \begin{tikzpicture} []              % declare constants:         \pgfmathsetmacro\omega{1}              % declare equations:         \pgfmathdeclarefunction{rho}{2}{\pgfmathparse{% density             sin(deg(2*pi*#1))*cos(deg(2*pi*#2))*exp(-\omega*#2)}}              % make plot for inset:         \savebox\inset{             \begin{axis} [ tiny,                  domain=0:2, samples=50,                 xmin=0, xmax=2, ymin=-1, ymax=1, no markers,                 xlabel=dimensionless time\, /\, $\theta$,                 ylabel=peak density\, /\, $\rho$,             ]             \addplot [] {rho(0.25,x)};             \end{axis}         }              \begin{axis} [             domain=0:1, samples=50,             xmin=0, xmax=1, ymin=-1, ymax=1, no markers,             xlabel=dimensionless coordinate\, /\, $x$,             ylabel=dimensionless density\, /\, $\rho$,             clip=false         ]             \addplot [] {rho(x,0)} [yshift=-6pt] node [pos=0.25] {\footnotesize $0$};             \addplot [] {rho(x,0.5)} [yshift=-6pt] node [pos=0.25] {\footnotesize $0.5$};             \addplot [] {rho(x,1)} [yshift=-6pt] node [pos=0.25] {\footnotesize $1$};             \addplot [] {rho(x,1.5)} [yshift=-6pt] node [pos=0.25] {\footnotesize $1.5$};             \addplot [] {rho(x,2)} [yshift=-6pt] node [pos=0.25] {\footnotesize $2$};             \addplot [] {rho(x,2.5)} [yshift=-6pt] node [pos=0.25] {\footnotesize $2.5$};              \end{axis}              \node [anchor=north east] at (4.3,3.7) {\usebox\inset};          \end{tikzpicture}


title: quick build in latex

text: I am using TexStudio for writing a thesis in latex. In order to access the chapters easier, I have made a separate folder for each chapter and ultimately, I have included all the tex files in the main Thesis.tex. When I want to built the pdf file, if I am on the main tex file which is called thesis.tex everything is fine; then I need to scroll down to reach a particular chapter. When I am on another tex file, say, chapter2.tex and try to quick build, it gives error on my macbook while on my iMac it is fine. The only reason I need to compile on each of the files is that I need the to instantly view to the same place I just edited instead of scrolling all the way down. I would appreciate your help.


title: How to bend a TikZ node

text: Consider the MWE below that outputs the following arrow ![enter image description here](http://i.stack.imgur.com/2oEV2.png) Is it possible to bend such a node so it looks like ![enter image description here](http://i.stack.imgur.com/Xu8Dr.png) (sorry for the quality, I'm not a photoshop artist). If possible I would like the font readable and just create an arrow that bends to the right. Do you know if there is any way?               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{shapes.arrows}     \tikzstyle{arrownode}       = [ shape=single arrow         , single arrow head extend=.75em         , single arrow head indent=.25em         , minimum width=3em         , draw         , font=\sc         ]     \begin{document}         \begin{tikzpicture}             \node[arrownode] at (0,0) {foobar};         \end{tikzpicture}     \end{document}


title: Biblatex custom cite macro

text: I don't really understand how to use macros, but this would be a good way to learn. Currently, I simply use `\cite`, which prints Author, Year. When I have this in a sentence, I want the year to be in brackets, so it looks like Author (Year), I can do this manually with               \citeauthor{author} (\citeyear{author}), conducted a detailed study on different methods of...      But this would be a drag to type out every time. How would I create a macro such as `\citeintext{author}` that would do all that for me?


title: How to use Eastern Armenian month names instead of Western Armenian?

text: When using for example the `datetime` package and printing month names, LaTeX uses Western Armenian month names:   * Յունուար   * Փետրուար   * Մարտ   * Ապրիլ   * Մայիս   * Յունիս   * Յուլիս   * Օգոստոս   * Սեպտեմբեր   * Հոկտեմբեր   * Նոյեմբեր   * Դեկտեմբեր Example code:               \documentclass{article}     \usepackage{polyglossia}     \setmainlanguage{armenian}     \newfontfamily{\armenianfont}{DejaVu Sans}          \usepackage{datetime}          \title{Վերնագիր}     \author{Անուն}     \date{\today, \currenttime}          \begin{document}          \maketitle          \end{document}      How can I change these names to Eastern Armenian instead?   * Հունվար   * Փետրվար   * Մարտ   * Ապրիլ   * Մայիս   * Հունիս   * Հուլիս   * Օգոստոս   * Սեպտեմբեր   * Հոկտեմբեր   * Նոյեմբեր   * Դեկտեմբեր


title: MacOS X: insert hyperlink to local file (complete path) in LaTeX? (only working with relative path)

text: I want to add hyperlinks to external pdfs (which are saved in the local file system) and to specific pages of these pdfs to a LaTeX document on MacOS X and opening them with Skim.app (default). My problem is: it works, if the pdf is in the same path as the latex document and I use a `\href{./filename.pdf}` (However, the `[page=2]` option does not work then.) **But** if I try to use an asolute path like `\href{/Users/myaccount/folder/test.pdf}` or `{/Volumes/Data/folder/folder/test.pdf}`, a click on the link in the pdf created by LaTeX does not open the linked file. I also tried to use "`file:///Volumes/..`" and "`run:///volumes..`", but it does not work. However, I can successfully open a link like "`file:///Volumes/Data/Folder/file.pdf`" in Safari! How can I fix that? I'm using TeXLive 2010 on OS X 10.6.5 and `pdflatex` for compiling. minimal example:               \documentclass[11pt]{scrreprt}          \usepackage{hyperref}     \hypersetup{bookmarksopenlevel={2}, bookmarksopen = true,      colorlinks= false, linkbordercolor = 0 1 0.5, urlbordercolor = 0 0 1     }          \begin{document}               that works, but it opens on page 1 and not on page 3     \href[page=3]{run://test.pdf}{relative path}          that does not work:     \href[]{/Volumes/Daten/test.pdf}{absolute path}               \end{document}


title: How to draw a hierarchical structure with edges?

text: I would like to show such a structure in my LaTeX document. How can this be done? ![enter image description here](http://i.stack.imgur.com/mlAQ2.jpg)


title: xy-pic or tikz : which one should I learn?

text: I want to learn how to use tikz more in depth. But I wonder wether I should also learn how to use xy-pic, because it seems, at first glance, that xy-pic can do much of what tikz does when it comes to drawing (commutative) diagrams, and is shorter to write. I have two questions :   1. Wether I would gain something from learning both, or wether I could learn "only" tikz and in time achieve the same efficiency as with xy-pic in drawing large commutative diagrams?   2. Wether it is common to know both and, maybe, use xy-pic for commutative diagrams, and tikz for more involved drawings, or wether people who are familiar with tikz feel xy-pic is made redundant? Or am I underestimating the power of xy-pic?


title: Prepend and append options to options list in environment

text: I need to define a macro `superenv` that expands to the usage of an environment which accepts key-value options. `superenv` should have three arguments: the environment name, the list of options, and the body to be typeset as the environment contents. It should be possible to have some options defined in macros to be appended and prepended to the options passed as the second argument to `superenv`. The following document tries to implement this scheme, but it does not work yet.               \documentclass{article}          \usepackage{tcolorbox}     \usepackage{mdframed}     \usepackage{lipsum}          \makeatletter          \newcommand\superenv[3]{%       \begin{#1}[\ifcsname OPT@BEFORE@#1\endcsname                    \csname OPT@BEFORE@#1\endcsname,%                  \fi                  #2%                  \ifcsname OPT@AFTER@#1\endcsname                    ,\csname OPT@AFTER@#1\endcsname                  \fi                 ]%         #3%       \end{#1}%     }          \newcommand\OPT@BEFORE@tcolorbox{colframe=red,title=This is a test}          \makeatother          \begin{document}          \lipsum[1]          \superenv{tcolorbox}{colback=yellow!20}{\lipsum[2]}          \superenv{mdframed}{backgroundcolor=green!20}{\lipsum[3]}          \lipsum[4]          \end{document}      I think some `\expandafter` machinery should be used to make it work, and I need help with that.


title: Alignment of axis in tikz

text: Hello I have a Problem with the alignment of the y-axis in TikZ! The y-axis of the last plot isn't aligned to the other two plots! trim axis left doesn't work! Can somebody help me? Thanks!               \documentclass[svgnames,a4paper,ngerman,fontsize=12pt]{scrreprt}     \usepackage{tikz}     \usetikzlibrary{arrows}     \usepackage{pgfplots}          \begin{document}     \begin{figure}[!h]\centering          \begin{tikzpicture}[xscale=8,yscale=5]     \draw [->, thick] (0,0) -- (0,0.5)node[left]{$U,I$};     \draw [->, thick] (0,0) -- (1.1,0)node[below]{$t$};      \draw [blue, ultra thick, rounded corners] (0,0.3)--(0.1,0.3)--(0.15,0.22)--(0.2,0.22)--(0.22,0.02)--(0.8,0.02)--(0.85,0.4)--(0.88,0.3)--(1,0.3)node[above,blue]{$u(t)$};     \draw [red, ultra thick, rounded corners] (0,0)--(0.1,0)--(0.18,0.4)--(0.2,0.3)--(0.83,0.3)--(0.85,0.0)--(1,0.0)node[above,red]{$i(t)$};     \end{tikzpicture}          \begin{tikzpicture}[xscale=8,yscale=5]     \draw [->, thick] (0,0) -- (0,0.5)node[left]{$P$};     \draw [->, thick] (0,0) -- (1.1,0)node[below]{$t$};      \draw [orange, ultra thick, rounded corners] (0,0)--(0.1,0)--(0.15,0.4)--(0.22,0.05)--(0.8,0.05)--(0.85,0.3)--(0.9,0.0)--(1.0,0.0);      \end{tikzpicture}     \begin{tikzpicture}[xscale=8,yscale=5]     \draw [->, thick] (0,0) -- (0,0.5)node[left]{$E$};     \draw [->, thick] (0,0) -- (1.1,0)node[below]{$t$};      \draw[purple, ultra thick, rounded corners]     (0,0)--(0.1,0)--(0.2,0.2)--(0.8,0.3)--(0.9,0.4)--(1,0.4);     \draw[thick](0.1,-0.01)--(0.1,0.01);     \draw[thick](0.2,-0.01)--(0.2,0.01);     \draw (0.15,0)node[below]{$E_{on}$};     \draw[thick](0.8,-0.01)--(0.8,0.01);     \draw[thick](0.9,-0.01)--(0.9,0.01);     \draw (0.85,0)node[below]{$E_{off}$};     \draw[decorate,thick,decoration={brace, mirror}] (0.2,-0.01)--node[below]{xxx}(0.8,-0.01) ;      \end{tikzpicture}     \caption{Plot}\label{fig:PvIGBT}     \end{figure}     \end{document}


title: Tikz and directed graph

text: I'm a TikZ newbie, what is the best package (and technique) that can be used to quickly (and easily) build a drawing of a directed graph like this one (picture from M. Sipser's book)?   In particular what is the best way to draw the (aligned) dots in the middle of the drawing (add "..." text and place it at absolute position)? And what about the halved arcs?   And does there exist a graphical Tikz GUI tool powerful enough to achieve the same result? ![enter image description here](http://i.stack.imgur.com/zc4Rf.png)


title: qtree items do not have the same baseline

text: I drew a tree with the `qtree` package. However, this tree has no consistent baseline. **Screenshot:** ![enter image description here](http://i.stack.imgur.com/ukgdl.png) **MWE:**               \documentclass{scrreprt}     \usepackage{qtree}     \begin{document}            \Tree[.table               [.thead                 [.tr                   [.th [.\textit{Vorname} ] ]                  [.th [.\textit{Nachname} ] ]                ]              ]                            [.tbody                 [.tr                   [.td [.\textit{Donald} ] ]                  [.td [.\textit{Duck} ] ]                ]              ]            ]          \end{document}      How do I get a consistent baseline?


title: How to use alsolanguage in \listings package?

text: I defined keywords for the JavaScript programming language and HTML. I have read that it is possible to use the keywords of both languages in a `\listings` code snippet. But in my example, the JavaScript keywords are not shown in blue. ![enter image description here](http://i.stack.imgur.com/bHRsl.png) Here is my code example. Is my use of `alsolanguage` incorrect? Code:               \documentclass{scrreprt}     \usepackage{color}     \usepackage{upquote}     \usepackage{listings}     \makeatletter     \lstdefinelanguage{JavaScript}{       keywords={var, function}     }          \lstdefinelanguage{HTML5}{         language=HTML,         sensitive=true,         tagstyle=\color{blue}\bfseries,         usekeywordsintag=true     }          \lstset{%         % Basic design         basicstyle={\small\ttfamily},         % Code design            keywordstyle=\color{blue}\bfseries,         % Code         language=HTML5,         tabsize=2,         showtabs=false,         showspaces=false,         showstringspaces=false,         extendedchars=true,         breaklines=true     }     \makeatother     \begin{document}         \begin{lstlisting}[language=HTML5,alsolanguage=JavaScript]     <!DOCTYPE html>     <html>       <head>         <title>Canvas-Rotation</title>         <meta charset="UTF-8" />       </head>       <body>         <canvas id="square" width="200" height="200"></canvas>         <script>                 var canvas = document.createElement('canvas');                 canvas.width = 200;                 canvas.height = 200;                      var image = new Image();                 image.src = 'images/card.png';                 image.width = 114;                 image.height = 158;                 image.onload = window.setInterval(function() {                     rotation();                 }, 1000/60);        </script>       </body>     </html>         \end{lstlisting}     \end{document}


title: Inputenc: utf8 characters in cross-references

text: I am using the hack given here as accepted solution to refer to a description list item by name instead of number. It works nicely, except when one of the words in the name ends with a non-ascii character, in which case it kills the space after it (only in the reference). Why is that? Is there a way to modify the hack that avoids this problem? I am using pdflatex with hyperref and inputenc. A MWE:               \documentclass[a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage{hyperref}       \makeatletter       \let\orgdescriptionlabel\descriptionlabel       \renewcommand*{\descriptionlabel}[1]{%         \let\orglabel\label         \let\label\@gobble         \phantomsection         \edef\@currentlabel{#1}%         \let\label\orglabel         \orgdescriptionlabel{#1}%       }       \makeatother     \begin{document}       \begin{description}         \item[Arzelà and Volterra\label{av}] Reference: \ref{av}.         \item[Arzel{à} and Volterra\label{av2}] Reference: \ref{av2}.         \item[Arzel\`a and Volterra\label{av3}] Reference: \ref{av3}.       \end{description}     \end{document}      An even worse problem arises with ß, which I don't need (try Weierstraß and Kummer).


title: Changing the style of the first *typeset* line of a paragraph

text: I've been playing around with dropcaps in LaTeX (with the yfonts and lettrine packages), and one typographical effect you often see after dropcaps is having the entire first line of the paragraph typeset in small caps. It's clear how to get this effect by trial and error--run LaTeX, see what's on the first line, `\textsc` that, rerun LaTeX, see what's moved, and re-`\textsc` the appropriate text--but that's a royal pain, and it's too easy to forget to do. **Is there a good way to get (La)TeX to detect the location of linebreaks in its typeset output?** I presume I'd have to run LaTeX at least twice, since things could change mid-processing, but such is life with LaTeX. * * * **Edit 1:** I need this to work for math-mode (`$...$`) code as well—from the solutions so far suggested, this is not necessarily non-trivial.


title: Difference between \textwidth, \linewidth and \hsize

text: The three lengths `\textwidth`, `\linewidth` and `\hsize` seem to all hold the width of the current line. At least I never saw some real difference between `\textwidth` and `\linewidth` in my code. Both seem to be identical even when changed, e.g. by a `minipage` environment. Could someone give me an elaborate explanation of the differences between these lengths? I like to understand them in detail. I know that the first two are from LaTeX and the latter one from plainTeX. There is also `\columnwidth` which seems to be identical to `\linewidth` or `\textwidth` in one-column mode, right? Except when the line is reduced by a `minipage` or `quote` etc. environment. (Herbert gave me some explanation about the first two lengths a while ago in a comment thread of us, but I thought it's better as a question.)


title: Using xetex, I'd like to set the monospace font size for my entire text

text: I set my monospace font using `\setmonofont`. I'd like to be able to change the size of this font for my entire document, rather than use \fontsize everywhere. How can I do that?


title: ltablex + \caption[]{...} = error or bug?

text: I'm writing my thesis with the document class scrbook from koma-script and want to use the package ltablex (= longtable + tabularx) for setting long tables with automatic page break calculation. Now, I'm struggling with two problems:   1. Why is the caption a bit longer than `\linewidth` (please see minimal document below)?   2. Why do I get an latex error when I use `\caption[short]{long caption}` with ltxtable? Thank you very much for your help in advance!               % Please find below a minimal latex document, that shows the problem     %     \RequirePackage[l2tabu,orthodox]{nag}     \documentclass[pagesize=pdftex,ngerman,english,paper=a5,fontsize=10pt,%                    DIV=calc,BCOR=4mm,twoside,headinclude,footinclude,open=right,%                    parskip=half,numbers=noenddot,headings=small]{scrbook}          % Geometry     \usepackage[showframe]{geometry} % showframes for debugging reasons          % Input and font encoding, Babel     \usepackage{cmap}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[ngerman,english]{babel}     \usepackage{lmodern,textcomp}          % Tables     \usepackage[NewCommands]{ragged2e}     \usepackage{array}     \usepackage{tabularx,longtable,ltablex}     \usepackage{booktabs}          % Misc. packages     \usepackage[pdftex,final]{graphicx}     \usepackage{amsmath,bm}     \usepackage[babel,final]{microtype}     \usepackage{fixltx2e,ellipsis}     \usepackage{subfigure}     \usepackage{acronym}          % Hyperref     \usepackage[pdftex=true,pdfpagemode=UseNone,pdfpagelayout=TwoPageRight,%                 pdfcenterwindow=true,pdffitwindow=true,colorlinks=true]{hyperref}          % Note: Not all of the above packages are used in this minimal example. They     %       are included for debug reasosn, because they are used in the final     %       document.          % ----------------------------------------------------------------------------          \begin{document}     %\listoftables          \chapter{First Chapter}     \begin{tabularx}{\linewidth}{XXXX}          %This is the caption of the table...     \caption{Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.} \\ % This works.          %\caption[Lorem ipsum]{Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.} \\ % This doesn't works!               %This is the header for the first page of the table...       \toprule       \textbf{A} & \textbf{B} & \textbf{C} & \textbf{D} \\       \midrule     \endfirsthead          %This is the header for the remaining page(s) of the table...       \multicolumn{4}{l}{{\tablename} \thetable{}: \ldots Continued from previous page} \\       \toprule       \textbf{A} & \textbf{B} & \textbf{C} & \textbf{D} \\       \midrule     \endhead          %This is the footer for all pages except the last page of the table...       \midrule       \multicolumn{4}{r}{Continued on next page\ldots} \\       \midrule     \endfoot          %This is the footer for the last page of the table...       \bottomrule     \endlastfoot          %Now the data...     1 & 2 & 3 & 4 \\     1 & 2 & 3 & 4 \\     1 & 2 & 3 & 4 \\     1 & 2 & 3 & 4 \\     1 & 2 & 3 & 4 \\     1 & 2 & 3 & 4 \\     1 & 2 & 3 & 4 \\     1 & 2 & 3 & 4 \\     1 & 2 & 3 & 4 \\     1 & 2 & 3 & 4 \\     1 & 2 & 3 & 4 \\     1 & 2 & 3 & 4 \\     1 & 2 & 3 & 4 \\     1 & 2 & 3 & 4 \\     1 & 2 & 3 & 4 \\     1 & 2 & 3 & 4 \\     1 & 2 & 3 & 4 \\     1 & 2 & 3 & 4 \\     1 & 2 & 3 & 4 \\     1 & 2 & 3 & 4 \\     1 & 2 & 3 & 4 \\     1 & 2 & 3 & 4 \\     1 & 2 & 3 & 4 \\     1 & 2 & 3 & 4 \\     1 & 2 & 3 & 4 \\     \end{tabularx}          \end{document}


title: How to check image exists or not?

text: I'm working on Sweave and using `includegraphics` for include image in report dynamically. Pseudocode:                <<>          for ( i to 100)   # run loop 1 to 100          {               includegraphics(image.i)    # include image in article.          }      @      In the above code I am adding 100 images using loop but I need to check that `image.i` exists or not first before including the image in report. Is there any way to check it first.


title: From what files are the .fmt files generated?

text: I am trying to dig into the inner workings of LaTeX and to see where basic macros such as `\{` are defined. `texdef` gives nothing useful (saying that it is defined by LaTeX) and the .fmt files, being binary files, are obviously generated from something. How are the .fmt files generated, and where can I get the files from which they are made?


title: Adding raster images to a document increases the output size unproportionally

text: I have a document which under normal conditions compiles into a reasonably- sized output - 1 MB PDF and 2 MB PS. I need to add two raster images, also reasonably-sized - About 150 KB JPG each. I tried the simple approach, and converted the images to PDF and PS. The graphical results are excellent, but the output grew in size to 2 MB PDF and 8 MB PS (!). What is the best strategy for converting and including these images in the document, that will not blow up the size of the output significantly? Ideally, I prefer to have both a DVI->PS output and PDF output, but only the PDF is a must.


title: Designing packet structure of a protocol

text: I'm writing a small manual for our self-developed protocol. To show the packet structure we like to include a table like it's shown on this Wikipedia page: http://en.wikipedia.org/wiki/User_Datagram_Protocol#Packet_structure Is there any prebuilt library for this purpose or should it be implemented by myself?


title: Reduce linespread between \item globally

text: Because of a page limit for a report, I would like to decrease the linespread between individual `\item`s. I know this is generally not a good idea, but I really need the space. How can I achieve this globally, say, with a couple of lines of code in the preamble?


title: no items shown bibliography beamer

text: Hi I'm quite new to beamer class, I'm trying to add a bibliography at the end of my presentation, latex compiles it without any errors, the reference slides is created but without any items shown in it. here is my codes:               \documentclass{beamer}     \usepackage[english,italian]{babel}     \usepackage[utf8x]{inputenc}     \usepackage{lmodern}     \usepackage{color}     \usepackage{url}     \usepackage{attrib}     \newcommand{\virgolette}[1]{``#1''}          \begin{filecontents}{\jobname.bib}     @article{Baird2002,     author = {Baird, Kevin M and Hoffmann, Errol R and Drury, Colin G},     journal = {Applied ergonomics},     month = jan,     number = {1},     pages = {9--14},     title = {{The effects of probe length on Fitts' law.}},     volume = {33},     year = {2002}     }     \end{filecontents}     \bibliographystyle{apalike}     \setbeamertemplate{frametitle continuation}[from second]     \setbeamercolor*{bibliography entry title}{fg=black}     \setbeamercolor*{bibliography entry author}{fg=black}     \setbeamercolor*{bibliography entry location}{fg=black}     \setbeamercolor*{bibliography entry note}{fg=black}     \setbeamertemplate{bibliography item}{}               \mode<presentation>          \definecolor{Dblue}{cmyk}{0.67,0.363,0,0.643}     \definecolor{Lblue}{cmyk}{0.23,0.10,0,0.043}     \setbeamercolor{section in head/foot}{fg=black,bg=Lblue}     \setbeamercolor{title}{bg=Dblue, fg=white}     \setbeamercolor{frametitle}{bg=Dblue, fg=white}     \setbeamercolor{upper separation line head}{bg=white, fg=white}     \setbeamertemplate{navigation symbols}{}     \setbeamercovered{transparent}          \setbeamertemplate{headline}     {     \begin{beamercolorbox}[colsep=0.5pt,ht=.3ex]{upper separation line head}      \end{beamercolorbox}     \hspace{3.8cm}     \begin{beamercolorbox}[wd=9cm]{section in head/foot}     \vskip2pt\insertnavigation{9cm}\vskip2pt     \end{beamercolorbox}     \begin{beamercolorbox}[colsep=0.5pt,ht=.3ex]{upper separation line head}       \end{beamercolorbox}     }     \setbeamertemplate{footline}     {     \begin{beamercolorbox}[wd=0.5\paperwidth ,ht=2.25ex,dp=1ex]{section in head/foot}       \hspace{10pt}\insertframenumber \hspace{10pt} \textbf{\inserttitle} \insertsubtitle        \end{beamercolorbox}     \begin{beamercolorbox}[colsep=0.5pt,ht=.3ex]{upper separation line head}      \end{beamercolorbox}     }              \setbeamertemplate{title page}[default][colsep=0pt]               \begin{document}     \begin{frame}[t,allowframebreaks]     \frametitle{References}     \bibliography{\jobname}     \end{frame}     \end{document}      thanks in advance


title: How can I get rid of indentation after an equation?

text: I'm a total newbie to LaTeX and I get very annoyed about this. Every time I write an equation, the text following the equation has some indentation but I don't want it to be there!               Look at the following formula          \begin{equation}     K_BT_k=Dexp\left\lbrace -\frac{1}{2N(E_F)|J|}\right\rbrace     \end{equation}          where $Dexp$ is a ...      The line starting with "where ..." is indented and looks horrible. Some people told me about `\noindent` but do I really have to write this command after every single equation?


title: Table Caption below the Table

text: I am writing a paper and I would like to have the caption of the table below the table instead I have it on top of it. This is my code:                   \documentclass{article}     % The style file     \usepackage{imav}     % Use the postscript times font!     \usepackage{times}     \usepackage{graphicx}     \usepackage{algorithm}     \usepackage{algorithmic}     \usepackage{wasysym}     \usepackage{epstopdf}          %\numberwithin{algorithm}{chapter}     %\usepackage{algorithmicx}     % the following package is optional:     %\usepackage{latexsym}     \usepackage{bm}     \usepackage{float}     \usepackage{savesym}     \usepackage{subfigure}          \savesymbol{iint}     \savesymbol{iiint}     \usepackage{amsmath}     \usepackage{txfonts}      The table is inserted in this way:               \begin{table}     \caption{$c_DA,c_LA$ at wind speed of 9.6 m/s and different pitch angles ($\beta=0\degree$ and $\textbf{T}=0$).}     \label{table:draglift1}     \centering     \begin{tabular}{|c|l|l|}     \hline     \textbf{$\text{Pitch Angle } (\alpha)$}&\multicolumn{2}{c|}{$\mathbf{V_w=9.6\,m/s}$}\\     \hline     $-10\degree$&$c_DA=0.0143$&$c_LA=0.0054$\\     \hline     $0\degree$&$c_DA=0.0142$&$c_LA=0.0017$\\     \hline     $10\degree$&$c_DA=0.0119$&$c_LA=-0.0028$\\     \hline     $20\degree$&$c_DA=0.0139$&$c_LA=0.0018$\\     \hline     $30\degree$&$c_DA=0.0119$&$c_LA=0.0033$\\     \hline     \end{tabular}     \end{table}      Thanks for your help, Fab


title: Can't seem to get TeX working on my Mac

text: So I downloaded and installed BasicTeX, then I went and installed TeXLive with some setup options here. However, nothing seems to be working. A few months ago I tried installing MacTeX but to no luck. Now, at school, with very slow internet, I can't commit the time to try a 1.3GB package again. Anyway, installation seemed to go fine, and all the correct files are there in `/usr/texbin`, but nothing seems to work. I started by typing `\alpha` into a document and saving it as `untitled.tex` TextMate is telling that `TM_LATEX_MASTER` has some problems. TeXShop does nothing but display an error box (with nothing in it). If I try to do it from command-line, aka `$ pdftex untitled.tex` or `$ pdflatex untitled.tex` doesn't seem to do anything. No error messages, no output, nothing. So I'm lost here. This is the second or third time I've attempted to get LaTeX working on my Mac, but nothing will work for me. Any pointers?


title: How to show only current section/subsection in beamer ?

text: I was wondering, if it is possible to **show only the current section** and subsection in the navigation bar ? In the default configuration, the navigationbar uses too much space of the slide. With               \documentclass[compress]{beamer}      the items are squashed together. Here is a minimal example:               % packages     \documentclass[serif,mathserif]{beamer}     \usepackage[utf8x]{inputenc}     \usepackage{amsmath, amsfonts, epsfig, xspace}     \usepackage{beamerthemesplit}          % template     \usetheme{default}     \useoutertheme{default}     \setbeamertemplate{navigation symbols}{}                \begin{document}           \section{section a}         \begin{frame} \frametitle{frame 1} \end{frame}      \section{section b}         \begin{frame} \frametitle{frame 2} \end{frame}      \section{section c}         \begin{frame} \frametitle{frame 3} \end{frame}      \section{section d}         \begin{frame} \frametitle{frame 4} \end{frame}               \end{document}


title: Make Caption of Image longer than Image in Subfloat

text: I have little icons (48x48) and I want to display them using subfloat. To prevent that images from being pixelated I set the width to 1cm. But now the caption has also a length of 1cm and looks terrible. Here is my code:               \documentclass[12pt,a4paper]{scrartcl}     \usepackage{graphicx}     \usepackage{subfloat}     \usepackage{subfig}     \begin{document}         \begin{figure}[!htb]         \centering         \subfloat[Logo]{\includegraphics[width=1cm]{Bilder/icons/logo.png}}         \hspace{1pt}                        \caption{Graphiken der Anwendung}         \label{fig:icons}         \end{figure}     \end{document}      Is there a way to make the caption longer than the 1cm image?


title: bookmarks: diacritics, umlauts and special characters

text: Why are the bookmarks in my pdf documents (created by LuaLaTeX) not correct? E.g., I get `Faá¸«r al-DÄ«n al-RÄ†zÄ«` instead of `Faḫr al-Dīn al-Rāzī`. In general diacritics, umlauts and special characters are not correctly displayed -- in none of my documents. I use (almost without any options):   * hyperref   * csquotes   * babel   * microtype   * xspace   * ellipsis


title: In pst-circ, how do you rotate the op-amp by 90 degrees?

text: In `pst-circ`, how can you rotate the `op-amp` by 90 degrees? For items that have two terminals like resistors and inductors, they rotate automatically. For the 3 terminal `op-amp` I'm having trouble. I'm currently using PCTeX v5 and `pst-circ` v1.2a in WinXP. I tried....               \OA[OAperfect = false]{90}(A1c)(A1a)(A1b)      but that did not work. Also I gave this a shot...               \OA[OAperfect = false,TRot= 90](A1c)(A1a)(A1b)      but I think `TRot` is only for transistors. This is what I have now ![What I get](http://i.stack.imgur.com/PrUdP.jpg) from this code               \documentclass[12pt]{article}     \usepackage{pst-circ}          \begin{document}          \begin{pspicture}(8,12)          \pnode(10,7.75){A1a} \pnode(13,8){A1b} \pnode(10,8.25){A1c}     \pnode(1,4){R7a} \pnode(3,4){R7b}       \pnode(4,4){R8a} \pnode(6,4){R8b}      \pnode(7,4){R9a} \pnode(9,4){R9b}      \pnode(10,4){Ca} \pnode(11,4){Cb}               \resistor[ dipolestyle= zigzag](R7a)(R7b){$R_7$}     \resistor[ dipolestyle= zigzag](R8a)(R8b){$R_8$}     \resistor[ dipolestyle= zigzag](R9a)(R9b){$R_9$}     \capacitor(Ca)(Cb){$C$}     \wire(R7b)(R8a)     \wire(R8b)(R9a)     \wire(R9b)(Ca)     \wire(Cb)(12,4)          \OA[OAperfect = false](A1c)(A1a)(A1b)          \wire(A1b)(13,10)     \wire(13,10)(3.5,10)     \wire(3.5,10)(3.5,4)          \wire(A1c)(6.5,8.25)     \wire(6.5,8.25)(6.5,4)          \wire(A1a)(9.5,7.75)     \wire(9.5,7.75)(9.5,4)               \end{pspicture}               \end{document}      What I would like is this... ![What I want](http://i.stack.imgur.com/u6auE.png) which I made using `circuitikz`


title: Driver-dependent invocations of the graphix package?

text: The LaTeX General Guidelines show a conditional invocation of the `graphicx` package. I wanted to test this out. I did the following:   1. Created a `main.tex` in which I LEFT OUT the big, complicated, conditional header linked above   2. Included a `myplot.pdf` and `myplot.eps` in my working directory.    3. Included a call to `\includegraphics{myplot}` in my `main.tex`.    4. Ran TeXify. `myplot.eps` was plotted as desired.   5. Ran PdfTeXify. `myplot.pdf` was plotted as desired. Q: Considering that my steps above worked perfectly fine, what's the point of the big, complicated, conditional header? Q: Do `pdftex` and `dvips` really need to be passed as options to `\documentclass` and `\usepackage{graphicx}`?


title: How do you do non-numeric book editions in BibTeX?

text: I want to reference the book "An Introduction to Fluid Dynamics" by George Batchelor using BibTeX. The edition I'm using says it is the "First Cambridge Mathematical Library Edition 2000". This is not the first edition of the book, so I want to make the distinction between this version and the first, but I'm not sure what the correct way to input the edition into BibTeX is (it's not just a number like "First").


title: beamerposter subfigure

text: I am making a poster with beamerposter and it is treating all my subfigures as part of a single figure, lettering them (a), (b), ..., (q), even though I very clearly \end{figure} several times, which should reset the count. I want each \begin{figure} ... \end{figure} block to have its own subfigure lettering, starting from (a). I copied the figures over directly from a .tex article where they are lettered appropriately. What am I doing wrong? This is a minimal working example:                  \documentclass[serif,mathserif,final]{beamer}     \mode<presentation>{\usetheme{Jorstad}}     \usepackage{amsmath,amsfonts,amssymb,pxfonts,eulervm,xspace}     \usepackage{floatflt,subfigure}     \usepackage{graphicx}     \usepackage{multicol}     %\graphicspath{{./figures/}}     \usepackage[orientation=landscape,size=A0,debug]{beamerposter}          %-- Header and footer information ----------------------------------     \newcommand{\footleft}{}     \newcommand{\footright}{}     \title{a}     \author{a}     \institute{a}     %-------------------------------------------------------------------               %-- Main Document --------------------------------------------------     \begin{document}     \begin{frame}{}     \begin{columns}[t]          %-- Column 1 ---------------------------------------------------     \begin{column}{0.24\linewidth}              %-- Block 1-2         \begin{block}{Section 1}              \begin{figure}[t]         \begin{center}         \subfigure[$I_1$] {\includegraphics[height=2in]{pics/BA_scream_1.png} \label{BA_exp_1}}         \subfigure[$I_2$] {\includegraphics[height=2in]{pics/BA_scream_2.png} \label{BA_exp_2}}         \subfigure[$w$] {\includegraphics[height=2in]{pics/BA_scream_3.png} \label{BA_exp_3}}         \subfigure[$I_2^w$] {\includegraphics[height=2in]{pics/BA_scream_4.png} \label{BA_exp_4}}  \\         \subfigure[$I_1$] {\includegraphics[height=2in]{pics/BA_lighting_1.png} \label{BA_lgt_1}}         \subfigure[$I_2$] {\includegraphics[height=2in]{pics/BA_lighting_2.png} \label{BA_lgt_2}}         \subfigure[$w$] {\includegraphics[height=2in]{pics/BA_lighting_3.png} \label{BA_lgt_3}}         \subfigure[$I_2^w$] {\includegraphics[height=2in]{pics/BA_lighting_4.png} \label{BA_lgt_4}}         \label{BA_failures}         \end{center}         \end{figure}          \end{block}     \end{column}%1                    %-- Column 2 ---------------------------------------------------     \begin{column}{0.41\linewidth}                  \begin{block}{Section 2}                  \begin{figure}[t]  %hp             \begin{center}             \subfigure[] {\includegraphics[height=2in]{pics/face51.png} }             \subfigure[] {\includegraphics[height=2in]{pics/face51_expressions.png} }             \subfigure[] {\includegraphics[height=2in]{pics/face51_lightings.png} }             \end{center}             \end{figure}               \end{block}          \end{column}%3          \end{columns}     \end{frame}     \end{document}      Ideally I want each figure to reset the subfigure captions starting from (a) alternately removing the letters while keeping the caption would be OK.


title: Mixed up roman and arabic page numbering in foot line using pageref

text: In my essay, all parts before the text part have to be numbered in Roman numbers. After the title page, the table of contents gets the correct number I. The following pages containing sections are numbered with 1,2,... The minimal example will show this:               \documentclass{article}     \usepackage{lastpage}     \usepackage{fancyhdr}     \pagestyle{fancy}     \fancyhead{}     \renewcommand{\headrulewidth}{0pt}     \fancyfoot[C]{}     \fancyfoot[R]{              \footnotesize             page \thepage\space of \pageref{LastPage} \\     }          \begin{document}      \begin{titlepage}     This is the title.     \end{titlepage}     \pagenumbering{Roman}     \tableofcontents     \newpage     \pagenumbering{arabic}     \section{Section 1}     \subsection{Subsection 1.1}     \end{document}      However, the reference to the `LastPage` does not adapt to the defined `\pagenumbering`. As you will see, a line like this occurs: > page I of 1 My aim is to "split up" the `LastPage` reference in one for the "Roman" part at the beginning of the document and another one for the "arabic" part, for example: > page II of IV.....(and later on)......page 5 of 15 I already looked in the thread How can I add “page # of ##” on my document?, but I could not figure out an appropriate solution.


title: OpenType Kerkis and bold Small Caps with greek

text: Kerkis font is an OpenType font that has Greek glyphs Small Caps both for regular and bold shapes. The names of the OTF files are `KerkisSmallCaps.otf` and `KerkisSmallCaps-Bold.otf`. When I compile the following example, the `textbf` is ignored. This is not surprising, as only the regular font is declared. If I replace `KerkisSmallCaps` with `KerkisSmallCaps-Bold` then (obviously) the bold shape is used for both lines.               \documentclass{article}          \usepackage{fontspec}          \setmainfont[         UprightFont = Kerkis,         ItalicFont = KerkisItalics,         SlantedFont = KerkisItalics,         BoldFont = Kerkisb,         BoldItalicFont = Kerkisbi,         BoldSlantedFont = Kerkisbi,         SmallCapsFont = KerkisSmallCaps]         {Kerkis}          \begin{document}     \textsc{κείμενο στα ελληνικά}          \textbf{\textsc{κείμενο στα ελληνικά}}     \end{document}      The question is, how can I make xelatex typeset the first sentence in the regular shape and the second sentence in the bold one? What options should be passed at fontspec?


title: texshade: how to change fontshape of sequencelogo's

text: I realize this is a very specific question about a certain package: `texshade`, but I also realize that some of the users here also use this package and might be able to help me out I have made a multiple sequence alignment, and show only the sequence logo:               \documentclass{article}     \usepackage{fontspec}     \usepackage{xunicode}     \usepackage{xltxtra}     \usepackage{texshade}          \begin{document}     \begin{texshade}{sample.aln}     \setfamily{numbering}{sf}     \setfamily{names}{sf}     \setfamily{residues}{sf}     \setfamily{features}{sf}     \setfamily{featurestyles}{sf}     \setfamily{hideblock}{sf}     \setfamily{legend}{sf}     \hideconsensus     \hidenumbering     \hideseqs     \showsequencelogo{bottom}     \end{texshade}     \end{document}      As you can see in this example I have tried to set every possible font feature to the sans serif font. However the sequence logo itself is still depicted as a rm font. The labels in the logo (such as the word "logo") are correctly changed to the SF font. I suspect currently loaded mathfont is used to render the sequencelogo? NOTE:actual fontspec fontselection not shown. sample ALN file can be downloaded here


title: Code inside an equation environment is executed 4 times (or isn't it?).

text: I created a small example:               \documentclass[a4paper,12pt]{article}     \usepackage{amsmath}     \usepackage[pdfstartview=FitH]{hyperref}     \usepackage{bookmark}     \begin{document}     one line     \newcounter{test}     \[\text{\stepcounter{test}\bookmark[dest=whatever]{my equation}one equation}\]     counter value: \arabic{test}.     \end{document}      It creates 4 bookmarks but increases the counter only by 1. How is that (even logically) possible? Either this equation environment somehow executes the code 4 times (maybe first measuring the contents or whatever), then the counter should be increased by four. Or it only executes once, then there should only be one bookmark. How do I get it to display only one bookmark? (moving it out of the equation is not an option since this happens inside a macro which at the same time marks the equation as target.) **update** : alright, egregs `\tbookmark` command fixed my minimal example. turns out it was too minimal. here is another one which went back to not working:               \documentclass[a4paper,12pt]{article}     \usepackage{amsmath}     \usepackage[pdfstartview=FitH]{hyperref}     \usepackage[atend]{bookmark}     \makeatletter\newcommand{\tbookmark}[2][]{\iffirstchoice@\bookmark[#1]{#2}\fi}\makeatother     \newcounter{nops}     \newcommand{\nop}{\stepcounter{nops}\raisebox{\ht\strutbox}{\hypertarget{nop\arabic{nops}}{}}\begingroup\edef\x{\endgroup\noexpand\BookmarkAtEnd{\noexpand\tbookmark[dest=nop\arabic{nops}]{page \arabic{nops}}}}\x}     \begin{document}     one line     \[\text{\nop one equation}\]     counter value: \arabic{nops}.     \end{document}


title: Conflict between stackengine and babel with spanish option

text: When pdfLaTeXing the MWE below I get a `Missing \endcsname inserted` error message. The compilation proceeds with no errors as soon as the `babel` package is not loaded with the `spanish` option (well, to be true, I've only tried with the `english` option, and it works alright). Any hints on how to solve this issue, or on a possible workaround, would be welcome. Follows the MWE:               \documentclass{memoir}          \usepackage{stackengine}     \usepackage[spanish]{babel}          \begin{document}     \Shortstack[c]{A N E}     \end{document}       EDIT: I've just tried with the `es-noquoting` option and with the coupled commands `\deactivatequoting`-`\activatequoting`, as suggested in some posts about issues related to `spanish babel`, but to no avail. The problem remains the same.


title: Align pgfplotstabletypeset and plot left and right

text: I can't get the plot and the pgfplotstabletypeset to align so that they are right next to each other. Is this possible at all? Please help me. This is what it looks like at the moment: ![enter image description here](http://i.stack.imgur.com/LjhIz.png) This is my code:               \begin{filecontents}{performance.data}     Konsumenten   Sekunden     1  31.944     2  16.064     3  16.099     4  16.541     5  6.611     6  6.248     7  6.345     8  6.375     9  6.26     10  3.748     \end{filecontents}     \begin{flushright}     \begin{tikzpicture}     \begin{axis}         \addplot[color=black, mark=x] table[x=Konsumenten, y=Sekunden] {performance.data};     \end{axis}     \end{tikzpicture}     \end{flushright}          \begin{flushleft}     \pgfplotstabletypeset[     col sep=&,row sep=\\,     string type,     every even row/.style={     before row={\rowcolor[gray]{0.9}}},     every head row/.style={     before row=\toprule,after row=\midrule},     every last row/.style={     after row=\bottomrule}     ]{     Konsumenten & Sekunden\\     1 & 31.944 \\     2 & 16.064 \\     3 & 16.099 \\     4 & 16.541 \\     5 & 6.611 \\     6 & 6.248 \\     7 & 6.345 \\     8 & 6.375 \\     9 & 6.26 \\     10 & 3.748 \\     }     \end{flushleft}


title: appendix formatting: section number before \appendixname

text: Here is my situation: # Source code in preamble:               \usepackage[title,titletoc]{appendix}     \renewcommand{\appendixname}{priedas}      in document:               \begin{appendices}            \section{Tekstai}       Nemo enim ipsam voluptatem, quia voluptas sit, aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos, qui ratione voluptatem sequi nesciunt, neque porro quisquam est, qui dolorem ipsum, quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt, ut labore et dolore magnam aliquam quaerat voluptatem.          \end{appendices}      # Output document in toc:               priedas A  Tekstai ......................... 20      in document:               priedas A  Tekstai      # Wanted output document in toc:               A priedas  Tekstai ......................... 20      in document:               A priedas  Tekstai


title: Seeking review on a document with people unfamiliar with TeX

text: I am a great fan of TeX, LaTeX and LyX, but recently I wrote some minutes and then tried to send them off for other people to review. There was no way I could send a TeX file; no-one would know what to do with it. In the end I sent a PDF, but most people were unable to work out how to annotate it (or had an old version of Adobe Reader that didn't allow it). Some people said they were annoyed that I hadn't just sent it in Word so that they could put their corrections in with "track changes". I suspect they thought that I had used TeX to confuse them, to make it harder for them to make corrections. My question is: **How can I use TeX with other people who are not TeX literate so that they can make reasonable corrections to text, without me ever having to explain to them what TeX is? If possible, how can I allow them to produce and distribute a finished document after they have changed it (without any further intervention by me), like one would a Word document?** P.S: I want to stress that I am trying to avoid being annoying for people. An ideal solution would have to involve nothing novel for anyone to be confused by, or think I was being awkward. I realise this requirement removes rather a lot of my options.