title: How to draw arcs linking two points in TikZ?

text: I am a beginner in LaTeX, tentatively using it for industrial documents. I am having difficulties with drawing arcs in TikZ. In the MWE, I am trying a routine that would draw a series of coding mechanical keys, in order to clarify the coding pattern. (It is based on protrusions that should be aligned with some of the numbers shown) Each key is a hollow cylinder, outer dia `\DiaExt`, section shown in orange, and there is one or several protrusions, width `\KeyWidth`, placed at different angles on the outer envelope. (only one is shown tentatively in the MWE by showing the 4 envelope points). Their location is now calculated in the code.The points black and green should be connected by a vertical segment, the points red and blue also. The lower points green and blue are to be connected by an arc diameter `\DiaExt`. In fact in the final picture, all the points are to be connected and the inner area filled in orange, to make a continuum with the orange area. My problem is:   1. how to draw the arcs connecting the upper points black and red, and the lower points blue and green? (Problem solved in the edited code using the proposal from Altermundus)    2. How to draw the path between the points black, red, blue green automatically, in such a way that several other keys could be made on the same principle.   3. I have found a way to adjust the size of the engraved numbers to match the reel parts, but not in a way that adjusts if the scale of the picture is modified. Is there a way to make the size of the numbers following the scale of the main picture?               \documentclass{minimal}     \usepackage{tikz}     \usetikzlibrary{calc}     \usepackage{scalefnt}     \usepackage[T1]{fontenc} % Usual fonts     \usepackage{tgheros,textcomp}% Fonts          \renewcommand{\familydefault}{\sfdefault}          \begin{document}     \def\magnif{4} %picture magnification ratio     \def\KeyAngle{0} %Angular position of key          \def\DiaShellMachining{0.925}     \def\DiaExtKey{.76}     \def\DiaExt{0.63}     \def\DiaInt{0.5}     \def\KeyWidth{0.32}          {\scalefont{3.1}     \begin{tikzpicture}[scale=\magnif]          \clip (-1,-1) rectangle (1,1);     \draw  [gray] (0,0) circle (\DiaShellMachining/2);          \draw [](0.31, 0.57) node (one) {1}; % first engraved characters     \draw [](0.09, 0.6) node (two) {2};     \draw [](-0.16, 0.6) node (three) {3};     \draw [](-0.37, 0.55) node (four) {4};     \draw [](-0.31,-0.5) node (five) {5};     \draw [](0.345,-0.5) node (six) {6}; %last engraved character          \draw [very thick, color=gray, rounded corners=10mm] (0.49750,-0.5225) rectangle (2.91,.8225); %Shell     \draw [very thick,  color=gray, rounded corners=10mm] (-0.49750,-0.5225) rectangle (-2.91,.8225); %Shell     \draw [ultra thick, color=gray] (-2, 0.9075) -- (2, 0.9075);%Shell upper limit     \draw [ultra thick, color=gray] (-2, -0.6075) -- (2, -0.6075);%Shell lower limit          \fill[orange,even odd rule] (0,0) circle(\DiaInt/2) circle(\DiaExt/2); %Painted ring at front of key          \begin{scope}[rotate=\KeyAngle]          \pgfmathparse{0.5*\DiaExtKey*cos(asin (\KeyWidth/(\DiaExtKey)))} \let\Youter\pgfmathresult          \pgfmathparse{0.5*\DiaExt*cos(asin (\KeyWidth/(\DiaExt)))} \let\Yinner\pgfmathresult          \draw  [color=black] (-0.5*\KeyWidth, \Youter) node (a) {.};     \draw  [color=red] (0.5*\KeyWidth, \Youter)  node (b) {.};     \draw  [color=blue]  (0.5*\KeyWidth, \Yinner)  node (c) {.};     \draw  [color=green]  (-0.5*\KeyWidth, \Yinner)  node (d) {.};          \pgfmathparse{(\Youter) / (0.5*\KeyWidth)} \let\ThetaOne\pgfmathresult % Y coordinate of upper key corners     \pgfmathparse{(\Yinner) / (0.5*\KeyWidth)} \let\ThetaTwo\pgfmathresult  %Y coordinate of lower key corners     \pgfmathparse{sqrt ((\Youter)^2)+((0.5*\KeyWidth) ^2 )} \let\ra\pgfmathresult           \draw[very thick] ({atan(\ThetaTwo)}:0.5*\DiaExt) arc ({atan(\ThetaTwo)}:{180-atan(\ThetaTwo)}:0.5*\DiaExt);           \draw[very thick, orange] ({atan(\ThetaOne)}:\ra) arc ({atan(\ThetaOne)}:{180-atan(\ThetaOne))}:\ra);      \end{scope}     \end{tikzpicture}     }%     \end{document}


title: Setting \textwidth seems to break textblock* command from textpos package?

text: I would like to position text absolutely using the `textblock*` command from the `textpos` package. Minimal working example:               \documentclass{article}     \usepackage[absolute]{textpos}     % \renewcommand{\textwidth}{17cm} % (*)     \begin{document}       \begin{textblock*}{3cm}(1cm,0.98\paperheight)         XXXXXXXXXXXXXXX       \end{textblock*}     \end{document}      This breaks as soon as I redefine the `textwidth` as done by the line marked `(*)` above. Why is this and, more importantly, how can I fix this? ("It breaks" here means I get _"! Missing number, treated as zero. ! Illegal unit of measure (pt inserted)."_ in the line with the text (placeholder "X...X" above).) Bonus question: How can I specify something like `\paperheight - 1cm`?


title: Htlatex accents in token yields missing \endcsname

