title: Changing font size of captions in figures

text: I'm using IEEEtran class for my conference publication in latex. The guideline says that the captions for figures should be in font size 8. I tried all these methods mentioned in this forum but none worked. Can someone guide me on this please. I found out that the problem is with the figures. The default IEEEtran is somehow being overwritten. http://rauhut.ins.uni-bonn.de/bare_conf.tex               \begin{figure}[tb]     \subfloat[figure A] {     \includegraphics[width=0.24\textwidth]{A}     }     \subfloat[figure B] {     \includegraphics[width=0.25\textwidth]{B}     }     \caption{ this is the caption}     \label{fig:room}     \end{figure}      The preamble is               \usepackage[caption=false]{caption}     \usepackage[font=footnotesize]{subfig}


title: Reference line in document's own source code

text: I am commenting on a LaTeX document (with `todonotes`), and I would like to put a reference to a line in the source code, writing e.g.: > See the code around line 123 of foo.tex to please fix this ugly equation. `foo.tex` itself is included into a `main.tex` document, which contains the document's head and `\include` statements to all other document parts. Is such a thing possible?


title: cmex bold font missing

text: I am not able to find the bold variant of `cmex10` font in Type 1 format. Really it is missing in all common TeX distributions? I know that this variant was not included in Knuth's Computer Modern family. Thus there are no MF sources originally made by Knuth. But there is a modified MF source `cmexb10.mf` by Sami Sozuer (August 10 1994). Next, there were many projects to convert MF sources (specially CM) to Type1. But `cmexb10.mf` was never converted. Is it true? What does the macro package (such as LaTeX) when a short math formula have to be typeset in Computer Modern in title ( _i.e._ in boldface, the `\int` symbol is used here, for example)? I suppose LaTeX without unicode support and with outline fonts in output (pdfLaTeX based on pdftex with PDF output). The `\int` symbol is typeset from what font in such case? I mean that it is very common situation thus somebody have solved it. Edit: Thank for the answer, but it is a response only to one part of my question: OK LaTeX doesn't solve the bold cmex by its default macros, the `\DeclareFontShape` must be used directly. The result is bitmap font which uses the `cmexb10.mf` file. But here is the second part of my question: Is is possible to find this type of font in next projects with Type1 CM fonts? I mean LM fonts, CMsuper etc... I belive that the authors of such font projects didn't repeat the same mistake as Knuth: to miss the bold variant of one of the basic four math-family fonts (O=cm, 1=cmi, 2=cmsy, 3=cmex). But I am not able to find it. The solution with the cmexb10 bitmap fonts is very poor: the bitmap fonts are commonly unacceptable in PDF and the font generation process must be started during TeX run. This may bring a trouble, for example in web based TeX distributions where no forked processes from TeX are permitted.


title: number and size of slices in a chart with tikz

text: In this chart I can determine the number of slices, but not the size of slices. How to determine the size of each slice ? Thanks for your help               \documentclass{article}     \usepackage[paperheight=30cm,paperwidth=35cm,margin=1in,heightrounded]{geometry}     \usepackage{tikz}     \usetikzlibrary{calc}     \begin{document}     \thispagestyle{empty}     \fbox{\begin{tikzpicture}[scale=0.6] % pour rester dans la page     % center     \path  (0,0) coordinate(A);     % circles     \foreach \rr in {12,...,25}{       \draw  (A) circle (\rr);     }     \def\pp{4} % nb of slices     % rays     \foreach \aa in {1,...,\pp}{       \draw ($(A)+(\aa/\pp*180:12)$) --  ($(A)+(\aa/\pp*180:24)$);           }     \end{tikzpicture}}


title: Is there a way to reference your numbered equations?

text: Here is an excerpt document               \begin{align}     f(x) &= g(x) + h(x)//     &= 3x + 8x^2 + 1//     &= 3 + 8 + 1//     \end{align}      So when I compile this (assuming this is the only thing I Have), LaTeX is going to number the lines 1,2,3. I want to be able to reference those lines because in the future, I may add more \equations or more \aligns and I may put them before or after. Is there a way to reference the lines without manually typing $(1)$, $(2)$?


title: How can I have different caption delimiters for captions and contcaptions?

text: I'm using the memoir class and have a figure that is continued on the next page. The markup is roughly this:               \captiondelim{: }          \begin{figure}       % ...       \caption{Foo bar}     \end{figure}          \begin{figure}       % ...       \contcaption{(Continued)}     \end{figure}      This results in two figures with the captions > Figure 1: Foo bar and > Figure 1: (Continued) Is there any chance to change the caption delimiter (automatically) for "contcaption"s, such that the result would be (the colon must still be there for normal captions though): > Figure 1 (Continued) I tried to understand what the `\concaption` command actually does, but it didn't look like there was a simple solution...


title: Grouping items onto the same line to avoid wrapping

