title: Latex citations Bibtex. Wrong capital and alphabetical order

text: In my bibliography citations are ordered wrong. For example:               @inproceedings{17Degroot,       title={Critical scour: new bed protection design method},       author={De Groot, M.B.},       booktitle={Journal of Hydraulic Engineering},       volume={114},       pages={1227--1240},       year={1988},       publisher={ASCE, New York, USA}     }      In my bibliography may it should say M.B. de Groot (no capital D) and in my report, it should refer to it as `[De Groot, 1988]` (Capital D). Besides this, the alphabetical order in the bibliography is wrong. Bibtex sorts this on the D while it should be on the `G`. I have the same problem with many other authors with prepositions. I am using the `plainnat` bibliography style. Thanks for the help.


title: EveryShipout errors when using TikZ with conference style

text: Using the conference style `cvpr.sty` from the CVPR 2013 Author Kit, the following small example works for me:               \documentclass{article}          \usepackage{cvpr}     \def\cvprPaperID{0}   % necessary for cvpr.sty to work          %\usepackage{tikz}    % uncommenting this line results in errors          \begin{document}       test     \end{document}      although I get the warning               LaTeX Warning: You have requested package `eso-pic', but the package provides `everyshi'.      However, if I uncomment `\usepackage{tikz}`, I get lots of errors related to EveryShipout, the first one being               ! LaTeX Error: Command \@EveryShipout@Hook already defined.      Any ideas how to resolve this issue? It seems to be related to the warning about `eso-pic` and `everyshi` but I don't know how. (I have seen this similar question, but the solution - reordering the packages - doesn't work here.)


title: \emph vs. \mkbibemph and other things

text: I usually use the commands that come with biblatex (like `mkbibemph`, `mkbibquote` etc.) _only_ in my bibliography. What about using them in the text of my document? Should I do that? Are there any advantages?For example, I remember reading something about that the biblatex-commands can rule whether or not the dot is inside or outside the quotation marks. But I don't know whether this is still the case, whether it works and if it is recommended. So, what about `\emph` vs. `\mkbibemph`? Or `\mkbibquote` vs. `"..."` vs. `\enquote` (of csquotes)? (I think these are the two commands I am most interested in, but I am sure that there are others that also come with `biblatex`, isn't that so (e.g. `\mkbibparens`)? What about those?)


title: How do I get an Uvular Trill <ʀ> IPA symbol?

text: I've tried looking at a tutorial online, which tells me that \;R should produce the ʀ symbol that I want to represent an uvular trill, but this only seems to produce a normal capitalised R. What do I need to get the trill symbol that I want? (I have looked at the comprehensive symbols list and the closest I can find there is \textscr, which is better, but not perfect)


title: Change Okular's forward search position

