title: PGFPLOTS boxplot data from inline file

text: I have The following code:               \documentclass{article}     \usepackage{filecontents}     \usepackage{pgfplots, pgfplotstable}     \usepgfplotslibrary{statistics}           \begin{document}          \pgfplotsset{width=7cm,compat=1.10}          \pgfplotstableread{     %\begin{filecontents}{test.dat}     miles     1     2     1     5     4     10     7     10     9     8     9     9     %\end{filecontents}     }\mytable          \pgfplotstablegetrowsof{\mytable}     \edef\numberofrows{\pgfplotsretval}          \begin{tikzpicture}     \begin{axis}[y=1.5cm,ymax=2]      \addplot+[boxplot] table[ y index=0, row sep=newline ]{\mytable}          %\addplot+[boxplot] table[row sep=\\,y index=0]{      %data\\ 1\\2\\1\\5\\4\\10\\ 7\\10\\9\\8\\9\\9\\ }      %[above]      %node at (boxplot box cs:\boxplotvalue{lower whisker},1) {\pgfmathprintnumber{\boxplotvalue{lower whisker}}}      %node at (boxplot box cs:\boxplotvalue{lower quartile},1) {\pgfmathprintnumber{\boxplotvalue{lower quartile}}}      %node[left] at (boxplot box cs:\boxplotvalue{median},0.5) {\pgfmathprintnumber{\boxplotvalue{median}}}      %node at (boxplot box cs:\boxplotvalue{upper quartile},1) {\pgfmathprintnumber{\boxplotvalue{upper quartile}}}      %node at (boxplot box cs:\boxplotvalue{upper whisker},1) {\pgfmathprintnumber{\boxplotvalue{upper whisker}}} ;      \end{axis}      \end{tikzpicture}          \end{document}      Compiling this yields:                 ! File ended while scanning use of \pgfplots@addplotimpl@table@fromfile.      How does one implement an inline data table that boxplot can handle? Also, how about the labels that I commented out. Note that I also commented out the boxplot that reads from IT'S OWN table. My usage has one inline table and several plot types. I searched the manual with no success. Thank you in advance for any help. Dave


title: Generic point labels in pgfplots

text: I have loads of `pgfplot`s which have one thing in common, they all containt one or two `addplot` with four points that I want to label with the same labels, namely: `\tau_c= n \theta`. Lets for simplicity say `n` is `1`, `2`,`3` and `4`. Using foreach loop variable as node label in pgfplots looks very much like something that could solve my problem. But how do I append this (or similar) solution when the coordinates are given as in the MWE below? My `pgfplot`s are generated with `matlab2tikz` and are as mentioned quite numerous, so I would like to avoid having to manipulate the existing file too much. An MWE               \documentclass{memoir}     \usepackage{tikz, pgfplots}     \pgfplotsset{compat=newest}          \begin{document}     \begin{tikzpicture}     % [spy using outlines={rectangle,black,magnification=3,connect spies}]     \begin{axis}[%     width=3in,     height=1in,     unbounded coords=jump,     scale only axis,     xmin=1.25,     xmax=3,     xlabel={That},     ymin=0,     ymax=8,     ylabel={This},     title={Case 11},     % legend style={draw=black,fill=white,legend cell align=left}     ]     \addplot [     color=red,     only marks,     mark=o,     mark options={solid},     forget plot     ]     table[row sep=crcr]{     2.17534491233797 1.76417509678952\\     1.70352168717505 2.47466020520172\\     1.50385056450878 3.36056987643388\\     1.39330071637349 4.41283273476325\\     };     \end{axis}     \end{tikzpicture}%     \end{document}


title: How to use wider and higher margins in a beamerboxesrounded box?

text: I love beamerboxesrounded boxes in Beamer presentations, but the text fits too tightly into the box. So I would like to use equal but wider and higher margins (left, right, top, bottom) around the text, or padding inside the box. How is it possible?


title: "missing autoprint content" error in PythonTeX

text: I just installed PythonTeX in MiKTeX/windows, with latest python 2.7. The installation looks fine to me. I got all the files in MiKTeX directory and the `pythontex.bat` file in `miktex/bin`. Then I try to run a simple code:               \documentclass[11pt]{article}     \usepackage{pythontex}     \begin{document}     \py{2+3}     \end{document}      I run TeX first, then `pythontex.py` file in the MiKTeX folder and run MiKTeX again. Both time I got the warning: Missing autoprint content. And the .pdf shows "??". I am not sure what's the problem here. Seems to me that python didn't execute the code. The first several lines of the `.pytxcode` is:               =>PYTHONTEX#py#default#default#0#i#####6#     2+3     =>PYTHONTEX:SETTINGS#     version=0.14     outputdir=pythontex-files-test     workingdir=.     workingdirset=false     gobble=none      I am new to both LaTeX and python. Can anyone help me with this problem.


title: Skip spelling in Emacs for the content of a user macro

