title: Barchart, Boxplot Data Table PGF Math Errors from mixed format inline data

text: My code for a horizontal bar chart with a summarizing boxplot is coming together, but I still have a nagging PGF Math problem if I try to plot the boxplot values, which are commented out at the bottom of my code:               ! Package PGF Math Error: Could not parse input 'auto' as a floating point numb     er, sorry. The unreadable part was near 'auto'..          See the PGF Math package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.139 \end{tikzpicture}  }      My MikTeX has PGFPLOTS 1.10 and is using it. I have been going through the manuals for PGFPLOTS and PGFPLOTSTABLE, and the forum here looking for and finding much useful information. My code is as follows:               \documentclass[margin=1cm]{standalone}     \usepackage[usenames,dvipsnames]{color}     \usepackage{amsmath,relsize}           \usepackage{filecontents}      \usepackage{pgfplots,pgfplotstable}     \usepgfplotslibrary{statistics}          \pgfplotsset{every axis/.append style={                  semithick,tick style={                  major tick length=4pt,thick,black}},                  compat=1.10,      %                  discard if not/.style 2 args={                   x filter/.code={                   \edef\tempa{\thisrow{#1}}                   \edef\tempb{#2}                   \ifx\tempa\tempb                  \else                     \def\pgfmathresult{inf}                  \fi                  }                 },     }          \pgfkeys{/pgfplots/x axis shift up/.style={         x axis line style={yshift=#1},         xtick style={yshift=#1},         xticklabel shift={#1}}}     \pgfkeys{/pgfplots/y axis shift left/.style={         y axis line style={xshift=-#1},         ytick style={xshift=-#1},         yticklabel shift={#1}}}          \begin{document}     \sffamily     \begin{filecontents}{data.csv}     Miles,   Ride, Bike,    rdate      12.5,    1,    Yel-11,  {$\stackrel{\hbox{Yel-11}}{\hbox{\tiny 03/30/14}}$}     16.5,    2,    Fuji,    {$\stackrel{\hbox{Fuji}}{\hbox{\tiny 04/23/14}}$}     21.0,    3,    8000SHX, {$\stackrel{\hbox{8000SHX}}{\hbox{\tiny 05/18/14}}$}     24.2,    4,    Yel-11,  {$\stackrel{\hbox{Yel-11}}{\hbox{\tiny 05/24/14}}$}     23.4,    5,    YFoil,   {$\stackrel{\hbox{YFoil 77}}{\hbox{\tiny 05/29/14}}$}     21.1,    6,    Y-22,    {$\stackrel{\hbox{Y-22}}{\hbox{\tiny 05/30/14}}$}     23.9,    7,    YFoil,   {$\stackrel{\hbox{YFoil 77}}{\hbox{\tiny 06/01/14}}$}     32.5,    8,    Fuji,    {$\stackrel{\hbox{Fuji}}{\hbox{\tiny 06/05/14}}$}     \end{filecontents}          \pgfplotstablegetrowsof{data.csv}     \edef\numberofrows{\pgfplotsretval}     \pgfmathsetmacro\numberofticks{\numberofrows-1}          \fbox{      \begin{tikzpicture}     \begin{axis}[clip=false, domain=0:50, unbounded coords=jump,          width=0.90\linewidth,height=8.5cm,          xbar,/pgf/bar shift=0pt,          title={\centering Bike Miles for 2014},          title style={yshift=1cm, text width=0.90\linewidth,          font=\rmfamily\itshape\Large},          xmin=0, xmax=50, xticklabel pos=upper,           tick align=outside,          xticklabel style={major tick length=20pt,                             color=black, tickwidth={10pt}},           axis x line*=top, axis y line*=left,           y axis line style={opacity=0},          xmajorgrids, major grid style=black, axis on top,          xtick={0,10,15,20,25,30,35,40,50},          separate axis lines, x axis shift up=15pt,           y axis shift left=10pt, enlarge y limits=0.0,          ytick={0,...,\numberofticks}, y dir=reverse,          y tick label style={align=right, major tick length=5pt},          yticklabels from table={data.csv}{[index]3},          nodes near coords, nodes near coords align=horizontal,          ]          \addplot [draw,fill=blue!75!black, discard if not={Bike}{Fuji}]              table [x=Miles, y expr=\coordindex, col sep=comma]{data.csv};          \addplot [draw,fill=blue, discard if not={Bike}{YFoil}]              table [x=Miles, y expr=\coordindex, col sep=comma]{data.csv};          \addplot [draw,fill=yellow, discard if not={Bike}{Yel-11}]              table [x=Miles, y expr=\coordindex, col sep=comma]{data.csv};          \addplot [draw,fill=gray, discard if not={Bike}{8000SHX}]              table [x=Miles, y expr=\coordindex, col sep=comma]{data.csv};          \addplot [draw,fill=red, discard if not={Bike}{Y-22}]              table [x=Miles, y expr=\coordindex, col sep=comma]{data.csv};          \draw [red,dotted,thick] (axis cs:21.9,-0.5) -- (axis cs:21.9,\numberofrows);          \draw [black] (axis cs:12.5,-0.5) -- (axis cs:32.5,-0.5);     \draw [red,thick=4mm] (axis cs:17.9,-0.5) -- (axis cs:25.9,-0.5)           node[anchor=north east] at (axis cs:21.9,-0.5){\small $ \mu$}           node[anchor=north east] at (axis cs:17.9,-0.5){\small $-\sigma$}           node[anchor=north west] at (axis cs:25.9,-0.5){\small $+\sigma$};          \addplot+[       boxplot prepared={ draw position=\numberofrows,         lower whisker =12.50,         lower quartile=19.88,                 median=22.25,         upper quartile=23.98,         upper whisker =32.50,             box extend=0.75,  % height of box         whisker extend=0.50,  % height of whiskers         every box/.style={thick,dashed,draw=blue,fill=gray!50},         every whisker/.style={black,thick},         every median/.style={densely dotted,cyan,thick},       },     ] coordinates{};     %%[above]     %%node[left] at     %%(boxplot box cs: \boxplotvalue{lower whisker},1)     %%{\pgfmathprintnumber{\boxplotvalue{lower whisker}}}     %%node[left] 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[right] at     %%(boxplot box cs: \boxplotvalue{average},0.5)     %%{\pgfmathprintnumber{\boxplotvalue{average}}}     %%node at     %%(boxplot box cs: \boxplotvalue{upper quartile},1)     %%{\pgfmathprintnumber{\boxplotvalue{upper quartile}}}     %%node[right] at     %%(boxplot box cs: \boxplotvalue{upper whisker},0.5)     %%{\pgfmathprintnumber{\boxplotvalue{upper whisker}}};     \draw  node[anchor=center] at (axis cs:40.0,9) {\numberofrows\ rides for 175.1 miles as of 06/05/14};          \end{axis}          \end{tikzpicture}  }%fbox     \end{document}      which generates: ![enter image description here](http://i.stack.imgur.com/1BzG7.jpg) I tried putting the data into a macro from the manual and examples here, but that only exasperates the situation and doesn't work. There must be a fundamental problem with the way the table is read. I added the `domain=0:50, unbounded coords=jump,` to the axis options and there were no more complaints about out of bound points not plotted for every data line, for every addplot call.               NOTE: coordinate (12.5,0Y0.0e0]) has been dropped because it is unbounded (in x     ). (see also unbounded coords=jump).       Seems like the `x=Miles, y expr=\coordindex` is having problems, though it still plots the bar. In either case, trying to print/label the boxplot values for (lw, q1, q2,q3, uw) crashes the compile (above error message). Also, how do I shift the major grid lines up with the x axis and stop them from extending past the bottom bar? They are normally white so they're only visible through the bars. I'm trying to learn PGFPLOTS using this simple/sample data set. I have the two PGF manuals on my iPad in iBooks, but the form of the pdf's causes iBooks to crash often. The LaTeX Writer app for the iPad runs PGFPLOTS rather well, though PGFPLOTS has to be updated manually to version 1.10. I would greatly appreciate any help here. Thanks in advance. Regards, Dave


title: fontspec (xelatex) finding fonts by name, installed or in TEXMFHOME

text: This is related to my other question: fontspec search path in TEXMFHOME I'm trying to write a package using a specific opentype font through `fontspec`. Using TeXLive 2013 on a Debian computer (a fellow confirms the same behaviour for Mac OS X) I see the following behaviour:   * Font installed as system font (in ~/.fonts):   `lualatex` finds it by its font name and its file name   `xelatex` finds it by its font name _but not_ by its file name   * Font installed in TEXMFHOME (~/texmf/fonts/opentype/FONT/):   `lualatex` finds it by its font name and its file name   `xelatex` finds it by its file name _but not_ by its font name Is it really true that xelatex (TeXLive on Linux/Mac at least) does find files _only_ by font name when installed as system font and _only_ by file name when installed in the texmf tree? Or am I missing something? And if that's true could someone please tell me if it's the same on Windows/other TeX distros? I'm interested in a most generic answer because I will have to tell the user (for arbitrary OS/distro combinations) where to copy (or link) the font folder after downloading the package.


title: Alignment of pictures and captions inside minipages

text: I need to display two pictures side by side any make them wider than textwidth. I read a solution to use something like the following and have successfully used it with pdf images:               \begin{figure}[htb]       \centering       \makebox[\textwidth]{%         \begin{minipage}[b]{0.7\textwidth}           \includegraphics[width=\textwidth]{myimage.pdf}           \caption{First Image}         \end{minipage}         \begin{minipage}[b]{0.7\textwidth}           \includegraphics[width=\textwidth]{myimage2.pdf}           \caption{Second Image}         \end{minipage}       }%     \end{figure}%      I am now trying to use it with images created using the `picture` environment. It mostly works fine, except that the image on the left is not centered on its caption. I am using the same code as the above example, except that `\includegraphics...` is replaced with `\begin{picture}...\end{picture}`. The images are different sizes (the first image is narrower), but even if I change the size of the first image, the display is the same. Any recommendations?


title: Can I use XeTeX to produce a PDF/Xn file?

text: I am using the XeTex typesetting system on a Macintosh running Snow Leopard. I would like it to produce a PDF/X file. Is this possible? I am mainly concerned with ensuring the fonts are embedded.


title: Remove two words

text: I'm writing a description of a method, where the title of each section is formatted like `Step X: <step title>`. Now, I want to reference the section as `Step X ("<step title>")`. I am aware of `\nameref`, but I don't know how to remove the first two words of a string. When trying to use `stringstrings` to remove the first two words, I get > Use of `\removeword` doesn't match its definition. Minimum example:               \documentclass{article}     \usepackage{stringstrings}          \newcounter{step}          \begin{document}          \removeword\removeword{x1 x2 x3}          \end{document}      What can be done to have `stringstrings` remove the first two words? **The intended use** (updated answer) (If I should put that as separate question, I'll do) I'm writing a description of a method, where the title of each section is formatted like `Step X: <step title>`. Now, I want to reference the section as `Step X ("<step title>")`. Currently, I'm using the solution http://tex.stackexchange.com/a/73710/9075, which suggests to redefine `@currentlabelname`. However, I have to type my section name twice. Minimum example:               \documentclass{article}     \usepackage{csquotes}     \usepackage{hyperref}          \newcounter{step}          \newcommand{\titleinquotes}[1]{(\enquote{\nameref{sec:#1}})}          \begin{document}          We will see something in Step~\ref{S1} \titleinquotes{S1}.          \refstepcounter{step}     \label{S1}     \section{Step \thestep: Setup Environment}     \label{sec:S1}          \end{document}      The question is how `\titleinquotes' has to be changed to have following output > We will see something in Step 1 (“Setup Environment”) The quick hack               \newcommand{\removedoubleword}[1]{\removeword[e]{#1} \removeword{\thestring}}      \newcommand{\titleinquotes}[1]{(\enquote{\removedoubleword{\nameref{sec:#1}}})}      does not work: `Use of \\\removeword doesn't match its definition.`. Without using `\nameref`, it works.


title: safe places to skip lines in the source

text: Ideally, I would like to be able to skip lines before and after `\section`, before and after many environments (theorem, itemize, enumerate, etc.), between `\item`s in a list, before and after display-style math, and in several other places. It helps me keep my source code organized. Unfortunately for me, Donald Knuth decided that a skipped line should have semantic meaning in the source code. I am sure he had good reasons for this, but I personally would be much happier if starting a new paragraph required a `\par` command. **I am aware that the conventional solution for code organization is to put a`%` symbol at the beginning of lines skipped for non-semantic reasons;** however, I find that these extra `%` symbols clutter my code and are less useful than purely skipped lines. * * * The question: **What places, if any, in a conventional LaTeX document can one or more lines be skipped without affecting the output?** I recognize that no place can be completely safe if redefinitions are allowed, so assume that one of the standard or AMS document classes is in use, that no additional packages have been loaded, and that the only definitions in the preamble are defining theorem types. One additional constraint, to distinguish this question from When can I safely add an empty line?: **Assume I have no idea how various commands and environments affect vertical mode.** If you will, my question is asking for a (not necessarily comprehensive) list of what commands/environments affect vertical mode in such a way that a skipped line before and/or afterwards will have no effect.


title: Appendix - Adding PDF

text: Thanks for your awesome support so far. This page helps me a lot getting into Latex! In my appendix, I want to add several PDF-Documents (questionnaires) which I used in study. I managed to implement an appendix and the PDF files (not hard to do ;) - but now I have 2 issues I cannot solve: a) I would like to see that the first page of my PDF is coming directly below the title of my appendix A. Yet, Appendix A is standing solo on the beginning of the page, then a lot of unused space is followed by next page with the content of PDF. b) At the moment, the PDF-pages are covering the header of the secitons (A Appendix)- I would like to see the headers followed by PDF page... is this even possible?               \begin{document}     \newpage     \appendix     \section{Appendix A}          \includepdf[pages={1-2}]{Example.pdf}          \end{document}


title: How to pass two options to tcolorbox

text: Could someone kindly let me know how I can pass one option to `minted options` and one to `tcolorbox` at the same time to a `pythoncode` tcolorbox listing? I mean, I want some options get passed to `minted options`, as shown by `#1` in the MWE below and some get passed to `tcolorbox`, as shown by `#2`.               \documentclass{book}         \usepackage[left=1.00in, right=1.00in, top=1.00in, bottom=1.00in]{geometry}              \usepackage{amsmath}         \usepackage{tcolorbox}         \tcbuselibrary{minted,skins,breakable}              \usepackage{hyperref}            \hypersetup{ %             pdfborder = {0 0 0},             colorlinks=true,         }              \newtcblisting{pythoncode}[2][]{           listing engine=minted,           breakable,          colback=bg,           colframe=black!70,           listing only,           minted style=colorful,           minted language=python,           minted options={linenos=true,numbersep=3mm,texcl=true,#1},           left=5mm,enhanced,           overlay={\begin{tcbclipinterior}\fill[black!25] (frame.south west)                     rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},                 #2,     }              \begin{document}              \section{Python example}         \begin{pythoncode}[colback=red!5!white,colframe=red!75!black,title=My nice heading]         # indent your Python code to put into an email         import glob         # glob supports Unix style pathname extensions         python_files = glob.glob('*.py')         for file_name in sorted(python_files):             print '    ------' + file_name                  with open(file_name) as f:                 for line in f:                     print '    ' + line.rstrip()                  print         \end{pythoncode}              \end{document}


title: How to put a mark on an arc (tikz,decoration)

text: I have a problem with this code :               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{decorations.markings}     \begin{document}          \begin{tikzpicture}[decoration={markings, mark = at position .5 with      {\draw (-2pt,-2pt) -- (2pt,2pt)  (2pt,-2pt) -- (-2pt,2pt);}}]              % wrong      %\draw [postaction={decorate}] (0,0) -- ++(146:1) arc (146:157:1)--(0,0);     %fine     \draw [postaction={decorate}] (0,0) -- ++(146:1.2) arc (146:157:1.2)--(0,0);     \end{tikzpicture}          \end{document}      The line after % wrong gives an error `dimension too large`. I think there is a math problem because the arc or the radius is too small or perhaps both. A solution is (another one is to use a scale >1 but for the fine line don't use a scale like .8 :               \documentclass{article}     \usepackage{tikz,fp}     \usetikzlibrary{decorations.markings,fixedpointarithmetic}          \begin{document}          \begin{tikzpicture}[fixed point arithmetic,                         decoration={markings, mark = at position .5 with            {\draw (-2pt,-2pt) -- (2pt,2pt)  (2pt,-2pt) -- (-2pt,2pt);}}]               \draw [postaction={decorate}] (0,0) -- ++(146:1) arc (146:157:1)--(0,0);     \end{tikzpicture}          \end{document}       But I can't use it because the time for the compilation is too long. Is it possible to speed up the last code or perhaps someone knows another way to get the mark without an error ? Perhaps I use `decoration` in a wrong way!


title: Section numbering with chapter in amsbook

text: I'm using `amsbook` to write a report. I'm using `\chapter{}`s and `\section{}`s, and their numbering is fine. However, `\section{}`s are numbered sequentially inside each `\chapter{}`, but without the indication of the `\chapter{}`: basically, I'm getting `Section 1` instead of `1.1`, and similarly `Subsection 1` instead of `1.1.1`. How do I go about fixing this?


title: All \ref{} to an equation refer to the section, not to the labeled equation

text: I am writing a document in LaTeX using TeXShop on OS X Mavericks. My .tex file looks like this:               \documentclass[11pt,titlepage]{article}     \usepackage[left=2.5cm,right=2.5cm,top=2.5cm,bottom=3.0cm]{geometry}     \newcommand{\agfauthor}[1]{%     \begin{center}by #1\end{center}}     \newenvironment{Abstract}{\begin{center}\textbf{Abstract}\end{center}%     \begin{quote}}{\end{quote}}          \usepackage[english]{babel}        \usepackage[utf8]{inputenc}        \usepackage{url}     \usepackage{graphicx}     \usepackage[margin=35pt,labelfont=bf,textfont=it]{caption}             \usepackage{textcomp}         \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{amsthm}     \usepackage{float}     \usepackage{subfig}     \usepackage{epstopdf}     \usepackage{booktabs}     \setlength\parindent{1cm}     \usepackage{enumerate}     \usepackage{parskip}     \usepackage{siunitx}          % To get slash frac to scale to font size.     \newcommand{\slfrac}[2]{\left.#1\middle/#2\right.}          % Give figures number after section, not cumulative number     \usepackage{chngcntr}     \counterwithin{figure}{section}     \counterwithin{equation}{section}          \usepackage[style=authoryear,backend=biber,natbib=true]{biblatex}          \begin{document}     Hello          \begin{equation}     1+1=2          \end{document}     \label{equation}     (I just added an example to what I originally did for others to see)      I was just made aware of an annoying error. When I label an equation and refer to it (using `\label` and `\ref`), the reference in the .pdf text is the number of the section or subsection, not that of the equation in question. It is starting to get really annoying and I have never had this problem before. I have also tried to delete all .aux files etc. but it didn't help. Does anyone have any idea on how to fix this or know what the problem is?


title: Newtheoremstyle head aligned with top of tabularx

text: Here's an example :               \documentclass[12pt]{report}     \usepackage{amsmath, amssymb, amsthm}          \usepackage{tikz}     \usetikzlibrary{shadows}     \newcommand*\squared[1]{\tikz[baseline=(char.base)]{\node[shape=rectangle, draw, inner color = white, drop shadow = {opaque, black}, inner sep=3pt, text justified] (char) {#1};}}          \newtheoremstyle{exercise}       {\topsep}       {\topsep}       {\hangindent=2em}       {}       {}       {}       {.8em}       {\squared{\thmnumber{#2}}}          \theoremstyle{exercise}     \newtheorem{exercise}{}          \renewcommand{\arraystretch}{1.75}     \usepackage{tabularx}          \begin{document}          \begin{exercise}         \begin{tabularx}{\textwidth}{r @{\hskip .4em} X}             a) & This is a test. \\             b) & This is a long test. \\             c) & This is a very long test.         \end{tabularx}     \end{exercise}          \end{document}      What I want is the number of the exercise to be aligned with the _top_ of the tabularx (question a)) instead of being aligned with the _middle_ of the tabularx.


title: How to tell LaTeX to place all figures at the end of pdf file?

text: Well, I search through the SE site but it seems everyone else was asking how to avoid appending figure and their accidents are not quite an elegant solution to my problem --- I'm looking for a way (one line command if possible) so that I can either keep the figures where they appear within the text, or sweep all to the very end of file (after all text including bibliography) while maintaining their relative order. Any ideas?


title: Longtable with two column

text: I need a longtable with only two columns. I saw this topic Two column list with and I managed to convert into longtable.               \documentclass{article}     \begin{document}     \begin{longtable}{|p{0.45\textwidth}|p{0.45\textwidth}|}     \caption{ex} \\     \hline     1. One one one     &     3. One one one One one one One one one One one one One one one One one one One one one One one one One one one \\     2. One one one One one one One one one One one one One one one One one one One one one One one one One one one     &     4. One one one One one one\\     \hline     \end{longtable}     \end{document}      The problem is that between point 1 and 2 there is a huge space. I want that the points do not have extra space between them. It needs to be a longtable! Thanks. ![enter image description here](http://i.stack.imgur.com/qGpwr.png)


title: How to switch between horizontal and vertical modes?

text: I've got some complex code giving me an error: `! You can't use '\vadjust' in vertical mode.` So I presume I need to switch to the horizontal mode. I've found this question, "What are vertical and horizontal modes?", but nothing explaining how to switch between them. I've looked at the `TeXbook`, but nothing seems to answer this question. How do switch between the two?


title: Standard CJK fonts for LaTeX?

text: TUG maintains an extensive catalogue of fonts at http://www.tug.dk/FontCatalogue/allfonts.html . Is there also one maintained for CJK fonts? I've been using XeLaTeX on OS X with my own fonts, mostly proprietary, but I'm moving a lot of my work to Ubuntu and would like to try a more standard set of open-source CJK fonts. One concern is finding a single font that covers essentially all of the CJK code points, rare as well as common, with reasonably presentable glyphs. Thanks for any suggestions.


title: Memoir manual: "The numbering of parts has no effect on the numbering of \chapters."

text: I am writing my PhD using `memoir` class. I have 5 parts, divided into chapters. But before the first chapter of each part, I have an introduction to what the following chapters are about. Here's an example:               \documentclass{memoir}          \begin{document}          \tableofcontents          \part{First Part}          \section{An introduction to First Part}          \chapter{First chapter of First Part}          \section{First section of First chapter}          \chapter{Second chapter of First Part}          \section{First section of Second Chapter}          \section{Second section of Second Chapter}          \part{Second Part}                \section{An introduction to Second Part}          \chapter{First chapter of Second Part}          \section{First section of First chapter}          \end{document}      The problem is that, until the first chapter of a new part is created, the headers are still related to the previous chapter and previous section, which is not what I intended. Any ideas of how to solve this?


I have an error when I want to compile the LaTeX code below when I set `\var` to 1. Otherwise I have no problem. The error I got is: `Package pgfkeys Error: I do not know the key '/tikz/ '` Could you please tell what I have done wrong? Thanks a lot for your response.               \documentclass{article}     \usepackage{pgfplots}               \begin{filecontents*}{S1data.dat}     20  1.914   1.443   1.137   2.476   23.555     40  1.734   1.381   1.173   1.805   25.001     60  1.737   1.428   1.176   2.176   25.001     80  1.797   1.813   0.94    2.518   25.001     100 1.681   1.256   1.463   2.107   25     120 1.797   1.508   1.254   1.966   25     140 1.649   1.403   1.177   1.825   25     160 1.534   1.438   1.272   2.156   24.998     180 1.541   1.412   1.283   2.408   24.999     200 1.967   1.4 1.205   2.688   49.805     220 1.584   1.257   1.269   1.872   50     240 1.727   1.361   1.292   2.144   50     260 1.479   1.596   1.207   1.726   50     280 1.426   1.349   1.259   2.08    50     300 1.629   1.456   1.321   1.798   50     320 1.872   1.447   1.31    1.574   50     340 1.682   1.503   1.173   1.687   50     360 1.543   1.242   1.22    1.743   50     380 1.823   1.472   1.307   2.005   74.754     400 1.66    1.308   1.441   1.615   75     420 1.636   1.42    1.239   1.754   75     440 1.572   1.505   1.253   1.556   75     460 1.681   1.27    1.139   1.586   75     480 1.74    1.536   1.185   1.996   75     500 1.772   1.318   1.335   2.126   75     \end{filecontents*}          \def\Colorarray{{1}{blue}{2}{red}{3}{orange}{4}{violet}}     \def\getcolor#1{\expandafter\xgetcolor\Colorarray{#1}{}test{#1}}     \def\xgetcolor#1#2#3test#4{\ifnum#4=#1 #2\else\xgetcolor#3test{#4}\fi}          \begin{document}     \pgfkeys{/pgf/number format/.cd, set decimal separator={,{\!}}, set thousands separator={}}          \def\var{1}          \begin{tikzpicture}       \begin{axis}[title={Title}, grid=major, axis x line=bottom, axis y line=left,       xlabel={Time}, ylabel={Page time(s)},        x tick label style={font=\tiny, rotate=35},       y tick label style={font=\tiny},       x label style={font=\small},       y label style={font=\small},       legend entries={Page1,Page2,Page3,Page4},legend style={font=\tiny, at={(1.5,1)}}]       \ifnum\var=1               \foreach \i in {1,2,...,4} {                     \addplot[smooth,\getcolor{\i}] table[x index=0,y index=\i] {S1data.dat};               }         \else             \addplot[smooth,\getcolor{1}] table[x index=0,y index=1] {S1data.dat};             \addplot[smooth,\getcolor{2}] table[x index=0,y index=2] {S1data.dat};             \addplot[smooth,\getcolor{3}] table[x index=0,y index=3] {S1data.dat};             \addplot[smooth,\getcolor{4}] table[x index=0,y index=4] {S1data.dat};         \fi       \end{axis}     \end{tikzpicture}          \end{document}


title: Vertical spacing in multi-line title

text: Using LyX I have set the document to 1.5 spacing and it is applying to my `title` causing a weird space since my title goes into a second line. Other places in the document changing the paragraph setting to single line spacing manually (paragraph setting -> line spacing) works fine, but it isn't working in the title. Any ideas how to make the spacing between the lines of my title single instead of 1.5? Here is the code for the title:               \begin{singlespace}          \title{Long title Long title Long title Long title Long title Long title Long title Long title Long title}     \end{singlespace}          \maketitle


title: figures and blocks in the same slide

text: I would like to place in a slide a block of words and at right of it a figure so that in the slide the figure will be on the left and the block explaining it at right. I'm using Beamer. I tried the example posted in Beamer text and image on the same slide but it doesn't work. How can this be done?


title: Passing normal title to the pdf bookmark

text: I am writing a document and a section as a very long title troubling my header. To work around this, I am using the short title like this:               \section[bla]{blablabla}      This works fine for the header, but the pdf bookmark is now using the short title instead of the normal title. Is there anyway to fix this? Here is the definition of the hyperref package:               \usepackage[pdftex,hyperindex=true]{hyperref}     \hypersetup{     bookmarksopen=true,     pdftitle={Title},     pdfauthor={Author},     pdfsubject={Blablabla},     pdfkeywords={},     pdfmenubar=true,     pdfhighlight=/O,     pdfpagemode=None,     pdfpagelayout=SinglePage,     pdffitwindow=true,     bookmarksopen=true,     hidelinks=true}


title: TeXnicCenter and Sumatra PDF forward/inverse search off by a few paragraphs

text: I am using TeXnicCenter 2.0 Alpha 4 and MikTex 2.9 with SumatraPDF 2.0.1. My forward/inverse search is off by 3-4 paragraphs. Forward/inverse search under DVI and YAP works correctly. My setup is shown below. How do I get my SumatraPDF to forward/inverse search properly? ![Profile screenshot 1](http://i.stack.imgur.com/XVMPF.jpg) ![Profile screenshot 2](http://i.stack.imgur.com/Gh3VV.jpg)


title: How to define a key=value that has an equivalent boolean value key

text: Assume you're defining a key=value `align` for some environment `realign` that you'll use in the following way:               \usepackage{xkeyval}% http://ctan.org/pkg/xkeyval     \newenvironment{realign}[1][]       {\setkeys{fam}{#1}\myalignment}% \begin{realign}       {}% \end{realign}      You define the `align` _choice_ key to set `\myalignment` by using (taken from the `xkeyval` documentation):               \define@choicekey*{fam}{align}[\val\nr]{left,center,right}{%       \ifcase\nr\relax         \def\myalignment{\raggedright}% align=left       \or         \def\myalignment{\centering}% align=center       \or         \def\myalignment{\raggedleft}% align=right       \fi     }      However, now you have the awesome idea of creating corresponding _boolean_ keys `left`, `center` and `right` such that `left|center|right=true` is equivalent to `align=left|center|right`. Is it possible to define the _boolean_ keys inside a macro definition, for example, via something like `\newboolkey{left}`:               \newcommand{\newboolkey}[1]{       \define@boolkey{fam}[@bool@]{#1}[true]{%         \csname if@bool@#1\endcsname%           \setkeys{fam}{align=#1}%         \fi%       }%     }      This doesn't work, since the argument `#1` of `\newboolkey` doesn't translate properly to the definition of the `left` key. Of course, removing `\define@boolkey` from `\newboolkey` and explicitly stating the key (instead of `#1`) works. However, I'm not interested in creating a boolean key in this way (by hand). I'd like to use a macro definition to do this since it should be automated and flexible. Here's a non-working minimal example:               \documentclass{article}     \usepackage{lipsum}% http://ctan.org/pkg/lipsum     \usepackage{xkeyval}% http://ctan.org/pkg/xkeyval     \newenvironment{realign}[1][]       {\setkeys{fam}{#1}\myalignment}% \begin{realign}       {}% \end{realign}     \makeatletter     \define@choicekey*{fam}{align}[\val\nr]{left,center,right}{%       \ifcase\nr\relax         \def\myalignment{\raggedright}% align=left       \or         \def\myalignment{\centering}% align=center       \or         \def\myalignment{\raggedleft}% align=right       \fi     }     \newcommand{\newboolkey}[1]{       \define@boolkey{fam}[@bool@]{#1}[true]{%         \csname if@bool@#1\endcsname%           \setkeys{fam}{align=#1}%         \fi%       }%     }          \makeatother     \begin{document}     \begin{realign}[align=left]     \lipsum[1]     \end{realign}          \newboolkey{left}% Create a boolean equivalent for align=left     \makeatletter     \if@bool@left\else% Check if key is defined.       \texttt{left} key defined     \fi          \begin{realign}[left]% Doesn't work     \lipsum[1]     \end{realign}     \end{document}


title: In table of contents, long page numbers intrude on right margin despite plenty of available space

text: Some of the page numbers listed in my table of contents are long roman numerals. For some reason, these long page numbers get pushed into the right margin. Here is a screenshot of the table of contents. Note that the "xviii" page number gets pushed into the right margin, creating a black "warning blot". ![Abstract's page number violates right margin](http://i.stack.imgur.com/SKMuK.png) How can I fix this? Below is some minimal code that recreates this problem:               \documentclass[12pt,draft,letterpaper]{report}     \usepackage{tocloft}          \begin{document}          \pagenumbering{roman}          % PROBLEM: In the table of contents here, the abstract's page number is pushed     %          into the right margin.     \tableofcontents     \newpage .          \section*{Acknowledgements}\addcontentsline{toc}{section}{Acknowledgements}          Here are the acknowledgements.          % a bunch of blank pages, to place the abstract on page xviii     \newpage . \newpage . \newpage . \newpage . \newpage .     \newpage . \newpage . \newpage . \newpage . \newpage .     \newpage . \newpage . \newpage . \newpage . \newpage .          \chapter*{Abstract}\addcontentsline{toc}{section}{Abstract}          This is the abstract.          \end{document}


title: Using \hyperlink to link text to page with an implicit page anchor not known in advance

text: `hyperref` provides the command `\hyperlink`, with syntax:               \hyperlink{name}{text}      where _name_ is the name of a hypertext object, and _text_ is used as the link to jump to the defined mark. Page anchors, e.g., `page.12`, can also be used as hypertext objects. For example,               Click \hyperlink{page.23}{here} to jump to page 23.      This was proposed by Martin Scharrer as a solution to this problem. I would like to link a string of text to a page (by page number) using `\hyperlink`, but being able to refer to an implicit page anchor `page.<number>` whose ''number'' is not known in advance. That is, use a value of the counter `page`, which is only set later in the document, in the argument of `\hyperlink`. Here's a hypothetical solution:               \documentclass{article}          \usepackage[pageanchor]{hyperref} % option is the default anyway          %% Martin Scharrer's patch for hyperref     %% available at http://tex.stackexchange.com/a/19416/9237     \makeatletter     \let\orig@Hy@EveryPageAnchor\Hy@EveryPageAnchor     \def\Hy@EveryPageAnchor{%         \begingroup         \hypersetup{pdfview=Fit}%         \orig@Hy@EveryPageAnchor         \endgroup     }     \makeatother           \def\getpageref{???}   % \getpageref extracts the numeric value of \pageref{key}                            % for use in the first argument of \hyperlink          \begin{document}          See     \hyperlink{page.\getpageref{lkd}}{this page}     for further clarification.          \newpage          This is the linked page.\label{lkd}          \end{document}      I know how to achieve a _similar_ solution by simply using `\label` and then `\pageref` (or `\autopageref`), but I am interested in making use of a `hyperref` patch proposed here by Martin to make all page anchors be displayed in full page mode. (This patch only seems to work with `\hyperlink`.)


title: Comment Multi-line Text on Counter Condition

text: I have a document which I want to print in several (let's say 10) different versions. Some parts are just a draft, others are more or less finished, some are ready for publication and so on. I would like to associate a number between 1 and 10, called _Release Level_ , to each part of the text. In the beginning I would like to specify a global _Publication Level_ , let's say 5, and I want all parts of the text printed, which have a Release Level >=5. Since there are already multiple packages available dealing with conditional printing I would like to use them to solve the problem. The following code uses `comment`. Using `\rlcheckstatus` and `rltext` works fine as described below, but the environment `rlctxt`, which just combines both commands produces the error: `! File ended while scanning use of \next.<inserted text> \par` I tried to use `versions` instead, but this produces the same problem. Is there any way around that problem?               \documentclass{scrartcl}          \usepackage{ifthen}     \usepackage{comment}          \newcounter{rlpublvl}   %this counter stores the publication level     \newcommand{\rlstetpublvl}[1]{\setcounter{rlpublvl}{#1}}    %sets the publication level to #1     \newenvironment{rltext}{}{}          \newcommand{\rlcheckstatus}[1]{    %activates the environment rltext if #1 >= rlpublvl     \addtocounter{rlpublvl}{-1}     \ifthenelse{#1 > \value{rlpublvl}}         {\includecomment{rltext}}         {\excludecomment{rltext}}      \addtocounter{rlpublvl}{1}     }               \newenvironment{rlctxt}[1]{\rlcheckstatus{#1}          \begin{rltext}}{\end{rltext}}          \begin{document}          \rlstetpublvl{5}    %global publication level set to 5          \rlcheckstatus{5} %this is printed     \begin{rltext}     This is ready for publication.     \end{rltext}          \rlcheckstatus{0}  %this is not printed     \begin{rltext}     This part is still under construction.     \end{rltext}          \rlcheckstatus{7} %this is again printed     \begin{rltext}     This part is good again.     \end{rltext}          \begin{rlctxt}{3} %this does not work     foo        \end{rlctxt}          \end{document}


title: Practical uses for skips with negative stretch or shrink components

text: I am currently looking somewhat carefully at how TeX manipulates skips, and I am having trouble finding practical use cases for skips with a negative stretch or shrink component, such as `\Askip` and `\Bskip` in the following.               \newskip\Askip     \newskip\Bskip     \Askip 0pt plus -2pt minus 3pt     \Bskip 0pt plus 1fil minus -4bp      They lead to odd situations. For instance, putting a skip with a large negative stretch component in a box that it somewhat underfull will cause other skips to shrink proportionally to their stretch component.               \hbox to 200pt{A B C\hskip 0pt plus -50pt}\bye      What happens is that since the box is underfull, TeX looks at the sum of the available stretch components. Since this sum is negative, the stretch components are multipled by a negative number. So, obviously this example is not useful, but are there some more useful examples of what negative glue can be used for?


title: Image link clickable in non-white areas (excluding the background)

text: Consider image sample below. I'm including it using \includegraphics and I have linked it to an url using \href. What I would like is to have it in the pdf file in such a way that the **mouse would only allow you to follow the link when passing over the grey zone and not through the white background**. I'm using a png file with no background but with no success... Does someone know how to do this? Thank you so much in advance! ![enter image description here](http://i.stack.imgur.com/VxVAi.png):


title: Czech characters are wrongly typeset

text: I am witing a document that is almost entirely in English but abstract will be in Czech as well as my name on the title page so I need the support of Czech characters. Until now I never had problems with this but now TeXmaker does not compile the characters the way it should. I tried `\usepackage[czech,english]{babel}` in combination with `\selectlanguage{czech}` but none of them is working as well. Here's the main body of the document, I further include external files:               \documentclass[a4paper,12pt]{report}     \usepackage[cp1250]{inputenc}     \usepackage[IL2]{fontenc}     \usepackage{epsf,graphics,amsmath,amsfonts,amssymb,amsthm}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{amsmath}     \usepackage{latexsym}     \usepackage{epsfig}     \usepackage{color}     \usepackage{enumitem}     \usepackage{array}     \usepackage{booktabs}     \usepackage{caption}     \usepackage{hyperref, color, xcolor}     \definecolor{grey}{RGB}{160,160,160}     \urlstyle{same}     \usepackage{acronym}     \usepackage[nottoc]{tocbibind}     \usepackage{tablefootnote}     \usepackage{eurosym}     \newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}     \newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}     \newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}     \hypersetup{linkcolor = grey,citecolor = grey,    citebordercolor = grey, linkbordercolor = grey, urlbordercolor = grey     }     \renewcommand{\baselinestretch}{1.5}     \hoffset -1.54cm \voffset -0.04pt \evensidemargin 1.5cm%\hoffset -1.54cm \voffset -0.04pt \evensidemargin 1.5cm     \oddsidemargin 2.5cm \topmargin -0.6cm  %-1,6     \textheight 237mm \textwidth 150mm          \usepackage{chngcntr}     \captionsetup{aboveskip=4pt}     \usepackage{fancyhdr}     \pagestyle{fancy}     \fancyhf{}     \fancyhead[L]{Top Left}     \fancyhead[R]{Top Right}     \renewcommand{\headrulewidth}{0.4pt}          \begin{document}\pagenumbering{roman}     \include{titlepage}      \include{declaration}     \include{abstrakt}              \pagestyle{fancy}                                                           %headers style     \fancyhf{}     \fancyhead[L]{\textcolor{black} {\nouppercase  \leftmark}}     \fancyhead[R]{\textcolor{black} {\thepage}}     \renewcommand{\headrulewidth}{0.4pt}                                                             \pdfbookmark[0]{Contents}{toc}        \tableofcontents     \clearpage          \include{acronyms}     \include{listoffiguresandtables}          \clearpage     \pagenumbering{arabic}     \pagestyle{fancy}     \fancyhf{}     \fancyhead[L]{\textcolor{black} {\nouppercase  \leftmark}}     \fancyhead[R]{\textcolor{black} {\thepage}}     \renewcommand{\headrulewidth}{0.4pt}          \include{maintext}     \bibliographystyle{acm}     \bibliography{Bibliography}     \include{references}     \include{appendixA}     \include{appendixB}     \end{document}      The title page looks like this:               \pagestyle{empty}     \begin{center}     \textbf{\LARGE{CHARLES UNIVERSITY IN PRAGUE}}\\     \Large{FACULTY OF SOCIAL SCIENCES}\\     \large{Institute of Economic Studies}\\     \vspace{11mm}     \includegraphics[scale=0.3]{karelII.pdf}\\     \vspace{12mm}     \Large{BACHELOR THESIS}\\     \vspace{12mm}      \textbf{\LARGE{Predatory pricing in the airline industry}}\\     \end{center}     \vspace{55mm}          \noindent Author: \textbf{Široký}\\     \noindent Supervisor: \textbf{Name}\\     \noindent Year of defence: \textbf{2014}      Does someone know what could be the problem? THANKS A LOT


title: How to modify the LaTeXTools.sublime-settings to make it work in Windows (MiKTEX)

text: First, I use Windows XP and MiKTeX. As a thoroughly new-user of LaTeX, I don't know how to modify `LaTeXTools.sublime-settings` to make the ST3 comply the LaTeX code. Even after reading the introduction on https://github.com/SublimeText/LaTeXTools, I try to modify the file as follows: Firstly, in the `platform_settings` section: ![enter image description here](http://i.stack.imgur.com/fJu6m.png) secondly,in the `builder_settings`: ![enter image description here](http://i.stack.imgur.com/6lTqE.png) but it still doesn't work! And I know the `LaTeXTools.sublime-settings` itself has some explanations, but I can't understand it mainly because I'm not a geek or a coder. I don't dare to modify it. Moreover,in any cases when I tap the `Ctrl+B`,the complying result is always like this: ![enter image description here](http://i.stack.imgur.com/6BjWi.png) even without the UTF-8 (actually I don't know anything about UTF-8,but I still install the ConvertToUTF8 package) ![enter image description here](http://i.stack.imgur.com/NEGC3.png)


title: Table of Contents and subappendices

text: Using the `report` document class, how can I create a table of contents that looks like: Chapter 1: Title               1.1  Title     1.2  Title          Appendices      1.A     1.B      Chapter 2: Title               2.1  Title     2.2  Title          Appendices      2.A     2.B


title: Renew autoref caption titles when using polyglossia

text: I am trying to renew autoref caption titles when using the polyglossia package. Newer versions should, according to the manual, support the \addto command similar to Babel. However, I am unable to get it to work as the following MWE illustrates.               \documentclass{article}          \usepackage{hyperref}     \usepackage{etoolbox}     \usepackage{polyglossia}     \setmainlanguage[variant=american]{english}          %\usepackage[american]{babel}          \makeatletter      \addto\extrasamerican{     \renewcommand*{\sectionautorefname}{Section}    }     \makeatother          \begin{document}     \section{Test}\label{sec:test}     Autoref to \autoref{sec:test} for a test.     \end{document}


title: Citations in captions as separate argument

text: Whenever I include a table of a figure in my research papers, I cite the source of the information in the caption itself. However, I don't want this citation to appear in the List of figures/tables. Therefore, an option for specifying a separate caption for the lists exists:               \caption[This is a caption.]{This is a caption. See: \citeinline[249]{batman11e}.}      Which produces the following in the content: > Figure 1.1: This is a caption. See: Batman (2011), p.249. This solution however includes quite a bit of redundancy. Is there a way to come up with a separate caption-command, that offers some form of "citation- option" and automatically adds a prefix and the citation? Some pseudo-code to show it:               \capncite{This is a caption.}[\citeinline[249]{batman11e}]      would produce the same as in the first code-snippet above. I'm thinking that this could theoretically be possible with some sort of macro, but I don't know whether this would be the preferred option. Addition: The `citeinline`-command is defined as:               \DeclareMultiCiteCommand{\citeinline}{\cite}{\multicitedelim}          \renewbibmacro*{cite:labelyear+extrayear}{% Change year to (year)     \iffieldundef{labelyear} %       {}       {\printtext[bibhyperref]{%        \printtext[parens]{%        \printfield{labelyear}%        \printfield{extrayear}}}}}


title: get TexnicCenter alpha 3 to reuse open window by default?

text: > **Possible Duplicate:**   >  TexnicCenter: Multiple tabs in ONE window instead of Multiple Instances > (Multiple Windows)? I've noticed that when I double click on a .tex file, Texnic Center keeps opening a new window for each file. I would rather that all files just be opened in the same window. Is there a setting for this? I'm running Texnic Center alpha 3 / windows 7


title: TeXnicCenter displays Configuration Wizard after each start

text: As the title says: TeXnicCenter 2.02 Stable (64-bit) displays Config Wizard after each start. I do not see either an option in TeXniC option or a thread here on Stack. I installed TeXnicCenter alongside MikTeX 2.9 on my brand new virtual machine (Win7 x64) and besides that, everything runs quite smoothly, but this issue is quite unconvenient. Thank you very much for any help. * * * Alright, this happened to resolve unexpectedly - while I was to follow the instructions from an answer in another thread, I was unable to achieve that desired behaviour, but at least TeXnicCenter stopped showing the Wizard at each start. Hope this helps someone.


title: TikZ: Can a node be placed at pos = .5 and then a coordinate at the end of the line?

text: As the title say, can a node and a coordinate be placed on the same line?               \documentclass{standalone}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}       \coordinate (P1) at (-2, 0);       \coordinate (P2) at (2, 0);       \draw (P1) -- (P2);       \draw[-latex] (P1) -- ++(-88.2036:1.75cm) node[scale = .75, pos = .5,       fill = white, shape = circle, inner sep = 0cm] {\(\nu_2\)};       \draw[-latex](P1) -- ++(-20:5cm) node[scale = .75, pos= .5,       fill = white, inner sep = 0cm, shape = circle] {\(v_2 = 12.9005\)};     \end{tikzpicture}     \end{document}      Can I add a coordinate to end of `(P1) -- ++(-88.2036:1.75cm)`? I couldn't find anything with a search or in the manual.


title: Month name not showing up in calendar in tikz

text: Sorry for the long post, but I give up... after hours of trying to figure out why this thing is not working, I'll be grateful if Anyone could help! I am following the Tutorial #6, in TikZ and PGF manual. Here is my result: ![enter image description here](http://i.stack.imgur.com/jNFgx.png) Here is how it SHOULD look like: ![enter image description here](http://i.stack.imgur.com/7zpS2.png) Problems:   1. Stupid `%mt` shows up right in the middle! No month names anywhere!   2. My background area is too narrow.   3. The output is on the SECOND page (first page is empty).   4. Probably more problems - but I'd be happy to at least solve one of them. Here is my complete code:               \documentclass[a4paper]{article}%     \usepackage{tikz}     \usetikzlibrary{mindmap, trees, calendar, shadows, backgrounds, calendar}          \begin{document}     % Define macro for annotations     % #1 - number of the lecture     % #2 - name of the lecture     % #3 - positioning options, like 'above'     % #4 - position where node is placed     % #5 - list of items to be shown     % #6 - date when the lecture will be held     \def\lecture#1#2#3#4#5#6{         \node[annotation, #3, scale=0.65, text width=4cm, inner sep=2mm] at (#4) {             Lecture #1: \textcolor{orange}{\textbf{#2}}             \list{--}{\topsep=2pt\itemsep=0pt\parsep=0pt             \parskip=0pt\labelwidth=8pt\leftmargin=8pt             \itemindent=0pt\labelsep=2pt}             #5             \endlist         };         % Place in calendar         \node [anchor=base west] at (cal-#6.base east) {\textcolor{orange}{\textbf{#2}}};     }     \noindent     \begin{tikzpicture}         \begin{scope}[mindmap,             % set every node to be a concept node!             every node/.style ={concept, circular drop shadow, execute at begin node=\hskip0pt},             root concept/.append style={concept color=black, line width=1ex, fill=white, text=black, font=\large\scshape},             text=white,             % define different colors             styleA/.style={concept color=red,faded/.style={concept color=red!50}},             styleB/.style={concept color=blue,faded/.style={concept color=blue!50}},             styleC/.style={concept color=orange,faded/.style={concept color=orange!50}},             styleD/.style={concept color=green!50!black,faded/.style={concept color=green!50!black!50}},             grow cyclic,             level 1/.append style={level distance=4.5cm, sibling angle=90},             level 2/.append style={level distance=3cm, sibling angle=45, font=\scriptsize}         ]         \node [root concept]  (CompSci) {CompSci} % root             child [styleA] { node (Hard Ware) {Hard Ware}                         child {node {nodes} }                         child [faded] {node {in} }                         child {node {first} }                         child {node {tree} }             }             child [styleB] { node (Lower Part) {Lower Part}                     child {node {nodes} }                     child {node {in} }                     child [faded] {node {first} }                     child {node {tree} }             }             child [styleC] { node (Robot) {Robot}                     child {node {nodes} }                     child [faded] {node {in} }                     child {node {first} }                     child {node {tree} }             }             child [styleD] { node (Head) {Head}                         child [faded] {node {secondary} }                         child {node {tree} }                         child {node {nodes} }             };              \end{scope}              % Calendar         \tiny         \calendar [day list downward,                     month text=\%mt\ \%y0,                     month yshift=3.5em,                     name=cal,                     at={(-.5\textwidth-5mm,.5\textheight-1cm)},                     dates=2009-04-01 to 2009-06-last]         if (weekend)             [black!25];         if (day of month=1){             \node at (0pt,1.5em) [anchor=base west] {\small\tikzmonthtext};         };              \lecture{1}{Hardware topics}{above,xshift=-5mm,yshift=5mm}         {Hard Ware.north}         {             \item Hardware introduction             \item Blah introduction             \item More blah introduction         }{2009-04-08}              \begin{pgfonlayer}{background}             % Clip the background so as not to enlarge the page             \clip[xshift=-1cm] (-.5\textwidth,-.5\textheight) rectangle ++(\textwidth,\textheight);             \colorlet{upperleft}{green!50!black!25}             \colorlet{upperright}{orange!25}             \colorlet{lowerleft}{red!25}             \colorlet{lowerright}{blue!25}             % The large rectangles             \fill [upperleft] (CompSci) rectangle ++ (-20, 20);             \fill [upperright] (CompSci) rectangle ++(20, 20);             \fill [lowerleft] (CompSci) rectangle ++(-20, -20);             \fill [lowerright] (CompSci) rectangle ++(20, -20);                  % the shadings             \shade [left color=upperleft,right color=upperright]                 ([xshift=-1cm]CompSci) rectangle ++(2,20);             \shade [left color=lowerleft, right color=lowerright]                 ([xshift=-1cm]CompSci) rectangle ++(2, -20);             \shade [top color=upperleft,bottom color=lowerleft]                 ([yshift=-1cm]CompSci) rectangle ++(-20, 2);             \shade [top color=upperright, bottom color=lowerright]                 ([yshift=-1cm]CompSci) rectangle ++(20,2);         \end{pgfonlayer}          \end{tikzpicture}     \end{document}


title: Author with Arabic Name

text: I am writing an paper (in English) and one of the authors of a paper I'm citing name is in Arabic. The article is written in English. The BibTex entry:               @article{kotini,          jstor_articletype = {research-article},          title = {Aristophanes's Response to the Peloponnesian War and the Defeat of the Comic Hero / استجابة أريستوفانيس للحرب الپلوپونيسية واندحار البطل الكوميدي},          author = {Kotini, Vassiliki and كوتيني, ڨاسيليكي},          journal = {Alif: Journal of Comparative Poetics},          number = {30},          pages = {pp. 134-149},          url = {http://www.jstor.org/stable/27929850},          year = {2010},          publisher = {Department of English and Comparative Literature, American University in Cairo and American University in Cairo Press},         }      What is the way to get this to display properly with the least amount of friction? Currently in the outputted PDF the arabic name and title just don't show up.


title: Vertically center numbers in table

text: Consider the following example:               \documentclass{article}          \usepackage{booktabs,dcolumn,ragged2e}          \newcolumntype{d}[1]{D{.}{,}{#1}}     \newcommand*\mc[1]{\multicolumn{1}{c}{#1}}          \begin{document}          \begin{table}      \centering       \begin{tabular}{>{\RaggedRight\arraybackslash}p{4.4cm} d{2.1} d{2.1} d{2.1} d{2.1} d{2.1} d{2.1} d{2.1} d{2.1} d{2.1}}        \toprule         \mc{{\AA}rstal} & \mc{1997} & \mc{1998} & \mc{1999} & \mc{2000} & \mc{2001} & \mc{2002} & \mc{2003} & \mc{2004} & \mc{2005} \\[1ex]         Antal passagerer i mio., som lufthavnen kan betjene                         & 17.1 & 17.8 & 19.9 & 22.7 & 22.7 & 25.2 & 25.2 & 25.2 & 28.0 \\         Forventet {\aa}rligt passagertal i mio.                         & 16.6 & 17.4 & 18.2 & 19.0 & 20.0 & 20.9 & 22.0 & 23.1 & 24.2 \\        \bottomrule       \end{tabular}     \end{table}          \end{document}      ![output](http://i.stack.imgur.com/YcQTw.jpg) How do I vertically center the numbers relativt to the blocks of text in the first column? Now, the numbers are vertically aligned at the top of the ``double lines''.


title: expl3 switch for booleans: Is there a \bool_case:Nnn?

text: There's `\int_case:Nnn`, `\tl_case:Nnn`, `\str_case:Nnn`, but I can't find something like `\bool_case:Nnn`. I know I can write:               \bool_if:NT \l__<mymodule>_<nameA>_bool { ... }     \bool_if:NT \l__<mymodule>_<nameB>_bool { ... }     \bool_if:NT \l__<mymodule>_<nameC>_bool { ... }     \bool_if:NT \l__<mymodule>_<nameD>_bool { ... }      to achieve something of the same effect, or even               \bool_if:NTF \l__<mymodule>_<nameA>_bool      {        <some code>     }     {         \bool_if:NTF \l__<mydoclue>_<nameB>_bool         {             <some code>         }         {             <continue nesting w/ default value in last *F*>          }     }      But the first example evaluates all the booleans and there is not clean way to have a default value if all fail. The second example is just really clunky, difficult to read and hard to change if, for example, you later decide that the booleans should be tested in a different order. Is there an alternative I'm not thinking of?


title: Why does my Image not load?

text: I've included some `.jpg` images in my LaTeX document. It won't load, even though the image is saved in the same folder as the main `.tex` documents. ![enter image description here](http://i.stack.imgur.com/FiRpM.png) ## Edit 1 `ss.jpg` is currently saved in same folder as the the main `.tex` file. ## Edit 2 Added a preamble screenshot: ![enter image description here](http://i.stack.imgur.com/h74QS.png) ## Update The issue has been resolved as a file name error. (See comments below)


title: How to put a counter ``This page has been viewed ... times'' on PDFLaTeX output?

text: I asked a similar question on tracking codes. which was migrated to SO. This is a bit different. Can a PDFLateX output have a counter? Can a link on a PDFLaTeX output have a counter associated with it so that when the link is followed the counter goes up by 1.


title: Issue with arXiv LaTeX - xypic diagrams rendering badly

text: I’m having an odd issue with the arXiv’s LaTeX processing: xypic diagrams that look fine when processed on my own system are rendering badly when processed by the arXiv. My question is: **Is this simply a consequence of some intended setting in the arXiv’s tex configuration, and if so, does anyone know a workaround? Or is it a bug, that I should report to them?** Specifically, in most viewers, xypic diagrams in the arXiv-produced pdfs look somewhat clunky or pixelated: ![bad arXiv-produced diagram](http://i.stack.imgur.com/GyIiC.png) (arXiv- processed) vs. ![good home-baked diagram](http://i.stack.imgur.com/ixSSv.png) (home-processed) In more complex diagrams, it significantly hurts readability. At higher magnifications, one can see more precisely what’s happening: the arrow shafts are slightly misaligned (looking at the arrow tips), possibly also with too high a line width, and the dots in a dotted arrow come out as bulky horizontally-aligned squares, rather than better-sized diagonally-aligned squares. ![enter image description here](http://i.stack.imgur.com/57Ku3.png) My home-processed pdf's render fine across various viewers. The arXiv-produced ones are more inconsistent: the ugliness shows up most consistently in Chrome (on both Mac and Linux), whence the above screenshots; to a fair extent also in Acrobat and on some printers; and to a much lesser degree on the Mac OS Preview system viewer. The issue can be seen in the wild in this paper, e.g. the second diagram on p.37. (That paper also shows that diagrams produced in TikZ — many of the more complex diagrams — don’t seem to suffer from the issue.) MWE for the issue:               \documentclass{amsart}     \usepackage[all]{xy}          \begin{document}     \title{MWE for arXiv/xypic issue}          \author{Peter LeFanu Lumsdaine}          \begin{abstract}     Bug testing, not intended for actual arXiv upload.     \end{abstract}          \maketitle          So, we need to fill a square       \[\xymatrix{       A \ar[r] \ar@{^{(}->}[d]_i & Y \ar[d]^{t} \\       B \ar[r] \ar@{.>}[ur]     & X       }\]     but the arrows come out badly!          \end{document}


title: How to hide the legend in a tikz picture

text: I am trying to hide the legends in the following `tikzpicture` code. However, after I use `every axis legend/.code={\let\addlegendentry\relax}`, it messes up the picture. Could someone help me how I can fix this?               \documentclass[border=5mm]{standalone}     \usepackage{pgfplots}     \pgfplotsset{compat=1.8}     \begin{document}          \begin{tikzpicture}          \begin{axis}[        width=10cm,        height=5cm,        scale only axis,        xmin=0.8, xmax=3.2,        xtick={1,2,3},        xmajorgrids,        ymin=0, ymax=1,        ylabel={$\phi$},        ymajorgrids,        axis lines*=left,        legend style ={ at={(1.03,1)},              anchor=north west, draw=black,              fill=white,align=left},         cycle list name=black white,         smooth,         every axis legend/.code={\let\addlegendentry\relax},     ]             \addplot coordinates{           (1,0.35)           (2,0.41)           (3,0.49)         };        \addlegendentry{$S1$=2.5};             \addplot coordinates{           (1,0.32)           (2,0.46)           (3,0.61)         };        \addlegendentry{$S2$=3.5};             \addplot coordinates{           (1,0.31)           (2,0.46)           (3,0.51)         };        \addlegendentry{$S3$=4.0};             \addplot coordinates{           (1,0.20)           (2,0.33)           (3,0.58)          };         \addlegendentry{$S4$=4.5};             \addplot coordinates{           (1,0.25)           (2,0.42)           (3,0.48)          };         \addlegendentry{$S5$=5.0};              \addplot coordinates{           (1,0.32)           (2,0.40)           (3,0.58)          };         \addlegendentry{$S6$=6.0};             \end{axis}     \end{tikzpicture}%          \end{document}      Here is the output of the above code. ![enter image description here](http://i.stack.imgur.com/raQas.jpg)


title: Harvard style bbx, cbx, and lbx

text: I am trying to get a Harvard style bibliography with Biblatex. Not just something that looks more or less like Harvard style, but the actual Harvard bibliography. APA generates: `last name, initials first name. (year).` while Harvard style is: `last name, initials first name, year.` I think this is the most important difference between APA and Harvard style bibliographies. I have seen many questions and styles that more or less resemble Harvard style bibliographies, but none of them are really it. I have an APA bbx, cbx and lbx (Dutch), and I'm looking for either an Harvard bbx, cbx and lbx or a way to modify the APA files so that they generate a real Harvard style bibliography.


title: Undefined control sequence \background{1. 1. 1.}{1. 1. 1.}{0.5}

text: I am using **MikTex 2.9** with **TeXstudio2.3** for preparation of a poster of **a0size** with the code given below               \documentclass[portrait,a0b,final]{a0poster}         \usepackage[utf8]{inputenc}        \usepackage{epsfig}        \usepackage{multicol}        \usepackage{pstricks,pst-grad}       \usepackage[english]{babel}       \usepackage{graphicx}         \usepackage{amsmath}       \usepackage{amsfonts}       \usepackage{amsopn}       \usepackage{amsbsy}       \usepackage{color}       \usepackage{hyperref}       \hypersetup{               colorlinks={true},               filecolor={0.19,0.27,0.69},               urlcolor={blue},               linkcolor={red},               citecolor={black},               }          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%       \setlength{\columnsep}{1cm}%3       \setlength{\columnseprule}{2mm}       \setlength{\parindent}{0.0cm}       \addtolength{\textwidth}{2cm}       \addtolength{\textheight}{5cm}       \addtolength{\hoffset}{-1.25cm}       %\addtolength{\voffset}{-1.0cm}       \newcommand\email[1]{{\tt\href{mailto:#1}{#1}}}       %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%       %%%               Background                     %%%       %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%       \newcommand{\background}[3]{\leavevmode%         \newrgbcolor{cgradbegin}{#1}%         \newrgbcolor{cgradend}{#2}%         \psframe[fillstyle=gradient,gradend=cgradend,         gradbegin=cgradbegin,gradmidpoint=#3]         (-1in,3.5in)(\paperwidth,-\paperheight)}        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%        %%%                Poster                        %%%        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%       \newenvironment{poster}        {\noindent         \begin{minipage}[t]{1\textwidth}}        {\end{minipage}}       %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%       %%%                pcolumn                       %%%       %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%       \newenvironment{pcolumn}[1]{%        \begin{minipage}[t]{#1\textwidth}        \begin{center}%         }{%         \end{center}%         \end{minipage}%        }       %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%       %%%                pbox                          %%%       %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%       \newrgbcolor{lcolor}{0. 0. 0.80}       \newrgbcolor{gcolor1}{1. 1. 1.}       \newrgbcolor{gcolor2}{.80 .80 1.}       \newcommand{\pbox}[4]{%         \psshadowbox[#3]{%          \begin{minipage}[t][#2][t]{#1}#4\end{minipage}}}       \begin{document}       \background{0.3 0.4 0.7}{0.3 0.7 0.3}{0.3}       %{0.2 0.3 0.8}{0.1 0.6 0.2}{0.3} - 3       %{0.3 0.4 0.7}{0.3 0.7 0.3}{0.3} - 2       %{0.3 0.7 0.3}{0.3 0.7 0.9}{0.3} - 1       %{0.2 0.7 0.9}{0.3 0.7 0.3}{0.5}       %\vspace*{2cm}       \newrgbcolor{lightblue}{0. 0. 0.80}       \newrgbcolor{white}{1. 1. 1.}       \newrgbcolor{whiteblue}{.80 .80 1.}       \begin{poster}       \begin{center}        \begin{pcolumn}{0.98}         \pbox{0.965\textwidth}{}{linewidth=2mm,framearc=0.3,linecolor=lightblue,          fillstyle=gradient,gradangle=0,gradbegin=white,gradend=whiteblue,          gradmidpoint=1.0,framesep=1em}         {            \begin{minipage}[c][9.5cm][c]{0.78\textwidth}            \begin{center}             {\sc \Huge Title}\\[3mm]             {\sc \Huge More Title }\\[4mm]             {\Large \textbf{Author}}\\[6.5mm]               \textit{$^1$ Filliation }\\[4mm]           \end{center}          \end{minipage}         }         \end{pcolumn}         \end{center}       \begin{center}       \begin{pcolumn}{0.32}          \pbox{0.9\textwidth}{40.25cm}                                                      {linewidth=2mm,framearc=0.1,linecolor=lightblue,         fillstyle=gradient,gradangle=0,gradbegin=white,gradend=white,         gradmidpoint=1.0,framesep=1em}       {         \begin{center}           \pbox{0.8\textwidth}    {}{shadow=true,shadowsize=1mm,linewidth=2mm,framearc=0.5,             linecolor=lightblue,fillstyle=gradient,gradangle=0,gradbegin=white,             gradend=whiteblue,gradmidpoint=1.0,framesep=1em}           {             \begin{center}               \bf{Motivation}             \end{center}           }         \end{center}         \vspace{1.25cm}         %        Text here. Use Maldacena conjecture \cite{Maldacena98}.         %        %        blabla         %      }       \vspace*{1cm}       \pbox{0.9\textwidth}{53.75cm}      {linewidth=2mm,framearc=0.1,linecolor=lightblue,            fillstyle=gradient,gradangle=0,gradbegin=white,gradend=white,gradmidpoint=1.0,         framesep=1em}       {           % \vspace{2cm}           \begin{center}             \pbox{0.8   \textwidth}                                                                 {}{shadow=true,shadowsize=1mm,linewidth=2mm,framearc=0.5,             linecolor=lightblue,fillstyle=gradient,gradangle=0,gradbegin=white,             gradend=whiteblue,gradmidpoint=1.0,framesep=1em}           {             \begin{center}               \bf{The Model}             \end{center}           }         \end{center}         \vspace{1.25cm}       %  equation         %          \begin{equation}           \label{Intro:N=4metric}           a = b         \end{equation}         %          The relations between the parameters are illustrated below.         %            %        }         \end{pcolumn}        \begin{pcolumn}{0.32}       \pbox{0.9\textwidth}{48.25cm}{linewidth=2mm,framearc=0.1,linecolor=lightblue,       fillstyle=gradient,gradangle=0,gradbegin=white,gradend=white,       gradmidpoint=1.0,framesep=1em}         {            % \vspace{2cm}            \begin{center}\pbox{0.8\textwidth}{}{shadow=true,shadowsize=1mm,linewidth=2mm,           framearc=0.5,linecolor=lightblue,fillstyle=gradient,gradangle=0,            gradbegin=white,gradend=whiteblue,gradmidpoint=1.0,framesep=1em}         {\begin{center}             \bf{Distance Function and String Configuration}           \end{center}         }         \end{center}         \vspace{1.25cm}              }            \vspace*{1cm}                  \pbox{0.9\textwidth}{45.75cm}{linewidth=2mm,framearc=0.1,linecolor=lightblue,        fillstyle=gradient,gradangle=0,gradbegin=white,gradend=white,gradmidpoint=1.0,       framesep=1em}           {            % \vspace{2cm}          \begin{center}\pbox{0.8\textwidth}   {}{shadow=true,shadowsize=1mm,linewidth=2mm,           framearc=0.5,linecolor=lightblue,fillstyle=gradient,gradangle=0,           gradbegin=white,gradend=whiteblue,gradmidpoint=1.0,framesep=1em}         {\begin{center}\bf{Screening Distance}\end{center}}\end{center}                  \vspace{1.25cm}                   }                \end{pcolumn}              \begin{pcolumn}{0.32}                      \pbox{0.9\textwidth}{51.25cm}  {linewidth=2mm,framearc=0.1,linecolor=lightblue,         fillstyle=gradient,gradangle=0,gradbegin=white,gradend=white,gradmidpoint=1.0,       framesep=1em}            {         \begin{center}          \pbox{0.8\textwidth}  {}{shadow=true,shadowsize=1mm,linewidth=2mm,framearc=0.5,           linecolor=lightblue,fillstyle=gradient,gradangle=0,gradbegin=white,             gradend=whiteblue,gradmidpoint=1.0,framesep=1em}           {             \begin{center}              \bf{Phase Structure of the Model}            \end{center}          }         \end{center}         \vspace{1.25cm}               yet more text          }                     \vspace*{1cm}                    \pbox{0.9\textwidth}{17.5cm}  {linewidth=2mm,framearc=0.1,linecolor=lightblue,         fillstyle=gradient,gradangle=0,gradbegin=white,gradend=white,gradmidpoint=1.0,       framesep=1em}           {             % \vspace{2cm}          \begin{center}           \pbox{0.8\textwidth}   {}{shadow=true,shadowsize=1mm,linewidth=2mm,framearc=0.5,           linecolor=lightblue,fillstyle=gradient,gradangle=0,gradbegin=white,           gradend=whiteblue,gradmidpoint=1.0,framesep=1em}          {           \begin{center}             \bf{Outlook}           \end{center}          }          \end{center}          \vspace{1.25cm}                Do stuff in the future:               \begin{itemize}         \item Do stuff         \item Do even more exciting stuff          \end{itemize}        %        %        }                  \vspace*{1cm}       %         \pbox{0.9\textwidth}{22cm}{linewidth=2mm,framearc=0.1,linecolor=lightblue,           fillstyle=gradient,gradangle=0,gradbegin=white,gradend=white,gradmidpoint=1.0,       framesep=1em}        {                        \begin{center}         \pbox{0.8\textwidth}{}{shadow=true,shadowsize=1mm,linewidth=2mm,framearc=0.5,           linecolor=lightblue,fillstyle=gradient,gradangle=0,gradbegin=white,           gradend=whiteblue,gradmidpoint=1.0,framesep=1em}         {           \begin{center}             \bf{References}           \end{center}         }       \end{center}       \vspace{-1.75cm}              \renewcommand{\refname}{}          \renewcommand{\refname}{\begin{center}\pbox{0.73\textwidth}{}  {shadow=true,shadowsize=1mm,linewidth=2mm,framearc=0.5,linecolor=lightblue,fillstyle=gradient,gradangle=0,gradbegin=white,gradend=whiteblue,gradmidpoint=1.0,framesep=1em}  {\begin{center}\normalsize{\bf References}\end{center}}\end{center}}            \begin{thebibliography}{99}          % \pagestyle{empty}                  \bibitem {Maldacena98}        J.~M.~Maldacena, Adv.\ Theor.\ Math.\ Phys.\  {\bf 2} (1998) 231,    Int.\    J.\ Theor.\ Phys.\  {\bf 38} (1999) 1113 [arXiv:hep-th/9711200]               \end{thebibliography}             }       \end{pcolumn}       \end{center}       \end{poster}       \end{document}       I am getting these errors > line 0: Undefined control sequence   >  line 71: Undefined control sequence \background{0.3 0.4 0.7}{0.3 0.7 > 0.3}{0.3}   >  line 71: Undefined control sequence \background{0.3 0.4 0.7}{0.3 0.7 > 0.3}{0.3}   >  line 0: Undefined control sequence   >  line 95: Undefined control sequence }   >  line 0: Undefined control sequence   >  line 95: Undefined control sequence }   >  line 95: Undefined control sequence }   >  line 71: Overfull \hbox (14.73395pt too wide) in paragraph   >  line 0: Overfull \vbox (5414.5928pt too high) has occurred while \output is > active []*   >  while running **pdfLatex**


title: Are the TeX semantics and grammar defined somewhere in some official documents?

text: I'm a programmer, I would like to take a look at a more technical and specific definition of what is referred to as LaTeX or TeX. My interest in on syntax, semantics, and the grammar of this language in general, I also would like a word about the packages which I assume are part of some kind of plugin-like extensible-system and I would also like to know how this interaction is defined. Thanks.


title: Path and node problem

text: In the following example, why there is no blue triangle ?               \documentclass[a4paper]{article}     \usepackage[marginparsep=3pt, top=2cm, bottom=1.5cm, left=3cm, right=1.5cm]{geometry}          \usepackage{tikz}     \usetikzlibrary{calc,intersections}          \tikzset{small dot/.style={fill=black,circle,scale=0.3},}          \begin{document}     \begin{tikzpicture}          \coordinate (A0) at (0,0) ;     \coordinate (A1) at (1,0) ;     \coordinate (A2) at (0,1) ;          \draw[fill=red] (A0)--(A1)--(A2)--cycle ;          \draw ($ (A0)!.5!(A1) $) node (E0) {};       \draw ($ (A1)!.5!(A2) $) node (E1) {};       \draw ($ (A2)!.5!(A0) $) node (E2) {};            \draw[fill=blue] (E0)--(E1)--(E2)--cycle ;          \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/DsybW.png) It is just a simple sample of the problem I have. As I need to use `let...in...` to calculate between `! !` coefficient, I use this definition of nodes for the Ex nodes. If there is another way or how to correct the blue triangle drawing. One can tcheat :               \draw ($ (A0)!.5!(A1) $) node (E0) {};       \draw ($ (A1)!.5!(A2) $) node (E1) {};       \draw ($ (A2)!.5!(A0) $) node (E2) {};            \coordinate (B0) at (E0) ;     \coordinate (B1) at (E1) ;     \coordinate (B2) at (E2) ;               \draw[fill=blue] (B0)--(B1)--(B2)--cycle ;      works fine, but why i doesn't work at first time ?


title: Why does Vim force really long lines in text file?

text: I am using Vim to edit my tex file and I am relatively new to LaTeX. One thing that I don't understand is why tex wants you to write incredibly long lines in your tex file? For instance, each line becomes a new paragraph so if you have along paragraph you can have a line in your text file that is miles long. Currently this is driving me crazy because if I press 'j' or 'k' to move up and down lines I move lines at a time instead of paragraphs at a time. While messing with this I just feel like "This can't be what I'm supposed to be doing." Does anyone else use an editor like vi/vim to edit their tex files, and if so, how do you navigate? If you are editing your .tex file full screen (to get rid of distractions), how do you prevent full monitor word garbage due to incredibly long lines? I really like the TeX philosophy of separating content from design, but I feel like I am going to make myself go cross-eyed editing these .tex files.


title: How to remove unncessary whitespaces between two lonely figures on page

text: Im sure it's an easy question but I cant figure it out and I was searching google for different keywords crossing my mind but couldn't find a relevant post. I have two tables which are positioned on a new page (last page of the chapter) because they don't fit on the page before:               \begin{table}[htb]         \centering             \begin{tabular}{lcl}                 \toprule                     \textbf{asd} & \phantom{-} & \textbf{asd} \\                       \cmidrule{1-1} \cmidrule{3-3}                      asd &&  asd\\                     asd &&  asd\\                 \bottomrule     \end{tabular}     \caption{blaa}\label{tab:asd}     \end{table}%     %     \begin{table}[htb]         \centering             \begin{tabular}{lcl}                 \toprule                     \textbf{asd} & \phantom{-} & \textbf{asd} \\                       \cmidrule{1-1} \cmidrule{3-3}                      asd &&  asd\\                     asd &&  asd\\                 \bottomrule     \end{tabular}     \caption{blaa22}\label{asd22}     \end{table}%      The output results in: ![enter image description here](http://i.stack.imgur.com/QqX0E.png) I'd like to remove all those blank lines and just put both tables right to the top of the page. Modifying the alignments of the tables to `[t]` or `[h]` doesn't help either. Thank you very much in advance


title: In the book class, making the page numbers start counting at the first chapter

text: I’m using the book class. I don’t want any page numbers (not even romans) in my document until chapter 1 starts—when the page number should start at 1. Obviously, chapter 1 should then show as being on page 1 in the TOC, but the TOC itself shouldn’t be on a numbered page. How do I accomplish this?


title: Unwanted space before the first TOC entry

text: I use the titletoc package, and this is how my chapter entries look:               \titlecontents{chapter}[0pc]     {\addvspace{2pc}}     {\thecontentslabel.\ }     {}     {\normalsize\titlerule*[12pt]{.}\contentspage}     [\addvspace{3pt}]      Notice that 2pc vertical space before the entry? This is great, _except that it also occurs for the first entry_. This is a problem, because it makes the entries appear 2pc farther away from the “Contents” chapter name than it actually should be. How do I fix this?


title: Limit spanning of hline like cline

text: Is there a way to limit the length of a hline, so that it behaves like a cline? What I want to achieve is to have the the double lines you will get, when calling `\hline` twice. What I basically want is the following table without the first 'box' (7C0, 3700, 11111000000). And that the top, left, and bottom border of that column/row is removed. ![sample table](http://i.stack.imgur.com/S3Wji.png) Basically this MWE without the top and left border.               \documentclass{article}          \begin{document}     \begin{tabular}{|r|l|}       \hline       & hexadecimal \\       & octal \\ \cline{2-2}       & binary \\       \hline \hline       1984 & decimal \\       \hline     \end{tabular}     \end{document}


title: Parse a string into tokens of numbers and not numbers

text: I have a string that I want to parse into to numbers and non-numbers. For my purposes: A **Number** can _EITHER_ be any sequential string of digits _OR_ sequential string of digits with a . followed by another sequential string. A **Non-Number** is anything that is not a **Number**. For example               ljksadflh23898129hfafh0324.22234      should be parsed into something like               ljksadflh, 23898129, hfafh, 0324.22234      or               ljksadflh/23898129/hfafh/0324.22234      or whatever floats your boat as long as the list retains the same ordering.


title: Compilation error with LuaLaTeX (texnansi.enc)

text: I work with Linux Debian Sid, Emacs and TeXlive 2013 installed in my home. I compile all my documents with LuaLaTeX with header as a master file that contains, among other things, the package file below :               \documentclass[12pt,a4paper]{article}     \usepackage{etex}     \usepackage[urw-garamond,uppercase=upright,greeklowercase=upright]{mathdesign}     \usepackage{garamondx}     \usepackage[no-math]{fontspec}     \usepackage[frenchb]{babel}     \begin{document}     $f(x)=x^2+2x+4$     \end{document}     %%% Local Variables:      %%% mode: LaTeX     %%% LaTeX-command: "lualatex -shell-escape"     %%% End      Are there a conflict between these packages ? If yes, what should be correct ? The compilation of this file works perfectly. Recently I discovered ConTeXt. I made several attempts, and there were problems with the fonts in the distribution TeXlive 2013. I was advised to install Standalone ConTeXt to avoid these problems. To have ConTeXt Standalone permanently, I changed my `.profile` file as follows :                 source /home/fab/context/tex/setuptex       export LIBGS=/usr/lib/libgs.so.9       export PATH=$PATH:/texmf/tex/latex/tex4ebook-master/tex4ebook       export PATH=$PATH:/home/fab/texlive/2013/bin/x86_64-linux      My conclusion is that the file `texnansi.enc` of Standalone ConTeXt was loaded instead of that of 2013 TeXlive distribution, and it was he who was the cause of problems.


title: What type of .sty or document class will be good for thesis?

text: I am writing my thesis but i want to write it with Latex as my University do not have a document class or .sty as i used to see other university. Could any one know the the .sty that has the under lists specification. Thank you all and looking forward in seeing your reply.   1. Times new roman   2. Double spacing,   3. Chapter and Heading 16pts fonts size,   4. Heading space 48pts, paragraphs 24pts space.   5. section 14pts font size,   6. subsection 12pts font size,   7. figure and table caption 12pts and single spacing;   8. Paper A4 with margins; top 2.5cm, bottom 2.5cm, right 2.5cm and left 4.0cm,


title: How many levels of nested subsections can the article class support?

text: How many nested subsections can I create using article class in LaTeX? E.g. for first level I use `\subsection`, for second level I use `\subsubsection`. My question is how deep can I go?


title: How to replace AUCTeX's "LaTeX" command with latex->dvips->ps2pdf chain?

text: What is the proper way of solving this problem with respect to AUCTeX's design - I mean, how to do that in a way that it will still recognize the errors, display log on demand, make "View" command default on successful compilation, etc. Or, what is a way to define my own command with the same functionality and make it default?


title: Tex prints my TOC with no headers. And I want my headers!

text: My toc has 03 pages. When printed (pdflatex), the first one gets no header, while the other two gets it the way its supposed to be. The thing is: I want ALL of them to have headers. Here, take a look at my code (please):               \documentclass[a4paper,11pt,oneside]{book}     \usepackage{graphicx}     \usepackage[pdfborder={0 0 0}]{hyperref}     \usepackage{epsfig}     \usepackage{float}     \usepackage{multicol}     \usepackage{array}     \usepackage{multirow}     \usepackage{lastpage}     \usepackage{amsmath}     \usepackage{caption}     \usepackage[brazilian]{babel}     \usepackage[utf8]{inputenc}     \usepackage{fancyhdr}     \usepackage[hmargin=2cm,top=4cm,headheight=65pt,footskip=65pt]{geometry}          \setlength{\parindent}{1.3cm}     \usepackage{indentfirst} %Determinar que cada primeiro parágrafo seja também indentado          \newenvironment{tquote}{\begin{list}{}        {\setlength{\leftmargin}{13mm}        \setlength{\rightmargin}{0mm}}        \item[]}{\end{list}}          \widowpenalty=300     \clubpenalty=300                 \pagestyle{fancy}     \renewcommand{\headrulewidth}{0pt}     \fancyhead[CE,CO,LE,LO,RE,RO]{} %% clear out all headers     \fancyhead[C]{%     \centering               \begin{tabular}{|m{3.5cm}|m{10.0cm}|m{2.5cm}|}               \hline               \centering               \includegraphics[height=1.59cm,width=3.0cm]{img/logo} &               \centering               \Large{BLA BLA BLA}&               \centering               \scriptsize{Pág. \thepage\ de \pageref{LastPage}\\               Data: XXXXXX\\               Rev. 0}\tabularnewline               \hline               \end{tabular}%     }          \makeatletter     \makeatother          \begin{document}     \thispagestyle{fancy}          TITLE BLA BLA BLA     \newpage          \tableofcontents\thispagestyle{fancy}          \mainmatter\thispagestyle{fancy}     \newpage\thispagestyle{fancy}          \chapter{BLA BLA BLA}     \thispagestyle{fancy}             \input{cap.tex}          \end{document}


title: Aligining item descriptions

text: I am trying to make my description list with same margin as my formulas (made with `fleqn` option - `\usepackage[fleqn]{mathtools}`). I was able to make it with `labelindent` option of the `description` environment, but now item labels are placed on item descriptions. `leftmargin` option helps, but I have to specify it each use of `description` environment. Is there any way to automate it ?               \begin{description}[labelindent=25pt,style=multiline,leftmargin=2.5cm]         \item[$mc^2$] \lipsum[1]         \item[$L_{ongest}$] \lipsum[2]         \item[$L_p$] \lipsum[3]     \end{description}      Is it possible to set those options globally, but only for `description` environment?


title: How to convert each verse to an individual PDF

text: Minimal example is posted under this question How to Convert XeTeX to Html               \bv     तपः स्वाध्यायनिरताम् तपस्वी वाग्विदाम् वरम् |          \\      नारदम् परिपप्रच्छ वाल्मीकिर्मुनिपुङ्गवम् ॥ १.१.१ ॥     \ev          \bfns  \blt \hline     तपस्वी & = &  sagacious thinker & वाल्मीकि: & = &  Sage [Poet]  वाल्मीकि & तपः & = & in thoughtful-meditation  \\     स्व अध्याय & = & in self, study of scriptures & निरतम् & = & always - who is eternally studious in scriptures& वाक् & = & in speaking [in enunciation] \\          विदाम् & = & among expert enunciators & वरम् & = & sublime one - with नारद & मुनि पुन्गवम् & = & with sage, paragon, with such a paragon sage Naarada \\          नारदम्  & = &  with [such a sage] Naarada & परिपप्रच्छ  & = &  verily [inquisitively,] inquired about          \elt \efns          सर्व गुण समिष्टि रूपम् पुरुषम्  all, merited endowments, composite, in form - about such a man.]      A thoughtful-mediator, an eternally studious sage in scriptures about the Truth a ...[1-1-1]      Above shown text is one verse, my document has hundreds of such units. My question: Is it possible to put some sort of delimiters to let LaTeX know about the start and the end of each verse unit and then convert each unit into a PDF or HTML. The name of the output file can start from `001` and increment by one. Currently there are no delimiters but if it works for one then I can insert the delimiters later.


title: How to avoid \parskip being applied to \listoffigures etc.?

text: Follow-up question of Why are `\listof{}{}` and `\listoffigures` styled differently?... With the issue mentioned above I finally managed to design my `\listof{}{}` and `\listoffigures` as desired but one issue remains unsolved: How to avoid global settings for my document like `\setlength{\parskip}{3mm}` being applied to list of figures, list of tables, etc.? MWE: Uncommenting `\setlength{\parskip}{3mm}` affects the `\listoffigures` but not the `\listof{algo}{List of Algorithms}`.               \documentclass[12pt,a4paper,twoside,openright]{report}      \usepackage[english]{babel}      \usepackage{float}       \newfloat{algo}{tbp}{loa}[chapter]     %  \setlength{\parskip}{3mm}     %  \setlength{\parindent}{3mm}       \frenchspacing       \sloppy      \usepackage{etoolbox}      \makeatletter       \patchcmd{\@chapter}%       {\addtocontents{lof}}%       {\addtocontents{loa}{\protect\addvspace{10pt}}%        \addtocontents{lof}}%       {\typeout{*** SUCCESS ***}}{\typeout{*** FAIL ***}}      \makeatother                \begin{document}       \listoffigures       \listof{algo}{List of Algorithms}            \chapter{foo}        \begin{figure}         \centering         \rule{1cm}{1cm}         \caption{A figure}        \end{figure}        \begin{algo}         (algo)         \caption{An algorithm}        \end{algo}        \begin{figure}         \centering         \rule{1cm}{1cm}         \caption{Another figure}        \end{figure}        \begin{algo}         (algo)         \caption{Another algorithm}        \end{algo}            \chapter{bar}        \begin{figure}         \centering         \rule{1cm}{1cm}         \caption{Yet another figure}        \end{figure}        \begin{algo}         (algo)         \caption{Yet another algorithm}        \end{algo}           \end{document}


title: Commands with Capital letters in their name

text: A topic that appear over and over is to explain the difference about commands such as `\operatorname` vs. `\DeclareMathOperator`. So far I've seen discussions about using one or the other, but no one explains if there is a substantial difference between them. My question, however, goes a bit further. I _believe_ that commands with capital letters in their names are a sort of _special_ commands, say a lower level language of the programming (Am I right?). Thus, **Questions**   * What is (are) the difference(s) between `\operatorname` and `\DeclareMathOperator`?   * Is it customary to reserve "capitalised" commands to writing of classes?   * In the same spirit, What is the difference between `\usepackage` and `\RequirePackage` I'll stop asking to avoid a lengthy post. Cheers.


title: Change font shape to OMS/cmsy/m/n to prevent warning

text: I would like to remove a warning that I receive when compiling this MWE:               \documentclass{article}     \renewcommand*\familydefault{\sfdefault}     \begin{document}     ab\textcopyright{}de % issues warning          ab\textcircled{c}de % same warning          ab\textrm{\textcopyright}de % looks ugly          %ab\textsym{\textcopyright}de % does not compile     \end{document}      The warning is               LaTeX Font Warning: Font shape `OMS/cmss/m/n' undefined     (Font) using `OMS/cmsy/m/n' instead on input line 4.      I am OK with latex doing this substitution, but if possible, I would like to get rid of the warning by proactively changing the font for the `\textcopyright` symbol. I know commands such as `\textrm`, but I haven't found the one which changes from "ss" to "sy". I also know about the `silence` package, but I want to do it "right". Bonus question: I would like to use the lmodern package, then the warning is:               LaTeX Font Warning: Font shape `OMS/lmss/m/n' undefined     (Font) using `OMS/cmsy/m/n' instead on input line 5.


title: Logarithmic y-axis and restrict y to domain fails

text: I'm trying to plot data with a logarithmic y-axis and restricting the y-data to a specified domain, but compilation fails for a reason I don't understand. This is the code:               \documentclass{standalone}     \usepackage{pgfplots}     \begin{document}%     \begin{tikzpicture}     \begin{axis}[ymode=log, restrict y to domain=1:6]     \addplot coordinates {(0, 1.1e1) (1, 1.7e3) (2, 0.0e0) (2, 3.4e7) (4, 8.1e5)};     \end{axis}     \end{tikzpicture}     \end{document}      Running it results in an error message:               ! Missing number, treated as zero.     <to be read again>                         i     l.6 ..., 1.7e3) (2, 0.0e0) (2, 3.4e7) (4, 8.1e5)};      According to the `pgfplots` manual for version 1.5.1 (29 December 2011), page 272 (about restrict x/y/z to domain), _For logarithmic axes, min and max are logs of the respective values_. If I disable either the logarithmic y-axis or the domain-restriction, the code runs successfully and output is as expected (but not as desired). Software versions:   * `pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2011) (format=pdflatex 2012.5.30)`   * `pgfplots 2011/12/29 v1.5.1 (git show 1.5.1-4-g53e640f )`   * `tikz 2010/10/13 v2.10 (rcs-revision 1.76)`. What's going on? What am I doing wrong? Or is this a bug?


title: Problem with automatic bibliography

text: I have the need to get the bibliography of a latex document in an automatic way. I'm trying since two weeks. Here is my code:               \usepackage{multirow}     \usepackage{epstopdf}     %\graphicspath{immagini}     \usepackage{booktabs}     %\providecommand{\abs}[1]{\big|#1\big|}     \usepackage{caption}     %\usepackage {table}     \usepackage[utf8]{inputenc}     \usepackage[italian]{babel}     \usepackage{amsmath}     \usepackage{pict2e}     \usepackage{amssymb}     \usepackage{amstext}     \usepackage{txfonts}     \usepackage{setspace}     \onehalfspacing     \usepackage{textcomp}     \newenvironment{sistema}     {\left\lbrace\begin{array}{@{}l@{}}}     {\end{array}\right.}     \usepackage{indentfirst}     \usepackage{geometry}     \geometry{a4paper,top=3cm,bottom=3cm,left=4.5cm,right=2.5cm,heightrounded,bindingoffset=5mm}     \usepackage{fancyhdr}     \pagestyle{headings}          %\usepackage{thebibliography}          \usepackage{biblatex}     \usepackage[babel]{csquotes}     %\cleardoublepage     %\phantomsection     %\addcontentsline{toc}{chapter}{\bibname}     \printbibliography     %\bibliographystyle{plain} % ad esempio: \bibliographystyle{plain}      \bibliography{biblio.bib}      %\printbibliography          %     \begin{document}     %********************     \include{frontespizio}     %**************************          \frontmatter     %********************          %***************************     \include{dedica} %DEVI MODIFICARLA     \include{Ringraziamenti}     %********************     \tableofcontents %SOMMARIO     %**************     \mainmatter     %**************     \input{chapter1_introduzione}     \input{chapter2}     \input{chapter3}     \input{chapter4}     \input{chapter5}     \input{chapter6}     \input{chapter7}     \input{chapter8}     %     %*****************     \backmatter     %****************               \end{document}      The bibliography doesn't show in any way. My editor is Worktex. I compile with pdfLaTeX, BibTeX and again pdfLaTeX twice but without any result: the compilation ends well but in the resulting PDF there's no bibliography. I would appreciate any help. Obviously I created the biblio.bib file.


title: Add "Retrieved", "Last accessed" or similar information to authoryear in biblatex

text: When citing online resources my university's regulation stipulates that we have to add information on when we accessed the specific website. This can for example be of the form "Retrieved: April 7, 2012". When using the following simple setup for `biblatex`, is there a field in `@online` or so that allows me to have this printed automatically in the bibliography?               \usepackage[style=authoryear, backend=biber]{biblatex}


title: Why won't my \otoprule command work in table formatting?

text: Primer: I'm very new to LaTeX. I am creating a `table` with the following code. Here is part of the table:               \usepackage{tabularx, multirow, booktabs}     \begin{table}[tp]     \caption{Rain garden site characteristics}     \label{table:11}     \begin{tabular}{c r @{.} l c r @{.} l r @{.} l r @{.} l r @{.} l}     Site ID &   Surface Area        &   Install Date    &   Roof Catchment Area &   Total Cactchment Area   &   $A_garden$/$A_imper$    &   $A_garden$/$A_total$    \\\otoprule     1   &   10&2    &   2007    &   49&7    &   49&7    &   20&6    &   20&6        \\\midrule     \end{tabular}     \end{table}      I cannot, for the life of me, figure out why it has a problem with `\otoprule`. I've seen it in many table style guides, and can't figure out what I'm missing. The error code I get is:               ! Undefined control sequence.     <recently read> \otoprule     1.5 ... A_imp$ & $A_garden$/$A_total$ \\\otoprule      Thanks for any suggestions!