title: Beamer vertical navigation bar with horizontal subsection dot

text: I would like to have an horizontal subsection navigation inside a vertical navigation bar. The idea is to obtain the same subsection navigation as for the outersmoothbar but in a vertical navigation bar. I look for it but cannot find any solution. Any idea ? Elendil Edit: I'm writing my theme and I put here the peace of code concerning the sidebar.               % ============================================================     % LENGTH     % ============================================================     \newlength{\SidebarWidth}     \setlength{\SidebarWidth}{\beamer@sidebarwidth}     \newlength{\HeadlineWidth}     \setlength{\HeadlineWidth}{\paperwidth}     \addtolength{\HeadlineWidth}{-\SidebarWidth}     \addtolength{\HeadlineWidth}{-1pt}     \newlength{\HeadlineHeight}     \settoheight{\HeadlineHeight}{\large TexTe}     \addtolength{\HeadlineHeight}{1ex}          % ============================================================     % SIDEBAR     % ============================================================     % color     \setbeamercolor{sidebar}{bg=white}     \setbeamercolor{section in head/foot}{fg=black, bg=white}          % sidebar itself     \setbeamertemplate{sidebar \beamer@sidebarside}     {       \vfill       \insertverticalnavigation{\beamer@sidebarwidth}%       \vfill     }%          % vertical rule     \setbeamertemplate{sidebar canvas \beamer@sidebarside}{       \vspace*{-0.7\HeadlineHeight}%       \ifx\beamer@sidebarside\beamer@lefttext{%         \hspace*{0.99\beamer@sidebarwidth}%         \color{black}\rule{1pt}{0.9\paperheight}%       }       \else{%         \color{black}\rule{1pt}{0.9\paperheight}%       }       \fi     }          % section in sidebar     \setbeamertemplate{section in sidebar}%{sidebar theme}     {%       \vbox{%         \vskip1ex%         \beamer@sidebarformat{3pt}{section in sidebar}{           \centering\tikz[opacity=1.0] \node[xshift=0cm,yshift=0cm] at (0,0) {\includegraphics[height=0.7\beamer@sidebarwidth]{obian/sec\expandafter\insertsectionheadnumber\expandafter}};%         }%       }%     }          % section in sidebar shaded     \setbeamertemplate{section in sidebar shaded}%{sidebar theme}     {%       \vbox{%         \vskip1ex%         \beamer@sidebarformat{3pt}{section in sidebar}{           \centering\tikz[opacity=0.3] \node at (0,0) {\includegraphics[height=0.7\beamer@sidebarwidth]{obian/sec\expandafter\insertsectionheadnumber\expandafter}};%         }%       }%     }          % Patch sidebar to not hide section when show subsection     \patchcmd{\insertverticalnavigation}%     {\ifx\beamer@nav@css\beamer@hidetext{\usebeamertemplate{section in sidebar}}\else{\usebeamertemplate{section in sidebar shaded}}\fi}%     {{\usebeamertemplate{section in sidebar}}}{}{}      And a simple example could be this one loading the previous code in the preamble:               \documentclass{beamer}          \begin{document}          \begin{frame}       \titlepage     \end{frame}          \begin{frame}     \tableofcontents[subsectionstyle=show]     \end{frame}          \section{Section 1}     \begin{frame}     \begin{itemize}     \item No frametitle     \item section 1     \end{itemize}     \end{frame}          \subsection{Subsection 1}     \begin{frame}     \begin{itemize}     \item No frametitle     \item section 1     \item subsection 1     \end{itemize}     \end{frame}          \end{document}


title: How to make sections into sentence case

