title: Why fontspec breaks extarrows package

text: Why               \documentclass{book}     \usepackage{extarrows}     \usepackage{fontspec}     \setmainfont{Times New Roman}     \begin{document}     $$Q\xLongrightarrow{\text{Maximum}} P$$     \end{document}      produces this output: ![enter image description here](http://i.stack.imgur.com/qk2nz.png) and how can you fix this? # More Details With               \documentclass{minimal}     \usepackage{extarrows}     \usepackage{palatino}     \begin{document}     $$Q\xLongrightarrow{Maximum} P$$     \end{document}      there are no palatino font. It seems to be a `fontspec` bug then.


title: biblatex format bibliography list

text: How to make the bibliography entries to be printed as a usual paragraph (with parindent without any other indentations) but with the index number without dot? And also I need to make a skip between them. Example:                   1  Autor A. A book in my bibliog-     raphy 1984              2  Author2 A2. Another book name     in bibliography


title: Extra page while using simultaneously minitoc and float

text: I have a problem for a while now: there is always an extra page at the end of my documents. I notice that this happens when I use simultaneously `minitoc` and `float`. I track this issue down to this minimal code :               \documentclass{report}     \usepackage{float}     \usepackage{minitoc}     \begin{document}     \end{document}      I can compile this without any error and it generates an empty page with page number 1. (I use TeX Live 2013 on Linux, and I happens both with LaTeX and pdfLaTeX). How can I simultaneously create tables of content by chapter and use the `[H]` option in `\begin{figure}[H]` ? Update after egreg answer: here is a new minimal example with some text, that creates always a new page.               \documentclass{report}     \usepackage{float}     \usepackage{minitoc}     \begin{document}     \include{ch01}     \end{document}      You can put anything in `ch01.tex` and an extra page will be created.


title: Full version of TeX Live: malware checked?

text: I am wondering if `texlive-full` is bearing any security issues? Why everybody does trust it? Are they checked by anybody? Thanks for helping and educating me on this point :)


title: Print font name using LuaTeX

text: I want to print font names (full name, ps name, file name, etc) using LuaTeX's font table. It works fine previously, but recently I encountered an error message from luaotfload Here is a minimal working example,               \documentclass{article}     \usepackage{fontspec}     % \setmainfont{Minion Pro}          \begin{document}     \directlua{       local str = font.fonts[font.current()].fullname       tex.sprint(-2, str)     }     \end{document}      This example, when compiled with LuaTeX works fine. The output PDF has the string `LMRoman10-Regular`, which is the default font. However, if I do not comment out the `setmainfont` line, that is, I load the Minion Pro font, then I got the following error message,               error: ...3/texmf-dist/tex/luatex/luaotfload/luaotfload-merged.lua:7656: attempt to perform arithmetic on local 'factor' (a nil value)     .     \newpage ...k \@nobreakfalse \everypar {}\fi \par                                                        \vfil \penalty -\@M       The relevant line in `luaotfload-merged.lua` and around is,               function injections.setkern(current,factor,rlmode,x,tfmchr)       local dx=factor*x       if dx~=0 then         local bound=#kerns+1         setattr(current,a_kernpair,bound)         kerns[bound]={ rlmode,dx }         return dx,bound       else         return 0,0       end     end      When I replace the `tex.sprint` line with `inspect`, the console displays correctly `Minion Pro Regular`. Does anyone has any idea what is going on here? I am using an up-to-date TeXLive 2013 installation.


title: Left-Align Table in Beamer Presentation

text: I have a table within a frame in a presentation using the beamer package, and it's centered in the frame right now:               \subsection{Results}     \begin{frame}{Results}     \begin{table}      \begin{tabular}{l|l|l|l|l|l}     six & things & to & fill & the & space \\     \end{tabular}     \caption{Table Caption}     \end{table}     \end{frame}      I'm looking to shift it to the left of the frame and put two graph figures on the right stacked on top of one another. How would I set this up as a frame? Thanks!


title: Custom style for acronyms

text: In the past I have extensively used the glossaries package. Now I'm trying to use acronyms, where the letters to build up the acronym are underscored in the list of acronyms. In the text I want `\gls` on first use to display the abbreviation with a footnote text of his description, where the description is linked to the corresponding entry in the list of acronyms:               \acronymfont{<abbrv>}\footnote{<description>}      In the list of acronyms I want the normal display of the abbreviation and the long form together with the number list. The main difference is therefore, that in the footnote the long form is not displayed but the description, which is given as an optional argument for `\newacronym`. Is this possible via the help of `\CustomAcronymFields`, `\SetCustomDisplayStyle` and/or `\SetCustomStyle`?


title: Itemize bullets without itemization?

