title: \par\bigskip and the parskip package

text: I read that if one uses the `parskip` package then there is no need to add `\par\bigskip` to separate paragraphs; it is enough to move the new sentence to new line with Enter. That's true but at some locations I'm getting a very big skip although I just made a skip by moving the paragraph to a new line with the Enter button. And if I for example change the `linespread` from `1.8` to `1.6` I'll get just at some locations bigger skips. So how to use the package correctly?               \documentclass[12pt]{book}      \usepackage[german]{babel}     \usepackage[utf8]{inputenc}     \usepackage{parskip}     \usepackage{amsmath}     \usepackage{graphicx}     \usepackage{caption}     \usepackage{subcaption}     \usepackage[top=3cm,bottom=1.5cm,left=3cm,right=2cm,asymmetric]{geometry}     \usepackage{booktabs,dcolumn}     \usepackage[figureposition=bottom]{caption}     \usepackage{fancyhdr}     \numberwithin{equation}{chapter}     \fancyhf{}     \fancyhead[C]{\leftmark}     \fancyhead[LE,RO]{\thepage}     \pagestyle{fancy}     \renewcommand{\headrulewidth}{0.4pt}     \renewcommand{\chaptermark}[1]{      \markboth{#1}{}}     \newcolumntype{d}[1]{D{.}{.}{#1}}     \newcommand*{\mc}[1]{\multicolumn{1}{c}{#1}}     \newcommand*{\mcTwo}[1]{\multicolumn{2}{c}{#1}}     \linespread{1.8}     \setlength\parindent{0pt}     \begin{document}


title: How to print \frac{1}{2} by a single Unicode character?

text: I am looking for a command which would print simple fractions like 1/2, 1/3 etc using glyphs available in modern TTF/OTF fonts. Ideally, I want this command to output ordinary `\frac{1}{2}`, `\frac{1}{3}` in case if my document is compiled with (PDF)LaTeX, but outputs something like `$\text{\char"00BD}$` in case if the compiler is XeLaTeX of LuaLaTeX (and `fontspec` and / or `unicode-math` is loaded) and required Unicode character is available in current font. Is such a command already invented by somebody?


title: Text upside-down, characters rotated along baseline?

text: I'd like to achieve something like in the picture below: ![enter image description here](http://i.stack.imgur.com/7nm2L.png) Another example: ![enter image description here](http://i.stack.imgur.com/tZVTc.png) Note that the text is not simply rotated! I know it could be achieved by boxing each character separately, measuring the height and then raising by the missing amount to reach e.g. 1em... But I'm sure there is a better way around. I'd like a macro that works for a whole line for instance (a whole paragraph would be even better! :) ). **Edit:** Ascenders should protrude (as descenders) unless they have some special feature, like 'striketrough' in a 't'. Capitals should not protrude.


title: How do I change the color of the author text in the Title (first) frame?