text: I would like my sections (and potentially subsections) to be in "sentencecase" no matter how I type them. I am happy with the way the `\MakeSentenceCase` macro from the `biblatex` package converts text with arbitrary capitalization into sentencecase. I am having difficulty integrating this into the `\section` macro. My first attempt was to redefine `\section` to be               \renewcommand{\section}{\@startsection{section}{1}{\z@}{-3.5ex \@plus -1ex \@minus -.2ex}{2.3ex \@plus.2ex}{\normalfont\Large\bfseries\MakeSentenceCase}}      but this fails because the first token (or something like that) to `\MakeSentenceCase` is not the first token of the text of my section heading, but rather related to the numbering and indenting. The following method works               \documentclass{article}          \usepackage{etoolbox}     \usepackage[backend=biber]{biblatex}          \makeatletter     \let\sectionOrig\section     \renewcommand{\section}{\@ifstar{\@sectionStar}{\@sectionNoStar}}%     \newcommand{\@sectionNoStar}[2][\relax]{\ifdefstring{\relax}{#1}{%       \sectionOrig{\MakeSentenceCase{#2}}%     }{%       \sectionOrig[#1]{\MakeSentenceCase{#2}}%     }}     \newcommand{\@sectionStar}[1]{\sectionOrig*{\MakeSentenceCase{#1}}}%     \makeatother          \begin{document}     \section{sections SHOULD BE IN {SENTENCECASE}}     \end{document}      by completely redefining the `\section` command. I have tried to take care of the starred and unstarred forms and optional arguments, but I am worried that this approach is going to cause problems someplace else. I guess I have 3 questions. First, is it reasonable to expect LaTeX to automatically handle the capitalization of sections. Second, is my approach reasonable. Third, is there a better approach (or an already existing package).


title: Why are my Latex compile times varying massively?

text: I've been using Latex for several years, but recently I've found that I can get crazily varying compilation times. For example: I am currently working on a ~15 page document with around 10 high quality eps/pdf figures and a bibtex bibliography. I find that for several days it will compile everything in ~30s. I then replace one word in the main body text, and compilation takes over an hour, with no new messages in the log. After another few days working on it, it goes back to 30s. This has happened previously as well with much smaller documents. Clearing out auxiliary files has no effect on this: if it was compiling quickly it keeps compiling quickly; slowly then still slowly. For reference I'm using pdfTeX 3.1415926-2.5-1.40.14 (TeX Live 2013) on Mac OSX 10.9.2. I've not included any sample code as this happens with such a huge range of documents and style files: I haven't been able to find a single culprit. Has anyone seen or heard of anything like this before? I haven't been able to find anything online. Edit: Thanks to @Heiko I've tracked the issue down to the float placement. However, I still don't know why this is such an issue. In particular, if I try to compile the document on a computer running Linux, the same document compiles in about 2s every time. So why are the floats causing such a problem on Max OSX?


title: How to align brackets in this diagram?

text: When I write the following :               \documentclass[psamsfonts]{amsart}     \usepackage{amssymb,amsfonts}     \usepackage[all,arc]{xy}     \begin{document}     \[Q(M) :=\left[      \xymatrix{       &\Xi(j^*M) \ar@{->>}[rd]^{can}\\       j_!j^*M \ar@{^{(}->}[ru]^{can} \ar[rd]_{can}       &        & j_*j^* M \\       & M \ar[ru]_{can}      }     \right] \]     \end{document}      This is what it looks like: ![enter image description here](http://i.stack.imgur.com/oF44z.png) I ended up getting Q(M) aligned to the first line of `\xymatrix{}`, and a huge empty space is inserted to the top of the content of `\xymatrix{}` in order to make Q(M) aligned to the middle of the bracket. This is ugly. How can I solve this?


title: How to fill color in graph?

text: I'm able to draw radar chart using code mentioned below, but somehow, fillcolor option is not working. Can you please suggest, how can i get it corrected?               \begin{center}     \psframebox*[fillcolor=white]{     \begin{pspicture}(-6,-5)(5,5)     \psset{unit=1.2}     \psKiviat[rotate=0.5,yLabels={Skill3, Skill2, Skill1, Skill10, Skill9, Skill8, Skill7, Skill6, Skill5, Skill4}, labelsep=10pt]{10}{3}     \psKiviatTicklines[Dx=0.5,linecolor=black!30]{10}{3}     \psKiviatAxes[linecolor=black!30]{10}{3}     \psKiviatLine[linewidth=3pt,linecolor=black,fillcolor=lightgray]{\pskillc, \pskillb, \pskilla, \pskillj, \pskilli, \pskillh, \pskillg, \pskillf, \pskille, \pskilld}     \multido{\rA=0.5+0.5,\iA=20+20}{5}{\uput[3](0,\rA){\iA}}     \end{pspicture}     }     \end{center}


title: How to equalize the two columns in the last page INSIDE the IEEEbiography enviroment

text: I'd like to make the two columns of the last page of equal length but starting the new column INSIDE the `IEEEbiography` environment. I have four authors in the last page, the second one has a long biography than the other three, therefore, with `\newpage` after the second author, the left column looks longer than the right one. You can think of the layout as a square followed by a long rectangle on the left and two squares on the right. So, I basically, need to break the line and start the new column INSIDE the `IEEEbiography` environment of the second author (the rectangle). When I use `\newpage` inside `IEEEbiography`, I got an error message "Tex capacity exceeded, sorry". When I use `\pagebreak`, the layout messes up: a huge white space is created in the left column between the first and second authors, and the third and fourth authors go to a new page. I tried many solutions on the forum for similar questions, specifically, `\balance`, `\newpage`, `\pagebreak`, `\vfill`, `\flushend`, `\multicolumns`, but none of them has worked out correctly as I want.               \begin{IEEEbiography}[{\includegraphics[width=1in,height=1.25in,clip,keepaspectratio]{author1.eps}}]%     {Author1} received the ...     line 2     line 3     line 4     \end{IEEEbiography}          \begin{IEEEbiography}     [{\includegraphics[width=1in,height=1.25in,clip,keepaspectratio]{author2.eps}}]%     {Author2} is ...     line 2      line 3      line 4      % New paragraph      line 5      line 6      == > a break of this column should be here to have two equal columns \\     line 7      line 8      \end{IEEEbiography}          \newpage\noindent          \begin{IEEEbiography}[{\includegraphics[width=1in,height=1.25in,clip,keepaspectratio]{author3.eps}}]%     {Author3} received the ...     line 2     line 3     line 4     \end{IEEEbiography}          \begin{IEEEbiography}[{\includegraphics[width=1in,height=1.25in,clip,keepaspectratio]{author4.eps}}]%     {Author4} received the ...     line 2     line 3     line 4     \end{IEEEbiography}


title: Header superimposed over text

text: The header in my report is superimposed on the text. I've tried altering voffset and header height but it didn't get me satisfactory results.               \documentclass[12pt,a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage[english]{babel}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{graphicx}     \usepackage{latexsym}     \usepackage{fullpage}     \usepackage{float}     \usepackage{indentfirst}     \usepackage[font=footnotesize,format=plain,labelfont=bf,up,textfont=it,up]{caption}     \usepackage{subfig}     \usepackage{booktabs}     \usepackage{appendix}     \usepackage{verbatim}     \usepackage{setspace}     \usepackage{rotating}     \usepackage{array}     \usepackage{multirow}     \usepackage{wrapfig}     \usepackage[parfill]{parskip}     \usepackage{pdfpages}     \usepackage{fancyhdr}               %to get para numbers in the margins          \usepackage{lipsum} % for dummy text     \usepackage{hyperref}          \newcounter{numpar}     \newcommand{\np}[1][]{%       \par       \refstepcounter{numpar}%       \noindent       \makebox[0pt][r]{%         \makebox[0pt][l]{\textbf{\thenumpar}}%         \qquad       }%       #1%       \ignorespaces     }          %evidence counter     \newcounter{evidence}     \newcommand{\ev}{%       \stepcounter{evidence}%       \marginpar{\textbf{EV\theevidence}}%     }          \pagestyle{fancy}          \lhead{\begin{footnotesize}     Header line 1 \\Header line 2     \end{footnotesize}}          \rhead{\begin{footnotesize}     Header line 1\\Header line 2     \end{footnotesize}}          \renewcommand{\headrulewidth}{0.4pt}     \renewcommand{\footrulewidth}{0.4pt}               \begin{document}          \thispagestyle{empty}     \tableofcontents          \pagebreak     \pagenumbering{arabic}          \section{A Section}     \lipsum[1-20]     \end{document}


title: Bibtex: Missing } inserted in exported library

text: When I run bibtex on my document after running pdflatex, and then run pdflatex again, I get the following error:               )     No file main.gls.     [3] (./main.bbl [4] [5] (/usr/share/texmf/tex/latex/lm/omslmr.fd)     ! Missing } inserted.     <inserted text>                  }     l.143 \end{thebibliography}      The error stems from my library.bib file, since it does not occur if only put a single entry into it. The library is exported from Mendeley and I have checked it with bibcheck. I even manually counted the `{` and `}`, and they match. I have read that there is a 2000 character attribute size limit in bibtex, but that is also not reached. The library file can be found here. There are some non-standard citation labes in there. They are created by Mendeley. I manually corrected them but even then the error still exists.


title: How to include a multipage table from an external file

text: I usually save my tables as standalone PDFs, generated by compiling a `standalone` document and then include them in the main file via `\includegraphics{pdf.name}` However, I now have a two-pages table made with `longtable` and I would like to include it with the same method, saving it as a separate PDF and then including it with `includegraphics`. This does not seem to work and has many issues:   1. `standalone` class do not work with `longtable`s   2. If I save the table as a normal `article` then it can't be included with `includegraphics` So my question is: How should I proceed to include a multi-page table from an external file? Is it even possible?


title: Using \renewcommand{\familydefault}{} to use times new roman everywhere

text: How do I use `\renewcommand{\familydefault}{}` to use the times new roman font every where. I am using the `scrreprt` document style, which has the sans- serif font in the chapter headings.


title: Index sorting problem with Vietnamese

text: I use Texmker 4.1 and Texlive 2013 in my Xubuntu. I use this system to write my teacher's book with the AMS package (gsm in fact), which is in Vietnamese. There is a problem in sorting the index, it did not display the order correctly, and some indices were missed. I have searched on Tex Stack Exchange, there are indeed two topic about this kind of problem ( here and here ), but the solution there did not work in my case. Here is the MWE:               \documentclass{gsm-l}     \usepackage[papersize={160mm,240mm},inner=20mm, outer=15mm, vmargin=15mm]{geometry}     \geometry{includeheadfoot}     \usepackage{amssymb}     \usepackage{graphicx}     \usepackage{amsmath,enumitem}% http://ctan.org/pkg/{amsmath,enumitem}     \setlist[enumerate]{leftmargin=*}     \usepackage[utf8]{vietnam}     \usepackage{makeidx}     \makeindex          \begin{document}     \chapter{Hello}     This is the MWE          \index{Đồng biến}     \index{Nghịch biến}     \index{Dao động điều hòa}     \index{Ếch}     \index{Alphabetical}     \index{Albert Einstein}     \index{Bổ đề}     \index{Đường thẳng}     \index{Chương}     \printindex     \end{document}      Makeindex command in the terminal will produce the Index sorting like this : Ếch>Đồng biến>Đường thẳng>Albert Einstein>Alphabetical>Bổ đề>Chương>Dao động điều hòa>Nghịch biến. This is not the sorting I want as in Vietnamese, it should be like this Albert Einstein>Alphabetical>Bổ đề>Chương>Dao động điều hòa>Đồng biến>Đường thẳng>Ếch Please help me. Thanks.


title: hspace, stretch and align

text: I want to align some equations. One equation has some text that I want pushed back to the margin. I tried                   \begin{align*}         \text{Text:  } \hspace{\stretch{1}} \text{more text} x^2 &=y\\         m^2 &= 2\\         \end{align*}      which gives                                     Text: more textx2 = y                                           m2 = 2      but what I want is this:               Text:                       more textx2 = y                                  m2 = 2      The hspace stretch combination works great on lines that aren't within an `align` block. I don't want to add a specific size (like `hspace{10em}`) since I may have to edit the line a bit later, and I do need to keep the pushed text ("Text") on the same line. Any ideas?


title: pst-eucl symmetry

text: I'm trying to draw a diagonal using the tags for symmetry but I really can't understand the meaning of the parameters and how to make the lines long just to fit the figure. For this source I have to use only the `pst-eucl` package. I really do search here for something similar but may be this package is not so often used. I hope someone can explain me or help me with the code. The picture is the result I'm trying to reach: ![enter image description here](http://i.stack.imgur.com/Cl4tx.jpg)               \begin{pspicture}(0,0)(3,3)     \pstGeonode[PosAngle=-100,PointSymbol=none](0,0){A}     \psset{CodeFig=true}     \pstGeonode[PointSymbol=none,PosAngle=-100](4.4,0){B}     \pstGeonode[PosAngle=90,PointSymbol=none](7,3.4){C}     \pstGeonode[PosAngle=90,PointSymbol=none](2.6,3.4){D}     \pspolygon(A)(B)(C)(D)     \pstMarkAngle[]{C}{A}{D}{$\alpha /2$}     \pstMarkAngle[]{B}{A}{C}{$\alpha /2$}     \pstLineAB[linestyle=dashed]{A}{C}     \pstLineAB[linestyle=dashed]{B}{D}     \pstInterLL[PointSymbol=+,PosAngle=60]{A}{C}{B}{D}{O}     \pstRightAngle[PointSymbol=none,linecolor=black,RightAngleType=german]{A}{O}{B}     \pstGeonode[PointSymbol=none,PosAngle=-100](3.5,0){P}     \pstLineAB[linestyle=solid]{O}{P}     \pstRightAngle[PointSymbol=none,linecolor=black,RightAngleType=german,CodeFigColor=black,RightAngleSize=.3]{O}{P}{A}     \pstGeonode[PointSymbol=none,PosAngle=-100](2.6,0){M}     \pstLineAB[linestyle=solid]{D}{M}     \pstRightAngle[PointSymbol=none,linecolor=black,RightAngleType=german,CodeFigColor=black,RightAngleSize=.3]{D}{M}{A}     \pstGeonode[PointSymbol=none,PosAngle=100](3.5,3.4){Q}     \pstLineAB[linestyle=solid]{O}{Q}     \pstRightAngle[PointSymbol=none,linecolor=black,RightAngleType=german,CodeFigColor=black,RightAngleSize=.3]{D}{Q}{O}     \pstCircleOA[linecolor=black, DistCoef=3. 3 div, Radius=\pstDistAB{O}{P}]{O}{}     \pstGeonode[PointSymbol=none,PointNameSep=0.3em](5,3.6){a}     \pstGeonode[PointSymbol=none,PointNameSep=0.3em](1.3,2.3){a}     \pstGeonode[PointSymbol=none,PointNameSep=0.3em](2.8,2){2r}     \pstGeonode[PointSymbol=none,PointNameSep=0.3em](3.6,2.5){r}     \end{pspicture}      Well if someone is interested I think this could be the code for this. I'll be happy if you have some advices how to make it on a better way.


title: Programatically style words/sentences/paragraphs based on arbitrary metrics?

text: It'd be nice to be able to style words or sentences or subsections based on arbitrary metrics. For example, it might be useful to highlight words based on their length - bolder highlighting for longer words, so that you can zoom out of the document, and get a quick picture of where it is getting complex. Another example along the same lines might be to highlight paragraphs based on their readability score. For the last example, this might involve something like converting the paragraph to plain text, calculating the score (externally?), mapping the score to a colour, then applying the color to the paragraph. Is it possible to do something like this on a document-wide basis? ie. not having to add a command around every paragraph? Can the length of a word/sentence/paragraph be easily calculated within tex, or should this be done externally?


title: Why can't I do this diagram?

text: I use this code in beamer:               \[     \begin{tikzpicture}[>=angle 90]     \matrix(a)[matrix of math nodes,     row sep=2.5em, column sep=2.5em,     text height=1.5ex, text depth=0.20ex, ampersand replacement=\&]     {\bigwedge^2 S^m\&S^m\&S\&0\\     F_2\&F_1\&S\&0\\};     \draw[->](a-1-1) -- (a-1-2);     \draw[->](a-1-2) -- (a-1-3);     \draw[->](a-1-3) -- (a-1-4);     \draw[->](a-2-1) -- (a-2-2);     \draw[->](a-2-2) -- (a-2-3);     \draw[->](a-2-3) -- (a-2-4);     \draw[->](a-1-1) -- node[auto] {$\gamma$}(a-2-1);     \draw[->](a-1-2) -- node[auto] {$\cong$}(a-2-2);     \draw[double equal sign distance,shorten <=5pt,shorten >=5pt](a-1-3) -- node[auto]   {$id$}(a-2-3);     \end{tikzpicture}     \]      but I don't get the double line between (a-1-3) and (a-2-3), why? (I took this code here: How can I do this diagram with tikz?)


title: Create a table with merged cells and vertical text

text: I would like to create a table like ![enter image description here](http://i.stack.imgur.com/1xp9c.png) Currently, I was reading this thread How to rotate text in multirow table? but I don't get how to do it as above.


title: Font not found error fontspec using WinEdt in Windows

text: I'm trying to compile a document and (as usual) I'm getting stuck with the `fontspec` package. These are the only lines of code that I are giving me grief.               \RequirePackage[T1]{fontenc}     \newfontfamily\bodyfont[]{TeXGyreHerosCondensed}     \newfontfamily\thinfont[]{TexGyreHeros}     \newfontfamily\headingfont[]{TeXGyreHeros}      I've tried all sorts of ways to call `texgyreheros` including with spaces and by file name (in `C:\Windows\Fonts`). For some reason the system fonts aren't seeming to "link" with the LaTeX compiler.


title: PGFplots, two colours under and above curve

text: I'm using PGF plots and would like to fill two colours to my plot. One colour indicates a positive value, while the other colour for negative values. What I have so far is one colour for the entire plot.               \begin{tikzpicture}[scale=1.4]     \begin{axis}[no markers, scale only axis,ylabel={SOI}, axis on top=true, axis x line=below,axis y line=middle]     \addplot {sin(x)} \closedcycle;     %\addplot [red, fill] table[x=Year,y=INDEX,col sep=comma] {data/SOIvRainfall.csv} \closedcycle;     \end{axis}     \end{tikzpicture}


title: apa6e title page and abstract page not appearing

text: I believe this was working before. I was trying to get the reference page on a new page and had issued a `\renewcommand` in `apacite`, but now I am having a whole new problem with `apa6e` and I'm not sure if it is related. Perhaps it is due to an update I may have installed. The title page and abstract page are missing now. Perhaps I deleted something and I'm forgetting what it is.               \documentclass{apa6e}     \usepackage[american]{babel}          \begin{document}          \title{Title of Paper}     \shorttitle{Short title}     \author{Name}     \authornote{This is an assignment for .}     \abstract{abstract text }     \date{\today} % or \date{24Jan11} for example          The time has come for all good men to come to the aid of their country test     .  According to , the time has come for all good men to come to the aid of their country.          \end{document}


title: Why was a lion chosen as LaTeX mascot?

text: > **Possible Duplicate:**   >  Why does TeX have a lion as mascot? What was the motivation for choosing a lion as mascot for LaTeX? (Sorry, for not providing an MWE for this question.)


title: How to use the geometry package with newlfm documents?

text: I am using the newlfm letter documentclass, and try loading the geometry package. This returns the following error:               ! LaTeX Error: Command \geometry already defined.      What I want to do is put more space (margin) between the text and the top of the page. A MWE is provided below:               \documentclass{newlfm}     \usepackage[margin=0mm, top=2mm]{geometry}          \begin{document}     \begin{letter}{Recipient Company\\ Recipient Address}          \opening{Dear Sir or Madam,}          Here goes the letter content          \end{letter}     \end{document}      What am I doing wrong?


title: `ntheorem` and `thmtools` seem incompatible

text: I am preparing the setup of the theorem environments for my thesis. I want to do this right before I have say 200 of those environments in my document, since changing them will likely break things at that stage. What I want:   * `cleveref`. To have uppercase/lowercase references, idem for plurals   * `thmtools`. Since it provides an interface to `cleveref` for defining the plural names   * Properly placed endmarks. So the endmark should appear on the same line as the last line of text (even if it is displaymath or an `itemize`/`enumerate`) It seems that this is quite hard to do right. `ntheorem` is quite good at putting thmmarks in the right place, but I can not get `ntheorem` to work right with `thmtools`. * * * At the moment I have `thmtools` with `amsthm` as backend. This works nicely together with `cleveref`. I have definitions like               \declaretheorem[sibling=equation,qed=\text{\guillemotleft}]{definition}      But when I end my definition with a list, the guillemet («) is put on new line. Clearly not what I want (-; When I switch the backend to `ntheorem` I get compile errors of the form               \declaretheorem key `qed' not known.      Does anyone have a solution to this? * * * A MWE:               \documentclass[10pt,a4paper]{article}     \usepackage[T1]{fontenc}     \usepackage[utf8x]{inputenc}     \usepackage{amsmath, amssymb, amsfonts, amsthm}     \usepackage{thmtools}     \numberwithin{equation}{section}     \declaretheoremstyle[              headformat={\makebox[0pt][r]{\NUMBER\quad}\NAME \NOTE}     ]{theorem}     \declaretheoremstyle[              headformat={\makebox[0pt][r]{\NUMBER\quad}\NAME \NOTE}     ]{definition}     \declaretheorem[style=theorem,sibling=equation]{theorem}     \declaretheorem[style=theorem,sibling=equation]{proposition}     \declaretheorem[style=theorem,sibling=equation]{lemma}     \declaretheorem[style=definition,sibling=equation,qed=\text{\guillemotleft}]{definition}     \declaretheorem[style=definition,sibling=equation,qed=\text{\guillemotleft}]{exercise}     \declaretheorem[style=definition,sibling=equation,qed=\text{\guillemotleft}]{example}     \let\proof\relax     \declaretheorem[style=definition,numbered=no,qed=\qedsymbol]{proof}          %% Math macro stuff to make this compile     \DeclareMathOperator{\Spec}{Spec}       % Spectrum     \DeclareMathOperator{\M}{M}     \DeclareMathOperator{\Ga}{Ga}     \DeclareMathOperator{\GL}{GL}     \DeclareMathOperator{\Gm}{Gm}     \def\ol{\overline}          \begin{document}          \begin{definition}     A \emph{group variety over $k$} is an integral group scheme of finite type over $\Spec k$.     \end{definition}          \begin{example}     Let $k$ be a field and $R$ a commutative $k$-algebra.     \begin{itemize}         \item The varieties $\Ga_{k} = \Spec k[x]$ and $\Gm_{k} = \Spec k[x,y]/(xy - 1)$ are group varieties. Indeed, $\Ga_{k}(R)$ is the additive group underlying $R$, and $\Gm_{k}(R) = R^*$ is the group of units in $R$.         \item The variety $\M_{n,k} = \Spec k[(x_{ij})_{ij}]$ is a group variety. Also the closed sub variety $\GL_{n,k}$ defined by the polynomial $\det \left( (x_{ij})_{ij} \right) - 1$ is a group variety. The $R$-valued points are the $n \times n$-matrices $\M_{n,k}(R)$ with coefficients in $R$, and $\GL_{n,k}(R)$ consists of the invertible matrices respectively. Observe that $\Gm_{k} = \GL_{1,k}$.         \item The variety $\mu_{n,k} = \Spec k[x]/(x^n -1)$ is a group variety, and $\mu_{n,k}(R)$ consists of the group of $n$-th roots of unity in $R$.         \item An elliptic curve over $k$ is defined as a proper variety $E/k$ that is smooth of relative dimension $1$, of which the geometric fibre $E_{\ol{k}}$ has genus $1$, together with a given point $0 \in E(k)$. It can be shown that every elliptic curve is a group variety. Actually they form an important class of objects in the study of abelian varieties.     \end{itemize}     \end{example}          \end{document}      Note that the endmark of the definition is fine, but the endmark of the example is on a line of itself.


title: tikz legend with only 1 bar, not 2

text: I have bar graphs made with tikz picture and pgfplots and the legend has two bars shown for each item. If this were printed in black and white I can see it being confusing given that I have multiple bars per tick. Is it possible to globally change the legend picture to have only 1 bar? ![enter image description here](http://i.stack.imgur.com/jt7Lo.png) Code:               \begin{figure}[tbp]     \centering     \begin{subfigure}{0.26\linewidth}     \caption{Average Playback Version}     \begin{center}     \begin{tikzpicture}[scale=0.8]     \begin{axis}[     %x tick label style={/pgf/number format/1000 sep=},     xlabel=Available Bandwidth (Mbps),     ylabel=APV,     xtick={0, 1},     xticklabels={Early, Late},     enlarge x limits=0.35,     x=2.5cm,     enlarge y limits=upper,     legend style={at={(0.5,1.0)},anchor=north,legend columns=-1},     ybar,     bar width=5pt,     ymin=0,     ]     \addplot         coordinates{(0,2.036363636363636) (1,4.803030303030303)}; %none     \addplot         coordinates{(0,2.171875) (1,4.98)}; %1 ahead     \addplot         coordinates{(0,2.765625) (1,5.520618556701031)}; %2 ahead     \addplot         coordinates{(0,3.5084745762711864) (1,5.904255319148936)}; %3 ahead     \addplot         coordinates{(0,3.3225806451612905) (1,5.938388625592417)}; %4 ahead     \legend{0,1,2,3,4}     \end{axis}     \end{tikzpicture}     \end{center}     \end{subfigure}     \hfill     \begin{subfigure}{0.26\linewidth}     \caption{Playback Smoothness}     \begin{center}     \begin{tikzpicture}[scale=0.8]     \begin{axis}[     %x tick label style={/pgf/number format/1000 sep=},     xlabel=Available Bandwidth (Mbps),     ylabel=PS,     xtick={0, 1},     xticklabels={Early, Late},     enlarge x limits=0.35,     x=2.5cm,     ymax=1,     enlarge y limits=upper,     legend style={at={(0.5,1.0)},anchor=north,legend columns=-1},     ybar,     bar width=5pt,     ymin=0,     ]     \addplot         coordinates{(0,0.24098054972207325) (1,0.24153409339341353)}; %none     \addplot         coordinates{(0,0.114057913312868) (1,0.2756032344823675)}; %1 ahead     \addplot         coordinates{(0,0.051916399143237965) (1,0.18031661670978735)}; %2 ahead     \addplot         coordinates{(0,0.06390840028231044) (1,0.36195905410949436)}; %3 ahead     \addplot         coordinates{(0,0.04319574602657975) (1,0.48586289928460025)}; %4 ahead     \legend{0,1,2,3,4}     \end{axis}     \end{tikzpicture}     \end{center}     \end{subfigure}     \hfill     \begin{subfigure}{0.26\linewidth}     \caption{Prefetching Overhead}     \begin{center}     \begin{tikzpicture}[scale=0.8]     \begin{axis}[     %x tick label style={/pgf/number format/1000 sep=},     xlabel=Available Bandwidth (Mbps),     ylabel=PO,     xtick={0, 1},     xticklabels={Early, Late},     enlarge x limits=0.35,     x=2.5cm,     ymax=1,     enlarge y limits=upper,     legend style={at={(0.5,1.0)},anchor=north,legend columns=-1},     ybar,     bar width=5pt,     ymin=0,     ]     \addplot         coordinates{(0,0) (1,0)}; %none     \addplot         coordinates{(0,0.20614441700821615) (1,0.011143061898431643)}; %1 ahead     \addplot         coordinates{(0,0.7352518529340072) (1,0.08344647990992549)}; %2 ahead     \addplot         coordinates{(0,0.9219019138395939) (1,0.07364705301195329)}; %3 ahead     \addplot         coordinates{(0,1.4445764512661277) (1,0.027578648257207166)}; %4 ahead     \legend{0,1,2,3,4}     \end{axis}     \end{tikzpicture}     \end{center}     \end{subfigure}     \caption{PC Browser: Long-Term Decreases 4 Mbps - 0.5 Mbps}     \end{figure}


title: Legend symbol not being displayed correctly in pgfplots

text: I'm trying to create a horizontal bar plot with log axis. Adapting several examples I could get what I needed. However, the legend symbols are not being displayed the way I want. Here's what I got so far: ![enter image description here](http://i.stack.imgur.com/AcSXW.png) But I want the legend to look like this: ![enter image description here](http://i.stack.imgur.com/FVycH.png) I tried adding the `\addlegendimage` but it didn't work at all. In the code below, if I uncomment the commented lines, only the 'FEA' entry will get the correct symbol. Any ideas on what I'm doing wrong? MWE:               \documentclass{article}     \usepackage{pgfplots}          \begin{document}          \begin{tikzpicture}     \begin{axis}[            xlabel=Time (sec),         legend style={         at={(0.95,-0.2)},         /tikz/every even column/.append style={column sep=0.2cm}},         legend columns=3,             xbar,         xmin=1,         xmode = log,         enlarge y limits=0.2,         height=8cm,         ytick=data, yticklabel style={text width=3cm,align=right},         bar width=10pt,         symbolic y coords={alg 1, alg 2, alg 3, alg 4}, ]          \addplot [fill=black!15!white]     coordinates {     (2.24e+000,alg 4)     (1.91e+000,alg 3)     (1.98e+000,alg 2)      (2.23e+000,alg 1)      };     %\addlegendimage{fill=black!15!white,area legend}     \addlegendentry{Initialization}          \addplot [fill=black!45!white]      coordinates {     (2.69e+003,alg 4)     (1.08e+003,alg 3)     (1.92e+003,alg 2)      (1.02e+003,alg 1)     };     %\addlegendimage{fill=black!45!white,area legend}     \addlegendentry{FEA}          \addplot [fill=black!70!white]      coordinates {     (5.16e+000,alg 4)     (5.18e+000,alg 3)     (5.17e+000,alg 2)     (5.81e+000,alg 1)      };     %\addlegendimage{fill=black!70!white,area legend}     \addlegendentry{Optimization}          \end{axis}     \end{tikzpicture}          \end{document}      Thanks!


title: How to properly display a product within a fraction?

text: I have product inside a fraction, like this:               \[     \phi_n(t)=\frac{t^n-1}{\prod_{\substack{         d \mid n,\\         d<n.}} \phi_d(t)}     \]      And that places the "limits" of the product on it's side, not behind, like it would normally do if it were not inside a fraction, like this               \[     \prod_{\substack{         d \mid n,\\         d<n.}} \phi_d(t)     \]      Is there a way to make it display the limits behind the product?


title: Add nomenclature to TeXworks

text: How do you add nomenclature typesetting tool to TeXworks? I use               pdfLaTeX + MakeIndex + BibTeX      It produces `.nlo` file but does not put the nomenclature list in the document.


title: Extra space in natbib bookstyle

text: I am trying to create citations using `natbib` for my dissertation. In my papers I always used `\usepackage[authoryear]{natbib}` in the pre-amble and everything came out great. Now I am using the `book` mode in LaTeX instead of the `article` mode and I put `\usepackage[authoryear]{natbib}` in the preamble but it is creating an extra space before each citation. In `article` style my citation would look like this: > bla bla Doe and Smith(1998) bla bla But in my dissertation it looks like this: > bla bla Doe and Smith(1998) bla bla Does anybody know what I am doing wrong, and why it is creating this extra space?


title: WinEdt and TeX Live

text: I'm preparing a macro for WinEdt and need to know a few things about WinEdt 7/8 with TeX Live. Unfortunately I am a MiKTeX user, and I call on a TeX Live + WinEdt user in order to get the following information:   Does WinEdt know what is the path to the texmf-local root directory without having to tell it via the 'TeX Options' tab in the Options->Execution Modes menu item? To be sure, it would be enough to execute a macro with just one line: Prompt("TeX-Local");


title: Hyperref and ntheorem's thref: inconsistent numbering

text: When using `ntheorem` with the `thref` option to get the named reference command `\thref`, sometimes the theorem numbers produced is "different" from the theorem numbers produced by just `\ref`. Any suggestions on fixes/workarounds? Here's a MWE:               \documentclass{book}     \usepackage{amsmath}     \usepackage[standard,amsmath,thref,hyperref]{ntheorem}     \usepackage{hyperref}          \makeatletter     \@addtoreset{chapter}{part}     \makeatother          \numberwithin{Theorem}{section}          \begin{document}     \part{Part 1}     \chapter{Chaptername}     \section{Test}     \begin{Theorem}\label{test1} Test theorem     \end{Theorem}          Cite with ref: \ref{test1}          Cite with thref: \thref{test1}     \end{document}      Which compiles to ![Buggy output](http://i.stack.imgur.com/4TMaR.png) Notice in particular that the `\thref` output shows Theorem 1.1.1.1, the first (extra) 1 belonging to the `\part`.               \documentclass{book}     \usepackage{amsmath}     \usepackage[standard,amsmath,thref]{ntheorem}          \makeatletter     \@addtoreset{chapter}{part}     \makeatother          \numberwithin{Theorem}{section}          \begin{document}     \part{Part 1}     \chapter{Chaptername}     \section{Test}     \begin{Theorem}\label{test1} Test theorem     \end{Theorem}          Cite with ref: \ref{test1}          Cite with thref: \thref{test1}     \end{document}      Without using hyperref, however, everything looks fine: ![Output that I want](http://i.stack.imgur.com/23XAB.png) * * * **Remarks** Without the `\@addtoreset{chapter}{part}` line, the output is okay. However, I need the `\@addtoreset{chapter}{part}` because for this thing I am working on I want the chapter numbers to be within individual parts, and without explicitly setting this, `hyperref` fouls up and gets confused between equation 1.1.1 of part 1 and equation 1.1.1 of part 2.


title: Sweave: How to remove horizontal space in Soutput environments?

text: As the following example shows, there is a horizontal space added in the `Soutput` environment. This leads to a non-left-aligned output (see the output of `rnorm()`. I found that this space already exists in "standard R output" (in interactive mode), the question is if it can be avoided somehow?               \documentclass{article}          \usepackage[american]{babel}     \usepackage{fancyvrb}     \usepackage{Sweave}          \begin{document}     \noindent Just some text before the chunk     <<foo>>=     set.seed(1)     rnorm(10)     3 != 4     @     Just some text after the chunk     \end{document}


title: Creating a new list of appendices with tocloft

text: I just implemented Mike Renfro's solution from here, but the content in the list of appendices also gets listed in the toc, which should not be the case. How would one ensure this is avoided? Below is the code I've used. The `report` class has been used because I want to have chapters in the document.               \documentclass[12pt]{report}     \usepackage{lipsum}\usepackage{tocloft}     \newcommand{\listappendixname}{List of Appendices}     \newlistof{appendix}{app}{\listappendixname}     \setcounter{appdepth}{2}     \renewcommand{\theappendix}{\Alph{appendix}}     \renewcommand{\cftappendixpresnum}{Appendix\space}     \setlength{\cftbeforeappendixskip}{\baselineskip}     \setlength{\cftappendixnumwidth}{1in}     \newlistentry[appendix]{subappendix}{app}{1}     \renewcommand{\thesubappendix}{\theappendix.\arabic{subappendix}}     \renewcommand{\cftsubappendixpresnum}{Appendix\space}     \setlength{\cftsubappendixnumwidth}{1in}     \setlength{\cftsubappendixindent}{0em}          \renewcommand{\appendix}[1]{%       \refstepcounter{appendix}%       \chapter{\theappendix\space #1}%       \addcontentsline{app}{appendix}{\protect\numberline{\theappendix}#1}%       \par     }          \newcommand{\subappendix}[1]{%       \refstepcounter{subappendix}%       \section{\thesubappendix\space #1}%sub       \addcontentsline{app}{subappendix}{\protect\numberline{\thesubappendix}#1}%     }          \usepackage{fmtcount,etoolbox}     \makeatletter     \patchcmd{\@makechapterhead}{\thechapter}{\Numberstring{chapter}}{}{}     \patchcmd{\chaptermark}{\thechapter}{\NUMBERstring{chapter}}{}{}     \makeatother     \newcommand{\thetocchap}{\NUMBERstring{chapter}}          \begin{document}     \tableofcontents     \listofappendix          \chapter{Foo} \lipsum[1]     \section{Bar} \lipsum[2]%sub     \chapter{Additional Foo} \lipsum[3]     \section{Additional Bar} \lipsum[4]%sub          \begin{appendices}          \appendix{Baz} \lipsum[5]     \subappendix{Qux} \lipsum[6]     \appendix{Additional Baz} \lipsum[7]     \subappendix{Additional Qux} \lipsum[8]     \end{appendices}     \end{document}


title: Whatsits: when are they used in practice?

text: This question came up in discussions surrounding the question How to replace a large block of text by an empty block of the same size?, which basically asks for a vmode analog of `\phantom`. My question thus focuses on vertical mode only. One approach is to collect the material to be hidden in a vertical box, then dissect the vertical box, replacing every box with contents by a box of the same size without contents. The only tools that TeX gives us are `\lastskip` and `\unskip` for skips, `\lastkern` and `\unkern` for kerns, `\lastpenalty` and `\unpenalty` for penalties, and `\lastbox` (as `\setbox0\lastbox`) for boxes. There is, in particular, no way of removing whatsits such as produced by `\write`, and `\special`.   1. What primitives produce whatsits nodes? When are they used in real world documents (in vertical mode)? Color changes? TikZ drawings?   2. (bonus) Are there other kinds of nodes in vmode, apart from skips, kerns, penalties, boxes, and whatsits? What primitives produce those? When do they appear in practice?


title: How to position in tikz relatively?

text: I am trying to draw some control diagram with tikz and I have a few questions regarding that:   * How can be removed the border from the disturbance?   * How can be left and right position the Cost and Constraints nodes?  ## ![enter image description here](http://i.stack.imgur.com/4wPTW.png)               \tikzstyle{controller} = [draw, fill=blue!20, rectangle,      minimum height=3em, minimum width=6em]     \tikzstyle{block} = [draw, fill=yellow!20, rectangle,      minimum height=3em, minimum width=6em]          \tikzstyle{disturbance} = [draw, node distance=1.5cm, line width=0pt]         \tikzstyle{sum} = [draw, circle, node distance=1.5cm]     \tikzstyle{input} = [coordinate]     \tikzstyle{output} = [coordinate]     \begin{figure}[!]     \centering     \begin{tikzpicture}[auto, node distance=3cm,>=latex', scale=0.5 ,every     node/.style={transform shape}]               % We start by placing the blocks         \node [input, name=input] {};         \node [sum, right of=input] (sum) {};         \node [controller, right of=sum] (controller) {Controller};         \node [block, right of=controller, node distance=4cm] (system) {System};         \node [disturbance, name=disturbance, above of=system] {Disturbance};         \node [disturbance, name=costfunc, below of=system,] {Cost};         \node [disturbance, name=constraint, below of=system] {Constraints};         % We draw an edge between the controller and system block to          % calculate the coordinate u. We need it to place the measurement block.          \draw [->] (controller) -- node[name=u] {$u(n)$} (system);         \node [output, right of=system] (output) {};                      % Once the nodes are placed, connecting them is easy.          \draw [draw,->] (input) -- node {$r(n)$} (sum);         \draw [->] (sum) -- node {$e(n)$} (controller);         \draw [->] (disturbance) -- (system);         \draw [->] (system) -- node [name=y] {$y(n)$}(output);         \draw [->] (y) |-  ($(y.south) + (0,-2)$) -| node[pos=0.99]         {$-$} node [near end] {$y(n)$} (sum);     \end{tikzpicture}        \label{fig:mpc_bloc_diagram}     \end{figure}      * * * **EDITED** ![enter image description here](http://i.stack.imgur.com/qehHh.png) How can I move the `y(n)` closer to the `Predict rectangle`, to be aligned with `u(n)` I tried the following, with the result above.               \draw [->] (y) |- node [near end] {$y(n)$} ($(predict.east)+(0,0.35)$);     \draw [->] (u) |- node [near end] {$u(n)$} ($(predict.east)+(0,-0.35)$);


title: Subfloat labels don't display properly

text: The screenshot has the bottom part of a figure with two subfigures. As you can see, the labels have a very narrow width. I don't understand why.               \begin{figure}[htp]       \centering       \subfloat[Frequency Histogram]{}\includegraphics[width=2.75in,height=2.5in]{left-figure}       \subfloat[Boxplots]{}\includegraphics[width=2.75in]{right-figure}       \caption{The caption of the entire figure which displays fine but not shown here}        \label{whatever}     \end{figure}      ![alt text](http://i.stack.imgur.com/tSzmn.png) What I am trying to achieve is the same layout as in this wikibook page (where the subfigure text fits on a line under each image). Thanks ahead for the advice.


title: Vertically asymmetric size variation for parentheses

text: One of the difficulties I have with writing formulas in LaTeX is that the standard sizing tools for the variable-size operators (parentheses, etc.) do not account for "high" symbols and "low" symbols separately. Thus, for instance, if you write something like   `\[ \left( \sum_{\substack{ 0\le i\le m\\ 0<j<n}} P(i,j) \right) \]`   which (using `amsmath`) produces a summation symbol with two lines of subscript, the top of the enclosing parentheses extend well above the top of the text: ![rendering of the example](http://i.stack.imgur.com/eA6xZ.png) Things get vastly worse if you try to enclose a commutative diagram in parentheses. Is there any way to make the size vary asymmetrically? I.e., so that the parentheses could extend far down without having to extend far up, and vice versa.


title: Can \left( ... \right) be instructed to ignore nonexistent upper or lower limits of summation?

text: In a formula such as               \[ \left( \sum_{n\in\mathbf{N}} \right) \]      the left and right delimiters extend not only downwards to cover the lower limit of the sum, but upwards an equal amount as if to cover an upper limit, despite there being no upper limit. Is there a way to prevent this? This seems related to this question, and the first answer there (enclose it in an `array` environment) can sort of solve it, but (I think) inelegantly, and also inserts extra spacing. I'm hoping there is a better way, like a command to simply control whether `\sum` has a top delimiter at all or something.


title: Problems with defbibentryset sorting

text: I have been using biber/biblatex for a while now and I was used to define multiple citations with defbibentryset and the subentry option for biblatex. This worked nice but since the last update I have a problem with how references are ordered. For example if I define 3 `\defbibenetryset` they are numbered from 1 to 3 in the bibliography no matter if there are other single citations between them. In order to check this problem I compiled again an old file that worked, but it is not working any more:               \documentclass[a4paper, 10pt]{article} %environnement du document     \usepackage[latin1]{inputenc}      \usepackage[T1]{fontenc} %prise en charge des caractères spéciaux     \usepackage[frenchb]{babel} %langue     \usepackage{epstopdf}     \usepackage{csquotes} %pour la biblio     \usepackage[backend=biber,style=chem-acs,subentry,maxnames=20]{biblatex} %style acs     \bibliography{library}       \uchyph=0               %pour réussir à faire des notes de bas de page         \makeatletter              \ExecuteBibliographyOptions{citetracker,sorting=none}              \DeclareCiteCommand{\notefullcite}[\mkbibbrackets]         {\usebibmacro{cite:init}%          \usebibmacro{prenote}}         {\usebibmacro{citeindex}%          \usebibmacro{notefullcite}%          \usebibmacro{cite:comp}}          {}          {\usebibmacro{cite:dump}%           \usebibmacro{postnote}}              \newbibmacro*{notefullcite}{%          \ifciteseen           {}            {\footnotetext[\thefield{labelnumber}]{%               \usedriver{}{\thefield{entrytype}}.}}}         \DeclareCiteCommand{\superfullcite}[\cbx@superscript]%          {\usebibmacro{cite:init}%          \let\multicitedelim=\supercitedelim          \iffieldundef{prenote}              {}              {\BibliographyWarning{Ignoring prenote argument}}%           \iffieldundef{postnote}           {}           {\BibliographyWarning{Ignoring postnote argument}}}           {\usebibmacro{citeindex}%          \usebibmacro{superfullcite}%          \usebibmacro{cite:comp}}          {}         {\usebibmacro{cite:dump}}              \newbibmacro*{superfullcite}{%          \ifciteseen          {}          {\xappto\cbx@citehook{%               \noexpand\footnotetext[\thefield{labelnumber}]{%                  \fullcite{\thefield{entrykey}}.}}}}              \newrobustcmd{\cbx@superscript}[1]{%         \mkbibsuperscript{#1}%         \cbx@citehook         \global\let\cbx@citehook=\empty}         \let\cbx@citehook=\empty              \makeatother                         \DefineBibliographyExtras{french}{\restorecommand\mkbibnamelast}                         \begin{document}          \defbibentryset{metarev}{Furstner2000,Roy2000}      a\superfullcite{metarev}\\     a\superfullcite{Schwab1995}\\     a\superfullcite{Scholl1999}\\     \defbibentryset{hov}{Kingsbury1999,Garber2000}      a\superfullcite{hov} \\     a\superfullcite{Grela2002} \\          \end{document}      the output should be ref1, ref2, ref3, ref4, ref5 in the bibliography, but it gives ref1, ref3, ref4, ref2, ref5. The set=hov is numbered 2!!! cheers


title: What is a good font for URLs to go with Palatino for the main text?

text: I'm looking for a nice font to use for my `\url{...}`s that goes well with Palatino. Courier does not look good at all. It's much too light. Helvetica (scaled .92) looks pretty good, but the `~` looks bad, raised so high. None of these fonts looked very good to me, but I'm no designer so I'm sure my opinion could be changed if others think one of those looks good.


title: beamer blocks in ordinary article-style document

text: Is there a way to emulate beamer blocks, e.g., alert/example, in ordinary pdflatex in article documents? Is there a pure tikz way of doing this?


title: What .sty files do I need to successfully run pdflatex on .tex produced from nbconvert?

text: Allegedly, one can produce pdf files from ipython notebooks by first producing a .tex file from nbconvert (http://ipython.org/ipython- doc/stable/interactive/nbconvert.html#nbconvert) However, I run into a `! LaTeX Error: File `import.sty' not found.` when trying to run pdfLaTeX on the `.tex` files I produce using `nbconvert`. What are the .sty files or packages I need to install in order to produce nice PDF files from ipython notebooks?


title: Deleting blank page after title page

text: Using amsbook, I get a blank white page after the title page and before the TOC. Any way to delete this page? Many thanks. Here is a MWE, for what it's worth:                \documentclass[openany]{amsbook}           \begin{document}           \title{Title}           \author{Author}           \maketitle           \tableofcontents           \chapter{Start}           \end{document}


title: How to fix moderncv's ToC generation to get nesting in the PDF ToC

text: I am preparing a (somewhat lengthly) application using the moderncv class. For this I would like to provide for some additional structure in the PDFs ToC, that is, use something like `\addcontentsline{toc}{part}{<entry>}` for grouping sections. Also I would like to have the subsections to appear nested below the sections in the PDF ToC. However, the following fails: **All** bookmarks appear on the part-level, `\subsection` does not create a bookmark:               \documentclass[11pt,a4paper,sans]{moderncv}      \moderncvstyle{casual}                        % style options are 'casual' (default) and 'classic'      \moderncvcolor{blue}                          % color options 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'     \usepackage[utf8]{inputenc}                   % replace by the encoding you are using     \usepackage[scale=0.75]{geometry}     \firstname{John}     \familyname{Doe}     \begin{document}     \maketitle          \phantomsection{}     \addcontentsline{toc}{part}{Academic Career}          \section{Education}     \cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}  % arguments 3 to 6 can be left empty     \cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}          \subsection{Master thesis}     \cvitem{title}{\emph{Title}}     \cvitem{supervisors}{Supervisors}     \cvitem{description}{Short thesis abstract}          \subsection{Dissertation}     \cvitem{title}{\emph{Title}}     \cvitem{supervisors}{Supervisors}     \cvitem{description}{Short thesis abstract}          \phantomsection{}     \addcontentsline{toc}{part}{Professional Career}          \section{Experience}     \subsection{Vocational}     \cventry{year--year}{Job title}{Employer}{City}{}{General description no longer than 1--2 lines.\newline{}%     Detailed achievements:%     \begin{itemize}%     \item Achievement 1;     \item Achievement 3.     \end{itemize}}     \cventry{year--year}{Job title}{Employer}{City}{}{Description line 1\newline{}Description line 2}     \subsection{Miscellaneous}     \cventry{year--year}{Job title}{Employer}{City}{}{Description}          \section{Languages}     \cvitemwithcomment{Language 1}{Skill level}{Comment}     \cvitemwithcomment{Language 2}{Skill level}{Comment}     \cvitemwithcomment{Language 3}{Skill level}{Comment}          \end{document}      ![screen shot](http://i.stack.imgur.com/mIj74.gif) The culprit can be found in the moderncv implementation, more precisely in the definitions of the `\section` and `\subsection` commands in `moderncvstyleclassic.sty`:               \ProvidesPackage{moderncvstyleclassic}[2012/01/25 v0.17 modern curriculum vitae style scheme: classic]     ...     \renewcommand*{\section}[1]{%       \vspace*{2.5ex}%       \parbox[t]{\hintscolumnwidth}{\strut\raggedleft\raisebox{\baseletterheight}{\color{color1}\rule{\hintscolumnwidth}{0.95ex}}}%       \phantomsection{}% reset the anchor for hyperrefs       \addcontentsline{toc}{part}{#1}%       \hspace{\separatorcolumnwidth}%       \parbox[t]{\maincolumnwidth}{\strut\sectionstyle{#1}}%       \par\nobreak\vskip 1ex\@afterheading}% to avoid a pagebreak after the heading          \renewcommand*{\subsection}[1]{%       \begin{tabular}{@{}p{\hintscolumnwidth}@{\hspace{\separatorcolumnwidth}}p{\maincolumnwidth}@{}}%         \raggedleft\hintfont{} &{\subsectionstyle{#1}}%       \end{tabular}%       \par\nobreak\vskip 0.5ex\@afterheading}% to avoid a pagebreak after the heading     %  \phantomsection{}% reset the anchor for hyperrefs     %  \addcontentsline{toc}{chapter}{#1}% does not work, the bookmark is placed at the same level as sections (placed themselves at part level to be visible, as hyperref does not allow sections without parents...)      The comment below the `\subsection` implementation probably explains the problem: sections are placed on part-level, subsections are not placed at all in the ToC because of issues with hyperref. I played a bit around with various `\addcontentsline`-settings, but without success. So how can this be fixed?


title: Reversing direction of x axis in pgfplots

text: I want to reverse to direction of the x axis in one of my plots. `pgfplots` offers the `x dir=reverse` key for this. However, this does not work as expected - not even in this example:               \documentclass{standalone}      \usepackage{tikz,pgfplots}     \pgfplotsset{compat=1.3}     \begin{document}       \begin{tikzpicture}         \begin{axis}[xmin=0,xmax=1,x=15cm,                       ymin=0,ymax=1,y=10cm,                       x dir=reverse]           \addplot coordinates{(0,0) (1,1)};         \end{axis}       \end{tikzpicture}     \end{document}      In the compiled pdf, the plot starts with (0,0) at the left side, just like it would without the `x dir=reverse` option. I have `pgfplots` 1.5 installed. What's wrong here?


title: Where are the MathJax LaTeX symbols/environments documented?

text: At the following link in the MathJax documentation it lists the supported LaTeX symbols alphabetically that it supports, followed by the set of supported environments... http://www.mathjax.org/docs/2.0/tex.html#symbols My question is where are each of these symbols/enviornments described and documented? For example, where is the definitive description of the `\above` symbol ?


title: Recreating a guilloche with TikZ

text: One of my last questions talked about certificates and I got great answers. Now my questions is, can one recreate a guilloche in TikZ like the one shown below:![enter image description here](http://i.stack.imgur.com/tiito.jpg) or may be a border like ![enter image description here](http://i.stack.imgur.com/8CqiY.jpg)


title: How to use nameref to refer to a section without including the output of any commands in the title of that section?

text: ## Background (simplified) I'm using the todonotes package to add todonotes to sections in my documents. I have created a macro to add the todonotes to sections such that they appear alongside the section's entry in the table of contents. I am also using the `nameref` macro from the hyperref package to refer to various sections of my document by name. Partly because of this, my macro also allows a label to be specified for the section. Here's a somewhat simplified version of the output my macro produces:               \section[{\todo{A todonote about the foo section}}{foo}]{foo}%     \label{sec:foo}      ## The problem The trouble with this is that when using the `\nameref` to refer to a section with a todonote contained in the title, as above, the todonote also gets attached to the reference. ### MWE:               \documentclass{article}          \usepackage{todonotes}     \usepackage[colorlinks,linkcolor=blue]{hyperref}          \begin{document}          \tableofcontents          \section{foo}     \begin{itemize}         \item A reference to the \nameref{sec:bar} section     \end{itemize}          \section[{\todo{A todonote about the bar section}}{bar}]{bar}     \label{sec:bar}     A section called bar          \section{baz}     A section called baz          \end{document}      Which produces (after three or four compiles/builds for good measure): ![A screenshot of the output from the MWE demonstrating the problem](http://i.stack.imgur.com/V4FCK.png) ### What's happening: So the call to `\nameref{sec:bar}` is presumably producing a reference which includes `{\todo{A todonote about the bar section}}{bar}` and todonotes is (correctly but undesirably) producing a duplicate todonote because of this. To clarify, I would like the reference to the bar section to be produced as just `bar` without the duplicate todonote. ## Approach to finding a solution Although this is my use case, I would prefer to know how to make `nameref` ignore any commands within the section title as I feel this would probably be more generally useful (and not just for me). As a side note, an alternative solution to ignoring the commands could possibly be to define some `nameref`-specific reference text for the section somehow. However, this is less desirable as it would require a little maintenance to keep it relevant to the section name.


title: tabular extend beyond a page

text: I have a large dataset to show in tabular format. The problem is that it doesn't page break into more pages. And the excess is not being displayed. This is how i used the tabular tag                \begin{tabular}{ lllllllllllllllll }          00000000 & 00 & 01 & 02 & 03 & 04 & 05 & 06 & 07 & 08 & 09 & 10 & 11 & 12 & 13 & 14 & 15 \\      00000016 & 16 & 17 & 18 & 19 & 20 & 21 & 22 & 23 & 24 & 25 & 26 & 27 & 28 & 29 & 30 & 31 \\      00000032 & 32 & 33 & 34 & 35 & 36 & 37 & 38 & 39 & 40 & 41 & 42 & 43 & 44 & 45 & 46 & 47 \\      00000048 & 48 & 49 & 50 & 51 & 52 & 53 & 54 & 55 & 56 & 57 & 58 & 59 & 60 & 61 & 62 & 63 \\      00000064 & 64 & 65 & 66 & 67 & 68 & 69 & 70 & 71 & 72 & 73 & 74 & 75 & 76 & 77 & 78 & 79 \\      00000080 & 80 & 81 & 82 & 83 & 84 & 85 & 86 & 87 & 88 & 89 & 90 & 91 & 92 & 93 & 94 & 95 \\          \end{tabular}      I haven't included all the rows here. How can i make it automatically page break into new pages and show the entire table.


title: Is there a method just write `---` to get an em-dash, putting thinspace both before and after it?

text: Is there a method just write `---` to get an em-dash, putting a thinspace both before and after it? The situation about break is similar with the original ---.


title: I need help for putting the chapters (and their number) in the header. I've the command for the page number

text: % ********* Header and Footer **********     % This is something to play with forever. I use here the advanced settings of the KOMA script          \usepackage{scrpage2} %header and footer using the options for the KOMA script     \renewcommand{\headfont}{\footnotesize\sffamily} % font for the header     \renewcommand{\pnumfont}{\footnotesize\sffamily} % font for the pagenumbers          %the following lines define the pagestyle for the main document     \defpagestyle{cb}{%     (\textwidth,0pt)% sets the border line above the header     \pagestyle{scrheadings}          %{{\it ENSIL}\hfill A.Bertrand}% doublesided, left page     %{A.Bertrand\hfill{\it ENSIL}}% doublesided, right page     %{A.Bertrand\hfill{\it ENSIL}} % one sided printing      (\textwidth,1pt)}% sets the border line below the header     %     {(\textwidth,1pt)     {\pagemark\hfill\headmark\hfill}% doublesided, left page     {\hfill\headmark\hfill\pagemark}% doublesided, right page     {\hfill\headmark\hfill\pagemark}%  onesided     % sets the border line above the footer     (\textwidth,0pt)% sets the border line below the footer     }


title: labeling lines of algorithms inside figure environment

text: I am having trouble labeling lines of algorithms that are inside the figure environment. For example, in the following code the label "\lnl{loop}" gives compilation error. This works perfectly in algorithms outside the figure environment.               \documentclass{article}     \usepackage{algorithm2e}     \usepackage{caption}     \usepackage{subcaption}          \newcommand{\myalgorithm}{%     \begin{algorithm}[H]     \SetAlgoLined     \KwData{this text}     \KwResult{how to write algorithm with \LaTeX2e }     initialization\;     \lnl{loop} \While{not at end of this document}{     read current\;     \eIf{understand}{     go to next section\;     current section becomes this one\;     }{     go back to the beginning of current section\;     }     }     \end{algorithm}}     \begin{document}          \begin{figure}         \begin{subfigure}{.5\textwidth}             \myalgorithm             \caption{How to write algorithms}         \end{subfigure}% need this comment symbol to avoid overfull hbox     \caption{Main caption}     \end{figure}               \end{document}      This is the error I get with the latex command:               [1     ! Undefined control sequence.     <write> \newlabel{sub@loop}{{\thesubalgocf                                             }{\thepage }}     l.33 \end{document}      Thanks for your help!


title: MikTeX 2.9, install packages on the fly?

text: I set the `Install Packages on the Fly` setting to `Yes` and try to compile my document in Texmaker, but I still get the error `File [...] not found`, where `[...]` is the package I need. Basically, I need to manually install every package I use. For example, I want to use the `footmisc` package. I put `\usepackage[bottom]{footmisc}`, and I get the error `! LaTeX Error: File 'footmisc.sty' not found.` Is this a known bug, or am I misunderstanding this feature?


title: How to use Xindy with TeXShop/LaTeX Mac OS X (error: sort åäö in index)

text: I am new to LaTeX since a year (old man trying...) and have some problem with index. I write in Swedish and the letters "å ä ö" are sorted wrongly in the index. (äåöabc...) Otherwise the indexing works well with MakeIndex. I have tried with Xindy but something goes wrong. "Åäö" works well in text! How do I use Xindy? ( `\usepackage{texindy}` ? Anything more to add (TeXShop/LaTeX)? Please help! This is part of my preamble:               \documentclass[11pt]{article}      \usepackage[T1]{fontenc}     \usepackage[swedish]{babel}     \usepackage[utf8]{inputenc}           \usepackage{makeidx}     \newcommand{\boldidx}[1]{{\bf #1}}          ....     This kind of index in text:          \index{Säker plats|boldidx}Säker plats           ....      Is TeXShop OK to use? Is there a better one for Mac OS X Mavericks?


title: scopes on chain: node distance not working

text: I have defined a few commands that each output a bunch of TikZ nodes that, combined, conceptually represent a single node/object. In order for the generated nodes to be treated as a cohesive whole, I wrap them in a scope.   * `\instruction{identifier base}{text L}{text R}{box style}{length style}{scope style}`   * `\twoPInstruction{identifier base}{text L}{textR}{box style}{len1}{len3}{scope style}` With these commands, I want to create chain diagrams where these colorful instruction blocks are put next to each other.   **All I'm getting is this overlapping drawing:**   ![enter image description here](http://i.stack.imgur.com/JuNfP.png) **But I want them aligned adjacently:** (something like this)   ![enter image description here](http://i.stack.imgur.com/Q2k9z.png)   _(the gray outline, and black box surrounding my renderings is caused by texmaker's preview)_ I have tried adjusting TikZ's `node distance` style, but whatever distance I chose, I cannot get the orange box off of the blue one. Here's my (super long) MWE. Most of it's styling, though; The interesting stuff happens in `\newcommand`s and at the end near `\begin{tikzpicture}`:               \documentclass{standalone}          \usepackage{tikz}          \usetikzlibrary{arrows,decorations.pathmorphing,positioning,calc,matrix,fit,shapes.miscs,scopes,chains}          \tikzstyle{base}=[         font={\sffamily\bfseries},     ]     \tikzstyle{box}=[         base,         rounded rectangle,         draw=black,         inner sep=0.5ex,     ]     \tikzstyle{boxL}=[         box,         rounded rectangle right arc=none,     ]     \tikzstyle{boxR}=[         box,         rounded rectangle left arc=none,     ]     \tikzstyle{inner}=[         base,         inner sep=0,         node distance=0,         line width=0,     ]     \tikzstyle{innerL}=[         inner,         font={\small\sffamily\bfseries\color{white}},     ]     \tikzstyle{innerR}=[         inner,         font={\small\sffamily\bfseries\color{black}},     ]     \tikzstyle{innerLine}=[         ->,         dashed,         dash pattern=on 0.25ex off 0.125ex,         decorate,         decoration={             snake,             amplitude=0.18ex,             segment length=1ex,             post length=0.5ex         },     ]     \tikzstyle{hop}=[         ->,         out=45,         in=135,         dashed,         dash pattern=on 0.25ex off 0.125ex,     ]     \tikzstyle{sep}=[         inner,         minimum width=1ex,     ]          \tikzstyle{blue}=[         fill=cyan,     ]     \tikzstyle{orange}=[         fill=orange,     ]     \tikzstyle{len1}=[         inner,         text width=6ex,     ]     \tikzstyle{len2}=[         inner,         text width=13ex,     ]     \tikzstyle{len3}=[         inner,         text width=19ex,     ]     \tikzstyle{len4}=[         inner,         text width=25ex,     ]          \pgfdeclarelayer{box}     \pgfdeclarelayer{text}     \pgfsetlayers{box,text,main}          \newcommand{\baseInstruction}[7]{% id-base, text L, text R, color style, box style, length style, scope style     {[#7]         \begin{pgfonlayer}{text}%box contents             \node[#6] (#1 Skel) {};             \node[innerL, right=of #1 Skel.base west, anchor=base west] (#1 SkelL) {#2};             \node[innerR, left=of #1 Skel.base east, anchor=base east] (#1 SkelR) {#3};             \node[inner, fit=(#1 SkelL.north east)(#1 SkelR.south west)] (#1 Between1) {};             \node[inner, fit=(#1 SkelL.south east)(#1 SkelR.north west)] (#1 Between2) {};             \node[inner, fit=(#1 Between1)(#1 Between2)] (#1 Between) {};             \node[inner, fit=(#1 SkelL)(#1 SkelR)] (#1 Contents) {}; %needed for attaching arrows to             \draw[innerLine] ($(#1 Between.west) + (0.2ex,0)$) -- ($(#1 Between.east) - (0.2ex,0)$);         \end{pgfonlayer}         \begin{pgfonlayer}{box}%box outlines             \node[#5, #4, fit=(#1 SkelL)(#1 SkelR)] (#1) {};         \end{pgfonlayer}     }     }          \newcommand{\instruction}[6]{% id-base, text L, text R, color style, length style, scope style         \baseInstruction{#1}{#2}{#3}{#4}{box}{#5}{#6}     }          \newcommand{\instructionL}[6]{% id-base, text L, text R, color style, length style, scope style         \baseInstruction{#1L}{#2}{#3}{#4}{boxL}{#5}{#6}     }          \newcommand{\instructionR}[6]{% id-base, text L, text R, color style, length style, scope style         \baseInstruction{#1R}{#2}{#3}{#4}{boxR}{#5}{#6}     }          \newcommand{\twoPInstruction}[7]{% id-base, text L, text R, color style, length style L, length style R, scope style     {[#7]         \instructionL{#1}{#2}{\vphantom{#3}}{#4}{#5}{}         \begin{pgfonlayer}{text}%box contents                \node[sep, right=of #1L Skel.base east] (#1 Sep) {};         \end{pgfonlayer}             \instructionR{#1}{\vphantom{#2}}{#3}{#4}{#6, right=of #1 Sep}{}         \begin{pgfonlayer}{text}             \draw ($(#1L Between.east) + (0,0.3ex)$) edge[hop] ($(#1R Between.west) + (0,0.3ex)$);         \end{pgfonlayer}     }     }               \begin{document}               \begin{tikzpicture}[         start chain,         node distance=10cm,         every child node/.style={on chain,join},         every join/.style={->}     ]     \instruction{a}{a}{X}{blue}{len2}{}     \twoPInstruction{b}{b}{Y}{orange}{len1}{len3}{}     \end{tikzpicture}          \end{document}


title: How can I do this page?

text: I'm a teacher math and I will give to my students a sheet with a mathematical summary (resume). I'm thinking in this model, but with other matter. How can I do this page? Thank you.![enter image description here](http://i.stack.imgur.com/nU2vn.jpg)


title: How to reduce the size of the equation

text: I wish to put two equations into one line using minipage, but they are too wide, any solution for reducing the size of the equation without removing words so that I can put into one line to reduce space.               \documentclass{article}     \usepackage{amsmath}     \begin{document}     \begin{minipage}{0.5\linewidth}     \begin{equation}\label{paira}     \mathit{MyA(s)}{=}     \begin{cases}     \max\limits_{a\in \mathit{MAede(s)}}Respone{a}{\cdot}lprt{s'}     \ \ if\ P_s=true\\     \sum\limits_{a\in \mathit{MAde(s)}}p_a{\cdot}Respone{a}{\cdot}lprt{s'}      \ otherwise\\     \end{cases}     \end{equation}     \end{minipage}     \begin{minipage}{0.5\linewidth}     \begin{equation}\label{pairc}     \mathit{MyC(s)}{=}     \begin{cases}     \min\limits_{a\in \mathit{MAede(s)}}costdd{a}{+}lprt{s'}     \ \ if\ P_s=true)\\     \sum\limits_{a\in \mathit{MAede(s)}}p_a{\cdot}(costdd{a}{+}lprt{s'})     \emph{ otherwise}\\     \end{cases}     \end{equation}     \end{minipage}     \end{document}       ![enter image description here](http://i.stack.imgur.com/s0NQV.png)


title: Centering caption under a table

text: I have the following table in my document:               \begin{table}     \begin{center}     \begin{tabular}{|l|c|c|}\hline     defaults&5976&2258\\ \hline     \end{tabular}     \caption{Results}     \label{t2}     \end{center}     \end{table}      and the table itself is centered, but the caption is aligned to the left.   1. Is it caused by the style sheet of the journal, or is it standard behaviour?   2. How can I fix it (in case of both answers to the previous question)? How does one debug what the stylesheet is changing anyway?


title: How can I set this template so that lengthy code doesn't overshoot the page?

text: I actually asked the exact question here: http://tex.stackexchange.com/questions/87646/problem-formatting-java-code-in- my-latex-document-overshooting-the-page However I have tried using the solution I was given (which did work for the example I used them) but it seems that this does not work with the package I want to use (example below). I have looked through the texdoc file for captions and floats and could not find anything on how to do it either.               \usepackage{float}     \usepackage{caption}     \begin{document}     \floatstyle{ruled}     \newfloat{program}{thp}{lop}     \floatname{program}{Program}     \begin{program}     \begin{verbatim}             if(args.length>0){            while(expression){                          BufferedReader xReader=new BufferedReader(new FileReader(IOUtil.fileName(args[0])));                              `BufferedReader yReader=new BufferedReader(new FileReader(IOUtil.fileName(args[1]))); } }`                    \end{verbatim}     \caption{}     \end{program}     \end{document}


title: Is it possible to have thin lines or crop marks to help cut the pages with \setuparranging?

text: I have something like this:               \setuppagenumbering[state=stop]     \setuppapersize[A5,landscape][A4]     \setuplayout[topspace=1cm,backspace=1cm,       header=0mm,footer=0mm,       width=middle,height=middle]     \setuparranging[2TOP]      I'd like to have a thin line in the middle of the page so that I know where to cut the paper. Alternatively, kind of "crop marks" with the same purpose would do. Is there an option for that? `marking=on` in `\setuplayout` didn't help (probably because the "classical" crop marks fall outside of the paper with these settings - am I right?). I'm using ConTeXt MkIV. _Note: please retag this question as appropriate, I didn't know what tags would be best._


title: How to write a TeX conditional to test start of a new page (ConTeXt)

text: Currently using:               \edef\lastpagenumber{\pagenumber}      after starting a new page, then in subsequent text:               \ifnum\pagenumber>\lastpagenumber       do something     \else       do something else     \fi      But sometimes `\pagenumber` does not seem to increment, even though a new page has started.


title: Squeeze superscripts and subscripts around bracketed expressions in display math

text: Consider a bracketed term in display math, like this. ![LaTeX output](http://i.stack.imgur.com/8E46S.png) Is there any way to squeeze the space between the super/sub-scripts and the bracketed term? e.g. ![Desired output](http://i.stack.imgur.com/dh0HN.png) where I've modified the image to create the desired effect. Apologies if this is a duplicate. I trawled through results from a few different searches and didn't find the same question asked anywhere. * * * MWE:               \documentclass{article}     \begin{document}     \begin{equation}     \left(\frac{\frac{dx}{dy}}{\frac{dz}{dt}}\right)^{0.01}_i     \end{equation}     \end{document}


title: Mark (highlight) a paragraph (\item{...}) with a squiggly line for later attention

text: I'd like to mark one or more of my `\item{...}`'s in an enumeration with a squiggly line at the right so that I can easily see which parts I have to re- phrase/re-write later on. All I have found is how to make a paragraph a different color, but my printer really does not like this/prints it badly. Any help is greatly appreciated. Sorry I wasn't clear, I was thinking of something like this (except it can be smaller and less obstrusive, just enough of a squiggly line as not to oversee it later while reviewing): ![This is what I am thinking of](http://i.stack.imgur.com/4C7m6.png)


title: How to reproduce this thesis cover page in LaTeX?

text: I am typing my thesis' cover page, our university has a typesetting requirement in this link http://www.helsinki.fi/socialsciences/studying/current/thesis_cover.pdf I need to reproduce this cover page in my LaTeX setting; could anyone teach me how to do this?


title: Space for generated text

text: Throughout my PDF document, generated text on the end of the line is spilled out to the margin. That is, if I use, e.g., `\ref{}` or `\cite{}`, then LaTeX does not consider the actual size of the generated text when calculating the output text, so that it is sometimes spilled out to the margin. I thought to solve this by putting `\mbox` around the `\ref` or `\cite` command, as I thought that the `\mbox` command forse latex to compile the inner command first, but it did not helped. Am I wrong about the `\mbox` command? Anyone has any idea how to solve this?


title: Breaking pictures across multiple pages

text: I am a relative TeX newbie trying to write a new package to generate timelines that can span multiple pages (the existing timeline solutions are not suitable for me, and I would like to write something superior to share with the community as way of 'giving back'). Anyway, at present I have successfully been able to mock up a very nice timeline using only the `\begin{picture}...\end{picture}` functionality (no `tikz`). The problem is spanning pages - is it possible to have TeX automatically break a figure at certain points in order to support horizontal or vertical spanning of multiple pages?


title: "section level" appendices

text: I am writing my thesis using a document class that has chapters and then sections under them. Because the chapters are about pretty unrelated topics, I'd like to put the appendices at the end of each chapter (at section level) that they belong (instead of having all the appendices at the end). One way that I found that mostly worked was to put this in front of each of the appendices               \newcounter{ninjalevel}     \setcounter{ninjalevel}{1}          \renewcommand{\theequation}{\arabic{chapter}.\Alph{ninjalevel}.\arabic{equation}}     \renewcommand{\thesection}{\arabic{chapter}.\Alph{ninjalevel}}      and then reset `\theequation` and `\thesection` after the appendices. But I have to do this for each chapter and it's kind of clumsy. Are there better ways? Btw, I am not even sure if this is the right terminology. Can you have appendices not at the end of the documents, or should they be called something else? Thanks!


title: Output different beamer presentations from same tex file

text: I am asking a very similar question to that posed here Reusing slides from Beamer presentations but may be slightly different. I teach a number of very similar modules with differences mainly being in the quantity and detail of topic. I know I could use a main-file and just include the slides as individual files as the case may require. I was thinking more along the line of the following pseudocode...               \modulelist{CHEM6005,CHEM7002,CHEM8005}     .     .     .     \begin{frame}{Grignard Reagents}[]     This frame appears for all modules     \end{frame}     \begin{frame}{Grignard Reagents-General reaction mechanisms}[CHEM7002, CHEM8005]     This frame only appears for modules CHEM7002 and CHEM8005 when compiled     \end{frame}     \begin{frame}{Grignard Reagents-Aldehydes and Ketones}[]     This frame appears for all modules     \end{frame}     \begin{frame}{Grignard Reagents-Esters}[CHEM8005]     This frame appears for module CHEM8005 only when compiled     \end{frame}      When the document is compiled (without having to manually comment out frames etc), it outputs in the above case, three different files, lecture- chem6005.pdf, lecture-chem7002.pdf and lecture-chem8005.pdf which have the requisite depth and detail as required by the module...


title: Vertical spacing, pagination and ideal results

text: I found that the best way to avoid widows and orphans is setting penalties and using rubber lengths between paragraphs, for instance, `\setlength{\parskip}{1pt plus 1pt minus 1pt}`. When I shared this piece of knowledge with the LaTeX Users Group, however, I was told that > […] it's the default solution […] It is also disallowed by most publishers > working to a grid or specifying type be set solid. It works best with a > layout that allows or encourages space between non-indented paragraphs (like > a business report). Since then, I wonder how professional publishers who use LaTeX deal with pagination issues. Using `\enlargethispage` is another possibility, but just as awkward. And, well, if it can be done with Adobe InDesign, it certainly can be done with LaTeX (or ConTeXt etc.). To sum up: what are the proper strategies, commands or settings one can use to accomplish industry-standard results when it comes to pagination?


title: \AfterGroup sorcery and choking tex/pgf

text: In the following code, the line `\AfterGroup*` (from the`etextools` package) causes the `pdfLatex` compiler to 'choke', i.e it produces only this output and the process is stuck forever, consuming 13% of CPU:               This is pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9)     entering extended mode     (C:/Users/arul/AppData/Local/Temp/TE_temp_preview5132.tex     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar     abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,      croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga     lician, german, german-x-2013-05-26, greek, gujarati, hindi, hungarian, iceland     ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin, latvian,      lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, n     german-x-2013-05-26, nynorsk, oriya, panjabi, pinyin, polish, portuguese, roman     ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerm     an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl     ishmax, welsh, loaded.     (C:\Users\arul\AppData\Local\Temp\TE_temp_preview5132.aux)     ABD: EveryShipout initializing macros     ("C:\Program Files (x86)\MiKTeX 2.9\tex\context\base\supp-pdf.mkii"     [Loading MPS to PDF converter (version 2006.09.02).]      And for the code, I want to be able to access different parts of an object by their id, globally, but since the macros are created within a group (and `pgfkeys` are confined to current group), I need to execute the `\pgfkeys` command in global scope, and thus the `\AfterGroups*` command (or do I need 2 `\AfterGroups*`, the other to escape the `newenvironment` confinement?)               \documentclass{article}%     \usepackage{tikz,amsmath,amssymb,bm,color,etextools}%     \usepackage[margin=0cm,nohead]{geometry}%     \usetikzlibrary{calc}%     %     \begin{document}%     \begin{tikzpicture}%     %     \def\addobjectpart#1#2#3{%       \pgfkeys{/instance/#1/ref name/.initial={a}, /instance/#1/ref color/.initial={b}}%       \pgfkeys{/instance/#1/ref name={#2}, /instance/#1/ref color={#3}}%     }%     %     \newenvironment{myobject}[1] {       \newcommand*{\addpart}[1][]{\object[##1]};%       \def\object[##1]##2;{%         \begingroup%           \def\objid{1}%           \def\name{bla}%           \def\objcolor{black!50}%           \AfterGroup*{\addobjectpart{\expandonce{\objid}}{\expandonce{\name}}{\expandonce{\objcolor}}}% <! HELL BREAKS LOOSE         \endgroup%       };%     }{};%     \begin{myobject}[BLAH]%       \addpart[]{text ehm};%     \end{myobject}%     \end{tikzpicture}%     \end{document}%      EDIT: Complete logfile after aborting the process: http://pastebin.com/BuwTt305


title: Tikz: custom, rounded node shape

text: I would like to make a tikz drawing with two nodes as shown in my terrible drawing. (The bottom node is meant to be round with some emanating projections that can be much thinner. The top node is meant to follow the curve of the bottom node — a kind of thick arc, maybe?) I also want to put some text in both nodes (in the top node, it would be nice for the text to follow the curve.) But, the text is not necessary. Is this possible in Tikz? ![enter image description here](http://i.stack.imgur.com/lrdsV.png)


title: Remove the unnecessary white space between figures and the sentences

text: This is the command I used to have the figures.               \begin{figure}[h]         \centering         \includegraphics[scale=0.2]{ch5}         \caption{lalalalal}         \label{llaa}                    \end{figure}      However, there will too much gap between the last sentence of the paragraph before the figure and the figure. How do I omit it?


title: TikZ: plot datapoints with bars

text: I'm currently generating data files which have points as follows               5 1     3 2     2 1.4     ...      Each line 2 values of which the first is indicating the time and the second some value. I'm currently (as I'm working on the problem) plotting with gnuplot which works pretty well. I'm very new to TikZ and I was wondering how to get the data files in a plot where each datapoint is representated by a bar which I can put in my paper. Also I have another file that look something like this.               4.7 "some annotation"     3.4 "some other annotation"     ...      I use these to annotate roughly each measurement. I would obviousle need to correct the x-coordinate (as this is the time and the measurement is not so precise) but I would like to somehow anotate each of the bars in the plot.


title: Picture or text below (and part of) the number of an enumerated item

text: It's my problem, I don't know how to do picture or text, bottom in enumerate number. Therefore I couldn't write code, even. Bottom in enumerates have one picture or/and two picture or/and mini text. I didn't find duplicate another question. So, does anyone know how to fix it? Changed Citation: _Fundamentals of Electric Circuits 4th ed - C. Alexander, M. Sadiku (McGraw-Hill, 2009) page 444_ ![enter image description here](http://i.stack.imgur.com/QndBz.png)


title: Preventing atoms from changing kind

text: In the example below, the presence of `\mycommand` changes the first minus sign into a binary operation atom, so that the spacing between `-` and `1` is increased.               \documentclass{article}     \newcommand\mycommand{\mbox{ abc } }     \begin{document}     \[     \mycommand -1 = -1     \]     \end{document}      I know that this can be dealt with on a case by case basis, but I would like to change the macro definition so that the first atom after a `\mycommand` behaves as if it were the first atom in the equation. Is this possible?


title: Increase white space between title and subtitle in scrartcl

text: As the title says, how do I increase the space between the title and the subtitle in the `scrartcl` document class?


title: Indenting lines in an index

text: I'm typesetting the index for a book. When an entry covers more than one line I would like the lines after the first to be indented some small amount. Is there a simple way to do it by playing with the way paragraphs are indented? Here's a MWE:               \documentclass[a4paper,10pt]{book}          \usepackage[top=53mm, bottom=45mm, left=40mm, right=40mm]{geometry}          \begin{document}          \noindent arithmetic [VOL I] V, VII-VIII, IX, XIII, 1, 3-4, 39 fn.\,1, [VOL II] 70 fn.\,1, 73, 77-78, 83-84, 86-88, 95, 97-104, 109, 117,  119, 123-125, 139, 139 fn.\,2, 141-142, 146-147, 149, 151-152, 154, 155 fn.\,1, 156-157, 162, 168, 253, 255, 257, 265.\\          \end{document}      I'd like to indent at 83-84 and 151-152. The point is I would like it to happen automatically for a long index rather than add space by hand.


title: Expand page to use full page height with fancyhdr

text: I use `fancyhdr` package and would like to print a large float that exceeds the textheight. Hence I would like to remove the headers and footers. And have the float verticaly centered. I tried               \thispagestyle{empty}     \enlargethispage{10\baselineskip}     \newgeometry{left=3cm,left=3cm,bottom=0.5cm,top=0.5cm}     {     \thispagestyle{plain}     \begin{figure}[!htbp]%         \centering         \includegraphics[height=.7\textwidth,angle=90]{tables/tab_results.pdf}         \label{tab:results}%         \captionof{table}{Result table.}%         \label{tab:ana-res}%     \end{figure}     }     \restoregeometry      But the float does not get lower than the (invisible) footrule. Any ideas?


title: Remove indentation from a colored box made with tikz

text: I have a document which looks like this: ![enter image description here](http://i.stack.imgur.com/uhPRf.png) Code is like this:               \documentclass[10pt]{memoir}     \usepackage{lipsum}     \usepackage{tikz}          \usetikzlibrary{shapes,backgrounds,patterns}     \tikzstyle{box} = [align=center, text width=12.4cm, draw=blue, fill=blue, rectangle, rounded corners,                         inner sep=5pt, inner ysep=5pt]          \begin{document}       \lipsum        ~\\       \begin{tikzpicture}       \node[box](box){\color{white}\textbf{white text on blue background}};       \node[shape=circle,fill=white,inner sep=2mm] at (box.west) {};       \node[text=blue,right=-3pt] at (box.west) {\textbf{1}};       \end{tikzpicture}       ~\\       \lipsum      \end{document}      I'd like the `tikzpicture` not to be indented and to be vertically aligned with the text. I tried with `\noindent` before `\begin{tikzpicture}` but it doesn't seem to work ... Any suggestion?


title: Compiling a given latex file

text: I'm trying to compile BPI.tex here because, as you can see, the given compiled file has the lower end of each page cut off. The problem is: I get lots of "undefined control sequence" errors but if I cut the paragraph containing the error, delete aux and log files, quit TexShop and then recompile, I get the same error on the same line even if the line is then blank (since I cut it out). What is going on here? Is TexShop broken? Why does editing the file not have any effect? And how can I compile this file?


title: How to align the top lines of frames?

text: I want to align the top lines of the left and right frames. How to do it? ![enter image description here](http://i.stack.imgur.com/iuXa6.png)               \documentclass[12pt]{book}     \usepackage[a4paper,margin=25mm,showframe=true]{geometry}     \usepackage{xcolor}          \usepackage{accsupp}     \newcommand*{\noaccsupp}[1]{\BeginAccSupp{ActualText={}}#1\EndAccSupp{}}          \usepackage{showexpl}          \lstset     {         language={[LaTeX]TeX},         alsolanguage={PSTricks},         numbers=left,         numbersep=1em,         numberstyle=\tiny\color{red}\noaccsupp,         frame=single,         framesep=\fboxsep,         framerule=\fboxrule,         rulecolor=\color{red},         xleftmargin=\dimexpr\fboxsep+\fboxrule\relax,         xrightmargin=\dimexpr\fboxsep+\fboxrule\relax,         breaklines=true,         basicstyle=\small\tt,         keywordstyle=\color{blue},         %identifierstyle=\color{magenta},         commentstyle=\color[rgb]{0.13,0.54,0.13},         backgroundcolor=\color{yellow!10},         tabsize=2,         columns=flexible,         explpreset={pos=r},         morekeywords={             graphicspath,             includegraphics,         },     }                         \begin{document}     \LTXexample     How to align the top lines of frames?\\     How to align the top lines of frames?     \endLTXexample     How to align the top lines of frames?     \LTXexample     How to align the top lines of frames?\\     How to align the top lines of frames?     \endLTXexample     \end{document}      Note: `accsupp` only works when this input file is compiled with either `xelatex` or `pdflatex`. Compiling it with `latex` followed by `dvips` and `ps2pdf` will not produce a PDF output that allows us not to copy the line numbers.


title: All LaTeX commands list

text: I'm writing a LaTeX commands highlighter in C#, for this I need all or most of the LaTeX commands. I've searched the web and found many lists of commands but all of them are with comments and explanations that I don't need. Before I'll spend entire week deleting the unnecessary comments leaving only the commands. I would like to ask you, is there somewhere a simple text list of the commands, like this:               ...     \backslash     \bar     \baselineskip     \baselinestretch     ...


title: minimum steps to re-generate MF fonts

text: I started studying metafont. I created some basics MF, with a single char. I would like to modify existing font, but I see no 'makefile' that I can just use to tell the system 'just regenerate all the files', even if I altered `romanu.mf` and re-created a PDF via a .TeX file. I want to avoid if possible all the manual command lines. I tried `mf` and `initexmf` and various command lines but couldn't find such a shortcut. I don't want to edit externally a TTF or OTF, as I think defining fonts with a programming language is great. any idea?


title: What's the difference between align and align*?

text: After some brief searching I can't find the difference between `align` and `align*`. Google summarily ignoring the * is making it harder I think. Can you tell me the difference between these two? Moreover, can you tell me where you generally go for this type of information? As a relatively new user I'm still building up my resources.


title: Why does my graphics flows out of the box?

text: I'm new to LaTeX, and have been struggling with what I think should be simple. I want to create a box with a blue border and yellow interior. Inside of the box should be a graphic on the left, and text on the right. Seems simple, and I have gotten it to work, but this will be generated from a database, so text length is variable. It currently works if after the text I add vspace to fill out the box to the height of the graphic. Otherwise, the box is only the height of the text, and the image spill out the bottom. The code I am using is:               \noindent{\fboxsep=.3pt\framebox{\colorbox{newyell}{     \parbox{\textwidth}{     \begin{wrapfigure}{l}{0.4\textwidth}     \vspace{-35pt}     \begin{center}     \includegraphics[width=0.35\textwidth]{img_0236.jpg}     \end{center}     \end{wrapfigure}          \phantom{0}\textcolor{blue}{     {\bf Test:}\ My test line\newline     \phantom{0}\ this is a tesrt\newline     \phantom{0}\ this is a tesrt\newline     \phantom{0}\ this is a tesrt\newline     \phantom{0}\ this is a tesrt\newline     \phantom{0}\ this is a tesrt\newline     }     }     %\vskip80pt     }}}     }      If I enable the `\vskip`, the box is the right size, otherwise it is too short. Since it comes from a database with variable length text, I can't hard code a value. What am I doing wrong?!?!?


title: TikZ fit nodes with non-regular shape

text: I am seeking a better way of doing the following: fitting nodes with a non regular shape, like it is in the MWE. So that I can give a label to the fitted nodes.               \documentclass{standalone}          \usepackage{tikz}     \usetikzlibrary{positioning}          \tikzset{any/.style={draw,shape=rectangle}}     \tikzset{nxs/.style={xshift=-2mm}}     \tikzset{pxs/.style={xshift=2mm}}     \tikzset{nys/.style={yshift=-2mm}}     \tikzset{pys/.style={yshift=2mm}}          \begin{document}          \begin{tikzpicture}     \node [any] (n1) {N1};     \node [any,right=of n1] (n2) {N2};     \node [any,above=of n2] (n3) {N3};          \draw ([nxs,pys]n1.north west) -- ([nxs,pys]n2.north west) -|            ([nxs,pys]n3.north west) -- ([pxs,pys]n3.north east) -|            ([pxs,nys]n2.south east) -- ([nxs,nys]n1.south west) -- cycle;          \node [yshift=4mm] at (n1.north) {Cluster};           \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/xTPKM.png)


title: Changing side of line numbering in two columns documents

text: I'm trying to type some report and I have a small problem with the twocolums document class and the line numbering in listings. The document is on two columns :               \documentclass[8pt,[...],a4paper,twocolumn]{article}      The listings can end up either on the left or the right column. The problem is: if I put               \lstset{numbers=left,frame=tb,[...]}      the space between the columns is not sufficient when the listing is on the right column and the text from the first column is written over. Is there any way to ask the listings to put the line numbers "outside" ?


title: Can I have a list of all fonts available in plain TeX?

text: I need a list such as: `cmr`, `cmss`, `cmsl`, `cmtt`, ... Where can I find it? (Do the available fonts depend on the TeX installation or are the same everywhere?)


title: How to typeset the subscript of a matrix?

text: What is the correct way to typeset a matrix or vector with subscript/index? Should the index be part of the vector with the Variant 1:               \vec{x}_i \mat{A}_i %\mat being defined as upright bold      Variant 2:               \vec{x_i} \mat{A_i}      And what about a superscript (like T for transpose)? Let's say `\vec{x}` is a column vector that I want to show as being transposed. How should the T be typeset? Should it be inside or outside the `\vec` command? Variant 1:               \vec{x}_i^T      Variant 2:               \vec{x_i^T}      _EDIT_ : This part of the question originally asked, whether `^T` is the right way of expressing transposition of a matrix/vector. This is being answered by What is the best symbol for vector/matrix transpose?. * * * MWE:               \documentclass{article}     \newcommand{\mat}[1]{\mathbf{#1}}     \begin{document}     Variant 1:     $\vec{x}_i \mat{A}_i$           Variant 2:     $\vec{x_i} \mat{A_i}$          Superscripts: \\     Variant 1:     $\vec{x}_i^T$          Variant 2:     $\vec{x_i^T}$     \end{document}