text: How can I produce bullets like ![enter image description here](http://i.stack.imgur.com/c7xsr.jpg) as they are used in `beamer` with `itemize` environments? I want to use them in the text not just for itemizations. Note: I would like the bullets not just to look more or less like the `beamer` `itemize` bullets but they should look identical in colour, shape, and size!


title: Is it correct to use RequirePackage[utf8]{inputenc}?

text: If I create a package, is it correct to use `\RequirePackage[utf8]{inputenc}` to support utf8. I guess not, but how do I state that this package must (should) be used with inputenc utf8?


title: Horizontal text alignment in captions for subfigures

text: Captions in subfigures are justified by default, which does not always look pretty: ![figure/subfigure caption alignment](http://i.stack.imgur.com/zK1vV.png)               \documentclass[]{tGIS2e} % http://www.tandf.co.uk/journals/authors/tgislatex.zip          \begin{document}          \begin{figure}     \begin{center}     %\raggedright     \subfigure[caption for a]{         \includegraphics[draft,width=3cm,height=3cm]{dummy}%         \label{fig:myfig_a}%     }     ~     \subfigure[capture for b, justified]{         \includegraphics[draft,width=3cm,height=3cm]{dummy}%         \label{fig:myfig_b}%     }     ~     \subfigure[justification becomes ugly sometimes]{         \includegraphics[draft,width=3cm,height=3cm]{dummy}%         \label{fig:myfig_c}%     }     ~     \subfigure[there should be a way of applying \textbackslash raggedright or a similar command ]{         \includegraphics[draft,width=3cm,height=3cm]{dummy}%         \label{fig:myfig_d}%     }     \caption{Figure example}%     \label{fig:myfig}     \end{center}     \end{figure}          \end{document}      How would it be possible to keep the overall alignment of the image and its caption, and make the subcaption aligned, let’s say left? Adding `\raggedright` does not help — it shifts the whole image left, but keeps the alignment of the text. It would be good if the solution exited for the markup given above, because the template I’m using does not support `subfigure` as environment and also conflicts with `subcaption` package.


title: Setting TikZ curve control points and preserve area of closed curve

text: I would like to reproduce the shown periodic table, with more correct areas. http://www.meta-synthesis.com/webbook/35_pt/relative_abundance.jpg ![periodic tabel with abundance](http://i.stack.imgur.com/ycfsC.jpg) I would appreciate any ideas to how this can be done. How do I in TikZ calculate the area of one box? Can I make the control points auto adjust to a given area, either by iteration, or direct calculation. I do not know the math behind control points!? **Code sample:**               \documentclass{standalone}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}     \draw (0,0) rectangle (3,2);     \draw (0,1) .. controls (0.4,0.4) and (1.5,1.5) ..  (3,1);     \draw (1,0) .. controls (0.4,0.4) and (1.5,1.5) ..  (1,2);     \draw (2,0) .. controls (1.4,1.4) and (1.5,1.5) ..  (2,2);     \end{tikzpicture}     \end{document}      **Output:** ![sample output](http://i.stack.imgur.com/GLVhN.png)


title: Why doesn't WinEdt 8.0 produce PDF output?

text: I am using WinEdt in Windows 7. A problem occurs when I am trying to compile a LaTeX file with PDFLaTeX. After compilation it does not produce any PDF file and even existing PDF files are deleted. Before compiling the LaTeX file, I have ![enter image description here](http://i.stack.imgur.com/XVN7m.jpg) After compilation I get ![enter image description here](http://i.stack.imgur.com/oweRn.jpg) After compilation the icon “View PDF” becomes inactive. How can I fix this problem?


title: Add Text/Comment into bibliography

text: I am using an additional bibliography inside my thesis. This includes only articles to which I contributed. Displaying these works fine, but I would like to add some comment before each cited paper. My code so far looks like this:               \documentclass{scrreprt}     \usepackage[bibstyle=authoryear, backend=bibtex8]{biblatex}     \usepackage{filecontents}          \begin{filecontents}{jobname.bib}     @misc{A2011,       author = {Author, A.},       year = {2011},       title = {A short title.},           }     @misc{A2012,       author = {Buthor, B.},       year = {2012},       title = {Systems biology and personalized medicine are two emerging research areas, which promise to transform our health system.},     }     @misc{A2013,       author = {Cuthor, C.},       year = {2013},       title = {This title is not so short.},     }     \end{filecontents}     \addbibresource{jobname.bib}          \begin{document}     \defbibnote{myprenote}{This thesis is based on the following original publications:}     \nocite{A2012, A2013}     \printbibliography[prenote=myprenote,title={List of original publications}]     \end{document}      This adds paper 2 and 3 to the bibliography, but I cannot enter a comment above it. I made a short visualization what I am trying to get: ![enter image description here](http://i.stack.imgur.com/yuhCS.png) This piece of code from this tex.sx article adds a comment to the bibliography.               \DeclareDatamodelFields[type=field,datatype=literal]{mynote}     \usepackage{xpatch}     \xapptobibmacro{finentry}{\par\printfield{mynote}}{}{}      But how can I add the commment before the entry (as indicated by the arrows in the image above)?


title: ACM Sigplan format authorinfo

text: ACM Sigplan provides `\authorinfo` for author information. Currently, I have 4 authors. I would like to format in two lines each with two authors. However, by default, it formats in two lines, line 1 with three authors, and line 2 with one author in the middle. How can I change this?               \authorinfo{Author 1}     {Aff 1}     {email 1}     \authorinfo{Author 2}     {Aff 2}     {email 2}     \authorinfo{Author 3}     {Aff 3}     {email 3}     \authorinfo{Author 4}     {Aff 4}     {email 4}


title: How can by macro as parameter of other macro?

text: `\StrPosition{AQ2 K863 1065 J1065}{ }` give **4**   `\StrMid{AQ2 K863 1065 J1065}{1}{4}` give **AQ2**   `\StrMid{AQ2 K863 1065 J1065}{1}{\StrPosition{AQ2 K863 1065 J1065}{ } }` i want **AQ2** but give error message.


title: How to put a text label *before* an equation?

text: currently I have an optimization problem defined in {equation} environment: ![enter image description here](http://i.stack.imgur.com/OSu9Y.png) I want to add a label (P) before equation (6). Currently, I had to use the first line "Optimization problem (P)" as a workaround. Ideally, I'd like it to look like this:      ![enter image description here](http://i.stack.imgur.com/OWF5r.png) I tried to use {IEEEeqnarray}, but it didn't work well. Also tried to google, but couldn't find an answer. Any help is much appreciated!


title: How to update an existing node?

text: I'm drawing a node and after a `\pause` I'd like to add a label to the node. What I have so far simply repaints the node, but I hope that there is a nicer way:               \tikzstyle{vertex}=[circle,fill=black!25,minimum size=20pt,inner sep=0pt]     \begin{figure}      \begin{tikzpicture}[scale=1.8, auto,swap]          \node[vertex] (v_1) at (1,2) {$v_1$};          \pause          \node[vertex,label={[color=blue]80:$12$}] (v_1) at (1,2) {$v_1$}; %here I have to give name, node text and position again...     \end{tikzpicture}     \end{figure}


title: When wrapping text around an image, latex fills the bottom line first, not the top. How do I fix this?

text: I am using the `wrapfig` package in LaTeX, and in some areas, it is working fine to wrap the text around the image. However here it is breaking the lines in a weird way, and extending the _blank_ area down farther than the image. I have tried to use `\vspace{-#}` but it is not helping much for this paragraph. Is there a way to fix the blank space or line breaks without manually breaking each line with `\\\`? So for example the line would look like this (sorry it won't let me post a picture...)   1. Search an item you want to locate in the find tab. (image tight to the word tab) Corresponding latex:               \begin{wrapfigure}{r}{0.3\textwidth}     \vspace{-.5cm}     \begin{center}         \includegraphics[width=0.3\textwidth]{toolbar-find}     \end{center}     \vspace{-5cm}     \end{wrapfigure}          \subsection{Find}     \begin{enumerate}     \item Search an item you want to locate in the find tab. \\     \item Check the box to the left of its name to label it on your screen.\\     \item Double click the object's name to center it on your screen.\\     \item Some objects have two boxes to the right of their name (such as planets). The first box to the right will display the object's orbit, if checked. The second box will display the object's shadow cone, if checked.     \item Further columns to the right give you additional information about the object.     \end{enumerate}          \subsection{Options}     The options menu allows you to turn on various settings or display items in {\em Starry Night}.  Click the arrow to the left of a section to expand it.  To turn an item on, check the box to its left.  To turn it off, uncheck the box.\\


title: Differentiating between \hbox and \mbox

text: What are the differences between `\hbox` and `\mbox`? Related:   * This answer to "What are the different kinds of boxes in (La)TeX?" discusses different boxes in general.   * This answer to "Difference between various methods for producing text in math mode" differentiates `\text` from `\mbox`.


title: Latex and Thai language

text: I try to use Latex with Thai language. I found a few problems.   1. `\usepackage[Lenny]{fncychap}`does not completely support Thai font. (TH Sarabun New is an opentype font)   2. `\bibliography{bib}` do not support Thai font. There is something wrong with my preamble.               \documentclass[a4paper,12pt,twoside,onecolumn,openright,final]{memoir}          % Page Setup     \setlrmarginsandblock{3.81cm}{2.54cm}{*}     \setulmarginsandblock{2.54cm}{2.54cm}{*}     \checkandfixthelayout          % Header & Footer Setup     \nouppercaseheads     \makepagestyle{mystyle}     \setlength{\headwidth}{\dimexpr\textwidth}     \makerunningwidth{mystyle}{\headwidth}          % Header     \makeevenhead{mystyle}{\itshape\leftmark}{}{}     \makeoddhead{mystyle}{}{}{\itshape\leftmark}     % Footer     \makeevenfoot{mystyle}{}{\thepage}{}     \makeoddfoot{mystyle}{}{\thepage}{}          \makeatletter     % Text at Header     \makepsmarks{mystyle}{    %     \createmark{chapter}{left}{shownumber}{\@chapapp\ }{.\ }}     \makeatother          %%% Chapter Page     \makepagestyle{plain}     \makerunningwidth{plain}{\headwidth}     \makeevenfoot{plain}{}{\thepage}{}     \makeoddfoot{plain}{}{\thepage}{}          \pagestyle{mystyle}          % Add Package     \usepackage{amsfonts}     %\usepackage{amsmath}     \usepackage{mathtools}          \usepackage{amssymb}     \usepackage{amsthm}     \setcounter{MaxMatrixCols}{30}     \usepackage{breqn}          \usepackage{graphics}     \usepackage{graphicx}     \usepackage{wrapfig}          \usepackage{rotating}          \usepackage[Lenny]{fncychap}     %********************          % Font Setup     \usepackage{xltxtra}     \usepackage{fontspec}     \defaultfontfeatures{Scale=1.35}     \setmainfont[Script=Thai]{TH Sarabun New}     % Thai alphabet     \XeTeXlinebreaklocale “th_TH”     % Thai alphabet     \XeTeXlinebreakskip = 0pt plus 1pt     \renewcommand{\baselinestretch}{1.4}          % Add Package For Thai Page Number     \usepackage{polyglossia}     \setdefaultlanguage[numerals=arabic]{thai}     % Thai alphabet     \newfontfamily{\thaifont}[Script=Thai]{TH Sarabun New:script=thai}     % Thai alphabet          %    %    % Set section number depth of ToC     \setsecnumdepth{subsection}     \settocdepth{subsection}          \usepackage{natbib}          \usepackage[     colorlinks=true,     linkcolor=blue,     citecolor=green,     anchorcolor=cyan,     filecolor=red,     urlcolor=blue,     bookmarksnumbered=true,     pdfview=FitB     ]{hyperref}          \usepackage{lipsum}          % Begin of Document     \begin{document}          \frontmatter          % Table of  Contents     \tableofcontents     \newpage     \listoftables     \newpage     \listoffigures     \newpage          \mainmatter     % Chapter     \chapter{Chapter title = ชื่อบท}     %Thai alphabet     \section{Section title 1 = ส่วนที่ 1}     %Thai alphabet     การสังเคราะห์ข้อมูลน้ำฝนรายวันแบบ สโตแคสติคโดยใช้ลูกโซ่มาร์คอฟ ชนิดสองสถานะ และฟังก์ชันการแจกแจงแบบต่อเนื่อง\\     means\\     Stochastic Generation of Daily Rainfall Using Two-state Markov Chain and Continuous Distribution Functions\\     \cite{AP2011}          % Bibliography     %********************     \bibliographystyle{chicago}     \bibliography{bib}          \end{document}       bib file:               @article{AP2011,       title={การสังเคราะห์ข้อมูลน้ำฝนรายวันแบบ สโตแคสติคโดยใช้ลูกโซ่มาร์คอฟ ชนิดสองสถานะ และฟังก์ชันการแจกแจงแบบต่อเนื่อง = Stochastic Generation of Daily Rainfall Using Two-state Markov Chain and Continuous Distribution Functions},       author={Asasuppakit, Praopun},       year={2011}     }       Figures showed Chapter 1 and Bibliography Chapter page showed a fine page, but it still has some errors when running XeLatex. Bibliography did not show anything. ![Chapter 1](http://i.stack.imgur.com/rLeDr.png) ![Bib](http://i.stack.imgur.com/gyUw9.png)


title: lscape rotates the whole document

text: I have been struggling with this for a couple of hours: Including the package `lscape` immediately rotates the whole document. I have no clue why it happens. The document is very simple:               \documentclass[aps,pre,preprint,superscriptaddress]{revtex4-1}     \usepackage{lscape}           \begin{document}     \title{}          \maketitle          \section{section 1}     A paragraph     \end{document}      Even with a `\begin{landscape}` environment the whole document is still changed. Thank you ahead for any comments.


title: Rendering VHDL in latex

text: I have a VHDL code which I want to insert into my latex document. I need a package that takes care of syntax highlighting, indentation etc. Is there a package which serves this purpose?


title: Installing amsthm.sty under MiKTeX

text: On the LaTeX wikibooks I saw that there is an easy way to make theorems: http://en.wikibooks.org/wiki/LaTeX/Theorems The problem is that `\usepackage{amsthm}` doesn't work - `asmthm.sty` is not found. And scanning the MiKTeX Package Manager, surely, I didn't find it either. How is it possible to obtain the `amsthm.sty` and thereafter installing it. So far I've been lucky enough to have the Package Manager doing all the fuss automatically for me.


title: How can I create Table in TeX and get information from txt file

text: How may I input `.txt` file to the TeX `tabular`? I have a list of students (FirstName, LastName, and if this student was at   school). 0 means not, 1 means yes, of course... `.txt` file look like this:               \r Julo:Petrzlen:011:100:101:          \r Ivan:Hrasok:110:101:010:      0 had to look like this "-" and 1 "x" in `tabular`. I am beginner in TeX and programming at all... I really have no idea how to start. So please, help me.


title: Device Independent color

text: I am validating the following latex document with The 3-Heights™ PDF Validator Online Tool               \documentclass{article}     \usepackage[margin=1in]{geometry}     \usepackage[rgb]{xcolor}          \begin{document}     \textcolor{blue}{This is only a test}     \end{document}      The output gives the error: `A device-specific color space (DeviceRGB) without an appropriate output intent is used.` How can I use colors that aren't device specific? Or use the appropriate intent?


title: How to separate subscript and superscript in LaTeX?

text: I have a variable with a subscript describer `P_{\rm 1S}` I'd like to square it. First a style question: is `(P_{\rm 1S})^2` or `P_{\rm 1S}^2` better? The programming part of the problem is that the latter aligns the superscript vertically above the subscript, I would like the power to be aligned further to the right distinct from the variable and its descriptors. Is there a simple way to do this?


title: Converting LaTeX file into RTF - can't seem to detect class file?

text: I have a resume in LaTeX format, that's using the Resume class from Michael DeCorte. I'm trying to convert it to RTF format, and hitting some issues.               $ latex2rtf resume     resume.tex:3    Document format <resume> unknown, using article format     resume.tex:3   Package/option 'margin' unknown.     resume.tex:3   Package/option 'line' unknown.     resume.tex:7   Unknown command '\name'     resume.tex:8   Error! Could not find <\end{resume}>      The resume.cls file is in the current directory, however latex2rtf can't seem to find it? Is there some way of getting this to work? Or another way to output the LaTeX file to RTF/Word .doc? Cheers, Victor


title: Is it possible to reuse tcolorbox definitions in another tcolorbox definition?

text: `TiKZ` allows to define a `.style` which can be later be used in another one:               \tikzset{           first/.style={rectangle, draw},           second/.style={first, inner sep=2mm}     }      any change in `first` is inherited by `second`. Is it possible to do something similar with `tcolorbox`? As an example, take a look at next code, where a `newtcolorbox` and a `newtcbox` are defined with exactly same options. How can be same options applied to both definitions without having to type them again?               \documentclass{beamer}     \usetheme{Madrid}     \usepackage{tcolorbox}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[french]{babel}     \usepackage{lmodern}     \tcbuselibrary{skins}          \makeatletter     \newtcolorbox{myblock}[2][]{         enhanced,         frame hidden, interior hidden, segmentation hidden,         coltitle=black,         fonttitle=\bfseries\rmfamily,         fontupper=\tiny,         title={#2},         overlay unbroken={\draw[gray,line width=1pt] (frame.north west) rectangle (frame.south east);         \draw[gray,line width=1pt] ([xshift=\kvtcb@lefttitle+\kvtcb@boxsep]interior.north west)--([xshift=-(\kvtcb@righttitle+\kvtcb@boxsep)]interior.north east);         \shade (frame.south west)--++(0,-1mm)--(frame.south)--cycle;         \shade (frame.south east)--++(0,-1mm)--(frame.south)--cycle;},         #1         }          \newtcbox{mybox}[2][]{           enhanced,           frame hidden, interior hidden, segmentation hidden,         coltitle=black,         fonttitle=\bfseries\rmfamily,         fontupper=\tiny,         title={#2},         overlay unbroken={\draw[gray,line width=1pt] (frame.north west) rectangle (frame.south east);         \draw[gray,line width=1pt] ([xshift=\kvtcb@lefttitle+\kvtcb@boxsep]interior.north west)--([xshift=-(\kvtcb@righttitle+\kvtcb@boxsep)]interior.north east);         \shade (frame.south west)--++(0,-1mm)--(frame.south)--cycle;         \shade (frame.south east)--++(0,-1mm)--(frame.south)--cycle;},         #1         }     \makeatother          \begin{document}     \begin{frame}{A nice box for beamer}          \begin{myblock}{Oups, nous avons rencontré une erreur.}     Note partagée non trouvée          L'URL fornie ne correspond pas à une note partagée valide. Cela a pu être causé par une erreur typographique dans le lien, ou le propiétaire l'a privaisée.     \end{myblock}          \mybox{Oups, this is a long title}{Note partagée non trouvée}     \mybox[left=0mm,right=1cm]{Oups}{Note partagée non trouvée}     \end{frame}     \end{document}      Another example. I would like to define some tcolorboxes like beamer's block, example block and alert block. I can do something similar with `\mybox` definition in previous code where an optional parameter can help to change some aspect like title color, margins, whatever.               \mybox{Oups, this is a long title}{Note partagée non trouvée}     \mybox[left=0mm,right=1cm]{Oups}{Note partagée non trouvée}      But if I would like to use `\myexample`, `\myalert`, `\myblock`, the only way I know is retyping all parameters in all definitions. Do you know an easier way?


title: Passing parameters to tikz picture?

text: I wrote a tikz diagram, which resides in its own dedicated file. I would like to include this file several times in my document, each time highlighting a different node in it. I tried defining a macro that would check for the argument, but alas, macro expansion within a path does not work. Any other ideas? Here is my code:                 {       \usetikzlibrary{arrows}       \usetikzlibrary{mindmap}       \begin{tikzpicture}[level 1/.append style={level distance=5ex,sibling angle=90}]       \small\it       \tikzstyle{show}=[draw,rectangle,thin,rounded corners]       \node[show] {}          child {node[show] {Monomorphism} }         child[missing]         child {node[show] {Polymorphism}           child { node[show] {Ad hoc}         child {node[show] {Overloading} }         child [missing]         child {node[show] {Coercion}}          child [missing]           }           child [missing]           child [missing]           child [missing]           child {node[show] {Universal}         child {node[show] {Parametric}            child {node[show] {Polymorphic Functions}}           child [missing]           child [missing]           child {node[show] {Polytypes}}         }         child[missing]         child[missing]         child {node[show] {Inclusion} child {node[show] {Subtype}}}           }         }       ;       \end{tikzpicture}       }


title: Why is thmtools and mdframed not working with parskip

text: I have the following MWE:                   %!TEX TS-program = XeLaTeX     %!TEX encoding = UTF-8 Unicode               % DEFINITIONS ===================================================     \documentclass[         12pt,         a4paper,         twoside,         headings=normal,         titlepage=true     ]{scrreprt}               \usepackage[centertags]{amsmath}     \usepackage[framemethod=TikZ]{mdframed}     \usepackage{amsthm}     \usepackage{thmtools}          \usepackage{lipsum}               \declaretheoremstyle[         headfont=\bfseries,          notebraces={[}{]},         bodyfont=\normalfont\itshape,         headpunct={},         postheadspace=\newline,         postheadhook={\textcolor{red}{\rule[.6ex]{\linewidth}{0.4pt}}\\},         spacebelow=0,         spaceabove=0,         mdframed={             linecolor=red,              outerlinewidth=3pt,                 innertopmargin=0pt,                 roundcorner=5pt,                  innerbottommargin=0pt,                  skipabove=-\parskip,                  skipbelow=0 }      ]{myFramedDefinitionStyle}%          \declaretheorem[         style=myFramedDefinitionStyle,         name=Definition,         numberwithin=chapter     ]{example1}          % Basic Command     \ExplSyntaxOn         \NewDocumentEnvironment{example} { o o }          {%           \IfNoValueTF{#1} {\begin{example1}}{ \begin{example1}[#1] }%                                            \IfNoValueTF{#2} {}{\label{#2}}%          }%          {%           \end{example1}%          }%     \ExplSyntaxOff               \begin{document}     \setlength{\parskip}{5mm}     \lipsum[1]     \begin{example}     asdasd     \end{example}     \lipsum[1]     \begin{example}     asdasd     \end{example}     \end{document}        Which results in this output, and I am really asking what I am doing wrong? Why is parksip messing up the boxes? Also the workaround from LINK does not help? Does anybody know why this mdframed with thmtools behaves so badly? Thanks a lot! :-)!!


title: Trouble defining new environment with embedded gather

text: I looked at the solution to How do I embed a gather environment within a custom environment? But things are still not working for me: MWE:               \documentclass[border=6pt]{standalone}     \usepackage{amsmath}          \newenvironment{mygather}       {%%          \begin{minipage}{2in}            \csname gather*\endcsname       }{%%            \csname endgather*\endcsname          \end{minipage}%%       }          \begin{document}            \begin{mygather}           y = x^{2} - 3x + 5       \end{mygather}          \end{document}


title: Suggestions on how to place a sentence of text inside a box with a border around it

text: I have an "XYZ's Law" quote that I'd like to show somewhere on a page vertically centered in a box with some form of simple border around it. Basically I'm trying to achieve the LaTeX equivalent of how _Norvig's Law_ is shown at http://norvig.com/norvigs-law.html where there's some text centred and placed inside a bordered box on the page. Can anyone begin to make suggestions on how I'd go about creating something of such an appearance? I apologize if my use of the term _box_ here overlaps with another use of the term that is specific to LaTeX. I've seen the term _box_ come up a number of times in LaTeX, so I don't know whether it has special meaning within the realms of LaTeX that I've gone and unintentionally overlapped here.


title: Draw an ellipse from the two focus points (foci) and the sum of the distances from foci to border

text: I have two nodes that I want and foci and I know what the sum of the distances should be (a constant times the distance between the focus nodes). The way I know of drawing ellipses takes as parameters the center point and the major and minor axis. I want to define another function (myellipse?) that takes as parameters the two nodes and the constant multiplier. This is how I'm drawing them currently, doing all calculations by hand (example not perfect):               \draw [rotate around={-15:(1.8,0.5)}] (1.8,0.5) ellipse (2 and 1);


title: Is it possible to make a reference to a subfigure to appear Figure 2(a) with cleveref?

text: I am new here, and also new to LaTeX, so apologies if I have included too much or too little! I have been using the `subfig` package, and just today added in `cleveref`. The subfig package labels my subfigures (a), (b) etc, and I have been using the `\subref` command to make the same appear in the text. However, using `\cref` (or even `\ref`) in the text to refer to the figure number as well as subfigure letter, there are no parentheses. I would like my output to appear > figure 2(a) But instead it appears > figure 2a I have been searching a while online, but I can't see how to do this. I see here that someone has had the opposite problem and needed to get rid of unwanted parentheses. I can't work out what I have done relative to what he's doing other than that I am using subfig. Thanks in advance! Here's my code (more or less)               \documentclass{article}          \usepackage{graphicx}      % needed for including graphics e.g. EPS, PS     \usepackage{epstopdf}      % automatic conversion     \usepackage{grffile}       % allow fullstops in graphics file names     \usepackage[format=hang,singlelinecheck=0,font={sf,small},labelfont=bf]{caption, subfig}                               % allow subfigures     \usepackage[noabbrev]{cleveref}      % reference object types automatically          \graphicspath{{figures/}}          \begin{document}          Here is some text and a figure          \begin{figure}            \begin{minipage}[tbh]{\linewidth}         \centering         \captionsetup{justification=raggedright}              \subfloat[text]{\label{fig:1a}\includegraphics{file1.eps}}\qquad         \subfloat[text]{\label{fig:1b}\includegraphics{file2.eps}}\qquad                   \subfloat[text]{\label{fig:1c}\includegraphics{file3.eps}}\qquad         \subfloat[text]{\label{fig:1d}\includegraphics{file4.eps}}\qquad            \end{minipage}            \caption{\subref{fig:1a} to \subref{fig:1b} are plotted against height, and \subref{fig:1c} to \subref{fig:1d} against pressure}       \label{fig:1}          \end{figure}          Now I'd like to refer to the figure \ref{fig:1d}. And use cref: \cref{fig:1d}          \end{document}


title: Adding arrows on 3D curves in Asymptote

text: I am trying to plot (1D) trajectories in 3D with Asymptote (because I am also plotting surfaces with opacity and do not want to use hacks for hidden surfaces). Each curve is defined by points in an external `csv` file. The following minimal example for one curve works properly (given a `data.csv` file of course):               \documentclass[margin=1cm]{standalone}     \usepackage{asymptote}          \begin{document}     \begin{asy}     settings.outformat="pdf";     settings.prc=false;     settings.render=0;          import graph3;     currentprojection=orthographic(1,-2,4);     currentlight=(1,-1,1);     size3(200,200,80,IgnoreAspect);          file in=input("data.csv").line().csv();     real[][] a=in.dimension(0,0);     a=transpose(a);          real[] x=a[0];     real[] y=a[1];     real[] z=a[2];          draw(graph(x,y,z),blue,currentlight);          xaxis3(XY()*"$x_1$",Arrow3);     yaxis3(XY()*"$x_2$",Arrow3);     zaxis3("$y$",Arrow3);     \end{asy}     \end{document}      Now, I would like to add arrows on the curve to show the direction of the trajectory. It seems if the trajectory was a `path`, I could do it quite easily using something such as `draw(pathname,Arrow(Relative(0.7)));`. But I can't manage to "convert" my graph as a curve to do so. Any ideas how I could add arrows? I cannot manage to plot arrows on the curves.


title: algorithmicx no listofalgorithms in contents section

text: So I'm using **algorithmicx** to define some algorithms. It looks great, but I have one problem. When I use `\listofalgorithms` a page is created with the captions and links to the algorithms. However, there is no "List of algorithms" section in the contents section of the document. "List of tables" and "List of figures" are there just as expected. Any ideas on why?


title: Interword Spacing in XeTeX is not functioning (Fontdimen)

text: in Default Lyx PDF output, (I presumed it is pdflatex), I used `fontdimen2/3/4` to control the interword space, stretch and shrink. In a project, I had to use XeTeX for a particular font. However, the `fontdimen2/3/4` doesn't work on the regular text anymore under XeTeX. Only works on `fancyhdr`. My Preamble as regards to the text sizes are following:                %Set word space     \usepackage{everysel}     \EverySelectfont{%     \fontdimen2\font=0.15em% interword space       \fontdimen3\font=0.15em% interword stretch       \fontdimen4\font=0.1em% interword shrink     }          %set font size     \renewcommand{\normalsize}{\fontsize{8pt}{8.5pt}\selectfont}     \renewcommand{\large}{\fontsize{20pt}{21pt}\selectfont}      In order to test the functioning, I set all `fontdimen` to 0, as you observed in the following example, only the `fancyhdr` is affected. the font I am using is Van Dijck MT Std with Old Style Figures on. ![fontdimen to 0](http://i.stack.imgur.com/heE1d.png)


title: Emphasize (color) contents between two delimiters in listings, but not the delimiters themselves

text: I want to typeset some LaTeX source code by listings. I've tried this:               \documentclass{article}     \usepackage{listings}     \usepackage{xcolor}     \lstset{         delim = [s][\ttfamily\color{orange}]{$}{$}     }     \begin{document}     \begin{lstlisting}     \documentclass{article}     \usepackage{amsmath}     \begin{document}     $E = mc^2$     \end{document}     \end{lstlisting}     \end{document}      ![enter image description here](http://i.stack.imgur.com/VFq3G.png) The equation turns orange. However, the two dollar signs are also highlighted as orange. If I just want contents in the two dollar signs turns orange, what should I do?


title: Texmaker home/end keys on Mac OS X

text: In Mac OS X, the home/end keys per default throw you at the beginning/end of the document instead of the beginning/end line. I have changed my system key bindings to get the latter, "usual" (Windows- and Linux-like) behavior. However, texmaker seems to ignore this setting. It is horribly distracting when I have to search for my editing position in a longer text each time after unconsciously hitting the end key. I did not find these commands in the "configure texmaker" dialog. Is there a way to persuade texmaker to respect the system key bindings, or can I modify the setting in texmaker individually?


title: Duplicate an environment

text: How can I duplicate an environment? I want to create an environment which is almost exactly equal to another environment. I just want to change the heading. Right now I use               \renewcommand{\abstractname}{Acknowledgements}     \begin{abstract}         Thanks     \end{abstract}      but I want the exact same output just with               \begin{acknowledgements}         Thanks     \end{acknowledgements}


title: change the footnote's length (increase footnotes right margin)

text: I'm using Book (KOMA-Script), By default, the footnote runs roughly from left margin to the right margin of the page, I used the following to control the left margin:               \deffootnote[8em]{8em}{8em} {\textsuperscript{\thefootnotemark}}      Result is as following: ![right margin](http://i.stack.imgur.com/7ecj2.png) I wondered if there is a way to control the right margin of the footnote? or in another word, the length of the footnote itself? i.e. 2em spacing to the right margin of the page?


title: Is there any solution for highlighting text in CJK?

text: Is there any solution for highlighting texts or sentences in Chinese, Japanese, and Korean? I know none, at the moment. But this will be changed, if someone would like to help me with CJK in LaTeX. Problems:   1. If CJK text is highlighted by `soul` or other codes based on it, the highlight doesn't work at all.  eg: Cool Text Highlighting in LaTeX I tried:              \documentclass[nofonts]{ctexbook}     \setCJKmainfont{SimSun}          \usepackage{soul}     \usepackage{tikz}     \usetikzlibrary{calc}     \usetikzlibrary{decorations.pathmorphing}          \makeatletter          \newcommand{\defhighlighter}[3][]{%       \tikzset{every highlighter/.style={color=#2, fill opacity=#3, #1}}%     }          \defhighlighter{yellow}{.5}          \newcommand{\highlight@DoHighlight}{       \fill [ decoration = {random steps, amplitude=1pt, segment length=15pt}             , outer sep = -15pt, inner sep = 0pt, decorate             , every highlighter, this highlighter ]             ($(begin highlight)+(0,8pt)$) rectangle ($(end highlight)+(0,-3pt)$) ;     }          \newcommand{\highlight@BeginHighlight}{       \coordinate (begin highlight) at (0,0) ;     }          \newcommand{\highlight@EndHighlight}{       \coordinate (end highlight) at (0,0) ;     }          \newdimen\highlight@previous     \newdimen\highlight@current          \DeclareRobustCommand*\highlight[1][]{%       \tikzset{this highlighter/.style={#1}}%       \SOUL@setup       %       \def\SOUL@preamble{%         \begin{tikzpicture}[overlay, remember picture]           \highlight@BeginHighlight           \highlight@EndHighlight         \end{tikzpicture}%       }%       %       \def\SOUL@postamble{%         \begin{tikzpicture}[overlay, remember picture]           \highlight@EndHighlight           \highlight@DoHighlight         \end{tikzpicture}%       }%       %       \def\SOUL@everyhyphen{%         \discretionary{%           \SOUL@setkern\SOUL@hyphkern           \SOUL@sethyphenchar           \tikz[overlay, remember picture] \highlight@EndHighlight ;%         }{%         }{%           \SOUL@setkern\SOUL@charkern         }%       }%       %       \def\SOUL@everyexhyphen##1{%         \SOUL@setkern\SOUL@hyphkern         \hbox{##1}%         \discretionary{%           \tikz[overlay, remember picture] \highlight@EndHighlight ;%         }{%         }{%           \SOUL@setkern\SOUL@charkern         }%       }%       %       \def\SOUL@everysyllable{%         \begin{tikzpicture}[overlay, remember picture]           \path let \p0 = (begin highlight), \p1 = (0,0) in \pgfextra             \global\highlight@previous=\y0             \global\highlight@current =\y1           \endpgfextra (0,0) ;           \ifdim\highlight@current < \highlight@previous             \highlight@DoHighlight             \highlight@BeginHighlight           \fi         \end{tikzpicture}%         \the\SOUL@syllable         \tikz[overlay, remember picture] \highlight@EndHighlight ;%       }%       \SOUL@     }     \makeatother          \begin{document}      本条所说的三日期间与第98条规定的三日期间在计算上采同样的规则（请参考第98条的释义部分），期间的开始均不是以扣押命令的发出为标准，而是以扣押的生效为准。\highlight[red]{对邮件的扣押，以邮政服务机构收到扣押命令，邮件开始处于被截留的状态，视为扣押的生效（Pfeiffer S471 Rn4）}，期间由此开始。期间的开始计算同样适用第42条的规定。      但与第98条不同的是，第98条的三日期间只是向法官提出追认照准的申请的期间，而本条则是收到法官追认照准的期间。邮政服务机构如果在三日内没收到法官的追认，检察官的扣押命令失效，毋需再向检察官交出邮件。但邮件如果已经被交出的，则暂时不被返还，仍可保留在检察官处。如果在三日期满后法官又追认照准的，视为法官作出了新的扣押命令（Meyer-Goßner S325 Rn7）。      \highlight[red]{如果法官在三日内不予照准的呢？如果在三日内没有追认，在三日后也没有作出追认的？如果法官在三日后作出不予照准的呢？六种情况}      \end{document}      TeX reported:              Package soul Error: Reconstruction failed.     See the soul package documentation for explanation.      If I ignore these errors and compile the TeX file, the highlighted texts became black squares. ![enter image description here](http://i.stack.imgur.com/XbpoD.jpg)   2. If CJK text is highlighted by some code based on soul, the highlight works, but the text can not be broken across lines, and they are all in one line beyond the edge of pages. eg:              \documentclass[nofonts]{ctexbook}     \setCJKmainfont{SimSun}          \usepackage{soul}     \usepackage{tikz}     \newcommand*{\yellowhl}[1]{%     \tikz[baseline]\node[rectangle, fill=yellow, rounded corners, inner sep=0.3mm,anchor=base]{#1};%     }          \begin{document}     本条所说的三日期间与第98条规定的三日期间在计算上采同样的规则（请参考第98条的释义部分），期间的开始均不是以扣押命令的发出为标准，而是以扣押的生效为准。\yellowhl{对邮件的扣押，以邮政服务机构收到扣押命令，邮件开始处于被截留的状态，视为扣押的生效（Pfeiffer S471 Rn4）}，期间由此开始。期间的开始计算同样适用第42条的规定。     但与第98条不同的是，第98条的三日期间只是向法官提出追认照准的申请的期间，而本条则是收到法官追认照准的期间。邮政服务机构如果在三日内没收到法官的追认，检察官的扣押命令失效，毋需再向检察官交出邮件。但邮件如果已经被交出的，则暂时不被返还，仍可保留在检察官处。如果在三日期满后法官又追认照准的，视为法官作出了新的扣押命令（Meyer-Goßner S325 Rn7）。     \yellowhl{如果法官在三日内不予照准的呢？如果在三日内没有追认，在三日后也没有作出追认的？如果法官在三日后作出不予照准的呢？六种情况}     \end{document}      ![enter image description here](http://i.stack.imgur.com/piYvR.jpg) Crying for help: does anyone know how to solve it?


title: Breakable fill-in blanks

text: What is a good way to create blank space (preferably, underlined -- it is to be filled in by hand when document is printed) that takes up all the remaining space on a line. The blank space may appear at the beginning, in the middle or at the end of the line; it may also occupy the whole line. I would appreciate a solution that survives changing the font and font size of surrounding text, as well as the size of page and page margins. **UPDATE** : I am looking for a solution with Knuth's TeX and plain TeX. **UPDATE 2** : I find egreg's suggestion that blanks have a minimum length a good one. However, in this case it would be very convenient if blanks can be broken across lines (automatically, of course) in cases where the blank is too long to fit on current line and has to be broken up either because it is longer than the line or because text on that line is too short and would result in an underfull box if left alone. **UPDATE 3** : Types of fill-in blanks I need: 1) unbreakable blanks of a specified fixed length; (egreg already provided an elegant solution to this case here) 2) breakable blanks of a specified fixed length; 3) breakable blanks no shorter than a specified minimum length. These are the same as type 2 blanks except that the last part of a broken blank (or the whole blank when it is not broken) should expand and take up all the available space on its line (like `\hrulefill`).


title: Biblatex sentence case and math mode not working together

text: Short version: _how can I get maths/subscripts working with title case in biblatex without errors?_ * * * This question and its answer describe making sentence case titles using biblatex (handy when your .bib file is collated from multiple sources). The important part of the code is in my MWE below. Maths mode in article (etc.) titles is covered by this answer -- basically wrap the $math$ in an extra pair of braces. Combining the two leads to errors in my case:               \RequirePackage{filecontents}     \begin{filecontents*}{\jobname.bib}         @article{a_paper,             author = "N. E. Body and A. N. Other",             title = "An article about {Al}$_x${Ga}$_{1-x}${N}, {GaN}, {In}{$_x$}{Ga}{$_{1-x}$}{N} and other compounds with Annoying Names {$\omega$}",             journal = "Journal of tricky examples"         }     \end{filecontents*}     \documentclass{article}     \usepackage{biblatex}     \addbibresource{\jobname.bib}          %sentence case for biblatex     \DeclareFieldFormat{sentencecase}{\MakeSentenceCase{#1}}     \renewbibmacro*{title}{%       \ifthenelse{\iffieldundef{title}\AND\iffieldundef{subtitle}}         {}         {\ifthenelse{\ifentrytype{article}\OR\ifentrytype{inbook}%           \OR\ifentrytype{incollection}\OR\ifentrytype{inproceedings}%           \OR\ifentrytype{inreference}}           {\printtext[title]{%             \printfield[sentencecase]{title}%             \setunit{\subtitlepunct}%             \printfield[sentencecase]{subtitle}}}%           {\printtext[title]{%             \printfield[titlecase]{title}%             \setunit{\subtitlepunct}%             \printfield[titlecase]{subtitle}}}%          \newunit}%       \printfield{titleaddon}}          \begin{document}         Test the complete \texttt{.bib} file: \nocite{*}.         \printbibliography     \end{document}      (with thanks to Kurt) gives               ! Missing { inserted.     <to be read again>                         }     l.35 \end              {document}     ?      ! Missing } inserted.     <inserted text>                      }     l.35 \end              {document}     ?       and outputs: ![output of above MWE](http://i.stack.imgur.com/i2sWn.png) Note that without the braces around the first `$_{1-x}$` the subscript doesn't work, so they're definitely needed. The braces to protect the cases of the element symbols aren't the problem either - I get the same error without them (but then of course I get incorrect output). The `$\omega$` is error-free (as is the `$_x$` in fact). The issue seems to be braces within maths within braces. Despite the errors the output is fine, but I really don't want to be skipping over all errors in case of others, so _how can I get maths/subscripts working with title case in biblatex?_ A couple of requirements that got me to this point: I need the sentence case stuff, or hand edit 200+ entries to make them consistent - journal publishers' .bib output is inconsistent not just between journals but with a journal's own formatting. Obviously getting the subscripts correct in the titles is necessary. What's really odd is that I'm sure this was working until recently - I normally compile with a shell script that runs in batch mode but aborts on errors. Yesterday's edits on another machine didn't affect any of the relevant bib entries or the preamble, and it compiled fine.


title: Looking for an error

text: Let me thank those who have already replied to my request in this post. In particular Mr Lokstep who suggest me to rest this question in a new topic. actually I have the log file                   This is pdfTeX, Version 3.1415926-2.3-1.40.12 (MiKTeX 2.9) (preloaded format=latex 2012.1.15)  18 JAN 2012 13:47     entering extended mode     **examexemple.tex     (C:\Users\Utilisateur\Downloads\examexemple.tex     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar     abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,      croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga     lician, german, german-x-2009-06-19, greek, gujarati, hindi, hungarian, iceland     ic, indonesian, interlingua, irish, italian, kannada, kurmanji, lao, latin, lat     vian, lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerm     an, ngerman-x-2009-06-19, nynorsk, oriya, panjabi, pinyin, polish, portuguese,      romanian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swis     sgerman, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, u     senglishmax, welsh, loaded.     ("C:\Program Files\MiKTeX 2.9\tex\latex\base\book.cls"     Document Class: book 2007/10/19 v1.4h Standard LaTeX document class     ("C:\Program Files\MiKTeX 2.9\tex\latex\base\bk10.clo"     File: bk10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)     )     \c@part=\count79     \c@chapter=\count80     \c@section=\count81     \c@subsection=\count82     \c@subsubsection=\count83     \c@paragraph=\count84     \c@subparagraph=\count85     \c@figure=\count86     \c@table=\count87     \abovecaptionskip=\skip41     \belowcaptionskip=\skip42     \bibindent=\dimen102     )     ("C:\Program Files\MiKTeX 2.9\tex\latex\lipsum\lipsum.sty"     Package: lipsum 2011/04/14 v1.2 150 paragraphs of Lorem Ipsum dummy text     \c@lips@count=\count88     )     (C:\Users\Utilisateur\Downloads\titlesec.sty     Package: titlesec 2011/12/15 v2.10.0 Sectioning titles     \ttl@box=\box26     \beforetitleunit=\skip43     \aftertitleunit=\skip44     \ttl@plus=\dimen103     \ttl@minus=\dimen104     \ttl@toksa=\toks14     \titlewidth=\dimen105     \titlewidthlast=\dimen106     \titlewidthfirst=\dimen107     )     ("C:\Program Files\MiKTeX 2.9\tex\latex\titlesec\frame.tss"     File: frame.tss 2011/12/15     )     (C:\Users\Utilisateur\Downloads\examexemple.aux     ! Undefined control sequence.     l.2 \pgfsyspdfmark                        {pgfid1}{13209918}{54824933}     ? x      I would like to find the latex error. I apologize for the length of this code, I can't make it shorter.


title: Lengths and when to use them

text: There are many lengths in LaTeX. For instance, `\enskip`, `\enspace`, `\quad`, `\parskip`, `\smallskip`, ... Some of them are mostly used for vertical spacing, some others are mostly used for horizontal spacing, and perhaps some of them are used in both cases. I wonder whether there is a list that indicates the meaning and intended use of each length in LaTeX. By "intended use" I mean not only whether the length is vertical or horizontal, but in which circumstances it is a good practice to use that specific length.


title: Amsart: footnote for the author

text: Assume the following code:                   \usepackage{amssymb}           \usepackage{graphicx}   % if you want to include graphics files           \usepackage{amsmath}           \usepackage{amsthm}\begin{document}              \begin{document}                      % author information                 % first author                  \author{Author 1}            \address{University 1}            \email{email 1}                 % second author                 \author{Author 2}                 % the address where the research was carried out            \address{University 2}                 % current address, usually not needed because it is the same as the            % regular address                 \email{email 2}                 % title                 \title{Title}         \end{document}      How can I set a footnote to the authors (1 the the first and 2 to the second), such that at the end of the paper the number indicates which email address belongs to which author? For short I would like to have something like: Author 1^1 and at the end ^1 Email-address: email_1. Thanks for your help.


title: Getting Sweave code chunks to stay inside page margins?

text: Sometimes I get to make an R code chunk (in Sweave) which is longer then the margins of the page. Is there a way to force it to "go to the next line" once that happens? Here is a simple example of that happening:               \documentclass[a4paper]{article}          \usepackage{Sweave}          \DefineVerbatimEnvironment{Sinput}{Verbatim} {xleftmargin=2em,                                                   frame=single}     \DefineVerbatimEnvironment{Soutput}{Verbatim}{xleftmargin=2em,                                                   frame=single}     \title{Sweave with boxes}          \begin{document}     \maketitle          <<echo=FALSE>>=     options(width=60)     @          Here is an example of a code chunk followed by an output chunk,     both enclosed in boxes.          <<>>=     print(rnorm(99))     @               <<>>=     print("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")     @               \end{document}      And here is the resulting tex file:               \documentclass[a4paper]{article}          \usepackage{Sweave}     \usepackage{listings}          \DefineVerbatimEnvironment{Sinput}{Verbatim} {xleftmargin=2em,                                                   frame=single}     \DefineVerbatimEnvironment{Soutput}{Verbatim}{xleftmargin=2em,                                                   frame=single}          \lstset{breaklines=true}           \title{Sweave with boxes}          \begin{document}     \maketitle               Here is an example of a code chunk followed by an output chunk,     both enclosed in boxes.          \begin{Schunk}     \begin{Sinput}     > print(rnorm(99))     \end{Sinput}     \begin{Soutput}      [1]  0.36727922  0.25285078 -0.70328574  1.71655755      [5]  0.30473595 -0.11520852 -1.36801956  0.49911603      [9]  0.53733672 -1.26568069  0.33561173  0.93723468     [13]  2.41014561  0.09806442 -1.34404921 -0.98648477          [85] -0.40756482 -1.39450719  0.59070374 -1.09769309     [89] -1.43169931  0.87022380 -0.27047513  0.67547425     [93]  0.87007650 -0.08518324 -0.11001269 -0.91401310     [97]  0.25477667 -1.52641463  0.22896815     \end{Soutput}     \end{Schunk}               \begin{Schunk}     \begin{Sinput}     > print("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")     \end{Sinput}     \begin{Soutput}     [1] "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"     \end{Soutput}     \end{Schunk}                                   \end{document}      Update, here is a simpler tex situation that I would just as well like to solve:               \begin{Schunk}     \begin{Soutput}     Some Table          Model 1: SCIM_2_total ~ (I(AMS_2_total^3) + I(AMS_2_total^2) + AMS_2_total) + fox     Model 2: SCIM_2_total ~ (I(AMS_2_total^2) + AMS_2_total) + fox          \end{Soutput}     \end{Schunk}


title: Top-aligned subfigure with bottom-aligned caption

text: This is a follow-up to an earlier question regarding left-aligning subfigure captions. Having achieved the left-alignment goal, I would now like the _caption_ of the subfigure to be bottom-aligned, while having the subfigure itself be top- aligned. As an example, in the figure below, subfigures (a) and (b) would share an uppermost edge, and their captions would share a lowermost edge, and similarly for subfigures (c) and (d). This is most appropriate for the overall layout style of my document and also the content of the subfigures themselves. ![enter image description here](http://i.stack.imgur.com/M01CH.png)               \documentclass{article}     \usepackage[font=footnotesize]{subcaption}     \usepackage[draft]{graphicx}          \begin{document}     \begin{figure}[!ht]     \captionsetup[subfigure]{justification=justified,singlelinecheck=false}     \centering     \begin{subfigure}[b]{0.3\textwidth}     \includegraphics[scale=0.8]{fig/workflow-S}     \caption{workflow $S$}     \end{subfigure}     \begin{subfigure}[b]{0.5\textwidth}     \includegraphics[scale=0.8]{fig/workflow-S-run}     \caption{run of $S$}     \end{subfigure}     \vskip 8pt     \begin{subfigure}[b]{0.3\textwidth}     \includegraphics[scale=0.8]{fig/workflow-S'}     \caption{workflow $S'$}     \end{subfigure}     \begin{subfigure}[b]{0.5\textwidth}     \includegraphics[scale=0.8]{fig/workflow-S'-run}     \caption{run of $S'$}     \end{subfigure}     \caption{Here's a figure}     \end{figure}     \end{document}      I've experimented with the `minipage` settings for `subfigure`, specifically using `[t]` instead of `[b]`, but it seems to have no effect. I'm unsure as to whether a position of `[t]` would produce the right effect anyway, or whether it would shift the captions up as well. Why is `[t]` not working here, and what's the right way to produce the layout I need? _The solution should generalise to an arbitrary number of subfigures per row, subfigures which are text or tables rather than images, and should not require any hard-coded sizes._


title: How to obtain "correct" Roman Numerals in ToC

text: I'm currently writing my second thesis template for LyX 2.0.6 under MiKTeX 2.9, and since I'm using the `article` document class I have to manually organize the page numbering inside the ToC, LoF, LoT et similia. Thanks to `fancyhdr` I had no problems for the specific page number typesetting on the document body, which will be shown in the MWE; but when I began to organize my ToC formatting I encountered an issue that required this kind of help. My goal is to obtain the Roman numbering for the pseudo-`frontmatter` inside the ToC without selecting `pagenumbering{Roman}`, because I want to use the Small Caps font selection. The MWE is as follows:               \documentclass[11pt,twoside,british,italian]{article}     %     \usepackage[T1]{fontenc}     \usepackage{fancyhdr}     \pagestyle{fancy}     \usepackage{babel}     \usepackage{lipsum}     %     \makeatletter     %     % define the page style, note \pagestyle{fancy} already in the preamble     \renewcommand{\sectionmark}[1]{\markboth{Sezione\ \thesection.\ #1}{}}     \renewcommand{\subsectionmark}[1]{\markright{#1}}     \fancyhf{}     \fancyhead[RE]{\nouppercase{\slshape \leftmark}}     \fancyhead[LO]{\nouppercase{\slshape \lastrightmark}}     \fancyhead[LE,RO]{\itshape \thepage}     \renewcommand{\headrulewidth}{0.4pt}     \renewcommand{\footrulewidth}{0pt}          % create new \fancypagestyles in respect to short sections     \usepackage{slantsc}     \usepackage{extramarks}      %     \fancypagestyle{plain}{%     \fancyhf{}      \fancyfoot[CE,CO]{\slshape{\scshape \thepage}}  % Page numbers with my defined style     \renewcommand{\headrulewidth}{0pt}%     }     \fancypagestyle{nonTOCplain}{%     \fancyhf{}      \fancyhead[LE,RO]{\itshape \thepage}     \renewcommand{\headrulewidth}{0pt}%     }     \fancypagestyle{TOCplain}{%     \fancyhf{}      \fancyhead[RE]{\nouppercase{\slshape \leftmark}}     \fancyhead[LO]{\nouppercase{\slshape \lastrightmark}}     \fancyhead[LE,RO]{\slshape{\scshape \thepage}}  % Page numbers with my defined style     \renewcommand{\headrulewidth}{0.4pt}%     }     %      % the pages of the ToC/LoF/LoT are numbered Lowercase Roman      \let\myTOC\tableofcontents     \renewcommand\tableofcontents{%      \pagenumbering{roman}   % I don't want "Roman" because there are too big letters!      \thispagestyle{plain}      \myTOC%     }     %     \makeatother     %     \begin{document}     %     \thispagestyle{plain}     \addcontentsline{toc}{section}{Indice Generale}     \tableofcontents{}     \clearpage{}     %     \thispagestyle{TOCplain}     \cleardoublepage{}     %     \thispagestyle{TOCplain}     \addcontentsline{toc}{section}{Elenco delle Figure}     \listoffigures     \clearpage{}     %     \thispagestyle{TOCplain}     \cleardoublepage{}     \pagenumbering{arabic}     %     \thispagestyle{nonTOCplain}     \section{Introduzione}     \lipsum[1]     %     \cleardoublepage{}     %     \thispagestyle{nonTOCplain}     \section{Prima sezione }     \lipsum[3]     \subsection{Prima sottosezione }     \lipsum[3]     %     \end{document}      As it is complied, _the frontmatter pages have slanted small caps roman numerals_ : > ![enter image description here](http://i.stack.imgur.com/Yp4Zr.png) but inside the ToC they appear _only lowercase upright roman_ : > ![enter image description here](http://i.stack.imgur.com/1c7OF.png) My question so remains on _how to obtain the document body number style inside the ToC_ , maybe using this imaginary command:               \newcommand*\ToCpagefont{\bfseries\scshape}  % roman-smallcaps-bold page number      Although I tried `tocloft` with the useful command:               \usepackage{tocloft}     \renewcommand*{\cftsecpagefont}{\uppercase\bfseries}      it gives me only undefined control sequences, and I think it is more reliable if every element inside the ToC formatting was adapted to this package; since I **don't use it** I'd like to know if there is some sort of solution to this starts-to-wear-me-off issue. * * * EDIT: Here is the MWE with addition of `Hyperref`:               \documentclass[11pt,twoside,british,italian]{article}     %     \usepackage[T1]{fontenc}     \usepackage{fancyhdr}     \pagestyle{fancy}     \usepackage{babel}     \usepackage{lipsum}     %     \usepackage[unicode=true,     bookmarks=true,bookmarksnumbered=true,bookmarksopen=false,     breaklinks=false,pdfborder={0 0 1},backref=false,colorlinks=true]     {hyperref}     %     \makeatletter     %     % define the page style, note \pagestyle{fancy} already in the preamble     \renewcommand{\sectionmark}[1]{\markboth{Sezione\ \thesection.\ #1}{}}     \renewcommand{\subsectionmark}[1]{\markright{#1}}     \fancyhf{}     \fancyhead[RE]{\nouppercase{\slshape \leftmark}}     \fancyhead[LO]{\nouppercase{\slshape \lastrightmark}}     \fancyhead[LE,RO]{\itshape \thepage}     \renewcommand{\headrulewidth}{0.4pt}     \renewcommand{\footrulewidth}{0pt}          % create new \fancypagestyles in respect to short sections     \usepackage{slantsc}     \usepackage{extramarks}      %     \fancypagestyle{plain}{%     \fancyhf{}      \fancyfoot[CE,CO]{\slshape{\scshape \thepage}}  % Page numbers with my defined style     \renewcommand{\headrulewidth}{0pt}%     }     \fancypagestyle{nonTOCplain}{%     \fancyhf{}      \fancyhead[LE,RO]{\itshape \thepage}     \renewcommand{\headrulewidth}{0pt}%     }     \fancypagestyle{TOCplain}{%     \fancyhf{}      \fancyhead[RE]{\nouppercase{\slshape \leftmark}}     \fancyhead[LO]{\nouppercase{\slshape \lastrightmark}}     \fancyhead[LE,RO]{\slshape{\scshape \thepage}}  % Page numbers with my defined style     \renewcommand{\headrulewidth}{0.4pt}%     }     %      % the pages of the ToC/LoF/LoT are numbered Lowercase Roman      \let\myTOC\tableofcontents     \renewcommand\tableofcontents{%      \pagenumbering{roman}   % I don't want "Roman" because there are too big letters!      \thispagestyle{plain}      \myTOC%     }     %     \makeatother     %     \begin{document}     %     \thispagestyle{plain}     \addcontentsline{toc}{section}{Indice Generale}     \tableofcontents{}     \clearpage{}     %     \thispagestyle{TOCplain}     \cleardoublepage{}     %     \thispagestyle{TOCplain}     \addcontentsline{toc}{section}{Elenco delle Figure}     \listoffigures     \clearpage{}     %     \thispagestyle{TOCplain}     \cleardoublepage{}     \pagenumbering{arabic}     %     \thispagestyle{nonTOCplain}     \section{Introduzione}     \lipsum[1]     %     \cleardoublepage{}     %     \thispagestyle{nonTOCplain}     \section{Prima sezione }     \lipsum[3]     \subsection{Prima sottosezione }     \lipsum[3]     %     \end{document}


title: Visualize bibliography entry process of biblatex

text: I'm currently working on modifying the `verbose` `biblatex` style to my needs. In order to find out what's going on and to find the definitions I need to modify, I've been digging through a number of files, climbing higher and higher in the "hierarchy": From `verbose.bbx` to `authortitle.bbx` to `standard.bbx` to `biblatex.def` to `biblatex.sty`. Since it's pretty troublesome to find out and remember what comes from where, I've been wondering if there is a way to visualize the various levels of definition of a bibliography. What I have in mind is a bibliography with some entries of different entry types, but instead of actual bibliographic information, only the way the different fields are definied in the various files is displayed, perhaps with different colors, depending on which file definied the current bit, e.g. the variable that eventually outputs a comma after the author. This way, it'll hopefully be easier to understand how a bibliography entry ends up being as it is and to find out what might need to be changed. I guess in the end, it would be exactly what happens when `\printbibliography` is processed during the multiple compilation: All variables from the various files replaced by their definitions except for the actual bibliographic information, but without any commands being excecuted, just the code being printed. I hope my CS-ignorant description is somewhat clear; if not, I can try to come up with an example of what I mean.


title: Identifying unique entries in similar bibtex bibliography files

text: How does one identify the unique bibliographic entries in a pair of substantially overlapping bibtex bibliography files? For instance, suppose bib file `a.bib` has the following entries:                   @article{red                 ...}         @article{blue                 ...}         @article{green                 ...}      And bib file `b.bib` has the following entries                   @article{green                 ...}         @article{red                 ...}         @article{yellow                 ...}      How might I quickly extract bib entries blue (unique to a.bib) and yellow (unique to b.bib)?


title: Can latexmk be told to ignore specific intermediate files completely?

text: One `latex` run suffices to generate the DVI/PDF version of the LaTeX document               \documentclass{article}          \usepackage{comment}          \includecomment{comment}          \begin{document}          \begin{comment}       \noindent       Test     \end{comment}          \end{document}      By contrast, `latexmk` thinks that two `latex` runs are necessary. The reason for this is the following: Since comments are to be included the `comment` environment writes its content to an intermediate file (by default `comment.cut`). `Latexmk` treats `comment.cut` similar to other intermediate files (such as the `toc` and `lof` files) and thus provides for another `latex` run. What `latexmk` misses is that `comment.cut` is input right at the end of the `comment` environment and that it’s useless afterwards. Hence, the second `latex` run is superfluous. Does anybody know whether it’s possible to configure `latexmk` such that it completely ignores specific intermediate files?


title: No tracking with Microtype + russian babel + mathdesign

text: I'm trying to compile the following code based on "more realistic example" from microtype.sty manual, Sect. 5.3. It works without babel (or with, say, french option) or without mathdesign. But with both them present, I get equal tracking for all 3 input lines. How can it be fixed?               \documentclass[10pt]{book}     \usepackage[russian]{babel}     \usepackage[T2A]{fontenc}          \usepackage[mdbch,expert]{mathdesign}          \usepackage[babel=true,tracking=true]{microtype}     \DeclareMicrotypeSet*[tracking]{my}        { encoding = *,          size     = {-small,Large-},          font     = */*/*/sc/* }     \SetTracking[ no ligatures = f ]{ encoding = *, shape = sc}{ 100 }     \SetTracking{ encoding = *, size = -small }{  800 }     \SetTracking{ encoding = *, size = Large-  }{ -100 }          \begin{document}          \textsc{this is a test}  $abcd$          {\footnotesize this is a test}          {\Large this is a test}          \end{document}


title: help me write verbatim

text: I'm trying to write `HMX_Y`, and because someone out there (mr. or ms. TeX) thinks this is a math notation, I have to use verbatim function to convince him (or her) otherwise. So far I've been using `examplep` package and the command `\Q{HMX_Y}`. However I would like the text to be in the same style and font as the rest of the document (and not in typewriter style). Any tips how to do this? This is the line where I'm trying to set the fonts to normal (as `examplep` documentation suggests) but I must be doing something wrong (as it's not working).               \usepackage[Q=yes, url=yes, source-verbatimfont=normalfont]{examplep}      Any help much appreciated.


title: biblatex: Is it possible to patch macros created with \newbibmacro?

text: > **This question led to a new feature in a package:**   >  `xpatch` The `etoolbox` package provides various tools that _"are useful to hook into or modify existing code"_ (`etoolbox` manual, section 3.4). The most important one is the `\patchcmd` command with the syntax               \patchcmd[<prefix>]{<command>}{<search>}{<replace>}{<success>}{<failure>}      which _"extracts the replacement text of a`<command>`, replaces [the first occurence of] `<search>` with `<replace>`, and reassembles the `<command>`"_. Other useful macros are, e.g., `\apptocmd` and `\pretocmd` which will append resp. prepend code to the replacement text of a command. The `biblatex` package features the commands `\newbibmacro`, `\renewbibmacro`, and `\providebibmacro` (plus their starred counterparts). These commands resemble `\newcommand`/`\renewcommand`/`\providecommand` " _except that [the command name] may contain characters such as numbers and punctuation marks and does not start with a backslash"_ (`biblatex` manual, section 4.6.4). The "bibmacros" defined this way may be executed via `\usebibmacro{<command name>}`. Is it possible to define a `\patchbibmacro` command that extracts and modifies the replacement text of macros created with `\newbibmacro` the same way `\patchcmd` does for macros created with `\newcommand`?


title: TiKZ drawing routine or function

text: Say I wanted to define a function in TiKz for drawing an eye:               \begin{tikzpicture}          %eye     \pgfmathsetmacro{\eyeSize}{1}     \pgfmathsetmacro{\ex}{0}     \pgfmathsetmacro{\ey}{1}     \pgfmathsetmacro{\eRot}{-10}     \pgfmathsetmacro{\eAp}{-55}     \draw[rotate around={\eRot:(\ex,\ey)}] (\ex,\ey) -- ++(-.5*\eAp:\eyeSize)          (\ex,\ey) -- ++(.5*\eAp:\eyeSize);     \draw (\ex,\ey) ++(\eRot+\eAp:.75*\eyeSize) arc (\eRot+\eAp:\eRot-\eAp:.75*\eyeSize);          % IRIS     \draw[fill=gray] (\ex,\ey) ++(\eRot+\eAp/3:.75*\eyeSize) % start point       arc (\eRot+180-\eAp:\eRot+180+\eAp:.28*\eyeSize);          %PUPIL, a filled arc      \draw[fill=black] (\ex,\ey) ++(\eRot+\eAp/3:.75*\eyeSize) % start point       arc (\eRot+\eAp/3:\eRot-\eAp/3:.75*\eyeSize);          \end{tikzpicture}      This is too long! How would I define a "function" in TiKz, so that I can call something `\eye( \ex, \ey, \rotation, \eyeAperture )` to produce an eye?


title: Insert video in latex

text: Please give latex code to insert a video in latex and hence video should be played in pdf. I wrote this               \documentclass[12pt,landscape]{article}     \usepackage{geometry}     \geometry{verbose,letterpaper}     \usepackage{movie15}     \usepackage{hyperref}     \begin{document}      Whispering-gallery mode in a quarter circle:     \begin{figure}[ht]      \includemovie[       poster,       text={\small(srs.mp4)}      ]{6cm}{6cm}{srs.mp4}     \end{figure}      It is compiling but when I open pdf it comes that "Pdf contains media which requires an additional player". What should I do to get it correct this error. Please tell


title: About the distance between the caption and the main body

text: I found that there is too much space between the caption of the figure and the main body. (The caption is below the figure). I don't know how to reduce the distance among them? the code I use now is as follows,               \begin{figure}[htbp]     \begin{center}     \includegraphics[width=8cm]{./Fig/ransac.eps}     \end{center}     \vspace{-4mm}     \caption{An illustration of a pair of mismatched images.}     \label{2_RANSAC}     \end{figure}      Does anyone know how to solve this?


title: Controlling text overflow when using \hfill to left- and right-align parts of title

text: I’m creating a template in plain (Xe)TeX which must have, in the first line, a location and reference number. The location is left-aligned and the reference number is right-aligned. (See example 1, below.) If both of these are short, I can just use:               {\it Location}: UK \hfill {\it Ref}: Xyz      However, if either of these are so long that TeX cannot fit them both into the same line, it overflows the reference number onto the next line (example 2). Usually this is the best way of dealing with the problem of too much text in one line but because of the way these documents will eventually look, it is not what I would like. What I’d prefer is for the first half to overflow onto the next line so that the reference number is always entirely on the first line (example 3). This would be relatively easy if the reference number was always static in size but it can change quite a lot (e.g. example 4). Is there an obvious way of doing this within plain TeX? I can't think of a good way of approaching this problem, short of putting the reference number in a box, calculating its size, subtracting that from the line width and putting the other number into a box of that width, which seems like quite a complex method. Any pointers as to a method gratefully received. Thanks! ![Examples](http://i.stack.imgur.com/PifGz.png)


title: Rules of thumb for size of binding correction (BCOR)

text: I was searching for this for a while now and I keep getting referred to an article about binding correction (probably in german) that seems to be offline. Another tip was to measure the horizontal distance across a double page for an already bound book with similar binding, paper thickness and number of pages. The difference of half this size and the actual paper dimensions can be used as a binding correction. Unfortunately, I don't have a similar book. I hope you guys can give me some good estimates how to calculate the binding correction. In my case the 'book' is a thesis of 120 pages (twoside, so actually about 60 pages) printed on 'typical printer paper' (I guess that's 80 g/m²). I don't known the English name for the binding I want to use, but it translates to 'clamp binding' and looks like this: ![enter image description here](http://i.stack.imgur.com/jHh6r.jpg)


title: Turn off line numbering in algorithm2e

text: I have the following preamble for `algorithm2e`:                  \usepackage[ruled,vlined,linesnumbered,resetcount,algochapter]{algorithm2e}      I have many algorithms, in on of the algorithm as follows:                \begin{algorithm}[t!]         \centering         nonumbering         \caption{CAmple}\label{algoCPOR}         \end{algorithm}      I do not want the line **nonumbering** (only that line) to be numbered, how should I achieve this?


title: creating beamer themes with options

text: Is it possible to create beamer themes that take options? I have three themes that are essentially the same yet each `beamertheme<name>.sty` overrides certain aspects of the inner, outer and color themes. I want to be able to do something like               \usetheme{mytheme}[default]      or               \usetheme{mytheme}[sidebar]      where some options of the theme change depending upon what you call. Is this possible? If so can someone point me to an example.


title: Drawing a simple line with tikz and remove the additonal horizontal space

text: In the following example I want to draw a simple line with tikz. It seems that the line produced a additional horizontal space left and right about `.5\pgflinewidth`. I tried `outer xsep=0pt` but with no result.               \documentclass{scrartcl}     \usepackage{tikz}     \tikzset{linestyle/.style={%           draw=red,%           line width=8ex,           }}%     \begin{document}     \centering     \fboxsep0pt     \fbox{\tikz\draw[use as bounding box,linestyle] (-1,1ex)--(4,1ex);}     \end{document}      How can I avoid the extra space? ![enter image description here](http://i.stack.imgur.com/pBlr0.png)


title: Special sectioning requirements

text: I'm writing a book chapter and the editor has some specific formatting requirements. In particular, he wants the section titles to be centered and not bold. I'm using `titlesec` with:               \titleformat{\section}       {\normalfont\fontfamily{cm}\fontsize{16}{19}\selectfont}{\thesection}{1em}{}      This ensures the section title is not bold. To make it centered, I did:               \titleformat{\section}       \centering{{\normalfont\fontfamily{cm}\fontsize{16}{19}\selectfont}{\thesection}}{1em}{}      However, this somehow ignores the fontsize, resulting in a unbolded, centered, but small font sized section title. How can I ensure the fontsize is larger, as indicated in the command?


title: Replace chars with xstring. Catcode problem

text: I try to do something like this (minimal example):               \documentclass[]{article}     \usepackage{mathtools}     \usepackage{xstring}          \newcommand{\foo}[1]{         \StrSubstitute{#1}{:}{\string&}[\fooo]         \StrSubstitute{\fooo}{-}{\string\\}[\fooo]         \tokenize{\fooo}{\fooo}         \fooo}               \begin{document}               \[\begin{matrix}         \foo{1:2-2:3}     \end{matrix}\]     \end{document}      But I it isn't working, for some reason this is working:               \documentclass[]{article}     \usepackage{mathtools}     \usepackage{xstring}          \begin{document}          \StrSubstitute{1:2-2:3}{:}{\string&}[\fooo]     \StrSubstitute{\fooo}{-}{\string\\}[\fooo]     \tokenize{\fooo}{\fooo}          \[\begin{matrix}         \fooo     \end{matrix}\]     \end{document}      Any Idea on this? I think this is related to catcodes... Maybe someone also has an explanation for this behavior?


title: How to make TikZ faster?

text: I have a long document containing plenty of TikZ figures and it is painfully slow to compile it. Is there any specific **TikZ** tips / good practices you could recommend me so that I can write figures that does not take too much time to be compiled? I am aware of the TikZ `external` library but it triggers dependency/recompilation problems that are difficult (IMHO) to solve. Also, the bigger the document is, the easier it is to overlook that one figure did not get recompiled as expected. Is there, for instance, parts of the TikZ API which are notoriously slow?


title: A part with sections and subsections but without chapters in ToC

text: My document consists of three parts. Parts 1 and 3 contain chapters and sections. Part 2 however is a bound in research paper, and as such only contains sections and subsections, however no chapters. I use the `hyperref` package, and in the Table of Contents everything is displayed fine. However the PDF reader interprets the first section, "Introduction and motivation", as chapter and all following sections as subsections thereof: ![table of content, PDF reader](http://i.stack.imgur.com/6o0Dy.png) How can I sort this out? The document class used is `amsbook`.


title: biblatex: why no comma after abbreviated shorttitle?

text: Sorry, this is only a minor question, but I just realised for the first time that when you cite a bibliographic item which has no shortitle, then -- using `style=verbose` -- you usually get (apart from the very first `fullcite`): > Name, _In Physica_ , p.12. When this item has an abbreviated `shorttitle` that ends with a `dot`, however, you get the following: > Name, _In Phys._ p.12. [No comma after shorttitle/before page!] I usually omit the "p." for "page", so my result is: > Name, _In Phys._ 12. I would like to get: > Name, _In Phys._ , 12. ## MWE               % !TEX TS-program = lualatexmk     \documentclass[12pt, a4paper, DIV=calc]{scrartcl}          \usepackage{fontspec}             \setmainfont[Ligatures=TeX]{Times New Roman}          \usepackage[    style=verbose,                 abbreviate=false,                 url=false,                 backrefstyle=three,                 backend=biber                     ]{biblatex}         \DeclareFieldFormat{postnote}{#1}       % postnotes without p. and pp.          \usepackage{filecontents}          \begin{filecontents}{\jobname.bib}         @book{without:shorttitle,         author = {Author W. Name},         year = {2000},         title = {In Physica},         publisher = {Publisher},         }     @book{with:shorttitle,         author = {Author W. Name},         year = {2000},         title = {In Physica},         shorttitle = {In Phys.},         publisher = {Publisher},         }     \end{filecontents}          \addbibresource{\jobname.bib}          \begin{document}          ''First citation without shorttitle.''\footcite[12]{without:shorttitle}          ''Second citation without shorttitle.''\footcite[12]{without:shorttitle}          ''First citation with shorttitle.''\footcite[12]{with:shorttitle}           ''Second citation with shorttitle.''\footcite[12]{with:shorttitle}           \end{document}


title: Can I have a dot and a double subscript at a single letter?

text: I cannot get a double subscript to a letter that has a dot on it. I only get what is in the first line of the picture, but what I want is the upper left with the dot only on the `v`. Note that the second `vkd` is not right. ![](http://i.stack.imgur.com/VIgr8.png) I use this code               \documentclass[a4paper,10pt]{article}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}          \begin{document}          % no errors here\dots     ${v_k}_d$     ${{\dot{v}}_{k_d}$     ${\dot{v_k}_d}$          % this does not work as I thought it should     ${{{\dot{v}}_k}}_d$     ${{\dot v}_k}_d$     ${\dot v_k}_d$          \end{document}      Any ideas?? **Follow up** As the comments have shown, there is some doubt that these double subscripts are really necessary. They may be hardly visible, but they flatter the eyes - as I think - and make reading more comfortable. The picture below is what I write in original size. This is also what the `\usepackage{microtype}` does. And, kerning doesn't bother you unless you know about it... Cf. this xkzd cartoon. ![](http://i.stack.imgur.com/1EABK.png)


title: How can I draw a curved gradient/fade in tikz?

text: I would like to draw something like the following diagram: ![enter image description here](http://i.stack.imgur.com/KEjCs.jpg) My problem is drawing the grey curved path that fades away. The direction of the fading continually changes so that it is always perpendicular to the path. How can I draw a curved fade like this in tikz?


title: How to include a latex document as layout example?

text: I would like to include a latex document in an other latex document as figure to give an example for an layout, that means, _the result_ of a latex document should be shown as, so to say a mini page in an other document:               This is a Title of my Main Document          This is some text in the document that talks about a layout and so on an        refers to a figure that should illustrate this talking (fig. 1).          +-------------------------+         |                         |         |   This is a latex       |         |   document, embedded    |         |   to the main document  |         |                         |         |                         |         |                         |         |                         |         |                         |         |                         |         |                         |         +-------------------------+          fig. 1      Is this possible?


title: Minion Pro Symbols

text: I searched the site but I couldn't find an answer. I'm trying to use Minion Pro. Some symbols don't seem good to me. Can you explain how to change them? (Maybe into `mathpazo` or better one.) ![enter image description here](http://i.stack.imgur.com/zgOqe.png)               \documentclass[12pt,a4paper]{article}%     \usepackage{amssymb}     \usepackage{amsmath}     \usepackage{amsthm}     \usepackage{amsfonts}     \usepackage{graphicx}     \usepackage[MnSymbol]{mathspec}     \setmainfont[Numbers={Lining,Proportional}]{Minion Pro}     \setmathsfont(Digits,Latin,Greek)[Numbers={Lining,Proportional}]{Minion Pro}          \begin{document}     These symbols don't seem good.     \begin{equation}     \sim\implies\leqslant\geqslant=<>\int\partial     \end{equation}     \end{document}


title: Highlight a group of nodes in a tikz tree

text: To make it simple, I want to highlight a group of tikz nodes like in the following picture ![](http://common.jle.cc/features/tree_highlight.png) It was borrowed from the JLatexEditor. I would like to know which Tikz commands I can use to do the job in order to automatize this task for several trees I have to make. It is important to keep the blending effect of colors like in node g. Here is the MWE also borrowed from JLatexEditor:               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{arrows,backgrounds,calc,trees}          \begin{document}     \thispagestyle{empty}          \begin{tikzpicture}     \node (f) {f}         child { node (g) {g}           child { node (a) {a}         }           child { node (b) {b}         }       }         child { node (h) {h}           child { node (c) {c}         }       };     \end{tikzpicture}          \end{document}


title: Luatex ligatures after \newpage

text: I am seeing some _very strange_ behavior with LuaLaTeX. It is hard to describe, so I will begin with a MWE:               \documentclass{book}          \usepackage{fontspec}     %\defaultfontfeatures{Ligatures={Common, TeX}}     \setmainfont{Adobe Garamond Pro}     %\setmainfont{Adobe Caslon Pro} % also fails          \begin{document}          \noindent     \textit{fianc\'ee} \\ % correct     {\itshape fianc\'ee}  % correct          \newpage          \noindent     \textit{fianc\'ee} \\ % wrong     {\itshape fianc\'ee}  % wrong          \newpage          \noindent     \textit{fianc\'ee} \\ % wrong     {\itshape fianc\'ee}  % wrong          \end{document}      This is the rendering of page 1: ![Page one](http://i.stack.imgur.com/LrgwM.png) And page 2: ![Page two](http://i.stack.imgur.com/xn7Ir.png) In the above, the fi ligature is correctly used on the first page, while on the 2nd and 3rd pages I get the two characters. I have tested it for both Garamond and Caslon. I do not get this error with xelatex. BTW to complicate things this does not happen in the upright case :) This is LuaTeX, Version beta-0.76.0-2014041116 (rev 4627)


title: Why do I get a bitmap font on one computer but a vector font on another for the same document?

text: I am generating a pdf using `pdflatex` from the same latex file on three different computers. The pdf is generated without any warnings on all three computers and it looks almost identical. The one difference is that on my work computer, vector fonts are used while on the other two computers, the pdf has bitmap fonts. All three machines are running a 13.04 Kubuntu and I'm using the latex packages from the distribution. On all three I simply use the default setting of `Kile` to generate the pdf. Clearly there must be some difference in how latex is setup on these machines. It's possible that I installed some additional packages on my work computer, but I am not sure where to look. So my question is, why does the same source result in two different PDFs? How do I make the other two computers also use vector fonts, and avoid the bitmap fonts, **without** modifying the latex source?


title: How to make a new environment behave like an existing environment? (Part 2: endnotes and comments)

text: In a previous post i mentioned my attempt to create an environment that behaves alternately like a footnote, an endnote or a comment (i.e. hidden). Thanks to the help of those who answered the above mentioned question, i am now able to define a new environment that behaves like the footnote environment by employing one of the following two technique:               \documentclass{article}     \usepackage{environ}     \NewEnviron{mynote}{\footnote{\BODY}}     \begin{document}     Hello\begin{mynote}world\end{mynote}     \end{document}      or equivalently               \documentclass{article}     \newenvironment{mynote}{\footnote\bgroup}{\egroup}     \begin{document}     Hello\begin{mynote}world\end{mynote}.     \end{document}      Unfortunately, what works for footnotes fails for endnotes and comments. The following two blocks of code (the first for endnotes using the second technique and the second for comments using the first technique), don't even compile.               \documentclass{article}     \usepackage{endnotes}     \newenvironment{mynote}{\endnote\bgroup}{\egroup}     \begin{document}     Hello\begin{mynote}world\end{mynote}.     \theendnotes     \end{document}          \documentclass{article}     \usepackage{comment}     \usepackage{environ}     \NewEnviron{mynote}{\begin{comment}\BODY\end{comment}}     \begin{document}     Hello\begin{mynote}world\end{mynote}     \end{document}      Why do the techniques that work for footnotes fail for endnotes and comments? What can i do about it?


title: Use custom brackets

text: For my thesis I need particular brackets for defining some operators. I found `\llceil`, `\rrceil`, `\llfloor` and `\rrfloor` in the `stmaryrd` package, which are just what I was looking for. Unfortunately, they do not support `\left` and `\right` and therefore they look very ugly with tall formulas. Probably they are not designed for such formulas. Is there a simple way to make them supporting `\left` and `\right` or to define other brackets that do support them?


title: Non-vertically-centered TikZ matrix of nodes cell content

text: How can you make the matrix cell contents aligned to the top? I am using plain format with XeTeX.               \input tikz     \usetikzlibrary{matrix}     $$\hbox{I'd like for the cells to be top-aligned}\cases{     \tikzpicture[       a/.style={draw=green!50!black,text width=3.5cm,         text height=1.5cm,text depth=1.5cm,minimum size=3.5cm,         anchor=base,         inner sep=0pt,outer sep=0pt},       m/.style={matrix of nodes,inner sep=2pt,outer sep=0pt,nodes=a,         ampersand replacement=\&,row sep=0pt,column sep=0pt,draw=black!50}       ]       \parindent0pt       \matrix[m] (mx) {         Hey, this is a node with a break\break and stuff\&         And another one with it. Milkshakes are yummy when the sun is shining\\         Let's see what happens; I'm trying to find the logic\&         Does it break when all these cells have different amount of text?\\       };       \draw[very thick,red!50] (mx.north)--(mx.south) (mx.west)--(mx.east);     \endtikzpicture     } \hbox{Yes it does}     $$     \bye      ![enter image description here](http://i.stack.imgur.com/4RiHM.png) After @Gonzalo's comment to change `text height`/`depth`:               \input tikz     \usetikzlibrary{matrix}     \tikzpicture[       a/.style={draw=green!50!black,text width=3.5cm,         text height=0pt,text depth=2.5cm,minimum size=3.5cm,         anchor=base,         inner sep=0pt,outer sep=0pt},       m/.style={matrix of nodes,inner sep=2pt,outer sep=0pt,nodes=a,         ampersand replacement=\&,row sep=0pt,column sep=0pt,draw=black!50}       ]       \parindent0pt       \matrix[m] (mx) {         Hey, this is a node with a break\break and stuff\&         And another one with it. Milkshakes are yummy when the sun is shining\\         Let's see what happens; I'm trying to find the logic\&         Does it break when all these cells have different amount of text?\\       };       \draw[very thick,red!50] (mx.north)--(mx.south) (mx.west)--(mx.east);     \endtikzpicture     \bye      ![enter image description here](http://i.stack.imgur.com/G4oPG.png)


title: PDF bookmarks according to figure titles or labels

text: I have dozens of figures that I am going to include in one PDF file using the following code combination:               % allpdfs.tex     \documentclass{article}     \usepackage{pdfpages}     \newcommand{\myimagelist}[2]{\includepdf[fitpaper=true]{#2}}          \begin{document}     \input{filelist}     \end{document}      where my filelist contains pdf figures and their locations:               % filelist.tex     \myimagelist{some label}{some path/pdffile1}     \myimagelist{some other label}{some path/pdffile2}     % ....      my question is, how do I modify first code to include bookmarks in PDF according to the titles or labels of the figures I am including in it?


title: Multiple equation numbers for a tikz picture

text: I am attempting to draw two related exact sequences in the same tikz picture, for alignment purposes. I currently have wrapped the tikzpicture environment in an equation environment, so that both have the same number. Ideally, I would like to have separate equation numbers; is there a way to do this?               \documentclass{amsart}     \usepackage{tikz}     \usetikzlibrary{matrix,arrows}     \newcommand\Z[2]{\ensuremath{\mathfrak  Z^{(#1)}_{#2}}}     \begin{document}        \begin{equation}           \begin{tikzpicture}              [description/.style={fill=white,inner sep=2pt},baseline=(current bounding box.center)]              \matrix (m) [matrix of math nodes, row sep=1em, column sep=1.5em, text height=1.5ex, text depth=0.25ex]              {              0 & \Omega^k_X                & \Z k k & \Z k {k-1} & \cdots & \Z k 1 & \Z k 0 & 0\phantom .\\              0 & \Lambda^k \mathcal E^\vee & \Z k k & \Z k {k-1} & \cdots & \Z k 1 & \Z k 0 & 0.\\              };              \foreach \a in {2,3,...,8} {              \pgfmathsubtract{\a}{1}              \draw[->] (m-1-\pgfmathresult) -- (m-1-\a);              \draw[->] (m-2-\pgfmathresult) -- (m-2-\a);              };           \end{tikzpicture}        \end{equation}     \end{document}


title: tikz: control text size and location

text: I am trying to create flowchart, using `tikz`:               \begin{document}          \tikzstyle{decision} = [diamond, draw, fill=blue!20, minimum size=2em, text badly centered,     node distance=2.5cm, inner sep=0pt]          \tikzstyle{block}    = [rectangle, draw, fill=blue!20, minimum size=2em, text centered, rounded corners, minimum height=4em]          \tikzstyle{line}     = [draw, very thick, color=black!50, -latex']          \tikzstyle{cloud}    = [draw, ellipse,fill=red!20, node distance=2.5cm, minimum height=2em]          \tikzstyle{circle}   = [draw, circle,fill=red!20, node distance=2.5cm, minimum height=2em]           \tikzstyle{start}    = [circle,draw,minimum size=1.2cm ,draw=blue!80, fill=blue!20,text centered]           \tikzstyle{decision answer}=[near start,color=black]           \begin{tikzpicture}[scale=2, node distance = 2cm, auto]           \tikzstyle{every node}=[midway,auto,font=\scriptsize, anchor=center]      \matrix [column sep=5mm,row sep=7mm]       {     \node [start] (start){start};\\     \node [block] (buff){Add new measurement, $y_k$ to buffer};\\       };           \end{tikzpicture}      \end{document}      I would like to present the text `Add new measurement, $y_k$ to buffer` in two lines. When I add `\\\` I get a LaTeX error. Using `text width=4.5em` causes the line to split, but not where I want and then the text is not centered any longer.


title: Image manipulation: What are the options?

text: What manipulations on imported images can be done from inside LaTeX? Using the `graphicx` package, I can   * Change image width and height   * Rotate image by a given angle   * Crop image   * Select specific page in image file (e.g., in a multi-page PDF) Are the other more advanced options? Things I would find useful include flipping an image, rendering it as B/W, or controlling resolution? Can I call an external program to do more advanced manipulation from LaTeX?


title: Beamer and verbatim sync

text: I'm preparing a `beamer` presentation to show some basic `TikZ` stuff. I would like to have a two columns slide, where on the left I have the TikZ figure, and on the right the generating code. BUT, I also want the code to be uncovered set by step, that is, whenever a feature of the figure is uncovered, I want the corresponding piece of code to be uncovered. Something like:               \begin{frame}[fragile]       \begin{minipage}{0.10\linewidth}         \begin{center}           \begin{tikzpicture}             \draw<1-> (-1.5,0) -- (1.5,0);              \draw<2-> (0,-1.5) -- (0,1.5);            \end{tikzpicture}         \end{center}       \end{minipage}       \begin{minipage}{0.85\linewidth}     \begin{verbatim}           \begin{tikzpicture}             \draw (-1.5,0) -- (1.5,0);              \draw (0,-1.5) -- (0,1.5);            \end{tikzpicture}     \end{verbatim}      \end{minipage}     \end{frame}      The problem is that I couldn't neither manage to use the `uncover` inside the `verbatim` nor use the `verbatim` inside an `uncover`... What is the right practice?


title: Minion Pro activate small caps for greek

text: According to otfinfo, greek small capitals are supported in Minion Pro.               otfinfo --script=grek -f MinionPro-Regular.otf          ...     smcp    Small Capitals     ...      yet the following MWE               \documentclass{article}     \usepackage{fontspec}     \setmainfont{Minion Pro}          \begin{document}     \textsc{Small Capitals}          \textsc{Πεζοκεφαλαία}     \end{document}      results in: ![enter image description here](http://i.stack.imgur.com/qt4OG.png) What option should I pass to fontspec in order to have small capitals with Minion Pro for greek Glyphs?