title: How can I position an image in an arbitrary position in beamer?

text: I am making a presentation using `beamer`, and I want to be able to position a certain image the way I want in a frame. I am not sure how to do that. Is there some way you can specify coordinates in the frame and then set an image there? Is there a better way to place images in various places with the `beamer` class?


title: customizing apa style in biblatex

text: I am trying to create a document where **citations** follow the **authoryear** styling and **bibliography** follows the **apa**.               \documentclass{article}     \usepackage[american]{babel}     \usepackage[style=apa,backend=biber]{biblatex}     \ExecuteBibliographyOptions{maxnames=99}     \usepackage{csquotes}      \DeclareLanguageMapping{american}{american-apa}     \usepackage{filecontents}          \begin{filecontents}{test.bib}      @article{citation01,     Author = {LastName1, FirstName1 and LastName2, FirstName2 and LastName3, FirstName3 and LastName4, FirstName4 and LastName5, FirstName5 and LastName6, FirstName6 and LastName7, FirstName7 and LastName8, FirstName8},     Journal = {A journal name},     Number = {3},     Pages = {22--38},     Title = {A Title name},     Volume = {4},     Year = {2011}}      @article{citation02,     Author = {LastName1, FirstName1 and LastName2, FirstName2 and LastName3, FirstName3 and LastName4, FirstName4 and LastName5, FirstName5 and LastName6, FirstName6 and LastName7, FirstName7 and LastName8, FirstName8},     Journal = {A journal name2},     Number = {3},     Pages = {22--38},     Title = {A Title name2},     Volume = {4},     Year = {2011}}          \end{filecontents}          \bibliography{test.bib}          \begin{document}          \textcite{citation01} and \textcite{citation02}.          \printbibliography          \end{document}      The output of the above file is:![output](http://i.stack.imgur.com/5e1Hz.png) 1) The full author list is not generated at the bibliography section. 2)   * One option I tried was changing maxcitenames (setting it to 1).   * Another option was using citestyle (=authoryear) and bibstyle (=apa) while loading. Both of them failed. Citation desired would be > LastName1 et al. (2011a) and LastName1 et al. (2011b) and bibliography would include the full author list. Any help is much appreciated!


title: Creating flyers in LaTeX

text: This has bugged me for a while. Are there any packages/templates/methodologies for effectively creating flyers in LaTeX? Just in case there's some ambiguity in my terminology, I'm looking to create single-page, letter-sized pamphlets/posters, posted to advertise events. Any ideas?


title: Attached external pdf file is not showing page number

text: I am writing my thesis. I have a "main" LaTeX file from where I am calling (attaching) `pdf` file. But the attached `pdf` file is not showing any page number. Also, it is not showing other page style I have (like, color vertical box at right end of the page, for chapter name). How this problem can be solved ?               %=======================================          \documentclass[11pt, b5paper,twoside, svgnames]{thesis}          % "thesis" uses book class          \usepackage{pdfpages}     \usepackage{hyperref}               %---------------------------------------------------------          \begin{document}          \chapter{RESULTS}     \includepdf[scale=0.9, pages={-}]{results.pdf}               \end{document}                    %======================================     % HEADER and FOOTER     %---------------------------------------          \usepackage{fancyhdr}               \pagestyle{fancy}     \fancyfoot{}     \fancyhead{}          \fancyhf{}     \renewcommand{\headrulewidth}{0pt}     \fancyfoot[RO]{\thepage}{\slshape \rightmark}     \fancyfoot[LE]{\thepage}{\slshape \leftmark}          %=======================================================


title: Graphics are hiding page numbers

text: I have several pdfs included in my tex file (actually its a song book). Unfortunately the pdfs are hiding the page numbers:               \includepdf[fitpaper=true]{/Users/anti/Documents/2013/Liederbuch/Lieder/Testbuk/EdisLiederbuch-page12.pdf}      Is there a possibility to lay the page numbers over the graphics? Thanks in advance! Andreas


title: What is the defaults font in \documentclass{slides}?

text: Because `beamer` is more powerful, I am learning to use it to prepare my presentation. But, I prefer the default font style in `\documentclass{slides}`. So, I have two questions:   1. What is the defaults font in `\documentclass{slides}`?   2. How to use it in `beamer`? Thanks.


title: Comment out sections of text in bib file

text: What's the correct way to comment out sections of explanatory text (included for humans to read) in a .bib file? I would like biber/biblatex to simply ignore this text. When I put in text like               #######################################################################     ## PREPRINTS      I get warnings like               WARN - BibTeX subsystem: /tmp/8XsEEmjVOo/bib-latest.bib_14175.utf8, line 7, warning: 139 characters of junk seen at toplevel


title: mdframed frametitle no page break

text: How can one prevent the frame title from breaking? I'm getting a break right between the title and the contents which looks silly. I still want the content to be broken as normal but I want the frame title to be on the same page as the content.


title: how to define inparaenum in the preamble

text: I'm using both `\inparaenum` and `\enumerate` in my thesis and I would like them to set them in the preamble so that each item is set off with _a)_. I used               \setenumerate[0]{\itshape a\upshape)}      in the preamble for `\enumerate` but I don't know what to do for \inparaenum. I tried               \renewcommand{\begin{inparaenum}}{\begin{inparaenum}[\itshape a\upshape)]}      and I tried               \setinparaenum[0]{\itshpae a\upshape)}      and neither worked. Probably those attempts make people cringe, so sorry. MWE:               \documentclass[11pt]{amsart}     \usepackage{paralist}     \usepackage[shortlabels]{enumitem}          \begin{document}          \setenumerate[0]{\itshape a\upshape)}     %\renewcommand{\begin{inparaenum}}{\begin{inparaenum}[\itshape a\upshape)]}     %\setinparaenum[0]{\itshpae a\upshape)}          This is a list:     \begin{enumerate}     \item item one     \item item two     \end{enumerate}          This is in a paragraph:     \begin{inparaenum}     \item item one and     \item item two.     \end{inparaenum}     This is in a paragraph.          \end{document}


title: How can I add nodes through a TikZ style?