text: I am trying to associate sequence of characters that can contain special symbols (accents, dollars, and in particular inputs in utf8) to some content. This is to be used with htlatex. Accents yield problems as shown in the following example:               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}          \begin{document}      \expandafter\def\csname è\endcsname{an acentuated token}     \end{document}      This compiles fine with pdftex, but using htlatex, I obtain:               ! Missing \endcsname inserted.     <to be read again>                         \protect      l.6 \expandafter\def\csname è                                   \endcsname{an accentuated token}     ?       I was not able to figure out where was the problem with htlatex (indeed \IeC has a different definition, but simply correcting it does not suffice). I would also understand answers like `you should not even think about constructing token with weird symbols'. But then, what ways are available for maintaining tables that with such kind of entries?


title: Problem with pdf preview in LyX

text: I have just downloaded LyX and I have been trying to preview my work as a pdf file. The problem is that I have been getting this error: > The path of your document > > (C:/ ... /) > > contains glyphs that are unknown in the current document encoding > > ... The problem then seems to be that there are greek letters in the path and LyX cannot read them. Is there perhaps a solution for that? Thank you.


title: What date should I specify in the optional argument of \NeedsTeXFormat?

text: Subsection 4.1 of _LaTeX2e for class and package writers_ contains the following passage: > >     \NeedsTeXFormat {⟨format-name⟩} [⟨release-date⟩] >   > > This command tells TeX that this file should be processed using a format > with name ⟨ _format-name_ ⟩. You can use the optional argument ⟨ _release- > date_ ⟩ to further specify the earliest release date of the format that is > needed. When the release date of the format is older than the one specified > a warning will be generated. The standard ⟨ _format-name_ ⟩ is LaTeX2e. The > date, if present, must be in the form yyyy/mm/dd. I have two closely related questions about the ⟨ _release-date_ ⟩ argument of `\NeedsTeXFormat`:   1. How do I, at the command line or in TeX Live Utility, get the release date of the LaTeX kernel currently used by my TeX distro?   2. Is it good practice to always specify the date of the latest release? Doing so, if I understand `\NeedsTeXFormat` correctly, will prompt users who don't have the latest release to update their distribution. Is it fair to expect users to be up to date? Am I likely to "lose" potentials users who may be unable to get an up-to-date distribution?


title: How to write a non-today date in latex with localization formatting?

text: I've tried googling around and all I have found is a lot of example on how to format `\today`. But that isn't what I want. Instead, I want a way to format historical dates based on the localization given to babel. Say, 'June 3rd 1994' in USenglish and UKenglish?


title: pgfplots how to smoothen up a surface plot with coordinates

text: I have some coordinates not from some particular function...               \begin{document}         \begin{figure}             \begin{tikzpicture}                  \begin{axis} [width=16cm,height=19cm,samples=100]                     \addplot3[surf]  coordinates {                       (1,1,70)(2,1,48)(3,1,41)(4,1,70)( 5,1,68)(6,1,82)(7,1,38)(8,1,47)(9,1,35)(10,1,66)(11,1,53)(12,1,78)                     (1,2,91)(2,2,43)(3,2,68)(4,2,90)( 5,2,66)(6,2,55)(7,2,66)(8,2,46)(9,2,25)(10,2,38)(11,2,50)(12,2,58)                     (1,3,60)(2,3,68)(3,3,39)(4,3,65)( 5,3,59)(6,3,69)(7,3,72)(8,3,62)(9,3,94)(10,3,36)(11,3,33)(12,3,39)                     (1,4,48)(2,4,80)(3,4,68)(4,4,66)( 5,4,59)(6,4,63)(7,4,93)(8,4,63)(9,4,30)(10,4,52)(11,4,60)(12,4,14)};                 \end{axis}             \end{tikzpicture}         \end{figure}      \end{document}      the result is this... ![enter image description here](http://i.stack.imgur.com/wL9mD.png) When I put the option smooth, like that...               \begin{document}         \begin{figure}             \begin{tikzpicture}                  \begin{axis} [width=16cm,height=19cm,samples=100]                     \addplot3[smooth]  coordinates {                       (1,1,70)(2,1,48)(3,1,41)(4,1,70)( 5,1,68)(6,1,82)(7,1,38)(8,1,47)(9,1,35)(10,1,66)(11,1,53)(12,1,78)                     (1,2,91)(2,2,43)(3,2,68)(4,2,90)( 5,2,66)(6,2,55)(7,2,66)(8,2,46)(9,2,25)(10,2,38)(11,2,50)(12,2,58)                     (1,3,60)(2,3,68)(3,3,39)(4,3,65)( 5,3,59)(6,3,69)(7,3,72)(8,3,62)(9,3,94)(10,3,36)(11,3,33)(12,3,39)                     (1,4,48)(2,4,80)(3,4,68)(4,4,66)( 5,4,59)(6,4,63)(7,4,93)(8,4,63)(9,4,30)(10,4,52)(11,4,60)(12,4,14)};                 \end{axis}             \end{tikzpicture}         \end{figure}      \end{document}      I get the next image... ![enter image description here](http://i.stack.imgur.com/L78eV.png) What I want is to have the continuous surface of the first image but smoothened like the curves in the second, not only along the x axis but also in depth... How can I achieve that???


title: \fill left of a node using the positioning library

text: How can I position a `\fill` relative to a node? I would position a node in the following way, using the `positioning` library:               \node (mynode) at (2,4) {text};     \node [left=of mynode] {o};      But if I try the same with a filled circle:               \node (mynode) at (2,4) {text};     \fill [left=of mynode] circle (1);      The circle is centered at origin with no warnings or error messages.


title: \part and \thispagestyle{empty}

text: I have a Part page in my document where I want to hide the page number. I am using:               \part{Beginning}     \thispagestyle{empty}      on the Part document. However, the page number still appears. I've tried typesetting the main document that inputs the Part child document a number of times with no effect. Any help with such a trivial problem would be much appreciated.


title: Remove title in biblatex references

text: I want to cite articles as full reference, but only in the text. So far, everything works in the MWE below, but there is still the title of the article which I want to suppress. One way I found to do this was by adding `\DeclareFieldFormat[article]{title}{}`; but that cancels the title _and_ leaves two commas (`,,`) where the title has been. Another suggestion was to use `\AtEveryBibitem{\clearlist{title}}`, but that doesn't seem to work at all. Does anyone know how to get rid of the title? Such that the citations become > I want to cite Author et al. (2050), _Journal A_ , **50** , 63–90 as well as > Author (2013), _Journal B_ , **50** , 63–90 Here is a minimum working example:               \documentclass{scrartcl}          %%%%%%%%%%%%%%%%%%%%%%% THE REFERENCES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}     @article{entry1,       author =   {Author, A. and Buthor, B. and Cusor, C.},       title =    {Title A},          journal =      {Journal A},          volume =       {50},       year =       {2050},       pages =    {63--90},     }     @article{entry2,       author =   {Author, A.},       title =    {Title of Article B},       journal =      {Journal B},          volume =       {50},       year =       {2013},       pages =    {63--90},     }     \end{filecontents}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%% BIBLIOGRAPHY STYLE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \usepackage[style=authoryear,maxnames=1,backend=bibtex,doi=false,isbn=false,url=false]{biblatex}     \addbibresource{\jobname.bib}          \DeclareFieldFormat[article]{volume}{\mkbibbold{#1}}     \DeclareFieldFormat[article]{number}{\mkbibparens{#1}}     \DeclareFieldFormat{journaltitle}{\mkbibemph{#1},} % italic journal title      \DeclareFieldFormat{pages}{#1}     %\DeclareFieldFormat[article]{title}{} % remove title     \renewbibmacro{in:}{} % remove "in"     \renewcommand{\mkbibnamefirst}[1]{} % remove first name     \renewcommand{\newunitpunct}{, }          %%%%%%%%%%%%%%%%%%%%%%%%%%%%% BEGIN THE DOCUMENT %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%          \begin{document}     I want to cite     \fullcite{entry1}     as well as     \fullcite{entry2}               \end{document}


title: How to create two versions of a document?

text: I've read similar questions, but my problem seems to require a little more sophisticated solution. I have some notes that I want as my lecture notes and as handouts. These two versions will have a different set of questions and answers. I'm using ExSheets package and tried to change the value of question/print option. (I don't really understand the differences between an option and a property. So at first I assumed that the option is just same as property.)               \documentclass {tufte-book}     \usepackage{exsheets}     \usepackage{ifthen}          \DeclareQuestionClass{user}{users}     \SetupExSheets{use-users={b,t}}     \def \forHandouts {true}          \begin{document}          \ifthenelse{\equal{\forHandouts}{true}} {       \ForEachQuestion {         \ifthenelse{\equal {\GetQuestionClass{user}}{t}}{            \SetQuestionProperties{question/print = false}            % \SetupExSheets{question/print = false} %this or the above          }}}     \begin{question}[user=b] blah, blah...     \end{question}     \end{document}


title: Big tables with big items: pagebreaks within items?

text: I am using LaTeX for creating PDF files automatically from within Python scripts. The documents I create basically consist of just one big table, which can span several pages. It consists of three parboxed columns. Each item can contain a longer text. So far so good. At this moment I am using longtable like so:               \begin{longtable}{@{}p{\inoutwidth}@{\hspace{\columnsepx}}p{.35\commentwidth}@{\hspace{\columnsepx}}p{.65\commentwidth}@{}}      Problem is, that even a single cell may contain so much text that it does not fit on one page. Which means I need a page break within an item, not only between items. Well, ideally the table would only be broken between the rows. However, when one item exceeds the space available on a page, a page break would have to occur in the middle of the table row. It's not trivial, because any or all of the table columns could contain a large portion of text inside one row. So a page break could impact on one or many columns. The longtable I am using now put page breaks only between rows. If one row contains too much text, it just runs down the page and some text will be outside the page boundary thus invisible. Does not look nice. Any ideas? Cheers!


title: Span sideways figure over multiple pages

text: I have to place two `sidewaysfigure` spanned each one on different pages.               \begin{sidewaysfigure}      \ContinuedFloat      \centering      \subfloat[Change in ABC]{\label{fig:abc}\includegraphics[scale=0.6]{./abc.png}}      \quad      \subfloat[Change in DEF]{\label{fig:def}\includegraphics[scale=0.6]{./def.png}}      \caption{Change in ABC and DEF}      \label{fig:abcdef}     \end{sidewaysfigure}      But, when I use the above code, (or even when I change `\quad` to `\clearpage`) the figures appears in the same page.


title: Output hyphen as en-dash in macro

text: In my thesis I will include a fair number of tags (morphological tags, in case it matters) that are fixed-width character strings like this: `ab-c--d`, where dashes denote NULL fields. I'd like to define a macro `\msd` that takes such a tag and outputs it with en-dashes for the NULL fields. As far as I can make out, this macro needs to do two things:   1. Disable the double-hyphen and triple-hyphen ligatures (to avoid weirdness when two NULL fields are adjacent)   2. The actual TeXnical jiggery-pokery required to render hyphens as en-dashes The details of how I'd do this elude me, unfortunately. Could someone help me out with this, or point me in the right direction?


title: Elegant way to make entire citation bold

text: Is it possible to make an entire reference appear bold in the references section when using BibTeX? I'm using the IEEE templates and `.bst`. I found this related question, but is there a more elegant way to highlight certain entries rather than just adding `\textbf{}` to every field in my `.bib` file? Note that I only want to highlight selected entries from my bilbiography, so changing the whole thing wouldn't accomplish what I'm trying to do. Unfortunately, I can't use biblatex as `\usepackage[style=ieee]{biblatex}` differs from what I get using the official IEEE `.bst`


title: How to color equations in TeXify

text: I am using texify.com to generate images of equations, so that I can put them in emails. I am trying to insert a colored equation, using the following code:               {\color{green} dy} = {\color{red} \frac{dy}{dx}} {\color{green}  dx}      However, the image produced is entirely green, including the equals sign and fraction bar. Am I coding this incorrectly, or does it just not work on the website? (Of course, if there are better ways to put math equations into emails - I use gmail primarily - I am all ears!)


title: Text in multirow overlaps the next row

text: Suppose, I want to create a table like this: ![enter image description here](http://i.stack.imgur.com/qqbCi.png) I decided to use `\multirow` with `\newline`. But the `\multirow` cell is not stretched vertically: ![enter image description here](http://i.stack.imgur.com/dYT1J.png) Code:               \documentclass{article}     \usepackage[a5paper]{geometry}     \usepackage{array}     \usepackage{multirow}     \usepackage{hhline}     \setlength{\parindent}{0cm}     \begin{document}     \begin{tabular}{|m{2cm}|m{2cm}|}       \hline       \multirow{2}{2cm}{line 1           \newline           line 2 line 2 line 2 line 2} &       1\\       \hhline{|~|-|}       & 2\\       \hline       text & text\\       \hline     \end{tabular}     \end{document}      How to fix?


title: Conversion XeTeX -> EPUB

text: I've got (Xe)TeX document. It s fine to compile into PDF. However, I'd like to know how can I do to export it into EPUB in order to read it with my Sony Reader. I've tried to use many tools such as Calibre to convert from PDF to EPUB, but the conversion is extremely bad... Thank you


title: Beamer notes on secondary screen doesn't work

text: I am writing a presentation for at introduction to latex and think it would be nice to show how I have my presentation-notes on my laptop screen (Macbook Air) using Beamer. But it just won't work. This minimal example taken straight from the manual has no effect:               \documentclass{beamer}     \usepackage{pgfpages}          \setbeameroption{show notes}     \setbeameroption{show notes on second screen=right}          \begin{document}     \begin{frame}{Note test}            \begin{itemize}            \item<1-> Eggs            \item<2-> Plants              \note[item]<2>{Tell joke about plants.}              \note[item]<2>{Make it short.}            \item<3-> Animals            \end{itemize}     \end{frame}     \end{document}      I have tried in the following viewers: Adobe Reader 11, Apple Preview, Skim and SplitShow (mentioned here). I am quite sure my graphic card supports two screen mode, since I am currently writing this text on an external monitor while my laptop holds other screen contents (MacBook Air). When I run the file I only get a regular slideshow with the expected slides, but no indication of secondary slides with notes. There is something strange with the pagenumbering though: The viewer notes slide 1-2 as page one and getting to the third slide it writes page: 4. So I have a feeling the note slide is there somewhere, but I can't get it to show. The suggestions mentioned here and here either don't apply or don't work. I have tried compiling the document in TexShop as well as Aquamacs.


title: Math mode accents and spacing

text: I'm using accents to produce a variant of the `\in` operator but when I place an accent on it, as in `\tilde{\in}`, I get spacing that is different from `\in`, see the example and the image below. My question is: what is the best way to make it so that `\tilde{\in}` get the same spacing as `\in`? In the example below I also provide two failed attempts of getting the right spacing. I'm not especially accustomed to math mode and definitions of operators. Maybe the right way to go with `\DeclareMathOperator`?               \documentclass{article}          \begin{document}          The spacing I want:     \[     w_{1} \in w_{2}     \]          The spacing I get with an accent:     \[     w_{1} \tilde{\in} w_{2}     \]          Better spacing but an ugly hack:     \[     w_{1}~\tilde{\in}~w_{2}     \]          The wrong spacing (too tight?):     \[     w_{1} \mathop{\tilde{\in}} w_{2}     \]          \end{document}      ![Example of math mode accents and spacing](http://i.stack.imgur.com/0EBU7.png)


title: \NewDocumentCommand with constructed csname

text: In the spirit of my previous questions _Defining \xthinspace: Thin space only if not followed by certain characters_ and _Ellipses& Correct Space Factor_, I’m trying to define a generic `\xspace`-like macro system. The syntax I’m leaning towards is as follows:               \makexfollow{xfollow}{(always)}{(followed)}{(not followed)}     \addtoxfollowexceptions{x}     \newcommand*{\foo}{foo\xfollow}          \foo \foo x      yielding > foo(always)(not followed)foo(always)(followed)x By editing & wrapping egreg’s code, I got most of the way there; see my code below. I even figured out how to use `\cs:w … \cs_end:` and the `:c` specifier to parameterize most of the internal csnames. The trouble is with the commands `\addtoxfollowexceptions` & `\removefromxfollowexceptions`; I cannot figure out how to declare them to replace the `xfollow` part of the name with something generic. How can I achieve this?               \documentclass{article}          \usepackage{xparse}          \ExplSyntaxOn          \NewDocumentCommand{\makexfollow}{m m m m}       {         % Token list for “exceptions”         \tl_new:c { g_#1_exceptions_tl }              % Add to list         % Should be `\cs:w addto#1exceptions \cs_end:` or something similar         \NewDocumentCommand{\addtoxfollowexceptions}{m}           {             \tl_gput_right:cn { g_#1_exceptions_tl } { ##1 }           }              % Remove from list         % Should be `\cs:w removefrom#1exceptions \cs_end:` or something similar         \NewDocumentCommand{\removefromxfollowexceptions}{m}           {             \tl_gremove_all:cn { g_#1_exceptions_tl } { ##1 }           }              \cs_new_protected:cpn { #1 }           {             % Unconditional part             #2                  % Is next token one of the “exceptions”?             \bool_set_false:c { l_#1_followed_bool }                  % Peek ahead, ignoring spaces, then hand-off to `\xfollow_check:`             % with `\l_peek_token` set.             %             % This is a clever hack: We’re actually checking whether the next             % non-space token is a space token; if not, call `\xfollow_check:`.             % Of course, by definition this will always test false, achieving             % the result described above.             \peek_catcode_ignore_spaces:NF \c_space_token               { \cs:w #1_check: \cs_end: }           }                % Compare `\l_peek_token` against `\g_xfollow_exceptions_tl`           \cs_new_protected:cpn { #1_check: }             {               % Loop over exceptions list               \tl_map_inline:cn { g_#1_exceptions_tl }                 {                   \token_if_eq_charcode:NNT ####1 \l_peek_token                     {                       % Tokens match; set flag and break from loop                       \bool_set_true:c { l_#1_followed_bool }                       \prg_map_break:                     }                 }               % Conditional part               \bool_if:cTF { l_#1_followed_bool }                 {#3}                 {#4}             }            }          \ExplSyntaxOff          \makexfollow{xfollow}{(always)}{(followed)}{(not followed)}     \addtoxfollowexceptions{x}     \newcommand*{\foo}{foo\xfollow}          \begin{document}          \foo \foo x          \end{document}


