title: TikZ:How to draw the pump schematic drawing

text: Here My first Tikz picture: help on positioning and suggestions we have a nice drawing similar to this image. ![enter image description here](http://i.stack.imgur.com/uMLrU.gif) > How to draw the pump element in the above image? How to draw the anticlock > arrow? Like turbine is it possible to make `\tikzset` for pump               \tikzset{turb/.style={draw,trapezium,shape border rotate=90,inner sep=1pt,minimum width=2.5cm,trapezium stretches=true,trapezium angle=80,on grid,below right= of evaporatore}}      * * *               \documentclass{standalone}      \usepackage{tikz}     \usetikzlibrary{positioning,shapes.geometric,decorations.pathmorphing,decorations.pathreplacing,decorations.shapes,decorations.markings,patterns,calc,fit,arrows}          \begin{document}          \begin{tikzpicture}[>=latex',auto,inner sep=2mm,node distance=2cm and 3cm]          %set styles for the axis between turbine and pump and for the boxes          \tikzset{box1/.style={draw,minimum width=2.5cm,rectangle,thick}}     \tikzset{deco/.style={decoration={markings,                            mark=at position #1 with {\arrow{>}}},                            postaction={decorate}}}     \tikzset{turb/.style={draw,trapezium,shape border rotate=90,inner sep=1pt,minimum width=2.5cm,trapezium stretches=true,trapezium angle=80,on grid,below right= of evaporatore}}             % draw nodes     \node[box1] (evaporatore)  {Boiler};     \node[turb] (turbina) {Turbine};     \node[box1,on grid,below left=of turbina] (condensatore){Condenser};     %\node[draw,circle,on grid,below left= of evaporatore] (pompa) {Pump};     \node[draw,circle,on grid,below left= of evaporatore] (pompa) {Pump};      \draw (pompa.70) |- ++(2.5mm,5mm) coordinate (mid)  -| (pompa.east);               \begin{scope}[>=triangle 45]      \draw [deco=0.6]  (evaporatore)                -| (turbina.top right corner);      \draw [deco=0.6]  (turbina.bottom left corner) |- (condensatore);      \draw [deco=0.4]  (condensatore)               -| (pompa);      \draw [deco=0.6]  (mid)                      |- (evaporatore);      \end{scope}          %draw the "shaft"          \path(pompa) to node[]{shaft} (turbina);     \draw[pattern=north east lines] ($(pompa.east)+(0,-3pt)$) rectangle ($(turbina.west)+(0,3pt)$);     \draw[pattern=north east lines] ($(turbina.east)+(0,-3pt)$) rectangle ++(1,6pt);     \draw[->] (25:1) arc (10:320:0.2cm and 0.75cm) ;     %     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/T8oCE.png) > Pump element changed (thanks to percusse). Instead of node, coordinate is > used... \draw (pompa.70) |- ++(2.5mm,5mm) coordinate (mid) -| (pompa.east); ![enter image description here](http://i.stack.imgur.com/cgnsf.png)


title: What research exists on Speech to LaTeX / MathML?

text: # Preface I'm currently working in the area of speech recognition and simultaneous lecture translation. Essentially, you have one speaker (the lecturer) who speaks in German (for example) and many students who don't understand German. The speaker can get the spoken translation of their words, in any language they like, just a few seconds after they speak. So the process involves:   1. Transforming German speech into German text; and   2. Transforming German text into text in a foreign language; and   3. Synthesizing speech for text in a foreign language. This system has already been built and works amazingly well—it's far from perfect, but works well enough for you to be able to get an idea what the lecture is about. An example for this system is right at the beginning of this video: Video: Simultaneous machine translation (in German) But where the system currently really sucks is math. For example, when you say something like:               The sum from n equals 1 to infinity of 1 over n squared goes to infinity.      It will recognize exactly this. But I think it should recognize               $\sum_{n=1}^\infty \frac{1}{n^2} \rightarrow \infty$      or something similar. And yes, I am aware of the fact that even humans cannot always tell how speech (especially without context) would translate to LaTeX without any ambiguity. But even providing several alternatives would be a big improvement. # My Question Are there any papers that deal with the problem "math speech to text" or "math speech to (La)TeX" or "math speech to MathML"? I have seen a question asking about LaTeX to MathML to speech but not the other way round. I've also found metroplexvoice.com, but this is not natural language. They make unnaturally long pauses for the system, and they say things like "newline". # Summary of papers I know When people who are interested in the same topic read this question, they should not have to read the whole paper to get a rough idea what it is about. So I'll try to summarize the ones I've read ## How can we speak math? The first part of this paper is about text to speech (or rather math to speech). It explains ambiguity of math speech and recommends a multimodal approach (speech and text) for on-line recognition of math.


title: Restatable example containing code listing

text: I am creating a beamer presentation, and I'm using the packages `thmtools`, `thm-restate` and `listings`. Inside one of my `\frame`s, I want to create an `example` block containing a code listing. Later, I want to restate this entire block. Unfortunately, `lstlistings` inside `restatable` blocks causes the following error, right before the `\end{frame}`:               Package Listings Warning: Text dropped after begin of listing on input line 18.               )     ! Missing } inserted.     <inserted text>                     }     l.58 \end{frame}      **How can I resolve this?** Since (in beamer documents) `example` is a pre-defined theorem type, I am not creating one myself with `\newtheorem`. MWE:               \documentclass{beamer}     \usepackage[T1]{fontenc}     \usepackage[english]{babel}     \usepackage{textcomp}     \usepackage{thmtools,thm-restate}     \usepackage{listings}     \lstset{language=[Sharp]C,         captionpos=b,         showspaces=false,         showtabs=false,         linewidth=\textwidth{},         breaklines=true,         showstringspaces=false,         breakatwhitespace=true,         escapeinside={(*@}{@*)},         basicstyle=\ttfamily\fontseries{c},         morekeywords=[1]{partial},         literate={\\\-}{}{0\discretionary{{\normalfont \texttildelow}}{}{}}     }          \title{Presentation}     %\subtitle{}     \institute[UoF]{University of Foo}     \author{derabbink}     \date{\today}          \begin{document}          \begin{frame}[fragile]         \frametitle{Code}         \begin{restatable}[Human readable code]{example}{humanCodeI}         \begin{itemize}             \item \emph{Wait} for `Click Me!' button to become enabled             \item \emph{Click} `Click Me!' button             \item \emph{Verify} that `Click Me!' button is disabled         \end{itemize}         \end{restatable}              % this causes an error         \begin{restatable}[C\# code]{example}{csCodeI}             \begin{lstlisting}                 Button btn = GuiHelper.FindButton("Click Me!");                 GuiHelper.WaitUntilEnabled(btn, Is.True);                 GuiHelper.Click(btn);                 Assert.That(GuiHelper.IsEnabled(ping), Is.False);             \end{lstlisting}         \end{restatable}              % this doesn't cause errors     %   \begin{example}[C\# code]     %       \begin{lstlisting}     %           Button btn = GuiHelper.FindButton("Click Me!");     %           GuiHelper.WaitUntilEnabled(btn, Is.True);     %           GuiHelper.Click(btn);     %           Assert.That(GuiHelper.IsEnabled(ping), Is.False);     %       \end{lstlisting}     %   \end{example}     \end{frame}          \end{document}


title: How to change numbering of figures (subfloats more specifically in a minipage)?

text: I have 6 figures in a 2 by 3 minipage like below               \begin{minipage}        \subfloat[]          \subfloat[]         \subfloat[]        \quad        \subfloat[]        \subfloat[]        \subfloat[]     \end{minipage}      This structure labels subfloat as               a b c     d e f      How I can get subfloats labeled as below ?               a c e     b d e


title: How to know whether or not we need \expandafter?

text: The following is quoted from Peter Grill's answer on question LaTeX dynamic macro definition. > The `\expandafter` is requried as the `\newcommand` needs to be dealt with > after the `\csname`. As a newbie in TeX programming, how to know whether or not I need `\expandafter`?


title: Properly indent comments with no line-numbering in algorithmicx

text: Writing comments in pseudocode, I wanted to insert comments to the right side of the line which is commented. This thread help me a lot. The algorithm is line-numbered, however I need the comments with no number! (as a regular `\comment` command do), but because the macro has the `\State` command in it, it really is a normal line with number.               \algnewcommand{\LineComment}[1]{\State \(\triangleright\) #1}      Thanks in Advance!


title: Why do some TeX documents not use links in TOC?

text: I really love LaTeX (or TeX - I don't really know the difference. I only know that LaTeX is a superset of TeX). One reason why I like it is the automatic creation of links within a PDF document. I think this really adds value to the document as it is much easier to read online this way. But I've just seen some books / documents written with (La)TeX, that don't have a linked TOC:   * The TeXbook   * `amsmath` documentation (`amssym` does not even have a PDF documentation … or at least there appears only text when I type `texdoc amssym`)   * (I'm quite sure there were more, but every package I've just tried had links. So maybe I just had bad luck?) Is there any reason for this? Were links added with LaTeX (was pdftex part of TeX?) and is this the reason why some documents don't have links? Is there any reason not to update those documents? (I guess a reason for not updating the TeX-book might be the aim for an ultra-stable document, but why isn't `amsmath` updated?)


title: What are some packages or methods that I can use to create JAWS-accessible LaTeX content?

text: I'm looking for packages, external tools, and/or methods that allow me to create PDF (and Word ?) files with LaTeX that are fully accessible and Section 508-compliant, and that can be read with screen readers like JAWS and Read & Write Gold 11. Thanks! P.S.: I'm using Notepad++, TeXworks, and TeXstudio


title: Space between the two slashes in “http://” too big

text: I'm using a lot of links with `http://` in my document, but the two slashes are too much separated, I'd like them to be more near each other. How do I do this, in a neat way? I'm using a sans-serif font: `\renewcommand{\familydefault}{\sfdefault}`


title: Adding left/right bars to letters

text: Is there an equivalent of the top/bottom bars you can get with `\overbar`, `\underbar` but for left and right bars? I would like to have a small vertical bar right next to some text in mathmode. I would prefer existing solutions in some package but a custom macro/command is also fine.


title: PDF's not working in LATEX

text: I was not sure if I should ask this on Mathematica or LATEX or here. I am very new to LATEX and using `\includegraphics` to put images into my paper. I am using plots generated in Mathematica as PDF's. After I compile the tex file and get a PDF the plots look nice but the labels for the X and Y axis are missing. I have added `\pdfoptionpdfminorversion 6` to my preamble because I was getting an error about the version of the PDF's. The error is gone but still no labels. Any thoughts? Ben


title: Different styles of footnote numbering with beamer

text: I am writing a presentation in beamer and I use footnotes for references, making use of the `\footnotemark` and `\footnotetext` commands. When I use these in `block`, the numberings of marks and texts is different. I mean the marks are numbered using Arabic numerals (1,2,...) but the texts are numbered using small letters (a,b,...). Here is an image to illustrate this issue: ![enter image description here](http://i.stack.imgur.com/3RIvY.png) The corresponding source is               \documentclass{beamer}     \usepackage[utf8]{inputenc}     \usetheme{Frankfurt}     \begin{document}       \begin{frame}{Sample frame}         \begin{block}{Sample block}           Some text\footnotemark[1]           \footnotetext[1]{Footnote}         \end{block}       \end{frame}     \end{document}      Is there a way to solve this inconsistency and unify both numberings?


title: Good example for Float command in latex?

text: What is the `float` package used for? Can anyone show me a good example of its use?


title: Curve CV - Photo in Rubric

text: I just started to create my CV by using `CurVe` package (CurVe at CTAN). But while I tried to include my photo inside the personal category I had some troubles, because I was not able to place the image properly. Can someone tell me how to place the image inside a rubrics element properly? At the moment the rubric looks like this:               \begin{rubric}{Persönliches} % Titel der Rubrikb     \noentry{03/2013 --- 04/2014}           \entry*[Name] Stefan MyName          \entry*[Geburtsdatum und -ort] 11.11.1111 in Ducktown          \entry*[Staatsangehörigkeit] deutsch          \end{rubric}      and the main document like this               \NeedsTeXFormat{LaTeX2e}     \documentclass[a4paper,skipsamekey,12pt,german]{curve}     %\usepackage[applemac]{inputenc} % fuer Macuser     \usepackage[T1]{fontenc}     % die Raender je nach Bedarf anpassen     \usepackage[a4paper,nohead,nofoot,hmargin=2cm,vmargin=2cm]{geometry}               \usepackage[ngerman]{babel} % die Sprachen einstellen, die Du benoetigst     \usepackage{textcomp} % Paket um Trademarks etc. kennzeichnen zu koennen     \usepackage{marvosym}     \usepackage{wasysym}     \usepackage{wrapfig} % Paket zur Positionierung einbinden     \usepackage{graphicx} % Paket zur Verwendung von .jpg Bildern               \usepackage[ansinew]{inputenc}               \usepackage{color} % farbige Links     \usepackage[colorlinks]{hyperref} % klickbare Links im PDF          % Um keinen Einzug bei Subrubriken zu erzeugen     %\makeatletter     %\def\@@subrubric#1{\rule{0bp}{\@beforespace}{\@subrubricfont#1}     %\@subrubricmark{#1}}     %% Um eine waagerechte Linie vor Überschriften einzufügen     %\def\hrulefill{\color{Gray}\leavevmode\leaders\hrule height 1pt\hfill\kern\z@}     %\makeatother               %\definecolor{darkblue}{rgb}{0,0,.5}  % dunkelblaue Links     %\hypersetup{pdftex=true, colorlinks=true, breaklinks=true,%      %linkcolor=darkblue, menucolor=darkblue, urlcolor=darkblue}      %                % rubric topic sizes     \rubricfont{\Large\bfseries}               \flavor{detail}          % Wer bist Du? z. B. Assistant Professor, Chief Engineer, Senior Executive:     %\title{Lebenslauf}     %\title{Stefan ssss}     \title{Lebenslauf}          % Beschreibe Dich genauer, z.B.     \subtitle{Stefan ssss, B.Sc.}               % Abstand zwischen dem Titel einer Subrubrik und der folgenden Aufzaehlung     \setlength\subrubricspace{3ex}          % Anpassung/Einstellung fuer Aufzaehlungszeichen vor den Taetigkeitsbeschreibungen:     % \usepackage{pifont} % nur falls man die Aufzaehlungszeichen braucht     % \prefix{\ding{43}} % setzt einen Zeigefinger als Listenpunkt vor den Eintrag          % falls eine Rubrik ueber die Seite hinausreicht, wird die Rubrikueberschrift     % auf der naechsten Seite wiederholt, gefolgt von einem Fortsetzungshinweis in Klammern:     \continuedname{~~(...)} % Englisch                         \leftheader{str. 47 \\ 1111 somewhere}     \rightheader{+49 176 333 33333327 \Mobilefone \linebreak 3333@gmail.com \Email}               \begin{document}          \makeheaders     \maketitle               \prefix{}     \makerubric{personal}     \prefix{-}     \makerubric{experience}     \prefix{-}     \makerubric{education}      \prefix{-}     \makerubric{ausland}      \prefix{-}     \makerubric{mitgliedschaften}     \prefix{}     \pagebreak     \makerubric{skills}     \prefix{-}     \makerubric{references}          \prefix{}     \makerubric{publications}          \pagebreak     \prefix{-}     \makerubric{projects}     \prefix{}     \makerubric{skilllist}          \vspace{3cm}          Stefan sss \\     ssss, den \today           \end{document} % schliesst das Hauptdokument      ![image position](http://i.stack.imgur.com/0led2.png)


title: How to increase the size of footnote counters used

text: I am writing a document in LaTeX for someone who is visually impaired, which means that I have to increase the font sizes for them. How do I increase the size of the font used for the footnote counter. When used with the `footmisc` package, `\renewcommand\footnotelayout{\Large}` increases the size of the font used for the content of a footnote, but it does not increase the size of the footnote counter. How can I do this please?


title: Condense Latex Title

text: I wish for my Latex Title to be condensed so that it takes up less room on the page. Here is my current source:               \documentclass[12pt]{article}          \usepackage[margin=1in]{geometry}     \usepackage{amsmath,amsthm,amssymb}     \usepackage{graphicx,ctable,booktabs}          % ----------------------------------------------------------------------------------------------------------------------------------------------                                 % Commands                                                                                %-----------------------------------------------------------------------------------------------------------------------------------------------                                 \newcommand{\justif}[2]{&{#1}&\text{#2}}     \newcommand{\N}{\mathbb{N}}     \newcommand{\Z}{\mathbb{Z}}     \newcommand{\R}{\mathbb{R}}     \begin{document}     % --------------------------------------------------------------                                                                                % Start here                                                                                % --------------------------------------------------------------                                                                                \title{This is a title that need not take up half the page! (How do I fix this?)}%replace X with the appropriate number                                                                %if necessary, replace with your course title                                                                                \maketitle     This is the rest of my document...     \end{document}        1. How do I get the title to take up less space? If you need more information let me know. Thanks in advance!


title: Renew command \makelettertitle in moderncv

text: I want to modify the command \makelettertitle of the package moderncv so that I can have a heading in French style, that is, my data on the left, then below in 2 colums a "formule de politesse" on the left and the company data on the right. Below this on the left the date, then on the right the "objet" (why I'm sending the letter) and below the \opening. ![elements](http://i.stack.imgur.com/6oST2.png) The thing is that if I try to to a renewcommand it gives me many extrange errors :P Thanks in advance


title: Script for using metatype to convert metafont to TTF?

text: In the metatype FAQ, there's a section called "I have Metafont sources of some font. How could I convert it to TrueType using Metatype?" In that, he lays out a dozen steps that really should be scripted. Does anyone know of such a script? (I understand the result won't look very good at low font sizes.)


title: What kind of document is suitable for a book if customer wants changes

text: I have a situation that I have to write a book from the material that my customer gave and she has not yet decided the layout of the book. What kind of document should I wrote that I can easily change for example Paper size (A4 vs A5) Font size and style Margin sizes Vertical space between lines How many letters should the line on maximal length contain, such that the space between letters should be configurable?


title: Move figures around in a document with a simple command

text: During the draft phase of an article, when the text is being developed and things move around a lot, I place all my figures at the end of the document so that I'm not greeted with sudden layout changes. Later, when I'm more comfortable with the text (but still liable to change), I bring the figures upfront one by one. My question is: Instead of having to lug around the entire               \begin{figure}         \centering         \includegraphics[...]{...}         \label{fig:test}         \caption{...}     \end{figure}      block to reposition the figure, is it possible to leave them where they are (i.e. towards the end of the document) and "place" them where I want by simply referencing them in some custom way, such as:               \placehere{fig:test}      which will place the float (defined later in the document) at the current position? This way, I can move the figures around with a single line instead of several. The resulting document layout would look something like:               \documentclass{article}     \usepackage{lipsum,graphicx}     \begin{document}     \section{Lorem}     \lipsum[5]     \placehere{fig:test1}          \section{Dolor}     \lipsum[5]     \placehere{fig:test2}          \section{Final section}     \lipsum[5]          \begin{figure}         \centering         \includegraphics[...]{...}         \label{fig:test1}         \caption{...}     \end{figure}          \begin{figure}         \centering         \includegraphics[...]{...}         \label{fig:test2}         \caption{...}     \end{figure}     \end{document}


title: Colored bar above title in LaTeX beamer

text: I wrote an unofficial beamer template for my university. I put the beamer style file and example presentation on github: https://github.com/broesel007/dshsbeamer Here my question: How can I add a colored bar (e.g. red) above the blue title bar? I also would like to add the logo of our institute in that bar. How can I do that? Any recommendations? Thank you very much in advance for your help!!


title: Remove "Abstract" title from Abstract

text: I am using the abstract package, but want to remove the title and associated horizontal spacing. Is there an easy way to do this? (Be aware: this may be a complete newby question, as I have only recently started to use LaTex. Please be kind!)               % !TEX TS-program = pdflatex     % !TEX encoding = UTF-8 Unicode     \documentclass[10pt,twocolumn]{article}          \usepackage[utf8]{inputenc} % set input encoding (not needed with XeLaTeX)          %%% PAGE DIMENSIONS     \usepackage{geometry} % to change the page dimensions     \geometry{a4paper} % or letterpaper (US) or a5paper or....     \geometry{margin=1in} % for example, change the margins to 2 inches all round     \addtolength{\topmargin}{-10mm}          %%% PACKAGES     \usepackage{abstract}          %%% HEADERS & FOOTERS     \usepackage{fancyhdr} % This should be set AFTER setting up the page geometry     \pagestyle{fancy} % options: empty , plain , fancy     \renewcommand{\headrulewidth}{0pt} % customise the layout...     \lhead{}\chead{}\rhead{}     \lfoot{}\cfoot{\thepage}\rfoot{}          %%% SECTION TITLE APPEARANCE     \usepackage{sectsty}     \allsectionsfont{\mdseries\upshape              \sectionrule{15pt}{0pt}{-5pt}{1pt} }          \title{Title Title Title}     \author{Alistair Collins, Company}     \date{} % Activate to display a given date or no date (if empty), otherwise the current date is printed           \begin{document}     \twocolumn[     \maketitle          \begin{onecolabstract}     One Column Abstract - it is the Abstract title that I wish to remove.\\     \end{onecolabstract}     ]          \section{Section Title}     \textit{Italic text as first paragraph\\\\     }     Main text          \end{document}


title: Too deeply nested (itemize)

text: So I'm writing this summary for a lecture and I am using `itemize` a lot. The problem I get now is the two times the error ( _NB_ : `\bi` is my alias for `\begin{itemize}`)                    ! LaTeX Error: Too deeply nested.               See the LaTeX manual or LaTeX Companion for explanation.          Type  H <return>  for immediate help.           ...                                                             l.10 \bi               ?           [21      I know that itemize can go four layers deep but in all my document I never go deeper than 2 levels.   To try to find the error I also separated the document and made a single file for each chapter and included them in the main document. I'm now 99.9% sure that I didn't make any error with nesting but since the error remains I'm a bit desperate. So I ask you, what I should look for when having that error?   Are there other mistakes that could create this error?


title: Convert from LaTeX to Plain TeX

text: Is there a way to convert a LaTeX document, which uses a lot of packages and macros, into Plain TeX, such that all macros are expanded and all dependencies on external packages are gone?


title: How to print or convert HTML document into PDF using LaTeX

text: I written one XSD schema, I documented that schema using xmlpad, It generates the HTML documentation automatically for that XSD schema. Now I want to generate a PDF document for that HTML document. I thought to convert the HTML document to LaTeX and I am using `pdflatex` to generate the PDF document. But I don't know how to convert a HTML document to LaTeX? Is there any open source tool? Can anyone suggest a tool or any other way? I need to convert a HTML document to PDF.


title: todonotes and tikzexternalize

text: In my document I use `todonotes` and `TikZ`/`pgfplots`. After activating the externalization in `TikZ` I realized that `todonotes` are all exported as well (because they are based on `TikZ`). This behaviour is inconvenient, it would be much better for me to tell `tikz- external` to ignore all `\todo`. I know I can generally disable the externalization with `\tikzset{external/export=false}` and turn it on only for selected plots, but the inverse would be more convenient.


title: Blank page when using newlfm and pdfpages

text: I am using `newlfm` for a document and am also loading `pdfpages` to append some external PDF files to the end of this document. My problem is that I get a blank page at the end of the document, traceable to `newlfm`. If I omit the `{newlfm}` environment the blank page disappears -- but of course that environment is necessary in order for the documentclass to format the page properly. Here is a MWE: _**_**external.tex* _*_** :               \documentclass{article}     \begin{document}     This is an external file.     \end{document}      _**_**wrapper.tex* _*_** :               \documentclass{newlfm}     \usepackage{pdfpages}     \begin{document}     \begin{newlfm}     This is a nicely formatted introductory page.     \includepdf{external.pdf}     \end{newlfm}     \end{document}      The above produces a three-page `wrapper.pdf`, when it should contain only two pages. Can anyone help? **UPDATE** Per @jon's request, here is a second MWE that illustrates the header problem when the inclusion of the PDF is invoked outside the `newlfm` environment: _**_**wrapper2.tex* _*_** :               \documentclass[stdletternofrom]{newlfm}     \Lheader{Left Header}     \lheader{second-page left header}     \Rheader{Page \thepage}     \rheader{Page \thepage}          \usepackage{pdfpages}          \newcounter{includepdfpage}     \newcounter{currentpagecounter}     \newcommand{\addlabelstoallincludedpages}[1]{%        \refstepcounter{includepdfpage}%        \stepcounter{currentpagecounter}%        \label{#1.\thecurrentpagecounter}}     \newcommand{\modifiedincludepdf}[2]{%             \includepdf[pages=-,pagecommand=\addlabelstoallincludedpages{#1}]{#2}%     }     \begin{document}     \begin{newlfm}     This is a nicely formatted introductory page.     \modifiedincludepdf{ExtFile}{external.pdf}     \end{newlfm}     \end{document}      If `\end{newlfm}` is moved above `\modifiedincludepdf`, instead of the second- page header appearing on Page 2, the first-page header is there and is in the wrong location.


title: A modification of \part style in memoir

text: I have modified the `\part` command style in a `memoir` document as in the following minimal example:               \documentclass[b5paper,10pt,twoside,openright,final,english]{memoir}     \usepackage{lipsum}     \usepackage[english]{babel}          \makepagestyle{part}     \makeevenfoot{part}{}{}{}     \makeoddfoot{part}{}{}{}     \makeevenhead{part}{}{}{}     \makeoddhead{part}{}{}{}          \renewcommand*{\beforepartskip}{\null\vskip 0pt plus -0.3fil}     \renewcommand*{\midpartskip}{\par\vskip 0pt plus 1.0fil}     \renewcommand{\printpartname}{\partnamefont\raggedleft Part}      \renewcommand*{\cftpartname}{Parte\space}     \renewcommand{\printpartnum}{\partnamefont\thepart \\ \vspace{-15pt} \hrulefill}           \begin{document}     \tableofcontents          \chapter{Introduction}     \lipsum          \part{Basics}          \chapter{A Chapter}     \lipsum          \appendix     \renewcommand*{\beforepartskip}{\null\vspace{.5\textheight}}     \renewcommand*{\midpartskip}{\par\vspace 2\onelineskip}     \renewcommand*{\printpartname}{\reggedleft\partname}     \part*{Appendix}     \chapter{An Appendix}     \lipsum          \end{document}      Why in the blank page relative to the `\part*` command the title "Appendix" is not flushright? In other words, I would like to change the `\part` style after `appendix` in such a way that the title "Appendix" in the blank page is flushright (in the middle of the page). How to do this?


title: Something like \raisebox that respects line breaks

text: If one wants to raise some text one uses something like               \raisebox{0.5 em}{some text}      However this doesn't respect line breaks and may cause some nasty overflows. Is there a way to have `\raisebox` respect line breaks? Or an alternative that provides the same functionality? Edit: Here's an example for clarification:               \documentclass{article}          \begin{document}          Lorem ipsum dolor sit amet,     \raisebox{0.5 em}{consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.}          \end{document}      I need the raised text to line break like it would if it wasn't raised. Edit2: Apparently my clarification wasn't to helpful. I want to raise an entire sentence, if I use `\raisebox` the sentence will overflow to the right (as seen in the example). If this was HTML I would use `<sup>some text</sup>` which is able to handle line breaks.


title: How to remove space between back address and address in scrlttr2?

text: There is a blank line between the back address and the address? How can I remove it?               \documentclass{scrlttr2}      \usepackage[latin1]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{ngerman,    ae}     \usepackage[babel,german=quotes]{csquotes} % Deutsche Gänsefüßchen          \KOMAoptions{backaddress=true}           \setkomavar{fromname}{<Name back address>}           \setkomavar{fromaddress}{<street back address>\\ <town back address>}          \begin{document}      \begin{letter}{name\\ street\\ town}              \opening{Hello}       some text       \end{letter}     \end{document}


title: Windows 7: problem with TeXnicCenter, MiKTeX2.9

text: Please help! They have updated my computer to Windows 7, and I have tried to reinstall MiKTeX2.9 and TeXnicCenter. When I run a LaTeX program, it tries to install 412 files from CTAN, and I get the error: > pdflatex.exe: A timeout was reached while receiving data from the server And then I get a LaTeX error that `pgfcore.sty` was not found. Is it some permissions problem with Windows 7? I have administrative privileges that I could use, but I don't seem to be prompted for my password... This is driving me crazy! Any help is much appreciated.


title: How do I determine in which order packages have been loaded?

text: The `\listfiles` command will give the list of all loaded files (and therefore also packages) at the end of the `.log` file, but how do I determine from inside LaTeX, whether package A was loaded before package B or vice versa?


title: Two sets of aligned equations in two columns?

text: Say I have a set of equations: (1)               \begin{align}     wx&=u\\     wy&=v\\     w&=10     \end{align}      (2)               \begin{align}     x&=u/w\\     y&=v/w\\     \end{align}      How can I do the following: put (1) and (2) in the same line but in two separate columns, and add a `\leftrightarrow` between them? i.e., something like ![enter image description here](http://i.stack.imgur.com/3zqQn.png) I tried putting (1) (2) and arrow in three `minipage` environments, but the width of `minipage` is hard to tune when (1) (2) have different width and looks quite ugly as above.


title: Use the \SplitArgument function to pass an array of token-separated values as a single argument

text: In my work with linear algebra and matrices I have been quite restricted by LaTeX2 and its maximum of 9 arguments that may be passed to a `\newcommand`. While LaTeX3 imposes that same limitation for the `\NewDocumentCommand` I noticed (with considerable excitement) that the `xparse` package provides a number of argument processors which will work around this limitation. In particular `\SplitArgument` appears to offer just what I need. Regrettably I am quite unable to extract enough information from my reading of the `interface3` documentation to write the layer that will use the data extracted by `\SplitArgument` and put them where I need them. The code below I hope is self-explanatory; it compiles for `\myNinePerm` but does not compile for `mynPerm` for obvious reasons. I am sure an answer to my problem would not only be a great help to me but serve all newcomers to TeX and LaTeX3 as a welcome practical example.               %document name: LaTeX3_xparse2.tex     %RN 16/3/2012     %COMMENTS:      %   OBJECTIVE: Want to populate an nxn matrix by passing its elements separated by semicolons     %   as a single argument rather than by passing them individually (which poses the restriction      %   to 3 x 3 matrices since LaTeX3 imposes the same maximum number of arguments, 9, as does      %   LaTeX2). LaTeX3 and one or other of the argument processors in xparse, for instance      %   \SplitArgument will to the job, but once again, due to the lack of at least one concrete      %   example, I cannot get the syntax right, especially for the internal function!      %   APPROACH:      %   (1) Have a simple function, call it \myNinePerm which displays a permutation of a 9-set      %   as a 2 x 9 matrix with the top row showing the elements of the set in natural order and      %   row 2 allowing the user to plug in their images under the mapping as individual arguments      %   by passing the values as arguments(the LaTeX2 approach);     %   (2) rewrite this same function by passing a single argument which contains the values      %   separated by some token, for example a semi-colon. The restriction to nine elements is no      %   longer relevant, but is maintained in order to avoid clouding the issue.     %==============================================================================================     \documentclass{article}     %\usepackage{expl3}     \usepackage{amsmath,xparse}           \ExplSyntaxOn      \NewDocumentCommand{\myNinePerm}{ m m m m m m m m m }      {          {\begin{pmatrix}          1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 \\         #1 & #2 & #3 & #4 & #5 & #6 & #7 & #8 & #9          \end{pmatrix}}      }     \ExplSyntaxOff           \ExplSyntaxOn      \NewDocumentCommand{\mynPerm}{ m }      { > { \SplitArgument { 8 } { ; } } m }     % assuming that the argument now contains nine values, how do I move these values to     % occupy the second row in the matrix below?         {          {\begin{pmatrix}          1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 \\     %   <val 1>&<val 2>&<val 3>&<val 4>&<val 5>&<val 6>&<val 7>&<val 8>&<val 9>          \end{pmatrix}}      }     \ExplSyntaxOff           \begin{document}     $\myNinePerm{9}{8}{7}{6}{5}{4}{3}{2}{1}$\\     $\mynPerm{{9;8;7;6;5;4;3;2;1}}$\\     \end{document}


title: Digits from an other font

text: In a book that I'm currentlry rewriting they use special digits for numbers. Although I searched for this shape in Tex Font Catalogue I didn't find exactly matching shape of digits. The only thing similar was antiqua fraktur for 2. Do you know a latex font which has these shapes of digits? ![strange digits](http://i.stack.imgur.com/miGPn.png) Can I use only digits from other font in the whole document?


title: How to embed page navigation links on every page?

text: I need to put some of the items in Acrobat menu in the margin of every page of my document. I wonder if it can be done using, say, TikZ.


title: Error when using \bm in *numbered* section title, when hyperref is loaded

text: I am getting an error when I use the command `\bm` in a section title that is numbered, when the package `hyperref` is loaded. Here is the error: > ERROR: TeX capacity exceeded, sorry [input stack size=5000]. > > \--- TeX said --- to be read again>   >  { l.10 ...ction{A proof of convexity in $p,\bm{w}$} and here is the MWE               \documentclass{article}     \usepackage{bm}       \usepackage[bookmarks]{hyperref}          \begin{document}     \section{A proof of convexity in  $p,\bm{w}$}     \end{document}      Note that I can get avoid the error if I do any of the following   * use `\section*` instead of `\section` (and this really intrigues me!)   * remove the `\bm{}` from the title   * remove the package `hyperref` I noticed there is a question similar to mine (such as this) but the solution seems not to be related to my problem. Does anyone know how to solve this?


title: How can I add size of Tikz drawing into size of equation?

text: This is slightly modified code from Frédéric's answer to How can I add clips above matrix?               \documentclass{mwrep}        \usepackage{amsmath}         \usepackage{tikz}     \newcommand{\tikzmark}[2]{\tikz[overlay,remember picture,baseline] \node [anchor=base] (#1) {$#2$};}     \usetikzlibrary{decorations.pathreplacing}       \begin{document}     Lorem ipsum dolor sit amet, consectetur adipisicing elit. Proin nibh augue, suscipit a, scelerisque sed, lacinia in, mi.     \begin{equation}     \bar{P}=     \bordermatrix{ \mathrm{state} &   \tikzmark{left}{1} &   \tikzmark{right}{2}  \cr                 1 & 0.3 & 0.1  \cr                 2 & 0.3 & 0.2}     \end{equation}     \tikz[overlay,remember picture]{\draw[decoration=brace,decorate,blue] (left.north west) -- (right.north east) node[midway,above=15pt] {$S_1$};}     \end{document}      As you can see, the blue part is drawn on the text. This happens because LaTeX don't count it into size of equation. How can I do this?   I set `above=15pt` on purpose so the effect is more visible.


title: Calligraphy question

text: Could anyone let me know if this could be done using LaTeX? And if so, how do we do that? ![enter image description here](http://i.stack.imgur.com/DVPUh.jpg)


title: How to change the font of percent signs?

text: In my document below, I would like to change the font of all percent signs to the font of the attached image. How can I do it?   BTW, I'm using XeLaTeX on TL2012.   ![enter image description here](http://i.stack.imgur.com/lBRlb.png)               \documentclass{article}     \begin{document}     \texttt{\%}     \[     \%     \]     \begin{tabular}{c}     $\%$      \end{tabular}      \end{document}


title: How to recreate the following table in LaTeX similarly?

text: The following is the original table ![original](http://i.stack.imgur.com/ZHrnM.png) and I have the following code               \begin{table}     \caption{February}     \begin{center}     \begin{tabular}{c|c|c|c|c|c|c}          \hline     M & T & W & Th & F & S & Su\\     \hline      & C & &&C&C&\\      \hline      & C & &C&C&& \\      \hline      & C&&&C&C&C \\      \hline      & C & & &C & C & \\      \hline     \end{tabular}     \end{center}     \end{table}               \begin{table}     \caption{March}     \begin{center}     \begin{tabular}{c|c|c|c|c|c|c}          \hline     M & T & W & Th & F & S & Su\\     \hline      & C & C&C&C&C&\\      \hline      & C & &C&&& \\      \hline      & C&C&&C&C& \\      \hline      & C &C & &C & C & \\      \hline      & C& &\\      \hline     \end{tabular}     \end{center}     \end{table}      which produces the following: ![enter image description here](http://i.stack.imgur.com/x2h01.png) How do you make it so that   1. the tables are side-by-side?   2. the header is colored   3. and only three cells in the last row of the march is bordered?


title: latex compiler become slower when adding graphics in pdf format

text: I have many graphs in my document, according to my information it is best to include graphics in PDF format because it is a vector format and gives better results. so i have added all the graphics in pdf format. But now i am facing problem that latex compiler has become much slower even if include only a selected chapter for compilation. furthermore, sometimes i am unable to see the added graphics in final output file. your expert opinion in this regard is awaited.


title: How can I place an image in a marginpar and make it position itself according to the top of the image

text: As demonstrated by the following MWE, I've placed a simple image in the margin of a document. What appears to happen is the caption text is vertically aligned with the line that I type the `\marginpar` command on, and the image sits above it. Is there any way I can make the top of the image be in line with the line of text in the body where I include the `\marginpar` command? I need to be able to do this to accurately have an idea where images are going to appear when I typeset a textbook I'm making. Thanks Please don't mind the incredibly not straight line I tried to draw to emphasize my point. ![enter image description here](http://i.stack.imgur.com/5HzdT.png)               \documentclass{report}     \usepackage{caption}     \usepackage{graphicx}          \begin{document}       \chapter{test}       This is a test.\marginpar{         \includegraphics[width=\marginparwidth]{resources/Georg_Cantor2.jpg}         \captionof{figure}{Georg Cantor (1845-1918) was a German mathematician, best known as the inventor of set theory, which has become a fundamental theory in mathematics.}}     \end{document}


title: Is there a way of defining a command which is automatically converted to a no-op after its first execution?

text: **Is there a way of defining a command that can be executed only once and is then redefined to be a no-op?** Related:   * Is there a way of defining a command \nullifyifmoved{arg} that will normally act like its argument but act like a no-op if the macro is “moved”?   * Macro to be used in a \section command that has no effect in the table of contents


title: Appendices formatting/ Text displayed by reference

text: I want to obtain toc and text formatting as shown in MWE.                \documentclass[12pt,a4paper]{article}      \usepackage[a4paper]{geometry}      \usepackage{polyglossia}      \setdefaultlanguage{polish}      \usepackage[titles]{tocloft}           \makeatletter         \renewcommand{\numberline}[1]{%         \@cftbsnum #1\@cftasnum~\@cftasnumb%      }          \begin{document}          \newpage     \tableofcontents          \newpage     \section{Section 1}     bla bla \ref{app2} bla.          \subsection{Subsection 1}     \newpage          \appendix         \addcontentsline{toc}{section}{Appendices}              \section*{Appendices}         \renewcommand{\thesubsection}{Appendix \Alph{subsection}.}         \renewcommand{\theparagraph}{\Alph{subsection}}              \subsection{Description.}         \label{app1}              \subsection{Description.}         \label{app2}          \end{document}      But in section 1, I don't want to get "bla bla Appendix B. bla.", but: "bla bla B bla." (In polish due to declination I can't use header "Appendix B" in text.) So, to solve my problem I can find how to:   1. get only number from Appendix.   2. make header "Appendix X. Description." without using:                \renewcommand{\thesubsection}{Appendix \Alph{subsection}.}      In both ways I failed.


title: \listings code style for HTML5 (CSS, HTML, JavaScript)

text: I would like to create a code style for HTML5 that can be used with the `\listings` package. An HTML5 document consists of three languages: CSS, HTML and JavaScript. That makes the whole thing a bit more complicated, because one can only define a keyword field for three languages. I oriented myself on the style of the NetBeans IDE (Screenshot). I have come very far. Nevertheless, there are some problems ... ![enter image description here](http://i.stack.imgur.com/RDDSO.png) **Bug #1** The keyword `canvas` occurs both as an HTML tag and a variable. I want the HTML tag to be blue but not the JavaScript variable within the `<script>` block. **Bug #2** Because I make blue slashes for the ending HTML tags, the forward slashes in my JavaScript texts also get blue. **Missing Feature #3** Identifiers (#square, .box) in the CSS code are not green. Can anyone help me to solve these problems? I don't want to use `\minted` because I've got already a lot of code with `\listings` in my documents. I have also created a minimal working example:               \documentclass{scrreprt}     \usepackage{color}         \definecolor{lightgray}{rgb}{0.95, 0.95, 0.95}         \definecolor{darkgray}{rgb}{0.4, 0.4, 0.4}         \definecolor{purple}{rgb}{0.65, 0.12, 0.82}         \definecolor{ocherCode}{rgb}{1, 0.5, 0} % #FF7F00 -> rgb(239, 169, 0)         \definecolor{blueCode}{rgb}{0, 0, 0.93} % #0000EE -> rgb(0, 0, 238)         \definecolor{greenCode}{rgb}{0, 0.6, 0} % #009900 -> rgb(0, 153, 0)      \usepackage{upquote}     \usepackage{listings}     \makeatletter     \lstdefinelanguage{HTML5}{         sensitive=true,         keywords={%         % JavaScript         typeof, new, true, false, catch, function, return, null, catch, switch, var, if, in, while, do, else, case, break,         % HTML         html, title, meta, style, head, body, script, canvas,         % CSS         border:, transform:, -moz-transform:, transition-duration:, transition-property:,         transition-timing-function:         },         % http://texblog.org/tag/otherkeywords/         otherkeywords={<, >, \/},            ndkeywords={class, export, boolean, throw, implements, import, this},            comment=[l]{//},         % morecomment=[s][keywordstyle]{<}{>},           morecomment=[s]{/*}{*/},         morecomment=[s]{<!}{>},         morestring=[b]',         morestring=[b]",             alsoletter={-},         alsodigit={:}     }     \lstset{%         % Basic design         backgroundcolor=\color{lightgray},         basicstyle={\small\ttfamily},            frame=l,         % Line numbers         xleftmargin={0.75cm},         numbers=left,         stepnumber=1,         firstnumber=1,         numberfirstline=true,         % Code design         identifierstyle=\color{black},         keywordstyle=\color{blue}\bfseries,         ndkeywordstyle=\color{greenCode}\bfseries,         stringstyle=\color{ocherCode}\ttfamily,         commentstyle=\color{darkgray}\ttfamily,         % Code         language={HTML5},         tabsize=2,         showtabs=false,         showspaces=false,         showstringspaces=false,         extendedchars=true,         breaklines=true     }     \makeatother     \begin{document}         \begin{lstlisting}     <!DOCTYPE html>     <html>       <head>         <title>Canvas-Rotation</title>         <meta charset="UTF-8" />         <style>           #square {             border: 1px solid black;                     transform: scale(10) rotate(3deg) translateX(0px);                     -moz-transform: scale(10) rotate(3deg) translateX(0px);           }                      .box {                                   transition-duration: 2s;                     transition-property: transform;                     transition-timing-function: linear;           }         </style>       </head>       <body>         <canvas id="square" width="200" height="200"></canvas>         <script>                 var canvas = document.createElement('canvas');                 canvas.width = 200;                 canvas.height = 200;                      var image = new Image();                 image.src = 'images/card.png';                 image.width = 114;                 image.height = 158;                 image.onload = window.setInterval(function() {                     rotation();                 }, 1000/60);        </script>       </body>     </html>         \end{lstlisting}     \end{document}      I know that the task is pretty tough! But maybe we can do that collectively? An HTML5 code formatting could be used universally. P.S. I have read that there are commands like `usekeywordsintag` and `tagstyle`. But everytime I want to use them I get the error:               ! Package keyval Error: tagstyle undefined.


title: Use cite in gnuplottex key

text: I am using the gnuplottex package to create plots with gnuplot from inline gnuplot code in my LaTeX documents. I am using `pdflatex` directly to get PDFs. I would like to be able to use the `\cite` command within the gnuplottex instructions. I want to have the citations formatted the same way they are in the rest of my document. This example illustrates what I would like to do: > plot "data.csv" using 1:2 with lines title "\citet{Papale2006}" Any ideas how this could be achieved? **Update** : I am using the pdf terminal for gnuplottex.


title: Placing images left and right of each other

text: I want to create the following layout:                ------------                                                                  -------------     |   IMAGE 1  |                                                                |   IMAGE 2   |     |____________|                                                                |_____________|      Notice that the two images are relatively small in size, but I want them to be placed at the right/leftmost edge of the document. I tried it using minipages like this:               \begin{minipage}{4cm}         \includegraphics[width=4cm]{image1.eps}     \end{minipage}          \begin{minipage}{4cm}         \begin{flushright}             \includegraphics[width=4cm]{image2.eps}         \end{flushright}     \end{minipage}      But then, the two images are placed like this:                ------------     |   IMAGE 1  |     |____________|           -------------     |   IMAGE 2   |     |_____________|      I fooled around with the values of minipage and image-width, but nothing seems to help... Edit: Also, I need the images to be centered to each other (horizontally speaking), so they are nicely aligned if one is bigger than the other.


title: lcdf typetools- kpathsea library not found

text: I am not sure this is the right place, but considering that involves a tex- based library, I hope so. I am on ubuntu 14.04, texlive 2014 manually installed (on `/media/pierpaolo/Seagate/texlive_linux/bin/x86_64`) I am trying to install lcdf typetools to install Minion Pro font. As per instructions, running the file ./configure, I got the following error:               [...]     checking kpathsea/kpathsea.h usability... no     checking kpathsea/kpathsea.h presence... no     checking for kpathsea/kpathsea.h... no     checking for kpse_set_program_name in -lkpathsea... no     configure: error:      =========================================          I can't find the kpathsea library and/or header files. Tell me where to look     using the --with-kpathsea=PREFIX option (header files should be under     PREFIX/include/kpathsea, and library under PREFIX/lib), or disable support     using --without-kpathsea.      kpathsea commands like kpsewhich are obviously present and working, but where library and header files are? Are they present at all?


title: How to enumerate subsections

text: Can anyone tell me how to enumerate `\subsection`s? For example:               \subsection{Double-space a file.}     ...     \subsection{Triple-space a file.}     ...      I want this to look like:               1.1 Double-space a file.     ...     1.2 Triple-space a file.     ...      At the moment I only get this:               Double-space a file.     ...     Triple-space a file.     ...


title: Table Occupies all text area

text: How can I do this in an easy way using pstricks or tikz , i cant put the text in the right place ![enter image description here](http://i.stack.imgur.com/dzU32.png) my MWE               \documentclass[a4paper]{article}     \usepackage[margin=1.5cm]{geometry}     \usepackage[x11names]{xcolor}     \usepackage{fancyhdr}     \usepackage{pstricks,pstricks-add,graphicx}     \pagestyle{fancy}     \renewcommand{\headrulewidth}{0pt}     \renewcommand{\baselinestretch}{1.3}     \setlength{\parindent}{0cm}     \psset{linecolor=red}     \begin{document}     \psframe(-0.2,1.1)(1.007\textwidth ,-\textheight)     \psline{}(-0.2,-2)(1.007\textwidth ,-2)     \psline{}(0.5\textwidth ,1.1)(0.5\textwidth ,-2)          \begin{minipage}[t]{0.48\textwidth}          \end{minipage}     \hfill     \begin{minipage}[t]{0.48\textwidth}          \end{minipage}          \psline{}(-0.2,0)(1.007\textwidth ,0)     \psline{}(-0.2,-1)(1.007\textwidth ,-1)     \psline{}(0.65\textwidth ,0)(0.65\textwidth ,-21.3)          %===================================================     \begin{minipage}[t]{0.64\textwidth}          \end{minipage}     %===================================================     \hfill     %===================================================     \begin{minipage}[t]{0.3\textwidth}          \end{minipage}     %===================================================     \end{document}


title: How to create extensions for LaTeX?

text: I want to create extensions in LaTeX. What I really want to do is be able to write `\myOwnCommand` and have something happen to it, like a new class and functions in programming. It would be great to write the instructions of a game, for example `\dice3` and have a little image of a dice and the face with three dots appear. I have seen people using `\newcommand{\XXXXXXX}{XXXXXX}`, but i'm not sure how to actually do it.


title: Page abstract in the end of my document

text: \begin{document}     \include{Introduction}     \include{Chapter1}     \include{Chapter2}     \bibliographystyle{plain}     \bibliography{biblio}     \include{Abstract}     \end{document}      I have a question: I added the abstract in my document as shown before, but I'd like that the abstract page has no number; however, the header "Bibliographie" appears in this page. How can I remove it?


title: Define a macro for inserting a \begin \end listings block

text: Can you define a macro that would take a `listings` code as a parameter and insert it inside a `\begin{lstlistings} \end{lstlistings}` block? My idea is something like this:               \def\blist#1{\begin{lstlisting} #1 \end{lstlisting}}      so I could just write               \blist{ "this code is inside listings block" }


title: Expand citations with bibtex or disable nested citations

text: I am writing a paper like the following one, and bibtex creates cites inside of cites:               \documentclass{article}     \begin{document}          cite1~\cite{abc:oopsla2005}      cite2~\cite{martinAl:oopsla2005}          \bibliographystyle{plain}     \bibliography{bib,crossref}          \end{document}      Where bib.bib contains:               @InProceedings{martinAl:oopsla2005,     author = {Michael Martin and Benjamin Livshits and Monica S. Lam},     title = {Finding application errors and security flaws using {PQL}: a program query language},     crossref = {oopsla2005},     pages = {365--383},     }      and crossref contains:               @Proceedings{oopsla2005,     key = {OOPSLA 2005},     booktitle =  {Proceedings of the 20th {ACM SIGPLAN} Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA 2005)},     title =      {Proceedings of the 20th {ACM SIGPLAN} Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA 2005)},     year =      2005,     address =      {San Diego, California, USA},     month =        oct,     publisher =     acm,     note =         sigplan # {, 40(11)}            }      So, when I create the pdf file, I get: > [1] M. Martin, B. Livshits, M. S. Lam, Finding application errors and > security flaws using PQL: a program query language, in: **[3]** , pp. > 365–383. ACM SIGPLAN Notices, 40(11). > > [2] C. Allan, P. Avgustinov, A. S. Christensen, L. Hendren, S. Kuzins, O. > Lhot ́ak, O. de Moor, D. Sereni, G. Sittampalam, J. Tibble, Adding trace > matching with free variables to AspectJ, in: **[3]** , pp. 345–364. ACM > SIGPLAN Notices, 40(11). where [3] is: > [3] OOPSLA 2005, Proceedings of the 20th ACM SIGPLAN Conference on Object- > Oriented Programming Systems, Languages and Applications (OOPSLA 2005), ACM > Press, San Diego, California, USA, 2005. ACM SIGPLAN Notices, 40(11). I would like to extend cites 1 and 2 to show the full content of these references. If I can show full references, I expect Latex/Bibtex removes reference 3. Is it possible to set some parameters in Latex to achieve my goal? (I cannot use a line command option because my Latex file is compiled in the journal server) In other words, I just want to get: > [1] M. Martin, B. Livshits, M. S. Lam, Finding application errors and > security flaws using PQL: a program query language, in Proceedings of the > 20th ACM SIGPLAN Conference on Object-Oriented Programming Systems, > Languages and Applications (OOPSLA 2005), ACM Press, San Diego, California, > USA, 2005. ACM SIGPLAN Notices, 40(11). > > [2] C. Allan, P. Avgustinov, A. S. Christensen, L. Hendren, S. Kuzins, O. > Lhot ́ak, O. de Moor, D. Sereni, G. Sittampalam, J. Tibble, Adding trace > matching with free variables to AspectJ, in Proceedings of the 20th ACM > SIGPLAN Conference on Object-Oriented Programming Systems, Languages and > Applications (OOPSLA 2005), ACM Press, San Diego, California, USA, 2005. ACM > SIGPLAN Notices, 40(11).


title: Add the title 'Appendices' to the top of the page containing appendices

text: I want to have the word 'Appendices' at the top of the page containing appendices. I have two columns of text, and there are various appendices labelled 'A title here', 'B title here', etc. I want to have a simple main-title on the top of these that simple reads 'Appendices' (in slightly bigger font.               \documentclass[twocolumn]{article}          \begin{document}     Refer to Appendix~\ref{append_a}.               \clearpage     \appendix     %% I want to have something here like \title{appendix}     \section{The first appendix}     \label{append_a}     Text here          \end{document}


title: Dynamic Tables from Data Array

text: I have Data like that: ![Data](http://i.stack.imgur.com/Fw3YG.png) Now i want to create that Table a bit Dynamic, I searched for Dynamic LaTeX Tables but only found Things for Excel and CVS. (And I dont have any of that formats…) Does someone know any Package or something? I don't want to write all that by hand… The Data is a Value in Hex and a Background Color for the Table.


title: How to suppress references to appear in top navigation bar?

text: In my beamer template, I cannot see the references section in the table of contents, but it automatically inserts that element in the top bar, with the command `\insertsectionnavigationhorizontal`. As shown it does not fit to the top bar so I just want to suppress it. ![References section gets out of document](http://i.stack.imgur.com/BZOTc.png) I use _natbib_ package and my reference frame looks like this:                 \begin{frame}       \frametitle{}       \framesubtitle{}       \begin{thebibliography}{9}       \beamertemplatearticlebibitems       \bibliographystyle{abbrv}       \end{thebibliography}       \end{frame}       \end{document}      **Edit:** it does not appear in outline frame (TOC).


title: Problems with counters and frame splitting commands and environments in beamer

text: Using the package `gb4e` for linguists in the `beamer` environment in combination with frame splitting commands `\pause` or environments `overprint`, I face the following problem: The number are "jumping" strangely. The same happens when I use the `beispiel` environment (see below) in combination with `\pause` command or the splitting environments. Therefore, I believe, that it is a general problem of a certain kind of counters with these commands and environments. My question is: How do I avoid this odd jumping behaviour? (In regard to the `gb4e` based environment the answer is more important. The other I just provided to show the general nature of this problem. However, I would like to see a possible solution here as well, to get a deeper understanding of LaTeX.)               \documentclass{beamer}     %\usetheme{Bergen}          \usepackage[ngerman]{babel} %dt. Silbentrennung     \usepackage[applemac]{inputenc}            \usepackage{gb4e}            \newcounter{beispz} %Beispiele mit durchgehender Nummerierung und  in italics     \newenvironment{beispiel}         {\stepcounter{beispz}         \begin{enumerate}\item[(\arabic{beispz})]\linespread{1}\em}         {\end{enumerate}} %\label{\stepcounter{beispz}}          \begin{document}          \begin{frame}     \begin{exe}     \ex Du bist mir ein feiner Freund!\pause     \ex A: Wie viele Einwohner hat New York?     \end{exe}     \end{frame}          \begin{frame}     \begin{beispiel} asdfas\end{beispiel} \pause          \begin{beispiel} hand\end{beispiel}     \end{frame}          \end{document}      Remark: Werner gave a possible solution. It involves manually setting the counter number by adding `\addtocounter{}{+previous no}` in front of the counting environment and using `\addtocounter{}{-last no}` in the end of the environment (see below). For example: `\begin{beispiel}a\end{beispiel}\pause \begin{beispiel}b\end{beispiel}\addtocounter{beispz}{-2}\pause.` It works. But As you can imagine, it involves a great deal of manual work if you are preparing a larger document. Therefore, I would like to ask if there is anyone out there who knows a solution that needs considerably less effort.


title: biblatex: per-entry language switching

text: According to `biblatex` manual (p.24), the hyphenation field in a bib-entry switches language on per-entry basis: > `hyphenation` field The language of the bibliography entry. The identifier > must be a language name known to the babel package. This information may be > used to switch hyphenation patterns and localize strings in the > bibliography. This functionality seemed to not work. I just used an example of bib base that comes with `biblatex` documentation to print the entire bibliography.               \documentclass[a4paper]{article}     \usepackage[T1]{fontenc}     \usepackage[german,american]{babel}     \usepackage{csquotes}     \usepackage[style=numeric,backend=biber]{biblatex}     \addbibresource{biblatex-examples.bib}     \begin{document}     \nocite{*}     \printbibliography     \end{document}      The bibliography contains few entries in German. However in the printed list of references they are formatted with english strings. > [8] Averroes. Drei Abhandlungen über die Conjunction des separaten > Intellects mit dem Menschen. Von Averroes (Vater und Sohn), aus dem > Arabischen übersetzt von Samuel Ibn Tibbon. Ed. and trans. by J. Hercz. > Berlin: S. Hermann, 1869. Per-entry language switching is provided by the GOST bundle of bst style for BibTeX. Looking through `biblatex` internal code, I've got an impression that `biblatex` needs major re-implementation in order to provide similar functionality. Or am I wrong?


title: Define new hyphenation

text: I want to define hyphenation for a word I have somewhat created. I have a word that I have hyphenated like               com\-.puppy\-crawl\-.tools\-.check\-style\-.api      The thing is that every time I want to use that word I have to write everything, including the `\-`. Is there a way for me to define hyphenation for a word and be able to use it through out the document?


title: Natbib and Chicago

text: What's the quickest way to adopt the Chicago style for the bibliography (assuming `natbib` is used)?


title: Vertical alignment of image in multirow column in tabularx at the top of the cell?

text: I want to place an image with `includegraphics` in a `multirow` table cell in a `tabularx`, and it shall be vertically aligned with the top of the cell. Example with a `rule` instead of the image:                   \documentclass[11pt, a4paper]{scrartcl}     \usepackage[ngerman]{babel}     \usepackage[latin1]{inputenc}     \usepackage[TS1, T1]{fontenc}     \usepackage{tabularx}     \usepackage{multirow}          \begin{document}               \begin{tabularx}{\textwidth}{@{}p{3cm} X r}  \hline     \multicolumn{2}{@{}l}{{\huge{}My Beautiful Text}} &      \multirow{4}{*}{\rule{4cm}{6.5cm}%\includegraphics[height=6.5cm]{../../../2012_Bewerbungsfotos/2012-01_MB_Bewerbungsfoto_col.jpg}     }\\[24pt]     a & b\\[6pt]     a & b\\[6pt]     a & b\\[6pt]     a & b\\[6pt]     a & b     \end{tabularx}          \end{document}      Screenshot of PDF: ![enter image description here](http://i.stack.imgur.com/kiwVO.png) How can I place the image directly at the `\hline` (identical with the top of the line where multirow is defined)? **EDIT** to explain my "real" purpose:   * In the real document, there is no `hline` at the top of the `tabularx` (I only added the `hline` to better view the top of the cells),   but I'd like the inserted image to be aligned with the top of the text, as it does not look good IMHO if the image which spans over the whole height of the table starts below the text.   (the original document contains personal data, so I tried to construct an artificial minimal example.)   * the first line of the table is the only one with `huge` font size (heading), all the others are normalsize.  *


title: How do I remove keywords in package listings?

text: Sure enough, there is a `morekeywords` option, but suppose I need to remove some? A case in point is Pascal, in which Writeln is not (strictly speaking) a keyword, but rather a predefined procedure. I know I can redefine the style, but I am in the search for a better way.


title: Align and sub-indexes.

text: Consider               \begin{align}     u_j &= x\\     v &= x     \end{align}      Compiling this the $=$'s are going to be aligned, but the $v$ gets aligned to the end of the $u_j$, which is a bit beyond the end of the $u$ because this has a sub-index. **Question:** Is there a robust way of correcting this?


title: How can I apply different custom caption styles to different listings?

text: In the MWE below, is it possible to define different caption formats for the two listings? In the example the first listing should use a blue caption background (like it is now) while the second should be red. However, in general I want to be able to have completely different captions on different listings, for example some listings will have captions above while some will have captions below. It seems like `captionsetup` is a global option, and I can find no documentation on how to apply it only to a single or group of listings.               \documentclass{article}     \usepackage[svgnames]{xcolor}      \usepackage{caption}     \usepackage{listings}     \usepackage{calc}      \lstdefinestyle{outline}{              basicstyle=\scriptsize\ttfamily,              numberstyle=\tiny,              numbersep=5pt,              tabsize=2,              extendedchars=true,              breaklines=true,              keywordstyle=\color{blue},              frame=b,              stringstyle=\color{green!40!black}\ttfamily,              showspaces=false,              showtabs=false,              numbers=left,              xleftmargin=17pt,              framexleftmargin=17pt,              showstringspaces=false,              backgroundcolor=\color[RGB]{200,200,200},              belowcaptionskip=-1pt     }          \DeclareCaptionFont{white}{\color{white}}     \DeclareCaptionFormat{listing}{\colorbox[RGB]{60,100,180}{\parbox{\textwidth - 2 \fboxsep}{\hspace{14pt}#1#2#3}}}     \captionsetup[lstlisting]{format=listing,labelfont=white,textfont=white, singlelinecheck=false, margin=0pt, font={bf,footnotesize}}          \begin{document}     \begin{lstlisting}[style=outline,caption=Blue]     This should have blue caption.     \end{lstlisting}          \begin{lstlisting}[style=outline,caption=Red]     This should have red caption.     \end{lstlisting}     \end{document}


title: Texmaker build problem. Can't generate new pdf

text: I have installed `texmaker` (version:4.0.3) and it worked for some test file. But when I tried to run a predefined template, texmaker can't generate the changed pdf (it shows the old pdf). So I checked out the log and found an error               Package epstopdf Warning: Drivers other than `pdftex.def' are not supported.          )) (/usr/share/texlive/texmf-dist/tex/latex/subfigure/subfigure.sty     ****************************************     * Local config file subfigure.cfg used *     ****************************************     (/usr/share/texlive/texmf-dist/tex/latex/subfigure/subfigure.cfg))     (./booktabs.sty) (./rotating.sty     (/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty)) (./listings.sty     (/usr/share/texlive/texmf-dist/tex/latex/listings/lstmisc.sty          ***     *** This file requires `listings.sty' version 1.5.     *** You have a serious problem, so I'm exiting ...     ***      `texlive-latex-recommended` and `texlive-latex-extra` both packages are already installed. Also `/usr/share/texlive/texmf- dist/tex/latex/listings/listings.sty` file is available. System:               Ubuntu 13.10 64bit      What is the problem? What am I missing?


title: Vertical spacing in matrix environment : how can I have the same?

text: Here's my problem : I'm trying to write a Jacobian matrix as a product of two other's, but the result is wrong because they don't have the same height. Here's my code :               \documentclass[11pt]{book}     \usepackage{amsmath}     \begin{document}          \begin{align*}        Jac(f \circ \varphi)_{x_0} =& Jac(f)_{\varphi(x_0)} Jac(\varphi)_{x_0} \\        =& \begin{pmatrix}          \frac{\partial f}{\partial x}(r \cos(\theta), r \sin(\theta)) \\          \frac{\partial f}{\partial y}(r \cos(\theta), r \sin(\theta))        \end{pmatrix} \begin{pmatrix}          \cos(\theta) & -r \sin(\theta) \\          \sin(\theta) & r \cos(\theta)        \end{pmatrix}      \end{align*}     \end{document}      I'd like not to use tricks as /em. Would you have a solution ? Thanks !


Here is the photo. How to write conditional equations with one-sided curly bracket in TeXmacs? ![enter image description here](http://i.stack.imgur.com/oS5hB.png) I tried inserting Equation and Equations. I didn't manage to insert the curly bracket.   In LaTeX, it's like:               \documentclass{article}     \usepackage{amsmath}          \begin{document}     \[         f(x)=      \begin{cases}         \frac{x^2-x}{x},& \text{if } x\geq 1\\         0,              & \text{otherwise}     \end{cases}     \]     \end{document}


title: framed or colored box with text and margin notes

text: I am using pdfTeX and I have in my text an example which just is a kind of a short story. What I want is:   1. The story should be visually distinct from the normal text, by frame or background colour.   2. I would like to place margin notes like note 1, note 2 beside that story so that I can refer to them later. These notes are part of the story, so inside frame or with the same background colour.   3. Ideally, I would like latex to make the label and reference from and to these notes but as the number of notes is rather small I guess I could do that by hand. I would like to use the `tcolorbox` package perhaps with the `marginnote` package but I can't get them do what I want. Also looked at `minipage` but no success either. I added an example how it almost should look like, only the step's in the margin should get inside the box.               \documentclass[12pt]{article}     \usepackage[many]{tcolorbox}     \usepackage{marginnote}     \usepackage{lipsum}     \tcbuselibrary{skins,breakable}     \newtcolorbox{story}[1][]{       enhanced,       breakable,       pad at break=2mm,       left=2mm,right=30mm,       colback=white,colframe=black!50!yellow,       drop fuzzy midday shadow=black!50!yellow,        width={0.95\textwidth},        frame hidden,        segmentation hidden,       before=\par\vspace*{2mm},after=\par\bigskip,       title=#1}%                    \begin{document}     \lipsum[1]     \begin{story}[Some story]     Some text comes\footnote{a footnote} here just\marginnote{1. step} for demo.     \lipsum[1]     \end{story}     \lipsum[1]     \end{document}


title: longtable wrong caption

text: What is the right way to put the caption with `longtable`? My numbering starts at 2 and I don't have nested tables. This is corrected if I put `\caption{Bla}` before `\end{longtable}`, but it will always insert the caption before the last horizontal line of my table.               \begin{longtable}{ccccc}     \toprule     1&2&3&&\\     \midrule     \endfirsthead          \toprule     1&2&3&&\\     \midrule     \endhead          \hline     \multicolumn{5}{r}{Continued on next page...}\\     \bottomrule     \endfoot     \bottomrule     \endlastfoot     8.8024  &8.8024 &8.8024 &7.2679 &1.3161e+01\\     %A lot more lines here.     9.0364  &9.0364 &9.0364 &7.2678 &1.4124e+01\\     \caption{Caption numbered as 1 but above horizontal line.}     \end{longtable}


title: Color highlighting text and environments in LyX

text: I am using LyX 2.0.5 with document class `article` and 'Theorems (AMS)' in the modules. I am wondering if it is possible to make it so that the titles of different environments will be highlighted in different colors ("highlighted" in the sense of a highlight marker. I.e., having a colored background, w/o changing the font color). E.g., in the `Theorem` environment the words **Theorem 12.1** will be typeset with red highlight, in the `Definition` environment the words **Definition 5.9** will be typeset with yellow highlight, etc. I am guessing the will require changing the module?


title: How can I easily draw gene regulation pathways in Latex?

text: It is very common in biology to draw diagrams like the one below to show regulatory interactions between genes: ![enter image description here](http://i.stack.imgur.com/oT81k.jpg) You can see that this is essentially a graph, with 3 key elements:   * Nodes, which can be gene names (eg. `lin-1`) or events (`vulval fates`).   * Positive (activating) edges, shown by arrows (often green), which indicate that a gene induces the other.   * Negative (inhibitory) edges, shown by stubbly lines (often red), which indicate that a gene represses the other. Sometimes, it may be necessary to make the edges very long or curved (when the two genes are far away). Occasionally, dotted or dashed edges can be used to show putative or proposed relationships. Arrows may sometimes point to _other arrows_ , eg. when a gene A enhances the ability of gene B to activate gene C. A slightly less trivial example: ![enter image description here](http://i.stack.imgur.com/QaN0u.jpg) The above is the bare minimum of what I want to do. Obviously, the layout of the graph is a whole different can of worms, but let's ignore that for now and assume that the user will manually layout the nodes. ## Extra credit It is possible to make such diagrams much more complicated, to emphasize nuances in manner of regulation (transcriptional, post-translational, localization, direct vs. indirect, etc). Here is a showcase of a proposed symbolic vocabulary from Kohn 2006. Here is another proposed vocabulary from Pirson 2000 and an example usage


title: TikZ nodes in pgfplots saved for later use, but locations mismatch

text: I really need a quick advice dealing with the answer given by sdaau. See this question. Actually I have a follow-up question regarding the given solution. This works actually pretty fine, but the coords are a little off. Please see the screenshot. I can't get any closer to the drawn points. I sureley wnt to draw from at the generated nodes directly. They ssem to be at the expected locations, as can be seen from the orange circles. What is wrong using this code (since it doesn't compile either right now, after setting up the MWE)?               % !TEX TS-program = pdflatex     % !TEX encoding = UTF-8 Unicode          \documentclass[tikz]{standalone}     \usepackage{pgfplots}     \pgfplotsset{compat=newest}     \usetikzlibrary{plotmarks, calc, intersections}     \usepackage{amsmath}          \begin{document}     \begin{tikzpicture}               \begin{axis}[%         width=10cm,         height=10cm,         axis x line = middle,         axis y line = middle,         scale only axis,         xlabel={x [mm]},         ylabel={y [mm]},         title={$\text{n}_{\text{iterations}}\text{= 2}$}     ]               \addplot+[       only marks,       mark=text,        text mark={\coordindex}, % empty for now; try also \coordindex       text mark as node=true,       text mark style={%         name=p\coordindex,         color=orange,         shape=circle,         draw,         inner sep=0pt,         minimum size=0pt,         align=center,         text width=5pt,         text depth=0pt       }     ]       table{%             0         0                -79.9393  236.8749            143.0014  350.0007           200.0014  350.0000           200.0008  300.0000         };         \pgfplotsextra{                           % In this case, you get the point that is <dimension> away from <p> on the straight line to <q>:  ($(p)!dimension!(q)$)             \path [name path=P--C-ext] (p0) -- ($(p1)!-50!(p0)$);             \draw (p0) -- (p1);             \path [name path=Rim] (p1.center) circle(50);             \path [draw, name intersections={of=P--C-ext and Rim}];                  \pgfmathanglebetweenpoints{%                     \pgfpointanchor{p1}{center}             }{%                     \pgfpointanchor{intersection-1}{center}             }             \let\myendresult\pgfmathresult                  \fill [fill=blue!50,draw=blue,thin,opacity=0.5] (p1) -- (intersection-1) arc [start angle=\myendresult,delta angle=-40,radius=50] -- cycle;             \fill [fill=blue!50,draw=blue,thin,opacity=0.5] (p1) -- (intersection-1) arc [start angle=\myendresult,delta angle=25,radius=50] -- cycle;         };          \end{axis}          \end{tikzpicture}          \end{document}      ![screenshot](http://i.stack.imgur.com/QkdK7.png)


title: TikZ/pgf: When using the `graphdrawing` library, can I draw an edge from a node, to the "edge node" of an edge?

text: Here's the working example I have been playing with:               \documentclass{standalone}          %======================================     \usepackage{tikz}     \usetikzlibrary{graphdrawing}     \usetikzlibrary{arrows}     \usetikzlibrary{graphs}     \usegdlibrary{force, layered, trees}     %======================================          \begin{document}              \tikz [spring layout, node distance=25mm]         {             \node (a) {a};             \node (b) {b};             \node (c) {c};                  \draw              (a) edge[->] (b)             (b) edge[->] (c)             (c) edge[->] (b.north);         }          \end{document}      I would like the edge from `c` to go to to the middle of the edge between `a` and `b`, however, my current attempt which tries to use `b.north`, does nothing -- it doesn't even draw an edge from `c` to anywhere else. Is there a way I can refer to "edge node" of an edge, in order to draw an edge to it?


title: thmtools: how to put xrefs in argument to thm environment?

text: I'm using thmtools for defining several environments for theorems, lemmas, etc. Among these is an environment for corollaries. (I give the full definition of this environment at the end of this post). I'm restricting the designation of corollaries to immediate consequences of earlier items that I want to be able to refer to, but for which, instead of proofs, I will just provide cross- references to whatever earlier items they follow immediately from. For example, if corollary III.4.5 is the immediate consequence of items I.2.3 and II.3.4, I want something like: > **Corollary III.4.5** (I.2.3 and II.3.4) **.** Foo is equivalent to bar. ⬜ To do this in a way most consistent with the typographic conventions used elsewhere in the document (with the parenthesized reference coming _before_ the period at the end of the corollary's head, as shown above), the thing to do is to use the built-in optional argument for theorem-like environments defined through thmtools' `\declaretheorem`. In fact, I do get the desired placement of the cross-references in the corollary's head if I specify something like               \begin{corollary}[some theorem and some definition]     Foo is equivalent to bar. \qed     \end{corollary}      This indeed compiles without any problem, but, of course, puts the string "(some theorem and some definition)" in the place where there should be proper cross references (as illustrated above): > **Corollary III.4.5** (some theorem and some definition) **.** Foo is > equivalent to bar. ⬜ But when I try to specify proper cross-references with:               \begin{corollary}[\ref{some theorem} and \ref{some definition}]     %% ...      ...I get the error               ! Missing \endcsname inserted.     <to be read again>                        \protect     l.345 ...{some theorem} and \ref{some definition}]          ?       Is there any way to protect the cross references so to avoid this error? (Edit: BTW, I get the same error even if I use `\MakeRobustCommand\ref` from the _makerobust_ package. FWIW.) PS: FWIW, below are the relevant definitions for the code shown earlier:               \def\qed{\hfill $\Box$}     \declaretheoremstyle[%       spaceabove=4ex%     ]{thmstyle}     \declaretheorem[%       name={Theorem},%       numberwithin=section,%       style=thmstyle,%     ]{thm}     \declaretheorem[%       name={Corollary},%       style=thmstyle,%       sharenumber=thm,%     ]{corollary}      EDIT BY LOCKSTEP: The following example works for me:               \documentclass{article}          \usepackage{amsthm}     \usepackage{thmtools}          \declaretheoremstyle[%       spaceabove=4ex%     ]{thmstyle}     \declaretheorem[%       name={Theorem},%       numberwithin=section,%       style=thmstyle,%     ]{thm}     \declaretheorem[%       name={Corollary},%       style=thmstyle,%       sharenumber=thm,%     ]{corollary}          \begin{document}          \section{foo}          \begin{thm}\label{a}     Some text.     \end{thm}          \begin{corollary}[\ref{a}]     Some text.     \end{corollary}          \end{document}      EDIT BY KJO: I copied and pasted lockstep's example, and ran it, but it does not work for me; the error I get is pretty much the same as the ones I got before:               ! Missing \endcsname inserted.     <to be read again>                        \protect     l.28 \begin{corollary}[\ref{a}]          ? x      I re-ran the same code after prepending the `\listfiles` command to it, and put the generated log file here. Please, let me know what other info I should post to zero in on the reason for this discrepancy.


title: Statweave output formating

text: I have managed to make `statweave` produce pdf, though not much what I want. How can I format the output of `statweave` to give what I want, for example:   1. Remove the source code   2. format tables   3. output selected column from stata tables.   4. is the formating of the statweave depend on the Latex? (e.g. tables)   5. Is there special edit in saving the swv file extensions


title: Any way to get neato-like node placement in a TikZ graph?

text: I'm interested in drawing molecular connectivity graphs in TikZ. Using `\node` and `child` without any positions I am able to draw a tree diagram which is semi-useful as I can easily illustrate the hierarchical relationships of the implied z-matrix. Here's an example for ethanol (CH3CH2OH) that I've been using in my dabblings.               \node[carbon] (C1) {C}     child {node [hydrogen] (H1) {H}}     child {node [hydrogen] (H2) {H}}     child {node [hydrogen] (H3) {H}}     child {node [carbon] (C2) {C}     child {node [hydrogen] (H4) {H}}     child {node [hydrogen] (H5) {H}}     child {node [oxygen] (O1) {O} child {node [hydrogen] (H6) {H}}}};     \draw [dashed] (H6) -- (H4);      A program like Graphviz, however, can take a similar graph and arrange the nodes automagically in a number of ways. The `neato` package in Graphviz can for instance arrange the nodes in a relaxed ball-and-spring fashion that is rather fitting for molecules. I've been looking through the TikZ documentation and have found mindmaps, petri nets, finite state automata, digraphs etc., however I have not seen any invocation of automatic layouts. Can it be done in TikZ?


title: Custom vertical page border

text: I wanted to have a vertical colored bar running on all my pages, to the left of the page, in between the beginning of the sheet and the beginning of the text. Something like:               |\|  text  |     |\|  text  |     |\|  text  |     |\|  text  |      where `\` is colored. Does anyone know if this is possible and how?


title: Alphabetic comparison of two strings

text: I tried to compare two strings (alphabetically), but I found some problems using the `\pdfstrcmp` command: 1- because it needs pdftex; 2- because it is case sensitive. The first problem is not so relevant, because I can use another compiler. However the second problem is complicated to me. In `\pdfstrcmd` command all lowercase chars in comparison with an uppercase char has the same answer. So I tried to use the comparison of chars using `\ifnum\uccode#1\uccode#2 (...)`, but the reply was `"! Improper alphabetic constant"` Is there anyone who knows a solution to this problem? My code:               \documentclass{article}          \newcounter{auxCountGetCharAt}          \makeatletter          \def\funcGetCharAt#1#2\relax{\stepcounter{auxCountGetCharAt}\edef\@tempb{\the\value{auxCountGetCharAt}}\ifx\@tempa\@tempb#1\else{\ifx\relax#2\relax\else\funcGetCharAt#2\relax\fi}\fi}          \def\getCharAt#1#2{%         \edef\@tempa{#2}%         \setcounter{auxCountGetCharAt}{0}%         \funcGetCharAt#1\relax%     }          \newcommand\compareChars[2]{\ifnum\uccode`#1>\uccode`#2 1\else{\ifnum\uccode`#1=\uccode`#2 0\else -1\fi}\fi}          \newcommand\compareStrings[2]{%         \def\@tempc{\getCharAt{#1}{1}}%         \def\@tempd{\getCharAt{#2}{1}}%         \compareChars{\@tempc}{\@tempd}%     }          \begin{document}          \compareStrings{abcdefg}{bcdefg}          \compareStrings{Abcdefg}{bcdefg}          \compareStrings{Bbcdefg}{acdefg}          \compareStrings{bbcdefg}{acdefg}          \compareStrings{bcdefg}{bcdeag}          \end{document}


title: Is there a way to fix a compability issue with beamer?

text: I compile a `beamer` presentation on my Mac, and everything works well, I get what I expect. However, when I try it on a linux machine, I get the following error:               ! Missing control sequence inserted.     <inserted text>                     \inaccessible     l.305 \end{frame}      Here is the `frame` around that line (i.e. that ends in line 305):                \begin{frame}      \frametitle{Probabilistic Grammars}           \textcolor{blue}{We treat them}           \begin{equation}         p      \end{equation}           \begin{itemize}      \item defined over a support       \end{itemize}           \textcolor{mygreen}{Example}      \end{frame}      Any idea what could be the problem?


title: Beamer itemize doesn't work

text: I have a document               \documentclass{beamer}          \usepackage[utf8x]{inputenc}     \usepackage[L7x]{fontenc}     \usepackage[lithuanian]{babel}     \usepackage{amsmath}          \begin{document}        \frame{         \frametitle{sample}         \begin{itemize}             \item A             \item B         \end{itemize}       }     \end{document}       It gives an error message               ! Corrupted NFSS tables.     wrong@fontshape ...message {Corrupted NFSS tables}                                                       error@fontshape else let f...     l.15   }      what's the problem?


title: Adding Tables to a Minipage Like Environment?

text: I'm trying to set up an environment to use for examples in my thesis document. I would like to increase margins, change the line spacing, open with "Example :", and close with $\Box$. Minipage works beautifully except I can't embed tables or figures within my examples. This is what I have:               \newcounter{examplecounter}     \newenvironment{example}     {     \vspace{1.75em}     \begin{center}         \begin{minipage}[h]{0.85\textwidth}             \setlength{\parindent}{2em}             \refstepcounter{examplecounter}             \begin{oneandahalfspaced}             \noindent             \textbf{Example \arabic{examplecounter}:}             }{             \hspace{-1em}             $\Box$             \end{oneandahalfspaced}         \end{minipage}     \end{center}     \vspace{1.75em}     } Any suggestions on how to accomplish what I'm looking for?


title: Is there a way to change styles in imported EPS files?

text: I know how to replace simple textual tags in imported EPS files using `psfrag`; but to ensure a consistent appearance for graphics in my documents, I would like to also be able to make substitutions to styles, particularly things like line weights and colors. Is there a way to do this, using either `psfrag` or some other technique? I understand that in principle, since the EPS is "just" text, I could write code to perform any arbitrary substitution; but that approach is complex and unstable. Moreover, since nearly all of the EPS files I will be using are exported from another tool, the details of generated EPS are not under my control and will likely change in the future (as they have in the past). I am particularly interested in what I can accomplish using Mathematica 8.0 as the source for my EPS files. For example, while I can use something like               plot1 = Plot[{Cos[t], Sin[t]}, {t, 0, 2 \[Pi]},        PlotStyle -> {Red, Green},       AxesLabel -> {"e", "s"}, Ticks -> {{}, {}}];     Export["plot1.eps", plot1];      in Mathematica to create an EPS file that I can then incorporate into my LaTaX document using               \psfragfig{plot1}{         \psfrag{e}{$\epsilon$}         \psfrag{s}{$\Sigma$}}      to perform simple textual substitutions, I don't see a way to use this technique to impose a uniform appearance on figures using something, like               \definecolor{tflcentralred}{RGB}{220,36,31}              \definecolor{tfldistrictgreen}{RGB}{0,114,41}     %...             \psfragfig{plot1}{         \psfrag{Red}{tflcentralred}         % Appears to be now way to do this         \psfrag{Green}{tfldistrictgreen}    % Appears to be now way to do this         \psfrag{e}{$\epsilon$}         \psfrag{s}{$\Sigma$}}      Is there a way to change styles such as and colors and line weights in imported EPS files, especially those created by Mathematica, either using techniques and packages in LaTeX, or by modifying the EPS as it is generated in Mathematica (a separate question)? Or is one, in practice (without what amounts to EPS coding), limited to simple text substitutions. * * *               \documentclass{article}       \usepackage{pstool}     \usepackage{tikz}          \begin{document}          \definecolor{tflcentralred}{RGB}{220,36,31}              \definecolor{tfldistrictgreen}{RGB}{0,114,41}          %Generate plot1.eps in Mathematica 8.0 using:     %   plot1 = Plot[{Cos[t], Sin[t]}, {t, 0, 2 \[Pi]},      %     PlotStyle -> {Red, Green},     %     AxesLabel -> {"e", "s"}, Ticks -> {{}, {}}];     %   Export["plot1.eps", plot1];     \psfragfig{plot1}{         \psfrag{Red}{tflcentralred}                     % Appears to be now way to do this         \psfrag{Green}{tfldistrictgreen}            % Appears to be now way to do this         \psfrag{e}{$\epsilon$}         \psfrag{s}{$\Sigma$}}          \begin{tikzpicture}[domain=0:2*3.14159,x=1.8cm,y=3cm,samples=500]         \draw[-] (0,0) -- coordinate (x axis mid) (6.25,0) node[right] {$\epsilon$};         \draw[-] (0,-1) -- coordinate (y axis mid)(0,1)node[above] {$\Sigma$};         \draw[color=tflcentralred] plot (\x,{cos(\x r)});         \draw[color=tfldistrictgreen] plot (\x,{sin(\x r)});     \end{tikzpicture}            \end{document}


title: list of supported chars for current LaTeX configuration

text: I am calling pdfLaTeX with text entered in a web form. I would like to replace important chars not supported by LaTeX with the right LaTeX command. How can I get a list of chars supported by LaTeX so that I can program replacements for chars which I think are important? The method should include the usepackage commands I am about to have in my document because e.g. the `\usepackage[utf8]{inputenc}` command is extending the list of supported chars. I am using the TeX Live distribution, provided by the package manager of Ubuntu.


title: XY-Pic: Make fractions appear as in displayed math

text: When writing diagrams with XY-Pic, fractions appear as if they were math enclosed in `$$`. Example:               \documentclass{minimal}     \usepackage{xy}     \begin{document}     \begin{xy}     (0,0)*{\frac{d_1}{d_2}};     \end{xy}     \end{document} The actual diagram I am working at is of course more complicated, and these fractions appear too cramped. How can I enforce the fraction to appear as in displayed math, that is, as in `\[ \frac{d_1}{d_2} \]`?


title: How to prevent \baselinestretch from affecting the math mode?

text: Changing `\baselinestretch` will affect the distance between two adjacent rows. How to avoid this? ![enter image description here](http://i.stack.imgur.com/4Q6wc.png)               \documentclass{book}     \usepackage[a6paper,vmargin=15mm,hmargin=5mm]{geometry}     \usepackage[english]{babel}     \usepackage{blindtext}     \usepackage{amsmath}          \usepackage[T1]{fontenc}     \usepackage[scaled]{uarial}     \renewcommand*\familydefault{\sfdefault}          \renewcommand{\baselinestretch}{2}          \begin{document}         \blindtext         \begin{equation}             \tag{Trivial Matrix}             \begin{pmatrix}                 1 & 2 & 3 & 4 & 5\\                 1 & 2 & 3 & 4 & 5\\                 1 & 2 & 3 & 4 & 5\\             \end{pmatrix}             \label{eqn:matrix}         \end{equation}         \blindtext     \end{document}


title: Is there a way to clear paths previously defined with name path global in TikZ

text: In the solution to Intersections in PGFplots it was pointed out that each `\addplot` command was drawn in its own scope and using `name path` would not survive outside of that `\addplot` command. The solution was to use `name path global` so that the path name would be known outside of the particular `\addplot` that generated that path. This works fine -- However, in a large document it is possible that the same name may be used again. Am wondering if there is a way to clear the paths that were named via `name path global`. Even if I needed to do this outside of the current `\tikzpicture` environment that too would be fine as I would just simple add an empty `\tikzpicture` that performed this clean up after each picture where it was used. This would be preferable as then I don't need to worry about name conflicts. I don't see anything about this is the documentation, so if it not currently possible, this might be a good feature to consider for future release. _**_Update (using sol'n provided by Andrew) **** Attempted to use sol'n, but it seems to only clear the first path.. The following code works fine if the path names are changed in the 2nd graph (and shows 2 intersections), but as is it shows 4 intersections as shown here               \documentclass{standalone}     \usepackage{pgfplots}     \usetikzlibrary{intersections}          \makeatletter     \tikzset{%       clear global paths/.style={         execute at end picture=\clear@global@paths,         name path global/.append code={           \ifx\global@paths\pgfutil@empty           \gdef\global@paths{##1}%           \else           \xdef\global@paths{\global@paths,##1}%           \fi         }       },       clear global paths now/.code={         \expandafter\global\expandafter\let\csname tikz@intersect@path@name@#1\endcsname=\relax       }     }     \let\global@paths=\pgfutil@empty     \def\clear@global@paths{%       \edef\@temp{\noexpand\pgfkeys{/tikz/clear global paths now/.list={\global@paths}}}%       \@temp       \global\let\global@paths=\pgfutil@empty     }     \makeatother     %--------------------------------------------------          \begin{document}          \newcommand*{\ShowIntersection}[2]{     \fill          [name intersections={of=#1 and #2, name=i, total=\t}]          [red, opacity=1, every node/.style={above left, black, opacity=1}]          \foreach \s in {1,...,\t}{(i-\s) circle (2pt)             node [above left] {\s}};     }          \begin{tikzpicture}[clear global paths]     \draw[name path global=GraphCurve, mark=none, domain=-2.5:2.5, thick] plot ({\x},{\x*\x});%          \draw [red, thick, name path global=HorizontalLine] (-2.5,3) -- (2.5,3);%          \ShowIntersection{GraphCurve}{HorizontalLine}     \end{tikzpicture}               \begin{tikzpicture}[clear global paths]     \begin{axis}     \addplot[name path global=GraphCurve, mark=none, domain=-2.5:2.5, thick] ({x},{x*x});%     \addplot [red, thick, name path global=HorizontalLine] coordinates{(-2.5,4) (2.5,4)};%          \ShowIntersection{GraphCurve}{HorizontalLine}     \end{axis}      \end{tikzpicture}     \end{document}


title: A question on consistency of fonts in figures and in text

text: Suppose I output a figure of some function from Matlab, without adding the x-axis label and y-axis label. The figure is then saved as a PDF file. Now I want to input this figure into LaTeX, and I want to   1. add the x-axis label and y-axis label;   2. add the name of the function in the figure, just near the line; because by doing so, the fonts in the x/y-axis labels and in the figure are consistent with the main font used in the text. Is there any method to do this?