title: Scale to fixed width of tikzpicture

text: After looking for something like that here and searching the site. I haven't found something that works (may be I skipped something important). I would like an automated way of telling `tikz` the final size of the `tikzpicture`. I want to draw something and I want `tikz` to calculate automatically the scale to show me the maximum possible. Something like `\begin{tikzpicture}[scale to width = \textwidth]` will scale the figure so the final `tikzpicture` has a width of `\textwidth`. The cool thing would be to make also something like `scale to height = …`, with both forms keeping the original ratio of the `tikzpicture`. But if both are issued at the same time there should be a way of having the final size fixed. I would like this to work within `tikzpicture` (and not with `scalebox` or `resizebox`) so that the resulting image has the correct font size and line width. Example:               \documentclass{scrartcl}     \usepackage{tikz}     …% Some magic code     \begin{document}          \begin{tikzpicture}         \draw (0,0) rectangle (1,1);         \draw (0.5,0.5) node {Center};     \end{tikzpicture}% This should be a square of 1cm x 1cm.          \begin{tikzpicture}[scale to with = 10cm]         \draw (0,0) rectangle (1,1);         \draw (0.5,0.5) node {Center};     \end{tikzpicture}% This should be a square of 10cm x 10cm with the word in correct size          \begin{tikzpicture}[scale to height = 8cm]         \draw (0,0) rectangle (1,1);         \draw (0.5,0.5) node {Center};     \end{tikzpicture}% This should be a square of 8cm x 8cm with the word in a correct size          \begin{tikzpicture}[scale to with = 10cm, scale to height = 6cm]         \draw (0,0) rectangle (1,1);         \draw (0.5,0.5) node {Center};     \end{tikzpicture}% This should be a rectangle of 10cm x 6cm with the word in a correct size/shape          \end{document}


title: How to scale a tikzpicture to \textwidth

text: I would like to scale my `tikzpicture` to exactly (or a proportion of) the `\textwidth` Of course I could play with the `[scale=0.5]` option until I found the right value, but I assume there must be an easier way. How to get a properly scaled (the fonts still must be correct) `tikzpicture` with an exact width.


title: Tikz's picture: out of the page margin

text: > **Possible Duplicate:**   >  How to scale a tikzpicture to \textwidth   >  Shrink figure only when necessary? As you can see the third rectangle is out of the right margin...how can I fix this issue?               \documentclass{article}      \usepackage{tikz}          \begin{document}     \begin{tikzpicture}          \begin{scope}        \draw (0,0) rectangle (5.5,4.5);     \end{scope}          \begin{scope}[xshift=70mm]        \draw (0,0) rectangle (5.5,4.5);     \end{scope}          \begin{scope}[xshift=140mm]        \draw (0,0) rectangle (5.5,4.5);     \end{scope}          \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/C4bpY.jpg)


title: In this snippet of beamer presentation, strange space appears ? How to get rid of it?

text: In the following snippet code of a beamer presentation, in the slide **3/8** there is a strange space that appears as shown in the picture. please I need to get rid of it, how to do that ? ![enter image description here](http://i.stack.imgur.com/6taQh.png)               \documentclass[11pt,a4paper]{beamer}          \usepackage[applemac]{inputenc}     \usepackage[frenchb]{babel}     \usepackage[T1]{fontenc}     \usepackage{graphicx}     \usepackage{lmodern}          \title{Unité 5 - Techniques d'exploration du web }     \author{ALJI Mohamed}     \institute{Faculté de lettre - Université Ibn Tofail}     \date{\today}          \usetheme{CambridgeUS}          \AtBeginSection[]{       \begin{frame}        \frametitle{Plan}        \tableofcontents[currentsection, currentsubsection]       \end{frame}      }          \AtBeginSubsection[]{       \begin{frame}        \frametitle{Plan}        \tableofcontents[currentsection, currentsubsection]       \end{frame}      }          \AtBeginSubsubsection[]{       \begin{frame}        \frametitle{Plan}        \tableofcontents[currentsubsection, currentsubsubsection]       \end{frame}      }          \setbeamertemplate{footline}{\hspace{28em}\insertframenumber/\inserttotalframenumber\vspace{1em}\null}          \beamertemplatenavigationsymbolsempty          \begin{document}          % slide Titre %     \begin{frame}     \titlepage     \end{frame}           % slide Plan %     \begin{frame}        \frametitle{Plan}      \tableofcontents[]     \end{frame}          % -------------- Debut ------------- %            \section{Histoire d'internet}     \begin{frame}      \frametitle{Histoire d'internet}          \end{frame}          % ---------------------------------- %     \section{Services d'internet}     \subsection{sub section 1}          % ---------------------------------- %     \section{Les outils de recherche}          % ---------------------------------- %     \section{Les techniques de recherche}          % ----------------- Fin ------------%     \begin{frame}      \frametitle{}     frame 2     \end{frame}          \end{document}      Here is another MWE smaller that produce the same error !               \documentclass[11pt,a4paper]{beamer}          \usepackage[applemac]{inputenc}     \usepackage[frenchb]{babel}     \usepackage[T1]{fontenc}     \usepackage{graphicx}     \usepackage{lmodern}          \title{Reconnaissance des Tumeurs Cérébrales\\ État de l'Art}     \author{M. ALJI Mohamed}     \institute{LaRIT - Faculté des Sciences - Université Ibn Tofail Kénitra}     \date{$1^{ere}$ Journée Scientifique en Informatique et Mathématiques\\     29 Mai 2014, Mehdia,Kenitra}          \usetheme{CambridgeUS}          \setbeamertemplate{footline}{\hspace{28em}\insertframenumber/\inserttotalframenumber\vspace{1em}\null}          \beamertemplatenavigationsymbolsempty          \begin{document}          % slide Titre %     \begin{frame}     \titlepage     \end{frame}           % slide Plan %     \begin{frame}        \frametitle{Plan}      \tableofcontents[]     \end{frame}          % -------------- Debut ------------- %            \section{Introduction}     \begin{frame}      \frametitle{Introduction}     ssss          \end{frame}     \end{document}      I am using **Mac OS X Snow Leopard 10.6.8** with **TeXShop Version 2.47** from **MacTeX** , and **TeX Live 2013**. I even can't reproduce the problem all time ! but I need an explanation. Thank you


title: Problem with align*, having & inside \dfrac arguments

text: To center align two equations, I need to place the & inside a `\dfrac` argument (I am using AMS LaTeX) but if do that, I get an error message and the code does not compile. The only alternative way I could get the result I want is using the following ugly hack below. Is there a clean way to use align in my case?                \begin{align*}      \hat W_i =\sum_{j\neq i} \hat G_j\tag{lsys}\end{align*}      \vspace{-.8cm}      \begin{align*}      \hat G_i =\dfrac{\sum_{j\neq i} \hat W_j -(N-1)\hat W_i}{N}\tag{sol}      \end{align*}


title: PDF/A compatibility with TikZ

text: When a LaTeX document contains TikZ figures with color gradients, it seems that Acrobat Pro's preflight function can no longer convert the PDF to comply with the PDF/A-1b standard. For instance, the code               \documentclass{standalone}     \usepackage{tikz}     \begin{document}       \tikz  \draw [left color=green, right color=blue] (0, 0) rectangle (1, 1);     \end{document}      produces a rectangle with green-to-blue color gradient, ![Color gradient in TikZ](http://i.stack.imgur.com/6Ppba.png) which results in two PDF/A compliance errors ("Syntax problem: real value out of range"), namely "Largest positive real number used: 32768.0" and "Largest negative real number used: -32768.0". The screenshot below indicates that this might be related to a bounding box problem. At http://www.callassoftware.com/callas/doku.php/en:products:pdftoolbox:all_features:properties is says with respect to "Largest positive real number used" that _"In many environments the valid range is limited to the values as defined by IEEE for single-precision floating-point numbers. This limits the range to: +/- 32,767."_ Is there a way to fix this problem and to obtain a PDF/A file? EDIT: When I add a non-unity opacity value to the TikZ \draw options, such as "opacity=0.9999", one of the errors ("Largest positive real number used: 32768.0") disappears. ![Preflight "Verify compliance with PDF/A"](http://i.stack.imgur.com/cWvfw.png)


title: Setting a flag to make text visible in LaTeX

text: I am in the process of CV writing and some pieces of information are necessary to include in some applications, whilst in others they are unnecessary. For example, when applying for scientifically-oriented jobs the modules taken during my degree might be of importance and so should be included, but for other sectors they are irrelevant. Is there a way of setting a flag at the top of a `LaTeX` document and using this make text wrapped in a block hide/unhide on document creation?


title: How to properly align three-level enumerate 1. 1.1. 1.1.1

text: I've created my environment, and modified the enumerate command:               \renewcommand{\labelenumi}{\arabic{enumi}.}     \renewcommand{\labelenumii}{\arabic{enumi}.\arabic{enumii}.}     \renewcommand{\labelenumiii}{\arabic{enumi}.\arabic{enumii}.\arabic{enumiii}.}          \newenvironment{packed_enum}{     \begin{enumerate}     \setlength{\itemsep}{1pt}     \setlength{\parskip}{0pt}     \setlength{\parsep}{0pt}     }{\end{enumerate}}      And this is what i get: ![Latex Problem](http://i.imgur.com/w4ElBEE.jpg) The first two levels align properly (I've marked it with blue line), but the third level starts too much on the left (red line). Can You help me fix this? I've tried something like this (also with changing `labelsep` to `\leftmargin`):               \renewcommand{\labelenumi}{\arabic{enumi}.}     \renewcommand{\labelenumii}{\arabic{enumi}.\arabic{enumii}.}     \renewcommand{\labelenumiii}{\setlength{\labelsep{5ex}\arabic{enumi}.\arabic{enumii}.\arabic{enumiii}.}      or this:               \renewcommand{\labelenumi}{\arabic{enumi}.}     \renewcommand{\labelenumii}{\arabic{enumi}.\arabic{enumii}.}     \renewcommand{\labelenumiii}{\hbox{\hspace{5ex}\arabic{enumi}.\arabic{enumii}.\arabic{enumiii}.}}      but neither helped.


title: Mdframe environnment on multiple page : top margin

text: I am using `mdframedd` for examples in my report. The frames are split on several pages. My problem is that on the second page the frame doesn't have any top margin. And this is very ugly. Here is my code:               \usepackage{mdframed}          \definecolor{grisframe}{gray}{0.95}     \definecolor{gristitleframe}{gray}{0.85}     \mdfsetup{backgroundcolor=grisframe, skipabove=12pt, skipbelow=6pt, leftmargin=0pt, rightmargin=0pt, innertopmargin=12pt, innerbottommargin=6pt, innerleftmargin=12pt, innerrightmargin=12pt, frametitleaboveskip=12pt, frametitlebelowskip=6pt, frametitlerule=true, frametitlebackgroundcolor=gristitleframe}          \begin{mdframed}[frametitle={Exemple}]     Chaque parties relatives à l'analyse des processus -- à savoir les composants, la modélisation et les performances -- sont illustrées avec deux processus présentés ci-dessous. Blabla bla...     \end{mdframe}


