title: Discouraging line break in an alignment

text: In the question Generate table with dynamic number of columns the OP posed a question to which my initial reaction was "No". However, now I've run into something interesting which, if I'm reading it right, would fit the bill. From the _TeX by topic_ by Victor Eijkhout (25.2.3): > `\noalign{\penalty100}` for discouraging a page break (or line break) in > between two rows (columns) of an `\halign` (`\valign`). So if I understood the above correctly, for `\valign` that would read: > `\noalign{\penalty100}` for discouraging a line break in between two columns > of an `\valign`. I thought: "That's _exactly_ what was asked for", but couldn't figure out how.


title: Putting all cross references in brackets in LyX

text: I have many equation occurrences in a long document, where LyX automatically cross-referenced its equations with `\ref{}` rather than `\eqref{}`. I want all references to be in parenthesis. A few solutions occur to me, and I need help with a smart solution.   1. The tedious solution is to go to every equation and click on it, and choose the Format to be ("<"reference">").   2. A smarter solution would be to open the lyx source and replace all \ref with \eqref. I'm avoiding this for now because it's easy but stupid.   3. The smartest solution I'm looking for is a command like `\renewcommand{\ref}[1]{(\eqref{#1})}` to put in the preamble. But this doesn't work. Is there something to put in the preamble to make all `\ref{}` be put in parentheses?


title: Punctuation marks in math mode in xetex/mathspec

text: I am using XeTeX and have the following short document:               \documentclass[a4paper,12pt]{article}     \usepackage{amsmath,amsthm}     \usepackage[MnSymbol]{mathspec}     \usepackage[no-sscript]{xltxtra}     \defaultfontfeatures{Mapping=tex-text}     \setallmainfonts{Minion Pro}          \begin{document}          $\phi, \varphi, \delta \ldots A \vee B$          \end{document}       Now no matter what font I am using the punctuation marks in math mode (commas, dots, `\ldots` etc.) come out in Computer Modern. Is there a way to change this?


title: Adding letters to equation numbers

text: I want to number use a equation and add a letter to the equation number such as:               f(x) =a x and g(x) = b x                     (3.1.1a,b)      That is e.g. using `\begin{equation}` ... `\label{eq} \end{equation}`


title: Handling of special LaTeX characters in text

text: I have a LaTeX file for a book chapter, which may need to be converted to Word at some point, because that is what the publishers use (sigh). This article doesn't have any math in it, but I'm still using LaTeX, because even when not writing mathematics, it is better than the alternatives. Unfortunately, I'm making heavy use of characters that are only supposed to appear inside a math environment, notably the underscore character (`_`). I do use the math environment in a couple of places, but only very briefly. So, my question is, can I tell LaTeX to make an exception for this specific character, and actually treat the underscore as a underscore? This would make later conversion to Word or some other word processing format easier. The alternative is to use `\\_` in lots of places. Bonus points if there is some way to still use underscore inside a math environment, not sure how that would work. To be clear, I'd like a general technique that would work with any of the special LaTex characters, though I suppose remapping most of the other ones would cause more trouble than it was worth. I'm not sure what tags to use here, so please feel free to add. Thanks. EDIT: It turns out this is a FAQ - How to typeset an underscore character.


title: Nice looking empty set?

text: I feel like the standard `$\emptyset$` is ugly. By hand, my empty set symbol is a lot rounder, then this "slashed-zero"-type symbol. Two questions:   * Do people really use it (I mean people who have any sort of sense of aesthetics)?   * What alternatives do you suggest? I seem to recall something closer to what I'm looking for - a slash round-o - but the diameter of the circle seemed too small, I think. (And am I asking this in the right place?)


title: Is there a way to zoom in Texmaker like in TeXworks?

text: I've recently discovered Texmaker and prefer it vastly to TeXworks. But one thing that I liked about TeXworks is that I could click on my compiled pdf and it would zoom in closely enough to examine my text for small formatting errors. Is there a way to do this in Texmaker?


title: Using \ChapFrame: Removal of dot after tag

text: When using `\ChapFrame` and, e.g., a tag such as `\TheChapter` is being used, I end up with a dot after my tag (referring to the `\ChapFrame` command as given in the answer to Chapter Title in rotated vertical box at the margin). Seems as this is default. How do I remove it?


title: Strange Activity with TexStudio after Installing Package

text: I'm writing a program in TexStudio which includes an algorithm/pseudocode. I used the second post here to help write the pseudocode. After installing the following packages:               \usepackage{graphicx}     \usepackage{algpseudocode}      it runs find and builds the document and looks great, but I'm getting the following `messages` in the command and it keeps flashing up the first page of the document in the center of the scene (for less than a second).               Process started: pdflatex -synctex=1 -interaction=nonstopmode "template".te     Process exited normally     Process started: latex -interaction=nonstopmode "ZP7332".tex     Process started: latex -interaction=nonstopmode "HS7332".tex     Process exited with error(s)     Process started: dvipng.exe -T tight -D 120 "ZP7332".dvi     Process exited with error(s)     Process started: dvipng.exe -T tight -D 120 "HS7332".dvi     Process exited normally     Process exited normally     Process started: latex -interaction=nonstopmode "lK7332".tex     Process exited with error(s)     Process started: dvipng.exe -T tight -D 120 "lK7332".dvi     Process exited normally      Would it be best to avoid these packages or can I fix this issue and stop the flashing and error messages? Thanks for your time.


title: Problems with TeX scoping

text: If I use               \global\advance\itemno by 1%     \ifnum\itemno=4\the\itemno\fi      I get 5. If I use               \global\advance\itemno by 1%     \itemno=\itemno%     \ifnum\itemno=4\the\itemno\fi      I get 4 as expected. Why is this necessary?


title: Insert other shape with shapepar and cutout

text: How to fix this code so that the text clipping the picture? I'm not able to edit the initial commands.               \documentclass[a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage{shapepar}     \usepackage{tikz,lipsum}     \pagestyle{empty}          \begin{document}          \cutout{r}(-20mm,155mm)     \shapepar{{180.449753}%     {0.0}b{239.0}%     \\{0.0}t{239.0}{24.0}%     \\{0.0}b{239.0}%     \\{0.0}t{239.0}{24.0}%     \\{5.920649}t{211.0}{81.0}%     \\{12.0}t{196.0}{111.0}%     \\{24.0}t{178.0}{148.0}%     \\{36.0}t{165.0}{173.0}%     \\{48.0}t{156.0}{189.0}%     \\{60.0}t{149.0}{202.0}%     \\{72.0}t{145.0}{210.0}%     \\{84.0}t{141.0}{216.0}%     \\{96.0}t{139.0}{220.0}%     \\{108.0}t{138.0}{222.0}%     \\{120.0}t{137.0}{224.0}%     \\{132.0}t{138.0}{223.0}%     \\{144.0}t{138.0}{223.0}%     \\{154.757495}t{139.0}{222.0}%     \\{156.0}t{139.0}{222.0}%     \\{168.0}t{140.0}{221.0}%     \\{180.0}t{142.0}{218.0}%     \\{192.0}t{144.0}{216.0}%     \\{204.0}t{147.0}{212.0}%     \\{216.0}t{151.0}{208.0}%     \\{219.515642}t{152.0}{207.0}%     \\{228.0}t{156.0}{202.0}%     \\{240.0}t{166.0}{192.0}%     \\{242.135455}t{168.0}{190.0}%     \\{244.643273}t{174.0}{8.0}t{183.0}{175.0}%     \\{252.0}t{174.0}{183.0}%     \\{252.224841}t{174.0}{183.0}%     \\{264.0}t{158.0}{199.0}%     \\{276.0}t{145.0}{212.0}%     \\{288.0}t{138.0}{219.0}%     \\{300.0}t{130.0}{226.0}%     \\{312.0}t{116.0}{240.0}%     \\{324.0}t{105.0}{251.0}%     \\{330.465228}t{100.0}{256.0}%     \\{336.0}t{96.0}{260.0}%     \\{348.0}t{89.0}{266.0}%     \\{360.0}t{83.0}{272.0}%     \\{372.0}t{78.0}{276.0}%     \\{384.0}t{73.0}{281.0}%     \\{396.0}t{68.0}{285.0}%     \\{408.0}t{62.0}{290.0}%     \\{420.0}t{54.0}{296.0}%     \\{432.0}t{44.0}{305.0}%     \\{444.0}t{34.0}{312.0}%     \\{450.776477}t{28.0}{317.0}%     \\{456.0}t{24.0}{320.0}%     \\{468.0}t{14.0}{327.0}%     \\{480.0}t{6.0}{331.0}%     \\{492.0}t{0.0}{333.0}%     \\{504.0}t{1.0}{328.0}%     \\{516.0}t{24.0}{301.0}%     \\{528.0}t{77.0}{244.0}%     \\{529.778338}t{85.0}{235.0}%     \\{540.0}t{124.0}{191.0}%     \\{552.0}t{172.0}{135.0}%     \\{556.773109}t{192.0}{111.0}%     \\{564.0}t{227.0}{64.0}%     \\{567.717726}t{254.0}{22.0}%     \\{567.717726}e{254.0}%     }     \begin{minipage}[t]{2cm}       \vspace{10mm}       \centerline{\tikz[overlay]%         \node{           \includegraphics[width=35mm]{business-women}         };       }     \end{minipage} \par     \lipsum*[1-5]          \end{document}      ![enter image description here](http://i.stack.imgur.com/IM4ss.png)


title: „German“ quotation marks in .cls file