text: In Emacs, in order to skip spelling for the arguments of a user macro, one appends an entry to the `ispell-tex-skip-alists` variable. For example, to skip parsing the argument of `\mycommad`, one adds an entry like               ("\\\\mycommad"    ispell-tex-arg-end)       The complete command, perhaps in the init file, should be               (setq ispell-tex-skip-alists        (list         (append          (car ispell-tex-skip-alists) ;tell ispell to ignore content of this:          '(("\\\\mycommad"       ispell-tex-arg-end)))     (cadr ispell-tex-skip-alists)))      So the text inside `\mycommad{blah blah}` will be skipped. But what if the command takes two arguments and I want to skip only the spelling of the second? That is               \mycommad{spell this}{skip this}      Documentation for using `ispell-tex-skip-alists` is very limited. Particularly, `ispell-tex-arg-end` sometime takes a numeric argument, what is it?


title: modular chapters of a dissertation

text: I have several different chapters I would like to include into a dissertation. Each chapter is a standalone paper and has its own directory structure (figures, tables, etc.). I would like to retain the ability to compile (and work) each chapter separately but include all of them into the dissertation. What is the correct way of doing this? Using `\input` screws up the directory structure in addition to the fact that I need to ignore the preamble and abstract of each individual paper.


title: Motion Chart in Beamer

text: I am looking for a way to integrate a Google motion chart in a `beamer` presentation. I read that I can integrate a swf movie, but Google charts work online. Ok, I can insert a link to the webpage, but it would be really nice if the chart is actually in the presentation. How do I do this? Or should I use another motion chart software? I can't seem to figure it out.


title: Hidden subsection 0

text: I'd like to have an intro to a section 3 that would be referenced in the text as section 3.0. It should be a hidden subsection (before the first real subsection) that doesn't have a section header nor shows up in the table of contents.               \section{Section 3}     \label{sec:3}          \setcounter{subsection}{-1}     \subsection{ }     \label{sub:3_0}     yada yada      However, then I get a section header with the numbering. And I have tried               \section{Section 3}     \label{sec:3}          \subsection*{}     \label{sub:3_0}     yada yada      However, then my referencing, shown here               \subsection{Section 3.1}     \label{sub:3_1}     yada yada \cref{sub:3_0}.      only gives me section 3 instead of section 3.0. Anybody know the answer? Also, feel free to comment on my style choice (using .0 section numbers).


title: TiKZ picture does not sit properly in `figure` environment

text: This code:               \documentclass{tufte-handout}     \usepackage{tikz}          \begin{document}               \title{Lorem ipsum}     \author{me}     \date{now}     \maketitle          Lorem ipsum dolor sit amet, blah blah blah...          \begin{figure}          \begin{tikzpicture}          \def\spiral#1{%       \pgfmathparse{int(#1)}%       \ifnum\pgfmathresult>0         \draw [help lines] (0,0) rectangle ++(-1,1);         \begin{scope}[shift={(-1,1)}, rotate=90, scale=1/1.6180339887]           \spiral{#1-1}         \end{scope}         \draw [red] (0,0) arc (0:90:1);       \fi     }          \tikz[scale=2]{\spiral{12}}     \end{tikzpicture}     \caption{The golden spiral.}     \label{ref:golden_spiral}          \end{figure}          Sed tortor tellus, &c., &c.          \end{document}      produces this output: ![Behold the odd placement of the diagram.](http://i.stack.imgur.com/Bc3MS.png) Obviously what I want is for the diagram to be where that big gap in the text is now. I've used `tikzpicture` in figures before, and it's worked properly, so presumably it's something about _this_ diagram that's producing the problem, but I don't see what it is. How can I get that spiral to sit where it belongs? Edit: this earlier post suggests that re-invoking `tikz` is the problem. Is that the issue here? And if so, how should I modify the line `\tikz[scale=2]{\spiral{12}}`? I tried removing it altogether, but that just meant that the diagram didn't appear at all.


title: Typesetting sequence notation

text: I attempted to create a sequence both of the following ways:               \documentclass[12pt]{article}     \usepackage[english]{babel}     \usepackage{amsmath,amsthm}     \usepackage{amsfonts}     \begin{document}     $(x_j)\limits_{j=1}^\infty$          $(x_j)_{j=1}^\infty$     \end{document}      Is there a way to get the vertical spacing of the first with the horizontal spacing of the second?![enter image description here](http://i.stack.imgur.com/qFxt5.jpg)


title: How to make a long table split on even/odd pages?

text: On an A5 document, I want to print a long table, split on several pages (using `longtable` I know) but I **also** need the 2 columns of that table to be on each side of the document:   * left column on even pages, spanning several pages   * right column on odd pages, spanning several pages There is of course text before and after that table, or I wouldn't ask. Ideally, the table would be framed. And repeat the header of each columns (on it's page), but that should be easy with `longtable`. This thing is to compare features of 2 different somethings, therefore I don't absolutely need perfectly aligned tables, the 2 columns can be itemized. And the repeated header could be replaced with repeated captions. But if so, the borders would become important. I could imagine one 1 column table printed on even pages, and another 1 column table printe on odd pages, but they need to be "nested", facing each other in the A5 book. * * * Alternatively, if there is no solution to have a table span several pages laterally, is there a way to have text flow only on even pages, and some other text flow on odd pages, facing each other ? May-be defining 2 floats, one for even pages and one for odd pages, and each would overflow into the next even- or-odd page ? The question could then be reframed like this: is it possible to have a float spanning several pages, but restricting it to only even (or odd) pages ? I can make it by hand, with page-jumps, but if text is added, or the page- layout changed, it would screw all up (and this would defeat the whole LaTeX philosophy). I know that such things are possible with Scribus.


title: Packages for writing feedback forms

text: I'd like to make a document that would leave ample room for the reader to fill in answers on the sheet. (nothing fancy and interactive, just whitespace for writing on the printed version) What packages/classes exist for achieving this? I suppose I could just use massive tables and lots of `\bigskip`s but that seems suboptimal... Here's an example of the sort of thing I want to achieve, I could add lots of space manually, but that doesn't seem ideal...               \documentclass{article}     \begin{document}     \begin{table}       \begin{tabular}{|l|r|r|r|r|r|r|}         \hline         & A & B & C & D & E & F \\ \hline         Spelling & & & & & & \\ \hline         Grammar & & & & & & \\ \hline         Use of literature  & & & & & & \\ \hline         Strength of Argument  & & & & & & \\ \hline       \end{tabular}     \end{table}     \end{document}


title: Moving todo notes to other side of page

text: I am using the todo notes package, documentation of which can be found here. The current document I am working on is in a book style format - in particular, there are wider margins on the left for odd pages, and on the right for even pages. However, todo notes seems to have decided to alternate which side it will put notes by putting them on which ever side is **thinner**. This isn't actually an issue on the even pages, but on the odd pages it is cutting off most of the text. There seems to be no right/left option in the documentation, does anyone know if I can do this manually. Preferably I would put all notes on the right, since this is probably by far the easiest working solution. Thanks in advance for any help


title: pdflatex of individual PDF images already containing pdfmark information

text: I'm using pdflatex to generate a document from hundreds of single-page PDF images. (The images are originally in Postscript but I use Ghostscript to convert them to PDF prior to running pdflatex). The Postscript images are actually Matlab/Simulink block diagrams which have a structure and hierarchy.. I'd like to add references/hyperlinks to these block diagrams so the reader can navigate through the document by clicking part of the block diagrams. I can analyse the postscript images and gather cords for each block. Using Ghostscript I can add hyperlinks to individual PDFs at these cords. What I don't know is how do individual PDF images then get merged in pdflatex to allow the references to be updated. What URI should I use when adding the hyperlink. Should I use a hypertarget (anchor) on the target page?


title: Understanding tikz inheritance with the positioning library

text: I have trouble understanding the tikz inheritance model while using the positioning library. Consider the following example:               \documentclass[]{scrbook}     \usepackage{tikz}     \usetikzlibrary{positioning}     \begin{document}          \begin{tikzpicture}[black,node distance=5mm]       \node[draw] (0) {origin};       \node[draw,below=of 0,node distance=20mm] {A};       \node[draw,node distance=20mm,below=of 0] {B};            \begin{scope}[xshift=30mm]         \node[draw] {xshifted origin};         \node[draw,below=of 0,yshift=-30mm] {C};         \node[draw,yshift=-30mm,below=of 0,xshift=30mm] {D};       \end{scope}     \end{tikzpicture}          \end{document}      which leads to the following result: ![result](http://i.stack.imgur.com/akDFi.png) And now the questions:   1. Why does overriding the `node distance` work in B, but not in A?   2. Using `below` seems to override the scope `xshift` in C, but it seems to be working both, before and after `below` in D, so this seems to be a different behavior from A / B. Why? Any ideas are welcome. :)


title: Odd allocation of diacritic marks in Linux Libertine

text: Maybe it is just me (I don't think so, though), but the placement of the diacritic marks in the otherwise wonderful Linux Libertine fonts is quite at odds with any well-informed typographic sensibility. Please do not take my remarks in a derogatory sense, since my intention is just stressing what I think is a most significant blunder which should be corrected -- and I don't think the correction means too much work. Try compiling with pdfLaTeX the following MWE:               \documentclass{memoir}     \usepackage[mono,semibold]{libertine}          \def\vowels{\'a\'e\'i\'o\'u}          \begin{document}     Testing diacritic marks with Linux Libertine and Biolinum Type1:     \par\vowels     \par\textsc{\vowels}     \par\texttt{\vowels}     \end{document}      The issue is twofold and appears more clearly in the small caps and monospaced families: too large a vertical shift -- which is even sharper in the monospaced family -- and having the marks centered on the same vertical axis as the base glyphs, while they should be shifted rightwards. Just take a look at MinionPro or another good typeface design of your own choice and check the difference. My intention is to bring this to the attention of the TeX community in order to see if there are other people who agree on my judgment and this can be fixed... unless it turns out to be just some issue of my own system.


title: hyperref problem if the link at the end of the page

text: I am using               \usepackage[breaklinks]{hyperref}      to allow breaklines in the hyperlink. However, when the citation link at the end of a page and breaks into a new page, it takes into consideration the chapter title of the page as shown in the attached image ![enter image description here](http://i.stack.imgur.com/GSSNE.png). Can anyone give me a tip of how I can solve this problem? Note, I am using `natbib` package for citation.


title: Beamer: How to make an environment which is like "altenv"

text: Reading Section 9.6.3 of the `beamer` book, I try to make a new environment which should behave just like `alertenv` but with different visual effects. Here is the code I use for testing this.               \documentclass{beamer}     \begin{document}          \newenvironment<>{itenv}{\mdseries\itshape}{}     \setbeamercovered{transparent}               \begin{frame}{With \texttt{alertenv}}     before items       \pause       \begin{itemize}[<+- | alert@+>]         \item One         \item Two         \item Three       \end{itemize}     \pause     after items     \end{frame}          \begin{frame}{With \texttt{itenv}}       \setbeamercovered{transparent}     before items       \pause       \begin{itemize}[<+- | it@+>]         \item One         \item Two         \item Three       \end{itemize}     \pause     after items     \end{frame}     \end{document}      As it turns out, if an overlayed frame uses `altenv`, the current item changes to `alert` mode, i.e., painted in red. This item changes its color back to black, as the slide number progresses. On the other hand, if the same overlayed frame uses `itenv`, the current item changes to italics. Butt, it does not changes back to non-italics as the slide number progresses. ![animation showing frames in sequence](http://i.stack.imgur.com/7a6Vr.gif) What am I doing wrong here? ## Same Example: More Details The following is a more verbose version of the example above. If someone cares to solve this problem, it might be used to demonstrate the solution.               \documentclass{beamer}     \begin{document}          \newenvironment<>{itenv}{\only{\mdseries\itshape}}{}     \setbeamercovered{transparent}          \begin{frame}{With \texttt{alertenv}}         before items         \pause         \begin{itemize}[<+- | alert@+>]             \item I will be \textcolor{red}{red} \textbf{first}, and then return to be black.              \item I will be \textcolor{red}{red} \textbf{second}, and then return to be black.              \item I will be \textcolor{red}{red} \textbf{third}, and then return to be black.          \end{itemize}         \pause         after items     \end{frame}          \begin{frame}{With \texttt{itenv}}         before items         \pause         \begin{itemize}[<+- | it@+>]             \item I should be \textit{italicized} \textbf{first}, and then return to be up shaped.            Take a close look. Did I return to be ``\textup{Up Shape}''?             \item I should be \textit{italicized} \textbf{second}, and then return to be up shaped.            Ditto.            Am I ``\textup{Up Shape}'' or ``\textit{Italicized Shape}''?             \item I should be \textit{italicized} \textbf{third}, and then return to be up shaped.            Did I return to be ``\textup{Up Shape}'' or am I ``\textit{Italicized Shape}''?         \end{itemize}         \pause         after items     \end{frame}          \end{document}      And here is a little animation that demonstrates the problem with my code. ![enter image description here](http://i.stack.imgur.com/a2UFo.gif)


title: Meaning of "Diagrams should be prepared in .ps (postscript) or .eps format"

text: The homepage of the Journal of Integer Sequences says: > If there are accompanying style files or diagrams, please be sure to include > them. Diagrams should be prepared in .ps (postscript) or .eps format, not > pdf or other formats. If there are multiple files, please consider sending > them as a Unix tar or zip file. Does this mean that preparing diagrams using TikZ is allowed or not? What about preparing them as an image (say, .jpg or .gif) and including them?


title: Which package version am I using?

text: Is there a LaTeX command for printing the versions of the currently installed packages? I need to know the installed version of the `pgfplots` package.


title: Section command with default spaces between title and rule

text: Ho can I make a section command that have the same spaces between the `\titlerule` and the title of the original `\section` command? The overall look must be equal to the original `\section` command. So, Is it better use the `\titlerule` command insted of the `\rule` command? P.S. In the picture below I have forgotten a "to", sorry. ![enter image description here](http://i.stack.imgur.com/2ZVHj.jpg)               \documentclass[a4paper,cleardoublepage=empty,oneside,openany,final,10pt]{scrbook}          \usepackage{titlesec}          \newcommand*{\Section}[1]{%     \textsc{#1}\newline%     \rule{\textwidth}{.4pt}\newline%     \normalsize%     \normalfont%     \vspace*{.4\baselineskip}%     \large%     \textit{Curriculum Vit\ae}%     \normalsize\normalfont%     }          \titleformat{\section}{\large\raggedright}{}{0em}{\scshape}[\titlerule\normalsize\normalfont\vspace*{.4\baselineskip}\large\textit{Curriculum Vit\ae}\normalsize\normalfont]          \begin{document}          \section{Mario Rossi}          \vspace*{50pt}          \Section{Mario rossi}          \end{document}


title: Fixing the bibliography key margin when using AMSALPHA

text: I'm using the following bibliography code at the end of my document:               \documentclass[...]{book}     ...     \begin{singlespace}     \begin{footnotesize}     \addcontentsline{toc}{chapter}{References}     \bibliographystyle{amsalpha}     \renewcommand{\bibname}{References}     \bibliography{thesis}     \end{footnotesize}     \end{singlespace}      But, I would like to widen a little the margin between the citation Key and the Full Entry, because some of the citation keys are big and protrude intro the description. For example: ![alt text](http://i.stack.imgur.com/x1IuM.png) * * * **UPDATE:** Using Lev's answer, I almost got it working: ![alt text](http://i.stack.imgur.com/5cfN8.png) But now the left square bracket always appear right aligned, with an empty space in the reference key. * * * **Bonus question:** If possible, `amsalpha` also seems to only use the + sufix when the number of authors is greater than 4 (e.g. [SAJ+02]). Is it possible to decrease the threshold to 3?


title: Space between \hline\hline in longtable using package colortbl

text: When I use a `\usepackage{colortbl}` a space between `\hline\hline` in `\longtable` dissapears. I haven't find any solution how to put the space back, so I hope you'll help me to find it.               \begin{longtable}{|l|l|l|l|c|r|r|r|}             \caption{{ABD}}             \label{tab:SO}\\     \hline             \multicolumn{1}{|l|}{{SO} - 01} & \multicolumn{7}{ c| }{AD}\\         \hline\hline             \multicolumn{4}{|l|}{Popis} & MJ & AD & AD & CD\\         \hline             \multicolumn{4}{|l|}{AD }& $3$ & 37000 & 0,32& 11\,800   \\         \hline     \end{longtable}


title: Alignment marginnotes

text: ![enter image description here](http://i.stack.imgur.com/kfLTQ.jpg) I am trying to write a report for Uni, where I need something like what marginnotes does. The problem is I would need two different margins on the left side of the page. One for the chapter or section title and one for the paragraph, and to the left side of the paragraph there should be a block title, horizontally aligned to the title, which doesn't appear in the toc. maybe this example can give you an idea of what I'm looking for.               \documentclass[10pt,twoside,a4paper,fleqn]{report}     \usepackage[utf8]{inputenc}     \usepackage[centering,left=4cm,right=1cm,top=1cm,bottom=1cm,includeheadfoot]{geometry}     \usepackage[german]{babel,varioref}     \usepackage{marginnote, scrextend, etoolbox, titlesec}          %always put marginals on the left side of the page     \makeatletter     \patchcmd{\@mn@margintest}{\@tempswafalse}{\@tempswatrue}{}{}     \patchcmd{\@mn@margintest}{\@tempswafalse}{\@tempswatrue}{}{}     \reversemarginpar      \makeatother          \titlespacing*{\section}{-3cm}{\parskip}{\parskip}     \titlespacing*{\chapter}{-3cm}{\parskip}{\parskip}               \begin{document}     \chapter{Model chapter for a report}     This is the first chapter of the report.          \section{Model section}     \marginnote{This is a marginal}This is the first section of the first chapter of the report          \end{document}      The problem is, although the paragraph has an added 3cm of margin, the marginal will not be aligned to the title, and even be cut off by the page border. I know I could simply change the geometry settings, but this is not quite what I need, since the section and chapter titles will then also be moved into the page.


title: Problem with TexMaker and Sumatra PDF

text: When I do quick build with Texmaker, it is also trying to open the output file from desktop and giving               error loading C:\Users\UserName\Desktop\pdfname.pdf      error. But it is also opening original file thus producing two output files for same tex file (one with error). I configured Texmaker as mentioned in the following link: Configure forward search with Texmaker + SumatraPDF (I used first and third solutions. Both gave the same error.) What am I missing? EDIT:- Now I got the issue. If another pdf file is opened(say 'some.pdf' file on the desktop), then sumatra is trying to open newly built pdf from desktop. That's why I am getting the error. How to rectify this weird behavior?


title: fit table on page width

text: I am having problems trying to fit a table on page width. Here is a part of my code.               \begin{landscape}     \begin{table}[H] \scriptsize      \setkeys{Gin}{keepaspectratio}     \resizebox*{1.8\textwidth}{2\textheight} {        % \begin{adjustbox}{width=1.3\textwidth,center}             \begin{tabular}{*{12}{ | c}}         \toprule     ...         \bottomrule       \end{tabular}             }         %\end{adjustbox}          \end{table}     \end{landscape}      T tried with `adjustbox` but it doesn't work (`adjustbox.sty` not found). I use Texmaker (4.01) on Ubuntu 12.03 LTS.


title: Set my own minted default options inside a class

text: Is there a way that I can set minted options inside a class? I want to set my own defaults format for minted inside a custom class that I have.


title: RefTeX doesn't turn on automatically when loading AUCTeX after upgrade to TeX Live 2011

text: Has anyone had this issue? I can't sort out why this would occur but I didn't change anything in the setup. If I call it manually and turn on reftex-mode it works fine.


title: Can't find scrrpt class

text: I am a COMPLETE novice to latex. I installed Mactex on my Mac, and when I open Texlive it says I have KOMA installed. Yet when I try to compile with `\documentclass{scrrpt}` it won't compile and says `scrrpt.cls, not found`. Apologies, I am VERY new to this, any help very welcome!


title: How do I stack more than two arrows in math mode?

text: The command `\rightrightarrows` (from `amssymb`) draws two arrows, one on top of another. How do I get three arrows arranged in a similar fashion? An example of this (and other fancy arrow stackings) appears on page 3 of this paper, for which a source file unfortunately does not seem to be available. Commands like `\stackrel` and `\overset` do not size or space things properly.


title: What Beamer theme is used in Boyd's Convex Optimization slides?

text: I really like the theme that is used here: http://www.stanford.edu/~boyd/cvxbook/bv_cvxslides.pdf Can someone identify the name of the theme? ![enter image description here](http://i.stack.imgur.com/ISX0O.png)


title: Numbering in appendix

text: When compiling my file, the appendices are not numbered (the sections are though, but they are counting throughout the appendices). Therefor it seems that the chapters are not recognized. In the appendices I use \chapter, \section and \subsection for the headers. Here you can find my code:               \input{Style} %in the preamble the \usepackage[titletoc]{appendix} is used          \begin{document}          \frontmatter         \input{...}          \tableofcontents     \pdfbookmark[-1]{Contents}{Contents}          \mainmatter     \ChapterInsidePart         \input{...}          \input{...}         \input{...}          \backmatter     \input{...}          \appendix     \appendixpage     \addappheadtotoc     \renewcommand{\chaptername}{Appendix} %I added these lines of code to try and work around the problem. This would not help.      \setcounter{chapter}{0}     \renewcommand{\thechapter}{\Alph{chapter}}     \renewcommand{\thesection}{\thechapter.\arabic{section}}     \setcounter{figure}{0}      \renewcommand\thefigure{\thesection.\arabic{figure}}          \setcounter{table}{0}      \renewcommand\thetable{\thesection.\arabic{table}}          \input{...}         \input{...}         \input{...}         \input{...}         \input{...}     \underline{}     \end{document}      Thanks for helping me out! Simone


title: Vertically align at operator, but keep default horizontal spacing

text: This is a follow up to «How can I align limits at “lim”?». What is the best approach to achieve the following alignment? Namely, I would like the two `\prod` to be aligned, but each line should remain identical to what (La)TeX produces by default, simply shifted horizontally to match the alignment requirement. ![Image of vertically aligned \\prod operators](http://i.stack.imgur.com/yyU3I.jpg) Here is the code which generates the above. As you can see, I've used an ad- hoc amount of `\mspace`.               \documentclass{standalone}     \usepackage{amsmath}     \begin{document}     \begin{minipage}{.75\textwidth}       \begin{align*}         & \prod_{-n\leq k\leq n-1} \left[\frac{k+1}{k}\right] = -1 \\         & \mspace{16mu} \prod_{1\leq j\leq n} j = \lim_{m\to\infty} \frac{m^{n+1} m!}{(n+1)(n+2)(n+3)\cdots(n+m+1)}       \end{align*}     \end{minipage}     \end{document}


title: How to install Thai fonts?

text: I am using MiKTeX 2.9, WinEdt 5.5 and Windows 7. What is the easiest way to install the Thai fonts so that I can use the package `thai babel`? The error message that I got is: > No file `LTHnorasi.fd` LaTeX Error: This NFSS system isn't set up properly.


title: Move some floats to the end of the document

text: I want to move some of the `table`s to the end of the document. There is a solution via defining a new environment. However, I wonder whether there is a simple solution like using a new placement specifier to definitely move the `table` with that specifier to the end of the document.


title: How do I vertically align multi-line chapter names in the table of contents?

text: For multi-line chapter names in the TOC, how do I get the second and third lines to start in line with the first letter of the first word in the first line? Currently the second and third lines begin to the left of where I need them.               \documentclass[12pt,a4paper]{report}          \def\chapter{\newpage\thispagestyle{plain}\secdef\CHAPa\CHAPb}          \def\CHAPa[#1]#2{%     \refstepcounter{chapter}     \addtocontents{toc}{\protect\addvspace{10\p@}}      \addtocontents{lof}{\protect\addvspace{15pt}}      \addtocontents{lot}{\protect\addvspace{15pt}}      \addcontentsline{toc}{chapter}%        {\chaptername{\protect\ \thechapter: #1}}%     % \addcontentsline{toc}{chapter}%     %   {\protect\numberline{\chaptername {\thechapter}:}#1}%      \renewcommand{\KM}{#2}      {{\centering  \chaptername\ \thechapter \par}        { \centering #2\par}}        \vspace{\baselineskip}}          \def\CHAPb#1{%        { \centering #1\par}         \vspace{\baselineskip}}          \newcommand{\KM}{Introduction}          \newcommand{\sectionThesis}[1]{\renewcommand{\KM}{\sf #1}\section{#1}}          \titlecontents{chapter}     [0pt]     {}%     {\contentsmargin{0pt}         \thecontentslabel\enspace%         }     {\contentsmargin{0pt}}     {\titlerule*[.5pc]{.}\contentspage}          \begin{document}          \tableofcontents          \chapter{APPLICATION OF DISCRETE IT\^O FORMULAE TO A NONLINEAR STOCHASTIC DIFFERENCE EQUATION}          \end{document}


title: Ignore a bibliography field [e.g. "urldate"] for eliminating of biblatex/biber warnings

text: I have a large bibliography generated by a reference manager program (Citavi, but it can be anything else). The `urldate` field of all references is formatted as `urldate = {dd.mm.yyyy}`, which is not correct for `biblatex`. However, I don't want to change this field every time I update my HUGE bibliography from the reference manager app. In fact, I receive no errors but many warnings like one below.               Package biblatex Warning: Biber reported the following issues     (biblatex) with 'XYZ.2003':     (biblatex) - Datamodel: Entry 'XYZ.2003' (bibliographie.bib)     : Invalid format '18.11.2013' of date field 'urldate' - ignoring.      I don't want to have these warning, since for many bibliography entries this type of warning will dominate and it will be hard to see the relevant warnings. _I.e. these warnings need to be somehow suppressed_ For comleteness (partially using the example Find unused bibkeys using biblatex),               \begin{filecontents*}{bibliograp.bib}     @BOOK{Ab_Steg,     author = "M. Abramowitz and I. A. Stegun",     title = {Handbook of mathematical functions},     publisher = "Dover publications",     year = "1965",     urldate = {15.10.2013},     language="English" }     \end{filecontents*}          \documentclass[11pt,onecolumn,twoside]{scrbook}       \usepackage[style=numeric-comp,             backend=biber,                   date=short,             firstinits=true,         language=english]{biblatex}     \AtEveryBibitem{\clearlist{urldate}}     \AtEveryBibitem{\clearlist{abstract}}     \addbibresource[datatype=bibtex]{bibliograp.bib}          \begin{document}     hello world \cite{Ab_Steg}     \printbibliography     \end{document}      As it can be seen, `\AtEveryBibitem{\clearlist{urldate}}` doesn't prevent the warnings. I also expected that `language=german` (i.e. go away from the English date standard) in `biblatex` options could resolve the issue, but it also doesn't help.


title: Problem generating a random worksheet

text: I've been trying to adapt the steps given here. how-to-generate-random- variables-then-use-in-calculations-in-pdflatex My MWE is below (and I apologise for the code being a bit clunky!)               \documentclass[a4paper,12pt]{exam}     \usepackage{pgf}     \renewcommand{\arraystretch}{1.5}     \pgfmathsetseed{\number\pdfrandomseed}      \newcommand\initVariables{%     \pgfmathsetmacro{\A}{random(-10,10)}%     \pgfmathsetmacro{\B}{random(-10,10)}%     \pgfmathsetmacro{\C}{random(-10,10)}%     \pgfmathsetmacro{\D}{random(-10,10)}%     \pgfmathsetmacro{\E}{random(-10,10)}%     \pgfmathsetmacro{\F}{random(-10,10)}%     \pgfmathsetmacro{\R}{random(1,10)}%     }          \newcommand\ansa{\pgfmathprint{int(\A + \R)}}     \newcommand\ansb{\pgfmathprint{int(\B + \R)}}     \newcommand\ansc{\pgfmathprint{int(\C + \R)}}     \newcommand\ansd{\pgfmathprint{int(\D + \R)}}     \newcommand\anse{\pgfmathprint{int(\E + \R)}}     \newcommand\ansf{\pgfmathprint{int(\F + \R)}}          \begin{document}     \begin{questions}     \question     \initVariables% initialize variables (do this every time you need new numbers)     $y=x+\R$\\[0.3cm]     \begin{tabular}{*{7}{|c}|}             \hline         $x$&$\A$&$\B$&   $\C$      &   $\D$      &       $\E$                &       $\F$\\             \hline         $y$   &   $\ansa$   &   $\ansb$   &   $\ansc$   &   $\ansd$ &$\anse$   &  $\ansf$\\             \hline     \end{tabular}     \end{questions}     \end{document}      The code compiles, but I have a string of zeros before the equation ![enter image description here](http://i.stack.imgur.com/ypFWV.png) Is there a way to get rid of the zeros? Thanks for your help!


title: Removing a white page between Appendix heading and Appendix A

text: I tried looking through all the similar questions but couldn't find a similar case. I am writing in article class, this is my preamble:               \documentclass[10pt,twocolumn]{article}       \usepackage[utf8]{inputenc}       \usepackage[T1]{fontenc}       \usepackage{geometry}       \usepackage[hidelinks]{hyperref}       \usepackage[nottoc,numbib]{tocbibind}       \usepackage{graphicx}       \usepackage[english,greek]{babel}       \usepackage{amsmath}       \usepackage{upgreek}        \usepackage[compact]{titlesec}       \usepackage{appendix}       \geometry{a4paper, margin=1.6in}            \begin{document}          % ... and then the appendix part :           \newpage       \appendix       \appendixpage       \onecolumn            \section{Motivation}        \label{appendixa}          bla           \end{document}      I get "Appendices" in a white page, and only in the next page I get "A AppendixTitle". Now, I would like to remove that white space. I have small experience with latex, any help would be greatly appreciated.


title: Crop an inserted image?

text: I'm inserting an image with a simple:               \includegraphics[height=5cm]{filename.png}      This results in an image that maintains the aspect ratio, and so gives me something like 6cm width. I only really want the left side of the image though, and would like to crop it to 50% width. Is it possible to do this? If possible, I'd like to do this in a portable way (i.e. something that other authors of this document won't have to install packages for, and something that works with a reasonably old version of `pdflatex` - our computers at work are in sore need of an upgrade).


title: How to use only half an image?

text: Is it possible to include only half an image? I'm looking to include only the right half of an image and discard the left half. If there is a simple way to accomplish that, it would make more sense in my case than to generate new images.


title: Equation numbers of different types within a same document

text: I want to display the equation as (1) , (2), (3) and so on...... for one set of equations (section) and then I want to display the other set of equation (in another section) as (a), (b), (c), ...... and so on..... Is it possible to show both on the same document ? In fact, I have a big document and I want to derive the expressions for different problems and for each problem or probably within one section I want to start from (1) , (2)..... and so on and on next section I again want to start the equations from (1), (2) and so on . Please let me know if it is possible. A sample equation is given as follows:               \begin{equation}     \frac{d^2 \bar{c}}{dx^2} - \frac{U}{D}\frac{d \bar{c}}{dx}- \frac{(p+K)\bar{c}}{D}=0     \end{equation}      Thanks.


title: Footer not appearing on resume

text: I have been having trouble displaying a footer in my resume. Here are the links to the `.cls` file and the `.tex` file respectively. **`.cls` file** resume.cls file **`.tex` file** resume.tex file Sorry for the links to pastebin, but the `.cls` file was so long, that I figured copy and pasting it here would be unsightly.


title: LaTeX2e \makebox !=\hbox?

text: The `source2e` documentation (pg. 233) when describing `\makebox` states: > ... If _wid_   is missing, then _pos_ is also missing and _obj_   is put in > an `\hbox` of its natural width... This, however, seems to be only half the story. It also puts a `\leavevmode` behind it, thus although the width is identical to that of a primitive `\hbox` the behaviour is not. In TeX two consecutive `\hboxes` will be typeset on two vertical lines, but in LaTeX2e they will stay on the same line. And `\leavevmode` is of course `\unhbox\voidb@x`. Is a correction to the docs appropriate or am I wrong somewhere? MWE for experimentation.               \documentclass{article}     \begin{document}     \newbox\temp     \savebox\temp{test}     LaTeX          \makebox{test} \mbox{test}          TeX          \hbox{test} \hbox{test}          LaTeX with leavemode          \makeatletter     \leavevmode\hbox to \wd\temp{test} \unhbox\voidb@x\hbox to \wd\temp{test}     \end{document}


title: TikZ - Vehicle Suspension

text: I am new to **_TikZ_** (still learning), so I am not able to create complex `tikzpicture`s (only simple shapes), but I was wondering if someone can give me tips/links/examples about how to create an _vehicle suspension_ in simple 2D. Something like (but in 2D): ![http://i.stack.imgur.com/rbLWC.jpg](http://i.stack.imgur.com/p04G5.jpg)


title: A3 pages within A4 doc

text: I'm writing my thesis and I'd like to insert A3 pages within my A4 document. Is it possible to place figures with captions (as normal) on those A3? I'm able to include full PDF pages which are A3 by `\includepdf`, however that way I can't have captions. I get this error:               ! Package caption Error: No float type     ! Package caption Error\caprion outside float


title: Include pdf file with different paper size

text: I'm finishing my master thesis project with latex (A4 paper size) and I need to include a few drawings in pdf (paper size A3), so I tried to use this:               \includepdf[pages={-}, noautoscale]{./files/drawings/file1.pdf}       but the page generated is size A4. Is it possible to have different paper sizes?


title: Package in Latex that will use SAS font?

text: I was hoping to find a package that would give me output in the SAS font, but haven't been able to find one. Any ideas? Cheers.


title: \tabular multicols noalign

text: I can not figure out what's wrong. The pdf appears okay anyway               \documentclass[a4paper,12pt]{book}     \usepackage[margin=1.5cm]{geometry}     \usepackage{colortbl}     \usepackage{multicol}     \everymath=\expandafter{\the\everymath\displaystyle}     \renewcommand{\arraystretch}{2.2}          \begin{document}           \begin{tabular}{|m{0.55 \textwidth}|m{0.35 \textwidth}|}        \hline        \multicolumn{2}{|c|}{\rowcolor[gray]{0.8} {oscillations}} \\        \hline        \hline        $T = \frac{1}{f} $ & $ T=\frac{\Delta t}{N}$ \\        \hline      \end{tabular}          \end{document}      **I take after compiling with xelatex**               This is XeTeX, Version 3.1415926-2.2-0.9995.2 (TeX Live 2009/Debian)     entering extended mode     (./test.tex     LaTeX2e <2009/09/24>     Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh     yphenation, ibycus, monogreek, greek, ancientgreek, loaded.     (/usr/share/texmf-texlive/tex/latex/base/book.cls     Document Class: book 2007/10/19 v1.4h Standard LaTeX document class     (/usr/share/texmf-texlive/tex/latex/base/bk12.clo))     (/home/karathan/texmf/tex/latex/geometry/geometry.sty     (/usr/share/texmf-texlive/tex/latex/graphics/keyval.sty)     (/usr/share/texmf-texlive/tex/generic/oberdiek/ifpdf.sty)     (/usr/share/texmf-texlive/tex/generic/oberdiek/ifvtex.sty)     (/usr/share/texmf-texlive/tex/generic/ifxetex/ifxetex.sty)     (/usr/share/texmf-texlive/tex/xelatex/xetexconfig/geometry.cfg))     (/usr/share/texmf-texlive/tex/latex/colortbl/colortbl.sty     (/usr/share/texmf-texlive/tex/latex/tools/array.sty)     (/usr/share/texmf-texlive/tex/latex/graphics/color.sty     (/etc/texmf/tex/latex/config/color.cfg)     (/usr/share/texmf-texlive/tex/xelatex/xetex-def/xetex.def)))     (/usr/share/texmf-texlive/tex/latex/tools/multicol.sty) (./test.aux)               **... here is the problem**          *geometry* detected driver: pdftex     ! Misplaced \noalign.     \rowcolor ->\noalign                          {\ifnum 0=`}\fi \global \let \CT@do@color \CT@@do@color...      l.12 ...{|c|}{\rowcolor[gray]{0.8} {oscillations}}                                                         \\      ? [1] (./test.aux) )      Output written on test.pdf (1 page).      Transcript written on test.log.       ![enter image description here](http://i.stack.imgur.com/KGiEz.png)


title: How to set maxheight of a combination in ConTeXt?

text: I want to do a combination that fits in my page without taking care of figures dimensions itself. I tried this:               \placefigure[][myfigure]         {mycaption}         {\startcombination[1*4, height=0.8\textheight]             {\externalfigure[fig1]}             {a)}             {\externalfigure[fig2]}             {b)}             {\externalfigure[fig3]}             {c)}             {\externalfigure[fig4]}             {d)}         \stopcombination         }      But figures are still to big do not fit into the page.


title: "Something's wrong - perhaps a missing \item" after second instance of centering section

text: I have been receiving this error on multiple documents recently. The first and third section headers render correctly, but the second produces an error.               \documentclass{report}          \begin{document}          \begin{center}     \section*{\normalsize{SECTION ONE}}     \end{center}          \begin{center}     \section*{\normalsize{SECTION TWO}}     \end{center}          \begin{center}     \section*{\normalsize{SECTION THREE}}     \end{center}          \end{document}


title: Insert PDF file in LaTeX document

text: I have a problem when I insert a PDF file in LaTeX:               \usepackage[final]{pdfpages}          \includepdf[pages=-]{file.pdf}      The problem is that the PDF page is not centered: ![result](http://i.stack.imgur.com/CNWdf.png) I've tried to place tags `center`, but nothing works. * * * Thank you for your response. I still have the same problem. For a good layout, I have to do this:               \includepdf[pages=1,pagecommand={},offset=-2.5cm -3cm]{file.pdf}     \includepdf[pages=2,pagecommand={},offset=2.5cm -3cm]{file.pdf}     \includepdf[pages=3,pagecommand={},offset=-2.5cm -3cm]{file.pdf}     \includepdf[pages=4,pagecommand={},offset=2.5cm -3cm]{file.pdf}     \includepdf[pages=5,pagecommand={},offset=-2.5cm -3cm]{file.pdf}      This is very annoying. I want to insert a PDF of 50 pages, I can not insert page by page ... I tried               \begin{figure}      \centering       \includepdf[pages=-]{file.pdf}     \end{figure}      But all pages of the PDF are superimposed on one page! And with `\usepackage[pdftex]{graphicx}` I have an error : `! LaTeX Error: Option clash for package graphicx` Please help me! P.S. I use a model given by my university. In this model, we find this:               %----- Dimensions -----     \setlength{\evensidemargin}{2cm}     \setlength{\oddsidemargin}{2cm}     \setlength{\textheight}{\paperheight}     \addtolength{\textheight}{-5.7cm} % 24cm     \setlength{\textwidth}{\paperwidth}     \addtolength{\textwidth}{-4cm} % 17cm     \setlength{\topmargin}{0.5cm}     \setlength{\headheight}{2cm}     \setlength{\headsep}{0.5cm}     \setlength{\voffset}{-2.54cm}     \setlength{\hoffset}{-2.54cm}     \setlength{\footskip}{1.5cm}     \setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}      If I remove this:               \setlength{\voffset}{-2.54cm}     \setlength{\hoffset}{-2.54cm}       the layout of the PDF is OK, but the rest is bad!


title: Capital gothic letter in headings

text: One of the section of my thesis is called: representation of `$\mathfrak{g}_2$`, but every heading package transforms it in representation of `$\mathfrak{G}_2$` (capital Gothic letter). How can i solve this problem?


title: Why are these commands considered as bad practice?

text: I was reading LaTeX: Do not use these commands, but the author didn't explain why they are bad. Could anyone help me understand.   * `\\\` (except inside a special environment like tabular, array, or verse)   * `\textbf` or `\bf` (usually need `\vec` or sectioning like `\paragraph`)   * `\texttt` or `\tt` (usually need a verbatim environment, or `\url` command)   * `\textit` or \it (use `\emph`)   * `\textsf` or `\sf`   * `\mathrm` or `\rm` (usually need `\operatorname{}` or `\text{}`)   * `\tag`   * `\eqno`   * `\dfrac`   * `\displaystyle`   * `\hspace`   * `\vspace`   * `\limits`   * `\noindent`   * `\newpage`   * `\clearpage`   * `\linebreak`   * `\pagebreak`


title: inset cylinder and conically shaped objects in latex

text: How would I draw the following figure in latex: ![enter image description here](http://i.stack.imgur.com/gIOEL.png) I can draw this by drawing two circles and then a line connecting them, and insert the text by using \node in the tikz package but this seems a very long winded way of doing this, is there another approach I should be adopting. In addition, I wish to add another diagram that is conically shaped i.e. identical to this diagram but in the shape of an inverted cone. The diagram is intended to show the amount of fluid in the given shape where the denser fluid (black) is located beneath the lighter fluid. Thanks in advance for your suggestions.


title: Multi axis plot problem with appearance

text: I have a problem with the appearance of a mutli axis plot... Currently I have the following: ![Current situation](http://i.stack.imgur.com/icpF9.jpg) However I do not want the arrow in the right y-axis but from the documentation I read that the * in the `axis y line` command should prevent this... but it doesn't. Further the upper axis, where the second x axis would appear, is now gray I however want it to be black. Hopefully someone knows the right commands to fix this.               \documentclass{standalone}                                                           \usepackage{graphics,siunitx}                                                        \usepackage{tikz,pgfplots}                                                           \begin{document}     \begin{tikzpicture}                                                                  \pgfplotsset{%                                                                         compat=1.6,                                                                          width=10cm,                                                                          height=7cm,                                                                          scale only axis,                                                                     every x tick label/.append style={font=\scriptsize\color{gray!80!black}},               xmajorgrids,                                                                         xminorgrids,                                                                         every y tick label/.append style={font=\scriptsize\color{gray!80!black}},            ymajorgrids,                                                                            yminorgrids                                                                        }                                                                                \begin{axis}[%                                                                       xmin=0, xmax=40000,                                                                  xlabel={Time},                                                                       ymin=-50, ymax=50,                                                                   ylabel={Power},                                                                      axis y line*=left,                                                                   axis x line*=bottom]                                                                 \addplot [                                                                           color=red,                                                                           solid                                                                                ]                                                                                coordinates{(0,0};                                                                   \label{pcharge}                                                                      \addplot [                                                                           color=green,                                                                         solid                                                                                ]                                                                                coordinates{(0,0)};                                                                  \label{pbattery}                                                                     \end{axis}                                                                                \begin{axis}[%                                                                       xmin=0, xmax=40000,                                                                  ymin=0, ymax=100,                                                                    ylabel={State of charge},                                                            axis lines=left,                                                                     axis y line*=right,                                                                  axis x line=none,                                                                    legend style={at={(1.15,1)},anchor=north west,nodes=right}]                               \addplot [                                                                           color=blue,                                                                          solid     ]                                                                                coordinates{(0,0)};                                                                  \addlegendentry{$SOC$};                                                                   \addlegendimage{/pgfplots/refstyle=pcharge}\addlegendentry{$P_\mathrm{charge}$};     \addlegendimage{/pgfplots/refstyle=pbattery}\addlegendentry{$P_\mathrm{battery}$};     \end{axis}                                                                           \end{tikzpicture}     \end{document}


title: tikz externalization: list and make forces make to recompile the tikz images every time

text: I'm trying to speed up my latex development by parallelising as much tasks as possible and by redoing as little work as possible on every run. Amongst other things, I want to externalise my tikz images with the `list and make` option set. This allows me to recompile all the tikz images at once using `make -j -f main.makefile`. To automate this I use following makefile (simplified for purpose of this question):               main.pdf: main.tex        pdflatex -shell-escape -interaction=batchmode -draftmode -fmt=preamble main.tex        make -j -s -f main.makefile        pdflatex -shell-escape -interaction=batchmode main.tex      One problem I have using this approach is that `make -j -s -f main.makefile` _always_ recompiles _all_ images, even when it is not necessary (when only some ir even none of the tikz images have been changed in `main.tex`). It being so that the tikz images usually are taking the lions share of my compilation time, this seems incredibly wasteful. Is there a way to get around this? I would think it is trivial for tikz only to write the images that need to be rebuilt to the `makefile`. ## important update: It appears as though `list and make` _does_ work as it should except when the `-fmt=preamble` flag is set (as I did in my makefile). However, to create more speedup I would like to keep using my precompiled preamble. Any way to get around this? My preamble contains all my package inclusions and command definitions. The `\tikzexternalize` and `\tikzset` commands are place inside my dynamic preamble. # MWE Consider the following directory structure:               .     |- main.tex      # this is the main document     |- preamble.tex  # this is the preamble document        * `preamble.tex` contains all static stuff:              \documentclass[a4paper, titlepage]{article}          \usepackage[dutch]{babel}     \usepackage[babel]{microtype}     \usepackage{hyperref}     % ...     \usepackage{tikz}     \usepackage{pgfplots}          % tikz and pgf library loading and settings     \usetikzlibrary{external}     \pgfplotsset{compat = newest }          % package settings     \hypersetup {         % ...     }      % ... \def\preambleloaded{-- PRECOMILED PREAMBLE LOADED --}   * `main.tex` contains the dynamic preamble and the document:              % load preamble if it wasn't precompiled     \def\ifundefined#1{\expandafter\ifx\csname#1\endcsname\relax}                       \ifundefined{preambleloaded}         \typeout{!! PRECOMILED PREAMBLE NOT LOADED --}\input{preamble.tex}     \else         \typeout{\preambleloaded}     \fi          % tikz external settings     \tikzexternalize[         optimize=true,         % system call={pdflatex \tikzexternalcheckshellescape -halt-on-error -file-line-error -interaction=batchmode -jobname "\image" "\texsource"},         % also works and is faster:         system call={pdflatex \tikzexternalcheckshellescape -halt-on-error -file-line-error -interaction=batchmode -fmt=preamble -jobname "\image" "\texsource"},         mode=list and make     ]          \begin{document}         some text...         % ...     \end{document}      Note the `system call` setting for tikz externalisation. To precompile the preamble, the following command is used:               pdflatex -ini -shell-escape -interaction=batchmode -file-line-error -jobname="preamble" "&latex preamble.tex\dump" preamble.tex      To compile the document using the precompiled `fmt` file I use:               pdflatex      -shell-escape -interaction=batchmode -file-line-error -output-format=pdf -fmt=preamble main.tex      > The mwe is also downloadable from dropbox.


I am trying to compile a simple tex file but I get this warning and no bibliography printed out:               Package biblatex Warning: No "backend" specified, using Biber backend.      I am using Kile on Ubuntu 14.04. While the same exact file on another pc with Ubuntu 12.04 is correclty working. What is the problem? How can I solve it? Here is my MWE:               \documentclass[a4paper,11pt]{article}     \usepackage[utf8]{inputenc}     \usepackage[italian,english]{babel}     \usepackage[T1]{fontenc}     \usepackage{booktabs}     \usepackage[font={small}, labelfont=bf, hypcap=true]{caption}[2004/07/16]     \usepackage[unicode,colorlinks=true]{hyperref}      \usepackage[babel]{csquotes}     \usepackage[style=authoryear-comp,maxcitenames=1,maxbibnames=99,sortcites=true,firstinits=true,doi=false,url=false,isbn=false, hyperref]{biblatex}%style=numeric-comp,sorting=none,backend=biber          \renewbibmacro{in:}{% elimina il in nella biblio       \ifentrytype{article}{}{%       \printtext{\bibstring{in}\intitlepunct}}}           \renewcommand*{\bibfont}{\small}          \bibliography{biblioTC}          \title{My paper title}     \author{Me}      \date{}          \begin{document}          \maketitle          \newpage          \section{Test}          Lalalalalalalalalala \cite{Colitti2014}.          \newpage     \phantomsection\addcontentsline{toc}{section}{\refname}                     \printbibliography          \end{document}


title: The array in metapost

text: Suppose I have defined an array of points               pair p[];      Then are `p.0`, `p0`, `p[0]` different? Can I use `p.01`, `p01`, `p[01]`?


title: Hyperref: Scandinavian characters (æø) don't work in \url, hyperlink is wrong

text: ### Background A while ago it became possible to use the letters æ, ø and å in URLs, and some websites, like the encyclopaedia Store Norske Leksikon, has made use of this. Recently, a question was posted on a Norwegian forum about creating a hyperlink to such an URL, something that doesn't work, at least not with æ and ø. ### An example               \documentclass[a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{lmodern}          \usepackage{hyperref}          \begin{document}     \url{http://snl.no/øl} \\     \url{http://snl.no/ære} \\     \url{http://snl.no/Ål}     \end{document}      The first two links do not work, they are printed as `http://snl.no/\T1\ol` and `http://snl.no/\T1\aere`, but the third one works as it should. (One can get the correct URL printed by using the `href` command, but as the hyperlink is still wrong, that isn't really a solution.) ### The question I assume this has something to do with how `hyperref` handles non-english characters. Is there some way of making `hyperref` create a correct link with æ or ø in the url? ### Update By using the `href` command, and compiling with `latex` and the `dvipdfm`, the hyperlink is correct (see gerry's answer below). I've been compiling with `pdflatex`.


title: Strange unrecognized control sequence error with beamer.

text: I was trying to include bibliography in my presentation. But when I try to include bibliography I get this error:               ! Undefined control sequence.     \beamer@sort #1#2->\long \def \beamer@todo                                                 {#1}\def \beamer@ospec {}\beamer@...      I get this error when I run pdflatex second time, the first run completes with no errors and references appear in the bibliography. My bibliography looks like this:               \begin{frame}       \frametitle{References}       \begin{thebibliography}{nevell1984unified}         \bibitem[Bandaru and Deb, 2010]{deb10}           Bandaru, S. and Deb, K. (2010).           \newblock Automating discovery of innovative design principles through           optimization.           \newblock Technical Report 2010001, Kanpur Genetic Algorithms Laboratory,           Indian Institute of Technology, Kanpur.              \bibitem[Anderson, 1996]{anderson96}           Anderson, J. (1996).           \newblock {\em {The architecture of cognition}}.           \newblock Lawrence Erlbaum.            \end{thebibliography}     \end{frame}      I have unsuccessfully tried using bibtex to generate the bibliography but I keep getting equally strange errors, like `\newblock` unrecognized or `\item` missing from list environment etc, no matter what I do. If I remove the bibliography, everything works fine apart from the unknown citations warnings. Is there a simple working way to include the bibliography in beamer?


title: Create a local texmf tree in Ubuntu

text: I am running Ubuntu 12.04 which came with TeX Live 2009 pre-installed. I want to create a local texmf tree at the location `~/Dropbox/mylocaltexmf/`, so that I can place my own `.sty` files in my Dropbox which automatically syncs across multiple computers. How do I make a local texmf tree visible to TeX Live? **Note that I do not want to place the`.sty` files in the default TEXMFHOME.** Similar questions but on different operating systems:   * **Windows** Create a local texmf tree in MiKTeX   * **Mac OS X** How to make LaTeX see local texmf tree I tried to follow the solution in How to make LaTeX see local texmf tree, but when I ran the command `tlmgr` it seems that there is no such command on my system.               $ tlmgr     No command 'tlmgr' found, did you mean:      Command 'vlmgr' from package 'qdbm-util' (universe)      Command 'rlmgr' from package 'qdbm-util' (universe)     tlmgr: command not found


title: ntheorem and mathdesign are incompatible

text: I want to use mathdesign fonts (namely bitstream-charter) and I also want to use the ntheorem package. However, it looks like ntheorem tries to load `amssymb` which is incompatible with mathdesign (it redefines all the relevant symbols itself). How can I fix this? Here is _a_ MWE, although the order doesn't matter, it breaks both ways round. It also breaks with the `thmmarks` option instead of `amsmath` option               \documentclass{article}     \usepackage[amsmath]{ntheorem}     \usepackage[bitstream-charter]{mathdesign}     \begin{document}     Foo     \end{document}


title: The ConTeXt standalone problem

text: Today I installed the `ConTeXt standalone` by following the `Windows Installation: ConTeXt Suite with SciTe`. After that, I wrote a test file:               \starttext     hello, world!     \stoptext      But failed, the output info is as follows:               d:\latex>context 00contexttest.tex     context 00contexttest.tex          mtxrun          | forcing cache reload     resolvers       | resolving | unknown configuration file 'C:/Users/tim/texmf/web2c/texmfcnf.lua'     resolvers       | resolving | unknown configuration file 'D:/context/tex/texmf-mswin/bin//texmfcnf.lua'     resolvers       | resolving | unknown configuration file 'D:/context/tex/texmf-mswin/bin//share/texmf-local/web2c/texmfcnf.lua'     resolvers       | resolving | unknown configuration file 'D:/context/tex/texmf-mswin/bin//share/texmf-dist/web2c/texmfcnf.lua'     resolvers       | resolving | unknown configuration file 'D:/context/tex/texmf-mswin/bin//texmf-local/web2c/texmfcnf.lua'     resolvers       | resolving | unknown configuration file 'D:/context/tex/texmf-mswin/bin//texmf-dist/web2c/texmfcnf.lua'     resolvers       | resolving | unknown configuration file 'D:/context/tex/texmf-mswin//texmfcnf.lua'     resolvers       | resolving | unknown configuration file 'D:/context/tex/texmf-mswin//share/texmf-local/web2c/texmfcnf.lua'     resolvers       | resolving | unknown configuration file 'D:/context/tex/texmf-mswin//share/texmf-dist/web2c/texmfcnf.lua'     resolvers       | resolving | unknown configuration file 'D:/context/tex/texmf-mswin//texmf-local/web2c/texmfcnf.lua'     resolvers       | resolving | unknown configuration file 'D:/context/tex/texmf-mswin//texmf-dist/web2c/texmfcnf.lua'     resolvers       | resolving | unknown configuration file 'D:/context/tex//../texmf-local/web2c/texmfcnf.lua'     resolvers       | resolving | unknown configuration file 'D:/context/tex//texmfcnf.lua'     resolvers       | resolving | unknown configuration file 'D:/context/tex//share/texmf-local/web2c/texmfcnf.lua'     resolvers       | resolving | unknown configuration file 'D:/context/tex//share/texmf-dist/web2c/texmfcnf.lua'     resolvers       | resolving | unknown configuration file 'D:/context/tex//texmf-local/web2c/texmfcnf.lua'     resolvers       | resolving | unknown configuration file 'D:/context/tex//texmf-dist/web2c/texmfcnf.lua'     resolvers       | resolving |     resolvers       | resolving | warning: no lua configuration files found     resolvers       | resolving | no texmf paths are defined (using TEXMF)     resolvers       | resolving |     mtxrun          | the resolver databases are not present or outdated     resolvers       | resolving | using suffix based filetype 'lua'     resolvers       | resolving | remembering file 'mtx-context.lua'     resolvers       | resolving | using suffix based filetype 'lua'     resolvers       | resolving | remembering file 'mtx-contexts.lua'     resolvers       | resolving | remembered file 'mtx-context.lua'     resolvers       | resolving | using suffix based filetype 'lua'     resolvers       | resolving | remembering file 'mtx-t-context.lua'     resolvers       | resolving | using suffix based filetype 'lua'     resolvers       | resolving | remembering file 'mtx-t-contexts.lua'     resolvers       | resolving | remembered file 'mtx-t-context.lua'     resolvers       | resolving | using suffix based filetype 'lua'     resolvers       | resolving | remembering file 'context.lua'     mtxrun          | unknown script 'context.lua' or 'mtx-context.lua'     d:\latex>      Now, I have gotten no idea to solve this problem. I have tried run `setuptex` in ../context/tex/, but in vain.


title: How can I fill a table cell with a dash in tabular?

text: I have a basic table in the `tabular` environment, and I want to fill a cell with a dash, to show that there is nothing to go in that cell. I've tried just using dash, but can't get one that's long enough or connected.


title: Latexproblem: font installed but cannot be mapped

text: When I am compiling some latex, I get the following error:               kpathsea: Running mktexpk --mfmode cx --bdpi 300 --mag 1+84/300 --dpi 384 zptmcm7y     mktexpk: don't know how to create bitmap font for zptmcm7y.     mktexpk: perhaps zptmcm7y is missing from the map file.      which is strange, since I can find the zptmcm7y font with find:               /usr/share/texmf-dist/fonts/tfm/adobe/times/zptmcm7y.tfm      If you need more information to help me, dont hesitate to ask!


title: How to improve rendering

text: ![different rendering of two different documentclasses](http://i.stack.imgur.com/B4oiW.png) The rendering above the red line(zoomed in) was a result of: `\documentclass[journal]{IEEEtran}` The rendering below the red line(zoomed in) was a result of: `\documentclass[journal]{AIAA}` Why is there such a huge difference? Can I change something in the AIAA class file so that it yields results similar to the IEEEtran class file?


title: Inclined Planes

text: > **Possible Duplicate:**   >  Creating a Free Body Diagram in TikZ As teachers of our department (physics and chemistry) that we do not like books which are sold in bookstores of our subject, we decided to make our own book with LaTeX. We did one last year and it was quite successful for us and for the students themselves. A part of the subject are inclined planes, so I'd like to know if there is any "easy" way to do them, because having to be operating in a paper apart the coordinates of the points of all figures of the drawings is a arduous and tedious task. The visual examples would be like this. (Examples colors are irrelevant) ![Inclined Plane](http://i.stack.imgur.com/tbxdV.gif) ![enter image description here](http://i.stack.imgur.com/t0oZj.png)


title: How can I call "child" environments inside one "master" environment?

text: In the following code, I have two wonderfull environments given by Gonzalo Medina.               % Sources     %    1) http://tex.stackexchange.com/questions/33078/frame-with-only-crosses-in-two-opposite-corners/33087#33087     %    2) http://tex.stackexchange.com/questions/33110/how-to-use-named-variables-with-one-environment          \documentclass{article}         \usepackage{keyval}         \usepackage{xcolor}              \makeatletter     % Length : this controls the length of the rules used (default = 1cm)             \define@key{crossFrame}{length}{\def\mf@length{#1}}          % Horizontal distance between the rules and the text (default = 0.8cm)             \define@key{crossFrame}{Hdist}{\def\mf@Hdist{#1}}     % Vertical distance between the rules and the text (default = 2ex)             \define@key{crossFrame}{Vdist}{\def\mf@Vdist{#1}}          % Factor is a number controlling the point of intersection of each pair     % of rules used for the cross (default = 3)             \define@key{crossFrame}{factor}{\def\mf@factor{#1}}          % Thickness of the rule (default = 0.4pt)             \define@key{crossFrame}{thickness}{\def\mf@thickness{#1}}          % Color of the rule using the xcolor package (default = black)             \define@key{crossFrame}{color}{\def\mf@color{#1}}          % Style : 2 corners or 4 (default = black)             \define@key{crossFrame}{style}{\def\mf@style{#1}}          % We set the default values (except for Vdist which depends on current conditions)             \setkeys{crossFrame}{                 length=1cm,                 thickness=0.4pt,                 Hdist=.8cm,                 factor=3,                 color=black,                 style=2             }                  \newenvironment{crossFrameTwoCorners}[1][]{%                 \setkeys{crossFrame}{Vdist=2ex,#1}%                 \par\hfill\rlap{%                     \bgroup\color{\mf@color}%                     \hskip-\dimexpr\mf@length-\mf@Hdist\relax                     \rule{\mf@length}{\mf@thickness}%                     \hskip-\dimexpr\mf@length/\mf@factor\relax                     \rule[-\dimexpr\mf@length-\dimexpr\mf@length/\mf@factor\relax]{\mf@thickness}{\mf@length}%                     \egroup                 }%                 \vskip-\dimexpr\mf@length/\mf@factor+\dimexpr\mf@length/\mf@factor-\mf@Vdist\relax             }{%                 \par\nobreak\offinterlineskip                 \vskip-\dimexpr\mf@length/\mf@factor+\dimexpr\mf@length/\mf@factor-\mf@Vdist\relax                 \noindent                 \hskip-\mf@Hdist\bgroup\color{\mf@color}%                 \rule{\mf@length}{\mf@thickness}\hskip-\dimexpr\mf@length-                 \dimexpr\mf@length/\mf@factor-\mf@thickness\relax                 \rule[-\dimexpr\mf@length/\mf@factor-\mf@thickness\relax]{\mf@thickness}{\mf@length}                 \egroup\par             }                  \newenvironment{crossFrameFourCorners}[1][]{%                 \setkeys{crossFrame}{Vdist=2ex,#1}%                 \par\noindent\hskip-\mf@Hdist\bgroup\color{\mf@color}%                 \rule{\mf@length}{\mf@thickness}\hskip-\dimexpr\mf@length-\dimexpr\mf@length/\mf@factor-\mf@thickness\relax%                 \rule[-\dimexpr\mf@length-\dimexpr\mf@length/\mf@factor\relax]{\mf@thickness}{\mf@length}\egroup                 \hfill\rlap{%                     \bgroup\color{\mf@color}%                     \hskip-\dimexpr\mf@length-\mf@Hdist\relax\rule{\mf@length}{\mf@thickness}%                     \hskip-\dimexpr\mf@length/\mf@factor\relax\rule[-\dimexpr\mf@length-\dimexpr\mf@length/\mf@factor\relax]{\mf@thickness}{\mf@length}%                     \egroup                 }%                 \vskip-\dimexpr\mf@length/\mf@factor+\dimexpr\mf@length/\mf@factor-\mf@Vdist\relax%             }{%                 \par\nobreak\offinterlineskip\vskip-\dimexpr\mf@length/\mf@factor+\dimexpr\mf@length/\mf@factor-\mf@Vdist\relax\noindent%                 \hskip-\mf@Hdist\bgroup\color{\mf@color}%                 \rule{\mf@length}{\mf@thickness}\hskip-\dimexpr\mf@length-\dimexpr\mf@length/\mf@factor-\mf@thickness\relax%                 \rule[-\dimexpr\mf@length/\mf@factor-\mf@thickness\relax]{\mf@thickness}{\mf@length}\egroup                 \hfill\rlap{%                     \bgroup\color{\mf@color}%                     \hskip-\dimexpr\mf@length-\mf@Hdist\relax\rule{\mf@length}{\mf@thickness}%                     \hskip-\dimexpr\mf@length/\mf@factor\relax\rule[-\dimexpr\mf@length/\mf@factor-\mf@thickness\relax]{\mf@thickness}{\mf@length}%                     \egroup                 }%                 \par             }         \makeatother          % Just to generate text for the example.         \usepackage{lipsum}               \begin{document}          \section{''Two corners'' style}          \begin{crossFrameTwoCorners}[         length=1.5cm,         thickness=2pt,         Hdist=1.3cm,         color=blue,         factor=2,         Vdist=8ex     ]         \lipsum[1]     \end{crossFrameTwoCorners}               \newpage          \section{''Four corners'' style}          \begin{crossFrameFourCorners}[         length=1.5cm,         thickness=2pt,         Hdist=1.3cm,         color=blue,         factor=2,         Vdist=8ex     ]         \lipsum[1]     \end{crossFrameFourCorners}          \end{document}      I would lik to build one environment named `crossFrame` which "calls" `crossFrameTwoCorners` if the key `style` is 2, `crossFrameFourCorners` if the key `style` is 4, and sends an error otherwise. Then I could use :               ...          \begin{document}          \section{''Two corners'' style}          \begin{crossFrame}[         style=2,         length=1.5cm,         thickness=2pt,         Hdist=1.3cm,         color=blue,         factor=2,         Vdist=8ex     ]         \lipsum[1]     \end{crossFrame}               \newpage          \section{''Four corners'' style}          \begin{crossFrame}[         style=4,         length=1.5cm,         thickness=2pt,         Hdist=1.3cm,         color=blue,         factor=2,         Vdist=8ex     ]         \lipsum[1]     \end{crossFrame}          \end{document}


title: Ghostscript questions [related: preview package to print standalone PDFs]

text: Using the preview package to generate individual PDFs of images within your document has been covered, for example, in this thread. However, I am trying to understand how you can use Ghostscript to output each individual page. To review, the command I use is               \usepackage[active, pdftex, tightpage]{preview}      along with               \begin{preview}     \begin{tikzpicture}     \end{tikzpicture}     \end{preview}      In the linked discussion, it is proposed to use this command               gs -opics%2d.pdf -sDEVICE=pdfwrite file.pdf      However, there are two problems.   1. The command does not seem to work. Only a single pdf file is generated and it has multiple pages.   2. The generated file seems much smaller than the original file. I am somewhat worried by GS's compression. Is this something to be worried about for files that need to be print-ready? If so, how do you make it so GS outputs something with absolutely no compression over the original?


title: I failed to use \newenvironment and \newcommand

text: The following code snippet does not work.               \documentclass{article}     \usepackage{pstricks}          \newcommand\Left{-1}     \newcommand\Right{1}     \newcommand\Bottom{-1}     \newcommand\Top{1}          \newenvironment{\PsPicture}[1][]     {\begin{pspicture}[#1](\Left,\Bottom)(\Right,\Top)\ignorespaces}     {\end{pspicture}}          \newcommand\GetCoordinates{(\Left,\Bottom)(\Right,\Top)}          \begin{document}     \begin{PsPicture}[showgrid]     \end{PsPicture}          \newpage          \begin{pspicture}[showgrid]\GetCoordinates     \end{pspicture}          \end{document}      The code above is a simplified scenario that was extracted from my own document class. The idea is to avoid calling `(\Left,\Bottom)(\Right,\Top)` such as in   1. `\pspicture(\Left,\Bottom)(\Right,\Top)`   2. or `\psframe(\Left,\Bottom)(\Right,\Top)` My first attempt is creating a new environment to encapsulate `\pspicture`, it does not work. The second attempt is creating a new command to return `(\Left,\Bottom)(\Right,\Top)` so hopefully it can be passed to any PSTricks macros that need `(\Left,\Bottom)(\Right,\Top)`, it does not work as well. How to fix it? * * * To make it clearer, I add the following code snippet               \begin{PsPicture}[showgrid]     \psframe\GetCoordinates     \end{PsPicture}      that takes advantage of `\GetCoordinates` so I can save some keystrokes rather than typing `(\Left,\Bottom)(\Right,\Top)` that is very tedious.


title: babel's hyphenation-friendly hyphen "= in multiple languages

text: Why doesn't the hyphenation work with multiple languages? See code:               \documentclass[a4paper]{report}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage[english,ngerman]{babel}          \begin{document}     Mein deutscher Bindestrich"=Test.          \selectlanguage{english}     My english Hyphon"=Test. <--- Here should be a - and not "=     \selectlanguage{ngerman}     \end{document}


title: Multiple labels warning for exam class with parts

text: I am writing a document in the `exam` class. For question with multiple parts (a), (b),... you are supposed to use the `parts` environment. Using it works fine, until I add a solution to the question that also contains a `parts` environment. The document compiles to the correct result, but I see LaTeX Warnings in the log (which is annoying because vim will show them to me every time!):               LaTeX Warning: Label `part@2@1' multiply defined.     LaTeX Warning: Label `part@2@2' multiply defined.     .....     LaTeX Warning: There were multiply-defined labels.      I remember that this used to work. Am I doing something wrong here? A minimal working example would be:               \documentclass[letterpaper, 12pt, answers]{exam}     \begin{document}     \begin{questions}     \question The exam document class defines labels for parts.     \begin{parts}     \part Are these labels unique for you?     \part Why are they not unique for me?     \end{parts}          \begin{solution}     \begin{parts}     \part Maybe, I don't know.     \part That's my questions.     \end{parts}     \end{solution}     \end{questions}     \end{document}


title: LaTeX template for Journal of Computational Biology

text: I am using lyx and have to insert citation by following rules. I could not find any specific citation style in lyx. References should be presented in the following style: Journal Paper: Fujar, B.R., Smith, R.N., Jackson, T.R., et al. 1996. Navigating gopherspace with neural implants. J. Neurol. 10, 275–280. Book: Hillis, D.M., and Moritz, C. 1991. Molecular Systematics. Sinaur Associates, Sunderland, MA. Chapter within Edited Book: Knight, J.R., and Myers, E.W. 1992. Approximate regular expression pattern matching with concave gap penalties, 66-76. In Chrochemore, M., and Galil, Z., eds. Combinatorial Pattern Matching. Springer- Verlag, New York. Citation of references in the text: References in the text should be cited by author names and publication year. When a text citation includes one or two authors, list all authors and the publication year, e.g., Smith (2008) or Smith and Jones (2008), but for text citations for three or more authors, cite the first author only followed by et al. and the publication year, e.g., Smith et al. (2008).


title: Switch on number of arguments given to a macro

text: I want to define a macro that does different things depending on the number of (optional) arguments given to it. Is this possible? How?               \documentclass{standalone}     \usepackage{xparse}          \DeclareDocumentCommand{\MyCommand}{ g g g }{     % if 1 parameter        thing for 1 parameter #1     % else if 2 parameters        thing for 2 parameters #1 #2     % else if 3 parameters        thing for 3 parameters #1 #2 #3     }          \begin{document}     \MyCommand{one}     \MyCommand{one}{two}     \MyCommand{one}{two}{three}     \end{document}


title: Why does viewport produce a strange result

text: I use `pdflatex` to compile the following input file:               \documentclass{article}     \usepackage{graphicx}     \begin{document}     \fbox{\includegraphics[viewport=10 10 20 20]{bald.png}}     \end{document}      The image to be imported is: ![enter image description here](http://i.stack.imgur.com/ug14o.png) But the resulting PDF looks very strange as follows: ![enter image description here](http://i.stack.imgur.com/3Cb65.png) Note: the gray frame is Adobe Reader background, it is not the part of PDF output.


title: ToC on cover and continues on the second page

text: The design I am working on has the ToC as the cover, together with the title & author. There is a production restriction which the second page (inner cover) can't be printed. Please find the attached illustration. Think such restriction can be overcome in an _ad hoc_ fashion, i.e. generating a blank page at the end of the ToC and manually relocate it to the second page through Adobe Acrobat etc. ![ToC_cover](http://i.stack.imgur.com/7GmDj.png) I am using `scrbook`, the KOMA Script book class. The current title & author is generated through:               \clearpage          \pagestyle{empty}          \begin{center}          \Large Title Name          \vspace*{8pt}          \fontsize{15pt}{17pt}\it Author Name          \end{center}          \vfill{}      PS: There is a similar question posted one year ago and doesn't have an conclusive solution.


title: What is a good method for producing a unary plus/minus sign that always works?

text: Say I have a macro that does _something_ in math mode (say, change the mathalphabet). This macro, `\somecommand`, takes one argument. I might want use is like this, feeding an empty argument into it: `\\(\somecommand{} +x\\)`. I also want the plus sign before `x` to be a unary operator. I find that whether a plus or minus sign is considered unary or binary is, while clear in theory, not always _obvious_ upon first inspection:               \documentclass{article}          \newcommand{\zeroArgCommand}{}     \newcommand{\oneArgCommand}[1]{}          \begin{document}          \noindent     \(                    +x\) \\ % unary:  "+x"     \(\zeroArgCommand     +x\) \\ % unary:  "+x"     \(\zeroArgCommand{}   +x\) \\ % binary: " + x"     \(\oneArgCommand{}    +x\) \\ % unary:  "+x"     \(\oneArgCommand{}{}  +x\) \\ % binary: " + x"          \end{document}      In the light of this, I am wondering about the **best way of defining a unary plus/minus sign**. Intuitively I would write `\\(\somecommand{} {+} x\\)` or `\\(\somecommand{} {+ x}\\)`, but I am wondering about expert opinion about a method that for sure works in all contexts. _This question was posed because in another thread, a user suggested that defining a`\unaryplus` macro is clearer than `\somecommand {+} x`. (I think what that commenter had in mind was that the reader might not be familiar with the arity of `\somecommand`.)_ * * * **Addendum:** Is there a good way to define a macro `\genuineunaryplus` that produces a `+` but that in a context `<before>\genuineunaryplus<after>` attaches to `<after>` as a unary operator but has spacing to `<before>` exactly as if the `\genuineunaryplus` were not there? That is, a macro such that if the spacing between `<B> <A>` is of length/type L, the expression `<B>\genuineunaryplus<A>` will produce `<B> +<A>` in the output, with the spacing between `<B>` and `+` exactly like the spacing would be between `<B>` and `<A>` if the `\genuineunaryplus` were not there, namely L? **Answer idea for addendum:** David Carlisle's comment below outlines a possible answer for this addendum.


title: Underlining with ulem package breaks footnotes

text: For some reason, footnotes do not seem to work with the `ulem` package.               \documentclass{article}      \usepackage{ulem}     \begin{document}         \uline{test\footnote{note}}     \end{document}      gives               ! Undefined control sequence.     \@footnotemark ...rk \ifhmode \spacefactor \@x@sf                                                        \fi \relax       when I try to compile it using `pdflatex`. Is there any chance to fix this or some kind of workaround?


title: Issue installing selnolig under MikTeX

text: I'm trying to install selnolig in the MiKTeX 2.9 package manager, but I'm getting this problem report:               MiKTeX Problem Report     Message: The operation could not be completed because a required file does not exist.     Data:      Source: Libraries\MiKTeX\PackageManager\PackageInstaller.cpp     Line: 3286     MiKTeX: 2.9     OS: Microsoft Windows 7 Business Edition, 32-bit Service Pack 1 (build 7601)     Invokers: explorer     SystemAdmin: yes     PowerUser: no      What do I do to fix this?


title: Prevent cleardoublepage in scrbook between chapters

text: For a new term paper i want to try out a template of our university which is based on scrbook. However, my first chapter is to short (1/2 page) that the second chapter follows after a `\cleardoublepage` (it looks like this) but that is not what i want it to do. I would appreciate if is just puts the second chapter right after the first one. Any idea how i can achieve this?


title: Problem - Referencing a Figure in the Text

text: I am using `hyperref` package. And when I want to reference a figure it does not work properly. It works fine with my first two figures but, when I call the 3rd figure by `\ref{3rdfig}` it returns IV, i.e. roman number 4, instead of a simple 3. It is the same for the fourth figure too, it just returns IV.               \documentclass[conference]{IEEEtran}     \usepackage{tikz}     \usetikzlibrary{snakes}     \usepackage{mathtools}     \usepackage{float}     \usepackage{hyperref}     \usepackage{graphicx, subfigure}      these are the stuff i am using, and in the text just trying to give a reference to a figure by Fig. `\ref{grff3}` where grff3 is my label to the 4th figure. I didn't change to roman numbers intentionally, and even if i did, the numbering is also wrong. Do you have any idea about what I am doing wrong? Thanks,


title: How to change \headsepline color in KOMA-Scriptclasses

text: At the moment I am working on a rather big project in which I typeset a lecture note for a professor of mine. I want to use the `headsepline` the KOMA Script Class offers, but I want it to have the same color as the headlinecolor I defined by adding               \renewcommand{\headfont}{\color{schrift}\normalfont\slshape}       Is there a solution for this with KOMA Script means or do I have to define it myself (in a way I don't know as I don't really know how to do such things at all)? Example:               \documentclass[oneside, twocolumn=false, 12pt, headsepline=true]{scrbook}     \usepackage[ngerman]{babel}     \usepackage[utf8x]{inputenc}     \usepackage{delarray, graphicx, url, fancybox, calc, cancel, caption, mathtools, amsmath, amssymb, wrapfig, subcaption, floatrow, amsthm, lipsum}     \usepackage[usenames,dvipsnames]{color}     \usepackage[margin={0.08\paperwidth,0.10\paperheight}, heightrounded]{geometry}          \usepackage[onlytext]{MinionPro}          \parindent 0pt     \parskip 6pt          \usepackage[pdftex, colorlinks=true,pdfstartview=FitB,bookmarks=false, urlcolor=schrift, linkcolor=schrift]{hyperref}     \hypersetup{       colorlinks,       linkcolor=schrift,       linktoc=all     }          \makeatletter     \renewcommand{\l@section}{\@dottedtocline{1}{1.5em}{2.6em}}     \renewcommand{\l@subsection}{\@dottedtocline{2}{4.0em}{3.6em}}     \renewcommand{\l@subsubsection}{\@dottedtocline{3}{7.4em}{4.5em}}     \makeatother          \fboxrule0pt          \definecolor{rahmen}{RGB}{0,73,114}     \definecolor{grund}{RGB}{238,241,251}               \definecolor{schrift}{RGB}{0,73,114}          \captionsetup{format=plain, labelfont={color=rahmen,bf}}          %\usepackage[nomath]{kpfonts}          \SetSymbolFont{letters}{normal}{OML}{cmbr}{m}{it}     \SetSymbolFont{operators}{normal}{OT1}{cmbr}{m}{n}     \SetSymbolFont{symbols}{normal}{OMS}{cmbr}{m}{n}          \DeclareMathAlphabet{\mathbf} {OT1}{cmbr}{bx}{n}          \setkomafont{disposition}{\color{schrift}\bfseries}          \renewcommand{\headfont}{\color{schrift}\normalfont\slshape}          \renewcommand{\labelitemi}{-}     \renewcommand{\labelitemii}{$\cdot$}     \renewcommand{\labelitemiii}{$\circ$}     \renewcommand{\labelitemiv}{$\bullet$}          \captionsetup{format=plain, labelfont={color=schrift,bf}}          \allowdisplaybreaks          \newcommand{\defeq}{\vcentcolon=}     \newcommand{\eqdef}{=\vcentcolon}          \hfuzz 100pt     \hbadness 10000          \renewcommand{\chapterheadstartvskip}{\vspace *{-\baselineskip }}          \begin{document}          \chapter{This is just some test chapter}          \lipsum[1]     \lipsum[2]     \lipsum[3]     \lipsum[4]     \lipsum[5]     \lipsum[6]          \lipsum[7]          \end{document}      My problem is this output which I want to be in matching color ![Headlinesep by KOMA](http://i.stack.imgur.com/FILZP.png) The option `[headlinesep]` added to the KOMA Script class I am using adds a horizontal bar between header and the body of the page. There has been help in the comments I should just use the `\scrlayer-scrpage` Style, as it offered all the functions I have been looking for. But it appeared, that there more errors to cope with - I'll post my test document code here. Everything that is important allready is in the code               \documentclass[twoside=false, twocolumn=false, 12pt, ngerman, headsepline=true]{scrbook}     \usepackage[ngerman]{babel}     \usepackage[utf8x]{inputenc}     \usepackage{delarray, graphicx, url, fancybox, calc, cancel, caption, amssymb, amsmath, mathtools, wrapfig, floatrow, amsthm, scrlayer-scrpage, lipsum}     \usepackage[usenames,dvipsnames]{color}          \usepackage[margin={0.08\paperwidth,0.10\paperheight}, heightrounded]{geometry}     \renewcommand{\chapterheadstartvskip}{\vspace *{-\baselineskip }}          \usepackage[frenchmath]{MinionPro}          \parindent 0pt     \parskip 6pt     %\baselinestretch          %\usepackage[nomath]{kpfonts}     %\SetSymbolFont{letters}{normal}{OML}{cmbr}{m}{it}     %\SetSymbolFont{operators}{normal}{OT1}{cmbr}{m}{n}     %\SetSymbolFont{symbols}{normal}{OMS}{cmbr}{m}{n}     %\DeclareMathAlphabet{\mathbf} {OT1}{cmbr}{bx}{n}          \setkomafont{disposition}{\color{schrift}\bfseries}     \setheadsepline{1pt}[\color{schrift}]     \renewcommand{\headfont}{\color{schrift}\normalfont\slshape}          \renewcommand{\labelitemi}{-}     \renewcommand{\labelitemii}{$\cdot$}     \renewcommand{\labelitemiii}{$\circ$}     \renewcommand{\labelitemiv}{$\bullet$}          \fboxrule0pt          \definecolor{rahmen}{RGB}{0,73,114}     \definecolor{grund}{RGB}{238,241,251}               \definecolor{schrift}{RGB}{0,73,114}          \usepackage[pdftex, colorlinks=true,pdfstartview=FitB,bookmarks=false, urlcolor=schrift, linkcolor=schrift]{hyperref}          \captionsetup{format=plain, labelfont={color=rahmen,bf}}          \newcommand{\defeq}{\vcentcolon=}     \newcommand{\eqdef}{=\vcentcolon}          \hfuzz 40pt     \hbadness 10000          \renewcommand{\thefigure}{\arabic{chapter}.\arabic{section}.\arabic{subsection}}          \addto\captionsngerman{     \renewcommand{\figurename}{Aufgabe}}          \parskip 6pt     \parindent 0pt          \makeatletter     \let\stdl@section\l@section     \renewcommand*{\l@section}[2]{%       \stdl@section{\textcolor{black}{#1}}{\textcolor{black}{#2}}}     \let\stdl@subsection\l@subsection     \renewcommand*{\l@subsection}[2]{%       \stdl@subsection{\textcolor{schrift}{#1}}{\textcolor{black}{#2}}}     \makeatother          \deftripstyle{versionheading}[][1pt]%     {22.08.2014}{\headmark}{}%     {}{\pagemark}{}          \allowdisplaybreaks          \begin{document}          \chapter{This is just some testing chapter}          \lipsum[1]     \lipsum[2]     \lipsum[3]     \lipsum[4]     \lipsum[5]     \lipsum[6]     \lipsum[7]          \paragraph{Error Prompt 1}          \begin{verbatim}         Package scrlayer-scrpage Warning: Command \deftripstyle is deprecate.     (scrlayer-scrpage) You should replace it by \deftriplepagestyle,     (scrlayer-scrpage) e.g., on input line 64.     \end{verbatim}          But when I do as the error prompt is telling me, it says the command was undefined.          \end{document}      It now prints the `headsepline` in the color I desired but the defined pagestyle doesn't work which is why I cant adjust the thickness of the `headsepline` even though it is shown exactly like this in the KOMA Manual.. Please help me, I have no clue whats going on there! I hope anyone here knows how to deal with the errors because I am completely lost. The Code produces this: ![output of examplecode 2](http://i.stack.imgur.com/MfhQL.png)


title: Fourier font and \textregistered symbol

text: I use TeXLive 2010 on Win XP and I notice that while the `\textregistered` symbol (an R in a circle which is normally placed next to trade names) appears well with the default CM font, it appears incorrectly with the fourier font (which I like much). Here's the code:               \documentclass[fleqn,a4paper,11pt]{article}     \usepackage[latin1]{inputenx}     \usepackage[T1]{fontenc}     \usepackage{fourier}          \begin{document}          Bananamark$^{{\scriptsize\mathrm{\textregistered}}{}}$          \end{document}       Any suggestion on how to make the `\textregistered` symbol appear well with the Fourier font?


title: How to suppress units such that they can be passed to viewport key?

text: How to suppress units in length macros such that they can be passed to `viewport`. See the following Minimal Not Working Example,               \documentclass{article}     \usepackage{graphicx}     \newsavebox\IBox     \savebox\IBox{\includegraphics{bald}}     \newdimen\width     \newdimen\height     \width=\wd\IBox     \height=\ht\IBox     \parindent=0bp     \begin{document}     \makeatletter     \includegraphics[viewport=0 0 \strip@pt\width \strip@pt\height]{bald}     \makeatother     \end{document}


title: Beamer: Use Libertine and Computer Modern monospace (pdflatex vs lualatex)

text: I am using `beamer` to write a presentation. I included the `libertine` package to change the default font, and I am using the `professionalfonts` theme to avoid clashes with beamer's font settings. I however dislike Libertine's monospaced family so I would like to revert to Computer Modern for `\tt` text. Therefore I included `\renewcommand{\ttdefault}{cmtt}` in my preamble. The problem is that using `pdflatex` I get the desired effect while this breaks using `lualatex`. Can anybody tell me what's going wrong and how I can fix it? Here's a MWE               \documentclass{beamer}     \usefonttheme{professionalfonts}          \usepackage[T1]{fontenc}     \usepackage{libertine}          \renewcommand{\ttdefault}{cmtt}          \begin{document}          \begin{frame}     \begin{center}     \Huge\sc     Thanks!          {\Large\tt http://www.nice.website}     \end{center}     \end{frame}          \end{document}      With `lualatex`: ![lualatex](http://i.stack.imgur.com/BwqPT.png) With `pdflatex`: ![pdflatex](http://i.stack.imgur.com/1G8gA.png)


title: Incorrect vertical line spacing after changing font size in parcolumns

text: Here's my test case...               \documentclass[english,twocolumn]{article}     \usepackage{parcolumns}     \usepackage{babel}     \usepackage[pangram]{blindtext}     \begin{document}          \begin{parcolumns}{2}     \colchunk[1]{     \tiny     \Blindtext[3][8]     }     \colchunk[2]{     \tiny     \Blindtext[3][8]     }     \end{parcolumns}          \Blindtext[5][8]          \end{document}      Which produces the following... ![enter image description here](http://i.stack.imgur.com/0AAoC.jpg) So my question is, _how can I fix the ugly large spacing in the`parcolumns` environment?_ It appears to be trying to match the line spacing of the rest of the document and ignoring the change in font size.


title: Create a rectangle with the same width as another, fitted rectangle?

text: The title says it all. I have a few nodes, and created a fitting rectangle. Now, I'd like to create another rectangle at exactly the bottom of it, so it would look like one big rectangle has been split in two.