title: Is there a package that has the "clockwise gapped circle arrow" in it?

text: The symbol I'm after is ⟳ (also nice to have ⟲). That's `U+27F3` (and `U+27F2`). Detexify can't find it (or my drawing skills are woeful); is it already in a font package, or do I have to load it from STIX? A more general question would be: if I already know the unicode symbol, how do I find out which package supports it?


title: vim, PDF -XChange, pdflatex, TeX Live 2010, windows xp, (pdfsync)

text: Hope I didn't forget any. These are the packages I want to use on my computer for typesetting pdf files. Up to date I'm using vim (without any plugin but integrated syntax highlighting for .tex files) in console (cmd.exe) for typing .tex files. Then I close it (:wq), close PDF-XChange tab with typesetted document, issue pdflatex file.tex, open explorer, click on generated .pdf file (anyhow it opens at the page and zoom configuration left in PDF-XChange) check for convenience, close, edit, compile, open, etc. I would love to skip the "close .pdf file - reopen .pdf file" cycle! Any ideas? Thanks.


title: Keeping a long minitoc from starting on a new page

text: Is there a way to force a long `\minitoc` to begin on the same page as the chapter title and split into the next page if it is too lengthy? As of now my only long `\minitoc` starts on a new page and the chapter page is all but empty.


Is there a package for automatically managing table headers and formatting? For example I don't want to have to manually embolden every header entry individually, not to mention the extra clutter that would introduce. This is a general question, but if you prefer to have compilable example to apply the solution to, suppose I want the table headers of row 1 to be automatically emboldened:               \documentclass{article}     \usepackages{booktabs}     \usepackage[T1]{fontenc}     \begin{document}             \begin{table}[h]                 \centering                 \begin{tabular}{l l l l}                 \toprule                 Experiment  &   Enzyme              &   Substrate   &       Enzyme inhibitor\\                 \midrule                 A           &   Trypsin             &   Casein      &       Trypsin inhibitor\\                 B           &   Chymotrypsin        &   Casein      &       Trypsin inhibitor\\                 C           &   Chymotrypsinogen    &   Casein      &       Trypsin inihibitor\\                 \bottomrule                 \end{tabular}             \end{table}     \end{document}      Edit: this question is very similar to Make first row of table all bold but is subtly different, since I don't want to have to create new definitions or engage in any kind of programming. I just want a package that will handle that if possible, thanks.


title: Space characters in text citations after page

text: I am using `biblatex` for my citations. To cite I use `\citep[123]{author}`. This gets `(Lastname, 2010, p.____5)` Reading the `biblatex` documentation I am overwhelmed. I found how to compress ranges how to have several p's there in case of several citations. But how do I change the space after "p." to a `\,`?


title: How to insert a one column page within a twocolumn document?

text: I have a `twocolumn` layout which is rendering quite well except for the last page. The incriminated page contains a bibliography with several URLs, each one being cut on several lines. For better readability, I would like to expand this part of the document to one column. I experimented with the `multicol` package but it's a pain when working with a lot of figures, tables, algorithms or any kind of float. Is there any other way to achieve this result?


title: Is there a LaTeX editor for Windows with an equivalent to RefTeX ?

text: I am currently using TexMaker on Windows to write my LaTeX documents. However, I would be very interested in a feature like RefTex (emacs module for bibtex) that would allow me to search directly in my bibtex files. TexMaker just do auto-complete on the keys of the bibtex what is far less convenient. Do you have an idea to help me ?


title: Hide an entire table (but still generate it)

