title: MikTex can't find \begin(document}

text: I'm running into an error recently and am unsure why I get it. Running this script:               \documentclass{article}          \begin{document}     hello     \end{document}       I get this error message ( **question being how do I fix this?** ):               This is pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9) (preloaded format=pdflatex 2013.2.18)  4 MAR 2013 00:00     entering extended mode     **template.tex     (C:\Users\trinker\Desktop\test\template.tex     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar     abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,      croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga     lician, german, german-x-2012-05-30, greek, gujarati, hindi, hungarian, iceland     ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin, latvian,      lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, n     german-x-2012-05-30, nynorsk, oriya, panjabi, pinyin, polish, portuguese, roman     ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerm     an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl     ishmax, welsh, loaded.          ! LaTeX Error: Missing \begin{document}.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.1 ï          »¿\documentclass{article}     ?      Missing character: There is no ï in font nullfont!     Missing character: There is no » in font nullfont!     Missing character: There is no ¿ in font nullfont!     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\article.cls"     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\size10.clo"     File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)     )     \c@part=\count79     \c@section=\count80     \c@subsection=\count81     \c@subsubsection=\count82     \c@paragraph=\count83     \c@subparagraph=\count84          Overfull \hbox (20.0pt too wide) in paragraph at lines 1--284     []      []          \c@figure=\count85     \c@table=\count86     \abovecaptionskip=\skip41     \belowcaptionskip=\skip42     \bibindent=\dimen102     [1{C:/ProgramData/MiKTeX/2.9/pdftex/config/pdftex.map}])     (C:\Users\trinker\Desktop\test\template.aux)     LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 3.     LaTeX Font Info:    ... okay on input line 3.     LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 3.     LaTeX Font Info:    ... okay on input line 3.     LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 3.     LaTeX Font Info:    ... okay on input line 3.     LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 3.     LaTeX Font Info:    ... okay on input line 3.     LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 3.     LaTeX Font Info:    ... okay on input line 3.     LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 3.     LaTeX Font Info:    ... okay on input line 3.      [2          ]     (C:\Users\trinker\Desktop\test\template.aux) )      Here is how much of TeX's memory you used:      203 strings out of 493921      2340 string characters out of 3144870      49031 words of memory out of 3000000      3582 multiletter control sequences out of 15000+200000      3640 words of font info for 14 fonts, out of 3000000 for 9000      841 hyphenation exceptions out of 8191      23i,4n,17p,140b,113s stack positions out of 5000i,500n,10000p,200000b,50000s     <C:/Program Files (x86)/MiKTeX 2.     9/fonts/type1/public/amsfonts/cm/cmr10.pfb>     Output written on template.pdf (2 pages, 11360 bytes).     PDF statistics:      13 PDF objects out of 1000 (max. 8388607)      0 named destinations out of 1000 (max. 500000)      1 words of extra memory for PDF output out of 10000 (max. 10000000)


title: Strange behaviour after adding a chapter

text: My problem is that after adding a chapter now I have a blank page with just these characters:               ï¾      The page is between the new chapter and appendix A. I'm wondering why. How ca I get rid of that page? Here's part of my preamble:               \documentclass[a4paper,singleside,11pt]{report}     \usepackage{ia_urb_thesis}     \usepackage[italian]{babel}     \usepackage[latin1]{inputenc}          \usepackage[T1]{fontenc}     \usepackage{graphicx}     \usepackage{color}               \usepackage[thinlines]{easytable}     \usepackage{upquote}     \setcounter{secnumdepth}{5}     \setcounter{tocdepth}{5}          \usepackage{marvosym}          \usepackage{listings}               \usepackage{etoolbox}     \expandafter\patchcmd\csname ttfamily \endcsname     {\selectfont}{\small}{}{}          \usepackage{url}          \usepackage{amsmath}% http://ctan.org/pkg/amsmath          \usepackage{float}          \lstset{literate={@}{\MVAt}1}          \patchcmd{\verb}{\dospecials}{\dospecials\atspecial}{}{}     \def\atspecial{\begingroup\lccode`~=`@       \lowercase{\endgroup\let~}\MVAt       \catcode`@=\active}


title: Latex first page prints: "ï»¿"

text: It's my first time posting so if I omit anything that I shouldn't have please let me know. I'm using TeXnicCenter, when I view my output after building my first page is blank apart from: "ï»¿". ![](http://i.imgur.com/DlrlwjU.png) A little research (http://stackoverflow.com/questions/3255993/how-do-i-remove- i-from-the-beginning-of-a-file) showed this has something to do with BOM? I don't really understand, I only started using Latex a few hours ago and I just can't get rid of this. (I've omitted the code I'm using as I had the same error when trying to view a template.)


title: pdflatex.exe failed to compile an input file with BOM (Byte Order Mark)

text: > **Possible Duplicate:**   >  LaTeX baffled by BOM---Unicode's byte order mark.               \documentclass[12pt,a4paper]{article}          \usepackage{CJK}     \usepackage{pinyin}          \begin{document}          \begin{CJK}{UTF8}{cyberbit}          Test          新年快乐          \end{CJK}     \end{document}      ![enter image description here](http://i.stack.imgur.com/8onJS.png) How to solve it?


title: Smaller roofs for forest

text: I have the following tree. I want the roofs to be as wide as the text not wider. Is there a way to do this with `forest`? In particular it should be the width of the upper text. This is important in cases in which the translation is much wider than the original text. The roof should fit the original text since this is what is analyzed, the translation is extra and logically not part of the structure.               \documentclass{minimal}          \usepackage{forest}          \forestset{     sn edges/.style={for tree={parent anchor=south, child anchor=north,align=center,base=bottom,where n children=0{tier=word}{}}},      background tree/.style={for tree={text opacity=0.2,draw opacity=0.2,edge={draw opacity=0.2}}}     }               \begin{document}          \begin{forest}     sn edges     [NP       [Det [das\\the] ]       [N'         [N'           [N [Bild\\picture] ]           [PP [vom Gleimtunnel\\of.the Gleimtunnel,triangle ] ] ]          [PP [im Gropiusbau\\in.the Gropiusbau,triangle ] ] ] ]     \end{forest}          \end{document}


title: Centering table of contents caption

text: I would like to center the caption of my table of contents, so that it looks as follows:                                        Table of contents           1.   Section                                              1     1.1  Subsection                                           3     1.2  Subsection                                           5     2    Section                                             11      Instead of               Table of contents           1.   Section                                              1     1.1  Subsection                                           3     1.2  Subsection                                           5     2    Section                                             11      I've tried to `\renewcommand{\contentsname}{\centerline{Table of contents}}`, which worked fine for the apperance on the page. But I'm using a book style where at the top of the page, on the _left_ side, I want to have the name of the current chapter/section/whatsoever. But if I do the above, the text `Table of contents` is not on the left side, but in the middle (because of the `\centerline`). Is there a way to accomplish what I want?


title: Starred version of \captionof not working together with pdfpages

text: I use the following code to get a caption on the previous page but the correct location of the figure in the ToC. I now get 2 entries in the ToC, which is not really a surprise ;-). I now want to get rid of the first caption by using `\captionof*` instead. If I do that the `\captionof` command is ignored. I cannot find anything meaningfull in the log file also.               {        \captionof{figure}       [Organisation of the thesis (english)]       {Organisation of the thesis (next page)} \label{fig:organisation}      \pagebreak     \captionlistentry[figure]       {Organisation of the thesis (english)}     \includepdf{./Bilder/organisationThesis}      }          %\includepdf[addtolist={1000,figure,Organisation of the thesis (english),fig:organisation}]     %  {./Bilder/organisationThesis}      using               %\includepdf[addtolist={1,figure,Organisation of the thesis (english),fig:organisation}]     %  {./Bilder/organisationThesis}      also had no success and is likely to get the wrong pagenumber in the end. I am compiling using `xelatex`; all packages are current TeX Live 2011 packages.


title: \citetitle and \citeeditor using the natbib & hyperref packages

