title: Tight bounding box for EPS

text:
This is a follow-up of the question EPS file with tight BB & Psfrag labels. I have this file named `model.eps` (see further below on how to get the file) and I am replacing the labels on the figure using `psfrag` commands. If I compile the file `test3.tex` using `latex` > `dvips` > `ps2pdf`, the resulting file is well-cropped and is the same as the size of the file `model.eps`. I am using the `standalone` package. However I would like an EPS file instead of a PDF file. With `dvips` I can get a PS file. I tried the command:               dvips -D7200 -E test3.dvi -o test3.ps      making sure to use the `-E` switch in order to get a tight bounding box. The resulting PS file (`test3.ps`) is not properly tight bounded on the left as you can see. What am I doing wrong and how can I correct this fault? All the files are in the folder `tightbounding` here at http://petitlien.fr/my_test_file. Thank you for any suggestions... **---- Update** Running epstool: `E:\new>epstool --bbox --copy test3.ps outfile.eps` DSC Information               At line 9033:                          <xapGImg:image>/9j/4AAQSkZJRgABAgEASABIAAD/7QAsUGhvdG9zaG9w     IDMuMAA4QklNA+0AAAAAABAASAAAAAEA
AQBIAAAAAQAB/+4ADkFkb2JlAGTAAAAAAf/bAIQABgQ     EBAUEBgUFBgkGBQYJCwgGBggLDAoKCwoK
DBAMDAwMDAwQDA4PEA8ODBMTFBQTExwbGxscHx8fHx     8fHx8fHwEHBwcNDA0YE      Lines in DSC documents must be shorter than 255 characters.               "C:\Program Files\gs\gs9.01\bin\gswin32c.exe"  -dNOPAUSE -dBATCH -sDEVICE=bbox      -c "<</PageSize [9400 9400] /PageOffset [3000 3000]>> setpagedevice" -f "c:\doc     ume~1\yogcal\locals~1\temp\gsviewa01924"     GPL Ghostscript 9.01 (2011-02-07)     Copyright (C) 2010 Artifex Software, Inc.  All rights reserved.     This software comes with NO WARRANTY: see the file PUBLIC for details.     %%BoundingBox: 0 0 0 0     %%HiResBoundingBox: 0.000000 0.000000 0.000000 0.000000     OK      **I'm getting the bounding box as 0 0 0 0. Why?**


title: How do I set global lengths in TikZ?

text: I am stumped by the following problem. I'm not sure if this is a bug in TikZ, or if I misunderstand the way that lengths work in TeX and in TikZ. I'd like to define a length called \mywidth, and use it in TikZ pictures in my document. I've tried the following method, which didn't work. Firstly, I added the following in my preamble:               \newlength{\mywidth}     \setlength{\mywidth}{1cm}      Then inside a tikzpicture environment, I try the following code:               \draw (0cm,0cm) to [out=0, in=180] (\mywidth,1cm);      It doesn't work! I get a strange error: `Missing \csendname inserted.` However, if I simply type               \draw (0cm,0cm) to [out=0, in=180] (1cm,1cm);      then it does work. What am I doing wrong?


title: Whole word as a macro argument when macro called without braces

