title: Issue on changing style in LaTeX

text: Currently I have a TeX document, written using _sig-alternate.cls_ class file. I need to change it and use _llncs.cls_. However, when I attempt to compile the document with the class changed, I get the following error:               ! Undefined control sequence.     <recently read> \mathbb       If I comment the corresponding line, it gives an error on the next one:               ! Undefined control sequence.     <recently read> \rightarrowtail       and so on, deprecating me of several mathematical symbols' usage, which seems strange to me - aren't `\mathbb` and `\rightarrowtail` standard keywords in TeX? And how can it be that some style file prevents me from using them? I have checked this on a simple example:               \documentclass{llncs}     \begin{document}     $\rightarrowtail$     \end{document}      This leads to an error, but when I change the `documentclass` to _sig- alternate.cls_ , everything works well. Also, if I write a simple document with _llncs.cls_ without usage of these symbols, everything is OK too. I will be very grateful for your help. Thanks in advance.


title: How make \parshape declared inside an environment to apply the next paragraph outside the environment?

text: I'm trying to do something like the MWE below:               \documentclass{article}     \usepackage{lipsum}          \newenvironment{myenv}{%       \parshape = 4         0pt 0.5\textwidth         0pt 0.5\textwidth         0pt 0.5\textwidth         0pt \textwidth     }{}          \begin{document}          \begin{myenv}     \end{myenv}%     \lipsum[1]          \end{document}      I need the `\parshape` declared inside the `myenv` environment to apply to the next paragraph that follows the `myenv` environment. But obviously it doesn't do that right now. Is there anyway of getting that to work?


title: Figure-macro with TikZ: account for y-axis labels

text: How can I account for the space taken by the y-axis labels? Can I somehow `\setbox` the axis labels, or something similar? Because now, the y-axis labels stick out of the text block width (because I have not been able to account for them). Macro:               \newcount\itemcount \newcount\maximumvalue     \def\chartfour#1#2#3#4#5{%       % 1. divide the given width (#1) with the number of items (#2)       % 2. divide the result (width of item) with the number of bars       % 3. shift the bars       % 4. TODO: account for the y-axis labels       \itemcount=0       \maximumvalue=0       \tikzpicture[yscale=#4,xscale=#5]         \foreach \x/\y/\z/\t/\p in {#2}{           \global\advance\itemcount by1           \pgfmathparse{max(\maximumvalue,\y)}           \pgfmathparse{max(\pgfmathresult,\z)}           \pgfmathparse{max(\pgfmathresult,\t)}           \pgfmathparse{max(\pgfmathresult,\p)}           \global\maximumvalue=\pgfmathresult         }         \pgfmathparse{#1/\itemcount}\let\itemwidth=\pgfmathresult         \pgfmathparse{sqrt(\itemwidth)}\let\barwidth=\pgfmathresult         \itemcount=0         \pgfmathparse{(\maximumvalue+1*#3)/#3}\let\ytop=\pgfmathresult         \useasboundingbox (0,-\baselineskip) rectangle (#1,\ytop);         \foreach \y in {0,1,...,\ytop}{           \pgfmathparse{int(\y*#3)}\let\label=\pgfmathresult           \draw[help lines] (0,\y) -- +(#1,0);           \node[left,inner xsep=0pt,outer xsep=0pt] at (-0.2,\y) {\label};         }         \foreach \x/\y/\z/\t/\p in {#2}{           \global\advance\itemcount by1           \pgfmathparse{\itemcount*\itemwidth-\itemwidth/2 pt}\let\xpos=\pgfmathresult           \pgfmathparse{\y/#3}\let\yheight=\pgfmathresult           \draw[xshift=-\barwidth*1.5,ycomb,color=blue,line width=\barwidth]             plot coordinates{(\xpos pt,\yheight)};% node[above] {\y};           \pgfmathparse{\z/#3}\let\zheight=\pgfmathresult           \draw[xshift=-\barwidth/2,ycomb,color=red,line width=\barwidth]             plot coordinates{(\xpos pt,\zheight)};% node[above] {\z};           \pgfmathparse{\t/#3}\let\aheight=\pgfmathresult           \draw[xshift=\barwidth/2,ycomb,color=green,line width=\barwidth]             plot coordinates{(\xpos pt,\aheight)};% node[above] {\t};           \pgfmathparse{\p/#3}\let\bheight=\pgfmathresult           \draw[xshift=\barwidth*1.5,ycomb,color=magenta,line width=\barwidth]             plot coordinates{(\xpos pt,\bheight)};% node[above] {\p};           \node[below] at (\xpos pt,0) {\x};           }         \draw (#1,0) -- (0,0) -- (0,\ytop);       \endtikzpicture     }      Usage:               \noindent\chartfour{1\hsize}{       2000/21/8/6/5,       2001/26/10/7/6,       2002/20/8/3/0,       2003/23/8/5/2,       2004/25/12/0/1,       2005/19/10/9/5,       2006/53/30/30/1,       2007/70/16/10/4,       2008/48/2/4/1       }{20}{.8}{1}     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse nec nisi     arcu. In rutrum felis eget neque posuere sodales. Aenean interdum diam sed nisi     condimentum semper. Suspendisse quis urna imperdiet quam malesuada sagittis ut     sed velit. Suspendisse cursus tincidunt dui pharetra varius. Aliquam mollis     lacus ac diam gravida quis venenatis lacus suscipit. Cras et nisl est, aliquam     iaculis ligula. Nulla consequat, odio a adipiscing lacinia, leo lectus feugiat     dui, a molestie sapien massa sit amet magna. Duis commodo lectus sit amet     tellus tempus mollis. Duis nec tortor id enim suscipit porttitor ac et libero.     Duis urna turpis, lobortis quis pretium nec, scelerisque eget est. Praesent     malesuada dapibus urna sed porttitor.          Ut tincidunt venenatis nisl ac faucibus. Curabitur quis pellentesque leo. Donec     at odio ac neque mollis vestibulum eget sed elit. Morbi hendrerit pulvinar     ligula, nec sagittis est tempus vel. Nulla non purus et sapien egestas     elementum et a tellus. Nullam tempor pulvinar ornare. Fusce neque nisl, viverra     at tincidunt quis, elementum vitae arcu. Sed lectus magna, adipiscing et cursus     non, facilisis at dolor. Aenean luctus mattis mauris, vitae sodales urna     ultricies eget. Fusce nec elit in nulla condimentum pretium nec vel metus.     \raggedbottom\bye      **EDIT:** Following on the advise of being able to `\setbox` the labels, I tried several things; first, I tried to `\setbox` inside the tikzpicture, only to realize that TeX can't know anything about the width of the box until tikz is done. Then I made the following shortened macro to "dry-run" first to get the y-axis label width:               \input tikz     \newcount\itemcount \newcount\ymax \newcount\ytop     \newdimen\ylabelwidth \newdimen\totalwidth     \smash{\vrule depth\vsize height 0pt}     \def\chartfour#1#2#3#4#5{%       \itemcount=0 \ymax=0 \ytop=0 \totalwidth=#1       \setbox0\hbox{\tikzpicture[yscale=#4,xscale=#5]         \foreach \a/\b/\c/\d/\e in {#2}{           \global\advance\itemcount by1           \pgfmathparse{max(\ymax,\b)}           \pgfmathparse{max(\pgfmathresult,\c)}           \pgfmathparse{max(\pgfmathresult,\d)}           \pgfmathparse{max(\pgfmathresult,\e)}           \global\ymax=\pgfmathresult         }         \pgfmathparse{(\ymax+1*#3)/#3}\global\ytop=\pgfmathresult         \foreach \y in {0,1,...,\ytop}{           \pgfmathparse{int(\y*#3)}\let\ylabel=\pgfmathresult           \node[left,inner sep=0pt,outer sep=0pt,fill=red]             at (0,\y) {\ylabel $\;$};         }         \endtikzpicture}       \ylabelwidth=\the\wd0       \box0 \the\ylabelwidth     }      Which produces:   ![](http://i.stack.imgur.com/ndoYp.png) So even after all this trouble, there appears to be some mystery whitespace left of the label. Where does it come from?


title: No bookmarks with revtex 4-1

text: I used the following sample codes to produce bookmarks in the compiled PDF files. It turned out that on the left side of the PDF file, the only bookmark is the title. However, if I change the `revtex4-1` to `revtex4`, I can see the three bookmarks for the three sections. Who can help me out? thanks!               \documentclass[article]{revtex4-1}           \usepackage{amssymb,amsbsy,bm,amsmath,psfrag,dsfont}          \usepackage[bookmarks]{hyperref}          \usepackage{graphicx}          \usepackage{epsfig}          \usepackage{natbib}          \begin{document}          \title{title}          \author{blabla}          \date{\today}          \begin{abstract}          dfaf          \end{abstract}          \maketitle          \section{aaaa}          \section{bbbb}          \section{cccc}          \end{document}


Is there a way to insert usual "Chapter" before chapter number in Tufte classes, such as "Chapter 1" etc?


title: Interactive PDF, Latex and Article of the Future

text: Influenced by Elsevier's Article of the future and this blog post where someone writes an article with Apple's iAuthor and gets many functionalities (clicking on references show a balloon with the given reference, or previous definitions and theorems, etc...). I am conscient of the existence of acrotex and the many hyper-referencing capabilities it offers, quizzes, etc, but can something like these "floating balloons" can be implemented in pdf with latex? It would be interesting as having a free substitute for Apple software is always a good idea.


title: Typesetting special table formats

