title: Weird gaps in bibliography, list of figures, etc

text: I have a very strange problem with my list of figures, list of tables and bibliography which I can't figure out. There are unnecessary gaps between the lines. Any idea what could be wrong here? ![bibliography](http://i.stack.imgur.com/VRGKx.png) ![enter image description here](http://i.stack.imgur.com/PIJyp.png) The citation looks very regular to me.               @article{Falcone:uq,     Author = {Pete Falcone},     Date-Added = {2012-05-14 21:20:55 +0000},     Date-Modified = {2012-05-14 22:19:24 +0000},     Journal = {The Pantagraph},     Month = {September 28},     Pages = {B1},     Title = {Seattle; Historic Past Makes `Jewel of the Pacific Northwest\' a Precious Commodity},     Year = {1997}}          @book{Florida:2002fu,     Address = {Cambridge, MA},     Author = {Richard Florida},     Date-Added = {2012-05-14 23:18:17 +0000},     Date-Modified = {2012-05-14 23:19:31 +0000},     Publisher = {Basic Books},     Title = {The Rise of the Creative Class},     Year = {2002}}               % \documentclass[a4paper,12pt,twoside,openright,numbers=noenddot]{scrreprt}     \documentclass[a4paper,12pt,numbers=noenddot]{scrreprt}     \addtokomafont{disposition}{\rmfamily}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[british, english, american]{babel}     \usepackage[pdftex]{graphicx}     \usepackage{sidecap}     \usepackage{setspace}     \usepackage{xcolor}     \usepackage{scrpage2}      \usepackage[hyphens]{url}     \usepackage[format=plain,margin=15pt,parskip=5pt,font=small,indention=10pt]{caption}     \usepackage{makeidx}     \usepackage{hyperref}     \usepackage[final]{pdfpages}     \usepackage[titletoc, title]{appendix}     \usepackage{nomencl}     \renewcommand{\nomname}{List of Abbreviations}      \makenomenclature     \DeclareCaptionType{map}[Map][List of Maps]     \usepackage{csquotes}      \usepackage[       style=mla,       autocite=footnote     ]{biblatex}     \bibliography{Bibliography}     \DeclareCiteCommand{\smartcite}[\iffootnote\mkbibparens\mkbibfootnote]       {\usebibmacro{prenote}}       {\usebibmacro{citeindex}%        \usebibmacro{cite:mla}}       {}       {\usebibmacro{postnote}}     \makeindex     \clubpenalty = 10000 \widowpenalty = 10000 \displaywidowpenalty = 10000     \usepackage{chngcntr}     \counterwithout{figure}{chapter}     \counterwithout{table}{chapter}     \hypersetup{         colorlinks,%         citecolor=black,%         filecolor=black,%         linkcolor=black,%         urlcolor=black     }


title: tlmgr cannot access working repository

text: I'm trying to install package from a repository via tlmgr and always get the error               tlmgr: package repository http://ctan.uni-altai.ru/     TLDownload::get_file: response error:     404 Not Found     permanent server connection set up, but downloading did not succeed!Retrying with wget.      Repository is working, I can access it via browser, I've also tried others. Sometimes errorcode is different e.g. 500.               $ latex -v     pdfTeX 3.1415926-2.3-1.40.12 (TeX Live 2011)     kpathsea version 6.0.1     Copyright 2011 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).     There is NO warranty.  Redistribution of this software is     covered by the terms of both the pdfTeX copyright and     the Lesser GNU General Public License.     For more information about these matters, see the file     named COPYING and the pdfTeX source.     Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).     Compiled with libpng 1.5.2; using libpng 1.5.2     Compiled with zlib 1.2.5; using zlib 1.2.5     Compiled with xpdf version 3.02pl5      Any ideas?


title: plotmarks are displayed as default marks

text: My code:               \documentclass{article}          \usepackage[ngerman]{babel}     \usepackage[utf8]{inputenc}     \usepackage{pgfplots}     \pgfplotsset{compat=1.9}     \usepgflibrary{plotmarks}          \begin{document}          \begin{tikzpicture}         \begin{axis}[                  grid=major,                  x=5mm,                 y=5mm,                 xtick={-5,-4,...,5},                      xmin=-5,                 xmax=5,                 xlabel={\tiny $x$},                 axis x line=middle,                 ytick={-10,-9,...,10},                 tick label style={font=\tiny},                 ymin=-10,                 ymax=10,                 ylabel={\scriptsize $f(x)$},                 axis y line=middle,                 samples=500,                 domain=-10:10,                 restrict y to domain=-20:20,                 no markers             ]             \addplot {x^5};             \addplot [only marks,mark=o] coordinates { (1, 1) };         \end{axis}     \end{tikzpicture}          \end{document}      ### Problem Although I included _plotmarks_ and set _mark=o_ , the default black, filled mark is used.   * **Picture #1** shows the result of the code above.   * **Picture #2** shows the kind of mark I want to have.   * **Picture #3** shows the result of the code after removing `no markers`.   * **Picture #4** shows the result of the code after removing `no markers` _and_ the plotted function graph. 1) ![enter image description here](http://i.stack.imgur.com/0Jvrn.png) 2) ![enter image description here](http://i.stack.imgur.com/Qa10s.png) 3) ![enter image description here](http://i.stack.imgur.com/FsrbN.png) 4) ![enter image description here](http://i.stack.imgur.com/v7GPm.png)


title: \texttt converts apostrophe to Unicode quotation mark