text: I have a class file which, among other things, generates a title page for my paper. The name of of my school, which appears at the top of the title page, is hard-coded into the class file. I would like to be able to utilize `\RequirePackage[serbian]{babel}` along with `"` "'` within the .cls file to get German-style quotation marks („“) in my document, but when I try including the package it just doesn't work. Here's the code along with the output:               {\large \textsc{Gimnazija "`Branislav Petronijevi\'{c}"'}\par}     {\small Ub, Vuka Karad\v{z}i\'{c}a 15 \par}      ![Bad German quotation mark parsing](http://i.stack.imgur.com/JTUa2.png) Yet, if I copy the code over to the .tex file that holds the document, it works just fine with the babel package. Is the class file for some reason not including the package? Are there any alternatives to what I'm trying to achieve? If you would like to take a look at the class file, you can do so here: http://pastebin.com/KsXjERng It's something I got off the web and made edits to.


title: Multi-line nodes/annotations in pgfplot

text: It would be great if I could get the annotation in the graph depicted below on two lines, but I can't seem to figure it out. Presently, I have:               \begin{tikzpicture}     \begin{axis}[                 xlabel={$d_x = w^T_x-w^G_x$},                 ylabel={$s_x = e^{-\frac{d_x^2}{2\sigma^2_x}}$},             ]         \addplot+[                     domain=0:600,                     smooth,                 ]{exp(-x^2/(2*266.72^2))};         \node[coordinate,pin=-90:{$d_x = 100, s_x = 0.932$}] at (axis cs:100,0.932) {};     \end{axis}     \end{tikzpicture}      ![Graph with annotation on single line](http://i.stack.imgur.com/S6DyM.png) Looking at a similar question, I've tried changing the `\node` to:               \node[coordinate,pin=-90:{$d_x = 100$\\$s_x = 0.932$}] at (axis cs:100,0.932) {};      This produces the following error: > There's no line here to end I've also tried replacing `\node` with a `\draw`:               \draw             (axis cs:100,0)         |-  (axis cs:0,0.8)         node[near start,left]{$d_y = 100$\\$s_x = 0.932$};      This, too, doesn't seem to want to compile: > Something's wrong; perhaps a missing \item


title: Centering tabular array of images

text: I have a tabular array of four images and I am not able to center it. My images are pushed towards the right edge of the sheet. The centering looks fine for single images , so I am guessing this issue is of centering starting from the margin. How do I make an visually pleasing centering of my images.               \begin{center}          \begin{table}[h]     \begin{tabular}{cc}     \textbf{blah}  & \textbf{text} $m=\pi,n=e$  \\     \includegraphics[height=45mm]{liss0.png} &     \includegraphics[height=45mm]{liss1.png} \\      \includegraphics[height=45mm]{liss2.png} &      \includegraphics[height=45mm]{liss3.png} \\     \textbf{text} & text          \end{tabular}     \end{table}     \end{center}      I would not mind if my image breaks a little off into the left margin.


title: How can I export pdf files with tikz/pgfplots?

text: I am writing a long thesis and would like to source out some graphics, so that I do not have to in every run I am compiling the tex file. Here is a simple example:               \documentclass[a4paper]{scrreprt}     \usepackage[ngerman]{babel}     \usepackage[latin9]{inputenc}     \usepackage[T1]{fontenc}          \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{amsthm}     \usepackage{bibgerm}     \usepackage{paralist}     \usepackage{lmodern}          \usepackage{pgfplots}     \pgfplotsset{compat=1.3}     \usepackage{tikz}     \usepgfplotslibrary{external}     \tikzexternalize[shell escape=-enable-write18]               \begin{document}          long text ...          \begin{figure}[h]     \centering     \begin{tikzpicture}     \begin{axis}     \addplot[color=black, mark=] table[x=Tag,y=Dax] {test.txt};     \addlegendentry{DAX}     \end{axis}     \end{tikzpicture}     \caption{Test}     \end{figure}          long text ...          \end{document}      I get the error message: > ! Package tikz Error: Sorry, the system call 'pdflatex -halt-on-error > -interact ion=batchmode -jobname "diss-figure0" > "\def\tikzexternalrealjob{diss}\input{dis s}"' did NOT result in a usable > output file 'diss-figure0' (expected one of .pd f:.jpg:.jpeg:.png:). Please > verify that you have enabled system calls. For pdfl atex, this is 'pdflatex > -shell-escape'. Sometimes it is also named 'write 18' o r something like > that. Or maybe the command simply failed? Error messages can b e found in > 'diss-figure0.log'. If you continue now, I'll try to typeset the pic ture. I read several manuals and tried many modifications, but nothing worked. I am using TexnicCenter 1.0, MikTex 2.8 and Windows XP SP3.


title: Inserting slashed zero in non-OpenType supporting LaTeX

text: Is there a slashed zero symbol in the standard LaTeX font that's accessible with pdflatex et al? I greped through the comprehensive symbols list a bit but didn't spot anything. In XeLaTeX I can use the OpenType feature `+zero` on supported fonts. For instance, with Calluna by Exljbris I can do something like this:               \documentclass{minimal}          \usepackage{fontspec}          \newcommand*{\defaultfontfamily}{Calluna}     \setmainfont[Mapping=tex-text]{\defaultfontfamily}     \newcommand*{\lnum}[1]{{\fontspec[RawFeature={+lnum}]{\defaultfontfamily}#1}}     \newcommand*{\zero}[1]{{\fontspec[RawFeature={+zero}]{\defaultfontfamily}#1}}     \newcommand*{\zerolnum}[1]{{\fontspec[RawFeature={+lnum,+zero}]{\defaultfontfamily}#1}}          \begin{document}     0\zero{0}\lnum{0}\zerolnum{0}     \end{document}      and get a few different types of zero: ![Several different zeros in Calluna](http://i.stack.imgur.com/4I0dh.png) However, I'd love to find a way to do this in non-OpenType supporting LaTeX engines. P.S. `\\(\emptyset\\)`, `\\(\slashed{0}\\)`, and the like don't count. I'm mostly interested in text mode, but if you have a solution for text mode _and_ math mode that would be nice too. Also, before someone says it, `\o` and `\O` are letters, not numbers. They don't count either!


title: Page number of glossary

text: I want to reference the glossary from within the text (I'm using the glossaries package). However, since the glossaries are produced using `\printglossaries`, I can't just put a `\label` command where it needs to be. Putting a `\label` command just before or just after the `\printglossaries` command doesn't work: It gives the wrong page number. I browsed through the glossaries manual, but didn't find anything about labels or references.


title: Header and Footer on multipage listoffigures

text: I've using the fancyhdr package to modify the header and footer. If my `\listoffigures` spans multiple pages then the header and footer on page one of the LoF is not fancy. The TeX example below demonstrates this. What am I doing wrong please?               \documentclass{report}          \usepackage[a3paper,landscape]{geometry}          \usepackage{fancyhdr}     \pagestyle{fancy}     \fancyhead{}     \fancyhead[L]{A}     \fancyhead[C]{FANCY}     \fancyhead[R]{HEADER}          \fancyfoot{}     \fancyfoot[L]{A}     \fancyfoot[C]{FANCY}     \fancyfoot[R]{FOOTER}          \begin{document}          \listoffigures\thispagestyle{fancy}          \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage     \begin{figure}[p]\begin{center}qwerty\caption{qwerty}\end{center}\end{figure}\clearpage          \end{document}


title: How to reduce hspace between columns in align environment

text: With the following MWE, I have 2 columns:               \documentclass[12pt, a4paper]{scrartcl}     \usepackage{amsmath}     \begin{document}     \begin{align*}     4   &= 4 && \text{yes}\\     0   &= 0 && \text{no}\\     1+1 &= 2 && \text{maybe}     \end{align*}     \end{document}      But I would like to control the hspace between the 2 columns, possibly, with only one command call for the whole `align`, rather than one for each line.


title: Pictures in LaTeX

text: I'm trying to insert an image for ShareLaTeX, and I don't know a whole lot about the program. I saved an image to my desktop and this is the following code:               \documentclass{article}     \oddsidemargin -.25in       % Lt Margin adj for odd pages (0 = 1`` margin    )     \evensidemargin -.25in      % Rt Margin adjustment for even pages     \topmargin -.5in            % adj top margin from 1''     \footskip .5in     \textwidth 7in              % width of printed area     \textheight 8.5in             % height of printed area          \usepackage{amsmath,amsthm}     \usepackage{fancyhdr}          \pagestyle{fancy}          ...          \usepackage{url}     \usepackage{graphicx}          \begin{document}          ...          \includegraphics{bgraph.jpg}      and nothing comes up, I don't see anything about draft in my `\documentclass` so i don't know what to do.


title: Extra spacing and right align

text: I am working on a list of courses that I have taken. The following code:               Math 100--Trivialities \hfill Professor Jane Doe     \begin{flushright}     Grade: A     \end{flushright}      produces ![enter image description here](http://i.stack.imgur.com/jjjcH.png) Notice that there is an extra line space between the professor's name and grade. Is it possible to remove that space so that the Grade appears on the next line as if it were typed in a paragraph? In my mind, I'm thinking of it looking something like:               Math 100-Trivialities        Professor Jane Doe                                            Grade: A


title: Creating process table figure in TikZ

text: I'm teaching operating systems course and I have to create many "process/memory map/inode table" structures for the course. For those who don't know (not sure if any of them would be here), See the figure below: ![enter image description here](http://i.stack.imgur.com/rMD0K.png) I can create the outer box and place it properly using TikZ but what would be the most efficient way of creating the different table boxes so that I can reuse them again and again in all the figures. **Update:** After the `rectangle split` tip in the comments, I have the following:               \begin{tikzpicture}     \usetikzlibrary{shapes, positioning}               \node [draw, rectangle split=3, text width=2cm] (p1) {};          \node [left=12pt of p1, rectangle split=3, font=\tiny] {256     \nodepart {second} 255     \nodepart {third} \vdots     \nodepart {fourth} 0     };          \node [draw, rectangle split=3, text width=2cm, right=1cm of p1] (p2) {};          \node[above=12pt of p1, text width=2cm, font=\tiny, text centered] (p1l) {Per Process File Descriptor Table};     \node[above=12pt of p2, text width=2cm, font=\tiny, text centered] (p1l) {File Table};          \end{tikzpicture}      It produces the following output: ![enter image description here](http://i.stack.imgur.com/bSurk.png) A couple of issues though:   1. How do I make the arrows?    2. The numbering on the left of the first table doesn't really match the splits in the table.    3. How do I make some boxes bigger?  Also, is this the best way to do this? Seems like the code should be clean- able a little bit more.


title: amsmath - multiple labels in one equation

text: I would like to use multiple labels in the same equation when using `amsmath`. Basic latex already has this feature, but not amsmath, which seems to manipulate labels in complicated ways. Is it possible to alter the `amsmath.sty` code to restore this feature? Or, alternatively, how to temporarily unload the `amsmath` package? This issue arises when compiling together different articles with `\include`, some using `amsmath` and not others. But I found that unloading packages is not possible in latex.


title: Straight line junction with an arc

text: The following is a minimal working example for what I'm trying to achieve. I need to create a figure that looks like an U, that is, a capital U. However the junction between each of the straight lines and the arc is "sloppy". Is there a way to improve that?               \documentclass{article}     \usepackage{tikz}          \begin{document}          \begin{tikzpicture}     \draw[very thick,blue] (0,10) -- (0,0);     \draw[very thick, blue] (0,0) arc (-180:0:3);     \draw[very thick, blue] (6,0) -- (6,10);     \end{tikzpicture}          \end{document}


title: matlab2tikz for surf plots: reducing data?

text: I was really happy to see that matlab2tikz also supports surf plots. Unfortunately, it produces too much data, so I run into the well-known memory problem. I tried compiling with lualatex instead of pdflatex, but I get errors like > Package pgfkeys Error: I do not know the key '/tikz/axis lines*' and I am > goi ng to ignore it. Perhaps you misspelled it. Since I have never used lualatex before, I have not tried any further at this point, but I am open to suggestions. I then found the option 'minimumPointsDistance' for matlab2tikz. This works great for normal plots, but it seems to have no effect for a surf plot. I then tried the option 'each nth point' in the tikzpicture. Using every tenth point is fine for compiling, but does not produce an acceptable plot. 7 is better, but still far from ok, 6 gives me the old memory problem. I tried doing the plot in MatLab with only half the points in each direction, but this looks worse than 'each nth point={10}'. Why does this have to be so complicated? This was only a test run with 100 by 100 points! There is still room for optimization, though. A large portion of my plot is close to zero, so it would be best to kick out some of those. The interesting part seems to be very sensitive to leaving out points, so I would prefer a solution that can use the whole output. I know, I can always produce an eps file and convert it to pdf. It looks ok, especially if I set `axis off` in MatLab. But then I don't know how to recreate them with tikz... I'm really running out of options now and hoping desperately for any kind of help or suggestions!


title: tufte-latex and subfloat positioning

text: I'd like to have two rows of top-aligned images, with top-aligned captions below each. This answer provides a technique using the `floatrow` package, but something in that package (or one of its dependencies) doesn't play nice with the `tufte-latex` document classes. It breaks the caption positioning for all other floats (should be in the margin for the `tufte-handout` class).               \documentclass{tufte-handout}          \usepackage{tikz}     \usepackage{caption}     \usepackage{subcaption}          \begin{document}          \begin{figure}       \begin{subfigure}[b]{0.3\textwidth}         \centering         \begin{tikzpicture}           \draw circle (1.25cm) {};         \end{tikzpicture}%         \caption{A circle, bottom-aligned}         \label{fig:circle}       \end{subfigure}%       ~       \begin{subfigure}[b]{0.3\textwidth}         \centering         \begin{tikzpicture}           \draw circle (1cm) {};         \end{tikzpicture}%         \caption{A second, smaller circle}         \label{fig:circle}       \end{subfigure}%       ~       \begin{subfigure}[b]{0.3\textwidth}         \centering         \begin{tikzpicture}           \draw circle (1.25cm) {};         \end{tikzpicture}%         \caption{A third circle, with a long caption that will force more           line breaks and mess up the pretty layout}         \label{fig:circle3}       \end{subfigure}%       \\       \begin{subfigure}[b]{0.3\textwidth}         \centering         \begin{tikzpicture}           \draw circle (1.25cm) {};         \end{tikzpicture}%         \caption{another circle, in a new row}         \label{fig:circle4}       \end{subfigure}%       ~       \begin{subfigure}[b]{0.3\textwidth}         \centering         \begin{tikzpicture}           \draw circle (1.25cm) {};         \end{tikzpicture}%         \caption{final circle}         \label{fig:circle5}       \end{subfigure}%       \caption{Shapes with no corners. Ugly sub-figure layout. Caption for         the figure is in the margin per the \texttt{tufte-handout}         class}\label{fig:circles}     \end{figure}          \end{document}      produces: ![output of MWE](http://i.stack.imgur.com/qtZZQ.png) I'd like the tops of the figures to be aligned, and the tops of the captions in each row to be aligned. Related: Where'd my subfigure letters go?


title: PDF-images -> slow scrolling

text: I use LaTeX for writing my Thesis. I recently added 7 pdf-images rendered in matlab. These images are placed one after another. When I scroll over this part of the thesis in pdfTex or Apple Preview it slow down disturbingly. Especially because I will add a lot more of these images. How can I solve this?


title: Memoir sub table numbering wrong

text: I am using sub tables and it seems because I but the table caption above I get the wrong number in the sub table references. How can I fix this? I am pretty sure it is related to the package `float` package. I am very interested in both quick hacks to fix this specific problem with this combination and in a better set of tools that I can use the next time to avoid these sort of problem all together. Here is what I am doing:               \documentclass[11pt,a4paper]{memoir}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{float}          \newsubfloat{table}          \begin{document}          \begin{table}[H]         \centering         \begin{minipage}{0.9\textwidth}         \caption{Multple tables\label{theTable}}         \begin{minipage}{0.5\textwidth}             \subcaption{A sub table\label{firstSubTable}}         \end{minipage}         \begin{minipage}{0.5\textwidth}             \subcaption{Second sub table\label{secondSubTable}}         \end{minipage}         \end{minipage}     \end{table}          Referencing the table (Table~\ref{theTable}) seems right but in referencing the     sub tables (Table~\ref{firstSubTable} and Table~\ref{secondSubTable}) they get     the wrong table number.          \end{document}      And how it looks: ![Image showing the problem](http://i.stack.imgur.com/woJWn.png)


title: Misplaced \noalign when using \afterpage{\clearpage} with either \onehafspacing or \tableofcontents

text: I have a LaTeX document divided into three files. One of them is a longtable containing multicolumns. Now, if I use either \onehalfspacing or \tableofcontents with \afterpage{\clearpage} in the document, I get a Misplaced \noalign error. I have incldued a minimum working example for clarity:               \documentclass{article}          \usepackage[headheight=40pt]{geometry}     \usepackage{setspace}     \usepackage{graphicx}     \usepackage{afterpage}     \usepackage{longtable}     \usepackage{booktabs,multirow}                    \begin{document}              \onehalfspacing         \tableofcontents              \input{analysis_pme}              \input{responses}     \end{document}      Analysis_pme contains:               \section{Analysis of PME Application} % (fold)     \label{sec:pme_analysis}          \subsection{Scenario-based Analysis} % (fold)     \label{sub:scenario_based_analysis}     \begin{figure}[htbp]         \centering         \includegraphics[width=.5\textwidth]{scenario-based_analysis}         \caption{Overall scenario-based final mark values.}     \end{figure}          \subsection{Criteria-based Analysis} % (fold)     \label{sub:criteria_based_analysis}     \begin{figure}[htbp]         \centering         \includegraphics[width=.8\textwidth]{criteria-based_analysis}         \caption{Overall criteria-based final mark values.}     \end{figure}     \afterpage{\clearpage}      and responses contains:               \section{Actual Responses} % (fold)     \label{app:actual_responses}     \begin{longtable}{p{.1\textwidth}p{.70\textwidth}p{.15\textwidth}}         \caption{Responses} \\         \toprule         \centering\textbf{IDs}  &   \centering\textbf{Questions}    &   \textbf{Responses} \\         \midrule\midrule         \multicolumn{3}{c}{\textbf{Scenario A}} \\         \midrule         SA-Q1a  &   Does the PME application indicate how many people are in specific and special zones at a certain time?  &   No \\         SA-Q2a  &   Does the PME application present diurnal mobility patterns in O-D matrices between all city zones and from outside city administrative boundaries?  &   No \\         SA-Q3a  &   Does the PME application present a summary of daily usage of specific places by average number of people during specific hours of weekdays e.g. 0:00, 5:00, 6:00, 7:00, 8:00, 9:00, 10:00, 12:00, 14:00, 15:00, 16:00, 17:00, 18:00 19:00, 20:00 and 22:00 o'clock? &   No     \end{longtable}      Any ideas on what's causing the problem?


title: missing sub-caption numbers with tufte-latex

text: Why are the numbers (acually, letters) for the sub-captions missing in the following MWE? note the colon that would follow the letter is printed.               \documentclass{tufte-handout}          \usepackage{tikz}     \usepackage{caption}     \usepackage{subcaption}          \begin{document}          \begin{figure}       \begin{subfigure}[b]{0.3\textwidth}         \centering         \begin{tikzpicture}           \draw circle (1.25cm) {};         \end{tikzpicture}%         \caption{A circle, bottom-aligned}         \label{fig:circle}       \end{subfigure}%       ~       \begin{subfigure}[b]{0.3\textwidth}         \centering         \begin{tikzpicture}           \draw circle (1cm) {};         \end{tikzpicture}%         \caption{A second, smaller circle}         \label{fig:circle}       \end{subfigure}%       ~       \begin{subfigure}[b]{0.3\textwidth}         \centering         \begin{tikzpicture}           \draw circle (1.25cm) {};         \end{tikzpicture}%         \caption{A third circle, with a long caption that will force more           line breaks and mess up the pretty layout}         \label{fig:circle3}       \end{subfigure}%       \\       \begin{subfigure}[b]{0.3\textwidth}         \centering         \begin{tikzpicture}           \draw circle (1.25cm) {};         \end{tikzpicture}%         \caption{another circle, in a new row}         \label{fig:circle4}       \end{subfigure}%       ~       \begin{subfigure}[b]{0.3\textwidth}         \centering         \begin{tikzpicture}           \draw circle (1.25cm) {};         \end{tikzpicture}%         \caption{final circle}         \label{fig:circle5}       \end{subfigure}%       \caption{Shapes with no corners. Ugly sub-figure layout. Caption for         the figure is in the margin per the \texttt{tufte-handout}         class}\label{fig:circles}     \end{figure}          \end{document}      ![output of MWE](http://i.stack.imgur.com/TyhfK.png)


title: No indent in the first paragraph in a section in Plain TeX

text: I have checked no indent in the first paragraph in a section? but I think my question warrants a new thread, because my question is about Plain TeX. I am using Plain TeX. I would like to write a `\mysection` macro that indents the paragraph following it, regardless of the whitespace that occurs between the invocation of `\mysection` and the paragraph. As you can see below, `\finickysection` works but only if I am sure to put the % comments between its use and the paragraph. I would like `\mysection` to work with the invocation as written. My MWE is:               \def\mysection#1{\vskip\baselineskip\noindent #1\vskip\baselineskip\everypar={\noindent\everypar={}}}     \def\finickysection#1{ \vskip\baselineskip \noindent #1 \vskip\baselineskip%     \noindent}               \finickysection{Hello}%     %     This is my first paragraph. Lorem ipsum dolor sit amet, consectetur adipisicing     elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim     ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea     commodo consequat.          Duis aute irure dolor in reprehenderit in voluptate velit     esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat     non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.          \mysection{Hi}               This is my third paragraph. It should not be indented. Lorem ipsum dolor sit     amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut     labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud     exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis     aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu     fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt     in culpa qui officia deserunt mollit anim id est laborum.          This is my fourth paragraph. Lorem ipsum dolor sit amet, consectetur adipisicing     elit, sed do eiusmod tempor.          \bye


title: Logo in a LaTeX header, Koma-Script letter class

text: I use this class definition in the preamble of my document:               \documentclass[template,                 backaddress=off,                 foldmarks=false,                 enlargefirstpage,                pagenumber=off,                parskip=half                ]{scrlttr2}      I set the header with logo on the left and information on the right like this:               \firsthead{      \parbox[b]{\textwidth}{\raggedleft{      \rlap{\usekomavar{fromlogo}}       \addfontfeature{LetterSpace=20.0}\fontsize{12}{17}\selectfont\scshape \usekomavar{fromname}\\[3mm]          \fontsize{11}{11}\selectfont\scshape \usekomavar{position} \\ \usekomavar{department}          }%        }%      }%      Yet the logo and return address are not aligned. In any other class I could use the `fancyhdr` package to specify left and right head like this:               \usepackage{fancyhdr}     \setlength{\headheight}{1cm}     \setlength{\headwidth}{\textwidth}     \fancyhead[L]{ % left     \addfontfeature{LetterSpace=20.0}\fontsize{12}{17}\selectfont\scshape     \usekomavar{fromname}\\[3mm]         \fontsize{11}{11}\selectfont\scshape \usekomavar{position} \\     \usekomavar{department}     }      \fancyhead[R]{ % right      \includegraphics[width=4cm]{kuleuven_zwart.eps}     }     \pagestyle{fancy}      yet this won't work for the `letter` class. How can I achieve something similar? * * * Template code:               \ProvidesFile{template.lco}          \usepackage{graphicx}        \usepackage{fontspec}     \usepackage{marvosym}     \usepackage{eso-pic}     \usepackage{geometry}      \geometry{a4paper, textwidth=17cm, textheight=22cm, marginparsep=16cm, marginparwidth=1cm}          \newkomavar{department}     \newkomavar{position}     \setkomavar{fromlogo}{\includegraphics[width=4cm]{kuleuven_zwart.eps}}          % ===  FORMATTING STUFF     \@setplength{backaddrheight}{0cm}          % shift the page body on the left to make room for data and logo     \setlength{\oddsidemargin}{\useplength{toaddrhpos}}     \addtolength{\oddsidemargin}{-1in}     \l@addto@macro{\@typearea@end}{     \setlength{\oddsidemargin}{\useplength{toaddrhpos}}     \addtolength{\oddsidemargin}{-1in}     }%          %set the font size and leading     \renewcommand{\normalsize}{\fontsize{10.0}{17}\selectfont}          % === HEADER DEFINITION     \firsthead{            \parbox[b]{\textwidth}{\raggedleft{               \rlap{\usekomavar{fromlogo}}                \addfontfeature{LetterSpace=20.0}\fontsize{12}{17}\selectfont\scshape \usekomavar{fromname}\\[5mm]              \fontsize{11}{11}\selectfont\scshape \usekomavar{position} \\ \usekomavar{department}              }%       }%          }%          \endinput      Document:               \documentclass[template,                     backaddress=off,                     foldmarks=false,                     pagenumber=off,                    ]{scrlttr2}          \usepackage{lipsum}             \setkomavar{fromname}{this}     \setkomavar{position}{is not}     \setkomavar{department}{aligned}     \begin{document}          \begin{letter}{%            Yeti\\%           from Himalayah\\%     }          \opening{Dear,}          \lipsum          \closing{Regards,}               \end{letter}     \end{document}


title: How to calculate intersections of a line defined by a segment and an ellipse in tikz

text: **EDIT** Here's what I intended to ask, but didn't clearly formulate initially. The Tikz package `intersections` allows one to calculate and manipulate the intersection point of two non-parallel lines defined by (non intersecting) line segments. The link in my original question shows how to do this, it is how the point `(F)` is defined. In the example below, the point `(0)` is defined as the intersection of the lines extending the line segments `vertline` and `horline`. What I want to do is calculate and manipulate intersection points of an ellipse with the line extending a given line segment, without having to rely on extending the line segment ''by hand'' as it were, to ensure it actually intersects the ellipse. When I copy the syntax used in the code from the link, and naively adapt it,               \documentclass{article}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}     \usetikzlibrary{intersections}     \path[name path=ellipse] (0,0) ellipse (4 and 3);     \path[name path=horline] (1,0) -- (2,0);     \path[name path=vertline] (0,1) -- (0,2);     \path[name intersections={of = horline and vertline, by={origin}}, draw]     (origin) node [above right] {$0$} circle (1.5pt);     \path[name intersections={of = ellipse and vertline}]     \coordinate (I) at (intersection-1);     \coordinate (J) at (intersection-2);     \draw (I) circle (1.5pt);     \draw (J) circle (1.5pt);     \end{tikzpicture}     \end{document}      it doesn't give me the desired result : the intersections `(I)` and `(J)` are of `ellipse` and `vertline` are totally misplaced. Moreover, the code is faulty, but I don't understand where the error lies. Please tell me if you'd code things differently, I don't want to develop bad habits. **Further Edit** It appears `(I)` and`(J)` aren't misplaced, they simply aren't calculated at all, and what appeared on the pdf were points `(I)` and`(J)` defined in a previous drawing. **Oringinal Question - May be dicarded** In this Example, the author gets tikz to calculate the coordinates of the two intersections (X and Y) of an ellipse with the line defined by a certain segment, and also the coordinates of the intersection (F) of two lines defined by two line segments. On my machine, I have no problem with the second problem, finding the intersection point of two lines defined by (non intersecting line segments), but i get non-sense when I try to perform the intersection of an ellipse with the line defined by a line segment that doesn't intersect the ellipse.


title: Find all broken urls and references in a LaTex document with footnote urls and bibtex urls

text: Is there some automated way to test broken urls over a LaTex document for errors such as 404 etc. I noticed that some broken urls but the list of reference is too massive to go through one-by-one. Ideas how to solve this kind quality control problem fast? I have some ideas to solve this:   1. open up writing-process like in SO, with watchful peers, bugs tend become shallow   2. some at least partly automated processing of the document, perhaps something like apache-logging or something in that degree? (this is mere speculation and I have no idea how this could be done for a LaTex document to find and process broken material -- perhaps breaking up the large document into some blog series for peer-review where anyone can comment but it may become a larger problem of data-management)   3. other idea?


title: How to define a list of algorithms?

text: How can i define a list of algorithms similar a list of tables? i need something like               \listofalgorithms      similar to               \listoffigures      but with trackable algorithms


title: Dealing with figures path

text: I am writing a paper for a Springer journal using LaTeX and I have figures in the paper. How can I deal with the path of these figures, I mean when I upload the paper to the journal the path of the figures will be changed and the editors will have the following error: > ! Package pdftex.def Error: File `../../Downloads/Org Chart (4).png' not > found. so how can I deal with it.