text: I am very much committed to the `natbib` package, but still want to cite different fields of my bibliography items. For this I am using this code found in a google forum.               \begin{filecontents}{mytestbib.bib}     @book{author00,     title = {{A Title}},     publisher = {Alpha},     year = {2008},     editor = {Author, A},     address = {London}     }     @book{buthor00,     title = {{B Title}},     publisher = {Bravo},     year = {1990},     author = {Buthor, B},     address = {New York}     }     \end{filecontents}          \documentclass{article}     \usepackage{natbib}     \usepackage{hyperref}     \usepackage{keyval}          \input{https://groups.google.com/forum}% symbolically, for readability's sake      \newbibfield{editor}     \bibinput{mytestbib}          \begin{document}     \usebibentry{author00}{editor} has edited `\usebibentry{author00}{title}'          \citeauthor{buthor00} has written `\usebibentry{buthor00}{title}'     \bibliographystyle{plainnat}     \bibliography{mytestbib}     \end{document}      This results in ![enter image description here](http://i.stack.imgur.com/QWa0s.png) and poses problems I cannot solve:   1. I would like `\usebibentry{author00}{editor}` to result in 'Author', analog to `\citeauthor{buthor00}`   2. Is it possible to have the `\usebibentry{key}{field}` also create a hyperlink, analog to `\citeauthor`?   3. _%% LaTeX2e file `mytestbib.bib' ..._ is being put into the document and causes an error, can that be avoided?   4. The bibitem 'author00' does not appear in 'References' (a minor problem, since also `\cite`d regularly in my document) > **Below is an amendment in response to egreg's answer** JabRef produces .bib files that look in principle the same as if produced by `\begin{filecontents}`, i.e.               % This file was created with JabRef 2.7.     % Encoding: Cp1252          @book{author00,     title = {{A Title}},     publisher = {Alpha},     year = {2008},     editor = {Author, A},     address = {London}     }     @book{buthor00,     title = {{B Title}},     publisher = {Bravo},     year = {1990},     author = {Buthor, B},     address = {New York}     }      My question regarding the hyperlink was imprecise, indeed. It should point at the entry in the 'References', which I now create as follows:               \newcommand{\editorlastname}[1]{\nocite{#1}%       \begingroup\edef\x{\usebibentry{#1}{editor}}%       \expandafter\endgroup\expandafter\removename\x\removename}     \def\removename#1,#2\removename{#1}      By the way, the `\editorlastname` works fine for me, but in case of multiple editors only the first editor is printed. (Should that be of importance to another user)


title: Making a certain tree style the default for forest

text: We are putting together latex classes for books. We want to make a certain tree style the default for `forest`. With the example below one has to define the style (sn edges) in every tree. Is there a way to get rid of this specification and make it the default?               \documentclass{minimal}          \usepackage{forest}          \forestset{     sn edges/.style={for tree={parent anchor=south, child anchor=north,align=center,base=bottom,where n children=0{tier=word}{}}},      background tree/.style={for tree={text opacity=0.2,draw opacity=0.2,edge={draw opacity=0.2}}}     }               \begin{document}          \begin{forest}     sn edges     [S       [NP [er\\he] ]       [NP         [Det [das\\the] ]         [N [Buch\\book] ]        ]       [NP         [Det [der\\the] ]         [N [Frau\\woman] ]        ]       [V [gibt\\gives] ]     ]     \end{forest}          \end{document}


title: Classicthesis conflicts with glossaries

text: The following command in `classicthesis` gives an error when using `glossaries`               \renewcommand{\descriptionlabel}[1]{\hspace*{\labelsep}\spacedlowsmallcaps{#1}}      giving the following result in the document for both acronyms and glossaries. > LO@SAMPLE@NAME a sample entry. 1 Is there a workaround since I like the small caps in glossaries? Here is the minimal NWE               \documentclass{scrreprt}     \usepackage{classicthesis}     \usepackage{glossaries}     \makeglossaries     \newglossaryentry{sample}{name={sample}, description={a sample entry}}     \begin{document}     A \gls{sample} entry.     \printglossaries     \end{document}      The \renewcommand in conflict is on line 389 in `classicthesis.sty`


Assume that I have a confidential package that nobody is allowed to see the source code. The users are only allowed to use the public macros. This question is closely related to my other question.               \documentclass{article}     \usepackage{mypackage}% it is allowed.     \usepackage{listings}          \begin{document}     \publicmacro% it is allowed.     \lstinputlisting{mypackage.sty}% it is not allowed.     \end{document}      Is it possible to prevent users from seeing the package codes while they still can make use of its publicly exposed macros?


title: Lines generated with TikZ intersections are too short

text: My script calculates several intersections of lines (green) with a vertical "wall" (not shown). The intersections (small red dots) are fine. But the lines from one intersection to another intersection are too short (blue). I don't have any idea what's wrong with the script:               \documentclass[a4paper]{scrartcl}     \usepackage{pgf}     \usepackage{tikz}     \usetikzlibrary{intersections,calc}               \begin{document}         \begin{tikzpicture}             \def\wallx{6cm}             \def\scannerx{0cm}             \def\scannery{0.0cm}             \def\scannerradius{0.4cm}             \def\walllength{8cm}                  \coordinate (WALLBEGIN) at ($(\wallx, 0.5*\walllength)$);             \coordinate (WALLEND) at ($(\wallx, -0.5*\walllength)$);             \coordinate (SCANNER) at (\scannerx, \scannery);             \path[name path=wall] (WALLBEGIN) -- (WALLEND);                  %calculate intersections             \foreach \index in {0,...,4} {                 %calculates the ray from scanner to wall                 \def\raylength{12cm}                 \coordinate (REL) at ({9*(\index-2)+1}:\raylength);                 \coordinate (RAYEND) at ($(SCANNER)+(REL)$);                 \path [name path=ray] (SCANNER) -- (RAYEND);                      %intersection with wall                 \path [name intersections={of=ray and wall,by=X}];                 \node (iwall\index) at (X) {};                      %THIS INTERSECTION IS OK                 \filldraw[fill=red] (X) circle (0.05cm);                 \draw[green] (SCANNER) -- (RAYEND);             }                       % LINE BETWEEN TWO INTERSECTIONS WHICH IS TOO SHORT             \draw[blue] (iwall0) -- (iwall1);                  \filldraw[fill=gray!50!white] (SCANNER) circle (\scannerradius);         \end{tikzpicture}     \end{document}


title: Best practices for cross-references with hyperref

text: I want to reference some parts of my document. At the moment I read that there are several options. When clicking on a cross-reference one should get to the right part of the document. The first option is to use labels like explained on wikibooks. But I think that won't produce clickable links. The second option is better in my opinion: the hyperref package, which I am already using. I found an explanation in the manual. How can I link parts in the easiest way? I don't want to put for every section a `\label` I think that could be done automatically. The entries in the table of contents are linked, thus I presume that some labels are already defined. Also the procedure should be resistant to renaming and moving the section through the document. It that possible or do I have to check my document twice after every change?


title: Set math and text fonts independently in Beamer (using PDFLaTeX)

text: I am working on a Beamer presentation, and I would like to use sans serif font (CMBright) for text, and a serif font (Computer Modern) for maths. Sans serif maths looks pretty ugly to me. Beamer default settings are sans serif maths and text : ![enter image description here](http://i.stack.imgur.com/hZHln.png) I found I can switch maths font to serif with the line               \usefonttheme[onlymath]{serif}      which yields (see MWE1 below) ![enter image description here](http://i.stack.imgur.com/Z1KSP.png) Now maths look nice, but I would like to change the default text font to CMBright. I tried to naively combine those two lines (see MWE2)               \usefonttheme[onlymath]{serif}     \usepackage{cmbright}      but is gives me everything in CBMright (ie sans serif) ![enter image description here](http://i.stack.imgur.com/2ERtk.png) I seemed to find some people using LuaTeX or related systems, but I would like to find a solution using PDFLaTeX only. More generally, is there a way to set the maths and text fonts independently using PDFLaTeX, ie to any font different than CM and CMBright ? * * * MWE1               \documentclass{beamer}       \usefonttheme[onlymath]{serif}       \begin{document}     \begin{frame}     Some text, $x^2 + y^2 = r^2$     \end{frame}     \end{document}      MWE2               \documentclass{beamer}       \usepackage{cmbright}     \begin{document}     \begin{frame}     Some text, $x^2 + y^2 = r^2$     \end{frame}     \end{document}


title: Set Tikz to size of page for layering

text: I would like to create layers/overlays in my document (inline which may depend on variables\macros such as page number/chapter or user defined stuff). How can I create a TikZ image that is the size of the page (without hard coding the values), with the ability to easily anchor to the edges of the paper (I think this will be already possibly with TikZ)? Basically I want my TikZ picture's canvas to be that of the page with (0,0) being the top-left corner so I can do normal TikZ plotting on the page. Obviously it should easily work with two-sided docs and it shouldn't interfere with normal page layout. Thanks


title: How to install custom sty files where the LaTeX compiler can find them?

text: I created a custom beamer style. For this I have several .sty files. I am able to install this custom theme on my Ubuntu 12.04 with the standard tex-live provided distribution by putting it my home as following:               ~/texmf/tex/latex/beamer/base/themes      And then running `texhash` I want to know how to proceed in order to have pdftolatex compiler aware of this package if I put it in a custom directory.


title: typing \end{verbatim}

text: I am preparing a presentation in which I want to display the following as it is               \begin{verbatim}     foo     \end{verbatim}      For this I used               \begin{verbatim}     \begin{verbatim}     foo     \end{verbatim}     \end{verbatim}      But the first `\end{verbatim}` ends the environment and the second induces error. Can anyone suggest how to do this? I should appreciate the explanation of the trick and commands suggested.


title: Drawing cumulative distribution function for a discrete variable

text: Can you help me out with drawing a simple cumulative distribution function of a discrete variable, which has the following values:               x=1, f(x)=1/15;     x=2, f(x)=2/15;     x=3, f(x)=1/5;     x=4, f(x)=4/15;     x=5, f(x)=1/3      Most resources show how to do it for continuous variables. The question is very trivial because I am a newbie. Thank you. EDIT:               \documentclass[paper=a4, fontsize=11pt]{scrartcl} % A4 paper and 11pt font size          \usepackage[T1]{fontenc} % Use 8-bit encoding that has 256 glyphs     \usepackage{fourier} % Use the Adobe Utopia font for the document - comment this line to return to the LaTeX default     \usepackage[english]{babel} % English language/hyphenation     \usepackage{amsmath,amsfonts,amsthm} % Math packages          \usepackage{lipsum} % Used for inserting dummy 'Lorem ipsum' text into the template          \usepackage{sectsty} % Allows customizing section commands     \allsectionsfont{\centering \normalfont\scshape} % Make all sections centered, the default font and small caps          \usepackage{fancyhdr} % Custom headers and footers     \usepackage{xfrac}     \pagestyle{fancyplain} % Makes all pages in the document conform to the custom headers and footers     \fancyhead{} % No page header - if you want one, create it in the same way as the footers below     \fancyfoot[L]{} % Empty left footer     \fancyfoot[C]{} % Empty center footer     \fancyfoot[R]{\thepage} % Page numbering for right footer     \renewcommand{\headrulewidth}{0pt} % Remove header underlines     \renewcommand{\footrulewidth}{0pt} % Remove footer underlines     \setlength{\headheight}{13.6pt} % Customize the height of the header          \numberwithin{equation}{section} % Number equations within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)     \numberwithin{figure}{section} % Number figures within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)     \numberwithin{table}{section} % Number tables within sections (i.e. 1.1, 1.2, 2.1, 2.2 instead of 1, 2, 3, 4)          \setlength\parindent{0pt} % Removes all indentation from paragraphs - comment this line for an assignment with lots of text          %----------------------------------------------------------------------------------------     %   TITLE SECTION     %----------------------------------------------------------------------------------------          \newcommand{\horrule}[1]{\rule{\linewidth}{#1}} % Create horizontal rule command with 1 argument of height          \title{      \normalfont \normalsize      \textsc{\LARGE XXXX} \\ [20pt]     \textsc{ XXX}  \\ % Your university, school and/or department name(s)     \textsc{ XXX}  \\ [20pt]     \horrule{0.5pt} \\[0.4cm] % Thin top horizontal rule     \huge Problem Set 1 \\ % The assignment title     \horrule{2pt} \\[0.5cm] % Thick bottom horizontal rule     }          \author{XXX  \textsc{XXX}} % Your name          \date{\normalsize\today} % Today's date or a custom date          \begin{document}          \maketitle % Print the title          %----------------------------------------------------------------------------------------     %   PROBLEM 1     %----------------------------------------------------------------------------------------               1. Let X be a discrete random variable with density function               \[ P(x) = \left\{        \begin{array}{l l}         cx & \quad \text{for $x$ =1, 2, 3, 4, 5}\\         0 & \quad \text{otherwise}       \end{array} \right.\]      \\ The discrete probability density function (PDF) of a discrete random variable $X$ provides the probabilities P($X=x$) for all possible values of $x$. In our case, \\          P($x$=1)=$1\times c$,\\     P($x$=2)=$2\times c$,\\     P($x$=3)=$3\times c$,\\     P($x$=4)=$4\times c$,\\     P($x$=5)=$5\times c$, $0$ otherwise\\          $1\times c +   2\times c +3\times c +4\times c +5\times c=1 \rightarrow c=\dfrac{1}{15}$            The probability density function for $X$ is:\\          \begin{tabular*}{1\textwidth}{@{\extracolsep{\fill} } | c | c | c | c | c | c |}        \hline        x & 1 & 2 & 3 & 4& 5 \\ [1ex]       \hline       \raisebox{2ex}f(x)& $1\times \dfrac{1}{15}=\dfrac{1}{15}$  & $2\times \dfrac{1}{15}=\dfrac{2}{15}$   & $3\times\dfrac{1}{15} =\dfrac{1}{5}$  & $4\times \dfrac{1}{15}=\dfrac{4}{15}$  & $5\times \dfrac{1}{15} =\dfrac{1}{3}$ \\ [1.5ex]       \hline     \end{tabular*}\\\\           A. What is $c$? \\\\      $c=\dfrac{1}{15}$ \\\\           B. Find P($X$ is odd).\\\\      P($X$ is odd)$= P($X$ =1)+ P($X$ =3)+ P($X$ =5)=\dfrac{1}{15}+\dfrac{1}{5}+\dfrac{1}{3}=\dfrac{9}{15}$ \\\\                C. What is the cumulative distribution function for X? Plot the function.\\\\           $P(X\leq1)=\dfrac{1}{15}$\\\\      $P(X\leq2)=\dfrac{1}{15}+\dfrac{2}{15}=\dfrac{1}{5}$\\\\      $P(X\leq3)=\dfrac{1}{15}+\dfrac{2}{15}+\dfrac{1}{5}=\dfrac{6}{15}$\\\\      $P(X\leq4)=\dfrac{1}{15}+\dfrac{2}{15}+\dfrac{1}{5}+\dfrac{4}{15}=\dfrac{2}{3}$\\\\      $P(X\leq5)=\dfrac{1}{15}+\dfrac{2}{15}+\dfrac{1}{5}+\dfrac{4}{15}+\dfrac{1}{3}=1$\\\\     \\\\     \\\\     \\\\     \\\\      \\\\     \\\\          \end{document}


title: Combine blacktriangle and blacktriangledown

text: I need to combine `\blacktriangle` and `\blacktriangledown` so that I get the following result: ![Up Down Arrow](http://i.stack.imgur.com/gJE0K.gif) I already tried `$\stackrel{\blacktriangle}{\blacktriangledown}$` but then the triangle pointing up is bigger than the one pointing down. The combined symbols should have the same line height as my text, because I need a list like this (here the triangles are a little bit too big) ![Up Down Arrow](http://i.stack.imgur.com/gJE0K.gif) XXX   ![Up Down Arrow](http://i.stack.imgur.com/gJE0K.gif) XXX   ![Up Down Arrow](http://i.stack.imgur.com/gJE0K.gif) XXX


title: Pageref inside alltt

text: Here is minimal working example that shows bug:               \documentclass[a4paper,12pt,openany]{book}     \usepackage{alltt}          \begin{document}     \begin{alltt}         \pageref{asd fgh jkl}     \end{alltt}     \end{document}      I would expect that output would be               ??      Instead, what I get is               ?? fgh jkl      \pageref works fine as long as there are no spaces in argument. When there are spaces, then all the words except the first one are outputed aswell. How can I prevent it? Thanks.


title: \Beamergotobutton's color

text: Is there any way to change the default \beamergotobuttoncolor ? I've changed many things in my presentation's theme and now that I'm at the end I've discovered that with these settings it is impossible to see the button created by the beamergotobutton command. I'd like to change only the color of the button without any modification of the theme of other things. My buttons are all in the appendix and the exact command I use to generate them is the following:               \hyperlink{appendix}{\beamergotobutton{Appendice}}      In the preambol I have the following definition:               \usepackage{hyperref}                       \hypersetup{colorlinks=true, linkcolor=mycolor}      Thank you in advance! As asked by @Claudio Fiandrino this is my MWE:               \documentclass[10pt]{beamer}          \usepackage{xcolor}                       \definecolor{sapienza}{HTML}{98002E}             \definecolor{royalblue}{RGB}{176,196,222}               \usepackage[utf8]{inputenc}        \usepackage[italian]{babel}                  \usepackage{hyperref}                       \hypersetup{colorlinks=true, linkcolor=sapienza}                    \mode<beamer>  %COMPLETE configuration of my beamer mode     {     \usefonttheme[stillsansseriftext]{serif}                    \setbeamercolor{structure}{bg=black, fg=royalblue}        \usetheme{PaloAlto}                   \setbeamertemplate{section in toc}[square]                   \setbeamerfont{section number projected}{%                       family=\rmfamily,series=\bfseries,size=\normalsize}              \setbeamercolor{section number projected}{bg=royalblue,fg=sapienza}                   \setbeamercolor{section in toc}{fg=sapienza}              \setbeamertemplate{navigation symbols}{}                   \setbeamercolor{frametitle}{fg=sapienza}                     \setbeamercolor{section in sidebar}{fg=sapienza}         \setbeamercolor{subsection in sidebar}{fg=blue}          \setbeamercolor{section in sidebar shaded}{fg= sapienza}                \setbeamertemplate{footline}[frame number]                   \setbeamercovered{highly dynamic}          }          \begin{document}               \begin{frame}{Appendice}     \label{appendix}          \hyperlink{distr-c1-c1}{\beamergotobutton{La distribuzione C1-C1}}          \end{frame}                    \begin{frame}{La distribuzione C1-C1}     \label{distr-c1-c1}          some text          \hyperlink{appendix}{\beamergotobutton{Appendice}}          \end{frame}               \end{document}


title: Changing output of the BibTeX style unsrt

text: I apologize because I'm a beginner and I would like to change the output of the `unsrt` bibliography style, but I can't found anything in 34th tag pages about BibTeX. Also, I tried with other styles but the closest to what I need is `unsrt` with a little change I would like an unsorted bibliography style such that the year doesn't appear at the end, but next to the authors' names. For example: _**I don't want this_** > [1] Robinson G.W., Zhu S.-B., and Evans M.W. Water in Biology, Chemistry and > Physics. Experimental Overviews and Computational Methodologies. World > Scientific, Singapore, 1996." _**I'd like something like this_** > [1] Robinson G.W., Zhu S.-B., and Evans M.W. (1996) Water in Biology, > Chemistry and Physics. Experimental Overviews and Computational > Methodologies. World Scientific, Singapore.


title: Disable/toggle smallcaps in the title

text: I am using the `amsart` document class. I want to to change the text in the titles (such as in `\author`) to be written normally and not in small caps.   * How can I change this globally? That is, so that the text in all titles (`\title`, `\author`, `\section`, and so on) is written without small caps.   * How can I change this locally? That is, only change it in one place. If, for example, I include my email address in the `\author` field, I don't want it to be written in small caps. Wrapping the text inside `\textnormal` or `\textrm` does not work. Wrapping it inside `\lowercase` works, but I don't consider it a good solution.


title: Scaling in CircuiTikZ

text: When scaling a circuit with the scale option:   `\begin{circuitikz}[scale = 'some_scale_factor']`   all the _coordinates_ are well scaled but **not the components**. How to correctly scale the whole scheme?


title: No building file; No LaTeX=>PDF

text: I installed MiKTeX 2.8 and TeXnicCenter on a friend's PC. There seems to be a quite weird issue. There seems to be missing the option "LaTeX=>PDF". Clicking on the arrow to select the output file (e.g. DVI, PDF etc.) nothing appears. That's the 1st issue. The 2nd one, probably connected to the 1st, occurs while trying to build the file. Clicking the relevant icon, nothing happens! The package `texpdf` is installed on her PC as well. I cannot remember if I needed to add something, when I installed my LaTeX.


title: Errors thrown when trying to use the mdframed package

text: I am running Ubuntu, so unfortunately I don't get the nice Console way of installing new LaTeX packages, I have to install them manually. From CTAN, I found the `mdframed` package, downloaded and extracted the zip, and placed the files so that I now have:               usr/share/texmf-texlive/tex/latex/mdframed/      With a load of files in:               md-frame-#.mdf (where # is 0 through 3)     md-framepre-#.mdf (where # is 0 through 3)     mdframed.sty     mdframedpre.sty     mdframed-doc-en.pdf and *.tex     README      At which point I ran `mktexlsr`, which outputted a few lines, and seemed happy. Now when I try to `\usepackage{mdframed}`, and compile it (I know compile isn't the right word, I just can't remember the correct term atm), my console fills with errors, with the variety of "Undefined Control Sequence"/ "Missing Number, treated as zero"/ "Illegal unit of measurement"/ "Illegal Parameter", and probably a few that I've missed. Here are the first 4 errors:               2011-09-23 12:27:59,596 DEBUG ToolView - Issue{' Undefined control sequence \newrobustcmd.', 91, None, file:///home/peter/Latex//usr/share/texmf/tex/latex/mdframed/mdframed.sty, 2}     2011-09-23 12:27:59,597 DEBUG ToolView - Issue{' Missing \begin{document}.', 91, None, file:///home/peter/Latex//usr/share/texmf/tex/latex/mdframed/mdframed.sty, 2}     2011-09-23 12:27:59,598 DEBUG ToolView - Issue{' Undefined control sequence \mdf@option@length.', 91, None, file:///home/peter/Latex//usr/share/texmf/tex/latex/mdframed/mdframed.sty, 2}     2011-09-23 12:27:59,598 DEBUG ToolView - Issue{' Missing number, treated as zero.', 93, None, file:///home/peter/Latex//usr/share/texmf/tex/latex/mdframed/mdframed.sty, 2}      After searching for `\newrobustcmd`, I couldn't find any documentation on LaTeX for it. Also, after opening `mdframed.sty`, I found that the lines were 1 off (eg, The debugger gave `\newrobustcmd` to be on line 91 whereas gedit says its on line 92). The `mdframed.sty` I am using can be found here (same link as above): http://mirrors.ctan.org/macros/latex/contrib/mdframed/mdframed.sty.


title: Theorem-like definition, without using upshape each time

text: How can I have theorems and lemmas stated in the default italic font, but definitions and examples in upright font, without having to type the `\upshape` command within each definition and example? I use the following preamble:               \makeatletter     \def\@begintheorem#1#2{\trivlist     %   \item[\hskip \labelsep{\bfseries #1\ #2}]\itshape}     \item[\hskip \labelsep{\bfseries #2.\ #1:}]\itshape}     \makeatother          \newtheorem{Lemma}{Theorem}[chapter]     \newtheorem{Theorem}[Lemma]{Theorem}     \newtheorem{Example}[Lemma]{Example}     \newtheorem{Definition}[Lemma]{Definition}      The following code works:               \begin{Definition} \upshape      Here's the definition.      \end{Definition}      But it requires having to type `\upshape` each time I have a Definition or Example. Can the preamble be modified so that I don't have to type `\upshape` each time?


title: amino acids with chemfig, some bonds are falsely positioned

text: ![histidin](http://i.stack.imgur.com/egD3S.png) ![Proline](http://i.stack.imgur.com/cRhYG.png) I produced all of the amino acids for my thesis, but Proline and Histidin keep bugging me. I would like to place the -= bond that is now from H to H+ in Histidin from N to N and the bond - from C to H2 in Prolin from C to C ... This is the code I used:               \chemfig{C([:0]-C(=[:30]O)(-[:-30]O^{-}))([:180]-H_{3}     N^{+})([:-90]-H)([:90]-CH_{2}([:90]-([:60]*5(-NH-=NH^{+}-=))))}          \chemfig{C([:0]-C(=[:30]O)(-[:-30]O^{-}))([:-90]-H)*5([:135]-CH_2-CH_2-H_2C-  H_{2}N^{+}-)}


title: Can I get a shadowbox with rounded corners? (using `listings` package)

text: I'm using the `listings` package as below:               \usepackage{listings}          \lstnewenvironment{pythoncode}[1][]     {\lstset{language=Python,         basicstyle=\ttfamily\footnotesize,         frame=shadowbox,         frameround=tttt,         rulecolor=\color{black},         rulesepcolor=\color{gray},         #1}     }{}      I wanted to get a rounded corners together with a drop-shadow (shadowbox). Is it possible? While the frame border itself had rounded corners, the shadow had square corners, which is kinda ugly.


title: drawing a line the width of the text using tikz

text: > **Possible Duplicate:**   >  A line of length \textwidth in TikZ I'm trying to learn `tikz`. In this MWE all I'm trying to do it to draw a line the width of `\linewidth`. I'm able to do this with a rule; I'm able to do this in `pstricks`. But when I try this with `tikz` the line comes out too short; moreover, it seems to depend on what's happening in my paragraph in a way I'm not expecting (particularly considering where I'm defining my nodes in both cases).               \documentclass{article}     \usepackage{tikz}     \usepackage{pst-node}     \pagestyle{empty}     \begin{document}          \noindent%     \raisebox{0ex}[0pt][0pt]{\makebox[0pt][r]{\color{red}\rule[-4in]{0.4pt}{4.5in}}}%     \hspace*{\fill}{\color{red}\Huge $\leftarrow$ Struts to show the end line $\rightarrow$}\hspace*{\fill}%     \raisebox{0ex}[0pt][0pt]{\makebox[0pt][l]{\color{red}\rule[-4in]{0.4pt}{4.5in}}}%     \vspace{1cm}          Creating a rule:\newline     \noindent\rule{\linewidth}{0.4pt}%     \vspace{1cm}          Using \texttt{pstricks}:\newline     \noindent\rput(0,0){\rnode{ps:left}{}}\hspace*{\fill}\rput(0,0){\rnode{ps:right}{}}%          \psline(ps:left)(ps:right)     \vspace{1cm}          Using \texttt{tikz} \textbf{(round I)}:\newline     \tikz \node (tkzlefta) at (0,0) {};     \tikz \node (tkzrighta) at (\linewidth,0) {};%     \noindent\tikz \draw (tkzlefta) -- (tkzrighta);          Using \texttt{tikz} \textbf{(round II)}:\newline     \tikz \node (tkzleftb) at (0,0) {};%     \tikz \node (tkzrightb) at (\linewidth,0) {};%          \noindent\tikz \draw (tkzleftb) -- (tkzrightb);          Using \texttt{tikz} \textbf{(round III)}:\newline     \tikz \coordinate (tkzleftc) at (0,0);%     \tikz \coordinate (tkzrightc) at (\linewidth,0);%          \noindent\tikz \draw (tkzleftc) -- (tkzrightc);               Using \texttt{tikz} \textbf{(round IV)}:\newline     \tikz \node[inner sep=0pt] (tkzleftd) at (0,0) {};%     \tikz \node[inner sep=0pt] (tkzrightd) at (\linewidth,0) {};%          \noindent\tikz \draw (tkzleftd) -- (tkzrightd);          \end{document}      ![enter image description here](http://i.stack.imgur.com/qfMLZ.png) I've incorporated _HarishKumar's_ suggestion. Seems to work when I use `coordinate` (round III). But not working with `inner sep=0pt` applied to the nodes (round IV). Also, what's going on with the indentation in _round I_ that's not occurring in _round II_? I would assume that the paragraph break should not be changing the placement of the nodes; but that's exactly what seems to be happening.


title: How to show section title before section number

text: The default style is section number and then section title, however I want it the other way around. Haven't been able to find a solution that doesn't give me strange errors, so any help would be appreciated.


title: How can one adjust each text to the center for each box of the table?

text: Here is the example:               \begin{tabularx}{\textwidth}{ |X|X|X|X|X| }     \hline     Equation & 2 & 3 & 5 & 7 \\     \hline     $y_0 = b^{t}$ & -483061 & 1 & -174089 & 793599 \\     \hline     $y_1 = y_0^{2}$ & -1 &  & 73782 & 77096 \\     \hline     \end{tabularx}      I tried `\centerline` between letters and `\center` after `\textwidth`, but it doesn't seem to work.


title: vim on Rnw (sweave) files: how to indent <<>>== properly?

text: When I use `vim-latexsuite` to indent my `.Rnw` files, the Sweave blocks get indented, which causes them not to work properly. What I need is a way to ensure that the vim indent scheme puts these blocks at start of lines. The emacs mode does this well, but I'm trying out vim lately, and would like to have vim work properly as well. I have only minimal skill with vim, and am not sure how to edit my `~/.vim/indent/tex.vim` file to handle this. Any ideas? It seems to me that the indentation is being set after lines are formatted (i.e. getting ready for the next line), which doesn't help. But, as I say, I'm just learning about vim, so I may be all off-kilter [kind of like my resultant Rnw file :-)]


title: Add a textbox overtop an image in a beamer slide

text: I have a slide with a figure in it. I want show a vertically and horizontally centered (relative to the image if possible) text box overtop of it as an overlay which will contain a few lines of text. ![alt text](http://i.stack.imgur.com/YrNUi.jpg)               \documentclass{beamer}     \usepackage[T1]{fontenc}          \begin{document}          \begin{frame}         \frametitle{ESR1}               \begin{center}             Functional analysis         \end{center}              \begin{center}             \includegraphics[width=1\textwidth]{some_image.jpg}         \end{center}     \end{frame}     \end{document}


title: Caption appearance

text: Everytime I write a caption of a figure or table that occupies more than one line it appears in the document like               Figure 6.2: Polarization curves at 750C for 3P_{CO}=P_{H_{2}} at the                 initial water concentrations of 3.2, 6.4, 9.6, 15, 20 and 25%.      And I want it to appear like               Figure 6.2: Polarization curves at 750C for 3P_{CO}=P_{H_{2}} at the     initial water concentrations of 3.2, 6.4, 9.6, 15, 20 and 25%.      What should I do? Thanks, Ramon


title: maxsecnumdepth causes tikz titlebar to disappear

text: I am using`tikz` package to produce a grey section-header bar (rounded at one end), thus:               \documentclass[a5paper]{memoir}          \setsecnumdepth{chapter}        %   set numbering level     \maxsecnumdepth{chapter}        %   default=section, 2          \setcounter{tocdepth}{1}        %   levels < {n} not in TOC          \usepackage[explicit]{titlesec}      \usepackage{tikz}     \usetikzlibrary{shapes.misc}                                      %   create grey section header-bar     \let\currentsectiontitle\relax                \newcommand\titlebar{%sections     \tikz[baseline,trim left=3.1cm,trim right=3.0cm] {         \fill [black!15] (2.5cm,-1ex) rectangle (\textwidth+3.1cm,2.5ex);         \node [             fill=black!15!white,             anchor= base east,             rounded rectangle,             minimum height=3.5ex] at (2.8cm,0.13) {     %        \color{black}{\thesection}                 };     }}     \titleformat{\section}         {\large\bfseries}         {\titlebar}         {0.1cm}         {\gdef\currentsectiontitle{#1}#1}   %   http://glurl.co/dFH     \renewcommand*{\thesection}{\arabic{section}}                                      %   start MWE             \begin{document}          \tableofcontents*               %   table of contents                                 %   ------------------------         \mainmatter                 %   document content          \chapter{Chapter 1}     \label{chapter1}          CHAPTER 1 intro          \section{Section 1}     \label{section1}          Section 1 intro          \chapter{Chapter 2}     \label{chapter2}          CHAPTER 2 intro          \section{Section 2}     \label{section2}          Section 2 intro          \end{document}      This originated from http://glurl.co/dFH (then reduced to eliminate redundant commands, by myself, using trial and error). I have remarked out the original command that placed section number in node at left end of section-header bar. The problem I have is that when I set `\maxsecnumdepth` to {chapter}, which is what I want (so that sections are neither numbered in the text, nor in the TOC), the grey `tikz` section-header bar disappears—I suspect because the macro above depends upon the section being numbered. Can anyone advise me on the most appropriate way to resolve this issue? Please note: when running the MWE between the two settings (chapter / section) for `\maxscnumdepth` remember to compile twice to see the issue shift as described. Thank you. *My MWE produces the Chapter numbering twice. Not sure why.


title: Tightly packed and differently colored bars with pgfplots

text: I have CSV data representing the time in nanoseconds for calls to my custom malloc(), realloc() and free() implementations. The data looks like this:               function,time     malloc,331     malloc,386     malloc,326     malloc,321     malloc,321     malloc,316     malloc,331     malloc,337     malloc,311     malloc,322     realloc,502     realloc,662     realloc,536     realloc,477     realloc,441     realloc,552     realloc,477     realloc,437     realloc,447     realloc,542     free,321     free,327     free,321     free,402     free,357     free,386     free,417     free,361     free,341     free,431     malloc,341     malloc,316     malloc,326     malloc,326     malloc,311     ...      I need to plot this data using pgfplots to look something like (just a sketch): ![A sketch of what I need](http://i.stack.imgur.com/BWOeD.png) My questions are:   * Is this possible?   * How do I get the bars so tightly packed? It would even be okay if they were completly adjacent. I may have 500-1000 data points (operations) to plot.   * How can I transform the "malloc", "realloc" and "free" in the data into red, green and blue? Many thanks in advance!


title: Alignment of text in two columns: forcing empty lines in one, to avoid collisions in the other

text: I have a question about aligning text in two columns. A similar question was asked here:Two Columns whose content is positioned relative to each other, but I wasn't able to get the example solution working to see if it would solve my problem. I am pretty new to LaTeX, otherwise I would try to write out some code to work it out myself.               Here is some text that needs to be     in one column[1]. And sometimes        1. A column is a body of text that     it needs to keep going while some      is arranged up and down. A column                                             might also refer the tall pillars                                            in a Greek or Roman style building.     words are highlighted[2] on the        2. Highlighting is the process of     other side but things over here        bringing a reader's attention to     might need to just keep trucking       a particular point.     along.          No time to stop and smell the     roses or take the road less trav-     eled. The most important[3] thing      3. What is important is relative.     is that the information that is        what some people consider critical,                                            others consider peripheral.     highlighted is on the same line        4. Same --- similar or sharing a     as the beginning of the comment        great number of qualities     about it.      The result does not need the number indicators on in the left column, they are simply there to help illustrate which word the text on the right needs to be aligned with. Here is an image of what I am trying to accomplish: ![Desired Output \(ACT English Section\)](http://i.stack.imgur.com/UKj1N.png) here is a minimal working example, I think:               \documentclass{book}     \usepackage{amsmath,soul}     \usepackage{parcolumns}     \usepackage{soulpos}     \ulposdef{\ulnumaux}{%        $\underset{\saveulnum}{\rule[-.7ex]{\ulwidth}{.4pt}}$}     \newcommand{\ulnum}[2]{%       \def\saveulnum{#1}%       \ulnumaux{#2}}     \begin{document}     \begin{parcolumns}{2}     \colchunk[1]{Here is a \ulnum{1}{block} of text that might end up being kind of long. It is usually on a \ulnum{2}{random topic}, though sometimes it is interesting. What is important is that certain sections need to be aligned with one another, and sometimes this might cause things to collide.}     \colchunk[2]{     \begin{enumerate}     \item A block is single continuous body, sometimes composed of smaller parts.     \item like golf, the art of the Renaissance, amoebas, or the Allegory of the Cave     \end{enumerate}     }     \end{parcolumns}     \begin{parcolumns}{2}     \colchunk[1]{While in this example things are in \ulnum{3}{parallel} paragraphs, I would like the numbers on the right to be able to align with the underlined sections on the left. \ulnum{4}{That means in each column, there will be} a lot of blank space in \ulnum{5}{sections} where underlined sections are close together.\fbox{6}}     \colchunk[2]{     \begin{enumerate}     \setcounter{enumi}{2}     \item Here these paragraphs are nicely spaced side by side, but I don't need the text in column 2 to get affected by spacing in column 2, except that the top line of the comment should line line up with it's underlined section     \item Maybe     \item or other parts of the text where column 2 is longer than the space between it and the next number in column 1.     \item Sometimes I might want to align text with a box too, though if there are two numbers on a line, it is ok for the text associated with them to be stacked in the other column, but this will mean a lot of space over there     \end{enumerate}}     \end{parcolumns}     \end{document}      And its output: ![Output from MWE](http://i.stack.imgur.com/cmynU.png) Thanks Using the input from the comment below I was able to produce much higher quality output. I am having a problem with using it on two pages. here is a reproducible version. When I get to the second page, it puts the `\columnnote` all the way at the bottom of the page.               \documentclass{article}     \usepackage{amsmath,soul}     \usepackage{paracol}     \usepackage{geometry}     \usepackage{soulpos}     \usepackage{tikzpagenodes}     \usetikzlibrary{intersections}     \pagestyle{empty}     \ulposdef{\ulnumaux}{%        $\underset{\saveulnum}{\rule[-.7ex]{\ulwidth}{.4pt}}$}     \newcommand{\ulnum}[2]{%       \def\saveulnum{#1}%       \ulnumaux{#2}}          \newcounter{pagecheck}     \newlength{\tempa}     \newlength{\tempb}          \newcommand*{\myitem}[2]% #1=number or \thecounter, #2=text     {\noindent\makebox[\labelwidth][r]{{#1}.}\hspace{\labelsep}%     \setlength{\tempa}{\linewidth}%     \addtolength{\tempa}{-\labelwidth}%     \addtolength{\tempa}{-\labelsep}%     \parbox[t]{\tempa}{#2}}          \makeatletter     \newcommand{\checkpage}%     {\ifnum\c@page>\c@pagecheck     \c@pagecheck=\c@page%     \tikz[remember picture,overlay]{\coordinate (last) at (current page column 2 area.north west);}     \fi}     \makeatother          \newcommand{\columnnote}[2][1]% #1=estimated number of lines overlap (optional), #2=text of note)     {\checkpage% reset to top of column 2 at new page     \begin{tikzpicture}[remember picture,overlay]     \coordinate (here) at (0pt,.6\baselineskip);     \pgfextracty{\tempa}{\pgfpointanchor{here}{center}}     \pgfextracty{\tempb}{\pgfpointanchor{last}{center}}     \ifdim\tempa<\tempb{\coordinate (last) at (last |- here);}\fi     \node[below right, inner sep=0pt] (note) at (last) {\parbox{\linewidth}{#2}};     \coordinate[below=\baselineskip] (last) at (note.south west);     \end{tikzpicture}%     \settoheight{\tempa}{\parbox[c]{\linewidth}{#2}}%     \setlength{\tempa}{2\tempa}% full height     \setlength{\tempb}{#1\baselineskip}%     \ifdim\tempa>\tempb\addtolength{\tempa}{-\tempb}%     \vspace{\tempa}\fi}          \begin{document}     \begin{paracol}{2}     Here in the United States of America, we celebrate the \ulnum{1}{4th of July because it is a day}\columnnote[2.1]{\myitem{1}{     \begin{description}     \vspace{-3.75 ex}     \item[A] NO CHANGE     \item[B] 4th of July, the day     \item[C] 4th of July which is the day     \item[D] 4th of July, and is      \end{description}     }}      dedicated to the spirit of independence that inspired early British Colonists to \ulnum{2}{wage war}\columnnote[2]{\myitem{2}{      Which of the following alternatives for the underlined portion would NOT be acceptable?      \begin{description}      \item[F] start a revolution      \item[G] revolt      \item[H] wage a strategic war      \item[J] to the waging war      \end{description}      }} against their overseas masters. If you look back on the history of that \ulnum{3}{day, however, it}\columnnote[2.1]{\myitem{3}{     \begin{description}     \vspace{-3.75 ex}     \item[A] NO CHANGE     \item[B] day, however it     \item[C] day, because it     \item[D] day. It     \end{description}     }}      celebrates the ratification of the Declaration of Independence. While this is an important milestone in establishing one of the first modern democracies, it is not as dramatic as the days celebrated by some other countries. \fbox{4}\columnnote[6]{\vspace{-6ex}\myitem{4}{      At this point the writer is considering adding the following sentence --- \emph{`The fireworks on Independence Day and the Star Spangled Banner are more reminiscent of a revolutionary-war spirit than simply signing a document.'} --- should the writer make this addition here?      \begin{description}      \item[F] Yes, it is relevant to the focus of the paragraph, which is Independence Day      \item[G] Yes, it helps the reader get in the spirit of Independence Day      \item[H] No, it is distracting from the focus of this paragraph, which is the historical events that took place on July 4th, 1776      \item[J] No, this information does not belong in this essay      \end{description}     }}          Take for example the French `Bastille Day.' \ulnum{5}{This was a day that} \columnnote[100]{\myitem{5}{     \begin{description}     \vspace{-3.75 ex}     \item[A] NO CHANGE     \item[B] This awesome day     \item[C] They decided to make a day that     \item[D] It     \end{description}     }}     commemorates the storming of a royal fortress in the early days of the French Revolution.     \end{paracol}     \end{document}


title: Cannot select radio elements, even output is not similiar

text: Referring to this post my output first doesn't look similiar and I also can't click on the elements. I've used the exact same code there. Has anyone an idea why this happens? His first example:               \documentclass{article}     \usepackage{hyperref}% http://ctan.org/pkg/hyperref     \begin{document}     \begin{Form}     \def\DefaultWidthofChoiceMenu{12pt}%     \ChoiceMenu[name=optionA,radio]{}{Option1,Option2,Option3}          \medskip          \ChoiceMenu[name=optionB,radio,radiosymbol=]{}{Option1,Option2,Option3}          \medskip          \ChoiceMenu[name=optionC,radio,radiosymbol=\ding{108}]{}{Option1,Option2,Option3}          \medskip          \ChoiceMenu[name=optionD,radio,radiosymbol=\ding{109}]{}{Option1,Option2,Option3}          \medskip          \ChoiceMenu[name=optionE,radio,radiosymbol=\ding{96}]{}{Option1,Option2,Option3}     \end{Form}     \end{document}      His output: ![enter image description here](http://i.stack.imgur.com/vbvhM.png) My output: ![enter image description here](http://i.stack.imgur.com/QCsjz.png) His second example does lead to another issue: Radio's should be grouped by name, this seems not to happen on me:               \documentclass{article}     \usepackage{hyperref}% http://ctan.org/pkg/hyperref     \begin{document}     \begin{Form}     \def\DefaultWidthofChoiceMenu{12pt}%     \ChoiceMenu[name=optionA,radio]{\mbox{}}\null Option1     \ChoiceMenu[name=optionA,radio]{\mbox{}}\null Option2     \ChoiceMenu[name=optionA,radio]{\mbox{}}\null Option3          \medskip          \ChoiceMenu[name=optionB,radio,radiosymbol=]{\mbox{}}\null Option1     \ChoiceMenu[name=optionB,radio,radiosymbol=]{\mbox{}}\null Option2     \ChoiceMenu[name=optionB,radio,radiosymbol=]{\mbox{}}\null Option3          \medskip          \ChoiceMenu[name=optionC,radio,radiosymbol=\ding{108}]{\mbox{}}\null Option1     \ChoiceMenu[name=optionC,radio,radiosymbol=\ding{108}]{\mbox{}}\null Option2     \ChoiceMenu[name=optionC,radio,radiosymbol=\ding{108}]{\mbox{}}\null Option3          \medskip          \ChoiceMenu[name=optionD,radio,radiosymbol=\ding{109}]{\mbox{}}\null Option1     \ChoiceMenu[name=optionD,radio,radiosymbol=\ding{109}]{\mbox{}}\null Option2     \ChoiceMenu[name=optionD,radio,radiosymbol=\ding{109}]{\mbox{}}\null Option3          \medskip          \ChoiceMenu[name=optionE,radio,radiosymbol=\ding{96}]{\mbox{}}\null Option1     \ChoiceMenu[name=optionE,radio,radiosymbol=\ding{96}]{\mbox{}}\null Option2     \ChoiceMenu[name=optionE,radio,radiosymbol=\ding{96}]{\mbox{}}\null Option3     \end{Form}     \end{document}      His output: ![enter image description here](http://i.stack.imgur.com/tBiuk.png) My output: ![enter image description here](http://i.stack.imgur.com/IcNQ2.png) My System: Lubuntu x64 12.04 LTS               pdftex --version     pdfTeX 3.1415926-2.5-1.40.14 (TeX Live 2013/Debian)     kpathsea version 6.1.1     Copyright 2013 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).     There is NO warranty.  Redistribution of this software is     covered by the terms of both the pdfTeX copyright and     the Lesser GNU General Public License.     For more information about these matters, see the file     named COPYING and the pdfTeX source.     Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).     Compiled with libpng 1.2.49; using libpng 1.2.50     Compiled with zlib 1.2.8; using zlib 1.2.8     Compiled with poppler version 0.24.5      I have no idea where that issue comes from and how to fix it.


title: What is the simplest way to draw the solution of a simultaneous inequalities using PSTricks?

text: # Objective I want to draw a region in Cartesian coordinate system that satisfies a set of inequalities. How to do this in the simplest way? ![alt text](http://i.stack.imgur.com/CXIEm.png) ![alt text](http://i.stack.imgur.com/w8ybL.png) # Minimal Code               \documentclass{minimal}     \usepackage{pstricks-add,amsmath}          \begin{document}     \pspicture*[showgrid=false](-1,-4)(3,1)     \pspolygon[fillstyle=solid,fillcolor=red,opacity=0.25,linestyle=none]%     (0,0)(0,-3)(2,0)     \psset{linewidth=0.4pt}     \psaxes[arrows=<->](0,0)(-0.5,-3.5)(2.5,0.5)[$x$,0][$y$,90]     \psplot[algebraic]{-0.25}{2.25}{1.5*x-3}     \psset{linecolor=red,linewidth=1.5pt}     \psline[linestyle=dashed](0,-3)     \psline[linestyle=dashed](2,0)     \psline(2,0)(0,-3)     \rput[tl](1,-1.5){$y=\frac{3}{2}x-3$}     \endpspicture          \end{document}      # Edit 1 Actually I can do this by finding the "critical" points **MANUALLY** and use them as the parameters for `\psline`. Put the lines into `\pscustom` and set the fill color. Done. But if there is a more efficient approach, please let me know.


title: Different hierarchical levels in TOC and hyperref-generated PDF bookmarks

text: I would like to make hyperref generate bookmarks for all available hierarchical levels of my documents, but only in the produced PDF. For the TOC itself (i.e. the one printed at the beginning of the document), however, I would like to display only the first 2 or 3 levels, to make it more compact. But from what I understand, the only way to change the depth in the PDF bookmarks is to change that of the TOC, using the command `\setcounter{tocdepth}{x}`. Is there an alternate way of controlling this depth, which would allow using a different value for the TOC and for the PDF bookmarks? * * * Edit: Here's a minimal example. By default, the 3 hierarchical levels are displayed in both the TOC and PDF bookmarks. By uncommenting the 4th line, one can limit the depth to the 2nd level, but this is applied to both the TOC and PDF bookmarks. I would like it only to apply to the TOC, and keep the 3rd level in the PDF bookmarks.               \documentclass{article}     \usepackage{hyperref}          \begin{document}          %\setcounter{tocdepth}{2}     \tableofcontents          \section{This should be in both the TOC and bookmarks}     \subsection{This too}     \subsubsection{But this should appear only in the bookmarks}     \subsubsection{and this also}          \end{document}


title: How to place text between two columns and which breaks the rule dividing them in ConTeXt?

text: I have two paragraphs of instructions and I need to indicate to readers that they have a choice of one or another. I am using this code, to put the data into different columns, with a line between:               \startcolumns[n=2, rule=on]         \startlines             This is some instructions.         \stoplines         \column         \startlines             This is some other instructions.         \stoplines     \stopcolumns      This makes a document like this, with a nice divide line in the middle:                _______________________________     |                               |     | This is some  : This is some  |     | instructions. : other instru- |     |               : ctions.       |     |                               |     |_______________________________|      I'd like to add the text "or", beween the two columns, to make it more clear that readers have a choice. This breaks the divide line and appears exactly in the middle, centered vertically on the line, and horizontally centered as well, e.g.:                _______________________________     |                               |     | This is some  :  This is some |     | instructions. or other instr- |     |               :  uctions.     |     |                               |     |_______________________________|      How can I add "or" text to the line dividing the two columns?


title: Modulo calculation in PGFplots tick label

text: I am printing a diagram and want to use a_[0...3] as tick labels on the x-axis. Right now I have a[0...7] as labels and look for a way to print a[\tick mod 4] (i.e. a_0, a_1, a_2, a_3, a_0, a_1, a_2, a_3). I tried using the solutions found found here (How do I calculate n modulo 3 in LaTeX?), but they all bring up errors when used in the line `xticklabel={$a_{\pgfmathprintnumber[int trunc]{\tick}}$}`. Here is an MWE. Can anyone help?               \documentclass{article}     \usepackage{pgfplots}     \begin{document}          \begin{tikzpicture}        \begin{axis}[              height=8cm,              width=14.6cm,              xtick={0,...,7},              ytick={0,...,3},              xticklabel={$a_{\pgfmathprintnumber[int trunc]{\tick}}$},              yticklabel={$b_{\pgfmathprintnumber[int trunc]{\tick}}$}        ]             \addplot coordinates {(0,3) (1,2) (2,1) (3,0)} {};        \addplot coordinates {(1,3) (2,2) (3,1) (4,0)} {};        \addplot coordinates {(2,3) (3,2) (4,1) (5,0)} {};        \addplot coordinates {(3,3) (4,2) (5,1) (6,0)} {};        \end{axis}     \end{tikzpicture}          \end{document}


title: How to replace specific words with an underscore equal in length to the original word replaced in ConTeXt?

text: My problem is identical to Phantom and line break, however, I am using ConTeXt. I am creating a cloze test, e.g.:               Frogs have four ____ and two eyes.      The original text in the source appears like this:               Froms have four \cloze{legs} and two eyes.      How can I get any text appearing inside `\cloze` to be replaced with underscores of the same length? E.g. "elephant" is replaced with 8 underscores.


title: How to switch fonts when the language switches in ConTeXt?

text: I have a mostly English-language document, with fonts defined like this:               \usemodule[simplefonts]     \setmainfont[MinionPro-Regular]     \setsansfont[MyriadPro-Bold]      Occassionally, I need to have some Chinse text appear, using `\language[cn]{}`, and since the above fonts do not have Chinese characters, I need it to temporarily switch to Adobe Song Std, when Chinese text appears amid the main font, and Adobe Heiti Std, when Chinese text appears in places where sans fonts are used.   * How can I set ConTeXt to automatically switch fonts when I switch to a different language?


title: How can I slant the rectangular glow box with lighting effect in TikZ

text: I can get the corresponding lighting effect as Ivan Andrus' codes, but here I want to rotate or slant the box with lighting effect of the following type: ![enter image description here](http://i.stack.imgur.com/DPRFv.png) So I added the codes "xslant" and "yslant", but I obtained a failed type as the following: ![enter image description here](http://i.stack.imgur.com/CxhWO.png) Here is my MWE:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{calc}     \usetikzlibrary{shadings}     \begin{document}     \def\yslant{0.5}     \def\xslant{-0.6}     \def\shadowradius{3pt}     %     \newcommand\drawshadowbis[1]{       \begin{pgfonlayer}{shadow}       %         \fill[inner color=blue,outer color=blue!10!black] ($(#1.south east)$) circle(\shadowradius);         \fill[inner color=blue,outer color=blue!10!white] ($(#1.north west)$) circle (\shadowradius);       %       \begin{scope}         \clip ($(#1.south west)$) circle (\shadowradius);         \shade[upper left=blue!10!white,upper right=blue,lower left=blue!10,lower right=blue!10!black]             ($(#1.south west)$) rectangle ++(-\shadowradius,-\shadowradius);       \end{scope}            \begin{scope}         \clip ($(#1.north east)$) circle (\shadowradius);         \shade[upper left=blue!10!white,upper right=blue!10,              lower left=blue,         lower right=blue!10!black]           ($(#1.north east)$) rectangle ++(\shadowradius,\shadowradius);       \end{scope}            \fill[ top color=blue, bottom color=blue!10!black] ($(#1.south west)+(0,-\shadowradius)$) rectangle ($(#1.south east)$);       \fill[left color=blue,right color=blue!10!black] ($(#1.south east)$) rectangle ($(#1.north east)+(\shadowradius,0)$);       \fill[bottom color=blue,top color=blue!10!white] ($(#1.north west)$) rectangle ($(#1.north east)+(0,\shadowradius)$);       \fill[right color=blue,left color=blue!10!white] ($(#1.south west)$) rectangle ($(#1.north west)+(-\shadowradius,0)$);       \end{pgfonlayer}     }     %     \pgfdeclarelayer{shadow}     \pgfsetlayers{shadow,main}     \begin{tikzpicture}[yslant=\yslant,xslant=\xslant,        every node/.append style={yslant=\yslant,xslant=\xslant}]       \node [fill=blue,rectangle,rounded corners=0pt,draw=blue, ultra thick, text=white] (box) {Test!!!};     \drawshadowbis{box}     \end{tikzpicture}     \end{document}       Any help will be really appreciated!


title: TeX Live Installation Stuck at `updmap-sys`

text: I'm installing a minimal TeX scheme (plain + latex + a few langauge packs, configured through advanced installer) and the installation becomes stuck on `updmap-sys` reading               ...     mktexlsr: Done.     running updmap-sys...      and then it gets stuck---at least it has been for the past hour or so. Is there any reason this would happen and, more importantly, how can I continue the installation safely? (I'm running Windows 7 64-bit with what I believe to be a 32-bit distribution of TeX Live, if that makes any difference whatsoever.)


title: Take the kerning of a font to make it the kerning of another one

text: The `charter` font from `mathdesign` has poor kerning while the `Charter` font by SIL is better. The problem is that the bold face of SIL is really bold and I prefer the one from `mathdesign`. Actually, even the non-bold face is thick compared to `mathdesign`. I can also use `mathdesign` with pdflatex and the `microtype` to get a good kerning in french. SIL is not usable with pdflatex I believe. So is it possible to take the kerning of SIL and make `mathdesign` use this one? Note: There is also an `xcharter` improving the kerning but the thickness is as with SIL. My engines are lualatex and pdflatex to use microtype.


title: How does scrpage2's automark work?

text: I'm trying to define a header style for my paper based on the `scrartcl` class. After digging through some documentation I came along the `scrpage2` package to create the headings. I get the layout as I want it, which is great, but I don't get the automark command. It puts in a heading, which is great, but it seems strange. By strange I mean that it puts Contents as the header for Contents, which is what I expect, but on the next page (notice the `\vfill` and `\pagebreak`) it puts 3 Third as the heading, which is not what I expected. I expect it to put the very first section or subsection it finds on a page in the header. Have I misunderstood how the automark command works or do I need to put in extra options? (Like `\automark[subsection]{section}`) EDIT: Double weird: it works when I replace all `\sections` in the example with a `\blinddocument`. I'm sorry I am so unclear, though, I just have no clue _at all_.               \documentclass[twoside,titlepage=true]{scrartcl}      \usepackage[]{geometry}           \usepackage[english]{babel}     \usepackage{blindtext}          \usepackage[automark]{scrpage2} % This should be set AFTER setting up the page geometry     \pagestyle{scrheadings}          \begin{document}          \title{A Minimal Working Example}     \author{Zsub}          \maketitle          \tableofcontents     \vfill     \pagebreak          \section{First}     \blindtext[2]     \section{Second}     \blindtext[2]     \section{Third}     \blindtext[2]     \section{Fourth}     \blindtext[2]     \subsection{First of Fourth}     \blindtext[1]     \section{Fifth}     \blindtext[2]     \section{Sixth}     \blindtext[2]     \end{document}      P.S. It's been a few years since I last used latex and a bit of a struggle to get re-acquainted, but my classmates are already jealous of the layout. So thanks for the help, everyone!


title: Why do slide transitions in beamer not work with XeLaTeX?

text: I try to use some slide transitions in `beamer` with `XeLaTex` but it does not work. Why does this happens and how can I deal with it? But it works when I use slide transitions in beamer with PDFLaTeX. XeLaTeX was used for dealing with a lot of Chinese characters since it is flexible for font selection. Here is my MWE:               % !Mode:: "TeX:UTF-8"     \documentclass{beamer}     \usepackage{fontspec,xunicode,xltxtra}          \useoutertheme{infolines}     \usetheme{Darmstadt}          \begin{document}          \title{Example}     \institute{CUMT}     \author{xiao}               \begin{frame}     \frametitle{Example of Transboxin}     \transboxin     Frame Body Text     \end{frame}               \begin{frame}     \frametitle{Example of Transboxin}     \transboxin     Frame Body Text No2          It does not work. Do you see it?     \end{frame}     \end{document}      Any help will be really appreciated! Well, if it can not be solved I will ignor slide transitions which do not affect my presentation.


title: Unlimited size delimiters with TikZ

text: Compare this two outputs ![enter image description here](http://i.stack.imgur.com/2ZDpz.png) Which one would you prefer to have in your document? I would definetly prefer the one on the right. However, most fonts (MinionPro in this case) only offer four sizes of delimiters available, and, in case one needs a bigger size they rely on the “extensible delimiters” which might not look as good. Since we have Ti _k_ Z available, I thought that it would be great to create some —flexible— options to enhace delimiters in TeX. ## Question: How could one use the power of Ti _k_ Z to create unlimitedly large delimiters? _I've already written some code to achieve that. However, I ask the question that way so that it's not closed because of OffTopic, or Too Broad, or even Unclear._ My idea was to create a certain figure in Ti _k_ Z (inside a user command) which could be easy configurable by certain parameters. The most important one is the height, which is the mandatory argument to a hypothetical command `\PARENS{height}{content}`. I've already done many delimiters (just by hand, in less than two hours, so no effort has been put into that), but I will share here the parenthesis (at least for now). In my case there is no relation between one parameter and another (which could be perfect in an ideal solution) However, I think my idea could be developed much more. Right now, they are just a `tikzpicture` for the opening delimiter and the same one for the closing (just with `xscale=-1`); in case one wants to automatically measure the height of the contents, I just set a box and measure it (which is slow when using nested parenthesis); I mix `expl3` with Ti _k_ Z, etc. So, in case one wants to answer this question, these are some points that would be great to enhance   * May be using proper Ti _k_ Z systems to offer even more flexibility (may be add the delimiters as some sort of `pic` or `decoration`);   * using Ti _k_ Z systems to measure the height of the content;   * enable flexible calculation of parameters in function of the height;   * may be create a system to save all the created parenthesis to boxes and just reuse them when the same height is used;   * proper decision about what parameters are necessary and which not;   * etc. Of course, different styles are also appreciated, and even different delimiters (I chose parenthesis for the example, since those are a bit more trickier than the rest, but, of course, nothing to do with braces!). What I'm looking for is, apart from the answer to my question, any idea that would improve, in any way, the usability of this delimiters. In any case, I will read comments / suggestions or whatever to improve the question in any possible way.


title: Tabular column and line extend to page-height

text: I've got a table that splits a page with a vertical line. I'd like the table's total height to be that of the page, and in particular have the vertical line down the center extend from the midline to the bottom of the page. Here's example code:               \documentclass[oneside,12pt]{memoir}          \begin{document}          \begin{tabularx}{\stockwidth}{X|c}              \multicolumn{2}{c}{A: Main heading - variable height} \\ \midrule%         X: (This side blank) & \textbf{B: Mid heading} \\ %         \cline{2-2} \\ [1ex]%          & C: Mid Content (may be any height) \\ [1ex] \cline{2-2} \\%         & \parbox{5cm}{D: This content may be short or long, but in any %           case the line on the left %            should go to the bottom of the page.}          \end{tabularx}          \end{document}      It looks something like this (and I'd like that middle vertical line to extend to the bottom of the page): ![Example of tabularx not extending to page height](http://i.stack.imgur.com/tsJoE.png) I'd like to use `\vfil` or some such to extend `D` to the height of the page, but I'm just not sure how to use it for that. That would seem to solve the primary problem. Here are some of the strange constraints:   * `A` can be any height. It starts 1cm from the top of the page, 1cm from the margin, and there's a 1 cm margin at the bottom.   * `C` can be any height up to around 5cm (but it should only expand to that size if necessary).   * `D` might be one of two or three fixed sizes (e.g. 3cm, 6cm or 9cm)   * `X` is the page width minus the width of D, but in any case not less than 50% of the width of the page (i.e. if D is bigger than 50% of the page, D has to wrap or some such).   * This is all inside a `textblock*` (from `textpos`) that's been `rotated` by 90 degrees (i.e. on a landscape page in an otherwise portrait document) and sized to `\stockwidth - 2cm`; I've not reproduced this to try and keep this simple. How can one extend the vertical line to the bottom of the area (in this case a textblock)? Thanks for reading.


title: Figure and table numbers in caption are terminated by a period and semicolon

text: I'd like help redefining the Table and Figure captions. Currently both Table and Figure numbers are terminated by a period and colon. For example,               \caption{Foo bar}      Produces the text,               Table 1.: Foo bar      instead of               Table 1. Foo bar      or even               Table 1: Foo bar      or perhaps even               Table 1 Foo bar      I'd like to have control over the punctuation symbols appended to Figure and Table numbers. BTW, I've tried redefining `\figurename` and `\tablename` as follows, without success.               \renewcommand{\figurename}{Figure}     \renewcommand{\tablename}{Table}}      If it matters, I'm using the `classicthesis` package. Edit: redefining `\thefigure` as follows doesn't help either. The period and semicolon is still there               \renewcommand{\thefigure}{\thechapter.\arabic{figure}}      MWE:               \documentclass[10pt,a4paper,twoside,open=right,headinclude,footinclude]{scrreprt}     \usepackage{classicthesis-ldpkg}     \usepackage[]{natbib}     \usepackage[eulerchapternumbers,eulermath,subfig]{classicthesis}     \usepackage{datetime}     \usepackage{bm}     \usepackage{cancel}     \usepackage{caption}     \usepackage{subfig}     \usepackage{rotating}     \usepackage{multirow}     \usepackage[ruled,vlined,linesnumbered]{algorithm2e}          %\captionsetup{labelsep=none}          \begin{document}          \chapter{One}          \begin{table}[htbf]      \centering         \setlength\extrarowheight{4pt}         \begin{tabular}{|>{\centering}p{35mm}|>{\centering}p{35mm}|p{35mm}<{\centering}|} \hline             Foo          &   Bar        &   Bar Foo                    \\             For         &   Bar              &   Bar Foo                          \\ \hline         \end{tabular}     \caption{stuff} \label{www}     \end{table}          \appendix     \chapter{Appendix} Hello % THIS IS THE CULPRIT!!! (No appendix, no extra period)          \end{document}


title: After changing Kate's LaTeX syntax highlighting file, syntax highlighting for LaTeX can not be selected anymore in Kile

text: I wanted to adapt the Kate LaTeX Syntax Highlighting file (in my case: `/usr/share/kde4/apps/katepart/syntax/latex.xml`), to have a different highlighting in Kile, as in the answer to disable syntax highlighting in kile. Before that, I made a copy of the original file. But my intended change did not work and also the Syntax Highlighting in some LaTeX documents didn't work any more, after restarting Kile. Interestingly, some documents highlighted still in the original way, but those that were edited last, not. Hence, I wanted to switch back to the original version and just moved the backup copy I had made to the original place. However, after restarting the computer, the Syntax Highlighting still does not work. When in Kile, I click `"Tools"` -> `"Highlighting"` -> `"Markup"`, but there is no Latex to be selected. In Kate, I cannot select Latex either. What did I do wrong?! Do I have to do something else to make Kate & Kile recognize the file?! It has the same permissions as the other files in the folder. I tried to resolve my problem by downloading the latex.xml file from the Kate repository, but also this file does not change anything.


title: Wrong date format if datenumber is loaded after datetime

text: The date format is wrong when `datetime` and `datenumber` are used at the same time, `datenumber` being loaded after `datetime`. As can be tested with the following MWE:               \documentclass{article}     \usepackage{datetime}     \usepackage[english]{datenumber}     \begin{document}     \section{Package datenumber}     \begin{itemize}       \item \setdate{2015}{1}{21}         \datedate       \item \setdate{2015}{1}{22}         \datedate       \item \setdate{2015}{1}{23}         \datedate       \item \setdate{2015}{1}{31}         \datedate     \end{itemize}          \section{Package datetime}     \begin{itemize}     \item \newdate{21}{21}{1}{2015}       \displaydate{21}     \item \newdate{22}{22}{1}{2015}       \displaydate{22}     \item \newdate{23}{23}{1}{2015}       \displaydate{23}     \item \newdate{31}{31}{1}{2015}       \displaydate{31}     \end{itemize}     \end{document}        * when `datenumber` is not loaded, `datetime` displays the ordinal for 21, 22, 23 and 31 as 21st, 22nd, 23rd and 31st, as expected with UKenglish;   * when `datetime` is not loaded, `datenumber` displays the ordinal for 21, 22, 23 and 31 as 21st, 22nd, 23rd and 31st, as (almost) expected with UKenglish;   * when `datenumber` and `datetime` are loaded in this order, the error:               ! You can't use `the character 2' after \advance.      <argument> 2                  015      l.9 \item \setdate{2015}{1}{21}      already reported in datetime and datenumber package conflict? arises;   * when datetime and datenumber are loaded in this order, the ordinal for 21, 22, 23 and 31 are displayed as:     * 21st, 22nd, 23rd and 31st by datenumber, as (almost) expected with UKenglish;     * 21th, 22th, 23th and 31th by datetime, and that's wrong.


title: How to modify \AtBeginLecture?

text: I am using beamer to pepare my lectures. I am using command `\AtBeginLecture{\frame{some text... \insertlecture}}` to insert a tile at the beginning of the lectures. This put the desidered text at the beginning of _every_ lecture. I woulkd like to start the text only from the second lecture onwards, not the first. How can be done?


title: How to debug hanging xetex compilation

text: I'm experiencing a weird problem. After updating my MikTeX installation my thesis document no longer compiles. Compilation (with xelatex) hangs and takes up all of one of my CPU's cores. However, if I take out one particular chapter (the chapters are in separate .tex files which I load with `\input`) compilation completes without any problems. _But_ , when I compile that particular chapter separably compilation _also_ completes without problems. In other words, the problem does not seem to be caused by the chapter itself, but rather by some combination of factors. Also, I must stress that things worked fine until I updated MikTex. Does anyone have any ideas on what might be causing this? Or maybe just some pointers on how I could debug this situation? **EDIT (1)** (removed, the problem was not related to images after all) **EDIT (2)** I did more research and it turns out it has something to do with greek letters in math mode. I have traced to problem to a few math expressions (between `$`-signs) containing `\mu` and `\alpha`. These are in the aforementioned chapter. If I comment out these expressions (or just remove `\mu` and `\alpha` from them) my whole thesis compiles without problem (so including the problematic chapter). What makes this extra strange is that when I compile this chapter ( _with_ the `\mu` and `\alpha` expressions) in isolation -- by commenting out the loading of all other chapters in my master file -- everything works and the mu's and alpha's look fine in the pdf. My guess it this might be a memory problem. Maybe some sort of font cache can not load the greek glyphs because it is already full with all the glyphs used elsewhere in my thesis. Does this make any sense? Providing a MWE for this problem is hard because it simply does not seem to occur when the input is "minimal". However, this might be a relevant section of my preable:               \usepackage{amsmath,amsfonts,amssymb}          %MATH FONT: Iwona Light     \usepackage[light,math]{iwona} %for basic math symbols          %AMS Blackboald (mathbb) font (used for mathematical fields)     \DeclareSymbolFont{AMSb}{U}{msb}{m}{n}     \protected\def\mathbb#1{{\mathchar\numexpr256*\symAMSb+`#1\relax}}          \usepackage{mathspec} %Also loads fontspec(!)     \defaultfontfeatures{Ligatures=TeX,Scale=MatchUppercase,Numbers={Lining,Proportional}}          %MAIN FONT and MATH digits and latin letters: Computer Modern Unicode (CMU) Bright (loaded by filenames to force use of OpenType versions)     \setallmainfonts(Digits,Latin)[BoldFont={cmunbbx.otf},ItalicFont={cmunbmo.otf},BoldItalicFont={cmunbxo.otf}]{cmunbmr.otf}          %MATH greek letters: Greek font is Iwona Light (loaded by filenames to force use of OpenType versions)     \setmathsfont(Greek)[BoldFont={Iwona-Bold.otf},ItalicFont={IwonaLight-Italic.otf},BoldItalicFont={Iwona-BoldItalic.otf},Numbers={Lining,Proportional}]{IwonaLight-Regular.otf}          %SANS FONT: idem (no need to set it because CMU Bright already is a sans serif font)          %MONOSPACE (typewrite) FONT: CMU Typewriter Text Light     \setmonofont[Scale=MatchLowercase]{CMU Typewriter Text Light}          \usepackage{xltxtra} %also loads xunicode


title: Why different column width in table

text: I am getting different column width in table and i am not able to correct this. The row with multiple columns in last (with text member) has uneven width. Please help. Here is a sample code.               \begin{table*}[h!]     \centering      \vspace{0.5em}     \setlength\extrarowheight{2pt}     \noindent     \begin{tabular}{|c|c|c|c|}     \hline     \multicolumn{1}{|l}{\small \textbf{Progress of the Candidate:}} & \multicolumn{3}{c|}      {\small \textbf{Excellent/Good/Satisfactory/Unsatisfactory}} \\[1ex] \hline     \multicolumn{4}{|l|}{\small \textbf{Remarks:}}                         \\[10ex] \hline     \multicolumn{4}{|l|}{}\\[3em]     \multicolumn{2}{|l}{$\overline{\strut \small \textbf{Signature(s) \& Names(s) of  Guide(s)}}$ } & \multicolumn{2}{l|}{\hspace{12em}\small \textbf{Date}}   \\[0.5em] \hline     \multicolumn{4}{|l|}{}\\[3em] \hline     \small \textbf{Member 1}       &  \small  \textbf{Member 2}      &    \small           \textbf{Member 3}       &  \small  \textbf{Member 4}        \\      \multicolumn{4}{|c|}{\small \textbf{Signature \& Names of DC Members}} \\ \hline                              \end{tabular}     \end{table*}


title: Conflict between animate package and math delimiters?

text: I've encountered an unusual problem with the `animate` package and the use of math delimiters, like `\left\\{`. When compiling the MWE, I get the error `Missing delimiter (. inserted).` on the math line. But: if I change the order -- putting the math line before `animategraphics` line -- it compiles with no problem. Is there a known conflict between `animategraphics` and the later use of delimiters? Any thoughts about how to overcome this?               \documentclass{article}     \usepackage{amsmath}     \usepackage{animate}          \begin{document}     \animategraphics[scale=0.5]{6}{animfile}{}{}     \[\left\{\begin{array}{l}y=2x\\y=x+1\end{array}\right.\]     \end{document}


title: Multiple pdf outputs with template

text: I have some 84 files > `S1-5.tex, S1-6.tex, S1-7.tex, S1-8.tex, S2-1.tex, S2-2.tex` like these which only contain content. The templ.tex file contains the preamble. I need to generate 84 pdf files with correspoding names. How to automate this?


title: Custom environment vs macro inside a tabular

text: In a document I'm writing I have a nested tabular structure that I want to capture as a macro for reuse. I'd like to define the nesting using a new environment but it doesn't seem to work. I have tried three approaches: using `\newenvironment`, using `\NewEnviron` and using a normal macro. The macro works but the environments do not. Here's a small example showing a simplified version of what I'm doing and the issues I'm running into:               \documentclass{article}          \usepackage{environ}          \newenvironment{testTabA}{%         \multicolumn{3}{l}\begingroup             \begin{tabular}{ll}     }{%             \end{tabular}         \endgroup \\     }          \NewEnviron{testTabB}{%         \multicolumn{3}{l}{%             \begin{tabular}{ll}                 \BODY             \end{tabular}         } \\     }          \newcommand\testTabC[1]{%         \multicolumn{3}{l}{%             \begin{tabular}{ll}                 #1             \end{tabular}         } \\     }          \begin{document}         % No macros: This works         \begin{tabular}{lll}             1 & 2 & 3 \\             \multicolumn{3}{l}{                 \begin{tabular}{ll}                     a & b \\                 \end{tabular}             } \\         \end{tabular}              % newenvironment: This fails with "Misplaced \omit"         \begin{tabular}{lll}             1 & 2 & 3 \\             \begin{testTabA}                 a & b \\             \end{testTabA}         \end{tabular}              % NewEnviron: This fails with "Argument of \testTabB has an extra }"         \begin{tabular}{lll}             1 & 2 & 3 \\             \begin{testTabB}                 a & b \\             \end{testTabB}         \end{tabular}              % Macro: This works         \begin{tabular}{lll}             1 & 2 & 3 \\             \testTabC{                 a & b \\             }         \end{tabular}     \end{document}      As a fairly new user of TeX, I have no idea what's happening. Can anyone explain why the environment examples are behaving as they are?


title: Stop table going off page

text: I'm aware that my table is too wide as it keeps going off the page on the right. Is there a way to fix this? I'm using lyx as I am a learner.


title: Where can I find computer modern fonts for use in other programs, e.g. Adobe Illustrator?

text: For some complicated diagrams, I need to use something like Adobe Illustrator or Inkscape, and would like to include nicely typeset labels. (I'm aware of post-processing solutions, such as pinlabel.) One way to do this is to use a closely-matching font, and then convert fonts to outlines. Better, however, would be to use Computer Modern directly in Illustrator. **Where can I find a Computer Modern font compatible with Adobe Illustrator?**


title: What is the .ttf font for default LaTeX font?

text: What's the .ttf version of the default font used by \LaTeX? Trying to make a quick screenshot edit of LaTex screenshot in Photoshop, but having a hard time to get fonts to match up.


title: Which font does LaTeX use / Possible to use in Word?

text: What is the name of the standard font in LaTeX? And is it possible to download and use this font in Microsoft Word? I found that Latin Modern supposedly resembled it, but the archives on http://www.gust.org.pl/projects/e-foundry/latin-modern/download contain more than 70 different fonts, so I don't know which one to choose. All I am looking for is a single, say, OTF font file which I can use in Word and which looks exactly like the default latex font.


title: Can we have Computer Modern Font in LibreOffice?

text: I want to make my LibreOffice have the displayed font as in latex. But I cannot find that. Will you please help me? The font I seek after is such as the font here https://www.math.wisc.edu/~boston/ddt.pdf


title: How do I get my LaTeX font for the usage in other software

text: I am using my university default LaTeX file for my thesis (written in LaTeX). I am still not sure how the font that LaTeX uses is called, but if I click in `font --> properties` it appears with the name of _CM R 12_. Is it equivalent to a common font name that typically MS Word would use? I am wondering how I could use that same font in my other software, such as MS Word, Adobe Photoshop, etc.? How should I install it on my mac? I am using MacBook Pro, with OS 10.9.1.


title: How to extract the value from a pgfkeys style element

text: Lets say I have defined some style:               \tikzset{mystyle/.style={inner xsep=2pt, outer xsep=10pt}}      Given the name of the style: How can I later get the (possibly overriden) value of one of its element, such as `outer xsep`? My current attempt works like this:               \newcommand{\Xouterxsep}{%       \bgroup\tikzset{mystyle}\xdef\outerxsep{\pgfkeysvalueof{/pgf/outer xsep}}\egroup%     }      So after invoking `\Xouterxsep` the macro `\outerxsep` contains the value I am looking for. However, I would prefer a more elegant solution, that is, use something like `\pgfkeysvalueof` directly. I have already tried something along:               \def\pgfkeysvaluefromstyle#1#2{\begingroup\tikzset{#1}\pgfkeysvalueof{/pgf/#2}\endgroup}      This does work in simple cases, however, not in my particular case, where I feed the value into the `\titlespacing*` command from the `titlesec` package. I guess it is some sort of expansion issue. I have tried to look up in the `titlesec` source what is actually happening there, but did not get very far; the `titlesec` code is somewhat opaque. Complete not-working MWE:               \documentclass{article}     \usepackage{tikz}     \usepackage[explicit]{titlesec}          \tikzset{mystyle/.style={outer xsep=10pt, outer ysep=10pt}}          % this does not work: pdflatex hangs, interrupting it with Ctrl+C yields     % ! Interruption.     %  \pgfkeys@parse ...uturelet \pgfkeys@possiblerelax      %                                                   \pgfkeys@parse@main      %  l.16   \section{Section}     %     \def\pgfkeysvaluefromstyle#1#2{\begingroup\tikzset{#1}\pgfkeysvalueof{/pgf/#2}\endgroup}     \titlespacing*{\section}{\pgfkeysvaluefromstyle{mystyle}{outer ysep}}{0pt}{0pt}          % this does work:     %     % \def\Xouterxsep{\bgroup\tikzset{mystyle}\xdef\outerxsep{\pgfkeysvalueof{/pgf/outer xsep}}\egroup}     % \Xouterxsep     % \titlespacing*{\section}{\outerxsep}{0pt}{0pt}               \begin{document}       \section{Section}     \end{document}


title: Enumerating the align environment

text: Consider the following MWE:               \documentclass{article}     \usepackage{amsmath}          \begin{document}          \setcounter{equation}{42}          \begin{align}                      a & = b + c              \label{label1} \\         \alpha_{i,j,k} & = \theta^2 + \phi^2  \label{label2} \\           M_\text{res} & = a + \alpha_{i,j,k} \label{label3}     \end{align}          \end{document}      How can I enumerate the three equations? Wrapping the `align` environment in an `enumerate` environment and starting each equation line with `\item` won't work. The equations should be enumerated like normal, and will thus depend on what comes before the `align` environment in question. I've arbitrarily set the equation counter to 42 to represent the content before the `align`. I also need to reference the equation labels as normal.


title: 'What's new' on tlmgr

text: I'm using `tlmgr` to update packages. Once a week I use it and update all. But some times I'd like to know what are the changes on some packages. Is it possible to show this? Maybe clicking somewhere to see _what's new file_. I know that I can find this on CTAN, but what about on `tlmgr`? **ps.** I forgot to say that I'm using a GUI. So I can see what is available to update.


title: Highlight anything in LaTeX article

text: I'm looking for a package/command that will highlight _anything_ I wrap with it. Currently the closest thing I've found is `soul` but it has many shortcomings:   * No sectioning highlighting   * No automatic footnotes highlighting   * No `\cite` highlighting unless wrapped in an `\mbox{}`   * No `\citep` highlighting Here's an example article where these points can be seen:               \documentclass{article}     \usepackage{hyperref}     \hypersetup{colorlinks=true, urlcolor=blue, citecolor=cyan, pdfborder={0 0 0},}     \usepackage{soul}     \usepackage{natbib}     \bibliographystyle{plainnat}          \begin{document}          \section{\hl{Title of a section}}          This is a line with no highlighting done.\\     \hl{This is a line where a citation \citep{Knuth86} appears.}     \hl{This is a line with a footnote\footnote{And this is the footnote that should also be automatically highlighted.} which I want highlighted.}          \bibliography{biblio}          \end{document}      where the `biblio.bib` file looks like:               @ARTICLE{Knuth86,        author = {Knuth, D. E.},         title = "{The TeXbook}",         year = 1986,     }      If you try to compile it with the usual:               pdflatex "%f" && bibtex "%e" && pdflatex "%f" && pdflatex "%f"      command, it will fail for all the reasons I gave above. Isn't there something that _just works_? * * * **Edit** The accepted answer comes close but after finding out about `latexdiff` (http://www.ctan.org/pkg/latexdiff) I actually switched to using that app instead of manually highlighting text.


title: Biblatex time field in addition to date

text: Biblatex's `date` and `urldate` only reference the day that the entry was made/accesses on. Is there a way to add the _time_ to a bibliography entry as well? Any tips welcome!


title: Correct arabic chapter-section numbering with Endfloat

text: The first table in the second chapter of this MWE is marked as 'Table 2.2 About here'. The chapter-section numbering is not set up correctly, as Endfloat usually just numbers the tables sequentially throughout the whole document. How do I ensure the first table in Chapter two is listed as 'Table 2.1 About here'?               \documentclass[oneside,12pt]{book}     \usepackage[tablesfirst,notablist]{endfloat}     \usepackage{titletoc}          \renewcommand\theposttable{\arabic{chapter}.\arabic{posttbl}}     \renewcommand\thepostfigure{\arabic{chapter}.\arabic{postfig}}          \begin{document}     \chapter{Data}     \startlist{lot}     \begin{table}     \caption{Data chapter table}     \begin{tabular}{c}     123 \\     \end{tabular}     \end{table}          \printlist{lot}{}{\chapter*{List of tables in Chapter~\thechapter}}     \processdelayedfloats          \chapter{Learning}     \startlist{lot}     \begin{table}     \caption{Learning chapter table}     \begin{tabular}{c}     123 \\     \end{tabular}     \end{table}          \printlist{lot}{}{\chapter*{List of tables in Chapter~\thechapter}}     \processdelayedfloats          \end{document}


title: XeTeXpicfile in vertical mode

text: Given a minimal like               \line{%       \vtop{\hsize=.6\hsize     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse tempor lectus sit amet laoreet convallis. Quisque at est lacinia, porttitor justo quis, congue tortor. Pellentesque ac augue vitae felis facilisis convallis vel quis leo. Cras sapien quam, porttitor et molestie id, accumsan quis diam.          Ut id venenatis ante, in tincidunt leo. Praesent hendrerit, tellus vitae tristique blandit, tellus urna imperdiet dolor, ut mollis enim lacus id felis. Suspendisse ullamcorper sollicitudin diam, nec luctus velit dapibus eu.       }\hfill%       \vtop{\hsize=.4\hsize         \XeTeXpicfile "kitten.jpg" width \hsize              Foo       }%     }          \bye      Where `kitten.jpg` is, for example, something from placekitten. Where does the text `Foo` go? More importantly, why? Also, why is there some mystery space above the image? ![enter image description here](http://i.stack.imgur.com/WocNV.png) I would like to have a CSS `float: right` -like behavior.