title: Phantom width of binary operator

text: Using beamer. Let's say I want to write `A+B` but with the plus invisible in one slide and visible in the next one. I think I read somewhere that more space is left normally around the + for being a binary operator. It seems to be that `A\phantom{+}B` leaves only the space of the sign +. How can I get all the space I need.


title: paracol and memoir/pedersen don't play nice

text: I am having a problem using `paracol` and `memoir`/`pedersen` together. As you can see from the minimal example, the second chapter number runs off to the other side. This is a LyX file.               % Preview source code          %% LyX 2.0.0 created this file.  For more info, see http://www.lyx.org/.     %% Do not edit unless you really know what you are doing.     \documentclass[a4paper,english]{memoir}     \usepackage{bookman}     \renewcommand{\sfdefault}{cmbr}     \renewcommand{\ttdefault}{cmtl}     \usepackage[T1]{fontenc}     \pagestyle{ruled}     \setcounter{secnumdepth}{3}     \setcounter{tocdepth}{3}     \usepackage[xetex]{color}     \definecolor{page_backgroundcolor}{rgb}{0.8515625, 0.953125, 1}     \pagecolor{page_backgroundcolor}     \usepackage{babel}     \usepackage{amsthm}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage[unicode=true,      bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,      breaklinks=false,pdfborder={0 0 1},backref=section,colorlinks=false]      {hyperref}     \hypersetup{pdftitle={This is my title},      pdfauthor={dav},      pdfsubject={adv},      pdfkeywords={adv},      xetex}          \makeatletter          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.     \pdfpageheight\paperheight     \pdfpagewidth\paperwidth               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.     \usepackage{paracol} %makes double columns     \columnsep10mm %separation between columns, e.g. for paracol               \@ifundefined{definecolor}      {\usepackage{color}}{}     \definecolor{ared}{rgb}{.647,.129,.149}     \renewcommand{\colorchapnum}{\color{ared}}     \renewcommand{\colorchaptitle}{\color{ared}}     \chapterstyle{pedersen}                    %Go to Document->Settings->LaTeX Preamble and add the following entries:     \usepackage{fontspec}     \usepackage{xunicode}     \usepackage[no-logos]{xltxtra} %provides xetex logo and other extras     \defaultfontfeatures{Scale=MatchLowercase,Mapping=tex-text} %fixes quotes dashes etc          \makeatother          \usepackage{xunicode}     \begin{document}          \chapter{First Chapter}          This is all random text. see below for paracol text.     Primo itaque homini, qui in eo bono quo factus fuerat 397 rectus acceperat     posse non peccare, posse non mori, posse ipsum bonum 398 non deserere,     datum est adiutorium perseverantiae, non quo fieret ut 399 perseveraret,     sed sine quo per liberum arbitrium perseverare non 400 posset. Nunc     vero sanctis in regnum Dei per gratiam Dei praedestinatis 401 non     tale adiutorium perseverantiae datur, sed tale ut eis perseverantia     402 ipsa donetur; non solum ut sine isto dono perseverantes esse non     403 possint, verum etiam ut per hoc donum non nisi perseverantes sunt.\}     404          Dem ersten Menschen, der in dem Gute, worin er gerecht 405 erschaffen     war, die F\textbackslash{}\textquotedbl{}ahigkeit empfangen hatte,     nicht zu s\textbackslash{}\textquotedbl{}undigen, 406 nicht zu sterben     und vom Guten selbst nicht ab\textbackslash{}-zufallen, ist demnach     407 die Gnade der Beharrlichkeit verliehen worden, nicht jene, wo\textbackslash{}-durch     408 seine Beharrlichkeit bewirkt worden w\textbackslash{}\textquotedbl{}are,     sondern jene, ohne die er 409 nicht imstande gewesen w\textbackslash{}\textquotedbl{}are,     mit seinem freien Willen auszuharren. 410 Jetzt aber wird den Heiligen,     die durch die Gnade Gottes f\textbackslash{}\textquotedbl{}ur das     Reich 411 Gottes vorher\textbackslash{}-bestimmt sind, nicht eine     solche Gnade der Beharrlichkeit 412 gegeben, sondern eine derartige,     da\textbackslash{}ss\textbackslash{} ihnen die Beharrlichkeit selbst     413 geschenkt wird; daher sind sie ohne dieses Gnadengeschenk nicht     nur 414 unf\textbackslash{}\textquotedbl{}ahig zur Beharrlichkeit,     sondern sind auch durch dieses Geschenk 415 Nurbeharrende.          Primo itaque homini, qui in eo bono quo factus fuerat 397 rectus acceperat     posse non peccare, posse non mori, posse ipsum bonum 398 non deserere,     datum est adiutorium perseverantiae, non quo fieret ut 399 perseveraret,     sed sine quo per liberum arbitrium perseverare non 400 posset. Nunc     vero sanctis in regnum Dei per gratiam Dei praedestinatis 401 non     tale adiutorium perseverantiae datur, sed tale ut eis perseverantia     402 ipsa donetur; non solum ut sine isto dono perseverantes esse non     403 possint, verum etiam ut per hoc donum non nisi perseverantes sunt.\}     404          Dem ersten Menschen, der in dem Gute, worin er gerecht 405 erschaffen     war, die F\textbackslash{}\textquotedbl{}ahigkeit empfangen hatte,     nicht zu s\textbackslash{}\textquotedbl{}undigen, 406 nicht zu sterben     und vom Guten selbst nicht ab\textbackslash{}-zufallen, ist demnach     407 die Gnade der Beharrlichkeit verliehen worden, nicht jene, wo\textbackslash{}-durch     408 seine Beharrlichkeit bewirkt worden w\textbackslash{}\textquotedbl{}are,     sondern jene, ohne die er 409 nicht imstande gewesen w\textbackslash{}\textquotedbl{}are,     mit seinem freien Willen auszuharren. 410 Jetzt aber wird den Heiligen,     die durch die Gnade Gottes f\textbackslash{}\textquotedbl{}ur das     Reich 411 Gottes vorher\textbackslash{}-bestimmt sind, nicht eine     solche Gnade der Beharrlichkeit 412 gegeben, sondern eine derartige,     da\textbackslash{}ss\textbackslash{} ihnen die Beharrlichkeit selbst     413 geschenkt wird; daher sind sie ohne dieses Gnadengeschenk nicht     nur 414 unf\textbackslash{}\textquotedbl{}ahig zur Beharrlichkeit,     sondern sind auch durch dieses Geschenk 415 Nurbeharrende.          Primo itaque homini, qui in eo bono quo factus fuerat 397 rectus acceperat     posse non peccare, posse non mori, posse ipsum bonum 398 non deserere,     datum est adiutorium perseverantiae, non quo fieret ut 399 perseveraret,     sed sine quo per liberum arbitrium perseverare non 400 posset. Nunc     vero sanctis in regnum Dei per gratiam Dei praedestinatis 401 non     tale adiutorium perseverantiae datur, sed tale ut eis perseverantia     402 ipsa donetur; non solum ut sine isto dono perseverantes esse non     403 possint, verum etiam ut per hoc donum non nisi perseverantes sunt.\}     404          Dem ersten Menschen, der in dem Gute, worin er gerecht 405 erschaffen     war, die F\textbackslash{}\textquotedbl{}ahigkeit empfangen hatte,     nicht zu s\textbackslash{}\textquotedbl{}undigen, 406 nicht zu sterben     und vom Guten selbst nicht ab\textbackslash{}-zufallen, ist demnach     407 die Gnade der Beharrlichkeit verliehen worden, nicht jene, wo\textbackslash{}-durch     408 seine Beharrlichkeit bewirkt worden w\textbackslash{}\textquotedbl{}are,     sondern jene, ohne die er 409 nicht imstande gewesen w\textbackslash{}\textquotedbl{}are,     mit seinem freien Willen auszuharren. 410 Jetzt aber wird den Heiligen,     die durch die Gnade Gottes f\textbackslash{}\textquotedbl{}ur das     Reich 411 Gottes vorher\textbackslash{}-bestimmt sind, nicht eine     solche Gnade der Beharrlichkeit 412 gegeben, sondern eine derartige,     da\textbackslash{}ss\textbackslash{} ihnen die Beharrlichkeit selbst     413 geschenkt wird; daher sind sie ohne dieses Gnadengeschenk nicht     nur 414 unf\textbackslash{}\textquotedbl{}ahig zur Beharrlichkeit,     sondern sind auch durch dieses Geschenk 415 Nurbeharrende.               \chapter{Second Chapter}          Primo itaque homini, qui in eo bono quo factus fuerat 397 rectus acceperat     posse non peccare, posse non mori, posse ipsum bonum 398 non deserere,     datum est adiutorium perseverantiae, non quo fieret ut 399 perseveraret,     sed sine quo per liberum arbitrium perseverare non 400 posset. Nunc     vero sanctis in regnum Dei per gratiam Dei praedestinatis 401 non     tale adiutorium perseverantiae datur, sed tale ut eis perseverantia     402 ipsa donetur; non solum ut sine isto dono perseverantes esse non     403 possint, verum etiam ut per hoc donum non nisi perseverantes sunt.\}     404          \noindent \begin{paracol}{2}$\begin{aligned}uu= & 1\end{aligned}     $          \noindent \switchcolumn          \noindent basic equation          \noindent \switchcolumn*$\begin{alignedat}{1}(uu)u= & 1\cdot u\end{alignedat}     $          \noindent \switchcolumn          \noindent multiply both sides on the right by $u$ (external)          \noindent \switchcolumn* $u(uu)=u$          \noindent \switchcolumn          \noindent association (internal)          \noindent \switchcolumn* $u(uu)=u$          \noindent \switchcolumn          \noindent substitution (internal)          \noindent \end{paracol}          Dem ersten Menschen, der in dem Gute, worin er gerecht 405 erschaffen     war, die F\textbackslash{}\textquotedbl{}ahigkeit empfangen hatte,     nicht zu s\textbackslash{}\textquotedbl{}undigen, 406 nicht zu sterben     und vom Guten selbst nicht ab\textbackslash{}-zufallen, ist demnach     407 die Gnade der Beharrlichkeit verliehen worden, nicht jene, wo\textbackslash{}-durch     408 seine Beharrlichkeit bewirkt worden w\textbackslash{}\textquotedbl{}are,     sondern jene, ohne die er 409 nicht imstande gewesen w\textbackslash{}\textquotedbl{}are,     mit seinem freien Willen auszuharren. 410 Jetzt aber wird den Heiligen,     die durch die Gnade Gottes f\textbackslash{}\textquotedbl{}ur das     Reich 411 Gottes vorher\textbackslash{}-bestimmt sind, nicht eine     solche Gnade der Beharrlichkeit 412 gegeben, sondern eine derartige,     da\textbackslash{}ss\textbackslash{} ihnen die Beharrlichkeit selbst     413 geschenkt wird; daher sind sie ohne dieses Gnadengeschenk nicht     nur 414 unf\textbackslash{}\textquotedbl{}ahig zur Beharrlichkeit,     sondern sind auch durch dieses Geschenk 415 Nurbeharrende.          Primo itaque homini, qui in eo bono quo factus fuerat 397 rectus acceperat     posse non peccare, posse non mori, posse ipsum bonum 398 non deserere,     datum est adiutorium perseverantiae, non quo fieret ut 399 perseveraret,     sed sine quo per liberum arbitrium perseverare non 400 posset. Nunc     vero sanctis in regnum Dei per gratiam Dei praedestinatis 401 non     tale adiutorium perseverantiae datur, sed tale ut eis perseverantia     402 ipsa donetur; non solum ut sine isto dono perseverantes esse non     403 possint, verum etiam ut per hoc donum non nisi perseverantes sunt.\}     404          Dem ersten Menschen, der in dem Gute, worin er gerecht 405 erschaffen     war, die F\textbackslash{}\textquotedbl{}ahigkeit empfangen hatte,     nicht zu s\textbackslash{}\textquotedbl{}undigen, 406 nicht zu sterben     und vom Guten selbst nicht ab\textbackslash{}-zufallen, ist demnach     407 die Gnade der Beharrlichkeit verliehen worden, nicht jene, wo\textbackslash{}-durch     408 seine Beharrlichkeit bewirkt worden w\textbackslash{}\textquotedbl{}are,     sondern jene, ohne die er 409 nicht imstande gewesen w\textbackslash{}\textquotedbl{}are,     mit seinem freien Willen auszuharren. 410 Jetzt aber wird den Heiligen,     die durch die Gnade Gottes f\textbackslash{}\textquotedbl{}ur das     Reich 411 Gottes vorher\textbackslash{}-bestimmt sind, nicht eine     solche Gnade der Beharrlichkeit 412 gegeben, sondern eine derartige,     da\textbackslash{}ss\textbackslash{} ihnen die Beharrlichkeit selbst     413 geschenkt wird; daher sind sie ohne dieses Gnadengeschenk nicht     nur 414 unf\textbackslash{}\textquotedbl{}ahig zur Beharrlichkeit,     sondern sind auch durch dieses Geschenk 415 Nurbeharrende.          Primo itaque homini, qui in eo bono quo factus fuerat 397 rectus acceperat     posse non peccare, posse non mori, posse ipsum bonum 398 non deserere,     datum est adiutorium perseverantiae, non quo fieret ut 399 perseveraret,     sed sine quo per liberum arbitrium perseverare non 400 posset. Nunc     vero sanctis in regnum Dei per gratiam Dei praedestinatis 401 non     tale adiutorium perseverantiae datur, sed tale ut eis perseverantia     402 ipsa donetur; non solum ut sine isto dono perseverantes esse non     403 possint, verum etiam ut per hoc donum non nisi perseverantes sunt.\}     404          Dem ersten Menschen, der in dem Gute, worin er gerecht 405 erschaffen     war, die F\textbackslash{}\textquotedbl{}ahigkeit empfangen hatte,     nicht zu s\textbackslash{}\textquotedbl{}undigen, 406 nicht zu sterben     und vom Guten selbst nicht ab\textbackslash{}-zufallen, ist demnach     407 die Gnade der Beharrlichkeit verliehen worden, nicht jene, wo\textbackslash{}-durch     408 seine Beharrlichkeit bewirkt worden w\textbackslash{}\textquotedbl{}are,     sondern jene, ohne die er 409 nicht imstande gewesen w\textbackslash{}\textquotedbl{}are,     mit seinem freien Willen auszuharren. 410 Jetzt aber wird den Heiligen,     die durch die Gnade Gottes f\textbackslash{}\textquotedbl{}ur das     Reich 411 Gottes vorher\textbackslash{}-bestimmt sind, nicht eine     solche Gnade der Beharrlichkeit 412 gegeben, sondern eine derartige,     da\textbackslash{}ss\textbackslash{} ihnen die Beharrlichkeit selbst     413 geschenkt wird; daher sind sie ohne dieses Gnadengeschenk nicht     nur 414 unf\textbackslash{}\textquotedbl{}ahig zur Beharrlichkeit,     sondern sind auch durch dieses Geschenk 415 Nurbeharrende.     \end{document}      * * * Not sure how I found it originally, but this is the author's site: http://www.para.media.kyoto-u.ac.jp/latex/. It produces side by side paragraphs like `ledpar` but simpler. There is also parallel. I hesitate to contact the author directly, since am still making sure where the problem is actually coming from....which may be `pedersen`. Here is a pdf file I created that shows the error. Yes, true I did post there and tug texhax. If that is bad etiquette i.e. if these are considered part of the same system, apologies. I have added a note to that effect on those sites.