text: I have a macro:               \newcommand{\sEmph}[1]{\textbf{\textcolor{NavyBlue}{#1}}}      Then I can do:               Some text is in \sEmph{blue}, and some in black.      with this result: ![enter image description here](http://i.stack.imgur.com/ZiKGa.png) But if I omit the braces only the letter b is blue, like this:               Some text is in \sEmph blue, and some in black.      ![enter image description here](http://i.stack.imgur.com/KrYpU.png) **Q:** Is there a way to make my macro work on words **without using** braces?


title: Memoir class and textblock configuration for A4 paper

text: I'm using the `memoir` class to write my master thesis that should be printed on A4 paper. Altough I'm quite happy with the configuration I did for many aspects of the document, I'm still confused with the settings concerning the page size and the textblock size. Now I just kepts this:               \documentclass[11pt,a4paper]      My main question is: what's the best way to configure the size of the textblock in `memoir` ? Should I use the `geometry` package ? Is there a good resource where I can observe common settings ? In addition I'm a bit confused what the effects of `a4paper` really is: the margins are so large that it didn't seem to really consider it is a A4 paper size. At the same time I'm wondering if 11pt is a good choice for a long document (100 - 150 pages) that will be read mainly from paper (I guess the font size is less important when you read from the screen).


title: Biblatex: Format the date of an article differently for different journals

text: I am trying to develop a Biblatex style for English (academic) legal citations. For the moment I am not trying to deal with the citation of cases (which is going to be very tough), but just with the citation of basic literature -- i.e., things like books, articles and so forth. The most common citation style here (see, e.g. OSCOLA) is similar to that used in humanities fields such as history, so that the "historian" style forms a good starting point. Legal journals have two distinct and different ways of dealing with years and volumes. Some/most journals have consecutively numbered volumes, where the year provides "extra" and in a sense optional information, i.e. the reader could find the journal from the volume number alone. These are cited as > Some Author, "An Article" (2010) 126 LQR 237 But other journals don't have volumes in this sense. They use the year of publication as the volume number. In that case the year of publication is put in square brackets rather than parentheses: > Some Other Author, "Another Article" [2010] PL 237 My question is: what is the best way to deal with this formatting requirement? Is it one that crops up in other areas? Is there a conventional approach? Among the possibilities:   1. If the year is the volume, then enter the volume as "[YYYY]" in the `.bib` file, and leave the year blank. That seems simple to implement; but I don't like that it produces a `.bib` file that is in some sense "counterintuitive", because one doesn't think of "2010" as a volume number, but as a year!   2. If the year is the volume, then enter simply the year in the `.bib` file, and leave the volume blank. In the style file, detect if there is a year but no volume, and if so use the square-bracketed form. I marginally prefer that to the previous option, because at least the "semantic form" of the `.bib` file resembles the way I would "naturally" think about this situation; but I'm concerned that I might get bitten by odd cases where there is (legitimately) a year but no volume number, but this particular form of citation is inappropriate.   3. Given that the number of journals that use this particular referencing system is not huge (though it includes some very commonly referenced journals), write some sort of test in the biblatex style files to check for those particular journals. That sounds like a recipe for error, and missing cases. It also fails because some journals have changed their referencing system at some point, so one would also have to check the date. I'm inclined to reject it.   4. Use a keyword to signal where a journal uses this system, and write macros that typeset accordingly. Do similar issues occur in other areas of work? Is there a conventional way of dealing with them?


title: How can I set columns=fixed for lstinline globally?

text: I typeset my listings using listings with a proportional font. This looks good for the `lstlisting` environment. However, when I use `\lstinline|code|`, the spacing reverts to variable-width. I would like to use the setting `columns=fixed` with `lstinline`. If I `\lstset` it globally, it is ignored for `\lstinline`. Is there a way to set `\lstinline` to use `columns=fixed` without having to add it to every `\lstinline` in my source code? Here is a minimal example:               \documentclass{article}          \usepackage{listings}     \lstset{columns=fixed}          \begin{document}     The code \lstinline|A.someMethodName()| is typeset differently from     \lstinline[columns=fixed]|A.someOtherMethodName()|.     \end{document}


title: Resetting alignment in the align environment

text: I have a few aligned lists of coefficients. One set of coefficients has three columns and the other has four. At the moment I display them with two `align` environments:               \begin{align}        \gamma_1 &= 8/15 & \gamma_2 &= 5/12   & \gamma_3 &= 3/4 \\        \zeta_1  &= 0    & \zeta_2  &= -17/60 & \zeta_3  &= -5/12 \\        \beta_1  &= 4/15 & \beta_2  &= 1/15   & \beta_3  &= 1/6     \end{align}     \begin{align}        a_0 &= 0 & a_1 &= 8/15 & a_2 &= 2/3 & a_3 &= 1     \end{align}      The alignment and spacing between elements in each row is exactly as I want but there is too much space between the three column coefficients and the four column coefficients. Essentially, I want the alignment to reset at a certain point so that the next line of the `align` environment has four columns and is centered. I learned about the `aligned` environment as I searched for an answer. The question asked there is essentially what I am asking, but the code provided there does not do what I want. I have not successfully been able to produce code to do exactly what I want. This is the closest I can get:               \begin{align}        \begin{aligned}           \gamma_1 &= 8/15 & \gamma_2 &= 5/12   & \gamma_3 &= 3/4 \\           \zeta_1  &= 0    & \zeta_2  &= -17/60 & \zeta_3  &= -5/12 \\           \beta_1  &= 4/15 & \beta_2  &= 1/15   & \beta_3  &= 1/6 \\        \end{aligned} \\        \begin{aligned}           a_0 &= 0 & a_1 &= 8/15 & a_2 &= 2/3 & a_3 &= 1        \end{aligned}     \end{align}      This has two problems:   1. The coefficients are compressed rather than expanded as they are with two `align`s.   2. Each `aligned` environment has one equation number. I'd prefer to refer to each set of coefficients (gamma, zeta, beta, and a) directly. Likely I could manipulate the spacing at the bottom and/or top of the align environment and use my original code, but that's sloppy and I'm confident a simple way to do what I want exists but I'm not aware of it. Also, the a0 and a3 coefficients are required to be 0 and 1 respectively by definition, so I can leave one out, but I want to include both of them for clarity.


title: Omit list of acronyms

text: I have a text which includes some acronyms `\ac{ABC}`, but I want to omit the list of acronyms from my final document. As this post suggests, I tried:               \usepackage[nolist]{acronym}      but the title "List of Acronyms" still shows up on its own page. How can I completely omit it? The alternative would be to comment out the package and find a way to deal with the `\ac{}` tags without removing them.


title: Jaxodraw preview does not work, but .tex export does

text: I am running Jaxodraw 2.1-0 on Xubuntu 14.04, and my preview button doesn't work. I get the "axodraw4j.sty not found" error message, although that file is in the jaxodraw directory. Further, if I export Latex->EPS I get a very nice .eps file which I can view with evince or whatever. So it appears that when exporting the axodraw4j style file is correctly found, but not during preview mode. It seems like maybe latex is being run in a totally different directory from jaxodraw when I preview, one which is not recognized by my LaTeX system. Of course, that would be solved by actually installing axodraw4j system-wide, but all my attempts to do that have failed thusfar (/texmf and texash mktexlsr type things haven't improved the situation, anyway). Anyone have any thoughts?


title: How to get correct arrow orientation on TikZ arc?

text: I'm trying to fix the following TikZ figure, where the circle device in the middle should be embraced by two bended arrows pointing counter-clockwise. ![figure with broken orientation for arrows](http://i.stack.imgur.com/7mepQ.jpg) I have drawn these arrows with an `arc` path, but the tips of the arrows are unexpectedly both pointing upward. Any idea how to get these arrow tips to follow the direction of the arc? Here is my code for the above figure:               \documentclass[12pt]{article}          \usepackage{tikz}     \usetikzlibrary{arrows}     \usetikzlibrary{calc}          \begin{document}     \begin{tikzpicture}           \draw (0,0) circle (1cm);           \draw[fill=gray!20]  (23:0.45cm)         -- (23:1cm) arc[radius=1, start angle=23, end angle=-203] (157:1cm)         -- (157:0.45cm) arc[radius=0.45, start angle=157, end angle=23] (23:0.45cm);           \draw[fill] (0,0) circle(2pt);           \draw[->,>=stealth',semithick] (150:1.2cm) arc[radius=1.2, start angle=150, end angle=210] (210:1.2cm);      \draw[->,>=stealth',semithick] (-30:1.2cm) arc[radius=1.2, start angle=-30, end angle=30] (30:1.2cm);           \foreach \x/\y in {1/0,2/0,3/0,4/1,5/1,6/1,7/0,0/1}         \node[rotate={\x*45-90}] at ($(0,0)!.75!\x*45:(1,0)$) {\y} ;     \end{tikzpicture}     \end{document}


title: How to change subsection heading (e.g. center it)

text: I'd like to change the styling of `\subsection` in the `memoir` class. The example is:               \documentclass[oneside, 12pt]{memoir}          \begin{document}     \subsection{A subsection - center me!}     \end{document}      This is easy enough with sections, eg               \setsecnumformat{Section \arabic{section}. \space}     \setsecheadstyle{\bfseries\large\centering}      However I wasn't able to find an equivalent for subsections. Is there one, or some alternative?


title: Custom slide titles in beamer

text: My slides have a particular PDF background and I would like to force slide- titles to appear in a particular place on each slide without a blue box underneath them. I want the `\frametitle{}` command to place my title in white text, flush right, at the top right of my slide with no surrounding box or anything. Is this possible? More generally, is it possible to get LaTeX/`beamer` to draw textboxes (with line/fill options) in specific places on slides?


title: Using memoir, how do I number paragraphs?

text: I am trying to implement paragraph numbering with `memoir`. I would like the numbers to be   1. in the outside margin,   2. flush against the text block, and   3. vertically aligned with the first line of the paragraph. Combining various bits of code I found here at Stack Exchange, I have               \documentclass[12pt]{memoir}     \pagestyle{empty}          \usepackage{lipsum}          \strictpagecheck     \newcounter{PN}     \marginparmargin{outer}          %% ATTEMPT A     \newcommand{\pnum}{\addtocounter{PN}{1}\marginpar{\mpjustification\arabic{PN}}}          %% ATTEMPT B     %\newcommand{\pnum}{\addtocounter{PN}{1}\hspace{0pt}\marginpar{\mpjustification\arabic{PN}}}          \begin{document}          \pnum\lipsum[\value{PN}]          \pnum\lipsum[\value{PN}]          \end{document}      Both attempt A and attempt B are close. But A puts the numbers too high, so that they are between the last line of the previous paragraph and the first line of the current paragraph, while B puts the numbers too low, so that they are between the first and second lines of the current paragraph. Any suggestions would be appreciated. **EDIT: My Response to the Responses** The suggestions from both Mike Renfro and Gonzalo Medina were helpful (and I flagged them as such). In my actual document, I change the style of the chapter titles, and this for some reason causes the paragraph numbers to be shifted on the first page of each chapter. (If I do not apply the custom chapter style, this issue goes away.) I ultimately chose Mike's answer because it doesn't have this issue. Thanks to both of you (and lockstep). Also, I didn't know about the `\stepcounter` command; that's more elegant.


title: Beamer: have text start from a fixed location on each slide

text: I have a custom pdf background to my slides and I don't want text to obscure a certain part of the background. Is there anyway I can force beamer to have text start from a certain place on the slides, rather than trying to fill the whole thing with text?


title: How to create another styling format like \emph

text: I read how to change `\emph` and changed it to `\DeclareTextFontCommand{\emph}{\bfseries}`. Now I want to _create_ another command like `\secondstyleformat` which I can configure aswell. Such a format could be bold and italic. After writing the document I could change it easily to for example italic and blue. _How can I do that?_


title: How to keep footnotes to the bottom of the page with \sloppybottom in memoir?

text: I am using the the `memoir` class to typeset a book, where the text has many footnotes. To avoid widows and orphans I use the option `\sloppybottom`. That has the result of under full pages. `memoir` normally sets the empty space of these under full lines at the very bottom of the page. But I would like this space to be between the text block and the footnotes. I did not found any solution for that in the documentation for the memoir class. So I found the package `fnpos`. This packages seems to do exactly what I need, but I was wandering if there is a `memoir` way to do this. Or if it is recommended to use `memoir` with this package. This is a minimal working example:               \documentclass[a4paper,10pt,twoside]{memoir}          \usepackage{blindtext}     % This package sets the footnotes to the bottom, but isn't there a      % method to do this with memoir?     \usepackage{fnpos}          \setstocksize{23.5cm}{15.5cm}      \settrimmedsize{23.5cm}{15.5cm}{*}     \setulmargins{2.25cm}{*}{*}     \setlrmarginsandblock{2.25cm}{*}{*}     \setulmarginsandblock{2.25cm}{2.25cm}{*}          \setheadfoot{\onelineskip}{2\onelineskip}          \setheaderspaces{*}{1.2\onelineskip}{*}     \checkandfixthelayout          \clubpenalty=5000     \widowpenalty=5000     \displaywidowpenalty=5000          \sloppybottom          \renewcommand{\footnoterule}{}     \renewcommand{\footnotesize}{\small}     \footmarkstyle{\textsuperscript{#1}\hfill}     \setlength{\footmarkwidth}{1.5em}     \setlength{\footmarksep}{0em}     \setlength{\skip\footins}{1.6\onelineskip}          \begin{document}     \midsloppy     \frontmatter      \mainmatter     \chapter[]{This is the title of the Test}          \blindtext     Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobortis facilisis     sem. Nullam nec mi et neque pharetra sollicitudin. Praesent imperdiet mi nec     ante. Donec ullamcorper, felis non sodales commodo, lectus velit ultrices augue,     a dignissim nibh lectus placerat pede. Vivamus nunc nunc, molestie ut, ultricies     vel, semper in, velit. U     Lorem lis non sodales commodo, lectus velit ultrices augue,     a dignissim nibh lectus placerat pede. Vivamus nunc nunc, molestie ut, ultricies     vel, semper in, velit. U\footnote{\blindtext}               \section{A section nothing else}     Lorem ipsum dolor sit amet,\footnote{\blindtext} consectetuer adipiscing elit. Etiam lobortis facilisis     sem. Nullam nec mi et neque pharetra sollicitudin. Praesent imperdiet mi nec     ante. Donec ullamcorper, felis non sodales commodo, lectus velit ultrices augue,     a dignissim nibh lectus placerat pede. Vivamus nunc nunc, molestie ut, ultricies     vel, semper in, velit. U \blindtext               \end{document}      As mentioned in the comments, there is the option `\feetbelowfloat` in the `memoir` class. But it does not work. Does anybody know why? It seems that this was a bug that was reported 2010. I prefer the package `\usepackage{fnpos}` because with `\usepackage[bottom]{footmisc}` I can't use the `memoir` way to set other footnote options.


title: More on dealing with long description environment items in beamer

text: > This is a follow-up question to Dealing with long description environment > items Gonzalo Medina was very helpfully resolving an issue I had with his solution to Dealing with long description environment items. However, I still have a few issues with it, and want to avoid a lengthy discussion in comments. Hence this question. I believe any solution should be able to address all my issues simultaneously so I have not asked them separately.   * I don't quite understand how Gonzalo's solution works. In order to solve the `Overfull \hbox` issues I reported, he changed the length `\beamer@descdefault`. Now, this appears to solve that problem, but I don't understand why, and it also changes the left-alignment of the item labels.   * If possible, I'd personally favour the labels to always be aligned with the left margin.   * However, more importantly: When the first entity inside a `Ldescription` `\item` body is another list environment, things go a bit wrong, as illustrated by the following example. The "bullet" in the first item in the sub-list is positioned on the **wrong line** (and causes an(other) `Overfull \hbox`). Any suggestions on how to ensure that nested lists work okay would be gratefully received. However, I'd rather not have to define my own `\item` command if possible. MWE:               \documentclass{beamer}     \usepackage{lipsum}          \makeatletter     \def\Ldescription{%       \@ifnextchar[{\beamer@testforospec}{\beamer@descdefault\beamer@descriptionwidth\@@Ldescription}%     }          \def\beamer@testforospec[{\@ifnextchar<{\beamer@scandefaultospec[}{\@Ldescription[}}%          \def\beamer@scandefaultospec[#1]{\def\beamer@defaultospec{#1}\Ldescription}          \def\@Ldescription[#1]{%     \setbox\beamer@tempbox=\hbox{\def\insertdescriptionitem{#1}       \usebeamertemplate**{description item}}%     \beamer@descdefault\wd\beamer@tempbox\@@description%     }%          \def\@@Ldescription{%       \beamer@descdefault35pt%       \list       {}       {\labelwidth\beamer@descdefault\leftmargin2.8em\let\makelabel\beamer@Ldescriptionitem}%       \beamer@cramped%       \raggedright       \beamer@firstlineitemizeunskip%     }           \def\endLdescription{\ifhmode\unskip\fi\endlist}     \long\def\beamer@Ldescriptionitem#1{%       \def\insertdescriptionitem{#1}%       \hspace\labelsep{\parbox[b]{\dimexpr\textwidth-\labelsep\relax}{%             \usebeamertemplate**{description item}%         }}}     \makeatother               \def\myLdescription{Ldescription}     %\def\myLdescription{description}%uncomment to compare with beamer's normal description environment                    \overfullrule=1mm          \begin{document}          \begin{frame}     \noindent I live a very, very wild lifestyle.     \begin{\myLdescription}     \item[very very very very long item]     \begin{itemize}         \item description 1         \item[test] 1,2,3     \end{itemize}     Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut     purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis.\par     Curabitur dictum gravida mauris. Nam arcu libero,     nonummy eget, consectetuer id, vulputate a, magna. Donec     vehicula augue eu neque.     \begin{itemize}         \item description A         \item[test] x,y,z     \end{itemize}     \item[short item] description 2     \item[another very very very very long item] description 3     \item[i] description 4     \end{\myLdescription}     \end{frame}          \end{document}


title: Page breaks within enumerated list

text: I'm writing a document with lots of numbered items, and I would like each of those items to be contained on a single page (rather than split across two pages). Is there a way to do this? samepage doesn't seem to work. For example, if the following two items were too big to fit on the same page, I would like item 2 to move to the next page:               \begin{enumerate}          \item Blah blah blah ...     ...          \item More babbling ...     ...          \end{enumerate}


title: LaTeX images formatting

text: I'm writing a report and inserting a few raster images in (in PNG format) using:               \usepackage[pdftex]{graphicx}          \includegraphics[width=4in]{poker.png}      My problem is that when saving as a PDF the images are look really awful, am I missing something?


title: Difficulty with datatool

text: I want to use the command `\DTLstoreinitials` from package `\usepackage{datatool}` in the following way :               \newcommand{\extractInitials}[1]{%     \DTLstoreinitials{#1}{\userInitials}%     \DTLsubstituteall{\userInitials}{.}{}%remove points between the initials     \DTLsubstituteall{\userInitials}{ }{}%remove spaces     \userInitials%     }      If I call the command directly, it works :               \extractInitials{My Name}      gives `MN`. But if I use an auxiliary command: `\newcommand{\nom}{My Name}` and try to call               \extractInitials{\nom}      then the compilation fails with error               ! Paragraph ended before \@dtl@initials was complete.      How can I fix this? * * * Here is a minimal example 1 :               \documentclass[12pt]{article}     \usepackage{trackchanges}     \usepackage{datatool}          \newcommand{\extractInitials}[1]{%     %\expandafter\DTLstoreinitials\expandafter{#1}{\userInitials}%     \DTLstoreinitials{#1}{\userInitials}%     \DTLsubstituteall{\userInitials}{.}{}%remove points      \DTLsubstituteall{\userInitials}{ }{}%remove spaces     }     \begin{document}     \extractInitials{AAA BBB}\addeditor{\userInitials}     \extractInitials{CCC DDD}\addeditor{\userInitials}     ----------- \\% to see the result of the addeditor commands     \makeatletter     \TC@editorOne\\     \TC@editorTwo\\     \TC@editorThree\\     \makeatother     -----------     \end{document}      The output is CD n/n n/n To compare : example 2               \addeditor{AB}     \addeditor{CD}     ----------- \\% to see the result of the addeditor commands     \makeatletter     \TC@editorOne\\     \TC@editorTwo\\     \TC@editorThree\\     \makeatother     -----------      The output is AB CD n/n


title: table and page break inside list

text: For a cooperative latex document with a lot of authors, it was decided to use tables for certain structures. Therefore, I have to cope with the problem of automatic page breaks of tables that only consist of 1 column and several rows. The column often contain different lists. The attached example shows the problem: The table does not break within a list. Is there a way to work around this issue?               \documentclass{book}     \usepackage{longtable}     \usepackage{blindtext}     \usepackage{paralist}          \begin{document}     \begin{longtable}{|p{\textwidth}|}     \hline     \blindtext[1]\\     \blindtext[2]\\\hline     \begin{compactenum}     \item test     \item test     \item test     \item test     \item test     \item test     \item test     \item test     \item test     \item test     \item test     \item test     \item test     \end{compactenum}\\     \blindtext[2]     \hline     \end{longtable}     \end{document}


title: What is the best way to draw two lines in LaTeX?

text: Bill Bryson's book, _The lost continent: travels in small-town America_   has an unusual first paragraph opening style. It has the equivalent of a long equal sign, followed by the first three words in small caps. ![enter image description here](http://i.stack.imgur.com/6i255.png) A typical opening chapter is shown below: ![enter image description here](http://i.stack.imgur.com/GdSqx.png) If you observe the two lines are exactly drawn at an `ex` height. What is a good way to define a macro for this in LateX? As I was in mathmode tonight, I tried the code below, which of course is not working properly.               \def\lettrinerule{$=\!=\!=\!=\!=\!=\!=\!=$ }     \lettrinerule{\scshape i drove on}, without      I am also interested to hear of any other books using unusual first paragraph openings, other than drop caps.


title: Box around caption in figure

text: I am wondering if it is possible, in a figure, to put a box around just the caption and not the whole figure.               \documentclass[12pt,letter]{article}         \usepackage[demo]{graphicx}               \begin{document}          \begin{figure}     \includegraphics[width=6in]{foo.ps}          \caption{I sure hope I can be boxed separate from the picture...}     %some command that can put a box around the caption     \end{figure}          \end{document}      **EDIT** I added the `[width=6in]` on the `\includegraphics` command. It is a necessary part of the figures I'm including.


title: Disappearing Footnote

text: **Goals:** I would like to have the title, author, date, and the table of content on the _same_ page. I also want the capability of being able to have a footnote to the author. **What I have done so far:** I came up with the following hack. It works except for the footnote. (This is my first ever hack and therefore, it is probably pretty amateurish, may be something I should not be doing in the first place.) I am open to any other method as long as I can achieve the stated goals with `hyperref` working. (It would be also nice if I can have control over the fonts used.)               \documentclass[12pt]{report}     \usepackage{lipsum}     \usepackage[T1]{fontenc}     \usepackage[ocgcolorlinks, hypertexnames]{hyperref}               \makeatletter     \renewcommand{\tableofcontents}[1]{%     \begin{center}%         \renewcommand\thefootnote{\@fnsymbol\c@footnote}%         \let \footnote \thanks         {\huge\bfseries \@title \par}%         \vskip 2em%         {\large          \lineskip .75em%           \begin{tabular}[t]{c}%             {\bfseries \@author}           \end{tabular}\par}%           \vskip 1em%         {\large \@date \par}%            \section*{\center{#1}}       \end{center}\par         \@starttoc{toc}%           }     \makeatother          \renewcommand{\thechapter}{}     \renewcommand{\chaptername}{}          \title{This is a test}     \author{John Doe\footnote{where is the foot note?}}          \begin{document}     \tableofcontents{Table of Contents}     \chapter{Preface}      \lipsum[1]     \chapter{First Thing}       \lipsum[2]       \chapter{Second Thing}       \lipsum[3]        \chapter{Third Thing}       \lipsum[4]     \end{document}      The first page of the output is given below. ![enter image description here](http://i.stack.imgur.com/6rXJt.png)


title: Incompatibility between footmisc-option multiple and hyperref

text: There is a question about nested footnotes with commas, which has some answers. Nested footnotes can be properly numbered, and they can be properly hyperlinked. Remaining problem: Hyperlinked footnotes are not separated by commas, although the footmisc package with option `multiple` is used. Minimal not-working example:               \documentclass{article}     \usepackage[multiple]{footmisc}     \usepackage{hyperref}     \begin{document}     Text\footnote{Here is a footnote.}\footnote{Here is another footnote.}.     \end{document}      While `\textsuperscript{,\,}` between the footnote(mark)s would be possible, I am looking for some automatic solution. (The better, if it would also work for nested footnotes.)


title: Unbalanced braces with newenvironment / NewEnviron + Command

text: This is a follow-up question of my Unbalanced braces with newenvironment / NewEnviron post. The gist is that by using               \NewEnviron{myEnv}{%       \expandafter\gdef\expandafter\myCommand\expandafter{\BODY}%       \aftergroup\bgroup}      I can expand               \begin{myEnv}     0.3     \end{myEnv} text2}      to               \gdef\myCommand     text1     { text2}      This is working perfectly, thanks again egreg. Note that the braces were really unbalaced before expansion. Now I have come to a similar, yet slightly different situation. I want to expand               \begin{myEnv}     0.3     \end{myEnv} text2}      to               \gdef\myCommand     text1     \eatWhitespace{ text2}      with the 1-parametric command `eatWhitespace`. With which definition of `myEnv` can I achieve that? **Background info:** Why would anyone ever do this? Well, I am using LyX, but I want to use the caption/subcaption package instead of the subfig package (see also subcaption vs. subfig). I almost succeeded - the only problem is that the figure environment reacts very sensitive to all linebreaks, and LyX inserts plenty of them. This behavior of LyX is hardcoded, and I do not want to recompile it from scratch. So I worked around that problem entirely witout ERT ... and by using dummy commands, which eat the whitespaces. This is an example of the generated LyX output (yes, it's ugly):               \newcommand{\dummy}{}     \newcommand{\eatWhitespace}[1]{}     \newcommand{\subfigureWidth}{}     \newcommand{\subfigureImage}{}     \newcommand{\subfigureBlock}[3]{%         \begin{subfigure}[c]{#1\textwidth}\centering#2\caption{#3}\end{subfigure}}      and               \begin{figure}     \begin{centering}     \begin{myEnv}     0.3     \end{myEnv}          \dummy}\renewcommand{\subfigureImage}{\mbox{\!\!\!\!{\input{../test/images/im-14.tikz}}               \dummy}}\subfigureBlock{\subfigureWidth}{\subfigureImage}{1st image}\begin{myEnv}     0.3     \end{myEnv}          \dummy}\renewcommand{\subfigureImage}{\mbox{\!\!\!\!{\input{../test/images/im-15.tikz}}               \dummy}}\subfigureBlock{\subfigureWidth}{\subfigureImage}{2nd image}\begin{myEnv}     0.3     \end{myEnv}          \dummy}\renewcommand{\subfigureImage}{\mbox{\!\!\!\!{\input{../test/images/im-16.tikz}}               \dummy}}\subfigureBlock{\subfigureWidth}{\subfigureImage}{3rd image}     \par\end{centering}     \end{figure}      As you can see, when you insert _after each_ `\end{myEnv}` an `\eatWhitespace{` it makes sense (and is still ugly). The other whitespaces are taken care of by using `mbox`, which works. However, this is not possible for the length of the subfigure. Thus this crazy construction with `myEnv` and unbalanced braces is used.


title: Two columns: one column for questions; the other for answers

text: I am using the `exam` class.               \documentclass{12pt,a3paper,landscape}{exam}      I would like to split my paper into two columns. One column should be for the question and across from that question would give the question # and space to solve it. I have read the question How do I get a blank column?, but not sure how to add the questions in. Do I just type all my questions after the `&`? Is this possible?


title: Texmaker: Is it possible to save all files on compile?

text: When I press `F1` in Texmaker, is it possible to automatically save all files which belong to the "master" file? If it is relevant: I am using Texmaker 4.1.


title: Fonts for Mathematics and Text

text: Are there some examples of long, real-world documents showing the variety of text and mathematical fonts now available? With unicode-math there are now many more fonts for text and mathematics, both commercial and public-domain, than before. It is easy enough to find short examples, but what I would like to see would be different versions of a long document (e.g., an article or chapter from a book), with each version set in a different font (e.g., Lucida, Minion-Math, Latin Modern, Tex-Gyre, Mathtime, etc). This type of question seems to come up frequently in this forum and others and I will answer it myself. However, I would also like to see other examples too.


title: References inside animateinline

text: I am trying to hide references in an animateinline environment to show them on click. MWE:               \documentclass{beamer}     \usepackage[utf8]{inputenc}     \usepackage[ngerman]{babel}     \usepackage{animate}     \usepackage{hyperref}          \begin{document}           \begin{frame}       \begin{animateinline}[step]{}       \parbox[t]{0.8\textwidth}{show reference}       \newframe       \parbox[t]{0.8\textwidth}{\ref{sec:test}}       \end{animateinline}          \end{frame}          \section{Test}\label{sec:test}     \begin{frame}      Test     \end{frame}          \end{document}      Error: > pdfTeX error (ext4): link annotations cannot be inside an XForm \end{frame} Does anyone know a solution for this?


title: DIV and BCOR setting in KOMA (best practices)

text: I have been playing around and I now realize it is possible to set the type area using a KOMA class by a couple of ways, and I'll like to know which is the correct one.               \documentclass[%     a4paper,     12pt,     %BCOR=3mm, %<---Should I load it here or in 'marito.sty'?     %DIV=12, %<---Should I load it here or in 'marito.sty'?     twoside,%default     ]{scrbook}          \usepackage{marito}          \begin{document}     Recto Page     \newpage     Verso Page     \end{document}      **First option:** I know that KOMA default is `a4paper`, and if I set the font to `12pt` it automatically defaults to `DIV=12`. **Second option:** I know I can set both `BCOR` and `DIV` directly as an optional argument to the KOMA-class `scrbook`. **Third option:** Since I'm using my own `.sty` file, I can set `BCOR` and `DIV` with `\typearea[3mm]{12}` (see marito.sty) **Fourth option:** Also, because of the use of my `marito.sty` file, I can set `BCOR` and `DIV` with `\KOMAoptions{DIV=12,BCOR=12mm}` This is what is contained in `marito.sty`:               \RequirePackage[T1]{fontenc}     \RequirePackage[utf8]{inputenc}     %\typearea[3mm]{12} % <---Should I use this one     %\KOMAoptions{DIV=12,BCOR=3mm} %<--- or this one?     \RequirePackage{lmodern}          \RequirePackage[pass,showframe]{geometry} % Just to show the frame around the textbox      As mentioned in the comments, I have tested all possibilities and they all seem to work. The question I have is what's the right way to set the `BCOR` and `DIV` when you are using a custom `.sty` file?


title: Limit number of floats on a float page

text: I'm creating a document with 10 figures, which I specify to sit on float pages using `\begin{figure}[p]` . All the figures are the same size and each float page can fit 6 of them. However, I would like two float pages, each with 5 figures on, not a page of 6 then 4. E.g. the following code produces a single float page with 4 floats, how could I generate two pages with two each?               \documentclass[twocolumn]{article}     \usepackage[demo]{graphicx}          \begin{document}          \begin{figure}[p] \includegraphics[width=0.7\columnwidth]{} \end{figure}     \begin{figure}[p] \includegraphics[width=0.7\columnwidth]{} \end{figure}     \begin{figure}[p] \includegraphics[width=0.7\columnwidth]{} \end{figure}     \begin{figure}[p] \includegraphics[width=0.7\columnwidth]{} \end{figure}          \end{document}


title: Line break after \item, vertical spacing

text: First, my example:               \documentclass[]{article}           \usepackage[english]{babel}     \usepackage{blindtext}     \usepackage{enumitem}          \newcommand\codeitem[1]{         \item[{             \framebox[\textwidth][l]{             \tt             {#1}             }          }]         }          \begin{document}         \blindtext         \begin{description}             \codeitem{+ here() : void}                 Followed by some paragraphs of text. Do you see the text is too near to the box?             \codeitem{\# there() : void}                 I somehow have to add vertical space here.         \end{description}         \blindtext     \end{document}      This renders as follows: ![too little space after the box](http://i.stack.imgur.com/ISuLY.jpg) I think the idea is clear. Alas, there's too little vertical space after the description label. How can I set the vertical space between the item label and its text? I've tried setting `\vspace{11mm}` but this has the same effect as using `topsep=11mm` or `partopsep=11mm` on the description. It only increases the distance between list items or the list and the paragraph before.


title: How to use Liberation fonts in ConTeXt?

text: I have the following snipped of code               \usemodule  [simplefonts][size=12pt]     \setmainfont[DejaVu Sans]          \starttext          Test text          Тестовый текст          \stoptext      And this works great. ConTeXt compiles it and the font is correct. But if I change font to               \usemodule  [simplefonts][size=12pt]     \setmainfont[Liberation Sans]          \starttext          Test text          Тестовый текст          \stoptext      then result will be of wrong font and russian text is not rendered. The font names are taken from output of `fc-list` program (Linux). ConTeXt installed from texlive, version is               mtx-context     | ConTeXt Process Management 0.60     mtx-context     |     mtx-context     | main context file: /usr/share/texmf-dist/tex/context/base/context.mkiv     mtx-context     | current version: 2013.05.28 00:36


title: How to square a previously squared terms

text: I am trying to get my term to look like 2^(2^n) and that is how I put it in the code, but it is not working. Any help would be appreciated!


title: Special spaces in LaTeX

text: I need special hard spaces for example i need 0.33em, 0.5em, 1em, hair etc. spaces. Also i need a normal spaces (word spacing) in 0.25em to 0.75em. How to do it? Sorry for bad English.


title: Drawing arc with arrow with pgf to create a new shape

text: I borrowed some code from TikZ circuits: symbol for gas discharge tube? to define my own symbol. The inner arc should have an arrow at one end, what I do not manage to get. What's wrong with my code? Here's my attempt:               \documentclass{article}          \usepackage{tikz}          \begin{document}          \makeatletter     \pgfdeclareshape{circulator}     {         \inheritsavedanchors[from=circle]         \inheritanchor[from=circle]{center}         \inheritanchor[from=circle]{north}         \inheritanchor[from=circle]{south}         \inheritanchor[from=circle]{east}         \inheritanchor[from=circle]{west}         \inheritanchor[from=circle]{north east}         \inheritanchor[from=circle]{north west}         \inheritanchor[from=circle]{south east}         \inheritanchor[from=circle]{south west}         \inheritanchor[from=circle]{input}         \inheritanchor[from=circle]{output}         \inheritanchorborder[from=circle]              \backgroundpath{             \pgf@process{\radius}             \pgfutil@tempdima=\radius                  \pgfpathcircle{\centerpoint}{\pgfutil@tempdima}                  \pgfsetarrowsstart{latex}             \pgfpathmoveto{\pgfpoint{.7\pgfutil@tempdima}{0pt}}             \pgfpatharc{0}{120}{.7\pgfutil@tempdima}             \pgfusepath{stroke}              }     }     \makeatother          \begin{tikzpicture}       \node [circulator] at (0,0) {};     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/17XmT.png)


title: Error presenting an image

text: I want the third page of my document to include an image (JPEG) but I can't figure out what's wrong with my code. Here's the MWE:               \documentclass{beamer}          \usetheme{Warsaw}     \title[Artificial Neural Network]{Introduction  to ANN\\Artificial Neural Network}     \author{Gigili}     \date{January 6, 2013}     \begin{document}          \begin{frame}     \titlepage{}          \end{frame}                               \begin{frame}{continue}          \includegraphics{<Sample>}          \end{frame}          \end{document}      Here's the folder where I saved the image and the sample code: ![enter image description here](http://i.stack.imgur.com/7qoJE.png) The error I am getting is: > LaTeX Error: File '< Sample >' not found.


title: What if I use a \def name starting with "if"

text: Following this answer to _Is it possible to use some sort of internationalization in LaTeX?_ I'm setting up my own dictionaries. When compiling the files I get this error:               ! Use of \if doesn't match its definition.      and I guess is why I named a _term_ as `if_foreign_buyer`               \def \if_foreign_buyer{You can only...}      removing starting `if` solves the problem _Any solution, other than not starting terms with_ `if`? Moreover I would like to start all terms with a underscore `_` so I can grab them with a `sed` command and create dictionaries from terms in the master file. _Also this seems not allowed. Really?_


title: Listings WriteFile adds additional line if content contains two spaces between words

text: I use the listings latex package to write/read the environment body to a file. But if in the environment are two spaces between some words, there is an additional linebreak added at the beginning (I made it red to see it better in this example). How can I prevent this?               \documentclass{article}     \usepackage{listings}     \usepackage{color}          \makeatletter     \lst@RequireAspects{writefile}     \lstnewenvironment{testenv}{%       \lstset{aboveskip=0pt,belowskip=0pt,backgroundcolor=\color{red}}%       \lst@BeginWriteFile{\jobname.tst}%     }{%       \lst@EndWriteFile% closes output file       % do something       \input{\jobname.tst}       % do something     }%     \makeatother          \begin{document}     Something wrong begins.     \begin{testenv}     This is a text with two spaces  between  some words.     \end{testenv}     And it ends.          \begin{testenv}     This is a text with only one space between all words.     \end{testenv}          \end{document}      The output: ![You cant see it](http://i.stack.imgur.com/9KZrl.png)


title: Problems with eqalign

text: The following will not compile with LaTeX. Can you give advice, please?               \documentclass[12pt]{article}     \usepackage{amsmath,amsthm,amssymb}     \begin{document}          $$\eqalign{a_1&=1+2+3\cr     a_1+a_2 &=1+2+3+4\cr     a_1+a_2+a_3 &=1+2+3+4+5\cr}$$     \end{document}


title: \usepackage{SIunits} error \square already defined

text: Has anyone else encountered the error:               Package SIunits error: the command \square was already defined at line     \begin{document}      in compiling a `beamer` presentation? Is this way of using packages incorrect? I have tried commenting out the packages one-by-one to see which other packages that I have used contain `\square` but I cannot find the problem. Prior to `\usepackage{SIunits}` My document contains MWC and I still have the problem. I am using Latexian 1.2.4, Mac OS X 10.8.5.               \documentclass[notes]{beamer}     \title{Title}     \usetheme{default}     \usepackage{SIunits}     \begin{document}          \begin{frame}       \titlepage     \end{frame}          \end{document}


title: Left margin minipage two figures

text: I have a `minipage` with two figures, the problem is, that I want to have them shifted to the left, so the left margin should be smaller, the code of my `minipage`:               \begin{figure}[H]     \begin{minipage}[b]{0.6\linewidth}     \centering       \centerline{\includegraphics[scale=0.4]{simplevaralv.png}}       \caption[VaR assuming normal distribution, Allianz]{VaR assuming normal distribution, Allianz}     \label{sva}     \end{minipage}     \hspace{0.5cm}     \begin{minipage}[b]{0.6\linewidth}     \centering      \centerline{ \includegraphics[scale=0.4]{simplevarbasf.png}}       \caption[VaR assuming normal distribution, Basf]{VaR assuming normal distribution, BASF}     \label{svb}     \end{minipage}     \end{figure}      The result looks like this: ![enter image description here](http://i.stack.imgur.com/h8YyX.png) And I want to have it shifted to the left, how can I do this?


title: Image placement when \cleardoublepage command is called

text: If I start a new chapter or a new section, preceding it with \cleardoublepage command, which may or may not produce a blank page so that the new chapter or section starts on an odd numbered page (RHS), how can I put an image (with a caption) on that blank page (the LHS), where the numbering is still related to the new section that is starting on the RHS. By numbering I mean if current chapter is Chapter 2 desired figure naming should be Fig 2.1, 2.2, 2.3.... etc. It would be quite easy to just insert the image, before the new chapter or section is issued, but then the numbering might be Fig 1.1, 1.2, 1.3 etc, since the new chapter hasn't been inserted yet. If there is no blank page (ie already on a RHS), then the image should go on the next page.


title: Change order in acronym

text: I am using `\usepackage[printonlyused,withpage]{acronym}` to use acronyms in my thesis But I want to get ![enter image description here](http://i.stack.imgur.com/7GPuN.png) instead of ![enter image description here](http://i.stack.imgur.com/PEGKH.png) I am using the following code:               \documentclass{article}     \usepackage[colorlinks]{hyperref}     \usepackage[printonlyused,withpage]{acronym}     \begin{document}          \section{Intro}     Analisis de Componentes Principales (\em{\ac{PCA}}). \ac {PCA}.          \section{Acronyms}     \begin{acronym}     \acro{PCA}{Principal Component Analysis}     \end{acronym}          \end{document}


title: Equation number alignment error

text: This equation number is in chapter 3, so when it comes like 3.45 in front of the equation, then no space with the equation and the equation number               \begin{eqnarray}         A_{1}r^{-(g_{0}(z)+g_{1}(z,\lambda))/B} \bigg(\frac{d g_{0}}{g z} +\frac{g g_{1}}{g z}\bigg) + (B_{2}+C_{c})r^{-(c_{0}(z)+c_{1}(z,\lambda)+f_{2}(z))/k}\bigg(\frac{d f_{0}}{d y} +\frac{d f_{1}}{d z}+\frac{d f_{x}}{d z}\bigg)-ccf=0 \nonumber  \\      (1+ggr^{f_{2}(b)/rr}) \bigg(\frac{d f_{gg}}{d z} +\frac{d f_{1}}{dhh}\bigg) +\frac{d f_{2}}{d z}-ff=0 \label{mmm6}          \end{eqnarray}


title: Is the tabu package obsolete?

text: When I stumbled upon `tabu` some time ago it looked quite interesting on a first glance and I intended to learn more about it when I have the time. But, in the comments section of this question posted on the new german question and answer site `texwelt.de` Herbert Voß wrote that the `tabu` package is obsolete in its current version (thereby citing the package author) and is not actively maintained anymore. What are the implications for the usability of the package? Should I refrain from investing time to learn `tabu` and consider some other packages for the creation of tables instead?


title: How do I change comma to a colon in in-text reference?

text: In my preamble I am using:               \bibliographystyle{authordate1}     \usepackage{natbib}      When I make a `\cite` reference the output is for example: > (Lovell, 1972, p.133) What would I need to change in order to have the comma after the year appear as a colon? Such as: > (Lovell, 1972: p.133)


title: Beamer: TOC only once before sections with subsections

text: My presentation consist of multiple sections. Some sections consist of subsection and some not. I want beamer to display the TOC before every subsection and before every section which consists of no other subsection. Currently, i write in the preamble:               \AtBeginSection[] {         \begin{frame}<beamer>         \frametitle{Inhalt} %         \tableofcontents[currentsection]           \end{frame}     }          \AtBeginSubsection[] {         \begin{frame}<beamer>         \frametitle{Inhalt} %         \tableofcontents[currentsubsection]           \end{frame}     }      As a result, if a section consist of subsecitons beamer displays the TOC twice before the first subsection in a section, one time for the section and one time for the subsection. That is ugly in my opinion. What can i do?


title: How to color the text-line-background in a table?

text: I'd like to color the background of a single line of text in a some cells of a table. I need to obtain a result like this: ![enter image description here](http://i.stack.imgur.com/zP4MI.png) I have tried with `\columncolor` and `\cellcolor` but they don't leave me a white border. Here is my sample code:               \begin{tabular}{|l|l|l|}         \hline         ID: \cellcolor{gray}{0.9} & blabla &  blabla \\ \hline         Title: & blabla & blabla \\ \hline         State: & blabla & blabla\\ \hline         Description: & blabla & blabla \\ \hline         Type: & blabla  & blabla \\ \hline         Priority: & blabla & blabla \\ \hline     \end{tabular}


title: How to remove indent from list in table?

text: I've table with list as mentioned below:               \begin{center}     \begin{tabular}{|p{2cm}|p{3cm}|p{3cm}|p{3cm}|p{3cm}|}     \hline      \textbf{Attribute} & \textbf{P1} & \textbf{P2} & \textbf{P3} & \textbf{P4} \\     \hline     Definition&\noindent{\begin{itemize} \item Critical break-fix. \item Production down with no workaround. \item Multiple users impacted. \item Unavailability of Systems. \end{itemize}}&\noindent{\begin{itemize} \item Urgent break-fix. \item Production issue with workaround. \item Multiple users impacted. \item Multiple records impacted. \item Unavailability of system interfaces. \end{itemize}}&\noindent{\begin{itemize} \item Small Maintenance Issues. \item Non critical Bug Fix with workaround. \item No immediate impact. \item Single user/record impacted.  \end{itemize}}&\noindent{\begin{itemize} \item Small Maintenance Issues. \item Not a break-fix. \item A nice to have feature. \item 1- 7 person days of effort. \end{itemize}}\\     \hline     Response Time &3 Business Hours&5 Business Hours&1 Business Day&4 Business Days\\     \hline     Resolution Time &1 Business Day&2 Business Days&5 Business Days&As per mutual agreement\\     \hline     \end{tabular}     \end{center}      It's giving output as ![table below](http://i.stack.imgur.com/8eIS9.png) How can I remove extra space before list items?


title: Showcase of beautiful title page done in TeX

text: The book is mostly meets by the Title Page. Default TeX `\maketitle` are simple and minimalistic. I'm looking for examples of Title Pages:   * complex - have different formatting;   * beautiful and awesome;   * available online;   * and, finally!, with TeX sources available. I think such examples would be a great inspiration and motivation stuff!


title: Setspace package not working

text: I've tried searching, and I couldn't find my answer, so I hope I'm not re- asking stupid stuff. That being said, I'm a total noob to LaTeX. As such, this question is probably ridiculous and stupid. I'm trying to double space my paper. I added the setspace package into my header, no problem. However, when I build the file, the bottom line in the Output window (there's probably a more technical term for it) says: `LaTeX-Result: 0 Error(s), 0 Warning(s), 0 Bad Box(es), 0 Page(s)` Instead of the 6 pages I have now. This seems like something deceptively easy, help is much appreciated.


title: Source Code Margin Comments

text: In the paper "Beautiful Code Compelling Evidence", by J.R. Heard -- Code is formated in a particular way which includes margin comments. I am looking for a way to do this as I think it is a very clear way to comment comment code in a literate programming style.


title: Accessing dvips features of xypic via pdflatex

text: I read from the `xypic` reference manual that extra graphics features are accessible using `dvips` to compile, even though it still works in most cases with `pdflatex`. On the PSTricks website are listed several methods to compile a document with `pstricks` code using `pdflatex`. Are there similar ways to compile a document with `xypic` code using `pdflatex` while still having access to `dvips` specials? Please list the various methods and compare them where applicable.


title: Alternatives to \sideset and \nolimits?

text: I'm trying to typeset ![$one \\sideset{}{_{three}}\\prod two$](http://i.stack.imgur.com/YXISc.png) as `$one \sideset{}{_{three}}\prod two$` in instiki (well, ok, it's the nLab [waves to Andrew Stacey]), but it doesn't work. Is there any other alternative to `\sideset` that I could use?


title: Auto-resize text in Node

text: I am trying to auto-resize some text that appears in a few nodes. Basically if the text is too large (overfull-hbox, etc) then set the font size smaller and continue. Does anyone know how to do this? Why automatic and not fixed manually? The idea is that this document will be populated automatically and have latex run on it and the resulting documents are displayed. There would be a substantial number of these so it is unfeasable to fix it by hand.


title: How to maintain consistency with TikZ and Pgfplots?

text: I would like to maintain some consistency between TikZ and PGFplots, and have run into numerous difficulties. Here is an example of two of them:   1. I would like to be able to use something similar to the TikZ `\coordinate` in PGF. So, ideally I would like to comment out the line in the 2nd graph and replace it with the un-commented line. i.e, be able to use a defined coordinate, rather than having to enter the specific coordinate.   2. I would like to have the two circles of the same size independent of how I am doing the graph. In the 2nd example, I multiplied the `\Radius` by 20 and still the dot is not even close to the same size. Perhaps there are better ways to do this, but I am newbie with these...               \documentclass{standalone}     \usepackage{tikz}     \usepackage{pgfplots}          \def\Radius{0.1}     \def\Label{$(1,1)$}          \begin{document}     \begin{tikzpicture}         \coordinate (Point) at (1,1);              \draw [gray] (0,0) grid (3,3);         \draw [blue,fill] (Point) circle (\Radius) node [right] {\Label};     \end{tikzpicture}               \begin{tikzpicture}         \coordinate (Point) at (1,1);              \begin{axis}[xmin=0,xmax=3, ymin=0,ymax=3]              \addplot  [blue,fill] coordinates{ (1,1) }                  circle (20*\Radius) node [right] {\Label};                  % would prefer to use this instead:             %\addplot  [blue,fill] coordinates{ (Point) }              %   circle (20*\Radius) node [right] {\Label};         \end{axis}     \end{tikzpicture}     \end{document}


title: Searching for a font with (a different!) special ampersand

text: does anyone know what's the font used for the "&" in the affiliation (c) in this paper? http://arxiv.org/pdf/1102.0284 and in particular how to do it in LaTeX? thanks in advance (I can't post images, as I am a new user and the system doesn't allow me)


title: beamer: headers are cut with CambridgeUS and beamerthemeshadow

text: I am creating a presentation with beamer and the theme CambridgeUS. My problem is that the section and subsection titles displayed in the header are slightly cut as soon as `\usepackage{beamerthemeshadow}` is used. It affects only characters which extend below the baseline, e.g. p, q and y. Here is a small example:               \documentclass[10pt]{beamer}     \usepackage{beamerthemeshadow}     \usetheme{CambridgeUS}          \begin{document}           \section{section with p and q}      \subsection{subsection with y}      \begin{frame}       \frametitle{first frame}      \end{frame}          \end{document}      * * * **Edit by John Wickerson.** I intended to add a picture to demonstrate the problem, but when I compiled the code, I couldn't see anything wrong. Does it look like this on your machine? ![enter image description here](http://i.stack.imgur.com/16gw6.png) @John Wickerson: On my machine it looks like this: ![enter image description here](http://i.stack.imgur.com/G5F25.jpg)


title: Create Title Page with Hepthesis produces error

text: I'm trying to create a title page with `hepthesis` but run into problems. Could you hint me in the direction where I skrewed up? MWE1:               \documentclass[oneside,a4paper,]{hepthesis}          \begin{document}     \author{QWER QWER}     \title{ABC acb}     \date{1.1.2000}          \begin{titlepage}             BlaBla     \end{titlepage}          \end{document}      procudes: `! LaTeX Error: There's no line here to end.` MWE2:               \documentclass[oneside,a4paper,]{hepthesis}          \begin{document}     \author{QWER QWER}     \title{ABC acb}     \date{1.1.2000}          \begin{titlepage}         \begin{minipage}{0.2\textwidth}             asdf         \end{minipage}     \end{titlepage}          \end{document}      produces the same with a lot of additional errors which migth go away once I takle the problem. Omitting the lines of `author/title/date` didn't help.


title: Package for game/playing cards (not only poker)

text: Is there a package to design playing cards (NOT ONLY POKER and similar card games, but board games like this and that) in `TeX` (and friends)? ![enter image description here](http://i.stack.imgur.com/41EW1.jpg) I'm well aware of this one and a half years old topic on drawing cards using TikZ. Almost everything can be drawn in TikZ but I look for functionality to support card design and printing. Some examples of funcionality I'd love to have:   * set card size and corner roundedness   * set paper size independentently   * automatic or semi-automatic layout (placement of cards on a page) based on margins   * twoside mode with automatic positioning of card backs   * ways to define "card templates" (for multiple types of cards in one project)   * optional dim bordering to help the workphases after printing I know it can be done using LaTeX, but I hope there is a package to do this for me. Update: I've found poker.sty but sadly it seems to be limited to "Poker cards" (I don't know what's the proper name for that). For cards like this or this it's almost useless.


title: LyX texcount custom converter

text: Is it possible to define a new Converter in LyX so I can use `texcount -sub` and produce a `.txt` file with the statistics of the file? I was thinking in going to > Tools -> Preferences -> Converters and redefine the `Lyx -> Plain Text` option, but it does not seem to work


title: Using specific font for the equation in XeLaTex

text: I want to use a specific font for a specific formula in XeLaTeX. Usually, the math font can be set up using `mathspec` package.               \usepackage{mathspec}     \setmathsfont(Digits,Latin,Greek)[Numbers={Lining,Proportional}]{Humor Sans}      I can also use a specific font for a part of the text using `\newfontfamily` command:               \newfontfamily\humor{Humor Sans}     {\humor text }      How can I use a specific font for a single equation:               %Want Humor Sans only here!!      \begin{equation}        C = A + B     \end{equation}


title: Special style for commentary citations

text: I need to have a special citation style for commentaries in my thesis. I hope he following example illustrates the problem sufficiently:               \documentclass[fontsize=10pt, fleqn, pdftex, version=last, x11names,pointlessnmbers]{scrartcl}     \usepackage[]{ngerman, geometry, graphicx, keyval, ifpdf, ifvtex, placeins, nicefrac, abstract}     \geometry{a4paper, left=30mm, right=20mm, top=20mm, bottom=25mm}     \usepackage[T1]{fontenc}     \usepackage{tocloft}     \usepackage[applemac]{inputenc}     \usepackage[     %howcited=all,      %howcited=normal,     howcited=multiple,     authorformat=smallcaps,       %bibformat=tabular,     authorformat=smallcaps,     ]{jurabib}          \renewcommand{\bibtfont}{\normalfont}     \renewcommand{\bibbtfont}{\normalfont}     \renewcommand{\bibjtfont}{\normalfont}     \renewcommand{\bibapifont}{\normalfont}     \AddTo\captionsngerman{%       \renewcommand{\etalname}{\normalfont{\,et\,al.}}%       \renewcommand{\editorsname}{\normalfont{(Hrsg.)}}%     }     \renewcommand{\bibaesep}{, }     \renewcommand{\bibbtasep}{/} % bta = between two authors sep     \renewcommand{\bibbfsasep}{/}      \renewcommand{\bibbstasep}{/}     \renewcommand{\bibbtesep}{/} % bte = between two editors sep     \renewcommand{\bibbfsesep}{/} % bfse = between first and second editor sep     \renewcommand{\bibbstesep}{/}     \renewcommand{\bibbtsep}{in: }     \renewcommand{\bibjtsep}{in: }     \renewcommand{\bibleftcolumn}{6cm}      \renewcommand{\bibrightcolumn}{\textwidth-\bibleftcolumn-0.6cm}     \renewcommand*{\bibrightcolumnadjust}{}     \AddTo\bibsgerman{\renewcommand{\editionname}{Aufl.}}     \renewcommand{\bibansep}{: }     \renewcommand{\bibatsep}{,}     \renewcommand{\bibbdsep}{}     \renewcommand{\bibatsep}{,}      \renewcommand{\biburlprefix}{\jblangle{}}     \renewcommand{\biburlsuffix}{\jbrangle{}}     \AddTo\bibsgerman{\renewcommand*{\urldatecomment}{zuletzt abgerufen am }}     \AddTo\bibsgerman{\renewcommand*{\howcitedprefix}{ (zit.: }}      \AddTo\bibsgerman{\renewcommand*{\howcitedsuffix}{)}}      \DeclareRobustCommand{\jbaensep}{,}     \renewcommand*{\jbhowsepbeforetitle}{,~}     \makeatletter     \jb@allow@howcited@art@periodtrue     \makeatother     \renewcommand{\biblnfont}{\scshape}     \renewcommand{\bibfnfont}{\scshape}     \renewcommand{\bibefnfont}{\scshape} %format editor first name     \renewcommand{\bibelnfont}{\scshape} %format editor last name          \begin{document}     \tableofcontents     \addcontentsline{toc}{section}{Literaturverzeichnis}     \renewcommand{\refname}{Literaturverzeichnis}     \bibliography{Literaturverzeichnis}     \bibliographystyle{jurabib}     \section{Section to illustrate the problem}     Here ist how the commentary should be quoted in the bibliography:\\[0.5cm]     \textsc{Mustermann, Max} (Hrsg.), Zürcher Kommentar, 5. Aufl., Zürich 2013 (zit. ZK - \textsc{Bearbeiter}, Art. N Rn. N)\\[1cm]     And thats how the citation has to look like:\\[0.5cm]     ZK - \textsc{Bearbeiter}, Art. 500 Rn. 3.\\[1cm]     And this is how it looks like right now\footnote{vgl. \cite[Bearbeiter][Art. 500. Rn. 3.]{ZK}}.          \end{document}                         @commented{ZK,             Date-Added = {2013-10-12 15:40:02 +0200},         Date-Modified = {2013-10-12 15:42:11 +0200},         Editor = {Max Mustermann},         Howcited = {ZK},         Publisher = {Z{\"u}rich},         Shorttitle = {ZK},         Title = {Z{\"u}rcher Kommentar},         Year = {2013}}


title: Commands for getting and setting additional elements in a class and document

text: As I'm writing my first class, I'm wondering the best way to create additional elements that can be used both in the class file and the LaTeX document. For instance, I want the user to set the `reportnum` in the LaTeX document using something like               \reportnum{QR-F100-EMCCP}      and then I want to extend the `\maketitle` command to include the report number on the title page and to use the report number in the headings of each page. According to Peter Flynn in "Rolling your own Document Class: Using LaTeX to keep away from the Dark Side", I can use the following commands in the class file to create this additional element and extend the `\maketitle` command:               \def\@reportnum{\relax}     \newcommand{\reportnum}[1]{\gdef\@reportnum{#1}}     \renewcommand{\maketitle}{       \begin{titlepage}         \huge\@author\par         \Large\@title\par         \if\@reportnum\relax\else\large\@reportnum\par\fi         \normalsize\@date\par       \end{titlepage}     }      However, I also want the user to be able to get the `reportnum` in the LaTeX document using a command such as `\thereportnum`. How should I modify the command, so that the user can both set and get the `reportnum` in the LaTeX document?


title: Labels above the nodes

text: Consider the simple graph below,               \begin{tikzpicture}[node distance=2.5cm,main node/.style={circle,fill=white!20,draw}, scale=0.6, every node/.style={scale=0.6}]             \node[main node] [label={[label distance=1cm]30:label}] (A) {$v_1$};     \node[main node] (B) [right of=A] {$v_2$};      \node[main node] (C) [right of=B] {$v_3$};     \node[main node] (D) [right of=C] {$v_4$};          \draw      (A) -- (C)     (B) -- (C)     (B) -- (D);          \end{tikzpicture}      Is it possible to remove lines going through the nodes (making the inside of the nodes empty) and placing the labels above the nodes?


title: How to change the apacite bibliography style to list all authors

text: I am new to LaTeX and I need to format my bibliography according to the newest version of APA manual (6th version). As I use `bibtex` and the `\bibliographystyle{apacite}`, not all the references are displayed correctly. Now, I wish to force LaTeX to always list all of the authors in the bibliography, but to keep the rest of the `apacite` style. Can I do that? Or could I, for example, force LaTeX to list all authors only in a few special cases (because that problem does only occur three or four times in total)? An Example (sorry for not putting it earlier): An entry in the .bib looks as follows               @article{55,       title={An SCN9A channelopathy causes congenital inability to experience pain},       author={Cox, James J and Reimann, Frank and Nicholas, Adeline K and Thornton, Gemma and Roberts, Emma and Springell, Kelly and Karbani, Gulshan and Jafri, Hussain and Mannan, Jovaria and Raashid, Yasmin and L. Al-Gazali and H. Hamamy and E. M. Valente and S. Gorman and R. Williams and D. P. McHale and J. N. Wood and F. M. Gribble and C. G. Woods},       journal={Nature},       volume={444},       number={7121},       pages={894--898},       year={2006},       publisher={Nature Publishing Group}     }      And what appears in the pdf is the following:               Cox, J. J., Reimann, F., Nicholas, A. K., Thornton, G., Roberts, E., Springell, K., ...     Woods, C. G. (2006). An scn9a channelopathy causes congenital inability to expe-     rience pain. Nature, 444(7121), 894–898.      Now, I do not want LaTeX to make these ..., but to list all of the authors. This problem only appears when there are many others, which is not very often. I wonder: Can I change something inside the single entry in the .bib to make all authors appear? Because reprogramming the whole style would be quite difficult, right?


title: How to get a nice code to insert pictures on the right?

text: In my document must insert many pictures. I don't know how to get a nice code? I tried               \documentclass{article}     \usepackage{amsmath,amsxtra,amssymb,latexsym, amscd,amsthm}     \usepackage{color, graphicx}     \usepackage{pstricks-add}     \usepackage[left=20mm,right=20mm,top=15mm,bottom=20mm]{geometry}     \begin{document}          \begin{figure}[!ht]     \begin{minipage}[b]{0.4\textwidth}     Type a quote from the document or the summary of an interesting point. You can position the text box anywhere in the document. Use the Drawing Tools tab to change the formatting of the pull quote text box.     Type a quote from the document or the summary of an interesting point.      \caption{}\label{fig:*1}     \end{minipage}     \hfill     \begin{minipage}[b]{1.0\textwidth}     \centering     \psset{xunit=1.0cm,yunit=1.0cm,algebraic=true,dotstyle=*,dotsize=3pt 0,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25}     \begin{pspicture*}(-4.56,0.5)(0.88,4.07)     \psline(-1.9,3.57)(-4.12,1.55)     \psline(-4.12,1.55)(-0.16,2.13)     \psline(-0.16,2.13)(-1.9,3.57)     \psplot{-4.56}{0.88}{(-7.71-3.27*x)/-0.42}     \psline(-4.12,1.55)(-2.19,1.3)     \psline(-2.05,2.38)(-0.16,2.13)     \psdots(-1.9,3.57)     \rput[bl](-1.82,3.62){$A$}     \psdots(-4.12,1.55)     \rput[bl](-4.5,1.33){$B$}     \psdots(-0.16,2.13)     \rput[bl](-0.05,2.1){$C$}     \psdots(-2.05,2.38)     \rput[bl](-1.9,2.49){$K$}     \psdots(-2.19,1.3)     \rput[bl](-2.1,1.1){$H$}     \psdots[linecolor=darkgray](-2.12,1.84)     \rput[bl](-2,1.5){\black{$M$}}     \rput[bl](-2.2,0.5){\black{$\Delta$}}     \end{pspicture*}     \caption{}\label{fig:*2}     \end{minipage}     \end{figure}          \begin{figure}[!ht]     \begin{minipage}[b]{0.4\textwidth}     \centering     Type a quote from the document or the summary of an interesting point. You can position the text box anywhere in the document. Use the Drawing Tools tab to change the formatting of the pull quote text box.     Type a quote from the document or the summary of an interesting point.           \caption{}\label{fig:*1}     \end{minipage}     \hfill     \begin{minipage}[b]{0.4\textwidth}     \centering     \psset{xunit=1.0cm,yunit=1.0cm,algebraic=true,dotstyle=*,dotsize=3pt 0,linewidth=0.8pt,arrowsize=3pt 2,arrowinset=0.25}     \begin{pspicture*}(-5.42,0.45)(1.2,4.02)     \psline(-3.36,2.93)(-4.38,0.97)     \psline(-4.38,0.97)(0.76,0.98)     \psline(0.76,0.98)(-3.36,2.93)     \psplot{-5.42}{1.2}{(-3.22-0.19*x)/-0.88}     \psline(-3.36,2.93)(-1.81,0.98)     \psline(-4.38,0.97)(-4.74,2.64)     \psline(-1.81,0.98)(-2.28,3.16)     \psline(0.76,0.98)(0.18,3.69)     \psline(-4.38,0.97)(-1.81,0.98)     \psline(-3.13,1.01)(-3.13,0.94)     \psline(-3.06,1.01)(-3.06,0.94)     \psline(-1.81,0.98)(0.76,0.98)     \psline(-0.56,1.02)(-0.56,0.94)     \psline(-0.49,1.02)(-0.49,0.94)     \psdots(-3.36,2.93)     \rput[bl](-3.48,3.09){$A$}     \psdots(-4.38,0.97)     \rput[bl](-4.5,0.6){$B$}     \psdots(0.76,0.98)     \rput[bl](0.66,0.6){$C$}     \psdots[linecolor=black](-1.81,0.98)     \rput[bl](-1.88,0.6){\black{$I$}}     \psdots[linecolor=darkgray](-4.74,2.64)     \rput[bl](-4.94,2.74){\black{$H$}}     \psdots[linecolor=black](0.18,3.69)     \rput[bl](0.08,3.78){\black{$K$}}     \rput[bl](0.8,3.5){\black{$\Delta$}}     \psdots[linecolor=black](-2.28,3.16)     \rput[bl](-2.32,3.25){\black{$L$}}     \end{pspicture*}     \caption{}\label{fig:*2}     \end{minipage}     \end{figure}     \end{document}


title: Transforming string into tabular row

text: Trying to have a command converting a string into a (tabular) row, where each cell of the row is (a function of) each character of the string. (`\tilerow` is my attempt, `\tiletext` is just for debugging). I guess my problem is with the protection of `&` (ampersand) because the text version works as it should---it just separates characters with `\&`. And I would like to do the same for the closing `\\\` (double backslash). (I currently left a `.` (dot) not to multiply problems.)               \documentclass[11pt]{article}               \usepackage{etoolbox,xstring,multido}               \title{Title}               \begin{document}          \newcommand{\current}{}               %%%\tiletext is just inserting \& and works          \newcommand{\tiletext}[1]     {     \renewcommand{\current}{}     \multido{\i=1+1}{5}{     \StrChar{#1}{\i}[\currentchar]     \eappto\current{\currentchar}     \ifnumless{\i}{5}{\eappto\current{ \protect\& }}{\eappto\current{ . }}     \ifnumless{\i}{5}{}{\current}     }     }          %%%%%\tilerow does not work          \newcommand{\tilerow}[1]     {     \renewcommand{\current}{}     \multido{\i=1+1}{5}{     \StrChar{#1}{\i}[\currentchar]     \eappto\current{\currentchar}     \ifnumless{\i}{5}{\eappto\current{ \protect& }}{\eappto\current{ . }}     \ifnumless{\i}{5}{}{\current}     }     }               \maketitle               %%% this works as intended (returns another string with \& seperation)          \tiletext{bt0f0}               \begin{tabular}{ccccc}     \tiletext{bt0f0} \\     \end{tabular}                    %%% this doesn't work          \begin{tabular}{ccccc}     \tilerow{bt0f0}\\     \end{tabular}                         \end{document}


title: Control of spacing between equation lines when using split

text: I am using this LaTex template (see **gmuthesis.sty** and **GMU_thesis_template.tex** in the linked zip file) to generate a thesis. It has some long equations in it. When I render the below equation in the context of the template, I get picture A. When I render it in a barebones document having just the equation, I get picture B. I would like my equations to render like picture B. What setting is controlling the spacing between lines, and how should I change it? **Equation**               \documentclass[11 pt]{report}     \usepackage{amsmath}          \begin{document}     \[\frac{100}{2} = \frac{\begin{split}&\text{DG:SG:Granule } + \text{DG:SG:Total Molecular } + \text{DG:SG:MOLAX } +\\     & \text{DG:SG:Outer Molecular } + \text{DG:SG:HICAP } + \text{DG:SG:Axo-Axonic } +\\     & \text{DG:SG:HIPP } + \text{DG:SG:Aspiny Hilar } + \text{DG:SG:Basket-PV } +\\     & \text{DG:SG:Basket-CCK } + \text{DG:SG:Non-Ivy / NGF }\end{split}}{\begin{split}&\text{DG:SG:Total Molecular } + \text{DG:SG:MOLAX } + \text{DG:SG:Outer Molecular } +\\     & \text{DG:SG:HICAP } + \text{DG:SG:Axo-Axonic } + \text{DG:SG:HIPP } +\\     & \text{DG:SG:Aspiny Hilar } + \text{DG:SG:Basket-PV } + \text{DG:SG:Basket-CCK } +\\     & \text{DG:SG:Non-Ivy / NGF }\end{split}}\]     \end{document}      **Picture A** ![enter image description here](http://i.stack.imgur.com/twL6s.jpg) **Picture B** ![enter image description here](http://i.stack.imgur.com/3LNIu.jpg)


title: Preventing itemize environment to insert initial vertical space

text: I'm using itemize and tables like the following               \begin{tabularx}{\textwidth}{>{\ttfamily}llX}      \toprule      \textbf{\rmfamily Operator} & \textbf{Typen} & \textbf{Regel} \\      \midrule      = & Alle Typen &       \begin{itemize}        \item This is how we roll        \item Maybe we can talk?       \end{itemize} \\      \bottomrule     \end{tabularx}      But it keeps inserting a vertical space before the itemized list. How can I prevent it from doing so?


title: cventry using moderncv class

text: I am quite new in LaTeX. Actually, I want to use cventry using moderncv class. I faced with lots of errors while I am using multiple `\cventry`.               \section{Experience}          \subsection{Vocational}          \cventry{2009--2012}{Supervisor}{\textsc{Technical and Vocational Training organization      (TVTO)}}{East Azarbaijan Branch, Iran}{}{Supervision of, Teaching Standards.}     \subsection{Civil engineering, Surveying and Architecture}     %------------------------------------------------          \cventry{2009--2012}{Writer}{\textsc{Technical and Vocational Training organization      (TVTO)}}{Tehran, Iran}{}{Writing, Teaching Standards, in Geomatics.}          %------------------------------------------------          \subsection{Autodesk Civil design, Autodesk survey, Civil 3D, Road surveyor, Construction surveyor, Surveying with single channel GPS}          \cventry{2008--2010}{Lecturer}{Borj Azar Co.}{East Azarbaijan, Iran}{}{Training Surveying Instruments & digital Mapping.}            \cventry{2008--2009}{Lecturer}{Klick Now}{East Azarbaijan, Iran}{}{Training Audesk Land Desktop.}            \cventry{2008--2009}{Surveyor}{Borj Azar Co.}{East Azarbaijan, Iran}{}{Surveying of water and watershed management, drainage channals and irrigation water piping, Akhola project.}            \cventry{2007--2008}{Surveyor}{Borj Azar Co.}{East Azarbaijan, Iran}{}{Surveying of Daryan Dam.}            \cventry{2006--2007}{Surveyor and Cartograph}{Borj Azar Co.}{East Azarbaijan, Iran}{}{Surveying and cadastral mapping of Shabster.}      Could you explain me how I can use multiple `\ceventry` in context successively.


title: Finding the correct \fontfamily name

text: > **Possible Duplicate:**   >  How to find the name of a font? I'm trying to use the TeX Gyre Chorus font for a small text (the rest of the document should use TeX Gyre Pagella). I've found the answer to use the `\fontfamily` command; however I just cannot find the correct name for TeX Gyre Chorus. Where should I look?


title: Showing Solutions of the Questions "separately"

text: There is a class for LaTeX called `exam`. Using this class, one can write questions and answers for exams. The answers are displayed under (after) each question. My goal is to have all answers in the separate part of the document (after all questions). For that purpose I tried to create new environment like this:               \newenvironment{answer}{\def\answertext\begingroup}{\endgroup}      I was hoping to gather answer text into `\answertext` and dump it after all questions. I'm sure, a solid TeX Package/Class writer can do it within no time... Please, give me some hint.


title: How I can add my own language

text: I wrote an artificial language (conlang). What I can add my own language in LaTeX? Conlang has more letters than English (utf8 and some ligatures) and specyfic hyphenations. Where is simple/minimal tutorial or example. No cóż, skoro i tak zamknięto pytanie nie dając odpowiedzi nie wiem czy jest sens go zadawać w tym gronie.


title: Reduce spacing after heading of List of Figures

text: I have some issue with my LaTeX document. It uses `scrbook` class and I don't like the chapter spacings in the List of Figures. For the actual content, the spacing is nice, but in the LOF, I'd like to reduce the `space` after the `\listoffigures` command. For the table of contents I've included `\addtocontents{toc}{\vskip -1.2cm}` which reduces the space after the heading. Is there something similar I can do for the LOF? MWE:               \documentclass[a4paper, draft=true]{scrbook}     \usepackage{lipsum}     \usepackage[notlot,nottoc,notlof]{tocbibind}     \usepackage[compact]{titlesec}     \usepackage{graphicx}     \usepackage{tocloft}             \usepackage{caption}          \begin{document}     \tableofcontents     \listoffigures             \chapter{Bla}          \begin{figure}[htb]      \makebox[\textwidth][l]{         \includegraphics*[width=0.65\textwidth]{someImage.png}      }\caption{Caption}     \label{fig:lable}     \end{figure}           \section{1.1}     \lipsum[1]          \end{document}      The spacing of concern is highlighted by the red rectangle. Would be great, if somebody could help me out and let me know, how I can just reduce this specific spacing in the List of Figures. EDIT: I've just realized that my problem is related to the usage of `tocbibind`. When I use that specific package, the answer tohecz `\addtocontents{lof}{\vskip -1.2cm}` does not work. I've adjusted the MWE accordingly. ![enter image description here](http://i.stack.imgur.com/GQhXm.png)


title: Label handling in a macro

text: I want to create an environment to easily list a bunch of subfigures with their explanations. But the explanations should appear only in the caption of the complete figure, instead of the subfigure's caption. In order to solve this problem, I devised an environment that uses a command to append to a macro the subfigure captions. However, when I try to refer to the labels (that are created on the fly) for the subfigures in the resulting caption, they all refer to the last subfigure. I used `\expandafter` to append to my collecting macro, so I suspect this might be the problem. * * * The corresponding MWE:               \documentclass{article}          \usepackage{calc}     \usepackage{subcaption}     \usepackage[demo]{graphicx}          %     % ===================== %     % smallSubfigExplained  %     % ===================== %     \newlength\sseWidth     \def\sseExplanationOutput{}     \newcounter{sseTotalCounter}     \newcounter{sseCounter}[sseTotalCounter]          \newenvironment{smallSubfigExplained}{%         \stepcounter{sseTotalCounter}         \def\sseExplanationOutput{}     }{%         \caption[cap]{\sseExplanationOutput}     }     \newcommand\sseItem[1]{%             \stepcounter{sseCounter}         \def\lblname{sse:\thesseTotalCounter-\thesseCounter}         \expandafter\def\expandafter\sseExplanationOutput\expandafter{%             \sseExplanationOutput             \textbf{\subref{\lblname}})             #1         }         \begin{subfigure}[b]{0.4\textwidth}             \centering                 \rule{2cm}{2cm}                 \caption{}                 \label{\lblname}         \end{subfigure}          }          \begin{document}     \begin{figure}         \centering             \begin{smallSubfigExplained}                 \sseItem{subfig expl 1}                 \sseItem{second subfig expl}             \end{smallSubfigExplained}     \end{figure}     \end{document}      Screenshot: ![Screenshot](http://i.stack.imgur.com/Gbh5r.png)


title: What is the difference between font encoding and input encoding?

text: From list of obsolete packages and classes we must avoid, I found 2 terminologies, i.e., font-encoding and input-encoding. What is the difference between them?


title: Error message: LaTeX can't find ieeetrans.sty

text: My code is               \documentclass[oneside,12pt]{Classes/VTU}     \title{TITLE OF THE THESIS}          \author{by \\ \vspace{2mm}NAME OF CANDIDATE \vspace{5mm}}     \collegeordept{Department Name}     \university{College Name}          \renewcommand{\submittedtext}{A Thesis submitted to \\VISVESVARAYA TECHNOLOGICAL UNIVERSITY \\ Belgaum \\for award of degree of }     \degree{Doctor of Philosophy in -------------}     \degreedate{Year / Year}          \hbadness=10000     \hfuzz=50pt          \usepackage{StyleFiles/watermark}     \usepackage{multirow}     \usepackage{ieeetran}     \begin{document}          \renewcommand\baselinestretch{1.2}     \baselineskip=18pt plus1pt          \maketitle          \setcounter{secnumdepth}{3}     \setcounter{tocdepth}{3}          \begin{romanpages}     \include{Certificate/certificate}     \include{Declaration/declaration}     \include{Acknowledgement/acknowledgement}     \include{Dedication/dedication}     \include{Abstract/abstract}     \printglossary       \tableofcontents     \listoffigures     \listoftables     \end{romanpages}          \include{Introduction/introduction}     \include{Chapter1/chapter1}     \include{Chapter2/chapter2}     \include{Chapter3/chapter3}     \include{Chapter4/chapter4}     \include{Chapter5/chapter5}     \include{Conclusions/conclusions}     \include{Futurework/futurework}          \appendix     \include{Appendix1/appendix1}     \include{Appendix2/appendix2}          \bibliographystyle{plain}     %\bibliographystyle{ieeetr}     \bibliography{References/references}     \addcontentsline{toc}{chapter}{References}          \end{document}      The error says that it cannot find `ieeetran.sty` and the references are not getting displayed.


title: Restore kerning across empty groups

text: # Context In my document, I attach a tooltip to the middle part of a word. To demonstrate this behavior, try mousing over just the letter `V` in the word `AVA`. Here is the implementation and usage of my `\tooltip` command.               %% This tooltip command     \newcommand\tooltip[2]{%         \special{pdf:bann<</Type/Annot /Subtype/Widget /FT/Btn /Ff 65536 /H/N /TU(#2)>>}%         #1%         \special{pdf:eann}%     }          %% is used like so     A\tooltip{V}{Tooltip text here.}A          %% which expands like so.     A\special{…}V\special{…}A      The specifics of making the tooltips are not directly relevant the question, but I have included it for context. # Problem Separating the parts of the word by interspersing `\special{}`, i.e. `A\special{}V\special{}A` causes the kerning between parts to no longer apply.¹ (Note: `\special` is not special — this behavior also occurs in `A{V}A` and `A{}V{}A`, unless one uses XeLaTeX or LuaLaTeX.²) # Partial solution I was able to restore kerning in the latter two parts using the following command, adapted from this answer, which uses `\futurelet` to do the trick.               \newcommand\kernright[1]{\def\hltext{#1}\futurelet\hlnext\hldokern}     \def\hldokern{%         \sbox0{\mbox\hltext\mbox\hlnext}\sbox2{\hltext\hlnext}\kern\dimexpr\wd2-\wd0\relax%     }      (Although that question specifically concerns kerning between different styles, the solution still works. Another more generic question has no satisfactory solution.) Here are three wrapper commands for `\tooltip`.               \newcommand\tooltipA[2]{#1}     \newcommand\tooltipB[2]{\tooltip{#1}{#2}}     \newcommand\tooltipC[2]{\tooltip{#1}{#2}\kernright{#1}}      Below is a comparison table and the corresponding rendered image.               ￼￼￼                        A\tooltipX{V}{}A expands to             AV kerned?   VA kerned?                             ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾             ‾‾‾‾‾‾‾‾‾‾   ‾‾‾‾‾‾‾‾‾‾     A. Normal kerned text   AVA                                     yes          yes     B. Interrupted text     A\special{}V\special{}A                 no           no     C. Partial solution     A\special{}V\special{}\kernright{V}A    no           yes      > ![examples of kerning across empty > groups](http://i.stack.imgur.com/LnyQo.png) However, I have not been able to come up with a way to write a `\tooltipD` command that would also restore kerning between A and V, as there does not appear to be a command that does the “opposite” of `\futurelet`. # Question How do I restore the kerning between A and V? I would expect to insert an additional `\kernleft` command somewhere in the body of the `\tooltipC` command to yield an output equivalent to the top part of the image. # MWE (Tooltips should work in XeLaTeX.³)               \documentclass[varwidth=true]{standalone}     \newcommand\tooltip[2]{%     \special{pdf:bann<</Type/Annot /Subtype/Widget /FT/Btn /Ff 65536 /H/N /TU(#2)>>}%     #1%     \special{pdf:eann}%     }     \newcommand\kernright[1]{\def\hltext{#1}\futurelet\hlnext\hldokern}     \def\hldokern{%     \sbox0{\mbox\hltext\mbox\hlnext}\sbox2{\hltext\hlnext}\kern\dimexpr\wd2-\wd0\relax%     }          % A-C are from original question; D is adapted from Steven's answer     \newcommand\tooltipA[2]{#1}     \newcommand\tooltipB[2]{\tooltip{#1}{#2}}     \newcommand\tooltipC[2]{\tooltip{#1}{#2}\kernright{#1}}     \newcommand\tooltipD[2]{%         #1%         \setbox0=\hbox{#1}\kern-\wd0%         \tooltip{#1}{#2}%         \kern-\wd0#1%     }          \begin{document}     \tooltip{Foo}{Bar}          A\tooltipA{V}{Tooltip text}A          A\tooltipB{V}{Tooltip text}A          A\tooltipC{V}{Tooltip text}A          A\tooltipD{V}{Tooltip text}A     \end{document}


title: Picture and Paragraph in Metapost

text: How to insert a paragraph in Metapost and a drawing below that? This has to be done within a single Metapost block, (i.e) within a single `\startMPcode` and `\stopMPcode` block Sample image : ![sample image](http://i.imgur.com/5X6cjTT.png)


title: tikz-uml creating components diagrams

text: I'm trying to setup UML components diagrams, using `tikz-uml` package. In cause of chujowa documentation I have some question's to you.   1. How can I place provided interface at specified place on specified side of component.   2. How can I name interface with specified name, not just `COMPONENT-west-interface`   3. How can connect two required interfaces to one provided interface. Here is a MWE:               \documentclass{standalone}     \usepackage[utf8]{inputenc}     \usepackage{tikz-uml}          \begin{document}         \begin{tikzpicture}                 \umlbasiccomponent{A}             \umlprovidedinterface{A}                     \end{tikzpicture}     \end{document}


title: Hyperlink in moderncv with acrobat reader

text: The `hyperref` in `moderncv` for urls and the email address cannot be opened with adobe acrobat reader. The links are working in other pdf readers. It's only an issue with `moderncv` opened in adobe acrobat reader. I tried to make a minimal example that shows the behavior. It is the same for `\href` and `\url`. Does anybody know a resolution?               \documentclass[11pt,a4paper]{moderncv}          \moderncvtheme[grey]{classic}     \firstname{Test}     \familyname{Test}          \begin{document}          \cventry{2012}{test}{test}{\texttt{\href{http://www.google.com}{click me}}}{}{}     \cventry{2012}{test}{test}{\texttt{\url{http://www.google.com}}}{}{}          \end{document}


title: changepage package's \adjustwidth environment adjusts only left margin

text: I was trying to create a custom abstract environment with minipages and adjusted margins. Everything works fine, except for that the right margin changes according to the left. I could'n find solution. Here is the whole code:               \documentclass{article}     \usepackage[a4paper]{geometry}          % Setting character encoding to UFT-8, and loading the babel package     % with Hungarian language.     \usepackage[utf8]{inputenc}     \usepackage[magyar]{babel}     \usepackage[T1]{fontenc}     \usepackage{lipsum}     \usepackage{multicol}     \usepackage{changepage}               \author{Alap Tibor}     \title{\LaTeX\ gyakorlás}          \newenvironment{myabstract}     {\begin{adjustwidth}{-1cm}{-1cm}     \begin{minipage}{0.3\textwidth}     \vspace{-1cm}     \maketitle     \end{minipage}     \begin{minipage}{0.7\textwidth}     \begin{flushleft}     \textbf{\textit{ABSTRACT}}     \end{flushleft}     \vspace{2mm}     \hrule %{\textwidth}{1.5pt}     \smallskip     \textbf\bgroup}     {\egroup     \vspace{1mm}     \hrule %{\textwidth}{1.5pt}     \end{minipage}     \end{adjustwidth}     \vspace{1cm}}          \begin{document}          \begin{myabstract}         \lipsum[13]     \end{myabstract}          \begin{multicols}{2}         \section{Bevezető}         \lipsum[22-24]     \end{multicols}     \end{document}        Adjusting the second parameter of `\adjustwidth` does not make any change. Many thanks for any advice.