title: Remove footnote marks from \listoftables

text: I'm using footnote marks in my table captions like this: `\caption{This is title\protect\footnotemark with a foot note}` and then I just use a `\footnotetext{Closer explanation...}` . This works just fine, but at the end of my document I want to refer to all my tables with `\listoftables`. The footmarks remain in titles in the list, but they have different numbers than those in the text - also there are no footnote texts on the page with the list. Is there a way either to get rid of the footnote marks in the `\listoftables` _or_ to get the footnote texts appear also on the page with the list? Thanks for any hints!


title: Caption package in latex pushing all tables to end of document

text: I am working on my dissertation and am having a problem with the `caption/subcaption` package pushing all tables (not figures) to the end of the document. I would like to use the `subcaption` package to have tables with multiple panels, but this is causing serious issues. I have commented out the table requiring the use of the `subcaption` package so it's not being compiled. Then, I ONLY change wether the `subcaption` package is being loaded (by commenting out `\usepackage{subcaption}`). If it is loaded, tables are at the end of the document. If it IS NOT, there is no problem, tables appear where they should. Any help is very much appreciated. Example:               \usepackage{amsmath, etc}     \usepackage{subcaption}     \usepackage[options]{hyperref}     \begin{document}     ...     TEXT BEFORE TABLE     ...     \begin{table}     TABLE     \end{table}     ...     TEXT AFTER TABLE     ...     \end{document}      To reiterate, if `\usepackage{subcaption}` is commented out, TABLE appears in the text, where it should. If `\usepackage{subcaption}` is compiled, TABLE occurs at the end of the document. NO OTHER CHANGES ARE BEING MADE. Please help! You're my only hope!


title: Printing index of keywords in listings for first mention only

text: I am writing a technical report, which integrates chunks of code using `listings`. I would like to add an index of the `keywords` used in the listings (using `index=[1][keywords]`), but reporting in the index only the _first_ page in which the keyword is mentioned--because that's where I introduced it in the text. Consider this MWE:               \documentclass{article}     \usepackage[dvipsnames]{xcolor}     \usepackage{listings}     \usepackage{makeidx}     \makeindex          \lstdefinelanguage{minion}{ % define the "minion language", known for its semantic complexity     morekeywords={bello,banana} % keywords for the "minion language"     }          \lstset{language=minion, % settings for the language         frame=single, % box arround the code         keywordstyle=\color{YellowOrange},         index=[1][keywords]% index the keywords     }          \begin{document}     We introduce the commands \lstinline!bello! and \lstinline!banana!     \begin{lstlisting}     say(bello)     eat(banana)     \end{lstlisting}     \newpage     \begin{lstlisting}     bello     \end{lstlisting}     \printindex     \end{document}      Using `makeidx` and `\printindex` creates an index for _every page_ in which a given keyword is mentioned in the listings (e.g., `bello` is reported in pages 1 and 2 in the index). I would like to show an index containing only the _first_ page in which any given keyword is mentioned (i.e., `bello` and `banana` in page 1 only in the example). I'm pretty sure there must be an easy solution for this, but could not find it.


title: Pgfplots 1.10 boxplot style options

text: I have been trying to add boxplots to my barcharts and I've finally got some where. After many hours of tearing through these forums and their examples and exhausting the PGFPLOTS 1.10 Manual I got nowhere very slowly. Many of the StackExchange examples were coded for previous versions of PGFPLOTS, not version 1.10 and the native boxplot. What I would like to know is: How do I change the box width (horizonal box height), the line thickness, the whisker height, the line color, box fill color, etc. ? I don't see much listed in section 5.11.1 Boxplots in the manual dated 2/28/14. Might someone be kind enough to post some examples of a truely customized boxplot. I should also post I'm using boxplot with sample data from a file (small number). Also, what libraries should be used as there seems to be several statistics libraries. Any help here is greatly appreciated. Regards, Dave


title: Generating a separate pdf file of tables and figures from a latex file?

text: Is it possible to generate a pdf of figures and tables of a paper from latex itself? I saw Journals and Conferences asking for a separate file of tables and figures. In this question, questioner proposed a method that uses `\usepackage{endfloat}` to push all the figures and tables to the last pages and then use a pdf editor to cut the last pages of pdf. This is a solution but not a good one. Latex should be able to do this by its own. What I have in mind is to compile the latex file and it generates a complete pdf output and beside that a separate file that contains all the figures and tables of former pdf.


title: "Too many math alphabets" with Beamer and DeclareSymbolFont