text: In this answer the following code appears. The idea is that the initial table sets up the column widths used by the subsequent tables. The initial table itself is not supposed to be shown. Its only there to set up the widths which `\usetabu` retrieves. Unresolved from that post is whether there is any way to generate the first table but not have it visible or take up any space.               \documentclass{article}     \usepackage{tabu}     \begin{document}          \begin{center}     \begin{tabu} spread 0pt  {|X[-1]|X[-1]|}\savetabu{mytabu2}     1 & 2 \\     3 & 4 \\     abcdefghijklmnopqrstuvwxyz & 10 \\     5 & 6 \\     \end{tabu}     \end{center}          \begin{center}     \begin{tabu}{\usetabu{mytabu2}}     1 & 2 \\     3 & 4 \\     \end{tabu}     \end{center}          \begin{center}     \begin{tabu}{\usetabu{mytabu2}}     abcdefghijklmnopqrstuvwxyz & 10 \\     5 & 6 \\     \end{tabu}     \end{center}          \end{document}      Output (this shows the three tables but what is desired is that only the last two are shown and the first runs so that it sets up the column widths but is not visible). ![enter image description here](http://i.stack.imgur.com/GGsCV.png)


title: How do I align a pgfplots graph?

text: I'm trying to draw a graph with the associated table of data using pgfplots. It works great, but the graph itself isn't aligned with the table. This is what it looks like: ![](http://i.stack.imgur.com/5TEDa.png) I don't like the overhang. **How can I move the position of the graph?** I would like to either line up one side or another. This is what it would look like if I could line them up to the right: ![](http://i.stack.imgur.com/HkF86.png) I could deal with only being able to do that, but it would also be useful to have a more general way to move the graph. I've looked around in the pgfplots manual, as well as the pgf manual, but I couldn't find anything that looked promising. I'm fairly new to LaTeX, only been using it for a few days, so feel free to just point me in the right direction. Code:               Results:\    \begin{tabular}{| c | c | c |}         \hline         \textbf{QP} & \textbf{Average PSNR\_Y ($dB$)} & \textbf{Total bits} \        \hline         1 & 49.197166 & 14593504\        \hline         8 & 32.003399 & 1106824\        \hline         16 & 28.387211 & 374880\        \hline         24 & 26.661640 & 206704\        \hline         31 & 25.740038 & 150056\        \hline     \end{tabular}          \vspace*{2em}               \noindent     \begin{tikzpicture}         \begin{axis}[             xlabel=$QP$,             ylabel={$Encoding Quality$}         ]         % use TeX as calculator:     %   \addplot {x^2 - x +4};         \addplot coordinates {             (1,49.197166)             (8,32.003399)             (16,28.387211)             (24,26.661640)             (31,25.740038)         };         \addlegendentry{ PSNR\_Y }         \addplot coordinates {             (1,58.374016)             (8,4.427296)             (16,1.49952)             (24,0.826816)             (31,0.600224)              };         \addlegendentry{Total Bits $\times250,000$}              \end{axis}     \end{tikzpicture}


title: Create \ref for nested enumitem \item without nesting in the output

text: Sorry the question is a bit awkward. Basically I have nested `\begin{enumerate}` lists. I'd like something to appear like this:               1 Foo      1.1 Bar      Please see additional information in subsection 1        1.1.1 Baz      But when I use this code:               \begin{enumerate}       \item Foo       \begin{enumerate}          \item Bar          Please see additional information in subsection \ref{test}          \begin{enumerate}            \item Baz            \label{test}          \end{enumerate}       \end{enumerate}     \end{enumerate}      It appears like this:               1 Foo      1.1 Bar        Please see additional information in subsection 1.1.1        1.1.1 Baz      When the nesting gets heavy, it ends up looking a lot uglier ("see subsection 3(d)iC"). Is there a way to just list the final nesting level? I've tried to simplify my code to make it a bit easier to read. Hopefully it doesn't confuse the issue.


title: Alignment of marginnote independently of main paragraph

text: I've noticed that when a `\marginnote` is added (edit: using the marginnote package), the horizontal alignment of that note is inherited from wherever the note is placed. In my case, I wish to have a margin note defined inside a section heading, which makes the margin note centred. If I try to add `\raggedleft` or `\raggedright` to the instruction, then it is either ignored, or overwrites the formatting of the section header (depending on whether it is in the left or right margin). Is there some way to change the horizontal alignment of the marginal text independently of the text in which it is defined? Edit: My apologies, in constructing the minimum working example, I realise I've embarrassingly omitted the important detail of how I (almost certainly incorrectly) set the centering of the section header. Below is a minimum working example of what I want.               \documentclass{article}     \RequirePackage{sectsty}     \allsectionsfont{\centering\sc} % <-- this is probably wrong!          \usepackage[fulladjust]{marginnote}          \begin{document}     \section*{This is a section header\marginnote{I really really want this      margin note to be raggedright, and not centred like it is here.}}     \end{document}      Another point to note is that I actually want the text flushed left or right depending on whether the note is in the left or the right margin. This means is think I _do_ need to change the alignment of the marginal text.


title: What environment to use in writing functions

text: I am beginner of LaTeX, and wondering how to write functions or procedures in pseudocode. Is there any existing environment for that?


title: Change TikZ nodes color to grayscale

text: Say you have some code like this:               \documentclass{standalone}          \usepackage{tikz}     % \PassOptionsToPackage{monochrome}{xcolor}          \begin{document}          \begin{tikzpicture}     % \selectcolormodel{gray}      \node[fill=red] at (0,1) {text};      \node[fill=green] at (0,0.5) {text};      \node[fill=blue] at (0,0){text};      \node[fill=yellow] at (1,1) {text};      \node[fill=violet] at (1,0.5) {text};      \node[fill=orange] at (1,0) {text};     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/eLoqV.png)   And you want to turn the resulting picture in grayscale colors. Is there a way to do this in LaTeX without using external tools (convert, imagemagick, etc.) and, of course, without having to manually change all the color values? I already tried with the methods from how to create PDF in grayscale mode or TikZ figure only? and Monochrome in Tikz (see the commented code) but they both do not seem to work when the color is specified as a node option. It would be also nice to know why the `\selectcolormodel{gray}` method does not work in this context.


title: Problem with positioning a figure environment inside \resizebox

text: I'm writing a document including figures exported from Inkscape (in pdf+latex format). These figures use a `figure` environment containing all the text labels and a `\includegraphics` macro that imports the graphical part of the figure from the pdf file. By default these figures use the same font as the rest of the document, which is too large for my needs. To work it around I have scaled the figure up, and then scaled it down to the original size using `\resizebox`. This doesn't alter the size of graphics, only the size of font used for rendering text labels, which is perfect. However, there is one weird glitch that I can't get rid off. All figures are shifted to the right and are slightly smaller than figures included directly (that is, without wrapping with `figure` environment) in the `\resizebox`. Below is a test document exposing this behavior:               \documentclass{article}     \usepackage[pdftex]{graphicx}     \usepackage{color}               \begin{document}     \begin{figure}[!t]       \def\svgwidth{1.5\textwidth}%       \resizebox{\textwidth}{!}{%         \input{testfig.pdf_tex}%       }       \caption{Test with ``figure'' environment.}     \end{figure}          \begin{figure}[!t]       \resizebox{\textwidth}{!}{%         \includegraphics[width=1.5\textwidth]{testfig.pdf}%       }       \caption{Test without ``figure'' environment.}     \end{figure}          \vbox{}          \end{document}      A `testfig.pdf_tex` file exported from Inkscape (with comments removed):               \begingroup       \makeatletter       \providecommand\color[2][]{%         \errmessage{(Inkscape) Color is used for the text in Inkscape, but the package 'color.sty' is not loaded}         \renewcommand\color[2][]{}%       }       \providecommand\transparent[1]{%         \errmessage{(Inkscape) Transparency is used (non-zero) for the text in Inkscape, but the package 'transparent.sty' is not loaded}         \renewcommand\transparent[1]{}%       }       \providecommand\rotatebox[2]{#2}       \ifx\svgwidth\undefined         \setlength{\unitlength}{778.02519531pt}       \else         \setlength{\unitlength}{\svgwidth}       \fi       \global\let\svgwidth\undefined       \makeatother       \begin{picture}(1,0.36433855)%         \put(0,0){\includegraphics[width=\unitlength]{testfig.pdf}}%         \put(0.51462818,0.17761502){\color[rgb]{0,0,0}\makebox(0,0)[b]{\smash{Some text}}}%       \end{picture}%     \endgroup      ![A screenshot showing the result.](http://i.stack.imgur.com/mV17J.png)


title: Using fontspec with LuaLaTeX produces a LaTeX bug message

text: I have LuaLaTeX installed via MiKTeX 2.9 on Windows 7. I am trying to use `fontspec` to change my document to a different font than the default CMR fonts. Just invoking `\usepackage{fontspec}` is sufficient to cause the following cryptic error message:               !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!     !     ! This is a LaTeX bug: check coding!     !     ! Command name `\font_set:Nnn' already defined! Current meaning:     !   \protected\long macro:#1#2#3->\tex_font:D #1=#2 at #3\scan_stop:     !     ! See the LaTeX3 documentation for further information.     ! For immediate help type H .     !...............................................          l.602 \cs_new:Npn \font_set:Nnn                                     #1#2#3 {     ?      Continuing by hitting return produces a second similar message, and then processing apparently finishes without further fuss or bother. Is there something I can do about this? Or do I just have to wait until MiKTeX picks up the next release of LuaLaTex?


title: Remove space before macro if exist a environment

text: I create a new macro:               \newcommand{\intersection}[1]{%     \par\vspace{\baselineskip}%     \noindent\textbf{\large\bfseries\sffamily #1}\par}      It works perfectly for what I want, but when there is a environment before macro, latex insert two lines: ![extra-space](http://i.stack.imgur.com/TtvBO.png) If possible that macro "detects" when exist a figure (or other environments) don't insert a line break? **MWE**               \documentclass[a4paper]{article}     \usepackage{caption}     \usepackage{amsmath,amssymb}     \usepackage{chemfig}          \newcommand{\intersection}[1]{%     \addvspace{\baselineskip}%     \noindent\textbf{\large\bfseries\sffamily #1}\par}          \begin{document}          \begin{figure}[h]     \centering     \includegraphics{image.pdf}     \caption{\textbf{a)} En la situación normal...}     \end{figure}          \intersection{Ion-dipolo}     La ley de Coulomb explica las \textbf{\textit{fuerzas ion-dipolo}}, las cuales atraen entre sí a un ion (ya sea un catión o un anión) y a una molécula polar. La intensidad de esta interacción depende de la carga y tamaño del ion así como de la magnitud del momento dipolar y del tamaño de la molécula.          \intersection{Ion-dipolo inducido}     Se dice que el dipolo del átomo (o molécula no polar) es un dipolo inducido porque la separación de sus cargas positiva y negativa se debe a la proximidad de un ion o una molécula polar. La interacción atractiva entre un ion y el dipolo inducido se conoce como interacción \textbf{\textit{ion-dipolo inducido}}.          \end{document}


title: Standard form in TeX?

text: How do I write x10 to the power of something within an equation? At the moment I'm using `y \times 10^x`, but it gets slightly confusing if I have a long line of numbers that I'm multiplying together. This the equation I have now:               g = \frac{6.67 \times 10^{-11} \times 6 \times 10^{24}}{6400010^2}      Which produces the output: ![](http://i.stack.imgur.com/CPzaU.png)


title: Use non-breaking space after name initials with biblatex macros

text: I want to enforce biber/biblatex to place non-breaking spaces between initials and last names of authors. Example:               \documentclass{article}          \usepackage[backend=biber,natbib=true]{biblatex}          \newcommand*{\person}[2]{\citename{#1}[#2]{author}}          \DeclareNameFormat{firstinits-last}{%       \usebibmacro{name:first-last}{#1}{#4}{#5}{#7}%       \usebibmacro{name:andothers}}          \DeclareNameAlias{sci}{firstinits-last}          \usepackage{filecontents}          \begin{filecontents}{\jobname.bib}     @misc{latour,         AUTHOR      = {Latour, Bruno},         OPTIONS     = {dataonly=true}     }     \end{filecontents}          \addbibresource{\jobname.bib}          \begin{document}     Foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar foo bar.      \person{latour}{sci} says about the ``new object'' that emerges\ldots     \end{document}      This produces a line break between `B.` and `Latour`: ![enter image description here](http://i.stack.imgur.com/K9Hqj.png) I have looked at this question, but the suggested code doesn't have any effect here:               \renewcommand*{\mkbibnamefirst}[1]{{\let~\,#1}}     \renewcommand*{\mkbibnamefirst}[1]{{\iffirstinits{\let~\,}{}#1}}      How would I make `B. Latour` in this example be rendered as `B.~Latour` (normal non-breaking space)?


title: Adding vertical hierarchy lines to a category column of a table

text: I often need to represent hierarchies within tables but I've yet to find an elegant way to do this. Oftentimes I do a variation on the following theme, with nested whitespace in the category column:               \documentclass{article}     \usepackage{booktabs}          \newcommand{\lvl}{~~~}          \begin{document}          \begin{tabular}{lr}     \toprule     \textbf{Category} & \textbf{\%}\\     \midrule     Animal          & 100   \\     \lvl Human      & 50    \\     \lvl\lvl  Man   & 20    \\     \lvl\lvl  Woman & 30    \\     \lvl Fox        & 30    \\     \lvl\lvl Vixen  & 16    \\     \lvl\lvl Dog    & 14    \\     \lvl Chicken    & 20    \\     \lvl\lvl Cock   & 8     \\     \lvl\lvl Hen    & 12    \\     \bottomrule     \end{tabular}          \end{document}      ![enter image description here](http://i.stack.imgur.com/jqcbI.png) I might mix that up with midrules between categories and different fonts for different levels and so on. But the result can sometimes be very "busy", especially if there's a bunch of levels. Instead, I was playing around with the idea of adding lines to more elegantly represent the hierarchy, sketched as follows in red (a similar effect in the same spirit would also suffice): ![enter image description here](http://i.stack.imgur.com/UdW6X.png) But I'm not sure how to realise this in LaTeX in an elegant way. I'm guessing I could somehow decorate a table with TikZ but I'd only know how to specify manual points (e.g., I'm not sure how to anchor rows in a table). Thus I'm looking for any suggestions of elegant solutions to achieve the above effect. (An ideal answer would avoid explicit coordinates/distances and would be "highly reusable".)


title: TexShop opens pdf file but not the .tex file

text: I already changed TeXShop as the default TeX application instead of TeXworks, but I see no way of editing my `.tex` file using TeXShop. Whenever I double- click a `.tex` file, it will automatically typeset the `.pdf` and I'm not able to see the code anymore. Any ideas? Note: I am a total newbie to MacTeX.


title: Highlighting a line in program listings in lyx

text: I am not able to find how i can highlight a particular line of code in program listings. Syntax highlighting seems to work but I dont need particular language keywords to be highlighted. e.g. for the code below how can i highlight/bold face char j=malloc......line               public static void function(){         int i=0;         char j = malloc(sizeof(char));         /.......some code....         return;     }


title: Using threeparttable with mn2e class

text: I would like to use the `threeparttable` package to include table footnotes in an article that uses the mn2e class. I have used this code from the `threeparttable` documentation:               \documentclass{mn2e}          \usepackage{threeparttable}          \begin{document}          \begin{table}         \begin{threeparttable}[b]         \caption{...}         \begin{tabular}{cc}         42\tnote{1}& \\         \end{tabular}         \begin{tablenotes}         \item [1] the first note         \end{tablenotes}         \end{threeparttable}     \end{table}          \end{document}      I get the error message below because abovecaptionskip is not defined               ! Undefined control sequence.     \Hy@tempa ...l \TPT@gatherlabel \abovecaptionskip                                                        \z@skip \else \TPT@docapt ...      Is it possible to use the `threeparttable` package with mn2e class?


title: How to align contents within table cells vertically?

text: Sorry for opening up another thread when there are so many already, but I can't find the correct solution to this right now. I would like to align the contents of the third column (the parts put in braces) vertically. What is the best way to do that? Example:               \documentclass [titlepage,a4paper,12pt]{article}                                                              \usepackage[ngerman]{babel}                                        \usepackage[T1]{fontenc}     \usepackage[latin1]{inputenc}           \begin{document}           \begin{center}         \begin{tabular}{l|l|l}         Name & Umsatz (in Euro, o. Ikea) & Umsatz (in Euro, m. Ikea)   \\ \hline         M"obel-G"unther &  8.264.620  &   6.983.137 ($- \, 1.281.483$) \\ \hline         Ikea            &  --         &  10.143.189 ($+ \, 10.143.189$) \\         \end{tabular}         \end{center}     \end{document}      ![Example](https://i.imgur.com/Ewhz248.png)


title: Re-selecting text in TeXShop

text: My apologies that this is no doubt a _seriously_ dumb question but here goes ... I select a block of text in the TeXShop source window: open the "find" panel and do a "replace all" in the selection. Fine. But suppose I now want to do a second "replace all" on the _same_ block of text (ok, it won't be exactly the same, 'cos I've just changed some stuff). The boundaries of the now-revised selection seem to have been forgotten. Seemingly I have to reselect the block -- which can be a pain if it is e.g. a big block spanning hundreds of lines. Is there a neat way to recover the (revised) last selection, or to fix on the boundaries of a selection and do some multiple "replace all"s within those boundaries without re-selecting each time? OK, I'm probably going to be sent straight to the dunce's corner, ...


title: Differences regarding kerning and ligaturing when using the MacTex2013 and MacTeX2014 versions of LuaLaTeX with .ttc fonts

text: This posting is a follow-up to the postings Can't generate ligatures with LuaLaTeX under TeXLive 2014 when using certain fonts and LuaLaTeX, fontspec, .ttc fonts and kerning (Optima on Mac OS). I have a 13" MacBookPro that runs MacOSX 10.9.4. The issue is that with with the release of MacTeX2104, **LuaLaTeX** \-- but _not_ XeLaTeX -- has apparently ceased to perform kerning and ligaturing for certain fonts with file extension .ttc. Consider the following MWE:               % !TEX TS-program = LuaLaTeX     \documentclass{article}     \usepackage{fontspec}     \setmainfont{Hoefler Text}     \setsansfont{Optima}     \listfiles     \begin{document}     WA AV Test Type off fit fly office baffle          \textsf{WA AV Test Type}     \end{document}      Running this MWE under LuaTeX 0.79.1 (part of MacTeX2014), I get ![enter image description here](http://i.stack.imgur.com/yq8cu.png) whereas running it under LuaTeX 0.76 (provided by MacTeX2013), I get ![enter image description here](http://i.stack.imgur.com/L5ma2.png) In the LuaTeX 0.76 output, note the sophisticated kerning and the presence of various f-ligatures. Unfortunately, both kerning and ligaturing appear to have vanished under LuaTeX 0.79.1, at least for the two particular fonts used in this MWE (`Hoefler Text` and `Optima`). In fact, it's not just these two fonts that are experiencing problems; _quite a few_ fonts with file extension .ttc contained in `/Library/Fonts` experience this deterioration as well. Among the ones I've tested and have have found to exhibit the problem described above are `Baskerville`, `Didot`, and `Futura Medium`. In contrast, I have not (yet!) found a single font with extension .otf that experiences these problems when run with MacTeX2014-version of Lua(La)TeX. **Questions** :   * Is there something that can/should be done to re-enable kerning and ligaturing under MacTeX2014/LuaLaTeX 0.79.1 with these .ttc fonts?   * Barring an affirmative answer to the preceding question, what are the step-by-step instructions for converting one or more of the affected fonts into a format (.otf?) that lets LuaLaTeX 0.79.1 performing kerning and ligaturing correctly? By "correctly", I mean the way that LuaLaTeX 0.76 as well as the older and current vintages of XeLaTeX manage to get these jobs done. Any software used to perform the font format conversion or adaptation should be open-source and (obviously...) be capable of being run under MacOSX. I'm willing (and able!) to provide a 200 point "bonus" for every good answer to these two questions. * * * For completeness, here are the file lists produced when running the MWE under the two different TeX distributions. When running MacTeX2014:               This is LuaTeX, Version beta-0.79.1 (TeX Live 2014) (rev 4971)          (format=lualatex 2014.7.9)  26 AUG 2014 21:07           *File List*      article.cls    2007/10/19 v1.4h Standard LaTeX document class       size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)     fontspec.sty    2014/06/21 v2.4a Font selection for XeLaTeX and LuaLaTeX        expl3.sty    2014/07/20 v5241 L3 programming layer (loader)      expl3-code.tex  2014/07/20 v5241 L3 programming layer          etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)     l3unicode-data.def    2014/06/30 v5166 L3 Unicode data     l3pdfmode.def   2014/07/18 v5232 L3 Experimental driver: PDF mode       xparse.sty    2014/07/20 v5241 L3 Experimental document command parser     luaotfload.sty  2014/08/10 v2.5-4 OpenType layout system     luatexbase.sty  2013/05/11 v0.6 Resource management for the LuaTeX macro programmer     ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)       luatex.sty    2010/03/09 v0.4 LuaTeX basic definition package (HO)     infwarerr.sty   2010/04/08 v1.3 Providing info/warning/error messages (HO)     luatex-loader.sty    2010/03/09 v0.4 Lua module loader (HO)     luatexbase-compat.sty    2011/05/24 v0.4 Compatibility tools for LuaTeX     luatexbase-modutils.sty  2013/05/11 v0.6 Module utilities for LuaTeX     luatexbase-loader.sty    2013/05/11 v0.6 Lua module loader for LuaTeX     luatexbase-regs.sty    2011/05/24 v0.4 Registers allocation for LuaTeX     luatexbase-attr.sty    2013/05/11 v0.6 Attributes allocation for LuaTeX     luatexbase-cctb.sty    2013/05/11 v0.6 Catcodetable allocation for LuaTeX     luatexbase-mcb.sty     2013/05/11 v0.6 Callback management for LuaTeX     fontspec-patches.sty   2014/06/21 v2.4a Font selection for XeLaTeX and LuaLaTeX     fontspec-luatex.sty    2014/06/21 v2.4a Font selection for XeLaTeX and LuaLaTeX      fontenc.sty       eu2enc.def    2010/05/27 v0.1h Experimental Unicode font encodings       eu2lmr.fd     2009/10/30 v1.6 Font defs for Latin Modern     xunicode.sty    2011/09/09 v0.981 provides access to latin accents and many other characters in Unicode lower plane      eu2lmss.fd     2009/10/30 v1.6 Font defs for Latin Modern     graphicx.sty    2014/04/25 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)       keyval.sty    2014/05/08 v1.15 key=value parser (DPC)     graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)         trig.sty    1999/03/16 v1.09 sin cos tan (DPC)     graphics.cfg    2010/04/23 v1.9 graphics configuration of TeX Live       pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX      ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)     pdftexcmds.sty  2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)        ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)     fontspec.cfg        t3cmr.fd      2001/12/31 TIPA font definitions     supp-pdf.mkii     epstopdf-base.sty    2010/02/09 v2.5 Base part for package epstopdf       grfext.sty     2010/08/19 v1.1 Manage graphics extensions (HO)     kvdefinekeys.sty 2011/04/07 v1.3 Define keys (HO)     kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)     kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO)     etexcmds.sty     2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)     epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live      ***********      When running MacTeX2013:               This is LuaTeX, Version beta-0.76.0-2013061817 (rev 4627)           (format=lualatex 2014.3.31)  26 AUG 2014 21:09           *File List*      article.cls    2007/10/19 v1.4h Standard LaTeX document class       size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)     fontspec.sty    2013/05/20 v2.3c Font selection for XeLaTeX and LuaLaTeX        expl3.sty    2014/01/07 v4646 L3 Experimental code bundle wrapper      l3names.sty    2014/01/04 v4640 L3 Namespace for primitives     l3bootstrap.sty 2014/01/04 v4640 L3 Experimental bootstrap code       luatex.sty    2010/03/09 v0.4 LuaTeX basic definition package (HO)     infwarerr.sty   2010/04/08 v1.3 Providing info/warning/error messages (HO)     ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)         etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)     luatex-loader.sty 2010/03/09 v0.4 Lua module loader (HO)     pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)      ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)        ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)     l3basics.sty    2014/01/04 v4642 L3 Basic definitions      l3expan.sty    2014/01/04 v4642 L3 Argument expansion         l3tl.sty    2013/12/27 v4625 L3 Token lists        l3seq.sty    2013/12/14 v4623 L3 Sequences and stacks        l3int.sty    2013/08/02 v4583 L3 Integers      l3quark.sty    2013/12/14 v4623 L3 Quarks        l3prg.sty    2014/01/04 v4642 L3 Control structures      l3clist.sty    2013/07/28 v4581 L3 Comma separated lists      l3token.sty    2013/08/25 v4587 L3 Experimental token manipulation       l3prop.sty    2013/12/14 v4623 L3 Property lists        l3msg.sty    2013/07/28 v4581 L3 Messages       l3file.sty    2013/10/13 v4596 L3 File and I/O operations       l3skip.sty    2013/07/28 v4581 L3 Dimensions and skips       l3keys.sty    2013/12/08 v4614 L3 Experimental key-value interfaces         l3fp.sty    2014/01/04 v4642 L3 Floating points        l3box.sty    2013/07/28 v4581 L3 Experimental boxes     l3coffins.sty   2013/12/14 v4624 L3 Coffin code layer      l3color.sty    2012/08/29 v4156 L3 Experimental color support     l3luatex.sty    2013/07/28 v4581 L3 Experimental LuaTeX-specific functions     l3candidates.sty   2014/01/06 v4643 L3 Experimental additions to l3kernel       xparse.sty    2013/12/31 v4634 L3 Experimental document command parser     luaotfload.sty  2014/02/05 v2.4-3 OpenType layout system     luatexbase.sty  2013/05/11 v0.6 Resource management for the LuaTeX macro programmer     luatexbase-compat.sty    2011/05/24 v0.4 Compatibility tools for LuaTeX     luatexbase-modutils.sty  2013/05/11 v0.6 Module utilities for LuaTeX     luatexbase-loader.sty    2013/05/11 v0.6 Lua module loader for LuaTeX     luatexbase-regs.sty    2011/05/24 v0.4 Registers allocation for LuaTeX     luatexbase-attr.sty    2013/05/11 v0.6 Attributes allocation for LuaTeX     luatexbase-cctb.sty    2013/05/11 v0.6 Catcodetable allocation for LuaTeX     luatexbase-mcb.sty     2013/05/11 v0.6 Callback management for LuaTeX     fontspec-patches.sty   2013/05/20 v2.3c Font selection for XeLaTeX and LuaLaTeX     fixltx2e.sty     2006/09/13 v1.1m fixes to LaTeX     fontspec-luatex.sty    2013/05/20 v2.3c Font selection for XeLaTeX and LuaLaTeX      fontenc.sty       eu2enc.def    2010/05/27 v0.1h Experimental Unicode font encodings       eu2lmr.fd     2009/10/30 v1.6 Font defs for Latin Modern     xunicode.sty    2011/09/09 v0.981 provides access to latin accents and many other characters in Unicode lower plane      eu2lmss.fd     2009/10/30 v1.6 Font defs for Latin Modern     graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)       keyval.sty    1999/03/16 v1.13 key=value parser (DPC)     graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)         trig.sty    1999/03/16 v1.09 sin cos tan (DPC)     graphics.cfg    2010/04/23 v1.9 graphics configuration of TeX Live       pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX     fontspec.cfg        t3cmr.fd     2001/12/31 TIPA font definitions     supp-pdf.mkii     epstopdf-base.sty 2010/02/09 v2.5 Base part for package epstopdf       grfext.sty      2010/08/19 v1.1 Manage graphics extensions (HO)     kvdefinekeys.sty  2011/04/07 v1.3 Define keys (HO)     kvoptions.sty     2011/06/30 v3.11 Key value format for package options (HO)     kvsetkeys.sty     2012/04/25 v1.16 Key value parser (HO)     etexcmds.sty      2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)     epstopdf-sys.cfg  2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live      ***********


title: Table alignment

text: I'm not an expert with the `tabular` environment...I have some problems:   1. I got an error "Extra alignment tab has been changed to \cr."    2. I would like to have the professor name completely to the right. * * *                \documentclass[12pt,a4paper,oneside]{book}      \usepackage{array,booktabs,siunitx}      \begin{document}      \noindent      \begin{tabular}{@{}l@{\hspace{.5em}}l r}      Students: &                    &Professor: &\\      Name1     &\textsc{Surname}    &Name       &\textsc{Surname} \\      Name2     &\textsc{Surname}    &           &       \\      Name3     &\textsc{Surname}    &           &      \end{tabular}      \end{document}      Can somebody help me?


title: make texmaker show compile error output (Message/Log) with custom lualatex user-build-command

text: i want to compile documents with a lualatex user build command within texmaker on mac os x. here is my command:               /usr/texbin/lualatex -synctex=1 -interaction=nonstopmode %.tex|open %.pdf      It compiles good. the problem is, that i dont get any error messages (feedback) in the 'Messages/Log' window when a compiling error occurs. which is not nice if trying to debug. The output i get is: > Process started > > Process exited with error(s) thats all. any ideas to show the error output ? the solution from an other post here didn't work. which is basically adding `--shell-escape` or `--enable-write18`


title: How do I insert an underlined ordinal indicator, if the font does not have that glyph?

text: Basically what I want to do is underline ordinal indicators ª and º, because some fonts do not underline them.


title: apacite with newapa in spanish (apacite + newapa en español)?

text: I was using `apacite` in Spanish, but I had a problem because instead of "et al" used to appear something like "y cols." which was wrong. After looking at another answer, I've found that if I use:               %     \usepackage[bibnewpage]{apacite}     \begin{document}          Text and citations          \bibliography{biblio}      \bibliographystyle{newapa}     \end{document}     %%      I get the "et al." like it has to be used. Now the problem is that instead of having "Martínez y Pérez (2010)", LaTeX gives me "Martínez & Pérez (2010)". I've tried with               \renewcommand{\BBAA}{y}% Letra que va entre los autores en las referencias     \renewcommand{\BBAB}{y}% Entre autores en el texto      but it's not working, or maybe I don't know where to write those commands... Please help me, it's for my master thesis!


title: TikZ decorated paths and fixedpointarithmetic library

text: Background: I am trying to apply multiple decorations to a path in a TikZ picture. In this particular case, my attempts fail as the maximum dimension PGF can calculate with is exceeded. This is not exactly the path I had trouble with (as that path is very deeply embedded in a complex `tikzpicture`), but it is similar and illustrates the problem in response to a request in the comments. I'm not sure if what I'm trying to do is just somewhat crazy but anyway:               \documentclass[tikz]{standalone}     \usepackage{fp}     \usetikzlibrary{calc,decorations.pathmorphing,decorations.text,fixedpointarithmetic}     \begin{document}            \begin{tikzpicture}         [         nant/.append style={draw=#1, double=#1!25, double distance between line centers=5.5pt, line width=.5pt, decorate, decoration={snake, segment length=10pt, amplitude=.5pt}},         ]         \node (n1) [draw] {Some Information};         \node (n2) [anchor=south east, yshift=7.5pt, draw] at (n1.north east) {Terminology};         \node (n3) [anchor=north east, draw, xshift=-25mm] at (n1.south west) {Something};         \coordinate (nant4) at ($(n1.north east |- n2.south)!1/2!(n1.north east)$);         \coordinate (nant3) at ($(n1.north west |- nant4) + (5pt,0)$);         \coordinate (nant2) at ($(n3.east) + (35pt,10pt)$);         \coordinate (nant1) at ($(n3.east |- nant2) + (10pt,-7.5pt)$);         \path [nant=blue,postaction={decoration={text along path, text={|\scriptsize\scshape|the flow of stuff ||}, text color=blue, raise=-.5pt}, decorate}] (nant1) to [out=0, in=-135] (nant2) to [out=45, in=180] (nant3) -- (nant4);     %   \path [nant=blue] (nant1) to [out=0, in=-135] (nant2) to [out=45, in=180] (nant3) -- (nant4);     %   \path [postaction={decoration={text along path, text={|\scriptsize\scshape|the flow of stuff ||}, text color=blue, raise=-.5pt}, decorate}] ($(nant2) + (0,-4pt)$) to [out=45, in=180] ($(nant3) + (0,-1.25pt)$) -- ($(nant4) + (0,-1.25pt)$);       \end{tikzpicture}          \end{document}      The commented lines show the method I'm using to approximate the result I want, just in case it isn't clear what the intended result is, and to save somebody the trouble of suggesting it. Guided by Alain Matthes's answer, I tried to use the `fixedpointarithmetic` library for the particular path in the picture. However, this seems to cause `pdflatex` to hang indefinitely. (I know this library slows things down but I don't think it should take quite this long. At least, when it doesn't hang, it works in a reasonable time.) Simplifying, I came up with this Minimum (non-)Working Example:               \documentclass[tikz]{standalone}     \usepackage{fp}     \usetikzlibrary{calc,decorations.pathmorphing,decorations.text,fixedpointarithmetic}     \begin{document}            \begin{tikzpicture}         [         nant/.append style={draw=#1, double=#1!25, double distance between line centers=5.5pt, line width=.5pt, decorate, decoration={snake, segment length=10pt, amplitude=.5pt}},         ]         \path [nant=red] (0,5) -- (10,10);         \path [nant=blue] (0,0) to [out=190, in=30] (10,5);         \path [fixed point arithmetic, nant=green] (0,10) -- (10,15);         \path [fixed point arithmetic, nant=black] (0,0) to [out=190, in=30] (10,5);       \end{tikzpicture}          \end{document}      The first three paths are drawn fine if I comment out the fourth but the fourth causes the hang. Given that PGF's maths parser can cope with this path without resorting to the used of fixed point, it presumably cannot be a capacity issue. So there is something about trying to draw the curved path, it seems, as opposed to the straight line. What am I doing wrong here? The manual doesn't say much about situations where you cannot use fixed point so I'm not sure what to look for or where to start. Any suggestions for diagnostics would be appreciated.


title: Using metafont-letters in LaTeX

text: I was playing around in metafont with some symbols I needed and now I got a result that I'd like to use. But I have two problem: I just need one, maybe two symbols, which are compiled right now using               mf filename.mf      and since I won't probably use this again for quite a long time (and I do not have much time right now), I am unable to read 99+ pages of tutorials of how to use metafont. Also, the Metafont-book (I just have to admit it, sorry), bored me to death (the TeXbook was way better I find). Well, there are then 3 files:               filename.2602gf  filename.log  filename.mf      Now, I do not know how to continue. How can I use the one letter I created there (filename.2602gf) in my LaTeX-Document? Please, if anyone knows, tell me the shortest and easiest way since I really do not have much time left before I need to finish this.


title: a single wrong character in a font

text: I am writing some code using unicode and my chosen font works out great for me with the exception of for some reason the font uses an italicised dollar sign instead of the sign for GBP. Is this a bug in my code or will I have to import the correct one from a different font? Is there a way to do this without using math symbols, since the text will be coming in from another source rather than me writing it. If I understand this (Importing a Single Symbol From a Different Font) process correctly, I'd rather not do that, and just have the program replace the offending character.               \documentclass[11pt]{article}     \usepackage{fullpage}     \usepackage[utf8]{inputenc}     \usepackage{tabularx}     \usepackage{ltablex}     \usepackage{helvet}     \renewcommand{\familydefault}{\sfdefault}     \usepackage[none]{hyphenat}     \usepackage{array}     \usepackage{bigstrut}     \begin{document}     The text in here £ is the problem character.     \end{document}"""


title: Italics using csquotes with foreign language

text: Using the `csquotes` package and `polyglossia` with French, i want to transform only `\foreignquote{english}{my text is write in english italics with « » typography}` into italics.               \documentclass[a4paper, 12pt,twoside, openright]{memoir}     \usepackage{polyglossia}     \setdefaultlanguage{french}     \usepackage{fontspec}     \usepackage[usenames,dvipsnames]{xcolor}     \usepackage[autostyle=true,french=guillemets,maxlevel=3]{csquotes}     \usepackage{xparse}     \usepackage{graphicx}     \usepackage[protrusion=true]{microtype}     \sidecapmargin{outer}     \setsidecappos{t}          \usepackage[backend=biber,backref=true, natbib=true, isbn=false, doi=false, url=false, style=authoryear,maxcitenames=1, maxbibnames=999, sorting=nyt, refsection=chapter, hyperref]{biblatex}          \addbibresource[datatype=bibtex]{library.bib}          \begin{document}          \chapterstyle{bringhurst}          \foreignquote{english}{my text is write in english italics with « » typography}          \printbibliography          \end{document}      For example on Wikipedia, the French citation page says " only use «» " : Voici « une citation en français », mais « _here is a quotation in English_ ». Update 1 : Example given by egreg work only for one level of nested quote at this time, and often you can have some citation like this :               \foreignquote{english}{my text is write in english italics with « » typography, and a \foreignquote{english}{ nested level of citation like this }  }      Give something like this : « my text is write in english italics with « » typography, and a "nested level of citation" like this »


title: Header disappears on pages with a figure

text: I noticed that my header (see MWE below) does not show in pages where the figures take up the whole page. Actually, an "irrelevant" header appears which is the section name. In addition, the page numbering is moved from the bottom to the top. Any help on solving this and making my report look better will be appreciated a lot.               \documentclass[12pt]{report}      \usepackage{makeidx}     \usepackage{graphicx}      \usepackage{graphics}      \usepackage{leqno}     \usepackage{amsmath}      \usepackage{amsthm}      \usepackage{amsfonts}     \usepackage{rotating}      \usepackage{amssymb}      \usepackage{subfig}     \usepackage{floatflt}      \usepackage{rotating}      \usepackage{framed}     \usepackage{float}      \usepackage{multirow}     \usepackage{floatpag}     \usepackage[left=3cm,top=3cm,right=2.5cm,bottom=2.8cm]{geometry}     \usepackage[authoryear,round]{natbib}     \usepackage{fancyhdr}     \usepackage[font={small,it}]{caption}     \renewcommand{\baselinestretch}{2.0} \textwidth=37pc \textheight= 58pc     \oddsidemargin=4pc \evensidemargin=1pc \headsep=15pt     \parindent=1.7pc      \parskip=0pt     \voffset = -25pt      \setcounter{tocdepth}{4}      \setcounter{secnumdepth}{4}     \setcounter{section}{0}      \def\thesection{\arabic{section}}     \begin{document}      \chapter{Introduction}\label{Introd.Chap}     \pagestyle{fancy}      \fancyhf{}      \rhead{Introduction}      \lhead{Chapter     \ref{Introd.Chap}}      \cfoot{\thepage}          \section{This shouldn't appear in the header} Some text \newpage          Some text \newpage          Some text \newpage          \begin{figure} \centering \includegraphics[scale=0.75]{mwe.eps}     \caption{Caption }\end{figure}          \end{document}


title: Fonts and calibration in math mode

text: Anyone have any ideas on how to obtain the small `+` in the subscripts, shorter `\overline` on the `\mathbb{N}` and the fat `\verts` on the semi norm on the bottom as seen in the following notation? ![enter image description here](http://i.stack.imgur.com/0JQ1C.png)


title: Creation of enumerate-like enviroment in gather and align environments

text: I use the `gather` and `align`-`aligned` environments of `amsmath` package and I want to create a list inside them like the one created with the `enumerate` environment. How can I achieve that? A MWE would be that:               \documentclass[12pt]{article}     \usepackage[top=0.3in, bottom=1.2in, left=0.8in, right=0.8in]{geometry}          \setlength{\parindent}{0cm}          \usepackage[fleqn]{amsmath}     \usepackage{unicode-math}          \everymath{\displaystyle}          \newcommand{\3}{\vspace{0.3cm}}          \begin{document}          \begin{gather*}     \begin{aligned}     &x+y=0\\     &y+z=0\\     &z+x=0     \end{aligned}     \end{gather*}          \end{document}


title: Putting a number on the right hand side without using the equation or align environment?

text: I have a couple of lines which I wish to number and I'm hoping for something like: Text... \alignright{1} or something like that if it exists to produce Text... (1)


title: makeidx, xstring, forloop and utf8 conflict

text: I'm using Danish characters in strings that I split with `\StrCut` from the `×string` package and use within a `\forLoop` from the `forloop` package. The result is not good. Consider this small example:               \documentclass{memoir}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{forloop}     \usepackage{xstring}     \usepackage{makeidx}     \makeindex          \StrCut{skøn|skat}{|}\pa\pb          \begin{document}          \pa          \pb          \newcounter{ct}     \forLoop{1}{1}{ct}{       \index{\pa}     }           \printindex     \end{document}      The `\StrCut` command splits the string `skøn|skat` into two strings, which it stores in `\pa` and `\pb`. When I run `latexmk -pdf file.tex` I get this error:               ! Undefined control sequence.     l.3   \item sk\T                     1\o n, 1      and the word "sk1øn" is printed in the index instead of "skøn". If I omit `\StrCut` and use the string `skøn` directly, the problem goes away. If I omit `\forLoop` and use `\index{\pa}` directly, the problem goes away. However, I really want to use both. How can I solve the problem? (Please don't tell me that the `\forLoop` does nothing useful. I know that. I've reduced this example from a much larger one.)


# The Question Can I use a TeX primitive in a "before" and "after" macro? (and how?) There are two questions that I found useful and related to my question, which sent me in the right direction: how to even ask this question!   * What are the different kinds of boxes in (La)TeX?   * Why does LaTeX make a distinction between commands and environments?   * How to make a list of unbreakable items?   * How to prevent pagebreak in description environment # Example Situation I am using a custom list setup with the `enumitem` package and I would like to use a primitive in the variables below:               \newlist{legal}{enumerate}{10}     \setlist[legal]{label*=\texttt{\arabic*.},resume,before={<HERE>}, after={<HERE>}}      I would like to put `\vbox{` in the `before={}` and `}` in the `after={}`, but obviously I cannot type `before={\vbox{}, after={}}` Why would I want to do this? For example, I could want to put a box around each mother and daughter list item, such that they remain on the same page. Or maybe I would like to put other primitives around my list environment just for kicks. Is there any way to do this?


title: Customising question number position in exam document class

text: I am using the exam document class and have a few questions about customising the layout. Firstly I want to move the question number to the left so it is in line with the left header, and I want more horizontal space between the question number and the actual text of the question. I'd like to do the same with the question part numbers too, having it aligned with the left part of text of the question above, and left justified instead of right justified. My explanation was a bit rubbish, so here's a pic to illustrate something like what I am after (I want the left, instead of the right): ![enter image description here](http://i.stack.imgur.com/Q3L18.jpg) MWE:               \documentclass[a4paper]{exam}     \renewcommand{\thepartno}{\roman{partno}}          \begin{document}     \firstpageheader{\large\textbf{Pure Mathematics: Number theory}}{}{\thepage}     \runningheader{}{}{\thepage}     \vspace*{0cm}          \begin{questions}          \question     For positive integers $a$, $b$ and $c$ \ldots           \begin{parts}          \part     For positive integers $a$, $b$ and $c$ \ldots           \part     For positive integers $\alpha$, $\beta$ and $\gamma$ \ldots           \end{parts}          \end{questions}          \end{document}


title: Undefined control sequence \bbljan

text: I'm writing a bibliography for an article in Russian. Using `\bibliographystyle{plain}` is not an option, since it uses e.g. conjunction "and" when listing authors. So I'm sticking to `\bibliographystyle{ugost2008}`, but it keeps complaining that `\bbljan` is undefined. I assume that `\bbljan` should expand to "January" for English and to "Январь" for Russian. My `babel` apparently doesn't know anything about `\bbljan` though. I'm currently using               \def\bbljan{Январь}      but isn't it lame? What should I do?


title: More WYSIWYG in math mode?

text: I am wondering if there is some alternative to math mode or some other way to use some things directly, e.g.               β instead of \beta          A' instead of A^\prime          A | B instead of A \mid B (when using A | B in math mode, the space between A, | and B gets lost)      It would make formulas more comfortable to read.


title: KOMA-Script scrbook: How to remove period after part

text: I'm using `scrbook` to typeset a document and I'm using `\part` for formatting the parts of it. The default output renders `\part{Mytitle}` into > Part I. > > Mytitle Now I'd like to get rid of the period after "Part I." In the KOMA-Script guide I have only found options to generally switch off punctuation after every part, chapter, section etc. So I tried `\renewcommand{\thepart}{\Roman{part}}` but this strangely still puts a period after the roman number. However, `\renewcommand{\thepart}{\arabic{part}}` and `\renewcommand{\thepart}{\arabic{part}.}` produce the expected difference. So what is so special with roman numbering here?


title: Minted shows formatted tex code instead of intended source

text: I use WinShell with PDFLatex on Windows 7. I managed to install Pygmentize and compile the minimum example without errors:               \documentclass{article}          \usepackage{minted}          \begin{document}          inline: \mint{python}|import this|          \begin{minted}{c}     int main() {         printf("hello, world");         return 0;     }     \end{minted}          \end{document}      However, the output is strange. It shows tex code in the document, which is nicely formatted as if it was Python code: ![result](http://i.stack.imgur.com/iPmdO.png) Any idea how this could happen? Please comment, if more information is needed. **Update** I compile via WinShell, my PDFLatex command line looks like this:               "C:\Program Files (x86)\MiKTeX 2.9\miktex\bin\pdflatex.exe" -shell-escape -aux-directory=./.aux -interaction=nonstopmode -synctex=-1 "%s.tex"


title: Format a 'sectioned' counter individually

text: I have a set of different types to include figure-like items in a document. These include a float (created by `\SetupFloatingEnvironment`), a non-float and full-page environments/commands. While the non-float environment easily can share the counter and list of the basic float type through the `\captionsetup`, I had to go to some length with the full-page type: This doesn't have a real `\caption` but rather a text that is formatted like the caption. I then manually update the counter, write a) that 'caption' in the page header and b) manually create a toc entry. Basically that works quite well, but when I'm in a context where the floating environments are numbered with the chapter number included I don't know how to mimick that in my manual caption. So the question is: How can I determine the actual numbering options for floats (that the end user of my package may have changed individually)? And how can I reproduce that formatting for a custom caption and 'contentsline'?


title: Difficulty with lineup of inner table inside a table cell

text: I need to create a table with 1 row and 2 columns where the first cell has an inner table and the second a photo where I specify the width and let the system take care of the height. My difficulty is that I cannot get the inner table to line up at the top of the cell. To illustrate, here is the result I want: ![enter image description here](http://i.stack.imgur.com/KP7AW.png) and this is what I get ![enter image description here](http://i.stack.imgur.com/VSkps.png) Also, this is the link to the original picture used in the example I have tried all sorts of methods, from using `\parbox` and `\vspace` controls but after two days of reading manuals, googling and experimenting I'm admitting defeat and am now asking for help. Here is the code which produced the badly formatted table.               \documentclass[twoside]{article}     \usepackage{graphicx}     \usepackage{calc}          \begin{document}     \noindent     \begin{tabular} {         |@{}p{0.5\linewidth}@{}|         p{0.5\linewidth-2\tabcolsep}|     }         \hline         \begin{tabular} {             |p{0.5\linewidth-2\tabcolsep}|             p{0.5\linewidth-2\tabcolsep}|         }             Serial Number & K77C 15229\\ \hline             Reading & 18901 \\ \hline             Date & 08/10/2012 \\ \hline         \end{tabular}         &          \includegraphics[width=\linewidth]{pics/DSC_3543.jpg} \\         \hline     \end{tabular}     \end{document}      If I put `\vspace{0mm}` in front of `\includgraphics`, the inner tables appears at the top, as desired, but then extra white space appears above the photo. Putting a negative number (e.g. `\vspace{-6mm}`) produces the desired effect but then the number would need to change if the inner table had 4 or 5 rows. Since these need to be generated in the hundreds, it's not practical to have to manually adjust each one. I feel as if I'm missing something simple. Thanks to anyone who can help!


title: tcolorbox minted library with python3 non-determinism

text: Later versions of the package `tcolorbox` allows formatting source code with its `minted` library (which uses the `minted` package). When a document is compiled, a temporary file with extension `.pyg` is generated with LaTeX code created by the `pygmentize` Python application. I have noticed that with Python3 this generated file may differ from run to run, with its lines sorted differently each time. The lines are the same at each run, but not necessarily in the same order. This is making `latexmk` run indefinitely when compiling a document. That happens because `latexmk` determines if a new run of the latex compiler is needed based on a checksum of the input files. This bad behaviour is not seen with Python2. Here is a minimal working example `test.tex`:               \documentclass{article}     \usepackage[minted]{tcolorbox}          \begin{document}          \begin{tcblisting}{listing engine=minted, minted language=java}     public class HelloWorld {       public static void main(String[] args) {         System.out.println("Hello World!");       }     }     \end{tcblisting}          \end{document}      Compilation command:               latexmk -pvc -pdf -latexoption=-shell-escape test      `latexmk` has in its output message:               Latexmk: applying rule 'pdflatex'...     Rule 'pdflatex': File changes, etc:        Changed files, or newly in use since previous run(s):           'test.pyg'     Latexmk: Maximum runs of pdflatex reached without getting stable files      I am looking for a fix for `tcolorbox` using Python3.


title: No page number displayed after applying header and footer

text: After applying a new header and footer, no page number is displayed in my document; only the updated header and footer. And there is another problem: there is no header or footer displayed on chapter pages but here I can see the page number. I need both header and footer and page number on all the pages. This is what I use at the moment:               \documentclass[a4paper,12pt,roman]{report}     %\userpakage{time}     \usepackage{thesis}     \usepackage{epsfig}     \usepackage{graphics}     \usepackage{graphicx}     \usepackage{epstopdf}     \usepackage{fancyhdr}     \usepackage[left=1.57in, right=0.98in,top=0.98in,bottom=1.57in]{geometry}     \usepackage{amsmath}     \pagestyle{fancy}     \fancyhf{}     \chead{\textbf Header }     \cfoot{\textbf Footer }      ![http://latex- community.org/forum/download/file.php?id=5937](http://i.stack.imgur.com/VFtKB.jpg) ![http://latex- community.org/forum/download/file.php?id=5938](http://i.stack.imgur.com/88QcW.jpg)


title: Environment makes unnecessary page break

text: I have a problem with user-defined environments in LaTeX. Even though the content of an environment seems to fit, sometimes LaTeX makes an unneccessary page break after all. Here is my MWE:               \documentclass{article}          \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \usepackage[ngerman]{babel}          \usepackage{lmodern}                    \newenvironment{testenviron}     {}     {}                    \begin{document}     \begin{testenviron}     Irgendein Text\dots          \vspace{17.5cm}          \dots und am Ende eine Formel:     \[f(x)=x\]     \end{testenviron}     \end{document}      To keep it simple, the environment has an empty pre- and postcode. Furthermore `\vspace{17.5cm}` stands for any text of this length. But for some inexplicable reason pdfLaTeX puts an empty page after that. So my question is: What I am doing wrong and what I am misunderstanding? If I write the pre- and postcode directly without using environments, no further page appears - that's kinda strange.


title: Combined use of [fleqn] and \qedhere

text: It seems there is an issue within the ams packages, which results in an incompatibility between the fleqn option, and the \qedhere command. If those are used together, the qed symbol is flushed to the left of the equation, instead of the right. In the ams revision history, I see a line about a bugfix with "fleqn/qedhere" issues, which is about amscls version 2.02, while I'm using amsclass (and thus amsthm) version 2.20. I have no idea if the bug they fixed is the same I'm experiencing, though. MWE:               \documentclass{article}          \usepackage{amsthm}     \usepackage[fleqn]{amsmath}          \begin{document}     This is a statement.     \begin{proof}       This is the equation settling it all:       \begin{equation}         1 + 1 = 3 \qedhere       \end{equation}     \end{proof}     \end{document}      Enclosing the `\qedhere` in a `\mbox{}`, as suggested in amsthm's manual, doesn't produce the wanted output either (the qed is one quad right of the equation). I'm sure there exists plenty of complicated solutions to this problem, however I'd like to avoid them if possible. More precisely, if I could fix it without changing anything out of my preamble, it would be great. I have hope, because it seems google can't give me anything relevant to that problem, but I don't believe I'm the only one with it. So I might be missing something obvious. Thanks in advance


title: How to make compilation faster?

text: I have a rather large document (about 150~200 pages) with plenty of cross- references. I can, of course, use `\include` and `\includeonly`, but I do not only have new chapters, I also use `\input` for smaller pieces I have written (which are still rather long) and they should not invoke a clearpage. So, disabling those parts will additionally get plenty of **(??)**. Sure, I can get out the relevant pieces, but I don't like that type of workflow. Are there good references what might be a good workflow to write a PhD thesis or a book? I am using a scons script to run the required programs often enough (biber as well). The reason I compile I to see if it looks good now, or to make it easier for me to read the things I have typed. I am using emacs, so perhaps preview-latex can help me, but that seems to me as a rather ugly hack in the way it is generated (and slow). Is anybody aware of using MathJax for preview-latex? They would not have to go through the latex compiler. But using these things still make the compile last way too long. So my question is perhaps a bit strange and displays my tremendous ignorance on these matters, but... **The question:** I see there are many projects like LuaTeX, XeTeX and so on which seem to improve on one of the disadvantages of pdftex. Are there also versions which have a saner error handling? For instance, are there versions which do not require so many auxiliary files and store ".aux" in perhaps an SQLite DB? I can imagine that the user interactive part during compile was very useful when computers were slow and memory was expensive, but nowadays this does not seem so useful to me (and most editors seem to disable it...). Often, I have to delete the .aux because otherwise I keep compile errors after I made a mistake. Am I doing something wrong? What is the big problem for having a better handling of errors in LaTeX? I am interested in the problem from a programming point of view, I would like to understand the compilation in more detail. **Last...** Are there also drivers that compile into some kind of "intermediate format"? The thing would be that this should support the pdf features but still be rather easily readable, for the purpose of having at compile time the option to do a diff with the old code, study what needs to be regenerated and insert that part. In the end the page breaks could be regenerated, but if I am just working on the document a "lazy" compile which skips this step would be very useful. I am not sure what kind of answer I am looking for. "You are doing it wrrrrong" is fine as well. Actually, that would be the best as then I would not have to start programming instead of working on my thesis and teach calculus 8-).


title: How can I remove the shade in this TikZ picture to get white filling?

text: I want pure white fill so that upper most circle becomes incomplete. But black shade comes in the figure. Is there any easier way to do this? ![enter image description here](http://i.stack.imgur.com/eRTSg.png)               \documentclass{article}          \usepackage{tikz}          \begin{document}     \begin{figure}     \begin{center}     \begin{tikzpicture}[scale=1.0, ,transform shape]     \node [draw, thick, minimum size=1cm, circle] at (0,0) {};     \node [draw, thick, minimum size=1cm, circle] at (1,0) {};     \node [draw, thick, minimum size=1cm, circle] at (2,0) {};     \node [draw, thick, minimum size=1cm, circle] at (-1,0) {};          \node [draw, thick, minimum size=1cm, circle] at (1.5,-0.85) {};     \node [draw, thick, minimum size=1cm, circle] at (0.5,-0.85) {};     \node [draw, thick, minimum size=1cm, circle] at (-0.5,-0.85) {};          \node [draw, thick, minimum size=1cm, circle] at (1.5,0.85) {};     \node [draw, thick, minimum size=1cm, circle] at (0.5,0.85) {};     \node [draw, thick, minimum size=1cm, circle] at (-0.5,0.85) {};          \node [draw, thick, minimum size=1cm, circle] at (1.0,2*0.85) {};     \shade[fill=white!20!white, draw=white!40!black](-1.5,2.0)--(2.5,2.0)--(2.5,2.5)--(-1.5,2.5);          \draw[dotted,thin](-1.5,-2)--(-1.5,2.0)--(2.5,2.0)--(2.5,-2)--(-1.5,-2);          \end{tikzpicture}     \end{center}     \caption{hhhhhhhhh}     \label{figspahre}     \end{figure}          \end{document}


title: Aligning equations across slides (/only)

text: Goodday, I am currently working on a presentation on the Calculus of Variations. In it I present a proof for the Euler equation. Currently I use the following Latex code:               \begin{frame}     \frametitle{Euler}     \framesubtitle{Bewijs}     \begin{align*}     0 = \frac{\partial \mathcal{F}}{\partial \alpha} &= \frac{\partial}{\partial \alpha} \int_{x_0}^{x_1}f\{y(\alpha,x),y'(\alpha,x);x\}dx\\     \only<4-8>{&=...\\}     \only<2-3>{&= \int_{x_0}^{x_1} \frac{\partial}{\partial \alpha} f\{y(\alpha,x),y'(\alpha,x);x\}dx\\}     \only<3-4>{&= \int_{x_0}^{x_1} \left(\frac{\partial f}{\partial y}\frac{\partial y}{\partial \alpha} + \frac{\partial f}{\partial y'}\frac{\partial y'}{\partial \alpha}\right)dx\\}     \only<4-5>{&= \int_{x_0}^{x_1} \frac{\partial f}{\partial y}\eta(x)dx + \int_{x_0}^{x_1}\frac{\partial f}{\partial y'}\eta'(x) dx\\}     \only<5-6>{&= \int_{x_0}^{x_1} \frac{\partial f}{\partial y}\eta(x)dx - \int_{x_0}^{x_1}\frac{d}{dx}\left(\frac{\partial f}{\partial y'}\right)\eta(x)dx\\}     \only<6-8>{&= \int_{x_0}^{x_1} \left( \frac{\partial f}{\partial y} - \frac{d}{dx}\frac{\partial f}{\partial y'} \right)\eta(x)dx\\}     \only<8>{\implies &\frac{\partial f}{\partial y} - \frac{d}{dx}\frac{\partial f}{\partial y'} =0}     \end{align*}     \end{frame}      But unfortunately, as expected, it gets jumpy and looks really messy. I want to be able to align it properly. How would I go about doing this? Thank you in advance.


title: Tweaking \theoremstyle

text: Well I want to do is when LaTeX writes **Theorem** at the new line instead of the left side of the page it be a little indented. In other words I want it to start from a little bit to the right.


title: How can I have multiple lines in a header or footer using scrpage2?

text: For an assignment at university I have to copy a lay-out template that is provided in Word but I want to use LaTeX. For this, I need to have two lines in the footer. How can I achieve this using scrpage2? It is possible to simply use `\\` in the text, e.g.               \refoot{\upshape Course year\\ 2010/2011}      however, then the text is shifted upwards into my separation line instead of downwards. There are the commands               \setheadwidth     \setfootwidth      available but not               \setfootheight     \setheadheight      Minimal example:               \documentclass{scrartcl}          \usepackage{ucs}     \usepackage[utf8x]{inputenc}          \usepackage[headsepline, footsepline]{scrpage2}          \refoot{Course year\\ 2010/2011}      \rofoot{Course year\\ 2010/2011}          \thispagestyle{scrheadings}     \pagestyle{scrheadings}          \begin{document}      This is a sample document.     \end{document}


title: Blank line occurring between description term and itemize list when using style=nextline

text: In my Sphinx project, I have description lists that start with either a paragraph or a list. Since I want the description term to be on its own line, I use `enumitem` with `{style=nextline}`. The problem is that this causes an extra line of space to appear after the term if an itemize list follows. Being auto-generated by Sphinx, though, I'm limited to setting options in the preamble to fix it. Does such a fix exist that prevents the extra space?               \documentclass{article}     \usepackage{enumitem}     \setlist[description]{style=nextline}          \begin{document}          \begin{description}     \item[{This is a term.}] \leavevmode     This is a description of the term, usually spanning multiple lines,     which should start on its own line.     \end{description}          \begin{description}     \item[{This is a term containing an itemize list.}] \leavevmode     \begin{itemize}     \item {}      This is an item with too much space between it and the term above.     \end{itemize}     \end{description}          \end{document}      **Update:** To solve the problem at hand I have the Makefile applying karlkoeller's fix across the entire file. However, this post on changing behaviour depending on environment helped me come up with this solution that almost works.               \documentclass{article}     \makeatletter     \def\ifenv#1{        \def\@tempa{#1}%        \ifx\@tempa\@currenvir           \expandafter\@firstoftwo         \else           \expandafter\@secondoftwo        \fi     }     \makeatother          \usepackage{enumitem}     \setlist[description]{style=nextline}     \setlist[itemize]{before=\ifenv{description}{\vspace*{-1.5\baselineskip}}{\ldots}}          \begin{document}          \begin{description}     \item[{This is a term.}] \leavevmode     This is a description of the term, usually spanning multiple lines, which should start on its own line.     \end{description}          \begin{description}     \item[{This is a term containing an itemize list.}] \leavevmode     \begin{itemize}     \item {}      This is an item with too much space between it and the term above.     \end{itemize}     \end{description}          Text in between     \begin{itemize}     \item {}      This is a bare itemize.     \end{itemize}          \end{document}      What's supposed to happen is the code passed to `before` is run wherever an `itemize` list starts to determine if it's inside a `description`, and apply the fix if necessary. However, it's returning the false condition (`\ldots`) each time because the code is being evaluated in the preamble, rather than the document itself. I figure `expandafter` is the answer, but I couldn't get it to work.


title: referencing labels from other files

text: Sometimes I want to refer (using `\ref`) a `\label` from some other tex file. What is the right way to do it? (It's, of course, possible to `\include` all files in one and then use `\includeonly` — but it breaks e.g. page and section numbering.)


title: Not making space?

text: The system of linear equations               \[6x_1 + 4x_2 = 9 \\     x_1 + 5x_2 = 0     \]      can be also depicted as               \[ \left( \begin{array}{ccc}     6 & 4 & 9 \\     1 & 5 & 0 \end{array} \right).     \]      When it is entered in latex, the `9` is displayed next to the `x_1` and I need that fixed.


title: Custom Beamer Theme: Set normal font size

text: As a follow up to an earlier question I asked, I need to be able to set the normal font size to 20pt for a Beamer presentation. The catch is, I can't use               \documentclass[20pt]{beamer}      because I want to set this font size inside a custom theme that the end users can just load without needing to supply the extra `[20pt]`. I already tried               \setbeamerfont{normal text}{size=20pt}      but no joy!