text: > **Possible Duplicate:**   >  How to make a real apostrophe or single-quote in LaTeX I'm building a Python Regex cheat sheet using Latex, which has the following line:               \texttt{re.match('a\textbackslash sb', 'a b')      However, when the line is copied from the PDF document, the apostrophe (`'`) is converted to `Unicode Character 'RIGHT SINGLE QUOTATION MARK' (U+2019)` (`’`):               re.match(’a\sb’, ’a b’)      This text is not recognizable by the Python interpreter. Is there a LaTex tag for code that preserves the original characters?


title: TexShop keeps converting apostrophes into curly ones

text: Whenever I type something such as `The energy's source`, TexShop changes the apostrophe into a curly one which does not print in the PDF. How can I stop future apostrophes from being changed without much of a hassle ? Using TexShop :               \documentclass[12pt,a4paper]{report}     \usepackage[lmargin=3.81cm,tmargin=2.54cm,rmargin=2.54cm,bmargin=2.52cm]{geometry}     \linespread{1.5}     \usepackage{mathptmx}           \begin{document}          it's          \end{document}      * * * This is what happens : I type an apostrophe, the TexShop changes it to a curly apostrophe in the editor : ![enter image description here](http://i.stack.imgur.com/XdWmN.png) However this does not print in the PDF file as TexShop doesn't recognise it when it TypeSets. If I manually change it to ![enter image description here](http://i.stack.imgur.com/R0nYG.png) Then it prints normally, but I can't keep changing it manually every time I type apostrophes because (1) I forget (2) it's not convenient.


title: move block and figures arbitrarily

text: I would like to put a figure in the right part of a slide and text in the left part, in order to explain the figure. Then i would like to put another block at the bottom of the slide. I'm using Beamer. How can I move blocks and figures in a single slide?


title: PGFPlot formatting help

text: I have the following pgfplot:               \documentclass{article}     \usepackage{pgfplots}     \pgfplotsset{every axis legend/.append style={     at={(1.05,1)},     anchor=north west}}          \begin{document}     \begin{tikzpicture}     \begin{axis}[         ylabel=Number of Respondents,         enlargelimits=0.15,         legend cell align=right,         ybar,         bar width=10pt,         symbolic x coords = {Very U, Somewhat U, Not U},         xtick=data,         x tick label style={anchor=north},         width=.50\textwidth,         ymin=0,         ]         \addplot         coordinates {(Very U,1) (Somewhat U,3) (Not U,1)};         \addplot         coordinates {(Very U,2) (Somewhat U,0) (Not U,0)};         \addplot          coordinates {(Very U,1) (Somewhat U,2) (Not U,0)};         \addplot          coordinates {(Very U,4) (Somewhat U,5) (Not U,1)};     \legend{Survey Vote \#257, Survey Vote \#968, Survey Vote \#156, All Surveys}     \end{axis}     \end{tikzpicture}     \end{document}      What I want to do, is have the leftmost group have a little padding before it starts (not right up on the y axis) and the same for the rightmost group, have a little padding between it and the y axis. I would also like to make the legend just a bit bigger...


title: hspace in tabular

text: How can I move the summation equation that appears at the bottom of column 3 to be centered with the column 3rd column. Using \hspace hasn't been successful thus far.               \begin{tabular}{ccr@{\hspace{1pt}=\hspace{1pt}}r}      $X_j$&$f_j$&\multicolumn{1}{r}{$f_jX_j$}\\          \hline          28&1&(1)(28)&28\\     27&0&(0)(27)&0\\     26&1&(1)(26)&26\\     25&2&(2)(25)&50\\     24&3&(3)(24)&72\\     23&4&(4)(23)&92\\     22&3&(3)(22)&66\\     21&0&(0)(21)&0\\     20&1&(1)(20)&20\\     19&2&(2)(19)&38\\     18&1&(1)(18)&18\\     17&0&(0)(17)&0\\     16&1&(1)(16)&16\\     15&0&(0)(15)&0\\     14&1&(1)(14)&14\\          \hline          &$n=20$& \multicolumn{1}{c}{$\displaystyle\sum^{k}_{j=1}f_jX_j=440$}          \end{tabular}      ![image](http://i.imgur.com/gvUIn.jpg)


title: Making Preamble File and SyncTeX with Kile (in Linux)

text: I am on an `Ubuntu` system with `TeXLive` as my `TeX`-distribution. I would like to write a common style file and include this file in every document. What should the extension of such a file be? And, another question is: Where should I put this file? On my computer there is a directory called `/etc/texmf/` and there are some relevant files such as:   1. `tex`   2. `texdoc` Also, how do I configure `Kile` with `Okular` for `SyncTeX`? That is, I'd like to view the relevant part of my source file on click in the `Okular` window.


title: stringstrings replacement for XeTeX?

text: To construct a lower-case filename out of the mixed-case argument given to a command, I used `stringstrings` in LaTeX. Now I switched to XeTeX and it seems the `fontspec`-package has some interference with `stringstrings`:               \documentclass{article}     \usepackage{fontspec,stringstrings}     \begin{document}       \caselower[q]{AbC}\thestring     \end{document} Produces an error message only when `fontspec` is used:               ! Missing control sequence inserted.     <inserted text>                      \inaccessible      l.4 \thestring Just using `\lowercase` for display won't work, because I need to use it like               \edef{\filename}{stuff/\thestring.tex}     \input{\filename} (there seems to be a similar clash between `stringstrings` and `polyglossia`) So: what would be other string manipulation packages for LaTeX and XeTeX (`coolstr` is mentioned, but only supports substring operations I don't need)? Or is there a fix by redefining something?


title: How can I cross-reference cross-references with primes?

text: When I try to cross-reference with `\ref` to `gb4e`'s cross-references with primes (`\exp`) I fail. Consider the following example:               \documentclass{article}          \usepackage{gb4e}          \begin{document}          \begin{exe}       \ex\label{ex:1}Example one.     \end{exe}     Reference \ref{ex:1}.     \begin{exe}       \exp{ex:1}\label{ex:2}Example two.     \end{exe}     Reference \ref{ex:2}.          \end{document}      Which gives the following output: ![Output of the example](http://i.stack.imgur.com/eIKXE.png) Why does not `\ref{ex:2}` produce a cross-reference? Am I doing something wrong?


title: Are \def and \define the same in ConTeXt?

text: Is there any difference between defining a variable using `\def` and using `\define`, when used without a number inside square brackets, e.g. `\def\somecommand{\percent}` and `\define\somecommand{\percent}`? Can I always use `\define` in places where `\def` can be used?


title: Underfull \hbox in scrpage2 header and some tipps

text: i have problems tracking down a underfull \hbox warning:               Underfull \hbox (badness 10000) has occurred while \output is active     |     \hbox(10.18913+4.36682)x418.25554     .\rule(10.18913+4.36682)x0.0      This warning is on every (fancy) page. I marked the important parts with --- lines. I created this TeX-Header from an old university header, are there problems or mistakes in it? Dominik Here is the 'full' file:               \showboxdepth=\maxdimen     \showboxbreadth=\maxdimen          \pdfoutput=1     \pdftrue     \message{pdfLaTeX}     \documentclass[pdftex,11pt,a4paper,twoside,ngerman]{scrbook}     \usepackage{float}     \usepackage[pdftex]{thumbpdf}     \usepackage[pdftex]{pdflscape}     \usepackage[pdftex]{graphicx}     \usepackage[pdftex]{hyperref}     \usepackage{pdfpages}     \pdfoutput=1     \pdfcompresslevel=9     \DeclareGraphicsExtensions{.pdf,.jpg,.png}          %      \hypersetup     {      pdfauthor = {\Autor},      pdftitle = {\Arbeitstitel},      pdfsubject = {\Arbeitsbezeichnung, Name},      pdfproducer = {LaTeX},      pdfview = FitV,      pdfstartview = FitV,      pdfhighlight = /I,      pdfborder = 0 0 0,      colorlinks = false,      bookmarksopen,      bookmarksopenlevel = 1,      bookmarksnumbered = false,      plainpages = false     }%     %      \usepackage[a4paper,left=3.5cm,right=2.5cm,bottom=3.5cm,top=3cm]{geometry}     \setlength{\headheight}{15pt}     %      %      \usepackage{amsmath,amssymb}     \usepackage{flafter}    %float never appears before its position     %      %      \usepackage[absolute,overlay]{textpos}     \setlength{\TPHorizModule}{1mm}     \setlength{\TPVertModule}{\TPHorizModule}     \textblockorigin{0mm}{0mm}     \usepackage{fix-cm}          \usepackage{scrhack}     %      %      \usepackage[german,main=ngerman]{babel}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{ae,aecompl}     %      %      \usepackage[numbers,sort,square]{natbib}     %      %      \usepackage[babel,german=quotes]{csquotes}     %      %      \usepackage{url}     %      %      \usepackage[margin=0pt,font=small,labelfont=bf]{caption}     %      %      \usepackage{booktabs}     %      %      \usepackage{eurosym}     %      %      \usepackage[onehalfspacing]{setspace}     \AfterTOCHead{\singlespacing}     \recalctypearea     %      \renewcommand{\topfraction}{0.9}     \renewcommand{\bottomfraction}{0.8}          \parindent=0cm          % |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||     % -------------------------------------------------------------------     % Header & Footer     \usepackage[automark,nouppercase]{scrpage2}          \renewcommand{\chaptermark}[1]{\markboth{\chaptername\ \thechapter.\ #1}{}}           \renewcommand{\sectionmark}[1]{\markright{\thesection.\ #1}}          \renewcommand{\headfont}{\normalfont\itshape\fontsize{11}{12}\selectfont}     \renewcommand{\pnumfont}{\normalfont\upshape\fontsize{11}{12}\selectfont}               \newpagestyle{fancy}{(0pt,0pt)                          % Outer header line                     {\pagemark \hfill \headmark}   % Even page header                     {\headmark \hfill \pagemark}   % Odd page header                     {}                            % Onesided page header                     (\textwidth,0.5pt)}                 % Inner header line                     {(0pt,0pt)                 % Inner footer line                      {}                   % Even page footer                     {}                   % Odd page footer                     {}                  % Onesided page footer                     (0pt,0pt)}                  % Outer footer line          \renewpagestyle{plain}{(0pt,0pt)              % Outer header line                       {}     % Even page header                       {}      % Odd page header                       {}                % Onesided page header                       (0pt,0pt)}              % Inner header line                       {(0pt,0pt)     % Inner footer line                        {}             % Even page footer                       {}             % Odd page footer                       {}             % Onesided page footer                       (0pt,0pt)}              % Outer footer line          \pagestyle{empty}     % -------------------------------------------------------------------     % |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||     %      %      \usepackage{listings}          \lstdefinestyle{C++}     {     language=C++,     backgroundcolor=\color{BrightGray},     keywordstyle=\tt\bfseries,  %\color{TUGreen}\bfseries,     commentstyle=\color{DarkGray},     stringstyle=\color{red},     showstringspaces=false,     basicstyle=\small\color{black},     numbers=left,     captionpos=b,     tabsize=4,     breaklines=true     }     %     %      \usepackage[plain,chapter]{algorithm}     \usepackage{algorithmic}          \usepackage{enumerate}     %     %      \renewcommand{\algorithmicrequire}{\textit{Eingabe:}}     \renewcommand{\algorithmicensure}{\textit{Ausgabe:}}     \floatname{algorithm}{Algorithmus}     \renewcommand{\listalgorithmname}{Algorithmenverzeichnis}     \renewcommand{\algorithmiccomment}[1]{\color{grau}{// #1}}     %     %      \usepackage{esvect}     \usepackage{paralist}     \usepackage{todonotes}     \usepackage{mathtools}     \usepackage[activate={true,nocompatibility},final,tracking=true,kerning=true,spacing=true,factor=1100,stretch=10,shrink=10]{microtype}          \usepackage{subcaption}          \usepackage{makeidx}     \makeindex          \usepackage{tikz}              \addto\captionsngerman{         \renewcommand{\figurename}{Abb.}         \renewcommand{\tablename}{Tab.}     }          \usepackage{lipsum}          \begin{document}     \pagestyle{fancy}     \lipsum     \end{document}


title: LaTeX does not print words correctly: inputenc/fontenc problem

text: I'm using a MacBook Pro and TeXShop. I am writing a philosophy thesis and fairly new to LaTeX. In my preamble I have put               \documentclass[a4paper,12pt]{article}     \linespread{1.5}     \usepackage[francais,english]{babel}      \usepackage[utf8]{inputenc}      \usepackage[T1]{fontenc}      \usepackage[round]{natbib}     \usepackage{epigraph}     \usepackage{makeidx}     \usepackage{url}     \usepackage{color}     \usepackage[colorlinks=true, pdfstartview=FitV, linkcolor=blue, citecolor=blue, urlcolor=blue]{hyperref}     \usepackage[nottoc]{tocbibind}     \setcounter{tocdepth}{12}     \usepackage{eurosym}     \usepackage{ragged2e}     \begin{document}           These earlier ﬁrms, were far more powerful; they commanded armies and ﬂeets          \bibliographystyle{plainnat}     \bibliography{biblio.bib}     \printindex     \end{document}      However, in the pdf I get: "These earlier rms, were far more powerful; they commanded armies and eets" Also, I want to use french characters (i.e. é è ç ô ê, etc), but I still have to type `e and so on. I have googled, and played a bit with `[latin1]` but don't find an answer; please help.


title: How to float/wrap figures in ConTeXt?

text: I have a simple two column document in `ConTeXt`. I tried to float/wrap the figures within text with `placefigure`, but it inserts the figures exactly where they are. This will leave a empty space in the previous column, if a figure is not fitted. ![enter image description here](http://i.stack.imgur.com/Hdf3K.png) In addition, `ConTeXt` ignore figure float positioning commands of `top`,`bottom`, etc. What should be the standard figure placement to float/wrap within the text?               \starttext     \startcolumns[n=2,tolerance=verytolerant]     \section{Introduction}     LaTeX is based on the idea that authors should be able to focus on the content of what they are writing without being distracted by its visual presentation. In preparing a LaTeX document, the author specifies the logical structure using familiar concepts such as chapter, section, table, figure, etc., and lets the LaTeX system worry about the presentation of these structures. It therefore encourages the separation of layout from content while still allowing manual typesetting adjustments where needed. This is similar to the mechanism by which many word processors allow styles to be defined globally for an entire document or the use of Cascading Style Sheets to style HTML.     \placefigure[top,bottom][fig:1]{LaTeX can be arbitrarily extended by using the underlying macro language to develop custom formats. Such macros are often collected into packages, which are available to address special formatting issues such as complicated mathematical content or graphics. Indeed, in the example below, the align environment is provided by the amsmath package.     }     {\externalfigure[1.png][width=\textwidth]}     LaTeX is based on the idea that authors should be able to focus on the content of what they are writing without being distracted by its visual presentation. In preparing a LaTeX document, the author specifies the logical structure using familiar concepts such as chapter, section, table, figure, etc., and lets the LaTeX system worry about the presentation of these structures.     \stopcolumns     \stoptext


ConTeXt has various language codes, listed in this article at the ConTeXt wiki. I do not see Korean listed. I have tried `\language[ko]`, and the document compiles, but I have no way to verify if it is successful, as `\language[anything]` also compiles.   * Does ConTeXt have a language code for Korean?


title: How to Change Citation Style in LyX?

text: I tried Natbib Author-year in Document Settings, but I get > **(author?)** [2, 3] How do I get [FSS81], instead of [1]?


title: Waterfall Chart

text: For displaying the total effect of a series of values, a waterfall chart can be useful. For example this chart, taken from The Economist, illustrates estimated efficiency potentials in the UK public sector: ![Waterfall Chart](http://i.stack.imgur.com/4Nk1G.jpg) I know how to produce a chart like this with `TikZ,` but this doesn't seem to be the most elegant way. `pgfplots` does offer bar charts with the `ybar stacked` option, but I am not able to really reproduce what I want. By taking the the code from this question, I got this far. Is it possible to further improve this: eg. divide the bars and correctly number the parts? And maybe there is a solution that is easier to modify? For example, rescaling the y-Axes messes up the last line from increased tax collection to total.               \documentclass{article}     \usepackage{pgfplots}          \pgfdeclareplotmark{waterfall bridge}{\pgfpathmoveto{\pgfpoint{-8pt}{0pt}}\pgfpathlineto{\pgfpoint{48pt}{0pt}}\pgfusepathqstroke}          \pgfdeclareplotmark{waterfall bridge 2}{\pgfpathmoveto{\pgfpoint{32pt}{0pt}}\pgfpathlineto{\pgfpoint{88pt}{0pt}}\pgfusepathqstroke}          \pgfdeclareplotmark{waterfall bridge 3}{\pgfpathmoveto{\pgfpoint{72pt}{116pt}}\pgfpathlineto{\pgfpoint{128pt}{116pt}}\pgfusepathqstroke}          \begin{document}       \begin{tikzpicture}         \begin{axis}[             ybar stacked,             bar width=16pt,             axis lines*=middle,             axis on top=false,                       xtick={1.00},                     xticklabels={Enhanced   \\Operational \\Efficency},                     ymin=0, xmin=.95, xmax=1.1,                                     enlarge y limits=0.2,             after end axis/.code={                 \node at ({rel axis cs:0,0}|-{axis cs:0,0}) [anchor=east] {0};             },                                   nodes near coords, nodes near coords align={center},         ]           \addplot[             fill=cyan,             draw=none,             bar shift=0pt,             mark options={                 gray,                 thick                        },             mark=waterfall bridge           ] coordinates { (1, 22)  };           \addplot[             fill=orange,             draw=none,             bar shift=40pt,                     mark options={                 gray,                 thick                         },             mark=waterfall bridge 2           ] coordinates { (1,+3)  };                  \addplot[             fill=orange,             draw=none,             bar shift=80pt,           ] coordinates { (1,+8)  };                           \addplot[             fill=orange,             draw=none,             bar shift=120pt,                     mark options={                 gray,                 thick             },             mark=waterfall bridge 3           ] coordinates { (1,-33)  };              \end{axis}       \end{tikzpicture}          \end{document}


title: Beamer/TikZ shadow printed via Adobe Reader (PostScript) cause errors

text: Consider the example below compiled using `pdflatex`. Basically it is a simple test of the Frankfurt theme and the Whale color theme (just attempting to make something smaller). We experience problems with this example when printed on our Konica Minolta C360. When we print from Adobe Reader, on Linux (or Mac, or from Windows using a PostScript Driver), the print is ignored. Prints fine if printed on Canon, HP or Oki, also print fine if we do not use Adobe Reader! AR also prints on the KM, if the file is made using `latex+dvips+ps2pdf`. I'm having some discussions with KM as to what the problem is. Here are a few interesting observations. If I print the PDF to a PS file on Linux using AR 8, the Adobe Distiller 9 on Win7, complain and recreate a PDF that is flawed. AR X on Win 7, freezes if I attempt to print the PDF to a file. The main problem in the PDF is the shadow, there is no problem if I remove the shadow. Does anyone know if there are Adobe problems in regards to some of the shadings used by TikZ? (when compiling with `pdflatex`) I can provide some of the generated files if needed. I use an up to date TL 11 system to create the offending PDF. Any comments?               \documentclass[handout]{beamer}     \usepackage{tikz}     %\usetheme{Frankfurt}          \makeatletter     \def\beamer@themerounded@shadow{true}     %\def\beamer@themerounded@shadow{false}     \setbeamertemplate{title page}[default][colsep=-4bp,rounded=true,shadow=\beamer@themerounded@shadow]     \usecolortheme{whale}     \title{Test}     \author{}     \date{}     \begin{document}     \begin{frame}     \titlepage     \end{frame}     \end{document}


title: Upgrade Mac TeXnicle

text: I upgraded TeXnicle to 2.2.8 on my Mac. Now, I have a problem with making a PDF. Only the first page of the PDF appears and other pages are gray and they disappear. I think that the new version 2.2.8 has some bugs but I don't sure.


title: Cross referencing: zref-xr does not detect .aux file of second document

text: So I am trying to crossreference labels across two documents: `draft.tex` and `appendix.tex`. When compiling I get the following error message:               ./draft04.tex:16: Package zref-xr Warning: File `appendix.aux' not found or    empty,(zref-xr)                labels not imported on input line 16.      These are the two preamples of the documents including an example of a label and a reference. First `draft.tex`:               \documentclass[11pt]{article}          \usepackage{mla}     \usepackage{graphicx}     \usepackage{wrapfig}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{csquotes}     \usepackage[document]{ragged2e}     \usepackage[english]{babel}     \usepackage[backend=biber,style=mla]{biblatex}     \usepackage[hidelinks]{hyperref}     \usepackage{zref-xr,zref-user}     \zexternaldocument*{appendix}     \providecommand{\biburldatelong}{}     \bibliography{biblio.bib}          \begin{document}     ...     see \ref{fig:01_examples}.     ...     \end{document}      Then `appendix.tex`:               \documentclass[11pt]{article}          \usepackage{mla_appendix}     \usepackage{graphicx}     \usepackage{wrapfig}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{csquotes}     \usepackage[document]{ragged2e}     \usepackage[english]{babel}     \usepackage[hidelinks]{hyperref}     \usepackage{zref-xr,zref-user}     \zexternaldocument*{draft04}     \providecommand{\biburldatelong}{}          \begin{document}     ...     \listoffigures     \newpage          \begin{figure}         \includegraphics[width=\textwidth]{img/01introduction/card_blackOps.jpg}         \caption{Testing the crossreference}         \label{fig:01_examples}     \end{figure}          ...     \end{document}      These two documents are in the same directory. I really have no idea, why the `appendix.aux` is not found, since I can open it and it does contain this line, which I thought was needed for the crossreference:               \newlabel{fig:01_examples}{{1}{2}{Testing the crossreference\relax }{figure.1}{}}      What am I doing wrong? Help would be very much appreciated.


title: Figure source caption problem - strange space between text and url

text: Following Add source to figure caption I created new command called `\captionsource`:               \newcommand*{\captionsource}[1]{%         \caption*{%             Source: \url{#1}         }%     }      As you can see on the screenshot short url is displaying fine, but longer has strange space between Source text and url. How can I fix this problem? ![caption problem](http://i.stack.imgur.com/3T7vU.png) MWE: https://www.writelatex.com/read/bfndzmpyrqtz


title: How to link an answer to a specific question with exercise package?

text: I am typesetting some exercises with the following structure,               Exercise 1     Some introductory text.     1.1 The first question?     1.2 The second question?      Using the exercise package I can accomplish this in the following way,               \begin{Exercise}         Some introductory text.         \Question The first question?         \Question The second question?     \end{Exercise}      Now I want to type an answer to each question. The only way I found to do this is by setting the numbering myself in the answer,               \begin{Answer}[number=1.1]         The answer to Question 1.1.     \end{Answer}     \begin{Answer}[number=1.2]         The answer to Question 1.2.     \end{Answer}      which will eventually fail when the order of exercises/questions changes. What is the right way of doing this? How can I link an individual answer to each of the questions?


title: Package conflict when using the combine document class

text: The following code demonstrates two types of errors, which I think are fundamentally the same. The code should format as is; now remove the % in front of \usepackage{semantic}. Reformatting fails to produce a PDF file. Now re-comment \usepackage{semantic} and un-comment \usepackage{titling}. Reformatting gives en error involving the footnote in a title. Unfortunately, I need both packages in my document.               \documentclass[book]{combine}     \usepackage[english]{babel}     \usepackage{blindtext}     \usepackage{filecontents}     \usepackage{alltt}     %\usepackage{semantic}     %\usepackage{titling}          % The input articles     \begin{filecontents*}{inputDoc1.tex}     \documentclass{article}     \usepackage[english]{babel}     \usepackage{blindtext}     \usepackage{alltt}     \@ifclassloaded{combine}       {\let\@begindocumenthook\@empty}       {}     \makeatother     \begin{document}     \title{First article\footnote{my footnote}}     \author{Author of first article}     \maketitle          \section{first section}     \blindtext[3]     \begin{alltt} \(10\sp{-6}\) \end{alltt}\end{document}     \section{Second section}     \end{document}     \end{filecontents*}          \begin{filecontents*}{inputDoc2.tex}     \documentclass{article}     \usepackage[english]{babel}     \usepackage{blindtext}     \usepackage{alltt}     \@ifclassloaded{combine}       {\let\@begindocumenthook\@empty}       {}     \makeatother     \begin{document}     \title{Second article}     \author{Author of second article}     \maketitle     \section{first section}     \blindtext[1]     \begin{alltt}      \textbf{deterministic} \textbf{assume}(|A - A'| < \(10\sp{-6}\) and                           |B - B'| < \(10\sp{-6}\)) \{        C = parallel_matrix_multiply_float(A, B);\vspace{3pt}      \} \textbf{assert}(|C - C'| < \(10\sp{-6}\));     \end{alltt}     \end{document}     \end{filecontents*}               % Define abstract to be used in book class (or use report)     % http://tex.stackexchange.com/questions/51483/how-to-write-abstract-and-acknowledgement-in-book-format          % The main document     \begin{document}     \title{The collection}     \author{A. N. Editor}     \date{\today}     \maketitle          \chapter{First chapter}     \section{Introduction}     \ldots     \begin{papers}[]         \coltoctitle{First article}         \coltocauthor{Author of first article}         \import{inputDoc1}     \end{papers}          \chapter{Second chapter}     \section{Introduction}     \ldots     \begin{papers}[]         \coltoctitle{Third article}         \coltocauthor{Author of third article}         \import{inputDoc2}     \end{papers}          \end{document}


title: How to make the first page of index fancy

text: I have a file called index.tex that looks like this:               \begin{theindex}     \item apple, 39     \item banana, 23      ... lots more of this stuff stretching over say 4 pages     \end{theindex}      I include it in a MWE as follows:               \documentclass[12pt]{article}     \usepackage{lastpage}     \usepackage{fancyhdr}     \cfoot{}     \rfoot{Page \thepage/\pageref{LastPage}}     \pagestyle{fancy}          \begin{document}     hello \newpage     hello \newpage     hello \newpage          \include{index}          \end{document}      The problem is that the page style of the first index page is not fancy, it only indicates the page number in the cfoot. What can be done to force this first page to have the same formatting of the rest of the document?


title: Saving a list in a re-usable box

text: Pardon me if this is a dumb question, but I am a bit rusty about this. I want to store a list like one generated by the `enumerate` environment in a re-usable box that I may re-use within a `TikZ` picture and elsewhere. In a manner of speaking, `fancybox.sty` does this with an actual framed box rather than a re-usable box. Naively, I am looking to do something like:               \documentclass[a4paper,12pt]{article}     \begin{document}     \newsavebox{\enumbox}     \sbox{\enumbox}{%     \begin{enumerate}         \item Title         \item Abstract         \item Keywords         \item Outline     \end{enumerate}     }     {\centering\usebox{\enumbox}}     \end{document}      Of course, the above does not work because it is neither a `parbox` nor an `lrbox`. Is there any package that does this? Otherwise, what do I have to do to get what I am seeking? Thanks in advance.


title: Too much vertical space when displaying formulas in LyX

text: When I display formulas in LyX, it leaves way too much space between the text. The commands I have used are Insert -> Math -> Display Formula and Insert -> Math -> AMS multline Environment. However, the PDF looks exactly the same: ![enter image description here](http://i.stack.imgur.com/s0sqE.jpg) Is there a way to display formulas while not going beyond "double spaced"? Are there any packages to add which will avoid this problem? **EDIT** : Problematic portion exported to Latex (plain)               {\large \par}      \begin{multline*} K_{0}(\theta)=\lbrace\langle m;b_{1},b_{2},\ldots\rangle_{\theta}:b_{j}\,\text{is eventually even and }\lim_{j\to\infty}b_{j}n_{j}\Vert n_{j}\theta\Vert=0\rbrace,\ K_{1}(\theta)=\lbrace\langle m;b_{1},b_{2},\ldots\rangle_{\theta}:\sum_{j=1}^{\infty}|b_{j}|n_{j}||n_{j}\theta||<\infty\rbrace. \end{multline*}


title: Simple example of pgfmath

text: I'm trying a small educational example using `pgfmath`. I want to calculate the minimum of a list of numbers. More accurately, I have a list of (number,string)-pairs, and I want the minimum of all the numbers. My `\calculateMin` command (see below) first uses a `\foreach` loop to build up a temporary list comprising just the first components. It then takes the minimum of that using `pgfmath`'s built-in `min` function. ## Code               \documentclass{article}          \usepackage{tikz}          \begin{document}          \newcommand*\calculateMin[1]{%       \def\mylist{}%       \foreach \i/\j in {#1} {%         \edef\mylist{\mylist,\i}%       }%       \pgfmathparse{min(\mylist)}\pgfmathresult%     }          Minimum of (8/ignore,7/this,2/second,5/component)      is \calculateMin{8/ignore,7/this,2/second,5/component}.          \end{document}      ## Result > Minimum of (8/ignore,7/this,2/second,5/component) is 16383.0. The result should be "2". What's going on?


title: Problem using align* using [ ] and ( )

text: i'm having trouble with `align*` when i'm using any type of parenthesis. Here is the code:               \begin{align*}       V_o^\prime  &= A(V_2^+ -V_2^-) \\                            &= A\left[0-\left(R_1\frac{V_o-V_o^'}{R_1+R_2}+V_o\right)\right] \\  !!!!!!!!!     V_o^\prime (R_1 +R_2)   &=  -AR_1V_o +AR_1V_o^\prime -AR_1V_o-AR_2V_o   \\               &= -2AR_1V_o +AR_1V_o^\prime -AR_2V_o               \\       \end{align*}      The line with `!!!!` is the line that is troubling. I have already removed it from the code and the file compile perfectly               **Error message**          ! Missing } inserted.     <inserted text>     }     l.75 \end{align*}


title: Make Bibliography part and Conclusions part appear in the same page

text: I have a part of the document where the **Conclusions** and then the **Bibliography** are exposed, just as I show here: ![enter image description here](http://i.stack.imgur.com/lsTEp.png) **Conclusions** is introduced with this code:               \chapter*{Conclusions}     \addcontentsline{toc}{chapter}{Conclusions}     \label{conclu}          Here we outline the principal conclusions of the work presented:      **Bibliography** is introduced with this code:               (final line of the written Conclusions)          \clearpage       \addcontentsline{toc}{chapter}{Bibliografía}   %%% This two lines are added in order that the Bibliography part appear in the index as "Bibliografía", and the page.               \bibliographystyle{ieeetr}     \bibliography{./bibliography}        The `clearpage` followed by the `\addcontentsline{toc}{chapter}{Bibliografía}` is necessary in order to make **Bibliografía** appear in the index, with its page. I would like the `Bibliografía` part start just after the last line of Conclusions, and also having **Bibliografía..........page** in the index. How should the upper codes be modified in order to achieve this ? Here is my preamble:               \documentclass[12pt,a4paper,twoside,openany]{report}     \usepackage[left=2.5cm,top=2.5cm,right=2.5cm,bottom=2.5cm]{geometry}     \parindent 1 true cm     \usepackage{graphicx}     \usepackage{eufrak}     \usepackage[spanish]{babel}     \usepackage[latin1]{inputenc}       \usepackage[T1]{fontenc}     \usepackage{times}     \usepackage{amsmath}     \usepackage{multirow}     \usepackage{float}     \usepackage{color}         \usepackage[longnamesfirst,super]{natbib}      \setcitestyle{square}     \usepackage{fancyhdr}        \pagestyle{fancy}                                             \renewcommand{\chaptermark}[1]{\markboth{\thechapter .\ #1}{}}                  \renewcommand{\sectionmark}[1]{\markright{\thesection .\ #1}{}}     \lhead{\nouppercase}     \rhead{\nouppercase}     \fancyhead[LE]{{\sf \leftmark}}                                  \fancyhead[RE]{}     \fancyhead[RO]{{\sf \rightmark}}     \fancyhead[LO]{}                                                     \fancyfoot[LE,RO]{\thepage}                                                \fancyfoot[CE,CO]{}                                                              \renewcommand{\headrulewidth}{0.0pt}                                     \renewcommand{\baselinestretch}{1.25}     \usepackage{adjustbox}     \usepackage{enumerate}     \usepackage{courier}     \usepackage{caption}     \usepackage[version=3]{mhchem}     \usepackage{rotating}     \usepackage[percent]{overpic}     \captionsetup{font={small}}     \begin{document}      Thanks.


title: How to choose good values for findent and nindent?

text: I'm using the `lettrine` package with the default two-line initials (so that I can use `findent` and `nindent`). My problem is typographical rather than TeXnical: how do I choose good values for these parameters? Of course, one has to take the shape of the letter into account, but the case especially tricky for me is when the first word is an "I" (the text is in English). What value for `findent` (the space between the "I" and the next word would you suggest? More importantly, should I set the next line closer or farther to the initial? (I guess closer is better - but _by how much_?) I'm using Linux Libertine, in case anyone's wondering, but I wouldn't expect the "right" values to vary very much with the font. In the answers, I'd be most pleased if you not only gave some suggested answers to these two particular problems, but also some general hints about how to wisely choose these values. (Perhaps turning this question into cw is a good idea?)


title: Suppress author after first citation

text: Is there a way to cite a work without its author? For example, I need to cite Thomas Aquinas' _Summa Theologiae_ , and since that work is so common, there is no need to include the author after the first citation. The desired output is > 1 Thomas Aquinas. _Summa theologiae. pars prima, a quaestione I ad > quaestionem IL_. vol. 4. Rome: Typographia Polyglotta, 1888, I, q. 44, a. 1, > ad 3.   >  2 _Test_ , p. 43.   >  3 _S.Th._ I, q. 40, a. 1, ad 1. What happens now is: > 1 Thomas Aquinas. _Summa theologiae. pars prima, a quaestione I ad > quaestionem IL_. vol. 4. Rome: Typographia Polyglotta, 1888, I, q. 44, a. 1, > ad 3.   >  2 _Test_ , p. 43.   >  3 Thomas Aquinas. _S.Th._ I, q. 40, a. 1, ad 1. Note: I need this for the famous works (like the _Summa_ ), but not others. Here is a minimal example in LaTeX:               \documentclass[12pt]{book}          \usepackage[backend=biber, style=verbose-ibid, firstinits=true, citepages=omit]{biblatex}     \usepackage{filecontents}          \begin{filecontents}{test.bib}          @book{summa,       title       = {Summa theologiae},       booktitle   = {Opera omnia iussu Leonis XIII},       subtitle    = {pars prima, a quaestione I ad quaestionem IL},       shorttitle  = {S.Th.},       author      = {{Thomas Aquinas}},       publisher   = {Typographia Polyglotta},       location    = {Rome},       date        = {1888},       volume      = {4},     }          @book{someotherbook,       title = {Test},     }          \end{filecontents}          \addbibresource{test.bib}          \begin{document}          Here is some reference.\footcite[I, q.~44, a.~1, ad 3]{summa}          Here is another reference reference.\footcite[43]{someotherbook}          Here is another reference reference.\footcite[I, q.~40, a.~1, ad 1]{summa}          \printbibliography          \end{document}


title: How to use different preamble in subfiles root file and child file

text: I have both `\maketitle \tableofcontents` in the root file and child file when using `subfiles` package. When I compiling the child file, it works OK. But when I compiling the root file, the `title` and `author` information and an extra 'Content' are also appeared. I do not know how to erase these informations. I tried to use macros to control the actions. But it does not work very well. I have several puzzles. 1.Does the new definition of the variable in child file erased its value transfered from root file? 2.Is there a command to test if a variable here like `multiple` has already been difnied? 3.When debugging latex, how to output the value you definied in latex? 4.Are there any other graceful ways to achieve my aim? Thank you! Here is the root file named root.tex               \documentclass[a4paper, 12pt]{article}     \usepackage{subfiles}          \newif\ifmultiple  %\multipletrue means called by main file     \multipletrue          \author{Ct586}     \title{How to use subfiles}     \date{\today}          \begin{document}          \maketitle          \tableofcontents          \subfile{child}          \end{document}      Here is the child file named child.tex:               \documentclass[Dynamic.Network.Embryonic.Development.tex]{subfiles}          \newif\ifmultiple  %\multipletrue means called by main file     %\multipletrue     \ifmultiple         \begin{document}     \else         \author{Ct586}         \title{How to use subfiles}         \date{\today}         \begin{document}           \maketitle               \tableofcontents     \fi               \section{child}     child          \end{document}


title: sub-numeration using multlined

text: Hi I used multlined to produce this but I would like to get a sub-numeration for each 3 equations for example 1.a, 1.b 1.c with correspondent labels. ![equations](http://i.stack.imgur.com/wUHLr.png) here is the code               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage{amsmath,mathtools,relsize}     \begin{document}          \begin{equation}     \begin{multlined}[.7\textwidth]     U_{shock}= + \mathlarger{\frac{\gamma-1}{2}}\\[5pt]     \shoveleft{U_{rare}=-\frac{2c_{II}}{\gamma-1}\left[ \-\left(\frac{p_I}{p_{II}}\right)^{\frac{\gamma-1}{2\gamma}}\right]=F(p_I)\,;}\\[5pt]     \shoveleft{U_{vac}=\frac{2(c_I+c_{II})}{\gamma-1}=F(0)\,.}\\[5pt]     \end{multlined}     \end{equation}          \end{document}      In my case, as I said I would like to have a numeration like (3.7a) (3.7b) (3.7c) Tks!


title: Magnify part of picture with TikZ spy, expressed in relative scoped coordinates

text: I want to magnify part of a picture with the TikZ spy library; however, with a scope for using relative coordinates like in #9561 Drawing on an image with TikZ. Provided I'm using the image tux.png - consider this MWE:               \documentclass[%       12pt,       journal,       onecolumn,       twoside,       draftcls,       letterpaper,     ]{IEEEtran}          % wget http://i.stack.imgur.com/aVGcn.png -O tux.png          \usepackage[nopar]{lipsum}     \usepackage{xstring}     % http://tex.stackexchange.com/a/26808/2595     \makeatletter     \def\unpacklipsum#1#2#3{%       \count@=#1\relax       \advance\count@\m@ne       \def#3{}%       \loop\ifnum\count@<#2\relax         \advance\count@\@ne         \edef#3{#3\csname lipsum@\romannumeral\count@\endcsname}%       \repeat}     \makeatother     % http://tex.stackexchange.com/a/168754/2595     \def\loremnchars[#1]#2{%       \unpacklipsum{#1}{#1}{\myunpacked}%       \StrMid{\myunpacked}{1}{#2}% same as \StrLeft{\myunpacked}{#2}     }               \usepackage{caption}     \usepackage{tikz}     \usetikzlibrary{shapes}     \usetikzlibrary{spy}          \begin{document}          \begin{center}       \begin{tikzpicture}[         spy using outlines={%           draw=red,           ellipse,           red,           magnification=2,           connect spies         }       ]         \node [draw=black, anchor=south west, inner sep=0pt] (myimg) at (0,0) {           \includegraphics[width=0.9\textwidth]{tux.png}         };         \begin{scope}[           x={(myimg.south east)},y={(myimg.north west)},           spy using outlines={%             draw=red,             ellipse,             red,             magnification=2,             connect spies           }         ]           \draw[help lines,xstep=.1,ystep=.1] (0,0) grid (1,1);           \node[             draw=red,ellipse,line width=1pt,minimum width=0.9cm,minimum height=5.25cm           ]           at (0.53,0.7) {};           \spy[             draw=red,ellipse,line width=1pt,minimum width=0.9cm,minimum height=5.25cm           ]           on (0.53,0.7) in node [left] at (0.8,0.825);         \end{scope}       \end{tikzpicture}       \captionof{figure}[justmy]{Just my image; \loremnchars[5]{255} ...}       \label{fig:test}     \end{center}          \end{document}      It produces this image: ![test71.png](http://i.stack.imgur.com/BAl57.png) The first `\node ... at (0.53,0.7)` is merely to indicate the area that I want to be spied on. Two problems are visible:   * The same settings as used for that `\node`, when applied to a `\spy`, result with an ellipse smaller than the originally requested one   * Apparently, since a scope is used, the `\spy` doesn't "see" any graphics (more precisely, image pixels) "below", so it seemingly only zooms in the grid. Can I use this kind of a setup of `\includegraphics` and `scope` inside a `tikzpicture`, but still obtain a proper `\spy`, expressed in relative coordinates - and if yes, how?


title: Missing lines in table in beamer

text: I am trying to create a simple table in beamer. My code is               \documentclass[11pt]{beamer}          \usepackage[english,greek]{babel}     \usepackage[iso-8859-7]{inputenc}     \usepackage{kerkis}     \usetheme{Air}     \usepackage{thumbpdf}     \usepackage{wasysym}     \usepackage{ucs}     %\usepackage[utf8]{inputenc}     \usepackage{pgf,pgfarrows,pgfnodes,pgfautomata,pgfheaps,pgfshade}     \usepackage{verbatim}     \usepackage{tikz}     \usepackage{pifont}     \usepackage{tabularx}     \usepackage{multicol}     \usepackage{multirow}     \definecolor{Darkgreen}{rgb}{0,0.4,0}     \newcommand*\diff{\mathop{}\!\!\mathrm{d}}     \newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}     %\usepackage[table]{xcolor}          \newcommand{\eng}[1]{\latintext#1\greektext}     \newcommand{\gr}[1]{\selectlanguage{greek}#1\selectlanguage{english}}     \newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}          \title{\eng{Analyze this}}     \subtitle{\eng{Pitfalls, Analysis, Results}}     \author{Αθανάσιος Σταματόπουλος}     %\date{September 6th 2006}          \begin{document}          \begin{frame}       \frametitle{\eng{Benchmarking Results for $^{nat}B$@$170^\circ$}}       \begin{table}[h]         \begin{tabular}{|c|c|c|c|c|}           \hline\\           \multirow{2}{*}{\eng{Energy}} & \eng{Chiari 10} & \eng{Chiari 10} & \eng{Chiari 10} & \eng{Chiari 10}\\           & \eng{Chiari 11} & \eng{Mayer($165^\circ$) 11} & \eng{Chiari($165^\circ$) 11} & \eng{Rihet 11}\\           \hline\\           $1500$ & $-17.13$ & $-$ & $-$ & $-$\\           \hline\\           $2250$ & $-16.98$ & $-4.74$ & $-18.70$ & $-$\\           \hline\\           $2800$ & $+2.15$ & $-$ & $-$ & $-$\\           \hline\\           $3300$ & $-17.17$ & $-$ & $-$ & $-18.65$\\           \hline         \end{tabular}       \end{table}     \end{frame}     \end{document}      My output is the following ![enter image description here](http://i.stack.imgur.com/iKxPv.png) Why aren't all the lines filled? what can be done to fix this?


title: moving label of arrow

text: How can I shift the `F_{2}(f')` label so that it isn't touching the arrow?                \usepackage[all]{xy}         \SelectTips{xy}{12}         \[ \xymatrix{ A \ar@{<->}[rrrr]^{F_{1}(h' \circ g')} \ar@{<.>}[rrd]_{F_{1}(g')} \ar@{<->}[dd]_{ F_{2}(f'')} &&&& C \ar@{<->}[dd]^{F_{2}(f)} \\         && B \ar@{<.>}[rru]_{F_{1}(h')} \ar@{<->}[dd]^{F_{2}(f')} \\         A' \ar@{<->}'[rr]^{F_{1}(h \circ g)}[rrrr] \ar@{<.>}[rrd]_{F_{1}(g)} &&&& C' \\         && B' \ar@{<.>}[rru]_{F_{1}(h)} }


title: How to define a sort of reference in METAPOST?

text: Assume we are defining a `canvas` abstract data type in METAPOST, where some tasks are gathered. I would like to define a kind of _reference_ to the last added task, but I do not know METAPOST good enough to figure out which macro concept I should use. Here is a no-op code illustrating the use of such a reference:               def task text TASK =       vardef TASK.init =       enddef;     enddef;          def canvas text CANVAS =       numeric CANVAS._task_n;       task CANVAS._task[];            vardef CANVAS.init =         #@._task_n := 0;       enddef;            vardef CANVAS.current_task =         #@._task[#@._task_n]       enddef;            vardef CANVAS.add_task =         #@._task_n := #@._task_n + 1;         % #@.current_task.init; % ! Yield an isolated expression `init`         #@._task[#@._task_n].init;       enddef;          enddef;          canvas c;     c.init;     c.add_task;     bye;      How can I correctly define the `current_task` macro, so that I can modify the `add_task` macro to refer to the `current_task` instead of `#@._task[#@._task_n]` (as suggested in the comment)?


title: Reducing the REAL size of an image (compressing) when using \includegraphics

text: I know when downscaling images we can just use the `scale` option. But as far as I know, this doesn't change the size of the overall output (let's say the PDF file).               \begin{figure}     \centering     \includegraphics[trim=1cm 6.1cm 6cm 14.0cm, clip=true, scale=0.3]{figs3.pdf}     \caption{The averaging blocks with $W=2$.}     \label{fig:theAvgBlock}     \end{figure}        1. Is there anyway to compress the figure when we downscale using `scale` option?    2. When we `trim` the figure, and `clip=true`, does it through away the extra parts? In other words, does it decrease the size of the figure?    3. Is there anyway to compress images inside Latex ?  The original problem is that I am using `zoombox` to include magnified subfigures of a BIG image, but I want to put a figure with smaller size instead of the full high-quality figure. (because of size limitation) At the same time, I want the magnified figures to be from the high-quality figure. Any ideas how to do this?


title: Tikz : how to control length in 3D pictures?

text: I tried to draw a sphere with tikz with isometric projection or oblique projection (perpective cavalière in french). For oblique projection you have to put a scaling factor (scal < 1) for distance on the x axes. But if I want my sphere to look like a not distorted sphere, I have to put a scaling of zero. Thus, I obtain a projection in (yz) plane. Hereafter is my tikz source code, you can easily switch between isometric and oblique projection :               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{}          \usepackage[active,tightpage]{preview}     \PreviewEnvironment{tikzpicture}     \setlength\PreviewBorder{2mm}          \tikzstyle{cavaliere} = [x={(-0.866cm,-0.5cm)},y={(1cm,0cm)},z={(0cm,1cm)}]     \tikzstyle{isometrique} = [x={(-0.866cm,-0.5cm)},y={(0.866cm,-0.5cm)},z={(0cm,1cm)}]     \tikzstyle{mesh} = [color=gray, opacity=0.4]          \begin{document}          %     % norm selection :     %     %   if(isometrique)     %     \begin{tikzpicture}[isometrique]            \def\scal{1.}          %   else if(cavaliere)     %     %\begin{tikzpicture}[cavaliere]     %       \def\scal{0.3}     %              \coordinate (O) at (0,0,0);         \draw[->] (O) -- ({\scal * 3},0,0) node[below] {x};         \draw[->] (O) -- (0,3,0) node[below] {y};         \draw[->] (O) -- (0,0,3) node[right] {z};              \def\r{2.}              % meridiens         % \rho joue le role de theta             \foreach \phi in {0,10,...,170} {             \draw[mesh] ({\scal * \r * cos(\phi)}, {\r * sin(\phi)}, 0)                 \foreach \rho in {5,10,...,360} {                     --({\scal * \r * cos(\phi) * cos(\rho)}, {\r * sin(\phi) * cos(\rho)}, {\r * sin(\rho)})             } -- cycle;         }              % parallels         \foreach \rho in {-60, -40, -19.57, 0, 19.57, 40, 60} {             \draw[mesh] ({\scal * \r * cos(\rho)}, 0, {\r * sin(\rho)})                  \foreach \phi in {5,10,...,360} {                     -- ({\scal * \r * cos(\rho) * cos(\phi)}, {\r * cos(\rho) * sin(\phi)}, {\r * sin(\rho)})                 } -- cycle;         }     \end{tikzpicture}          \end{document}      Do you know how to draw a correct sphere in oblique projection. I prefer that one because the view of what I put into the sphere is better than in isometric projection. Thanks EDIT : axes z vertical               \begin{tikzpicture}[x={(-0.385cm,-0.385cm)},y={(1cm,0cm)},z={(0cm,1cm)},scale=4]          \coordinate (O) at (0,0,0);     \draw[->] (O) -- (2,0,0) node[below] {x};     \draw[->] (O) -- (0,2,0) node[below] {y};     \draw[->] (O) -- (0,0,2) node[right] {z};          \foreach \z in {-0.98,-0.96,...,0.98}  {%      \begin{scope}[canvas is xy plane at z=\z]         \draw[gray] (0,0) circle ({sqrt(1-\z*\z)});       \end{scope}}           \begin{scope}[canvas is zy plane at x=0]        \draw (0,0) circle (1cm);        \draw (-1,0) -- (1,0) (0,-1) -- (0,1);     \end{scope}          \begin{scope}[canvas is zx plane at y=0]        \draw (0,0) circle (1cm);        \draw (-1,0) -- (1,0) (0,-1) -- (0,1);     \end{scope}          \begin{scope}[canvas is xy plane at z=0]        \draw (0,0) circle (1cm);        \draw (-1,0) -- (1,0) (0,-1) -- (0,1);     \end{scope}                 \end{tikzpicture}        Thus I obtained ![enter image description here](http://i.stack.imgur.com/EUN61.png)


title: Something's wrong with tocloft

text: I want the right margin of TOC to be straight. Instead of this Latex violates the bound (Pic. 1). If babel is commented out (with the last \addcontentsline), the result is still buggy (Pic. 2). Apparently, some of the words could be carried over to the next lines even without hyphenation. Here is the minimal working example.               \documentclass{book}     \usepackage[russian]{babel}     \usepackage[titles]{tocloft}          \renewcommand{\cftchapleader}{\cftdotfill{\cftdotsep}}     \cftsetrmarg{4cm}          \begin{document}       \tableofcontents            \addcontentsline{toc}{chapter}{Well it certainly is better if you activate the hyphenation pattern for french. This will "split" the berger. It also helps if you remove the stretchable space in the spacing command inserted  Well it certainly is better if you activate the hyphenation pattern for french. This will "split" the berger. It also helps if you remove the stretchable space in the spacing command inserted }            \addcontentsline{toc}{chapter}{Blossom blossom blossom blossom blossom blossom test test test blossom blossom blossom blossom blossom blossom blossom blossom blossom blossom blossom blossom blossom blossom blossom blossom blossom blossom blossom blossom}            \addcontentsline{toc}{chapter}{Bbbbbbb bbbbbbbbbb bbbbbbb bbbbbbbbbb bbbbbb}            \addcontentsline{toc}{chapter}{Численные исследования разработанных алгоритмов}          \end{document}      ![Pic. 1](http://i.stack.imgur.com/859RD.png) **Picture 1 (above).** ![Pic. 2](http://i.stack.imgur.com/wh5lk.png) **Picture 2 (above).** **UPDATE.** The proposed solutions partially solved the problem. The remaining problems are shown on the Picture 3. The corresponding code is:               \documentclass{book}     \usepackage[english]{babel}     \usepackage[titles]{tocloft}          % Compulsory settings     \textwidth=170mm     \cftsetrmarg{6.35cm}          % Adviced (but not working) options     \renewcommand{\cftchapleader}{\penalty5000 \cftdotfill{\cftdotsep}}     \emergencystretch=10em     \sloppy               \begin{document}       \tableofcontents            \addcontentsline{toc}{chapter}{This line just demonstrates the right bound. Well it certainly is better if you activate the hyphenation pattern for french. This will "split" the berger. It also helps if you remove the stretchable space in the spacing command inserted  Well it certainly is better if you activate the hyphenation pattern for french. This will "split" the berger. It also helps if you remove the stretchable space in the spacing command inserted }            \addcontentsline{toc}{chapter}{Thisline demonstratesdemonstrates thewidthof posbbbbbbbbbbbbbbblegaps. Thisline demonstrates thewidthof possiblegaps.}            \addcontentsline{toc}{chapter}{Parameter parmeter parameter parammmeter Fibre Channel}          \end{document}      ![Pic. 3](http://i.stack.imgur.com/g219A.png) **Picture 3 (above).**


I'm working with a lot of images and not much text. When I compile the LaTeX document usually I have an image in every page and a lot of white space between them. These are pages from my LaTeX document. ![enter image description here](http://i.stack.imgur.com/C3W8e.png) I would like to have more images in a single page and text between an image and the other so ultimately I would like to have no white space in my document. So far I've try different approaches. Put figures together in a single page:               \begin{figure}     \includegraphics[width=\textwidth, height=\textheight, keepaspectratio]{figureB}     \includegraphics[width=\textwidth, height=\textheight, keepaspectratio]{figureA}     \end{figure}      Use `wrapfigure`:               \begin{wrapfigure}{r}{\textwidth}     \includegraphics[width=\textwidth]{figureA}     \end{wrapfigure}      Using `[H]`with `float`package. But at the end all this attempts require me to struggle with the figure dimension to fit them otherwise white areas reappear. Are there any way to make TeX automatically choose the dimension of the image for minimizing the white space and maximizing the image dimension? Or alternatively: How can I minimize the white space in other ways? This is a MWE with the first solution, however I don't know if is better to make a single figure with figure B and C or with A and B or C and D you can download the sample images here:               \documentclass[12pt,a4paper]{article}     \usepackage{graphicx}     \usepackage[utf8]{inputenc}     \usepackage{lipsum}     \usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}     \author{G M}     \title{Is possible to make LaTeX automatically choose the image size to minimize white space?}      \begin{document}     \maketitle     \lipsum[1-2]     \begin{figure}     \includegraphics[width=\textwidth, height=\textheight, keepaspectratio]{FigureA.jpg}      \end{figure}          \begin{figure}     \includegraphics[width=\textwidth, height=\textheight, keepaspectratio]{FigureB.jpg}      \caption{This image and caption is okay but the next image-caption go out of the page, this is because this caption is to long and the image width is fixed to textwidth I know if I don't write this in this caption this don't happen, I've write this caption so long to show you what happen to me many times \ldots}     \includegraphics[width=\textwidth, height=\textheight, keepaspectratio]{FigureC.jpg}      \caption{Oh no this caption can't be see goes out of the page \ldots How can I fix it?}     \end{figure}     \lipsum[3-5]     \begin{figure}     \includegraphics[width=\textwidth, height=\textheight, keepaspectratio]{FigureD.jpg}      \end{figure}          \end{document}


title: How to export a table?

text: I defined a table in LaTeX : `\begin{tabular}....\end{tabular}`. Now i want to export that table to an image (PNG or something}. It is possible? How can i do that?


title: How to add illustrations before chapter titles in ConTeXt?

text: I would like to add some TIFF format illustrations to my document. These have three features, though, which I do not know how to implement:   * These fill the entire page, ignoring margins.   * They appear on the pages immediately before chapter titles. If this if complex to implement, I can just place them manually.   * If the height and width ratio of the illustration does not match the height and width ratio of the page (A4), then the longest dimension should be cropped. E.g.:               . . ._._._._._. . .     .   |         |   .     .   |         |   .     . x |         | x .     .   |         |   .     .   |         |   .     . . |_._._._._| . .        * Dots represent the graphic.   * Lines represent the page dimensions.   * "x" is where the graphic was cropped, because it is wider than the page. The page layout looks like this:                _________ _________     |#########|         |     |#########| ===     |     |#########| ======= |     |#########| ======= |     |#########| ======= |     |#########|____2____|      How can I add graphics to my document in this manner?


title: Biblatex authoryear-ibid: Specific Changes in Bibliography

text: Firstly, thank you tex.stackexchange for being the best TeX-Reference on the web. I have been using the archives for months now and could always find answers to my questions. But now I am stuck: I'm using `biblatex` with the `authoryear-ibid` style. I need some specific changes in my bibliography. At the moment an `@incollection`-entry prints like this: > Einstein, Albert (1929). »Using LaTeX«. In: The Latex User's Guide. Edited > by Stephen Hawkins. New York: Publisher, p. 15-40. URL: > http:\\en.wikipedia.org. But I also have to reference the `@collection` which prints like this: > Hawkins, Stephen, ed. (1929). The Latex User's Guide. New York: Publisher. > URL: http:\\en.wikipedia.org. Now the 1st problem: The fact that the publisher, address and URL are printed in the `@incollection`-entry makes my bibliography artificially and unnecessarily long. What I want to have instead would be: > Einstein, Albert (1929). »Using LaTeX«. In: The Latex User's Guide. Edited > by Stephen Hawkins, p. 15-40. 2nd Problem: when the editor also was an author in the same `@collection` everything is printed twice, which also makes the bibliography artificially long. At the moment it prints like this > Hawkins, Stephen, ed. (1929a). The Latex User's Guide. New York: Publisher. > URL: http:\\en.wikipedia.org. > > --- (1929b). »Understanding LaTeX«. In: The Latex User's Guide. Edited by > Stephen Hawkins. New York: Publisher, p. 1-15. URL: http:\\en.wikipedia.org. But what I would prefer is that it prints something like this instead: > Hawkins, Stephen, ed. (1929a). The Latex User's Guide. New York: Publisher. > URL: http:\\en.wikipedia.org. > > --- (1929b). »Understanding LaTeX«. Edited by same in: The Latex User's > Guide, p. 1-15. (In German it would be:) > Hawkins, Stephens (1929b). »Understanding LaTeX«. _In ders.:_ The Latex > User's Guide, S. 1-15. How can I make that happen? Thank you very much EDIT: Mininmal Working Example (compiled with xelatex & biber)               \documentclass[12pt,a4paper,oneside]{memoir}          \usepackage[ngerman]{babel}     \usepackage[german=guillemets]{csquotes}          \usepackage[%                 style=authoryear-ibid,                 backend=biber,                 backref=true,                 backrefstyle=none,                 doi=false,                 isbn=false,                 maxcitenames=2,                 maxbibnames=2,                 ]{biblatex}          \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}     @collection{hawkins.1923,         editor  = "Hawkins, Stephen",         title   = "The Latex User's Guide",         year    = "1923",         publisher = "Publisher",         address = "New York",         url = "en.wikipedia.org",     }     @incollection{hawkins.1923b,         author = "Hawkins, Stephen",         title = "Understanding LaTeX",         crossref = "hawkins.1923",         pages = "1-15",     }          @incollection{einstein.1923,         author = "Einstein, Albert",         title = "Using LaTeX",         crossref = "hawkins.1923",         pages = "16-45",     }     \end{filecontents}          \bibliography{\jobname}           \begin{document}          \nocite{*}          \printbibliography          \end{document}


title: How to customize headers and footers?

text: I'd like to modify the contents of my headers and footers - e.g., to display the current chapter and/or section title or to change the pagination alignment. How can I do that? I've noticed the packages `fancyhdr` and `scrpage2` (part of the `KOMA-Script`-bundle) - are they interchangeable, or are there situations where I should prefer one package to the other?


title: Redefining \enumerate using \let - why does it behave this way and what can I do to bypass it?

text: The following code produces a result, that I find quite strange:               \documentclass{article}     \let\origenumerate\enumerate     \renewenvironment{enumerate}{\begin{origenumerate}}{\end{origenumerate}}          \begin{document}          \begin{enumerate}     \item{First}     \begin{enumerate}         \item{First-1}         \item{First-2}     \end{enumerate}     \item{Second}     \end{enumerate}          \end{document}      Actual result:                   1. First             (a) First-1         (b) First-2     2. Second      Expected result (as without third line in code):                   1. First             (a) First-1             (b) First-2         2. Second      Why is this so? How can I redefine \enurate to use custom \parskip and \itemsep without getting this kind of (bad) jokes? edit: I am using pdfTeX 3.1415926-2.3-1.40.12 (TeX Live 2011)


title: Conditional Compiling and \documentclass

text: I am quite new to latex and don't quite get it how to compile different versions of my presentation. If this is important: I am using pdflatex and beamer. There are three documentclasses I am currently using:   * `\documentclass{beamer}`   * `\documentclass[notes=only]{beamer}`   * `\documentclass[handout]{beamer}` I am currently using a makefile to compile the whole stuff which basicly invokes pdflatex like this: `pdflatex '\documentclass[notes=only]{beamer} \input{$(INPUT_FILE)}'` Which of course means my `.tex` file is missing the documentclass and can not easily be compiled without knowledge of my Makefile. And of course thats not quite desirable ... But how would I do better?


title: Caption does not work with wrapfig

text: The following code does not output the caption correctly, font appears in normal size, and "Figure" is not boldfaced.               \begin{wrapfigure}{r}{0.5\textwidth}       \vspace{-50pt}       \begin{center}         \includegraphics[width=0.48\textwidth]{figure.png}       \end{center}       \caption{bla bla bla}       \vspace{-20pt}       \label{fig4}     \end{wrapfigure}      I use at the beginning               \documentclass{IOS-Book-Article}     \usepackage{times}     \normalfont     \usepackage[T1]{fontenc}          \usepackage{amsmath}     \usepackage{breqn}     \usepackage{graphicx}               \usepackage{float}     \usepackage{caption}     \usepackage{wrapfig}     \usepackage{algorithm}     \usepackage{algorithmic}


title: Convert from PDF to EPS while keeping/outlining fonts

text: **Situation:** I have a PDF file which was generated by using a combination of tikz/pgf and Inkscape. It has all the correctly embedded fonts. It can be downloaded here. For example, using               pdffonts correct.pdf       gives               name                                 type              emb sub uni object ID     ------------------------------------ ----------------- --- --- --- ---------     UWTJCQ+CMR9                          Type 1            yes yes no      38  0     JXYBIE+CMR10                         Type 1            yes yes no      42  0     VUTWNB+CMMI10                        Type 1            yes yes no      46  0     DDXSBZ+CMR6                          Type 1            yes yes no      50  0     VNIEYM+CMSY9                         Type 1            yes yes no      58  0     UJXQAK+CMR8                          Type 1            yes yes no      54  0     AEBRGF+CMMI9                         Type 1            yes yes no      62  0      **Goal:** I have been asked to change this pdf to eps (for journal publication). I would like to do so with two versions:   1. Outlined fonts   2. Embedded fonts The final eps should have correct bounding boxes **Attempts for Outlined Fonts:** The solution by Maarten here and by the StackExchange people here proposes a solution by using GhostScript:               gs -dNOPAUSE -dNOCACHE -dBATCH -sDEVICE=epswrite -sOutputFile=your-output-file.eps  your-source-file.eps      This seems to work. The fonts look awful on screen, but seem to print correctly. **Attempts for Embedded Fonts:** The guide here suggests that the following commands will convert a pdf to an eps, and then adjust the bounding box _with the embedded fonts_. The commands are               pdftops -eps test.pdf     cat test.eps | ps2eps > test2.eps      and then the final output can be transferred back to pdf form and the embedded fonts verified               ps2pdf test.eps     pdffonts test.pdf      However, I tried this on the above file and it _does not work_. An eps is created using pdftops, and then the eps is changed back to a pdf, but the fonts have disappeared (using pdffonts). Can someone tell me how to change from pdf to eps and preserve embedded fonts? **UPDATE** Lev Bishop (below) discovered that the pdf had transparencies involved, which was causing pdftops to rasterize the image. In tracking down the transparency issue, I discovered a very strange bug in the 2010 version of pdflatex (or some other program pdflatex was calling). Takes a pdf image with an embedded font. And then compile a document with               \includegraphics{image.pdf}      The resultant pdf seems to have transparencies depending on whether one uses texlive2009, texlive2010, or texlive2011! Using the 2009 version, the resultant image is fine and does not have any transparencies. Using the 2010 version gives transparencies and using the 2011 version gives back something without transparencies. _Note_ : I don't have a direct way to check for transparencies, so I'm simply using               pdftops file.pdf test.eps     ps2pdf test.eps test.pdf      And then checking that test.pdf has or doesn't have embedded fonts. Thus, 2010 gives me a version with NO embedded fonts while 2009 and 2011 work fine.


title: texlive 2011 / ubuntu 12.04 and TeX Live Backports PPA

text: I've installed Texlive 2011 in Ubuntu 12.04 (64 bits) following this tuto : http://starlinq.livejournal.com/2542.html I've changed the PATH and so on in the ~/.profil file. But after that, I've enabled the TeX Live Backports PPA and downloaded its Texlive packages, without having uninstalled the first TexLive 2011 nor changed the PATH. As a result, I don't know which Texlive version I use, and what I have to do to "clean" my installation. Could you help me ?! A "latex --v" command in a terminal answered: > pdfTeX 3.1415926-2.3-1.40.12 (TeX Live 2011) kpathsea version 6.0.1 > Copyright 2011 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX). There is > NO warranty. Redistribution of this software is covered by the terms of both > the pdfTeX copyright and the Lesser GNU General Public License. For more > information about these matters, see the file named COPYING and the pdfTeX > source. Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh > (pdfTeX). Compiled with libpng 1.5.2; using libpng 1.5.2 Compiled with zlib > 1.2.5; using zlib 1.2.5 Compiled with xpdf version 3.02pl5 In Synaptic, all the texlive packages appear to come from the ppa (2012.20120529-1~precise1) Thanks for your help.


title: Indenting style of LaTeX files with Sublime Text

text: Here is a part of my LaTeX code and what I want it to be:               ...     \begin{table}         \begin{tabularx}{\textwidth}{|l|l|l|X|X|X|X|}     ...       However, if I re-indent it in Sublime Text 3, it becomes:               ...     \begin{table}     \begin{tabularx}{\textwidth}{|l|l|l|X|X|X|X|}     ...      Then the folding function is also invalid, how do I fix this? I'm using `LaTeXTools`.


title: How to draw polynom division?

text: I want to draw this scheme, but I do not know how to start. Please help me. ![enter image description here](http://i.stack.imgur.com/SwCXm.gif)


title: How to configure TeXLive search paths?

text: Every time I run `pdflatex` my whole home directory is scanned. It takes forever and one cpu core is at 100% usage. I'm using Ubuntu 12.04 TeXLive packages and can't find where this is set. `kpsepath tex | tr ':' '\n'` does not list my home directory directly only `~/texmf` and `~/.texmf`. Please help.


title: How to find the lost text part when having "Float(s) lost" error

text: I've lost some text. I don't know if theres something missing, so how can I find it? I'm not in the mood to compare the `chapter1.tex` to the `pdf` file by reading both. Chapter 1 (`chapter1.tex`) is rather long but it's the only hint I got. > [35] > > **! LaTeX Error: Float(s) lost.** > > See the LaTeX manual or LaTeX Companion for explanation. Type H for > immediate help. ... > > l.215 \include{chapter1} > > ? H You've lost some text. Try typing to proceed. If that doesn't work, type > X to quit. So... Whats your coping strategy with that error? (Except not making the error)


title: LaTeX Stretching the x-axis of the graph

text: I asked this question on Reddit and they told me to come here. I'm wondering if there is a way to stretch my graph, because it is narrow horizontally. Here is a picture: ![enter image description here](http://i.stack.imgur.com/7TG77.png)               \documentclass{article}     \usepackage{2130}     \begin{document}         \begin{figure}[h]             \begin{scaledpicture}{10}(4,16)(-2,-7)                 \xaxis \yaxis \xnums{1} \ynums{2}                 \ticks{1} [-0.1] \thicklines                 \input{graph1}             \end{scaledpicture}             \caption {The graph $f(x) = x^3+3$}         \end{figure}     \end{document}      The `2130.sty` package: https://gist.github.com/anonymous/4b9d6f43cf1daf727334 Any help will be appreciated


title: Texmaker's internal pdf-viewer doesn't work

text: I have just downloaded TeXmaker _("a free, modern and cross-platform LaTeX editor for linux, macosx and windows systems that integrates many tools needed to develop documents with LaTeX, in just one application")_ and it has a built-in PDF-viewer which doesn't seem to work. When I make a document, save it, then press watch PDF, it says that the document can't be found. Does anyone know what the problem is and how to fix it?


title: How can I make a Curriculum Vitae or Resume in *Tex with variable length?

text: I'd like to make a template of sorts for a Curriculum Vitae. While there seem to be plenty of examples online of CVs using TeX, I'm looking for an easy way to include everything in the file, but compile one of the following:   * Abbreviated (~1 pg) CV    * Academic CV (most things, but focusing on the academic side)   * Annotated CV (includes longer descriptions of various tasks)   * Exhaustive CV (everything!)   * Resume (less academic, more job experiences and skills) Essentially, I'd like to write all these things down _once_ and not have to re-write everything whenever I need to submit a different kind of CV or resume. It'd be neat to define either lists or entries of "publications," "hobbies," "academic_employment" and "nonacademic_employment", and output whatever things make sense given the type of CV or resume I want to make. Perhaps these entries could look like the following: (recognizing that underscores aren't great for command names :-) )               \cv_name{John Doe}     \cv_phone{777-777-7777}     \cv_email{JohnDoeIsCool@TheDoeDomain.com}     \cv_website{http://www.WebsiteOfJohnDoe.com}          \cv_degree{Big State University,Computer Science,Bachelors,1995}     \cv_degree{Big State University,Math,Bachelors,1995}   % double-major?     \cv_degree{University Of Big State,Math,PhD,1999}          \cv_job{Cashier,Joe's Bakery,01/01/1990,01/01/1995,555-555-5555,{I was a cashier but got tired of it.}}   % optional annotation?     \cv_job{Head Baker,Joe's Bakery,01/01/1990,01/01/1995,555-555-5555}      \cv_current_job{CEO,BakeriesAreUs,01/01/1995,666-666-6666}  % no end date needed for current job          \cv_publication{My Autobiography,\cite{myBook}}         % incorporate with BibTex?          \cv_award{Some Scholarship,1993}                        % no annotation     \cv_award{Nobel Peace Prize,2005,{I love humanity!}}    % annotated      Output could perhaps use flags and if statements, e.g. (in pseudocode):               make_academic_cv = true          output_name()     output_position()     output_contact_info()     output_education_background()          if (make_exhaustive_cv) or (make_resume) or (make_academic_cv) then        output_academic_employment()     endif          if (make_exhaustive_cv) or (make_resume) then        output_nonacademic_employment()     endif          if (make_exhaustive_cv) or (make_academic_cv) then        output_academic_awards()     endif          if (make_exhaustive_cv) or (make_academic_cv) then        output_publications()        output_conferences_and_presentations()     endif          if (make_exhaustive_cv) then        output_hobbies()        output_social_media_contact_info()     endif      Has anyone done anything like this before? One possible solution would be to adopt the BibTeX or glossaries model of having a "database" file of various kinds of entries, and then referencing the entries as needed in the main file. I haven't found a package to do this, but I'm definitely open to suggestions! I am not skilled enough to know how to do this myself, but could work with somebody else's code, if it were similar enough to what I'm looking to do. Perhaps it would be easier to show how to do just one or two of those macros (e.g. "\cv_degree{}"). Thanks in advance!


title: increasing margins for a single page in KOMA class

text: I am using the following KOMA document class               \documentclass[12pt,captions=nooneline,DIV=14, parskip=half]{scrartcl}      everything is fine except that at one point I include 4 pictures in one single page and, due to the margins, they all appear too small.               \begin{landscape}     \begin{figure}     \centering     \footnotesize      \caption{volume}\label{graph:volume}     \captionsetup{singlelinecheck=off,font=footnotesize}     \caption*{nice caption}     \hspace*{\fill}%       \subfigure[one]{\includegraphics[width=0.45\textwidth]{one.png}}\hfill        \subfigure[two]{\includegraphics[width=0.45\textwidth]{two.png}}        \hspace*{\fill} \\        \hspace*{\fill}%       \subfigure[three]{\includegraphics[width=0.45\textwidth]{three.png}}\hfill        \subfigure[four]{\includegraphics[width=0.45\textwidth]{four.png}}        \hspace*{\fill}%     \end{figure}     \end{landscape}      How can I specify some very small margins for **this page** only, without using the package geometry (that seems not compatible with the KOMA class) ? many thanks!


title: How to clean auxiliary files within subdirectories with latexmk

text: Well, the title is pretty much self-explanatory but for sake of clarity, I have latex paper with such structure:               .     ├── back_matter     │   └── some_tex_files.tex     ├── bibliography     │   └── bibliography.bib     ├── body_matter     │   ├── a_file.tex     │   └── another_file.tex     ├── graphics     │   └── some_images.png     ├── styles     │   ├── bib_style.bbl     │   └── paper_style.cls     ├── paper.tex     └── Makefile      And a `Makefile` like so:               .PHONY: paper.pdf          all: paper.pdf          paper.pdf: paper.tex         latexmk -pdf -pdflatex="pdflatex -interactive=nonstopmode" -use-make paper.tex          clean:         latexmk -CA      `make clean` successfully cleans all the auxiliary files in the `root` (`.`), however, it does not clean the auxiliary files created in the subdirectories. How to define a rule for cleaning all the `.aux` files within the subfolders? I should mention that I use `\input` to add the files to `paper.tex`. P.S. Is this make file well written?


title: \lettrine causes strange line breaks

text: Since I updated to ConTeXt 2012 and mkIV, each time I want to write a dropped capital I got a strange result (I mean, that extra line break) with the first line of the paragraph the dropped capital is located. It gets worse if I use it inside a `\columnset` environment.               \usemodule[lettrine]     \starttext     \lettrine{A}{fter the three} \input ward     \stoptext      This is what I got with this minimal example: ![Output of the minimal example provided for Lettrine.](http://i.stack.imgur.com/pp6Tg.png) Do you know how I can get rid of this? I must not update my ConTeXt installation yet...


title: compiled pdf doesn't show utf-8 character

text: If i compile a document with lualatex that contains specific utf-8 characters most pdf-viewers (okular, evince, xpdf) don't show them. For example if i compile the following example i just see a bank page. My tex/latex distribution is texlive 2014 and runs on a debian (jessie) system. Maybe someone around here have a solution how to make those glyphs visible?               \documentclass{scrartcl}          \usepackage{luatextra}     \usepackage{fontspec}     \setmainfont{Linux Libertine Display O}     \setsansfont{Linux Biolinum O}          \begin{document}     %     % specific unicode characters     %     ✧ ⎘ ✲     \end{document}


title: One Command to Rule Both Colored Text and Invisible Text

text: I have to send a paper to two different people. For the first person, I have a bunch of questions that I would like to add throughout the paper and in color. For the second person I don't want the questions to appear. Is there any command I could define that I could use to do this? For instance, define some kind of command \crazytext[parameter] so that when parameter=1 the text will be blue, but when parameter=0 it is not inserted into the paper. This way I put a 1 in the preamble for the person I want to see blue text and a 0 in the preamble for the person for which I don't want text compiled.


title: Removing blank space above bibliography items

text: How do I properly remove the space above bibliography inserted without the respective caption? Please see the screenshot below with the inconsistent spaces being delimited by red lines. Two-column layout has been obtained with the 'paracol' package. (I should mention here that using this package has no influence on the resulting extra space being added.) ![Inconsistent spaces; output generated using the enclosed MWE](http://i.stack.imgur.com/0oSZC.png) MWE used to generate the output:               \documentclass[11pt,a4paper]{article}     \def\section*#1{}          % let's get rid of the caption 'References'     \usepackage{bibunits}     \usepackage{paracol}     \setcolumnwidth{3cm,10cm}  % column widths     \begin{document}     \noindent\textbf{Published articles}     \par\begin{paracol}{2}       \noindent peer-reviewed\\journals       \switchcolumn       \begin{bibunit}\nocite{*}\putbib[pub]\end{bibunit}     \end{paracol}     \end{document}      BibTeX file pub.bib:               @article{art,         author  = {John Doe and Jane Smith},         title   = {Some witty paper title},         journal = {Journal},         year    = {2014},         volume  = {1},         number  = {2},         pages   = {1--5}     }      Please note that since the package 'bibunits' is used (I need to insert multiple bibliographies), one has to run BibTeX with the parameter 'bu1' instead of the name of the .bib file. I am aware of the topic 'Remove heading from bibunit' but the hack mentioned therein was unfortunately of no help. When I tried to remove the extra space via setting various dimensions/lengths to 0 pt, there was sometimes a slight change but the spaces were still far from equal. So, which parameter do I need to set to 0 pt to remove the extra space? Or - do I need to redefine section heading in some other way than `\def\section*#1{}`? So far the only thing that helped was using `\vskip\correction\vskip0pt` with `\correction` being an experimentally determined negative length, but this is more of a workaround rather than a solution. :/ Thanks. nvx


title: Preventing \MakeUppercase from affecting mathematics

text: Is there a way to prevent `\MakeUppercase` from affecting in-text equations? In this example, `abc` should change to `ABC`, but `n` should be left as it is.               \documentclass{article}     \begin{document}     \MakeUppercase{abc $n$}     \end{document}      The following works for individual characters, but I would like something more general.               \documentclass{article}     \begin{document}     \newcount\mycount     \mycount\mathcode`n     \MakeUppercase{abc $\mathchar\mycount$}     \end{document}


title: Switching from two columns to one column without adding a page break

text: I am trying to adapt this solution of multiple authors and multiple affiliations, i.e.:                     ![enter image description here](http://i.stack.imgur.com/xacog.png) to a format where, title and authors go in single column at the top of the first page, but the regular text flows in two columns. See a snapshot of the original template at the bottom of this post. I tried inserting `\onecolumn` prior to the author and title affiliations, and then immediately switching back to `\twocolumn`, but LaTeX creates a full page break before the regular text (abstract etc) is rendered. How can I avoid this page break?               \documentclass{article}     \usepackage{spconf,amsmath,graphicx}     \usepackage{url}     \usepackage{amssymb}     \usepackage{caption}     \usepackage[labelformat=simple]{subcaption}     \usepackage{calc}     \usepackage{enumitem}     \usepackage{kantlipsum}     \usepackage{array}          \newcommand\Mark[1]{\textsuperscript#1}          \begin{document}     \onecolumn     \begingroup     \centering     {\LARGE The Title \\[1.5em]     \large First Author\Mark{1}, Second Author\Mark{2}, Third Author\Mark{1}, Fourth Author\Mark{2} and Fifth Author\Mark{3}}\\[1em]     \begin{tabular}{*{2}{>{\centering}p{.25\textwidth}}}     \Mark{1}Department1 & \Mark{2}Department2 \tabularnewline     School1 & School2  \tabularnewline     \url{email1} & \url{email2}     \end{tabular}\par     \twocolumn     \endgroup          \begin{abstract}     This text should be back in two columns     \end{abstract}          \end{document}      ![enter image description here](http://i.stack.imgur.com/X7Ztx.png)


title: Create \eqref* (\eqref without link, i.e. starred eqref)

text: I want to create a command `\eqref*`, which is the same like `\eqref`, but without a clickable link. There are similar commands for `\ref` (`\ref*`) and `\autoref` (`\autoref*`) which achieve this behaviour, but not for `\eqref`.               \newcommand{\myeqref}[1]{(\ref*{#1})}      Would work, but I don't like the naming, and there is an additional problem: `\eqref` writes numbers upright even in italic math environment, `\ref` doesn't do this. Any help is appreciated. [ Edit: for search engines: eqref, eqref*, eqrefstar, starred eqref, eqrefasterisk, asterisked eqref, eqref star, eqref asterisk ]


title: fancyhdr page decorations and page numbering

text: Hello there are several examples of decorative pages. Most examples work with a single page,when numbering is not necessary. When i try to make for every page. It does not work, or i have problems with page numbers..see example below               \documentclass[a4paper]{article}     \usepackage{fancyhdr}     \usepackage[utf8]{inputenc}%     \usepackage[T1]{fontenc}%     \usepackage[english]{babel}     \usepackage{blindtext}     \newcommand{\wb}[2]{\fontsize{#1}{#2}\usefont{U}{webo}{xl}{n}}     \newcommand{\wbc}[3]{\vspace*{#1}\begin{center}         \wb{#2}{#2}#3\end{center}\vspace*{#1}}          \fancyhf{}     \lhead{\setlength{\unitlength}{1bp}%       \begin{picture}(0,0)         \put(-36,5){\makebox(0,0)[br]{\wb{36bp}{36bp}A}}         \end{picture}}     \rhead{\setlength{\unitlength}{1bp}%       \begin{picture}(0,0)         \put(29,5){\makebox(0,0)[bl]{\wb{36bp}{36bp}B}}         \end{picture}}     \lfoot{\setlength{\unitlength}{1bp}%       \begin{picture}(0,0)         \put(-36,-3){\makebox(0,0)[tr]{\wb{36bp}{36bp}C}}         \end{picture}}     \rfoot{\setlength{\unitlength}{1bp}%       \begin{picture}(0,0)         \put(29,-3){\makebox(0,0)[tl]{\wb{36bp}{36bp}D}}         \end{picture}}     \renewcommand{\headrulewidth}{0pt}     \pagestyle{fancy}          \begin{document}      \blindtext[10]       \wbc{2ex}{6}{IJLKIJLKIJLKIJLKIJ}           \blindtext[3]            \wbc{1ex}{8}{pq}               \end{document}      this woks fine but no page numbering becouse headers/footers are redefined here is another example               % $Id: sample1.tex,v 1.3 2002/09/13 06:34:25 loreti Exp $          \documentclass[10pt,twoside]{book}     \usepackage{fancyhdr,geometry,keyval,ifthen,makeidx,multicol,mparhack,poemscol}     \usepackage{times}     \geometry{textwidth=4in,textheight=6.75in}     \makeverselinenumbers     \global\includeaccidentalstrue     \global\includetypescriptstrue     \global\redundantemendationsfalse     \stanzaatbottom{*}     \nostanzaatbottom{\relax}     %\reversemarginpar     \usepackage{fancyhdr}          \newcommand{\wb}[2]{\fontsize{#1}{#2}\usefont{U}{webo}{xl}{n}}     %\newcommand{\wb}[2]{\fontsize{#1}{#2}\usefont{U}{webo}{xl}{n}}     \newcommand{\wbc}[3]{\vspace*{#1}\begin{center}         \wb{#2}{#2}#3\end{center}\vspace*{#1}}          %\fancyhf{}     %\lhead{\setlength{\unitlength}{1bp}%     %  \begin{picture}(0,0)     %    %\put(-36,5){\makebox(0,0)[br]{\wb{36bp}{36bp} %A}}      %   \end{picture}}     %\rhead{\setlength{\unitlength}{1bp}%      % \begin{picture}(0,0)      %   %\put(29,5){\makebox(0,0)[bl]{\wb{36bp}{36bp %}B}}       %  \end{picture}}     %\lfoot{\setlength{\unitlength}{1bp}%      % \begin{picture}(0,0)       %  \put(-36,-3){\makebox(0,0)[tr]{\wb{36bp}{36bp}C}}        % \end{picture}}     %\rfoot{\setlength{\unitlength}{1bp}%      % \begin{picture}(0,0)       %  \put(29,-3){\makebox(0,0)[tl]{\wb{36bp}{36bp}D}}        % \end{picture}}     \renewcommand{\headrulewidth}{0pt}     \pagestyle{fancy}     \lhead{\wb{12bp}{12bp}%          \begin{picture}(0,0)(59,0)     %{T}{\_}         %{R}{\_}{O}{\_}{F}{\_}{U}            \put(0,0){M}         \multiput(13,0)(13,0){30}{N}         \put(403,0){O}         \put(0,-533){P}         \multiput(0,-13)(0,-13){40}{S}         \multiput(13,-533)(13,0){30}{Q}         \put(403,-533){R}         \multiput(403,-13)(0,-13){40}{T}         \end{picture}         %\begin{picture}         %\multiput(-18,0)(18,0){24}{N}         %\put(450,0){M}         %\multiput(0,-18)(0,18){34}{T}         %\put(0,630){R}         %\multiput(18,0)(18,630){24}{Q}         %\multiput(0,18)(450,18){34}{S}         %\put(450,630){P}         %\end{picture}     %\vspace{length}     {   \normalfont \thepage}         }     \fancyhead[RH]{\flushright  \normalfont \thepage}          %\lhead{\thepage}     %\chead{}     \rhead{}     \cfoot{\vspace{2em}\thepage} % get rid of the page number      \renewcommand{\headrulewidth}{0pt}     \renewcommand{\footrulewidth}{0pt}     \begin{document}       The King and Queen of Hearts were seated on their throne       when they arrived, with a great crowd assembled about them       --- all sorts of little birds and beasts, as well as the       whole pack of cards: the Knave was standing before them,       in chains, with a soldier on each side to guard him; and       near the King was the White Rabbit, with a trumpet in one       hand, and a scroll of parchment in the other.  In the very       middle of the court was a table, with a large dish of       tarts upon it: they looked so good, that it made Alice       quite hungry to look at them --- ``I wish they'd get the       trial done,'' she thought, ``and hand round the       refreshments!''.  But there seemed to be no chance of this,       so she began looking at everything about her to pass away       the time.            \wbc{2ex}{6}{IJLKIJLKIJLKIJLKIJ}            Alice had never been in a court of justice before, but she       had read about them in books, and she was quite pleased to       find that she knew the name of nearly everything there.       ``That's the judge,'' she said to herself, ``because of his       great wig.''.            The judge, by the way, was the King, and as he wore his       crown over the wig, (look at the frontispiece if you want       to see how he did it,) he did not look at all comfortable,       and it was certainly not becoming.            \wbc{1ex}{8}{pq}            ``And that's the jury-box,'' thought Alice, ``and those       twelve creatures,'' (she was obliged to say ``creatures,''       you see, because some of them were animals, and some were       birds) ``I suppose they are the jurors.''.  She said this       last word two or three times over to herself being rather       proud of it: for she thought, and rightly too, that very       few little girls of her age knew the meaning of it at all.       However, ``jurymen'' would have done just as well.            \wbc{1ex}{10}{ced}            The twelve jurors were all writing very busily on slates.       ``What are they doing?'' Alice whispered to the Gryphon.       ``They can't have anything to put down yet, before the       trial's begun.''.            ``They're putting down their names,'' the Gryphon       whispered in reply, ``for fear they should forget them       before the end of the trial.''.            ``Stupid things!'' Alice began in a loud indignant voice,       but she stopped herself hastily, for the White Rabbit       cried out, ``Silence in the court!''; and the King put on       his spectacles and looked anxiously round, to make out who       was talking.     \end{document}          % $Id: sample1.tex,v 1.3 2002/09/13 06:34:25 loreti Exp $        1. Is there a way to make page numbering to left/right and not in center?   2. I mostly use memoir class and How do same thing with memoir class without fancyhdr?


title: How is arc defined in TikZ?

text: Several questions about how arc is computed:   1. The start and end angles seem to be defined relative to the y axis, yet in the Tikz manual they are defined relative to the x axis. Is this right?   2. Is the end angle defined between the y (or x) axis and the incoming path, or between the y (or x) axis and the extension of the path beyond the endpoint?   3. Geometrically speaking, providing just the start and end angles (and radius) is not enough to define an arc unambiguously. Is there some other assumption, such as: Arcs must be less than 180 degrees? Or arcs must always curve counterclockwise?