title: Place a figure at the beginning/end of a specific page

text: So I'm putting together a paper using LaTeX and I know that I want to place a specific figure at the bottom of page 1, another figure at the top of page 2, etc, and let the text just wrap around the figures. However, I find that if I try something like `\begin{figure}[b]`, it places the image not at the end of the current page, but rather at the end of the entire document. Is there no way to just say, "this figure goes at the bottom of the first page"?


title: Koma-script tikz \lehead book separators

text: I am using the Koma-Script scrbook document class. I would like to print an tikz image in the left-top heading of all even pages, but the figure gets shifted toward the right at every new page,so that at page 206, the figure is already half way inside the text. See page 2 ![Page number 2](http://i.stack.imgur.com/uvEKb.png) and compare to page 206 ![page number 206](http://i.stack.imgur.com/7LptK.png) Does anyone has a clue why the image doesn't stay at the intended position?. Here is the code to explain in more detail my issue:               \documentclass{scrbook}         \usepackage{tikz}     \usetikzlibrary{calc}     \usepackage[automark, headsepline]{scrpage2}          \usepackage{lipsum}     % Place the page number and a black square in a fix position     \lehead{\thepage \tikz[overlay, remember picture]\fill [black] ($(-0.2,-1)$) rectangle ($(-1.2,-2)$);}          % Default page style     \pagestyle{scrheadings}          \begin{document}          \chapter{Lorem ipsum}     \lipsum[3-56]     \lipsum[3-56]     \lipsum[3-56]     \lipsum[3-56]     \lipsum[3-56]     \lipsum[3-56]     \lipsum[3-56]     \lipsum[3-56]     \lipsum[3-56]     \lipsum[3-56]     \lipsum[3-56]     \lipsum[3-56]     \lipsum[3-56]     \lipsum[3-56]     \lipsum[3-56]     \lipsum[3-56]     \lipsum[3-56]     \lipsum[3-56]     \lipsum[3-56]     \lipsum[3-56]     \lipsum[3-56]     \lipsum[3-56]     \end{document}


title: Error compiling edited subsections

text: With reference to the question: Change size of section, subsection, subsubsection, paragraph and subparagraph title I tried this. While it works, it produces the following error when compiling:               ./TexFile.tex:101: Package titlesec Error:          Entered in hori     zontal mode.     l.101 \subsection{My Subsection}     And hitting return for more info reveals:          ? h     The <format> argument cannot contain horizontal material such as text, \noindent, \makebox, etc.     ?      This happens even when I copy and paste the code from Gonzalo's answer, using the following code to instigate subsections:               \subsection{MySubsection}      Interestingly, the error is not occurring on sections, only subsections and subsubsections. Edit: Here's my code:               \usepackage{titlesec}     \titleformat{\section}{\sffamily\Large\bfseries}{\thesection}{1em}{}     \titlespacing{\section}{0pt}{2ex}{1ex}     \titleformat{\subsection}{\sffamily\textit}{\thesubsection}{1em}{}     \titlespacing{\subsection}{0pt}{1ex}{0ex}     \titleformat{\subsubsection}{\sffamily\textit}{\thesubsubsection}{1em}{}     \titlespacing{\subsubsection}{0pt}{0.5ex}{0ex}     \titleformat{\paragraph}[runin]{\normalfont\normalsize\bfseries}{\theparagraph}{1em}{}     \titleformat{\subparagraph}[runin]{\normalfont\normalsize\bfseries}{\thesubparagraph}{1em}{}      Further to daleif's request, and for anyone else with this issue, here's a minimal working example of the error:               \documentclass{article}          \usepackage{titlesec}     \titleformat{\section}{\sffamily\Large\bfseries}{\thesection}{1em}{}     \titlespacing{\section}{0pt}{2ex}{1ex}     \titleformat{\subsection}{\sffamily\textit}{\thesubsection}{1em}{}     \titlespacing{\subsection}{0pt}{1ex}{0ex}     \titleformat{\subsubsection}{\sffamily\textit}{\thesubsubsection}{1em}{}     \titlespacing{\subsubsection}{0pt}{0.5ex}{0ex}     \titleformat{\paragraph}[runin]{\normalfont\normalsize\bfseries}{\theparagraph}{1em}{}     \titleformat{\subparagraph}[runin]{\normalfont\normalsize\bfseries}{\thesubparagraph}{1em}{}          \begin{document}     \section{Section1}     \subsection{Subsection}     Minimal working example     \end{document}      This reproduces the error in compiling and, when egreg's answer is applied, it no longer occurs.


title: How to make all vertices same size?

text: I was wondering how to make the vertices in my graph have the same size and those horizontal arcs to be actually horizontal: ![enter image description here](http://i.stack.imgur.com/JMhgB.png) Here is my code, and feel free to make any suggestion even on other issues:                \documentclass[12pt]{article}      \usepackage{graphicx}      \usepackage{subfigure}      \usepackage{amsmath}      \usepackage{amsfonts}           \usepackage{tikz}      \usetikzlibrary{positioning}          \begin{center}     \begin{tikzpicture}       \begin{scope}[auto,%       every node/.style={draw,fill=gray!40,circle,minimum size=3pt},node distance=2cm]       % the vertices       \node[label=left:Source] (source) at (0,0) {1*/0};       \node[above left=of source] (three) {3*/20};       \node[left=of three] (two) {2*/20};       \node[above right=of source] (four) {4*/1};       \node[right=of four] (five) {5*/20};       \node[above=of two] (six) {6*/21};       \node[above=of three] (seven) {7*/3};       \node[above=of four] (eight) {8*/2};       \node[above=of five] (nine) {9*/21};       \node[above right=of seven,label=right:Sink] (sink) {11*/4};       \end{scope}       % the edges       \draw (source) -- node[label=above:20] {} (two) -- node[label=right:1] {} (six) -- node[label=above:1] {} (sink) -- node[label=above:1] {} (seven) -- node[label=right:20] {} (three) -- node[label=above:20] {} (source) -- node[label=above:1] {} (four) -- node[label=right:1] {} (eight) -- node[label=above:20] {} (sink) -- node[label=above:1] {} (nine) -- node[label=right:1] {} (five) -- node[label=above:20] {} (source);       \draw (two)  -- node[label=above:1] {} (three) -- node[label=above:20] {} (four) -- node[label=above:20] {} (five);       \draw (six) -- node[label=above:20] {} (seven) -- node[label=above:1] {} (eight) -- node[label=above:20] {} (nine);       \draw [red] (source) -- (four) -- (eight) --  (seven) -- (sink);     \end{tikzpicture}     \end{center}          \end{document}      Thanks and regards!


title: How can I write multiple lines in a subscript?

text: Is there a way to force a line break inside a math mode text? My example:               \[       \underbrace{....}_\text{Some long text that should be multiline}     \]      Trying               \text{Some long text that\\ should be multiline}      Didn't do the trick.


title: Newline within underbrace in math environment

text: > **Possible Duplicate:**   >  How can I force a line break within \text{…}? In the MWE below, is it possible to force a line break in the text under the Z so that the overall equation is more compact in the horizontal direction? I tried a normal linebreak, which I hoped would work since it's inside a `\text`, but that gave me errors. Also, if there's a better way to make this sort of equation callout, please let me know. `\underbrace` and `underset` and variants thereon are the only methods I'm familiar with at present. The Cauchy-Schwartz equation below from the Navier-Stokes Wiki article shows the kind of line breaks I was hoping to get in the underbrace. **MWE**               \documentclass[12pt]{article}     \usepackage{amsmath}     \begin{document}     \[             \underbrace{z}_{\text{Initial Acceleration}} = x + y     \]     \end{document}      **Underbrace linebreaks:** ![Equations with underbrace linebreaks](http://i.stack.imgur.com/lwPOk.png)


title: Underbrace and text?

text: I want to use text under an equation. I am using the `\underbrace_{text{}}`. My point is that the text is quite long and I want to make it into two lines. For example:               \begin{document}     \begin{equation}     \underbrace{1+2+3+4+5+6+7+8+9}_{\text{Aggregate \\ factor payments}}      \end{equation}     \end{document}      So in my example ideally I want the "factor payments" terms to appear below the term "Aggregate". I tried in the way I have in the code, but it did not worked. Any suggestions much appreciated


title: Multiline text under/over arrows

text: > **Possible Duplicate:**   >  How can I write multiple lines in a subscript?   >  Force line break inside a \lim argument in align environment I want to write some multi-line text under a long arrow. Normally I use `\xrightarrow[text below]{text over}`, but if I try to add a \\ in one of them (say, I want "text below" to have two lines), I get a compilation error. What to do? I'm sure it's solvable. Thanks, John.


title: Big lower limit on an integral

text: I would like to write an integral with a big lower limit. I am using               \documentclass{article}          \begin{document}         \[\int\limits_{\mbox{This is a\\ large limit}}xdx\]     \end{document}      My output is ![](http://i.imgur.com/8i2CRVH.jpg) How can I split this rahter big limit? One idea would be to write it as a matrix but I supposse there must an easiest way.


title: \max with two arguments below eachother

text: I am trying to use `\max` with two arguments like so: `\max_{0 \leq k \leq n, 0 \leq l \leq n}` But I want to have the `0 \leq l \leq n` below the `0 \leq k \leq n` not next to it. How do I do this?


title: Force line break inside a \lim argument in align environment

text: Inside an `align` environment I have a `\lim` with two variables which should be displayed in two lines:               \begin{align}     ...     f & = \lim _ {a \rightarrow -\infty \linebreak b \rightarrow \infty} ... \\     ...     \end{align}      Currently there is no line break where I want to have one; it's displayed in one line. How can I force a line break there? `\linebreak` is ignored and `\\\` breaks the `align` environment.


title: Modify bigfoot rules for footnote page-breaks

text: I use the `bigfoot` package and I would like to reset preferences (penalties?) for footnote page breaks exactly as they are in the basic LaTeX default. I noticed that `bigfoot`, while allowing for nested footnote systems, sometimes behaves quite bad, even in quite simple cases, with respect to standard footnotes or `manyfoot`. An example showing a page-break difference is the following (please uncomment the two commented lines to switch to bigfoot behavior):               \documentclass[twocolumn]{book}          %\usepackage{bigfoot}     %\DeclareNewFootnote{default}          \begin{document}     eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis aux ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo v     ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis aux ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo v     s unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo vs unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt          \begin{quotation}     s unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis\footnote{bla bla.} et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur\footnote{aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnamaut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnaaut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnamm}     \end{quotation}          aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.          Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo vs unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt          \end{document}      (I apologize for the explicit random text, but I was not able to reproduce the problem by using monolithic `lipsum` paragraphs.) I tried to define:               \footnotewidowpenalty=10000     \footnoteclubpenalty=10000     \finalfootnotewidowpenalty=10000     \interfootnotelinepenalty=10000      but it seems to be a coarse solution that modifies elsewhere (in the opposite direction) the pagebreak rules.


title: Draw a rectangle

text: How to draw a highlighted box around a bulleted item.


title: Item displayed twice in beamer itemize

text: In a `beamer` presentation I'm trying to display two different images during the same item in itemize. If I add a `\pause` between the items the images are not displayed. So, how should I display the "Three, then four" item twice? Probably this is a really stupid question but I couldn't find a solution searching on these pages or on the web.               \begin{frame}     \frametitle{Title}     \begin{columns}     \column{.4\textwidth}       \begin{minipage}[c][.6\textheight][c]{\linewidth}         \begin{itemize}[<+->]             \item                 One             \item                 Two             \item                 Three, then four             \item                 Five         \end{itemize}        \end{minipage}     \column{.6\textwidth}     \center             \includegraphics<1>{fig_1}             \includegraphics<2>{fig_2}             \includegraphics<3>{fig_3}             \includegraphics<4>{fig_4}             \includegraphics<5>{fig_5}     \end{columns}     \end{frame}


title: Acronym Nested Parentheses

text: This question is mainly to collect your opinion, and probably to reach a good solution. That said, let's go to the discussion topic and question. I commonly use the `acronym` package in my work, mainly to write article with lots of abbreviations. Sometimes I also use `glossaries` for the same purpose. I know there are others. Well, when using those, it sometime may happen that an acronym is expanded inside parentheses, e.g., > the \ac{BS} (also known as \ac{eNB}) become > the Base Station (BS) (also known as Enhanced Node B (eNB)) As it may be seen, in the second expansion, it get nested parentheses. To avoid this, I sometimes use `\acs{}` instead of `\ac{}` while inside parentheses. However, it may happen that the acronym is first used inside the parentheses, and with this approach it is not expanded in the first use. I was reading link 1 and link 2, and while people said it is acceptable, others recommend to rephase, or use brackets. With brackets, my simple example would become > the Base Station (BS) (also known as Enhanced Node B [eNB]) A solution for this, would be use always brackets instead of parentheses while using acronyms. But I don't know if it is acceptable of all purposes or not. What is your opinion? Further, is it possible to say to `acronym` or other package to use brackets inside parentheses?               \documentclass{article}          \usepackage{acronym}          \begin{document}          \begin{acronym}       \acro{BS}{Base Station}       \acro{eNB}{Enhanced Node B}     \end{acronym}          the \ac{BS} (also known as \ac{eNB})          \end{document}


title: change tag position in amsmath and xy-package

text: I use the `amsmath`-package and `xy`. Now I have a formulae like this               \[     \label{eq-name} \tag{$\ast$}     \xymatrix{  & A & B & C \\ D & & E & & F \\ & G & & H }     \]      The `xymatrix` is quite long in 2nd row. Therefore the tag is placed in the right-lower corner of the diagram, where it can't be found. I want to raise it. It doesn't matter if I raise it manually or bring it on a line with the 1st or 3rd row of the matrix. In the `amsmath` manual it it said, that `\raistag` should do exactly what I want. But it has no effect at all. Maybe that is, because the `xymatrix` reserves the whole rectangle it fills. So maybe I have to put the tag into the matrix. But how can I do that? The concrete problem is here:               \documentclass[12pt, a4paper, twoside, titlepage, bibliography=totocnumbered]{scrreprt}     \usepackage{amsmath}     \usepackage{bbm}     \usepackage[all,knot,color]{xy}     \usepackage[ngerman]{babel}          \newcommand{\bijar}[1][]{%      \ar[#1]      \ar@<0.4ex>@{}[#1]|-*=0[@]{\sim}}          \newcommand{\QL}[2]     {{\left.\raisebox{-.1em}{\ensuremath{#1}}\middle\backslash\raisebox{.1em}{\ensuremath{#2}}\right.}}          \newcommand{\ggruppe}{{<\!\! g \!\! >}}          \newcommand{\C}{\mathbbm{C}}          \begin{document}          \[          \label{mf:masterplan} \tag{$\ast$}       \xymatrix{         & D_2^\times\times\C^\times \ar@{>>} [dl]_{p_g} \ar @{-} [d]^{p_1} \bijar [r]_-{j_N} & M^0_2(N) \ar [d]^{p_g^0} \ar @{^(.>} [r]^{\text{incl.}}  &  M_2(N) \ar @{.>>} [dr] \ar @{.>>} [dd]|\hole  & \\       \QL{\ggruppe}{D_2^\times \times \C^\times} \ar @{>>} [dr]_{p_{1,g}} \bijar [rr]_(.4){\hat j_N} & {\phantom{X}} \ar @{>>} [d] & \QL{\ggruppe}{M_2^0(N)} \ar @<-0.4ex> @{>>} [dl]_{\chi_N^0} \ar  @{^(.>} [rr]^{\text{incl.}}   & & \QL{\ggruppe}{ M_2(N)} \ar @{.>>} [dl]^{\chi_N} \\       & D_2^\times \ar  @{^(.>} @<-0.2ex> [rr]^{\text{incl.}} & & D_2         }        \]          \end{document}


title: Identical vertical spacing between paragraphs of different textsize

text: Something that happens to me very often is that I change the size of certain formula-like material (something close to but not identical to pseudocode in my case) but get inconsistent vertical inter-paragraph spacing as a result. Here is an example:               \documentclass{memoir}          \begin{document}          {       \parindent0pt       \addtolength{\parskip}{\baselineskip}          1. Setup: \\     \textit{some technical formula-like material} \\     \textit{some technical formula-like material} \\     \textit{some technical formula-like material}          2. Core steps: \\     \textit{some technical formula-like material} \\     \textit{some technical formula-like material} \\     \textit{some technical formula-like material}          3. Wrapping up: \\     {\footnotesize     \textit{some really long technical formula-like material} \\     \textit{some really long technical formula-like material} \\     \textit{some really long technical formula-like material}     \par}          4. Final steps: \\     \textit{some technical formula-like material} \\     \textit{some technical formula-like material} \\     \textit{some technical formula-like material}          }          \end{document}      (The reason for me using `\par` at the end of each "paragraph" is given in Gonzalo Medina's answer to this question about line spacing.) The spacing between blocks 2 and 3 is slightly smaller than that between the other blocks of material. **How do I fix this most easily?** The obvious alternative, omitting `\addtolength{\parskip}{\baselineskip}` and using `\\\` at the end of each block of material, seems to lead to identical vertical spacing.


title: TeXstudio 2.5.2 User Commands not visible

text: I am a newcomer to the world of LaTeX. After searching around on the net to see what others might think, I have installed `Tex Live 2012` and `TeXstudio 2.5.2`. I understand that now I have to setup my system somehow to display things properly, every time I compile my documents. I have downloaded some examples, that actually compile and I can see the end result. The thing is that I would like to use the integrated Windows fonts (like Cambria or Calibri). I have read somewhere that to do this I would need to use XeTeX, as it is able of Unicode Formatting(?, not sure). So the guide was mentioning that I would need to navigate to `Tools > User > User Commands > Edit User Commands` and make a new command named `XeTeX` that I could then use in `Options > Configure TeXstudio`. The problem is that this submenu is not there! I navigate to `Tools > User` and nothing appears. Is that a bug or am I doing something wrong? This suggestion for Cambria and Calibri use is here , paragraph 5. I am under Windows 7 x64 and I have installed everything in folders without spaces in their names. (I saw somewhere it really mattered!) EDIT: I have also installed version 2.5.1 and the latest SVN version (I don't know the difference :) ), but the menu is also not visible. EDIT2: OK, I'm pretty embarrassed... I found the user manual and there it is stated that User Commands are built from `Options > Configure TeXstudio > Build > Add user command`. When I navigate there, a window pops up with 2 columns, that you can `add` stuff. I guess it's something of a visual way to make macros instead of writing them. Is there a way to write them, then?


title: Problems with Natbib: strange URL format and urldate not shown

text: I have a strange problem with natbib. This code               @misc{CornellUniversity.,       author = {{Cornell University}},       title = {Benedict R. O'G. Anderson},       url = {\url{http://www.cornell.edu/search/index.cfm?tab=people&netid=bra2&q=benedict%20anderson}},       urldate = {2012-03-18}     }      creates the following output:               Cornell University. Benedict R. O’G. Anderson. URL http://www.cornell.edu/search/index.cfm?tab=people&netid=bra2&q=benedict%20anderson.      where: 1) The text "URL" is placed in front of the actual url 2) the url is not formated as a hyperlink (the url package is included) 3) the "urldate" property doesn't show up at all How do I best solve those issues?


title: How can I get identifier style to apply to '%' (in a Perl listing)?

text: When using Perl variable names with sigils with `listings`, the `$` and `@` sigils somehow get coloured in `identifierstyle`, but the `%` sigil remains unstyled. Therefore, this code:               \documentclass{article}          \usepackage{listings,xcolor}          \lstdefinestyle{perl}{        language=Perl,        basicstyle=\ttfamily,        keywordstyle=\bfseries\color{green!40!black},        commentstyle=\color{purple!40!black},        identifierstyle=\color{blue},        stringstyle=\color{orange},     }          \lstset{style=perl}          \begin{document}         \begin{lstlisting}             my ($a, $b, $c) = ('a'..'z');             my ($a, $b, @c) = ('a'..'z');             my ($a, $b, %c) = ('a'..'z');         \end{lstlisting}     \end{document}      gives this result: ![unstyled sigil](http://i.stack.imgur.com/GmxkB.png) Is there a way I could make `listings` understand that `%` should have the same style as `$` or `@`? The manual is pretty clear about keywords and comments, but it didn't help me understand the difference between an identifier and an operator (?) that doesn't get styled. Looking at the Perl language definition in `lstlang1.sty` didn't help either since there is nothing there about either `$` and `@` or `%`.


title: alignment problem with bold (negative) numbers

text: I am trying to create a table containing a correlation matrix. I marked the significant numbers bold and insignificant are just normal. Anyhow, all boldifyed numbers are aligned differently than the "normal" ones. I tried to put the content in multicolumn{1}{c}[} But even then the numbers are not "correctly" aligned. Is there a way to fix that? Additionally, I tried to put a star after the significant numbers but the star is like a "multiplying" star (centered and not "exponent").               \documentclass[a4paper, 12pt]{article}     \usepackage[left=4cm, right=3cm, top=3cm, bottom=4cm]{geometry}     \usepackage{graphicx}     \usepackage{booktabs}     \usepackage{threeparttable}     \usepackage[labelsep=newline,% line break after label        justification=raggedright,        singlelinecheck=off,        font=sc]{caption}     \usepackage{subcaption}     \usepackage{siunitx}     \usepackage{dcolumn}     \newcolumntype{d}[1]{D{.}{.}{#1}}     \newcommand\mc[1]{\multicolumn{1}{c}{#1}}     \begin{document}          \begin{table}[htp!]     \setlength\tabcolsep{0.1pt}  % default value: 6.0pt          \caption{Pearson and Spearman Rank Correlation Matrix}     \label{tab:PSCorrelation}     \scriptsize     \begin{threeparttable}     \begin{tabular*}{\textwidth}%       { @{\extracolsep{\fill}} l *{11}{d{2.3}} }     \toprule      & \mc{(1)} & \mc{(2)} & \mc{(3)} & \mc{(4)} & \mc{(5)} & \mc{(6)} & \mc{(7)} & \mc{(8)} & \mc{(9)} & \mc{(10)} & \mc{(11)} \\ [0.5ex]     \midrule     (1) (D)SUE1      & & \textbf{\hphantom{-}0.877} & \textbf{\hphantom{-}0.257} & -0.005 & \textbf{$-$0.095} & \textbf{$-$0.101} & \textbf{$-$0.093} & 0.000 & \textbf{$-$0.061} & \textbf{\hphantom{-}0.089} & -0.001 \\     (2) (D)SUE2      & \textbf{\hphantom{-}0.858} &  & \textbf{\hphantom{-}0.286} & -0.008 & \textbf{$-$0.093} & \textbf{$-$0.101} & \textbf{$-$0.088} & -0.004 & \textbf{$-$0.062} & \textbf{\hphantom{-}0.095} & -0.005 \\     (3) (D)SUE3      & \textbf{\hphantom{-}0.256} & \textbf{\hphantom{-}0.295} &  & 0.010 & 0.008 & \textbf{$-$0.144} & \textbf{$-$0.076} & 0.006 & \textbf{$-$0.043} & \textbf{\hphantom{-}0.165} & \textbf{$-$0.083} \\     (4) $\Delta$SPOT      & -0.011 & \textbf{$-$0.023} & -0.009 &  & \textbf{\hphantom{-}0.177} & \textbf{$-$0.126} & \textbf{$-$0.160} & -0.000 & 0.017 & \textbf{\hphantom{-}0.023} & \textbf{$-$0.253} \\     (5) $\Delta$SLOPE      & \textbf{$-$0.031} & \textbf{$-$0.024} & 0.013 & \textbf{\hphantom{-}0.274} &  & -0.006 & -0.004 & 0.016 & \textbf{\hphantom{-}0.081} & \textbf{$-$0.028} & \textbf{$-$0.086} \\     (6) $\Delta$LEVERAGE      & \textbf{$-$0.106} & \textbf{$-$0.102} & \textbf{$-$0.110} & \textbf{$-$0.163} & \textbf{$-$0.051} &  & \textbf{\hphantom{-}0.259} & 0.006 & \textbf{\hphantom{-}0.030} & \textbf{$-$0.094} & \textbf{\hphantom{-}0.101} \\     (7) $\Delta$VOLA      & \textbf{$-$0.123} & \textbf{$-$0.119} & \textbf{$-$0.036} & \textbf{$-$0.230} & \textbf{$-$0.079} & \textbf{\hphantom{-}0.316} &  & 0.010 & -0.011 & \textbf{$-$0.051} & \textbf{\hphantom{-}0.195} \\     (8) UPGRADE      & \textbf{\hphantom{-}0.022} & 0.015 & 0.004 & -0.002 & \textbf{\hphantom{-}0.024} & 0.011 & \textbf{\hphantom{-}0.024} &  & \textbf{$-$0.029} & \textbf{\hphantom{-}0.018} & \textbf{$-$0.018} \\     (9) DOWNGRADE      & \textbf{$-$0.057} & \textbf{$-$0.053} & \textbf{$-$0.035} & 0.009 & \textbf{\hphantom{-}0.064} & \textbf{\hphantom{-}0.048} & \textbf{\hphantom{-}0.033} & \textbf{$-$0.022} &  & \textbf{$-$0.024} & 0.000 \\     (10) BHAR      & \textbf{\hphantom{-}0.073} & \textbf{\hphantom{-}0.067} & \textbf{\hphantom{-}0.155} & \textbf{\hphantom{-}0.037} & 0.007 & \textbf{$-$0.065} & \textbf{$-$0.095} & 0.015 & -0.016 &  & \textbf{$-$0.207} \\     (11) CASC      & -0.011 & -0.004 & \textbf{$-$0.030} & \textbf{$-$0.111} & \textbf{$-$0.047} & \textbf{\hphantom{-}0.071} & \textbf{\hphantom{-}0.099} & 0.002 & 0.008 & \textbf{$-$0.340} &  \\ [1ex]     \bottomrule     \end{tabular*}          \begin{tablenotes}     \item[a] A subtable-specific footnote     \end{tablenotes}          \end{threeparttable}     \end{table}          \begin{table}[htp!]     \setlength\tabcolsep{0.1pt}  % default value: 6.0pt          \caption{Pearson and Spearman Rank Correlation Matrix}     \label{tab:PSCorrelation}     \scriptsize     \begin{threeparttable}     \begin{tabular*}{\textwidth}%       { @{\extracolsep{\fill}} l *{11}{d{2.3}} }     \toprule      & \mc{(1)} & \mc{(2)} & \mc{(3)} & \mc{(4)} & \mc{(5)} & \mc{(6)} & \mc{(7)} & \mc{(8)} & \mc{(9)} & \mc{(10)} & \mc{(11)} \\ [0.5ex]     \midrule     (1) (D)SUE1      & & \mc{\textbf{\hphantom{-}0.877}} & \mc{\textbf{\hphantom{-}0.257}} & -0.005 & \mc{\textbf{$-$0.095}} & \mc{\textbf{$-$0.101}} & \mc{\textbf{$-$0.093}} & 0.000 & \mc{\textbf{$-$0.061}} & \mc{\textbf{\hphantom{-}0.089}} & -0.001 \\     (2) (D)SUE2      & \mc{\textbf{\hphantom{-}0.858}} &  & \mc{\textbf{\hphantom{-}0.286}} & -0.008 & \mc{\textbf{$-$0.093}} & \mc{\textbf{$-$0.101}} & \mc{\textbf{$-$0.088}} & -0.004 & \mc{\textbf{$-$0.062}} & \mc{\textbf{\hphantom{-}0.095}} & -0.005 \\     (3) (D)SUE3      & \mc{\textbf{\hphantom{-}0.256}} & \mc{\textbf{\hphantom{-}0.295}} &  & 0.010 & 0.008 & \mc{\textbf{$-$0.144}} & \mc{\textbf{$-$0.076}} & 0.006 & \mc{\textbf{$-$0.043}} & \mc{\textbf{\hphantom{-}0.165}} & \mc{\textbf{$-$0.083}} \\     (4) $\Delta$SPOT      & -0.011 & \mc{\textbf{$-$0.023}} & -0.009 &  & \mc{\textbf{\hphantom{-}0.177}} & \mc{\textbf{$-$0.126}} & \mc{\textbf{$-$0.160}} & -0.000 & 0.017 & \mc{\textbf{\hphantom{-}0.023}} & \mc{\textbf{$-$0.253}} \\     (5) $\Delta$SLOPE      & \mc{\textbf{$-$0.031}} & \mc{\textbf{$-$0.024}} & 0.013 & \mc{\textbf{\hphantom{-}0.274}} &  & -0.006 & -0.004 & 0.016 & \mc{\textbf{\hphantom{-}0.081}} & \mc{\textbf{$-$0.028}} & \mc{\textbf{$-$0.086}} \\     (6) $\Delta$LEVERAGE      & \mc{\textbf{$-$0.106}} & \mc{\textbf{$-$0.102}} & \mc{\textbf{$-$0.110}} & \mc{\textbf{$-$0.163}} & \mc{\textbf{$-$0.051}} &  & \mc{\textbf{\hphantom{-}0.259}} & 0.006 & \mc{\textbf{\hphantom{-}0.030}} & \mc{\textbf{$-$0.094}} & \mc{\textbf{\hphantom{-}0.101}} \\     (7) $\Delta$VOLA      & \mc{\textbf{$-$0.123}} & \mc{\textbf{$-$0.119}} & \mc{\textbf{$-$0.036}} & \mc{\textbf{$-$0.230}} & \mc{\textbf{$-$0.079}} & \mc{\textbf{\hphantom{-}0.316}} &  & 0.010 & -0.011 & \mc{\textbf{$-$0.051}} & \mc{\textbf{\hphantom{-}0.195}} \\     (8) UPGRADE      & \mc{\textbf{\hphantom{-}0.022}} & 0.015 & 0.004 & -0.002 & \mc{\textbf{\hphantom{-}0.024}} & 0.011 & \mc{\textbf{\hphantom{-}0.024}} &  & \mc{\textbf{$-$0.029}} & \mc{\textbf{\hphantom{-}0.018}} & \mc{\textbf{$-$0.018}} \\     (9) DOWNGRADE      & \mc{\textbf{$-$0.057}} & \mc{\textbf{$-$0.053}} & \mc{\textbf{$-$0.035}} & 0.009 & \mc{\textbf{\hphantom{-}0.064}} & \mc{\textbf{\hphantom{-}0.048}} & \mc{\textbf{\hphantom{-}0.033}} & \mc{\textbf{$-$0.022}} &  & \mc{\textbf{$-$0.024}} & 0.000 \\     (10) BHAR      & \mc{\textbf{\hphantom{-}0.073}} & \mc{\textbf{\hphantom{-}0.067}} & \mc{\textbf{\hphantom{-}0.155}} & \mc{\textbf{\hphantom{-}0.037}} & 0.007 & \mc{\textbf{$-$0.065}} & \mc{\textbf{$-$0.095}} & 0.015 & -0.016 &  & \mc{\textbf{$-$0.207}} \\     (11) CASC      & -0.011 & -0.004 & \mc{\textbf{$-$0.030}} & \mc{\textbf{$-$0.111}} & \mc{\textbf{$-$0.047}} & \mc{\textbf{\hphantom{-}0.071}} & \mc{\textbf{\hphantom{-}0.099}} & 0.002 & 0.008 & \mc{\textbf{$-$0.340}} &  \\ [1ex]     \bottomrule     \end{tabular*}          \begin{tablenotes}     \item[a] A subtable-specific footnote     \end{tablenotes}          \end{threeparttable}     \end{table}          \end{document}      EDIT: I have also tried the siunitx package, but the result is the same.               \begin{table}[htp!]     \sisetup{group-separator={}}     \caption{Pearson and Spearman Rank Correlation Matrix}     \begin{threeparttable}     \scriptsize     \begin{tabular*}{\textwidth}     {        @{\extracolsep{\fill}}        l        *{12]}{S[table-format=-1.3]}        @{}       }     /toprule     & {(1)} & {(2)} & {(3} & {(4)} & {(5)} & {(6)} & {(7)} & {(8)} & {(9)} & & {(10)} & {(11)}\\     \midrule     (1) (D)SUE1      & & \textbf{\hphantom{-}0.877} & \textbf{\hphantom{-}0.257} & -0.005 & \textbf{$-$0.095} & \textbf{$-$0.101} & \textbf{$-$0.093} & 0.000 & \textbf{$-$0.061} & \textbf{\hphantom{-}0.089} & -0.001 \\     (2) (D)SUE2      & \textbf{\hphantom{-}0.858} &  & \textbf{\hphantom{-}0.286} & -0.008 & \textbf{$-$0.093} & \textbf{$-$0.101} & \textbf{$-$0.088} & -0.004 & \textbf{$-$0.062} & \textbf{\hphantom{-}0.095} & -0.005 \\     (3) (D)SUE3      & \textbf{\hphantom{-}0.256} & \textbf{\hphantom{-}0.295} &  & 0.010 & 0.008 & \textbf{$-$0.144} & \textbf{$-$0.076} & 0.006 & \textbf{$-$0.043} & \textbf{\hphantom{-}0.165} & \textbf{$-$0.083} \\     (4) $\Delta$SPOT      & -0.011 & \textbf{$-$0.023} & -0.009 &  & \textbf{\hphantom{-}0.177} & \textbf{$-$0.126} & \textbf{$-$0.160} & -0.000 & 0.017 & \textbf{\hphantom{-}0.023} & \textbf{$-$0.253} \\     (5) $\Delta$SLOPE      & \textbf{$-$0.031} & \textbf{$-$0.024} & 0.013 & \textbf{\hphantom{-}0.274} &  & -0.006 & -0.004 & 0.016 & \textbf{\hphantom{-}0.081} & \textbf{$-$0.028} & \textbf{$-$0.086} \\     (6) $\Delta$LEVERAGE      & \textbf{$-$0.106} & \textbf{$-$0.102} & \textbf{$-$0.110} & \textbf{$-$0.163} & \textbf{$-$0.051} &  & \textbf{\hphantom{-}0.259} & 0.006 & \textbf{\hphantom{-}0.030} & \textbf{$-$0.094} & \textbf{\hphantom{-}0.101} \\     (7) $\Delta$VOLA      & \textbf{$-$0.123} & \textbf{$-$0.119} & \textbf{$-$0.036} & \textbf{$-$0.230} & \textbf{$-$0.079} & \textbf{\hphantom{-}0.316} &  & 0.010 & -0.011 & \textbf{$-$0.051} & \textbf{\hphantom{-}0.195} \\     (8) UPGRADE      & \textbf{\hphantom{-}0.022} & 0.015 & 0.004 & -0.002 & \textbf{\hphantom{-}0.024} & 0.011 & \textbf{\hphantom{-}0.024} &  & \textbf{$-$0.029} & \textbf{\hphantom{-}0.018} & \textbf{$-$0.018} \\     (9) DOWNGRADE      & \textbf{$-$0.057} & \textbf{$-$0.053} & \textbf{$-$0.035} & 0.009 & \textbf{\hphantom{-}0.064} & \textbf{\hphantom{-}0.048} & \textbf{\hphantom{-}0.033} & \textbf{$-$0.022} &  & \textbf{$-$0.024} & 0.000 \\     (10) BHAR      & \textbf{\hphantom{-}0.073} & \textbf{\hphantom{-}0.067} & \textbf{\hphantom{-}0.155} & \textbf{\hphantom{-}0.037} & 0.007 & \textbf{$-$0.065} & \textbf{$-$0.095} & 0.015 & -0.016 &  & \textbf{$-$0.207} \\     (11) CASC      & -0.011 & -0.004 & \textbf{$-$0.030} & \textbf{$-$0.111} & \textbf{$-$0.047} & \textbf{\hphantom{-}0.071} & \textbf{\hphantom{-}0.099} & 0.002 & 0.008 & \textbf{$-$0.340} &  \\ [1ex]     \bottomrule     \end{tabular*}     \begin{tablenotes}     \item[a] A subtable-specific footnote          \end{tablenotes}          \end{threeparttable}     \end{table}      The columns are not "shifted" anymore, but still not properly aligned. edit2: I tried the solution from siunitx: aligning numbers by decimal points in tables doesn't work for bolded or italicized numbers, but it does not change anything. edit3: I have found the solution for my question; I added               \usepackage{etoolbox}     \robustify\bfseries \sisetup{     detect-weight = true , locale = DE , }          \robustify\bfseries      in the table environment which aligns the numeric values in the table created with siunitx correctly. Still I do not have a solution for the table created with the dcolumn package.


title: List of Figures and Tables in same page

text: I would like to have my list of figures and my list of tables in the same page. I don't want only one list, the numberings must be independent. Now I have               \documentclass[12pt,twoside,titlepage,headinclude]{scrreprt}          \usepackage[Bjornstrup]{fncychap}     \usepackage{tocbibind}     \newcounter{dummy}     \begin{document}          \tableofcontents     \listoffigures     \begingroup     \let\clearpage\relax     \listoftables     \endgroup     \end{document}      It works well with the numbering but it preserve two different headings for each list. I would like an output like this in the same page: > List of Figures and Tables > > Figure 1 .... Page 4 > > Figure n .... Page n > > Table 1 .... Page 2 > > Table n .... Page n+1


title: Abbreviated first names without spaces in between?

text: I would like `A. B. Lastname` to appear as `A.B. Lastname` in the bibliography. (I have already found how to abbreviate first names.) (I have to solve this with bibtex and natbib because I am already using a hacked version of natbib.)


title: Using beamer overlays with forest generated trees

text: I am using the `forest` package from Sašo Živanović in order to create a wide tree on a `beamer` slide. Previously, I was using `qtree`. But due to the easier way of arranging nodes automatically with avoiding overlaps, I have switched to `forest`. However, with `qtree` I was able to manage overlays by a macro I have found in Mindmap tikzpicture in beamer (reveal step by step) with               \tikzset{            invisible/.style={opacity=0},            visible on/.style={alt=#1{}{invisible}},            alt/.code args={<#1>#2#3}{%              \alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}} % \pgfkeysalso doesn't change the path           },         }      This is sadly not working for the `forest` package. It does remove TikZ node attitudes (such as a drawn ellipse around a tree node) but the node text is visible in all slides as well as the subtrees and edges. So is there a way to use `beamer` overlays with the `forest` package in order to partially make subtrees of a tree visible step by step with an animation? **EDIT** Ok here is a MWE for my different cases. Note, that using TikZ is the result I would like to have with the `forest` package as well. In my code, the tree has a much bigger depth and playing along with sibling distance and left parameter isn't much fun, so I decided to use `forest` which auto formats the nodes.               \documentclass[english, ucs, xcolor={table, dvipsnames}]{beamer}          \usepackage[english, ngerman]{babel}          \usepackage{tikz}     \usetikzlibrary{shapes}          % Different tree drawing packages     \usepackage{qtree}     \usepackage{forest}          \setbeamertemplate{navigation symbols}{} %Remove navigation bar               % Being able to set beamer visibility for child nodes in a tree graph     % Daniel's code:     % http://tex.stackexchange.com/questions/55806/tikzpicture-in-beamer/55827#55827     % Use with child [color=.., visible on=<1->]     \tikzset{         invisible/.style={opacity=0},         visible on/.style={alt=#1{}{invisible}},         alt/.code args={<#1>#2#3}{%           \alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}} % \pgfkeysalso doesn't change the path         },     }          \begin{document}          % tikz     \begin{frame}{tikz}         \begin{tikzpicture}\scriptsize             \tikzset{every node/.style={draw,ellipse}, sibling distance=40mm}                  \node {Picture root}               child{node[fill=yellow]{First level class}                 child[visible on=<2->]{node[fill=gray]{subcategorized}}                 child[visible on=<2->]{node{another subcategory}                   child{node[fill=gray]{last node division}}                   child{node[fill=gray]{in two classes}}                 }               }               child {node[fill=gray]{Another long category}};         \end{tikzpicture}     \end{frame}                    % forest     \begin{frame}[plain]{Same with forest}         \begin{forest} baseline, for tree={draw,ellipse,align=center}             [Picture root                 [First level class,fill=yellow                     [subcategorized,fill=gray,visible on=<2->]                     [another subcategory,visible on=<2->                         [last node division,fill=gray]                         [in two classes,fill=gray]                      ]                  ]                 [Another long category,fill=gray]             ]             \end{forest}     \end{frame}               % And qtree     \begin{frame}{And qtree}         \begin{tikzpicture}[sibling distance=100mm, every node/.style={draw,ellipse}]             \Tree [.\node{Picture root};                     [.\node{First level class};\onslide<2->                         [.\node{subcategorized}; ]                         [.\node{another subcategory};                              [.\node{last node division}; ]                             [.\node{in two classes}; ]                         ]                     ]                     [.\onslide<1->\node{Another long category}; ]                 ]         \end{tikzpicture}     \end{frame}          \end{document}      The following result is produced: ![TikZ standard, forest and qtree](http://i.stack.imgur.com/myyAS.jpg)


title: \input only part of a file using catchfilebetweentags package

text: I would like to include only a part of a `.tex` file into a different `.tex` file. The part I want to include is delimited by some comment tags, as it is used by catchfilebetweentags package. I tried the solution of Will Robertson posted in \input only part of a file and it worked wonderfully ... except that the space that should appear in the output PDF file when the text jumps from one line to another in the source `.tex` file disappears. The main file is the following:               \documentclass{article}%     \usepackage{catchfilebetweentags}          \begin{document}     \ExecuteMetaData[inputfile]{mytag}     \end{document}       while the file where I want the text from (i.e., `inputfile.tex`) is the following:               \documentclass{article}%          \begin{document}     Some text.     %<*mytag>     Text to be included in the main file. This is the first line     and this is the second line. See the problem?     %</mytag>          \end{document}       In my case, when I proccess the main file I get `lineand` instead of `line and` in the PDF file. Where is the problem? Is it a catcode problem? I use MiKTeX 2.9 on a Windows 7 machine, if it helps.


title: Bug report pst-3dplot, where should I submit it?

text: I discovered a bug with the `auto-pst-pdf` package, but don't know where to report it. The bug manifests itself both with `pdflatex` and the `dvi`->`ps`->`pdf` chain. Here is a minimal working example:               \documentclass[12pt]{article}     \usepackage{auto-pst-pdf}     \usepackage{pst-3dplot}     \usepackage{rotating}     \begin{document}     \rotatebox{90}{$AAA$}     \end{document}      The example fails to compile, when it should. The error message is:               pdfTeX error (\pdfsetmatrix): Unrecognized format. \end{document}      I believe that the bug requires all 3 packages. I am using Ubuntu 13.10 with up-to-date `texlive` package installed.


title: wordbreaking, justification and ttfamily

text: # Edit I think this differes slightly from the linked "duplicate" as here are paragraphs formatted as typewriter, using `\ttfamily` while in the duplicate there are > a lot of "common words" in typewriter font sprinkled around his text. The solution is of course similar, but "Heiko Oberdiek", marked answer here, gave a nice working example and explanation regarding this problem. Personally I had problems understanding what parts of the suggested codes in the "duplicate" question were necessary to solve my issue. # Original Question I recently have some bigger texts I want to put into \ttfamily. However, I noticed wordbreaking isn't really working and did some research to add these lines:               \setlength{\emergencystretch}{2em}     \newcommand{\origttfamily}{}%     \let\origttfamily=\ttfamily%     \renewcommand{\ttfamily}{\origttfamily \hyphenchar\font=`\-}      Also using english option in a memoir-class and babel-package. This is somewhat helping as there is some wordbreaking and space-stretching happening now, but in the end, most paragraphs are looking more like left- aligned than justified. and there are still some lines going over the defined borders. Here is a minimal example with 2 longer text-passages, one in plain and one in ttfamily.               \documentclass[english,11pt,oneside,article,a5]{memoir}     \usepackage[english]{babel}     \usepackage{geometry}           \setlength{\emergencystretch}{2em}     \newcommand{\origttfamily}{}%     \let\origttfamily=\ttfamily %     \renewcommand{\ttfamily}{\origttfamily \hyphenchar\font=`\-}          \geometry{left=20mm,right=20mm, top=20mm, bottom=50mm}     \OnehalfSpacing     \leftskip3em\rightskip2em          \begin{document}     $>$She didn’t want to spend the time trying to locate them, or try to thin out the operator’s patience for Alison doing whatever. She expects they are already rather sour at her burrowing a tunnel through most of the building’s ﬂoors to make that railgun using an enormous amount of jetalium. If she gets a chance later, though, to come back to this place, she’ll put rescuing Loviro on the table.      \\{}\ttfamily According to the engineer, they are most likely tethers to launch things cheaply into space, given how high they go. Although, Alison does come by close enough to see one to see a revolving restaurant at the top of it, so tossing stuff into space may not be its only function.     \end{document}      Did I to something wrong in using ttfamily like this?


title: How to create a Beamer overlay \cover command, dual to \uncover?

text: I would like to define a command `\mycover` that is dual to Beamer's `\uncover`. In `beamerbaseoverlay.sty` the `\uncover` command is defined as               \newcommand{\uncover}{\alt{\beamer@fakeinvisible}{\beamer@makecovered}}      Therefore, my first attempt at `\mycover` simply switches the `\alt` branches:               \newcommand{\mycover}{\alt{\beamer@makecovered}{\beamer@fakeinvisible}}      Unfortunately, the first slide in `\mycover`'s overlay specification is always shown as completely invisible, even if I `\setbeamercovered{transparent}`. Here is an example:               \documentclass{beamer}          \makeatletter     \newcommand{\mycover}{\alt{\beamer@makecovered}{\beamer@fakeinvisible}}     \def\c@slideinframe{\beamer@slideinframe}     \makeatother          \setbeamercovered{transparent}          \begin{document}     \begin{frame}{}       \structure{Slide \arabic{slideinframe}}            \uncover<1,4>{Testing} \mycover<2-3>{my cover} \uncover<1,4>{command.}     \end{frame}     \end{document}      The words "my cover" should be covered on exactly the same slides as the words "Testing" and "command", namely slides 2 and 3. What actually happens, however, is that "my cover" is completely invisible on slide 2 and is properly covered on slide 3. ![enter image description here](http://i.stack.imgur.com/zWBsM.gif) What is the problem with `\mycover` and how can I fix it?


title: Problem displaying degrees celsius with siunitx and xelatex

text: I'm trying to discuss a temperature in a document where I'm using xelatex and siunitx.                      The temperature was further increased to \SI{200}{\degreeCelsius}.      When using xelatex this causes a hollow box to appear in place of the unit. When using pdflatex and a distribution supplied font it works fine. Is there a solution to this that I have missed? This is a link to a character guide for the font -- ITC Baskerville Std Roman -- I'm using. http://store2.adobe.com/cfusion/store/html/index.cfm?store=OLS- UK&event=displayFont&code=BASQ10005000 I've also tried Times New Roman with no joy. I'm using a fully updated texlive 2011. Many thanks, MWE                \documentclass{article}           \usepackage{fontspec}                                    \setmainfont[Mapping=tex-text]{Times New Roman}      %\usepackage{xkeyval}      %\usepackage{polyglossia}                                %\setdefaultlanguage[variant=british]{english}                   %\usepackage{etoolbox}       \usepackage{siunitx}           \begin{document}      The temperature was \SI{200}{\degreeCelsius}.      \end{document}      ![enter image description here](http://i.stack.imgur.com/70JXc.png)


title: texlive-latex-extra and koma-moderncvclassic

text: I installed the ubuntu package texlive-latex-extra which contains a latex package "koma-moderncvclassic". However, if I compile a document               \documentclass{scrartcl}     \usepackage[ngerman]{babel}     \usepackage[myblue]{koma-moderncvclassic}     \begin{document}     \end{document}      pdflatex will not find it               ! LaTeX Error: File `koma-moderncvclassic.sty' not found.