text: I use Kile's live preview feature as suggested in this question. In the new Kile (the about box says I'm using 2.9.60), also forward search is working. My problem is that the location where Okular shows the forward search position (indicated by a thin blue line) is vertically centered in Okular's window. Is there a way to change the position, so that the forward search match is shown more to the top of Okular's window? This is my MWE:               \documentclass[10pt]{beamer}     \begin{document}     \begin{frame}     This is a test frame     \end{frame}          \begin{frame}     \frametitle{Test frame with columns}     \framesubtitle{Columns lead to forward search match in the title}     \begin{columns}          \begin{column}{0.5\textwidth}     This is the first column...     \end{column}          \begin{column}{0.5\textwidth}     ...and this is the second column     \end{column}          \end{columns}     \end{frame}          \begin{frame}     Another test frame     \end{frame}          \end{document}      The problem is that the forward search has trouble with the columns and only "finds" the title of the frame. Since the forward search match is centered vertically, the frame is so far down that it is cut off at the bottom: ![using Okular with forward search](http://i.stack.imgur.com/rhKFp.png) I would like to have the blue line with the forward search match to be near the top of Okular's window, maybe at 25% or so. Is that somehow possible?


title: How to beautify '+' sign

text: I am writing a document with LaTeX covering the basics of programming with C++ and unfortunately the '+' signs look kind of ugly to me: They seem to be too big, too thin (regarding the rest of the text) and also shifted downwards. Here is a screenshot from my document (which is written in German): ![enter image description here](http://i.stack.imgur.com/vIzQE.png) The issue with the thickness is not visible here, because one has to zoom out to notice. The example is from a `\section{}`. Are there any ways to do better? I haven't found a special '+' LaTex command, so I assume one has implement one's own solution.


title: Word overlap in TOC with memoir class and part subdivision

text: I am using the memoir class to generate a book manuscript. The table of contents entry for `Part VIII` overlaps with the part title which is `Examinations`. The result is shown below: ![TOC overlap](http://i.stack.imgur.com/pktck.png) Is there a way to avoid or correct this? Note that there is no problem on the actual page itself denoting that part; only in the TOC. `memoir` seems to use Roman numerals as default for parts. I have not found a way to change part numbering to alphabetic, which might be a sensible workaround.


title: Parse and execute the next word as a command?

text: I would like to have a macro, let's call it `\csword`, that reads the next word in the input (i.e. sequence of letters `a-zA-Z`), and then executes that word as a macro. For example               \csword command     \csword command[and]{arguments}      should expand to something like               \command     \command[and]{arguments}      Following `\csword` by anything other than a letter should, say, throw an error. In case I'm just too focused and trying to solve things the wrong way, this is the bigger picture of what I _actually_ want to do. I want to define a macro which receives a number of options as a comma separated list. These options, however, might further receive some arguments or even optional arguments. In other words, I'm trying to turn               \myfancycommand{optionA, optionB[with]{args}, optionC{fun}, optionA}      Roughly into something like               \optionA\optionB[with]{args}\optionC{fun}\optionA      By the way, and this is important, I should be able to repeat “options” and their order of execution matters.


title: Exporting LyX to LaTeX append filepath in \includegraphics

text: When I export LyX file to LaTeX, I get `\includegraphics[width=5cm,height=4cm]{1D__User-Folder_Fig1.pdf}`. Then I do have to make manual changes in LaTeX document. I wonder how to force LyX to give `\includegraphics[width=5cm,height=4cm]{Fig1.pdf}` rather than `\includegraphics[width=5cm,height=4cm]{1D__User-Folder_Fig1.pdf}`. **UPDATE** I'm using LyX 2.1.0beta1 and Windows 7.


title: TikZ: position with different anchors

text: I would like to label lines at the same midway horizontal position `(pos=0.5)`. But as the second line is tilted, the labels lower left corner should touch the line. Hence, I would need to manually adjust the position of the second label, to let's say 0.4. Is there any way to automatically do this? South that A and B are exactly below each other, but still the lower left corner of B touches the line? Below is some minimal example where B touches the line as desired, but A and B are not aligned below each other.               \documentclass{minimal}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}     \draw (0,0) -- (2, 0) node[draw, inner sep=5pt, pos=0.5, anchor=south] {A};     \draw (0,0) -- (2,-3) node[draw, inner sep=5pt, pos=0.5, anchor=south west] {B};     \end{tikzpicture}     \end{document}


title: Whitespace around characters

text: I need to wrap some of the characters with whitespace so that the terms align correctly               $\begin{align*}     x = 1 + 2 + 3 + 4 + \cdots + n \\     x = n + (n-1) + (n-2) + (n-3)+\cdots+ 1\\     \cline{1-2}     2x = (1+n) + (1+n) + (1+n) + (1+n) + \cdots (1+n)     \end{align*}$


title: Append \centering to \begin{subfigure} (from subcaption package)

text: How can I append `\centering` to `\begin{subfigure}` (from _subcaption_ package)? I tried using the `etoolbox` , but for some reason it won't work for the `subfigure` enviroment (only working for the `figure` enviroment). Here a MWE to demonstrate my problem.               \documentclass{article}          \usepackage{etoolbox}     \usepackage[margin=1em]{subcaption}          \usepackage{mwe}               \apptocmd\figure{\centering}     \apptocmd\subfigure{\centering}                    \begin{document}              \begin{figure}             \includegraphics[width=4cm]{example-image}             \caption{qqq qqq qqq qqq qqq qqq }         \end{figure}              \begin{figure}             \begin{subfigure}{4cm}                 \includegraphics[width=2cm]{example-image-a}                 \caption{abc abc abc abc abc  }             \end{subfigure}%             \begin{subfigure}{4cm}                 \includegraphics[width=2cm]{example-image-b}                 \caption{abc abc abc abc abc abc abc abc abc abc }             \end{subfigure}             \caption{qqq qqq qqq qqq qqq qqq }         \end{figure}     \end{document}      result (with image a, b misplaced): ![result](http://i.stack.imgur.com/ngZZB.png) I also tried `\AtBeginEnvironment{subfigure}{\centering}` and to manually patch it with `\let`, but no luck.


title: Loading file after converting to ASCII characters

text: I am writing a document on phonetics using the `media9` package to include pronunciations of some of the words in the document. The words that are to be pronounced are in Danish, and thus their spellings include the non-ASCII characters `æøå`, which LaTeX has never really been comfortable with. What I need is a command `pronounce{word}`, which writes out `word` in the document and links to the sound file, if one such exists. If `word` includes `æ`, `ø`, `å`, or a space, the command first has to ASCIIfy those characters to `ae`, `oe`, `ae`, and `-` and then link to the sound file with the ASCIIfied name.               \documentclass{memoir}          \usepackage[latin1]{inputenc}     \usepackage[T1]{fontenc}          \usepackage{amsmath,amssymb,geometry,graphicx,amstext}          \usepackage{media9}          \newcommand\listen[2]{ % links to the file #1, then writes out #2         \includemedia[         addresource=#1,         transparent,         flashvars={             source=#1             &autoPlay=true             &hideBar=true         },         ]{#2}{APlayer.swf}     }          \usepackage{xstring}          \newcommand*\asciify[1]{% converts æøå and space to ASCII characters and "-"         \StrSubstitute{#1}{æ}{ae}[\tempone]%         \StrSubstitute{\tempone}{ø}{oe}[\temptwo]%         \StrSubstitute{\temptwo}{å}{aa}[\tempthree]%         \StrSubstitute{\tempthree}{ }{-}%     }          \newcommand*\pronounce[1]{% the final command that is the issue here         \IfFileExists{\asciify{#1}.mp3}{% only include the file if it exists             \listen{\asciify{#1}.mp3}{#1}% ASCIIfy the word, then include the file and write out the original word         }{%             #1% else, just write out the word         }%     }          \begin{document}          \pronounce{være}          \end{document}      However, I get lots of errors, primarily from `xstring`. I did try putting `\expandafter`s everywhere, and I did try some of the other expandmodes from `xstring`. Didn't help much though. Anybody who can see the error?


title: ConTeXt and Smultron

text: I have installed Smultron 6 and and configured ConTeXt MkIV in Applications/ConTeXtStandalone as per the Wiki http://wiki.contextgarden.net/ConTeXt_Standalone/Mac_Installation. I have also set up the command               #!/bin/sh      cd /Applications/ConTeXtStandalone/      . /Applications/ConTeXtStandalone/tex/setuptex /Applications/ConTeXtStandalone/tex     cd %%d     context %%p      in Smultron as per the Wiki instructions. When this command is run the Command Result box shows               /Applications/ConTeXtStandalone/tex/texmf-osx-64/bin/mtxrun:14518: attempt to concatenate a nil value      The target file is not built and no PDF produced. Smultron produces a file in /Users/barry/Library/Containers/com.peterborgapps.Smultron6/Data/Library/Caches. This file contains               #!/bin/sh      cd /Applications/ConTeXtStandalone/      . /Applications/ConTeXtStandalone/tex/setuptex /Applications/ConTeXtStandalone/tex     cd "/Users/barry/Documents/ConTeXt/Templates/ConTeXt/temp2"     context "/Users/barry/Documents/ConTeXt/Templates/ConTeXt/temp2/temp2.tex"      Where temp2.tex is the ConTeXt file that I am trying to build. Copying the Smultron file contents directly into a terminal does build the ConTeXt file temp2 and produces a PDF. It appears that Smultron is not executing its own instruction - even though these instructions work when put directly into a terminal. Does anybody have a solution?


title: Compact collapsing of equations and paragraphs

text: I want to duplicate the compact look of G. K. Batchelor's fluid dynamics book. Where a paragraph terminates such that the mathematical expression can collapse up into the vertical space of the paragraph, the expression moves up. If that makes no sense, see it on Google Books. Can the `align` environment do this automatically? Or do I need to use another environment? I'm not aware of any way to do this automatically.


title: Cross Multiplying Two Fractions with Ovals Around the Appropriate Terms

text: I would like to implement something akin to the following in LaTeX, perhaps in tikz. I would be very grateful for any help. ![screenshot](http://i.stack.imgur.com/QWJGY.png)


title: Insert loop inside table?

text: 1- I want to make a table with n number of rows ? my wrong code               \newcommand{\xx}{     \begin{tabular}{|c|c|c|}     \hline          \newcount\fooo     \fooo=10     \loop               11 & 12 & 13\\     \hline               \advance \fooo -1     \ifnum \fooo>0     \repeat           \end{tabular}     }      I want the result like that using loop or any command ![i want the result like that using loop or any command](http://i.stack.imgur.com/6wahT.png) 2- `\def\abc{dd}` create one value I want command create multiple values like `\def`-multiple `\abc {dd,cc,vv,mm}` * * * now i am using this code `\foreach \x in {1,...,\nRows} {\addtabtoks{ \abc(\x) & yyy & yyy \\\hline}}` the desired command is `\abc(\x)` or `\abc(2)` first loop type the first value of `\abc` second loop type the second value of `\abc` and so on


title: set textcolor in tikzstyle

text: How can I set text color inside tikzstyle? I tried as shown below, but surely that is not the correct thing. I can do it seperately in each node, as shown here, but I want to declare it globally.               \tikzstyle{cloud} = [draw, ellipse,fill={rgb:red,91;green,146;blue,230}, node distance=4cm,      text width=5em, text centered, minimum height=2em, text color=white]


How you can put an image in a footnote on page? try this, but does not work               \footnote {bla bla     \begin {figure}     ....     \end{figure}     }


title: enumerate with Arabic numbers and right parentheses

text: Cannot really figure out how to create such a list: 1) List item 2) List item 3) List item Here's what I have to use so far:               \begin{enumerate}         \item[1)] List item         \item[2)] List item         \item[3)] List item     \end{enumerate}      Without these [1)]..[3)] dots appear instead of parentheses.


title: How to add newline within node using TikZ?

text: I want to break the input of a path in order to draw Pushdown Automaton,so I try to use the break line symbol `\\` and even `$$ $$`, it still doesnt break the lines. ![enter image description here](http://i.stack.imgur.com/Mb4aY.png)   For example, the input should be   `0, 1, 2`   `3, 4, 5` Any idea? Thank you. Code Sample:               \documentclass[10pt,letterpaper]{article}     \usepackage[latin1]{inputenc}     \usepackage[left=1in,right=1in,top=1in,bottom=1in]{geometry}      \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{tikz}     \usetikzlibrary{automata,positioning}          \begin{document}     \setlength{\parindent}{0pt}     \setlength{\parskip}{1ex}          \textbf{PDA:}\\         \begin{tikzpicture}[shorten >=1pt,node distance=5cm,on grid,auto]              \node[state,initial]    (q_0)                   {$q_0$};              \node[state,accepting]  (q_1)   [right=of q_0]  {$q_1$};              \node[state]            (q_2)   [right=of q_1]  {$q_2$};              \node[state]            (q_3)   [below=of q_1]  {$q_3$};                  \path[->]             (q_0)   edge                    node {0,1}            (q_1)                     edge    [loop above]    node {0,1,2,3,4,5}            (q_0)                  (q_1)   edge                    node {0,1}            (q_2)                  (q_2)   edge    [loop right]    node {1}              (q_2)                    ; %end path          \end{tikzpicture}     \\     \end{document}


title: If-then-else inside TikZ graph?

text: I want to draw a graph like in the second picture of the following code:               \documentclass{article}     \usepackage{mathptmx}     \usepackage{tikz}     \usepackage{verbatim}     \usetikzlibrary{arrows,shapes,graphs,graphs.standard,quotes}     \usepackage{calc}% http://ctan.org/pkg/calc     \usepackage{ifthen}          \begin{document}          % This one works     \begin{tikzpicture}          \foreach \x in {1,...,5}     { \node[circle,draw] (\x 1) at (0,\x) {\x};         \node[circle,draw] (\x 2)at (2,\x) {\x};         \ifthenelse{\NOT 4 = \x \AND \NOT 7 = \x}{\draw (\x 1) -- (\x 2);}{} % (*)     }          \end{tikzpicture}          % This one does not work with line (*)     \begin{tikzpicture}     \tikzstyle{vertex}=[circle,fill=blue!15,draw,minimum size=17pt,inner sep=0pt]          %See TikZ documentation! (Section 19, graphs)     \graph[circular placement, radius=4cm, group polar shift=(360/5:0),              nodes={circle,draw,vertex}] {         \foreach \x [evaluate=\x as \sx using int(\x+1)] in {0,...,4} {           \foreach \y in {\x,...,4} {             \x -- \y;             %\ifthenelse{\NOT 4 = \x \AND \NOT 7 = \x}{\draw (\x 1) -- (\x 2);}{} % (*)           };         };       };     \end{tikzpicture}          \end{document}      It uses the TikZ graph library. As you might guess, I want to label the edges dependent on what `\x` and `\y` are in the for loop. So I need an `If-Then- Else` statement and came to this answer: http://tex.stackexchange.com/a/45907/52709. I copied the code, it is the first picture and it works. But applying the same `\ifthenelse`-line to my code (commented out), produces an error at that line: `! Undefined control sequence.<argument> \NOT 4 = \x \AND \NOT 7 = \x }` and also `! Illegal parameter number in definition of \tikz@lib@graph@name.` at the end of the graph defintion (`};`). Isn’t it possible to use something like `\ifthenelse` inside such a graph definition? How can I achieve what I need?


title: Global inline formula breaks configuration

text: How I can configure inline formula breaks globally without changing original formulas? What package can help me? I saw this post, but the trick with comma does not work. **UPDATE** The formulas look like               \( (B_{r+1,1}, C_{r+1,1}), \dots , (B_{r+1,m_{r+s}}, C_{r+1,m_{r+s}}), \dots , (B_{r+s,1}, C_{r+s,1}), \dots , (B_{r+s,m_{r+s}}, C_{r+s,m_{r+s}}) \)


title: Cannot find LaTeX Error

text: I get an error and I don't know the reason:               (d:/texlive/2012/texmf-dist/tex/latex/enumitem/enumitem.sty)                           (d:/texlive/2012/texmf-dist/tex/latex/tools/xspace.sty)                                (d:/texlive/2012/texmf-dist/tex/latex/amsfonts/amsfonts.sty)                           (d:/texlive/2012/texmf-dist/tex/latex/mh/breqn.sty                                     (d:/texlive/2012/texmf-dist/tex/latex/mh/flexisym.sty                                  (d:/texlive/2012/texmf-dist/tex/latex/mh/cmbase.sym)                                   (d:/texlive/2012/texmf-dist/tex/latex/mh/mathstyle.sty)))                              (d:/texlive/2012/texmf-dist/tex/xelatex/polyglossia/gloss-english.ldf                    ! LaTeX Error: \do undefined.                                                               See the LaTeX manual or LaTeX Companion for explanation.                               Type  H <return>  for immediate help.                                                   ...                                                                                l.6 }                                                                                ?      I think this is the following line which generate it:                 \usepackage{polyglossia}       \setotherlanguage{english}          But why? **UPDATE** Small example: File1.tex:               \documentclass[a4paper, 10pt, twocolumn]{article}     \usepackage{fontspec}     \usepackage{polyglossia}     \usepackage{mathtools}     \usepackage{amsmath}     \usepackage{amsthm}     \usepackage{algpseudocode}     \usepackage{fancyhdr}     \usepackage{enumitem}     \usepackage{xspace}     \usepackage{amsfonts}     \usepackage{breqn}     \setotherlanguage{english}          \setmainfont{Consolas}      File2.tex               \input File1.tex     \begin{document}          \section{Section}     \end{document}      **UPDATE2** Here is the log


title: Can a pdf store meta-information (e.g. name of the program with which it was created)?

text: This is not a tex question per se, but I think it is not totally off-topic either. I heard a while ago, that when one creates a pdf, besides its content a pdf can also store some meta-information (for example the name of the user that created the pdf, the program with which it was created etc.), similar to ID3-tags (I believe they're called). Is this true ? If yes, is there any way to edit this information ? EDIT: I'm sorry, my explanation weren't good. I meant editing the pdf **without** having its source tex fil (so using hyperref won't apply).


title: Is there a way to get pdflatex to accept Unicode combining accents?

text: I typeset my work with `pdflatex` and UTF-8 input files with lots of Unicode characters. Most of them work with a simple `\usepackage[utf8]{inputenc}` in my preamble, and for the others I simply maintain a long list of `\DeclareUnicodeCharacter`. However, I often paste into my LaTeX files some text that has combining accents (that results from Mac OS X’s copy/paste mechanism). I have to normalize that text, because combining accents don’t work out of the box. How could I manage to make them work? (once and for all, e.g. by adding good definitions near my big list of Unicode characters) * * * Minimal self-contained example:               \documentclass{article}     \usepackage[utf8]{inputenc}     \begin{document}     Élève     Élève     \end{document}      where the text with accents is:               U+00C9  É  LATIN CAPITAL LETTER E WITH ACUTE     U+006C  l  LATIN SMALL LETTER L     U+00E8  è  LATIN SMALL LETTER E WITH GRAVE     U+0076  v  LATIN SMALL LETTER V     U+0065  e  LATIN SMALL LETTER E     U+000A     NEWLINE     U+0045  E  LATIN CAPITAL LETTER E     U+0301  ́  COMBINING ACUTE ACCENT     U+006C  l  LATIN SMALL LETTER L     U+0065  e  LATIN SMALL LETTER E     U+0300  ̀  COMBINING GRAVE ACCENT     U+0076  v  LATIN SMALL LETTER V     U+0065  e  LATIN SMALL LETTER E


title: PythonTeX rendering problem

text: I tried the PythonTeX package, and the output it produced contained question marks instead of running python code, what should i do ??


title: LaTeX: optional arguments with square brackets

text: LaTeX is trying to add a missing $ that I don't want to the following code: EDIT: replaced stricken lines from original question with minimal working example:               \documentclass[letter,12pt]{article}          \newcommand{\monkeyBeans}[2][]{       \parbox{4in}{#1}     }          \begin{document}          \parbox{4in}{$[a, b]$}           \monkeyBeans[$[a, b]$]{yo monkey}          \end{document}      ~~In header:               \newcommand{\monkeyBeans}[2][]{       \parbox{4in}{#1}      \end{tabular}}      in document:               \monkeyBeans[$[a, b]$]{yo monkey}      I think I have worked this down to the smallest example possible.~~ If I try any of the following lines in my document instead of the call to monkeyBeans, there is no error:               \parbox{4in}{$[a, b]$}      \monkeyBeans[yo monkey]{$[a, b]$}     \monkeyBeans[$(a, b)$]{yo monkey}     \monkeyBeans{$[a, b]$}{yo monkey}      What is the deal with square brackets in optional arguments?


title: Installing packages with miktex 2.9

text: I tried to install the package `mathalfa` using the package manager (admin), it supposed that clicking on the plus sign everything is done, but when I call the package in my tex file and use the commands that are part of that package, MiKTeX cannot compile it and it tells "undefined control sequence". What I need to do?


title: I get an error when using `\ExecuteOptions` together with `\usepackage{geometry}`

text: I'm writing a custom document class. It's kinda simple, but it will use the `geometry` package to set page size, orientation and margins. However... Whenever I use that package, the `\ExecuteOptions` command stops working. Look at this minimalist testcase: File: _myclass.cls_               \ProvidesClass{myclass}     \LoadClass{article}          \usepackage[brazilian]{babel}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}          \usepackage[a4paper,         includehead, includefoot,         headheight=23mm, headsep=5mm, footskip=1.5em]{geometry}          \DeclareOption{landscape}{\geometry{landscape, top=12mm, bottom=12mm, left=15mm, right=15mm}}     \DeclareOption{portrait}{\geometry{portrait, top=15mm, bottom=15mm, left=12mm, right=12mm}}     \ExecuteOptions{portrait}     \ProcessOptions      File: _doc.tex_               % This works: \documentclass{myclass}     % This does not work: \documentclass[foobar]{myclass}     % This does not work: \documentclass[landscape]{myclass}     % This does not work: \documentclass[anythingITypeHere]{myclass}     \documentclass[landscape]{myclass}          \title{Simple testcase}          \begin{document}          Simple experiment... I think it should have worked.          \end{document}      Error message:               ! Undefined control sequence.     \ExecuteOptions ...eserved@a \CurrentOption \@nil           l.19 \ExecuteOptions{portrait}      If I don't pass any option to the `\documentclass` command, then it compiles. However, if I try to pass anything (like in the example above), it fails with that weird message. If I comment out `\usepackage[...]{geometry}`, and replace `\geometry` with something else, then it compiles. So, I'm quite sure this package is messing with `\ExecuteOptions` command. If I put both `\DeclareOption` and `\ExecuteOptions` before importing the package, I get an error about undefined `\geometry` (as expected). If I put `\DeclareOption` before the `\usepackage`, and leave `\ExecuteOptions` after it, then I get an error about importing a package inside the Options section. So... the question is how to implement document class options while still using `geometry` package? In other words, how to make the above code work?


title: Is there a way to resize a figure created with xymatrix?

text: I've drawn some figures using xymatrix, but they're much larger than I'd like them to be. Is there a way to resize them? I'd be happy to cut them down to a fixed percentage of the original or to a given size. I know how to change the size of the entries using the standard font size changing commands, but I really want to make the arrows shorter as well.


title: Times New Roman in LaTeX plus fancy header w/o page number on first page.

text: Below is my file. I am trying to make sure that I am in 12pt Times New Roman font. Also, I am trying to get rid of the page number on this first page without getting rid of the header. If anyone has any suggestions for ensuring these two features in the document, it would be appreciated.               \documentclass[12pt]{article}          \usepackage[left=0.75in,right=0.75in,top=0.75in,bottom=0.75in]{geometry}     \usepackage{fancyhdr}     \pagestyle{fancy}     \renewcommand{\headrulewidth}{0pt}     %\pagestyle{empty}               \begin{document}          \rhead{John Doe \\ #########}          Hello, world!          \end{document}


title: Why does \usepackage[T2A]{fontenc} take over?

text: I want to produce a document with non-serif type. I also want to include Cyrillic characters. These two aims seem to be mutually exclusive. When I comment out `\usepackage[T2A]{fontenc}`, the document is beautiful, except that the Cyrillic characters won't print. When I include `\usepackage[T2A]{fontenc}`, the document is beautiful, but it is entirely a `serif` font. Below is a MWE. Some of the preamble might seem a little bit goofy, but it's all included in my university's template (see link below). It will actually compile, but only with some encouragement (see http://helpdesk.ufl.edu/wp- content/uploads/2012/12/latex_spring_2011.zip). From what I've read, I _think_ I need to load a different font family. But I'm not sure if that's right, or even how to do it. How do I have a document that both includes Cyrillic characters _and_ retains its `sans serif` font?               \documentclass{article}     \renewcommand{\rmdefault}{ma1}     \renewcommand{\sfdefault}{phv}     \renewcommand{\familydefault}{\sfdefault}     \usepackage{datetime}     \usepackage{qtree}     \usepackage[T1,T2A]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{tipa}     \usepackage{pgfplots}     \usepackage[authoryear]{natbib}     \usepackage{hypernat}     \usepackage[dvipdfm,hyperfootnotes=false]{hyperref}     \hypersetup{colorlinks=true,linkcolor=blue,anchorcolor=blue,citecolor=blue,filecolor=blue,urlcolor=blue,bookmarksnumbered=true,pdfview=FitB} \usepackage{gb4e}     \noautomath     \let\eachwordone=\sffamily     \let\eachwordtwo=\sffamily     \let\eachwordthree=\sffamily          \begin{document}          Todd is a cat. у меня есть машина. я очень харашо.          \end{document}


title: What exactly does `inner sep` mean when node shape is circle

text: `inner sep` is not behaving as I would expect:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{calc}     \begin{document}          \begin{tikzpicture}[every node/.style={circle,draw}]            \coordinate (P1) at (0,0);       \coordinate (P2) at ($(P1)+(30:2cm)$);            %% first circle       %% separation along x-, y- directions is greater than 2cm.       \node [inner sep=2cm,orange,line width=3pt] at (P1) {};                    %% second circle       %% separation along x-, y- directions is as expected       \node [inner xsep=2cm,blue!30,line width=2pt] at (P1) {};                    %% third circle       %% duplicates the situation of the first circle.  Again       %% the separation along axes is greater than expected.       \node [inner xsep=2cm,              inner ysep=2cm,yellow,line width=1pt] at (P1) {};                    \draw (P1) circle [radius=2cm,draw,magenta];                    \draw (P1) -- (P2);            \draw[help lines] (-4,-4) grid (4,4);          \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/VaF5J.png) According to the documentation on `inner sep`, `inner xsep`, `inner ysep` I would expect the distance to be measured using a Euclidean metric and not a Taxi cab metric. Can someone explain what's happening here? Why is this the desired behavior


title: A comma separator for \citet and a semicolon separator for \citep simultaneously?

text: Is there an easy way to simultaneously have a comma separator for `\citet` and a semicolon separator for `\citep`? It is currently `[comma]{natbib}`, but (e.g., Black and White, 2006, Pink, 2006) looks ugly and so does by White and Black (2006); Pink(2006).


title: How to align parent nodes to the left/top in a tree

text: I am drawing trees in LATEX. The `qtree` library seems to be what I need but the parent is always placed in the center of its children like this:                   parent         /    \      child_1 child_2      ( _I'm a new user and does not have enough reputation to post an image._ ) What I want is a right-growing tree like this:               root  -- child_1  -- grandchild_1_1           \- child_2           \- child_3  -- grandchild_3_1                       \- grandchild_3_2 -- great-grandchild_3_2_1           \- child_4  -- grandchild_4_1      Rotating the `qtree` to right-growing is insufficient since the parent nodes are then vertically aligned to the center of their children, but I need them to remain on the top of their subtrees. I've tried `trees` library of TikZ, which allows customized "growth function" to specify the position of children. However it does not consider the size of subtrees, so in this case `child_4` would follow immediately under `child_3`, making `grandchild_4_1` overlap with `grandchild_3_2`. Is there a simple way to just "disable" the centering of parents in `qtree`? Or is there any better solution (may be writing my own macro)?


title: How do I add other plots to a stacked plot?

text: If I have a `ybar stacked` axis type, how can I add another plot such as a `jump plot` on top? The example below shows more or less what I need: ![mixed stacked bar plot](http://i.stack.imgur.com/EY6IA.png)


title: TikZ image with hyperlinks --> GIF/PNG image + HTML image map

text: I have a (complex) TikZ-based figure with hyperlinks. Now I need a web version of this figure that preserves all hyperlinks. Converting the PDF to GIF or PNG is trivial, but for the hyperlinks I additionally need a corresponding HTML image map. So what are the possible/preferable conversion routes from LaTeX -> GIF/PNG (with image map)?               \documentclass{standalone}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{hyperref,tikz}          \begin{document}          \begin{tikzpicture}[node distance=2cm]             \node[name=Q, draw=red!80, top color=red!60, bottom color=red!20, font=\Huge]                  {\href{http://tex.stackexchange.com/questions/115400}{Question at tex.se}};       \node[name=A1, draw=blue!80, top color=blue!60, bottom color=blue!20, font=\Huge, below of=Q]                 {\href{http://tex.stackexchange.com/a/115518/3751}{Answer by Yori}};       \draw[->] (Q) -- (A1);     \end{tikzpicture}           \end{document}      Result as GIF (no image map, yet): ![enter image description here](http://i.stack.imgur.com/oJ5tC.png)


title: What are the advantages of Lua over other scripting languages for a TeX implementation?

text: The question is inspired by Martin Schröder's answer to I am new to TeX. Should I use LaTeX, XeLaTeX, …? as well as my two previous questions on this forum:   1. Automatic document update   2. Generate LaTeX Truth Table with Python Cheetah In retrospect, I am truly surprised that no LuaTeX user offered any answers to my questions as it seems to me that that could be easily done in LuaTeX by embedding Lua scripts into the LaTeX code. Can it be really done (question for LuaTeX users only) and is it easy? My second question is motivated by the fact that I hate very thought of having to learn another scripting/general programming language (Lua) if I already know Python (you can substitute Perl if you like) just to use it with TeX. Is anybody cooking a Python interface for TeX call it PythonTeX for short (PerlTeX actually does exist)? As far as I know PythonTeX doesn't exist. There is something called PyTeX but that just look like a tool for people who want to type TeX documents using Python syntax. Is there an advantage of using Lua over Python as an embedded scripting language for TeX (apart of the fact that people who started LuaTeX probably were more familiar with Lua)?


title: LaTeX code formatting using lstlistings: custom keywords not recognized

text: I'm trying to add some keywords to an existing language using the `morekeywords` setting:               \documentclass[12pt]{article}          \usepackage{color}     \usepackage[usenames,dvipsnames]{xcolor}     \usepackage{listings}          \definecolor{lightgray}{rgb}{0.98,0.98,0.98}     \renewcommand{\ttdefault}{pcr}     \lstset {       language=xml,       basicstyle={\footnotesize\ttfamily},       numbers=none,       backgroundcolor=\color{lightgray},       aboveskip=3mm,       belowskip=3mm,       showstringspaces=false,       columns=flexible,       keywordstyle={\bfseries\color{Blue}},       commentstyle={\color{Red}\textit},       stringstyle=\color{Magenta},       frame=single,       breaklines=true,       breakatwhitespace=true,       tabsize=4,       morekeywords={rdf,rdfs,owl}  % <-- adding custom keywords     }          \begin{document}     \begin{lstlisting}       <owl:Class rdf:ID="Band">       <owl :Class rdf :ID="Band">     \end{lstlisting}          \end{document}      gives me ![enter image description here](http://i.stack.imgur.com/UGpi1.png) When there is trailing colon, the keywords `owl` and `rdf` are not recognized. However, there is no problem with built-in keywords (C example): ![enter image description here](http://i.stack.imgur.com/dSjXm.png) Any solutions?


title: Triangular mesh in PGFPlots instead of rectangular

text: Recently I had to reinstall my OS, and with it the LaTeX system also. Now if I compile the same code as before, on surface plots PGFPlots generates triangular mesh instead of the wanted and usual rectangular. I have looked for a solution in the manual, but it seems that rectangular should be the default one. The code is:               \documentclass[a4paper,12pt]{article}     \usepackage{pgfplots}     \begin{document}             \begin{tikzpicture}         \begin{axis}[             width=0.6\textwidth,             grid=major,             colormap={jet}{rgb255(0cm)=(0,0,255)                 rgb255(1cm)=(0,255,255) rgb255(2cm)=(255,255,0) rgb255(3cm)=(255,0,0)                 },             shader=faceted interp,             colorbar,             view={70}{40}             ]             \addplot3[surf,faceted color=white, opacity=0.9,patch type=rectangle,] table [row sep=newline] {_plotdata/tors/perfor.dat};         \end{axis}         \end{tikzpicture}     \end{document}      While perfor.dat contains:               1   27  144     1   29  131     1   31  120     1   33  110     1   35  110     1   37  88     1   39  86     1   41  82     1   43  75     1   45  70          3   27  90     3   29  82     3   31  77     3   33  70     3   35  65     3   37  60     3   39  55     3   41  52     3   43  48     3   45  46      And it results in the following image: ![resulted plot](http://i.stack.imgur.com/RCnW7.png)


title: Move array in array down

text: I have the following code               \begin{array}{rl}     \textbf{fetcher} : \mathcal{T} &\to \mathcal{T} \\     (P_{\star}, w) &\mapsto \bigcup \limits_{p \in P_{\star}} \left(     {\setstretch{1.25}     \begin{array}{llll}         best_{b_{R}} \big(& \big( R(p), &w_{R} \cdot \textbf{rank}_{R(p)} \big)&\big)  \ \cup \\         best_{b_{C}} \big(& \big( C(p), &w_{C} \cdot \textbf{rank}_{C(p)} \big)&\big)  \ \cup \\         best_{b_{A}} \big(& \big( A(p), &w_{A} \cdot \textbf{rank}_{A(p)} \big)&\big)      \end{array}}     \right)     \end{array}      which results in ![Output](http://i.stack.imgur.com/2WmbO.png) I would however rather have it look like so: ![Goal](http://i.stack.imgur.com/gpE5F.png) I am not sure if `array` is the best choice for this, but I did not find any better way. Is there a way to move the second array down, or should I rather use something else?


title: Fillable PDF: radiobutton & other

text: I'm having hard times trying to create a fillable pdf form. In particular, I can't find a way to implement two things: • radio button with text on top • fillable blank field for the "Last Comment" This is what I did:               \begin{Form}[action=mailto:my_email@gmail.com?subject=…     {The submitted form},encoding=html, method=post]               \begin{tabbing}          xxxxxxxxxx: \= \kill  % This is needed for the right tab width          Field to identify the name: \> \TextField[name=name,width=5cm,charsize=8pt]     {\mbox{}} \\          Some text in which a question is posed: \> \\     \ChoiceMenu[combo, name=percorso, width=5cm, charsize=12pt, default=]{\mbox{}}     {Answer1, Answer2} \\                Sex:    \>       \ChoiceMenu[radio,default=f,name=sex,charsize=14pt]{\mbox{}}{Male=m,Female=f}      \end{tabbing}               \CheckBox[name=highschool,charsize=12pt]{High School}     \CheckBox[name=college,charsize=12pt]{College}     \CheckBox[name=university,charsize=12pt]{University} \\          \Submit{Submit}     \Reset{Clear}     \hfill ~\\                    \end{Form}          \end{document}      Thanks a lot to everyone who will help me! Ciao!


title: How can I skip numbering the title page?

text: I am currently trying to use this template University of California thesis template but I am facing a problem with the numbering of the pages, it starts with the page containing the title. * * * I am looking for a way to make the numbering skip the first page. * * * Does anyone have a solution?


title: Use multiple keywords in \ printbibliography to filter the bibliography

text: Is there a way to filter `\printbibliography` using multiple keywords that are present in the `.bib` file entries ? For exemple, I'd like the command `\printbibliography[keyword={key_1,key_2,key_3}]` to print ONLY the entries that combines the keywords like `key_1 AND key_2 AND key_3`.


title: Figuring out Xetex fonts under Debian

text: I have been trying to start using xelatex. My configuration:               Debian: testing     Texlive: 2013.20140408-1       Taking the minimal example from unicode-math and amsmath environments viz               \documentclass{article}     \usepackage{amsmath}     \usepackage{unicode-math}     \setmathfont{XITS Math}     \usepackage{xltxtra}          \begin{document}          \begin{equation}         α = \beta^2_i + β^2_i     \end{equation}          \end{document}      and running xelatex on it I get:               kpathsea:make_tex: Invalid fontname `XITS Math/ICU', contains ' '          !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!     !     ! fontspec error: "font-not-found"     !     ! The font "XITS Math" cannot be found.     !     ! See the fontspec documentation for further information.     !     ! For immediate help type H <return>.     !...............................................            l.4 \setmathfont{XITS Math}          ?      With some help from comp.text.tex, I tried replacing the: `\setmathfont{XITS Math}` with `\setmathfont{XITS}` `\setmathfont{xits-math}` None of this worked until I tried: `\setmathfont{xits-math.otf}` **Can you point me someplace where I can study how to specify xetex fonts under debian?** I was pointed to: texdocs which is evidently needed for linux users. However, the file which I am supposed to copy to `/etc`: `/var/lib/texmf/fonts/conf/texlive-fontconfig.conf` does not exist on my system. So, in addition to figuring out how to handle xetex fonts in debian, my more general question is: **Would you recommend that I dump Debian's texlive and move to a CTAN download?**


title: What is truecm?

text: In examples found around the web, some people specify lengths such as `width=5truecm` with `\includegraphics` or the geometry package. How is this different from regular `5cm`?


title: Umlauts in math mode

text: I'm trying to use German umlauts in math mode but get the known error: `LaTeX Warning: Command \" invalid in math mode on input line ##.` So I could think of two possible solutions:   1. Use `\text` instead of `\mathrm`. But this wouldn't be the right solution because this text will be changed according to the surrounding text and the text I try to write ("Empfänger", German word for "receiver") should appear as a superscript to a field variable.   2. Replace the letter `ä` with `"a`. But this leads to LaTeX not recognizing the ligature of `fä`. Since I'm using the `lmodern` package, the letter ä is still shown, so the resulting PDF is what I would expect. Are there some elegant and correct solutions to this merely cosmetic problem? * * * My code for this would be:               \documentclass{scrartcl}     % Kodierung     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{lmodern}     % Sprache (neue deutsche Rechtschreibung)     \usepackage[ngerman]{babel}     % Mathematik     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}          \begin{document}          % reference     Empfänger          % creates warning but is correct     \begin{align}         \mathrm{Empfänger}     \end{align}          % creates no warning but has no ligature     \begin{align}         \mathrm{Empf"anger}     \end{align}          \end{document}


title: write text in a shape of heart

text: I want to write a text in a shape of heart, but I met a problem because of the French character.               \documentclass[12pt,svgnames]{article}     \usepackage[francais]{babel}  % langue     \usepackage{fontspec,microtype,shapepar,xcolor}     \setmainfont{TeX Gyre Chorus}     \begin{document}     \textcolor{black}{\heartpar{Au symbole de dou-ceur, de tendresse, d’amour et d’affection, ma mère pour son soutien incessant. A     mon père, pour les sacrifices qu'il a consentis     pour mon éducation. Que ce travail soit le     témoignage de l'amour que je lui avoue. A     mes chers amis qui m'ont soutenu, encouragé et m'ont surtout permis     de travailler dans une atmosphère joviale.     }}     \end{document}       I got this result : ![enter image description here](http://i.stack.imgur.com/bIGF7.png) but I want to have this result, what should I do ? ![enter image description here](http://i.stack.imgur.com/4qQOG.png)


title: label font size in matlab->matlab2tikz

text: Does anyone knoy how can we increase the labels fontsize when we use the matlab2tikz (see this link) function from the mathworks file exchange? I always have to access the *.tikz generated file and then add an insctruction to increase the font. Can't that be done as an input to the mat2tikz function? **UPDATE** : Using the suggested solution by **Torbjørn T** , the function matlab2tikz does modify the labels fontsize, however, since I am using nested functions in the following manner (to generate the PDF version):               plotviatikztopdf(strcat(filename,'PPT','.tikz'),'standalone', true,'extraAxisOptions','label style={font=\Large}')         function plotviatikztopdf(filename,varargin)          matlab2tikz(filename,varargin)               %%     ind = find(filename=='.',1,'last');     basename = filename(1:ind-1);     if ispc         command = sprintf(' pdflatex -jobname %s \\documentclass{standalone}\\usepackage{pgfplots,amsmath}\\begin{document}\\input{%s}\\end{document}',basename,filename);     elseif isunix         command = sprintf(' pdflatex -jobname %s \\\\documentclass{standalone}\\\\usepackage{pgfplots,amsmath}\\\\begin{document}\\\\input{%s}\\\\end{document}',basename,filename);     end          system(command);          if ispc         system(sprintf('del "%s.aux"',basename));         system(sprintf('del "%s.log"',basename));              %%moving to required directory     elseif isunix         system(sprintf('rm %s.aux %s.log',basename,basename));     end      sozrce of the above function Link The output is ignoring the `'ExtraAxisOptions'` . Is there something wrong in my `varargin`? Thanks.


title: Copying from StackExchange text to LyX

text: I want to copy some text from MathOverflow, that contains mathematical formulas, to LyX. Currently the text looks like this:               So, we have $2r = 2rr+rl$ and $2l = 2ll+rl$.      How can I automatically convert all the text between $ symbols to LyX formulas?


title: RefTeX: shortcut to open the .bib file of the current document

text: I would like the have a simple keyboard shortcut/command in emacs that opens the .bib file of the current (possible multifile) document. This should be possible with RefTeX, as it can figure out the name of the .bib file (uses it for the C-[ command), but I could not find a command that just opens the file in the editor without any fancy selection feature. This command would be useful, because usually what happens is that you find a bibtex entry online and you just need to paste it into your .bib file.


title: beamer framezoom: restrict zoomed frame to border

text: This example was taken from diabonas answer to Is there a way to get \framezoom to do what I expected it would?               \documentclass{beamer}          \begin{document}          \begin{frame}<1>[label=zooms] \frametitle<1>{The \TeX{} logo}     \frametitle<2>{The letter ``T''} \frametitle<3>{The letter ``E''}     \frametitle<4>{The letter ``X''}     \framezoom<1><2>[border](0.1cm,0cm)(3.6cm,4cm)     \framezoom<1><3>[border](3.4cm,1.2cm)(2.7cm,4.1cm)     \framezoom<1><4>[border](5.7cm,0cm)(3.7cm,4cm) {\scalebox{15}{\TeX}\\}     \end{frame}          \againframe<2->[noframenumbering]{zooms}          \end{document}      As you can see, the zoomed frames show larger areas than the areas that were framed in the unzoomed frame. Is there a way to only display the framed areas in the zoomed frames?


title: How do I make my path node follow the path from a certain position?

text: I am trying to make a diagram with a curved arrow and I want its node to follow the arrow from about the "near end" point. I have been googling for hours now and I can't find the way to do it. I've tried different things and searched this site for solutions. This is what I have so far:               \documentclass[11pt]{article}          \usepackage[a4paper,margin=2cm]{geometry}     \usepackage[dutch]{babel}     \usepackage{amsmath}     \usepackage{tikz}     \usetikzlibrary{positioning}     \usetikzlibrary{matrix,arrows,decorations.text,decorations.pathmorphing,decorations.markings}          \begin{document}     $$\begin{tikzpicture}[description/.style={fill=white,inner sep=1pt}]     \matrix(m)[matrix of math nodes, row sep=5em, column sep=5em, text height=1.5ex, text depth=0.25ex]{     \partial I           & I         & E \\     (\partial I)\times I & I\times I & B \\};     \path[->]     (m-1-1) edge node[auto] {$i_1$} (m-1-2)             edge (m-2-1)     (m-1-2) edge node[auto] {$x\longmapsto e$} (m-1-3)             edge (m-2-2)     (m-2-1) edge node[auto] {$i_2$} (m-2-2)             edge[out=45,in=225,-,line width=6pt,draw=white] (m-1-3)             %edge[out=45,in=225] node[pos=0.7,auto,swap,postaction={decorate,decoration={text along path}}] {$x\longmapsto e$} (m-1-3)             %edge[out=45,in=225,postaction={decorate,decoration={text along path,raise=-8pt,text={||{$x\longmapsto e$}}}}] node[pos=0.7,auto,swap] {$x\longmapsto e$} (m-1-3)             edge[out=45,in=225,postaction={decorate,decoration={text along path,raise=-8pt,markings,mark=at position 0.7 with {\node {$x\longmapsto e$};}}}] (m-1-3)             %edge[out=45,in=225,postaction={decorate,decoration={text along path,raise=-8pt,markings,mark=at position 0.7 with {\node {};},text={||{$x\longmapsto e$}}}}] (m-1-3)     (m-2-2) edge[dashed,bend right=25] node[auto,swap] {$\tilde{\alpha}$} (m-1-3)             edge node[auto,swap] {$\alpha$} (m-2-3)     (m-1-3) edge node[auto] {$p$} (m-2-3);     \end{tikzpicture}$$     \end{document}      I feel like I'm very close, the `$x\longmapsto e$` only has to follow the curve of the arrow.


title: remove endashes at linebreaks

text: I want to typeset a paragraph of endash-separated expressions, like this               \documentclass{article}     \setlength{\parindent}{0pt}          \begin{document}     \centering      test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test -- test          \end{document}      However, I don't want the endashes to be printed as first or last items in a line - in a way, I want them to behave like spacing commands (blank, `\hfil`, `\hfill`, `\hfilll`). So instead of this               test - test - test -     test - test - test      or this               test - test - test     - test - test - test      I want this               test - test - test     test - test - test      Please note that I want this to happen automatically, without having to fix each line manually How can this be achieved?


title: Why is there no space behind closing quotation mark in enumeration?

text: I'm using the following code:               \documentclass[11pt]{article}          \usepackage[utf8]{inputenc}     \usepackage[dutch]{babel}          \newcommand{\add}{$\oplus$\space}     \newcommand{\ent}{\textit}          \begin{document}          \begin{enumerate}         \item Content: \add \ent{"Node add form" base form}     \end{enumerate}          \end{document}      Unfortunately, there's no spacing after the closing quotation mark in the enumeration. How can I solve this?


title: How to use Harvard style citation in body of text in Lyx?

text: I am using Lyx 2.1 with Harvard style referencing (Documents > Settings) but when I cite in the body of text, it renders something like following: > In Canada, the for-hire trucking activity increased by 6.2% between 2007 and > 2010 [1]. However, I want it to render like this: > In Canada, the for-hire trucking activity increased by 6.2% between 2007 and > 2010 (Transport Canada, 2012). Please note that I generate a .bib file from Mendeley and use it as a bibliography database in Lyx.


title: Scanning l3key with document catcodes?

text: Similar to the way TikZ attempts to use unknown keys as values for the `color` key, I would like to interpret an unknown key as the value for one of my own keys, `decoration` (not to be confused with the key of the same name from TikZ), written using `expl3`. Naively, I tried using               \usepackage{expl3}     \usepackage{xparse}          \ExplSyntaxOn          \keys_define:nn { mymodule } {       decoration .tl_set:N = \l_mymodule_decoration_tl ,       unknown    .code:n   = {         \tl_set:NV \l_mymodule_decoration_tl \l_keys_key_tl }     }          \NewDocumentCommand \mymathmacro { O{} m } {       \mymodule_mathmacro:nn {#1} {#2}     }          \cs_new:Npn \mymodule_mathmacro:nn #1#2 {       \keys_set:nn { mymodule } {#1}       #2 \tl_use:N \l_mymodule_decoration_tl     }          \ExplSyntaxOff      This works well except that I sometimes will give the unknown key `^2`, as in `$\mymathmacro[^2]{x}$`, intending that the decoration then be a superscript `2`. Instead, I get as the decoration a `^` character followed by `2`. Assuming that the problem is catcode assignments, I'm now using               \usepackage{expl3}     \usepackage{xparse}          \ExplSyntaxOn          \cs_generate_variant:Nn \tl_set_rescan:Nnn { NnV }          \keys_define:nn { mymodule } {       decoration .tl_set:N = \l_mymodule_decoration_tl ,       unknown    .code:n   = {         \tl_set_rescan:NnV \l_mymodule_decoration_tl           { \char_set_catcode_math_subscript:N _             \char_set_catcode_math_superscript:N ^ }          \l_keys_key_tl       }     }          ...          \ExplSyntaxOff      This works great so far, but my question is this: How do I know I haven't missed important catcode assignments? What I really want is that the unknown key be scanned as if it was given directly as a value to the `decoration` key. Also, I've heard that `\tl_rescan:nn` and cousins should be avoided. Is there a better way for me to write the code for `unknown` than using `\tl_set_rescan:NnV`?


title: PDF figure can be seen only on exported PDF file

text: I am adding in Source File the following code below and although it works for all my previous figures, for this one I see only the caption on LaTeX, but I get it ok when I export PDF of my file.               \begin{figure}     \centering     \psfrag{x}{$x$}     \psfrag{v}{$v$}     \psfrag{f}{$f$}     \includegraphics[scale=0.6]{figuresCM/drawing19.pdf}     \caption{hkjhjkkh}     \label{fig:drwg19}     \end{figure}      No error message appears on my console


title: How can I create PDF & EPS exactly as big as my PSTricks picture but without using pdfcrop?

text: This question is made to accompany the existing question: How can I create a pdf document exactly as big as my tikz picture?. ## Constraints:   1. It is not allowed to use `pdfcrop` by any means whatsoever. It is because `pdfcrop` takes a significant amount of time as explained in Searching for a better workflow to get a cropped PDF and EPS graphics - Stage 2.   2. Manually calculating a tight paper dimension and other related dimensions is not allowed. For example, the solution for the first case in this link is not allowed because the margin is manually setup to avoid the top and bottom parts get cropped accidently.   3. Neither `BatchA.bat` nor `BatchB.bat` is allowed because they produce big PDF and EPS files. Any variants of them might not be allowed as well. But they might be allowed if there is a way to reduce the file size, at least the same as the file size produced by `latex->dvips->ps2pdf->pdfcrop`. `BatchA.bat`:              latex -interaction=nonstopmode %1     dvips  -R -t unknown -E %1 -o %1-temp.eps     epstool --copy --bbox %1-temp.eps %1.eps     epstopdf --hires %1.eps      `BatchB.bat`:              latex -interaction=nonstopmode %1     dvips -R -t unknown %1 -o %1-temp.ps     ps2eps %1-temp.ps     epstool --copy --bbox %1-temp.eps %1.eps     epstopdf --hires %1.eps      How can I create PDF and EPS exactly as big as my PSTricks picture without breaking the constraints above?


title: Elsarticle - number bibliography not working

text: I am trying to correctly format an article for Computers & Operations Research. They say I should use the "number" format to cite. I use `elsarticle.cls` and the documentation says that number should be the standard option loaded. This does not seem to be the case as `\cite{smth}` outputs Author[1] and I don't want Author to be there. When I use the option `\documentclass[preprint,number,12pt]{elsarticle}` I get the error:               ! Package natbib Error: Bibliography not compatible with author-year citations.          (natbib)                Press <return> to continue in numerical citation style.               See the natbib package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.191 ...and\NAT@force@numbers{}\NAT@force@numbers      I have tried many bibliographystyles, among which   `\bibliographystyle{elsarticle-num}` Any suggestions? Here is a stripped version of my document (I have kept my packages just in case there is a problem there)               \documentclass[preprint,number,12pt]{elsarticle}     \usepackage{amssymb}     \usepackage[nodots,nocompress]{numcompress}     \usepackage[utf8]{inputenc}     \usepackage{musixtex}     %\usepackage{natbib} %use of natbib package, necessary for customized cmj BibTeX style     %\usepackage{cite}     \usepackage{etex}      \usepackage{amsmath}     \usepackage{graphicx}     \usepackage{fancybox}     \usepackage{pgfplots}     \usepackage{url}     \pgfplotsset{compat=1.3}      \usepackage{subfigure}     \usepackage{booktabs} %voor mooiere tabellekes     \usepackage{float}     \usepackage{setspace}     \begin{document}     \cite{klapuri2004automatic}     \bibliographystyle{elsarticle-num}     \bibliography{paper}     \end{document}      The pdf actually displays well now (except for the \citet commands, which display as "author error"). But compilation is aborted, so that should not happen. And the .bib entry (there where about 50, but I just took one to test)               @article{klapuri2004automatic,       title={Automatic music transcription as we know it today},       author={Klapuri, A.P.},       journal={Journal of New Music Research},       volume={33},       number={3},       pages={269--282},       year={2004},       publisher={Taylor \& Francis}     }      This is a link to the bst file I am using: https://www.dropbox.com/s/4jrnxb5twjwl9xm/elsarticle-num.bst and elsarticle.cls https://www.dropbox.com/s/s6qgfbxyz57gci0/elsarticle.cls


title: Making a Calendar for TUG

text: This question is triggered by a post from Peter Wilson in comp.text.tex`. Peter wrote: _TUG members produced a calendar for 2012 and, if I remember correctly, for some previous years as well. I really hope that there will there be one for 2013._ FYI The calendar should be generated with LaTeX and friends, including LaTeX- generated pictures. My question is how do we do this in LaTeX? The following is an example of the 2009 calendar. ![2009 calendar](http://www.texample.net/media/weblog/tex- calendar/calendar.jpg).


title: When to use ".sty" extension and when to use ".def"

text: I'm new to this forum and a recent LaTeX user. I state that, before posting here, I searched all the web through, but I was not succeeded to solve a doubt. I'm writing my own class (`myclass.cls`), part of which implements a small list parser. Since I need to keep the code organized, I want to put the relative portion of code in a separate file and then include it in `myclass.cls`. The code provides a set of `newcommands` for processing a list, it does not have anything to do with document style. My doubt is just about the extension of that file: `.sty`, `.def` or any other? Besides, is there a rule of thumb for choosing the more appropriate extension (between `.sty` and `.def` I mean)?


title: Space before right bracket

text: I have created this formula using mathptmx as font               \begin{equation}        BER = Q\left(\sqrt{\dfrac{2E_{b}^{\text{RX}}}{N_{0}}}\right)     \end{equation}      getting the above result: ![enter image description here](http://i.stack.imgur.com/Tle0Q.png) I'm not totally satisfied of the space before the right bracket. I would know if the syntax is correct and if it is not please suggest me some correction


title: Personalisation of a Sudoku grid

text: Someone can give me some hints so as to achieve the two following improvements ?   1. **EASY:** I would like to display the number position of each column and row. This needs to display numbers just at the left and above the grid.  _**Answer of Sašo Živanović does the job for this easy part._**   2. **HARD:** Sometimes, I only need to display only one rectangular piece of the sudoku. What are the changes to do so as to achieve this ? ## Code               \documentclass{article}         \usepackage{tikz}         \usetikzlibrary{backgrounds,shapes}         \usepackage{graphicx}         \usepackage{xstring}          % Some customizable styles         \tikzset {             highlight/.style = {                 yellow,                 opacity = 0.3             },             digit/.style = {                 minimum height = 5mm,                 minimum width = 5mm,                 anchor = center             },             circle/.style = {                 draw = green!80!black,                 dotted,                 very thick             },             circle number/.style = {                 draw = #1,                 very thick             },             cross/.style = {                 red,                 opacity = .5,                 shorten >= 1mm,                 shorten <= 1mm,                 very thick,                 line cap = round             },             hint/.style = {                 blue,                 font = \sf,                 minimum width = 3mm,                 minimum height = 3mm             },             hint special/.style = {                 blue,                 font = \sf,                 minimum width = 3mm,                 minimum height = 3mm,                 fill=red!20,                 inner sep=0pt,             },             hint border/.style = {                 blue,                 font = \sf,                 minimum width = 2mm,                 minimum height = 3mm,                 inner sep=0pt, outer sep=0pt,                 draw=red, thick,                 rounded corners=1pt,             }         }          % Modified the \node to give a unique name to each one, which is the     % row number, a dash and the column number. E.g: 1-1, 4-5, etc.         \newcounter{row}         \newcounter{col}              \newcommand\setrow[9]{             \setcounter{col}{1}             \foreach \n in {#1, #2, #3, #4, #5, #6, #7, #8, #9} {                 \edef\x{\value{col} - 0.5}                 \edef\y{9.5 - \value{row}}                 \node[digit,name={\arabic{row}-\arabic{col}}] at (\x, \y) {\n};                 \stepcounter{col}             }             \stepcounter{row}         }          % New code -------------------------------------------------------------         \def\highlightcell#1#2{             \begin{scope}[on background layer]                 \fill[highlight] (#1-#2.north west) rectangle (#1-#2.south east);             \end{scope}         }              \def\circlecell#1#2{             \draw[circle] (#1-#2) circle(4mm);         }              \def\crosscell#1#2{             \draw[cross] (#1-#2.north west) -- (#1-#2.south east);             \draw[cross] (#1-#2.north east) -- (#1-#2.south west);         }              \def\highlightrow#1{             \begin{scope}[on background layer]                 \fill[highlight] (#1-1.north west) rectangle (#1-9.south east);             \end{scope}         }              \def\highlighcolumn#1{             \begin{scope}[on background layer]                 \fill[highlight] (1-#1.north west) rectangle (9-#1.south east);             \end{scope}         }              \def\highlightrectangle#1#2#3#4{             \begin{scope}[on background layer]                 \fill[highlight] (#1-#2.north west) rectangle (#3-#4.south east);             \end{scope}         }              \def\hintcell#1#2#3{             \node at (#1-#2) {\hintbox{#3}};         }               % Command to circle numbers:     % #1: optional -> circle color     % #2: mandatory -> cell identifier     % #3: mandatory -> name of the cell         \newcommand\circlenumber[3][red!80!black]{             \draw[circle number=#1, radius=5mm] (#2) circle node[outer sep=1mm] (#3){};         }          % UGLY code. Do not read :-)     %  Sorry, it needed to be read to obtain solution :-)         \def\hintbox#1{             \resizebox{4.5mm}{4.5mm}{%                 \tikz[scale=0.3]{%                     \def\auxc{0}                     \foreach \m in {1,...,9} {                         \pgfmathparse{mod(\auxc,3)}                         \xdef\x{\pgfmathresult}                         \pgfmathparse{-floor(\auxc/3)}                         \xdef\y{\pgfmathresult}                         \xdef\hintprinted{0}                         \foreach \n/\Style in {#1} {                             \ifnum\n=\m                                 \IfStrEqCase{\Style}{%                                     {}{\node[hint] at (\x,\y) {\n};}                                                                     {\n}{\node[hint] at (\x,\y) {\n};}                                     {border}{\node[hint border] at (\x,\y) {\n};}                                                                {special}{\node[hint special] at (\x,\y) {\n};}                                 }                                 \xdef\hintprinted{1}                             \fi                         }                         \ifnum\hintprinted=0                             \node[hint, opacity=0.1] at (\x,\y) {\m};                         \fi                         \pgfmathparse{\auxc+1}                         \xdef\auxc{\pgfmathresult}                     }                 }%             }         }               \begin{document}          \begin{tikzpicture}[scale=.5]         \begin{scope}             \draw (0, 0) grid (9, 9);             \draw[very thick, scale=3] (0, 0) grid (3, 3);                  \setcounter{row}{1}             \setrow { }{2}{ }  {5}{ }{1}  { }{9}{ }             \setrow {8}{ }{ }  {2}{ }{3}  { }{ }{6}             \setrow { }{3}{ }  { }{6}{ }  { }{7}{ }                  \setrow { }{ }{1}  { }{ }{ }  {6}{ }{ }             \setrow {5}{4}{ }  { }{ }{ }  { }{1}{9}             \setrow { }{ }{2}  { }{ }{ }  {7}{ }{ }                  \setrow { }{9}{ }  { }{3}{ }  { }{8}{ }             \setrow {2}{ }{ }  {8}{ }{4}  { }{ }{7}             \setrow { }{1}{ }  {9}{ }{7}  { }{6}{ }         \end{scope}     \end{tikzpicture}          \end{document}


title: Where to find official (!) and extended documentation for tex/latex's commandline options (especially -interaction modes)?

text: Today I tried to learn more about the several interaction modes for tex/latex/pdflatex etc. The manpages turned out to be not very helpful:               $ man tex              ...         -interaction mode             Sets  the interaction mode.  The mode can be either batchmode,             nonstopmode, scrollmode, and errorstop‐mode. The meaning of these             modes is the same as that of the corresponding \commands.         ...      While Google quickly helped me to learn what I wanted to know, I was suprised that I wasn't able to find useful and official documentation about this topic. After turning the whole documentation of my TeXLive distribution upside down I am asking now, if someone can please point me to the official and detailed documenation (if it exists) concerning the interaction modes and maybe the default values to some of the other commandline options. Edit because the output of `man latex` is totally different from waht I pasted here...


title: Setting up Embedded LaTeX in emacs org-mode

text: According to the org mode manual for emacs, one can view pieces of LaTeX code embedded in an org-file. This is supposed to be default behavior bound to the keys `C-c C-x C-l` which invokes the `org-preview-latex-fragment` command. Unfortunately, this does not work for me and I cannot figure out why. I do not get an error, it is just that nothing happens... I use emacs 24.3. Checking all the settings, I did `M-x customize-group` then typed `org-latex`. This opens up a window in which I can specify the values of certain variables/functions pertaining to `org-latex`. The `org-latex-create- image-formula-program` variable is set to `dvipng`. I checked that I do indeed have dvipng installed via `apt-get` on Ubuntu 12.04. The other variables in this window seemed find or not relevant to making this functionality work   1. How can I get embedded LaTeX to work inside emacs? Please help me!


title: Is there a visual editor for LaTeX that allows for graphical editing of the layout elements (like margins, headers etc)

text: **Background:** I have used LaTeX quite a bit back in the uni but haven't really needed the power of mathematical notation as much since I moved on to do biomedical research. It's significantly easier for me and my colleagues to work with more traditional text editors for manuscripts, that play better with reference managers etc. That being said, I am keen on replacing Powerpoint with something easier and significantly more intelligent. I have gotten the tip to try out LaTeX for presentations and posters but I recall that placing elements and doing visually pleasing work on LaTeX is notoriously complicated. I remember the frustration I had when I was fine tuning the formatting of my masters thesis. Thus I wonder if there is a visual editor for LaTeX that supports visual editing of elements, such as margins, placement of headers etc. I frequently use Adobe InDesign for posters and pdf documents (like HOWTOs) and I think it would be pretty cool to have the flexibility to manually and visually edit the layout. Does such an editor exist for Mac OS X or Linux? I have checked quite a few WYSIWYG editors but most of those seem to be aiming at minimizing the verbosity of short commands like making text boldface, italic etc. Which is all nice but enough to facilitate the "design" process of the document.


title: ToC dotted lines have unequal length

text: The ToC of my thesis has a too long dotted line between a section's title and the page number in multiple places. An example is shown in the image below, marked in red. The same problem also happens for various entries in the List of Tables and List of Listings. ![Dotted lines in ToC have non-equal length](http://i.stack.imgur.com/LrfW6.png) None of the commands for the dotted lines have been redefined, except for the List of Listings, for which it is defined as:               \makeatletter     \renewcommand*{\l@lstlisting}{\@dottedtocline{1}{0.0em}{2.3em}}     \makeatother      I've searched high and low for probable causes and solutions, but the internet does not seem to be my friend today. Has anyone got an idea of how to solve this?


title: When one should use spacing line \quad or \,

text: In general, in most places, it is said that using TeX defaults is the best. However, TeX does provide things like `\,` and `\quad` etc. When one _should_ use them? Both in general and in math mode in particular.


title: TikZ: Omit {} after \node declaration for unlabelled node?

text: This may seem a bit trivial, but I am writing TikZ code with an enormous number of unlabelled nodes. It frustrates me that I have to type `{}` at the end of every node declaration. Is there some straightforward way to avoid having to type this? Omitting the `{}` gives a compilation error: `A node must have a (possibly empty) label text.`


title: accomodating table in beamer

text: I have following table on beamer slide. It overflows into right margin. How can I accomodate it               \documentclass{beamer}     \begin{document}     \section {Rockall score}     \begin{frame} {Prognosticate rebleeding and mortality}     \begin{flushleft}     \begin{tabular}{c||cccc}     \hline     Variable        &   0               &           1           &       2               &       3   \\  \hline \hline     Age         &    $<60$                  &        60-79                          &         $>  80 $                  &                        \\     Vitals      &  $P<100$, $ SBP>100$  &     $P>100, SBP>100$  &   $SBP<100$           &           \\     Comorbidity & No major          &                       & IHD, CCF, other major &  Ranal, liver failure , malignancy \\ \hline     \end{tabular}     \end{flushleft}     \end{frame}     \end{document}


title: Constraint for a decoration: only if edge is long enough

text: Title+Picture might make you guess my question: ![enter image description here](http://i.stack.imgur.com/LWsSY.png) My goal is to modify the tikz-style `companion` such that in this example the `text along path`-decoration will only be shown if it fits, i.e. between a,b but not between b,c.   More precisely, I want the style to   1. compute the length `_Le_` of the edge it is applied to,   2. compute the length `_Ld_` of its decoration-text,   3. check, whether `_Le ≥ Ld + c_` holds, where `_c_` is some constant for a minimal margin) and    4. only if that is the case, apply the decoration.  Minimal standalone source:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{decorations,decorations.text,arrows}     \begin{document}     \begin{tikzpicture}[companion/.style={->,         postaction={             decorate,decoration={raise=2pt,text along path,text color=purple!60!black,text={|\tiny|companion},text align=center}         }     },node distance=1.2cm,>=stealth',auto]     \node[draw] (t3) at (1,0) {$c$};     \node[draw] (t1) at (0,0) {$b$} edge[companion] (t3);     \node[draw] (t2) at (-2,0) {$a$} edge[companion,bend left] (t1);     \end{tikzpicture}     \end{document}      I hope there is an elegant but dynamic solution.


title: Historische Zeitschrift Bibliography Repeated Author Names

text: I am using slightly customised `Historische Zeitschrift Style`. When I typeset my file in the literature list at the end some of the author names are repeating (all though they shouldn't). Here is how this looks like: ![enter image description here](http://i.stack.imgur.com/PtSbD.png) The things marked with red shouldn't be there. I presume that has something to do with the customisations of the package I have. Here is my MWE:               \documentclass[a4paper,11pt]{scrartcl}     \usepackage[latin1]{inputenc}     \usepackage{csquotes}     \usepackage{blindtext}     \usepackage{filecontents}     \usepackage{hyperref}     \hypersetup{         colorlinks,          citecolor=black,          filecolor=black,          linkcolor=black,          urlcolor=black     }     \usepackage{chngcntr}     \counterwithin*{footnote}{section}     \begin{filecontents}{\jobname.bib}      @incollection{athanasius1998,         Address = {Berlin/New York},         Author = {{Athanasius Alexandrinus}},         Booktitle = {Athanasius Werke - Die dogmatischen Schriften},         Call-Number = {TH: Vb 17.02-1.1.2},         Date-Added = {2010-10-16 13:24:30 +0200},         Date-Modified = {2014-03-13 17:12:32 +0000},         Editor = {Marin Tetz and others},         Keywords = {source},         Pages = {109-175},         Publisher = {Walter de Gruyter},         Read = {No},         Series = {Urkunden zur Geschichte des Arianischen Streites 318-328},         Shortauthor = {Ath.},         Shorttitle = {Ar. 1},         Usera = {SCh},         Title = {Oratio I contra Arianos},         Volume = {1, Tl. 1, Lfg. 2},         Year = {1998}}     @incollection{evagrius2011,         Address = {Paris},         Author = {{Evagrius Scholasticus}},         Booktitle = {{\'E}vagre Le Scholastique: Histoire Eccl{\'e}siastique - Livres I-III},         Call-Number = {TH: Va1.05/542},         Date-Added = {2013-08-24 12:11:20 +0000},         Date-Modified = {2014-03-30 11:54:31 +0000},         Editor = {Joseph Bidez and Leon Parmentier},         Keywords = {source},         Publisher = {Les {\'E}ditions du Cerf},         Series = {Sources chr{\'e}tiennes},         Shortauthor = {Evagr.},         Shorttitle = {h.e.},         Title = {Historia ecclesiastica},         Usera = {SCh},         Volume = {542},         Year = {2011}}     @incollection{gregoire1978,         Address = {Paris},         Author = {{Gregorius Nazianzenus}},         Booktitle = {Discours 27-31},         Call-Number = {TH: Va 1.05 250},         Date-Added = {2011-08-29 09:18:38 +0200},         Date-Modified = {2014-05-29 10:45:06 +0000},         Editor = {Paul Gallay},         Keywords = {source},         Pages = {226-275},         Publisher = {Les {\'E}ditions du Cerf},         Series = {Sources chr{\'e}tiennes},         Shortauthor = {{Gr. Naz.}},         Shorttitle = {or. 30},         Title = {Oratio 30: De Filio (Theologica Quatra)},         Usera = {SCh},         Volume = {250},         Year = {1978}}     @incollection{gregoire1974,         Address = {Paris},         Author = {{Gregorius Nazianzenus}},         Booktitle = {Lettres th{\'e}ologiques},         Call-Number = {TH: Va 1.05 208},         Date-Added = {2010-04-22 16:22:42 +0200},         Date-Modified = {2014-03-30 11:54:28 +0000},         Editor = {Paul Gallay},         Keywords = {source},         Pages = {87-95},         Publisher = {Les {\'E}ditions du Cerf},         Series = {Sources chr{\'e}tiennes},         Shortauthor = {{Gr. Naz.}},         Shorttitle = {ep. 202},         Title = {Epistula 202: Ad Nectarium Constantinopolitanum},         Usera = {SCh},         Volume = {208},         Year = {1974}}     @incollection{gregorius1981,         Address = {Paris},         Author = {{Gregorius Nazianzenus}},         Booktitle = {Discours 24-26},         Date-Added = {2014-05-29 12:04:21 +0000},         Date-Modified = {2014-05-29 12:05:35 +0000},         Editor = {Justin Mossay},         Keywords = {source},         Pages = {40-85},         Publisher = {Les {\'E}ditions du Cerf},         Series = {Sources chr{\'e}tiennes},         Shortauthor = {{Gr. Naz.}},         Shorttitle = {or. 24},         Title = {Oratio 24: In laudem s. Cypriani},         Usera = {SCh},         Volume = {284},         Year = {1980}}     @incollection{gregorius1990,         Address = {Paris},         Author = {{Gregorius Nazianzenus}},         Booktitle = {Discours 38-41},         Date-Added = {2014-03-27 09:58:33 +0000},         Date-Modified = {2014-03-30 11:53:58 +0000},         Editor = {Claudio Moreschini},         Keywords = {source},         Pages = {104-148},         Publisher = {Les {\'E}ditions du Cerf},         Series = {Sources chr{\'e}tiennes},         Shortauthor = {{Gr. Naz.}},         Shorttitle = {or. 38},         Title = {Oratio 38: In Theophania},         Usera = {SCh},         Volume = {358},         Year = {1990}}     @incollection{gregorius1979/1,         Address = {Paris},         Author = {{Gregorius Nazianzenus}},         Booktitle = {Discours 27-31},         Date-Added = {2014-03-27 09:54:29 +0000},         Date-Modified = {2014-03-30 18:41:48 +0000},         Editor = {Paul Gallay},         Keywords = {source},         Pages = {176-225},         Publisher = {Les {\'E}ditions du Cerf},         Series = {Sources chr{\'e}tiennes},         Shortauthor = {{Gr. Naz.}},         Shorttitle = {or. 29},         Title = {Oratio 29: Theologica III},         Usera = {SCh},         Volume = {250},         Year = {1979}}          @incollection{gregoire1978/2,         Address = {Paris},         Author = {{Gregorius Nazianzenus}},         Booktitle = {Discours 27-31},         Call-Number = {TH: Va 1.05 250},         Date-Added = {2014-03-26 18:56:20 +0000},         Date-Modified = {2014-03-30 11:54:18 +0000},         Editor = {Paul Gallay},         Keywords = {source},         Pages = {276-343},         Publisher = {Les {\'E}ditions du Cerf},         Series = {Sources chr{\'e}tiennes},         Shortauthor = {{Gr. Naz.}},         Shorttitle = {or. 31},         Title = {Oratio 31: Theologica V},         Usera = {SCh},         Volume = {250},         Year = {1978}}          @incollection{gregorius1978,         Address = {Paris},         Author = {{Gregorius Nazianzenus}},         Booktitle = {Discours 1-3},         Date-Added = {2014-03-26 18:48:54 +0000},         Date-Modified = {2014-03-30 18:42:08 +0000},         Keywords = {source},         Pages = {84-241},         Publisher = {Les {\'E}ditions du Cerf},         Series = {Sources chr{\'e}tiennes},         Shortauthor = {{Gr. Naz.}},         Shorttitle = {or. 2},         Title = {Oratio 2: Apologetica},         Usera = {SCh},         Volume = {247},         Year = {1978}}          @incollection{gregorius1990/2,         Address = {Paris},         Author = {{Gregorius Nazianzenus}},         Booktitle = {Discours 38-41},         Date-Added = {2014-03-26 17:58:16 +0000},         Date-Modified = {2014-03-30 11:53:48 +0000},         Editor = {Claudio Moreschini},         Keywords = {source},         Pages = {150-197},         Publisher = {Les {\'E}ditions du Cerf},         Series = {Sources chr{\'e}tiennes},         Shortauthor = {{Gr. Naz.}},         Shorttitle = {or. 39},         Title = {Oratio 39: In sancta lumina},         Usera = {SCh},         Volume = {358},         Year = {1990}}          @incollection{gregorius1992,         Address = {Paris},         Author = {{Gregorius Nazianzenus}},         Booktitle = {Discours 42-43},         Date-Added = {2014-03-26 17:58:15 +0000},         Date-Modified = {2014-03-30 11:53:44 +0000},         Editor = {Jean Bernardi},         Keywords = {source},         Pages = {48-115},         Publisher = {Les {\'E}ditions du Cerf},         Series = {Sources chr{\'e}tiennes},         Shortauthor = {{Gr. Naz.}},         Shorttitle = {or. 42},         Title = {Oratio 42: Supremum vale},         Usera = {SCh},         Volume = {384},         Year = {1992}}          @incollection{gregorius1990/1,         Address = {Paris},         Author = {{Gregorius Nazianzenus}},         Booktitle = {Discours 38-41},         Date-Added = {2014-03-26 17:58:15 +0000},         Date-Modified = {2014-03-30 18:41:25 +0000},         Editor = {Claudio Moreschini},         Keywords = {source},         Pages = {198-311},         Publisher = {Les {\'E}ditions du Cerf},         Series = {Sources chr{\'e}tiennes},         Shortauthor = {{Gr. Naz.}},         Shorttitle = {or. 40},         Title = {Oratio 40: In sanctum baptisma},         Usera = {SCh},         Volume = {358},         Year = {1990}}          @incollection{gregorius1980/1,         Address = {Paris},         Author = {{Gregorius Nazianzenus}},         Booktitle = {Discours 20-23},         Date-Added = {2014-03-26 17:42:35 +0000},         Date-Modified = {2014-03-30 11:54:01 +0000},         Editor = {Justin Mossay},         Keywords = {source},         Pages = {220-258},         Publisher = {Les {\'E}ditions du Cerf},         Series = {Sources chr{\'e}tiennes},         Shortauthor = {{Gr. Naz.}},         Shorttitle = {or. 22},         Title = {Oratio 22: De pace II},         Usera = {SCh},         Volume = {270},         Year = {1980}}          @incollection{gregorius1978/1,         Address = {Paris},         Author = {{Gregorius Nazianzenus}},         Booktitle = {Discours 1-3},         Date-Added = {2014-03-26 17:42:34 +0000},         Date-Modified = {2014-03-30 18:41:59 +0000},         Keywords = {source},         Pages = {241-255},         Publisher = {Les {\'E}ditions du Cerf},         Series = {Sources chr{\'e}tiennes},         Shortauthor = {{Gr. Naz.}},         Shorttitle = {or. 3},         Title = {Oratio 3: Ad eos qui ipsum acciverant nec occurrerant},         Usera = {SCh},         Volume = {247},         Year = {1978}}          @book{moreschini1997,         Address = {Oxford},         Author = {{Gregorius Nazianzenus}},         Call-Number = {Googlebooks},         Date-Added = {2014-03-26 15:07:53 +0000},         Date-Modified = {2014-03-26 15:14:45 +0000},         Editor = {Claudio Moreschini and},         Keywords = {source},         Publisher = {Clarendon Press},         Series = {Oxford Theological Monographs},         Title = {St. Gregory of Nazianzus: \textit{Poemata Arcana}},         Translator = {Donald Sykes},         Year = {1997}}          @book{white1996,         Address = {Cambridge},         Author = {{Gregorius Nazianzenus}},         Call-Number = {Googlebooks},         Date-Added = {2014-03-26 15:05:53 +0000},         Date-Modified = {2014-03-26 15:07:22 +0000},         Editor = {Carolinne White},         Keywords = {source},         Publisher = {Cambridge University Press},         Title = {Gregory of Nazianzus: Autobiographical Poems},         Translator = {Carolline White},         Year = {1996}}     @book{gregorius1862,         Address = {Parisiis},         Author = {{Gregorius Nazianzenus}},         Call-Number = {PDF},         Date-Added = {2014-03-15 15:58:32 +0000},         Date-Modified = {2014-03-31 08:01:30 +0000},         Editor = {Jacques Paul Migne},         Keywords = {source},         Publisher = {Accurante J.-P. Migne},         Series = {Patrologiae cursus completus: Series Graeca},         Shortauthor = {{Gr. Naz.}},         Shorttitle = {hym. 30},         Title = {Hymnus 30: Ad Deum},         Usera = {PG},         Volume = {37},         Year = {1862}}     @incollection{gregorius1980,         Address = {Paris},         Author = {{Gregorius Nazianzenus}},         Booktitle = {Discours 20-23},         Date-Added = {2013-04-25 14:10:40 +0000},         Date-Modified = {2014-03-30 11:54:04 +0000},         Editor = {Justin Mossay},         Keywords = {source},         Pages = {110-193},         Publisher = {Les {\'E}ditions du Cerf},         Series = {Sources chr{\'e}tiennes},         Shortauthor = {{Gr. Naz.}},         Shorttitle = {or. 21},         Title = {Oratio 21: In laudem Athanasii},         Usera = {SCh},         Volume = {270},         Year = {1980}}     @incollection{gregoire1974/2,         Address = {Paris},         Author = {{Gregorius Nazianzenus}},         Booktitle = {Lettres th{\'e}ologiques},         Call-Number = {TH: Va 1.05 208},         Date-Added = {2012-05-04 16:46:23 +0200},         Date-Modified = {2014-03-30 11:54:26 +0000},         Editor = {Paul Gallay},         Keywords = {source},         Pages = {37-69},         Publisher = {Les {\'E}ditions du Cerf},         Series = {Sources chr{\'e}tiennes},         Shortauthor = {{Gr. Naz.}},         Shorttitle = {ep. 101},         Title = {Epistula 101: Ad Cledonium presbyterum contra Apollinarium},         Usera = {SCh},         Volume = {208},         Year = {1974}}     \end{filecontents}     \usepackage[ngerman]{babel}     \usepackage[style=historische-zeitschrift, maxnames=2, hyperref=true, backref=true, backrefstyle=none, backend=bibtex,idemtracker=true]{biblatex}     \bibliography{\jobname}     %     \makeatletter     \renewbibmacro*{footcite}{%       \global\boolfalse{cbx@loccit}%       \global\boolfalse{cbx@seenote}% NEW!       \ifciteseen         {\iffieldundef{shorthand}            {\ifthenelse{\ifciteibid\AND\NOT\iffirstonpage}               {\usebibmacro{footcite:ibid}}               {\usebibmacro{footcite:note}}}            {\usebibmacro{footcite:shorthand}}}            {\iffieldundef{usera}              {\usebibmacro{footcite:full}}{\printnames{author}%            \setunit{\addcomma\space}%            \printfield{title}\isdot%              {\setunit{\addcomma\space}%               \usebibmacro{in:}%               \printfield{usera}%               \setunit*{\addspace}%               \printfield[default]{volume}}}}%          \usebibmacro{footcite:save}}          %          \renewbibmacro*{footcite:note}{%       \global\booltrue{cbx@seenote}% NEW!       \ifnameundef{labelname}         {\printfield{label}}         {\printnames{labelname}}%       \ifsingletitle         {}         {\setunit*{\addcomma\space}%          \printfield[title]{labeltitle}}%       \setunit*{\addspace}%<--- CHANGED       \printtext{%         \bibhyperlink{\thefield{entrykey}:%                       \@nameuse{cbx@first@\thefield{entrykey}}}{%           \printtext{\bibleftparen}%           \bibstring{seenote}\addnbspace           \@nameuse{cbx@note@\thefield{entrykey}}%           \setunit{\addcomma\space}%           \bibstring{page}\addnbspace           \@nameuse{cbx@page@\thefield{entrykey}}}}}          \renewbibmacro*{footcite:save}{%       \ifundef\@thefnmark         {\ifundef\@theenmark % endnotes.sty            {\csgdef{cbx@note@\thefield{entrykey}}{%               \BibliographyWarning{Missing footnote mark}\textbf{??}}}            {\global\cslet{cbx@note@\thefield{entrykey}}\@theenmark}}         {\global\cslet{cbx@note@\thefield{entrykey}}\@thefnmark}%       \global\cslet{cbx@page@\thefield{entrykey}}\thepage       \csxdef{cbx@first@\thefield{entrykey}}{\the\value{instcount}}}          % NO PAGES IN INCOLLECTION FOOTNOTES BUT PAGES IN BIBLIOGRAPHY     %     \renewbibmacro*{chapter+pages}{%       \printfield{chapter}%       \newunit}     \makeatletter     \renewenvironment{thebibliography}          {\renewbibmacro*{chapter+pages}{%       \printfield{chapter}%       \setunit*{\addcomma\space}%       \printfield{pages}%       \newunit}}     \makeatother     %     \begin{document}     \section{First section}     \blindtext\footcite[See][S. 56]{athanasius1998}     \blindtext\footcite[See][S. 22]{evagrius2011}     \pagebreak     \section{Second section}     \blindtext\footcite[Vgl.][S. ]{gregoire1974,gregoire1974/2,gregoire1978,gregoire1978/2,gregorius1862,gregorius1978,gregorius1978/1,gregorius1979/1,gregorius1980,gregorius1980/1,gregorius1981,gregorius1990,gregorius1990/1,gregorius1990/2,gregorius1992}     \blindtext\footcite[See][S. 12]{evagrius2011}     \pagebreak     \section{Third section}     \blindtext\footcite[See][S. 11]{athanasius1998}     \blindtext\footcite[See][S. 12]{evagrius2011}     \pagebreak     \printbibliography     \end{document}


title: Keeping equations as part of a paragraph on the same page

text: I want to have equations with item lists as part of a paragraph such that there is no page break between the equation and the item list, but there can be a page break in the middle of the paragraph. Currently I am using:               \def\formula#1#2{     \begin{samepage}         \begin{align}          #1          \end{align}  where          \begin{itemize}         #2         \end{itemize}     \end{samepage}     }      For example used like `The formula is given by: \formula{f(x)=x^2}{\item $x$ is some variable}`. However, this seems to cause the whole paragraph it is used in not to have a page break. I've tried using the `minipage` environment, but that causes the minipage to start where the line ended; it is shifted to the right so that part of the sentence after which the formula started was printed to its left. Introducing a line break (`\\*`) between the sentence and the formula then causes errors, since I sometimes do use the command as a separate paragraph, in which case there is no line to end. I've also tried `\nopagebreak[4]`, but that didn't seem to do anything at all. How can I keep the equation and the itemize on the same page without necessarily having the whole paragraph on that page as well?


title: Theorem style - define indentation

text: I have a real issue with defining my theorem style. I need indentation after the theorem, but cannot achive it. I google for hours and didn't find a solution. Hope you can help me. By the way, I'm using Lyx 2.1 on Windows. If you also know how to remove the whitespace between the number and the colon I would appreciate it very much. I want an indentation like this: ![enter image description here](http://i.stack.imgur.com/ZjA6e.png) But I get this: ![enter image description here](http://i.stack.imgur.com/slYiQ.png) I define this:                \newtheoremstyle{hypstyle}% name      {\topsep}%      Space above      {\topsep}%      Space below      {\itshape}%         Body font      {}%         Indent amount (empty = no indent, \parindent = para indent)      {\bfseries}% Thm head font      {:}%        Punctuation after thm head      {.5em}%     Space after thm head: " " = normal interword space;      {\thmname{#1}\thmnumber{#2}\thmnote{ #3}  } % Thm head spec (can be left empty, meaning `normal')      \theoremstyle{hypstyle} % use plain, definition, remark      \newtheorem{hyp}{Hypothese}      \renewenvironment{thm}{\begin{hyp}}{\end{hyp}}      And use it like this:               \begin{thm}     Bei Anwendungen mit einer hohen Allokationsrate (800 MB/s) besteht keine lineare Beziehung zwischen dem \texttt{NewRatio}-Wert und der STW-Summe, für Anwendungen mit einer geringen Allokationsrate dagegen schon.      \textbf{Vorbedingung:} Text     \textbf{Änderung:} Text     \textbf{Nachbedingung:} Text     \end{thm}


title: Directed polyline with circles at vertices

text: This is a follow up question of two other questions. The first is _Node at every vertex_ and the second one is this. My goal is to combine the two. In particular, I want to write something like                \draw[polyline] (0,0) -- (1,1) -- (2,0) -- (3,1);      And the result would be a polyline (polygon) such that each vertex will be marked with a circle and there will be an arrow at the middle of each segment. This is what I have so far:               \begin{tikzpicture}[       mnode/.style={circle,draw=black,fill=black,inner sep=0pt,minimum size=2pt},       node at every point/.style={%         decoration={%           show path construction,           lineto code={%             \coordinate (pos) at ($0.5*(\tikzinputsegmentlast)+0.5*(\tikzinputsegmentfirst)$);             \coordinate (direction) at ($(\tikzinputsegmentlast)-(\tikzinputsegmentfirst)$);             \gettikzxy{(direction)}{\dirx}{\diry}             \pgfmathsetmacro\rotationdir{atan(\diry/\dirx)}             \node at (pos) [rotate=\rotationdir] {>};             \node at (\tikzinputsegmentlast) [#1] {};           },           moveto code={\node at (\tikzinputsegmentfirst) [#1] {};},           curveto code={\node at (\tikzinputsegmentlast) [#1] {};}         },         postaction=decorate       }       ]       \draw[node at every point=mnode] (0,0) -- (1,2) -- (2.3,0) -- (2.5,1);     \end{tikzpicture}      And this is the result: ![image](http://i.stack.imgur.com/JCLMk.png) This code exhibits two problems. First, the arrow looks bad, and secondly it cannot handle vertical segments. In the latter case, `\dirx` is zero and the code fails. I tried to hack it using `\pgfmathifthenelse{x}{y}{z}` of `\ifthenelse` but nothing worked for me... How can I address the two problems?


title: XeTeX loads Lido STF incorrectly

text: This is a followup to Are the Lido STF font installation instructions up-to- date?. I have the Lido STF fonts installed as described there. I also have them installed in OpenType format in `C:\Windows\Fonts`. I'm using MiKTeX. This code compiled with PDFLaTeX gives correct output, while compiling with XeLaTeX makes the first sentence bold italic and the second sentence regular.               \documentclass{article}     \usepackage{iftex}     \ifXeTeX         \usepackage{fontspec}         \setmainfont[Ligatures=TeX]{Lido STF}     \else         \usepackage[utf8]{inputenc}         \usepackage[T1]{fontenc}         \renewcommand{\rmdefault}{sld}     \fi          \begin{document}     {\itshape This is supposed to be italic.}     {\bfseries And this bold.}          \end{document}      Additionally Adobe Reader tells me that even when I use XeTeX, the Type1 fonts are used. What is the problem and how do I fix it permanently?