title: Indentation APA6 Class for > 2nd paragraphs after title

text: I'm not able to indent the paragraphs in my apa6 class document. For my masterthesis the supervisor wants all the paragraphs indented but the first one after the title. So far, I've tried the following commands but It hasn't worked out yet:               \setlength{\parindent}{15pt}     \indent      My minimal working example:               \documentclass[12pt, onecolumn]{apa6}     \usepackage[utf8]{inputenc}     \usepackage[american]{babel}     \usepackage{csquotes}     \usepackage[style= apa, backend=biber]{biblatex}     \bibliography{/Applications/TeX/library}     \DeclareLanguageMapping{american}{american-apa}          \begin{document}     \setlength{\parindent}{1.27cm}     \section{Section1}     Paragraph one (not indented)          Paragraph two (should be indented but isnt)          \end{document}      I'm glad for any advices on this :) Cheers!


title: How can I draw an aircraft diagram using Latex/tikz ?

text: I want to draw an aircraft diagram with three axes (longitudinal, lateral and normal) using latex/tikz. I also need three views (top, side, and front) of it.


title: How to create a table with equally-spaced rows?

text: Several years ago I succeeded to create a table below. But now I forgot. Maybe I used a `\rule` with zero width. Is there another smart method to accomplish this mission? I used `longtable` to make the table automatically span across pages, but any kind of table is welcome. Requirements:   * 3 columns.   * 4 equally-spaced rows occupying `\textheight`.   * support displayed math contents such as `\\[` or `\equation`.   * the table spans across pages automatically.  as follows: ![enter image description here](http://i.stack.imgur.com/JBTGE.png)


title: Transparent and centered image into a frame formed for two bars (head and side)

text: I tried to center a transparent image into a beamer slide and it worked perfectly (code is shown below), but now I have a `beamer` presentation with two bars: one on the head (2.5cm) and one on the left side (2.5cm). I want to center a figure just in the new frame formed with these two bars, could you help me with this? Thank you very much in advance. Regards!               \usebackgroundtemplate{%     \tikz[overlay,remember picture] \node[opacity=0.3, at=(current page.center)] {        \includegraphics[height=\paperheight,width=\paperwidth]{example-image-a}};     }


title: Check installed packages on Mac OS X and install new ones

text: When trying to compile a new LaTeX document, this line               \usepackage[mtplusscr,mtbold]{mathtime}      produces the error               ! LaTeX Error: Missing \begin{document}.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.1 <          !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"      although the first lines are               \documentclass{IOS-Book-Article}     %      \usepackage{times}     \normalfont     \usepackage[T1]{fontenc}     \usepackage[mtplusscr,mtbold]{mathtime}     %     \begin{document}     \begin{frontmatter}                           % The preamble begins here.      If I remove the mentioned line, everything compiles without problem although not with the desired output. I am new to LaTeX on the Mac. I guess the error has to do with the package [mtplusscr,mtbold]{mathtime} which is not installed. I therefore wonder how can I check whether a package is installed on a Mac and then how can I install it?


title: tikz def node name (or reference) for nodes create using the def

text: I have the following definition in order to create a node with cylinder shape               \def\dnc[#1,#2,#3,#4]#5{       \node[draw, cylinder, alias=cyl, shape border rotate=90, aspect=1.6, %       minimum height=25, minimum width=20, outer sep=-0.5\pgflinewidth, %       color=orange!40!black, left color=orange!70, right color=orange!80, middle       color=white] (#4) [below=of #1, xshift=#2] {};%       \node  [below=of #1, xshift=#2, yshift=#3] {#5};%       \fill [orange!30] let \p1 = ($(cyl.before top)!0.5!(cyl.after top)$), \p2 =       (cyl.top), \p3 = (cyl.before top), \n1={veclen(\x3-\x1,\y3-\y1)},       \n2={veclen(\x2-\x1,\y2-\y1)} in (\p1) ellipse (\n1 and \n2);     };      and another def which create a collection of these in a square shaped node.               \def \cnb[#1]#2{       \node[computenode] (#1) {#2};        \dnc[#1.west, 7mm, -3mm, a1]{$\A_1$};       \dnc[#1.east, -7mm, -3mm, a1]{$\A_2$};       \dnc[#1.north west, 7mm, -3mm, a1]{$\A_3$};       \dnc[#1.north east, -7mm, -3mm, a1]{$\A_4$};     };      My problem is that for creating edges I am not able to refer to the node (cylinders) by there names. I get the error > no shaped a1 is known.


title: Verbatim environment with catchfilebetweentags package

text: I would like to use a `verbatim` environment inside an `ExecuteMetaData` call from the `catchfilebetweentags` package. The use case is that my econometric software creates a fixed-width table that I don't want to convert to a proper table, yet. I can wrap this fixed-width table in tags and send it to a log file. I would like to also wrap the table in `verbatim` so that the table is more legible, but when I add the verbatim environment I get a `Runaway argument?` error. I would like to use the `catchfilebetweentags` package so that I can avoid manually trimming the header and footer from each table (or counting line numbers). Can I somehow combine fixed-width type with the `catchfilebetweentags` package? Here's my MWE.               \documentclass{article}     \usepackage{catchfilebetweentags}          \begin{document}     \ExecuteMetaData[inner]{table}     \end{document}      Where `inner.tex` is as follows.               %<*table>     \begin{verbatim}     col1    col2     1   2     3   4     \end{verbatim}     %</table>


title: Using listings to display regexes

text: Is there any way to use the listings package (which I already use for Python) to highlight regexes? I.e. the regex appears in the document as if it were source code, but with some form of differentiation between (for example) literals and character classes, escaped control characters and real control characters. It's not an uncommon feature in online regex testing tools. For what it's worth, the regexes being discussed in my document are to be used for find/replace on LaTeX code, and will appear as `\lstinline`s. **EDIT** background colour seems common for this:   * Regexbuddy ![regexbuddy screenshot](http://i.stack.imgur.com/WG7Vx.png)   * http://regexpal.com/ -- almost(?) identical to regexbuddy Sublime text apparently does character-colour highlighting: ![Sublime text screenshot](http://i.stack.imgur.com/aN91Y.png) This would seem to be (i) subjectively nicest, and (ii) most compatible with existing listings. For reference https://www.debuggex.com/ has a nice visual parser which goes much further than anything (i) I had considered, and (ii) that would be possible in a text-based framework.


title: \raisetag not working with alignedat environment

text: It seems the amsmath `\raisetag` macro does not work in combination with the `alignedat` environment. See the MWE below:               \documentclass{article}     \usepackage{amsmath}     \begin{document}       \begin{equation}         \begin{alignedat}{3}           \text{line 1} &\quad&& \text{is long, very long, really very long, unbelievably long, really it is such}\\           \text{line 2} &&& \text{is short}         \end{alignedat}         \raisetag{\baselineskip} % <--- seems to do nothing!       \end{equation}     \end{document}      Is it possible to fix or work around this?


title: Insert comment in WinEdt with the caret in the middle of line

text: Currently, if caret is in the middle of a line, when you choose to insert comment in WinEdt (Edit -> Move/Fill -> Insert Comment), the comment sign (%) is placed where caret is. I don't know much about scripting in WinEdt, and I am wondering how I should modify "Insert Comment.edt" and also "Remove Comment.edt" in order to add % at the beginning of the line and also remove % from the beginning of the line no matter where the caret is (just like Matlab and SciTE)?


title: How can I make braket's \Set work with align* and htlatex/tex4ht

text: I have the following `test.tex` file:               \documentclass{article}     \usepackage{tex4ht}     \usepackage{amsmath}     \usepackage{braket}     \begin{document}     \begin{align*}       \Set{|}     \end{align*}     \end{document}      When I run `latex`, I get               D:\Documents\GitHub\book> latex test.tex     This is pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9 64-bit)     entering extended mode     (D:\Documents\GitHub\book\test.tex     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar     abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,     croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga     lician, german, german-x-2012-05-30, greek, gujarati, hindi, hungarian, iceland     ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin, latvian,      lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, n     german-x-2012-05-30, nynorsk, oriya, panjabi, pinyin, polish, portuguese, roman     ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerm     an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl     ishmax, welsh, loaded.     ("D:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls"     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     ("D:\Program Files\MiKTeX 2.9\tex\latex\base\size10.clo"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\tex4ht.sty")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\usepackage.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\latex\amsmath\amsmath.sty"     For additional information on amsmath, use the `?' option.     ("D:\Program Files\MiKTeX 2.9\tex\latex\amsmath\amstext.sty"     ("D:\Program Files\MiKTeX 2.9\tex\latex\amsmath\amsgen.sty"))     ("D:\Program Files\MiKTeX 2.9\tex\latex\amsmath\amsbsy.sty")     ("D:\Program Files\MiKTeX 2.9\tex\latex\amsmath\amsopn.sty"))     ("D:\Program Files\MiKTeX 2.9\tex\latex\braket\braket.sty")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\tex4ht.4ht"     ::::::::::::::::::::::::::::::::::::::::::      TeX4ht info is available in the log file     ::::::::::::::::::::::::::::::::::::::::::     ) ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\tex4ht.sty"     --- needs --- tex4ht test ---     (D:\Documents\GitHub\book\test.tmp)     l.1437 --- TeX4ht warning --- No file test.xref ---     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\latex.4ht"     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\fontmath.4ht"     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\article.4ht"     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\amsmath.4ht"     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\amstext.4ht"     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\amsbsy.4ht"     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\amsopn.4ht"     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht"))     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4.4ht")     ("D:\Program Files\MiKTeX 2.9\tex\generic\tex4ht\html4-math.4ht"))     No file test.aux.     ! Missing } inserted.     <inserted text>                     }     l.8 \end{align*}          ?      What's going wrong, and how do I fix this? **Edit** Here is a smaller example with the same error:               \documentclass{article}     \usepackage{tex4ht}     \usepackage{amsmath}     \begin{document}     \begin{align*}       \left\{{\egroup\;\middle|\;\bgroup}\right\}     \end{align*}     \end{document}


title: Insert newpage before section but prevent pagebreak after part

text: Maybe some of you can already guess what I'm trying to achieve; I want to redefine some commands with the following result: every `\section` should start on a new page **except** for sections which are placed directly after a \part. MWE:               \documentclass[a4paper,10pt]{article}     \usepackage{lipsum}          \begin{document}          \part{Part one}     \section{First section}     \lipsum[1]          \section{Second section}     \lipsum[2]          \section{Third section}     \lipsum[1]               \part{Part two}     \section{First section}     \lipsum[3]          \section{Second section}     \lipsum[1]          \end{document}      In the above example, every `\section` should create a new page but not the "First sections", since they're located directly after a `\part` command. I started with               \let\oldsection\section     \renewcommand\section{\newpage\oldsection}      but then I got stuck not finding an answer to the question on how to built up an exception (so that the `\part` sticks together with the following `\section` on one page). I hope you know how to cope with my problem - you probably do; I never saw you being unable to solve a problem!


title: \usepackage[T1]{fontenc} creates warning in \tabulary

text: An example will speak for itself:               \documentclass[a4paper]{article}          \usepackage[T1]{fontenc}     \usepackage{tabulary}          \begin{document}          \begin{tabular}{c}aa\end{tabular}     \begin{tabulary}{\textwidth}{C}aa\end{tabulary}     \begin{tabulary}{\textwidth}{C}bb\end{tabulary}          \end{document}      Here, a warning is raised by only the first `tabulary`. It says `Package tabulary Warning: No suitable columns`. Whether it happens depends on the content of the cell, but I could not really understand in what case. Why does this warning appear? It seems like a bug in either `fontenc` or `tabulary` so it should be corrected. **Note:** Even though it is _just a warning_ , it alters the display of tables. See this thread. **Edit:** Actually not. The problem was unrelated.


title: Table of Contents in Latex Book

text: I'm writing a thesis using               \documentclass[11pt,a4paper,book,twosides]{now-book}      When I generate the table of contents, it results something like this: > Chapter 1 (chapter name) > > 1 (section name) > > 2 (section name) > > 2.1 (subsection name) I'd like to include the chapter number in each line as in the following. > Chapter 1 (chapter name) > > 1.1 (section name) > > 1.2 (section name) > > 1.2.1 (subsection name)


title: Formatting index page references as "1 sq." without "sq." being part of a hyperlink

text: By default, MakeIndex will format page references which are composed of two or three consecutive pages as (e.g.) "1, 2"/"1-3". With a suitable index style file, the formatting can be changed to "1 sq."/"1 sqq." (with "sq." standing for "sequens", "sqq." for "sequentes"). However, with the `hyperref` package loaded, "sq." and "sqq." will be part of the respective page reference hyperlinks. How can I limit those hyperlinks to the actual page numbers?               \documentclass{article}          \usepackage{makeidx}     \makeindex          \usepackage{hyperref}          \usepackage{filecontents}          \begin{filecontents}{\jobname.mst}     suffix_2p "~sq."     suffix_3p "~sqq."     \end{filecontents}          \begin{document}          Some text about foo\index{foo}.          \clearpage          Another text about foo\index{foo}.          \printindex          \end{document}      ![enter image description here](http://i.stack.imgur.com/cKnF2.jpg)


title: Loading package twice with \RequirePackage causes "option clash"

text: I thought that loading a package twice with the same options cannot lead to option clash, still I get a clash in the following simple example:               \documentclass{article}     \RequirePackage[patch]{kvoptions}     \RequirePackage[patch]{kvoptions}     \begin{document}     Hello World!     \end{document}      This is a MnWE, what I really want to achieve is to create two dependent classes like this: **myclass.cls**               \NeedsTeXFormat{LaTeX2e}[1995/12/01]     \ProvidesClass{myclass}[2012/05/24 v1.0 My Class]          \RequirePackage[patch]{kvoptions}          \endinput      **anotherclass.cls**               \NeedsTeXFormat{LaTeX2e}[1995/12/01]     \ProvidesClass{anotherclass}[2012/05/24 v1.0 Another Class]          \RequirePackage[patch]{kvoptions}          % I need to use some features of `kvoptions` here          \LoadClass{myclass}          \endinput      **test.tex**               \documentclass{anotherclass}     \begin{document}     Hello World!     \end{document}      **Version information**   * It works properly with _LaTeX2e <2005/12/01>_ (TeXLive installed 2009)   * It does not work with _LaTeX2e <2011/06/27>_ (TeXLive installed 2012)


title: Growing a Forest by 1 node corrupts PST barcode picture

text: Working on a different problem, I realized that QR Codes worked or did not work in the documents, different only in their Forest trees. It appears that if the 2nd last node (Child10) of Forest is un-commented in the MWE below, the QR Code becomes corrupt (top portion wiped out). If the last node (Child11) is un-commented, then QR Code disappears. Replacing a PST Barcode QR Code with a regular JPG image produces correct rendering, i.e. PST barcode is the root cause. As the Forest is machine-generated and can be of any size, it has to be in a standalone class. Thus I cannot hardcode any sizes, including paper size and this will have to be printed on multiple pages.               \documentclass[border=10pt]{standalone}     \usepackage{forest}     \usepackage{adjustbox}     \usepackage{pst-barcode}     \usepackage[crop=off]{auto-pst-pdf}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{lmodern}           \begin{document}          \begin{tabular}{l r}     \begin{tabular}[t]{@{}l@{}}     Title\\     Text\\     \end{tabular} &          \begin{adjustbox}{valign=t}     \begin{pspicture}(1.02in,1.02in)         \psbarcode{http://localhost/Intranet/OrgChart.aspx?id=10509110}{version=5}{qrcode}     \end{pspicture}     \end{adjustbox} \\      & \\     \multicolumn{2}{c}{     \begin{forest}      for tree={         draw=black, align=center, l sep=4ex, parent anchor=south, child anchor=north,         node options={font=\footnotesize, minimum width=14em, minimum height=10ex, rounded corners=1ex},         edge path={             \noexpand\path[\forestoption{edge}]             (!u.parent anchor) -- +(0,-2ex) -| (.child anchor)\forestoption{edge label};         },         where n children=0{             child anchor=west,             edge path={                 \noexpand\path[\forestoption{edge}]                 ([xshift=-6em]!u.parent anchor) |- (.child anchor)\forestoption{edge label};             },             draw=red,for parent={                 parent anchor=south, l sep=-12em, grow'=east, calign=child edge, draw=blue                       }         }{}     }         [Parent,name=Parent             [Child1                 [,phantom]                 [Child11]                 [Child12]             ]             [Child3                 [,phantom]                 [Child31]                 [Child32]             ]             [Child4                 [,phantom]                 [Child41]                 [Child42]             ]             [Child5                 [,phantom]                 [Child51]                 [Child52]             ]             [Child6                 [,phantom]                 [Child61]                 [Child62]             ]             [Child7                 [,phantom]                 [Child71]                 [Child72]             ]             [Child8                 [,phantom]                 [Child81]                 [Child82]             ]             [Child9                 [,phantom]                 [Child91]                 [Child92]             ]     %       [Child10     %           [,phantom]     %           [Child101]     %           [Child102]     %       ]     %       [Child11     %           [,phantom]     %           [Child111]     %           [Child112]     %       ]         ]     \end{forest}     } \\     \multicolumn{2}{l}{     \begin{tiny}Copyright \textcopyright{} Myself, 2014\end{tiny}     }     \end{tabular}     \end{document}


title: Copy packages from old miktex to new miktex

text: How to copy packages from old miktex 2.8 to new miktex 2.9. I want installing miktex2.9 but I can't download all packages by slow internet,thus I want to copy this packages from installed miktex. How to do this ? Thanks.


title: Custom environments with multicolumn header

text: I tried to create an environment that creates a tabular frame around the content of the environment. For instance:               \begin{tabular}{|l|l|}       \hline       \multicolumn{2}{|c|}{Team sheet} \\       \hline      \end{tabular}      should become               \begin{example}Team sheet\end{example}      and               \newenvironment{example}{       \begin{tabular}{|l|l|}       \hline       \multicolumn{2}{|c|}{      }{        } \\\hline \end{tabular}      }      But "splitting up" the parentheses of \multicol does not work as straight forward as I wanted due to the obvious parentheses pairing problem. So how do I work around that? Is there an environment for that command available that would allow for this "splitting"?


title: Ignore some self-defined command during compilation?

text: In a .tex file, there is some self defined command               \newcommand{\mycomment}[1]{\textcolor{red}{#1}}     ...     \mycomment{blah blah}     ...      I hope to be able to skip the command during compilation in my final version, but still compile it in versions before my final version. Are there any ways to do that?


title: What syntax and parameter placement allows me to specify the radius of this circle inside tikz-pgf?

text: \begin{tikzpicture}[overlay,remember picture]         \path node [draw, circle, inner sep = 0] at (current page.center) {Test circle\ldots};     \end{tikzpicture}      I have this circle and want to specify it's radius with command I have saved with the name `\sRadius` but I can't find where to place my value for `/tikz/radius`


title: How to make right alignment when using Tikz

text: I use tikz to draw an image, below is part of the image. But the variable name is central alignment, how to make it right alignment? ![enter image description here](http://i.stack.imgur.com/JjFEW.jpg) Below is the related code               \foreach \i [count=\j from 1] in {5,4,3,2,1} {     \pic () at (-0.5,\i) {myarrow};     \node[xshift=-2.5cm] at (-1,\i) {VARIABLE NAME};     }


title: How to set expansion and protrusion for TeX Gyre Pagella using LuaLaTeX?

text: For my documents, I have often used the `mathpazo` package combined with `microtype` and have found the result to be really good. Because now I need to create PDFs which contain a variety of diacritics and which should be easy to copy from, I have decided to use LuaTeX with TeX Gyre Pagella. Initially I had difficulty getting `microtype` to work, but thanks to Alabay's answer in How to set-up LuaTeX, Microtype, with Minion Pro, Myriad Pro I have made it. Still, I'm struggling with protrusion settings. Given the following code:               \documentclass[a4paper, 12pt, oneside, article]{memoir}     \usepackage{fontspec}     \defaultfontfeatures{Ligatures=TeX}     \newfontfeature{Microtype}{protrusion=default;expansion=default;}      \setmainfont[Microtype,Numbers=OldStyle]{TeX Gyre Pagella}     \usepackage{microtype}     \usepackage{blindtext}     \begin{document}     \blindtext     \end{document}      LuaTeX produces this: ![Protrusion in TeX Gyre Pagella -- LuaTeX](http://i.stack.imgur.com/q4jVd.png) I must say I don't quite like the fact that the punctuation marks protrude so far from the margin. Is there a way I can change the default settings? I have tried to do this in various ways (e.g. by changing `factor` in `microtype`), but to no success. Ideally, I would like to get a similar result as when I run pdfTeX with `mathpazo`: ![Protrusion of mathpazo -- pdfTeX](http://i.stack.imgur.com/FD9ch.png) Another (but related) thing is setting expansion for TeX Gyre Pagella. Can I do it, and if so, how?


title: pgfplots -- Patterns are not displaying correctly in PDF version 1.4

text: I am using this method to plot a pattern in-between two curves. If I save the file as PDF version 1.5 everything looks great. Unfortunately the journal that I am submitting the paper to requires PDF version 1.4. When I use pdflatex and generate a PDF 1.4 file (or use gs to convert it afterwards), the pattern goes outside the bounds of the lines. Is there any work around to this? ![Good](http://i.stack.imgur.com/HtJjV.png) ![Bad](http://i.stack.imgur.com/qDTks.png)


title: How to shade mindmap concepts?

text: I tried to add a shade on my mindmap's concepts with               \begin{tikzpicture}[mindmap, text=white,       every concept/.append style={circle,shading=ball, ball color=black!20!white!20}]      but the problem is that this style is not actually transparent and will fill the concept individual colors. Thus, all concepts will have one single color (defined above). How to add a shading style over all concepts by reserving the concept individual color?


title: TikZ: Problem in overlaying a bar plot to existing bar plot

text: I have created a normalized histogram by the following code using tikzpicture               \begin{tikzpicture}     \begin{axis}[         width=\figurewidth,         height=\figureheight,         scale only axis,         xmode=log,         ymode=log,         ybar interval,         x tick label as interval=false,         xlabel = {$\boldsymbol{\nabla}\cdot{\bf u}_{int}$},         xtick={},         xtickten={-18,-16,...,4},         yticklabels={$0.0001\%$, $0.001\%$, $0.01\%$, $0.1\%$, $1\%$, $10\%$, $100\%$},         xmin=1e-17, xmax=1e+4,         ymin=1e-5,ymax=1,         grid=none,         ymajorgrids,     ]     \addplot [fill=gray!90] table [x=Lower, y=Count] {     Lower Upper Count     9.9e-15 1e-14      0.1231     1e-14   1e-13      1e-15     1e-13   1e-12      0.0000     1e-12   1e-11      0.0000     1e-11   1e-10      0.0000     1e-10   1e-9       0.0000     1e-9    1e-8       0.0000     1e-8    1e-7       0.0001     1e-7    1e-6       0.0001     1e-6    1e-5       0.0004     1e-5    1e-4       0.0010     1e-4    1e-3       0.0048     1e-3    1e-2       0.0313     1e-2    1e-1       0.1562     1e-1    1e+0       0.3464     1e+0    1e+1       0.2684     1e+1    1e+2       0.0645     1e+2    1e+3       0.0036     1e+3    1e+4       1e-15     };         \end{axis}     \end{tikzpicture}      This will create a figure like the following: ![enter image description here](http://i.stack.imgur.com/qX6RW.jpg) I have tried to overlay another histogram to the figure by adding the following code.               \addplot [fill=gray!50] table [x=Lower, y=Count] {     Lower Upper Count     1e-16 1e-15 1     };      Unfortunately, after adding the above code I will end up having the following figure. ![enter image description here](http://i.stack.imgur.com/ZDa00.jpg) I only want to overlay the second dataset to the existing histogram without introducing any gap between the bars. A figure similar to the following where the red bar represents the second dataset (this figure is made by myself in Photoshop not by TikZ): ![enter image description here](http://i.stack.imgur.com/Aq2fG.jpg) Could someone help me solve this problem?


title: List of Listings (LOL) multiple entries with the same name

text: I splitted some source code into various listing all with the same name "Company ontology" (to use the firstnumber=auto), now in my LOL I have multiple repeated entries, is there a way to solve, maybe with only one entry Company ontology 13-14? Thank you ![See attached image](http://i.stack.imgur.com/dBmHM.png)


title: Aligning figures using subfigure Error: Not in outer par mode

text: I am soooo lost! have no idea why I keep getting this error. I have tried almost every combination of subfigure, float, centering but I keep getting "Not in outer par mode" error               \begin{figure}[htp]      %   \centering      \noindent\makebox[\textwidth]{         \begin{subfigure}[b]{0.3\textwidth}                 \centering                 \includegraphics[width=\textwidth]{img/preproc_1.png}                 \caption{Raw Image}                 \label{fig:preproc_1}         \end{subfigure}%         ~ %add desired spacing between images, e. g. ~, \quad, \qquad etc.            %(or a blank line to force the subfigure onto a new line)         \begin{subfigure}[b]{0.3\textwidth}                 \centering                 \includegraphics[width=\textwidth]{img/preproc_2.png}                 \caption{Gaussian Smoothing}                 \label{fig:preproc_2}         \end{subfigure}         ~ %add desired spacing between images, e. g. ~, \quad, \qquad etc.            %(or a blank line to force the subfigure onto a new line)         \begin{subfigure}[b]{0.3\textwidth}                 \centering                 \includegraphics[width=\textwidth]{img/preproc_3.png}                 \caption{Eigenvalues}                 \label{fig:preproc_3}         \end{subfigure}         \caption{Visualization of the preprocessing procedure} \label{fig:preprocessing}     \end{figure}


title: xwatermark and draftmark packages stopped working

text: I've been using `xwatermark` and `draftmark` without problem until today, when LaTeX documents I created using both stopped compiling to PDFs. I'm running Kubuntu 14.04 using TL 2014, which I installed myself last week. Here's a test document, which compiles correctly when the `xwatermark` code is commented out. The failed compilations (those calling `xwatermark`) create a `.WMX` file that must be deleted before the commented-out version will compile.               \documentclass[a4paper, 12pt]{article}               \usepackage{fixltx2e, amsmath, fancyhdr, fancyvrb, lastpage, supertabular, xymtex, chemist, bpchem, graphicx, graphics, longtable, array, setspace, supertabular, epsfig, calc, ifthen, mhchem, chemfig, siunitx, chemmacros}            \usepackage[printwatermark]{xwatermark}           \newwatermark[allpages,fontfamily=pag,color=gray!25,angle=45,scale=5, xpos=-30,ypos=20]{DRAFT}          \fancyhf{}     \lfoot{\vspace{16pt} Attorney Docket No.:~***}     \rfoot{\vspace{16pt} Page \thepage \ of \pageref{LastPage}}     \renewcommand\headrulewidth{0pt}     \renewcommand\footrulewidth{0pt}     \setlength{\textheight}{9.0in}     \setlength{\topmargin}{0in}     \setlength{\footskip}{0.5in}     \setlength{\topskip}{0in}     \setlength{\headheight}{0in}     \setlength{\headsep}{0.1in}     \setlength{\parskip}{0.1in}     \setlength{\parindent}{0pt}     \setlength{\oddsidemargin}{0in}     \setlength{\evensidemargin}{0in}     \setlength{\textwidth}{6.0in}          \DeclareSIUnit\cal{cal}     \DeclareSIUnit\Molar{\textsc{M}}          \pagestyle{fancy}          \begin{document}          \begin{spacing}{1.5}          What is claimed:          \begin{enumerate}       \item  Blah            \item  Blah blah            \item Blah blah blah               \end{enumerate}          \end{spacing}     \end{document}      I've seen two errors. One is this:               ERROR: Argument of \Hy@setref@link has an extra }.          --- TeX said ---     <inserted text>                      \par      l.49 \end{document}          --- HELP ---     From the .log file...          I've run across a `}' that doesn't seem to match anything.     For example, `\def\a#1{...}' and `\a}' would produce     this error. If you simply proceed now, the `\par' that     I've just inserted will cause me to report a runaway     argument that might be the root of the problem. But if     your `}' was spurious, just type `2' and it will go away.      The other is this:               \xwm@secstopagerange {1000}{1}      I'm flummoxed. I updated TL (2014) today.


title: standalone pgfplot with extra include in subdirectory -> no output

text: I am trying to generate a pgfplot with data in a textfile as a standalone document. I am using the 1.2 version of standalone from https://bitbucket.org/martin_scharrer/standalone/downloads because it makes the package useable on Windows in the first place. I am not sure why this hasn't found its way to CTAN yet. My file structure is as follows:               /main.tex     /tikzdir/myplot.tex     /tikzdir/plotdata/input_all.txt      In `input_all.txt` I have some data:               x y u v     1 1 1.0391310000000000269 0.95451609999999997846      0.96086930000000003727 1.0454840000000000799 1.0099340000000001094 1.0800190000000000623       `myplot.tex` is the standalone document that creates the plot               \documentclass[tikz]{standalone}     \usepackage{pgfplots}           \begin{document}     \providecommand{\plotdataDir}{plotdata}          \begin{tikzpicture}     \begin{axis}     \addplot table {\plotdataDir/input_all.txt};     \end{axis}     \end{tikzpicture}     \end{document}      `main.tex` includes `myplot.tex`               \documentclass{article}     \usepackage[mode=buildnew]{standalone}     \usepackage{tikz}          \begin{document}     \providecommand{\plotdataDir}{tikzdir/plotdata}          \begin{figure}     \includestandalone{tikzdir/myplot}     \caption{test}     \end{figure}          \end{document}      Now, when I compile myplot.tex directly everything works as expected. If I then compile `main.tex`, the created pdf is found and again, everything is fine. However, if I directly want to compile main.tex then the data in input_all.txt is somehow missing and I get an empty plot without data. I tried to remedy this by using `\providecommand` to specify `\plotdataDir`, but it didn't help. There is also no error indicating that the data could not be found, so I'm a bit stumped. Do you have other tips to handle a situation like this?


title: Multiple Commutative Diagrams

text: I need to make two commutative diagrams (I am using the CD environment) in the same line (I mean not one above the other) can anyone give me an idea?


title: Forcing all content into 2nd column

text: I'm working in landscape,twocolumn mode and am using Latex to make a programme for an upcoming event. Since it is the outside of the programme I need the cover info to only be on the right hand side of the page. I've tried using `\vspace*`, `\vfill` and even `\bigskip` but to no avail, it doesn't seem to want to work :/ Also, sorry for not posting my inputs, but I'm not very familiar with the site and couldn't figure it out.


title: Fit table in page column also some editing

text: I want to make the table fit into one column in a two column page. Also, I need it to look like this: ![enter image description here](http://i.stack.imgur.com/PbJnc.png) Here’s my code               \documentclass[twocolumn]{article}     \usepackage{adjustbox}     \begin{document}     \begin{table}[t]     \centering     \adjustbox{max height=\dimexpr\textheight-3cm\relax,                max width=0.4\textwidth}{     \begin{tabular}{|rr|rrrrrrrr|}     \hline                &            &            &            &            &     Wrist  &            &            &            &            \\                     &            &    {\bf 1} &     {\bf } &    {\bf 2} &     {\bf } &    {\bf 3} &     {\bf } &    {\bf 4} &     {\bf } \\     \hline     \multicolumn{ 1}{|c|}{Upper Arm} & \multicolumn{ 1}{|c|}{Lower Arm} & \multicolumn{ 2}{|c}{Wrist Twist} & \multicolumn{ 2}{|c}{Wrist Twist} & \multicolumn{ 2}{|c}{Wrist Twist} & \multicolumn{ 2}{|c|}{Wrist Twist} \\          \multicolumn{ 1}{|c|}{} & \multicolumn{ 1}{|c|}{} &          1 &          2 &          1 &          2 &          1 &          2 &          1 &          2 \\     \hline                &          1 &          1 &          2 &          2 &          2 &          2 &          3 &          3 &          3 \\                   1 &          2 &          2 &          2 &          2 &          2 &          3 &          3 &          3 &          3 \\                     &          3 &          2 &          3 &          3 &          3 &          3 &          3 &          4 &          4 \\     \hline                &          1 &          2 &          3 &          3 &          3 &          3 &          4 &          4 &          4 \\                   2 &          2 &          3 &          3 &          3 &          3 &          3 &          4 &          4 &          4 \\                     &          3 &          3 &          4 &          4 &          4 &          4 &          4 &          5 &          5 \\     \hline                &          1 &          3 &          3 &          4 &          4 &          4 &          4 &          5 &          5 \\                   3 &          2 &          3 &          4 &          4 &          4 &          4 &          4 &          5 &          5 \\                     &          3 &          4 &          4 &          4 &          4 &          4 &          5 &          5 &          5 \\     \hline                &          1 &          4 &          4 &          4 &          4 &          4 &          5 &          5 &          5 \\                   4 &          2 &          4 &          4 &          4 &          4 &          4 &          5 &          5 &          5 \\                     &          3 &          4 &          4 &          4 &          5 &          5 &          5 &          6 &          6 \\     \hline                &          1 &          5 &          5 &          5 &          5 &          5 &          6 &          6 &          7 \\                   5 &          2 &          5 &          6 &          6 &          6 &          6 &          6 &          7 &          7 \\                     &          3 &          6 &          6 &          6 &          7 &          7 &          7 &          7 &          8 \\     \hline                &          1 &          7 &          7 &          7 &          7 &          7 &          8 &          8 &          9 \\                   6 &          2 &          8 &          8 &          8 &          8 &          8 &          9 &          9 &          9 \\                     &          3 &          9 &          9 &          9 &          9 &          9 &          9 &          9 &          9 \\     \hline     \end{tabular}}     \caption{Wrist and arms scores table}     \end{table}     \end{document}      which results in ![enter image description here](http://i.stack.imgur.com/hyA2g.png) Can you please make me this 2 tables 1st table 2nd tablealso as I need them urgently? Many Thanks for your kind consideration and assistance, I really appreciate it 12%20at%207.26.10%20PM.png


title: How to change spacing between columns for just one page in the document

text: I'm using the `multicol` package for my columns. So far, I have `\setlength\columnsep{10pt}` in the preamble to set the default column separation. But for one particular page, I'd like to set the `columnsep` to 30pt. I wasn't able to get it to work by inserting a new `\setlength` at the start of the page. Here's an example:               \documentclass{article}     \usepackage{blindtext}     \usepackage{multicol}     \setlength\columnsep{10pt} % This is the default columnsep for all pages     \begin{document}          \begin{multicols*}{2}     \blindtext          \newpage     \setlength\columnsep{30pt} % I want the columnsep to be wider only on this page. Right now, nothing happens. The default 10pt is still being used.     \blindtext     \columnbreak     \blindtext          \newpage     \blindtext          \end{multicols*}     \end{document}      Any help would be appreciated.


title: Alignment in algorithmic environment

text: I don't like how there is often a slight misalignment between assignment statements in an `algorithmic` environment. For example, the first version of the algorithm given below looks strange to me. I would like to be able to align the two statements, but the commented version in my example fails to even compile. I could always manually add some space to make things line up (see the last version below), but this is obviously not a good way to go about doing things for a number of reasons. Does anyone have a good way of making the assignment statements to line up?               \documentclass{article}         \usepackage{algorithm}         \usepackage{algorithmicx}         \usepackage{amsmath}          \begin{document}          \begin{algorithm}         \caption{Compute some stuff}         \begin{algorithmic}             \State \( x \gets 1 \)             \State \( m \gets 2 \)         \end{algorithmic}     \end{algorithm}          %\begin{algorithm}     %   \caption{Compute some stuff}     %   \begin{algorithmic}     %       \begin{align*}     %           x & \gets 1 \\     %           m & \gets 2     %       \end{align*}     %   \end{algorithmic}     %\end{algorithm}          \begin{algorithm}         \caption{Compute some stuff}         \begin{algorithmic}             \State \( \hspace{3pt} x \gets 1 \)             \State \( m \gets 2 \)         \end{algorithmic}     \end{algorithm}          \end{document}


title: mhchem formatting interrupted

text: \documentclass[12pt,a4paper]{article}     \usepackage[version=3]{mhchem}          \begin{document}     \ce{K_a \times K_b = K_w}     \end{document}      ![enter image description here](http://i.stack.imgur.com/epFeS.png) In `\ce{}` all text is supposed to be regularized. See how the `K_a` is regularized but then the `K_b` is italicised and the ensuing `K_w` is again subject to `\ce`'s regularization. Why does this interruption in formatting happen? I mean, it probably has to do with the `\times`, but then why does italicised formatting resume after that?


title: Span a tikz chain over multiple pages

text: I wanna create a flowchart as a chain. What I want to achieve is a chain spanned over multiple pages on top of every page (see picture): ![enter image description here](http://i.stack.imgur.com/wF5PZ.png) For the example picture I created it manually (copied the code from texample.net, made a standalone chaine, cropped it manually in half and used eso-pic to place it on top of the page). Is there a way to do something like this "automatically"? **A further question:** Could anybody give some suggestions of how to handle this, if no rimless printer is available? Should I look for a different solution?


title: What is the right way to input prime with Unicode-math (LuaTeX backend)

text: I opened an issue about this in Unicode-math's github repository. However, I am not so sure it is actually a bug, or I just did something wrong. Here is a minimal example,               \documentclass{article}          \usepackage{unicode-math}          \setmathfont[version=Asana]      {Asana Math}     \setmathfont[version=Cambria]    {Cambria Math}     \setmathfont[version=LatinModern]{Latin Modern Math}     \setmathfont[version=Minion]     {Minion Math}     \setmathfont[version=XITS]       {XITS Math}          \def\testprime{f'x'f''''x''''\quad f\prime x\prime f\qprime x\qprime}     \setlength{\parindent}{0pt}          \begin{document}       \fontsize{36}{36}\selectfont       Asana       \mathversion{Asana}       \[ \testprime \]       Cambria     \mathversion{Cambria}     \[ \testprime \]       LatinModern \mathversion{LatinModern} \[ \testprime \]       Minion      \mathversion{Minion}      \[ \testprime \]       XITS        \mathversion{XITS}        \[ \testprime \]     \end{document}      ![enter image description here](http://i.stack.imgur.com/z5YE9.png) It seems that the ASCII input was transformed into supscripts while `\prime` etc are not. With Asana Math the ASCII version looks fine while the `\prime` version looks horrible. It looks like in Asana Math primes are designed as normal glyph, they need to be raised to supscripts to works well. With Latin Modern Math, it looks horrible for both case. I think it is a font problem for LM case. For other three fonts, the `\prime` looks good while using ASCII input they looks terrible. In these fonts, the primes seems to be designed as a supscripts glyph, and raising them even more does not looks good. Is there anyway to modify the behavior of the ASCII input? In addition, with Latin Modern Math, neither `''''` or `\qprime` works, they all produce nothing. I thought `''''` was supposed to use negative kern to fake the `\qprime` when it is not available. **Update** : Thanks for both @KhaledHosny and @LeoLiu's answers. Now it seems to be more complicated. Using the old TeX way to typeset primes get the position right when both prime and subscripts are presented. However, to conform the Unicode standard, I think the fonts should design the primes as superscript glyphs, which means they will look really bad when raised in superscript position. Right now my temporary solution is to use `\prime` etc. and add a negative kern between primes and subscripts.


title: Annoyance in emacs LaTeX mode involved with syntax highlighting

text: I'm using the following command in a LaTeX file to explicitly call a style file:               \bibliographystyle{$BSTINPUTS/IEEEtran}      Unfortunately emacs detects this as me entering math mode, but the latex interpreter doesn't complain because it understands the context. This is more of an annoyance than anything since it turns my entire base tex file a single color defeating the purpose of color syntax highlighting. Does anyone know a piece of elisp i could use to either alter latex mode or my .emacs file? Alternatively does anyone know of a way to "escape" the behavior of the `$` symbol yet still get the interpreter to understand that this is an env variable?


title: How could I create a diagram that looks like this?

text: I am trying to create a diagram for a document that illustrates a table. (Below is an example of how I would like it to look.) What tools should I use to replicate this? ![tables](http://i.imgur.com/xeCqY.png)


title: moderncv - how to adjust the description columns?

text: So basically the question is in the title. How can I adjust the width of the part where I put info about myself? Currently it looks like this: ![What my cv looks like now](http://i.stack.imgur.com/5IrF0.png) You see how there is weird looking break. How can I extend it so that it expands to certain width? Or so that it fits in one line? Ok, here's the MWE that's producing the same problem:               \documentclass[11pt,a4paper]{moderncv}     \moderncvtheme[green]{classic}                          % character encoding     \usepackage[utf8x]{inputenc}     \usepackage[croatian]{babel}     \usepackage{ucs}                   % replace by the encoding you are using          % adjust the page margins     \usepackage[scale=0.8]{geometry}     %\setlength{\hintscolumnwidth}{3cm}                     % if you want to change the width of the column with the dates     %\AtBeginDocument{\setlength{\maketitlenamewidth}{6cm}}  % only for the classic theme, if you want to change the width of your name placeholder (to leave more space for your address details     %\AtBeginDocument{\recomputelengths}                     % required when changes are made to page layout lengths          % personal data     \firstname{John}     \familyname{Doe}     %\title{Resumé title (optional)}               % optional, remove the line if not wanted     \address{Blabla place 14}{xxxxx Randomcity}    % optional, remove the line if not wanted     \mobile{06548946354}                    % optional, remove the line if not wanted     \phone{2314864464}                      % optional, remove the line if not wanted     %\fax{fax (optional)}                          % optional, remove the line if not wanted     \email{john.doe@some.something.com}                      % optional, remove the line if not wanted     \homepage{http://www.somepage.com}                % optional, remove the line if not wanted     %\extrainfo{additional information (optional)} % optional, remove the line if not wanted     %\photo[64pt]{picture}                         % '64pt' is the height the picture must be resized to and 'picture' is the name of the picture file; optional, remove the line if not wanted     %\quote{Some quote (optional)}                 % optional, remove the line if not wanted          % to show numerical labels in the bibliography; only useful if you make citations in your resume     \makeatletter     \renewcommand*{\bibliographyitemlabel}{\@biblabel{\arabic{enumiv}}}     \makeatother          % bibliography with mutiple entries     %\usepackage{multibib}     %\newcites{book,misc}{{Books},{Others}}          %\nopagenumbers{}                             % uncomment to suppress automatic page numbering for CVs longer than one page     %----------------------------------------------------------------------------------     %            content     %----------------------------------------------------------------------------------     \begin{document}     \maketitle     \section{Datum i mjesto rođenja}     \cventry{14.01.1955.}{Someplace}{Somecountry}{}{}{}               \section{Poznavanje jezika}     \cvlanguage{Hrvatski}{Materinji jezik}{}     \cvlanguage{Engleski}{Aktivan u jeziku i pismu}{}     \cvlanguage{Njemački}{Pasivan u jeziku i pismu}{}          \section{Računalne vještine}     \cvcomputer{Operativni sustavi}{Windows, UNIX(Linux), izvrsno poznavanje rada operativnih sustava}{}{}     \cvcomputer{Programiranje}{Osnove rada u Phythonu}{}{}     \cvcomputer{WEB dizajn}{HTML}{}{}     \cvcomputer{Office paketi}{Znanje rada s Wordom, Excellom, Powerpointom}{}{}     \cvcomputer{Adobe}{Poznavanje rada s Adobe Photoshopom, Illustratorom i InDesignom}{}{}     \cvcomputer{Hardware}{PC, mreže}{}{}          \renewcommand{\listitemsymbol}{-} % change the symbol for lists          \nocite{*}     \bibliographystyle{plain}     \bibliography{publications}       % 'publications' is the name of a BibTeX file          \end{document}


title: Table of contents (minitoc, parttoc) and line breaks

text: I have to make a table of contents for each part of a `book` document. I use `minitoc` package, and `\parttoc` command. I have line breaks (`\\\`) in the chapters and sections titles in both `[]` and `{}` options, otherwise they look ugly. In `minitoc` package, it is said that linebreaks in titles may cause the problem. The problem for my file is that LaTeX spreads the text in the title lines before `\\\` until the end of the line. (No problems in `\tableofcontents` though, but I need a table of contents for each part separately). How can I fix it? In the package description, they suggest to use `\protect\linebreak`, but where should I place it? I tried several variants, none has worked. Here is the example:               \documentclass{book}          \usepackage{minitoc}          \begin{document}          \doparttoc          \tableofcontents          \part{First Part}          \parttoc          \chapter[Chapter1 Chapter1 Chapter1 Chapter1\\Chapter1 Chapter1]{Chapter1 Chapter1 Chapter1 Chapter1\\Chapter1 Chapter1}          \section{Section1}          \chapter[Chapter2 Chapter2 Chapter2 Chapter2\\Chapter2 Chapter2]{Chapter2 Chapter2 Chapter2 Chapter2\\Chapter2 Chapter2}          \section{Section2}          \chapter[Chapter3 Chapter3 Chapter3 Chapter3\\Chapter3 Chapter3]{Chapter3 Chapter3 Chapter3 Chapter3\\Chapter3 Chapter3}          \section{Section3}          \subsection{Subsections3}          \part{Second Part}          \end{document}      Please see page 1 and 5 of the generated document for ToC and MiniToC. I need the same alignment for MiniToC as for ToC (in the names of chapters).


title: How to pass the draft option for pdfpages to \includegraphics?

text: If I use               \usepackage[draft]{pdfpages}      and include               \includepdf[...]{...}      everything works fine, i.e. instead of the included pages I get empty boxes. But if I use               \includegraphics[...]{...}      the actual picture is included. I cannot separately load "`graphicx`" because it is already loaded by "`pdfpages`". How can I pass the draft option to `\includegraphics`?


title: A related question on "\footnotetext numbering for many \footnotemark - automatic solution"

text: David Carslie proposed a solution here. The question is what to do if you have an environment that is several pages and you want the footnote to appear at the bottom of the page where the footnote mark appear not at the bottom of the last page. A minimal working example:               \documentclass{report}     \makeatletter     \newtoks\FTN@ftn     \def\pushftn{%      \let\@footnotetext\FTN@ftntext\let\@xfootnotenext\FTN@xftntext       \let\@xfootnote\FTN@xfootnote}     \def\popftn{%      \global\FTN@ftn\expandafter{\expandafter}\the\FTN@ftn}     \long\def\FTN@ftntext#1{%       \edef\@tempa{\the\FTN@ftn\noexpand\footnotetext                         [\the\csname c@\@mpfn\endcsname]}%       \global\FTN@ftn\expandafter{\@tempa{#1}}}%     \long\def\FTN@xftntext[#1]#2{%       \global\FTN@ftn\expandafter{\the\FTN@ftn\footnotetext[#1]{#2}}}     \def\FTN@xfootnote[#1]{%        \begingroup          \csname c@\@mpfn\endcsname #1\relax          \unrestored@protected@xdef\@thefnmark{\thempfn}%        \endgroup        \@footnotemark\FTN@xftntext[#1]}          \makeatother     \usepackage{framed,lipsum}     \begin{document}     \begin{framed}\pushftn     \footnote{Test}\lipsum     \end{framed}\popftn          \end{document}


title: Nature style files and figures

text: I downloaded a Nature style file from here but I don't see any images when I build my figures. Do you know if this is intentional or if I've done something wrong? If you've drafted a LaTeX paper for any Nature journal, I'd love your advice!


title: Same figure & changing text as "arrowing" through the presentation (Beamer)

text: I tried to build my first presentation and met my first problem: I would like to know how to create a part of my presentation that looks like the example below. Instead of writing 3 frames, I would lite to write 1 frame which contains a figure and some text beneath it; and I would like the text to change as I 'arrow' through the presentation, because that makes it easier to explain a figure. Otherwise, I would be forced to change the "pages" all the time back and forth. What would be annoying for my audiance.               \documentclass{beamer}     \usepackage{graphicx}          \begin{document}          \begin{frame}     \frametitle{Example}     \begin{figure}     \includegraphics[width=1\textwidth]{Figure}       \caption{Caption}     \end{figure}     bla    1     \end{frame}                    \begin{frame}     \frametitle{Example}     \begin{figure}     \includegraphics[width=1\textwidth]{Figure}       \caption{Caption}     \end{figure}     bla 2     \end{frame}          \begin{frame}     \frametitle{Example}     \begin{figure}     \includegraphics[width=1\textwidth]{Figure}       \caption{Caption}     \end{figure}     bla 3     \end{frame}          \end{document}      So in this example the figure stays the same, but the text (underneath) changes. Does anyone know how to get that result?


title: How to reduce space after the end of a tabbing environment

text: In my resume, for each of my jobs I have a tabbing environment set up for the name of the company, the city, and the dates for the job. I then would like to have the description of the job immediately following. The problem is LaTeX is adding a big space after my `\end{tabbing}`. I have been working around the problem using negative `vspace` commands, but this is sloppy and I'm sure there must be a better way to do it. Any ideas? e.g.               \newcommand{\job}[6] {       \begin{tabbing}\hspace{2.3in}\= \hspace{2in}\= \kill        {\bf #1}\>#2\> #3 -- #4 \\ %Company  City  BeginDate -- EndDate        {\bf #5: }\end{tabbing} %Position:       \vspace{-20pt} %there is a bunch of space added by \end{tabbing}       #6 %job description     }


title: htlatex leaves undefined reference ("??" link) but pdflatex produces correct output

text: We have a large document that runs through pdflatex and through htlatex. The pdflatex output is fully ok. The htlatex output is also ok (it contains all images etc.) except that for _some_ cross-references it will not create a link, but just a "??" as if the reference were undefined (but it cannot be undefined in the tex source, because the link/crossref is correctly inserted in the PDF). It only happens for this one document, so I assume there is some minor problem somewhere in it's 300 pages, but I really don't know where to start looking. (Even it's english translation works, and that's supposed to contain exactly the same references named exactly the same!) So, **is there a known pattern when htlatex would not resolve a crossreference but pdflatex would?** System: MikTeX 2.6 on Windows XP pdfLaTex command(s) used:               pdflatex -output-format=pdf -interaction=nonstopmode myfile.tex     pdflatex -output-format=pdf -interaction=nonstopmode myfile.tex     // Note that the references already work after two pdflatex runs     pdflatex -output-format=pdf -interaction=nonstopmode myfile.tex      htlatex command used: (Note that `\"` is to make htlatex.exe of MikTeX happy)               htlatex.exe \"myfile.tex\" \"html,5\" \"\" \"\" \"-interaction=nonstopmode\"      * * * **Edit** : While the command below still appears in the document, further experiments have shown that directly using \namref or \autoref also just yields `??`. The links are all created the same. They use a custom macro named `\KShortLink` that inserts a formatted link. The macro definition looks like this:               \newcommand{\KShortLink}[1]{\emph{``\nameref{#1}''} (\KLngChapName\ref{#1}\KLngOnPage\pageref{#1})}      where the other part involved build up like this:               \newcommand{\KTranslateTable}[3]{         \iflanguage{ngerman}{             \newcommand{#1}{#2}         }{}         \iflanguage{english}{             \newcommand{#1}{#3}         }{}     }          \KTranslateTable{\KLngChapName}{Kapitel\ }{Chapter\ }     \KTranslateTable{\KLngOnPage}{\ auf Seite\ }{\ on page\ }      Interestingly the english version appears to work while the german version just creates `??`.


title: Boxes in LaTeX not proper

text: > \setlength\fboxrule{2pt}\setlength\fboxsep{2mm} \fbox{ Let $f:[0,1] \to > \mathbb{R}$ be a continuous function. If $f$ is infinitely differentiable, \ > then prove that $f$ coincides with a polynomial.} When i use this command, boxes are being created but the text is not aligning properly, means the text doesn't take the next line automatically it continues in some erratic manner. I hope someone is able to understand what i want to say.


title: Make figure stick out past the margin

text: I want to use wrapfig to insert a figure which sticks out into the margin. This does not work, it causes the figure to appear at the end of the text:               {\addtolength\textwidth{1in}     \begin{wrapfigure}{r}{0.5\textwidth}       \begin{center}         \includegraphics[width=0.48\textwidth]{funcimmet1.pdf}       \end{center}       \caption{Graph of $2{{\sin }^{2}}x-1$}     \end{wrapfigure}     }      This makes the picture bigger but it doesn't stick out, it eats up more space to the left:               \addtolength\textwidth{1in}     \begin{wrapfigure}{r}{0.5\textwidth}       \begin{center}         \includegraphics[width=0.48\textwidth]{funcimmet1.pdf}       \end{center}       \caption{Graph of $2{{\sin }^{2}}x-1$}     \end{wrapfigure}     \addtolength\textwidth{-1in}      How can I do this?


title: How to denote the standard deviation with siunitx?

text: I'm certain that I saw a command generating the following kind of output the last time I read through the `siunitx` manual:               \left( 12.3 \pm 0.4 \right) V      for a measured voltage of 12.3 V and a standard deviation of 0.4 V. I can't find it by searching the manual, though. Is this capability in `siunitx`?


title: How do I get fake slant (italics) with XeLaTeX?

text: I am setting my font using this:               \setmainfont[Mapping=tex-text]{Tahoma}      But text labelled `\textit` or `\itshape` isn't appearing italicised. is there a way to setup fake italics?


title: same space between number and text in chapters/sections

text: I have been googleing for several hours now, my goal is to have the same indent for each chapter/section. Meaning there is the number but every chapter starts for example at 3cm from the left margin. Do you know what I mean? :) I am using the `titlesec` package to customize fontsize, color and so on but I havent managed to get the spacing right. Therefore I tried to do it with two parboxes like that:                   \titleformat{\section}           {\color{pt_Blau_04}\large\sffamily\bfseries}           {}           {0em}           {\parbox{1cm}{\flushleft\thesection}{\parbox{6cm}{\flushleft #1}}}           [\vspace*{5pt}]      If the chapter title is now doublespaced it looks really ugly and LaTeX just throws the parboxes around.. Do you guys know how to do it so every chapter/section/subsection starts at the same point?


title: Group glossary entries

text: I am currently writing the glossary for my Master Thesis and I would like to nest the 3 Kepler Laws under a generic "Kepler Laws" entry, but be able to call any independently. An example of what I want:               entry 1         blah, blah, blah     ...     Kepler's Laws        Kepler 1st law            blah, blah, blah        Kepler 2nd law            blah, blah, blah        Kepler 2nd law            blah, blah, blah            ...     entry last        blah, blah, blah          Any idea on how to do this? I was thinking on something along the lines of:               \documentclass{ThesisClass}     \usepackage{glossaries}          \begin{document}          \newglossaryentry{Kepler1st}{name = Kepler\'{}s 1\textsuperscript{st} Law , description = First law,}     \newglossaryentry{Kepler2nd}{name = Kepler\'{}s 2\textsuperscript{nd} Law , description = second law,}     \newglossaryentry{Kepler3rd}{name = Kepler\'{}s 3\textsuperscript{rd} Law , description = third law,}     \newglossaryentry{KeplerLaws}{name = Kepler Laws of orbital movement , description = \glsentryfull{Kepler1st}\\\\glsentryfull{Kepler2nd}\\\\glsentryfull{Kepler3rd}\\ ,}          \printglossary[style=altlist,title=Nomenclature]          \makeglossaries          \end{document}      but for that does not work, I just get empty brackets under KeplerLaws. Worst case scenario, I will just create the 3 entries and that's it, but would prefer to nest them together.


title: Add \numberline in TOC for part with scrbook

text: I'm using the `scrbook` document class for a publication. In order to properly format the part entries in the table of contents, I would like to write an entry like               \contentsline {part}{\numberline{I}Introduction}{9}{part.1}      instead of               \contentsline {part}{I\hspace {1em}Introduction}{9}{part.1}      I have no idea how to achieve this, but I mentioned, that this is true for all other levels (chapter, section, subsection and so on) already. **Edit:** Here is a minimal working example:               \documentclass[10pt,listof=totoc,numbers=noenddot,a4paper]{scrbook}     \usepackage{mathspec}     \usepackage{xunicode}     \usepackage{polyglossia}     \setmainlanguage{english}          \setkomafont{part}{\Huge}     \setkomafont{chapter}{\huge}          \usepackage{titlesec}     \titleformat{\part}[hang]{\thispagestyle{empty}\centering\sffamily\bfseries\huge}{}{0mm}{{\fontsize{36pt}{0pt}\selectfont Part \thepart\\\vspace{3mm}}}[]          \usepackage{titletoc}     \titlecontents{part}[3pc]{\addvspace{3pc}\filcenter}{\sffamily\bfseries PART \thecontentslabel\\*[.2pc]\large}{\sffamily\bfseries\large}{}[\addvspace{.5pc}]          \begin{document}          \tableofcontents          \part{First Testpart}     \section{Just a sample section}          \end{document}      **Edit 2:** The problem seems to be the `\titleformat` line. I am not able to find any hint in the documentation of titlesec for this behaviour.               \documentclass[10pt,listof=totoc,numbers=noenddot,a4paper]{scrbook}     \usepackage{titlesec}     % comment the following line out and check *.toc-file     \titleformat{\part}[display]{\centering\huge}{}{0mm}{{Part \thepart\\\vspace{3mm}}}[]          \begin{document}     \tableofcontents     \part{First Testpart}     \section{Just a sample section}     \end{document}


title: How to number slides with an increasing number of digits of pi?

text: How to number frames with an increasing number of digits of pi? Illustrative, I want the frame numbers to be like   * 3 (on the first slide)   * 3.1 (on the second slide)   * 3.14 (on the third slide) ... and so on. This is a question, which occupies me for quite some time; actually since a talk I gave on March 14th (also known as pi-day :). My present workaround is, to insert the frame numbers by hand – which is of course quite annoying when changing the order of slides.               \documentclass[t]{beamer}          \usepackage[absolute,overlay]{textpos}     \setbeamertemplate{navigation symbols}{}          \newcommand{\pifoot}[1]{         \begin{textblock*}{120mm}(0mm,84.3mm)             \raggedleft #1         \end{textblock*}     }          \begin{document}              \begin{frame}             \pifoot{3}         \end{frame}              \begin{frame}             \pifoot{3.1}         \end{frame}              \begin{frame}             \pifoot{3.14}         \end{frame}          \end{document}      **EDIT:** Based on Reds great answer I compiled an unpretentious solution. It abstains new counters in favour of the current page number.               \documentclass[t]{beamer}          \usepackage[absolute,overlay]{textpos}     \setbeamertemplate{navigation symbols}{}     \usepackage{xstring}          \setbeamertemplate{footline}{%         \begin{picture}(54,12.5)(0,0)             \put(0.9,0.52){%                 \begin{minipage}[b][12.5mm][c]{112.5mm}                      \raggedleft                      3\StrLeft{.141592653589793238462643383279502884197169399375105820974944592307816406286 208998628034825342117067982148086513282306647093844609550582231725359408128481}{\arabic{framenumber}}                 \end{minipage}             }         \end{picture}     }          \begin{document}         \begin{frame}         \end{frame}              \begin{frame}         \end{frame}     \end{document}


title: How to add a hyperlink to a multiline element in a table, which uses makecell?

text: I've an existing table in LaTeX (for my resume), which uses `makecell` package to produce the formatted output in multiple lines for each entry. Example of one row:               2007 & \makecell[c] {Bachelor of Engineering in\\ XYZ Engineering}             & \makecell[c] {A.B.C \\ University, PQR}           & 80\%  \\      I'm trying to embed a hyperlink (so that clicking on the name of the Institute would take the reader to the corresponding webpage) using the `hyperref` package. So, I tried this (for each line) :               2009 & \makecell[c] {Master of Technology in\\  Computer Science}          & \makecell[c] {\href{http://www.xyz.ac.in/}{XYZ Institute\\ RST}}               &  90\% \\      But I'm getting errors as follows:               ! Missing \endgroup inserted.     <inserted text>     \endgroup      What am I doing wrong ? Also, is it even possible to have a multi-row entry pointing to a single link (or do I have to either make it a single row first, give the link separately etc)?


title: TikZ code for drawing an icosahedron and labeling

text: I found TikZ code for drawing an icosahedron here:               \NeedsTeXFormat{LaTeX2e}[1995/06/01]     \documentclass[a4paper]{amsart}     \usepackage{graphics, tikz, tkz-berge, tkz-graph}     \begin{document}     \begin{figure}     \begin{tikzpicture}       \begin{scope}[rotate=90]         \grIcosahedral[form=1,RA=3,RB=1.5]         \SetUpEdge[color=white,style={double=black,double distance=2pt}]         \EdgeInGraphLoop{a}{6}         \EdgeFromOneToSel{a}{b}{0}{1,5}         \Edges(a2,b1,b3,b5,a4)         \Edge(a3)(b3)         \Edges(a1,b1,b5,a5)         \Edges(a2,b3,a4)       \end{scope}     \end{tikzpicture}     \end{figure}     \end{document}      The output is: ![icosahedron](http://graphtheoryinlatex.files.wordpress.com/2012/03/wpid- icosa2d2.png?w=600) which is very nice, but I want to label the vertices v_1, v_2, ..., v_12 instead of a's and b's. However, I don't know how to change the code so that the labels will be different. I tried to simply replace all the a's in the code by v's but that gives an error.


title: Word stacking in math mode

text: I have this wordy equation and don't have much room in my two-column article style. I want to stack small expressions with a "partial line break", so as to save room. I figured it out, but it isn't natural at all:               \begin{alignat*}{6}     Total\; expected\; loss\; of\; diversity\; = \\     \sum_{\substack{all\\languages}}             (_{Distinctiveness}^{\;\;\;\;\; Language}) \cdot \Pr(_{\;\;\;\;\:dies}^{Language})      \end{alignat*}      I feel like a twelve-year-old designing a webpage with non-ending `<br/>` strings Is there a designated feature for this kind of thing? ![The result I have with the code above, which I would like with better code](http://i.stack.imgur.com/5Qr8Z.png)


title: Package with an environment-based sectioning mechanism?

text: Is there any package for LaTeX that performs sectioning using environments, where doing something like               \begin{section}[Section Title]         \begin{section}[Subsection Title]       \begin{section}[Subsubsection Title]       \begin{section}[Subsubsubsection Title]         \end{section}       \end{section}       \end{section}       \end{section}      does the obvious thing (please infer from the stuff in the `[]`'s!)?


title: 7-2012 l3kernel & l3packages updates | 'broken'?

text: After installing recent updates to `l3kernel` and packages (both packaged 2012-07-19) on my MikTeX 2.9 system, several things seem to have broken:   1. docs relying on `unicode-math` no longer compile properly (math fonts all upright, not italic) see - Cambria Math becomes plain Cambria   1. `chemnum` also seems to have stopped functioning properly see- Chemnum does not work since last l3package udpate So, beyond the specifics of the issue, when this sort of thing happens, what is the preferred course of 'reporting' such a problem? is there a way to get older versions of a package, to 'roll back' to confirm that the problem originates with the 'newest version' of a package? **Quick additional comment** : although not a rigorous test - a colleague who is 'celver' enough not to have update l3kernel and l3packages reports no problem with compilations. Again, not rigorous, but consistent with my working hypothesis that l3kernel and l3packages updates are the culprit.


title: Biber not producing any output file

text: Biber is said to have many advantages for those writing in languages other than English but I have been unable to get the results I used to have with bibtex. I have Lyx 2.0.5.1, biblatex 1.7, and biber 0.9.9. In my example the citation will show up but not the list of references. This is probably due to the fact that Biber fails to produce a `.bbl` output although it claims to do so. But why? Example:               \documentclass[ngerman,headings=normal]{scrartcl}     \usepackage[style=apa,backend=biber,natbib=true,bibencoding=auto]{biblatex}     \DeclareLanguageMapping{ngerman}{ngerman-apa}     \addbibresource{Egg1975.bib}     \usepackage{babel}     \begin{document}     Test (\citealt{Egg1975}, 89 Fn.~1)     \printbibliography     \end{document}      .bib:               % This file was created with JabRef 2.8.1.     % Encoding: ISO8859_15     @ARTICLE{Egg1975,       author = {Egg, Rudolf E.},       title = {{S}ozialtherapie in {E}rlangen: {M}ethoden und erste {A}uswirkungen         einer {V}ersuchs- und {E}rprobungsanstalt},       journal = {Bewährungshilfe},       year = {1975},       volume = {22},       pages = {87-102},       hyphenation = {german},       owner = {adessec},       timestamp = {2012.12.11}     }      .blg:               [0] Config.pm:300> INFO - This is Biber 0.9.9     [0] Config.pm:303> INFO - Logfile is 'TestBiberMWE.blg'     [1] biber:145> INFO - === Do Jan 10, 2013, 13:46:34     [1] Biber.pm:271> INFO - Reading 'TestBiberMWE.bcf'     [20] Biber.pm:586> INFO - Found 1 citekeys in bib section 0     [31] Biber.pm:2585> INFO - Processing bib section 0     [50] Biber.pm:2677> INFO - Looking for bibtex format file 'Egg1975.bib' for section 0     [79] bibtex.pm:708> INFO - Found BibTeX data source '/home/adessec/texmf/bibtex/bib/Egg1975.bib'     [112] Biber.pm:2480> INFO - Sorting list 'MAIN' keys     [112] Biber.pm:2484> INFO - No sort tailoring available for locale 'de_DE.UTF-8'     [126] Biber.pm:2480> INFO - Sorting list 'SHORTHANDS' keys     [126] Biber.pm:2484> INFO - No sort tailoring available for locale 'de_DE.UTF-8'     [128] bbl.pm:427> INFO - Writing 'TestBiberMWE.bbl' with encoding 'ascii'     [128] bbl.pm:498> INFO - Output to TestBiberMWE.bbl


title: chapter no newpage and headings

text: I have a document (`scrbook` class), in which I want some chapters not to start on a new page. I therefore defined the following:               %define a chapter that does not add space at the top of the page     \usepackage{etoolbox}     \makeatletter     \let\chapterNoSpace\chapter      \patchcmd\chapterNoSpace{\if@openright\cleardoublepage\else\clearpage\fi}{}{}{}     \patchcmd{\chapterNoSpace}{\thispagestyle{plain}}{\thispagestyle{fancy}}{}{}     \makeatother      This does nearly what I want. However, there are three problems:   1. I need to add a new paragraph before any `\chapterNoSpace` command, or it will put the chapter directly on the same line as the last text.   2. On the page where the chapter starts, I am missing my headers.   3. If the command coincides with a new page, the headers are missing on the page before and there is a spurious `\vskip` before the heading, which looks odd. I added a minimal script below.               \documentclass[11pt, a4paper, twoside, openany]{scrbook}     %headers     \usepackage{fancyhdr}\pagestyle{fancy}     \renewcommand{\chaptermark}[1]{\markboth{\thepart.\ #1}{}}     \renewcommand{\sectionmark}[1]{\markright{\thepart.\thechapter.\ #1}}     \fancyhf{}     \fancyhead[LE,RO]{\thepage}     \fancyhead[LO]{\rightmark}     \fancyhead[RE]{\leftmark}     \fancypagestyle{plain}{\fancyhead{}\renewcommand{\headrulewidth}{0pt}}          %Define a chapter that doesn't start on new page     \usepackage{etoolbox}     \makeatletter     \let\chapterNoSpace\chapter      \patchcmd\chapterNoSpace{\if@openright\cleardoublepage\else\clearpage\fi}{}{}{}     %\renewcommand*{\chapterheadstartvskip}{\vspace*{1cm}}     %\patchcmd\chapterNoSpace{\chapterheadstartvskip}{\vspace{1cm}}{}{}     \patchcmd{\chapterNoSpace}{\thispagestyle{plain}}{\thispagestyle{fancy}}{}{}     \makeatother     \begin{document}     \part{Part 1}     \chapter{Normal chapter 1}     text text text text text text     \chapter{Normal chapter 2}     text text text text text     \chapterNoSpace{Chapter on same page 1}     text text text          \chapterNoSpace{Chapter on same page 2 with line brake above}     text text text     \chapter{Normal chapter 3}     text text text          \end{document}      Any suggestions?


title: Strange behavior of mdframed with pstricks as framemethod

text: I load the `mdframed` package from a class of my own with the line               \RequirePackage[framemethod=pstricks]{mdframed}      When using the `XeLaTeX` engine I get a strange behavior from the `mdframed` environment defined as               \newmdenv[%        skipabove=\baselineskip,         skipbelow=\baselineskip,        leftmargin=0pt,        rightmargin=0pt,        linecolor=black,        shadow=false,        backgroundcolor=white,        pstrickssetting={shadow=true,blur=true,        shadowsize=2pt,shadowcolor=darkgray}     ]{remarksbox}      The strange behavior appears when the frame is split across two pages, in which case I get a solid shadow as opposed to the blurred form I am defining for the environment. When there is no frame splitting, it works just right and I get a fading shadow. The following lines can be considered as providing an MWE:               \documentclass{memoir}          \usepackage{xcolor,pstricks,pst-blur,lipsum}     \usepackage[framemethod=pstricks]{mdframed}          \newmdenv[skipabove=\baselineskip,     skipbelow=\baselineskip,     leftmargin=0pt,     rightmargin=0pt,     linecolor=black,     shadow=false,     outerlinewidth=0pt,%0.4pt,     frametitle=Remarks,     frametitlefont=\normalfont\normalsize,     frametitlerule=false,     backgroundcolor=white,     pstrickssetting={shadow=true,blur=true,     shadowsize=3pt,shadowcolor=gray}]{remarksbox}          \begin{document}     \lipsum[1-2]     \begin{remarksbox}     \lipsum[3-4]     \end{remarksbox}     \lipsum[5-10]     \begin{remarksbox}     \lipsum[11-15]     \end{remarksbox}     \end{document}      Can anybody replicate this behavior with the environment I've just defined? Besides, the shadow under the environment's title looks awful. How can it be suppressed?


title: Automatically add braces after underscore or caret in TeXnicCenter?

text: Is there any option for adding automatically braces after `_` or `^` in TeXnicCenter?


title: Problems installing xpatch

text: I need to install the xpatch package to make changes to my biblatex setup. The readme file in the install package simply says to run “latex xpatch.ins.” I've moved the xpatch folder (including xpatch.ins and xpatch.dtx files) to the /usr/local/texlive/2011/../texmf-local/ folder. When I run the command above, I get the output `Generating file(s) ./xpatch.sty ! Cannot find file xpatch.dtx. \readsource ...ot find file \uptospace #1 \qStop } \else \processedLines \z@ ... l.34 ...xpatch.sty} {\from{xpatch.dtx} {package}}} ` I've checked, and the .dtx file is in the folder. Any ideas what the problem is?


title: Get or change ConTeXt path for components/projects/environment

text: How does one get items in subdirectories or change the path that ConTeXt uses to get components, environments, and project files? In other words, how might one set up a hypothetical directory structure like this:                 garden/         project.tex         env/env.tex         components/X.tex         components/Y.tex         products/X.tex         products/B.tex      So that in `products/X.tex` one could load `\component components/X` (or `\component{components/x.tex}` or some working variant of those) to load the respective component. This does not seem to work, and ConTeXt logs `system > jobfiles > unknown tex file 'components/X'`. Section 2.4 of the ConTeXt the manual states: > A file that is not available on the working directory is searched for on the > parent directories. Though that said, I note that when I use e.g. `header.tex`, put it in the `garden/` directory, and reference it from a product, the actual `header.tex` that gets loaded is `/usr/local/texlive/2014/texmf-dist/doc/latex/epslatex- fr/header.tex`. What am I missing here? I am using ConTeXt 0.60 (2014.05.21 22:04) from MacTeX, and running context with `context x.tex`. * * * **Edit** For what it's worth, the error seems to be from file-job.lua#L169, calling `commands.uselibrary`, and eventually (presumably) getting to `file- res.lua#L29::readfilename`, which ought to be doing the resolution. Also, noting the Project Structure page of the Context Garden Wiki and Context Magazine 1101, which indicates that subpaths are permitted. Also, when I run `\enabletrackers[resolvers.readfile]` I note the following is sent to the logs: ` files > readfile > not found by backtracking: ../type-imp-loc.mkiv files > readfile > not found by backtracking: ../../type-imp-loc.mkiv files > readfile > not found by tree lookup: type-imp-loc.mkiv files > readfile > not found by backtracking: ../type-imp-loc.tex files > readfile > not found by backtracking: ../../type-imp-loc.tex files > readfile > not found by tree lookup: type-imp-loc.tex files > readfile > not found by backtracking: ../type-loc.mkiv files > readfile > not found by backtracking: ../../type- loc.mkiv files > readfile > not found by tree lookup: type-loc.mkiv files > readfile > not found by backtracking: ../type-loc.tex files > readfile > not found by backtracking: ../../type-loc.tex files > readfile > not found by tree lookup: type-loc.tex fonts > 'fallback modern-designsize rm 12pt' is loaded system > jobfiles > unknown tex file 'components/X' system > jobfiles > unknown tex file 'components/Y' ` and with `\enabletrackers[context.trace]`: ` cld > tex > f : 8 : \starttext cld > tex > w : - : \processfilemany{components/header.tex} cld > tex > f : 8 : \stoptext cld > tex > w : - : \dostarttextfile{components/header} system > jobfiles > unknown tex file 'components/header' cld > tex > f : 8 : \dostoptextfile ` The `products/X.tex` is:               \startproduct X       \component components/X     \endproduct      And `components/X.tex`:               \startcomponent X       \component components/X     \endcomponent      (I have intentionally chosen the ambiguous `X` for both product and component since I expect to have this conflict at some point and would rather know sooner rather than later the implications.) So it would seem that `\component` is not calling the readfile resolver mechanism for some reason.


title: What is the height above the baseline to the middle of an open bracket?

text: So I have a rule pointing at the middle of the following text. I have achieved this with the following code:               \newlength{\Fraiseheight}     \setlength{\Fraiseheight}{1ex}     \addtolength{\Fraiseheight}{-\Flinewidth}          \newlength{\Fbaselength}     \setlength{\Fbaselength}{20pt}          \newlength{\Flinewidth}     \setlength{\Flinewidth}{0.5pt}          \rule[\Fraiseheight]{\Fbaselength}{\Flinewidth}      The height `1ex` is the height of an `x` in current font. This raises my rule higher than the centre of an open bracket that follows. This looks awkward especially for curly brackets. My question is: What height above the baseline do I need to achieve the following effect: "-(x" or "-{x" where the - is supposed to represent my rule and the x is present to show the discrepancy between the height `1ex` and that of the - character.


title: Center Aligning Labels in a enumerate environment

text: I am trying to get enumerate environment do the following:                    (subgroup)   some description of a subgroup of a group G.           (hello!)    This subgroup is a hello subgroup of G and satisfies an                       awkward  condition that it does not occur often!         (long enough) It also satisfies long enough condition so that it is not trivial!      Based on the answer of Peter Grill and the ensuing discussion here, I came up with the following code:               \documentclass{article}     \usepackage{enumitem}     \SetLabelAlign{Center}{\makebox[1em]{(#1)}}     \begin{document}     \begin{enumerate}[align=Center]     \item[subgroup] Some description of a subgroup of a group $G$.     \item[hello!] This subgroup is a hello subgroup of G and satisfies an awkward  condition that it does not occur often!     \item[long enough] It also satisfies long enough condition so that it is not trivial!     \end{enumerate}     \end{document}      This leaves me with: ![mwe.png](http://i.stack.imgur.com/eBPzI.png) I'd be glad if somebody can help me fix this code! **Edit** Playing around a little bit, I figure that increasing the `\makebox` width(?), I could get it to write things without overlapping. But, this breaks alignment. Could someone please explain this?


title: minted package: Undefined control sequence

text: I just installed the minted package to type prettier code in my university reports, I'm trying it out but I keep getting the same messages when compiling: This is the source:               \documentclass{report}     \usepackage{minted}     \begin{document}     \begin{minted}{c}       int i,j,k,n;     \end{minted}     \end{document}      I compile it with:               pdflatex --shell-escape source.tex          This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)      \write18 enabled.     entering extended mode     (./source.tex     LaTeX2e <2009/09/24>     Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh     yphenation, spanish, galician, catalan, loaded.     (/usr/share/texmf-texlive/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/usr/share/texmf-texlive/tex/latex/base/size10.clo)) (./minted.sty     (/usr/share/texmf-texlive/tex/latex/graphics/keyval.sty)     (/usr/share/texmf-texlive/tex/latex/fancyvrb/fancyvrb.sty     Style option: `fancyvrb' v2.7a, with DG/SPQR fixes, and firstline=lastline fix      <2008/02/07> (tvz)) (/usr/share/texmf/tex/latex/xcolor/xcolor.sty     (/etc/texmf/tex/latex/config/color.cfg)     (/usr/share/texmf-texlive/tex/latex/pdftex-def/pdftex.def))     (/usr/share/texmf-texlive/tex/latex/float/float.sty)     (/usr/share/texmf-texlive/tex/latex/base/ifthen.sty)     (/usr/share/texmf-texlive/tex/latex/tools/calc.sty) (./ifplatform.sty))     ! Undefined control sequence.     \minted.sty-h@@k ...elax  \ifnum \pdf@shellescape                                                        =1\relax \else \PackageErr...     l.3           ? ! Missing number, treated as zero.     <to be read again>                         =     l.3           ?      ! Package minted Error: You must invoke LaTeX with the -shell-escape flag.          See the minted package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.3           ? /usr/bin/pygmentize     (./source.aux) (/usr/share/texmf-texlive/tex/context/base/supp-pdf.mkii     [Loading MPS to PDF converter (version 2006.09.02).]     ) (./source.pyg) (./source.out.pyg) [1{/var/lib/texmf/fonts/map/pdftex/updmap/p     dftex.map}] (./source.aux) )</usr/share/texmf-texlive/fonts/type1/public/amsfon     ts/cm/cmr10.pfb></usr/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmtt10     .pfb>     Output written on source.pdf (1 page, 18733 bytes).     Transcript written on source.log.      The output looks as expected but why does all of these messages appear?


title: Vertically center contents of table cell

text: Consider the following example:               \documentclass{article}          \usepackage{pstricks-add}     \usepackage{booktabs}               \psset{       unit = 0.7,       dimen = middle,       ticks = none,       labels = none     }          \newcommand*\pind[2]{%      \psset{linecolor = red}       \psline(#1,0)(#1,#2)       \psline(!#1 0.2 sub #2)(!#1 0.2 add #2)     }     \newcommand*\enkeltobservationer{%       \begin{pspicture}(-0.5,-0.2)(5.9,6.3)         \psaxes{->}(0,0)(-0.2,-0.2)(5.4,5.5)[\small{$x$},0][\small{$h(x)$},90]         \pind{0.5}{3}         \pind{1.0}{5}         \pind{1.5}{3}         \pind{2.0}{3}         \pind{2.5}{4}         \pind{3.0}{2}         \pind{3.5}{5}         \pind{4.0}{1}         \pind{4.5}{4}         \pind{5.0}{2}       \end{pspicture}%     }     \newcommand*\soejle[2]{%      \psset{fillcolor = red}       \psframe[fillstyle = solid](!#1 0.5 sub 0)(#1,#2)     }     \newcommand*\intervaller{%       \begin{pspicture}(-0.5,-0.2)(5.9,6.3)         \psaxes{->}(0,0)(-0.2,-0.2)(5.4,5.5)[\small{$x$},0][\small{$h(x)$},90]         \soejle{0.5}{3}         \soejle{1.0}{5}         \soejle{1.5}{3}         \soejle{2.0}{3}         \soejle{2.5}{4}         \soejle{3.0}{2}         \soejle{3.5}{5}         \soejle{4.0}{1}         \soejle{4.5}{4}         \soejle{5.0}{2}       \end{pspicture}%     }               \begin{document}          \begin{table}      \centering       \begin{tabular}{l c c c}         \toprule          Begreb               &          Forkortelse          &          Enkeltobservationer  &          Intervaller            \\          \midrule          Hyppighed            &          $h(x)$               &          \enkeltobservationer &          \intervaller           \\         \bottomrule        \end{tabular}     \end{table}          \end{document}      ![output](http://i.stack.imgur.com/Sa8Zp.jpg) I would like to vertically center `Hyppighed` and `$h(x)$` relative to the figures; how do I do that?


title: Aligning equals signs across Beamer blocks

text: I've got a Beamer frame consisting of two blocks that contain some equations:               \begin{frame}       \frametitle{Modell}       \begin{block}{A  $(X_{t})$}         \begin{align*}         X_{t} = \epsilon_{t} \quad \text{mit} \quad \epsilon_{t}         \overset{iid}{\sim} \mathcal{N}\left(0, \sigma_{X}^{2}\right)         \end{align*}       \end{block}       \begin{block}{B $(Y_{t})$}         \begin{align*}           Y_{t} &= \sigma_{Y,t}\: \eta_{t}, \\ \sigma_{Y,t}^{2} &= \omega + \alpha_{Y} Y_{t-1}^{2} + \beta_{Y}\sigma_{Y,t-1}^{2} \quad \text{mit} \quad  \sqrt{\frac{\nu}{\nu-2}}\cdot \eta_{t} \overset{iid}{\sim} t\left(\nu\right).          \end{align*}       \end{block}          \end{frame}      I would like like for _all_ equals signs to be aligned, in other words I would like alignment across my two blocks. Normally I would use `intertext` but since I'm dealing with two block environments I don't think that would work. Thanks!


title: Can't include pspicture code

text: I am trying to create a presentation using `beamer`. In my presentation I need to include a picture created by LaTeXDraw software. I pasted the code to draw the picture inside the frame, but it is not being compiled with error report: > Undefined Control Sequence `\end{frame}` Here is the code:               \documentclass{beamer}     \usetheme{default}     \usepackage{epstopdf}     \usepackage{pstricks-add}     \begin{document}          \begin{frame}{First One}     % Generated with LaTeXDraw 2.0.8     % Fri Feb 28 12:28:30 BDT 2014     % \usepackage[usenames,dvipsnames]{pstricks}     % \usepackage{epsfig}     % \usepackage{pst-grad} % For gradients     % \usepackage{pst-plot} % For axes     \scalebox{1} % Change this value to rescale the drawing.     {     \begin{pspicture}(0,-1.38)(7.92,1.38)     \psdots[dotsize=0.12](0.06,1.3)     \psdots[dotsize=0.12](0.86,1.3)     \psdots[dotsize=0.12](0.46,0.9)     \psdots[dotsize=0.12](0.46,0.3)     \psline[linewidth=0.04cm](0.08,1.3)(0.46,0.92)     \psline[linewidth=0.04cm](0.46,0.9)(0.46,0.32)     \psline[linewidth=0.04cm](0.46,0.94)(0.86,1.3)     \psdots[dotsize=0.12](2.06,0.9)     \psdots[dotsize=0.12](2.64,0.9)     \psdots[dotsize=0.12](3.24,0.9)     \psdots[dotsize=0.12](3.84,0.9)     \psline[linewidth=0.04cm](2.08,0.9)(2.64,0.9)     \psline[linewidth=0.04cm](2.66,0.9)(3.26,0.9)     \psline[linewidth=0.04cm](3.26,0.9)(3.82,0.9)     \psdots[dotsize=0.12](4.84,1.3)     \psdots[dotsize=0.12](4.84,0.5)     \psdots[dotsize=0.12](5.44,0.9)     \psdots[dotsize=0.12](6.24,0.9)     \psline[linewidth=0.04cm](4.84,1.28)(4.84,0.52)     \psline[linewidth=0.04cm](4.84,1.32)(5.46,0.9)     \psline[linewidth=0.04cm](4.84,0.48)(5.46,0.92)     \psline[linewidth=0.04cm](5.46,0.9)(6.26,0.9)     \psdots[dotsize=0.12](7.06,1.3)     \psdots[dotsize=0.12](7.84,1.3)     \psdots[dotsize=0.12](7.84,0.5)     \psdots[dotsize=0.12](7.06,0.48)     \psline[linewidth=0.04cm](7.06,1.3)(7.86,1.3)     \psline[linewidth=0.04cm](7.86,1.3)(7.86,0.52)     \psline[linewidth=0.04cm](7.84,0.46)(7.06,0.46)     \psline[linewidth=0.04cm](7.06,0.48)(7.08,1.34)     \psdots[dotsize=0.12](2.26,-0.3)     \psdots[dotsize=0.12](2.26,-1.3)     \psdots[dotsize=0.12](1.24,-0.8)     \psdots[dotsize=0.12](3.22,-0.8)     \psline[linewidth=0.04cm](2.28,-0.3)(2.28,-1.26)     \psline[linewidth=0.04cm](1.22,-0.78)(2.32,-0.3)     \psline[linewidth=0.04cm](1.28,-0.8)(2.26,-1.28)     \psline[linewidth=0.04cm](2.3,-1.28)(3.2,-0.8)     \psline[linewidth=0.04cm](2.28,-0.28)(3.22,-0.8)     \psdots[dotsize=0.12](6.04,-0.08)     \psdots[dotsize=0.12](5.06,-1.3)     \psdots[dotsize=0.12](7.26,-1.3)     \psdots[dotsize=0.12](6.12,-0.8)     \psline[linewidth=0.04cm](6.04,-0.1)(5.04,-1.3)     \psline[linewidth=0.04cm](5.08,-1.3)(7.26,-1.28)     \psline[linewidth=0.04cm](7.26,-1.3)(6.04,-0.04)     \psline[linewidth=0.04cm](6.04,-0.04)(6.14,-0.78)     \psline[linewidth=0.04cm](5.04,-1.3)(6.12,-0.8)     \psline[linewidth=0.04cm](6.12,-0.8)(7.22,-1.26)     \end{pspicture}      }          \end{frame}          \end{document}      Everything between `\begin{frame}` and `\end{frame}` is crated by LaTeXDraw. What is wrong?


title: Want to make the colorful table in LaTeX

text: I make this Table MS Word. But I am interest to make this Table in LaTeX![enter image description here](http://i.stack.imgur.com/Z8XNu.jpg)               % Table generated by Excel2LaTeX from sheet 'Sheet2'     \begin{table}[htbp]     \centering     \caption{Add caption}     \begin{tabular}{rcrrr}     %\toprule     \multirow{2}[2]{*}{} & \textbf{} & \multicolumn{1}{c}{\textbf{Development}} &    \multicolumn{1}{c}{\textbf{}} & \multicolumn{1}{c}{\textbf{}} \\     %\midrule           & \textbf{License} & \multicolumn{1}{c}{\textbf{Language}} & \multicolumn{1}{c}{\textbf{Platforms}} & \multicolumn{1}{c}{\textbf{Support}} \\     \multicolumn{1}{c}{\textbf{}} & \textbf{} & \multicolumn{1}{c}{\textbf{}} & \multicolumn{1}{c}{\multirow{2}[1]{*}{\textbf{Linux/Unix, Windows, MAC OSX}}} & \multicolumn{1}{c}{} \\     \multicolumn{1}{c}{\textbf{Julius}} & \textbf{BSD} & \multicolumn{1}{c}{\textbf{C}} & \multicolumn{1}{c}{} & \multicolumn{1}{c}{\textbf{_}} \\     \multicolumn{1}{c}{\textbf{}} & \multirow{3}[0]{*}{\textbf{Prohibits redistributions and commercial use but R \& D allowed}} & \multicolumn{1}{c}{\textbf{}} & \multicolumn{1}{c}{\textbf{}} & \multicolumn{1}{c}{\textbf{}} \\     \multicolumn{1}{c}{\textbf{}} &       & \multicolumn{1}{c}{\textbf{}} & \multicolumn{1}{c}{\textbf{Windows, Linux/Unix, MAC OSX}} & \multicolumn{1}{c}{\textbf{HTK Book, Active Mailing List}} \\     \multicolumn{1}{c}{\textbf{HTK}} &       & \multicolumn{1}{c}{\textbf{C}} &       &  \\     \multicolumn{1}{c}{\textbf{}} & \textbf{} & \multicolumn{1}{c}{\textbf{}} & \multicolumn{1}{c}{\textbf{}} & \multicolumn{1}{c}{\textbf{}} \\     \multicolumn{1}{c}{\textbf{}} & \textbf{} & \multicolumn{1}{c}{\textbf{}} & \multicolumn{1}{c}{\textbf{Linux/Unix, Windows, MAC OSX}} & \multicolumn{1}{c}{\textbf{Very well documented}} \\     \multicolumn{1}{c}{\textbf{Sphinx}} & \textbf{BSD} & \multicolumn{1}{c}{\textbf{C, JAVA}} &       &  \\           & \textbf{} &       &       &  \\           & \textbf{} &       &       &  \\           & \textbf{} &       &       &  \\     \multicolumn{1}{c}{\textbf{}} & \textbf{} & \multicolumn{1}{c}{\textbf{}} &     \multicolumn{1}{c}{\textbf{}} & \multicolumn{1}{c}{\textbf{}} \\     \multicolumn{1}{c}{\textbf{ISIP ASR}} & \textbf{Public domain (no restrictions)} &    \multicolumn{1}{c}{\textbf{C++}} & \multicolumn{1}{c}{\textbf{Windows}} & \multicolumn{1}{c}{\textbf{_}} \\     %\bottomrule     \end{tabular}%     \label{tab:addlabel}%     \end{table}%      I generate this code through Excel2LaTeX. But this is not working.


title: Roman chapter numbers cause overfull hbox in titletoc-ToC

text: `Overfull hbox` in ToC after chapter numbers changed to `Roman`; see MWE below. With the `tocloft` package `\setlength\cftchapternumwidth{3em}` solves the problem. **But** : Is there any solution to the problem _NOT_ using `tocloft` but `titletoc`?               \documentclass{book}          \usepackage{titletoc}          \begin{document}     \renewcommand{\thechapter}{\Roman{chapter}}     \setcounter{chapter}{7}     \tableofcontents     \chapter{Lipsum}     \section{Introduction}     \subsection{Introduction to introduction}     \subsubsection{Introduction to introduction to introduction}     \end{document}      PS: I have specified certain things in the ToC using `titletoc` and would be glad not to have to do everything again with `tocloft`. That's why I want to avoid the `tocloft` solution!


title: Define a new \XXseries macro for light fonts

text: Is ist possible to define a new series with `fontspec`? I tried the following but …   1. it throws an error if the font doesn’t have a light version instead of replacing the font, like `\bfseries` does. In other word there’s no fallback.   2. my `\ltseries` isn’t deactivated by `\mdseries`.               \documentclass{article}          \usepackage{fontspec}     \setmainfont{Source Sans Pro}        % http://www.google.com/fonts/specimen/Source+Sans+Pro          \newcommand{\ltseries}{%        \addfontfeatures{UprightFont={* Light},ItalicFont={* Light Italic}}%     }          \begin{document}     \ltseries     Light          \mdseries     Regular          \bfseries     Bold     \end{document}      If found Possible values for \fontseries and \fontshape but it doesn’t tell how to define a new series. Furthermore this is for LaTeX and it’s NFSS, while I’m using XeTeX with `fontspec`.


title: Bending arrows with XY

text: I'm in trouble with the following diagram:               \[     \xymatrix{     &  & & &    & & X_1\times_Y X_2\ar@/_1pc/[dllll]\ar[dll]\ar[dddd]\\     &  & X_1 \times_Z X_2\ar[dl]\ar[rr]\ar[dd] & & X_1\ar[dd]\ar[dl] &  &\\     & Y\times_Z Y\ar[rr]\ar[dd]  & & Y\ar[dd] & & &     \\     &  & X_2 \ar[rr]\ar[dl] & & Y\ar[dl] & & \\     &  Y  \ar[rr] & & Z & & & Y\ar[lll] \ar@{-}[ull] \\     &&&&&&     }     \]      I would like to draw a long bending arrow from $Y$ to $Y\times_Z Y$, which goes under the last line, like I partially managed to do here with the command `\ar `d[rr]`[llllll]`[uu]`[rrr]`: ![enter image description here](http://i.stack.imgur.com/A6tbS.png) Unfortunately the xypic documentation (par. 2.8) is as clear as the Voynich manuscript, so I'm, not able to interpret how it has to be drawn.