text: I want to typeset Flynn’s taxonomy:                        | Single      | Multiple              | instruction | instructions     ---------+-------------+--------------     Single   |             |     data     |    SISD     |    MISD     ---------+-------------+--------------     Multiple |             |     data     |    SIMD     |    MIMD      using LaTeX (tables?). Alas, my attempts at consistent spacing fail abysmally.               % Requires package sideways.     \begin{tabular}{cc|c|c}       & & Single & Multiple \\       & & instruction & instructions \\       \hline       \begin{sideways}Single\end{sideways} & \begin{sideways}data\end{sideways} & SISD & MISD \\       \hline       \begin{sideways}Multiple\end{sideways} & \begin{sideways}data\end{sideways} & SIMD & MIMD     \end{tabular}      Ideally, I would like for all four quadrants to be the same size, and (of course) the text to be centered. Also, the table headers should have some semblance of coherent layout (equal spacing, height of top headers equal to width of side headers). But all I get is this: ![Botched diagram](http://i.stack.imgur.com/MdWi1.png) Which has, in summary:   * No centered left headers   * Too large spacing in left headers   * No vertically centered content   * Non-square table cells for the four main content cells. What’s the best way of doing this in LaTeX? I feel that TikZ would be an inexcusable overkill but I don’t know how to do it even there and I’d be obliged for any hints.


title: Get all intersection points in MetaPost

text: On MetaPost, I can use `p intersectionpoint q` to get a intersection point. But It will only return one point. How can I get all intersection points?


title: Icon Change in PDFComment

text: Whether it possible to change the pre-defined icon to any user defined symbol in PDFcomment package. Eg: I would like to load a arrow from symbol font or some other font as icon and then it used be click to open the comment.


title: Error message about an invalid utf-8 sequence (LuaLaTeX on a Mac)

text: I am using LuaLaTeX on a Mac and I want to have my PDF in Calibri font. I have issues with Umlauts.               \documentclass{minimal}      \usepackage{fontspec}     \setmainfont{Calibri}          \begin{document}     äöüß     \end{document}      This is the error message that I receive:               String contains an invalid utf-8 sequence.      If I escape the Umlauts, it works. However, his is very annoying and there should be an easier way to do it.               \"a \"o \"u \s{}      What package do I need to include to get Umlauts working without having to escape them?


title: Redefine \textsc for slightly large small caps

text: In most fonts, the small caps are as tall as the x-height, but this looks weird when you want to tack an 's' onto the end of an abbreviation to make it plural (discussed in depth on typophile). I can create a new command `\textmc` (for _moyen_ caps) to do this easily:               \usepackage{scalefnt}     \newcommand{\textmc}[1]{\textsc{\scalefont{1.1}#1}}      But I'd prefer to just redefine `\textsc`. The approach that I was taking, however, seems to give me an infinite loop as it flips back and forth between defintions:               \newcommand{\oldtextsc}[1]{\textsc{#1}}     \renewcommand{\textsc}[1]{\oldtextsc{\scalefont{1.1}#1}}      Any advice on how to redefine a command which calls the original definition?


title: sidewaysfigure error when adding a caption

text: I'm trying to include a uml diagram, which as it's quite large i'd like to rotate. However, if I try and add a caption I get an error and it won't build. I'm adding the figure like this:               \usepackage{rotating}     ...     \begin{sidewaysfigure}     \centering     \includegraphics[scale=0.6]{clientUML.eps}     \label{fig:clientUML}     \caption{UML for client}      \end{sidewaysfigure}      And I get this error:               <clientUML.eps>     ! Undefined control sequence.     \@tempf ... \@parboxrestore \normalsize \@fs@capt                                                        {\@nameuse {fnum@#1}}{\ign...     l.87 \caption{UML for client}      Any ideas? It works if I take the caption line out - but I need to include on. Thanks in advance. EDIT: I also have this in my preamble - I need boxes round my figures:               \usepackage{float}     \floatstyle{boxed}      \restylefloat{figure}


title: xeCJK l3-too-old

text: I started using XeTeX and whenever I use the xeCJK package I get the following error:               ! Critical xeCJK error: "l3-too-old" !     !     ! Support package 'expl3' too old.     !     ! Please update an up to date version of the bundles     ! 'l3kernel' and 'l3packages'     ! using your TeX package manager or from CTAN.     ! Loading xeCJK will abort     !     ! See the xeCJK documentation for further information.     ! For immediate help type H <return>.      I have updated my entire repository already several times, refreshed my FNDB and so forth but the error keeps popping up and no CJK text appears in my output file. I am using MikTex 2.9 under Windows 7 Ent 64 Bit. here is a minimal example:               \documentclass[a4paper,oneside,12pt,bibliography=totoc]{scrartcl}     \usepackage[british]{babel}     \usepackage{xeCJK}     \usepackage[autostyle]{csquotes}     \begin{document}     今日は！     \end{document}


title: Does a single \path for drawing a series of geometrical objects make the compilation more efficent?

text: The TikZ syntax is so liberal (as mentioned in the documentation) that makes me a bit confused with which I have to adopt. Best practice is really my main consideration in coding anything. I have no knowledge of the internal details how TikZ parses the input source code during the compilation. Please consider the following 2 cases.   1. With a single `\path` command for a series of geometrical objects.              \path     (0,0) circle (1) [draw]     -- (1,1) node[above] {x}     +(1,-1) rectangle ++(2,2)[draw];        2. With a single `\path` command for each object.              \draw (0,0) circle (1);     \draw (0,0) -- (1,1) node[above] {x};     \draw (1,1) +(1,-1) rectangle ++(2,2);      Does a single `\path` in the first case make the compilation more efficent (compared to the second case)? How about the produced PDF, is there any difference in file size? Of course I agree with the following quote. > Writing what is clearer to the reader of the code is a best practice. But, let's throw it away temporarily as the readability issue is more subjective than performance impact.


title: How is the philosophy conclusion symbol drawn?

text: Looks like this: ![Conclusion](http://i.stack.imgur.com/xHtsX.png) (Maybe called "therefore"?) * * * Also, what's a good guide for philosophy symbols in LaTeX? Edit: Looked up http://osl.ugr.es/CTAN/info/symbols/comprehensive/symbols-a4.pdf for "conclusion", "therefore" and "philosophy", and it's not what I'm looking for. Edit 2: No, in page 35 what appears is not what I'm looking for. This symbol is drawn before the "conclusion" sentence in Philosophy, so it would be:               premise1     premise2     \conclusion conclusion      Edit 3: According to http://www.artofproblemsolving.com/Wiki/index.php/LaTeX:Symbols , `\vdash` is the symbol I need, But I'm not able to insert it into a sentence like this:               \vdash conclusion      It tells me:               Missing $ inserted.     Missing \endgroup inserted.     Lonely \item--perhaps a missing list enviroment.     \begin{document} ended by \end{enumerate}     Extra \endgroup      If I remove `\vdash` from the line it's inserted to, all these errors disappear and the document compiles correctly. Maybe I'm missing a package?


title: Nested indentation of text blocks

text: How can I doubly indent some lines of text? The general idea is...               Normal     Once indented     Once indented     Twice indented      Once indented     ...      The following is my attempt but it only indents once.                 for each $v \in win$\\          \addtolength{\leftskip}{1cm}     if ($pl(v) = 1 \& \exists (v,v') \in E : v' \in win$)\\     {\addtolength{\leftskip}{1cm}$win \cup= v; st \cup = \{v \rightarrow v'\}$}\\     if ($pl(v) = 2 \& \forall (v,v') \in E : v' \in win$)\\     {\addtolength{\leftskip}{1cm}$wim \cup= v;$}\\     if ($pl(v) = 2 \& \exists (v,v') \in E : v' \in lose$)\\     {\addtolength{\leftskip}{1cm}$lose \cup=v$;}\\      Could someone please tell me a better way of doing this, and/or why my attempt doesn't work? Many thanks.


title: How to set prenote for \cite globally using biblatex?

text: How can I set prenote for `\cite` globally with the possibility to pass an individual option via optional parameter to a single `\cite` command? It should work like this:               \cite{key} --> \cite[see][]{key}     \cite[otherSuffix][]{key} --> \cite[otherSuffix][]{key}


title: PDF Math error with stock moderntimeline commands

text: I am trying to use the moderntimeline package for moderncv but pdflatex is giving me errors. All .sty files are stock. Here is a simple code that produces the error for me.               \documentclass{moderncv}          \usepackage{moderntimeline}     \moderncvtheme{classic}     \tlmaxdates{2007}{2012}          \firstname{Lorem}     \familyname{Ipsum}          \begin{document}     \tllabelcventry[magenta]{2002}{2003}{July--November 2002}{Scribus Student}{GNU School}{The Internet}{}{Tried Scribus for a short while}     \end{document}      The error from the log reads `! Package PGF Math Error: Unknown function 'ifthenelse'.` Here's what the PDF looks like: ![image](http://i.stack.imgur.com/RSbDB.png)


title: Glossaries without {glossaries}

text: It appears to be somewhat tedious work to use the glossaries package and I prefer not having an explicit dependency on Perl scripts to process my LaTeX documents. So what I would ask is, how can one format a glossary nicely, without resorting to using the glossaries package? I guess something between how a subparagraph looks but with tabular alignment. LaTeX newbie here. :-)


title: tabularx "Missing number, treated as zero" error

text: error: ! Missing number, treated as zero. } l.16 \begin{tabularx}{\textwidth} {x x x x} MWE:               \documentclass[12pt,a4paper,fleqn]{book}     %     \usepackage{subfiles}     \usepackage{thesis_style}            \title{hfvj}       \author{fgikf}       \date{}             \begin{document}          \begin{table}[h]     \caption{nice and looooooooooooooooong caption}     \begin{center}     \begin{threeparttable}     \begin{tabularx}{\textwidth}{XXXX}     Reference  & hi;& glt;& flfl \\     \citet{TM83}  & rlkul $\delta^ugil$ and $\delta^{13}C$  & Winter season  & -0.5  ($\delta^ugil$)  \\           &       &       &   0.6 {($\delta^{49}Ca$)}  \\     \citet{BMM94}  & $\delta^ugil$  & January  & -0.44 \\     \citet{BMM94}  & $\delta^ugil$  & vsdewfwgrggbr & 0.44 \\     \citet{TM83} & YRO KJL & rwegfwEFGWER GWEGFLNN FDSLNFLNFL FLNF NFSDNFNF  & 0.44-0.57\tnote{*}  \\     \citet{BMM94} & jo\rq{}h;hk; & mhljk;lyi; & 0.43-0.80\tnote{*}  \\     \end{tabularx}%     \begin{tablenotes}     \item[*]dSGhl;i\rq{}iupf,hjl \\ \item[**] fdhfg     \end{tablenotes}     \end{threeparttable}     \end{center}     \label{precirec-table1}     \end{table}         \end{document}      the very complicated custom style file:               \ProvidesPackage{thesis_style}     %     %%% PAGE DIMENSIONS AND SETTINGS     \usepackage{geometry} % to change the page dimensions     \geometry{a4paper} % or letterpaper (US) or a5paper or....     \geometry{top=1.0in, bottom=1.5in, left=1in, right=1in}     %%spacing between lines     \setlength{\parskip}{0.2cm plus1mm minus1mm}%space between paragraphs     \usepackage[nodisplayskipstretch]{setspace}%option for removing space before and after equations     \doublespacing     % Activate to begin paragraphs with an empty line rather than an indent\usepackage[parfill]{parskip}      %     %%%%     %%%%GRAPHICS, FLOATS, SYMBOLS AND MATHS     % support the \includegraphics command and options     \usepackage{graphicx}      %\usepackage{booktabs} % for much better looking tables     \usepackage{floatrow}%for side captions     \usepackage[utf8]{inputenc}%for proper characters     % for rotating floats     \usepackage{lscape}     %for subfigures and tables     \usepackage[font=small,labelfont=bf]{caption}     \usepackage[font=footnotesize]{subfig}     \usepackage[para,online,flushleft]{threeparttable}     %for long tables     \usepackage{longtable}     \usepackage{amsmath,amssymb}     %%     %\usepackage[hyphens]{url}%url wrapping     %\PassOptionsToPackage{hyphens}{url}     \usepackage[allcolors=blue,colorlinks=true]{hyperref}%no boxes for links     \usepackage[noabbrev,capitalize]{cleveref}%automatic table /figure before refs     \creflabelformat{equation}{#2\textup{#1}#3}%remove brackets around eq nos     %%%     \usepackage[osf,sc]{mathpazo} %for upright math     \usepackage{eulervm}     \usepackage{gensymb}     \usepackage{wasysym} %for per mil sign     \usepackage{array} % for better arrays (eg matrices) in maths     \usepackage{paralist} % very flexible & customisable lists (eg. enumerate/itemize, etc.)     \usepackage{verbatim} % adds environment for commenting out blocks of text & for better verbatim     \usepackage{subfig} % make it possible to include more than one captioned figure/table in a single float     \usepackage[version=3]{mhchem} % for upright CO2 etc     \usepackage{wrapfig}%text wrapped figures/tables     %%%%%     %%%%%FONT SETTINGS     \usepackage{calligra}%For cursive font     \usepackage[T1]{fontenc}     \usepackage{titlesec, blindtext, color}     \definecolor{brown}{rgb}{0.5, 0.2, 0.0}     \definecolor{cornellred}{rgb}{0.7, 0.11, 0.11}     \definecolor{brown_w}{rgb}{0.65, 0.16, 0.16}     %\titleformat{\chapter}[hang]{\Large\bfseries}{\thechapter\hsp\textcolor{gray75}{|}\hsp}{0pt}{\Large\bfseries}     \titleformat{\chapter}[hang]{\normalfont\Large\bfseries}{\chaptertitlename\ \thechapter:}{1em}{}      \titlespacing*{\chapter}{0pt}{0pt}{5pt}     \titlespacing*{\section}{0pt}{0pt}{5pt}     %to stop starting new chapter in new page     \usepackage{atbegshi,etoolbox}     %% Get underlining for headings right     \usepackage[normalem]{ulem}     %%% HEADERS & FOOTERS     \usepackage{fancyhdr} % This should be set AFTER setting up the page geometry     \setlength{\headheight}{50pt}      \pagestyle{fancy} % options: empty , plain , fancy     \fancyhead{}     \renewcommand{\headrulewidth}{1pt} % customise the layout...     \renewcommand{\footrulewidth}{1pt}     \lhead{\slshape\nouppercase{\leftmark}}\chead{}\rhead{}     \lfoot{}\cfoot{}\rfoot{\thepage}     %     \def\bibfont{\footnotesize} %to decrease font size of the bibliography     %%%     %%% ToC (table of contents) APPEARANCE     \usepackage[nottoc,notlof,notlot]{tocbibind} % Put the bibliography in the ToC     %%%%     \setcounter{tocdepth}{4}     \renewcommand{\bibname}{References}     %%%%%%%     %     \usepackage[colon,authoryear]{natbib}     %     %mytilde     \newcommand{\mytilde}{\raise.17ex\hbox{$\scriptstyle\mathtt{\sim}$}} %around tilde


title: How to export changes from a .tex file back to the source .Rnw file

text: Let's say my work-flow is writing a paper with multiple `R` chunks as a `.Rnw` then compiling it into a `.tex` file and then typesetting it into the final document. Now, after the document has been compiled into a `TeX` file I usually like to do my edits directly in there, without going back to the source `.Rnw`. But then if at some point I need to recompile the whole `TeX` file (let's say my data has changed) I need to painstakingly check for all the differences between the texts of the two versions. Problem is that simply comparing the two files (i.e. `M-x diff` in `Emacs`) will return too many differences to be useful. Would it be possible to check and automatically update only the text of the `.Rnw` file excluding all the markups and chunks?


title: Nested node class with pictogram decoration

text: I'm wondering how can I define custom TikZ node class `mynode` thats allows my to use following syntax:               \node [mynode,fill=yellow!40] {component}           \child{                \node [mynode,fill=yellow!40] {subcomponent}           };      and gives following result: ![resoult](http://i.stack.imgur.com/dLlmE.png)


title: Specifying ymin in pgfplots misalignes images vertically

text: I have two plots drawn with the `\pgfplots` package. In one of them, I specified that `ymin=0` when I created the `axis` since the plotted curve never goes below y=0 (otherwise something like `ymin=-0.2` would be used). However, when I put both of the plots into two `\subcaptionbox`es that I put in the same `figure` environment, it becomes apparent that this plot has become raised up, since the frame is much higher up for that plot than the frame for the other plot: ![enter image description here](http://i.stack.imgur.com/Xn8hg.png) How can I prevent `\pgfplots` from raising up the plot when I specify (hence increasing?) the value of `ymin`? I want the frames of both plots to be aligned vertically.


title: Greek letters appearing lower in equations

text: I have noticed that my equations containing Greek letters, especially `\chi` looks like letter chi is somehow 'down'. For instance               \documentclass[a4paper,12pt]{article}          \usepackage[utf8]{inputenc}     \usepackage{ucs}     \usepackage[T1]{fontenc}     \usepackage{natbib}     \usepackage[usenames,dvipsnames,svgnames]{xcolor}     \usepackage[pdfpagelabels, colorlinks=true, urlcolor=DarkOrchid, citecolor=ForestGreen, linkcolor=MidnightBlue, hypertexnames=false]{hyperref}          \begin{document}              $\chi_{\left[\mu\right.}\nabla_\nu \chi_{\left.\sigma\right]}=0$          \end{document}      Gives this ![enter image description here](http://i.stack.imgur.com/Ak8H8.jpg) Why is that, and could that be fixed? I mean, if you look at nabla and chi, they are clearly not aligned on the bottom. In fact now that I look at it, it seems that `\nabla` is the one that's not aligned good :\ EDIT: The answer by egreg works :)


title: Broken Arrow in Lucida Bright Font

text: When I attempt to use any kind of "long" arrow in the Lucida Bright font, it ends up coming out broken. For a MWE Consider the following:               \documentclass[10 pt]{article}          \usepackage{amsmath,amssymb}          \usepackage{fontspec}           \usepackage{unicode-math}            \setmainfont{Lucida Bright OT}     \setsansfont{Lucida Sans OT}     \setmonofont{Lucida Sans Typewriter OT}          \setmathfont{Lucida Bright Math OT}          \begin{document}          Here is an example of an arrow which looks weird:          \begin{gather}     \widehat{\mathcal{O}_v}\otimes_{\mathcal{O}_v} k\xrightarrow{\approx}\widehat{k}     \end{gather}          here is another example:          \begin{gather}     \varprojlim k[T]/(T^n)     \end{gather}          \end{document}


title: How to correctly use the palatino font (in memoir)?

text: I'm preparing a PhD thesis (using memoir and pdfLaTeX), and I find the palatino font a nice body font. Reading the font related questions and answers on this awesome site, I think I have pieced together the correct combination of commands and packages but it feels like a lot of hacking. So I want to ask if there is a better way than my current solution. I've added comments in the below example.               \RequirePackage[sc]{mathpazo} % use mathpazo to get the math fonts working correctly, why can't we scale them?     \RequirePackage[scale=0.95]{tgpagella}\normalfont % but use tgpagella as main font (it's newer than mathpazo?}     \newcommand*{\memfontfamily}{qpl} % tgpagella as main memoir font     \newcommand*{\memfontenc}{T1}     \newcommand*{\memfontpack}{tgpagella}     \documentclass[a4paper, oneside, 10pt, extrafontsizes, showtrims, draft]{memoir}     \RequirePackage[scaled=0.75]{luximono}  % we can load the correct tt font after the document class     % tgpagella contains no slanted shapes, so lets borrow them from mathpazo      \DeclareFontShape{T1}{qpl}{m}{sl} { <-> ssub * pplj/m/sl }{}     \DeclareFontShape{T1}{qpl}{b}{sl} { <-> ssub * pplj/b/sl }{}          %just some stuff for the demo page     \setlrmarginsandblock  {30mm}{*}{*}     \setlxvchars \setxlvchars[\small\sffamily]     \checkandfixthelayout     \fixpdflayout               \usepackage[final, babel=true]{microtype}     \usepackage[english]{babel}     \usepackage{amsmath} % amsmath which also loads fonts?          \nouppercaseheads     \pagestyle{headings}          \usepackage{lipsum}          \begin{document}     \mainmatter          \chapter{Regular font families}          \textrm{roman text: (ffi --- --) \\ \lipsum[4] }          \textit{italic text: (ffi --- --) \\ \lipsum[4]}          \textbf{boldface text: (ffi --- --) \\ \lipsum[4] }          \textsl{slanted text: (ffi --- --) \\ \lipsum[4] }          \texttt{typewriter text: (ffi --- --) \\ \lipsum[4] }          \chapter{Lesser used types}     \textit{\textbf{italic bold  text: (ffi --- --) \\ \lipsum[4]}}          \textsl{\textbf{slanted bold  text: (ffi --- --) \\ \lipsum[4]}}          \textsc{smallcaps: (ffi --- --) \\ \lipsum[4] }          \textsc{\textbf{smallcaps bold  text: (ffi --- --) \\ \lipsum[4]}}          \chapter{Other test cases}          \textrm{Regular text (\texttt{http://tttext}) and \textbf{bold text} and \textit{italic text} and \textsl{slanted text}}                \textrm{\LARGE Regular text (\texttt{http://tttext}) and \textbf{bold text} and \textit{italic text} and \textsl{slanted text}}          \textrm{ }     \textrm{ffi --- }          \begin{equation}     d=Xh+S\phi+\varepsilon \label{eq:fMRIAnalysisChapter3}     \end{equation}                                 \begin{equation}     h=\left( X^TP_sX\right)^{-1} X^T P_s d  \label{eq:Eq2Chapter3}     \end{equation}          \end{document}      So I want to use the newest `tgpagella` font, but it does not offer a math font, so we first load `mathpazo` to later only overwrite the body font with the `tgpagella` fonts. But we have to use `luximono` as a nice companion typewriter font. Then to solve all the warnings we borrow the slanted shapes from the `mathpazo` font. At the moment, I think it looks fairly good, although I'm not entirely happy about the spacing/sizes in the math example and the fact that the `mathpazo` shapes are slightly larger then `tgpagella`. So the question, is this really the best way? And what would you do to improve this?


title: xindy cannot open the temp file

text: I have encountered a problem by using xindy within glossaries. After the first call of `pdflatex`, I gave `makeglossaries mytex` in command line. Unfortunately, I got the error > "LOAD: A file with name C:\Users\xyzxyz~1\AppData\Local\Temp\vEslm0pNhL does > not exist". With some work I found out that the file `C:\Users\xyzxyz~1\AppData\Local\Temp\vEslm0pNhL` has been correctly generated by xindy.pl. However, it cannot be loaded by xindy_lisp.exe, which expected full path name instead of shorted one (DOS style), i.e. `C:\Users\xyzxyzabcabc\AppData\Local\Temp\vEslm0pNhL`. Does anyone have the same issue? How can I get over it? I use the texlive2011 distribution on Win 7. My tex file is (the example from glossaries):               % This file is public domain     \documentclass[a4paper]{article}          \usepackage[style=long4colheaderborder,xindy]{glossaries}     \makeglossaries          \newglossaryentry{w}{name={$w$},     sort=w,     description={width},     symbol=m}     \newglossaryentry{M}{name={$M$},     sort=M,     description={mass},     symbol=kg}          \begin{document}          \printglossaries     The width, \gls{w}, is measured in meters. The mass, \gls{M} is measured in kilograms.          \end{document}


title: Making an arrow in a pgfplot figure from one point to another?

text: How can I make an arrow from one point in a tikz picture to another point? In the following example, I would like to draw an arrow from the word data-- which is approximately the coordinate (1982, 88)-- and have it point to the coordinate (1985, 82).               \documentclass[professionalfont, fleqn]{beamer}     \mode<presentation>     \usetheme{Warsaw}     \usetheme{CambridgeUS}          \usepackage{pgfplots}     \usetikzlibrary{arrows,shapes,positioning}     \graphicspath{{graphics/}}          \begin{document}     \frame     {     \frametitle{Frame Title}          \begin{tikzpicture}           \begin{axis}            [              axis x line  = bottom,              axis y line  = left,              width        = 1.01\textwidth,              height       = .63\textwidth,          % Adjusted              ymax         = 93,              ymin         = 27,              ytick        = {30,40,...,90},              xmax         = 1993,              xmin         = 1967,              xtick        = {1970, 1980, ..., 1990},            ]            \node[anchor=west] at (axis cs:1968.5,89.5){%            \textbullet\ Comment here about data            };           \end{axis}        \end{tikzpicture}     }          \end{document}


title: pgfplots: post-processing data created with gnuplot

text: I have managed to use `pgfplots`' `gnuplot` option to solve an implicit equation:               \documentclass{standalone}          \usepackage{tikz,pgfplots}          \begin{document}       \begin{tikzpicture}         \begin{loglogaxis}[           xmin=8e2,           xmax=1e8,           ymin=0.008,           ymax=0.1           ]           \addplot[solid,raw gnuplot] gnuplot {             set xrange [2300:1e8];             set yrange [0.008:0.1];             set logscale xy;             set samples 100;             f(R,L) = -2*log10(2.51/(R*sqrt(L))+4e-3/3.71)-1/sqrt(L);             set cont base;             set cntrparam levels discrete 0;             unset surface;             splot f(x,y)           };         \end{loglogaxis}       \end{tikzpicture}     \end{document}      The problem here is that gnuplot doesn't sort the result, so that the plot appears closed. How can I sort the data generated by `gnuplot` before it is plotted by `pgfplots`? I have tried to pass table sorting options to gnuplot:               \addplot[...] gnuplot[sort=true,sort cmp={float <}] {...};      which didn't work. My other idea was to call gnuplot from my tex document without plotting immediately. I could then read the data with `pgfplotstable` and process it, but I don't know a convenient way to call gnuplot. My goal is to generate a number of plots in one axis environment only with one call to `pfdlatex`. * * * I noticed that `pgfplots` 1.5.1 does _not_ close the plot, but `pgfplots` 1.4.1 does. However, the coordinates are still not sorted and the nodes `current plot end` and `current plot begin` are at the same coordinate (which is bad in my case).


title: pgfplotstable: using one column to control style of another

text: I want to print a pgfplotstable where one column (which is not printed) used to change the style of another column. In my MWE below, I want to change the `font=` style of select values in the `Item` column if the `highlight` column contains a value `1`. But in my actual use case, I will be changing a number of properties. I have tried using `\getthisrow` in `preproc cell content/.code`, but in that context I get an "Undefined control sequence" error. What else can I try? Secondly, in `preproc cell content/.code` I am attempting to change the `font`, using `\pgfplotstableset`, which does not seem to have any effect (otherwise the items in the "Not what I want"-table would all be orange). ![rendering](http://i.stack.imgur.com/P2Xwv.png)               \documentclass{standalone}          \usepackage{filecontents}     \usepackage{pgfplotstable}     \usepackage{booktabs}     \usepackage{colortbl}     \usepackage{color}          \begin{filecontents}{data.csv}     highlight,Item,Unrelated     1,Lorem,f     0,ipsum,o     0,dolor,o     1,sit,     0,amet,bar     \end{filecontents}          \begin{document}     \pgfplotstabletypeset[         col sep=comma,         columns={Item,Unrelated},         columns/Item/.style={string type},         columns/Unrelated/.style={string type},         every head row/.style={before row={             \textcolor{red}{Not what I want:}\\\toprule},             after row=\midrule},         every last row/.style={after row=\bottomrule},         preproc cell content/.code={             %\getthisrow{highlight}\highlight % <--Undefined control sequence             %use \highlight here to set pgf value             \pgfplotstableset{font=\color{orange}} % <--change styling for current cell (has no effect)         },     ]{data.csv}          \pgfplotstabletypeset[         col sep=comma,         columns={Item,Unrelated},         columns/Item/.style={string type},         columns/Unrelated/.style={string type},         every head row/.style={before row={             \textcolor{green}{Desired result:}\\\toprule},             after row=\midrule},         every last row/.style={after row=\bottomrule},     ]{     highlight,Item,Unrelated     1,\textcolor{orange}{Lorem},f     %color should be set by pgf key, not \textcolor     0,ipsum,o     0,dolor,o     1,\textcolor{orange}{sit},     %color should be set by pgf key, not \textcolor     0,amet,bar     }     \end{document}


title: Personal Info to the Header to Save Space with Tight-space rules

text: My lecturer insists on extreme space-rules, max 2 pages, with quite advanced simulation problem (with all codes required to include). So I have to change my personal info to as small space as possible. I want to reuse the de facto things such as `\author{...}...\title{...}...\date{...}`. How can I do it?               \documentclass{article}     \usepackage{verbatim}          \maketitle     \title{Simulation Assignment 3. XYZ}     \date{\today}     \author{Student Number XYZY, XYZ University}          \begin{document}               \input{Documents/h3}     \verbatiminput{Codes/h3.r}          \end{document}


title: uniform indent on description

text: I have a description like below. The main issue is if the text is to long it runs underneath the beginning.               \begin{description}         \item[Languages:] C, C++,Python, Ruby, Shell Scripting (Bash), JavaScript, PHP, Ruby On Rails. Java, C\#, X86, MIPS, Lisp, Standard ML, Scheme, XML, HTML         \item[OS:] Windows, Ubuntu, Mint, Fedora, AIX, UNIX     \end{description}      What happens is the end of the languages item goes under "Languages". It starts about right in the middle. I want it to go and start right under C. I desire it to look like so               Languages: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA                AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA                AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA      not               Languages: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA           AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA           AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA      ## MWE               \documentclass[11pt]{article}          \usepackage{url,fancyhdr}     \usepackage{enumitem}          \begin{document}     \newcommand{\marginhead}[1]    {  \marginpar{\textsf{{\footnotesize\vspace{-1em}\flushright #1}}}}          \def\ind{\hangindent=1 true cm\hangafter=1 \noindent}          \def\labelitemi{~}     \renewcommand{\labelitemii}{~}          \reversemarginpar          \marginhead{{\vskip 0.3em}Entertainment}     \medskip          \begin{description}[align=right,labelindent=!]     \addtolength{\itemsep}{-0.5\baselineskip}     \item[Sports:] Football, Baseball, Soccer, Rugby, Tennis, Basketball, badminton, swimming, track and field, diving,      \item[Television Shows:] The Sopranos, The price is right, Dr. Phil, Dexter, CSI, CSI New York, CSI Miami, Las Vegas, Breaking Bad, LA Law, Law and Order.     \end{description}          \end{document}


title: Latex Bibliography Style

text: In my bibliography I want to remove the line break between references (now it is like the figure). The bibliography style I'm using is               \bibliographystyle{inc/splncsnat}       **Figure** ![Figure](http://i.stack.imgur.com/Mucpb.png) Any suggestion will be gracefully appreciate. Thanks.


title: Embedding Tex inside JavaScript and/or C#

text: Firstly, I'm completely new to using `TeX`, so please bear with my ignorance. I am writing an application that will require the program to display some symbols, namely those in the `MusixTeX` library, but I don't know how to go about doing the displaying. Can anyone guide me as to how I might write code to do this? I'll be programming in either `C#` or `JavaScript`, so an answer for either (or both) of those languages would be really helpful. As I said, I'm really new to using `TeX` in general, so the more detailed of an answer you can give, the better. I'm not afraid of work, so if it's a laborious process, that's fine. I'd just like to be able to do it!


title: Is there an alternative for \usepackage[nobottomtitles*]{titlesec}?

text: Is there an alternative for `\usepackage[nobottomtitles*]{titlesec}` as it messes up my automatic clearing of `floatingfingure`?               \documentclass{article}     \usepackage{mwe}          \makeatletter     \def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth     \else\Gin@nat@width\fi}     \makeatother     \let\Oldincludegraphics\includegraphics     \renewcommand{\includegraphics}[1]{\Oldincludegraphics[width=\maxwidth]{#1}}          \setlength{\parindent}{0pt}          % begin preamble.tex     \usepackage[nobottomtitles*]{titlesec}     %\renewcommand{\bottomtitlespace}{.2\textheight}          \usepackage{calc}     \newlength\vimgflt     \newlength\vposflt     \newlength\vtypesetflt     \newlength\vspaceflt          \usepackage{floatflt}     \renewenvironment{description}{%         \renewcommand{\includegraphics}[1]{\vspace{-1ex}\Oldincludegraphics[width=4cm]{##1}}         \renewcommand{\item}[1][]{             \settototalheight\vimgflt{##1}%             \global\vimgflt=\vimgflt%             ##1%             \end{floatingfigure}%             \setlength\vposflt\pagetotal%             \global\vposflt=\vposflt%             }%         \clearflt         \hspace{0pt}%         \begin{floatingfigure}[l]{4cm}}%         {}          \newcommand{\clearflt}{         \par%         \setlength\vtypesetflt{\dimexpr\pagetotal-\vposflt}         \ifdim \vtypesetflt<\vimgflt \setlength\vspaceflt{\dimexpr\vimgflt-\vtypesetflt+\baselineskip} \else \setlength\vspaceflt{0pt} \fi         \vspace*{\vspaceflt}         }          \let\Oldsection\section     \renewcommand{\section}{\clearflt\Oldsection}     % end preamble.tex          \begin{document}     \blindtext     \section{Section title}     \begin{description}     \itemsep1pt\parskip0pt\parsep0pt     \item[\includegraphics{example-image-a}]     Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobortis facilisis     sem. Nullam nec mi et neque pharetra sollicitudin.     \end{description}          \section{Section title}     \begin{description}     \itemsep1pt\parskip0pt\parsep0pt     \item[\includegraphics{example-image-b}]     Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobortis facilisis     sem. Nullam nec mi et neque pharetra sollicitudin.     \end{description}          \section{Section title}     \begin{description}     \itemsep1pt\parskip0pt\parsep0pt     \item[\includegraphics{example-image-c}]     Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobortis facilisis     sem. Nullam nec mi et neque pharetra sollicitudin.     \end{description}          \blindtext[2]     \end{document}      ![\\usepackage\[nobottomtitles*\]{titlesec} mess- up](http://i.stack.imgur.com/C53Qa.png)


title: Line break in large formula and error message in align?

text: I have a very long `align` formula and I do not know how to optimally (that it looks good and is accetable with LaTeX rules) line-break this. Currently I have               \begin{align*}     \mathrm{Var}(\alpha)&\approx (1+\pi^{2})\exp(-2\delta^{*}+2\zeta^{*})\cdot \mathrm{Var}(\zeta^{*})+\frac{\pi^{2}\exp(-2\delta^{*}+2\zeta^{*})}{1+\pi^{2}}\cdot  \mathrm{Var}(\pi)\\ &+ (1+\pi^{2})\exp(-2\delta^{*}+2\zeta^{*})\cdot \mathrm{Var}(\delta^{*}) + \\     2&\times \left[ \pi\exp(-2\delta^{*}+2\zeta^{*})\cdot \mathrm{Cov}(\pi,\zeta^{*}) - (1+\pi^{2})\exp(-2\delta^{*}+2\zeta^{*})\cdot \mathrm{Cov}(\delta^{*},\zeta^{*})  - \pi\exp(-2\delta^{*}+2\zeta^{*})\cdot \mathrm{Cov}(\delta^{*},\pi)\right]     \end{align*}      I tried               \begin{align*}     \mathrm{Var}(\alpha)&\approx (1+\pi^{2})\exp(-2\delta^{*}+2\zeta^{*})\cdot \mathrm{Var}(\zeta^{*})+\frac{\pi^{2}\exp(-2\delta^{*}+2\zeta^{*})}{1+\pi^{2}}\cdot  \mathrm{Var}(\pi)\\ &+ (1+\pi^{2})\exp(-2\delta^{*}+2\zeta^{*})\cdot \mathrm{Var}(\delta^{*}) + \\     2&\times \left[ \pi\exp(-2\delta^{*}+2\zeta^{*})\cdot \mathrm{Cov}(\pi,\zeta^{*}) - (1+\pi^{2})\exp(-2\delta^{*}+2\zeta^{*})\cdot \mathrm{Cov}(\delta^{*},\zeta^{*}) \\ & - \pi\exp(-2\delta^{*}+2\zeta^{*})\cdot \mathrm{Cov}(\delta^{*},\pi)\right]     \end{align*}      But I get the error message:               ! Extra }, or forgotten \right.     <template> }                 $}\ifmeasuring@ \savefieldlength@ \fi \set@field \hfil \endtempl...     l.1533 \end{align*}


title: Adding floating space between main text and footnotes

text: I have to typeset a text with several widows and lots of footnotes. The editor told me to leave an additional blank line between the main text and the footnotes and to use this space to print the widows on the preceding page. I managed to add the required space using `\addtolength{\skip\footins}{\baselineskip}`. But now I have to make LaTeX to use this space (or manually print the respective lines on it). I would be grateful for any advice.


title: Listings on multiple pages - keep number like Continuedfloat

text: I have the following code:               {         \lstset{language=C,                 basicstyle=\tiny,                 tabsize=3,                 frame=lines,                 breaklines=true,                 breakatwhitespace=true}              \lstinputlisting[float,caption={Caption1},label=txt:Netlink,lastline=69]{file.c}     }          {         \lstset{language=C,                 basicstyle=\tiny,                 tabsize=3,                 frame=lines,                 breaklines=true,                 breakatwhitespace=true}     \ContinuedFloat         \lstinputlisting[float,caption={Caption 1 (cont.)},label=txt:Netlink,firstline=71]{code.c}     }      It produces something like:                       Listing 1.1: Caption 1     The code                   Listing 1.2: Caption 1 (cont.)     The code       I want it to be like if you use \Continuedfloat                       Listing 1.1: Caption 1     The code                   Listing 1.1: Caption 1 (cont.)     The code       And then on list of listings I would like it to be shown just once. I have no idea on how to do it. Any help is more than welcome. Edit 1: (for @GonzaloMedina) This is the result including \lstlistoflistings ![output](http://i.stack.imgur.com/UbPTZ.png) Would it be possible to have only one entry there?


title: Separation between label and Title

text: How can I increase the space between the Section number and the Section-Title in the TOC? I am using the `titletoc`package and my code currently looks like this:                \contentsmargin[25pt]{0pt}           \titlecontents{chapter}[\tocsep]        {\addvspace{4pt}\small\bfseries\sffamily}        {\hspace*{3pt}\contentslabel[\thecontentslabel]{\tocsep}}        {}        {\hfill\thecontentspage}        []           \titlecontents{section}[\tocsep]        {\addvspace{2pt}\small\sffamily}        {\hspace*{3pt}\contentslabel[\thecontentslabel]{\tocsep}}        {}        {\ \titlerule*[.5pc]{.}\ \thecontentspage}        []      If the number of the section gets high, the number and the text are too close. How can I make it more look like this: 1.23 ~~~~ Title of the Section than 1.23 Title of the Section? I am unable to find the answer in the package-documentation... Thank you


title: Tabbing and font size change

text: As a follow up of a previous question Paragraph break when combining tabbing and font change I need to type snippets of code within a `tabbing` environment, but sometimes I need to change the size of the font for writing these snippets as follows               \documentclass[11pt,a4paper]{article}          \newenvironment{sftabbing}       {\sffamily\tabbing}       {\endtabbing}          \newenvironment{sfsmtabbing}       {\relax\sffamily\small\tabbing}       {\endtabbing}          \newenvironment{sfscstabbing}       {\sffamily\scriptsize\tabbing}       {\endtabbing}          \begin{document}          First paragraph blah blah blah blah blah blah blah blah blah blah blah blah      blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah      blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah      \begin{sftabbing}     some code some code some code some code some code some code \\     some code some code some code some code some code some code \\     some code some code some code some code some code some code \\     some code some code some code some code some code some code \\     some code some code some code some code some code some code \\     some code some code some code some code some code some text     \end{sftabbing}     first paragraph continues here blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah      blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah           Second paragraph blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah      blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah      \begin{sfsmtabbing}     some code some code some code some code some code some code \\     some code some code some code some code some code some code \\     some code some code some code some code some code some code \\     some code some code some code some code some code some code \\     some code some code some code some code some code some code \\     some code some code some code some code some code some text     \end{sfsmtabbing}     second paragraph continues here blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah      blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah           Third paragraph blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah      blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah      blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah      \begin{sfscstabbing}     some code some code some code some code some code some code \\     some code some code some code some code some code some code \\     some code some code some code some code some code some code \\     some code some code some code some code some code some code \\     some code some code some code some code some code some code \\     some code some code some code some code some code some text     \end{sfscstabbing}     third paragraph continues here blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah      blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah      blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah           \end{document}      The problem is that the environments I defined for doing this do not make the font size change local to the environment and therefore the space between the lines in the enclosing paragraphs is changed also.


title: biblatex-verbose: Comma after editor instead of period

text: The period after “Editor” should be a comma. I tracked down the `byeditor+others` bibmacro, but couldn’t figure out what I needed to change. A `\DeclareFieldFormat`, which has helped with punctuation in other cases, didn’t help either.               \documentclass{article}          \usepackage[style=verbose]{biblatex}          \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}     @incollection{foo,         author = {Author},         title = {Title},         booktitle = {Booktitle},         editor = {Editor},         location = {Location},         year = {2013},     }     \end{filecontents}          \addbibresource{\jobname.bib}          \begin{document}     \nocite{foo}     \printbibliography     \end{document}      ![output](http://i.stack.imgur.com/sd8Dy.png)


title: align vs equation

text: I always use `align` in my documents, and avoid `equation`. Is there anything wrong with that? My reasoning behind this: align > equation, so why not use it?


title: Why should I ever use equation when I can always use align?

text: > **Possible Duplicate:**   >  align vs equation Is there any reason why I should use `equation` when I `align` seems to produce the same output? The reason I am asking is that I like solving math using LaTeX. Sometimes I write a single equation using the `equation` environment, but later realise I need to include more equations aligned to the first in that same environment. Then I need to change the               \begin{equation}     \end{equation}      to               \begin{align}     \end{align}      and include the `&`s as appropriate. I am thinking then: why not always use align, maybe even including the `&` before the equal sign, just in case I need to include more stuff there later? If they behave the same, and one is more flexible, why use the other at all? Or are there differences and reasons why I should avoid using `align` when there is a single equation?


title: BibLaTeX customisation: Pages prefix to suffix

text: In BibLaTeX is there any (simple) way to transform               pp. 55-57      into               55-57 orr.      ? For example, I know that the prefix `pp.` can be removed by using: > `\DeclareFieldFormat{pages}{#1}` But actually what I need is to change it into `orr.` _and_ move it to the right, so it appears after the page or page-range. Any ideas? (In case anyone's interested, `55-57 orr.` is the way to put `pp. 55-57` in Basque).


title: Strange interaction between the `underscore` and `ulem` packages

text: There is a strange interaction between the `underscore` and `ulem` packages. With `\uline{\itshape bbb\_lll}`, "bbb" is italic but "lll" is upright. However, with `\underline` instead of `\uline`, or when the `underscore` package is not loaded, "lll" is italic, as expected. I really want to load both the `underscore` and `uline` packages:   * `underscore` to be able to use `_` instead of `\_`;   * `ulem` to have breakable underlined text (or text highlighted with `\markoverwith`). Is there any systematic fix to the problem?


title: Adding comments with pdfcomment without affecting the text

text: I add comments to my PDF using the great `pdfcomment` package. When I add a comment using `\pdfcomment[avatar=notes]{comment}`, the comment icon changes the layout of the other text in the document. I would like the comments to be "above" the document, i.e., so that the document is set out the same whether the comments are included or disabled. Is this possible? I can't find any settings or commands in the package user manual which describe this.


title: Change filling of TikZ nodes in repeated picture

text: A diagram drawn with TikZ is used a couple of times and I defined a command for it. In the first picture I want to mark a subset of the nodes by filling them with light gray, and another subset of nodes in the second picture. Is this possible, or do I need to duplicate the whole command for this? The MWE shows the output before the desired node fillings.               \documentclass[a4paper,10pt]{article}     \usepackage[utf8]{inputenc}     \usepackage{tikz}     \usetikzlibrary{positioning,shapes,arrows}          \tikzstyle{main}=[circle, minimum size = 10mm, thick, draw =black!80, fill = white!100, node distance = 12mm]     \tikzstyle{connect}=[-latex, thick]     \tikzstyle{box}=[rectangle, draw=black!100]     \newcommand{\model}{       \node[main] (alpha) {$\alpha$};       \node[main] (gamma) [right=of alpha] {$\lambda$};       \node[main] (Z) [below=of alpha] {$Z$};       \node[main] (C) [below=of gamma] {$C$};       \node[main] (W) [right=of C] {$W$};       \node[main] (R) [below=of W, fill=lightgray] {$R$};       \node[main] (bias) [above=of W] {$b$};       \node[main] (sigma) [right=of bias] {$\sigma$};       \path (alpha) edge [connect] (Z)         (gamma) edge [connect] (C)         (Z) edge [connect] (C)         (C) edge [connect] (R)         (W) edge [connect] (R)         (bias) edge [connect, bend left] (R)         (sigma) edge [connect, bend left] (R)         (C) edge [connect] (W);     }     \begin{document}     \begin{tikzpicture}     \model     %TODO: fill some nodes here     \end{tikzpicture}          \begin{tikzpicture}     \model     %TODO: fill other nodes here     \end{tikzpicture}     \end{document}      ![Output](http://i.stack.imgur.com/5dTq2.png)


title: Vertical distance in tikz-qtree nodes

text: I have put together a language tree using the following code (MWE):               \documentclass[b5paper,11pt,twoside,one column,openright,draft]{memoir}     \usepackage{rotating}     \usepackage{tikz-qtree}     \usepackage{tikz-qtree-compat}     \tikzset{every tree node/.style={align=center, anchor=north}} % to allow linebreaks     \begin{document}     \newlength{\egyptianlength}     \settowidth{\egyptianlength}{Egyptian}     \newlength{\msarabianlength}     \settowidth{\msarabianlength}{Modern South Arabian}     \newlength{\nwsemiticlength}     \settowidth{\nwsemiticlength}{Northwest Semitic}     \newlength{\canaanitelength}     \settowidth{\canaanitelength}{Canaanite}     \newlength{\pplength}     \settowidth{\pplength}{Phoenician/Punic}     \begin{figure}[p]     \begin{center}     \begin{turn}{90}     \begin{tikzpicture}     \tikzset{every tree node/.style={align=center,anchor=north,level distance=2\baselineskip}}     \tikzset{edge from parent/.style={draw,thick}}     \tikzset{level distance=2\baselineskip}     \Tree [.{Afro-Asiatic}         [.{\makebox[\egyptianlength][c]{Berber}} ]         [.{\makebox[\egyptianlength][c]{Chadic}} ]         [.{\makebox[\egyptianlength][c]{Egyptian}} ]         [.\node (Semitic) {\makebox[\egyptianlength][c]{Semitic}}; ]         [.{\makebox[\egyptianlength][c]{Cushitic}} ]         [.{\makebox[\egyptianlength][c]{Omotic}} ]     ]     \node[below of=Semitic,yshift=-1.5em,xshift=-5.5em]{         \Tree [             [.{West Semitic}                 [.{\makebox[\msarabianlength][c]{Ethiopian}} ]                                 [.\node (CentralSemitic) {\makebox[\msarabianlength][c]{Central Semitic}}; ]                 [.{\makebox[\msarabianlength][c]{Modern South Arabian}} ]             ]                         [.{East Semitic}                 Eblaite                 Akkadian             ]         ]     };     \node[below of=CentralSemitic,yshift=-9.5em,xshift=-7.5em]{         \Tree [                              [.{\makebox[\nwsemiticlength][c]{Old South Arabian}} ]             [.\node (NWSemitic) {{\makebox[\nwsemiticlength][c]{Northwest Semitic}}}; ]             [.{\makebox[\nwsemiticlength][c]{Arabic}} ]         ]     };     \node[below of=NWSemitic,yshift=-13.75em,xshift=-8em]{         \Tree [                              [.{\makebox[\canaanitelength][c]{Ugaritic}} ]             [.{\makebox[\canaanitelength][c]{Aramaic}} ]             [.\node (Canaanite) {{\makebox[\canaanitelength][c]{Canaanite}}}; ]         ]     };     \node[below of=Canaanite,yshift=-17.75em,xshift=-3.1em]{         \Tree [                              [.{\makebox[\pplength][c]{Phoenician/Punic}} ]             [.{\makebox[\pplength][c]{Moabite}} ]             [.{\makebox[\pplength][c]{Ammonite}} ]             [.{\makebox[\pplength][c]{Edomite}} ]             [.{\makebox[\pplength][c]{Hebrew}} ]         ]     };     \end{tikzpicture}     \end{turn}     \end{center}     \caption{The Semitic languages in their Afro-Asiatic context}     \end{figure}     \end{document}      The fancy use of lengths and \makebox-es helps the tree not look so skewed. However, I have one problem, and one hope for 'a better way'... Problem: the vertical distance between e.g. 'West Semitic' and 'Central Semitic' is much less (in terms of line length) than that between 'Central Semitic' and 'Northwest Semitic'. Enhancement: it would be nice if the xshift and yshifts (which currently I determine by trial and error) could be made relative (i.e. drop down x from the baseline at the midpoint of the label text). Any suggestions? I tried adjusting vertical distance based on info provided here but without success. Perhaps I'm not doing it properly.... Thanks!


title: Remove font styles in list of figures

text: together with `latex` i use the `subcaption` package for subfigures. I use different font styles (like italics, bold, sans serif) in the captions for certain terms. Those font styles are used in the list of figures as well. Now my question is, if there is any way to overwrite all font styles for the list of figures automatically (without using `\caption[without style]{with style}`). In the list of figures only one font shall be used. And i have another question: How can i reduce the spacing between the number (a,b,...) and the title of the subfigure in the list of figures?


title: Trim/Clip scope by a defined curve

text: Hy I have to plot a vector field inside region in tikz. The arrows of the vector field should not appear outside the region. The region is the interior of :               \draw [black, fill=white] plot [smooth cycle] coordinates {(ar) (br) (cr) (dr) (er)};      Thanks


title: pgfplots - Is there an equivalent to 'cycle list name=color list' for custom lists?

text: I defined my own cycle list `mycolor`, which equals the vanilla `color` one except for 2-3 different colors and I added two more items to the cycle. The manual says on page 176: > The `cycle list name=color` choice also employs markers whereas `color list` > uses only colors. I was wondering: is `color list` baked into pgfplots, meaning `color list` was defined line by line? I would like to use `mycolor` in an analogical way to `color list`, but using `mycolor list` lead to an "unknown list"-type of error.


title: Help formatting longtable for landscape oriented table

text: I am having trouble setting up the code using longtable for a table that will span multiple pages and be presented in landscape format. It will not show the "continued on next page" tag or "Continued from Table #" at the top of the new page. I have tried to copy the code presented in this link (http://texblog.org/2011/05/15/multi-page-tables-using-longtable/) but applied to my own application but the output is not working, maybe due to it being in landscape? Also my margins need to be specific (ie. thesis document) and the output looks like it's pushing those boundaries even though I do have them formatted. Any suggestions are greatly appreciated. I would have included some sample code, but it is a big table (14 columns and 53 entries, with several multi-rows thrown in) But if anyone needs the code to look at, I would be more than willing to send it along. :-)


title: Help cannot spread a long table across two pages in a in two columns page

text: I urgently need your help. I checked the whole TEX.StackExchange, but for last 4 hours could not solve anything. Please help :) It is quite difficult to explain the question, so would better show it in a picture. In a two column page, I am trying to build a paper, which components, in the tex code, appear in a following order:   1. Text #1   2. Wide table #1 with many items   3. One-column short table #2   4. Wide table #3 with many items   5. Text #2 ![enter image description here](http://i.stack.imgur.com/75jPc.png) I need to get an output as such: ![enter image description here](http://i.stack.imgur.com/IYVmD.png)


title: New line after subsubsection with llncs class

text: I get a new line after each `chapter`, `section`, and `subsection`, but not after anything lower than `subsection`, e.g. `subsubsection` or `paragraph`. MWE:               \documentclass[runningheads]{llncs}          \usepackage[ngerman]{babel}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}          \begin{document}          \section{FooBar}     \dots     \subsection{BarFoo}     \dots     \subsubsection{Chakka}     \dots     \paragraph{Chu}     \dots          \end{document}      Do I have to use the `titlesec` package with the `titleformat` command or is there any other way? (Off-topic: Is there a built-in function to include part of the compiled version as an image?)


title: How can I add in the missing space when the first use of an acronym is plural?

text: I'm using the glossaries package and defining my acronyms like this:               \newacronym{led}{LED}{Light Emitting Diode}      I'm then using the acronyms in my document with either               \gls{led}      or               \glspl{led}      depending on whether I want them to be plural or singular. If the first reference to the acronym is singular then it will result in "Light Emitting Diode (LED)". If the first reference is plural then it will result in "Light Emitting Diodes(LEDs)". There is no space between the s in "Diodes" and the '('. Is there an easy way to change this behavior to include a space like it does in the singular case? EDIT: I tried making a simple example to compile and interestingly it doesn't exhibit the same behavior:               \documentclass{article}          \usepackage[acronym]{glossaries}     \makeglossaries          \newacronym{led}{LED}{Light Emitting Diode}     %this is a potential work around if the problem does come up:     %\newacronym[longplural=Light Emitting Diodes ]{led}{LED}{Light Emitting Diode}          \begin{document}          First use is plural: \glspl{led}.     Second use is plural:\glspl{led}.          \printglossaries          \end{document}      I'll have to look into it in more depth to understand what's causing the behavior I'm seeing in the non-trivial example. If this ever comes up in a search engine then please note the workaround I put in the above example.


title: IEEEtran bibliography style won't compress in-text citation

text: I cannot get IEEEtran in-text citations to format properly. I am getting citation compressions looking like [1-5] instead of [1]-[5] as it is in IEEE journals. I have bibliographies after each chapter so I'm using `\usepackage{chapterbib}`. Also, I could only get any citation compression with `\usepackage[noadjust]{cite}`. Without this, my citations would look like [1,2,3,4,5]. Any ideas on where I'm going wrong? I am using a custom document class instead of the IEEE class. This is the code in the parent .tex file               \usepackage{chapterbib}         \usepackage[noadjust]{cite}      This is the code within each chapter .tex               \cite{author1,author2,author3,author4,author5}          \bibliographystyle{IEEEtran}         \bibliography{IEEEabrv,bibfile}


title: Confusion about Data Retrieval from a LaTeX3 Stack

text: I'm trying to perform a very simple processing task in LaTeX3, namely, defining a series of functions named in terms of the token lists retrieved from a `clist` as a stack. Each function will set accordingly a token list variable with a name determined by the stack item, too. My code is as follows:               \RequirePackage{expl3}     \documentclass{memoir}          \ExplSyntaxOn          \clist_new:N \l_my_clist     \clist_gset:Nn \l_my_clist {date,name,phone}          \bool_do_while:nn      { ! \clist_if_empty_p:N \l_my_clist }      {        \clist_pop:NN \l_my_clist \l_tmpb_tl        \tl_new:c { g_my_ \l_tmpb_tl _tl }          \cs_gset:cpn { my_ \l_tmpb_tl :n } #1         {           \tl_gset:cn              { g_my_ \l_tmpb_tl _tl } {#1} %{ \tl_to_str:n {#1} }         }      }          \my_date:n {the date}     \my_name:n {the name}     \my_phone:n {the phone}          \AtBeginDocument      {        \g_my_date_tl\par        \g_my_name_tl\par            \g_my_phone_tl      }          \ExplSyntaxOff          \begin{document}     \end{document}      I was expecting to get a three-line (well, three single-line paragraphs) page with `thedate` `thename` `thephone` as text, but I only get the last one. What is it that I'm doing wrong? I've tried also with `\tl_use:N \l_tmpb_tl` in the code, but to no avail.


title: Use macro/newcommand for attributes

text: How would one define a `newcommand` so that it can be used for attributes? I have `\somecommand` which I can pass attributes, for example `color=black` in square brackets. Now I want to have a `newcommand` to do something like this:               \newcommand{\anewcommand}{color=black}          \begin{document}         \somecommand[\anewcommand]     \end{document}      Although the `anewcommand` holds the same value as I would pass by typing it out, it doesn't work and tells me that my attributes are not defined. Well. The `\somecommand` is actually the `ganttbar` command of the gantt.sty package. I want to have `\newcommand{\person}{color=black}` and then pass `\person` to `\ganttbar[\person]`. hope this clarifies it more. MWE:               \documentclass[paper=a4,landscape]{scrartcl}     \usepackage[usenames,dvipsnames,svgnames]{xcolor}     \usepackage{gantt}          \newcommand{\person}{color=black}          \begin{document}         \begin{gantt}[xunitlength=0.8cm,fontsize=\small,titlefontsize=\small,drawledgerline=true]{2}{7} %{# of tasks}{# of slots}             \begin{ganttitle}                 \titleelement{week 1}{7}             \end{ganttitle}             \ganttbar[color=NavyBlue]{localization}{3}{3} % this works             \ganttbar[\person]{Bla}{1}{1} % this doesn't         \end{gantt}     \end{document}


title: Which package to use for typesetting objective-C source code?

text: I would like to typeset some source code (~70k lines). The language is Objective-C so it is organized into classes. I would like a table of contents, and page numbers. I would also like each class to start at the top of a page. It would be good to be able to add inline comments to some parts of this code. It would also be nice to add some cross-reference links between certain parts of the document. (Both of these manually). Which is the best package to produce something like this (you can also tell me not to use TeX)?


title: Latex Table giving me an error

text: \begin{table}         \begin{tabular}{|c|c|c|c|c|}         \hline         \multicolumn{5}{|c|}{\textbf{Table 1:}Unfiltered Water}\\         Concentration of analyte in sample   & Avg & Std Dev &  RSD & 90\% CI \\          \hline         Total hardness (ppm $CaCo_3$ equiv)  & 97  &    2   &  2\%  & \pm 5   \\         Calcium hardness (ppm $Ca^{2+}$)     & 57  &    3   &  5\%  &  \pm 5   \\         Magnesium hardness( ppm $Mg^{2+}$)   & 40  &    3   & 7.5\% &  \pm 5 \\         \hline         \end{tabular}      This table is giving me an error. That says               ! Missing $ inserted.     <inserted text>     $     l.41 ...Co_3 equiv\) & 97 & 2 & 2\% & \pm     5 \\      I've inserted a begin-math/end-math symbol since I think you left one out. Proceed, with fingers crossed. What is the cause of this error? I can't seem to find any thing that is mismatched.


title: bibLaTeX authoryear citation style with unknown year

text: I have an `@inbook` reference in my bibtex library with an unknown year. Since I use the bibLaTeX authoryear citation style with some customizations my normal citations (with known year) look like: > Author1/Author2/Author3 (year) But when there is no year defined it will display the title of the reference where it should be: > Author1/Author2/Author3 What do I have to redefine in order to change this behavior?


title: Set width of section title

text: I try to prevent section titles of breaking "too early", i.e. leaving so much room between it and the page border. Like in this screenshot, I would like the "system" and the "digestion" to be in the same line as the rest of the titles. ![](http://www.abload.de/img/latex_problemq3osa.png) I am using the `scrbook` class. This is some code reproducing the problem:               \documentclass[%        final,              11pt,        bigheadings,        a4paper,        DIV11,              1.1headlines,        headexclude,          footexclude,          mpexclude,            pagesize,             twoside,              onecolumn,            openany,              titlepage,            halfparskip*,        headsepline,         nochapterprefix,        bibtotoc,               tocindent,              listsindent,            pointlessnumbers,        fleqn,                ]{scrbook}          \begin{document}     \section{This is a long section a long section a long section title}     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam ultrices, lectus vel    rhoncus ornare, dui neque rhoncus lectus, ut eleifend risus erat et nibh. Cras accumsan volutpat est. Nunc cursus augue non mi tincidunt pretium. Aliquam et eros mi. Curabitur eu dui est, sit amet laoreet est. Nullam libero nisl, convallis eu placerat eu, pellentesque sit amet est. Suspendisse dolor mauris, porta non venenatis nec, eleifend nec erat. Aenean hendrerit volutpat quam. Vestibulum fringilla magna pretium mi pellentesque lacinia.               \end{document}


title: Hyperref options

text: Consider the following two MEWs:               \documentclass{article}     \usepackage[colorlinks=false,pdfborder={0 0 0}]{hyperref}     \begin{document}     Click \href{http://www.latex-project.org/}{here} to go to the webpage.     \end{document}      and               \documentclass{article}     \usepackage[hidelinks]{hyperref}     \begin{document}     Click \href{http://www.latex-project.org/}{here} to go to the webpage.     \end{document}      **Question** Are the two MEWs equivalent, i.e., are the any difference between `[colorlinks=false,pdfborder={0 0 0}]` and `[hidelinks]` as options to `hyperref`? If there are differences, what are they?


title: Reducing sign interspace in slightly too wide equations

text: Some equations are sometimes slightly too wide. One way is to manually add `\!` commands wherever it seems relevant in the equation. Is there an automatic alternative to:               x\!=\!y\!+\!z


title: Is it possible to shade an area of a picture using the xcolor package?

text: I want to shade an area of of picture I have created in the environment `\picture`. Is there anyway I can shade this by setting it between co- ordinates? i.e. could I shade in blue the area between `(1,1), (1,4), (3,1), (3,4)` etc?


title: Table of contents, how to change name

text: I want to start with my first LaTeX project and I am using a couple of templates, but I've encountered a problem. The template seems to be using: > \tableofcontents For the table of contents, it looks good however I want to change the header from 'Contents' to something else, like 'Inhoudsopgave', but I can't seem to do that. What is the solution?


title: How to change Table of Contents title from "Contents" to X using memoir?

text: > **Possible Duplicate:**   >  How to change the title of ToC? The default Table of Contents title is "Contents". How would I change "Contents" to something else, e.g., "Chapters"? I'm using the `memoir` class.


title: Biblatex: 2 custom fields, only one is working

text: Following this question BibLaTeX/BibTeX custom field to show file link and Notes after bibliography entry with Biber and biblatex I get it to work (well, more or less). In the code below I defined a field `file` and `mynote`. It is working for `file` but not for `mynote`. I don't understand why!               \documentclass[%         a4paper,         english,         11pt,     ]{article}          \usepackage{filecontents}     \begin{filecontents*}{\jobname.bib}     @article{Padial:2010,         title={The integrative future of taxonomy},         author={José M.~Padial and Aurélien Miralles and Ignacio De la Riva and Miguel Vences},         journal={Frontiers in Zoology},         year=2010,         month=may,         volume=7,         number=16,         pages={1--14},         doi={10.1186/1742-9994-7-16},         issn={1742-9994},         mynote={Very good book!},         file={./article/2010_Wang.pdf},         keywords={biology, taxonomy},     }     \end{filecontents*}          \usepackage{fixltx2e}     \usepackage{babel}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}          \usepackage{type1ec}     %\usepackage{lmodern}     \usepackage{microtype}          \usepackage[%         left=5cm,         right=2cm,         %showframe,         ]{geometry}          \usepackage[color,notref,notcite]{showkeys}          \usepackage[strict,autostyle]{csquotes}          \usepackage[%         backend=biber,         style=ieee,     ]{biblatex}     \DeclareRangeChars{~,;-+/{}} % add '{}' as page range delimiter     \addbibresource{\jobname.bib}          \DeclareFieldFormat{mynote}{\textbf{#1}}     \DeclareFieldFormat{file}{\href{file:#1}{\textbf{Open file}}}     \AtEveryBibitem{%         \csappto{blx@bbx@\thefield{entrytype}}{% put at end of entry             \iffieldundef{file}{\space \textbf{No file!}}{%             \space \printfield{file}}             \iffieldundef{mynote}{\space \textbf{No annotation!}}{\space\printfield{mynote}}         }     }          \usepackage[%         colorlinks,         unicode,         breaklinks,     ]{hyperref}          \begin{document}          \nocite{*} % list all entries          \printbibliography     %\printbibliography[keyword=taxonomy]          \end{document}


title: Drawing polyhedra using TikZ with semi-transparent and shading effect

text: I would like to draw an Octahedron using `TikZ`, I found nowhere to start, I tried drawing 6 points and then connecting them properly, but this method gives no 3D feel at all, this is my drawing:               \begin{tikzpicture}[scale=3]     \coordinate (A1) at (0,0);     \coordinate (A2) at (0.6,0.2);     \coordinate (A3) at (1,0);     \coordinate (A4) at (0.4,-0.2);     \coordinate (B1) at (0.5,0.5);     \coordinate (B2) at (0.5,-0.5);          \draw[dashed] (A1) -- (A2) -- (A3);     \draw (A1) -- (A4) -- (A3);     \draw[dashed] (B1) -- (A2) -- (B2);     \draw (B1) -- (A4) -- (B2);     \draw (B1) -- (A1) -- (B2) -- (A3) --cycle;     \end{tikzpicture}      I wonder how can I add shading to each surface, and make each surface semi- transparent, also adjust the invisible edges' color lighter from the observer perspective, like the one on the wikipedia page: ![Octahedron on wikipedia page](http://i.stack.imgur.com/PaXDk.png) So my question is: How to polish my `TikZ` drawing to make a polyhedron look like a 3D object? or is there a package other than `TikZ` could do that? Thanks


title: How do I color the page number in a partial TOC?

text: I am writing a thesis and have the first two pages of each chapter colored gray with white text, before starting with the sections on white pages. I now want a partial TOC in each chapter, on these gray pages, and thus in white text. Although the section titles are now colored white, the page numbers are still black. How do I get the page numbers to be white as well in the partial TOC (while remaining black in the main TOC)?   Edit: The main TOC contains some lines of text to divide the contents into parts (this is just in the contents for clarity, the parts are not coded or numbered in any way). This seems not compatible with the solution provided. MWE:               \documentclass{book}     \usepackage{titletoc,xcolor}     \usepackage[pagecolor=none]{pagecolor}          \begin{document}     \tableofcontents     \addtocontents{toc}{\setcounter{tocdepth}{0}}          \color{white}     \chapter{This is Chapter 1}     \thispagestyle{empty}\newpagecolor{gray}          \newpage\thispagestyle{empty}     \startcontents[section]     \printcontents[section]{}{1}{\addtocontents{ptc}{\setcounter{tocdepth}{2}}}          \newpage\newpagecolor{white}     \color{black}     \section{bla}\section{bla}          \addtocontents{toc}{\smallskip \textit{Modeling} \medskip \par}          \chapter{This is Chapter 2}%would be made up like Chapter1; omitted here for clarity     \chapter{This is Chapter 3}          \addtocontents{toc}{\smallskip \textit{Experiments} \medskip \par}          \chapter{This is Chapter 4}     \chapter{This is Chapter 5}          \end{document}


title: Trouble setting a length

text: I'm starting with LaTeX, and there are things that puzzle me. I'm trying to set a length that's the `\textwidth` minus (let's say for example) two inches. In the preamble, I wrote:               \newlength{\bplen}     \setlength{\bplen}{\textwidth}     \addtolength{\pblen}{-2in}      The compiler tells me:               ! Undefined control sequence. <argument> \pblen      l.21 \addtolength{\pblen}{-2in}     ! You can't use `blank space  ' after \advance.     \addtolength #1#2-<\advance #1                                     #2\relax     l.21 \addtolength{\pblen}{-2in}     ! LaTeX Error: Missing \begin{document}.      I've just _defined_ `\bplen` and what's that about a missing `\begin{document}`? Aren't I allowed to set lengths in the preamble?


title: Tikz array as argument

text: # Problem I'm drawing flow diagrams in Tikz, and they basically include a header, followed by a list of flow components set below an arrow. I've written functions to take arguments in Tikz before, but I'm wondering if there's any way to take in a "list" of arguments and loop through these with a for loop of some sort. I've tried searching for similar items on google, but haven't gotten very far as I'm not exactly sure how to phrase what I'm looking for. ## Pseudocode               \newcommand{\FlowPipe}[3][FlowPipe]{ %first argument is x co-ord, second is array of text         \newcounter{i}         \setcounter{i}{0}         \draw[->] (#1,0) -- (#1+3,0);         \foreach\argtext in {#2}{              \node (#1,i) {\argtext};              \stepcounter{i}         }     }      Basically, for each item in the array, it should add a node at some specified distance below and put the text of that item there.


title: smartdiagram 0.2 / xparse / Kubuntu

text: I have a package dependency problem on Kubuntu 12.10. I have installed Texlive2012 from the known ppa. The brandnew "smartdiagram 0.2" package has a dependency for xparse. This package does not exist in the ppa. I tried to compile it into my local texmf tree, but it errors out because it does not find "l3docstrip.tex". But this "l3docstrip.tex" is already supposed to be there, because it is part of the "l3kernel" package. And this package is already installed from the ppa. Where do I go from here ? I don't want to mess up the whole installation.


title: Aligning text in title between pictures

text: I need help with aligning text in my simple custom title page. I wish to have title text and some additional text below centered horizontally between two logos. It would be nice if the logos would be center vertically also.               \begin{titlepage}     \begin{center}              % Upper part of the page. The '~' is needed because \\         % only works if a paragraph has started.             \includegraphics[width=0.15\textwidth]{./logo_pg}~%\\[1cm]             \textsc{\LARGE University Name}             \textsc{Faculty}             \includegraphics[width=0.15\textwidth]{./logo_eti}             \\[1.5cm]              % Title         \HRule \\[0.4cm]         { \huge \bfseries Project's Name \\[0.4cm] }              \HRule \\[1.5cm]              \Large         Author1 \\         Author2              \vfill              % Bottom of the page         {\large \today}          \end{center}     \end{titlepage}      Oh and the HRule is defined in the main .tex file               \newcommand{\HRule}{\rule{\linewidth}{0.5mm}}      Thanks in advance for help.


title: Defining new unit (year, century) in siunitx

text: I'm having a hard time figuring out the LaTeX commands to define new units of `year` and `century` in `siunitx`. I'd like to write `\SI{3}{\cm\per\year}` and have it show: **3 cm yr-1** , or `\SI{42}{\micro\meter\per\century}` become **4.2E-5 m/century**


title: Drawing hexagons

text: I have a case where I need to draw a hexagonal grid in LaTeX. I am considering just reading the grid from an eps file. Is there an alternative way to do it completely within LaTeX?


title: How to convert diagram to LaTeX

text: I am new to LaTeX, and currently, I am trying to drawing this image in LaTeX. Could someone help me on that? It's quite difficult for me. Here is the image: ![enter image description here](http://i.stack.imgur.com/8POUz.png)


title: remove space in latex

text: I am using the following sample for creating a poster in write latex. http://www.latextemplates.com/template/jacobs-landscape-poster However, in the space above results, I have some extra space left (as my 'Methods' portion is very small). However, I am not able to remove that extra space. Could you please help me with that?


title: How to build a macro that return the absolute value of an argument of another macro?

text: How can I build a macro that return the absolute value of an argument of another macro? I would like that the `\abs` macro return the absolute value of the its argument.               \RequirePackage{tikz}     \newcommand{\abs}[1]{<implementation>}     \newcommand{\command}[2]{\raisebox{\numexpr\abs{#1}*#1\relax\baselineskip}[0pt][0pt]{}{}}      So whether I use a positive or negative number as argument, the expression `\abs{#1}` will always be positive.


title: Error R Sweave and Knitr Plugins at WinEdt 8.0?

text: I try a simple example document .rnw at WinEdt with R Sweave Plugin like this :               \documentclass{article}          \begin{document}     \SweaveOpts{concordance=TRUE}     \textbf{hello world}     <<echo=TRUE,fig=TRUE>>=     x<-1:40     y<-rnorm(40)     plot(x,y)          @                    \end{document}      So, i am running my document with R Sweave plugin but i get error like this ![tes r sweave and knitr at Winedt](http://i.stack.imgur.com/KjCnS.png)               Error Launching Console Application      Command Line:   "\bin\x64\Rscript" "C:\Users\hirwanto\AppData\Roaming\WinEdt Team\WinEdt 8\Contrib\R-Sweave\Sweave.R" "Ass.Rnw"     Startup Folder: D:          The system cannot find the file specified.      I don't know **How to resolve it** ? Before I can running my document.rnw and .rmd.


title: Longtable in two pages

text: I have a table over two pages. Every question of my table is separated with \miderule. However one question is quite long. I want this to span over two pages but because I structured it with midrule it shows up on the next page. Is there any way to fix this.               \begin{longtable}[l]{p{.21\textwidth} p{.74\textwidth}}     \toprule     \textbf{Topic}                                                                                & \textbf{Question}                                                                                \\           \midrule     Introduction     \\      \midrule     Background information &      Q1. This is a question     \\           \midrule     Design &      Q1. This is a question     \newline  Q2. This is a question     \\     \midrule     Prototype &      Q3. This is a question     \newline a. Type     \newline b. Type     \newline c. Type     \newline d. Type     \newline e. Type     \newline f. Type**      If for instance I want to put c,d,e,f on a new page it doesn't work. Q3 is simply but on a new page fully and doesn't span over two pages.


title: memoir class glossary: \changeglossnumformat not working

text: I've modified `memoir`'s glossary format in order for things to look the way I want. I'm pretty happy, except for one thing: I'd like for the page numbers to be clickable links. When the reader clicks, he/she should be taken to the corresponding page. But I cannot get this to work. Here's what I have: ### `main.tex`               \documentclass{memoir}     \usepackage{style}     \begin{document}     \printglossary     \chapter{A Chapter}     some text \glossary(g1){g1}{a glossary entry}     \end{document}      ### `style.sty`               \usepackage{hyperref}     \usepackage{calc}          \newlength{\mylength}          \makeglossary          \renewcommand*{\glossaryname}{List of Notation}      \renewcommand{\glossaryspace}[1]{}     \changeglossnum{\thepage}      \renewcommand*{\glossarymark}{\markboth{\glossaryname}{\glossaryname}}      \renewcommand{\glossitem}[4]{%      \setlength{\mylength}{1.9cm-\widthof{#1}}%     \sbox\@tempboxa{#1 \space #2 #3 \makebox[2em]{\hyperpage{#4}}}%      \par\hangindent 2em      \ifdim\wd\@tempboxa<1.0\linewidth      #1 \hspace{\mylength} #2 #3 \cftdotfill{\@dotsep} \makebox[1em][r]{\hyperpage{#4}}\relax      \else      #1 \cftdotfill{\@dotsep} \makebox[1em][r]{\hyperpage{#4}}\\      #2 #3      \fi}       According to the `memoir` documentation,               \changeglossnumformat{|hyperpage}%% for hyperlinks       should do the trick, but in my case it doesn't do anything. So instead, I added they `\hyperpage` around #4, which creates a clickable link for each page number in the glossary, but it doesn't lead to the right page, in fact it leads nowhere (null). I'm using               makeindex -s basic.gst -o main.gls main.glo      to compile the glossary. I'm on a Mac using TexShop with TeXLive-2010 installed. BTW, I'm not interested in using any other classes like `glossary` or `nomencl`. I've come so far already. I'd just like to get the links to work.


title: How draw smooth "rounded arrows"?

text: I have the following diagram:               \documentclass{standalone}          \usepackage{tikz}     \usetikzlibrary{calc}          \begin{document}          \begin{tikzpicture}       \coordinate (shift) at (1mm,0mm);            \node [draw=black, minimum size = 1cm] (1) {};       \node [inner sep=0pt, circle, fill=black, minimum size = 2mm] (1bis) at (1) {};       \node [anchor=west,draw=black, minimum size = 1cm] (2) at ($(1.east) + (shift)$) {};       \node [inner sep=0pt, circle, fill=black, minimum size = 2mm] (2bis) at (2) {};       \node [anchor=west,draw=black, minimum size = 1cm] (3) at ($(2.east) + (shift)$) {};       \node [inner sep=0pt, circle, fill=black, minimum size = 2mm] (3bis) at (3) {};       \node [anchor=west,draw=black, minimum size = 1cm] (4) at ($(3.east) + (shift)$) {};       \node [inner sep=0pt, circle, fill=black, minimum size = 2mm] (4bis) at (4) {};       \node [anchor=west,draw=black, minimum size = 1cm] (5) at ($(4.east) + (shift)$) {};       \node [inner sep=0pt, circle, fill=black, minimum size = 2mm] (5bis) at (5) {};       \node [anchor=west,draw=black, minimum size = 1cm] (6) at ($(5.east) + (shift)$) {};       \node [inner sep=0pt, circle, fill=black, minimum size = 2mm] (6bis) at (6) {};            \draw[-latex,very thick]  (1bis.center) -- ($(1.north) + (0,3mm)$) -| (3bis);       \draw[-latex,very thick]  (3bis.center) -- ($(3.south) - (0,3mm)$) -| (5bis);       \draw[-latex,very thick]  (5bis.center) -- ($(5.north) + (0,5mm)$) -| (2bis);       \draw[-latex,very thick]  (2bis.center) -- ($(2.south) - (0,5mm)$) -| (4bis);       \draw[-latex,very thick]  (4bis.center) -- ($(4.north) + (0,3mm)$) -| (6bis);       \draw[-latex,very thick]  (6bis.center) -- ($(6.south) - (0,7mm)$) -| (1bis);     \end{tikzpicture}          \end{document}      How can I replace the angular arrow by smooth ones ?


title: getting bibliography to use numbers as keys

text: I would like to get numbers, e.g. [5], as keys in my document when I refer to a publication in my bibliography. Here is the code that I'm using to print all of the references in my database:               \documentclass[11pt,a4paper]{article}          \begin{document}      \nocite{*}     \bibliographystyle{plain}     \bibliography{C:/work/papers/database} % References file          \end{document}      This produces all authors names as a key. I am using WinEdt, if that's of any conciliation.


title: How to use Verdana under Mac OS?

text: I am trying to use the Verdana font in LaTeX under Mac OS X. I have found some packages, like `verdana` or `winfonts` but I can't get around to install them. Can someone enlighten me of the best way to accomplish the Verdana font under Mac OS X?


title: make latex to automatically choose the placement of algorithms

text: I have several algorithms written down in a single file and would like latex to spread them across the document to save spaces. For example an algorithm can be just 3 or 4 lines and another can be 20 to 30 lines. So how do I tell latex to squeeze the smaller algorithms among the text in a document.               \documentclass{llncs}     \usepackage{llncsdoc}     \usepackage{lipsum}     \usepackage[ruled,vlined,linesnumbered,noresetcount]{algorithm2e}     \AlgoDisplayBlockMarkers      \begin{document}     \lipsum     \begin{algorithm}     \caption{alg1\label{1}}      ...\;     ...\;     ...\;     ...     \end{algorithm}     \begin{algorithm}     \caption{alg2\label{2}}      ...\;     ...\;     ...     \end{algorithm}     \begin{algorithm}     \caption{alg3\label{3}}      ...\;     ...\;     ...\;     ...     \end{algorithm}     \begin{algorithm}     \caption{alg4\label{4}}      ...\;     ...\;     ...\;     ...\;     ...     \end{algorithm}     \lipsum     \end{document}


title: \footcite and \autocite handle comma differently

text: `biblatex`, with `verbose-trad2` style, has different behaviors when you use `\autocite` and `\footcite`. It is weird because, in this context, `\autocite` calls `\footcite`. Here is the problem (look the place of the comma):               \noindent test\autocite{author00:_title},\\     test\footcite{author00:_title},      Result : ![enter image description here](http://i.stack.imgur.com/YV5n4.png) Is it a bug or a feature? MWE :               \begin{filecontents}{biblio.bib}     @Book{author00:_title,       author =   {Author},       title =    {Title},       publisher =    {Publisher},       year =     2000}     \end{filecontents}          \documentclass[12pt,twoside,a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[english,french]{babel}     \frenchbsetup{StandardLists=true}          \usepackage{setspace}     \usepackage{graphicx}      \usepackage{lmodern}     \usepackage{xspace}          \usepackage[autostyle=true]{csquotes}     \usepackage[style=verbose-trad2,          hyperref,          backend=biber,          isbn=false,          doi=false,          url=false,          date=year]{biblatex}     \AtEveryBibitem{\clearlist{language}}     \renewcommand*{\newunitpunct}{\addcomma\space}     \bibliography{biblio}     \usepackage[colorlinks]{hyperref}          \begin{document}          \noindent test\autocite{author00:_title},\\     test\footcite{author00:_title},               \printbibliography     \end{document}


title: biblatex repeated citations in footnotes that point back to earlier footnotes

text: I am using biblatex as follows:               \usepackage[style=verbose-note,backend=bibtex]{biblatex}     \renewcommand{\cite}{\autocite} % citations in footnotes      This works _almost_ as I want it. What I still would like is that a repeated citation (say I \cite{A} in p. 1, and then I \cite{A} again in p. 2) should point back to the earlier citation. So, in this case, only one footnote should be generated, and both p. 1 and p. 2 should have a link to that footnote (which is on p. 1 only). Is this possible?


title: page number first page of chapter on right side

text: I'm writing my thesis. I'm using this pagestyle: fancy But page number in first page of chapter appears in the middle of page. I want to move to right side. Can I change it ?


title: A few questions about head & foot & page number

text: I have a sample `.tex` file as below - in this file i have redefined the foot by using `fancyhdr` package. My questions as below:   1. The chapter page (in this example, say page 1 & page 5) don't have the foot I modified by `fancyhdr`. How can I make all pages use the same foot?   2. If I want the page begin from page 2, what should i do? for example, current page1 will be empty, and current page 2 will be page 1 and etc...  Hope I have put my question clearly.:)                   \documentclass{book}         \usepackage{blindtext}         \usepackage{fancyhdr}         \pagestyle{fancy}         \fancyhf{}         \renewcommand{\chaptermark}[1]{\markboth{#1}{}}         \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}         \fancyfoot[R]{\scriptsize \thepage}         \fancyfoot[L]{\scriptsize hihi}         \fancyfoot[C]{\scriptsize \leftmark}         \renewcommand{\headrulewidth}{0pt}         \begin{document}         \chapter{chapter1}         \blindtext\blindtext\blindtext\blindtext\blindtext         \blindtext\blindtext\blindtext\blindtext\blindtext         \chapter{chapter2}         \blindtext\blindtext\blindtext\blindtext         \blindtext\blindtext\blindtext         \end{document}