text: \documentclass[T]{beamer}          \usetheme{Frankfurt}     \usecolortheme{orchid}     \usefonttheme{structuresmallcapsserif}     \usefonttheme{serif}     \usepackage{multicol}     \usepackage{graphicx}          \title{Example Presentation}     \author{Author 1\\Author 2}     \date{\today}          \begin{document}          {\usebackgroundtemplate     {\includegraphics[width=\paperwidth,height=\paperheight]{caestitlepage}}     \begin{frame}         \titlepage     \end{frame}          \end{document}      What changes would I need to make in order to make the "author text" white??


title: TikZ - Random superposition of drawings

text: I would like to imitate the first page of this pdf by using the following code for the hard job of making the sudoku grids. Indeed the problem is just to superpose several sudoku grids, and not to draw this sudoku grids individually. ## CODE               \documentclass{article}         \usepackage{tikz}         \usetikzlibrary{backgrounds,shapes}              \tikzset {             digit/.style = {                 minimum height = 5mm,                 minimum width = 5mm,                 anchor = center             }         }              \newcounter{row}         \newcounter{col}              \newcommand\setrow[9]{             \setcounter{col}{1}             \foreach \n in {#1, #2, #3, #4, #5, #6, #7, #8, #9} {                 \edef\x{\value{col} - 0.5}                 \edef\y{9.5 - \value{row}}                 \node[digit,name={\arabic{row}-\arabic{col}}] at (\x, \y) {\n};                 \stepcounter{col}             }             \stepcounter{row}         }              \newcommand\shownumber{             \foreach \x in {1,2,3,4,5,6,7,8,9} {                 \node[font=\tiny,color=gray] at (\x-0.5,9.5) {\x};                 \node[font=\tiny,color=gray] at (-.5,9.5-\x) {\x};             }         }          \begin{document}          \begin{tikzpicture}[scale=.5]         \begin{scope}             \draw (0, 0) grid (9, 9);             \draw[very thick, scale=3] (0, 0) grid (3, 3);                  \setcounter{row}{1}             \setrow { }{2}{ }  {5}{ }{1}  { }{9}{ }             \setrow {8}{ }{ }  {2}{ }{3}  { }{ }{6}             \setrow { }{3}{ }  { }{6}{ }  { }{7}{ }                  \setrow { }{ }{1}  { }{ }{ }  {6}{ }{ }             \setrow {5}{4}{ }  { }{ }{ }  { }{1}{9}             \setrow { }{ }{2}  { }{ }{ }  {7}{ }{ }                  \setrow { }{9}{ }  { }{3}{ }  { }{8}{ }             \setrow {2}{ }{ }  {8}{ }{4}  { }{ }{7}             \setrow { }{1}{ }  {9}{ }{7}  { }{6}{ }                  \shownumber{}         \end{scope}     \end{tikzpicture}          \end{document}


title: With TikZ, How do I use a labeled coordinate that's inside a node?

text: In the following diagram, I'm trying to draw a line from the center of the red dot (inside the blue node) to the green node. The coordinate of the red dot is labeled "thepoint", so this should be easy. However the line seems to go from the origin (0,0) of the blue node instead... Does anyone know what I'm doing wrong? How can I refer to a labeled coordinate that's inside a node? (Or is there a better way of doing this?)               \documentclass{standalone}          \usepackage{tikz}          \begin{document}     \begin{tikzpicture}          %first node     \node [fill=blue!20, matrix] (firstNode)     {         %some dots         \fill[red] coordinate (thepoint) (0.4,0.2) circle (3pt);         \fill[black] (0.0,0.2) circle (3pt);         \fill[black] (0.0,-0.2) circle (3pt);\\     };          %another node     \node[fill=green!20](anotherNode) at (3,0) {2nd node};          %the line     \draw[-latex] (thepoint) to [out=30,in=180] (anotherNode.west);          \end{tikzpicture}     \end{document}      Thanks! EDIT: Answered my own question! (sigh...) I had a small (but important) syntax mistake. The correct way to define the coordinate is:               \fill[red] (0.4,0.2) coordinate (thepoint) circle (3pt);


title: Override default cite tooltip

text: I'm trying to add a tooltip to each inline citation. So far I've almost got it working using pdfcomment:               \documentclass{article}     \usepackage[colorlinks=true]{hyperref}     \usepackage{pdfcomment}               \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}     @article{Bli74,       author = {Blinder, Alan S.},       year = {1974},       title = {The economics of brushing teeth},     }     \end{filecontents}          \usepackage{usebib}     \bibinput{\jobname}          \makeatletter       \let\@internalcite\cite       \renewcommand{\cite}[1]{%       \pdftooltip{\@internalcite{#1}}{\usebibentry{#1}{title}}}     \makeatother          \begin{document}     This is a citation: \cite{Bli74}.          \bibliographystyle{apalike}     \bibliography{\jobname}     \end{document}      But there seems to be a default tooltip because of the link in the citation "Go to page 1" in my mac's Preview.app. I see that my custom tooltip is working but only on the thin boundary of the citation (including the little brackets). ![Animated gif of what's going on](http://i.stack.imgur.com/uxxKg.gif) Is there a way to redefine the cite command to avoid this tooltip and use just my custom tip for the entire citation? Meanwhile, I would also like to handle multiple citations: \cite{thing1,thing2}. How can I extract (split on comma) and add tooltips to both thing1 and thing2?


title: TikZ change reference point

text: In TikZ, picture is drew based on the point (0,0). if my whole picture is based on the point, e.g., (20,0)? how can i draw it easily? it is better to transform the reference point from (0,0) to (20.0). i tried this:                 \begin{tikzpicture}[shift={(20mm,0)}]      but it didn't work. `shift` works for many commands, but it seems that it doesn't work for environment. it is not good to add `shift` option to every command. @Martin: adding `shift` with `scope` seemed to have no influence on the whole picture. i want the two grids to move to the right. for the whole picture, there will have many other items. to construct the picture easily, it is better to refer to the point (0,0). but for the whole picture display, it is better to put it based on the point (20,0)               \documentclass[titlepage,a4paper]{article}          \usepackage{tikz}     \usepackage[lmargin=2.500000cm,rmargin=2.500000cm,tmargin=2.500000cm,bmargin=2.500000cm]{geometry}          \begin{document}     \section[General remarks]{General remarks}     \subsection[Geometry and coordinate system]{Geometry and coordinate system}     The main layout of the structure is adopted:\\          \begin{tikzpicture}[scale=1,thick]       \begin{scope}[shift={(20mm,0)}]         \foreach \xoffset in {0,5.2}         {           \begin{scope}[shift={(\xoffset,0)}]           \draw[xstep=1,ystep=1] (0,0) grid (5,5);           \end{scope}         }       \end{scope}     \end{tikzpicture}     \end{document}


title: How to add images inside the table in beamer

text: I need to insert the images in the table in **Beamer** as shown below ![enter image description here](http://i.stack.imgur.com/xZMlg.png) The shown figure should be one frame in beamer and table must have the boarder I am using "Torino" theme in my beamer can any body tell the beamer code for this..... thanks in advance.....


title: Robust processing of autogenerated LaTeX files that contain many errors

text: I use `knitr` to generate pretty reports, with `pdflatex` as backend. Everything works fine if the R code runs without error. However, if the R code fails, the autogenerated file is sometimes invalid in such a way that LaTeX won't even generate a PDF out of it -- too many errors, resulting in the following output:               (That makes 100 errors; please try again.)     ! ==> Fatal error occurred, no output PDF file produced!      Example: `texput.tex`               \documentclass{scrartcl}     \pagestyle{empty}          \begin{document}       \input{bad}     \end{document}      Example: `bad.tex`               \e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e     \e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e     \e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e     \e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e\e      (The code, and a `Makefile`, can be downloaded or cloned here.) In such cases, the error in the R script is difficult to find, because no output is available. Is there a foolproof equivalent of `\input` that will "just work" in such cases? It's fine even if the resulting document ends abruptly at the place of the fatal error, as long as a valid PDF is generated. Or perhaps just setting the error threshold to an insanely large value and/or resetting the number of encountered errors after each `\input` will help?


title: How do I add a blank line in the algorithmic environment?

text: I'm trying to learn the `algorithmic` package for typesetting pseudocode. One problem I'm running into is that I can't figure out how to insert blank lines, to separate blocks of code. The usual `\\\` or starting a new paragraph doesn't seem to work. How can I insert blank lines in in the `algorithmic` environment?


title: TikZ: Image Matrix - shifting connected paths

text: I currently use TikZ matrix for arranging images and their nodes for putting some labels on the edges. Take a look at the attached image. For some reason, i am unable to shift connected paths. For example, i'd like to shift the vertical line to the left so that it does not cross `tux A` or `tux B` label. Yet, `[xshift=]` strangely, does not cause any shift. Image Source ![misalignment](http://i.stack.imgur.com/Ln95a.png)               \documentclass{article}     \usepackage{graphicx}     \usepackage{tikz}     \usetikzlibrary{positioning,calc}               \begin{document}          \begin{tikzpicture}[font=\sffamily\small,ampersand replacement=\&]       \matrix [column sep=0mm,row sep=0mm,inner sep=0mm]{%         \node(i1){\includegraphics{linux-pinguin.png}}; \&         \node(i2){\includegraphics{linux-pinguin.png}};\\         \node(i3){\includegraphics{linux-pinguin.png}}; \&         \node(i4){\includegraphics{linux-pinguin.png}};\\         \node(i5){\includegraphics{linux-pinguin.png}}; \&         \node(i6){\includegraphics{linux-pinguin.png}};\\     };      \node [rotate=90] at (i3.west) {tux B};      \node [rotate=90] at (i5.west) {tux A};      \draw [xshift=-2cm] (i5.south west) -- (i3.north west) node [rotate=90,midway,above] {benevolent};      \draw (i2.north west) -- (i2.north east) node [midway,above] {1 col};     \end{tikzpicture}          \end{document}


title: LaTeX plugin for IntelliJ IDE (and others from JetBrains)

text: Since I'm here for the first time as a registered user, I'll introduce myself. I am a developer that have created a Gitignore plugin last time for IntelliJ IDE. It was fun to develop something that others use. After that I was thinking about a new product that I can release and I've checked wishlist on JetBrain's plugins page - there is a request for LaTeX plugin (there are not too much voices in general, but I supose it's because of page's low viewership). Before I'll start anything I'd like to ask you - does LaTeX plugin for JetBrains' IDEs makes any sense ? I'd like to hear, what do you think about it - will you use it ? Are there many IntelliJ, etc users ? What would you like to see in initial releases ? Thanks for the answers and I believe that this non-latex-problem question will not be banished. Best regards, hsz Edit: As @Joseph Wright pointed me out - not everyone know what IntelliJ is. IntelliJ is an IDE for programming in Java, PHP, NodeJS, Android, etc.. It allows programmer to write in barely every language that he needs. JetBrains provides many products adapted for various environments (Python/Perl, C#, iOS, Ruby, databases...). As soon as LaTeX is (sorry for that!) just a minor tool in programming, they didn't provide anything to cover it. That's why I got this idea - I am a programmer that needs to write documments in TeX - should I install external software that does not provide version controlling or should I try to create something integrated with powerful IDE that will give me more options, not just writing TeX documents.. I do not know if there are many programmers here and whet do you do in your work, what IDE do you use, but I give a shoot.


title: Synctex Go to source from pdf and comment package

text: Synctex is very usefull for me. Jumping between source text and the compiled PDF is is absolutely great. But when I use **comment package:** **in TeXStudio** --- I can't switch from pdf to source. **in TeXnicCenter and in TeXWorks** --- there is file comment.cut opening. How I can go to source ( _my source_ , not comment.cut file), using comment package? Is this a known problem? MWE:               \documentclass{article}     \usepackage{comment}          \begin{document}     \includecomment{partA}     \includecomment{partB}          \begin{partA}     Lorem ipsum dolor sit amet, consectetur adipisicing elit.     \end{partA}          \begin{partB}     Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium.     \end{partB}          \end{document}


title: Listing linebreaking not working

text: got a listing where the code include a very long sequence of characters (letters, numbers & other). With `linebreak=true`, the sequence gets broken at non-letter characters. However I still got a very long sequence of letters, that's not getting breaking down. With all other options, see code, the result is still the same.               \lstinputlisting[language=XML, breaklines=true, breakindent=0pt, breakautoindent=true, linewidth=\textwidth, breakatwhitespace=false,  caption=Respons.]{outlook/Vinden_kalender_item_antwoord.xml}      Working in writelatex.com. vinden_kal ..., the problem is the t:ItemId tag At the + and /, the line gets broken down.               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %       This syntax file is intended for students of the        %     %       FIIW writing their master thesis.               %     %       We hope they can use it as a helping hand in writing        %     %       their thesis.                           %     %                                       %     %       Syntax originally written by Filip Van Rysselberghe     %     %       Adapted for KaHo St. Lieven by Bart Blanckaert          %     %                                       %     %       Modified by Koen Vangheluwe based on PhD stylefile of RUG   %     %                                       %     %       Adapted for FIIW by Jannes Verstichel               %     %       Last modified: 12/11/2013 v1.0                  %     %                                       %     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%           %%%%fiiw_gent     \makeatletter          \usepackage{color}     \usepackage{parallel}     \usepackage{textpos}          % \usepackage[scaled]{uarial}     \renewcommand*\familydefault{\sfdefault} %% Only if the base font of the document is to be sans serif               % fancyheadings     \usepackage{fancyhdr}     \pagestyle{fancy}     \renewcommand{\chaptermark}[1]{\markboth{\thechapter\ #1}{}}     \renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}     \fancyhf{}     \fancyhead[R]{\scriptsize\bfseries\sffamily\thepage}     \fancyhead[L]{\scriptsize\bfseries\sffamily\leftmark}     \fancypagestyle{plain}{         \fancyhf{}         \fancyfoot[C]{\scriptsize\bfseries\sffamily\thepage}         \renewcommand{\headrulewidth}{0pt}         \renewcommand{\footrulewidth}{0pt}     }          % Koen Vangheluwe 29/05/2009: toegevoegd om "\headheight is too small" warning te voorkomen     \setlength{\headheight}{14pt}          % Koen Vangheluwe 16/03/2010: toegevoegd wegens voor witte pagina's met empty style bij het gebruik van twoside en report     \def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else       \hbox{}       \thispagestyle{empty}       \newpage       \if@twocolumn\hbox{}\newpage\fi\fi\fi}               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     % We'll head off with the definitions of the new commands %     %   as promotor, copromotor, etc              %     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \def\subtitle#1{\gdef\@subtitle{#1}}     \def\promotorA[#1]#2{\gdef\@promotorAtype{#1}\gdef\@promotorAname{#2}}     \def\promotorB[#1]#2{\gdef\@promotorBtype{#1}\gdef\@promotorBname{#2}}     \def\promotorC[#1]#2{\gdef\@promotorCtype{#1}\gdef\@promotorCname{#2}}     \def\opleiding#1{\gdef\@opleiding{#1}}     \def\afdeling#1{\gdef\@afdeling{#1}}     \def\academicyear#1{\gdef\@academicyear{#1}}     \def\forename#1{\gdef\@forename{#1}}     \def\surname#1{\gdef\@surname{#1}}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %   Secondly we declare and fill in the newly created variables %     % Sometimes we use standard definitions as is the case for      %     %   the titles.                         %     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \def\@title{Titel Masterproef}     \def\@subtitle{Ondertitel (factultatief)}     \def\@forename{Voornaam}     \def\@surname{Achternaam}     \def\@opleiding{naam van de opleiding}     \def\@afdeling{afstudeerrichting}     \def\@promotorAname{}      \def\@promotorBname{}     \def\@promotorCname{}     \def\@promotorAtype{}      \def\@promotorBtype{}     \def\@promotorCtype{}     \def\@academicyear{}          % We also define some new if-structures to check whether you     % want to add a specific page in your thesis\bfseries\sffamily\rightmark     \newif\iflistoffigurespage     \newif\iflistoftablespage     \newif\iflistofsymbolspage     \newif\ifacknowledgementspage     \newif\ifabstractpage          \listoffigurespagefalse     \listoftablespagefalse          \listofsymbolspagefalse     \def\listofsymbols#1{\gdef\@listofsymbolsfile{\input{#1}}}          \acknowledgementspagefalse     \def\acknowledgements#1{\gdef\@acknowledgementsfile{\input{#1}}}          \abstractpagefalse     \def\abstracts#1{\gdef\@abstractfile{\input{#1}}}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %   This function formats the titlepage using the   %     %   variables set before.                       %     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     % Define the color of the title     \definecolor{titlegreen}{RGB}{39,142,116}     \def\titlep{%         \thispagestyle{empty}         \setlength{\unitlength}{1cm}         \begin{picture}(0,0)(0,26)         \hspace{-10em}\includegraphics[width=\paperwidth]{cover_fiiw_gent.pdf}         \end{picture}         \vskip1in         \vfill         \begingroup           \fontsize{40pt}{12pt}\selectfont             \textcolor{titlegreen}{{\textsf{\@title}}} \\\\         \endgroup         {\LARGE\textsf{\@subtitle}}         \vfill         \begin{flushright}             \textsf{\LARGE\textbf{\@forename~\MakeUppercase{\@surname}}}         \end{flushright}         \vspace{10em}         \begin{Parallel}{0.48\textwidth}{0.48\textwidth}             \ParallelLText{\noindent                 \begin{list}{label}{\setlength{\leftmargin}{10em}\setlength{\labelsep}{0.5em}\setlength{\labelwidth}{9.5em}\setlength{\itemsep}{-.5ex}}                     \ifx \@promotorAname \@empty                     \else                         \item[\@promotorAtype:\hfill] \@promotorAname                     \fi                     \ifx \@promotorBname \@empty                     \else                         \item[\@promotorBtype:\hfill] \@promotorBname                     \fi                     \ifx \@promotorCname \@empty                     \else                          \item[\@promotorCtype:\hfill] \@promotorCname                     \fi                 \end{list}             }             \ParallelRText{\noindent \vspace{1em}                 \begin{flushright}                     Masterproef ingediend tot het behalen van \\                     de graad van master in de industri\"ele \\                     wetenschappen: \@opleiding \\                     \@afdeling                 \end{flushright}             }         \end{Parallel}     %   \vspace{3em}         \setlength{\TPHorizModule}{1cm}         \setlength{\TPVertModule}{1cm}         \begin{textblock}{5}(5.5,1.5)                 Academiejaar \@academicyear         \end{textblock}         \cleardoublepage         \thispagestyle{empty}         \null         \vfill         %{\LARGE{Opgelet! Het copyright moet nog aangepast worden!}}\\\\         \copyright Copyright KU Leuven \\\\         Zonder voorafgaande schriftelijke toestemming van zowel de promotor(en) als de auteur(s) is overnemen, kopi\"eren, gebruiken of realiseren van deze uitgave of gedeelten ervan verboden. Voor aanvragen tot of informatie i.v.m.~het overnemen en/of gebruik en/of realisatie van gedeelten uit deze publicatie, wend u tot KU Leuven campus Gent, Gebroeders De Smetstraat 1, B-9000 Gent, +32-9-2658610 of via e-mail iiw.kaho.gent@kuleuven.be. \\\\         Voorafgaande schriftelijke toestemming van de promotor(en) is eveneens vereist voor het aanwenden van de in deze masterproef beschreven (originele) methoden, producten, schakelingen en programma's voor industrieel of commercieel nut en voor de inzending van deze publicatie ter deelname aan wetenschappelijke prijzen of wedstrijden.         \cleardoublepage     }          % Indentation     \setlength{\parindent}{0pt}     \setlength{\parskip}{1ex plus 0.5ex minus 0.25ex}     \setlength{\abovedisplayskip}{12pt plus 3pt}     \setlength{\belowdisplayskip}{12pt plus 3pt}     \setlength{\abovedisplayshortskip}{12pt plus 3pt}     \setlength{\belowdisplayshortskip}{12pt plus 3pt}          \parskip 1mm          %%%%%%%%%%%%%%%%%%%%%%%%&&&&&&&&&&&%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     % BeforePreface adds the titlepage and when you                  %     % turned on the acknowledgements page, it will be generated too  %     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \def\preface{         \pagenumbering{roman}         \titlep                      \ifacknowledgementspage              \chapter*{Dankwoord} \@acknowledgementsfile         \fi              \ifabstractpage              \chapter*{Abstract} \@abstractfile         \fi              \tableofcontents              \iflistoffigurespage             \listoffigures         \fi              \iflistoftablespage             \listoftables         \fi              \iflistofsymbolspage             %\chapter*{Lijst van symbolen}             \@listofsymbolsfile         \fi              \cleardoublepage         \pagenumbering{arabic}     }          % Start with pagestyle{headings} in case front matter isn't processed     \pagenumbering{arabic}     \makeatother          %%%%%%% doc itself          \documentclass[11pt,a4paper]{report}     % Indien je je thesis recto-verso wil afdrukken gebruik je onderstaande opties i.p.v. bovenstaande     %\documentclass[11pt,a4paper,twoside,openright]{report}          \usepackage[a4paper,left=3.5cm, right=2.5cm, top=3.5cm, bottom=3.5cm]{geometry}     \usepackage[dutch]{babel}     \usepackage{graphicx}     \usepackage[margins]{trackchanges}     \addeditor{Eline}     %\usepackage[latin1]{inputenc}      % om niet ascii karakters rechtstreeks te kunnen inputten     \usepackage[utf8]{inputenc}            % commentarieer deze regel uit als je utf8 encoded files gebruikt in plaats van latin1     \usepackage{listings}     \usepackage{verbatim}     \usepackage{hyperref}     \usepackage{url}                        % URL's invoegen in tekst met behulp van \url{http://}     \usepackage[small,bf,hang]{caption}     \usepackage[final]{pdfpages}     \usepackage{pslatex}     \usepackage{sectsty}     \allsectionsfont{\sffamily}     \chapterfont{\raggedleft\sffamily}          \usepackage{float}                      % De optie H voor de plaatsing van figuren op de plaats waar je ze invoegt. bvb. \begin{figure}[H]     %\usepackage{longtable}                 % tabellen die over meerdere pagina's gespreid worden     %\usepackage[times]{quotchap}           % indien je fancy hoofdstuktitels wil     %\usepackage[none]{hyphenat}     %\usepackage{latexsym}     %\usepackage{amsmath}     %\usepackage{amssymb}          \usepackage{fiiw_gent}     \usepackage{rotating}          %door onderstaande regels in commentaar te zetten, of op false, kan je pagina's weglaten     %bijvoorbeeld het weglaten van een voorwoord, lijst met symbolen, ...     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %voorwoord toevoegen?     \acknowledgementspagetrue     \acknowledgements{voorwoord}            %.tex file met daarin het voorwoord     %abstract toevoegen?     \abstractpagetrue     \abstracts{abstract}                    %.tex file met daarin het abstract     %lijst van figuren toevoegen?     \listoffigurespagetrue     %lijst van tabellen toevoegen?     %\listoftablespagetrue     %lijst van symbolen toevoegen?     %\listofsymbolspagetrue     %\listofsymbols{symbolen}               %.tex file met daarin de lijst van symbolen                    \begin{document}          \lstinputlisting[language=XML, breaklines=true, breakindent=0pt, breakautoindent=true, linewidth=\textwidth, breakatwhitespace=false,  caption=Respons van het gevonden kalender item.]{outlook/Vinden_kalender_item_antwoord.xml}          \end{document}               %%%%%%% Vinden_kalender_item_antwoord.xml     <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">        <s:Header>           <h:ServerVersionInfo MajorVersion="14" MinorVersion="2" MajorBuildNumber="387" MinorBuildNumber="0" Version="Exchange2010_SP2" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>        </s:Header>        <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">           <m:FindItemResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">              <m:ResponseMessages>                 <m:FindItemResponseMessage ResponseClass="Success">                    <m:ResponseCode>NoError</m:ResponseCode>                    <m:RootFolder TotalItemsInView="1" IncludesLastItemInRange="true">                       <t:Items>                          <t:CalendarItem>                             <t:ItemId Id="AAMkAGQ4ZWQ5ZDAyLTMzNmMtNGEwZC1iZWQ4LTEyMzVkNDhhOTgzMwBGAAAAAAClRU98ditGSbuQMxW+bNQEBwD3K7SN9dTDQr6wC4Bve/iXAAAAj+XHAAD3K7SN9dTDQr6wC4Bve/iXAAAAkoSvAAA=" ChangeKey="DwAAABYAAAD3K7SN9dTDQr6wC4Bve/iXAAAAkqS3"/>                          </t:CalendarItem>                       </t:Items>                    </m:RootFolder>                 </m:FindItemResponseMessage>              </m:ResponseMessages>           </m:FindItemResponse>        </s:Body>     </s:Envelope>


title: pgfplots: Using the fillbetween library

text: I want to use the `fillbetween` feature which is here decsribed by the pgfplots author Christian Feuersänger. In my case I have a coordinate list and want to fill the area between -10 and 10. But it doesn't work properly:               \documentclass{standalone}          \usepackage{pgfplots}     \usepgfplotslibrary{fillbetween}          \begin{document}     \begin{tikzpicture}     \begin{axis}[         width=150mm,         xmin=-100,         xmax=100,         ymin=0,         ymax=1.1,         xtick={-100,-10,0,10,100},           grid,         xlabel = xlabel,         ylabel = ylabel,         title = title,     ]     \addplot[         const plot,         name path global = myFunction,         ] coordinates {     (-71,0.001144165)     (-57,0.003432494)     (-54,0.004576659)     (-50,0.005720824)     (-46,0.006864989)     (-44,0.008009153)     (-43,0.010297483)     (-42,0.013729977)     (-40,0.014874142)     (-39,0.016018307)     (-38,0.018306636)     (-37,0.019450801)     (-34,0.02173913)     (-33,0.025171625)     (-32,0.026315789)     (-31,0.030892449)     (-30,0.035469108)     (-29,0.042334096)     (-28,0.050343249)     (-27,0.052631579)     (-26,0.057208238)     (-25,0.065217391)     (-24,0.073226545)     (-23,0.086956522)     (-22,0.09610984)     (-21,0.107551487)     (-20,0.113272311)     (-19,0.130434783)     (-18,0.143020595)     (-17,0.155606407)     (-16,0.177345538)     (-15,0.195652174)     (-14,0.207093822)     (-13,0.226544622)     (-12,0.255148741)     (-11,0.279176201)     (-10,0.302059497)     (-9,0.327231121)     (-8,0.352402746)     (-7,0.383295195)     (-6,0.424485126)     (-5,0.450800915)     (-4,0.487414188)     (-3,0.536613272)     (-2,0.586956522)     (-1,0.637299771)     (0,0.700228833)     (1,0.747139588)     (2,0.780320366)     (3,0.814645309)     (4,0.83180778)     (5,0.85583524)     (6,0.869565217)     (7,0.8798627)     (8,0.894736842)     (9,0.908466819)     (10,0.916475973)     (11,0.922196796)     (12,0.92791762)     (13,0.935926773)     (14,0.940503432)     (15,0.946224256)     (16,0.949656751)     (17,0.953089245)     (18,0.957665904)     (19,0.958810069)     (20,0.962242563)     (21,0.965675057)     (22,0.970251716)     (23,0.973684211)     (24,0.97597254)     (25,0.977116705)     (26,0.97826087)     (29,0.981693364)     (31,0.982837529)     (34,0.983981693)     (35,0.986270023)     (36,0.987414188)     (37,0.988558352)     (41,0.989702517)     (42,0.990846682)     (45,0.991990847)     (47,0.993135011)     (49,0.994279176)     (71,0.995423341)     (76,0.996567506)     (79,0.99771167)     (90,0.998855835)     (95,1)     };     \path[name path=myAxes] (axis cs:-10,0) -- (axis cs:10,0);     \addplot [             thick,             color=blue,             fill=blue,              %fill opacity=0.05,             draw=red,             line width=2pt,         ]         fill between[             of=myAxes and myFunction,             soft clip={domain=-10:10},         ];     \end{axis}     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/zgXh3.png) I added some comments to illustrate the problems: ![enter image description here](http://i.stack.imgur.com/Uxq0y.png) **Update:** And maybe someone knows how to center the `x tick labels`. The `-10` looks not centered because of the minus sign.


title: Using filecontents inside of xparse

text: I'm trying to reproduce this using `xparse`:               \begin{filecontents}{sections/autogen/somefile.tex} % Line to auto-produce         \begin{myotherenvironment}         Do lots of stuff         \end{myotherenvironment}     \end{filecontents}                                  % Line to auto-produce     \input{sections/autogen/somefile.tex}               % Line to auto-produce      The above works fine. I've tried this using both `NewDocumentCommand` and `NewDocumentEnvironment`, and using both `begin`/`end` and `csname`/`endcsname`. I'm showing attempting to include the `#2` manually, previously I was just attempting to use `NewDocumentEnvironment` with one required parameter               \NewDocumentCommand \writefile { m m } {%       \typeout{Writing file sections/autogen/#1.tex}%       \csname filecontents*\endcsname{sections/traces/autogen/#1.tex}%       %\begin{filecontents}{sections/traces/autogen/#1.tex}       #2       %\end{filecontents}}%       \csname endfilecontents*\endcsname%     }%      It seems that the file is being generated, but when using `NewDocumentEnvironment` `\end{writefile}` is being inserted into the file generated by `filecontents`. When using `NewDocumentCommand` there seem to be a multitude of problems. An example output file would contain this:                 \captionsetup[table]{name=Listing}       \table[H] \footnotesize         \setlength{\tabcolsep}{2pt}         \tabu to \textwidth {|r@{ }l|l|X|} %{|@{ }r@{:}l|l|X[l]|}         \rowfont{\bfseries} & LPS & MTH & SC \\         \lcell 12 & \lpscell #3 & \mthcell #4 & \sccell {\lstinline[style=jt]{foo}}         \lcell 12 & \lpscell #3 & \mthcell #4 & \sccell {\lstinline[style=jt]{foo}}         \lcell 12 & \lpscell #3 & \mthcell #4 & \sccell {\lstinline[style=jt]{foo}}         \endtabu       \endtable       \captionsetup[table]{name=Table}


title: Import 3D object in LaTeX

text: Is there any way to import a 3D file of an object (.stl for example) to draw a 2D projection of it into a TeX document ? I have been surprised to don't find any subject about that, I was thinking a conversion with TikZ or Asymptote would be possible. Any clue ?


title: modify plain.bst file

text: I would like to modify the file plain.bst in order to customize my bibliography. I want several things :   1. **names in bold** followed by date (month year)   2. skip a line between name of authors and title of the article or book, name of the article. ![enter image description here](http://i.stack.imgur.com/TsXRl.png) Finally I would like that in the main text (where I use \cite{}) the reference appears as follow: [name-year] where name is the name of the first author. For this I don't know at all what to use! The example I gave is obtained using biber and I would like to use bibtex with a bst file.


title: Undefined control sequence \bbl@nonfrenchlistspacing

text: I am trying to run the sample file `hsp-monograph.ltx` that comes with `ouvrage-hermes` downloaded from http://www.iste.co.uk/               \documentclass[english,allpages]{ouvrage-hermes}[2005/11/14]          % Preamble: Package loading (optional)     % \usepackage[fleqn]{amsmath}          % Preamble: User commands and environments (optional)     % \newcommand{\diff}[1]{\ensuremath{\mathrm{d}#1}}          % Preamble: Title, author, and date (mandatory)     \title[%     Short Title]{%     Complete Title}          \author{%     John \Name{Smith}\\ Paul \Name{Jones}}          \date{%     \today{}}          % Preamble: Regenerate the index (mandatory)     \makeindex          % Document body: Beginning (mandatory)     \begin{document}          % Document body: Front matter (mandatory)     \frontmatter          % Front matter: Title page (mandatory)     \maketitle          % Front matter: Table of contents (mandatory)     \tableofcontents          % Front matter: Foreword (optional)     % \include{foreword}     % Here is the typical contents of this included file:     %%%% \chapter{Foreword}     %%%%     %%%% [text]     %%%%     %%%% \vspace{11pt}     %%%%     %%%% \begin{flushright}     %%%%  John \Name{Smith}\\     %%%%  Paul \Name{Jones}     %%%% \end{flushright}          % Front matter: Introduction (optional)     % \include{introduction}     % Here is the typical contents of this included file:     %%%% \chapter{Introduction}     %%%%     %%%% [text]          % Document body: Main matter (mandatory)     \mainmatter          % Main matter: First regular chapter (mandatory)     \include{chapter_1}     % Here is the typical contents of this included file:     %%%% \chapter[%     %%%% Short Title]{%     %%%% Complete Title}     %%%%     %%%% [text]          % Main matter: First appendix (optional)     % \include{appendix_1}     % Here is the typical contents of this included file:     %%%% \cleardoublepage     %%%% \appendix     %%%% \chapter[%     %%%% Short Title]{%     %%%% Complete Title}     %%%%     %%%% [text]          % Document body: Back matter (mandatory)     \backmatter          % Back matter: Bibliography chapter (mandatory)     \bibliography{database}          % Back matter: Index chapter (mandatory)     \printindex          % Document body: End (mandatory)     \end{document}      But I am getting the following error               ! Undefined control sequence.     \@mkhermes ->\bbl@nonfrenchlistspacing                                             \gdef \itemize {\hermesitemize }\gdef...     l.24 \begin{document}      Can anyone help me sort this issue? Thanks


title: how to use converted tex from mathtype equation in texmaker? Als

text: I have got the following TeX equation:                \[r(t)=\frac{l}{1+e\cos \theta (t)}\]      Now I could not use this in Texmaker. To show the same equation Texmaker wants               $ r(t )= \dfrac{l}{ 1+e cos \theta (t)} $\\      So what should I do?


title: Can a \hbox be made to attain all of its surrounding space?

text: If I have two boxes like so:               \hbox to 2cm{\vrule\hfil\hbox{\vrule keke\vrule}\hfil\vrule}     \bye      , then is it possible somehow for the inner `\hbox` to take all of that 2cm? (the `\hfil`s and `\vrule`s are there only to illustrate the sizes)


title: Endnotes two equal notes in same chapter?

text: I need to cite as an endnote (with the endnotes package) twice in the same chapter of a document. How do I do it without introducing twice the reference? That is, how do I refer to the same endnote in different parts of the chapter? Thanks


title: How to solve the issue between side-by-side floats (tables) and floatrow package?

text: I came from here where this issue was raised but could not find a straightforward solution. I have now side-by-side tables and I want to avoid the errors thrown once `floatrow` package is added to the preamble. Is there any solution to this issue or, in case not, any alternative to do side-by-side tables without sacrificing the `floatrow` package? **MWE code:**               \documentclass{scrartcl}     %\usepackage{floatrow} % commented out otherwise throws errors (see below)     \usepackage{booktabs}     \begin{document}     \begin{table}     \centering     \makebox[0pt][c]{\parbox{1\textwidth}{%         \begin{minipage}[b]{0.5\hsize}\centering             \begin{tabular}{r|rrrr}             \toprule               & \multicolumn{4}{c}{\textbf{Reference}} \\             \midrule             \textbf{Predicted}  & H & P & R & Q \\              \midrule             H &   3 &   0 &   0 &   0 \\              P &   0 &   5 &   0 &   0 \\              R &   0 &   0 &  19 &   1 \\              Q &   0 &   0 &   0 &  25 \\              \bottomrule              \end{tabular}             \caption{SVMr confusion matrix.}             \label{tab:cmsvm}             \vskip 1cm             \begin{tabular}{r|rrrr}             \toprule               & \multicolumn{4}{c}{\textbf{Reference}} \\             \midrule             \textbf{Predicted}  & H & P & R & Q \\              \midrule             H &   2 &   0 &   0 &   0 \\              P &   0 &   5 &   0 &   0 \\              R &   1 &   0 &  19 &   0 \\              Q &   0 &   0 &   0 &  26 \\              \bottomrule              \end{tabular}             \caption{RDA confusion matrix.}             \label{tab:cmrda}             \vskip 1cm             \begin{tabular}{r|rrrr}             \toprule               & \multicolumn{4}{c}{\textbf{Reference}} \\             \midrule             \textbf{Predicted}  & H & P & R & Q \\              \midrule             H &   3 &   0 &   0 &   0 \\              P &   0 &   4 &   0 &   0 \\              R &   0 &   0 &  19 &   0 \\              Q &   0 &   1 &   0 &  26 \\              \bottomrule              \end{tabular}             \caption{PAM confusion matrix.}             \label{tab:cmpam}         \end{minipage}         \hfil         \begin{minipage}[b]{0.5\hsize}\centering             \begin{tabular}{r|rrrr}             \toprule               & \multicolumn{4}{c}{\textbf{Reference}} \\             \midrule             \textbf{Predicted}  & H & P & R & Q \\              \midrule             H &   2 &   0 &   0 &   0 \\              P &   0 &   4 &   0 &   0 \\              R &   1 &   0 &  19 &   0 \\              Q &   0 &   1 &   0 &  26 \\             \bottomrule              \end{tabular}             \caption{PLS-LDA confusion matrix.}             \label{tab:cmplslda}             \vskip 1cm             \begin{tabular}{r|rrrr}             \toprule               & \multicolumn{4}{c}{\textbf{Reference}} \\             \midrule             \textbf{Predicted}  & H & P & R & Q \\              \midrule             H &   2 &   0 &   0 &   0 \\              P &   0 &   4 &   0 &   0 \\              R &   1 &   0 &  18 &   1 \\              Q &   0 &   1 &   1 &  25 \\             \bottomrule              \end{tabular}             \caption{LDA confusion matrix.}             \label{tab:cmlda}             \vskip 1cm              \begin{tabular}{r|rrrr}             \toprule               & \multicolumn{4}{c}{\textbf{Reference}} \\             \midrule             \textbf{Predicted}  & H & P & R & Q \\              \midrule             H &   2 &   0 &   0 &   0 \\              P &   0 &   3 &   0 &   0 \\              R &   1 &   0 &  12 &   3 \\              Q &   0 &   2 &   7 &  23 \\              \bottomrule              \end{tabular}             \caption{PLS confusion matrix.}             \label{tab:cmpls}         \end{minipage}         \hfil     }}     \end{table}     \end{document}        **Output:**   ![enter image description here](http://i.stack.imgur.com/xCsia.png) Error:               Package floatrow Error: Caption(s) lost


title: How to use \ref command in the test block of \ifnum?

text: Is there a way to use `\ref{}` inside the test part of `\ifnum`. The following example runs into an error.               \documentclass{article}          \begin{document}          \begin{table}         \caption{ex}         \label{tab:ex}     \end{table}          \def\a{\ref{tab:ex}}     \ifnum\a>0 y\else n\fi          \end{document}


title: aboveglftskip in expex linguistic glosses

text: First of all I am not an expert in using LaTeX, I just started a few months back. I am using MiKTeX with the `expex` package for glossed linguistic examples. If we take a look at a glossed example, we see a space above the fourth line which is the free translation (`\glft`): ![enter image description here](http://i.stack.imgur.com/A1lfQ.jpg) To get rid of the vertical spacing above the glft-line, the expex documentation advisies you to use the command "`aboveglftskip=0pt`" in the `\begingl` column. I used this command in my document, but it still gives me a gloss with spacing before `\glft`. I am using a weird template with a bunch of stuff in it, but it's likely to the beamer class. But even if I strip my document of everything, and do a normal beamer or article class, it doesn't work:               \documentclass{article}     \usepackage{expex}          \begin{document}          \ex     \begingl[everyglpreamble=\it, belowglpreambleskip=0pt, aboveglftskip=0pt]     \gla batis-ne //     \glb feet-\sc{3.sg.poss}//     \glft`his/her feet'//     \endgl     \xe          \clearpage          \end{document}      According to the documentation, one can also use the command in the `\glft` line which I tried. It didn't work as well... Am I doing something wrong? I want to get rid of the vertical spacing above the glft line! I am also using the `expex` package in a paper I am writing and it's working fine there.


title: Using \MakeUppercase in \@startsection

text: I was toying a bit with the `\@startsection` command to change the layout of chapter / section headings. More specifically, I wanted my headers to be converted to uppercase. I was following an example from the LaTeX compendium:               \documentclass{scrbook}     \makeatletter     \renewcommand\chapter{\@startsection     {chapter}{0}{0mm}     {-\baselineskip}     {0.5\baselineskip}     {\MakeUppercase}}     \makeatother     \usepackage{lipsum}     \begin{document}     \chapter{SomeChapter}     \lipsum[1]     \end{document}      This tossed an error message at me from the line `\chapter{SomeChapter}`:               Argument of \@gobble has an extra }.      After quite some trial & error, I found that using `\uppercase` instead of `\MakeUppercase` worked fine - but not for Umlauts. What did I do wrong? Shouldn't `\MakeUppercase` work as well (and handle Umlauts correctly)?


title: Generating dummy text programatically using TeX/LaTeX

text: As part of an attempt to debug another problem, I have a need for a TeX/LaTeX command that generates some dummy text in place. I know of lipsum and blindtext, but they are not what they want. What I have in mind is a command that takes the following arguments: a string (`s`) and integers (`k` and `n`), and produces `k` occurrences of `s` per line (no spaces) for `n` lines. I think this should be possible, even if one has to drop down to TeX to do it. After all, TeX is a text processing Turing complete programming language. Unfortunately, my knowledge of TeX could fit on a postage stamp with space left over, so I'm asking on this forum.


title: Formatting lengths of inner list environment are added to outer list environment

text: The code               \documentclass{article}     \usepackage[body={20em,100ex}]{geometry}     \newcommand{\abc}{\rule{0.95em}{1ex}\kern.05em\allowbreak}     \newcommand{\abcd}{\abc\abc\abc\abc\abc}     \newcommand{\abcde}{\abcd\abcd\abcd\abcd\abcd}     \begin{document}     \noindent\abcde     \begin{list}{$\bullet$}{%     \setlength{\labelwidth}{1em}%     \setlength{\labelsep}{1em}%     \setlength{\leftmargin}{2em}%     \setlength{\itemindent}{2em}}     \item\abcde     \item     \begin{list}{\ddag}{%     \setlength{\labelsep}{1em}%     \setlength{\labelwidth}{1em}%     \setlength{\leftmargin}{1em}%     \setlength{\itemindent}{1em}}     \item\abcde     \item\abcde     \end{list}     \end{list}     \end{document}      get the left side: ![](http://i.stack.imgur.com/dQmmc.png) How could I get the right side?


title: How can I compile a tex with Helvetica under Linux?

text: I'm trying compiling this latex template example (CHI Extended Abstracts template) under linux (XeTeX, Version 3.1415926-2.2-0.9997.4 (TeX Live 2010/Arch Linux) using xelatex. This is the output I'm getting: http://sprunge.us/YaXi It seems that it's having troubles finding Helvetica, but helvetica is installed: fc-list http://sprunge.us/GChE Can you guys help? **UPDATE:** Trying to simplify the issue, I've been suggested on #latex to try with a simpler example:               \documentclass{scrbook}     \usepackage[english]{babel}     \usepackage{blindtext}     \usepackage{fontspec}     \usepackage{xunicode}     \defaultfontfeatures{Mapping=tex-text}     \setmainfont{Helvetica}               \begin{document}          \Blinddocument          \end{document}      Which fails just as the template above. See http://sprunge.us/GJdG


title: \sum, \prod, etc. in mathptmx via DVI

text: I find that when I use mathptmx, some math symbols, including the summation and product symbols, are rendered differently depending on whether I use pdfTeX or I work via DVI. Here is sample code:               \documentclass[12pt]{article}     \usepackage{mathptmx}      \begin{document}     \[         \sum_{n = 1}^{\infty} A_n = \prod_{n = 1}^{\infty} B_n     \]     \end{document}      When I use pdfTeX, I get what I assume to be what is expected, but when I create a PDF via a DVI file, I still get the summation and product symbols, but they clearly belong to a different font (thin and elongated). The infinity symbol also changes. (It gets rounder via DVI). A_n and B_n do not change. This is what I get when I use pdfTeX: ![enter image description here](http://i.stack.imgur.com/INUXs.png) And this is what I get via DVI: ![enter image description here](http://i.stack.imgur.com/jZyFH.png) I want to use mathptmx, but at the same time, I need to work via DVI because of another package that requires it (tree-dvips). Could somebody please help me out with getting the normal symbols even via DVI? I use Mac OS X Mountain Lion and TeXShop. Below is the console message that I get when I typeset with pdfTeX: ![enter image description here](http://i.stack.imgur.com/6NSpD.png) Below is the console message that I get when I typeset via DVI: ![enter image description here](http://i.stack.imgur.com/kmqds.png) [Update] I updated my LaTeX to version 3.1415926-2.5-1.40.14 (TeX Live 2013). The problem then disappeared! mafp, karlkoeller, thanks a ton for helping me with solving the problem. I still wonder, though, what that strange font was, and why this happened...


title: biblatex-chicago authordate fullcite problem

text: The following might be a bug, but I'm wondering if anyone knows of a workaround. I have two bibliography entries with `crossref`, which I need to print using `fullcite` in my document. I do not want to print the main bibliographic entry. I am able to do it without a problem in `biblatex-chicago`. But as soon as I specify `authordate` I get an error. The error only prints in my log when I have the `hyperef` package loaded, but regardless there is an error. The error reads `pdfTeX warning (dest): name{cite.0@Editorzzz:2002} has been referenced but does not exist, replaced by a fixed one` this is mybib.bib               @incollection{Lxxx:2002,         Author = {Nxxx Lxxx},         Crossref = {Editorzzz:2002},         Title = {This is a story}}          @incollection{Lyyy:2002,         Author = {Nyyy Lyyy},         Crossref = {Editorzzz:2002},         Title = {This is another story}}          @book{Editorzzz:2002,         Address = {Durham},         Booktitle = {A Reader of Something},         Editor = {Nzzz Editorzzz},         Publisher = {Duke University Press},         Title = {A Reader of Something},         Year = {2002}}      This is my preamble tmp.tex               \documentclass[]{article}     \usepackage[authordate,backend=biber]{biblatex-chicago}     \usepackage[]{hyperref}          \bibliography{mybib}          \begin{document}               \fullcite{Lxxx:2002}          \fullcite{Lyyy:2002}          \end{document}      When I do not specify `authordate` I get this: > Nxxx Lxxx, “This is a story,” in A Reader of Something, ed. Nzzz Editorzzz > (Durham: Duke University Press, 2002) > > Nyyy Lyyy, “This is another story,” in Editorzzz, A Reader of Something Which is fine. But when I specify `authordate` then I get this: > Nxxx Lxxx. 2002. “This is a story”in Editorzzz 2002 > > Nyyy Lyyy. 2002. “This is another story”in Editorzzz 2002 A full citation is missing for at least one of them. Is there a workaround? I'm working on a syllabus and I have a lot of cross referenced entries but do not want to print the the reader, or main collection since I'm only including the full citation some entries in the collection. Any ideas?


title: using LYX to write journal with given formatting

text: In a way I am newbie to Lyx. I am using Ubuntu 11.10 and installed full version of texlive 2012. I am trying to work out to generate layout file for a journal (Royal Society of Chemistry, RSC) according the format (http://www.rsc.org/Publishing/Journals/guidelines/AuthorGuidelines/AuthoringTools/Templates/tex.asp). This, RSC journal provide .tex, .bib, .bst, and .sty files. I am confused where to place the .sty files and how to use the given .tex with LYX . I tried to place all the given files (.tex, .bst, .bib, .sty) in a folder in home directory and import the .tex file into LYX. I get error message when compile it with LYX. Do I need to do any setting? Many thanks in advance.


title: Exact paragraph style to set in LaTeX?

text:
How can I set a different padding value for each side? I want a result that corresponds with this HTML/CSS configuration:
         Padded
         Top: 10px; bottom: 0px
         Left: 5em; right: 0px
                What is the exact paragraph style to set in LaTeX?               \documentclass{article}      \usepackage{fontspec}     \usepackage{fancyhdr}     \usepackage{multicol}     \pagestyle{plain}\pagestyle{fancy}     \renewcommand{\headrulewidth}{0.4pt} \renewcommand{\footrulewidth}{0.4pt}          \begin{document}      \thispagestyle{empty}      \font\brbrdivpadded="Times New Roman":color=ffffff at 12pt     \font\brdivpadded="Times New Roman":color=ffffff at 12pt     \font\divpadded="Times New Roman":color=ffffff at 12pt          \divpadded{Padded }\divpadded{Top: 10px; bottom: 0px }\divpadded{Left: 5em; right: 0px }     \end{document}


title: adding two stamps/watermarks to document

text: I would like to add to stamps to my document; one only on the first page, the other on all pages. I would also like to have it all specified in the header of the document. I started out with the               \documentclass{article}          \usepackage{background}     \backgroundsetup{%       pages=all,       scale=1,       opacity=1.0,       color =black,       contents={my content}     }          \begin{document}     abc\newpage     def     \end{document}      which works alright for one stamp. I can't seem to find a way to add a second stamp though. Any suggestions?


title: Links do not lead to right pages

text: The problem is that the links (as well as the PDF bookmarks) of abstract, explanation, CV and appendix do not lead to the right pages. abstract leads to the `titlepage` and appendix to introduction etc. Also the sections belong to the introduction in the bookmarks :( Maybe it is due to the page numbering I did (and I need). I've tried so many things, I'm about to leave it like that :( Please correct my codes if you find the mistake. I'm a beginner and have a lot of difficulties to adjust the options, packages etc...               \makeatletter     \renewcommand*{\@pnumwidth}{3em}       \makeatother           \documentclass[a4paper,12pt,ngerman]{article}     \usepackage[     colorlinks,      linkcolor=black,     filecolor=black,     citecolor=black     ]{hyperref}     \usepackage{amssymb}     \usepackage{amsmath}     \usepackage{eurosym}     \usepackage{latexsym}     \usepackage{graphicx}     \usepackage[abbr,agsmcite,agsm,round]{harvard}     \usepackage{longtable}     \usepackage{portland}     \usepackage{lscape}     \usepackage[onehalfspacing]{setspace}     \usepackage{footmisc}     \usepackage{hyphenat}     \usepackage{rotating}     \usepackage[USenglish]{babel}     \usepackage{array}     \usepackage{tabularx}     \usepackage[latin1]{inputenc}     \usepackage[para]{threeparttable}     \usepackage{caption}     \usepackage[capposition=top]{floatrow}     %\usepackage[subfigure]     \usepackage{currvita}     \usepackage{enumitem}          %\usepackage[latin9]{inputenc}     %\usepackage[T1]{fontenc}          \setcounter{MaxMatrixCols}{12}          \setlength{\skip\footins}{10mm}     \setlength{\evensidemargin}{0cm}     \setlength{\textwidth}{15cm}     \setlength{\textheight}{23cm}     \setlength{\topmargin}{-1cm}     \pagenumbering{arabic}     \renewcommand\harvardand{and}     \renewcommand{\labelenumi}{\Alph{enumi})}     \renewcommand{\labelenumii}{\arabic{enumii}.}     \renewcommand{\cite}{\citeasnoun}      \renewcommand{\harvardand}{and}           \begin{document}          \begin{titlepage}     \begin{center}     Title     \end{center}     \end{titlepage}          \newpage     \pagenumbering{Roman}%     \renewcommand{\abstractname}{Acknowledgements}     \begin{abstract}     \noindent     bla bla     \end{abstract}     \newpage          \phantom{T}\vspace{5,3cm}     \renewcommand{\abstractname}{Abstract}     \begin{abstract}     TEXT     \end{abstract}     \addcontentsline{toc}{section}{Abstract}     \newpage          \tableofcontents     \newpage          \listoffigures     \addcontentsline{toc}{section}{List of Figures}     \newpage          \listoftables     \addcontentsline{toc}{section}{List of Tables}     \newpage          \section*{Symbols}          \addcontentsline{toc}{section}{Symbols}%     \newpage          \section*{List of abbreviations}     \begin{tabular}{L{5.5cm} L{9cm}}     \end{tabular}%          \addcontentsline{toc}{section}{List of abbreviations}%     \newpage          \pagenumbering{arabic}     \setcounter{page}{1}%          \section{Introduction}     text text text     \newpage          \section{System and whatever}     \subsection{System}          \setcounter{table}{0}     \setcounter{figure}{0}       \setcounter{section}{0}           \newcommand{\initAnhang}{         \renewcommand{\thepage}{\Alph{section}\ \arabic{page}}         \newpage     }     \renewcommand\appendix{\par             \renewcommand\thesection{\Alph{section}}             \renewcommand\thesubsection{\Alph{section}\arabic{subsection}}         \renewcommand\thefigure{\Alph{section}\arabic{figure}}             \renewcommand\thetable{\Alph{section}\arabic{table}}}          \newcommand{\anhang}[1]{         \setcounter{page}{1}         \input{#1}         \newpage     }                 \appendix\initAnhang     \section{Appendix}     %\addcontentsline{toc}{section}{Appendix}%     \subsection{Descriptive Statistics}          \newpage          \nocite{*}     \bibliographystyle{dcu}     \bibliography{bib}     \addcontentsline{toc}{section}{References}     \newpage          \section*{Explanation}     \addcontentsline{toc}{section}{Explanation}     \newpage          \begin{cv}{CV}     \addcontentsline{toc}{section}{CV}%     \end{cv}          \end{document}


title: TexWorks Green Arrow does Nothing

text: I really don't understand this at all....I have a latex document that was given by my professor. I try to hit the green arrow to get a PDF (which from what I can tell online is what I'm supposed to do.) Next, I'm apparently supposed to get a dropdown but I don't. Nothing happens The console gets this message               This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013)     restricted \write18 enabled.     entering extended mode     (./homework01.tex"      I have no clue if that's supposed to be an error message but it doesn't seem to list any error! I'm on OSX Mavericks if it matters. Edit: I've managed to realize I needed a couple things. I updated packages, and I followed instructions to use pdflatex homework01 to create the homework01.pdf file. Now when I load into TexWorks I DO see the PDF on the right, however now I don't know how to update it to reflect the latex. Do I have to do pdflatex every time? There's no way to have the latex on the left match the PDF on the right? Google search doesn't seem to be helping me at all I can't find anybody else asking this question unless I'm searching with the wrong terms. Edit2: As requested, my file system. The pdf file was created in terminal with pdflatex README homework pdf tex               ./homework:     homework01.aux     homework01.log     homework01.pdf     homework01.tex     missfont.log          ./pdf:     (myschool)-logo.pdf     (myschoolAbbr)-logo.pdf          ./tex:     angle.sty     bcprules.sty     code.sty     jnf.sty     local.sty     mathpartir.sty     src2tex.sty     ttquot.sty


title: \includestandalone does not create a pdf

text: Somehow `\includestandalone` from the `standalone` package does not create a pdf with this main file:               \documentclass{article}     \usepackage{standalone}     \usepackage{tikz}     \begin{document}       \begin{figure}[h]     \includestandalone[mode=buildnew]{test2}     \includestandalone[mode=image]{test2}     \end{figure}     \end{document}      This is a code of the standalone file:               \documentclass[tikz]{standalone}     \begin{document}     \begin{tikzpicture}      \draw[->] (0,1cm)--++(14,-5);     \end{tikzpicture}     \end{document}      I thought from reading the manual of the standalone package usage of (with pdflatex):               \includestandalone[mode=buildnew]{test2}      will give me in my folder a pdf file `test2.pdf` after compilation, but I do not have it, that is why the second line of my code:               \includestandalone[mode=image]{test2}      does not work, no pdf - no compilation it says:) Please explain why it could be so that I do not get pdf after compilation.


title: LyX linguistics module - table within example

text: Using LyX with the linguistics module. I want to have a table as a Numbered Example. When I insert a table float after the example, the number appears _after_ the table on the PDF, rather than before it. Edit: Floats are set to appear "here definitely", but the problem persists. The .lyx file relevant section:               \begin_body          \begin_layout Numbered Example (multiline)     \begin_inset Float table     wide false     sideways false     status open     \begin_layout Plain Layout     \begin_inset Tabular     <lyxtabular version="3" rows="1" columns="1">     <features tabularvalignment="middle">     <column alignment="center" valignment="top" width="0">     <row>     <cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">     \begin_inset Text          \begin_layout Plain Layout     a     \end_layout          \end_inset     </cell>     </row>     </lyxtabular>          \end_inset               \end_layout          \end_inset               \end_layout          \end_body     \end_document


title: TikZ: Precisely controlling arrow tip position

text: Usually, when drawing a path with an arrow tip in TikZ, we want the tip to end precisely at the last point of the path, and this is what TikZ does by default. However, with some specific arrow tips, one may wish to control a little more precisely the position of the arrow tip: for instance you may want the base of the arrow to be positioned at the last point of the past instead of the tip. Here is an example drawing an interval on the real line:               \documentclass{article}     \usepackage{tikz,amssymb}     \usetikzlibrary{arrows}          \begin{document}     \begin{tikzpicture}     \draw (-3,0) -- (3,0) node[anchor=south] {$\mathbb{R}$};     \foreach \x in {-1,0,1} \draw (\x,2pt) -- (\x, -2pt) node[anchor=north] {$\x$};     \draw[thick,blue,[-[] (-1,0) -- (1,0);     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/sQBc8.png) Is it possible to make sure that the closing square bracket `[` is positioned on the tick corresponding to `x=1`? Of course, it is possible to adjust it manually but this does not seem to be a satisfactory solution.


title: Split a \bmatrix in two line

text: ### Code               \documentclass[a4paper,twoside,12pt]{book}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}          $\bm{\mu^*}$ =      \begin{bmatrix}     \begin{split}     17.0716 & 21.3746 & 31.2462 & 34.2847 & 37.0049 & 43.2856 & 50.8193 & 59.7093\\[0.3em]     \end{split}     \end{bmatrix}      ### Output ![Output](http://i.stack.imgur.com/kIKwZ.png) ### Question How can i split the orizontal vector in two lines?


title: Equation with sectioning numbering problem

text: I need special numbering for equations in my work, so I made it similar to figures numbering which egreg wrote here This is my MWE:               \documentclass[12pt, a4paper, oneside, onecolumn]{article}     \usepackage{mathtools}     %numeriranje jednadžbe     \renewcommand{\theequation}{%       \ifnum\value{subsection}=0         \thesection.\arabic{figure}%       \else         \ifnum\value{subsubsection}=0           \thesubsection.\arabic{figure}%         \else           \thesubsubsection.\arabic{figure}%         \fi       \fi     }     \begin{document}     \section{Section}     \begin{equation}     \begin{split}       R' &= R/255 \\       G' &= G/255 \\       B' &= B/255     \end{split}     \end{equation}          \subsection{Subsection}     \begin{equation}     \begin{split}       C_{max} &= max(R', G', B') \\       C_{min} &= min(R', G', B') \\       \Delta &= C_{max} - C_{min}     \end{split}     \end{equation}          \end{document}        It gives me this type of numbering, which is good, but the number of equation is wrong: ![wrong numbering on my MWE](http://i.stack.imgur.com/QR3wN.png) If I use it in my document it looks like this: ![wrong numbering in document](http://i.stack.imgur.com/VAQtE.png) The `2.1.2.` part is fine, that's the number of my subsubsection, but the rest is wrong. It should be `2.1.2.1` and `2.1.2.2` Could you tell me what have I done wrong here?


title: Is it possible to extrapolate data for a 3d-plot in pgfplots?

text: I am having several measurements to plot and would like to use something like a 3d surface from `pgfplots`. I am having a frame as outer border and a grid as measurement raster. The measured values are taken in the middle of each grid cell. When plotting the whole surface, I would like to extrapolate the data until the frames outer borders in order to fill the whole thing with the surface. Here is what I have for so far:               \documentclass{standalone}     \usepackage[locale = DE]{siunitx}     \usepackage{pgfplots}     \pgfplotsset{compat=1.10}     \SendSettingsToPgf     \pgfplotsset{%         ,grid style={black, thin}         ,y label style={rotate=-90}     }          \begin{document}     \begin{tikzpicture}         \begin{axis}[%                 ,colorbar                 ,view={0}{90}                 ,xmin=0                 ,xmax=3910                 ,ymin=0                 ,ymax=2040                 ,width=391pt                 ,height=204pt                 ,grid=major                 ,xlabel=Width $b_\mathrm{frame}$ in \si{\milli\metre}                 ,ylabel=Height $h_\mathrm{frame}$ in \si{\milli\metre}             ]             \addplot3[%                 ,surf                 ,shader=interp             ] file {data.dat};         \end{axis}     \end{tikzpicture}     \end{document}      and `data.dat` looks like:               85  1955    0.97     255 1955    1.86     425 1955    2.44     595 1955    2.23     765 1955    2.17     935 1955    2.35     1105    1955    2.21     1275    1955    2.53     1445    1955    2.58     1615    1955    2.64     1785    1955    2.6     1955    1955    2.03     2125    1955    2.5     2295    1955    2.32     2465    1955    2.22     2635    1955    2     2805    1955    1.59     2975    1955    2.23     3145    1955    2.18     3315    1955    2.07     3485    1955    2.38     3655    1955    2.48     3825    1955    1.42          85  1785    1.3     255 1785    1.41     ...      So I need to get values for all `x = 0` and `y = 0` points. As `pgfplots` is able to interpolate, maybe, it is able to extrapolate as well. That's what it looks like: ![enter image description here](http://i.stack.imgur.com/4Uvwj.png) Two extra points:   * I would like to get the grid (not the ticks) onto the measurement raster, say, each 170 mm   * I would like to get the colormap labeled with `speed $v$ in \si{\metre\per\second}`


title: Text too close to cell border when having a nested tabu and \vspace in a cell

text: I have a nested tabu table and am using \vspace to simulate an empty line in the same cell. At the end of the cell is text which spans two rows. (If either of these three conditions is not met the issue does not appear or is not as bad.) The result is that the last line of text is very very close to the border of the table. This looks awkward. But I could not find any way to have more space there while all the three preconditions from above are met. This is the minimal example code:               \documentclass[10pt,a4paper]{article}     \usepackage{tabu}          \begin{document}          \tabulinesep=3pt     \begin{tabu}{lp{5cm}}     a & a \\ \hline     b &  inner table: \newline         \begin{tabu}{lX}        0: & descriptive text \\        1: & descriptive text \\        \end{tabu}        \vspace{8pt} \newline        Some longer text which will break into the next line.  \\ \hline     c & c     \end{tabu}          \end{document}      And this is how it looks: ![Screenshot of result](http://i.stack.imgur.com/kaQpr.png)


title: Referencing within an align environment

text: The following LaTeX document:               \documentclass{article}          \usepackage{amsmath}     \begin{document}     \begin{align}       E=mc^2 \\ \nonumber       E=mc^2 \label{eq1}     \end{align}          ref \ref{eq1}     \end{document}      Does not display the reference `\ref{eq1}`. Why?


title: Chemical equation in the website header?

text: How was the chemical equation created that can be seen in the website header (picture) next to the big {TeX}-sign (left) and below the sindarin(?) part? I assume this was done using TeX somehow (wild guess :D), but I would really like to know whether it was done manually (if this is even possible) or which macro package was used, as it looks really neat.


title: \let and sneaky redefinitions that are wrappers for the original macro: is there a similar thing for environments?

text: Let's say I am using some macro `\foo` that almost does what I want, but I actually want to add space either side of the output of `\foo`. I can do the following:               \let\tempfoo\foo     \renewcommand\foo{\hspace{1em}\tempfoo\hspace{1em}}      This redefines `\foo` to do what it did before, plus some extra space either side. Is there a way to "patch" environments in the same way? I guess the question is really how do I `\let` with environments?


title: How to remove the word "msc" from the message sequence chart using msc package?

text: I am using the `msc` package for creating/drawing message sequence chart. Is there any way to remove the word "msc" from the message sequence chart which appears by default along with the title of the chart? Please help.


title: MikTeX 2.9 can not find font yrcmex10 of yhmath package

text: _This is a follow-up toInstalling fonts for yhmath on MiKTeX 2.9 ._ Compiling a document, TeXnicCenter with MiKTeX could not make use of the `yrcmex10` font in the `yhmath` package. I downloaded `yhmath`, ran `latex yhmath.ins`, and created `yhmath.map` by copying another `map` file; then I put my files on a root `C:\localtexmf`, added the root to MiKTeX, edited `updmap.cfg`, updated maps, refreshed Database; but the tests keep failing. My root is structured as follows: `\localtexmf\tex\latex\yhmath` has `yhmath.sty` and `OMXyhex.fd`   `\localtexmf\fonts` has five subdirectories:   * `\map\dvips\yhmath` with `yhmath.map`   * `\source\public\yhmath` with `.mf` files   * `\tfm\public\yhmath` with `yhcmex10.tfm` and `yrcmex10.tfm`   * `\type1\public\yhmath` with `yhcmex.pfa` (its name is NOT `yhcmex10.pfa`)   * `\vf\public\yhmath` with `yhcmex10.vf` `yhmath.map` has the only line `yrcmex10 Yhcmex <yhcmex.pfa` Am I wrong somewhere?


title: A perpendicular line to a plane in 3D

text: I have two line segments identified by two end points each. Two line segments are in the same plane and intersecting at a point. I would like to draw a line (normal of the plane) passing through the intersection point. I use `TikZ`, `calc`, and `3d` libraries. But I couldn't figure out a straightforward way to do that. I can calculate the line (normal) end point using Matlab software. But I prefer `TikZ` solution, if it is possible. Edit 1: Minimum Working Example               \documentclass[border=2pt]{standalone}     \usepackage[utf8]{inputenc}      \usepackage{tikz}     \usetikzlibrary{calc,3d}          \begin{document}     \begin{tikzpicture}[x  = {(-0.5cm,-0.5cm)},                         y  = {(0.9659cm,-0.25882cm)},                         z  = {(0cm,1cm)},                         scale = 0.8,                         color = {lightgray}]          % the data input is created for minimal working example     \coordinate (A) at (1,1,4);     \coordinate (B) at (7,5,4);     \coordinate (SS) at (5,11/3,4);     \coordinate (C) at (7,1,7);     \coordinate (D) at ($(C)!7cm!(SS)$);          % two line segments     \draw[black] (A) -- (B);     \draw[black] (C) -- (D);          % intersection point (SS = S)     \coordinate (S) at (intersection of A--B and C--D);     \filldraw[green] (S) circle(2pt);          %% the plane     \draw[dashed,black,fill=red!30, opacity=0.5] (A) -- (C) -- (B) -- (D) -- cycle;          % labels     \node[above] at (A) {$A$};     \node[below] at (B) {$B$};     \node[left] at (C) {$C$};     \node[right] at (D) {$D$};     \node[right] at (S) {$S$};          % how to draw a line segment starting at (S) pointing outward     % and being perpendicular to the plane (A,B,C,D) ?          \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/SFcXX.png)


title: How to avoid long space when cross-reference name is empty?

text: When using `cleveref` one may want to use its macros for making _all_ cross- references, even those where the cross-reference name is empty. The cross- reference name is the name that is appended to a cross-reference to describe its type, e.g. a `\cref` to Figure 1 outputs "figure 1" (rather than outputting just "1" like `\ref` does). To define an empty cross-reference name for figures one can, as described in the manual on page 19, do as follows:               \crefname{figure}{}{}      The problem with doing this is that even if the cross-references name indeed is emptied the space before the cross-reference is longer than when just using `\ref`. How can one avoid such a long space? Here is an example that illustrates the problem:               \documentclass{article}          \usepackage{cleveref}     \usepackage{enumitem}          \crefname{enumi}{}{}     \crefname{equation}{}{}          \begin{document}          \begin{enumerate}     \item foo\label{item:1}     \end{enumerate}     \begin{equation}     1+1=2\label{eq:1}           \end{equation}          In \cref{item:1}.% Too long space after "In"          In \ref{item:1}.          In \cref{eq:1}.% Too long space after "In"          In \ref{eq:1}.          \end{document}      ![Output of MWE](http://i.stack.imgur.com/5lhDi.png)


title: Math, cells above a bmatrix

text: How would one typset an array with cells above a `bmatrix`, something like               [a] & [b]     \begin{bmatrix}     1 & 2 \\     3 & 4     \end{bmatrix}      Where somehow the `[a]` and `[b]` cells would appear aligned and above the `bmatrix`.


title: Align subfigures vertically

text: It is easy using `subfigure` environment to place some figures side by side. How could we do it one on the top of the other one without messing with the alignment? Using linebreak (`\\\`) instead of `\;` for instance seems not to derive the desired result. Example               \documentclass[a4paper,11pt]{article}     \usepackage{fullpage}     \usepackage[utf8x]{inputenc}     \usepackage{amsmath}     \usepackage{amsthm}     \usepackage{amssymb}     \usepackage{graphicx}     \usepackage[hypcap=false]{caption}     \usepackage{subcaption}     \usepackage{chemfig}          % Title Page     \title{a}               \begin{document}     \maketitle          \begin{figure}             \begin{subfigure}[b]{\textwidth}                     \centering                     \chemfig{C(=[:0]O)(=[:180]O)}\;                     \chemfig{H-[::37.775,2]O-[::-75.55,2]H}\;                     \caption{Chemical Database}                     \label{fig:database}             \end{subfigure}\newline             %~ %add desired spacing between images, e. g. ~, \quad, \qquad etc.                %(or a blank line to force the subfigure onto a new line)             \begin{subfigure}[b]{0.3\textwidth}                     \centering                     \chemfig{C(-[:90]H)(-[:270]H)(=[:0]C(=[:0]C(-[:90]H)(-[:270]H)))}                     \caption{Query formula}             \end{subfigure}             \caption{Query}\label{fig:query}     \end{figure}          \end{document}      The desired result would be to have the first pair of formulas above the other while both figures are aligned to the center.


title: Multi-line box around a sentence in a paragraph

text: I am trying to draw a polygon box around a sentence within a paragraph. This box would wrap over multiple lines and terminate exactly at the end of the sentence (i.e. without white space filling the remaining line width). Therefore, the box I'm trying to draw is not a simple rectangle like what is produced by `\fbox`. I've tried several different approaches:   1. Using `\fbox` and `\parbox` to create a multi-line outline:              \fbox{\parbox{\linewidth}{%       Nunc sed pede. Praesent vitae lectus. Praesent neque justo,        vehicula eget, interdum id, facilisis et, nibh.}}        2. Using TikZ:              \newcommand\mybox[2][]{%       \tikz[overlay]\node[fill=blue!20,inner sep=2pt,          anchor=text, rectangle, rounded corners=1mm,#1] {#2};\phantom{#2}}      Any help is greatly appreciated. * * * Here is a simple document that illustrates the above code:               \documentclass{article}     \usepackage{tikz}          \newcommand\mybox[2][]{%       \tikz[overlay]\node[fill=blue!20,inner sep=2pt,          anchor=text, rectangle, rounded corners=1mm,#1] {#2};\phantom{#2}}          \begin{document}          \fbox{\parbox{\linewidth}{Nunc sed pede. Praesent vitae lectus. Praesent        neque justo, vehicula eget, interdum id, facilisis et, nibh.}} Phasellus        at purus et libero lacinia dictum. Fuscealiquet. Nulla eu ante placerat        leo semper dictum. Mauris metus. Curabitur lobortis. Curabitur        sollicitudin hendrerit nunc. Donec ultrices lacus id ipsum.          \mybox{Class aptent taciti sociosqu ad litora torquent per conubia nostra,        per incepto hymenaeos.} Aenean nonummy turpis id odio. Integer euismod        imperdiet turpis. Ut nec leo nec diam imperdiet lacinia. Etiam eget lacus        eget mi ultricies posuere. In placerat tristique tortor. Sed porta        vestibulum metus. Nulla iaculis sollicitudin pede. Fusce luctus tellus        in dolor. Curabitur auctor velit a sem. Morbi sapien. Class aptent taciti        sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos.        Donec adipiscing urna vehicula nunc. Sed ornareleo in leo. In rhoncus leo        ut dui. Aenean dolor quam, volutpat nec, fringilla id, consectetuer vel, pede          \end{document}


title: How to prevent "CONTENTS" from appearing as a header in ToC

text: In the documentclass `report`, how do I prevent "CONTENTS" from appearing in the header of the Table of contents? In the preface I have no header, only page numbers, and in the main part I want chapter in the upper, inner corner and section in the upper, outer corner - but not in the ToC where I only want page numbers.               \documentclass[12pt,a4paper,UKenglish,T1,twoside,openright]{report}          \usepackage[latin1]{inputenc}     \usepackage[bindingoffset=1cm,centering,margin=2.4cm]{geometry}     \usepackage[final]{pdfpages}     \usepackage{lastpage}          \usepackage{fancyhdr}     \setlength{\headheight}{15.2pt}     \pagestyle{fancy}     \fancyhf{}     \renewcommand{\headrulewidth}{0pt}     \renewcommand{\footrulewidth}{0pt}     \renewcommand{\chaptermark}[1]{\markboth{\MakeUppercase{\thechapter.\ #1}}{}}     \renewcommand{\sectionmark}[1]{\markright{\ #1}{}}     \fancyhead[LE,RO]{\rightmark}     \fancyhead[LO,RE]{\leftmark}     \fancyfoot[RO,LE]{\thepage\ of \pageref{LastPage}}          \fancypagestyle{plain}{     \fancyhf{}     \fancyhead[LE,RO]{\rightmark}     \fancyhead[LO,RE]{\leftmark}     \fancyfoot[RO,LE]{\thepage\ of \pageref{LastPage}}     \renewcommand{\headrulewidth}{0pt}     \renewcommand{\footrulewidth}{0pt}}               \begin{document}     \pagenumbering{Roman}     \includepdf[pages={1,{}}]{Tittelside.pdf}     \setcounter{page}{1}     \thispagestyle{plain}     \include{Abstract/abstract}     \newpage     \thispagestyle{plain}     \mbox{}     \newpage     \pagestyle{plain}          \tableofcontents     \clearpage{\pagestyle{plain}\cleardoublepage}          \pagenumbering{arabic}     \pagestyle{plain}     \include{Introduction/introduction}     \include{Futurework/Futurework}          \end{document}


title: supertabular always results in 'Misplaced \noalign' error

text: I'm trying to use the package `supertabular`in order to be able to break long tables in twocolumn mode (cf. the answer to this question). But I always end up with the following error when compiling:                Misplaced \noalign.     \@tabletail ->\noalign                             {\global \let \@savcr =\\ \global \let \\=\org@tabula...     l.9 \end{supertabular}      I assume I'm making some very basic mistake here, but I can't figure out what it is. Here's a MWE:               \documentclass{article}     \usepackage{supertabular}     \begin{document}     \begin{supertabular}{l l}     First column & Second column\\     First column & Second column\\     First column & Second column     \end{supertabular}     \end{document}


title: Error: Sorry, the system call 'pdflatex -shell-escape -halt-on-error '

text: I am trying to use TikzEdt tool to generate some graphs....It was working very nicelly, until I tried the `extended mode`, and from that instance, it is reporting an error. Here is the preamble               \documentclass[fleqn]{article}     \usepackage{tikz,amsmath, amssymb,bm,color}     \usepackage[margin=0cm,nohead]{geometry}     \usepackage[active,tightpage]{preview}     \usetikzlibrary{automata,positioning}     \usetikzlibrary{shapes,arrows}     % needed for BB     \usetikzlibrary{calc}        %% Begin Added by me     \usepackage{pdfpages}       %To be able to insert PDF pages        \usepackage{pgfplots}         %% End of added by me     \PreviewEnvironment{tikzpicture}      and here is a very basic code               % Define block styles         \tikzstyle{line} = [draw, -latex']            \begin{tikzpicture}[node distance = 2cm,auto]         % Place nodes         \node [draw,rounded corners] (node1) {node1};          \end{tikzpicture}      I tried `(Re-)Generate Precompiled headers` and this is what I get:               Generating precompiled header: pdflatex -ini -jobname="temp_header" "&pdflatex temp_header.tex\dump"     Compilation of pre-compiled header failed with exit code 1. Compilation of main document stopped. Check that all necessary packages are installed and that the pre-compiled header code (in the settings) has no errors!      A file named `temp_header.auxlock` is generated containing one single line `\def \tikzexternallocked {0}` Can any one please suggest some help?


title: Switch between leqno and reqno options (of amsmath) in the same document

text: I'd like to know if it is possible switch between the `leqno` and `reqno` options in the same document keeping the numbering of the equations. Namely i use the `reqno` option (default for `amsmath` and the standard `article` class), but i want that some equations are numbered by the left side (as if I had relied the `leqno` option) and the others no. I'd like a commands as `\leqnomode` and `\reqnomode` to change the position of `\tag` in anywhere of the document. Is this possible?


title: drawing two curved arrows with ellipse between them

text: how can I draw two curved arrows with two ellipses between them like attached image?![enter image description here](http://i.stack.imgur.com/FkWpL.png)


title: beamer: make a picture stay in the foreground

text: I am trying to write some style file for a poster framework, we can use. The header is almost ready:               \setbeamertemplate{headline}     {       \begin{beamercolorbox}[ht=15cm]{headline}         \begin{tikzpicture}[overlay, remember picture]         %title text           \node [anchor=north west,inner sep=0pt,text width=60cm] at ($(current page.north west)+(4.5cm,-2.8cm)$)         {         {\usebeamerfont{title}\usebeamercolor{headline}\color{fg}\inserttitle\par}%         \ifx\insertsubtitle\@empty%         \else%             \vskip28mm\par%             {\usebeamerfont{subtitle}\usebeamercolor{headline}\color{fg}\insertsubtitle\par}%         \fi%         %{\usebeamerfont{subtitle}\usebeamercolor{headline}\color{fg}\insertauthor\par}%         %   {\usebeamerfont{institute}\usebeamercolor{headline}\color{fg}\insertinstitute\par}                       };         %hzdr logo         \node [anchor=north east,inner sep=0pt] at ($(current page.north east)-(2cm,2.8cm)$)         {\includegraphics[width=22.39cm,hiresbb]{HIF_E_weiss_auf_transparent}};         %         \node [anchor=north east, inner sep=0pt] at ($(current page.north east)-(-3cm,13cm)$)         {\includegraphics[hiresbb]{PIKTO_ENGL_300DPI21}};         \end{tikzpicture}      \end{beamercolorbox}     }      The last picture is out of the actual header. And it should be visible, i.e. should stay in the forerground, not matter what to add under the header of the poster. Mainly the poster is made of other beamercolorboxes:               \newcommand\posterblock[4][]     {     \fcolorbox{hzdr-blue}{white}{         \begin{beamercolorbox}[colsep*=1ex,#1]{bgblock}%use bigger values for colsep* if you want to make the box around the text bigger;warning: if you use the option rounded this will disable the horizontal spaces around the text             \begin{block}{\usebeamerfont{block title}#2}\justify                 {\usebeamerfont{small block title}\color{hzdr-blue}{#3}}\vspace{2ex}                      {\usebeamerfont{block body}#4}             \end{block}         \end{beamercolorbox}}         \quad     }      But when I am using this posterblock, it will always over the picture. Can anybody help and make the picture stay in the foreground?


title: lstlisting: mathescape and Erlang

text: I am trying to combine to use `mathescape` together with the Erlang syntax highlighting in the package `lstlisting`, as described in Section 4.14 of its manual:               \documentclass{article}          \usepackage{listings}     \lstset{         language=Erlang,         mathescape=true     }          \begin{document}     \lstinline{$n_1$.lookup(k)}     \end{document}      This fails with:               ! Extra }, or forgotten \endgroup.     <recently read> \egroup           l.10 \lstinline{$n_1$.lookup(k)}      The code works fine for other languages, e.g. C. Does the style for Erlang miss something to allow this?


title: csplain and url package not working with pdftex

text: MWE (test.tex):               \input miniltx     \input url.sty          \url{http://www.google.com}          \bye      Commands: `pdftex -fmt=csplain test.tex` -- fails               This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) (preloaded format=csplain)      restricted \write18 enabled.     entering extended mode      encTeX v. Jun. 2004, reencoding enabled.     (./test.tex The format: csplain <Nov. 2013>.     The cs-fonts are preloaded and A4 size implicitly defined.     The utf8->iso8859-2 re-encoding of Czech+Slovak alphabet activated by encTeX     (/usr/local/texlive/2014/texmf-dist/tex/plain/graphics-pln/miniltx.tex)     (/usr/local/texlive/2014/texmf-dist/tex/latex/url/url.sty)     ! Improper alphabetic constant.     <to be read again>                         \warntwobytes      \do #1#2->\mathcode `#1                            =32768 \begingroup \lccode `\~`#1\lowercase {\endgrou...          \UrlEncSpecials ...char 27 }\do \warntwobytes ^^df                                                       {\mathchar 25 }\do \~{\low...          \Url@MathSetup ...ct \UrlSpecials \UrlEncSpecials                                                        \let \do \set@mathnolig \v...          \Url@FormatString ->\UrlFont \Url@MathSetup                                                  $\fam \z@ \textfont \z@ \font \e...          \Url@z ...rcent \Url@HyperHook {\Url@FormatString                                                        }\endgroup      l.4 \url{http://www.google.com}          ?       `pdftex -fmt=pdfcsplain test.tex` -- fails with similar message `xetex -fmt=pdfcsplain test.tex` -- succeeds `luatex -fmt=pdfcsplain test.tex` -- succeeds! Any thoughts on a fix? p.s. I am aware of the url support in OPmac, but would like the option of using eplain/url with csplain as well.


title: How to draw a hierarchical diagram in tikz?

text: How do I draw this diagram in tikz? Any pointers to the relevant libraries and packages are also welcome. In that case, it would be nice if you suggest a help file (similar examples) also? ![enter image description here](http://i.stack.imgur.com/uuoMZ.jpg)


title: Total number of longtables (v3.02+)

text: I'm wondering, are there any ways to get (and forward-reference at the beginning of the document) the total number of tables when using longtables? There are utility packages for standard table counter, but it's not used in longtable anymore starting from v3.02: > Counter for the tables, added in V3.02. Previous versions just used the > LaTeX counter table, but this fails if table is reset during a document, eg > report class resets it every chapter. This was changed from > \newcount\LT@tables in V3.04. LaTeX counters are preserved correctly when > \includeonly is used. In the rest of the file \LT@tables has been replaced > by \c@LT@tables without further comment.


title: Add a footnote on the paper title

text: I want to add a footnote to the title of my paper. I am able to get a asterisk appearing at the end of the title but there is no actual footnote on the bottom of the page where we normally expect footnote to be. Instead, it's still the AAAI copyright info. ![enter image description here](http://i.stack.imgur.com/hb7ZX.png)Here I've attached a MWE               \documentclass[letterpaper]{article}     \usepackage{aaai}     \usepackage{times}     \usepackage{helvet}     \usepackage{courier}     \frenchspacing     \setlength{\pdfpagewidth}{8.5in}     \setlength{\pdfpageheight}{11in}     \pdfinfo{      /Title (Insert Your Title Here)     /Author (Put All Your Authors Here, Separated by Commas)}     \setcounter{secnumdepth}{0}       \begin{document}     \title{Formatting Instructions \\for Authors Using \LaTeX{}\footnote{Example.}}     \author{AAAI Press\\     Association for the Advancement of Artificial Intelligence\\     2275 East Bayshore Road, Suite 160\\     Palo Alto, California 94303\\     }     \maketitle     \begin{abstract}     \begin{quote}     AAAI creates proceedings, working notes...      \end{quote}     \end{abstract}               \end{document}


title: Two- or three-authored papers key

text: I would like to cite a paper from 2010 with two or there authors (say, Miller, Javier and Smith) such that the key in the text appears as `[MilJavSmi10]`. Similar to what is done for a single-authored paper. Currently, with the `alpha` mode, it appears as `[MJS10]`. For more than three authors, I prefer the key to stick to the default `alpha` mode. Is it possible to achieve this with `bibtex` (without using `biber`)?


title: Add journal name to biblatex references

text: I'm using biblatex in a beamer presentation so that I can use the \footcite command. The problem is that bibliography styles handling in biblatex don't look quite straighforward and none of the default styles will actually work for me since they do not show Journal references. I'm looking for something similar as .bst files for Bibtex, since I can have JPC and PRL, PR bibliography styles. I surfed the internet and this stackexchange but couldn't find a proper solution. Could somebody provide me a working example with a style which shows: Authors, Year, Journal? Best regards The following code (authoryear style) does not show journal. Alphabetic, numeric etc only produces blank references. ![no journal info](http://i.stack.imgur.com/3y9YB.png) MWE:               \documentclass[8pt mathserif]{beamer}          \usepackage{beamerthemesplit}     \usepackage{latexsym}     \usepackage{eurosym}     \usepackage[english]{babel}     \usepackage{ae,aecompl}     \usepackage{graphicx}     \usepackage{amsfonts}     \usepackage{amsfonts}     \usepackage{amsmath}          \usepackage[style=authoryear]{biblatex}          \addbibresource{library.bib}     \usetheme{Madrid}               \title[]{Title}     \author[]{author}     \institute{MSE @ NTU\\     The Zhao Research Group\\                       }     \date[]{Thursday 31, July 2014}          \begin{document}          \section{Review of interesting phenomenology}     \begin{frame}[allowframebreaks noframenumbering]{Polaron Transformation}          \begin{itemize}                   \item The original theory was  developed by Munn-Silbey{\tiny \footcite{Silbey1980}\footcite{Munn1985}\footcite{Munn1985a}} and further refined by Zhao et al. \footcite{JCP1994OntheMunn}\footcite{Chen2011}           \end{itemize}        \end{frame}     \end{document}      And the library.bib file only contains entries such as the one referenced:               @article{Silbey1980,     author = {Silbey, R. and Munn, R. W.},     doi = {10.1063/1.439425},     file = {:Users/Caco/Documents/Mendeley Desktop/General theory of electronic transport in molecular crystals. I. Local linear electron–phonon coupling R. Silbey and R. W. Munn.pdf:pdf},     issn = {00219606},     journal = {The Journal of Chemical Physics},     number = {4},     pages = {2763},     title = {{General theory of electronic transport in molecular crystals. I. Local linear electron–phonon coupling}},     url = {http://scitation.aip.org/content/aip/journal/jcp/72/4/10.1063/1.439425},     volume = {72},     year = {1980}     }


title: Html color in mdframed

text: I want to make mdframed with linecolor set using HTML color model. How can i do it? I want something like               \begin{mdframed}[linecolor=\color[HTML]{FF0013}]         text     \end{mdframed}


title: Framed environment: Define custom textwidth for a box

text: I discovered the framed package while I was loooking for a way to frame long paragraphs spanning over multiple pages. I need to to higlight certain passages, e.g. releace candidates, todos etc.:               \newenvironment{cframed}[1][gray]       {\def\FrameCommand{\fboxsep=\FrameSep\fcolorbox{#1}{gray}}%         \MakeFramed {\advance\textwidth-\width \FrameRestore}}       {\endMakeFramed}          \newcommand{\rc}[2]{     \index[releasecandidates]{{\color{title}Release Candidate:} #2|(}     \begin{cframed}                     \vspace{5pt}                     \textbf{\textcolor{title}{Release Candidate} }  \\  % Set colors here                     \vspace{5pt}     #1     \par                     \vspace{5pt}                     \textbf{\textcolor{title}{Release Candidate} }    % Set colors here                     \vspace{5pt}                                 \end{cframed}          \index[releasecandidates]{{\color{title}Release Candidate:} #2|(}     }      I used the cframe environment from an example I found on Colored frame for the framed environment . The rest of the code is based on my former command which caused some problems due to the minipage environment. This is my old environment that could not span multiple pages or page brakes etc.:               \newcommand{\rcold}[2]{         \index[releasecandidates]{{\color{title}Release Candidate:} #2|(}             \begin{leftbar}{gray}{gray}                        % Set colors here                 \begin{minipage}{0.97\textwidth}                     \raggedright                     \vspace{5pt}                     \bfseries\color{title}{Release Candidate}     % Set colors here                     \vspace{5pt}                 \end{minipage}\par                 \par     \par               #1                 \par                 \par                 \begin{minipage}{0.97\textwidth}                    \raggedright                     \vspace{5pt}                     \bfseries\color{title}{Release Candidate}     % Set colors here                     \vspace{5pt}                 \end{minipage}             \end{leftbar}               \index[releasecandidates]{{\color{title}Release Candidate:} #2|)}     }      Even though the new environment is working just fine, I need a way to set up the box width to 0.96/textwidth. How can I do that? Adding [0.96\textwidth] as a parameter did not work. By the way: The result is a grey box with no borders etc., just a plain gray backgorund similar to stackexchanges highlighting of code.