title: tikzmark, listings and beamer's onlyenv

text: I found this limitation in the current `tikzmark` solution for highlighting lines of `listings` code in `beamer`. When I put the whole lot in an `onlyenv` environment, it seems the marks are not set, or found. Example:               \documentclass{beamer}     \usepackage{tikz}     \usepackage{listings}     \usetikzlibrary{tikzmark,fit}     \usetikzmarklibrary{listings}     \newcommand{\showmark}[2]{%       \tikz[remember picture,overlay]{\draw[red,thick] ({pic cs:line-#1-#2-first}) -- ({pic cs:line-#1-#2-end});}%     }     \begin{document}     \begin{frame}[fragile]     \begin{onlyenv}<1>     \showmark{first}{2}     \begin{lstlisting}[name=first]     Listing     In first slide     \end{lstlisting}     \end{onlyenv}     \begin{onlyenv}<2>     \showmark{second}{2}     \begin{lstlisting}[name=second]     Listing     In second slide     \end{lstlisting}     \end{onlyenv}     \end{frame}     \end{document}      I see a red line in the first slide, but not in the second. Is there any (simple) workaround for this problem? Or am I doing something wrong? PS. The `\showmark` macro is just a quick way of showing the problem.


title: Plot functions and their point of intersection

text: We are plotting three functions as follows               \documentclass{article}     \usepackage{pgfplots}     \begin{document}     \begin{tikzpicture}     \begin{axis}[enlargelimits=false]          \addplot[domain=0:1,blue] {(1-x)/5};          \addplot[domain=0:1,yellow] {0.5/( 2-x)^3 * 1.0 / sqrt(16 + 14 / (2-x)^4 ) };          \addplot[domain=0:1,red] {     (1/36)*(48*(2-x)^2+16*(2-x)^6-8*(2-x)^3*sqrt(280-792*x+966*x^2-640*x^3+240*x^4-48*x^5+4*x^6))/((2-x)     ^2*(4*(2-x)^3+2*sqrt(280-792*x+966*x^2-640*x^3+240*x^4-48*x^5+4*x^6)))};     \end{axis}     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/Vln8C.png) Please help us in obtaining   1. Y-axis has a marker 5 * 10 ^{-2}. We only want 0.05   2. Draw vertical lines from the intersection point between blue and yellow (also between blue and red curve) onto the axis and label the points on the axis.   3. Instead of lines we want to use symbols for at least two out of three plots.   4. What else can be done to make it more appealing.


title: Customize Bibliography layout with biblatex

text: I'm in the final stages of formatting my dissertation, and I'm having some trouble meeting the picky formatting requirements with biblatex. I'm required to have a cover page before the bib, with the word "BIBLIOGRAPHY" centered horizontally and vertically. Importantly, this is the page that the ToC is supposed to point to. Additionally, on the first page of the Bibliography,the word "Bibliography" must appear one inch from the top of the page, and then there must be a double space between it and the first reference. Near as I can tell, I would want to adjust the heading settings to do this, but I have no idea how exactly to do that. Making matters worse, I'm using a custom document class that a University Professor made. It is based on the book class though. I'm using the `heading=bibintoc` option to get the bib into the ToC.


title: How to suppress certain defined entries from appearing in the acronym list using glossaries package?

text: Really impressed by the extensive potential of `glossaries` package by Nicola L.C. Talbot to manage different types of glossaries in a generic approach, however I tried to look for this feature in the user-manual, but couldn't find help though.   As in the MWE, sometimes you want to make use of all benefits of the defining new entries by `glossaries` package, yet you don't want them to make their way into the glossary list, or that type of list to which they don't really belong, which happened to be _Acronyms_ in my case, and the entry `Xxx` is not welcomed to be in the acronym list as it is something not belonging to the rest of acronyms, an odd one. In keeping with this, another wish is not to get this entry even counted like others in that glossary list or any other, it is like rendering it as a'' **ghost entry** '', if it fits the description, i.e., to be typeset but not listed, like ghosts may visit election campaigns but their votes would never be counted! **Is there any way to suppress entries similar to`Xxx` from appearing in the Acronym list, while still ''\gls''ing it in the text?** Note: glossaries package is v3.07 from TexLive 2013 distribution.               \documentclass[12pt,a4paper]{article}     \usepackage[utf8]{inputenc}          \usepackage{xcolor}     \usepackage[hyperindex=true]{hyperref}     \definecolor{dark-red}{rgb}{0.4,0.15,0.15}     \hypersetup{colorlinks, linkcolor={dark-red}}          \usepackage[xindy, nonumberlist=true]{glossaries}     \makeglossaries          \newacronym{lab1}{Acr1}{long description 1}     \newacronym{lab2}{Acr2}{long description 2}     \newacronym{lab3}{Acr3}{long description 3}     \newacronym{lab4}{Xxx}{description in text but not to be listed}          \begin{document}          Here is the first use of \gls{lab1}, \gls{lab2}, \gls{lab3}, and \gls{lab4}.          This is the second use of \gls{lab1}, \gls{lab2}, \gls{lab3}, and \gls{lab4}.          \end{document}        Result of MWE:   ![enter image description here](http://i.stack.imgur.com/5EP1l.png)


title: Disable two column mode for separate part

text: I am writing a document using the `report` class in two column mode, but I need a `\section` to spread across both columns, but how can I set that? Something like               \documentclass[10pt,danish,a4paper,twoside,twocolumn]{report}     \input{preamble.tex}     \begin{document}          % This section should spread over both columns     \section{Name}          \lipsum[1-3]     \end{document}


title: Align environment: second alignment "left-justified"?

text: How can I do something like               \begin{align*}     b &= cq_1+r_1, & 0 < r_1 < c, \\     c &= r_1q_2+r_2, & 0 < r_2 < r_1, \\     r_{j-2} &= r_{j-1}q_j+r_j, & 0 < r_j < r_{j-1},     \end{align*}      such that all of the zero's are aligned to the left? Mine defaults to align on the right...


title: What is the status of latex2html?

text: Does anyone know the status of latex2html? I know that there are similar programs for that task, but I ask specifically about this one. The CTAN dir lists a revision from 2002 and 2008, the http://latex2html.org website has broken links. Is the 2008 release the one to be used? Is there any development activity?


title: Making algorithms display after the paragraph and split them in pages

text: I am using `algorithmicx` to write algorithms. I want to be able to write algorithms so that they appear right after the paragraph they have been written and possibly split them from the end of one page to the starting of the next page if the space is not sufficient. How to do so?


title: Auto two column mode

text: I'm trying to create songbook document class. Every song is on its own page. I want to achieve that if the song is regular sized (fits to one page in one column) the song's page is one column, but if the song is too long to fit one page in one column, then the song's page is two column (all this has to happen automatically without songbook author interaction). Is it possible to achieve that? If yes, how? PS: please don't recommend me another songbook styles and classes, I've searched them but they don't satisfy my needs.


title: small font of text under table, but keeping table size itself normal

text: When making a table in lyx using tex coding (ERT): I want some explanation text in a small font under the table (using \multicolumn). But when i type {\small [text]} the entire table shrinks, even if I make sure to write the \small -command just before the text that I want to be small.               \begin{tabular}{lccc}      \multicolumn{4}{l}{Table 1: CPA regulatory costs by risk class} \\ \hline      Risk class & Freq. inspection & Cost inspection & Freq. system revision \\ \hline     $R_t = 1$ & Each year & 20,200 & Every 3rd year \\     $R_t = 2$ & Every 2nd year & 15,200 & Every 6th year \\     $R_t = 3$ & Every 2nd/3rd year & 11,700 & - \\     $R_t = 4$ & When needed & 4,500 & - \\ \hline     \multicolumn{4}{c}{Source: Lovdata - Forurensningsforskriften} \\     \end{tabular}      I only want the line with `\multicolumn{4}{c}{Source: Lovdata - Forurensningsforskriften}` to be small.


title: How to create nested custom environment with different kind of frames?

text: So before I write ten pages describing what I'm looking to do, I made a small mock up: ![](http://i.stack.imgur.com/VUFjA.png) I had something like this in mind:               \begin{mybox}[Name]     \begin{syntax}       here comes source code     \end{syntax}     \begin{type}       here come a few inference rules     \end{type}     \begin{kind}       also inference rules     \end{kind}     \end{mybox}      So one big box, with a partial frame and a name. In the big box are three small boxes , each with a line at the top and a small box telling what it is. Not every box should contain all three parts, e.g. some have no kinding part. Also it should be possible to go over more than one page, since this boxes can get fairly huge. I now the basic LaTeX stuff, but I have no idea where to start looking for something like this.


title: Smaller font for < sign

text: I have a table where i report times. Some elements are very small and I would like to write $<1\mathrm{ms}$. However, if I do so, the < 1ms will occupy even more space than a three digit number which looks a bit out of place. Apart foom that, I could really need the extra space to keep my table small. What would be the appropriate way to have the less then sign appear as part of the number and not as operator?


title: Difference between fixed-width and proportional typewriter fonts in listings?

text: In the MWE below, I wonder why does the `pcr` (Courier) font align in both escaped and unescaped versions and for whatever column setting of `{listing}` - while the `cmtt` (Computer Modern Teletype) aligns escaped and unescaped only for `fullflexible` columns. The MWE is basically the same code repeated for different fonts (I would have stored it in a macro, but I'd get "Text dropped after begin of listing..." then):               \documentclass{article}          \usepackage{listings}     \usepackage{xcolor} % \pagecolor     \pagecolor{yellow!15}     \setlength{\fboxsep}{0pt}          \begin{document}               \renewcommand{\ttdefault}{pcr}          Here entering a sample paragraph with \texttt{some} words entered in     \texttt{typewriter font}, which should also be \texttt{monospaced} - or rather,     \texttt{fixed width}. It can be quite useful for showing \texttt{variables}.          \noindent\begin{minipage}[t]{.325\textwidth}     \begin{lstlisting}[basicstyle=\scriptsize\ttfamily,     caption={[short] Some instructions here; the font here is \texttt{\ttdefault}.},     escapechar=!,     showlines=true,     label=lst:ex1a,     columns=fixed,     frame=tlrb]     080484c4 <list>:      !\fbox{\hspace{-\fboxrule}\texttt{80484c4:\fbox{ }cmd one}\linebreak}!      80484c7: cmd two      80484ca: cmd three, four      80484cf: cmd five      80484d6: cmd six, seven      80484dd: cmd more than enough      80484e0: cmd  not_even_joking     \end{lstlisting}     \end{minipage}     \hspace{1cm}     \noindent\begin{minipage}[t]{.325\textwidth}     \begin{lstlisting}[basicstyle=\scriptsize\ttfamily,     caption={[short] Some instructions here; the font here is \texttt{\ttdefault}.},     escapechar=!,     showlines=true,     label=lst:ex1b,     columns=fullflexible,     frame=tlrb]     080484c4 <list>:      !\fbox{\hspace{-\fboxrule}\texttt{80484c4:\fbox{ }cmd one}\linebreak}!      80484c7: cmd two      80484ca: cmd three, four      80484cf: cmd five      80484d6: cmd six, seven      80484dd: cmd more than enough      80484e0: cmd  not_even_joking     \end{lstlisting}     \end{minipage}                    \renewcommand{\ttdefault}{cmtt}          Here entering a sample paragraph with \texttt{some} words entered in     \texttt{typewriter font}, which should also be \texttt{monospaced} - or rather,     \texttt{fixed width}. It can be quite useful for showing \texttt{variables}.          \noindent\begin{minipage}[t]{.325\textwidth}     \begin{lstlisting}[basicstyle=\scriptsize\ttfamily,     caption={[short] Some instructions here; the font here is \texttt{\ttdefault}.},     escapechar=!,     showlines=true,     label=lst:ex2a,     columns=fixed,     frame=tlrb]     080484c4 <list>:      !\fbox{\hspace{-\fboxrule}\texttt{80484c4:\fbox{ }cmd one}\linebreak}!      80484c7: cmd two      80484ca: cmd three, four      80484cf: cmd five      80484d6: cmd six, seven      80484dd: cmd more than enough      80484e0: cmd  not_even_joking     \end{lstlisting}     \end{minipage}     \hspace{1cm}     \noindent\begin{minipage}[t]{.325\textwidth}     \begin{lstlisting}[basicstyle=\scriptsize\ttfamily,     caption={[short] Some instructions here; the font here is \texttt{\ttdefault}.},     escapechar=!,     showlines=true,     label=lst:ex2b,     columns=fullflexible,     frame=tlrb]     080484c4 <list>:      !\fbox{\hspace{-\fboxrule}\texttt{80484c4:\fbox{ }cmd one}\linebreak}!      80484c7: cmd two      80484ca: cmd three, four      80484cf: cmd five      80484d6: cmd six, seven      80484dd: cmd more than enough      80484e0: cmd  not_even_joking     \end{lstlisting}     \end{minipage}               \end{document}      ... and the output is this: ![test01a.png](http://i.stack.imgur.com/s4y2Z.png) Now this is the weird thing for me: for _fixed_ columns, the escaped and unescaped listing text has completely different spacing between characters (compare the `80484c` part in Listing 3) for the font `cmtt`, specifically; this doesn't happen for `pcr`. So the conclusion I'm making from this, is that apparently `pcr` is a "real" fixed width font, and `cmtt` is "simply" a "typewriter" font, but a proportional one? But for one, `cmtt` doesn't look all that proportional to me - and even if it was, it should align for `columns=fixed`, shouldn't it? So my questions are:   * is there a (simple) way to determine in Latex if a font is really fixed-width? (e.g. I'd like to type something like `\iffontfixedwidth{cmtt}\typeout{yes}\else\typeout{no}\fi`)   * Could I somehow get `cmtt` to behave the same as `pcr` does in `{listing}` (that is, have the same alignment/spacing between letters, regardless of escaped/unescaped or `columns=` setting)?


title: Letter prefix for "sections"

text: Between chapter and section level I sometimes need another level, which is indicated by a letter prefix. The table of contents might look like this:               1     1.1     1.2     2     A.2.1     A.2.2     B.2.1     B.2.2     3     3.1      Now I made myself a little command to set a prefix:               \makeatletter     \newcommand{\setsectionprefix}[1]{       \renewcommand*\thesection{#1\@arabic\c@chapter.\@arabic\c@section}       \setcounter{section}{0}     }     \makeatother      The problem is with `hyperref`, since it generates label, which do not match `\thesection`. Clicking on the B.2.1 entry in the toc jumps to B.2.1, because the label is just 2.1 and `hyperref` takes the first one. How can I fix this?


title: LaTeX formulas in gnuplot plot legends?

text: I would like to have my `gnuplot` legends set in LaTeX math mode, because they often are described by a formula. I use `wxMaxima` to generate the plots, but I could switch to using `gnuplot` directly, if that makes things simpler. I am also using `pdflatex`, and would like to stick to that.


title: Filling a cell of the table with color and preserving the border

text: I used \cellcolor{} to fill the cell of my table. However, the black borders of the cell disappears. The tex viewer shows borders, but I don't see the borders when I open as a pdf. Can you help me about it? Thanks.               \begin{table}[h]                \centering      \begin{tabular}{|c|c|c|c|c|}      \hline  \backslashbox{Parties}{Items}& $ f_1 $ & $ f_2 $ & $ f_3 $ & $ f_4 $  \\            \hline $ P_1 $ & \cellcolor{blue!25}$ a_1^{x_1} $ & $ \cellcolor{green!25}a_2^{x_1} $ & \cellcolor{pink!25}$ a_3^{x_1} $ &\cellcolor{yellow!25}$ a_4^{x_1} $ \\            \hline $ P_2 $ & \cellcolor{blue!25} $ a_1^{x_2} $ & $ \cellcolor{green!25}a_2^{x_2} $ & \cellcolor{pink!25}$ a_3^{x_2} $ &\cellcolor{yellow!25}$ a_4^{x_2} $ \\            \hline $ P_3 $ & \cellcolor{blue!25} $ a_1^{x_3} $ & $ \cellcolor{green!25}a_2^{x_3} $ & \cellcolor{pink!25}$ a_3^{x_3} $ &\cellcolor{yellow!25} $ a_4^{x_3} $ \\            \hline $ P_4 $ & \cellcolor{blue!25} $ a_1^{x_4} $ & $ \cellcolor{green!25}a_2^{x_4} $ & \cellcolor{pink!25}$ a_3^{x_4} $ & \cellcolor{yellow!25}$ a_4^{x_4} $ \\            \hline       \end{tabular}      \caption{It shows that each party $ P_i $ are the owner of the decryption shares of the corresponding row and each party needs for the item $ f_i $ the decryption shares of the corresponding column of $ f_i $}      \label{table:shares}      \end{table}      ![Result](http://i.stack.imgur.com/2iHtv.png)


title: where does the black box in beamer come from?

text: I am using beamer, usetheme Warsaw, whenever I have definition and theorem, there are black boxes. Why is that?               \documentclass{beamer}          \usepackage[utf8]{inputenc}     \usepackage{default}               \mode<presentation>     {       \usetheme{Warsaw}     \usecolortheme{crane}       % or ...            %\setbeamercovered{transparent}       % or whatever (possibly just delete it)     }              \begin{document}         \begin{frame}         \begin{definition}           adfa a              \end{definition}               adfa a         \end{frame}                        \end{document}      I am using Latex-DVI->PS-PS->PDF ![enter image description here](http://i.stack.imgur.com/pxJwE.png)


title: Possible to enable historical Ligatures of Libertine font in Ubuntu system?

text: I searched all of related posts but it seems that there is no solution in this case. I really wann activate the feature of historical Ligatures of Libertine font e.g: In Ubuntu system is it possible to do this by whatever compiler (pdflatex, xelatex, lualatex,etc)?


title: When should I use non-breaking space?

text: DEK gained a reputation of painting red the draft dissertations of his students, taking particular note of incidents when they omitted a non-breaking space that should have been included. I have this list of places where you have to place non-breaking space:   1. before `\cite`   2. before `\ref`   3. before inlined equation But, I am not sure if I got the rules right; is a non-breaking space mandatory before _all_ inline equations? How about numbers which occur in the text? And what if I refer to a program variable, or to program text, for example,               The 371 programmers who read, on 11 different occasions, the     Java program in Figure~\ref{Program:Example}  noticed that it is peculiar since     parameter \texttt{i} is never read by functions \texttt{f()}     and \texttt{thisLongFuncgtionName()}...      Do I have to write `The 371 programmers` or `The~371 programmers`? `on 11 different occasions` or `on~11 different occasions`? Do I need to write `parameter~\texttt{i}`? I think I should. What about `functions~\texttt{f()}`? And should I write `and~\texttt{thisLongFuncgtionName()}`? How about citations that use author, year convention? In short, I think have an idea, but no exact definition of when you should add non-breaking space.


title: What is wrong with \ifnum#1=0.09\relax?

text: The following code does not compile with the following error message > Missing `=` inserted for `\ifnum`               \documentclass[pstricks,border=4pt]{standalone}     \usepackage{multido}          \psset{linewidth=.5\pslinewidth}     \psset{xunit=2cm}          \newcommand\FixedScale[1]{%         \multips(0,0)(.1,0){\the\numexpr10*#1+1\relax}{\psline(0,0)(0,-3pt)}         \multips(0,0)(.5,0){\the\numexpr2*#1+1\relax}{\psline(0,0)(0,-6pt)}         \multips(0,0)(1,0){\the\numexpr#1+1\relax}{\psline(0,0)(0,-9pt)}         \multido{\i=0+1}{\the\numexpr#1+1\relax}{\uput[-90](\i,-5pt){$\i$}}     }          \newcommand\VernierScale[2][0.09]{%         \rput(#2,0){%         \psset{xunit=#1,linecolor=red}%         \multips(0,0)(1,0){11}{\psline(0,0)(0,3pt)}%         \multips(5,0)(5,0){1}{\psline(0,0)(0,6pt)}%         \multips(0,0)(10,0){2}{\psline(0,0)(0,9pt)}%         \ifnum#1=0.11\relax             \multido{\i=0+5}{3}{\uput[90](\i,8pt){\tiny$\the\numexpr10-\i\relax$}}         \else             \multido{\i=0+5}{3}{\uput[90](\i,8pt){\tiny$\i$}}         \fi         }     }          \begin{document}     \multido{\n=0.00+0.01}{21}{%     \begin{pspicture}(0,-.5)(2,.55)     \FixedScale{2}     \VernierScale[0.09]{\n}     \end{pspicture}}     \end{document}      What is wrong with `\ifnum#1=0.09\relax`?


title: Use Parameter defined in PythonTex in Latex to open File

text: I have a Python code which detects my files. Now I will open it in Latex. But it seems not possible to give the detected names to Latex I have tried this:               \begin{pycode}     l = [f for f in os.listdir('path') if f.endswith('.jpg')]     \end{pycode}     \includegraphics[scale=0.1]{\py{l}}      Because it did not work I have used this:               \newcommand{\filename}{}     \edef\filename{l}          \includegraphics[scale=0.75]{\filename}      I need this because I have different files. They have filename that looks like this: part1_date, part1 is always the same only the date is variable. Therefore the day should be refered in the text (for example like the reference to a equation. And of course it must be printed. Is it possble to do this with Pythontex? Or can I do this with another method? Thanks


title: paracol with manyfoot

text: I try to combine the two mentioned packages, as in the following example:               \documentclass{book}     \usepackage{lipsum}     \usepackage{paracol}     \usepackage{manyfoot}          \newfootnote{A}     \newfootnote{B}     \begin{document}          \footnotelayout{m}     \lipsum[1]          \FootnotetextA{}{\lipsum[2]}\FootnotetextB{}{\lipsum[3]} %comment this line and uncomment the following to see the desired results     %\footnotetext{\lipsum[2]}\footnotetext{\lipsum[3]}          \begin{paracol}{2}     \lipsum[4]     \end{paracol}     \lipsum[5]          \end{document}      as can be clearly seen, the results are not quite satisfactory... ![enter image description here](http://i.stack.imgur.com/rWLkM.png) if you use the commented-out line instead of the commented-on line (as described in the comment), you get the way it should look like. I need paracol, since my real work contains many many areas where 2-3 alternative texts reside by each other. I thought about ledmac/ledpar, but I also need the great twosided options of paracol - to switch between left-right columns according to page parity. also the alternatives do not necessarily share the same paragraph structure - they are not parallel versions but full alternatives (even written in different font size sometimes) that should not depend on each other's contents or organization, while ledpar doc seems to insist on paragraph parallelism. I need manyfoot, simply because my real work will contain multiple types of footnotes: one level is used as yet another way to specify alternative texts, while the other(s) are real short notes. if any alternative exists that works better with paracol, it would be welcome.


title: jpg, png image positioning problems

text: I have two figures in a row. One is png another is jpg. I thought the image type does not matter, at the end it seems like it does.               \begin{figure}[ht!]         \centering         \includegraphics[width=1.0\textwidth]{./images/DepositModel.png}         \caption{Трехмерное представление модели месторождения.}         \label{fig:3d_deposit_model}     \end{figure}          \begin{figure}[ht!]         \centering         \includegraphics[width=1.0\textwidth]{./images/DepositModelProjection.jpg}         \caption{Трехмерное представление продольной проекции модели месторождения.}         \label{fig:3d_deposit_model_projection}     \end{figure}      As a result image 2 is on image 1 and no caption for image 1. I tried `H` instead of `ht!`. Now they are far away (about 10 pages) from the text and the second is positioned exactly after the first, the first does not have caption. I have some .pdf images and I replace these ones with pdf. As a result everything is fine. I remove width argument from both includegraphics and now it is fine, but images are huge and they goes out of pages. Then I put scale argument and the result again is awful, the images is put on each other. Only when I converted png and jpg to pdf it is displayed fine. Why what is wrong with LaTeX (last distribution of texlive for windows, xelatex).


title: flacards package: how to disable centering?

text: I want to create flashcards with the `flacards` package. However, this package automatically centers everything you write on the cards. Is there an easy way to disable that? I want to write cards that are left aligned, like normal text. (FYI, I am using the newest TexMaker and MikTex 2.9)


title: Rug plot in TiKZ

text: I wish to draw something like (a kind of rug plot) ![enter image description here](http://i.stack.imgur.com/AJ1GJ.png) The plot shows performance of various machine learning methods. I wonder what is the best way to draw perpendicular hooks. Moreover, how can I automatize hook drawing. Any idea is greatly appreciated. Minimal working example is pasted below.               \documentclass{article}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}[scale=1]          % Axis     \draw[-] (0,0) -- (5,0);     % Coordinates     \node (A) at (3,0) {};     \node (B) at (2,0) {};     \node (C) at (2.5,0) {};          % Lines     \draw (A) -| ++(0,-0.5)-| ++(2,0) node (n1) [right] {LDA};     \draw (B) -| ++(0,-0.5)-| ++(-2,0) node (n2) [left] {RF};     \draw (C) -| ++(0,-1)-| ++(-2.5,0) node (n2) [left] {SVM};          \end{tikzpicture}     \end{document}


title: Is it wrong to use \frac1{}?

text: When typing math in (La)TeX, I often omit the braces surrounding the first argument to the `\frac` macro, at least when it's `1`, writing things like `\frac1{1+x^2}`. I initially came by that use while reading a document written by someone else, and thought it was a different macro (which one might define as `\newcommand{\frac1}[1]{\frac{1}{#1}}`. Although I now understand the way `\frac1` works, I still wonder : is this an acceptable use, or is it generally frowned upon?


title: bug in listings package?

text: It seems as if the listings package can not be loaded after all other packages using `\AtBeginDocument`               \documentclass[]{scrbook} %      \AtBeginDocument{\RequirePackage{listings}}     \begin{document}     \end{document}      This raises the error               ! Undefined control sequence.          <argument> ... \iffalse }{}\lst@ifnumberbychapter      In the code sequence               \AtBeginDocument{       \@ifundefined{thechapter}{\let\lst@ifnumberbychapter\iffalse}{}       \lst@ifnumberbychapter           \newcounter{lstlisting}[chapter]           \gdef\thelstlisting%                {\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@lstlisting}       \else           \newcounter{lstlisting}           \gdef\thelstlisting{\@arabic\c@lstlisting}       \fi}      Is this a bug or am I misusing `\AtBeginDocument` ?


title: menukeys with LinuxLibertine/Biolinum

text: I'm trying to use Linux Libertine/Biolinum in combination with the menukeys package. Unfortunately, switching between the default font (everything scaled properly) and Libertine causes the predefined keys to shrink unproportionally compared to the text size. Any clues what's happening here? ![Libertine and menukeys](http://i.stack.imgur.com/8Pw4a.png) Code:               \documentclass[10pt,a4paper]{scrartcl}     \usepackage{luatextra}     % toggle on / off     \setmainfont[Ligatures=TeX]{Linux Libertine O}     \setsansfont[Ligatures=TeX]{Linux Biolinum O}     %          \usepackage[os=mac]{menukeys}     \begin{document}          \keys{\cmd+\ctrl+A}          \end{document}


title: epstopdf creates blank PDF files

text: I have an issue with `epstopdf.exe` and that leads to inability to use .eps files for creating pdf documents. Here is the example of console output when I try to transform a sample eps file manually using epstopdf:               c:\>epstopdf --verbose r_t_a.eps     Making c:\r_t_a.pdf from c:\r_t_a.eps...     epstopdf: Invalid argument          c:\>Error: /ioerror in --run--     Operand stack:        --nostringval--   --nostringval--   (/Uni)     Execution stack:        %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval-     -   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   fa     lse   1   %stopped_push   1926   1   3   %oparray_pop   --nostringval--     Dictionary stack:        --dict:1169/1684(ro)(G)--   --dict:0/20(G)--   --dict:77/200(L)--     Current allocation mode is local     Last OS error: No such file or directory     MiKTeX GPL Ghostscript 9.05: Unrecoverable error, exit code 1      I also get this "epstopdf: Invalid argument" for every .eps image I try to use in my .tex document. Do you know how to solve this issue?


title: Hidden or Misplaced Node Labels when using Tikz Graphics Package

text: I want to place a node label onto a Tikz figure (underneath the axis at a specific point), in order to indicate some interesting behaviours on a selection of smooth curves. The following "Simplified MLE" works perfectly, and gives me exactly what I would like...               \documentclass{minimal}     \usepackage{tikz, pgfplots}      \begin{document}              \begin{tikzpicture}             \draw[dashed] (0,0) -- (0,1);              \draw[thick,->] (-1,0) -> (1,0);             \node[below] (O) at ( 0, 0) {label};          \end{tikzpicture}          \end{document}      ![Simplified_MWE](http://i.stack.imgur.com/TtXMY.gif) However when attempting, what I believe to be the very same task for a more "Complicated MWE" (in this artificial case, I just want to annotate a cord from the x-axis to the maximum point of a Normal Distribution curve), the Tikz label is shifted almost completely outside of the generated image's bounds and is somehow hidden under the "white" axis...               \documentclass{minimal}     \usepackage{tikz, pgfplots}     \usetikzlibrary{calc}     \begin{document}              \pgfmathsetmacro{\xMin}{-5} \pgfmathsetmacro{\xMax}{5}         \pgfmathsetmacro{\Mu}{0} \pgfmathsetmacro{\Sigma}{1}              \begin{tikzpicture}[declare function={Normal(\x,\MU,\SIG) = 1/(\SIG*sqrt(2*pi))*exp(-0.5*(pow(\x-\MU,2)));}]             \begin{axis}[every axis plot post/.append style={domain={\xMin}:{\xMax}, samples=100, mark=none, smooth},                  axis lines=left, hide y axis, xtick=\empty, ytick=\empty, enlargelimits=upper]                  \addplot[color=red]{Normal(\x, {\Mu}, {\Sigma})};                  \addplot[color=red, dashed] coordinates {({\Mu}, 0) ({\Mu}, {Normal({\Mu}, {\Mu}, {\Sigma})})};                 \node[color=black] (MuLabel) at ( {\Mu}, 0) {$\mu_{1}$};              \end{axis}         \end{tikzpicture}          \end{document}      ![Complicated_MWE](http://i.stack.imgur.com/vyHMo.gif) Admittedly, this is my first evening playing around with the Tikz package, so chances are I'm missed something obvious or included something stupid; my question is what in the latter example above is making the "Complicated MWE" label's behaviour so drastically different to that of the "Simplified MWE"?


title: superscript asterisk on the left side of different symbols (math mode)

text: I need to add superscript asterisks to the left side of different symbols like `+,\cdot,\leq,\mathbb{R}`. I read several different solutions to similar questions, which recommended either `\prescript`, which is ugly, since there is a huge space between the asterisk and `\leq` or `\sideset` from `amsmath`, which refuses to work on symbols like `+`. Does anyone know some universal pretty solution, which puts the asterisk neatly before this symbols?


title: Local footnotes with letters in longtable

text: I have a document which has four numbered footnotes ("1" to "4") in the pages preceding a `longtable`. The table is split over two pages. A footnote inserted in the table with `\footnote{}` is numbered in sequence after the previous footnote and appears as "5" in the table. To avoid confusion, I need footnotes in the table to appear as "a", "b", "c", etc. Changing the footnote labeling in the document to **letters** results in the table footnotes appearing as "e", "f", "g", etc. Using `\footnotemark[1]{Footnote text}` resulted in a lettered footnote "a" appearing below the table, but there was no corresponding superscript mark next to the appropriate text in the table. Is it possible to have local, lettered footnotes in a `longtable` in a document which has other, numbered footnotes?


title: Two independent TOCs

text: I wonder if there is any way to achive two independent TOCs. For example I write a document and have my regular `\tableofcontents` right after my titlepage. For some reason I have a long appendix and one part of this appendix is really long with several subsections and subsubsections. Is there a way to create my regular `\tableofcontents` (without the many subsections and subsubsections of the one appendix section) plus a special TOC just for those subsecions and subsubsections I skipped in my regular TOC? The first part would be easy with `\subsection*{...}` but how to let them appear in the second TOC? I'm aware of the `minitoc` package, but this needs all subsections to appear in my regular TOC. I'm using MikTeX with pdfLaTeX and the `scrartcl` class if that is an important information. I'm a LaTeX user for many years but here my knowledge comes to an end. I searched for some time but wasn't able to find anything regarding this issue. I hope my question is understandable, if not I'm happy to explain in more detail.


title: pgfplots: xticklabels and yticklabels in fractions

text: How to properly put xticklabels and yticklabels in fractions?               \documentclass{article}     \usepackage{pgfplots}     \let\ds\displaystyle          \begin{document}     \begin{tikzpicture}     \begin{axis}[         scale only axis,         axis lines=middle,         inner axis line style={=>},         xlabel={\large $x$},         ylabel={\large $y$},         xticklabel style={inner xsep=0pt, anchor=south west},         yticklabel style={inner ysep=0pt, anchor=south west},         xtick={-0.5,2},         ytick={-0.25},         yticklabels={$\ds -\frac{1}{4}$},         xticklabels={$\ds -\frac{1}{2}$,$2$},         ymin=-5,         ymax=6,         xmin=-5,         xmax=5,         samples=50     ]     \addplot[color=blue,thick] {(x + 1 / 2) / (x - 2)};     \end{axis}     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/IMSVN.png)


title: Summary based on environments/custom commands

text: Suppose I am taking notes in class and label certain things with my own environment like:               \begin{Theorem} Important Theorem Here. \end{Theorem}       or smaller key ideas labeled with my own command like:               \newcommand{\keyidea}[1]{\textbf{#1}}     \keyidea{Important point here}      How could I then essentially create a summary of the document. In other words, automatically generate all the text in either the Theorem environment or labeled as a key idea and put it either at the end of the document or in anoter file? It would be similar to a table of contents, but a summary


title: IEEE style author block with sig-alternate.cls

text: I am finishing up a paper for an ACM conference, and I have six authors. I would like to use the IEEE author block format, since it saves space, but I am using the sig-alternate.cls file because it is an ACM conference. Is there an easy way to keep the general formatting of the sig-alterate.cls file but use an IEEE style author block without changing the document type. Thanks in advance for your help. There is a similar entry at IEEE affiliation blocks, but it addresses the problem when you can use ieeetrans directly. Example of what I want:               Author 1*, Author 2#, Author 3@, Author 4#, Author 5$, Author 6$     *Affiliation 1  #Affiliation 2  @Affiliation 3  $Affiliation 4     {1}@abc.com     {2,4}@def.com   {3}@ghi.com     {5,6}@jkl.com      ` Sorry for all the incessant edits.


title: Wrong placing of captions for minipages

text: I have problems placing subcaptions and captions for minipages. A picture depicts what I want, but a figure included in one graph. Maybe, the right solution wasn't `\picture` in a previous post. I hope you can help me. ![im](http://i.stack.imgur.com/npPBI.png)               \documentclass[11pt]{report}     \usepackage[T1]{fontenc}     \usepackage{titlesec}     \usepackage{calc}     \usepackage{lmodern}     \usepackage{lipsum}     \usepackage{graphicx,picture,calc}     \usepackage{tikz}     \usepackage{pgfplots}     \pgfplotsset{compat=1.11}     \usetikzlibrary{patterns}     \usepackage{caption}     \usepackage{subcaption}          \begin{document}          \begin{figure}     \centering     \begin{minipage}{0.4\linewidth}     \centering     \begin{tikzpicture}     \begin{axis}[ymin=0,xmin=-20000,x=.001mm,y=1cm, axis x line=bottom,axis y line=left,ylabel={\scriptsize TEXT},clip=false]         \addplot[mark=none,very thick,red] coordinates{(0,8)(1873,8)(845,7)(3504,7)(1358,6)(4127,6)(1384,5)(4057,5)(1458,4)(3366,4)(2243,3)(1828.5,3)(4189,2)(1710,2)(7393,1)(5661,1)(11723,0)};         \addplot+[mark=none,fill,pattern=north east lines] coordinates{(0,8)(1873,8)(845,7)(3504,7)(1358,6)(4127,6)(1384,5)(4057,5)(1458,4)(3366,4)(2243,3)(1828.5,3)(4189,2)(1710,2)(7393,1)(5661,1)(11723,0)}\closedcycle;         \addplot[mark=none]coordinates{(0,0)(0,8)};     \node at (axis cs:1873,8.15) [font=\scriptsize, right] {1873};     \node at (axis cs:3504,7.15) [font=\scriptsize, right] {3504};     \node at (axis cs:4127,6.15) [font=\scriptsize, right] {4127};     \node at (axis cs:4057,5.15) [font=\scriptsize, right] {4057};     \node at (axis cs:3366,4.15) [font=\scriptsize, right] {3366};     \node at (axis cs:2243,3.15) [font=\scriptsize, right] {2243};     \node at (axis cs:4189,2.15) [font=\scriptsize, right] {4189};     \node at (axis cs:7393,1.15) [font=\scriptsize, right] {7393};     \node at (axis cs:11723,0.15) [font=\scriptsize, right] {11723};         \end{axis}         \end{tikzpicture}         \subcaption{Subcaption}     \end{minipage}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \begin{minipage}{0.4\linewidth}     \centering     \sbox0{     \begin{tikzpicture}[scale=.3]     \draw (0,0)--(0,.4)--(1.575,.4)--(1.575,7.8)--(0,7.8)--(0,8.2)--(3.4,8.2)--(3.4,7.8)--(1.825,7.8)--(1.825,.4)--(3.4,.4)--(3.4,0)--cycle;     \end{tikzpicture}     }     \sbox2{     \begin{tikzpicture}     \begin{axis}[ymin=0,x=.001mm,y=1cm, axis x line=bottom,axis y line=left,hide y axis,clip=false]         \addplot[mark=none,red,very thick] coordinates{(0,8)(287,8)(2363,7)(2013,7)(6596,6)(6236,6)(12237,5)(11880,5)(19002,4)(18658,4)(26639,3)(26350,3)(34817,2)(34625,2)(43433,1)(43332,1)(51380,0)};         \addplot+[mark=none,fill,pattern=north east lines] coordinates{(0,8)(287,8)(2363,7)(2013,7)(6596,6)(6236,6)(12237,5)(11880,5)(19002,4)(18658,4)(26639,3)(26350,3)(34817,2)(34625,2)(43433,1)(43332,1)(51380,0)}\closedcycle;         \addplot [mark=none]coordinates{(0,0)(0,8)};     \node at (axis cs:287,8.15) [font=\scriptsize, right] {287};     \node at (axis cs:2363,7.15) [font=\scriptsize, right] {2363};     \node at (axis cs:6596,6.15) [font=\scriptsize, right] {6596};     \node at (axis cs:12237,5.15) [font=\scriptsize, right] {12237};     \node at (axis cs:19002,4.15) [font=\scriptsize, right] {19002};     \node at (axis cs:26639,3.15) [font=\scriptsize, right] {26639};     \node at (axis cs:34817,2.15) [font=\scriptsize, right] {34817};     \node at (axis cs:43433,1.15) [font=\scriptsize, right] {43433};     \node at (axis cs:51380,0.15) [font=\scriptsize, right] {51380};         \end{axis}         \end{tikzpicture}         }     \begin{picture}(\wd0, \ht0 )     \put(0,0){\usebox0}     %% Adjust the -0.7cm and -0.5cm shifts     \put(\wd0 - \wd2 - 0.5cm,\ht0 - \ht2 - 0.1cm){\usebox{2}}     \end{picture}         \subcaption{Subcaption}     \end{minipage}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \caption{Caption}     \end{figure}          \end{document}


title: How can I avoid AUCTeX wrongly inferring the language of a document?

text: A colleague using a class I wrote reports that AUCTeX is inserting guillemets when he hits the double-quote key. Investigation showed that `TeX-language-fr- hook` is being called even though the document itself is not in French. If I understand a comment from @egreg in response to my colleague's question (Double-quote produces guillemets in emacs) the reason AUCTeX thinks the comment is in French might be something like `\usepackage[french]{babel}`. In fact there is this code in the class: `\iffrench \RequirePackage[english,francais]{babel}\fi` This conditional branch is only triggered if the `french` option to our class is chosen by the user. It seems that AUCTeX is taking that line to mean that the document is in French, regardless. How can I arrange it so the `\usepackage` is hidden from AUCTeX or only has an effect when it's intended to? For full context see Double-quote produces guillemets in emacs **Edit:** Below are a few lines from the `*Messages*` buffer in emacs that may be useful in tracing the problem:               Loading /var/lib/auctex/emacs24/msp.elc...done     Loading /usr/share/emacs/site-lisp/auctex/style/babel.el (source)...done     Loading /var/lib/auctex/emacs24/francais.elc...done     Loading /usr/share/emacs/site-lisp/auctex/style/francais.el (source)...done     Loading /usr/share/emacs/site-lisp/auctex/style/frenchb.el (source)...done     Loading /var/lib/auctex/emacs24/english.elc...done


title: How to say in tex "missing T = 0" (that would mean there was no such T == 0)?

text: I think about trying `$T=0$` but it seems kind of wrong because we do not assign but check for value `==` to... So what is the correct way to say that somewhere there was no such variable (say named T) that would be equal to some value (say 0)?


title: Excluding reference list from line numbering

text: When the `lineno` package is included, all lines are numbered. But I don't want the bibliography to have linenumbers because it is ugly. So is this possible? [ps. I have used BibTex to create the bibliography] MWE:               \documentclass{scrartcl}     \usepackage[english]{babel}     \usepackage{lipsum}     \usepackage{lineno}          \bibliographystyle{plain}          \begin{document}     \section*{Section}     \linenumbers     \lipsum[1-2]     \cite{goossens93}          \bibliography{refs}     \end{document}      creates: ![enter image description here](http://i.stack.imgur.com/9FEJW.png)


title: Editor as sortname only when there is no author?

text: I edited the authoryear.bbx for biblatex the following way:               \DeclareNameAlias{author}{sortname}         %\DeclareNameAlias{editor}{sortname} this I commented out     %\DeclareNameAlias{translator}{sortname} this I commented out      It works perfect for sorting the authors in "Lastname, Name and Name Lastname" etc. but now the books with no authors and only editors are still sorted in the "Name Lastname", but I want them to be formated in the same way as the authors. But only for books with no authors, not for incollection nor for inproceedings etc. I try to do this, but obviously it doesn't work:               \DeclareNameAlias{author}{sortname}         \DeclareNameAlias{collection}{editor}{sortname}     %\DeclareNameAlias{translator}{sortname}       This is wanted and shall be kept: Kahn, Douglas 2007: Between a Bach and a Bard Place: Productive Constraint in Early Computer Arts, in Oliver Grau (Ed.): MediaArtHistories, Cambridge, MA: MIT Press, S. 423–451. But this not: **Carolyn Birdsall** /Anthony Enns (Ed.) 2008: Sonic Mediations: Body Sound Technology, Newcastle upon Tyne: Cambridge Scholars Publishing. This should be change into: **Birdsall, Carolyn** /Anthony Enns (Ed.) 2008: Sonic Mediations: Body Sound Technology, Newcastle upon Tyne: Cambridge Scholars Publishing. If I uncomment the \DeclareNameAlias{editor}{sortname}, this will happen: Kahn, Douglas 2007: Between a Bach and a Bard Place: Productive Constraint in Early Computer Arts, in **Grau, Oliver** (Ed.): MediaArtHistories, Cambridge, MA: MIT Press, S. 423–451. which is unwanted.. Here is the complete code for spread in three .bbx files.. sorry very chaotic.. I am a new into this. Thanks to all the authors of these codes. Since I don't know how to past correctly longer code scripts without manually indenting the code by 4 spaces.. I will link the two other files. http://algorhythmics.com/latexstuff/sm-002.bbx http://algorhythmics.com/latexstuff/philosophy-standard.bbx And here is the part of authoryear I changed:               \DeclareNameAlias{author}{sortname}     \DeclareNameAlias{editor}{sortname}      \DeclareNameAlias{default}{first-last}     \DeclareNameAlias{byeditor}{default}     %\DeclareNameAlias{translator}{sortname}      Please help me. Thanks!


title: Align figure to the right (with \raggedleft) while still centering its caption with respect to the image

text: I am wondering if it is possible to align an image to the right margin of the page (with `\raggedleft`) while still having it's caption nicely centered (with `\centering`) under the image (centered with respect to the image itself I mean, not w.r.t the page). Is this possible in latex? Ideally the solution should work within both a `figure`and `wrapfigure` environments.


title: Make a list with uniform spacing regardless of the characters and number of text lines, possibly with minipages or a table

text: I am trying to make a list with two columns, where I can used different font sizes and have single- or multi-row columns, while adhering to the page margins and aligning the text properly regardless of what letters are used and how many rows are in each cell. It looked straight-forward to me at first, but then I realized that I was not able to get all of it working at once. ## The following need to work:   * Top alignment when different font sizes are used in adjacent cells   * The page should fill the margins (as specified by the class, or, as in the example below, explicitly. This implies that small margins around the text in the minipages should not be added, or that it should be compensated for.   * The spacing around the minipages should not be different if only one line of text is present compared to when several lines are present.   * The spacing should not be different for the minipages at the top compared to all other minipages (this was the case before I added the outer minipage, in which both of the inner minipages are placed in the example below).   * It should be possible to right-align part of the text in the minipage (as is done with \hfill in the example below).   * All spacing at the top should be for the tallest character of the font used, regardless of the actual characters used. For example: If one minipage contains only the letter 'A', and the minipage next to it only the letter 'a', the 'a' of the second minipage should stay at the same height as it would have, if the page would have contained for example 'al' (the height of a tall letter should always define the top of a line, even if no tall letter was used). Thus, the top of the 'a' should be slightly below the top of the 'A'.   * All spacing at the bottom should be for the deepest character of the font used, regardless of the actual characters used. For example: If one minipage contains only the letter 'A', the minipage below it should be rendered at the same position as it would have, if the minipage above would also have contained a downwards-protruding letter, for example 'Ag'. It may be that this is easier to achieve by using a table, but my attempts at getting the alignment correct regardless of whether only short or also tall letters are used and whether only non-downwards-protruding or also downwards- protruding letters are used has been unsuccessful. Please have a look at this previous question of mine (although I have accepted an answer, the alignment later turned out to not handle all of the described situations correctly): Top-aligned table cells with different font sizes and controlled spacing. It is not important to me how this is achieved (minipages, parboxes, tabular, tabu, tabularx, longtable, ...) -- any solution that can get the alignment right is welcome. Ideally, I would also prefer to get rid of all extra space of the minipage, so that I can get the margins to be exactly what they are specified as (the minipages seem to have some extra space added to them, and I have been unable to remove all of it). That is why I cannot simply put two minipages of width `0.5\textwidth`, but have to use `-15.73111p` to compensate for the extra space when I define the second (right-hand side) minipage of each pair (I arrived at that value from compiling and then looking at the warning for the bad box, which specified the amount of oversize).               \documentclass[paper=a4,fontsize=11pt]{scrartcl}                % KOMA-article class     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[english]{babel}                             % English language/hyphenation     \usepackage{geometry}     \pagestyle{empty}                               % No pagenumbers/headers/footers          \newcommand{\entry}[8]{ % #1 Heading/time #2 #3 alignment #4 #5 width #6 horisontal separation #7 vertical separation #8 description     \noindent\hangindent=0em\hangafter=0 % Indentation     \begin{minipage}[#3]{\dimexpr(#4+#5)} %     \begin{minipage}[#2]{\dimexpr(#4)} %     \vspace{0pt} %     #1 %     \par\vspace{0pt} %     \end{minipage} %     \hspace{#6} %     \begin{minipage}[#3]{\dimexpr#5-15.73111pt} %     \vspace{0pt} %     #8 %     \par\vspace{0pt} %     \end{minipage} %     \par\vspace{0pt} %     \end{minipage} %     \vspace{#7} %     } %          \newlength{\lwidth}     \newlength{\rwidth}     \newlength{\hsep}     \newlength{\vsep}     \newlength{\spacebox}     \settowidth{\spacebox}{88}     \newlength{\topm}     \newlength{\footm}     \newlength{\rightm}     \newlength{\leftm}          \setlength{\parskip}{0cm}     \setlength{\hsep}{1em}     \setlength{\vsep}{2ex}     \setlength{\topm}{20mm}     \setlength{\footm}{\dimexpr(\topm)}     \setlength{\rightm}{\dimexpr(3\topm/2*\paperwidth/\paperheight)}     \setlength{\leftm}{\rightm}     \newgeometry{top=\topm,bottom=\footm,right=\rightm,left=\leftm}     \setlength{\lwidth}{2.8cm}     \setlength{\rwidth}{\dimexpr(\textwidth-\lwidth-\hsep)}          \begin{document}     \entry{\Huge\textbf{{BIG}}}{t}{t}{\lwidth}{\rwidth}{\hsep}{\vsep}{Some text here.\hfill Text flush with the right margin.\\Another row\\Another\\Another}          \entry{Two\\Lines}{t}{t}{\lwidth}{\rwidth}{\hsep}{\vsep}{A longer text here, so that there will be several rows, gives the proper spacing below it. There must also be downwards-protruding letters (like 'p' and 'g').}          \entry{One Line}{t}{t}{\lwidth}{\rwidth}{\hsep}{\vsep}{This one-line entry has unwanted extra space under it.}          \entry{Below One Line}{t}{t}{\lwidth}{\rwidth}{\hsep}{\vsep}{This entry is slightly lower than it should, due to the added extra space below the single line.}          \entry{Not deep}{t}{t}{\lwidth}{\rwidth}{\hsep}{\vsep}{This entry contains no letters that protrude downwards in the second line. Just letters that are above the base line.}          \entry{Below Not deep}{t}{t}{\lwidth}{\rwidth}{\hsep}{\vsep}{This entry ends up to close to the line above, since the line above contains no letters that protrude downwards.}     \end{document}      ![enter image description here](http://i.stack.imgur.com/mjx2u.png)


title: Draw 3D lines between points with PSTricks

text: Consider the following exmaple: **Code**               \documentclass{article}          \usepackage{auto-pst-pdf,pst-solides3d}          \begin{document}          \begin{figure}      \psset{        viewpoint=15 -30 11,        Decran=10      }       \begin{pspicture}[solidmemory]        \psSolid[object=point,args=15 0 8.5,name=L]        \psSolid[object=point,args=-60 5 5,name=R]        \psSolid[object=line,linecolor=red!50,linestyle=dashed,linewidth=2pt,args=R L]        \psSolid[object=parallelepiped,a=6.1,b=6.3,c=7.3,RotZ=-8,fillcolor=blue!50,          name=parallelepipedum,action=draw*](0 0 2)        \multido{\iA=0+1}{8}{%          \psSolid[object=point,linecolor=black,definition=solidgetsommet,            args=parallelepipedum \iA,name=C\iA]         \psset{           object=line,           linecolor=darkgray!50,           linestyle=dotted         }          \psSolid[args=L C\iA]          \psSolid[args=R C\iA]        }        \psSolid[object=parallelepiped,a=6.1,b=6.3,c=7.3,RotZ=-8,          name=parallelipipidum,action=draw](0 0 2)       \end{pspicture}     \end{figure}          \end{document}      **Output** ![enter image description here](http://i.stack.imgur.com/CM9C7.jpg) **Question** How do I draw the two diagonals at the top of the box with solid, black lines? Furthermnore, I would like to mark the intersection point of thew diagonals with a dot.


title: avoid empty vert space after lstlisting

text: After some `\begin{lstlisting} ... \end{lstlisting}`, LaTeX adds some additional vertical space. How can I avoid that? ![shot](http://i.stack.imgur.com/JTONP.png)


How can I left align the text in the figure/table caption? This is the text I am using to add an image               \begin{figure}[htbp]         \centering             \includegraphics[width=0.90\textwidth]{Figures/EdgeYarnA9}             \caption[abc]{abc}         \label{fig:EdgeYarnA9}     \end{figure}


title: How to force left alignment in an aligned array of formulas?

text: So I try               \begin{equation}\label{eq2}     \left.\begin{aligned}     \Phi (z)=-\frac{{\rm 1}}{{\rm 2\pi}{i}} \int _{-\infty }^{+\infty }\frac{N-iT}{x-z} dx ,\\  {\rm \Psi }(z)=-\frac{{\rm 1}}{{\rm 2\pi }{i}} \int _{-\infty }^{+\infty }\frac{N+iT}{x-z} dx-{\rm \Phi }(z)-z{\rm \Phi }^{'} (z),     \end{aligned}\right.     \end{equation}      But it renderes like ![this](http://i.stack.imgur.com/q6aLd.jpg). How to force it to be alligned left?


title: Contour around multi-line tikz text

text: I am trying to produce a text inside a node which has a contour. Problem is: when using contour, text width seems to be ignored, so I can not use auto multi-line text. I discovered contours in tikz halo around text, and I can use it correctly as in:               \draw (0, 0) node {\contour{white}{A very long title that we mean to split on multiple lines}};      but when adding `text width` it is not multi-lined:               \draw (0, 0) node[text width=5cm] {\contour{white}{A very long title that we mean to split on multiple lines}};      And without contour it works correctly:               \draw (0, 0) node[text width=5cm] {A very long title that we mean to split on multiple lines};      How can I fix this?


title: Section title in the table of contents

text: I have the following simple problem. The name of one of my sections is very long. Hence I decided to have a line break in its title. For the header I use a short version of this title. So it looks something like this               \section[Short]{Long title part 1 \newline Long title part 2}      Now I wonder the following: How would it be possible to avoid that the `\newline` will be also used in the Table of Contents? Is there a way to do that?


title: Increment counter in TikZ

text: How to increment counter in TikZ using code below:               \newcounter{ga} %counter     \setcounter{ga}{1}     \begin{tikzpicture}         \foreach \t in {1,...,10}{           \pgfmathparse{Mod(\t,2) == 1 ? 1 : 0}           \ifnum\pgfmathresult > 0              \ga = \ga + 1           \fi     \end{tikzpicture}      In line 4 I need something similar to `\ga = \ga + 1`.


title: Russian (Czech, Polish, etc.) tradition of equations breaking

text: According to the Russian (Czech, Polish, etc.) typesetting tradition, we have the following rules of equation breaking: > If an equation cannot be fit into one line, a typesetter should put part of > the equation to the next line. First of all, breaking is allowed on binary > relation symbols (=, <, etc.) and signs +, -. In the second place, breaks > are allowed on multiplication signs (not on divisions!). > > **The symbol where the break was done should be repeated in the beginning of > the next line.** The "x" sign should be used in case of break in > multiplication. The question is how to achieve this behaviour. As one can see, it's not an issue for displayed equations since breaking is always done manually. Interesting part are embedded equations which LaTeX can break without repeating the sign of operation. Possible yet conservative solution is to turn off equation breaking inside paragraph at all. Unfortunately this could cause too large spaces between words.


title: Reset page vertical space on top?

text: This is one of the cases, where I've tried for some time now to come up with a minimal example that will demonstrate the problem, but I can't. All I can provide is the problematic behavior of the master document, so I hope you'll bear with me. Essentially, I use `titlesec` for custom headings; and `pdfpages` to include PDF pages. I have a structure like:               \includepdf{...}     \cleardoublepage          \tracingpages=1     mysection*{Section X} \tracingpages=0          % rest of content...      When it's like this, all is good, and I can confirm that all sections are positioned at the same location on the page ( _EDIT: a good explanation of the`\tracingpages` log is in #60213 - How can I create a chapter with graphics only divided into different sections?_):               $ grep '^%' mydocument.log          %% goal height=591.5302, max depth=5.5     % t=14.4 g=591.5302 b=10000 p=0 c=100000#     % t=-10.76009 g=591.5302 b=10000 p=-300 c=100000#     % t=35.31354 plus 0.15234 g=591.5302 b=10000 p=0 c=100000#     %% goal height=591.5302, max depth=5.5     % t=0.0 g=591.5302 b=10000 p=0 c=100000#     % t=14.4 g=591.5302 b=10000 p=0 c=100000#     % t=-10.76009 g=591.5302 b=10000 p=-300 c=100000#     % t=35.31354 plus 0.15234 g=591.5302 b=10000 p=0 c=100000#     %% goal height=591.5302, max depth=5.5     % t=14.4 g=591.5302 b=10000 p=0 c=100000#     % t=-10.76009 g=591.5302 b=10000 p=-300 c=100000#     % t=35.31354 plus 0.15234 g=591.5302 b=10000 p=0 c=100000#     %% goal height=591.5302, max depth=5.5     % t=14.4 g=591.5302 b=10000 p=0 c=100000#     % t=-10.76009 g=591.5302 b=10000 p=-300 c=100000#     % t=35.31354 plus 0.15234 g=591.5302 b=10000 p=0 c=100000#      So, all sections end at top position t=35.31354, and they are indeed aligned fine. The problem is, sometimes `\cleardoublepage` inserts a blank page **twice**. If the included pdf ends on odd page, then `\cleardoublepage` correctly inserts a blank page, and new section starts on next odd. If the included pdf ends on even page, then I get a blank on (next) odd page; `\cleardoublepage` apparently picks this up, and inserts one more as even - and the new section starts on (next+2) odd page. So if I remove `\cleardoublepage` from a spot like that, then the next "Section X" starts at the next page after PDF is finished, and is on an odd page, as expected - but now the title is slightly misplaced vertically ( `:/` ) ; here is what the log reports:               %% goal height=591.5302, max depth=5.5     % t=14.4 g=591.5302 b=10000 p=0 c=100000#     % t=-10.76009 g=591.5302 b=10000 p=-300 c=100000#     % t=35.31354 plus 0.15234 g=591.5302 b=10000 p=0 c=100000#     %% goal height=591.5302, max depth=5.5     % t=0.0 g=591.5302 b=10000 p=0 c=100000#     % t=14.4 g=591.5302 b=10000 p=0 c=100000#     % t=-10.76009 g=591.5302 b=10000 p=-300 c=100000#     % t=35.31354 plus 0.15234 g=591.5302 b=10000 p=0 c=100000#     # NOTE NO 'goal height' HERE!!     % t=40.68004 plus 4.0 minus 6.0 g=591.5302 b=10000 p=0 c=100000#     % t=15.51996 plus 4.0 minus 6.0 g=591.5302 b=10000 p=-300 c=100000#     % t=61.59358 plus 4.15234 minus 6.0 g=591.5302 b=10000 p=0 c=100000#     %% goal height=591.5302, max depth=5.5     % t=14.4 g=591.5302 b=10000 p=0 c=100000#     % t=-10.76009 g=591.5302 b=10000 p=-300 c=100000#     % t=35.31354 plus 0.15234 g=591.5302 b=10000 p=0 c=100000#      So obviously the third listed part is the problematic one:   * There is no `%% goal height` \- as if a new page never started;    * The first top position reported is `40.68004 plus 4.0 minus 6.0`, unlike the others being 14.4   * The top then seems to "reset" itself to 15.51996 - but it needs to be on -10.76009 to align like the others.  To me, the problematic part looks like a state, as if we're "currently" on top of a blank page; yet latex still thinks of it as not a new page. Note that I'm not keen on using `\vspace{-Xpt}` or similar to manually correct, since I'd have to tune the value by hand, and the master document takes several minutes to build... ( _and what guarantee do I have that all eventual problematic sections will be misplaced by the same ammount?_ ) * * * So is there a command I could use, that could "reset" the "current page", so that the "top position" would be reset to a default value (as a side effect, I'd expect if you use such a command on a page that is typeset halfways, that the "cursor" would essentially go up, and typeset over existing contents) * * * PS: As an experiment, I tried to get the last statements from `\newpage`:               $ texdef -t latex -c book \newpage -f     \newpage is defined by (La)TeX.          \newpage:     macro:->\if@noskipsec \ifx \@nodocument \relax \leavevmode \global \@noskipsecfalse \fi \fi \if@inlabel \leavevmode \global \@inlabelfalse \fi \if@nobreak \@nobreakfalse \everypar {}\fi \par \vfil \penalty -\@M       ... and add them instead of the problematic `\cleardoublepage`, in hope that they might "reset" the page without breaking it - however, even just `\penalty -\@M` on the problematic spot inserts a new blank page ( _and also`\leavevmode` at the same position does nothing to remedy the position_)


title: a thinner "ring of integers" $\mathcal{O}$

text: Throughout Neukirch's _Algebraic Number Theory_, he denotes Dedekind domains and their extension respectively with a small and a large version of what I can only describe as a thinner (i.e., less bolded) `$\mathcal{O}$`, which is commonly used symbol to denote the ring of integers of a number field. ![enter image description here](http://i.stack.imgur.com/1ViMg.png) Here is a usage in the book where it is side by side with the standard `$\mathcal{O}$`: ![enter image description here](http://i.stack.imgur.com/xymu9.png) How can I reproduce these symbols? They don't appear to be in the standard alphabets (like `\mathcal`, `\mathfrak`, etc.).


title: numbering of \paragraph command

text: Due to the limitations of the number of subsubsections, subsubsubsections that we can use, I notice that I could replace that with the command \paragraph. Now when I use that, I am amazed by its function and would like to consult two things:   1. In my first `\paragraph` command of `Chapter 2, section 2.2`, the numbering appear as `2.2.0.1`. May I know if it is possible to change it to `2.2.1`? If it is possible, may I know how it can be done?   2. I notice `\paragraph` command doesn't add the heading to the table of contents. May I know how to incorporate the `Title 1` from `\paragraph{Title 1}` into the table of contents? Thank You.


title: How to restart numbering of Exerciselist?

text: I have problems with the `exercise` package. How can I make the second `Exerciselist` to start at one?               \documentclass[a4paper]{book}          \usepackage[dvipsnames]{xcolor}     \usepackage[english]{babel}     \usepackage[utf8]{inputenc}     \usepackage{amsmath,amsthm,amsfonts}     \usepackage{graphicx}     \usepackage{hyperref}     \usepackage[colorinlistoftodos]{todonotes}     \usepackage{exercise}                    \title{xercise List Bug}     \author{Someone}               \begin{document}               \begin{ExerciseList}          %1       \Exercise Prove that...            \Answer From the definition....          \end{ExerciseList}          \begin{ExerciseList}          %2       \Exercise Find an example of....       \Answer It's well known....          \end{ExerciseList}               \end{document}


title: TIKZ drawing vector field from external file

text: I would like to draw a vector field from a data file. I tried to adapt code from _Manual for Package pgfplots_ but this doesn't work               \documentclass{standalone}     \usepackage{pgfplots}          \pgfplotstableread{vector_field.dat}{\loadedtable}          \begin{document}     \begin{tikzpicture}     \begin{axis}[title=Quiver and plot table]     \addplot[blue,quiver={u=\thisrow{u},v=\thisrow{v}},-stealth] table from  \loadedtable;     \end{axis}     \end{tikzpicture}     \end{document}      where data file vector_field.dat is :               x y u v     0 0 1 0     1 1 1 1     2 4 1 4     3 9 1 6     4 16 1 8      During compilation I get for example this error:               ! Undefined control sequence.     \pgfk@/data point/quiver/u ->\thisrow     {u}     l.8 ...row{v}},-stealth] table from \loadedtable;     The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.     ! Package PGF Math Error: Unknown function `u' (in '{u}').      Does anyone now how to solve it? I would be grateful for any help.


title: Partially expanding a command

text: My `\john` command is defined like so:               \def\john{\DontExpandMe}      I would now like to repeatedly change its definition, to keep adding some extra stuff on the front.               \foreach\i in {ape,bat,cow,dog} {       \xdef\john{\i,\unexpanded{\john}}       \show\john     }      My intention is that the `\show\john` command at each iteration should result in:               \john=macro: -> \DontExpandMe.     \john=macro: -> ape,\DontExpandMe.     \john=macro: -> bat,ape,\DontExpandMe.     \john=macro: -> cow,bat,ape,\DontExpandMe.     \john=macro: -> dog,cow,bat,ape,\DontExpandMe.      That is to say, I would like `\john` to be "partially expanded" in some sense. But I can't make that work. I have tried the following   * If I use an `\xdef`, then the whole command is expanded, including the `\DontExpandMe` part.    * If I just use a `\gdef`, then the `\i` is not expanded.    * If I use `\xdef` with `\unexpanded{...}` around `\john` (as I have in my current code) then I get `\john=macro: -> ape,\john.` and `\john=macro: -> bat,\john.` and so on. Here is my code.               \documentclass{article}     \usepackage{pgffor}     \begin{document}       \def\john{\DontExpandMe}       \show\john       \foreach\i in {ape,bat,cow,dog} {         \xdef\john{\i,\unexpanded{\john}}         \show\john       }     \end{document}


title: Package clash between amsthm and lineno

text: I found a clash between packages amsthm and lineno. Below is some sample code. Does anyone know what I should do to avoid this ?               \documentclass[12pt]{article}     \usepackage[utf8]{inputenc}     \usepackage{lineno}     \usepackage{amsthm}          \begin{document}     \linenumbers     \title{It's hard schnock's life}     \author{Anne Onymous}          \maketitle          \noindent C'est un trou de verdure où chante une rivière,\\     Accrochant follement aux herbes des haillons\\     D'argent ; où le soleil, de la montagne fière,\\     Luit : c'est un petit val qui mousse de rayons.\\     \\     Un soldat jeune, bouche ouverte, tête nue,\\     Et la nuque baignant dans le frais cresson bleu,\\     Dort ; il est étendu dans l'herbe, sous la nue,\\     Pâle dans son lit vert où la lumière pleut.\\     \\     \\Les pieds dans les glaïeuls, il dort. Souriant comme     \\Sourirait un enfant malade, il fait un somme :     \\Nature, berce-le chaudement : il a froid.     \\     \\Les parfums ne font pas frissonner sa narine ;     \\Il dort dans le soleil, la main sur sa poitrine,     \\Tranquille. Il a deux trous rouges au côté droit.          \end{document}


title: \footfullcite does NOT give the full citation (biblatex, beamer)

text: As the title says, the command `\footfullcite{test}` does not give the full citation, but only the label "test", "test1" and "test2", respectively. I'm using biblatex and the beamer class (downloaded yesterday, so hopefully the newest versions). Any ideas? :( Code:               \documentclass{beamer}          \usepackage{pgf}     \usepackage{xcolor}     \usepackage[utf8]{inputenc}     \usepackage[style=authortitle]{biblatex}          \usepackage{filecontents}          \begin{filecontents}{vorlage.bib}           @article{test1,         author  = {Shen Lin and Brian W. Kernighan},         title   = {An Effective Heuristic Algorithm for the Travelling-Salesman Problem},         journal = {Operations Research},         volume  = {21},         year    = {1973},         pages   = {498--516},      }          @BOOK{test,       title = {The Infamous Test},       publisher = {Testington Test},       year = {2007},       author = {John Doe},       address = {Testville},     }          @ARTICLE{test2,       author = {Testi, T.},       year = {2003},       title = {Testartikel},       journal = {Testjournal}     }     \end{filecontents}     \addbibresource{vorlage.bib}          \begin{document}          \begin{frame}     \frametitle{Introduction and motivation - the title}     \section[Motivation]{Introduction and motivation}     test text \footfullcite{test}\\test text 1 \footfullcite{test1}\\test text 2 \footfullcite{test2}     \end{frame}          \end{document}      here the result: ![beamer slide](http://i.imgur.com/u0abTYa.jpg)


title: Numbering of displayed math without using the equation environment

text: I know about `align` and `equation` environments, and tend to use them most of the time, but sometimes I like to have more flexibility within an array of equations, like better control on justification and horizontal spacing. In that case, I use an `array` environment.   The only downside of this method (that I know of) is the fixed vertical spacing, but for equation arrays wherein every line has the same height, it is usually ok. For reference, here is my code :               \documentclass[11pt,a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}          \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{mathtools}          \newcommand*{\defeq}{\vcentcolon=}     \newcommand*{\diff}{\mathrm{d}}          \newcommand*{\pd}[3][]{%         \ensuremath%         \frac{\partial^{#1}#2}{\partial #3^{#1}}     }          \newcommand*{\pdc}[4][]{%         \ensuremath%         \left(\pd[#1]{#2}{#3}\right)_{\!\!#4}     }          \newcommand{\td}[3][]{%         \ensuremath%         \frac{\diff^{#1}#2}{\diff #3^{#1}}     }          \newcommand{\earray}[3][2]{%         \ensuremath%         \everymath{\displaystyle}%         \renewcommand*{\arraystretch}{#1}%         \begin{array}{#2}             #3         \end{array}     }               \begin{document}     \[         \earray{r@{\;}l@{\;}ll}{             \diff J^\pm                  & \defeq \diff u\pm \frac{1}{C}\diff p                  & =\left(F\pm\frac{1}{C}G\pdc{p}{e}{V}\right)\diff t                  & \text{ along a path defined by } \td{\xi}{t}=\pm C,\\             \diff S                 & \defeq \diff p + C^2 \diff V                 & =G\pdc{p}{e}{V} \diff t                  & \text{ along a path defined by } \td{\xi}{t}=0         }     \]           \begin{align*}         \diff J^\pm              & \defeq \diff u\pm \frac{1}{C}\diff p              & =\left(F\pm\frac{1}{C}G\pdc{p}{e}{V}\right)\diff t              & \text{ along a path defined by } \td{\xi}{t}=\pm C,\\         \diff S             & \defeq \diff p + C^2 \diff V             & =G\pdc{p}{e}{V} \diff t              & \text{ along a path defined by } \td{\xi}{t}=0.      \end{align*}      \end{document}      Here is what the code produces. So, my question is : is there a way to manually add tags inside displayed math ? Alternatively, is there a better way to proceed, or a better environment, for such cases ?


title: Language-specific removal of diacritics from text and bibliography

text: I am using XeLaTeX and BibLateX to write papers in the humanities. I routinely use transcriptions of Chinese (pinyin), Korean (McCune-Reischauer), Japanese (Hepburn), Manchu (Norman) etc. In addition, there are occasional references and quotes in European languages that use diacritics, such as French. Up until now, I've written all my Chinese transcriptions in pinyin with tone marks (´ acute and ` grave accents, ˇ háček, and ¯ macron). However, many journals discourage the use of tone marks in the transcriptions. I'm therefore looking for a way to strip my text of the diacritics for Chinese. As I see it, I face two problems:   1. I want to strip the bibliography-references of the pinyin diacritics without having to reenter them in the .bib file again, and   2. I want to remove only the diacritics in the Chinese transcriptions, not the macrons in Japanese (e.g. Tōkyō), or the typographically identical accents in French (e.g. problème). Is there a way to do this? UPDATE: This is my try with the code kindly provided by PLK below. Unfortunately, it doesn't work for me:               \documentclass[utf8,12pt,letterpaper]{article}     \usepackage{setspace}     \usepackage[fallback]{xeCJK}     \usepackage{fontspec}     \defaultfontfeatures{Ligatures=TeX}     \setmainfont{Linux Libertine O}     \newcommand{\mainfontCJK}[0]{HanaMinA}     \setCJKmainfont[Scale=0.9]{\mainfontCJK}     \setCJKfallbackfamilyfont{\CJKrmdefault}[Scale=0.9]{NanumMyeongjo}     \XeTeXlinebreaklocale "zh"     \XeTeXlinebreakskip = 0pt plus 1pt     \usepackage[notes,strict,isbn=false,backend=biber,bibencoding=utf8,hyperref=true]{biblatex-chicago}          \DeclareSourcemap{       \maps[datatype=bibtex]{         \map{           \step[fieldsource=author, match=\regexp{[\x{300}\x{301}\x{304}\x{30c}]}, replace={}]         }       }     }     \DeclareNosort{       \nosort{type_names}{\regexp{[\x{300}\x{301}\x{304}\x{30c}]}}     }     \DeclareNoinit{       \noinit{\regexp{[\x{300}\x{301}\x{304}\x{30c}]}}     }          \addbibresource{MY BIBLIOGRAPHY HERE}               \begin{document}          \cite{WeiYuan18422004ShengwuJi}          \printbibliography          \end{document}      The citation comes out as usual, with the diacritics (please ignore the strange formatting of a name, I usually use something else to fix that, which I haven't included in this minimal example): ![enter image description here](http://i.stack.imgur.com/mQPL8.png) UPDATE The bibliography entry used in the example above:               @book{WeiYuan18422004ShengwuJi,         author = {Wèi, 魏源, Yuán},         title = {Shèngwǔjì},         titleaddon = {圣武记},         usere = {Record of the sacred wars},         publisher = {Yuèlù shūshè},         date = {2004},         origdate = {1842},         address = {Chángshā},         edition = {\autocap{c}ritical edition},         maintitle = {Wèi Yuán quánjí},         volume = {3}     }


title: TikZ tree (not aligned text at a given level of the tree because use exponent)

text: I have a tree (see example) for which the text at level 1 is not aligned since one of the text uses some math expression with an exponent (i.e., `$\mathtt{int}^2$`). Any idea how to get all the texts that are located at the same level of the tree aligned ?               \documentclass{book}     \usepackage{tikz}     \begin{document}     {\tiny     \begin{tikzpicture}     \begin{scope}[level distance=6mm]       \tikzstyle{level 1}=[sibling distance=8mm]       \node (1){$\mathtt{atom}$}         child {node (2){$\mathtt{atom}$}}         child {node (3){$\mathtt{int}^2$}}         child {node (4){$\mathtt{collection}$}          child {node (5){$\mathtt{int}$}}};     \end{scope}     \end{tikzpicture}     }     \end{document}


title: Fuzzy logic operator symbols

text: How can I write in Latex symbols for standard or Łukasiewicz conjunction like these? ![screenshot](http://i.stack.imgur.com/4Z44X.png) Thank you


title: Chess mode in texmate: wrong side to move

text: This is my first post here :) I am starting with LaTeX, and I am trying now to apply it annotate some chess positions. My problem is the use of the chess mode (`|...chess moves to show figurines...|`) when using the `texmate` package. I don't want to be strict when editing the chess moves in LaTeX, so I use `\SkakOff` to avoid `texmate/skak` to check every move sequence entered. I am planning to use only `\fenboard{...}` or `\position{...}` and then the chess mode to insert the moves. Every board is a new position in a different game, so that's why I don't need (nor want) `skak` to check every chess move(s). I have read Typesetting nested chess variations in Skak but I wanted to avoid the use of `\mainline`, `\variation`, etc. The problem appears when in the last "variation" (in fact I am not using `\mainline`, `\variation`, etc., as commented above) the last side who made the move is white, then, in the next sequence, LaTeX starts as if it was black to move. Here there is the example 10.1.15 from The LaTeX Graphics Companion (page 680), modified to ilustrate the problem:               \documentclass[10pt]{book}     \usepackage[utf8]{inputenc}          \usepackage{texmate}  \SkakOff     \begin{document}     %Original code     Input as |e4 c5 Nf3 d6 d4 cxd4|     or as    |1 e4 c5 2 Nf3 d6 3 d4 cxd4|     or as    |1. e4 c5 ; 2. Nf3 d6 ; 3. d4 cxd4|          %Modified (buggy) code     But if   |1 e4 c5 2 Nf3 d6 3 d4 cxd4 4 Na3| (the last move is played by white)     then     |1 e4 c5 2 Nf3 d6 3 d4 cxd4 4 Na3| (the next time, skak starts      the chess mode as moving black first, not white)     \end{document}      How can I force to start again the chess move with white to move if the last move in the main variation was made by white? Or the opposite, force start again with black to move, if it was black who made the last move. Thanks, P.S. I am using `texmate` because I use the `\makegametitle` command. Addendum: My question is related to the translation form HTML to LaTeX of an old document I have been working and using for long. Now, I want to print it, but the HTML printout looks poor, so I thought about translating it to LaTeX. That document is quite well debugged in chess terms, so I do not need the help of skak/texmate to check the positions and move sequences, as every position is in HTML format and I have created an small script to translate them to FEN and I already have the consequent `\fenboard{}` blocks. But when I substituted the HTML format of the moves to the LaTeX chess mode `|...|` I found the (unexpected for me) behavoir explained above. Thanks to DJP for explaining me that behavoir. I do not want to go through the hundred of positions I already have, checking and rewriting every mainline/variation and including the corresponding LaTeX command. I expected to use the chess mode to just highlight (`\textbf`) the chess moves and change from the spanish algebraic notation to the figurine notation. Now, to avoid all the hard work of revising everything, I would like to know if there was any way to easily mark a sequence of moves (which already have their correct move number) as show them as in the LaTeX chess mode. Some sort of reseting the chess mode, like the `\newgame` trick suggested by DJP, but being able to set also the side to move. If it is not possible, then I will have to make another script to detect all the chess move sequences and replace Ka1 for `\king{}a1`, e3 for `\pawn{}e3`, and so on (with the problem of showing black pieces). That is possible, and easy, but would make the final tex file source very obfuscated compared with the simple chess mode notation. It is not at all easy to automate the substitution using `\mainline`, `\variation`, etc. Sorry for my bad explanation, but I am not english speaker, and it is hard for me to explain my problem better. I understand that this problem is quite specific, and that it is not the LaTeX philosophy way of work.


title: How to draw orthogonal vectors using TikZ

text: I have the problem, that I want to draw a vector that is decomposed into two orthogonal parts. A short example:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{calc}     \begin{document}     \begin{tikzpicture}[dot/.style={circle,inner sep=2pt,fill,label={#1},name=#1,color=red},       extended line/.style={shorten >=-#1,shorten <=-#1},       extended line/.default=1cm,scale=2]     \begin{scope}[rotate=30]       \node [dot=A] at (1,4) {};       \node [dot=B] at (2,2) {};       \node [dot=P] at (4,4) {};       \draw [->] (A) -- (B);       \draw [->] (A) -- (P -| B);       \draw [->] (A) -- ($(B) - (P-|B) + (A)$);     \end{scope}     \end{tikzpicture}     \end{document}      Here I have the vector `AB`. I want one of the component vecors to be in the direction of `AP`. The other should be orthogonal (as seen). In the example I solved it using `-|` but this works only if the desired vectors are parallel to the actual axes. I need it for arbitrary points `A`, `B` and `P`. Can you give me a hint, how to draw it?


title: What the first argument for `\l@subsection` actually is?

text: Consider for example the code                 \makeatletter           \renewcommand{\l@subsection}[2]{\@dottedtocline{2}{1.6em}{1.6em}{\S#1}{#2}}       \makeatother      It allows me to obtain in my table of contents records with paragraph (section) sign before the number of subsection. But I want also to have a point after the number of subsection without modification of `\thesubsection` command. Looking at second and third arguments for `\@dottedtocline` I think that first argument for `\l@subsection` is actually something that behaves like encapsulated pair of number of subsection and of title of subsection (because we can control the distance between these two elements of argument #1 by third argument of `\@dottedtocline`). My question is what actually the first argument to `\l@subsection` is and if it is possible to get from this argument the number of subsection and its title as separated values?


title: Using knitr, how can I rotate page to landscape and fit the figure to full extent?

text: LaTeX newbie here, so please be gentle. I'm working with knitr to generate pdf report. The document consists of quite few large maps, with a lot of details or small multiples. Ideally, whenever such map appears, I'd like to set the page orientation to landscape and get the maximum figure that will fit into it. So far I've been trying a set up of:               \documentclass[a4paper]{article}          % setting very small margins     \usepackage{fullpage}          % better for printing, page displayed vertically, content in landscape mode     % \usepackage{lscape}          % better for screen, page displayed horizontally, content in landscape mode     \usepackage{pdflscape}      But whenever i use `\begin{landscape}` I get an extra white page in front.. I tried the solution from this question, but it didn't remove the page. And I still haven’t figure out the knitr settings for maximum available figure to fit. In chunk options I can use `out.width='1\\linewidth'`. Or I could use `out.width, out.height` but then I have to figure out dimensions myself right?


title: Wrong spacing before theorem environment (amsthm)

text: I am using the `amsthm` package to have environment. I also use `\usepackage[onehalfspacing]{setspace}` to have 1.5 line spacing. However, when I use the the theorem environment, the spacing before is not done correctly. It gives me a normal line spacing instead of the 1.5-line spacing. Lets say I have:               First paragraph          Second paragraph          Third paragraph          \begin{theorem} Bla bla. \end{theorem}      I get something like this: > First paragraph > > Second paragraph > > Third paragraph   >  Theorem 1. Bla bla. Do you know how I can change this?