text: I am authoring a poker-related document and am using the following commands to allow me to display cards:               % Suit image adjustments:     \newcommand{\suit}[1]{\includegraphics[width=8pt, height=8pt]{#1}}          % Commands to display suit only.     \newcommand{\heart}{\suit{../res/heart_26x26.png}}     \newcommand{\club}{\suit{../res/club_26x26.png}}     \newcommand{\spade}{\suit{../res/spade_26x26.png}}     \newcommand{\daimond}{\suit{../res/daimond_26x26.png}}          % Commands to display both rank and suit.     \newcommand{\ofheart}[1]{\textcolor{red}{#1} \heart}     \newcommand{\ofclub}[1]{\textcolor{black}{#1} \club}     \newcommand{\ofspade}[1]{\textcolor{black}{#1} \spade}     \newcommand{\ofdaimond}[1]{\textcolor{red}{#1} \daimond}      This works as intended and I am pleased with the results -- however, when cards get wrapped onto a new line I sometimes find that ranks get separated from their suits. Is there any way to "group" items so that they get wrapped onto new lines together?


title: Texmaker - autocomplete problem

text: Is there a way to stop Texmaker from auto-putting the completion tag of every command when I use autocomplete? Like `\begin{document}` and I press enter in the auto-complete and it includes the `\end{document}`. Is there a way to switch this off without switching off auto-complete?


title: Plain TeX macros contains \par as parameter delimiter, but doesn't work with \obeylines, why?

text: I just wanted to format a `.csv` file, so I do a test (1), shown as below:               \global\let\xpar=\par     \def\format#1,#2,#3\par{$#1\times #2=#3$\xpar}     \begingroup     \everypar={\format}\obeylines%     11,2,22     13,9,117     a,b,c     \endgroup     \end      but it doesn't work, TeX complain that               ! File ended while scanning use of \format.     <inserted text>                  \par       so I remove `\obeylines`, do another test (2):               \global\let\xpar=\par     \def\format#1,#2,#3\par{$#1\times #2=#3$\xpar}     \begingroup     \format 11,2,22          \format 13,9,117          \format a,b,c          \endgroup     \end      it works fine. Who can tell me where is wrong is test (1)?


title: Longtable, landscape in tufte-latex

text: I am using `tufte-latex` to write a document. I want to include a table which has many columns and rows in the document. For this purpose I am using `longtable` and `landscape` environments to produce the desired result. But what is happening is that since `tufte-latex` uses margin space on right had side for notes, figures and tables, in case of a longtable this space is not utilised. Since I am using `landscape` mode it appears there is a lot of white space at the bottom of the page. And the text overflows to the next page, even when there is space on the same page. Somehow the the margin space is not being used by the table. Please see the attached image to see what I mean. ![Longtable and Landscape in tufte-latex](http://i.stack.imgur.com/LIept.png) Is there any way in which the entire width of the page can be used for the landscaped table? A minimum working example is appended below:                  \documentclass[a4paper]{tufte-book}     \usepackage{booktabs}     \usepackage{tabularx}     \usepackage{longtable}      \usepackage{lscape}     \usepackage{colortbl}          \begin{document}          \begin{landscape}     \small          \begin{longtable}{@{}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{1cm}p{5cm}p{4cm}p{5cm}}     \caption{Survey data from a  Mathematics textbook.}     \label{tba-math-5}\\          \hline     \textbf{Chapter}&\textbf{Page}&\textbf{Figure       No.}&\textbf{Caption}&\textbf{Legend}&\textbf{Graph}&\textbf{Description}&\textbf{Data} &\textbf{Comments}\\          \hline          \endfirsthead     \hline          \textbf{Chapter}&\textbf{Page}&\textbf{Figure No.}&\textbf{Caption}&  \textbf{Legend}&\textbf{Graph}&\textbf{Description}&\textbf{Data}    &\textbf{Comments} \\          \hline     \endhead     \hline \multicolumn{9}{r}{\emph{Continued on next page}}     \endfoot     \endlastfoot          12&159&NA&NA&Yes&Bar Graph&Bar graph in a primitive form, tally     used for     counting and also as a legend. Investigative     questions to be answered     by looking at the chart.&Number of     different     favourite pet animals of children in form of a     table.&This is a good     introduction to bar charts, where number     count in form     of tally marks is used for counting and hence as     a measure of     height of a particular variable. \\     12&161&NA&NA&Yes&Bar Graph&Bar graph in a primitive form, tally     used for     counting and also as a legend. Investigative     questions to be answered     by looking at the chart.&Number of     different     vehicles passing a street in form of a table.&Follow     up from the     previous task. Here also number count in form of     tally marks is used for counting and hence as a measure of height     of a particular variable. The     follow up task asks students to     collect data about     trees in their colony and make a tally-bar     chart for the     data. \\     12&163&NA&NA&Yes&Pie Chart&Pie chart introduced as a Chapati chart     and     numbers to be matched on pie chart from table. It also     asks them investigative questions to be answered using such a     chart.&Number of children who     help most in house work in form     of     table.&This activity introduces students to pie charts. The     follow up task     asks students to collect data about what do     their friends like     to do after school and make a table from     this data. Does not     tell students how to make a pie chart. \\     12&165&NA&Yes&NA&Bar Graph&Bar graph showing temperature of 4     cities in     Summer and Winter. Questions to be answered by     studying these     graphs. The Y-axis has temperature in degree     Centigrade,     while X-axis has cities.&Data directly in the bar     graph, not shown     in form of table. No Source given. &A good     introduction to     bar graphs, but students are not told how to     make such a     chart. The follow up activity asks students to     collect data about     temperature of cities from newspapers or     television and     make a bar chart. The students are to ask     questions based on     the charts they draw to their peers. Also     students are     encouraged to relate the temperatures to     geographical location     of the cities. \\     12&168&NA&NA&NA&Line Graph&Line / point graph showing length of plant     in terms of days. The points are plotted  from a table given for the     data. The X-axis has number of days, and Y-axis has length of plant in     centimeters.&Data of growth of plant as a function of days given in     form of a table. The data is from observing of plants of moong     seeds. &Students are supposed to draw similar graph and check if their     graph matches the one in the textbook. Investigative questions to be     answered based on the graph. \\     \bottomrule          \end{longtable}          \end{landscape}          \end{document}


title: Sort index entries

text: This question is similar to others, but I could not find an answer that actually works for me. This is my document:               \documentclass[12pt,a4paper]{book}     \usepackage[utf8x]{inputenx}      \usepackage{palatino}     \usepackage{slantsc}     \linespread{1.2}            \usepackage[LGR,T1]{fontenc}     \usepackage[english,german,polutonikogreek,italian]{babel}     \usepackage{xcolor, colortbl}     \usepackage{multicol}     \usepackage{pdfpages}      \usepackage{hhline}     \usepackage{graphicx}     \usepackage{xcolor}     \usepackage{eso-pic}     \usepackage{epstopdf}     \usepackage{longtable}     \usepackage{booktabs}      \usepackage{tabularx}      \usepackage{array}     \usepackage{siunitx}     \usepackage{rotating}     \usepackage{chngpage}      \usepackage{calc}      \usepackage{amssymb}     \usepackage{amsmath}     \usepackage{subfig}     \usepackage{caption}     \usepackage{epigraph}     \usepackage{slashed}     \usepackage{textcomp}     \usepackage{fancybox}     \usepackage{pdflscape}     \usepackage{color}     \usepackage{verse}     \usepackage{teubner}     \usepackage{parallel}     \newcommand\textsubscript[1]{\ensuremath{{}_{\text{#1}}}}     \newcommand\textstyleFootnoteanchor[1]{\textsuperscript{#1}}     \newcommand\textstyletxt[1]{#1}     \newcommand\textstyleDefaultParagraphFont[1]{#1}     \makeatletter     \newcommand\arraybslash{\let\\\@arraycr}     \makeatother     \setlength{\skip\footins}{0.718cm}      \renewcommand\footnoterule{     \vspace*{-0.018cm}     \setlength     \leftskip{0pt}     \setlength     \rightskip{0pt plus 1fil}     \noindent     \textcolor{black}     {\rule{0.25\columnwidth}{0.018cm}}     \vspace*{0.3cm}}     \renewcommand{\topfraction}{0.99}     \renewcommand{\bottomfraction}{0.99}     \renewcommand{\textfraction}{0.0}     \renewcommand{\floatpagefraction}{0.99}     \usepackage{fancyhdr}     \pagestyle{fancy}     \fancyhead{} % clear all fields     \fancyhead[RO,LE]{\footnotesize Studi sulla tradizione indiretta di Erodoto}     \fancyfoot{} % clear all fields     \fancyfoot[LE,RO]{\thepage}     \DeclareGraphicsExtensions{.pdf,.jpg,.jpeg,.pdf,.png}                 \DeclareGraphicsRule{*}{mps}{*}{}      \setcounter{topnumber}{9}     \setcounter{bottomnumber}{9}     \setcounter{totalnumber}{9}     \setlength{\headheight}{50pt}     \setlength{\topmargin}{5pt}          \usepackage[splitindex]{imakeidx}     \makeindex[name=n, title=Nomi di persone e luoghi]      \makeindex[name=p, title=Passi citati nel testo]     \makeindex[name=t, title=Altri testi citati]     \makeindex[name=pap, title=Papiri e manoscritti citati nel testo]      I have 600 pages+ of text with index entries marked as follow:               \index[p]{Erodoto!8!32-3}     \index[p]{Erodoto!1!65}     %etc.      This is because I want the index to sort by book and then by chapter. The result in the index at chapter level however is sorted in the following way:   * 1-4, 279 (this is a range)   * 1.9, 74 (after the dot are lines in the chapter of the text quoted)   * 10-11, 357, 359    * 105-6, 80, 304    * 105.3-106.1, 75    * 105.4-108.2, 75    * 107-114, 305   * 2, 24   * 24, 56   * 207, 67   * 3, 78 Please, could you suggest me what I need to do so that things are ordered like:   * 1-4, 279    * 1.11.1-4, 74    * 1.9, 74   * 2, 24   * 3, 78   * 10-11, 357, 359   * 24, 56   * ...


title: How to get the size (width, height) of an image?

text: I want to insert an image at the bottom of a page, using the full `\paperwidth`. I found the `textblock` environment from the textpos package and defined a command in this way:               \newcommand*{\grafikunten}[1]{         \begin{textblock*}{\paperwidth}(0mm, 80mm)             \includegraphics[width=\paperwidth, keepaspectratio]{#1}         \end{textblock*}     }      This is working so far, assuming that the vertical starting position of the picture is always "80mm", which of course is not. It depends on the height of the image. How can I get the height of the image to calculate the exact vertical position? Or is there another way to position images at the bottom of a page, or at every other side, even in a corner?


title: How to suppress newpage when using titling

text: I am using `titling` so I can reuse `\maketitle` many times in a document. My document will be a sequence of around 100 abstracts for a conference, each with their own title and author. I want to have two per page. Try as I might, I cannot get more than one abstract per page. `\maketitle` insists on starting a new page. I want to turn that off. I am on Mac OSX 10.8.2, using Texshop and `\documentclass[titlepage=false]{article}`.


title: Reading - and effect - of (default) tikz/pgf keys?

text: Consider the following MWE:               \documentclass[varwidth,tightpage,border=1bp]{standalone}          \usepackage{tikz}     \pagecolor{yellow!15} % ignored with preview, but not w/ varwidth          \begin{document}            \begin{tikzpicture}              \tikzset{/tikz/line width=1cm} % no effect         \draw %[/tikz/line width=1cm] % has effect here           (0,0) -- ++(1,0)           node[fill,scale=0.5](A){};              \pgfkeysgetvalue{/tikz/line width}{\tmp}         \typeout{tmpX \tmp \meaning\tmp}            \end{tikzpicture}          \end{document}      My first question is: here I'm trying to `\tikzset{/tikz/line width=1cm}`, but it has no effect (only on document size); the output is: ![test03a.png](http://i.stack.imgur.com/Hu7tP.png) If I use the `\draw[/tikz/line width=1cm]`, then there _is_ effect, and the output is: ![test03b.png](http://i.stack.imgur.com/eHoLk.png) So, the question is - how come `/tikz/line width` doesn't have any effect? I would have thought it is a "master" key/variable of sorts (which kicks in, if nothing else is specified). But even more important for me is - how do I read `tikz`/`pgf` keys? As you can see, I'm trying with `\pgfkeysgetvalue{/tikz/line width}{\tmp}`, but when I try to print it to stdout, I get this:               tmpX \tmp \relax      ... which means that `\tmp` in unexpandable, probably because it has been "let" to `\relax`; and so I cannot read any information in `/tikz/line width`. So, how can I read TikZ/PGF keys - in an expandable format, so I can use them in code? * * * EDIT: After reading Simple example of pgfkeys, I simply tried `.initial`:               \tikzset{/tikz/line width/.initial=1cm}       ... and afterwards, the stdout printout is:               tmpX 1cmmacro:->1cm      ... which means my syntax for reading keys was correct - but apparently, the key `/tikz/line width` did _not_ exist, even if I tried to "set" it?! My question then becomes - what controls the line width of the `\draw` in the case when we do not specify anything, and how can I find and print the corresponding key values (if they exist)? * * * possibly related:   * tikz pgf - Problems with pgfkeys - TeX - LaTeX Stack Exchange   * Re: Question about \tikzset, maybe related to \pgfkeys - gmane.comp.tex.pgf.user


title: How can I highlight \[...\] properly in LaTeX listings?

text: The `listings` package provides the option `moredelim`, allowing for custom styles for words enclosed by given delimiters. I would like to give `$...$`, `\\[...\\]` and `$$...$$` custom colors. `\\[...\\]`, however, doesn't seem to work well. MWE:               \documentclass{article}     \usepackage{listings}     \usepackage{xcolor}          \lstset{language=[LaTeX]TeX,     basicstyle=\ttfamily,%     commentstyle=\slshape\color{blue},%     texcsstyle=*\bfseries,%     delim=[s][\color{purple}]{$}{$},%     moredelim=[s][\color{purple}]{\[}{\]},%     moredelim=[s][\color{purple}]{$$}{$$},%     moredelim=[is][\slshape\color{violet}]{@@}{@@}}          \begin{document}     \begin{lstlisting}     \begin[@@opt_par@@]{@@obl_par@@}         bla     \end{x}     \[math mode\]     $$math mode$$     \end{lstlisting}     \end{document}      This results in: ![result](http://i.stack.imgur.com/gE5iU.png) I would like to put `\\[...\\]` fully in color, without interfering `[...]`s. The optional parameter `opt_par` should appear just as `obl_par` (again, `[...]` seems to be problematic). I have tried several variations of `moredelim`, to no avail.


title: How to nest \Call in algorithmicx?

text: I tried to show something like: Min(Right(x)), when I input the following in my LaTeX manuscript:               \begin{algorithmic}[1]     ...       \State \Return \Call{Min}{\Call{Right}{$x$}}     ...     \end{algorithmic}      it report the following error:               ! Argument of \equal has an extra }.                          \par      l.652 ...e \Return \Call{Min}{ \Call{Right}{$x$} }      Any ideas? -- Hi, I just find a quick and dirty way by looking up algpseudocode.sty:               \State \Return \textproc{Min}(\Call{Right}{$x$})      But any better solution are appreciated.


I am comparing the cores of PSTricks with TikZ and their capabilities. I am not considering whether or not a library has been implemented. Are there examples written in PSTricks and they cannot be done using TikZ? Answers to question in the reverse direction, "Are there examples written in TikZ and they cannot be done using PSTricks? , is also allowed. I still cannot imagine what kind of trickeries are possible in PSTricks but not in TikZ? Is there an example?


title: How to change "Listing 1. Caption" to "Figure 1. Caption"?

text: I have a listing like so:               \lstset{language=Python,caption={Caption}}     \begin{lstlisting}     some Python code goes here     \end{lstlisting}      In the PDF this appears as `Listing 1. Caption`. How can I make it appear as `Figure 1. Caption`? It is worth mentioning that mixing real figures and listings has to keep consistent figure numbering.


title: Convention for packages that modify commands of other packages

text: I want to write a package that modify a command of another package. Let's say for example the command is `\includegraphics` from the `graphicx` package so in `mynewpack.sty` file I have something like that:               \let\latex@includegraphics\includegraphics     \renewcommand\includegraphics[2][]{<some tex code> \latex@includegraphics[#1]{#2}}      If in my `main.tex` file I have this               \usepackage{graphicx}     \usepackage{mynewpack}      all goes fine, `graphicx` defines `\includegraphics` command and `mynewpack` redefines it. But if the loading of these two packages is switched then I don't understand what happen. I expect an error because into `mynewpack.sty` I use `includegraphics` when the `graphicx` package is not yet loaded. Instead no error is produced but the inclusion of `mynewpack` has no effects (I think it is because it is loaded before `graphicx` and `graphicx` restores `includegraphics` to the default one). **Why I don't get the error I expect in this situation?** **How can I fix this problem?** My idea is of loading the `graphicx` package directly from the `mynewpack` one but then I don't know what happens if the also the user add the `graphicx` package inside the `main.tex`. Another possibility is using some command inside `mynewpack.sty` that delays the redefinition of `includegraphics` until all other packages are loaded but I don't know if this command exist...


title: TikZ: How to compare approximate equality of dimensions?

text: When scaling `tikzpicture` using option `scale`, some points that had equal coordinates appear to be shifted a little bit. So the precise comparision `\ifdim \y1 = \y2` will not do anymore. I'm aware of `\pgfmathapproxequalto`, but the problem is that dimensions are not plain numbers.


title: How to print URL typed using \href command

text: When I print document that contain `\href{url}{title}` I get `title`. Is it possible to print the url also but when viewing the document the URL is not shown. If yes how to do it? Try to print this :               \documentclass{article}     \usepackage{hyperref}     \begin{document}     \href{http://tex.stackexchange.com/questions/178512}{My question on StackExchange}     \end{document}      You will get :               My question on StackExchange      When I view my document I want to have clickable link but when printing my document it should print the URL.


title: How to make the size of PDF output wider?

text: Is there a way to make the PDF width and height larger?


title: Probability Tree-diagram with TikZ

text: Thanks for helping me out. How can I make the following tree-diagrams? http://www.vias.org/tmdatanaleng/cc_prob_cond_independ.html


title: Why the question mark followed by a left quote produce another symbol?

text: See the following example:               \documentclass{article}          \begin{document}     Hello?``world!''     \end{document}      The ?` will be replaced by a bottom-up question mark, If add a space between them will avoid this but I want to know the reason.


title: Including title of document in external reference

text: I'm currently using xr to reference external documents. It's good in as much as I get linked via hyperref to the relevant result, but it would be helpful if it displayed the title of the document containing the result I'm linking to, as well as the number of the result itself. Is this possible? Sorry for not providing an example, the following documents show my current setup: File A:               \documentclass{report}     \usepackage{xr-hyper}     \usepackage{hyperref}          \begin{document}     \chapter{Foo}\label{Foo}     Bar.     \end{document}      File B:               \documentclass{report}     \usepackage{xr-hyper}     \usepackage{hyperref}          \externaldocument{fileA}          \begin{document}     \ref{Foo}     \end{document}


title: How to pass two parameters to a \newenvironment?

text: I have defined this new environment for handling my images in my document I want to pass two parameters: #1 to refer to pathname to the imagefile #2 to refer to the string I want to pass to the label                \newenvironment{insertmyimages}[2][,]%      {      \begin{figure}[!h]      \centering      \includegraphics[width=\textwidth]{#1}%      \caption{Fig. #2}      \end{figure}      }           \insertmyimages{./Image.gif, 17}      I would like the above to center the image and label this Fig. 17. How do I do this ?


title: How to find slot of a character

text: Following this "manual": Importing a Single Symbol From a Different Font I try to extract the `\rightsquigarrow` character from the standard `ams` package, since I'm overwriting it with `mathds`. But I don't know how to find the slot number. Trial and error might take too long. Is there a file I can look it up in? Thanks in advance!


title: crossing out using different colour

text: How to cross out a sentence using a horizontal line in a colour different from the text? I found this useful question about how to cross out a sentence, but I cannot figure out how to use colour with this solution. The cancel package allows that, as described here, but would not do a horizontal line.


title: How can I get the character ʟ̟ ?

text: I would like to get the character 'ʟ̟' (small caps L with + diacritic). I am using the TIPA package. When I combine the TIPA for the L with the TIPA for the diacritic, my code won't compile. I get the error `! Argument of \T3\; has an extra }.` MWE:               \documentclass[]{article}         \usepackage{tipa}         \begin{document}          This works: \textipa{\;L}         And this works: \begin{IPA}\;L\end{IPA}         And this works: \textscl          This diacritic works: \begin{IPA} \|+l \end{IPA}          %But this stops it compiling \begin{IPA} \|+\;L \end{IPA}          \end{document}


title: Including LaTeX documentation as comments in source code

text: I am working on a large C# project (hundreds of source files). I am trying to add documentation on various user inputs and options. For maintainability I would ideally like to be able to write the documentation as comments in the source code. The various interfaces and input formats are quite likely to change, and docs which haven't been kept up to date will be even less useful than no docs. My idea would be to have something Doxygen-like where there is a special indicator for LaTeX documentation within comments, eg in file DateManager.cs:               // -- name: parseDates     // \subsection{The format of the date file}     // The date file consists of $4$ alphanumeric string\ldots     // -- end     public void ParseDates(string s)      and in the LaTeX file               \includedocs{DateManager.cs}{parseDates}      This command would open the source file, find the relevant part, strip away the `//` and then do something similar to `\input` or `\include`. This is something akin to verbose programming, except that I want it to have a much more minimal impact on the existing source code base, rather than change the source files and the build process fundamentally. Does anyone know if there exist tools to do something like this? If not, can someone suggest how I can roll my own? I have seen that it is possible to indicate in comments which parts of the source code should be included by `lstlistings`, but that still doesn't allow me to write LaTeX within comments.


title: Line break in macro

text: I have defined a macro in my document as               \newcommand{\FSeq}[2]{\ensuremath #1_1, #1_2, \ldots,  #1_#2}      The problem is that surpasses the margin usually. Is there anyway to solve this problem? I tried some of the other responses solution without success. Thanks in advance. **EDIT** : Minimal example               \documentclass{article}       \newcommand{\FSeq}[2]{\ensuremath #1_1, #1_2, \ldots,  #1_#2}     \begin{document}       bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla aaaaa  $\FSeq{R}{r}$ bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla      \end{document}


title: Keeping checkboxes aligned using the Exam class

text: I'm using the exam class in a multicols environment to create a series of worksheets. Many questions are yes/no. If the question is too long, it wraps to the next line and moves the answers. Is there a way to "anchor" the answer yes/no checkboxes to always appear right aligned on the first line and wrap the text of the question appropriately? Below is the way I can currently formatting yes/no questions. A solution would not hopefully not require the way questions are currently written to be changed since there are quite a few legacy documents. Also, a solution can't modify _every_ question, because not every question is yes/no.               \documentclass{exam}     \usepackage{multicol}     \newcommand\YesNo{%     \hfill\mbox{\begin{oneparcheckboxes}         \choice Yes         \choice No     \end{oneparcheckboxes}}}          \begin{document}     \begin{multicols}{2}     \begin{questions}     \question This question is short\YesNo     \question This question is longer, and will probably wrap to the next line\YesNo          ... % lots of questions go here          \end{questions}     \end{multicols}     \end{document}      Currently looks like... ![enter image description here](http://i.stack.imgur.com/vwVO8.jpg) Should look like... ![enter image description here](http://i.stack.imgur.com/wZwes.jpg)


title: Transfering Style of Sectioning-Titles to TOC-, LOF-, LOT-Titles

text: This is a continuation of my last (answered) question: I want to style the Title of TOC, LOF and LOT exactly the same as the Sectioning-Titles. Problem is that they (a) start "higher" than normal `\chapter`-titles (means the space between "page head" and title body is smaller) and (b) the space between the title body and the titlerule is noticably varying. Example (current progress):               \documentclass[twoside=false]{book}          \usepackage{tocloft}                  \usepackage[ngerman]{babel}                          \usepackage[T1]{fontenc}             \usepackage{lmodern}             \usepackage[ansinew]{inputenc}                   \usepackage{tgheros}                                         \usepackage[expert]{mathdesign}                  \usepackage{amssymb}                                         \usepackage{ae,aecompl}                                  \usepackage{charter}                                                %-------Styling of Titles-------%     \usepackage{titlesec}          \titleclass{\part}{top}     \titleclass{\chapter}{straight}          \titleformat{\part}[hang]       {\usefont{T1}{qhv}{b}{n}\selectfont\huge\raggedright}{\thepart}       {20pt}{\Huge}     \titleformat{\chapter}[hang]       {\usefont{T1}{qhv}{b}{n}\selectfont\huge\raggedright}{\thechapter}       {20pt}{\Huge}[\vskip8pt{\titlerule[1.5pt]}]          \titlespacing*{\part}       {0pt}{50pt}{40pt}     \titlespacing*{\chapter}       {0pt}{0pt}{20pt}          %--------------------------------%          %-------Styling of TOC-, LOT-, LOF-Titles-------------------------%         \usepackage{tocloft}     %------ TOC ---------------------------------------%             \renewcommand{\cfttoctitlefont}{\usefont{T1}{qhv}{b}{n}\selectfont\huge}                      \addtolength{\cftbeforetoctitleskip}{4.0ex}                     \renewcommand{\cftaftertoctitle}{         \vskip8pt{\titlerule[1.5pt]         %           \vspace{4.5ex}         %           \hrule height 1.5pt         %           \vspace{-2.6ex                     }}         %------LOF-----------%             \renewcommand{\cftloftitlefont}{\usefont{T1}{qhv}{b}{n}\selectfont\huge}                     \addtolength{\cftbeforeloftitleskip}{4.0ex}                     \renewcommand{\cftafterloftitle}{         \vskip8pt{\titlerule[1.5pt]         %           \vspace{3.2ex}          %           \hrule height 1.5pt         %           \vspace{-2.6ex                     }}         %------LOT----------%                    \renewcommand{\cftlottitlefont}{\usefont{T1}{qhv}{b}{n}\selectfont\huge}                      \addtolength{\cftbeforelottitleskip}{4.2ex} % o,2 Differenz zu anderen beiden Überschriften ist seltsamerweise notwendig...                     \renewcommand{\cftafterlottitle}{         \vskip8pt{\titlerule[1.5pt]         %           \vspace{4.0ex}         %           \hrule height 1.5pt         %           \vspace{-2.6ex                     }}              \begin{document}                  \newpage              \tableofcontents                  \newpage                  \listoftables                  \newpage                  \listoffigures                  \newpage          \chapter{Test}          Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus                       \begin{table}[bp]                 \centering                     %\begin{tabular}                          %\end{tabular}                 \caption{Testtable}                 \label{tab:Testtable}             \end{table}                       \begin{figure}[bp]                 \centering                     %\includegraphics{}                 \caption{Testfigure}                 \label{testfigure}             \end{figure}                   \end{document}


title: Showing grid on top of plot fill with PGFplots?

text: I have a plot with a pass/fail metric, and wish to show this clearly by having to seperate colors in the plot. To make the data stand out, I have a background grid to the axis tick marks. However, this does not affect the fill I use to color the area under the plot, as this seems to be the top layer. An example of what I have now is shown below: ![Example image.](http://i.stack.imgur.com/8UreD.png) The code used to generate this is:               \documentclass{article}      \usepackage{pgfplots, amsmath}     \pgfplotsset{compat=newest}     \pgfplotsset{major grid style={color=black}}     \pgfplotsset{every  tick/.style={black,}}     \pagestyle{empty}     \begin{document}     \begin{tikzpicture}     \begin{axis}[           xmin=5,          xmax=55,          ymin=0,          tick align=outside,          tickpos=left,          xtick=data,          ytick={0,0.2,...,2.5},          enlargelimits=false,          axis background/.style={fill=green!30},          grid=both,          xlabel=Frequency (MHz),          ylabel=V$_{\text{DD}}$ (V)]     \addplot     [const plot, fill=red!30]      coordinates     {     (5,0.7)     (10,0.8)     (15,0.9)     (20,1)     (25,1.1)     (30,1.2)     (35,1.3)     (40,1.4)     (45,1.5)     (50,1.6)      (55,1.7)     }      \closedcycle;          \end{axis}     \end{tikzpicture}     \end{document}      I want the gridlines to overlap the whole plot (meaning the fill as well). How can I achieve this?


title: How can I align the terms of this equation nicely?

text: I have the following `alignat` segment:               \begin{alignat*}{3}       \text{max}_{\underline{\lambda}} \text{min}_{\underline{x}} \quad & \underline{c}^T \underline{x} + \underline{\lambda}^T(\underline{d} - D\underline{x}) \\       \text{s.t.} \quad & A \underline{x} & \leq \underline{b} \\                         & \underline{x}   & \geq \underline{0}     \end{alignat*}      which gives ![LaTeX Result](http://i.stack.imgur.com/l55g0.png) however, the result I'm aiming for is more like ![Desired Result](http://i.stack.imgur.com/XxS8x.png) Note that:   * the 'max/min' is right-aligned with the 's.t.', the left-most character in the list of 's.t.' terms (the A) is aligned with the left-most term in the objective function (the c).   * the rest of the LHS in the 's.t.' section is right-aligned, and the inequalities are aligned. I'm not sure if I'm being too fussy here, but anything is better than what I already have.


title: How to get the abstract title to runin

text: We have written a style class file and I need the abstract to be in a special format to the rest of the report. It ought to look like such:               Abstract - text text text...      But with the current configuration it looks like such:               Abstract -           text text text...      The code we use that configures the abstract looks like such:               \renewenvironment{abstract}{      \fontsize{10}{12}\selectfont      \begin{changemargin}{10mm}{10mm}      \noindent\em Abstract -     }{      \end{changemargin}     }      I found out about the `[runin]` command but with my limited LaTeX knowledge don't know where to place it (I tried several positions but from the errors I get I doubt it's designed to work with the `\renewenvironment{abstract}` command). Any help is appreciated! **Edit** Here is the change margin function               \def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]}     \let\endchangemargin=\endlist


title: Search for most frequently occurring patterns in text (to replace them by macros)

text: Are there any ready available tools for searching the most frequently occurring text patterns (word combinations, phrases) in the text you work on, so to give ideas, which ones to replace by short macros?


title: Alertblock and Beamer Frame Spacing

text: This slide is showing compiling errors. I guess there isn't enough space. My question : a) Why isn't align working inside the alert block? b) Why isn't allowframebreaks working in my particular slide.               \documentclass{beamer}     \usepackage{mathpazo}     \usepackage{setspace}     \usetheme{CambridgeUS}     \usecolortheme{dolphin}     \usefonttheme{serif}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{graphicx}     \usepackage{color}     \usepackage{pgfpages}     \usepackage{multirow}     \usepackage{enumerate}     \usepackage{mathtools}     \title[L]{Blah}     \subtitle{Lectur}      \author{Some Random Guy}      \institute[L]{L}     \setbeamertemplate{enumerate items}[default]     \useoutertheme{tree}     \setbeamercolor{block title}{bg=blue!30,fg=black}     %\setbeamercolor{alertblock title}{bg=red!30,fg=black}     \setbeamertemplate{section in toc}{\hspace*   {2em}\inserttocsectionnumber.~\inserttocsection\par}     \setbeamertemplate{subsection in toc}{\hspace*{4em}\inserttocsectionnumber.\inserttocsubsectionnumber.~\inserttocsubsection\par}     \newcommand{\bbeta}[1]{\boldsymbol\beta_{\scriptscriptstyle #1}}     \newcommand{\undset}[2]{\underset{\scriptscriptstyle #1}{#2}}     \newcommand{\by}[1]{\mathbf Y_{\scriptscriptstyle #1}}     \newcommand{\bx}[1]{\mathbf x_{\scriptscriptstyle #1}}     \newcommand{\beps}[1]{\boldsymbol\epsilon_{\scriptscriptstyle #1}}     %\setbeamercolor {item}{fg=red}     %\setbeamercolor{itemize item}{fg=red} %\setbeamercolor{itemize subitem}{fg=blue}     \setbeameroption{show notes}     \addtobeamertemplate{block alerted begin}{     \def\@listi{\leftmargin3em       \topsep 3\p@ \@plus2\p@ \@minus2.5\p@       \parsep 0\p@       \itemsep3\p@ \@plus2\p@ \@minus3\p@}     }               \begin{document}               \section{Covariance matrix}     \begin{frame}[allowframebreaks]{Strategy - Start with the Covariance}     \begin{itemize}     \item We can use the shortcut formula $\sigma_{Y_1Y_2}=E[Y_1Y_2]-E[Y_1]E[Y_2]$.     \item Recall $E[Y_1]=2/3$ from our previous lecture.     \item You should easily be able to verify that $E[Y_2]=4/3$.     \item \begin{alertblock}     \begin{align*}     E[Y_1] &= \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} y_1 f(y_1,y_2) dy_1 dy_2 \\      & =  \int_{-\infty}^{\infty} y_1 f_1(y_1) dy_1     \end{align*}     \end{alertblock}     \end{itemize}     \end{frame}          \end{document}**strong text**      The error is - ! TeX capacity exceeded, sorry [input stack size=5000]. \end #1->\csname end#1 \endcsname \@checkend {#1}\expandafter \endgroup \if@e... l.176 \end{frame}


title: What license for releasing LaTeX templates

text: I'm planing to release a LaTeX template to share my adjustments I've worked out for an universty course. My first thought was to release it under CreativeCommons (BY-NC-SA 3.0) but right now I'm not sure if this affects the content of the user he adds to the TeX file to compile his PDF file. I don't want to force the user to license his content under CC, just the changes he applies to the template. Does some kind of CC license fit my purpose or do I have to switch to another license?


title: Using \begin{TeXtoEPS} after \section

text: I have a figure created with `pstricks` that I would like to insert into another document. However when copying the markup into my main document and compiling it I get the following error:               ! Undefined control sequence.     \GenericError ...     \#4 \errhelp \@err@ ...     l.21 \end{TeXtoEPS}     The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.      The error occurs if there is a `\section` before `\begin{TeXtoEPS}`.               \documentclass[letterpaper,dvips]{article}     \usepackage[pdf]{pstricks}     \usepackage{pstricks-add}        \usepackage{pst-all}     \usepackage{pst-3dplot}     \usepackage{pst-eps}     \begin{document}0     \pagestyle{empty}          % The following line causes the issue     \section{Introduction}     \begin{TeXtoEPS}     \psset{unit=0.7}          \begin{pspicture}(0,0)(20,10)     \psset{linewidth=1.5pt,linecolor=black,linestyle=solid}     \psline{->}(0,8)(10,8)     \psline{->}(0,0)(10,0)          \end{pspicture}          \end{TeXtoEPS}          \end{document}      How would one use the TeXtoEPS environment inside a section? I was intending to just wrap the figures inside my main document with the `\begin{TeXtoEps}`. Am I going about this the wrong way? EDIT: Thanks to Urike's comment which pointed me in the right direction:               \documentclass[letterpaper]{article}     \usepackage[dvi]{pstricks}     \usepackage{pstricks-add}        \usepackage{pst-all}     \usepackage{pst-3dplot}     \begin{document}     \pagestyle{empty}          \section{Introduction}     \psset{unit=0.7}          \begin{pspicture}(0,0)(20,10)     \psset{linewidth=1.5pt,linecolor=black,linestyle=solid}     \psline{->}(0,8)(10,8)     \psline{->}(0,0)(10,0)          \end{pspicture}     \end{document}      And compiled with `latex->dvips -> psdpdf`


title: Figure as part of a paragraph

text: I have two paragraphs and one figure. I want to place the figure as part of the first paragraph. I want this order: paragraph1 with the figure than paragraph2               \paragraph{P1}     text     \begin{figure}[htb]     \begin{center}       \includegraphics[width=1\textwidth]{Chart_Q1_Branch}       \caption{Chart1}\label{fig_Q1}     \end{center}     \end{figure}          \paragraph{P2}      Latex result is like this: P1,P2,figure What I want is P1 with figure, P2 How could I force latex to do that, with the use of default libraries?


title: How to make stealth stop at the edge of a node in TikZ?

text: I am trying to draw a stealth from destination node's east **horizontally** to the source node's west. I now can achieve this by adjusting the stealth length (trial-and-error) like so:               \draw[stealth-](dest.east)--++(0.31, 0)node[pos=0.5, above=0cm]{\tiny{\textbf{$R$}}};      But this nice intersection will collapse once the distance between them varies away from `0.31`. So I am looking for a way to make the stealth **go horizontally until it reaches the west of`src.west`.** * * * Using @percusse's method, I did the encountered problems when the stealth does not come out at the edge center. **Both**               \documentclass[a4paper]{article}     \usepackage{tikz}     \usetikzlibrary{backgrounds, calc, positioning, fit}          \begin{document}          \begin{tikzpicture}         \node[draw] (a) {A node};         \node[draw,align=center] (b) at (2,1) {Another\\node};         \draw[-stealth] ($(a.north east)!0.1!(a.south east)$) -- (a-|b.east);     \end{tikzpicture}          \end{document}      **and**               \documentclass[a4paper]{article}     \usepackage{tikz}     \usetikzlibrary{backgrounds, calc, positioning, fit}          \begin{document}          \begin{tikzpicture}         \node[draw] (a) {A node};         \node[draw,align=center] (b) at (2,1) {Another\\node};         \draw[-stealth] ($(a.north east)!0.1!(a.south east)$) -- ($(a.north east)!0.1!(a.south east)$-|b.east);     \end{tikzpicture}          \end{document}      are not what I want. I want the stealth **always horizontal**. How may I fix it?


title: Is there a clash between TMMATHS and MTPRO2?

text: I have the TM-Math (Micropress) and MTPRO2 (PCTeX) fonts installed on my systems (TeXLive for Linux; MikTeX for Windows) and I recently typeset some integrals using the TM-Math fonts via the 'tmmaths' package. For some reason the limits on the integral are positioned as though it expected the integral symbol to be slanted rather than upright, as it is in the TM-Math set. So my question is whether there is some sort of clash between these two font sets? Does anyone else have both fonts on their system and can still manage to get an upright integral with properly positioned limits?


title: Package for certificates

text: Since LaTex can produce outstanding typesetting results and excellent graphics design, I began to wonder if it can recreate certificates. With so many packages and styles out there does anyone know if there is one to create certificate templates like in the link here. I suppose that the borders would be the limiting factors like those shown here.


title: Why a calc operation in width of beamercolorbox doesn't work?

text: Trying to answer How to add the footnote in the right down corner with the background color(only page)&change time background color I wanted to calculate `beamercolorbox` width as `wd=\pagewidth-\beamer@sidebarwidth` but if failed, even with `\usepackage{calc}`. Do you know why? Next you have an example to test it. First solution (with `calc`) doesn't work, second and third (with `\addtolength` and pgf-calc library) work.               \documentclass[14pt]{beamer}     \usetheme{Berkeley}     \usepackage{calc}          \begin{document}     \begin{frame}       % wd=5cm-1cm does not work       \begin{beamercolorbox}[wd=5cm-1cm]{sidebar}       First box       \end{beamercolorbox}            \newlength{\mylength}       \setlength{\mylength}{5cm}       \addtolength{\mylength}{-1cm}       \begin{beamercolorbox}[wd=\mylength]{sidebar}       First box       \end{beamercolorbox}            \pgfmathsetmacro{\lengthb}{5-1}       \begin{beamercolorbox}[wd=\lengthb cm]{sidebar}       First box       \end{beamercolorbox}       \end{frame}          \end{document}       ![enter image description here](http://i.stack.imgur.com/hSKI7.png)


title: How to clear LaTeX cache?

text: I'm executing `.tex` file using `pdflatex` and `xelatex`. Surprising getting different results (as PDF) in both. It looks like `xelatex` is picking data from some cache and generating output with some old data. Can you please help me to understand what can be reasons for difference in PDF output? Difference found are :   1. Background Image in pdf generated using `pdflatex` is correct, `xelatex` is referrring old image.    2. I'm fetching data from external CSV file; somehow `xelatex` is picking data from old CSV file on other hand `pdflatex` is taking correct data.


title: Defining a prefix operator with space before its argument

text: I want a particular spacing behavior for a custom operator. I can produce the desired spacing by setting math classes (`\mathord` and so forth), but I have to do it on a case-by-case basis since no single math class works for all situations. Is there a more automatic solution? In my document, the operator `$(A\smalltriangleright B)$` means "coerce from A to B". It's a prefix operator and it takes subscripts in some situations.   * When an operator is applied to an argument, there should be some space between operator and argument. Either mathbin space or mathrel space would be acceptable.   * When operators are composed using the function composition operator `\circ`, they should act as ordinary symbols with `\circ` playing the role of binary operator. I haven't been able to get a single definition of the operator that has the right spacing in both situations:               \documentclass{article}     \usepackage{amsmath}     \usepackage{mathabx}          \newcommand{\coerceSub}[3]{(\mathord{#1}\smalltriangleright\mathord{#2})_{#3}}          \begin{document}          In an operator application, the ``mathrel'' version looks better.     \begin{gather}       % OK                                                                                \mathrel{\coerceSub uv1} x \\       % Not OK: no space between operator and operand                                      \coerceSub uv1 x     \end{gather}          In an operator composition, the plain version looks better.     \begin{gather}       % Not OK: no space between \circ and c                                               \mathrel{\coerceSub vw1} \circ c \\       % OK                                                                                \coerceSub vw1 \circ c     \end{gather}          \end{document}


title: Table too wide for page in standalone file?

text: My goal is to create a standalone TeX file containing tabulated figures. No matter what value I set for image width, the resulting table is always too wide for the page. Here is a MWE:               \documentclass[varwidth]{standalone}     \usepackage[pdftex]{graphicx}     \usepackage{geometry}     \usepackage{lscape}     \usepackage{multirow}     \usepackage{subfig}     \def\ig{\includegraphics[width=1in, keepaspectratio]}               \begin{document}     \begin{figure}[!htbp]     \begin{tabular}{p{0.2cm}ccc}      R1& \subfloat{\ig{example-image-a}}         & \subfloat{\ig{example-image-b}}         & \subfloat{\ig{example-image-c}}\\[0.4cm]          &C1&C2&C3 \\     \end{tabular}     \end{figure}     \end{document}


title: How to test if a directory exists

text: The command `\IfFileExists` works great to test is a file exists. Is there an equivalent to test if a directory exists? `\IfFileExists` does not seem to work for directories.               \documentclass{article}          \begin{document}     \newcommand*{\ExistingDirName}{./ExistingDir}%       This exists     \newcommand*{\NonExistingDirName}{./NonExistingDir}% This does not exist          \newcommand*{\ExistingFileName}{\ExistingDirName/ExistingFile.tex}% This exists     \newcommand*{\NonExistingFileName}{NonExistingFile.tex}% This does not exist               \newcommand*{\CheckExistence}[1]{         \IfFileExists{#1}{             "#1" exists\par         }{             "#1" does NOT exist\par         }     }          \CheckExistence{\ExistingDirName}%    incorrect results     \CheckExistence{\NonExistingDirName}% correct result          \bigskip     \CheckExistence{\ExistingFileName}%    works     \CheckExistence{\NonExistingFileName}% works          \end{document}


title: TikZ: When I use the draw let ... in command to draw a trivial arc, I get dimension too large

text: \documentclass[convert = false, border = 2cm]{standalone}     \usepackage{tikz}     \usetikzlibrary{calc, intersections}          \begin{document}     \begin{tikzpicture}       \coordinate (O) at (0, 0);            \begin{pgfinterruptboundingbox}         \path[name path = line1] (O) -- (15:5cm);              \draw (O) -- (-45:4.5cm) coordinate (P1);              \path[name path = line2] (P1) -- +(0, 5cm);         \path[name intersections = {of = line1 and line2, by = P2}];       \end{pgfinterruptboundingbox}            \draw let         \p0 = (P1),         \p1 = (P2),         \p2 = (O),         \n1 = {atan2(\x1 - \x0, \y1 - \y0)},         \n2 = {atan2(\x2 - \x0, \y2 - \y0)},         \n3 = {.75cm}       in (P1) +(\n1:\n3) arc[radius = \n3, start angle = \n1, end angle = \n2];     \end{tikzpicture}     \end{document}      The code above produces the following error:               ERROR: Dimension too large.          --- TeX said ---     <recently read> \pgfmath@x          l.22     \n1 = {atan2(\x1 - \x0, \y1 - \y0)}                                                 ,     --- HELP ---     From the .log file...          I can't work with sizes bigger than about 19 feet.     Continue and I'll use the largest value I can      There is nothing out of the ordinary with the code, and I am unable to figure out what is causing this issue. I drew the bounding box around the figure it is well within the page. Furthermore, the line it is pointing to is an arc of a circle with a radius of `.75cm` so that can be greater than 19 feet either.


title: \pushbuttons with Icons with pdflatex (xobject reference)

text: I would like to create a pushbutton with icons instead of text. Like the text in the example below the icons should change with the mouse options. The manual of the eforms package (`eformman.pdf`) mentions options `\I`, `\RI` and `\IX`                 \I: (push buttons only) an indirect reference to a form XObject            defining the buttons’s normal icon      There is an example on http://www.math.uakron.edu/~dpstory/webeq_ex.html (eqforms.tex) but only for the dvips route. Is it possible to use icons with pdflatex too? And how do I create and reference the xobject? (I tried various variants with `\pdfxform` etc but to no avail). (A solution which use javascript code would be fine too)               \documentclass{article}     \usepackage[pdftex]{eforms}     \usepackage{graphicx}     \begin{document}     \pushButton[\CA{Push}\AC{Me}\RC{Reset}\A{/S/ResetForm}]         {myButton}{30bp}{15bp}     \end{document}      ## Edit Due to the help of @AlexG I found out why the "natural" command \I, \XI and \RI didn't work: The relevant code in `eforms.sty` uses braces in the `/I` entry which imho doesn't work with `pdftex`. If I change the code everything works fine (I moved the `0 R` to the internal code):               \documentclass{article}     \usepackage[pdftex]{eforms}     \usepackage{graphics}     \usepackage{mwe}          \newsavebox\imga     \newsavebox\imgb     \newsavebox\imgc     \sbox\imga{\includegraphics{example-image-a}}     \sbox\imgb{\includegraphics{example-image-b}}     \sbox\imgc{\includegraphics{example-image-c}}     \immediate\pdfxform\imga     \edef\normalappearance{\the\pdflastxform}     \immediate\pdfxform\imgb     \edef\overappearance{\the\pdflastxform}     \immediate\pdfxform\imgc     \edef\downappearance{\the\pdflastxform}          \pdfcompresslevel0     \pdfobjcompresslevel0     \begin{document}     \makeatletter     \def\@eqI#1{\ifx\annot@type\annot@type@button         \def\eq@arg{#1}\ifx\eq@arg\@empty         \let\eq@I\@empty\else\def\eq@I{/I #1\space 0 R}% removed brace around #1,                                                         % added \space 0 R          \eq@define@IconMK\fi\fi}          \def\@eqRI#1{\ifx\annot@type\annot@type@button         \def\eq@arg{#1}\ifx\eq@arg\@empty         \let\eq@RI\@empty\else\def\eq@RI{/RI #1\space 0 R}% removed brace around #1 ..         \eq@define@IconMK\fi\fi}              \def\@eqIX#1{\ifx\annot@type\annot@type@button         \def\eq@arg{#1}\ifx\eq@arg\@empty         \let\eq@IX\@empty\else\def\eq@IX{/IX #1\space 0 R}% removed brace around #1 ..         \eq@define@IconMK\fi\fi}         \makeatother          \pushButton[       \TP{1}       \I{\normalappearance}       \RI{\overappearance}       \IX{\downappearance}     ]{myButton2}{100bp}{100bp}     \end{document}      ## Edit 2 I have notified the author and he will change the code of `eforms.sty` so that `\I` etc works with pdflatex too.


title: Biblatex: getting uniquename to include incollection editors

text: I am using `biblatex` with the `biber` backend and the citation style `biblatex-juardiss`. I am using the option `uniquename=allfull` to avoid ambigious author names. My problem is that the uniquename list includes authors and editors from `@BOOK`, `@ARTICLE` and `@COMMENTARY`. But the editors of `@INCOLLECTION` are not included in the uniquename list. `\value{uniquename}` from an `@INCOLLECTION` editor always returns zero. I tried the following minimal code:               \begin{filecontents*}{lit.bib}          @BOOK{werner,       author = {Werner, Dennis},       title = {Title of the Book}     }          @INCOLLECTION{werner2,       editor = {Schneider, Uwe AND Werner, Hans},       title = {Title of the Article},       booktitle = {Title of the Book},       Author = {Tester, Hans}     }               @COMMENTARY{werner3,       editor = {Schneider, Uwe AND Werner, Hans},       title = {Title of the Article}     }          \end{filecontents*}                    \documentclass{article}     \usepackage[a5paper, left=1.9cm, right=2.1cm, top=1.2cm, bottom=2.3cm]{geometry}          \usepackage[     backend=biber,     style=authortitle,     uniquename=allfull     ]{biblatex}          \bibliography{lit}          \renewbibmacro*{cite}{%       \iffieldundef{shorthand}         {\ifnameundef{labelname}            {}            {\printnames{labelname}%             \setunit{\nametitledelim}}%          \usebibmacro{cite:title}}%         {\usebibmacro{cite:shorthand}}%         \ifentrytype{incollection}{\addcomma\addspace\printnames{editor}}{}%         }          \DeclareNameFormat[incollection]{editor}{%       \iffootnote{%         \ifcase\value{uniquename}%           {\usebibmacro{name:first-last}{#1}{#6}{}{#7}}%         \or           \ifuseprefix             {\usebibmacro{name:first-last}{#1}{#4}{#5}{#8}}             {\usebibmacro{name:first-last-init}{#1}{#4}{#6}{#8}}%         \or           \usebibmacro{name:first-last-init}{#1}{#3}{#5}{#7}%         \fi%         \usebibmacro{name:andothers}%         }         {\mkbibemph{%           \iffirstinits%             {\usebibmacro{name:last-first}{#1}{#4}{#5}{#7}}%             {\usebibmacro{name:last-first}{#1}{#3}{#5}{#7}}%           \usebibmacro{name:andothers}%         }}%     }%          \begin{document}          1\footcite{werner}     2\footcite{werner2}     % 3\footcite{werner3}          \end{document}      As a result I get: > 1 Werner, Title of the Book. > > 2 Tester, “Title of the Article”, Schneider and Werner. This result is abmibious since both Werners are differnet people. If I cite the `werner3`, I get: > 1 D. Werner, Title of the Book. > > 2 Tester, “Title of the Article”, Schneider and Werner. > > 3 Schneider and H. Werner, Title of the Article. How do I get the editors of `@INCOLLECTION` included in the uniquename list?


title: PS/LaTeX figure exported with Xfig doesn't render properly

text: I just installed the basic version of MiKTeX 2.9 on my Windows XP system. I compile this very simple document (`test.tex`) with TeXworks, using the default pdfLaTeX command:               \documentclass{article}     \usepackage[dvips]{graphics}     \usepackage{xcolor}     \begin{document}     \begin{figure}[ht]       \centering       \input{segment.pstex_t}       \caption{Segment $s$.}     \end{figure}     \end{document}      Where the input is a simple figure with a segment (a polyline) with a label $s$. After compiling, I get the label in the figure, but not the polyline.


title: BibTex doesn't create .bbl file (Using Emacs/AUCTEX)

text: I am having a real issue with compiling `BibTeX` (has previously worked fine). When I compile `LaTeX`, an `aux` file is created. Here is my `test.aux`               \relax      \citation{carron2013big}     \bibdata{rhian}     \bibstyle{plain}      I then run `BibTeX` on my `test.tex` and receive the message `BibTeX finished successfully. Run LaTeX again to get citations right` But **no`.bbl` file is generated** which means non of my citations work. Here is my `test.tex`               \documentclass{article}     \begin{document}     I really like the paper by \cite{carron2013big}. Its nice.      \bibliography{rhian.bib}     \bibliographystyle{plain}     \end{document}      And my `rhian.bib`               @misc{carron2013big,     title = {Compressive Sensing: The Big Picture},     author = {Carron, I.},     year = 2013,     howpublished = {\url{ https://sites.google.com/site/igorcarron2/cs#reconstruction}}     }      output from Emacs is:                'Running BibTeX on text with bibtex $s     bibtex: Need exactly one file argument.     Try bibtex --help for more information.'      Any thoughts?


title: Disabling line numbers in section headers

text: I'm using the lineno package to number lines in a document. By default, lineno attempts to number everything, including section headers. I would like disable line numbering on section headers, preferably in an automated way so I don't need to manually edit every section header in my document. The lineno manual provides the following ways to disable line numbering:               \nolinenumbers     ... text ...     \linenumbers          \begin{nolinenumbers}     ... text ...     \end{nolinenumbers}      This works fine except I need to manually add this code around every `\section{...}` call in my document. Presumably I could `\renewcommand{\section}` to do this automatically, but I am not sure of the Right Way (TM) to do this. The following naive code appears to work, but I am not convinced that I won't trip over some nasty edge case by doing this. Among other things, I'll need to redefine `\subsection` and `\subsubsection` in addition to `\section` for this to work in general.               \let\oldsection\section     \renewcommand{\section}[1]{\nolinenumbers \oldsection{#1} \linenumbers}      Is there a more robust and/or elegant way of doing this?


title: number formatting in foreach statement of tikz

text: I have the following code:               \begin{tikzpicture}     \foreach \i [evaluate=\i as \ii using \i+5] in {1,2,3,4} {         \node at (\i,0) {\ii};     }     \end{tikzpicture}      I like to print `6 7 8 9`, but the above code prints `6.0 7.0 8.0 9.0`. How can I control the precision in the evaluate statement?


title: Resize box to fit text

text: I would like to have a box which changes width depending on the text in it. Shorter sentences should have a narrow box, and as the sentence gets longer the box should grow (until it is as wide as the text, then I would like a line break). Font size should not be affected. The best solution I've got so far (see below) scales the text when it is short.               \ovalbox{       \begin{minipage}[t]{0.85\columnwidth}       \resizebox{\textwidth}{!}{Some variable-length text}       \end{minipage}     }


title: biblatex : which style for a footnote once then nothing?

text: Ok sorry for this not so clear title. I'm having trouble to express & find what seems so simple :s I'm biblatex and I would like to know which citation style/bibliographical style and/or option I should use to have my bibliography ordered this way. I put you an example of a thesis from my lab here http://historique.icsn.cnrs- gif.fr/IMG/pdf/Extraction-metabolites-epongesFR2010.pdf So, in a nutshell:   * exponent numbers   * footnote reference for the first time the ref is cited   * later on when it is again cited nothing happens no op cit no ibid   * ref numbers identical in the text, the footnote and the final bibliography   * all same data (the exponent, the footnote and the ref in the final bibliography linked via hyperref)   * citation style as Authors (Last name then First Name initials) Journal, year in bold, vol, pages. Seems the most current setting globally for me ... but maybe it isn't. I passed the whole day in a manner to figure that. Nothing until know, thus I have learned a lot.


title: Want pgfplots to display base 10 exponent as tick labels

text: Basically I want the labels beside the tick marks on a log axis displayed as 27,28,29,... and not as 10^27,10^28,10^29,... The closest I can get is by defining the number format to be only the exponent, argument #1, but it always inserts digits to the right of the decimal when displayed. I need whole integers here. In this example I have both axes as logarithmic, but I would also like to know how to use this style for just one of the logarithmic axes, and let the other axis be 1,10,100,1000,etc. This may have been answered before, but I've searched the manual (notably section 4.12+) and stackexchange for hours, and can't find it. I'm still learning pgf syntax, too! My example code/hack below.               \documentclass{article}     \usepackage{pgfplots}          \begin{document}     \begin{figure}     \begin{tikzpicture}     \begin{loglogaxis}[     log base 10 number format code/.code={#1},     ]     \addplot coordinates {     (5, 8e26)     (9217, 3e30)     };     \end{loglogaxis}     \end{tikzpicture}     \end{figure}     \end{document}


title: Combining spacebelow with shaded parameter in thmtools package. Bug?

text: In the following example the spacebelow parameter is ignored. If you comment out the shaded parameter, the space is considered. Is it possible to use both parameters spacebelow / shaded?               \documentclass{article}     \usepackage{amsthm}     \usepackage{thmtools}          \declaretheoremstyle[         spaceabove=6pt,         spacebelow=60pt,         shaded={bgcolor={rgb}{0.8,0.8,0.8}}     ]{mystyle}     \declaretheorem[style=mystyle]{BoxI}          \begin{document}     \begin{BoxI}[Euclid]       Text...     \end{BoxI}     Some text...     \end{document}


title: What's the difference between \path and \draw in Tikz?

text: The question is in the title: What is the difference between the commands `\path` and `\draw` in Tikz? The PGF and TikZ manual by Till Tantau tells me (on page 26 of the current version) that “`\draw` is just a shorthand for `\path[draw]`”. In some of the answers I got to previous questions on how to draw certain figures using `Tikz`, some users have used a mixture of `\path` and`\draw` in their code, while others only seemed to use `\draw`. The very helpful slides Marc van Dongen has on his website explaining the basic features of Tikz also contain a mixture of both, whilst mostly relying on the `\draw` command. To remedy this confusion, I have as of now switched to using exclusivley `\draw`, but I find it very confusing. What is the difference between the two commands? Should I be using both? When is it better to use `\path` instead of `\draw` and vice versa? When is it all the same? Are there things `\path` can do that `\draw` cannot?


title: What is KerTeX?

text: There are two references to a software (distribution?) called KerTeX here on TeX.SX (one, two). Is this more an alternative to TeX Live ore more to TeX itself? Is there any benefit of using KerTeX over (whatever we use today in TeX Live 2011)?


title: Using the semantic package. How can I properly align proof derivations?

text: I am using the package _semantics_ to write logic derivations, such as the following:               $$     \inference{\neg \phi \vee \neg \psi&      \inference{\inference{\inference{}{\phi \wedge \psi}[2]}{\phi} & \inference{}{\neg \phi}[1]}{\perp} &     \inference{\inference{\inference{}{\phi \wedge \psi}[2]}{\psi} & \inference{}{\neg \psi}[1]}{\perp}     }{\inference{\perp}{\neg (\phi \wedge \psi)}}[ 2]     $$      The code works, except it's not properly aligned as shown in the result ![enter image description here](http://i.stack.imgur.com/u6FQH.png) Notice how the `\inference{}{\neg \phi}[1]` looks like it's floating. But the `\inference{}{\neg \psi}[1]` it's correctly aligned. Why is that and how can I fix it?


title: pdfcrop generates larger file?

text: I use `pdfcrop` to remove margins from a 10MB PDF, 400pages. Margins are properly removed, but the resulting PDF is 51MB large? Any suggestions?


title: Log scale with integer numbers on y-axes

text: I'm writing a report and one of the requirement of my Bode-plots is that they are logarithmic, but I need integer numbers (i.e. 10, 20 and 30) on the y-axes. I tried using ytick={} but these numbers do not appear in the graph. Part of my code:               \begin{tikzpicture}     \begin{loglogaxis}[         xlabel=frequentie $f (\hertz)$,         ylabel=weerstand $R (\ohm)$,         grid=both,          minor grid style={gray!25},          major grid style={gray!25},         ytick={10,15,20,25,30}]     \addplot table[x=f,y=R,col sep=semicolon]{MeetresultatenOpdracht12a.csv};     \end{loglogaxis}     \end{tikzpicture}      Thanks!


title: An error produced when using the caption package

text: My .tex file:               \documentclass[a4paper,twoside,portrait,12pt,openright,final,pdflatex]{report}     \usepackage[bindingoffset=8mm]{geometry}     \usepackage[T1]{fontenc}     \usepackage{arabtex}     \usepackage{utf8}     \usepackage{graphicx}     \usepackage{float}      \usepackage{caption}     \captionsetup{font=small,labelfont=bf}     \setcounter{secnumdepth}{3}     \usepackage{fixltx2e}      \usepackage{paralist}      \usepackage{hyperref}     \hypersetup{pdftex,linktocpage=true,bookmarks=true,colorlinks=true,citecolor=blue,filecolor=black,linkcolor=blue,urlcolor=black,pdfauthor={Ayman Elmasry},pdftitle={Algorithmic Form Generation: A Thermal Building     Envelope Design Approach}}     \usepackage[all]{hypcap}     \usepackage{lipsum}          \begin{document}          \lipsum[1-20]          \end{document}      I compile with pdflatex, and I get this error:               (/usr/local/texlive/2011/texmf-dist/tex/latex/caption/caption.sty     (/usr/local/texlive/2011/texmf-dist/tex/latex/caption/caption3.sty     Runaway argument?     {\caption@CheckCommand \@makecaption {\long \def \@makecaption ##1##2\ETC.     ! Paragraph ended before \@gobble was complete.     <to be read again>                         \par      l.901         \unskip\kern-2\captionindent\par      When I comment out:               %\usepackage{caption}     %\captionsetup{font=small,labelfont=bf}      ... I get an output PDF file with no problems.


title: Negative numbers being assigned to figures

text: I am using pdflatex distribution. I have many figures in the my latex document. For some reason the numbering stars from Figure 1 ,then Figure 2. It then goes to Figure 0, -1, -2 and so on. The subfigures are labelled in the reveres order, (d), (c), (b) ,(a) . Here is one of the examples:               \begin{figure}[h]      \centering      \caption{Some caption }\label{fig:figure1}      \begin{subfigure}[h]{\textwidth}        \includegraphics[width=0.8\textwidth]{3.pdf}        \caption{Less Reflective Object}\label{fig:lessreflec}        \caption*{More text}      \end{subfigure}      \end{figure}          \begin{figure}[h]      \centering      \ContinuedFloat      \begin{subfigure}[h]{\textwidth}         \includegraphics[width=0.8\textwidth]{4.pdf}         \caption{Another caption}          \caption*{ some text}            \label{fig:irkey}      \end{subfigure}      \end{figure}


title: How to make the contents of the address center-adjusted( change the default format of the address tag?)

text: I am trying to write my resume with LaTeX, and if you see the following image, the contents of the address is left-adjusted. ![enter image description here](http://i.stack.imgur.com/sQeaC.png) What do I do to make them center-adjusted? The code I used is as follows:               \documentclass[margin]{res}      \begin{document}      \name{\LARGE \bf MY NAME\\[12pt]} % the \\[12pt] adds a blank line after name     \address{ADDRESS STREET APT NUMBER\\ CITY, STATE ZIPCODE   \\          PHONE-NUMBER }     \end{document}


title: Displaystyle Package?

text: I am curious to know if there is a display style package, or something that would produce the same effect. You see, I get tired of constantly having to type `\displaystyle`, and making sure that it is in every place that it should be. Is there some package that will "automatically" display style all of math symbols?


title: pgfgantt: nested vgrid

text: I'm tryring to draw a schedule using pgfgantt and ran into a problem with my nested vgrid that isn't working. The drawn data is in 10 minute intervals, so I want the vgrid to contain 5 times no line, then a thin line, 5 times no line, a thin line, etc. and the 24th repetition should be 5 times no line followed by a thick line (i.e., the thin lines represent full hours while the thick line indicates the end of a day). I tried the following syntax:               \documentclass{standalone}     \usepackage{pgfgantt}     \begin{document}         \begin{ganttchart}[hgrid=dashed, vgrid={*{23}{*5{draw=none},*1{grey,thin}},*1{*5{draw=none},*1{grey,thick}}}{-100}{500}             \ganttbar[name=a1, inline, bar/.append style={fill=gray!30}, bar inline label node/.append style={below=4pt}]{a1}{-100}{100}         \end{ganttchart}     \end{document}      The compiler issues the following error: > ! Package pgfkeys Error: I do not know the key '/tikz/*5{draw=none}' and I > am g oing to ignore it. Perhaps you misspelled it. I'm using pdfTeX, Version 3.1415926-2.5-1.40.14 (MiKTeX 2.9 64-bit), and pgfgantt in Version 4.0. The closest answer to what I'm trying to do that I found was this. However, I was not able to adapt the script to my requirements (whithout breaking it). Anyone has an idea how to obtain a pattern as described above (no lines for 10-minute intervals, thin hourly lines, thick lines for daybreaks)? Thanks a lot.


title: Custom "counter" as page number substitute

text: I'm trying to typeset a book, covering a world trip. Instead of standard page numbers, I want each page to correspond with a digit representing driven kilometers. Of course I can't manually set that on each page, but I know on certain pages (looking at my GPS tracks) what the kilometer reading on that page would be. So imagine I know 2-3 certain numbers per chapter. The rest needs to be interpolated and rounded (or simply post-comma digits dropped) and spaces out evenly between the pages with known "counter" pages. Any ideas on how to do that? :) I would probably need a new command, like `\thisPageKilometerReading{12345}`. The rest could/should be done automatically. I could also set the max. kilometers which would always appear on the last page. Hope this is not toooo much to wish for? (I'm using XeLaTeX and a KOMA-Script document class.)


title: References in ConTeXt

text: I am new to ConTeXt. I've just been playing around with it to see if I can start using for my regular work. My bibliography database is in the `bibtex` format. I can't seem to get the references to print properly when I use `\completepublications`. `\placepublications` seems to work fine though. Here is my minimum working example:               \usemodule[bib]     \usemodule[bibltx]     \setupbibtex[database=xampl]     \setuppublications[numbering=yes] % Show reference numbers in the generated list.     \starttext     \chapter{One}     As \cite[lat2cont] already indicated, bibtex is a \LaTeX-centric program.     \completepublications     %\placepublications     \stoptext      Here is my `bib` file:               @article{lat2cont,         title   = {Latex to context},         author  = {Abc},         journal = {Xyz},         year    = 2003,         pages   = {603-619},     }      My MWE is more or less the same as that on the ConTeXt wiki. `\completepublications` doesn't generate the references and just prints `[[error]]` in place of the citations and nothing under the references heading. Am I missing something?


title: How to make proportional subscript when using smaller font in math mode?

text: How to make proportional subscript when using `\tiny` (or smaller than normal font size) in math mode? The following screenshot shows subscripts for `\tiny`, `\scriptsize` and normal font sizes. ![alt text](http://i.stack.imgur.com/j1tJZ.jpg)               \documentclass{article}          \begin{document}          {\tiny$(x_1,y_1)$} is in tiny font.          \noindent{\scriptsize$(x_1,y_1)$} is in scriptsize font.          \noindent$(x_1,y_1)$ is in normal font.     \end{document}


title: what are the ways to align conditions in cases

text: For example, the following is not very nice:               [f(x)]_N=\begin{cases}     f(x)  \text{       if } f(x) \le N, \\     \newline N  \text{     if } f(x) \gt N.     \end{cases}      How can I make it nicer?


title: bad formating of ff in math mode

text: I'm trying to write something like: `$affinity(x)$`, but in the PDF I see some small spacing between the two f's. ![example image](http://i.stack.imgur.com/sk2TA.png) I tried `$af{}firm(x)$` or `$aff{}irm(x)$`, but nothing works.


title: How to make \lstinputlisting applicable to file paths with spaces?

text: I am using the `listings` package and the path to the source code contains some spaces. For example, the path can be `/some dir/sub dir/file 1.txt` and   `\lstinputlisting{/some dir/sub dir/file 1.txt}` does not work. Is there a way to fix this problem?


title: Change section format in memoir/latex

text: ![enter image description here](http://i.stack.imgur.com/h5cud.png) The default format for section heading is `1.1` with memoir, how can I change it to `1.1.`?


title: missing \item with \addtocontents before \section

text: I'm trying to add short section descriptions in the ToC, which has been covered elsewhere for the book documentclass or with the addition of extra packages. I don't want to have to install any new packages, and what I'm curious about here is why this is failing for the article documentclass. Defining something like `\newcommand{\summary}[1]{\addtocontents{toc}{#1}` _nearly_ works, but fails mysteriously with `Something's wrong--perhaps a missing \item` when used just before a new `\section` (see MWE below). At the moment, I'm working around this by using the memoir documentclass instead (with some `\cftsetindents` commands and renewals of `\cft`[sub]`sectionaftersnumb` to make the ToC indentation more article-like), but I'd like to know why this isn't working for the article class.               \documentclass{article}          %% Neither of these work:     \newcommand{\summary}[1]{\addtocontents{toc}{#1}}     % \newcommand{\summary}[1]{\addcontentsline{toc}{sectioninfo}{#1}}          %% This one works, but doesn't look right (I don't want page numbers or dotted     %%  spacefilling for \summary entries.), and besides, using      %%  'subsubsection' rather than 'sectioninfo' feels Wrong.     % \newcommand{\summary}[1]{\addcontentsline{toc}{subsubsection}{#1}}          \begin{document}     \tableofcontents          \section{First Sec}     \summary{This is fine.}     \subsection{A subsec}     \subsubsection{A subsubsec}     \subsection{Another subsec}     \summary{This causes problems}          \section{Second Sec}     \subsection{further subsecs}     \summary{This is fine.}     \subsection{further subsecs}     \summary{This is fine.}          \end{document}


title: how to fix the headers in a cv

text: This is the begining of the cv that i want to do , but i've some problems with headers. this my mininal source code:               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage{scrpage2}     \usepackage[demo]{graphicx}     \usepackage{xcolor}     \usepackage{titlesec} % Used to customize the \section command     \usepackage[left=2cm,top=1.5cm, right=2cm]{geometry}     \usepackage{hyperref}     \definecolor{linkcolour}{rgb}{0,0.2,0.6} % Link color     \hypersetup{colorlinks,breaklinks,urlcolor=linkcolour,linkcolor=linkcolour}       \pagestyle{scrheadings}     \ohead{           \begin{flushleft}      \textbf{blabla blabla}      avenue of blabla, 30020 \\      new blabla, blabla \\      +00 00 00 00 00 \\      blabla@blabla.blabla \\     \end{flushleft}       \vfill     \begin{flushright}       \includegraphics[width=3.5cm, height=4cm]{blabla}      \end{flushright}          \centering{\textsc{\huge BLABLA BLABLA\\         \Large blabla blabla blabla  \\        at blalblabla \\}}     \begin{flushleft}       \section*{Formation}       \vspace{-0.5cm}       \titlerule       \vspace{0.5cm}       \begin{tabular}{r|p{13cm}}         2011-Aujourd'hui & -blablablabla  \\         & \footnotesize{ school of blablablablabala}\\         Été 2013 & again blablablaba \\          2009-2011 & and again blabalblablal  \\         2009 & -and again again blablablalba  \\        \end{tabular}     \end{flushleft}      }                \begin{document}      \null      \end{document}      And i want to know how to fix the headers to become aligned without using \hspace and vspace and also i want to know how to put the sections in the document not in the ohead and also i want to know how to rule the section like the same example without using the \vspace, i want it automatically and thanks a lot for your help , i really appreciated .


title: Very wide equation ruins consecutive side edges

text: I've just created a set of equations in matrix form which looks fine. It also seems to fit in the space of my document, but in the following space after the equation, the side edge is suddenly gone, i.e. the text starts further on the left than it should. This remains wrong for the rest of the document. I have to mention that I want to label this equation on the right to keep consistent. Maybe a solution would be to reduce the space b/w the equation and the label on the right, if that's possible. `\split`is no option here, because it doesn't look good in vector form. edit: found out the issue. The text looks bad the way it is, but it in the correct position as pointed out in the answers. If you don't want to split you can only change the font it seems. Here is a minimal example to illustrate the issue.                 \documentclass[a4paper, 12pt, headsepline]{scrreprt}     \usepackage{amsmath, amssymb, mathtools}     \usepackage{mathptmx}     \usepackage[a4paper]{geometry}     \geometry{left=4.5cm,right=3.5cm,top=2cm,bottom=2cm}               \begin{document}     \begin{equation}     \begin{pmatrix}     a1 + a3 \\     a2 + a4\\     a3 + a2\\     a4 + a1     \end{pmatrix}     =     \begin{pmatrix}     b1 \\     b2 \\     b3 \\     b4     \end{pmatrix}     +     \begin{pmatrix}     \theta & \theta  & \theta  & \theta & \theta & \theta & \theta & \theta & \theta & \theta  \\     \theta  & \theta  & \theta  & \theta & \theta & \theta  & \theta & \theta & \theta & \theta \\     \theta  & \theta  & \theta  & \theta  & \theta & \theta & \theta & \theta & \theta & \theta  \\     \theta  & \theta  & \theta & \theta & \theta & \theta & \theta & \theta & \theta & \theta      \end{pmatrix}     \begin{pmatrix}     c1 + 4352523523523532 \\     c2 + 4352523523523532\\     c3 + 4352523523523532\\     c4 + 4352523523523532     \end{pmatrix}     +     \begin{pmatrix}     x1 \\     x2 \\     x3 \\     x4     \end{pmatrix}      \end{equation}     fgdgdfgfdgfdg dfgf fdg fdg dfgfdg dfg dfg fdgfdgdfg      df gdfg fdfg fdg dfg fdg fdg df fdg dfg fdg     \end{document}


title: \sqrt: The vinculum and the rest of the radical are misaligned

text: When the height of the radicand exceeds a certain threshold, LaTeX replaces the check-sign-like part of the root sign with a more vertical one. This behavior has a flaw: The vertical replacement part does not align properly with the vinculum (the horizontal bar). For example,               \documentclass{article}     \begin{document}     \[     \sqrt{\sqrt{\sqrt{\sqrt{\sqrt{\sqrt{\sqrt{}}}}}}}     \]     \end{document}      produces ![Nested radicals](http://i.stack.imgur.com/tu1y1.png). I've found a few related questions here on Stack Exchange. The question problem compiling some 'math' using LuaLaTeX is nominally about LuaLaTeX, but the first comment, by user egreg, seems to imply that the question is related to mine. The comment blames the PDF rendering, and there may be some truth to that — the misalignment seems less noticeable to me on a high-density screen (eg. the retina MacBook Pro). However, it's not a problem with any single PDF viewer: I've seen the misalignment in Latexian, Preview, and Skim on OS X, in Adobe Reader on Windows, and on a printed copy. The solitary answer to that question, by the way, doesn't seem to relate my problem. The misalignment is also evident in the question \sqrt symbol with a vertical part. Its solution produces a slanted radical, but leaves a noticeable gap between the two components of the radical. Does anyone else see the misalignment? Any idea what the underlying cause is? And are there any workarounds?


title: How can I make a diagram like this in LaTeX?

text: How can I make a chart like this in LaTeX? ![Chart with lines between boxes](http://i.stack.imgur.com/HhgbZ.png)


title: I want to type a document once and typeset it at multiple different levels of complexity

text: I think this is clearest in an example. Here's my document:               \begin{enumerate}     \item{1} The heart         \begin{enumerate]         \item{1} It pumps blood through the body.         \item{2} It has four chambers.         \item{2} The inferior and superior vena cava bring blood from the body.         \end{enumerate}     \end{enumerate}      The idea is that I could set typeset-level=1 and get a document that just says:   1. The heart a. It pumps blood through the body. Or I could set typeset-level={1-2} and it typesets the whole thing. I don't want to be restricted to typesetting certain "depths" of the outline, I want to be able to specify, for each entry, a "complexity level". The goal is to make documents for my students such that a student with no background can read the level 1 doc, then the level 2 doc, etc. and the student with good background can just skip to the level 3 doc. And I think the level 1 doc should always be a subset of the level 2 doc (and 2 a subset of 3, etc.). Thanks for any suggestions you can offer!


title: removing space after first hline of tabular

text: How can I either remove the space after the first hline of the right tabular (the second tabular in the following code) or if that is not possible, what kind of value do I have to pass to the trim-parameter of adjustbox (e.g. `{valign=T, trim=0 \parskip}` or something like that) in order to get rid of this space? Note that I don't care about the hline. It's just here to show you, what kind of space I want to remove. Thank you!               \documentclass{scrartcl}          \usepackage{adjustbox}          \begin{document}     \adjustbox{valign=T}{\begin{tabular}[t]{@{}l}\hline     \Huge X1\\\\     \tiny X2     \end{tabular}}     \adjustbox{valign=T}{\begin{tabular}[t]{r@{}}\hline     X1\\\\X2     \end{tabular}}     \end{document}


title: Use a character other than the backslash for commands

text: I happen to author LaTeX code in an environment that makes entering the backslash tedious¹. Can I somehow tell LaTeX: From now on, treat, `|` (or another rarely used character) as if it were a `\`, so that I can write my LaTeX code like               This is a |emph{very} important fact from |cite{some_paper}.      and get the same result as if I had written               This is a \emph{very} important fact from \cite{some_paper}      while normal command with `\` still work as before (as they are inserted automatically by the authoring tools in certain places)? Bonus points if I can use some unicode character (like ✓, which happens to be bound on my keyboard), to reduce the risk of clashes. ¹ Don’t ask why. Oh, you did? Well: I edit in Isabelle/jEdit, which replaces sequences like \c with special unicode characters, which is nice when working on Isabelle theories, but makes writing the documenting TeX code a pain.


title: Text wrapping in a minibox?

text: For a class I'm given access to a LaTeX version of the homework so that it's easier to fill out. We're given boxes we're suppose to answer the questions in similar to:               \begin{picture}(420,570)(0,0)     \put(0,5){\framebox(420,550){\minibox{     I'm writing my answer here.     }}}     \end{picture}      The `\begin`, `\put`, and `\framebox` are there in the file the professor gives out. I added the `\minibox` so I could more easily do a few things that are difficult without it. My problem is that if I write a bunch of sentences in this answer, the answer does not automatically text wrap within the box. How can I wrap the text in this situation? Thank you for your time!


title: Automatically start a new line at the beginning of a proof environment?

text: I use `amsmath` to provide the `proof` environment. However, if a `itemize` (or `tikzpicture`) environment immediately follows the `proof` environment, `xelatex` will produce a messy result:               \begin{proof}     \begin{itemize}     \item 1     \item 2     \end{itemize}     \end{proof}      Will produce something like this: > _Proof_. * 1 > >   * 2 > So I have to manually add a `\mbox` after the `proof` env. Is it possible to make `proof` automatically add a newline in these situations?


title: Left-align all equations in a block

text: align environment without any explicit alignments points (given by &) right justifies the equations in the block. They can be left justified by putting & at the beginning of each equation. Is there any way to left justify them without starting &-s? Maybe some special environment or option? It seems to be an extra work to tell the compiler again and again that I want left alignment on each line.


title: Can not get a pdf out

text: I'm kinda new in LaTeX environment. I started with downloading MiKTeX and TeXstudio. I installed both and they were installed and runned smooth. My purpose was to write a Springer LNCS in LaTeX format. So I downloaded `.sty` files and etc. from here and I put them into same folder as my tex file that I'm working on. I started with these lines:               \documentclass{llncs}     \usepackage{amssymb,latexsym,amsmath}     \begin{document}     content...     \end{document}      Compiling these lines gave me a pdf file only written "content" in it. But when I changed it to following;               \documentclass{llncs}     \usepackage{amssymb,latexsym,amsmath}     \begin{document}     \title{eyestates}     \end{document}      I was not able to get a PDF output nor a DVI after. What could be the possible problem. Am I missing something?


title: How do I add dots in TOC?

text: I want to add dots that would fill the space from section/subsection name to the page number in TOC. How do I do that?


title: Uncited references with internal bibliography

text: I'm using an internal bibliography in my main .tex file :               \begin{thebibliography}{100}      Is there a way to tell which entries I'm not referencing so I can remove them? I'm using texshop, and except for a               LaTeX Warning: There were undefined references.      it tells me nothing more specific (I think).


title: How to suppress page number?

text: I've made myself custom title-page, put it in separate `.tex` file and when I input it, it is numbered with 1. The very next page is numbered with 1 also, and page-number increases on the following pages. Main file looks like this               \documentclass[11pt,a4paper,draft]{article}     \usepackage{./mystyle}          \begin{document}     \thispagestyle{empty}     \input{./titlepage.tex}     \input{./text.tex}     ...     \end{document}      How do I **suppress page-number** on that **title-page**? (Why `\thispagestyle{empty}` doesn't work?) **edit:** Here's the title-page:               \begin{titlepage}         \begin{center}                  % Upper part of the page             \textsc{\large Uni}\\[0.1cm]             \textsc{\Large Faculty}\\[2.8cm]             \textsc{\Large Sensors}\\[0.1cm]             {\Large Paper}\\[0.25cm]                   % Title             \HRule \\[0.3cm]                 { \Large \bfseries Occupancy}\\[0.3cm]                 { \huge \bfseries Tribos}\\[0.05cm]             \HRule \\[0.05cm]                  % Author and supervisor             \begin{center} \large                 \emph{Student:}\\                 An \textsc{Ant}             \end{center}             \vspace{1.8cm}             \begin{spacing}{0}                 \tableofcontents             \end{spacing}             \vfill             % Bottom of the page             {\large \today}              \end{center}     \end{titlepage}


title: How to add the preface to Contents in ConTeXt?

text: I am writing an aritcle on English grammar which has a preface in the front matter. Now I found that the preface wasn't added to contents. I try to redefine the combinedlist, but it still has no effect.               \definecombinedlist       [content]       [part,chapter,        title,        section,subsection,        subsubsection,subsubsubsection]     \starttext     \setuppagenumbering       [alternative=dobulesided]          \startfrontmatter     \completecontent     \title{Preface}     Two years ago, I met $\ldots$     \stopfrontmatter          \startbodymatter     \chapter{Phrasal verb}     The term {\bf phrasal verb} is commonly applied to two or three distinct but related constructions in English.     \stopbodymatter     \stoptext      How can I define the combinedlist so that it can contain the preface?


title: How to make a table wide in a twocolumn-mode document?

text: How could I make a table wide (like using table*) in a twocolumn-mode document, that can break a page? Below the expected result (made in any ordinary text editor). Page 1 ![Expected long table exhibition- Page 1](http://i.stack.imgur.com/68Lai.png) Page 2 ![Expected long table exhibition- Page 2](http://i.stack.imgur.com/AY7Qa.png) **UPDATE** By following a suggestion of using multicols and longtable, this is the achieved output. In the first page it seems ok, but after break, the multicol environment is not followed accordingly.               \documentclass[final,5p,times,twocolumn]{article}          \usepackage{longtable}     \usepackage{multicol}     \usepackage{lipsum}          \newcount\n     \n=0     \def\tablebody{}     \makeatletter     \loop\ifnum\n<50         \advance\n by1         \protected@edef\tablebody{\tablebody                 \textbf{\number\n.}& shortText & longlonglonglonglong text                 longlonglonglonglong text                 \tabularnewline         }     \repeat     \makeatother          \begin{document}              \lipsum[1-10]              \begin{multicols}{2}         \end{multicols}              \begin{longtable}{|l|l|l|}         \caption[Triple columns]{Triple columns.}\\              \hline              \multicolumn{1}{|c|}{\textbf{Time (s)}} & \multicolumn{1}{c|}{\textbf{Triple chosen}} & \multicolumn{1}{c|}{\textbf{Other feasible triples}} \\          \hline         \endfirsthead                  \multicolumn{3}{c}%             {{\bfseries \tablename\ \thetable{} -- continued from previous page}} \\         \hline              \multicolumn{1}{|c|}{\textbf{Time (s)}} & \multicolumn{1}{c|}{\textbf{Triple chosen}} & \multicolumn{1}{c|}{\textbf{Other feasible triples}} \\          \hline          \endhead              \hline              \multicolumn{3}{|r|}{{Continued on next page}} \\          \hline         \endfoot              \hline \hline         \endlastfoot              \tablebody              \end{longtable}          \end{document}      Page 1 ![Page 1- update](http://i.stack.imgur.com/gZBCI.png) Page 2 ![Page 2- update](http://i.stack.imgur.com/lQtKl.png) Page 3 ![Page 3- update](http://i.stack.imgur.com/B0mXi.png)


title: How to make a real backslash (escape) character?

text: I just want a good way to make a backslash character (or whatever character(s) any given format uses as escape characters), suitable to `\write` to a file or pass to a pdfTeX primitive. Let me emphasize that getting it to typeset is **not** the point of the question. In fact, if using cmr10/11/12, what I want **would not** be usable to typeset a backslash, since these fonts use that slot for something else for some reason. An acceptable answer will say how to do this in general, not just in LaTeX, though format-specific techniques are also of interest (and will be upvoted). Bonus points for explaining how to do this for all characters with special catcodes. (Not literal bonus points, only figurative ones. At least, not from me; I only have 296 rep at the moment!)