text: Consider a small example below. I'd like to automate the addition of the label-node along the edge through the use of styles. I've tried the naïve solution of just adding such a necessary `node` statement, but it makes sense why it wouldn't work like this. Can I add the labels another way? (Since it's not reasonable to expect node placement to be automated, is it possible to also 'clip away' the part of the edge that would clash with the node?) ![output](http://i.stack.imgur.com/MblfL.png) * * * What I'd like to happen is simply be able to say               \path[graph forward edge]       (F) edge (E);          \path[graph back edge]       (C) edge (B)       (G) edge (A);          \path[graph cross edge]       (D) edge (C)       (G) edge (B)       (G) edge (F);      and have the `graph forward edge` style add an `f` in the middle of the edge to more clearly denote its role in the graph. (Similarly with `graph back edge` and `graph cross edge`.) ### Full example               \documentclass[tikz]{standalone}     \tikzset{       node distance = 1.5 cm,       graph vertex/.style={         circle,         draw,       },       graph directed edge/.style={         ->,         >=stealth,         thick,       },       graph tree edge/.style={         graph directed edge       },       graph forward edge/.style={         graph directed edge,         loosely dotted,         % I'd like to put the magic here...       },       graph back edge/.style={         graph directed edge,         densely dotted,       },       graph cross edge/.style={         graph directed edge,         dotted,       },     }     \begin{document}     \begin{tikzpicture}       \node[graph vertex] (A)                    {A};       \node[graph vertex] (B) [      right of=A] {B};       \node[graph vertex] (C) [below right of=B] {C};       \node[graph vertex] (D) [below       of=C] {D};       \node[graph vertex] (E) [below  left of=D] {E};       \node[graph vertex] (F) [       left of=E] {F};       \node[graph vertex] (G) [above  left of=F] {G};       \node[graph vertex] (H) [above       of=G] {H};            \path[graph tree edge]         (A) edge (B)         (B) edge (F)         (F) edge (C)         (F) edge (D)         (D) edge (E)         (A) edge (H)         (H) edge (G);            \path[graph forward edge]         (F) edge node [      below] {f} (E);            \path[graph back edge]         (C) edge node [above right] {b} (B)         (G) edge node [      right] {b} (A);            \path[graph cross edge]         (D) edge node [      right] {c} (C)         (G) edge node [below right] {c} (B)         (G) edge node [above right] {c} (F);     \end{tikzpicture}     \end{document}


title: Make text block wider in A4 page

text: I'm struggling to fit a wider text into an A4 page. This page isn't going to be printed as a book, it is simply for internal use, so I don't mind if the text occupies more % of the page. I've tried different commands, to various effects, but nothing would change the width of the text stripe. The best I could get was to shift the entire block of text in either direction... These are the commands I've tried:               \setlength{\textwidth}{500pt}     \hspace{-32pt}     %% \textwidth=490pt     %% \marginparwidth=-12pt     %% \marginparsep=-12pt     %% \marginparpush=-12pt     %% \oddsidemargin=-12pt     %% \hoffset=-12pt      and variations. The template used is `\documentclass[a4paper]{article}` Sorry, the choice of tags is somewhat arbitrary - I don't really know where my problem belongs. Feel free to change it.


title: Horizontal line in \moderncvtheme[...]{classic}

text: I have a question about `moderncv`. I want to work with the `moderncv` style `classic`. But I found out, that the theme `casual` produces a horizontal line underneath the name. Is it possible, to get the same line in the `classic` theme? My header:               \documentclass[11pt,a4paper]{moderncv}          \usepackage[latin1]{inputenc}                       \usepackage[ngerman]{babel}     \usepackage[T1]{fontenc}     \usepackage{lmodern}          \moderncvtheme[red]{classic}                          \usepackage[scale=0.8]{geometry}     \AtBeginDocument{\recomputelengths}        Then there is the personal information, ...


title: How do I modify the gnuplottex.sty file to write a hash character (#) into the plot file?

text: I have problems with adapting a .sty file for my needs. The problems are caused by the special meaning of the hash character # in tex (and also my ineptitude). To the problem: An unmodified "gnuplottex.sty" file from the **gnuplottex** package reads in part like this:               \def\figname{\jobname-gnuplottex-fig\thefignum}          \def\gnuplotverbatimwrite#1{%         \def\BeforeStream         {\message{Opening gnuplot stream #1}%             \immediate\write\verbatim@out{\string !/usr/bin/gnuplot -p}             \immediate\write\verbatim@out{\string set terminal \gnuplotterminal \gnuplotterminaloptions}     \immediate\write\verbatim@out{\string set output '\figname.\gnuplottexextension{\gnuplotterminal}'}         }      The **package writes a file** that might be named `test-gnuplottex- fig1.gnuplot`. The quoted lines in the .sty file in particular are responsible for the following content of the of this file:               set terminal tikz     set output 'test-gnuplottex-fig1.tex'      I **would like the file to read** :               #!/usr/bin/gnuplot -p     set terminal tikz     set output 'test-gnuplottex-fig1.tex'      But the hash character (#) poses a problem: When I edit the quoted part of `gnuplottex.sty` to read:               \def\figname{\jobname-gnuplottex-fig\thefignum}          \def\gnuplotverbatimwrite#1{%         \def\BeforeStream         {\message{Opening gnuplot stream #1}%             \immediate\write\verbatim@out{\string #!/usr/bin/gnuplot -p}             \immediate\write\verbatim@out{\string set terminal \gnuplotterminal \gnuplotterminaloptions}     \immediate\write\verbatim@out{\string set output '\figname.\gnuplottexextension{\gnuplotterminal}'}         }      It produces the error: > l.89 ... \immediate\write\verbatim@out{\string #! /usr/bin/gnuplot -p} ! > Illegal parameter number in definition of \BeforeStream." If I escape the hash like in `\immediate\write\verbatim@out{\string \\#!/usr/bin/gnuplot -p}` the file has an extra backslash in there instead of really escaping the hash:                \#!/usr/bin/gnuplot -p      set terminal tikz      set output 'test-gnuplottex-fig1.tex'      In this context how do I escape the hash character in the right way for the line to read `#!/usr/bin/gnuplot`?


title: Titlesec: \ifthesection command issue with biblatex refsegment

text: I'm using `titlesec` to set my page style and `biblatex` to print a cumulative bibliography subdivided by chapter. There seems to be some problem with the `\ifthesection` command because in the following MWE the headers in the odd pages of the bibliography should say, for instance, "References Chapter 1" but I'me getting "Bibliography" instead.               \documentclass{book}          \usepackage[pagestyles]{titlesec}       \newpagestyle{main}[\scshape]{%       \headrule       \sethead       [\thepage][][\chaptertitlename\space\thechapter. \chaptertitle]       {\ifthesection{\thesection\space\,\sectiontitle}       {\chaptertitlename\space\thechapter. \chaptertitle}}{}{\thepage}     }     \newpagestyle{special}[\scshape]{%       \headrule       \sethead       [\thepage][][\chaptertitle]       {\ifthesection{\sectiontitle}{\chaptertitle}}{}{\thepage}     }          \usepackage{etoolbox}     \appto{\mainmatter}{\pagestyle{main}}     \appto{\backmatter}{\pagestyle{special}}          \usepackage[refsegment=chapter,backend=bibtex]{biblatex}     \defbibheading{bibbook}[\bibname]{\chapter{#1}}     \defbibheading{subbib}[\refname\space\chaptername\space       \ref*{refsegment:\therefsection\therefsegment}]{%       \setcounter{secnumdepth}{0}%       \section{#1}}     \addbibresource{biblatex-examples.bib}          \usepackage{lipsum}     \usepackage{hyperref}          \begin{document}          \mainmatter     \chapter{Foo}     \lipsum     \section{Baz}      \lipsum     \nocite{*}     \chapter{Bar}     \nocite{*}          \backmatter     \printbibheading[heading=bibbook]     \bibbysegment[heading=subbib]          \end{document}      One workaround is to define a new pagestyle that doesn't use the `\ifthesection` command and do the following in the preamble:               \newpagestyle{bibatend}[\scshape]{%       \headrule       \sethead       [\thepage][][\chaptertitle]       {\sectiontitle}{}{\thepage}     }     \appto{\backmatter}{\pagestyle{bibatend}}      However I would like to use the pagestyle `special` in the backmatter (because I have also an index that doesn't have sections and therefore the heading should always be the chapter title). So my question is: why is the `\ifthesection` command not working properly?


title: How to retain caption without the "Figure" being mentioned?

text: I'm writing a document and I want to keep it simple. Probably there won't be any ToC or any List of figures so below each figure I just want the name of the figure to be mentioned and nothing else. Like: Figure 1.1: bla bla bla without the "Figure 1.1" Is that possible?


title: moderncv - newline within a cventry

text: The information that I want to provide isn't fitting into one line. I am working with \cventry{}{}{}{}... I want to put information into a new line, still positioned to what is in the line above. I tried to put \ or newline into/between the brackets but it was not working. Thanks for the help.


title: Single line beamer slide

text: This probably isn't how beamer is intended to be used. However, I would like to create a beamer slide where:   * there is only a single line in the slide/frame   * the single line is vertically and horizontally centered   * the single line has the exact same style as the frame title I'm using `\usetheme{default}` so there's no magic going on. (The frametitle is just some font in a light blue color.) What is the dumbest way I can achieve this? (I see that there are "title slides" -- but I want many of them, and I don't want the author part. I see also that I can use `\frametitle` in a frame ... but it's stuck at the top of the frame.) I'm looking for something that's equiv to:              \newpage     \vspace*{\fill}     \hspace*{\fill}...\hspace*{\fill}\vspace*{\fill}     \newpage      but in beamer.


title: titlesec: \assignpagestyle problem with part

text: According to the `titlesec` documentation (section 3.5): > You can assign a page style to levels of class top and page, as well as the > default chapter with the following command: > \assignpagestyle{command}{pagestyle} It then states (section 3.9) that > There are three classes: page is like the book \part, in a single page, top > is like \chapter ... However using `\assignpagestyle` with `\part` doesn't seem to work:               \documentclass{book}          \usepackage[pagestyles]{titlesec}       \assignpagestyle{\part}{empty}     % Doesn't work     \assignpagestyle{\chapter}{empty}  % Works          \begin{document}          \part{Bar}     \chapter{Foo}          \end{document}      I know I can change the `\part` and `\chapter` pagestyles doing the following in the preamble               \usepackage{etoolbox}     \patchcmd{\part}{plain}{empty}{}{}     \patchcmd{\chapter}{plain}{empty}{}{}      but since I'm using the `titlesec` package for my headers I wanted to simply use the `\assignpagestyle` command.


title: How do I draw lines that end with an ellipsis?

text: What's the easiest way to draw lines in Tikz with one or both ends continuing as ... to signify that they continue to infinity? Can I define a arrowhead with an ellipsis?


title: Check if a string contains a given character

text: I want to implement an if-then-else depending on whether the argument contains a special character or not. Should I be looking here: http://www.tug.org/TUGboat/Articles/tb28-1/tb88glister.pdf, or does anyone know a simpler way?


title: Using a caption label as a title

text: I have done some searching but not had much luck. I would like to be able to see and use the label of my caption as a 'title' for the caption text. An example:               \documentclass[11pt]{article}     \usepackage{textcomp}     \usepackage{graphicx}     \usepackage{relsize}     \usepackage{tabu}     \usepackage{booktabs}          \usepackage[     justification=justified,     labelfont=bf,     textfont=small,     textfont=it,     labelsep=newline]{caption}               \begin{document}          \listoftables          \begin{table}     \centering     \footnotesize          \sffamily{          \begin{tabu} to      \textwidth {lrl}     \toprule     &    15,639 patients \\     \midrule     Age (yrs)&     70.0&(18.0--104.0)\\     Male sex&    8,113&(51.9)\\     CCMDS Level of Care&&\\     \hspace*{1em}\smaller[1]{High dependency}&    2,708&(17.3)\\     Nursing observations&&\\     \hspace*{1em}\smaller[1]{Continuous monitoring}&    4,497&(28.8)\\     \hspace*{1em}\smaller[1]{Up to 4 hrly (inclusive)}&    7,435&(47.5)\\     \hspace*{1em}\smaller[1]{Less frequently than 12 hrly}&    2,080&(13.3)\\     Delayed referral to critical care&    2,012&(12.9)\\     Reported sepsis diagnosis&&\\     \hspace*{1em}\smaller[1]{Likely}&    5,741&(36.7)\\     \hspace*{1em}\smaller[1]{Unlikely}&    4,232&(27.1)\\     \bottomrule     \end{tabu}           }           \caption[Baseline characteristics]{All study patients. Numbers are mean(SD), or median(IQR)}          \label{baseline_pt_chars}      \normalfont     \end{table}     \end{document}               \usepackage[labelfont=bf]{caption}     \begin{table}     ... table code here ....     \caption[Baseline characteristics]{All study patients. Numbers are mean(SD), or median(IQR)}      \end{table}      And for this to be formatted as **Table 1: Baseline characteristics** All study patients. Numbers are mean(SD), or median(IQR) Is this possible? Or should I just manually code all the formatting outside of the caption but inside the `float` environment ... which would mean writing the label twice (once for the caption and the list of tables, and once inside the `float` environment)? I hope the question is clear?


title: Right curly bracket around text

text: The following code will produce some text enclosed by a right curly bracket and to the right of it some other text saying that is the same meaning. Now, I would like to have the text aligned to the left and with the same font as the one outside the bracket. How can I do that? I red a lot but the solution is still far.               \begin{document}     \section{TITLE}     SUBTITLE     Line1, some text.\\     $\left.\begin{matrix}     - some text some text some text some text\\     - some text some text some text some text some text\\     - some text some text\\     \end{matrix}\right\}$     they are the same


title: Error message using dot2texi

text: When compiling the document below with pdflatex:               \documentclass{article}     \usepackage{dot2texi}     \usepackage{tikz}     \usetikzlibrary{shapes,arrows}          \begin{document}          \begin{figure}     \centering     \begin{tikzpicture}[>=latex',scale=0.8]         % set node style         \tikzstyle{n} = [draw,shape=circle,minimum size=2em, inner sep=0pt,fill=blue!20]         \begin{dot2tex}[dot,tikz,codeonly,styleonly,options=-s -tmath]         digraph G {             rankdir = LR;             node [style="n"];             a -> b   [label="1", topath="out=45,in=135"];             b -> c   [label="2", topath="out=90,in=135"];             b -> a   [label="6", topath="out=-135,in=-45"];         }         \end{dot2tex}     \end{tikzpicture}     \caption{\label{fig:myfig} Some graph}     \end{figure}          \end{document}      I get the following output: > Process started > > ERROR Failed to create xdotdata. Is Graphviz installed? > > ERROR Failed to parse the input data. Is it a valid dot file? Try to input > xdotdata directly. [...] However, the resulting PDF file looks just fine. Any clues what might be incorrectly configured? Versions are Windows 7, Graphviz 2.30, MiKTeX 2.9, dot2tex 2.8.7.


title: Package "preview" + parskip?

text: Using the "preview"-package, I want to put several paragraphs into one preview-environment. This works; however, any parskip-setting seems to be ignored.               \documentclass{minimal}     \setlength\parskip{10pt}     \usepackage{blindtext}     \usepackage[active,tightpage]{preview}          \begin{document}     \begin{preview}     \blindtext          \blindtext     \end{preview}     \end{document}      In the result, there is no parskip between the two paragraphs.


title: Is there a way to use ebgaramond with lining numbers (as default) in pdflatex?

text: Is there a way to use `ebgaramond` with _lining numbers_ as default in `pdflatex`?


title: amsmath's intertext and labeling

text: I have an align environement with intertext:               \usepackage{amsmath,mathtools}     \begin{align*}     x&=f(z)\cos\alpha\\     y&=f(z)\sin\alpha     \shortintertext{with}     f(z)&=\ldots     \end{align*}      However I want a label, centered between the first two equations. So something like this:               \begin{equation}\label{eq:test}     \begin{aligned}     x&=f(z)\cos\alpha\\     y&=f(z)\sin\alpha     \end{aligned}     \end{equation}     with     \begin{equation*}     f(z)=\ldots     \end{equation*}      This allows labeling as I want it, but the third equation is not aligned anymore. Any ideas on how to solve this?


title: Line break (continuation) for commands (options, arguments)

text: How to do proper line breaking (continuation) for commands, i.e. their options and/or their arguments? For example, in order to transform this:               \usepackage[top=1.0cm, bottom=1.0cm, left=1.0cm, right=1.0cm, includehead, includefoot]{geometry}      Into this:               \usepackage[top=1.0cm,                  bottom=1.0cm,                 left=1.0cm,                 right=1.0cm,                 includehead,                 includefoot]{geometry}


title: Drawing 3D crystal lattice with tikz/pstricks

text: I need to draw 3D lattice of DO3 type (Ni-Mn-Al, DO3) and more complex ones. Both TiKZ and PSTricks packages draw following objects on top of previously drawn disregarding "real" 3D position. For example, on this picture 2 red atoms on the right cover white ones, when they shouldn't.               \documentclass[tikz]{standalone}     \begin{document}     \begin{tikzpicture}[->]     \draw (0,0) -- (4,0,0);     \draw (0,0) -- (0,4,0);     \draw (0,0) -- (0,0,4);     \foreach \x in {1,2,3}     \foreach \y in {1,2,3}     \foreach \z in {1,2,3}             \draw (\x,\y,\z) circle (2pt);     \foreach \x in {1.5,2.5}     \foreach \y in {1.5,2.5}     \foreach \z in {1,2,3}             \draw[gray,very thin] (\x,\y,\z) +(-.5,-.5) rectangle ++(.5,.5);     \foreach \x in {1,2,3}             \draw (\x,1,1) -- (\x,1,3) (\x,2,1) -- (\x,2,3) (\x,3,1) -- (\x,3,3)  ;          \foreach \x in {1.5,2.5}     \foreach \y in {1.5,2.5}     \foreach \z in {1.5,2.5}             \filldraw[red] (\x,\y,\z) circle (2pt);     \end{tikzpicture}     \end{document}      It is possible, to obtain right behavior with layers or certain order of the drawing. However for complex lattices it is very difficult and depends on view angle.


title: \vbox with some extra space below

text: I don't understand why when using `\vbox` of a certain height, there is some extra space added below it. I'm trying - towards grid typesetting - to put for example graphics in the vbox of a certain height (say `2 \baselineskip`), so the picture should occupy the multiplicity of `\baselineskip`. However, it fails, since some extra space is added below the `\vbox`. Why? I've tried to use `\nointerlineskip` after the `\vbox`, but no result. I'm aware of the post How can I get interline spacing to ignore a vbox? , but it does not help me. There is a MWE below, I include some rulers to more easily clarify the problem:               \documentclass[11pt]{article}       \usepackage{lipsum}     %%% rulers     \usepackage{atbegshi,picture}     \makeatletter      \AtBeginShipout{%     \AtBeginShipoutUpperLeft{%       \put(\dimexpr         \ifodd\value{page}\oddsidemargin\else\evensidemargin\fi + 1in\relax,           -\dimexpr\topmargin + 1in + \headheight + \headsep\relax){%            \begin{picture}(0,0)%            \setlength{\unitlength}{13bp}%             \setlength{\dimen0 }{0pt}%             \@whiledim\dimen0<\dimexpr\textheight+1sp\relax\do{%             \put(0,-\dimen0){\line(1,0){\textwidth}}%             \addtolength{\dimen0 }{\unitlength}%           }%        \end{picture}%       }%      }%     }     \makeatother      \makeatletter      \setlength{\topskip}{13bp}      \renewcommand\normalsize{%       % \baselineskip to 13bp for \normalsize       \@setfontsize\normalsize\@xipt{13bp}%       % the following values are taken from size11.clo.       \abovedisplayskip 11\p@ \@plus3\p@ \@minus6\p@        \abovedisplayshortskip \z@ \@plus3\p@        \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@        \belowdisplayskip \abovedisplayskip        \let\@listi\@listI         }        \usepackage{parskip}        \setlength{\parskip}{13bp}        \makeatother       \begin{document}       \lipsum[1]       \vbox to 2\baselineskip{ }        \lipsum[1]        \end{document}


title: Drawing Hex Boards

text: I need to draw a Hex board. I would like to be able to mark each hexagon and mark the size. Being able to control the thickness of the lines would be nice, but it is not something I need to have. Could anyone suggest a simple way of doing this? Here is a picture of what I had in mind: ![http://i.imgur.com/VUkqMYE.png](http://i.stack.imgur.com/Oglk4.png) **EDIT:** Cmhughes brought up some pointers on making this post better, so here it goes! I have found very little material to help me through this. However, I found this on the stackexchange forum. I have tried modifying the code (from the first answer) to fit my needs (as shown in the picture), but every time I change something the graph does some very weird things, like creating a large line of hexagons in what appears to be a random direction. My problem, then, is that I have no idea how I would modify the code to make it a Hex board, rather than a Hex map. This is the code I am referring to:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{shapes}          \begin{document}       \begin{tikzpicture}[         hexa/.style={            shape=regular polygon,           regular polygon sides=6,           minimum size=1cm,           draw,           inner sep=0,           anchor=south,           fill=lightgray!85!blue,           rotate=30         }       ]         \foreach \j in {0,...,5}{%           \pgfmathsetmacro\end{5+\j}            \foreach \i in {0,...,\end}{%             \node[hexa] (h\i;\j) at ({(\i-\j/2)*sin(60)},{\j*0.75}) {};           }         }         \foreach \j in {0,...,4}{%           \pgfmathsetmacro\end{9-\j}            \foreach \i in {0,...,\end}{%             \pgfmathtruncatemacro\k{\j+6}               \node[hexa] (h\i;\k) at ({(\i+\j/2-2)*sin(60)},{4.5+\j*0.75}) {};           }         }         \foreach \k in {0,...,10} {%           \node[circle,red,minimum size=1cm] at (h3;\k) {3;\k};         }         \foreach \k in {0,...,10} {%           \node[circle,blue,minimum size=1cm] at (h1;\k) {1;\k};         }       \end{tikzpicture}     \end{document}      Does anyone have any pointers on how to modify the code? Further, does anyone know how to mark the sides, like in the picture, and how to create a random-looking marking of the hexagons (although I this may have to simply be a lot of copying and pasting)?


title: start section numbering with 0 not 1 LaTex article class

text: In my thesis, my examiners need the section numbering to start with 0 and not from 1. The structure is somewhat like               \documentclass[12pt]{report}          \begin{document}     \chapter{First}     \section{first section}          \subsection{subsection}          \end{document}      which gives me result as > Chapter 1 > > First > > 1.1 first section > > 1.1.1 subsection instead of this I need > Chapter 1 > > First > > 1.0 first section > > 1.0.1 subsection I tried using               \setcounter{section}{-1}      before               \begin{document}      but no success.


title: Typeset an author without affiliation with authblk

text: I'm currently using authblk to typeset authors and corresponding affiliation(s) in a proceeding article, one of the authors has no affiliation. Commands are the following:               \author[*]{Name1}     \author[**]{Name2}     \author{Name3}          \affil[*]{Dept #1}     \affil[**]{Dept #1}      However, the package does not recognize that `Name3` has no affiliation, and it's typeset like it's affiliated with `Dept #1`. How should I modify the autlblk package to overcome this?


title: Resources for learning about contributed packages

text: The "LaTeX2e Reference Manual" contains a lot of useful information about various commands. Is there any larger resource or book containing similar shorts descriptions of commands, but that also includes macros and options provided by various contributed packages?


title: How do I do table alignment?

text: I have the following code:               \section{Database Design}          \begin{center}     \begin{table}         \begin{tabular}{ | l |  l |}         \hline         Field & Type \\ \hline         id & Primary key \\ \hline         firstName & String \\ \hline         lastName & String \\ \hline         email & String \\ \hline         password & String \\ \hline         \end{tabular}     \caption{User}     \end{table}     \end{center}      There are a few alignment problems:   1. The table seems to be floating top left above my section   2. My caption is centered and out of line with the table How can I center my table and have it placed below my 'Database Design' section?


title: How to create text with shadows?

text: > **This question led to a new package:**   >  `shadowtext` I used the following code:               \documentclass{article}          %\usepackage{pst-all}     \usepackage{pstricks}     \usepackage{pst-3d,pst-text}     \usepackage{soul}          \begin{document}          \pscharpath[        shadow=true,        shadowsize=5pt,        shadowangle=-40,        shadowcolor=blue,        fillstyle=solid,        fillcolor=black,        linestyle=none,        linecolor=black,        linewidth=0pt]{\Huge SHADOW TEXT}          \end{document}      Problem is, there doesn't appear any shadow next to the text. Any idea how to setup shadows to a string on a way that really works?


title: List of all post original TeX control commands

text: Is there a well documented list of all control commands added by all post Knuth's Tex like PdfTeX, e-TeX, XeTex, LuaTeX?


title: Regarding bar chart with text as x axis labels

text: I have seen the previous posts regarding "bar chart with text as x axis labels". I tried to use the same code discussed in the posts and in the documentation,               \begin{tikzpicture}     \begin{axis}[symbolic x coords={a,b,c,d,e,f,g,h,i}]     \addplot+[smooth] coordinates {     (a,42)     (b,50)     (c,80)     (f,60)     (g,62)     (i,90)};     \end{axis}     \end{tikzpicture}      Unfortunately i did get the required result. I am using ubuntu Mevrick. Could any one guide me how i can plat the bar graphs having x axis labels


title: When I prevent hyphenation using an \mbox, the box gets pushed into the right margin

text: I've used \mbox to prevent LaTeX from breaking certain long words into hyphenated pairs. Now I have a new problem: the unbroken words are extending into the right margin. Here's some minimal sample code that reproduces my problem:               \documentclass[12pt,draft,letterpaper]{report}     \setlength{\textwidth}{5.8in}          \begin{document}       We summarize our method in algorithm 1. The functions \mbox{``Update''}       and \mbox{``BatchUpdate''} implement single and multi-constraint updates       as described above, using interpolated solving to solve for no more than       $D_{max}$ nodes at a time. The \mbox{``GetUpstreamGPSes($b$, $n$)''}       function crawls up the tree from node $b$, and returns the first $n$ GPS       edges along that path.     \end{document}      When I compile this with pdflatex, the `"BatchUpdate"` and `"GetUpstreamGPSes(b, n)"` function names get pushed into to right margin. I wanted them to get moved to the next line. How can I prevent particular words from being broken across lines, while preventing them from extending into the right margin?


title: How can I change font in pdf forms?

text: I'm making a pdf form with "hyperref" package:               \usepackage[unicode,pdftex,hidelinks]{hyperref}     \hypersetup{unicode=true,pdfauthor={Author},pdfkeywords={some words},         pdftitle={some title},pdfborder={0 0 0}         }     \def\dflt{print,borderwidth=0,bordercolor={1 1 1},charsize=14pt}     \xdef\DefaultOptionsofPushButton{\dflt}     \xdef\DefaultOptionsofCheckBox{radiosymbol=\noexpand\ding{52},\dflt}     \xdef\DefaultOptionsofText{\dflt}     \xdef\DefaultOptionsofListBox{\dflt}     \xdef\DefaultOptionsofComboBox{edit,sort,\dflt}     \xdef\DefaultOptionsofPopdownBox{\dflt}     \xdef\DefaultOptionsofRadio{radiosymbol=\noexpand\ding{52},notoggletooff,\dflt}          \begin{document}          \section{\LaTeX forms}     \subsection{Information:}     \begin{Form}     \TextField[name=sname,width=3cm]{First name:}     \TextField[name=fname,width=3cm,borderwidth=0]{Last name:},     …     \end{Form}     \end{document}      Both in latex with utf8x and in xelatex with "Liberation Serif" I get wrong results: text in forms is something like "Sans" and it is obviously differs from other text. **Q1** : can I change font properties to make forms looks like other text? **Q2** : I have troubles with cyrillic in both evince and okular, in acroread all OK, but this is not good to compel people to install it instead of their usual pdf-reader. Is it possible to create such forms with cyrillic, that would be fillable in okular or evince?


title: Include theorem name from thmtools into mdframed title box

text: mdframed is nice for controlling the outer layout of theorems. thmtools on the other hand can take care of a number of other things great and small, in particular the detailed formatting of the title within the flow of text, but also stuff like maintaining a flexible list of theorems, properly setting autoref names, and so on. I know I can use the `mdframed` key to the `\declaretheorem` command to let it create a frame and control most aspects of that frame. What I'm missing, though, is a way to make use of the `frametitle` facilities of mdframed in this way. **Is there a way to redirect the title typesetting commands fromthmtools into the `frametitle` argument to the `mdframed` environment it creates?** I see that I can add a hook before and a hook after the title, but at least my naive way of capturing the title between these two using `\def\myframetitle\bgroup` and `\egroup` failed:               \documentclass{article}     \usepackage{xcolor,tikz,geometry,amsthm,thmtools}     \usepackage[framemethod=TikZ]{mdframed}     \usepackage{thm-patch}% copied from thmdef-mdframed.sty     \makeatletter     \mdfdefinestyle{fstyle}{linecolor=blue,frametitlerule=true}     % The following was adapted from thmdef-mdframed.sty but does not work:     \define@key{thmdef}{mymdframed}[{}]{%       \thmt@trytwice{}{%         \addtotheorempreheadhook[\thmt@envname]{%           \def\myframetitle\bgroup}%         \addtotheorempostheadhook[\thmt@envname]{%           \egroup\begin{mdframed}[frametitle=\myframetitle,#1]}%         \addtotheorempostfoothook[\thmt@envname]{\end{mdframed}}%         }%     }     % Change the mymdframed to mdframed to make this compile at all:     \declaretheoremstyle[mymdframed={style=fstyle}]{tstyle}     \declaretheorem[style=tstyle]{thm}     \begin{document}     \begin{thm}[Round] The world is round\end{thm}          And this is what it \emph{should} look like:     \begin{mdframed}[frametitle={Thm 1: Round},style=fstyle]     The world is round\end{mdframed}     \end{document}      I'll be happy to learn about _any_ approach to get the two packages working together including the title. There must be _some_ solution, e.g. by defining your own wrapper macros to handle the title argument, but I hope for some more elegant approaches from those who know more.


title: How can I suppress the header for the first page in a chapter

text: I'm trying to implement a macro that begins a chapter. I don't want to use latex or fancyhdr but only plain tex (for pedagogical reasons). The code is the following               \headline={\hfil{\tenrm\folio}\hfil}     \nopagenumbers     % Counters and macros for handling chapters     \newcount\fChapterNumber     \global\fChapterNumber=0     \def\fBeginChapter#1{       % Initialization       \advance\fChapterNumber by 1       % Formatting       \vfill\eject       \hrule height0.7mm       \vskip 5mm       \centerline{\tenrm \noindent Chapter \the\fChapterNumber}       \vskip 18mm       {\tenbf \noindent #1}       \vskip 35mm     }          % DOCUMENT %     \fBeginChapter{Analisis I}     blah, blah, blah, blah,...     \vfill\eject     blah, blah, blah, blah,...     \bye      As you can see the header will be printed in both pages, but I want it not to be printed in the first page of the chapter. I've been thinking and looking in the web unsuccessfully. What is the best way to do this?


title: Checking for a matching entry within a file

text: I have a file containing a list, like this:               apple     orange     pear     pineapple      How can I create a macro which checks if an item is on that list. E.g.:   * `\isfruit{pear}` returns "1".   * `\isfruit{carrot}` returns "0".


title: emacs / AuCTeX and itemize

text: I am having an issue with my newline's within itemized lists in AucTex mode of Emacs. If I do, `C-c C-e RET itemize RET`, I expect the following               \begin{itemize}        \item      \end{itemize}      but instead get               \begin{itemize}\item      \end{itemize}      Additionally, when I do `C-c C-j` at the end of an item, it just gives me a new `\item` without putting me on an new line. So, `C-h k C-c C-j` reveals               C-c C-j runs the command LaTeX-insert-item, which is an interactive     compiled Lisp function in `latex.el'.          It is bound to C-c C-j, M-RET, <menu-bar> <LaTeX> <Item>.          (LaTeX-insert-item)          Insert a new item in an environment.     You may use `LaTeX-item-list' to change the routines used to insert the item.      So, it seems that my LaTeX-insert-item is somehow broken? How can I recover the correct `C-c C-j` behaviour?


title: Polynomial Long Division over GF(p)

text: Is there a package like polynom for typesetting polynomial long division but over a finite field such as GF(2). If not, how to manually typeset long division in general? Thanks. Addendum: I attempted the following solution! However, the vertical spacing between each line and exponents of the equation below it is quite small, how to increase it? I tried \vspace but received errors. Thanks. ![](http://i.stack.imgur.com/u11Ow.jpg)               \[     \begin{array}{m{3.5em}ccccccccc}     &    &    &    &    &+x^4&+x^3&    &  &+1\\     \cline{2-10}     \multicolumn{2}{l}{x^3+x+1\big)}          &+x^7&+x^6&+x^5&    &    &+x^2&+x&  \\     &    &+x^7&    &+x^5&+x^4&    &    &  &  \\     \cline{3-6}     &    &    &+x^6&    &+x^4&    &    &  &  \\     &    &    &+x^6&    &+x^4&+x^3&    &  &  \\     \cline{4-7}     &    &    &    &    &    &+x^3&+x^2&+x&  \\     &    &    &    &    &    &+x^3&    &+x&+1\\     \cline{7-10}     &    &    &    &    &    &    &+x^2&  &+1\\     \end{array}     \]


title: Beamer: Hide Backup Slides from Navigation Panel

text: I have some slides, which are not part of the main presentation, but can be shown if the audience asks some questions and I have put theses slides at the end of my presentation. I am using the Frankfurt theme, which adds navigation circles for each slide under the section titles. The problem is, that the backup slides also show up as navigation circles. How can I get rid of the bullets for these slides only? Normally I could only get the navigation circles to be shown, if I added a subsection before the slide which I wanted a circle for, but lately the circles are added for every slide regardless of the definition of a subsection.


title: Automatic table row numbers

text: Is there any way to get automatic row numbers in table? For example, if I define table contents as               \begin{tabular} % black magic column definition        \rownumber & foo\\        \rownumber & bar\\        \rownumber & baz\\     \end{tabular}      and get something like               1 | foo     2 | bar     3 | baz


title: Alignment problem in resume

text: This question uses the suggestions given here. I am formatting my resume for which the following in a basic construct (minimum working example):               \documentclass[letterpaper,9pt]{article}     \newlength{\outerbordwidth}     \usepackage[empty]{fullpage}     \usepackage{color}     \usepackage{hyperref}     \definecolor{mygrey}{gray}{0.85}     \raggedbottom     \raggedright     \setlength{\tabcolsep}{0in}     \usepackage{tabularx}          \setlength{\paperwidth}{8.5in}     \setlength{\hoffset}{3pt}     \addtolength{\oddsidemargin}{-0.6in}     \addtolength{\topmargin}{-.7in}     \addtolength{\textheight}{1.0in}     \setlength{\textwidth}{7.488in}          \newcommand{\resitem}[1]{\item #1 \vspace{-3pt} }     \newcommand{\resheading}[1]{{\colorbox{mygrey}{\begin{minipage}{\textwidth}   {\textbf{#1 \vphantom{p\^{e}}}}\end{minipage}}} \vspace{2pt}}     \newcommand{\ressubheading}[4]{%     \item \vspace{-.2cm} \textbf{#1} \hfill #2\null\\     #3 \hfill #4%     \vspace{-0.2cm}}          \begin{document}          \begin{center}     \textbf{\LARGE Rohit Bahl}     \end{center}     \begin{tabular*}{7in}{l@{\extracolsep{3.95in}}l}     My Address Comes Here, Apt \#x& \hfill Phone: 215-xxx-xxxx \\     City, State & \hfill Email: \href{mailto:rbahl@xxxx.edu}{rbahl@xxxx.edu}  \\     \end{tabular*}     \\     \vspace{0.1cm}          \resheading{Education}     \vspace{-.35cm}          \begin{itemize}     \ressubheading{Name of Grad School}{City}{Major}{2010 -- 2012}     \begin{itemize}         \resitem{\textbf{Major}: }         \resitem{\textbf{Research Focus}}:                   \resitem{\textbf{Courses}}:                  \resitem{\textbf{GPA}: x.xx/4.00}     \end{itemize}          \ressubheading{Undergrad College }{City}{Bachelor of Technology in Electronics and Communication}{2005 -- 2009}      \end{itemize}     \end{document}      The issue is, although I have tried to align everything on the right side but its always off the mark. As demonstrated in the figure, the credentials and personal information on the right side (city/phone/email/year etc) are not aligning with the title box (Education):![example](http://i.stack.imgur.com/B5MqX.jpg) What is the best method to do this automatically ? Thanks for your suggestions ! Note: I am modifying the basic template provided by David Grant here according to my own preferences.


title: Parentheses differ (XeLaTeX, fontspec, newtxmath, libertine)

text: After Internal error: bad native font flag I stumbled upon another weird problem with the combination XeLaTeX/fontspec/Libertine/newtxmath:               \documentclass{scrartcl}     \usepackage[no-math]{fontspec}     \usepackage{libertineotf}     \usepackage{amsmath}     \usepackage[libertine]{newtxmath}          \begin{document}         \begin{equation}                   ( \frac{1}{1}       )              \left( \frac{1}{2} \right)              \bigl( \frac{1}{3}  \bigr)              \Bigl( \frac{1}{4}  \Bigr)             \biggl( \frac{1}{5} \biggr)             \Biggl( \frac{1}{6} \Biggr)         \end{equation}     \end{document}      The up-scaled result is:   ![](http://img225.imageshack.us/img225/5576/bracketsv.png) It seems to me that the Libertine font is used for `(` and and CM for `)`.   Compare the closing parentheses from the above image to the following where the `fontspec` package was not used:   ![](http://img94.imageshack.us/img94/2015/brackets2.png)   The parentheses have the correct size but again CM is used for the numbers.   pdfLaTeX and the `libertine` package produce the same output as XeLaTeX without fontspec.


title: Overbrace is not alligned correctly

text: Here is an equation:               \documentclass[a4paper,10pt]{report}     \usepackage{xltxtra}      \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{array}       \usepackage{unicode-math}                    \setmainfont{XITS}     \setmathfont{XITS Math}          \begin{document}          Hello world     \begin{equation}     \overbrace{     \left[     \begin{array}{c}     x \\     y \\     w \\     \end{array}     \right]}^q =     \overbrace{     \left[     \begin{array}{c c c}     f_x & 0 & c_x \\     0 & f_y & c_y \\     0 & 0 & 1 \\     \end{array}     \right]     }^M     \cdot     \overbrace{     \left[     \begin{array}{c}     X \\     Y \\     Z \\     \end{array} \right]}^Q     \end{equation}          \end{document}      The thing is that the overbraces are not equally aligned vertically as you can clearly see. ![enter image description here](http://i.stack.imgur.com/gfQpL.png)


title: eqnarray and cases

text: I have quite a strange tex style from the conference. Everything is fine, but the following code does not work here:               \begin{eqnarray}     a = \begin{cases} 1 \\                       2     \end{cases}     \end{eqnarray}      does not seem to work here in conjunction with `eqnarray`, which is also required. Is it possible to mimic the behaviour of cases in this `case`?


title: Alphabetic order in bibliography with natbib package and author-less entries

text: i'm new, so I hope to do everything correctly :D My question is fairly simple: I've the natbib package loaded in a document, and some bibliography entries have no author. Those entries are put at the beginning of the bibliography, creating a somehow bad effect on the reader (at a first glance to the bib first page is not possible to tell the order in which the entries are presented). Question is: how do I change it? What I've tried so far:   * the "key" field: it doesn't work. The following image presents what happens if I set "key={zzzzz}" for a bibliography entry with no author: ![enter image description here](http://i.stack.imgur.com/utByW.png) A working example:               \documentclass[a4paper]{report}          \usepackage{natbib}          \begin{document}          \title{Title}     \author{Name}     \date{Date}          \maketitle          Blah Blah \citet{aida}          \bibliographystyle{plainnat}     \bibliography{thesisbib}          \end{document}      with:               @ELECTRONIC{aida,       year = {2011-2012},       title = {Aida database},       organization = {Bureau Van Dijk},       url = {http://aida.bvdep.com},       key = {zzzzzz}     }      thanks!


title: How to add a pagenumber of included PDF sides?

text: I'm creating a documentation with some included pdf files (mostly diagrams or tables) in the following way.                \includepdf[pages=1-10, angle=90]{requirements/Requirements.pdf}      The command "includepdf" is supported by the package "pdfpages". My problem now is all of the included pdf pages don't have any page numbers, except for page numbers which where directly in the PDF's itself. Is it possible to print them? Or is there any other way to include a PDF, show it on the full page and print a page number?


title: How to use the width of some text in \dim_compare:nTF directly?

text: Is it possible to use the width of some text directly inside of a `<dimension expression>`. I found this way using a temporary box but it seems not very elegant …               \documentclass{article}          \usepackage{xparse}     \ExplSyntaxOn          % generate the new box     \box_new:N \tmp_box          % a dummy command to test     \NewDocumentCommand{ \getwidth }{ m }      {       % save argument to the box       \hbox_set:Nn \tmp_box { #1 }       % measure the box width       \dim_compare:nTF { \box_wd:N \tmp_box < 10pt }        { \textbf{smaller}~than~10pt }% do something cooler here        { \textbf{greater}~than~10pt }% do somthing even cooler here      }          \ExplSyntaxOff          \begin{document}     The width of \emph{word} is \getwidth{word}.          The width of \emph{i} is \getwidth{i}.     \end{document}      I want to skip the `\hbox_set:Nn\tmp_box{#1}` line and use something like `\box_wd:n{#1}` but creating this variant didn’t work …


title: How can you change \mathbb characters to the old version?

text: If you look at older documents the `\mathbb` characters appear different. For example they are sans serif. I don't know how I can use that set of characters instead of the current default. If you are not sure what version I am talking about load the package fourier and then use `\mathbb{C}` for example to see the difference. No other package beside fourier does that and I want to know how to do it with other packages.


title: Copyright disclaimer as a footnote at bottom of first page

text: I am writing a scientific paper and I am having difficulty adding a "copyright" footer on the first page. I am currently having a paper which looks like this (from howtotex.com): ![enter image description here](http://i.stack.imgur.com/t4jLV.png) (Link to template) I altered it a little bit, so far no problems. However I want to have a little text above the "1template by howtotex.com" which is needed for the journal I am writing for. In this text information like where it was presented and a copyright disclaimer is added. So in between the black line and the "1template from howtotex.com" and without a number in front of it. I have no clue how to do that, any help would be really appreciated!


title: Symbol for Phone Number in Resume

text: I've chosen to create my resume in LaTeX ( out of curiosity ). I thought printing a "clean" symbol of a phone before my phone_no will look nice ... Is there such a symbol? any packages?


title: Tool for manipulating LaTeX tables (HTML to LaTeX)

text: I am wondering if there is any tool that can help me work with tables in LaTeX. Specifically I'd like to be able to import HTML tables (or small Excel tables) into LateX Are there tools that can help me do that painlessly?


title: l3prop - getting an entry inside a macro fails

text: I the following example I defined two new macros `\UseLength` and `\xUseLength`. Both macros shall put back the stored value of the key in the input stream. The macro `\UseLength` works as expected. The second one first tests if the key exists. However if I use the macro `\xUseLength` I get the flaw:               ! Missing number, treated as zero.     <to be read again>                         \tex_long:D      l.30 foo \hspace{\xUseLength{dim}{width}}                                               bar       Why does the example fail? Here the MWE:               \documentclass{article}     \usepackage{xparse,}     \ExplSyntaxOn     \prop_new:N \l_md_dim_prop     \prop_new:N \l_md_skip_prop          \prop_put:Nnx \l_md_dim_prop { width } { 2cm }     \prop_put:Nnx \l_md_skip_prop { above } { 1cm~plus~0.2cm }     \NewDocumentCommand \UseLength { m m }      {        \prop_get:cn { l_md_#1_prop } { #2}      }     \NewDocumentCommand \xUseLength { m m }      {           \prop_get:cnNTF           { l_md_#1_prop } { #2 }           \l_tmpa_tl           { \tl_use:N \l_tmpa_tl }           {\msg_term:n {no~entry~in~prop}~1cm }      }          \ExplSyntaxOff          \begin{document}     foo \hspace{\UseLength{dim}{width}} bar               %foo \hspace{\xUseLength{dim}{width}} bar     \end{document}


What is the common approach to include pictures/figures from pdf files or other sources? My approach is to save the graphic as a jpg. Afterwards I include it into a Power Point and safe it from PP to a png. This is my approach to keep all figures the same size and resolution. Unfortunately, these pictures have a bad resolution. What is a more elegant and better way to do it?


title: Convert all \subsection to \subsection*

text: I want all of my `\subsection` behave like `\subsection*` Instead of adding `*` everywhere, I like to add a few lines in the preamble. What should I do? Can I just `\renewcommand`?


title: How to show < and > correctly in output?

text: I am trying to write some XML tags as part of my text but I can not get the < and > symbols to come out right in the output. What am I missing? I have tried both `<tag>` and `\<tag\>`, the former results in `¡tag¿` and the later in error messages. The document class is `report` and the environment is `document`.


title: any books on ConText?

text: I am not able to find any books on Context on amazon. While I see many books on Latex. But I read elsewhere that Context is a good system, so I wanted to learn it by reading a book about it. How does one learn it if there are no books on it? What do you recommend to read to learn Context for someone who never used it before?


title: Installing MiKTeX 2.9 on Windows 8

text: I'm about to have my students use LaTeX. I'm a Mac user, so a simple install of MacTeX is very straightforward. I'm concerned about students installing MiKTeX on Windows 8 as the system requirements on miktex.org say: > MiKTeX 2.9 requires one of the following Windows operating systems: > > Windows 7 > > Windows Vista with Service Pack 2 (all editions except Starter Edition) > > Windows XP with Service Pack 3 (all editions except Starter Edition) So, OK to install on Windows 8? Any Windows 8 users out there using MiKTeX 2.9 successfully? If so, any installation suggestions I can share with my students?


title: Is there a better way to reference something at the end of a block of text?

text: I have a situation where I want to comment on something at the end of a block of text, rather then as a footnote:![The statblock I am formatting](http://i.stack.imgur.com/L1uoV.png) I've done this by leaving as the origional author did, with a * after Language: Any, and a * before Gailteach, but I'm wondering if there is a better, more LaTeXy way of doing this, as this seems very...ugly, codewise. It also doesn't link the two points together in anyway, though I could do that manually with Hyperref if the suggested solution doesn't have that built in. Here is a MWE of what I've done:               %Page layout here     \documentclass[letterpaper, 12pt]{article}     \usepackage[left= 2.2 cm, right=2.2 cm, top = 2.2 cm, bottom = 2.2 cm]{geometry}          %Font stuff here     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}                 \usepackage[]{venturis}          %Goddamn tables.     \usepackage{booktabs}                          %Makes the pretty table based on wikibooks example          %Load last stuff.     \usepackage{hyperref}                          %Adds a PDF index & makes links clickable: LOAD LAST                    \begin{document}     {\small     \noindent\textbf{Morph:} Menton\\     \textbf{Skills:} Academics: Linguistics 85, Academics: Neurolinguistics 80, Art: Logograms 50,     Interests: Accents 60, Interests: Dialects 75, Interests: Synthetic Languages 80, Interests:     Xenolinguistics 80, Interfacing 50, Investigation 50, Language: Native Gaelic 95,     Language: Any*, Networking: Firewall 25, Networking: Scientists 25, Profession:     Interpreter 75 Profession: Linguist: 80, Profession: Teacher 60, Profession: Translator 65,     Research 77\\     \textbf{Implants:} Basic Biomods, Basic Mesh Inserts, Cortical Stack, Eidetic Memory, Hyper-Linguist, Math Boost, Multi-tasking, Oracles\\     \textbf{Traits:} Fast Learner, Mental Disorder (Severe phobia of psychosurgery), Neural Damage (Amnesia, Blackouts)\\     *Gailteach knows hundreds of human languages and dialects; common languages (Arabic, English, French, Hindi, Japanese, Mandarin, etc.) have a typical rating of 75;      uncommon languages 60, and synthetic \& obscure languages (Esperanto, Klingon, Sumerian, \&c.) 50.     }          \end{document}      I'm sure I want this at the end of the statblock, not as a footnote, which may be less typographically correct, makes it much easier for the gamemaster to reference during play.


title: Less aggressive automatic paren stretching with \left

text: `\left` and `\right` are convenient but sometimes they're a bit overeager in stretching the parentheses. In that case we can manually use `\bigl`, `\Bigl`, etc. I have defined a new command like this               \newcommand{\avg}[1]{\ensuremath{\left\langle #1 \right\ranlge}}      I would like this command to have automatic stretching, but I don't want this mechanism to kick in too early. With this definition, `\avg{x^2}` already has bigger brackets than `\avg{x}`. I would prefer not to use stretching at this level at all. I would, however, like it to use stretching for `\avg{\frac{x}{2}}` in display mode. Something like this would be nice: 1. don't stretch at all in inline math 2. do stretch as normal above a certain size threshold in display math, but not below this threshold. Is there an _easy_ way to implement this? Perhaps it's less trouble to use `\left\langle ... \right\rangle` manually when I really need stretching.


title: \newtheorem other language

text: I've worked in my article with the next code in my preambule:               \usepackage[dutch]{babel}      \usepackage[amsthm,thmmarks]{ntheorem}     \newtheorem{diver}{Theorem}     \newtheorem{ex}{Example}     \newtheorem{noet3}{Theorem}      But I would like if Example and Theorem is in another language, but with `babel` that doesn't work. Can somebody help me?


title: \pgfplotstabletypeset heatmap: logarithmic scale

text: I am trying to create my own rendition of this heatmap. My values range anywhere from `1` to `783764`. I want to plot them as colors on a logarithmically (base10) scaled colormap. So the values' logarithmic representations should range from `0` to `~5.894`. When I set the max value `color cells={min=1,max=783764}`, I get the following error > ! Dimension too large.   >  <to be read again>   >  \relax   >  l.104 ]{data.csv}   > Through experimentation I have fond that `16383` appears to be the maximum value that does _not_ give me an error. Since I don't know how to make my intended maximum of `783764` work, I attempted to do some preprocessing (see pgfplotstable docs Sec. 3.3), and pull all my values through my own `lg10` function: `preproc/expr={lg10(##1)}`   However, _that_ then gave me another error: > ! Package PGF Math Error: Sorry, an internal routine of the floating point > unit got an ill-formatted floating point number `1'. The unreadable part was > near '1'.. First of all, this is weird, since there is no value `1` in the data table that I tried this on. Secondly, I tried appending `.0` to all my (integer) values, but that made no difference. **How can I make this work?** Here's my Minimum non-working example:               \documentclass{standalone}          \listfiles     \usepackage{colortbl}     \usepackage{filecontents}     \usepackage{pgfplotstable}     \usetikzlibrary{pgfplots.colormaps}          \pgfplotsset{compat=1.9}          % http://tex.stackexchange.com/a/83865/31877     \pgfplotstableset{         /color cells/min/.initial=0,         /color cells/max/.initial=1000,         /color cells/textcolor/.initial=,         %         % Usage: 'color cells={min=<value which is mapped to lowest color>,          %   max = <value which is mapped to largest>}         color cells/.code={%             \pgfqkeys{/color cells}{#1}%             \pgfkeysalso{%                 postproc cell content/.code={%                     \begingroup                     % acquire the value before any number printer changed it:                     \pgfkeysgetvalue{/pgfplots/table/@preprocessed cell content}\value                     \ifx\value\empty                         \endgroup                     \else                     \pgfmathfloatparsenumber{\value}%                     \pgfmathfloattofixed{\pgfmathresult}%                     \let\value=\pgfmathresult                     % map that value:                     \pgfplotscolormapaccess                         [\pgfkeysvalueof{/color cells/min}:\pgfkeysvalueof{/color cells/max}]                         {\value}                         {\pgfkeysvalueof{/pgfplots/colormap name}}%                     % now, \pgfmathresult contains {<R>,<G>,<B>}                     %                      % acquire the value AFTER any preprocessor or                     % typesetter (like number printer) worked on it:                     \pgfkeysgetvalue{/pgfplots/table/@cell content}\typesetvalue                     \pgfkeysgetvalue{/color cells/textcolor}\textcolorvalue                     % tex-expansion control                     \toks0=\expandafter{\typesetvalue}%                     \xdef\temp{%                         \noexpand\pgfkeysalso{%                             @cell content={%                                 \noexpand\cellcolor[rgb]{\pgfmathresult}%                                 \noexpand\definecolor{mapped color}{rgb}{\pgfmathresult}%                                 \ifx\textcolorvalue\empty                                 \else                                     \noexpand\color{\textcolorvalue}%                                 \fi                                 \the\toks0 %                             }%                         }%                     }%                     \endgroup                     \temp                     \fi                 }%             }%         }     }          \pgfmathdeclarefunction{lg10}{1}{%         \pgfmathparse{ln(#1)/ln(10)}%     }          \begin{filecontents}{data.csv}     item,Xa,Xb,Ya,Yb,Za,Zc     a,2,,2,,,     b,,2,,,4,2     c,,5,,,,     d,2,,8,,,     e,,,,,5,5     f,,,,3,,     g,,2,,,,     h,6,,,4,,     i,,,4,,,     j,,,,,,2     k,,2,,,3,2     l,,,7,,,     m,,6,,3,,     n,,,,,,7     \end{filecontents}          \begin{document}               \pgfplotstabletypeset[         %font=\tiny,         colorCell/.style={             preproc/expr={lg10(##1)},%fails to work on ANY number             color cells={min=1,max=16383}%max should be 783764         },         itemCell/.style={             string type,             column name={},         },         col sep=comma,         columns={item,Xa,Xb,Ya,Yb,Za,Zc},         columns/item/.style={itemCell},         columns/Xa/.style={colorCell},         columns/Xb/.style={colorCell},         columns/Ya/.style={colorCell},         columns/Yb/.style={colorCell},         columns/Za/.style={colorCell},         columns/Zb/.style={colorCell},     ]{data.csv}          \end{document}


title: Text decoration below path

text: This should be very a very simple question.               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{decorations.text}     \begin{document}     \begin{tikzpicture}        \draw[-stealth,postaction={decorate,decoration={text along path,text align=center,text={this way}}}](0,0)to[bend right=45] (2,0){};     \end{tikzpicture}          \end{document}      ![output](http://i.stack.imgur.com/IY49e.png) I want the text to be below the line, not above, is it possible?


title: How to put 2 sets of 3 figures on 2 columns?

text: I would like to put figures on 2 columns, 1st column; figure 1 with subfigures a, b and c, 2nd column: figure 2 with subfigures a, b and c.               (a) fig. a     | (a) fig. a                    |                    |     (b) fig. b     | (b) fig. b                    |                    |     (c) fig. c     | (c) fig. c                    |                    |     (1) fig. 1     | (2) fig. 2      I have tried with               \begin{multicols}{2}     \begin{figure*}     \begin{subfigure}[t]{0.5\linewidth}       \includegraphics[width=\textwidth]{fig_a}       \caption{Fig a}     \end{subfigure}     \\     \begin{subfigure}[t]{0.5\linewidth}       \includegraphics[width=\textwidth]{fig_b}       \caption{Fig b}     \end{subfigure}     \\     \begin{subfigure}[t]{0.5\linewidth}       \includegraphics[width=\textwidth]{fig_c}       \caption{Fig c}     \end{subfigure}     \caption{Fig 1}          \columnbreak          \begin{figure*}     \begin{subfigure}[t]{0.5\linewidth}       \includegraphics[width=\textwidth]{fig_a}       \caption{Fig a}     \end{subfigure}     \\     \begin{subfigure}[t]{0.5\linewidth}       \includegraphics[width=\textwidth]{fig_b}       \caption{Fig b}     \end{subfigure}     \\     \begin{subfigure}[t]{0.5\linewidth}       \includegraphics[width=\textwidth]{fig_c}       \caption{Fig c}     \end{subfigure}     \caption{Fig 2}     \end{multicols}      but the figures remain on the same column, the left one. How can I do that?


title: Using \citet in IEEETran

text: Is there any way to use `\citet` in IEEETran? It's a handy command that IEEETran doesn't support.


title: Positioning the address in a Letter

text: I need to place the right-side address differently in my .tex file but I can not figure out how to do. What I would like is to have the last line from the right-placed address at the same line as the first line of left-placed address. How is that possible ? Here is my snippet code :               % !TeX encoding = utf8          \documentclass[a4paper]{letter}     \usepackage[lmargin=20mm, rmargin=20mm]{geometry}          \begin{document}     \begin{letter}{                 Nom\\                 Adresse 1\\                 Adresse 2\\                 Ville\\                 Pays\\                 Code Postal\\                 \vspace{0.5cm}                 Date}          \address{                 Nom\\                 Adresse 1\\                 Adresse 2\\                 Ville\\                 Pays\\                 Code Postal\\}          \date{}          \opening{Opening}          \closing{\mbox{}}          \end{letter}     \end{document}      When I compile that, I have two different address blocks (one on the left, and one on the right), but I would like to pull down the right one by playing with its position. Any ideas how can I do that ? Thank you.


title: Finding a more efficient editor for collaboration of LaTeX people and Word people

text: **Background** My supervisor often wants to edit my papers, so he frequently asks for word version of the paper. I tried latex2rtf, but it is very limited in terms of packages and customized commands. I asked a similar question and found a related answer. However, every time I look to my beautiful LaTeX PDF, before conversion to Word, I think that why we cannot just edit the title from the output??? Currently LaTeX editors (like TeXStudio, TeXMaker,etc) provide an integrated PDF viewer which provide preview of the compiled document. I always think that if we have an interactive document viewer that identifies different fields like title, paragraph,... and when user double clicks on a field, a new small window opens with the text in it. After user completes his/her revision, LaTeX runs to do typesetting of the new document. **Question** Is there any PDF professional viewer which can be linked and used with LaTeX to improve the experience of the word people in using LaTeX?? For example, many professional pdf viewers like Acrobat Pro, Nitro, Phantom PDF can edit the text in PDF files. I think If we could link the PDF viewer and the LaTeX editor together in the way that edits in a paragraph of a PDF file can be sent backward to tex file. Then we can compile the the TeX file to apply the changes. _Edit1:_ Current versions of TeXstudio and TeXmaker can highlight the current position of cursor in yellow for few seconds. There is a link between in the TeX source, and Preview. I wish that we can have the the reversed link.


title: transform text from one template to another

text: I use laTex for formatting my papers and I use GIT for version controlling the papers i write, once i have a final cut of the paper i go hunting for suitable conferences. most of these have their own templates ( .tex and other .bbl files) although i start preparing the content (by copying) from master copy to target template of conference. soon i would end up making changes to the content in target (conference version) of the file and i had to copy back the added changes to master copy. Thus defeating the purpose of version control by manual copying here and there . Can i have only one master copy of the file and use some scripts to automatically transform into target templates ? so i can have proper version control on master copy. Or any other productivity tips? how are other solving this problem ?


title: Not aligned figures!

text: I have a problem aligning my figures. I am using following code. However, one figure appears a bit higher than the other one. Everything else is perfectly aligned in the paper. Except for these two:               \begin{figure*}     \begin{minipage}[b]{2.5in}     \centering     \includegraphics[width=2.8in]{P}      \caption{P is a figure.}     \label{figure:p}     \end{minipage}     \hspace{0.21in}     \begin{minipage}[b]{2.5in}     \centering      \includegraphics[width=2.8in]{D}      \caption{D is a figure.}     \label{figure:d}     \end{minipage}     %\end{center}     \end{figure*}


title: lstlisting: Syntax highlighting for C++ like in Editor?

text: i want to insert some C++ code into my thesis and i tried tons of options to make the code look like in my editor. Here is what i have so far:               \usepackage{listings}     \usepackage{color}          \definecolor{mygray}{rgb}{0.4,0.4,0.4}     \definecolor{mygreen}{rgb}{0,0.8,0.6}     \definecolor{myorange}{rgb}{1.0,0.4,0}          \lstset{     basicstyle=\footnotesize\sffamily\color{black},     commentstyle=\color{mygray},     frame=single,     numbers=left,     numbersep=5pt,     numberstyle=\tiny\color{mygray},     keywordstyle=\color{mygreen},     showspaces=false,     showstringspaces=false,     stringstyle=\color{myorange},     tabsize=2     }      Here is a code snippet:               \begin{lstlisting}[language=C++]{Name=test2}     /*      * Project: ATFOC -> Autonomous Trainer For Object Classification      * Name:    Main.cc       * Autor:   Bla Blub      * Date:    03.09.2013      * Description: main class for       *          1) executing a web search for images and store them      *          2) and image comparison to filter good from bad samples      */          #include "stdafx.h"          #include "WebSearch.h"     #include "ImageComparison.h"          using namespace std;          #define NUMBER_OF_IMAGES 50 // default     #define NUMBER_OF_QUERIES 3 // default          int main(int argc, char** argv)     {         vector<string> input_vector;         string input;              uint i;           \end{lstlisting}      Here you see what it lookes like: ![](http://s1.directupload.net/images/131009/kuaiyc9b.jpg) Ok, so now my problem is that the preprocessor directives are colored like the other keywords, my question: How can i change that? Another problem is that the basic datatypes (int, char...) have the same color as standart keywords (for, else, return...), how can i change that? Thanks in advance for any solution if there is one. EDIT: If it's possible, i would also want the colored words to either be shadowed or somehow bordered (i mean that the letters have a thin black border and are filled with the respective color) to make them better visible.


title: Anchor point seems incorrect for Chemfig package

text: I'm trying to use chemfig to draw a basic schematic for enzymatic browning and have encountered a problem. In the bottom reaction (bottom right to bottom left) quinone is formed by the enzyme (denoted by the bracket underneath). The anchor for the curved arrow, however, seems to be incorrectly placed and try as I might I have not been able to solve the problem. I've tried flipping it every which way to no avail. Any tips?               \documentclass{article}          \usepackage{chemfig}     \setatomsep{2em}     \setbondoffset{0.5pt}     \setarrowdefault{,1.5,}          \begin{document}          \begin{figure}     \schemedebug{true}     \schemestart     \chemup.\chemfig{N-[:30]Cu-[:150]N}\qquad\chemfig{N-[:150]Cu-[:30]N}\chemdown]     \arrow{-U>[*{0.0}{\chemfig{O_2}, \chemfig{H_2O}}]}[90,2]     \chemup.\chemfig{N-[:30]Cu(-[:150]N)(-[:90,,,2,]H_2O)-[:30]O-O-[:-30]Cu(-[:90]OH_2)(-[:30]N)-[:-30]N}\chemdown]     \arrow{-U>[\chemfig{**6([,0.5]----(-OH)--)}][\chemfig{H_2O}]}[0]     \chemup.\chemfig{N-[:30]Cu(-[:150]N)(-[:90]O-[:30]**6([,0.5]------))-[:30]O-O-[:-30]Cu(-[:90]OH_2)(-[:30]N)-[:-30]N}\chemdown]     \arrow{-U>[*{0.180}2\chemfig{H^+}][*{0.180}\chemfig{H_2O}]}[-90]     \chemup.\chemfig{N-[:30]Cu(-[:150]N)-[:30]O-[:90]**6([:60,0.5]-(-[:-90,1]O-[:-30,1]Cu(-[:30,1]N)-[:-30,1]N)-----)}\chemdown]     \arrow{-U>[][*{0.north}\chemfig{*6([:-30,0.5]-(=[:-120]O)-(=[:-60]O)-=-=)}]}[180,1.85]     \schemestop     \end{figure}          \end{document}      ![enter image description here](http://i.stack.imgur.com/l5BVS.png)


How do I generate in LaTeX a list of random questions avoiding repetitions?               \documentclass{article}     \usepackage[pdftex]{exerquiz}     \usepackage{enumitem}     \usepackage{tikz}          \newcommand*{\ListOfTopics}{%         AlgebraQuestions,%         TrigQuestions%     }%     \pgfmathdeclarerandomlist{AlgebraQuestions}{%      {AlgebraQ1}%      {AlgebraQ2}%          {AlgebraQ3}%               }%     \pgfmathdeclarerandomlist{TrigQuestions}{%         {TrigQ1}%         {TrigQ2}%         {TrigQ3}%     }%     \newcommand*{\NumberOfQuizes}{3}%          \begin{document}          \foreach \QuizNumber in {1,...,\NumberOfQuizes} {%     \section{Вариант}        \noindent\textbf{\Large Quiz Number \QuizNumber}%         \begin{enumerate}              \foreach \Topic in \ListOfTopics {%             \pgfmathrandomitem{\RandomQuestion}{\Topic}              \item Random Question from Topic='\Topic':                  \textbf{\Large\RandomQuestion}%         }%         \end{enumerate}     }%     \end{document}      I read that I can use that, but how to adapt it?               \def\prunelist#1{%     \expandafter\edef\csname pgfmath@randomlist@#1\endcsname             {\the\numexpr\csname pgfmath@randomlist@#1\endcsname-1\relax}     \count@\pgfmath@randomtemp      \loop     \expandafter\let     \csname pgfmath@randomlist@#1@\the\count@\expandafter\endcsname     \csname pgfmath@randomlist@#1@\the\numexpr\count@+1\relax\endcsname     \ifnum\count@<\csname pgfmath@randomlist@#1\endcsname\relax     \advance\count@\@ne     \repeat}


title: Left margin of table of contents in beamer

text: I'm making a presentation with the beamer class, and I use the theme Madrid (with default settings). After having completed some frames I noticed that the left margin of the contents page is much smaller then the margin of other pages. Also, since my section's names are quite short, this doesn't look very nice. What I would like to do is increase the left margin of the contents page with, say, 1 cm. This is what I tried first:               \begin{frame}{\contentsname}        \setlength{\leftmargin}{2cm}        \tableofcontents[pausesections]     \end{frame}      But apparently `\leftmargin` doesn't affect the table of contents. Also, playing around with `\setbeamersize{text margin left = 1cm}` influenced all frames, which is not what I'm looking for. Next, I tried a trick described here: creating a new environment in which the `\leftmargin` is changed.               \newenvironment{chg}{%        \begin{list}{}{%           \setlength{\leftmargin}{1cm}%        }%     \item[]}{\end{list}}          ...          \begin{frame}{\contentsname}        \begin{chg}           \tableofcontents[pausesections]        \end{chg}     \end{frame}      Strangely, this only influenced the titles of subsections, not those of the sections. After having read some other similar questions I tried using minipages, like this:               \begin{frame}{\contentsname}        \hspace*{1cm}        \begin{minipage}{\textwidth}           \tableofcontents[pausesections]        \end{minipage}     \end{frame}      This is getting closer: the left margin got larger but unfortunately the label separation between the content's titles was set to zero. Of course, I'd like to have the titles spread over the entire frame, as it had always been before introducing the minipage. Any suggestions on how to fix the label separation in the table of contents, or other approaches to increase the left margin are welcome. * * * **Update:** I just discovered that changing the heigt of the minipage might help. In this topic I found `\begin{minipage}[t][10cm][t]{\textwidth}` to replace `\begin{minipage}{\textwidth}`. I tried this, changed some parameters and found out that `\begin{minipage}[c][6cm]{\textwidth}` works fine in my case. Obviously this '6cm' is just an estimate. When I place an original version of the contents page next to this one, I see some more small transformations have been applied beside increasing the left margin. But as long as a more systematic solution doesn't show up, I'll keep this one.


title: Font for inline Listings is not changing

text: I am writing my thesis in LaTeX and use `\lstinline{}` a lot. The problem is that the font on the output does not change to '`this`', but rather continue like 'this'. How do I correct this behaviour? I have compiled my document in Sublime Text 2 with LaTeXTools on Ubuntu and Windows, and with MikTeX on Windows. Everything gives the same output.


title: pstricks compile problem

text: I know this issue has been discussed a lot in other topics, but most of them contain complex examples, from which I haven't been able to understand the solution. So I have the following code:                \documentclass{article}       \usepackage[pdf]{pstricks}      %\usepackage[usenames,dvipsnames]{pstricks}           \begin{document}          \begin{pspicture}(0,-0.8)(2.0,0.8)       \psline[linewidth=0.04cm](0.0,0.78)(1.98,-0.78) \end{pspicture}       \end{document}      I keep getting the error message: Undefined control sequence. What am I doing wrong? (I'm using texmaker in ubuntu).


title: gnuplot, plot rotation arrows

text: Recently I have been using gnuplot to plot position data over time. In my datafile, I have time,positional (2D) information, and directional information (in the form of degrees, 0-360). I have nice plots of position wrt to time, however, I was wondering if it's possible to plot degrees as a rotation of individual plot characters. Does anyone have any suggestions for a way to do this? here is the example script that I am plotting. In this plot there are three files, and 3 data sets. Each containing position and time information, and representing data from a different antenna type. columns 3 and 2 contain position information, and column 1 contains time information. `gnuplot> plot 'gpsfile1.txt' using 3:2:1 ls 1 lc palette title 'smallant', 'gpsfile2.txt' using 6:5:4 ls 5 lc palette title 'FullWave', 'ant_lady_dog_clouds.txt' using 9:8:7 ls 7 lc palette title 'control'` plotted, this data looks like this ![2d position data over time time](http://i.stack.imgur.com/7gwzT.png) I have a 4th column that represents orientation from magnetic north. I would like to know if there is a good way to display this 4th dimension, preferably by rotating the markers. Any thoughts?


title: How can I invert the poles of an OP-AMP in circuitikz?

text: I have an op-amp in my circuit, but I would like the + pole to be above and the - pole to be downward. I don't know how to do that. (Sorry I can't upload an image, it is my first post) Can anybody help me please?               \begin{center}     \begin{circuitikz} \draw     (0,0) node[op amp] (opamp) {}     ;\end{circuitikz}     \end{center}


title: \lstset{numbers=none} not working

text: I'm trying to have LaTeX examples in a document. I use the `showexpl` package which lets me use the `listings` package options. Because all fragments are short, line numbers are redundant. The following MWE does not yield the result I want (i.e. there is a line number).               \documentclass{article}          \usepackage{showexpl}     \lstset{numbers=none}          \begin{document}     \begin{LTXexample}     Hello World!     \end{LTXexample}     \end{document}      When I define the option local(`\begin{LTXecample}[numbers=none]`) the number is gone. I would rather delete them globally and not have to type extra code for every example, so using a new style would preferably be avoided. I think the solution will be somewhat like this.


title: In apa.cls [man] mode, how do you get the table to go with text?

text: My table consistently skips to the very last page! Is this simply a function of the `doc` mode? I have tried various float controlling methods like `\FloatBarrier`, etc., but nothing has been successful so far. On the TUG website it says: > When revising and proofreading a manuscript, it is most helpful to have the > tables and figures readily available (rather than turning most of the way to > the end of the manuscript to access them). If the user invokes the > `floatsintext` option (in the `\documentclass` line), tables and figures > will be integrated in the text approximately at the point where they are > mentioned. I tried this but maybe I read it wrong.


title: Correct spacing of indices after hyperref or glossaries commands

text: I get different spacing in math mode when using some sort of command on a variable and an index. The text below gives what I think is correct spacing (between the variable 'M' and its index):               $M_1 M_1 M_1$      When using hyperref's `\href` command, the spacing gets larger (being wrong in my opinion):               $\href{http://tex.stackexchange.com/}{M}_1 \href{http://tex.stackexchange.com/}{M}_1 \href{http://tex.stackexchange.com/}{M}_1$        The same goes for glossaries' `gls` command:               $\gls{M}_1 \gls{M}_1 \gls{M}_1$      Note, that the index does not belong to the hyperlink or to the glossary entry logically, so it should neither be clickable nor colored. Instead, it should be possible to use an index, which itself is an hyperlink or a glossary link, i.e. `\gls{M}_\gls{k}`. I have the feeling (but that might be wrong), that grouping is related to the problem. Putting the 'M' into a group gives correct spacing:               ${M}_1 {M}_1 {M}_1$        Putting a group after the 'M' gives wrong spacing:               $M{}_1 M{}_1 M{}_1$      Please see the differences in the following table: ![spacing demonstration](http://i.stack.imgur.com/Pv3wN.png) How can I get correct spacing when using commands like `\href` or `\gls`? If the solution depends on the command I would be primarily interested in the `\gls` command. Just for completion, the code of the minimal (non-)working example (besides the coloring) is the following (thanks to Scott Prahl and egreg):               \documentclass{article}     \usepackage[colorlinks]{hyperref}          \usepackage{glossaries}     \makeglossaries     \newglossaryentry{M}{name=M,description=M}          \begin{document}          \begin{tabular}{rl}     normal: & $M_1 M_1 M_1|$\\     href: & $\href{http://tex.stackexchange.com/}{M}_1              \href{http://tex.stackexchange.com/}{M}_1              \href{http://tex.stackexchange.com/}{M}_1|$\\     gls: & $\gls{M}_1 \gls{M}_1 \gls{M}_1|$\\     in group: & ${M}_1 {M}_1 {M}_1|$\\     group between: & $M{}_1 M{}_1 M{}_1|$     \end{tabular}          \end{document}


title: Can't include child document in subfigure

text: I'd like to save the PSTicks code for my images in seperate files and then include them with `\include{image.tex}`. This works fine with normal figure floats. But when I use subfloats, I get the error:               (./newfile1.aux (./file.tex.aux))     ! Missing } inserted.     <inserted text>                      }     l.11    }      This minimal example works fine (file.tex can be also empty), but throws an error when the comment marks are removed:               \documentclass[english]{article}     \usepackage{pst-plot}     \usepackage{pstricks}     \usepackage{pst-node}     \usepackage{subfig}     \begin{document}         \begin{figure}              %\subfloat[]{             \include{file.tex}         %}              \caption{Caption}              \end{figure}          \end{document}      The minimal example works as expected also if the include command is replaced by the content of the file.


title: Reproducing an analog clock similar to the one provided by the ifsym package

text: ## Situation I was browsing The Comprehensive LATEX Symbol List looking for a simple analog clock in which I could use in a pamphlet. At some moment, I found an interesting entry (page 91): ![Clock entry](http://i.stack.imgur.com/pqyVe.png) I tried to use the `\showclock` macro in my document, but unfortunately a `pdflatex` run showed me the following error:               ! Undefined control sequence.     l.10 \showclock{4}{50}      In my Linux box with TL2011, the very same attempt to call `\showclock{4}{50}` gets even worse, with no `ifsym` package available. ## Documentation I tried to read the documentation, but `texdoc ifsym` lists only a German document, of which I only understand a few words - sadly. (Ich spreche kein Deutsch.) `:(` Anyway, the icon table in the end of the documentation gives me the idea of a possible font problem, like a missing indexing or reference. ## MWE               \documentclass{article}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{ifsym}          \begin{document}          \showclock{4}{50}          \end{document}      ## Question Is there any package with a similar command, say `\clock{<hours>}{<minutes>}`?


title: Centering content in cells adjacent to Sideways Headings

text: I have a table produced by the following code:               \documentclass[a4paper]{article}     \usepackage{tabularx}     \usepackage{rotating}          \begin{document}          \begin{table}[ht]          \begin{center}     \begin{tabularx}{\textwidth}{|l|X|l|l|l|l|l|l|}     \hline     Item    &   Task    &      \multicolumn{1}{|c|}{     \begin{sideways}     Resident Engineer \,     \end{sideways}} &     \multicolumn{1}{c|}{     \begin{sideways}     Pavement Engineer \,     \end{sideways}} &          \multicolumn{1}{c|}{     \begin{sideways}     Surveyor \,     \end{sideways}} &     \multicolumn{1}{c|}{     \begin{sideways}     Environmental Specialist \,     \end{sideways}} &     \multicolumn{1}{c|}{     \begin{sideways}     Materials Technicians \,     \end{sideways}} &     \multicolumn{1}{c|}{     \begin{sideways}     Inspectors of Works \,     \end{sideways}} \\     \hline     Task 1  &   Mobilization and Project Inception & P  & P & P &  P    & P & P     \\     \hline     Task 2  &   Carry out data collection \& review of existing data  & P& S    & P &P  &P  & P\\     \hline     Task 3  &   Compiling and submitting the Inception report  &P   &   S&  &   &P  &       \\     \hline          \end{tabularx}     \end{center}          \end{table}               \end{document}      The problem is that **Item** and **Task** cells are not centered. How can I center the text in these two cells (vertical and horizontal alignment)?


title: line break in tabular

text: I try to set a line break within a tabular environment where the column is not definded with p{$width}. I've tried the following without the expected result               \documentclass{article}     \begin{document}     expected result:          \begin{tabular}{|p{15mm}|l|l|}     \hline     X1\newline{}X2 & text & another text\\\hline     \end{tabular}          real result:          \begin{tabular}{|l|l|l|}     \hline     X1\newline{}X2 (no newline) & a text & another ext\\\hline     \begin{tabular}{l}     X1\\     X2     \end{tabular}      & a text (not on top) & another text\\\hline     \end{tabular}     \end{document}      Are there any hints?


I've been running into this weird issue using TeXShop. Whenever I compile LaTeX and get an error, the output tells me where it is. So I fix it ... and recompile. But then I get this: File ended while scanning use of \@new l@bel According to the discussion here, I can fix this temporarily by trashing the aux file and recompiling. But that's not an optimal situation because then every time I make a tiny error, I have to re-trash my aux file before getting the compilation to proceed smoothly. By moving my `\end{document}` code, I was able to locate the problem in my document:               % [Other text up here...]     \vspace{10 pt}     \noindent \textbf{My Thoughts}: Well, that was interesting.          % This part is the problem!     \chapter{Multivariable Calculus}     \label{2chapter:2}          \textbf{General Idea}: This is the study of [...]     % [Other text down here...]      But I can't figure out why this label is giving me the problem. I put `\end{document}` directly under this, tried to make a random error (I put a $ by itself), then deleted it, and came up with the error in the title. If I put `\end{document}` above this text and repeat the process of putting a $ by itself, I can delete it and compile LaTeX normally. In fact, I also tried this trick with `\end{document}` at its normal spot. If I put that dollar sign above the line with 'Multivariable Calculus' it works as expected (i.e. error upon compiling, but works fine after I delete it), but if the dollar sign is below that line, I compile (get an error) and upon deleting that sign I get the error again (file ended while scanning, etc.)! Here's the final few lines of the aux file that got created when I saw this error. I'm convinced that the problem is with the label here, or with the label assigned to the previous chapter (Single Variable Calculus).               \@writefile{toc}{\contentsline {chapter}{\numberline {12}Operating Systems}{29} {chapter.12}}     \@writefile{lof}{\addvspace {10\p@ }}     \@writefile{lot}{\addvspace {10\p@ }}     \newlabel{1chapter:12}{{12}{29}{Operating Systems\relax }{chapter.12}{}}     \@writefile{toc}{\contentsline {part}{II\hspace  {1em}Mathematics}{31}{part.2}}     \@writefile{toc}{\contentsline {chapter}{\numberline {13}Single Variable Calculus}{33}{chapter.13}}     \@writefile{lof}{\addvspace {10\p@ }}     \@writefile{lot}{\addvspace {10\p@ }}     \newlabel{2cha      What's confusing, though, is that all these labels are quite similar. I'm writing a book and I have formatted it so there would be a bunch of chapters, and each chapter gets a label where the label name is `Xchapter:Y` where X is the "part" number (2 in this case, which corresponds to "Mathematics"), and Y is the numbering of that chapter within that part (Y=2 here, so the Multivariable Calculus chapter is the second chapter in its part). Is there a problem with the way I'm labeling things? In case this is helpful, here's part of the preamble (my preamble is about 100 lines long, but I commented out most of it and it doesn't seem to be giving me problems).               \documentclass[10pt,notitlepage]{book}     \usepackage{amssymb,amsmath,graphicx,url,enumitem,tikz}     \usepackage{exercise}     \usepackage{hyperref}      \usepackage{makeidx}     \usepackage[bottom]{footmisc}     \usetikzlibrary{arrows}     \usepackage[left=1in,top=1in,right=1in,bottom=1in]{geometry}          \makeindex          \makeatletter     \newcommand*{\toccontents}{\@starttoc{toc}}     \makeatother      Let me know if there's anything else you would need to understand this. I'm new here and not sure how much information is too much, and this post is already getting long enough as it is. **UPDATE** Okay, so I've managed to trim down the document considerably. If you copy and paste the following text, and experiment with creating random errors before and after the Multivariable Calculus text, you should see some 'file ended while scanning ...'               \documentclass[10pt,notitlepage]{book}     \usepackage{amssymb,amsmath,graphicx,url,enumitem,tikz}     \usepackage{exercise}     \usepackage{hyperref}      \usepackage{makeidx}     \usepackage[bottom]{footmisc}     \usetikzlibrary{arrows}     \usepackage[left=1in,top=1in,right=1in,bottom=1in]{geometry}          \makeindex          \makeatletter     \newcommand*{\toccontents}{\@starttoc{toc}}     \makeatother          \title{Important Stuff}     \author{Your name here}          \begin{document}     \maketitle     \newpage     \vspace*{2 cm}     \textbf{\huge{Contents}}     \vspace{2 cm}     \toccontents          \newpage     \section{Introduction}          \part{Computer Science}     \label{part:1}          \chapter{Introduction to Computer Science}     \label{1chapter:1}          \chapter{Data Structures and Advanced Programming}     \label{1chapter:2}          \chapter{Computer Organization}     \label{1chapter:3}          \chapter{Algorithm Design and Analysis}     \label{1chapter:4}          \chapter{Principles of Programming Languages}     \label{1chapter:5}          \chapter{Computer Graphics}     \label{1chapter:6}          \chapter{Theory of Computation}     \label{1chapter:7}          \chapter{Machine Learning}     \label{1chapter:8}          \chapter{Artificial Intelligence}     \label{1chapter:9}          \chapter{Compiler Design}     \label{1chapter:10}          \chapter{Distributed Systems}     \label{1chapter:11}          \chapter{Operating Systems}     \label{1chapter:12}               \part{Mathematics}          \chapter{Single Variable Calculus}     \label{2chapter:1}          \chapter{Multivariable Calculus}     \label{2chapter:2}          \chapter{Linear Algebra}     \label{2chapter:3}          \clearpage     \addcontentsline{toc}{chapter}{Index}     \printindex          \end{document}


title: manage todonotes to insert figure in the margin

text: How I can use `todonotes` package to insert figure in the margin? I want 3 parameters:   1. The name of the figure,    2. the width of the figure,    3. the caption (perhaps with `\tiny` or `\footnote` fonts).


title: Cropping output of pdflatex to pagesize

text: I am trying to create square images with a fixed size in pixels in LaTeX to be used as buttons. So far, I got the best results using the `slides` document class in combination with the `geometry` package, run `pdflatex`, and then process the resulting `PDF` using the `convert` command. I currently use this as input (I added `showcrop` to make sure I got the page dimensions right):               \documentclass[preview,border=0.5mm]{slides}     \usepackage[vcentering,dvips]{geometry}     \geometry{papersize={1in,1in},total={1in,1in},showcrop}     \usepackage{amsmath}     \begin{document}     \begin{center}     \tan^{-1}     \end{center}     \end{document}      This mostly works, but I want the resulting PDF to just include the region I have defined in the `geometry` command. Currently, a big page is output and processing is very slow when compared to using the `standalone` package (which has its own issues, see below). I have tried the `preview` package, but then top and bottom are cropped. I also have tried to use the `standalone` class instead, but then the output is cropped on all sides and for each text used as input I get different sizes. Besides that, `slides` provides the font I want to use. Is there a way to have `pdflatex` output just the region defined with the `geometry` command (after removing the `showcrop` option)?