text: The following is a near-minimal example of my problem:               \documentclass[dvipsnames]{beamer}          \usepackage{stmaryrd}     \usepackage{MnSymbol}          \DeclareSymbolFont{bbsymbol}{U}{bbold}{m}{n}     \DeclareMathSymbol{\bbsemi}{\mathbin}{bbsymbol}{"3B}          % Import some stuff from mathabx.sty -- because mathabx.sty incompatible with     % amsmath package.     \DeclareFontFamily{U}{matha}{\hyphenchar\font45}     \DeclareFontShape{U}{matha}{m}{n}{           <5> <6> <7> <8> <9> <10> gen * matha           <10.95> matha10 <12> <14.4> <17.28> <20.74> <24.88> matha12           }{}     \DeclareSymbolFont{matha}{U}{matha}{m}{n}          \begin{document}          \begin{frame}         $\mathbf{0} \mathsf{hello}$     \end{frame}          \end{document}      I would like to be able to use stmaryrd and MnSymbol in the same doc. I would also like some stuff from mathabx, but because of incompatibility with amsmath (which is imported automatically by MnSymbol), I use DeclareSymbolFont to import it, as described in 1. Moreover I would also like to define a blackboard semicolon operator, and so I also use DeclareSymbolFont to introduce bbsymbol. Finally I want mathbf and mathsf. Unfortunately this seems to run out of space for math alphabets in Beamer, but not (for example) if I build a regular article. Is there a solution that meets all my requirements, for Beamer? (It seems that deleting any one of the imported or defined fonts fixes the problem, but then I don't have all my requirements satisfied.)


title: How to improve this code to obtain more compact equation?

text: I have been trying to obtain more compact output for the following code. Any help will really be appreciated!               \Pr(s_i^2)=   F^{ij}_{i}\left[\displaystyle\frac{F^{i}_{j}\left[(F_j^{iji})^{-1}\left(\displaystyle\frac{ \varepsilon \left(F^{ij}_{i}\right)^{-1}\displaystyle\left(\frac{\varepsilon z_i^j+v_j^1}{v_j^1-v_j^2}\right)+v_{i}    }{ v_{i}^{1}-v_{i}^{2}   } \right)\right](v_i^1-v_i^2)-v_{i}^{1} }{\varepsilon} \right]


title: In beamer slide, view notes on computer only while presenting with a projector?

text: Is is possible to make a PDF in Beamer such that notes are visible only on computer and not on the projector?


title: Alignment of toc in beamer class

text: I have some problems with vertical alignment of toc in beamer class related to this question. The answer works for me, but i would like to center the toc and decrease the horizontal space between these two columns. All items should be on the same height. ![](http://i.stack.imgur.com/xkm5E.png)               \documentclass[12pt,handout,]{beamer}     \usepackage{luacode}     \usepackage{luatextra}     \usepackage[utf8]{luainputenc}     \usepackage[T1]{fontenc}     \usepackage[ngerman]{babel}          \begin{document}          \begin{frame}[t,plain]     \titlepage     \addtocounter{framenumber}{-1}     \end{frame}          \begin{frame}[fragile]\frametitle{Inhalt des Kurses}          \setcounter{tocdepth}{1}     \begin{columns}[t]     \begin{column}{.33\textwidth}         \tableofcontents[sections={1-5}]     \end{column}     \begin{column}{.33\textwidth}         \tableofcontents[sections={6-10}]     \end{column}     \end{columns}          \end{frame}          \section{section 1}     \subsection{section 1}     \begin{frame}test\end{frame}     \subsection{section 1}     \begin{frame}test\end{frame}     \section{section 2}     \subsection{section 1}     \begin{frame}test\end{frame}     \subsection{section 1}     \begin{frame}test\end{frame}     \section{section 3}     \subsection{section 1}     \begin{frame}test\end{frame}     \subsection{section 1}     \begin{frame}test\end{frame}     \section{section 4}     \subsection{section 1}     \begin{frame}test\end{frame}     \subsection{section 1}     \begin{frame}test\end{frame}     \section{section 5}     \subsection{section 1}     \begin{frame}test\end{frame}     \subsection{section 1}     \begin{frame}test\end{frame}     \section{section 6}     \subsection{section 1}     \begin{frame}test\end{frame}     \subsection{section 1}     \begin{frame}test\end{frame}     \section{section 7}     \subsection{section 1}     \begin{frame}test\end{frame}     \subsection{section 1}     \begin{frame}test\end{frame}     \section{section 8}     \subsection{section 1}     \begin{frame}test\end{frame}     \subsection{section 1}     \begin{frame}test\end{frame}     \section{section 9}     \subsection{section 1}     \begin{frame}test\end{frame}     \subsection{section 1}     \begin{frame}test\end{frame}     \section{section 10}     \subsection{section 1}     \begin{frame}test\end{frame}     \subsection{section 1}     \begin{frame}test\end{frame}          \end{document}      Edit: If I increase the column width, it works. The distance between the columns is too large and it is not centered.


title: The indentfirst package does not work with ragged2e package

text: I am using the `ragged2e` package in the `article` class and want the first paragraph within the `justify` environment to be indented. As such, I used the `indentfirst` package. However, this does not change the indentation of the first paragraph. Here is a MWE:               \documentclass{article}     \usepackage{ragged2e} % Used to get good looking fully-justified (even on both sides) text     \usepackage{indentfirst} %Used to indent the first paragraph in a section          \usepackage{lipsum} %used to generate filler text          \begin{document}          \begin{justify}     \lipsum[1-2]     \end{justify}          \end{document}


title: TikZ: Adding a coordinate to parallel location of two lines

text: I would like to add a coordinate where a line parallel to my `v\cos(\gamma)` would be located if it started from point `P7`. I am not sure how to move those two lines to that location parallel to my original though.               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{calc, intersections, arrows}     \begin{document}     \begin{tikzpicture}[line cap = round, line join = round, >=triangle 45,       scale = 1.25]       \coordinate (O) at (0, 0);       \coordinate (P1) at ($(O) + (-30:1.5cm and .75cm)$);            \draw[-latex] (P1) arc (-30:310:1.5cm and .75cm) coordinate (P2);       \draw[-latex] (O) -- (0, 1.75) node[above, scale = .75] {\(\mathbf{h}\)};       \draw ($(P1)!.5!(P2)$) circle (.18cm) coordinate (P3);       \draw[blue] (O) -- ($(P3)!.18cm!(O)$) node[scale = .75, pos = .5,         fill = white, inner sep = 0cm] {\(\mathbf{r}\)} coordinate (P4);       \draw[dotted, blue, name path = line] (P4) -- ($(P4)!.36cm!(P3)$)       coordinate (P5);       \path[name path = aux] (P5) circle [radius = 1bp];       \draw[name intersections = {of = line and aux}, -latex, blue] (P5) --       ($(intersection-1)!.5cm!(P5)$) node[scale = .75, shift = {(.25cm, -.2cm)}]       {\(v\cos(\gamma)\)};       \draw[dotted, name path = line2, blue] ($(P4)!.5!(P5)$) -- (P1)       coordinate (P6);       \path[name path = aux2] (P6) circle [radius = 1bp];       \draw[name intersections = {of = line2 and aux2}, -latex, blue] (P6) --       ($(intersection-1)!.75cm!(P6)$) node[scale = .75, shift = {(.25cm, .2cm)}]       {\(v\sin(\gamma)\)} coordinate (P7);     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/mPIIn.png)


title: Itemize inside longtable

text: I have the following (Non-working) example.               \renewcommand*{\arraystretch}{1.8}     \begin{longtable}{lcl}         \caption{Summary of proven determinants for falling}\\ \toprule         \label{tab:FallPredictionVariables}         \textbf{Author} &\textbf{Subject count (M:F)} & \textbf{Determinants}\\         \midrule              \noindent Author 1 &         1780 (?) &          \begin{itemize}%[label={--},noitemsep,leftmargin=*,topsep=0pt,partopsep=0pt]             \item Recent falls (last 2 months)             \item Agitation             \item Frequent toileting             \item Visual impairment         \end{itemize}\\              \noindent Author 2 &         311 (?) &         \begin{itemize}%[label={--},noitemsep,leftmargin=*,topsep=0pt,partopsep=0pt]             \item Posture sway             \item Two or more falls in previous year             \item Low hand grip strength             \item Depressive state of mind         \end{itemize}\\             \bottomrule          \end{longtable}      However, it works OK outside a `longtable` environment:               \renewcommand*{\arraystretch}{1.8}     \begin{table}     \centering         \caption{Summary of proven determinants for falling}          \label{tab:FallPredictionVariables}         \begin{tabular}{lcp{60mm}}         \toprule         \textbf{Author} &\textbf{Subject count (M:F)} & \textbf{Determinants}\\         \midrule              \noindent Author 1 &         1780 (?) &          \begin{itemize}[label={--},noitemsep,leftmargin=*,topsep=0pt,partopsep=0pt]             \item Recent falls (last 2 months)             \item Agitation             \item Frequent toileting             \item Visual impairment         \end{itemize}\\              \noindent Author 2 &         311 (?) &         \begin{itemize}[label={--},noitemsep,leftmargin=*,topsep=0pt,partopsep=0pt]             \item Posture sway             \item Two or more falls in previous year             \item Low hand grip strength             \item Depressive state of mind         \end{itemize}\\             \bottomrule                  \end{tabular}          \end{table}      As you can see in the picture below, it does what I'm expecting (except there is some vertical space over the first item that I would like to remove, and the solutions posted in How to reduce vertical space itemize environment inside table only seem to work for `tabularx` environments). ![enter image description here](http://i.stack.imgur.com/ACjik.png) I'm unable to make my code work inside `longtable`, and I really need it (the complete table is very long). Any ideas for both things:   1. To be able to have itemize inside `longtable` environment   2. Eliminate the extra space for the first item PS: This is the preamble for both examples:               \documentclass[a4paper,twoside,11pt,openright]{report}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{longtable}       \usepackage[inline]{enumitem}        \usepackage{booktabs}          \begin{document}     ...     \end{document}


title: How to get the intersection nodes of 2 arbitrary curves?

text: > **This question led to a new package:**   >  `pst-intersect` In my experience, there is no macro in PSTricks to get the intersection nodes of two curves. Is it possible to do this in PSTricks? Or Am I am dreaming an impossible thing?               \documentclass[pstricks,border=12pt]{standalone}          \begin{document}     \begin{pspicture}[showgrid](4,3)         \pscurve[linecolor=red](0,3)(1,1)(2,3)(3,2)(4,0)         \pscurve[linecolor=blue](0,0)(1,3)(2,1)(3,1)(4,3)     \end{pspicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/MZhp5.png)


title: Angle between lines in 3D space

text: In my following codes:   1. How can I create a beautiful mark angle for DCE angle?   2. How can I change position ALPHA in front of BAC angle in space? * * *               \documentclass{article}     \usepackage{tikz,tikz-3dplot}      \usepackage{tkz-euclide}     \usetkzobj{all}          \begin{document}       \tdplotsetmaincoords{60}{120}            \begin{tikzpicture}[         scale=3,         tdplot_main_coords,         axis/.style={->,blue,thick},         vector/.style={-stealth,red,very thick},         vector guide/.style={dashed,red,thick}       ]              % standard tikz coordinate definition using x, y, z coords         \coordinate (O) at (0,0,0);         \coordinate (A) at (1,0,2);         \coordinate (B) at (.5,.86603,3);         \coordinate (C) at (0,0,1);         \coordinate (D) at (.5,.86603,0);         \coordinate (E) at (1,0,3);         \coordinate (F) at (0,0,3);         \coordinate (H) at (1,0,0);              % tikz-3dplot coordinate definition using r, theta, phi coords         \tdplotsetcoord{P}{.8}{55}{60}              % draw axes         \draw[axis] (0,0,0) -- (2,0,0) node[anchor=north east]{$x$};         \draw[axis] (0,0,0) -- (0,2,0) node[anchor=north west]{$y$};         \draw[axis] (0,0,0) -- (0,0,4) node[anchor=south]{$z$};              \fill[gray!20] (O) -- (H) -- (E) -- (F) -- cycle;         % \fill[green!50] (O) -- (D) -- (B) -- (F) -- cycle;         \fill[blue!20] (B) -- (E) -- (F) -- cycle;         \fill[blue!20] (O) -- (D) -- (H) -- cycle;              \fill[black] (O) circle (1pt) node[right] {$O$};         \fill[black] (A) circle (1pt) node[left] {$A$};         \fill[black] (B) circle (1pt) node[right] {$B$};         \fill[black] (C) circle (1pt) node[right] {$C$};         \fill[black] (D) circle (1pt) node[right] {$D$};         \fill[black] (E) circle (1pt) node[left] {$E$};         \fill[black] (F) circle (1pt) node[right] {$F$};         \fill[black] (H) circle (1pt) node[below] {$H$};              \draw[ultra thick] (O) -- (F);         \draw[thick] (O) -- (H);         \draw[thick] (O) -- (D);         \draw[thick] (D) -- (H);         \draw[thick] (H) -- (A);         \draw[thick] (A) -- (E);         \draw[thick] (F) -- (B);         \draw[thick] (B) -- (E);         \draw[thick] (E) -- (F);         \draw[thick,red] (B) -- (A);         \draw[thick,red] (A) -- (C);         \draw[thick,red] (C) -- (D);         \draw[thick] (B) -- (D);              \tkzMarkAngle[fill=orange,size=0.2cm,opacity=.4](C,A,B)         \tkzLabelAngle[above left,pos=0.3](C,A,B){$\alpha$}         \tkzMarkAngle[fill=orange,size=0.15cm,opacity=.4](A,C,D)         \tkzLabelAngle[above left,pos=0.3,font=\small](A,C,D){$\alpha$}       \end{tikzpicture}     \end{document}      My code's result. ![enter image description here](http://i.stack.imgur.com/CF1ZX.png)


title: Macro in TeXstudio with %<something%> and %(filefilter%) fails

text: I add the following macro:               \begin{figure}[htbp]         \centering         \includegraphics[width=%<0.9%>\columnwidth]{%(*.png, *.pdf%)}         \caption{%<caption%>}         \label{fig%<label%>}     \end{figure}      TeXstudio inserts the macro on the trigger after asking a file. However, the `0.9` is not marked. Instead the letters `rap` from `includegraphics` are marked. Did I do something wrong, or is this a bug?


title: Using ITRANS postscript fonts with MikTeX2.9

text: I have followed John Washburn's instructions from the document ITRANS53 Installation Notes with MiKTEX 2.9 (http://www.aczoom.com/files/itrans/mirror/itransi-MiKTeX/itransi-MiKTeX.pdf). I can convert .itx to .tex but when I run dvips gujdoc.dvi -o the output says it cannot find itxguj source file. What should I do? Trying to make PK font itxguj at 900 DPI... Running miktex-makemf.exe... miktex-makemf: The itxguj source file could not be found. Running ttf2pk.exe... miktex-makepk: PK font itxguj could not be created. This is dvips(k) 5.993 Copyright 2013 Radical Eye Software (www.radicaleye.com) ' TeX output 2014.04.25:1846' -> gujdoc.ps C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\dvips.exe: Font itxguj not found; characters will be left blank. . [1] [2] [3] [4] [5] [6]


title: TikZ - pgfdeclaredecoration vs. curved path

text: I want to use a complex decoration, and then apply it to a curved path. It seems as if TikZ does not bend single segments though. Do you have any idea how I could get the desired behavior? Is there maybe a way to add paths, similar to the stacked plots in pgfplots?               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{decorations}          \pgfdeclaredecoration{reserve}{initial}     {       \state{initial}[width=\pgfdecoratedpathlength]       {         \pgfpathlineto{\pgfpoint{0pt}{-4pt}}         \pgfpathlineto{\pgfpoint{0.15*\pgfdecoratedpathlength}{7pt}}         \pgfpathlineto{\pgfpoint{0.2*\pgfdecoratedpathlength}{-7pt}}         \pgfpathlineto{\pgfpoint{0.35*\pgfdecoratedpathlength}{5pt}}         \pgfpathlineto{\pgfpoint{0.4*\pgfdecoratedpathlength}{-5pt}}         \pgfpathcurveto{\pgfpoint{0.5*\pgfdecoratedpathlength}{3pt}}{\pgfpoint{0.6*\pgfdecoratedpathlength}{-3pt}}{\pgfpoint{0.6*\pgfdecoratedpathlength}{-3pt}}         \pgfpathlineto{\pgfpoint{0.65*\pgfdecoratedpathlength}{6pt}}         \pgfpathlineto{\pgfpoint{0.82*\pgfdecoratedpathlength}{-7pt}}         \pgfpathlineto{\pgfpoint{0.9*\pgfdecoratedpathlength}{7pt}}         \pgfpathlineto{\pgfpoint{0.97*\pgfdecoratedpathlength}{-2pt}}         \pgfpathlineto{\pgfpoint{\pgfdecoratedpathlength}{0pt}}       }       \state{final}       {         \pgfpathlineto{\pgfpointdecoratedpathlast}       }     }          \begin{document}     \begin{tikzpicture}       \draw[black, decorate, decoration={name=reserve}, very thick] (0,5) -- (5, 5) ;       \draw[black, decorate, decoration={name=reserve}, very thick] (0,0) to[bend left] (5, 0) ;     \end{tikzpicture}     \end{document}      ![decoration applied to straight and curved line](http://i.stack.imgur.com/NKBPG.png)


title: Change caption of a single/few figures

text: The captions of my figures read, as usual, "Figure #: some text". I want a few of them, which are scattered through the text, to read "Diagram #: some text" (the counter being consecutive). What is the right way to do this? Should I define a new float environment? Here, a minimal example:               \documentclass{article}     \usepackage{amssymb,latexsym,amsmath}     \usepackage{amsmath,amsthm,amssymb,pstricks,pst-node}     \begin{document}          Some text, and then:          \begin{figure}[htb]     \[     \text{This is a figure}     \]     \caption{Ok. Here I like the label figure}     \end{figure}          Now:          \begin{figure}[htb]     \[     \begin{array}{cc}     \Rnode{a}{A} & \Rnode{b}{B}     \end{array}     \ncLine{a}{b}\Aput{}     \]     \caption{Wrong! Here I would like the caption to say ``Diagram 2:...''}     \end{figure}          and finally:          \begin{figure}[htb]     \[     \vspace{-.1cm}     \setlength{\arraycolsep}{1.8cm}     \text{This is another figure}     \]     \caption{Ok. Here I like the label figure}     \end{figure}          \end{document}


title: Bold horizontal and vertical lines in tables

text: I want to be able to make certain horizontal lines and certain vertical lines bold in my table but not all.               \begin{table}[h]      \begin{center}      \begin{tabular}{|c|c|c|c|c|c|c|}      \hline     $x$&100&10 000&$1$x$10^5$&$1$x$10^6$&$1$x$10^7$&$1$x$10^9$\\     \hline     $f(x)$&0,1&0,0001&$1$x$10^-5$&$1$x$10^-6$&$1$x$10^-7$&$1$x$10^-9$\\     \hline     \end{tabular}     \end{center}     \end{table}      I am looking for a box border, center line not bold. First 3 vertical lines and last to be bold. Thanks for the help


title: \def two macros with same name, but different argument syntax

text: Is it possible to have macros with the same name, but different “syntax”? E.g. we have the primitive `\font` which could be seen as having 3 arguments(a. without size information; b. giving the fontsize with `at`; c. giving scaling information with `scaled`). Is there a way to provide similar functionality for own macros? I already tried the following (stupid) experiment:               \def\print#1at#2,#3{The text ``#1'' shall be printed at $#2 \abovewithdelims()0pt #3$}     \def\print#1by#2,#3{The text ``#1'' shall be printed by #2 and #3 Doe}          \print{Testtext}at 2,3          \print{Testtext}by{Jon},{Jane}          \bye      Trying to compile it (using `tex -interaction=nonstopmode def.tex`) yields following error:               This is TeX, Version 3.14159265 (TeX Live 2014) (preloaded format=tex)     (./def.tex     Runaway argument?     {Testtext}at 2,3      ! Paragraph ended before \print was complete.     <to be read again>                         \par      l.5           [1] )     (see the transcript file for additional information)     Output written on def.dvi (1 page, 280 bytes).     Transcript written on def.log.


title: Disable visually italicizing characters in \textit when using LaTeX-Suite

text: I am using Vim + LaTeX-Suite plugin to write LaTeX source file. I noticed that LaTeX-Suite would automatically italicize characters in `\textit` (which made text inside almost illegible) and bold characters in `\textbf` (which bolded text inside). ![Text inside \\textit get visually italicized](http://i.stack.imgur.com/k2Hw5.png) ![Text inside \\textbf get visually bolded](http://i.stack.imgur.com/y4g3a.png) So is there a way to disable this behavior?


title: Making a labeled Klein bottle using TikZ or pgfplots?

text: I'd like to be able to draw the following cell complex structure on the (three-dimensional embedding of the) Klein bottle using LaTeX. I am pretty pleased with my hand-drawn rendition, but LaTeX is prettier, and can be edited. ![enter image description here](http://i.stack.imgur.com/NT2aD.jpg) I am still in the process of learning TikZ, and I have not used the pgfplots package before so I don't know if it can help. The only places I found online that seemed related were http://www.gnuplotting.org/klein-bottle/ pgfplots in combination with gnuplot requires additional semicolon **Edit:** Thanks to hpesoj626's helpful comment below, I have got gnuplots working, so I can compile at least the second example above now (I still don't know how to implement the first one). However, there is still the issue of _decorating_ the Klein bottle with the various curves and points I want to draw, which neither post addresses. Also, both plotting solutions seem to be too "heavy", visually, to really make labeling them in the way I want seem viable. I am looking for more of an outline-looking Klein bottle. If the ultimate answer is that I need to draw it out "by hand" (i.e. plan out a 2-dimensional image representing the Klein bottle), then please post any advice you have about how to go about doing that. Can anyone suggest a method of drawing this in LaTeX?


title: pgfplotstable selecting numeric columns or multiple columns by index

text: Hi two questions in one: I haven't been able to figure out the answer from the manual: I have a table of data with strings in the first column: I'd like to apply some key-values (e.g. fonts by sign) to the numeric columns only. Is there a quick way of doing so? something like               every numeric column/.style={fonts by sign={}{\color{red}}      or               every columns nos {2,3,4}/.style={fonts by sign={}{\color{red}}      MWE to work on below               \documentclass{article}     \usepackage{pgfplotstable}     \begin{document}     \pgfplotstableread[row sep=\\,col sep=&,header=false]{     a & 1 & 2\\     b & 2 & -2\\     c & 3 & 0.5\\     }\atable          \pgfplotstabletypeset[fixed,     zerofill,     fonts by sign={}{\color{red}},     every first column/.style={string type}]\atable     \end{document}


title: How to plot a tree with sidebar?

text: I'm trying to draw a picture like this:![The picture](http://i.stack.imgur.com/QlNyv.png) Can we done it with tikz?


title: LaTeX locally change equation numbering

text: I want my document to look like this: > Normal document text. > > equation (1) > > **Definition** _Definition text._ > > equation (D1) > > _More definition text._ > > Normal document text. > > equation (2) > > More document text. So the numbering changes inside the definition, and remains unaltered outside the definition.


title: Has anyone managed to use \glossaries with TeXstudio on Windows?

text: As a new LaTeX user, I have spent some time configuring my system and ironing the usual start-up mistakes. So far, I've been able to compile several documents with indices, graphics, etc. but now I'm trying to add a glossary and I'm absolutely and deeply confused. I seem unable to make the `\glossaries` (with `xindy`) package work on my TexStudio/Windows 8 - MikTeX 2.9 machine so any help or orientation will be much appreciated. **Update:** Xindy seems to be working, now the question is WHAT TO DO NEXT ![Xindy working on Windows 8.1](http://i.stack.imgur.com/qBqcV.jpg) Now I am trying this MWE:               \documentclass[10pt,a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{graphicx}          \usepackage[xindy]{glossaries}          \author{author}     \title{title}          \begin{document}          test la \gls{IG} es vital en la protección del ternero hay 5 tipos de \glspl{IG}          \newacronym[longplural=Inmunoglobulinas]{IG}{IG}{Inmunoglobulina}          \makeglossaries          \end{document}      and the errors on my build result are   * **on pdfLaTeX** > `line 21: Can be used only in preamble. \makeglossaries   >  : \makeglossaries hasn't been used,the glossaries will not be updated.   >  : No \printglossary or \printglossaries found.`   * **on Makeglossaries command** > `Process started: "C:/Program Files (x86)/MiKTeX > 2.9/miktex/bin/makeglossaries.exe" "texstudio_B11540"` > > `makeglossaries version 2.12 (2014-01-20)` `added glossary type 'main' > (glg,gls,glo)` > > `No \@istfilename found in 'texstudio_B11540.aux'. Did your LaTeX run fail? > Did your LaTeX run produce any output? Did you remember to use > \makeglossaries?` > > Process exited with error(s) **What Finally Worked** I followed this path:   1. Installed MiKTeX latest version and updated it   2. Downloaded `xindy-win.exe` and installed it with all the default options   3. Configured TeXstudio as per Khumar's indications with one difference: On `Options>Configure...>Commands` - `Texindy` i used `"C:/Program Files (x86)/xindy/miktex/bin/texindy.exe" %.idx` and now seems to be working!


title: Generate automatic revision's numbering tabular

text: **Situation** I have to make a cover template for a document. At the end of the page, I have to add the revision number with other useful info like this example:               \begin{tabular}{lccl}         Revision 0 & 06-11-2014 & Initial Release & John Smith \\         Revision 1 & 06-12-2014 & Changed something & Joe Blow \\         ...     \end{tabular}      **Objective** In the TEX document, the user would have to add their revision like this:               \AddRevision{06-11-2014}{Initial Release}{John Smith}     \AddRevision{06-12-2014}{Changed something}{Joe Blow}     ...     \createFrontPage      When generating the PDF, this should automatically generate the tabular above. Note that the revision's number is automatically increase by 1 at each AddRevision. **What I have tried** I'm not familiar with Latex macros, so this is what I have for the moment. I just don't know if I'm close to the solution or if I'm doing totally wrong. Here's the code in my CLS file:               \newCounter{RowCounter}     \def\AddRev#1,#2,#3{\RevDate{#1}, \RevDesc{#2}, \RevAuthor{#3} \stepCounter{RowCounter}}          \newCounter{i}     \newcommand{\RevisionRows}     {         \forloop{i}{0}{\value{i} < \value{RowCounter}}         {             Revision \arabic{i} & \RevDate & \RevDesc & \RevAuthor \\         }     }              \newcommand{\createFrontPage}     {        % some stuff        \begin{tabular}{lccl}            \RevisionRows            \end{tabular}     }      **Questions** Is my objective possible ? If yes, What am I doing wrong ? What's the best and clean solution ? Any suggestions are welcome. Thanks a lot for your help.


title: What are some alternatives to presenting data instead of tables?

text: What are some alternatives to representing tabular data? Currently, I am trying to construct a table but seeing as how, everyone in my class will be doing that, I want to stand out and I'm looking to do something that has the same effect but is different. Below is the general layout of the table that I currently have: ![An example of the table I have](http://i.stack.imgur.com/RHqxk.png) I was thinking about a timeline but I doubt it would fit all the information I wanna have. EDIT: I notice this question has two close votes and I'm trying to understand the motivation behind them. I feel this question pertains to a good portion of individuals that may wish to know how to present their data in something other than a table.


title: TeXstudio: Finalize placeholder, red frame, red box

text: When TeXstudio completes a command like `\label{key}` that requires an argument a placeholder is positioned between curly brackets. The placeholder is surrounded by a red frame. When jumping forward through the document using `CTRL+Leftarrow` or `CTRL+Rightarrow` jumping to the placeholder takes precedence over jumping to next/last words and even takes you across multiple lines. While I want this behaviour I also want to be able to jump single words in the direction of the last placeholder after it is set to the wanted content. To do this I need to somehow finalize the placeholder indicated by the removal of the red frame. I can do this by a number of combinations of moving the cursor into the red frame, pressing `Enter` and then undoing the `Enter` press. However, that doesn't feel like a forward way to composing a document and I suspect there is a right way to make a placeholder lose its jump point property. So, what is the correct way to finalize a placeholder?


title: Why php exec() fails .tex→xelatex→.pdf, but succeed .tex→xelatex→.xdv→xdvipdfmx→.pdf?

text: The call of command:               $dir = "/path/to/source/file";     exec("cd $dir;xelatex filesource.tex", $output_array[0]);      always fails, but:               $dir = "/path/to/source/file";     exec("cd $dir;/usr/texbin/xelatex -no-pdf filesource.tex", $output_array[0]);// now we have .xdv file     exec("cd $dir;/usr/texbin/xdvipdfmx filesource.xdv", $output_array[1]);       succeed, and result .pdf file absolutely valid. What is the trick?


title: XeLaTeX seems to perform no kerning, here. Why?

text: For some reason, XeTeX isn't providing any kerning no matter font I use. The font I want to use is Goudy Old Style, which looks like this: ![enter image description here](http://i.stack.imgur.com/4JxMl.png) However, I also tried it with Garamond: ![enter image description here](http://i.stack.imgur.com/k3Vjo.png) And here it is with Time New Roman: ![enter image description here](http://i.stack.imgur.com/Ud8ku.png) I can't figure out what's wrong! Does it need to be enabled or something? I'm using Windows XP if that makes any difference.


title: Make background image in beamer fill full page while preserving aspect ratio

text: I want to use a picture as a full-page background of a particular beamer slide. I want the picture to fill the whole slide, but preserve its aspect ratio (which is different from that of the slide), in a manner that the picture gets centred (horizontally and vertically) on the slide and scaled up exactly to the point where the picture covers the whole slide (so the visible part gets cropped along the relatively longer side of the picture). In other words, I want to replicate the "Fill Screen" behaviour commonly found for desktop backgrounds (such as in OS X). What is a clean way to achieve the desired behaviour in beamer? * * * The following minimal working example covers the background, but does not scale proportionally (first slide), or scales the picture proportionally, but neither centres it, nor covers the whole background (second slide):               \documentclass{beamer}          \usepackage{graphicx}          \begin{document}          {\usebackgroundtemplate{%     \includegraphics[width=\paperwidth,height=\paperheight]{test.jpg}}     \begin{frame}     \end{frame}}          {\usebackgroundtemplate{%     \includegraphics[width=\paperwidth,height=\paperheight,keepaspectratio]{test.jpg}}     \begin{frame}     \end{frame}}          \end{document}      Slide 1: ![Slide 1](http://i.stack.imgur.com/L21lV.png) Slide 2: ![enter image description here](http://i.stack.imgur.com/5UUej.png) Link to test picture used


title: Automatically shorten living column title or have a linebreak

text: I have a long document that has several long chapters. Each chapter has a title which can be short or long (often it is very long). I noticed that if I use `\pagestyle{headings}` in the `scrreprt` class the long chapter titles extend into the page border. Is there a solution to this? I could imagine 3 options (I don't want to do it manually)   1. Specify a length e.g. `2/3 \textwidth` after which living column title is stopped and the remaining text is replaced by ...   2. Have a linebreak in the columntitle of the page   3. Change the font size to a smaller font so that even long chapter titles fit. Unfortunately, I could not find any hint on any of these options. Here is a small example:                   \documentclass[paper=letter,openright,numbers=noenddot,BCOR=1cm,toc=listof,captions=tableheading,%     headsepline=off]{scrreprt} %twoside     \setkomafont{captionlabel}{\bfseries}     \KOMAoptions{DIV=classic}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{scrpage2}     \usepackage[bitstream-charter]{mathdesign}     \usepackage[english]{babel}          \begin{document}     \pagestyle{headings}     \automark{chapter}     \chapter{Chapter with a short title}     \newpage     Some text...     \chapter{This is a chapter heading intended for the living column title with extra long text that includes many words that are short and long}     \newpage     Some text... and we notice that the living column title extends into the page border which is not nice.     \end{document}


title: Writing a table with equally spaced columns, based on the widest column

text: Friends, I'm trying to generate a table in which I have all columns equally spaced (same width). In my case, the width for all columns would be the width of the widest column of the table:               \documentclass{article}          \begin{document}          \begin{tabular}{ll}     a & b \\     c & Mary had a little lamb     \end{tabular}          \end{document}      Any hints? `:)`


title: How to draw this lines with tikzmark

text: I would like to draw lines to illustrate the lengths used with the package `enumitem` , so i create this MWE               \documentclass{article}     \usepackage[margin=1.5cm]{geometry}     \usepackage{tikz}     \usetikzlibrary{calc,tikzmark}     \usepackage{enumitem}     \setlength{\parindent}{0pt}     \begin{document}     \quad          \vfill     \begin{enumerate}[label=\arabic* -, leftmargin=2cm, labelsep= 1.5cm,itemindent=1cm]     \item text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text      \end{enumerate}     \vfill          \begin{tikzpicture}[remember picture, overlay]     \coordinate (left) at ($(current page.west)+(1.5,0)$);          \draw[red]($(left)+(0,-1)$)--($(left)+(2,-1)$)%        node[midway ,anchor=north]{\tiny leftmargin};     \draw[blue]($(left)+(3,-1.3)$)--($(left)+(2,-1.3)$)%        node[midway,anchor=north]{\tiny itemindent};          \draw[red]($(left)+(0,0.5)$)--($(left)+(1,0.5)$)%        node[midway,anchor=south]{\tiny labelindent};     \draw[blue]($(left)+(1,1)$)--($(left)+(1.5,1)$)%        node[midway,anchor=south ]{\tiny labelwidth};     \draw[red]($(left)+(1.5,0.5)$)--($(left)+(3,0.5)$)%        node[midway,anchor=south]{\tiny labelsep};     \end{tikzpicture}          \end{document}      And we get ![enter image description here](http://i.stack.imgur.com/dasIy.png) But this works only if we place list in the middle of the page, how can i improve this code with `tikzmark` so lines moves with the list , thanks.


title: How to display partial TOC (only one section at a time)?

text: I already know how to print an Outline with only the current section. What I'd like to do is to have an Outline slide with some extra info (for instance, a publication) below each section of TOC. I already tried doing it "by hand", but can't get the same formatting/style/bullets as in TOC. Example: Section 1   * extra info for section 1 not related to TOC Section 2   * extra info for section 2 not related to TOC A minimum working example follows:               \documentclass{beamer}          \mode<presentation>{       \usetheme{Warsaw}     }          \AtBeginSection[] {       \begin{frame}<beamer>{Outline}         \tableofcontents[currentsection,hideothersubsections]       \end{frame}     }          \begin{document}          \begin{frame}         I'd Like something like this (but with the same formating as the next frame):         \begin{enumerate}             \item Section A             \only<1>{                 \begin{itemize}                     \item some additional info about A                 \end{itemize}             }             \pause             \item Section B             \only<2>{                 \begin{itemize}                     \item some additional info about B                 \end{itemize}             }             \pause             \item Section C             \only<3>{                 \begin{itemize}                     \item some additional info about C                 \end{itemize}             }             \pause             \item Section D             \only<4>{                 \begin{itemize}                     \item some additional info about D                 \end{itemize}             }         \end{enumerate}     \end{frame}          \begin{frame}         \tableofcontents[pausesections,hideothersubsections]     \end{frame}          \section{Section A}          \subsection{Subsection A.1}          \begin{frame}         Test A.1     \end{frame}          \subsection{Subsection A.2}          \begin{frame}         Test A.2     \end{frame}               \section{Section B}          \subsection{Subsection B.1}          \begin{frame}         Test B.1     \end{frame}          \subsection{Subsection B.2}          \begin{frame}         Test B.2     \end{frame}               \section{Section C}          \subsection{Subsection C.1}          \begin{frame}         Test C.1     \end{frame}          \subsection{Subsection C.2}          \begin{frame}         Test C.2     \end{frame}               \section{Section D}          \subsection{Subsection D.1}          \begin{frame}         Test D.1     \end{frame}          \subsection{Subsection D.2}          \begin{frame}         Test D.2     \end{frame}               \end{document}


title: Alternating layout for every odd and even page (tikz frame with text in a flowframe)

text: \documentclass{article}     \usepackage{geometry}     \usepackage{fontspec}     \usepackage{flowfram}     \usepackage{tikz}     \usepackage{ifthen}     \usepackage{changepage}     \usepackage{ifoddpage}     \usepackage{lipsum}          \geometry{paperwidth=29.7cm,paperheight=7cm,margin=0cm}     \pagestyle{empty}          \newcommand{\pechafront}{         \newdynamicframe{29.7cm}{7cm}{0cm}{0cm}[front]         \setdynamiccontents*{front}{             \vfil\hfil             \begin{tikzpicture}                 \draw[color=black,very thick] (2.7,.93) rectangle +(24.3,5.14)                 (2.77,1) rectangle +(24.16,5)                 (3.77,1) rectangle +(.07,5)                 (25.97,1) rectangle +(.07,5);                 \node[rotate=-90] at (3.2,3.5) {\huge \thepage};                 \node[rotate=90] at (26.47,3.5) {\huge \thepage};             \end{tikzpicture}         }         \newflowframe{21.7cm}{4.9cm}{4cm}{.9cm}[frontframe]     }          \newcommand{\pechaback}{         \newdynamicframe{29.7cm}{7cm}{0cm}{0cm}[back]         \setdynamiccontents*{back}{             \begin{tikzpicture}                 \draw[color=black] (0,0) +(29.7,7)                 (3.77,1) rectangle +(22.16,5.12)                 (2.77,1) rectangle +(24.16,5.12);                 \node[rotate=90] at (3.43,3.5) {\huge \thepage};                 \node[rotate=-90] at (26.33,3.5) {\huge \thepage};         \end{tikzpicture}}         \newflowframe{21.7cm}{4.9cm}{4.0cm}{0.9cm}[backframe]     }          \sloppy          \checkoddpage     \ifoddpage         \pechafront     \else         \pechaback     \fi     \begin{document}     \lipsum     \lipsum     \end{document}      The pages render as if they are all odd. What am I doing wrong? EDIT: I'm running this under LuaLaTeX


title: Math symbols in plain TeX

text: 1. I would be much obliged if you cold tell me how can I make an arc over a letter (or a group of letters) in TeX. The command in LaTeX is               \stackrel{\frown}{AB}      but in TeX it proves to be useless.   2. How can I write in `$\cases{ ...}$` math symbols to look like in `$$...$$`? For example, `$\sum_a^b$` as compared to `$$\sum_a^b$$`. Thank you.


title: Label inside a code listing

text: Does anybody know how to use labels inside a code listing that it looks something similarly like this: ![labels inside a code listening](http://i.stack.imgur.com/8Pyzh.png) I know that it's easier to use the line number but I prefer using some labels.


title: How to make a recursive Latex macro with comma separated argument list

text: I would like to make a macro that takes two arguments, the second of which is a comma separated list and then produces a nested commutator of argument1 with each entry of argument2. I've been attempting to do this by looping over the values in argument2 and recursively calling a simple commutator macro, but I keep getting the following error:               ! TeX capacity exceeded, sorry [grouping levels=255].      I tried to use `etoolbox`'s `docsvlist`, but couldn't figure out how to make it do what I wanted. It seems like I have an infinite loop, or some problem with my def scheme, but I don't know what it is. Details:   Basic commutator macro:               \newcommand{\commut}[2]{\left[{#1},{#2}\right]}      Brute force nested commutator:               \newcommand{\qcommut}[5]{\commut{\commut{\commut{\commut{#1}{#2}}{#3}}{#4}}{#5}}      Attempt at automated version:               \makeatletter     \newcommand{\ncommut}[2]{       \def\mainArg{#1}       \newcommand{\argList}{#2}       \@for\i:=\argList\do{         \def\mainArg{           \commut{\mainArg}{\i}         }       }     }     \makeatother      I can call `\commut` and `\qcommut`, but `\ncommut` produces the error.               \begin{equation}       \commut{A}{B}       \qcommut{A}{B}{C}{D}{E}       \ncommut{A}{B,C,D,E} % desired usage     \end{equation}      Desired output: ![Desired Output](http://i.stack.imgur.com/1J9Gb.png)


title: How to make an xbar plot, with pgfplots, having different y tick labels on the left and right side y axis?

text: I am making an xbar plot with pgfplots. I want this plot to show the results from a test, where people in different age classes are given scores. For each of these age classes a single person is the winner. See the attached latex file containing the dataset "data.dat", with four columns: Age-interval, Y-position, Score, and Name. I want my xbar plot to have different y tick labels on, respectively, the left and the right side y axes. The left side y tick labels denotes the age intervals of the persons tested (20-30, 30-40,...), while the right side y tick labels should denote the winner in each of the age intervals (Peter, Jeff, ...). **Two questions** : (1) I am not able to make a left side and a right side set of y tick labels simultaneously. How can I do that? Adding two extra lines of code, for showing right side y tick labels (code block starting with "% (2) "), does not solve my problem, only shifting it from showing only the left side y tick labels to showing only the right side y tick labels (2) How do I prevent the plot title to overlap with the x tick labels? here is my code:               {\documentclass{article}     \usepackage{pgfplots}     \usepackage{filecontents}     \pgfplotsset{compat=1.3}          % test scores and person names     \begin{filecontents}{data.dat}     Age-interval        Y-Position         Score        Name     20-30               1                  15           Peter     30-40               2                  20           Jeff     40-50               3                  12           Steve     50-60               4                  24           John      \end{filecontents}          \begin{document}     \begin{tikzpicture}          \begin{axis}[         title = {Test score},         xbar,              bar width=2pt,         ytick=data,         width=8 cm,         height=5 cm,         xmin=-1,         xmax = 100,         xticklabel pos = upper,         tick align = outside,         %         % (1) add left side y tick labels         yticklabel pos=left,          yticklabels from table={data.dat}{Age-interval},         %         % (2) add righ side y tick labels         %    yticklabel pos=right,          %    yticklabels from table={data.dat}{Name},         %         ylabel={Age intervals (yr)},     ]     \addplot table [         y=Y-Position,         x=Score,      ] {data.dat};     \end{axis}          \end{tikzpicture}     \end{document}


title: date interpretation from numbers to regular

text: I was wondering if there exists such a package, or an option, to write the date in the form 31.1.2012 for example, and then have LaTeX present it as "January 31, 2012". I am actually using LyX and there is an "environment" to put date, However, it puts it in the same manner I am writing it, and for ease of writing I would like to write only numbers.


title: pdfpages, addtolist and list of tables

text: These may be separate questions, but the following MWE:               \usepackage{pdfpages}     ...       \addcontentsline{lot}{subsection}{\ref{tab:UserRoles} \textbf{User Roles}}       \includepdf[pages={-}, pagecommand={\label{tab:UserRoles}}, offset=0in -1in, addtolist={9, table, {The User Roles table}, tab:UserRoles}]{UserRolesTable}       ...      has several unexpected behaviors.   1. I get the following warning:              Package pdfpages Warning: There's something wrong with the entries of `addtolist'.     Not all entries were processed. Check `addtolist' [in the MWE]."          2. Probably due to the `\label` not being bound to the inserted pdf (in a table environment), my inserted PDF is numbered using the section, and not the expected "Table X" value.    3. The manually-inserted LoT line (which also uses the section number rather than the incremented table number) is not formatted like the other lines in the LoT - the number lines up, but the table caption itself is not aligned with the others in the list. The source PDF has no errors and displays correctly in the output PDF. PDFLaTeX -> BibTex * * * MWE:               \documentclass[11pt,letterpaper,twoside,final]{article}     \usepackage{pdfpages}     \begin{document}     \listoftables     \begin{center}     \textbf{Table \ref{tab:UserRoles} - The User Roles Table} \addcontentsline{lot}{subsection}{\ref{tab:UserRoles}      \textbf{User Roles}} % manual entry in ToC      \includepdf[pages={-}, pagecommand={\label{tab:UserRoles}}, offset=0in -1in, addtolist={9, table, {The User Roles table}, tab:UserRoles, lot}]{UserRolesTable}     \end{center}     \end{document}


title: \begin{flushleft} creates a blank page before title page

text: When using `flushleft`a blank page is added before my title page. I would like to remove this but am not sure how. I've read many of the similar "blank page" questions, but didn't find one related to my specific problem. When I remove \begin & \end{flushleft}, I don't get the extra blank page. Here is my code:               \documentclass[12pt]{article}     \usepackage{setspace}     \usepackage{graphicx}      \usepackage[letterpaper]{geometry}     \geometry{verbose,letterpaper,tmargin=2.54cm,bmargin=2.54cm,lmargin=2.54cm,rmargin=2.54cm}     \usepackage{lineno}%linenumbers          \begin{document}     \begin{spacing}{1.9}     \begin{flushleft}     \graphicspath{{Figures/}}          \title{Something}     \author{xxx}     \date{}     \maketitle          \linenumbers     \clearpage     \end{flushleft}     \end{spacing}     \end{document}


title: Scaling and positioning TikZ figures in equation environments

text: I am trying to use TikZ figures as part of an equation, but I am only able make either the positioning or the scaling appear correctly. For instance, giving my figures the correct size using "resizebox" makes them appear as follows (enlarged for ease of viewing): ![example](http://i.stack.imgur.com/CzJDR.png) If I specify the baseline, then it appears that the resizing is skipped.               \documentclass{standalone}     \usepackage{amsmath}     \usepackage{tikz}         \usetikzlibrary{calc}     \newcommand{\leftribbon}{%     \resizebox{!}{10pt}{     \begin{tikzpicture}%[baseline={($ (current bounding box) - (0,0pt) $)}]             \node (start) at (0,1) {};             \node (end) at (1,1) {};             \node (bottom) at (0.5,0) {};                  \path[color=black, line width=2pt] [out=180, in=-135] (bottom.center) edge (end.west);             \path[color=white, line width=6pt] [out=-45, in=0] (start.east) edge (bottom.center);             \path[color=black, line width=2pt] [out=-45, in=0] (start.east) edge (bottom.center);     \end{tikzpicture}     }%     }          \newcommand{\rightribbon}{%     \resizebox{!}{10pt}{     \begin{tikzpicture}%[baseline={($ (current bounding box) - (0,0pt) $)}]     \begin{scope}[xscale=-1]         \node (start) at (0.3,1) {};         \node (end) at (0.7,1) {};         \node (bottom) at (0.5,0) {};              \path[color=black, line width=2pt] [out=180, in=-135] (bottom.center) edge (end.west);         \path[color=white, line width=6pt] [out=-45, in=0] (start.east) edge (bottom.center);         \path[color=black, line width=2pt] [out=-45, in=0] (start.east) edge (bottom.center);     \end{scope}     \end{tikzpicture}     }%     }          \newcommand{\ribcup}{%     \resizebox{!}{10pt}{     \begin{tikzpicture}%[baseline={($ (current bounding box) - (0,0pt) $)}]     \begin{scope}[xscale=1]         \node (start) at (-0.5,1) {};         \node (end) at (0.5,1) {};         \node (bottom) at (0,0) {};              \path[color=black, line width=2pt] [out=0, in=-135] (bottom.center) edge (end.west);         \path[color=black, line width=2pt] [out=-45, in=180] (start.east) edge (bottom.center);     \end{scope}     \end{tikzpicture}     }%     }          \begin{document}         \[  \langle \leftribbon \rangle = -A^3\langle\ribcup\rangle \]     \end{document}


title: renewcommand for description

text: I have a document with many `\description` environments. All of them are defined like this:               \begin{description}[leftmargin=2.5cm,style=sameline]         \item[\texttt{foo}] bar          \item[\hspace{7mm}\texttt{sub}] inner     \end{description}      How can I use `\renewcommand` (or something similar) to not always have to write `[leftmargin=2.5cm,style=sameline]` and also have the argument of `\item` automatically be in `\texttt` and optionally be preceded by some space `\hspace{7mm}`? Other solutions are also greatly appreciated.


title: How to hide the navigation bar in LaTex beamer?

text: I am using LaTeX Beamer to prepare a presentation with lots of content. The navigation bar contains too many subsections, so as to occupying large spaces. See following screenshot: ![navigation bar occupying large spaces](http://i.stack.imgur.com/qwHgW.png) I tried `\setbeamertemplate{navigation symbols}{}`. This command could remove symbols on the bottom, but not the top navigation bar. I also tried `\setbeamertemplate{headline}{}`. However, this command only remove all contents in navigation bar, the navigation bar now look like this: ![enter image description here](http://i.stack.imgur.com/9dj2L.png) So how to hide the navigation bar? Or just hide the subsection part (right half)? Edited: I give a short but complete example of LaTeX codes:               \documentclass{beamer}          \mode<presentation>     {       \usetheme{Warsaw}       %\setbeamercovered{transparent}       \usecolortheme{seahorse}       %\usecolortheme{rose}       \usefonttheme[onlylarge]{structuresmallcapsserif}       \usefonttheme[onlysmall]{structurebold}     }          \newcommand*\oldmacro{}     \let\oldmacro\insertshorttitle % save previous definition     \renewcommand*\insertshorttitle{     \oldmacro \hfill  \leftskip=.3cm       \insertframenumber\,/\,\inserttotalframenumber}          \usepackage[english]{babel}     \usepackage{color}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{amsmath}     \usepackage{graphicx}     \usepackage{ifthen}     \usepackage[latin1]{inputenc}     \usepackage{times}     \usepackage[T1]{fontenc}     \usepackage{latexsym}     \usepackage{tipa}     \usepackage{makeidx}     \usepackage{graphicx}     \usepackage{bm}     \usepackage{mathrsfs}     \usepackage{ifpdf}     \usepackage{hyperref}          \begin{document}          %   if do not use navigation symbols (on the bottom), uncomment this     %\setbeamertemplate{navigation symbols}{}          %\setbeamertemplate{headline}     %{%     %\begin{beamercolorbox}{section in head/foot}     %\vskip2pt\insertnavigation{\paperwidth}\vskip2pt     %\end{beamercolorbox}%     %}          \title{C++}          \author{Author}          \date{\today}          %\AtBeginSection[] %     %{     %  \begin{frame}<beamer>     %    \frametitle{Outline}     %    \tableofcontents[currentsection,subsectionstyle=show/show/hide]     %  \end{frame}     %}          \AtBeginSubsection[] %     {       \begin{frame}<beamer>         \frametitle{Outline}         \tableofcontents[currentsection,currentsubsection,subsectionstyle=show/shaded/hide]         %\tableofcontents[currentsubsection,subsectionstyle=show/shaded/hide]       \end{frame}     }          % If you wish to uncover everything in a step-wise fashion, uncomment     % the following command:     %\beamerdefaultoverlayspecification{<+->}          \begin{frame}       \titlepage     \end{frame}          \begin{frame}       \frametitle{Outline}       %\tableofcontents[pausesections,subsectionstyle=hide]       \tableofcontents[currentsection,sectionstyle=show,subsectionstyle=hide]       % You might wish to add the option [pausesections]     \end{frame}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %   main               \section{STL}          \subsection{vector}     \begin{frame}[t]     \frametitle{STL} %     \begin{itemize}     \item STL.     \end{itemize}     \end{frame}          \subsection{list}     \begin{frame}[t]     \frametitle{STL} %     \begin{itemize}     \item STL.     \end{itemize}     \end{frame}          \subsection{stack}     \begin{frame}[t]     \frametitle{STL} %     \begin{itemize}     \item STL.     \end{itemize}     \end{frame}          \subsection{queue}     \begin{frame}[t]     \frametitle{STL} %     \begin{itemize}     \item STL.     \end{itemize}     \end{frame}                         \subsection{map}     \begin{frame}[t]     \frametitle{STL} %     \begin{itemize}     \item STL.     \end{itemize}     \end{frame}               \subsection{set}     \begin{frame}[t]     \frametitle{STL} %     \begin{itemize}     \item STL.     \end{itemize}     \end{frame}               \subsection{iterator}     \begin{frame}[t]     \frametitle{STL} %     \begin{itemize}     \item STL.     \end{itemize}     \end{frame}          \end{document}


title: How to draw nested nodes?

text: I want to draw the following png graph generated by the `dot` program. After some quick research I decided to give a try to matrix nodes. Using it I successfully created the first Pipeline block. Unfortunately when trying to nest the BandPassFilter I reached a compilation error message saying: > alchemy.tex:541: Package pgf Error: You cannot nest pgfmatrix environments, > yet. I am looking here for the right direction to follow in order to draw such graphs. It's worth noting that in this case the depth is only 2 but I need a solution for any depth. Note: I am not looking for the tikz code drawing this graph but only for help to get started. ![Expected result](http://i.stack.imgur.com/w6MZH.png)


title: How to change my default TeX editor under Mac OS X?

text: I'm using Mac OS X and the default tex editor is TexWorks, but I want to utilize TexShop as the default one.


title: Class relationship between two given .cls file?

text: The larger context of my question is about installing a document class in Lyx. I've done all the usual 'texhash' and 'reconfigure' thing, but just realize that I need to create a layout in Lyx for this `acmsmall` document class, which leads me to the following question. According to this, I need to create a layout file like:               #% Do not delete the line below; configure depends on this           #  \DeclareLaTeXClass[acmsmall]{ACM Small}          # Read the definitions from article.layout     Input article.layout      However, I am not sure `acmsmall.cls` is a descendent of `article.cls`, or any other `.cls` file. Is this information embedded in `acmsmall.cls`? If so, where can I find it?


title: How to get header and footer over ToC, LoF and Nomeclature?

text: I would like to know how we include header and footer over Table of Contents, List of Figures and Nomenclature? Do we need to renew any command? or any package is used to do that? Sample script would be helpful. I also want to get rid of page count on nomenclature page. Instead I want to start it on Introduction page. I am also interested to know whether we can put header and footer on Ist page of chapters? The Sample Script is:               \documentclass{report}     \usepackage{titling}     \usepackage{fancyhdr}     \usepackage{lipsum} % for dummy text only          % Nomenclature     \usepackage{nomencl}     \makeglossary          \makeatletter          \newcommand\ackname{Acknowledgements}       \newenvironment{acknowledgements}{%           \begin{center}%             \bfseries \ackname             \@endparpenalty\@M           \end{center}}%          {\par}           \newcommand\abname{Abstract}       \newenvironment{abstracts}{%           \begin{center}%             \bfseries \abname             \@endparpenalty\@M           \end{center}}%          {\par}               % These commands follow the titling package format for titles     % They define user commands to format the subtitle     \newcommand\presubtitle[1]{\gdef\@presubtitle{#1}}     \newcommand\postsubtitle[1]{\gdef\@postsubtitle{#1}}     % This command takes the subtitle as its argument, and uses the titling command     % \maketitlehookb plus the previously defined formatting commands to insert     % the subtitle into the titlepage. It also generates \thesubtitle for subsequent use     \newcommand\subtitle[1]{%       \renewcommand{\maketitlehookb}{\@presubtitle#1\@postsubtitle}       \newcommand\thesubtitle{#1}}     \makeatother     % Now we define the formatting for the subtitle     \presubtitle{\begin{center}\Large} % change this as needed     \postsubtitle{\end{center}}     % Now enter the regular title information, with the new \subtitle command     \title{My Thesis Title}     \author{A.M. Author}     \subtitle{My subtitle}          \lhead{\begin{tabular}{@{}l}\thetitle\ -- \thesubtitle\\\theauthor\end{tabular}}     \chead{}     \rhead{\begin{tabular}{r@{}}\leftmark\\\today\end{tabular}}     \lfoot{}     \cfoot{\thepage}     \rfoot{}     % Set the width of the header rule. Make 0pt to remove the rule.     \renewcommand{\headrulewidth}{.5pt}     \renewcommand{\footrulewidth}{0.1pt}     % Make the head height match the size of the header     \setlength{\headheight}{24pt}     \pagestyle{fancy}     % Remove "Chapter" from the marks     \renewcommand{\chaptermark}[1]{%       \markboth{\thechapter.\ #1}{}}     % These commands set up the headers. They are set up for even and odd pages the same     % Check the fancyhdr documentation for information on how to set them differently     % for odd and even pages                         \begin{document}          \lipsum[1]          \pagenumbering{roman}          \lipsum[1]                    \tableofcontents     \listoffigures     \printnomenclature     %% Print the nomenclature     \addcontentsline{toc}{chapter}{Terminology/Notation}          \setcounter{page}{1}     \pagenumbering{arabic}          \lipsum[1]               \appendix     \lipsum[1]          \bibliographystyle{plainnat}     \renewcommand{\bibname}{References} % changes default name Bibliography to References          \end{document}


title: Custom LaTeX commands involving auxiliary files

text: Can someone with low-level LaTeX knowledge please help me create new customized commands? The commands should be named `\storeitem` and `\typesetitems`, and they should work like this:               \typesetitems     \storeitem{hello}          some other stuff          \typesetitems     \storeitem{world}      This is what the commands should do:   1. On first run of LaTeX, the `\storeitem` commands should put their arguments into an auxiliary file, in this case "hello" and "world".   2. Each instance of `\typesetitems` (which is assumed to occur the equal number of times as the `\storeitem` command - twice in the above example) **should put all the stored items in a regular bulleted list (itemize) with a normal font, with the exception that the N-th occurrence of`\typesetitems` should typeset the N-th item in an italic font.** Thus, the results of the above commands would be something like: ![items](http://i.stack.imgur.com/x4kgP.png) A few other things that should be included if possible, for more friendliness and robustness:   1. If the number of occurrences of `\storeitem` and `\typesetitems` don't match, produce a warning. (And do something graceful with the "overflowing" commands, which could be either of them.)   2. If one edits the arguments of existing `\storeitem`s, adds new `\storeitem`s, or deletes existing `\storeitem`s, produce some kind of a "Labels changed, run again" warning message. (Similar to the one that LaTeX does by default when labels have changed.)   3. Maybe later I may not want itemize. Maybe I want numbered lists. Or maybe I do not want lists at all. And maybe I want to do something other to the N-th item than italicize it. For these reasons, it should be rather straightforward to edit the custom commands to suit one's needs.


title: How to make a boat symbol in latex?

text: I would like to make a motorboat/boat/raft/ship symbol in LaTex but cannot find a command for one. I know there is `\Plane` in `bbding` dingbats which gives the symbol for plane. But I dont see anything for boat or similar. Any help on this will be much appreciated.


title: How to search in the math scope of a tex file only using texniccenter?

text: Say I want to look for occurances of a variable Y in a .tex file in texniccenter. Then it would make sense to restrict the search to occurances of Y that occur in a math environment. Thus the Y in               \begin{align}     Y=X^2     \end{align}      should be found, but the Y in               Ay, ay, sir!      should not. Is this possible?


title: Nice-looking $x_i^j$

text: When I write `$x_i^j$`, the `j` is very high up, and it looks ugly. (This problem is especially apparent in the `New Century Schoolbook` font.) ![$x_i^j$](http://i.stack.imgur.com/uqI9M.png) I know that TeX is capable of automatically lowering it, since for example, `$x_i^1$` looks fine. Is there a clean way to fix this?               \documentclass{article}     \usepackage{fouriernc} % use the New Century Schoolbook font     \begin{document}     Contrast $x_i^j$ to $x_i^1$.  Why is the $j$ so high up?     \end{document}


title: Spacing capitals in section headings

text: I'm using `titlesec` to customise my section headings. I want to have my subsections in capitals, which I can achieve with the `\uppercase` function, but all typographic style guides suggest that caps should have increased space. The `microtype` package can apply increased letter spacing, according to: Enlarging tracking (= letter spacing) The thread mentions a command of `\textls` which I have tried inserting into the titlesec options, but TexShop throws up an error when typesetting. Alternatively, using the switch `\lsstyle` doesn't work either. Here's MWE:               \documentclass{article}          \usepackage[letterspace=150]{microtype}          \usepackage{titlesec}     \titleformat{\section}{\large}{\thesection}{1em}{}     \titlespacing{\section}{0pt}{2.5ex}{2.5ex}     \titleformat{\subsection}{\small\uppercase\lsstyle}{\thesubsection}{1em}{}     \titlespacing{\subsection}{0pt}{2.5ex}{0ex}     \titleformat{\subsubsection}{\sffamily\itshape}{\thesubsubsection}{1em}{}     \titlespacing{\subsubsection}{0pt}{1.5ex}{0ex}     \titleformat{\paragraph}[runin]{\normalfont\normalsize}{\theparagraph}{1em}{}     \titleformat{\subparagraph}[runin]{\normalfont\normalsize}{\thesubparagraph}{1em}{}          \title{Minimal Working Example}     \date{}     \author{Author}          \begin{document}     \maketitle          \section{Section 1}     Content          \subsection{Subsection, my friend}          \end{document}       Edit: am using XeLaTeX in my non-MWE to access system fonts. The error I get (see comment to an answer below) occurs in XeLaTeX.


title: What exactly does the \begin{document} command trigger?

text: Let us consider these two files first. * * *               \documentclass{article}          \parindent 0.0mm          \hyphenpenalty 500     \tolerance 700          \usepackage{lipsum}               \begin{document}          \lipsum[1-10]          \end{document}      * * *               \documentclass{article}               \usepackage{lipsum}          \begin{document}          \parindent 0.0mm          \hyphenpenalty 500     \tolerance 700          \lipsum[1-10]          \end{document}      * * * These two files have identical contents except some commands have been used before and after `\begin{document}`. However, they produce completely identical outputs. Now, if we want to add a `\baselineskip` command, it will work if it is used only after the `\begin{document}`. Again there are commands which are allowed only in the preamble. `\usepackage` is the most common of them. Definitely we understand that `\begin{document}` starts an environment, likely the highest or most major one, you know what I mean. _(Tried searching for something like`\newenvironment{document}` in latex.ltx. Was not successful. May be I am not looking at the right place.)_ But what exactly does this command do? Please answer these two queries,   1. What exactly the \begin{document} command triggers? What are the things it turns on?   2. Why some commands are allowed only in the preamble? Definitely other relevant issues will come in with the answers.


title: Incorrect placement of equations, spanned and centered

text: The following set of equations, produce an output which is justified in center (although I haven't set such an option) and also the equations are spanned on two columns (which again I didn't set such option)               \begin{alignat}{2}        &E_{\mathrm{hit-L1}} = E_{L1}(\mathrm{tag+data}) \\        &E_{\mathrm{miss-L1}} =  E_{L1}(\mathrm{tag}) \\        &E_{\mathrm{hit-local-L2}} = E_{L2}(\mathrm{tag+data}) \\        &E_{\mathrm{miss-local-L2}} = E_{L2}(\mathrm{tag}) \\        &E_{\mathrm{hit-peer-L2}} = E_{\mathrm{dir}}+E_{\mathrm{router}}+E_{L2}(\mathrm{tag+data}) \\        &E_{\mathrm{miss-peer-L2}} = E_{L2}(\mathrm{tag}) + E_{\mathrm{dir}} \\        &E = E_{\mathrm{hit-L1}} + (1-h_{1}) \times (E_{\mathrm{miss-L1}}& \\             h_{2} \times E_{\mathrm{hit-local-L2}} + (1-h_{2}) \times& \\             \big( E_{\mathrm{miss-local-L2}} + h_{3} \times E_{\mathrm{hit-peer-L2}}& \\             +(1-h_{3}) \big( E_{\mathrm{miss-peer-L2}} + E_{mem} \big) \big) )      \end{alignat}      and the output looks like ![enter image description here](http://i.stack.imgur.com/Y6NER.jpg) I would like to have one columned equations and the numbers should be in front of them (right side of the equations). Also, since I have used `\\\`, the last big equations should be paste in multiple lines and not spanning to two columns.


title: Move list of acronyms to the right

text: I'm using the `acronym` package and I want to move the list of acronyms a bit to the right. I have the list in an independent `.tex` file and the code I use is:               \documentclass{article}     \usepackage[printonlyused]{acronym}     \begin{document}     \section{Description}     \acs{MLS}, \acl{TES}, \acf{HiRDLS}.     \section*{List of Acronyms}     \begin{acronym}     \acro{MLS}{Microwave Limb Sounder}     \acro{HiRDLS}{High-Resolution Dynamics Limb Sounder}     \acro{TES}{Tropospheric Emission Sounder}     \end{acronym}     \end{document}      I have played with `\hbox` and `\hspace` with no results. Anyone knows about it? Edit: Now with a compilable example.


title: Compressing with Ghostscript - transparency turns cyan

text: I'm about to finish my paper on fractals, and because fractals can get very detailed I'm including a lot of EPS files at high DPI and lots of pictures... And that way the 40 pages long PDF is nearly 38MB big. I'm using Ghostscript to bring down the filesize, the command is:               "C:\Program Files\gs\gs9.10\bin\gswin64c.exe" -sDEVICE=pdfwrite -dCompatibilityLevel=1.5 -dPDFSETTINGS=/prepress -dNOPAUSE -dQUIET -dBATCH -sOutputFile=small.pdf main.pdf      Which results in a file size of about 10 MB. But here's the catch, every image that is NOT an EPS and has transparency, the transparent parts get colored cyanish.. ![Screenshot of the compressed PDF](http://i.stack.imgur.com/gvezh.png) The screenshot shows the pdf outputted by ghostscript. The xelatex generated PDF however looks just fine. The image is a gif converted to png from Wikipedia Sample code:               \documentclass[fontsize=12pt,a4paper]{scrreprt}     \usepackage[       paper=a4paper,       left=30mm,       right=40mm,       top=30mm,       bottom=25mm,       includefoot,       foot=\baselineskip,       bindingoffset=0mm]{geometry}          \usepackage[ngerman]{babel}     \usepackage{graphicx}     \usepackage{fontspec}     \usepackage{amssymb}     \usepackage{amsmath}     \usepackage{tabularx}     \usepackage{colortbl}     \usepackage{booktabs}     \usepackage{wrapfig}     \usepackage{float}     \usepackage{caption}     \usepackage{pdfpages}     \usepackage[babel,german=guillemets]{csquotes}     \usepackage{url}     \setmainfont{Calibri}     \linespread {1.5}     \title{Something}     \author{Someone}     \date{2013}     \DeclareGraphicsExtensions{.pdf,.png,.jpg,.eps}     \begin{document}     \maketitle     \newpage     \tableofcontents     \newpage     \chapter{Einleitung}     \begin{figure}[H]     \centering     \includegraphics[scale=0.3]{antenne}     \caption[Quelle: \protect\url{http://de.wikipedia.org/wiki/Fraktalantenne}]{Patent einer Fraktalen Antenne}     \end{figure}     \end{document}      I know that this is not 100% TeX, but maybe some of you are familiar with Ghostscript...


title: add section to toc with number

text: I have some scanned pdf documents which I want to put together in a latex file and structure them with sections which appear only in the TOC. This has the advantage, that I can jump to the page using hyperref. However with this code only text is added to the toc, but I would like them to be numbered as if I had written a normal \section.               \phantomsection\addcontentsline{toc}{chapter}{SI-System}     \includepdf[pages=1-3,pagecommand={\thispagestyle{plain}}]{02-SI.pdf}


title: Putting labels inside section headings

text: I usually work with LyX, and when I want to label a section (in order to reference it later), I put the label inside the section heading. This usually works, but recently I tried to create an article using the "Econometrica article" layout, and got a compilation error:               ! Missing control sequence inserted.     <inserted text>                      \inaccessible      l.4 \section{\label{sec:The-Model}The Model}      Here is a MWE:               \documentclass[english]{ectaart}     \usepackage{babel}     \begin{document}     \section{\label{sec:The-Model}The Model}     \end{document}      (Note: the Econometrica layout comes with LyX installation in an Unavailable status, until one installs the ectaart.cls file).


title: How to pick a specific symbol from a specific font?

text: Using LuaLatex, I need two very specific symbols from two very specific fonts, namely from the ZapfDingbats and the WingDings font. I understand how I could use the `fontspec` package to set those fonts as standard fonts for my document. But for obvious reasons, I don't want that. How do I pick a _specific_ symbol from a _specific_ font (with LuaLatex)? While still using PDFLatex, I used the `pifont` package to get the Dingbats character:               \documentclass{article}     \usepackage{pifont}     \begin{document}     \ding{113}     \end{document}      Doesn't work for WingDings, though, which is why I switched to LuaLatex. However, not only did I understand that using such "font packages" is deprecated with LuaLatex, but I also don't have a clue how I'd go about picking a specific symbol from the WingDings font...


title: Is there a `sty2dtx` for LaTeX3 syntax?

text: `sty2dtx` is a CLI tool to convert a commented style file into a Documented TeX file (`dtx`). It was written and works wonderfully for LaTeX2e packages, but `expl3` offers a lot of happy times for package authors. Unfortunately, `expl3` also brings with it some hitherto unconventional syntax, such as underscores and colons in control sequences. `sty2dtx` doesn't seem to like that, (or more appropriately, `ltxdoc` doesn't). Is there a descendant of `sty2dtx` (or an undocumented option, perhaps) that works with LaTeX3 syntax?


title: Is it possible to create red/blue 3d color in LaTeX?

text: Is it possible to create a red/blue 3d effect in LaTeX using a preexisting package? If not, would anybody have any insight into how to go about this? I am planning to make a beamer presentation on 3d effects, and the ability to have a 3d(even if it is gimickey) would be fun. Link on red/blue 3d http://en.wikipedia.org/wiki/Anaglyph_3D


title: Footnote and square brackets in biblatex

text: I'm a TeX beginner and I've been trying to sift through the `biblatex` manual in order to get the citation style I want, but with very little luck. What I have now is this:               \usepackage[         natbib=true,         sortcites=true,         block=space,         bibstyle=numeric,         citestyle=nature     ]{biblatex}      But what I want is this: Square brackets around the citation number on each citation in the text. I want the actual bibliography data to appear in both the bibliography section AND as a footnote on the page with the citation, with the "[n]" preceding it. Does anyone know how to do this? Am I wrong to attempt `biblatex`, which seems very very complicated?


title: Why does the list of recent contributions contain exactly two boxes?

text: In the transcript of               \nonstopmode     \tenrm     \vsize=2cm          \output={\shipout\vbox{       \showlists       \unvbox255     }}          \hbox{blah}     \hbox{blah}     \hbox{blah}     \hbox{blah}     \hbox{blah}     \hbox{blah}     \hbox{blah}     \hbox{blah}     \hbox{blah}          \bye      the `\showlists` in my output routine gives me in each except the last iteration:               ### recent contributions:     \glue(\baselineskip) 5.05556     \hbox(6.94444+0.0)x18.88895     .\tenrm b     .\tenrm l     .\tenrm a     .\tenrm h     \glue(\baselineskip) 5.05556     \hbox(6.94444+0.0)x18.88895     .\tenrm b     .\tenrm l     .\tenrm a     .\tenrm h     prevdepth 0.0      Why are there two of the `hbox`-es and not three or one (which I'd expect most)?


title: Line breaks of long URLs in bibliography?

text: I have some long URLs which doesn't contain special "line break characters" like "-" or "/". How can I automatically break these URLs?               \documentclass{scrreprt}          \usepackage[ngerman]{babel}                         \usepackage[latin1]{inputenc}                     \usepackage[T1]{fontenc}     \usepackage[backend=biber]{biblatex}     \usepackage{url}     \usepackage{dingbat}  % for \carriagereturn symbol     \makeatletter     \g@addto@macro{\UrlBreaks}{\UrlOrds}     \g@addto@macro{\UrlBreaks}{%     \do\/\do\d%     }     \makeatother          \begin{filecontents}{bachelorarbeit_lit.bib}     @ONLINE{java96,         author = {{Joe Black}},         title = {Foobar 1.0},         year = {1996},         month = {1},         url = {http://www.aaa.bb.cccc.dh/uploads/dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd.pdf},         urldate = {2011-03-02},         sortname = {Sun},         keywords = {www}     }     \end{filecontents}          \bibliography{bachelorarbeit_lit}          \begin{document}     Test \cite{java96}     \printbibliography     \end{document}      **edit** I don't know why but it still doesn't work. Is there an option to automatically break long URLs. I don't care where the break is but it should be done automatically. Even if I manually specify the "breaking character" it doesn't work (as the example shows).