title: Spacing issue when using tocloft and fontspec together

text: I'm using tocloft for creating a List of Equations and I think there's no other way to avoid using this package. However, everytime when tocloft and fontspec from XeLaTeX are used together the spacings between the enumeration and title are messed up. Usually it should look like this:               10.9  Title     10.10 Title      When those two packages are used together it turns into this:               10.9 Title     10.10Title      I've found somekind of workaround, but it's kinda bad because it set's the spacing to a static value and it looks like:               10.9 Title     10.10 Title      Here's my example, you can test it by running Xelatex twice: `xelatex file.tex & xelatex file.tex`               \documentclass[a4paper,oneside,12pt]{report}     \usepackage{amsmath}          % ------------------------------------------------------------------------------          % if activated together with tocloft, the spacings between number and title in every "Table of __" are getting fucked up..     \usepackage{fontspec}          % ------------------------------------------------------------------------------          % TRY THIS          \usepackage[tocloftfix,headline={List of Equations}]{listofequations}          % OR          %\usepackage{tocloft}     %\newcommand{\listofequations}{\text{test}}     %\newcommand{\equationlist}[1]{\text{#1}}          % OR NOTHING          % ------------------------------------------------------------------------------          % Workaround: set space to static value, but looks bad because:     % 10.9 Title     % 10.10 Title          % instead of:     % 10.9   Title     % 10.10  Title          \makeatletter     % \renewcommand{\numberline}[1]{ \@cftbsnum #1\@cftasnum\hspace*{1em}\@cftasnumb }     \makeatother          % ------------------------------------------------------------------------------     \begin{document}          \newpage     \addcontentsline{toc}{chapter}{Table of Contents}     \tableofcontents     \newpage          \newpage     \addcontentsline{toc}{chapter}{List of Figures}     \listoffigures          \newpage     \addcontentsline{toc}{chapter}{List of Equations}     \listofequations          % ignore anything below this line -> just filler     % ------------------------------------------------------------------------------          \chapter{Title}     \section{Something}     \section{Another}     \section{Something}     \section{Another}     \section{Something}     \section{Another}     \section{Something}     \section{Another}     \begin{figure}     \caption[ToF]{Full}     \end{figure}     \begin{figure}     \caption[ToF]{Full}     \end{figure}     \begin{figure}     \caption[ToF]{Full}     \end{figure}     \begin{figure}     \caption[ToF]{Full}     \end{figure}     \begin{figure}     \caption[ToF]{Full}     \end{figure}     \begin{figure}     \caption[ToF]{Full}     \end{figure}     \begin{figure}     \caption[ToF]{Full}     \end{figure}     \begin{figure}     \caption[ToF]{Full}     \end{figure}     \begin{figure}     \caption[ToF]{Full}     \end{figure}     \begin{figure}     \caption[ToF]{Full}     \end{figure}     \begin{figure}     \caption[ToF]{Full}     \end{figure}     \begin{figure}     \caption[ToF]{Full}     \end{figure}     \begin{figure}     \caption[ToF]{Full}     \end{figure}     \section{Something}     \section{Another}     \section{Something}     \section{Another}     \section{Another}     \begin{equation}\label{eq:pythagoras}\equationlist{Tesst}     x^2 + y^2 = z^2     \end{equation}     Equation (\ref{eq:pythagoras}) is right there.     \chapter{Title2}     \section{Something}     \begin{equation}\equationlist{Test2}     x^2 + y^2 = z^2     \end{equation}     \begin{equation}\equationlist{Test2}     x^2 + y^2 = z^2     \end{equation}     \begin{equation}\equationlist{Test2}     x^2 + y^2 = z^2     \end{equation}     \begin{equation}\equationlist{Test2}     x^2 + y^2 = z^2     \end{equation}     \begin{equation}\equationlist{Test2}     x^2 + y^2 = z^2     \end{equation}     \begin{equation}\equationlist{Test2}     x^2 + y^2 = z^2     \end{equation}     \begin{equation}\equationlist{Test2}     x^2 + y^2 = z^2     \end{equation}     \begin{equation}\equationlist{Test2}     x^2 + y^2 = z^2     \end{equation}     \begin{equation}\equationlist{Test2}     x^2 + y^2 = z^2     \end{equation}     \begin{equation}\equationlist{Test2}     x^2 + y^2 = z^2     \end{equation}     \begin{equation}\equationlist{Test2}     x^2 + y^2 = z^2     \end{equation}     \begin{equation}\equationlist{Test2}     x^2 + y^2 = z^2     \end{equation}          \end{document}      and the self-made listofequations.sty:               %     %   List of Equations Package     %     %   Package by Simon Christmann, Credits to http://www.latex-community.org/forum/viewtopic.php?f=44&t=11649 and Google          % usage:      %   - \listofequations creates the index     %   - after every \begin{equation} declare name for ToE by \equationlist{text for index page}     %   - for \begin{aligned} and other math use  \equationlisttext after the environment's end     %   - specify your desired headline for this list via \usepackage[headline={Special Headline}]{listofequations}     % ----------------------------------------------------------------------     \NeedsTeXFormat{LaTeX2e}[1994/06/01]     \ProvidesPackage{listofequations}[2013/02/04 List of Equations]               % ----------------------------------------------------------     % Import packages     % ----------------------------------------------------------     \RequirePackage{tocloft}     \RequirePackage{kvoptions}          % ----------------------------------------------------------     % Define Parameters     % ----------------------------------------------------------     \DeclareStringOption[Equations]{headline}[List of Equations]     \DeclareBoolOption[false]{tocloftfix}          \ProcessKeyvalOptions* % process parameters that are created with kvoptions package          % ----------------------------------------------------------------------                    \iflistofequations@tocloftfix         \AtBeginDocument{ \renewcommand\@cftmakeequtitle{\chapter*{\listequationsname}} } % due to a bug in tocloft, style changes from \titleformat are not applied - this is just a workaround not a fix!     \fi          \newcommand{\listequationsname}{\listofequations@headline}     \newlistof{equations}{equ}{\listequationsname}     \newcommand{\equations}[1]{\addcontentsline{equ}{equations}{\protect\numberline{\theequation} #1}\par}     \newcommand{\equationlist}[1]{\text{\equations{#1}}}     \newcommand{\equationlisttext}[1]{\equations{#1}}      or download them from here: http://ablage.stabentheiner.de/2013-02-05_Archiv.zip Here's what \listfiles shows me:                *File List*       report.cls    2007/10/19 v1.4h Standard LaTeX document class       size12.clo    2007/10/19 v1.4h Standard LaTeX file (size option)     fontspec.sty    2013/05/20 v2.3c Font selection for XeLaTeX and LuaLaTeX        expl3.sty    2013/07/28 v4582 L3 Experimental code bundle wrapper      l3names.sty    2012/12/07 v4346 L3 Namespace for primitives     l3bootstrap.sty    2013/07/28 v4581 L3 Experimental bootstrap code         etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)     l3basics.sty    2013/07/28 v4581 L3 Basic definitions      l3expan.sty    2013/07/24 v4565 L3 Argument expansion         l3tl.sty    2013/07/28 v4581 L3 Token lists        l3seq.sty    2013/07/28 v4581 L3 Sequences and stacks        l3int.sty    2013/07/28 v4581 L3 Integers      l3quark.sty    2013/07/21 v4564 L3 Quarks        l3prg.sty    2013/07/28 v4581 L3 Control structures      l3clist.sty    2013/07/28 v4581 L3 Comma separated lists      l3token.sty    2013/07/28 v4581 L3 Experimental token manipulation       l3prop.sty    2013/07/28 v4581 L3 Property lists        l3msg.sty    2013/07/28 v4581 L3 Messages       l3file.sty    2013/07/28 v4581 L3 File and I/O operations       l3skip.sty    2013/07/28 v4581 L3 Dimensions and skips       l3keys.sty    2013/07/28 v4581 L3 Experimental key-value interfaces         l3fp.sty    2013/07/09 v4521 L3 Floating points        l3box.sty    2013/07/28 v4581 L3 Experimental boxes     l3coffins.sty    2012/09/09 v4212 L3 Coffin code layer      l3color.sty    2012/08/29 v4156 L3 Experimental color support     l3luatex.sty    2013/07/28 v4581 L3 Experimental LuaTeX-specific functions     l3candidates.sty    2013/07/24 v4576 L3 Experimental additions to l3kernel        ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)       xparse.sty    2013/07/28 v4582 L3 Experimental document command parser     fontspec-patches.sty    2013/05/20 v2.3c Font selection for XeLaTeX and LuaLaTe     X     fixltx2e.sty    2006/09/13 v1.1m fixes to LaTeX     fontspec-xetex.sty    2013/05/20 v2.3c Font selection for XeLaTeX and LuaLaTeX      fontenc.sty       eu1enc.def    2010/05/27 v0.1h Experimental Unicode font encodings       eu1lmr.fd    2009/10/30 v1.6 Font defs for Latin Modern     xunicode.sty    2011/09/09 v0.981 provides access to latin accents and many oth     er characters in Unicode lower plane      eu1lmss.fd    2009/10/30 v1.6 Font defs for Latin Modern     graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)       keyval.sty    1999/03/16 v1.13 key=value parser (DPC)     graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)         trig.sty    1999/03/16 v1.09 sin cos tan (DPC)     graphics.cfg    2010/04/23 v1.9 graphics configuration of TeX Live        xetex.def    2013/04/29 v0.96 LaTeX color/graphics driver for XeTeX (RRM/JK)          fontspec.cfg     listofequations.sty    2013/02/04 List of Equations      tocloft.sty    2013/05/02 v2.3f parameterised ToC, etc., typesetting     kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)      ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)     kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO)     infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)     etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)     ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)      amsmath.sty    2013/01/14 v2.14 AMS math features      amstext.sty    2000/06/29 v2.01       amsgen.sty    1999/11/30 v2.0       amsbsy.sty    1999/11/29 v1.2d       amsopn.sty    1999/12/14 v2.01 operator names        t3cmr.fd    2001/12/31 TIPA font definitions      ***********


title: How legend-entry can be possible in Tikz

text: I want to use legend-entry for straight line & dotted line.               \begin{figure}[htp]     {\small     \centering     \begin{tikzpicture}          \draw [color=black, fill=gray!50] ( 0.2 , 1.975 )-- ( 0.3 , 2.05 )-- ( 0.4 , 2.185 )-- ( 0.5 , 2.32 ) --( 0.5 , 2.2222 )-- ( 0.4 , 1.8 )-- ( 0.3 , 1.25 )--( 0.2 , 1.1111 )--cycle;     \draw (0.2,0) -- (10.3,0);          \draw (0.2,5.1) -- (10.3,5.1);          \draw (0.2,0)-- (0.2,5.1);          \draw (10.3,0)-- (10.3,5.1);     \draw ( 0.2 , 1.975 )-- ( 0.3 , 2.05 )-- ( 0.4 , 2.185 )-- ( 0.5 , 2.32 )-- ( 0.6 , 2.445 )-- ( 0.7 , 2.56 )-- ( 0.8 , 2.66 )-- ( 0.9 , 2.745 )-- ( 1.0 , 2.825 )-- ( 1.1 , 2.9 )-- ( 1.2 , 2.965 )-- ( 1.3 , 3.025 )-- ( 1.4 , 3.08 )-- ( 1.5 , 3.13 )-- ( 1.6 , 3.18 )-- ( 1.7 , 3.22 )-- ( 1.8 , 3.26 )-- ( 1.9 , 3.3 )-- ( 2.0 , 3.335 )-- ( 2.1 , 3.37 )-- ( 2.2 , 3.4 )-- ( 2.3 , 3.43 )-- ( 2.4 , 3.46 )-- ( 2.5 , 3.485 )-- ( 2.6 , 3.51 )-- ( 2.7 , 3.535 )-- ( 2.8 , 3.56 )-- ( 2.9 , 3.58 )-- ( 3.0 , 3.6 )-- ( 3.1 , 3.62 )-- ( 3.2 , 3.64 )-- ( 3.3 , 3.66 )-- ( 3.4 , 3.675 )-- ( 3.5 , 3.695 )-- ( 3.6 , 3.71 )-- ( 3.7 , 3.725 )-- ( 3.8 , 3.74 )-- ( 3.9 , 3.755 )-- ( 4.0 , 3.77 )-- ( 4.1 , 3.78 )-- ( 4.2 , 3.795 )-- ( 4.3 , 3.81 )-- ( 4.4 , 3.82 )-- ( 4.5 , 3.835 )-- ( 4.6 , 3.845 )-- ( 4.7 , 3.855 )-- ( 4.8 , 3.865 )-- ( 4.9 , 3.88 )-- ( 5.0 , 3.89 )-- ( 5.1 , 3.9 )-- ( 5.2 , 3.91 )-- ( 5.3 , 3.915 )-- ( 5.4 , 3.925 )-- ( 5.5 , 3.935 )-- ( 5.6 , 3.945 )-- ( 5.7 , 3.955 )-- ( 5.8 , 3.96 )-- ( 5.9 , 3.97 )-- ( 6.0 , 3.98 )-- ( 6.1 , 3.985 )-- ( 6.2 , 3.995 )-- ( 6.3 , 4.0 )-- ( 6.4 , 4.01 )-- ( 6.5 , 4.015 )-- ( 6.6 , 4.02 )-- ( 6.7 , 4.03 )-- ( 6.8 , 4.035 )-- ( 6.9 , 4.045 )-- ( 7.0 , 4.05 )-- ( 7.1 , 4.055 )-- ( 7.2 , 4.06 )-- ( 7.3 , 4.07 )-- ( 7.4 , 4.075 )-- ( 7.5 , 4.08 )-- ( 7.6 , 4.085 )-- ( 7.7 , 4.09 )-- ( 7.8 , 4.095 )-- ( 7.9 , 4.1 )-- ( 8.0 , 4.105 )-- ( 8.1 , 4.11 )-- ( 8.2 , 4.115 )-- ( 8.3 , 4.12 )-- ( 8.4 , 4.125 )-- ( 8.5 , 4.13 )-- ( 8.6 , 4.135 )-- ( 8.7 , 4.14 )-- ( 8.8 , 4.145 )-- ( 8.9 , 4.15 )-- ( 9.0 , 4.155 )-- ( 9.1 , 4.16 )-- ( 9.2 , 4.165 )-- ( 9.3 , 4.17 )-- ( 9.4 , 4.175 )-- ( 9.5 , 4.175 )-- ( 9.6 , 4.18 )-- ( 9.7 , 4.185 )-- ( 9.8 , 4.19 )-- ( 9.9 , 4.195 )-- ( 10.0 , 4.195 );                         \draw[dotted] ( 0.2 , 1.1111 )-- ( 0.3 , 1.25 )-- ( 0.4 , 1.8 )-- ( 0.5 , 2.2222 )-- ( 0.6 , 2.551 )-- ( 0.7 , 2.8125 )-- ( 0.8 , 3.0247 )-- ( 0.9 , 3.2 )-- ( 1.0 , 3.3471 )-- ( 1.1 , 3.4722 )-- ( 1.2 , 3.5799 )-- ( 1.3 , 3.6735 )-- ( 1.4 , 3.7556 )-- ( 1.5 , 3.8281 )-- ( 1.6 , 3.8927 )-- ( 1.7 , 3.9506 )-- ( 1.8 , 4.0028 )-- ( 1.9 , 4.05 )-- ( 2.0 , 4.093 )-- ( 2.1 , 4.1322 )-- ( 2.2 , 4.1682 )-- ( 2.3 , 4.2014 )-- ( 2.4 , 4.232 )-- ( 2.5 , 4.2604 )-- ( 2.6 , 4.2867 )-- ( 2.7 , 4.3112 )-- ( 2.8 , 4.3341 )-- ( 2.9 , 4.3556 )-- ( 3.0 , 4.3757 )-- ( 3.1 , 4.3945 )-- ( 3.2 , 4.4123 )-- ( 3.3 , 4.4291 )-- ( 3.4 , 4.4449 )-- ( 3.5 , 4.4599 )-- ( 3.6 , 4.4741 )-- ( 3.7 , 4.4875 )-- ( 3.8 , 4.5003 )-- ( 3.9 , 4.5125 )-- ( 4.0 , 4.5241 )-- ( 4.1 , 4.5351 )-- ( 4.2 , 4.5457 )-- ( 4.3 , 4.5558 )-- ( 4.4 , 4.5654 )-- ( 4.5 , 4.5747 )-- ( 4.6 , 4.5835 )-- ( 4.7 , 4.592 )-- ( 4.8 , 4.6002 )-- ( 4.9 , 4.608 )-- ( 5.0 , 4.6155 )-- ( 5.1 , 4.6228 )-- ( 5.2 , 4.6298 )-- ( 5.3 , 4.6365 )-- ( 5.4 , 4.643 )-- ( 5.5 , 4.6492 )-- ( 5.6 , 4.6553 )-- ( 5.7 , 4.6611 )-- ( 5.8 , 4.6668 )-- ( 5.9 , 4.6722 )-- ( 6.0 , 4.6775 )-- ( 6.1 , 4.6826 )-- ( 6.2 , 4.6876 )-- ( 6.3 , 4.6924 )-- ( 6.4 , 4.697 )-- ( 6.5 , 4.7016 )-- ( 6.6 , 4.7059 )-- ( 6.7 , 4.7102 )-- ( 6.8 , 4.7143 )-- ( 6.9 , 4.7184 )-- ( 7.0 , 4.7223 )-- ( 7.1 , 4.7261 )-- ( 7.2 , 4.7298 )-- ( 7.3 , 4.7334 )-- ( 7.4 , 4.7369 )-- ( 7.5 , 4.7403 )-- ( 7.6 , 4.7436 )-- ( 7.7 , 4.7469 )-- ( 7.8 , 4.75 )-- ( 7.9 , 4.7531 )-- ( 8.0 , 4.7561 )-- ( 8.1 , 4.7591 )-- ( 8.2 , 4.7619 )-- ( 8.3 , 4.7647 )-- ( 8.4 , 4.7675 )-- ( 8.5 , 4.7701 )-- ( 8.6 , 4.7728 )-- ( 8.7 , 4.7753 )-- ( 8.8 , 4.7778 )-- ( 8.9 , 4.7802 )-- ( 9.0 , 4.7826 )-- ( 9.1 , 4.785 )-- ( 9.2 , 4.7873 )-- ( 9.3 , 4.7895 )-- ( 9.4 , 4.7917 )-- ( 9.5 , 4.7938 )-- ( 9.6 , 4.7959 )-- ( 9.7 , 4.798 )-- ( 9.8 , 4.8 )-- ( 9.9 , 4.802 )-- ( 10.0 , 4.8039 );          \draw (0.0,1.11) node{$A$};          \draw (0.65 , 2.25) node{$B$};          \draw (0.0,1.98) node{$C$};               \draw (5,-.9) node{$r \rightarrow$};          \draw (-1.6,3) node{$\delta$};          \draw (-1.6,3.32) node{$\uparrow$};          \end{tikzpicture}          }          \label{fig1}          \end{figure}       When I use the following code, shape of the figure changes (becomes square).               \begin{tikzpicture}     \begin{axis}[ylabel=$\delta$,xlabel=$r$,  legend style={at={(0.95,0.05)},anchor=south east}]          \addplot[no marks,dotted] coordinates {( 0.2 , 1.1111 ) ( 0.3 , 1.25 ) ( 0.4 , 1.8 ) ( 0.5 , 2.2222 ) ( 0.6 , 2.551 ) ( 0.7 , 2.8125 ) ( 0.8 , 3.0247 ) ( 0.9 , 3.2 ) ( 1.0 , 3.3471 ) ( 1.1 , 3.4722 ) ( 1.2 , 3.5799 ) ( 1.3 , 3.6735 ) ( 1.4 , 3.7556 ) ( 1.5 , 3.8281 ) ( 1.6 , 3.8927 ) ( 1.7 , 3.9506 ) ( 1.8 , 4.0028 ) ( 1.9 , 4.05 ) ( 2.0 , 4.093 ) ( 2.1 , 4.1322 ) ( 2.2 , 4.1682 ) ( 2.3 , 4.2014 ) ( 2.4 , 4.232 ) ( 2.5 , 4.2604 ) ( 2.6 , 4.2867 ) ( 2.7 , 4.3112 ) ( 2.8 , 4.3341 ) ( 2.9 , 4.3556 ) ( 3.0 , 4.3757 ) ( 3.1 , 4.3945 ) ( 3.2 , 4.4123 ) ( 3.3 , 4.4291 ) ( 3.4 , 4.4449 ) ( 3.5 , 4.4599 ) ( 3.6 , 4.4741 ) ( 3.7 , 4.4875 ) ( 3.8 , 4.5003 ) ( 3.9 , 4.5125 ) ( 4.0 , 4.5241 ) ( 4.1 , 4.5351 ) ( 4.2 , 4.5457 ) ( 4.3 , 4.5558 ) ( 4.4 , 4.5654 ) ( 4.5 , 4.5747 ) ( 4.6 , 4.5835 ) ( 4.7 , 4.592 ) ( 4.8 , 4.6002 ) ( 4.9 , 4.608 ) ( 5.0 , 4.6155 ) ( 5.1 , 4.6228 ) ( 5.2 , 4.6298 )( 5.3 , 4.6365 ) ( 5.4 , 4.643 ) ( 5.5 , 4.6492 ) ( 5.6 , 4.6553 ) ( 5.7 , 4.6611 ) ( 5.8 , 4.6668 ) ( 5.9 , 4.6722 ) ( 6.0 , 4.6775 ) ( 6.1 , 4.6826 ) ( 6.2 , 4.6876 ) ( 6.3 , 4.6924 ) ( 6.4 , 4.697 ) ( 6.5 , 4.7016 ) ( 6.6 , 4.7059 ) ( 6.7 , 4.7102 ) ( 6.8 , 4.7143 ) ( 6.9 , 4.7184 ) ( 7.0 , 4.7223 ) ( 7.1 , 4.7261 ) ( 7.2 , 4.7298 ) ( 7.3 , 4.7334 ) ( 7.4 , 4.7369 ) ( 7.5 , 4.7403 ) ( 7.6 , 4.7436 ) ( 7.7 , 4.7469 ) ( 7.8 , 4.75 ) ( 7.9 , 4.7531 ) ( 8.0 , 4.7561 ) ( 8.1 , 4.7591 ) ( 8.2 , 4.7619 ) ( 8.3 , 4.7647 ) ( 8.4 , 4.7675 ) ( 8.5 , 4.7701 ) ( 8.6 , 4.7728 ) ( 8.7 , 4.7753 ) ( 8.8 , 4.7778 ) ( 8.9 , 4.7802 ) ( 9.0 , 4.7826 ) ( 9.1 , 4.785 ) ( 9.2 , 4.7873 ) ( 9.3 , 4.7895 ) ( 9.4 , 4.7917 ) ( 9.5 , 4.7938 ) ( 9.6 , 4.7959 ) ( 9.7 , 4.798 ) ( 9.8 , 4.8 ) ( 9.9 , 4.802 ) ( 10.0 , 4.8039 )};               \addlegendentry{Style 1}     \end{axis}     \end{tikzpicture}


title: Use .otf/.ttf in ConTeXt MKiV/LuaTeX

text: I would like to use an .otf Font for my document which I typeset in ConTeXt MKiV. Sadly I was not able to change the font. I set `export OSFONTDIR="/usr/local/share/fonts;$HOME/.fonts` and ran `mtxrun --script fonts --reload` To query the database worked fine for the fonts I have installed. Where it comes to a halt are the typescripts. I use (at the begin of the same file as the rest of the document)               \starttypescript [sans] [delicious]        \definefontsynonym [sans]           [name:delicious]     \stoptypescript               \setupbodyfont[sans,rm,10pt]      And I only get the Computer Modern Font. Sorry if the question is pretty noob-ish, but I did try several times with different fonts and read the Documentation in the Wiki as well. But some examples I can't get to work and some state that the examples are outdated (e.g. TypeScripts). What would help me?


title: how to make subscripts automatically choose font size

text: Would it be possible to make subscripts in math mode automatically choose a smaller font when a subscript is in uppercase? E.g., if I have sA, the "A" would appear quite big. Is it possible to tell the subscript operator `_` to use a smaller font when it sees an uppercase letter? A workaround is to define, say, `\newcommand{\l}[1]{\scalebox{0.x}{$#1$}}`. But I would like to see if what I desired can be made automatic?


title: R+LaTex to HTML5 better than pdf?

text: I use R together with ggmap, ggplot2, Rstudio, knitr, and beamer to produce presentations in pdf. Soon I hope to have time to learn TikZ too. I have not moved to Markdown because I appreciate the layout-power of LaTex. My ambition is to minimize the time and work from I get new data (measurements from another city) to when I have the pdf to show to my audience. I have some time- saving logic implemented in the LaTex, like changing title of slides depending on if results are good or bad. I want my slides to evolve from having just simple animations like adding one bullet of text at a time and animated gifs, to include interactive plots e.g. clicking on a map show some results from the clicked location. Possibly there are even more advanced ways of interaction to help explain difficult concepts. On the internet there are many impressive examples, for example using googleVis. Some of the requirements I think many in my situation have: - The data in the presentations is confidential (cannot be put on hosting-sites) - It must be possible to look at the slides whithout being connected to internet - It must be possible to email the presentations as attachment - It must be possible to look at the presentations without installing other software than a web browser or Acrobat Reader The Adobe pdf format is very strong, but I haven't been able to add interactiveness other than stepping forward or backward on a linear path. Is it now the time to learn how to output LaTex to a stronger format like HTML5? Thanks to all contributors to tex.stackexchange! Sorry about long text. /Chris


title: Hatch a rectangle in TikZ

text: I know how to make a rectangle and fill it. But what shoud be done to hatch this rectangle with thin 45 degree inclined line with 2mm gap.               \documentclass{article}     \usepackage{tikz}          \begin{document}          \begin{tikzpicture}     %\draw (0,0) rectangle (2,4);     \fill[blue] (0,0) rectangle (2,4);          \end{tikzpicture}          \end{document}      * * * Thank you Altermundus, I want to hatch area under the curve. But I am unable to use your code as i did with > [pattern=north west lines, pattern color=blue] Please give little explanation for your code so that i can use it.               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{patterns}          \begin{document}     \begin{tikzpicture}     \draw[pattern=north west lines, pattern color=blue] (0,0) rectangle (2,4);     \end{tikzpicture}          \begin{tikzpicture}     \draw [thick,pattern=north west lines, pattern color=red] (1,0)--(1,1) to [bend left] (4,4) -- (4,0) --cycle;     \end{tikzpicture}          \end{document}


title: Customizing bibliography's style and appearance

text: How do I to make this bibliography looks better? ![enter image description here](http://i.stack.imgur.com/OdGF7.png) Here the code that I've used :               \chapter*{Nethographie}          \addcontentsline{toc}{chapter}{Nethographie}          {[}N9{]} https://kuler.adobe.com (Consulté en Janvier 2014)          {[}N10{]} http://http://jsfiddle.net/ (Consulté en Janvier 2014)          {[}N11{]} https://kuler.adobe.com/explore/newest/ (Consulté en Février 2014)          {[}N12{]} http://msdn.microsoft.com/en-us/library/aa365465\%{}28VS.85\%{}29.aspx (Consulté en Février 2014)          \end{document}


title: Using different layout for makeindex name

text: I would like to use different layout for `\indexname`               \documentclass[8pt,b5paper,twocolumn]{extbook}      \usepackage[top=2cm, headsep=0.4cm, bottom=1.5cm, left=1.5cm, right=1.5cm]{geometry}     \usepackage{fancyhdr}     \usepackage[icelandic, czech, english]{babel}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[scaled]{helvet}     \usepackage{hanging}     \usepackage{makeidx}     \newcommand\entry[3][]{\hangpara{2em}{1}{\fontfamily{phv}\selectfont{\textbf{{#2}}}}\      #3\ifx\relax#1\relax\markboth{#2}{#2}\else\markboth{#1}{#1}\fi     \par}\nopagebreak[4]     \fancypagestyle{indexstyle}{%     \fancyhf{}     \renewcommand{\headrulewidth}{0.4pt}     \renewcommand{\footrulewidth}{0pt}     \fancyhead[LE,RO]{\indexname}     \fancyhead[C]{\textbf{\thepage}}      }     \fancypagestyle{dictstyle}{%     \renewcommand{\headrulewidth}{0.4pt}     \fancyhf{}     \fancyhead[LE,LO]{{\fontfamily{phv}\selectfont{\textbf{\rightmark}}}}     \fancyhead[CO,CE]{\thepage}     \fancyhead[RE,RO]{{\fontfamily{phv}\selectfont{\textbf{\leftmark}}}}}     \addto{\captionsenglish}{%     \renewcommand{\indexname}{Seznam autorů fotografií}     }     \makeindex     \begin{document}     \pagestyle{dictstyle}     \entry[headword]{headword}{translation}     \entry[headword]{headword}{translation}     \thispagestyle{indexstyle}     \clearpage     \printindex     \end{document}      How can I change the layout of `\indexname` (in this example 'Seznam autorů fotografií') value (see picture bellow) ![Indexname](http://i.stack.imgur.com/EcM9E.png) and place it under the header rule the same way as are placed the first and the last headword (see picture bellow) ![Headwords in head](http://i.stack.imgur.com/cHRlY.png) and place it under the head rule?


title: TikZ, 3d library and circle fading

text: I'm using the 3d library to put a circle on the z=0 plane, and other things. I'd like to fade this circle radially, but the result isn't as I would expect because the fading is not proportional to the distance from the origin. How can I do?               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{3d,fadings}     \tikzfading [name=radialfade, inner color=transparent!0, outer color=transparent!100]          \begin{document}     \begin{tikzpicture} [x={(-0.3535,-0.3535cm)}, y={(1cm,0cm)}, z={(0cm,1cm)}, scale=3]     \begin{scope} [canvas is xy plane at z=0]     \fill [blue, path fading=radialfade] circle (1);     \end{scope}     \draw[-latex] (-1,0,0) -- (1,0,0) node [left] {$x$};     \draw[-latex] (0,-1,0) -- (0,1,0) node [below] {$y$};     \draw[-latex] (0,0,-0.5) -- (0,0,0.5) node [left] {$z$};     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/XCxW4.png)


title: Why does LaTeX not embed imported EPS images into the DVI file?

text: ## Experiment: Compiling a file, having PSTricks code inside, in LaTeX (`latex.exe`), results in a self-contained DVI, where this PSTricks code is embedded. But if the file has EPS images, the resulting DVI is no longer self-contained. If you delete the EPS images and open the DVI using a DVI viewer, the viewer will not show any images. ## Question Why does LaTeX (`latex.exe`) not embed imported EPS images into the DVI file?


title: sectionbib option for natbib doesn't work with scrreprt

text: The `natbib` package has an option `sectionbib`, that causes the bibliography to be typeset as an unnumbered section, as opposed to the default unnumbered chapter. However, when using the `scrreprt` class, this option has no effect, so the bibliography is typeset as a chapter. I will normally use BibTeX, but to make it easier, here is an example with the standard bibliography environment -- the result is, as far as I can see, the same:               \documentclass{scrreprt}       \usepackage[sectionbib]{natbib}     \setcitestyle{numbers,square}     \begin{document}       \chapter{A chap}       Some text.  \citep{lamport94}          \begin{thebibliography}{9}            \bibitem[Lamport (1994)]{lamport94}         Leslie Lamport,         \emph{\LaTeX: A Document Preparation System}.         Addison Wesley, Massachusetts,         2nd Edition,         1994.            \end{thebibliography}       \end{document}      The reason for wanting the bibliography typeset as a section, is that I want to have a separate bibliography for each chapter (using the `chapterbib` package), and then I'd rather have the bibliography as a section. This is for a report written by several persons, each person writing his/hers chapter. I'm aware that it works fine with the standard report class, but is there a way to make it work with the KOMA-script report class? Thank you for your time. P.S My internet connection is a little shaky at the moment, so please forgive me if I'm late in replying.


How does TeX decide how to size a middle delimiter? When I want to show evaluation of limits of an integral, I would type `$$\int_1^2 x\; dx=\frac{x^2}{2}|_1^2=4-\frac{1}{2}=\frac{7}{2}.$$` How do I get the vertical bar showing the limits big enough? I have found `\bigg` and `\Big` but I would like it to autosize like `\left`. It seems harder because there isn't a left side to figure out what is inside. I tried `\left` space and `\right \mid`, but didn't find success. On math.stackexchange it was stated I just needed `\left`. as period is a delimiter. Is there a list of delimiters?


title: Biblatex cite with footnote only once, with use of brackets

text: I've started putting into practice the answer to this question. Yet I would like to change this so that there are brackets around the citations:   * in the superscript in text,    * in the superscript in footnote,    * in the bibliography. I've managed to get the first one and the last one working. The second one however, I don't know how to do this. Note that I mainly write in english and in dutch, so I don't think there is much babel interference. Also, would there be a way to order the footnotes so that first all ''normal'' `\footnote{}` are printed and below that all `\sfcite{}` citational footnotes (per page that is)? Here's what I've managed to concoct:               \documentclass{article}     \usepackage[english]{babel}     \usepackage[pdfborder={0 0 0}]{hyperref}     \usepackage[citestyle=numeric-comp,sorting=none,hyperref]{biblatex}     \usepackage{filecontents}          % No brackets around the number of each bibliography entry     \DeclareFieldFormat{labelnumberwidth}{\textbf{[#1]}}          %---------------------------------------------------------------     % Essentially verbatim from Joseph Wright     % http://www.texdev.net/2010/03/08/biblatex-numbered-citations-as-footnotes/     \makeatletter     \ExecuteBibliographyOptions{citetracker,sorting=none}          \DeclareCiteCommand{\notefullcite}[\mkbibbrackets]         {\usebibmacro{cite:init}%             \usebibmacro{prenote}}         {\usebibmacro{citeindex}%             \usebibmacro{notefullcite}%             \usebibmacro{cite:comp}}         {}         {\usebibmacro{cite:dump}%             \usebibmacro{postnote}}          \newbibmacro*{notefullcite}{%         \ifciteseen             {}             {\footnotetext[\thefield{labelnumber}]{%                 \usedriver{}{\thefield{entrytype}}\addperiod}}}          \DeclareCiteCommand{\sfcite}[\cbx@superscript]%         {\usebibmacro{cite:init}%             \let\multicitedelim=\supercitedelim             \iffieldundef{prenote}             {}             {\BibliographyWarning{Ignoring prenote argument}}%         \iffieldundef{postnote}             {}             {\BibliographyWarning{Ignoring postnote argument}}}         {\usebibmacro{citeindex}%             \usebibmacro{sfcite}%             \usebibmacro{cite:comp}}         {}         {\usebibmacro{cite:dump}}          \newbibmacro*{sfcite}{%         \ifciteseen             {}             {\xappto\cbx@citehook{%                 \noexpand\footnotetext[\thefield{labelnumber}]{%                 \fullcite{\thefield{entrykey}}\addperiod}}}}          \newrobustcmd{\cbx@superscript}[1]{%         \mkbibsuperscript{[#1]}%         \cbx@citehook         \global\let\cbx@citehook=\empty}     \let\cbx@citehook=\empty     \makeatother     %---------------------------------------------------------------          \begin{filecontents}{\jobname.bib}     @article{ref1,         hyphenation = {american},         title = {Natural Products as Sources of New Drugs over the Last 25 Years},         author = {Newman, D.J. and Cragg, G.M.},         journal = {J. of Nat. Prod.},         volume = {70},         number = {3},         pages = {461--477},         year = {2007}}     @article{ref2,         hyphenation = {american},         title = {Natural products as leads to potential drugs: an old process or the new hope for drug discovery?},         author = {Newman, D.J.},         journal = {J. of Med. Chem.},         volume = {51},         number = {9},         pages = {2589--2599},         year = {2008}}     @online{ref3,         author = {Quintin, C.},         title = {Les eponges},         url = {http://christophe.quintin.pagesperso-orange.fr/Liste_Doc.html},         urldate = {2009-05-03}     }     \end{filecontents}          \addbibresource{\jobname.bib}          \begin{document}     First citation.\sfcite{ref1,ref2} Some text\footnote{A footnote}.               \pagebreak     Second citation\sfcite{ref1}, second citation\sfcite{ref2}, first citation.\sfcite{ref3}     \printbibliography     \end{document}


title: Dot below letter

text: > **Possible Duplicate:**   >  TeX accents do not seem to work with fontspec and xe/lua/latex Very frequently I need to write letters with dots below (like ḥ or ṭ) for transliteration. It's ok when the font I'm using comes with the character, but I can't use that character with other fonts. It used to work with xelatex and xunicode package, I'd just use \d{t}, for example, but that doesn't seem to be the case anymore, it just works if the font has that particular character. Is there a way to "force" a dot below a letter in _any_ font? Here is the basic preamble I've been using:               \documentclass{article}     \usepackage{fontspec}     \usepackage{xunicode}     \setmainfont{Minion Pro}      EDIT: OK, I found the simplest solution myself, I just changed the preamble to (all the rest being equal):               \documentclass{article}     \usepackage{xunicode,xltxtra}      So now I can put that \d{} (dot below) on **any** character, **any** font. I hope this helps people with the same issue.


title: How to beamer \alert code snippets in lhs2TeX?

text: How to highlight particular ranges of lhs2TeX code in beamer? Naive example (to be preprocessed with `lhs2TeX --agda`):               \documentclass{beamer}     %include agda.fmt     \begin{document}     \begin{frame}     \begin{spec}     somefunction :  {-"\begin{alertenv}"-}importantaspect{-"\end{alertenv}"-}                     secondline     \end{spec}     \end{frame}     \end{document}      Compiling such a snippet fails with:               ./test.tex:308: Incompatible glue units.     \reset@color ->\beamer@lastskip =\lastskip                                                 \edef \beamer@lastskiptexta {\the...     l.308 \end{frame}


title: make transition effect in beamer

text: i have                \begin{itemize}           \item ...           \item ...           ...      \end{itemize}      I want to insert some transition effect to moving between item , any idea?


title: How to align text and itemize in the starting with same margin?

text: How can we align Text and itemize starting with same margin?               This is my first sentence.     . this is first bullet point line.     . this is second bullet point line.


title: label in algorithmic

text: if I have this code               \begin{algorithm}       \label{alg:the_alg}       \begin{algorithmic}[1]         \STATE operation 0         \STATE operation 1       \end{algorithmic}     \end{algorithm}      I can make a reference to `alg:the_alg`. But, how I can make a reference to a `STATE` in `algorithmic` ?


title: How to hide header only in first page of each section with fancyhdr?

text: I want the header to be empty in the page were section begins and showed in the other pages. How can I do that?               \documentclass[12pt, titlepage, onecolumn, a4paper]{article}          \usepackage{lipsum}    %% for dummy text          \usepackage{fancyhdr}     \pagestyle{fancy}     \renewcommand{\sectionmark}[1]{\markboth{#1}{}} % set the \leftmark     \fancyhf{}          \lhead{\leftmark}     \chead{}     \rhead{\rightmark}     \cfoot{\footnotesize\selectfont\bfseries\thepage}          \renewcommand{\headrulewidth}{0.4pt}     \renewcommand{\footrulewidth}{0.4pt}     \setlength{\headheight}{8pt}          \renewcommand{\thefigure}{\thesection.\arabic{figure}}     \renewcommand{\thetable}{\thesection.\arabic{table}}          \begin{document}     \lipsum[1]       \pagenumbering{roman}       \setcounter{page}{2}     \lipsum[1]       \rhead{\footnotesize{\thesection{ } \leftmark}}       \pagenumbering{arabic}       \setcounter{page}{1}     \section{First Section}     \lipsum[2-5]     \section{Second Section}     \lipsum[2-8]     \end{document}


title: Compilation error: missing $ inserted

text: I'm trying to compile this:                %\chapterimage{m2summary.pdf}      \chapter{Respostas e soluções}      \begin{multicols}{2}      \section*{\textcolor{ocre}{1. Matrizes}}      \subsection*{Exercícios de fixação}      \begin{enumerate}[label=\arabic*.]      \tiny{      \item $\ds A=\begin{bmatrix} 0 & -1 & -2 \\ 1 & 0 & -1 \\ 2 & 1 & 0 \end{bmatrix}$      }      \end{enumerate}      \end{multicols}      I'm gonna create a new document and use `\include{filename}` to include the code above. At my main .tex file, I use these packages:               \documentclass[11pt,fleqn]{book}          \usepackage[top=3cm,bottom=3cm,left=3.2cm,right=3.2cm,headsep=10pt,a4paper]{geometry}          \usepackage{xcolor}     \definecolor{ocre}{RGB}{131,50,165}     \definecolor{yl}{RGB}{204,0,255}          % Font Settings     \usepackage{avant}     \usepackage{times}     \usepackage{mathptmx}     \usepackage{pifont,bbding}          \usepackage{microtype}     \usepackage[latin1]{inputenc}     \usepackage[brazilian]{babel}     \usepackage[T1]{fontenc}          % Bibliography     \usepackage[style=alphabetic,sorting=nyt,sortcites=true,autopunct=true,babel=hyphen,hyperref=true,abbreviate=false,backref=true,backend=biber]{biblatex}     \addbibresource{bibliography.bib}     \defbibheading{bibempty}{}          % Index     \usepackage{calc}     \usepackage{makeidx}     \makeindex          % Enumerate     %\usepackage{enumerate}          % Math     \usepackage{amsmath}          % Others     \usepackage{cancel,relsize}     \usepackage{pdfpages}     \usepackage{multicol}     \usepackage{xcolor,colortbl,subfigure}     \usepackage{stackrel}          % TikZ     \usepackage{tikz}     \usetikzlibrary{decorations.pathmorphing}     \usetikzlibrary{decorations.markings}     \usetikzlibrary{shapes,snakes,calc,arrows}     \usetikzlibrary{intersections,through,backgrounds}     \usetikzlibrary{shapes.arrows,chains,positioning}     %\usetikzlibrary{shadows.blur}     \usetikzlibrary{matrix,decorations.pathmorphing}          \tikzstyle{dot}=[circle,fill,scale=0.4]     \tikzstyle{dote}=[circle,fill,scale=0.2]     \tikzstyle{doto}=[circle,draw=black,fill=white,scale=0.4]     \tikzstyle{dotred}=[circle,fill=ocre,scale=0.4]     \tikzstyle{dotrede}=[circle,fill=ocre,scale=0.5]     \tikzstyle{dotredo}=[circle,draw=ocre,fill=white,scale=0.5]     \tikzstyle{dotreda}=[circle,draw=ocre,fill=white,scale=0.4]     \tikzstyle{pre}=[<-,shorten >=1pt,>=stealth',semithick]          \tikzset{         node style sp/.style={draw,circle,minimum size=1cm},         node style ge/.style={circle,minimum size=1cm},         node style spe/.style={draw,circle,minimum size=.4cm},         node style gee/.style={circle,minimum size=.4cm},         arrow style mul/.style={draw,sloped,midway,fill=white},         arrow style plus/.style={midway,sloped,fill=white},     }                    % Letras \mathbb     \newcommand{\NN}{\mathbb N}     \newcommand{\RR}{\mathbb R}     \newcommand{\ZZ}{\mathbb Z}     \newcommand{\CC}{\mathbb C}     \newcommand{\QQ}{\mathbb Q}     \newcommand{\PP}{\mathbb P}          % Operadores     \newcommand{\mdc}{\operatorname{mdc}}     \newcommand{\mmc}{\operatorname{mmc}}     \newcommand{\sen}{\operatorname{sen}}     \newcommand{\cotg}{\operatorname{cotg}}     \newcommand{\tg}{\operatorname{tg}}     \newcommand{\cossec}{\operatorname{cossec}}     \newcommand{\dom}{\operatorname{D}}     \newcommand{\cdom}{\operatorname{CD}}     \newcommand{\ima}{\operatorname{Im}}     \newcommand{\idx}{\operatorname{id}}     \newcommand{\idm}{\operatorname{I}}     \newcommand{\suchthat}{\;\ifnum\currentgrouptype=16 \middle\fi|\;}     \renewcommand{\CancelColor}{\color{ocre}}          % Comandos     \newcommand{\ds}{\displaystyle}     \newcommand{\tf}{\therefore}     \newcommand{\raw}{\Rightarrow}     \newcommand{\lfraw}{\Leftrightarrow}     \newcommand{\lfaw}{\Leftarrow}          % Gráficos     \makeatletter     \let\pgfmath@function@exp\relax % undefine old exp function     \pgfmathdeclarefunction{exp}{1}{%       \begingroup         \pgfmath@xc=#1pt\relax         \pgfmath@yc=#1pt\relax         \ifdim\pgfmath@xc<-9pt           \pgfmath@x=1sp\relax         \else           \ifdim\pgfmath@xc<0pt             \pgfmath@xc=-\pgfmath@xc           \fi           \pgfmath@x=1pt\relax           \pgfmath@xa=1pt\relax           \pgfmath@xb=\pgfmath@x           \pgfmathloop%             \divide\pgfmath@xa by\pgfmathcounter             \pgfmath@xa=\pgfmath@tonumber\pgfmath@xc\pgfmath@xa%             \advance\pgfmath@x by\pgfmath@xa           \ifdim\pgfmath@x=\pgfmath@xb           \else             \pgfmath@xb=\pgfmath@x           \repeatpgfmathloop%           \ifdim\pgfmath@yc<0pt             \pgfmathreciprocal@{\pgfmath@tonumber\pgfmath@x}%             \pgfmath@x=\pgfmathresult pt\relax           \fi         \fi         \pgfmath@returnone\pgfmath@x%       \endgroup     }     \makeatother          % Distributiva     \newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node (#1) {};}     \newcommand{\DrawBox}[2]{%       \begin{tikzpicture}[overlay,remember picture]         \draw[->,shorten >=5pt,shorten <=5pt,out=70,in=130,distance=0.5cm,#1] (MarkA.north) to (MarkC.north);         \draw[->,shorten >=5pt,shorten <=5pt,out=50,in=140,distance=0.3cm,#2] (MarkA.north) to (MarkB.north);       \end{tikzpicture}     }          \newcommand{\tikzmarklog}[1]{\tikz[overlay,remember picture] \node (#1) {};}     \newcommand{\DrawBoxlog}[2]{%       \begin{tikzpicture}[overlay,remember picture]         \draw[->,shorten >=5pt,shorten <=5pt,out=70,in=130,distance=0.5cm,#1] (MarkB.north) to (MarkC.north);         \draw[->,shorten >=5pt,shorten <=5pt,out=50,in=140,distance=0.3cm,#2] (MarkA.south) to (MarkB.south);       \end{tikzpicture}     }          % Matrices     \makeatletter     \renewcommand*\env@matrix[1][*\c@MaxMatrixCols c]{%       \hskip -\arraycolsep       \let\@ifnextchar\new@ifnextchar       \array{#1}}     \makeatother          %----------------------------------------------------------------------------------------          \input{structure} % Insert the commands.tex file which contains the majority of the structure behind the template          \begin{document}          %----------------------------------------------------------------------------------------     %   TITLE PAGE     %----------------------------------------------------------------------------------------          \includepdf{capam2}     \phantom{a}{\thispagestyle{empty}}          %----------------------------------------------------------------------------------------     %   COPYRIGHT PAGE     %----------------------------------------------------------------------------------------          \newpage     ~\vfill     \thispagestyle{empty}          \noindent Copyright \copyright\ 2013 X ao Cubo\\ % Copyright notice          \noindent \textsc{Publicado por X ao Cubo}\\ % Publisher          \noindent \textsc{XaoCubo.com}\\ % URL          %\noindent  % License information          %\noindent \textit{First printing, March 2013} % Printing/edition date          %----------------------------------------------------------------------------------------     %   TABLE OF CONTENTS     %----------------------------------------------------------------------------------------          \clearpage     \pagenumbering{roman}          \chapterimage{m2c1head.pdf} % Table of contents heading image          \pagestyle{empty} % No headers          \tableofcontents % Print the table of contents itself          \cleardoublepage % Forces the first chapter to start on an odd page so it's on the right          \pagestyle{fancy} % Print headers again               %----------------------------------------------------------------------------------------     %   CHAPTERS     %----------------------------------------------------------------------------------------          \cleardoublepage     \pagenumbering{arabic}          \include{filename}     \end{document}       The "best" part is: I'm creating some books (I'm a math teacher). This is the second one. The first one I compiled at college AND IT WORKS! --' So then I started to work at home, using WinEdt 8 and the latest version of MikTex, and it shows the follow error: `Missing $` inserted. HOW? I tried to compile with no text, actually, with no math text, and it keeps showing that $ is missing. I really don't know what to do! And what makes me "happy": compiling here, at home, the first book (that I wrote at college), it works! So I copy, paste the code, change what I have to change, but it stills show the same error message! I'm so sorry for writing such a big question, but I don't know what really matters to help you to help me (lol), so I decided to write all the code here. Thank you so much! :D


title: Sectionname of section at top of page in footer

text: When `fancyhdr` prints the header and footer, I believe it uses the following order:   1. Print header   2. Print page   3. Print footer The problem with this order is that when you have a section in the middle of the page, say, section 4, but you want to print the section name of section 3 in the footer, the declared `pagestyle` with `lfoot` through `rfoot` and `\section` (embedded in a macro for variable output across the document) will print the section name which is _closest_ to the footer, instead of the section which is at the _top_ of the page. So, without killing this process of automated footer output (namely the name of the _current_ section at the footer), how can I get the section at the top of the page printed in my footer?               \documentclass{article}          % I want these packages to remain intact with whatever change you're proposing     \usepackage[toc,titletoc,page]{appendix}     \usepackage{marginnote}     \usepackage{pgfplots}     \usepackage{amsmath}     \usepackage[heightrounded]{geometry}     \usepackage{lastpage}     \usepackage{lipsum}          % Footer     \usepackage{fancyhdr}     \fancyhf{}     \renewcommand{\headrulewidth}{0pt}     \renewcommand{\footrulewidth}{.4pt}          % Command for pageref for page of last page in footer     \cfoot{\thepage /\pageref{LastPage}\hyperlink{page.\getpagerefnumber{anchor.lastpage}}{ $\rightarrow$}}          % ToC name change     \renewcommand*\contentsname{Inhoudsopgave}                    % Global pagestyle commands fancyhdr     \fancypagestyle{contents}{     \lfoot{\textbf{Inhoudsopgave}}     }     \fancypagestyle{document}{                     \rfoot{\hyperlink{page.1}{$\leftarrow$ Page 1}}                     \lfoot{\currentsection}     }     \fancypagestyle{plain}{% Declare plain page style to also print footer on the first page of the document     \lhead{}     \chead{}     \rhead{}     \lfoot{\textbf{Inhoudsopgave}}     \cfoot{\thepage /\pageref{LastPage}\hyperlink{page.\getpagerefnumber{anchor.lastpage}}{ $\rightarrow$}}     \rfoot{}     \renewcommand{\headrulewidth}{0pt}     \renewcommand{\footrulewidth}{0.4pt}     }          % Cross-referencing     \usepackage[pageanchor]{hyperref}     \hypersetup{colorlinks=true,         linkcolor=red,         hypertexnames=false,         pdfhighlight=/N         }%          % Title settings (empty in MWE)     \title{}     \author{}     \date{}          \begin{document}          % Footer section name - Declare after ToC to keep section numbering and ToC intact         \newcommand{\currentsection}{}     \let\oldsection\section     \renewcommand{\section}[1]{\oldsection{#1}\renewcommand{\currentsection}{#1}}          % Set footer style     \pagestyle{document}          \section{Week 1 - Intro \textcolor{blue}{\textbf{R}}}     \subsection{Objecten}     \subsubsection{Objecten met \'e\'en getal}          \newpage          \textbf{\Huge{THIS IS PART OF SECTION 1, BUT FOOTER SHOWS SECTION 2}}     \lipsum[1-3]          \section{Week 2 - Data sets genereren}          % Anchor on last page for rfoot     \label{anchor.lastpage}          \end{document}


title: Tikz US-style components and other components

text: In circuittikz there is a full library of US-style components like the +/- voltage source, directed arrow current source, etc. As far as I can tell from the documentation, the Tikz circuit library has US resistors (`var resistor IEC graphic`) and US-style logic symbols, but I can't find the other symbols. Also, the Tikz documentation doesn't seem to have any references to transistor symbols (in particular BJT's and MOSFETS), amplifiers, triacs, and many of the non-basic symbols found in circuitikz. Does anyone know of a pre-compiled list of shapes/components designed to be compatible with the Tikz circuit library and uses similar syntax forms? This is not including the circuitikz shapes, from what I understand these libraries aren't completely compatible.


title: Print only the name of first author without the 'et al.' when citing?

text: If one wants to replace 'et al' with something else, eg, "and co-workers" for some instances only, a citation mode that only produced the name would make that possible. Unfortunately, the `\citeauthor{}` in natbib adds the 'et al.' and there is no `\citefirstauthor` or something else that would create this.


title: Non Floating Figures

text: I want to stop my figures floating, but I still want to be able to have the caption to the side of them; mainly to save space and for presentation. The only way I know how to get the figure caption to the side of an image is as follows;               \begin{SCfigure}       \centering       \includegraphics[width=80mm]{image.png}       \caption{This text is added at the side of the image as a figure description.}     \end{SCfigure}      But, these always float which as it turns out isn't saving space and it just looks messy, so I want this sort of layout for my figures, but I want to fix their position. Is there anyway to do this? Thank you.


title: Beamer titlepage\\line 17 Undefined control sequence

text: I'm so sorry for the probably stupid question, but somehow I'm stucked. It's my first try to make a presentation in LaTeX. So I will approve every one of your advices (probably a site or something to start with). Of course I'll delete my insignificant question afterwards, so no worries about that one. Thank you for your understanding!                   \documentclass{beamer}         \usetheme{Berlin}         \usecolortheme{beaver}              \definecolor{gr}{gray}{0.90}         \title{3D- Lithography}         \subtitle{Microfabrication through Two-Photon Photopolymerization}              \institute[]{\normlsize Material Science Seminar\\         University of Stuttgart\\[\baselineskip]         }         \author{Biri Dimi}         \date{\today}              \begin{document}              \begin{frame}          \titlepage         \end{frame}              \begin{frame}         \frametitle{Table of Contents}         \tableofcontents         \end{frame}              \AtBeginSection[]         {         \begin{frame}         \frametitle{Table of Contents}         \tableofcontents[currentsection]         \end{frame}         }         \end{document}


title: siunitx - distinguish unit with prefix and without

text: I would like to distinguish two cases when using the unit `\byte`:   1. if used _without_ prefix it should be written as "Byte" in the text   2. if used _with_ prefix, e.g. `\kilo\byte`, I would like to get "kB" Do I need to declare different units for use with/without prefix or can this be handled by the package?


title: Show chapter* in parttoc but not main toc

text: MWE:               \documentclass[a4paper,oneside]{scrbook}     \usepackage{minitoc}     \setcounter{tocdepth}{0}           \begin{document}     \doparttoc     \tableofcontents          \part{Part 1}     \parttoc     \addstarredchapter{Chapter}     \chapter*{Chapter}     \chapter{Chapter 1}     \chapter{Chapter 2}          \part{Part 2}     \parttoc     \addstarredchapter{Chapter}     \chapter*{Chapter}     \chapter{Chapter 3}     \chapter{Chapter 4}          \end{document}      Currently the TOC looks like this: ![enter image description here](http://i.stack.imgur.com/rZvtm.png) What I want it to look like is: ![enter image description here](http://i.stack.imgur.com/LxEDU.png) Without loosing it in `\parttoc` as in the following image: ![enter image description here](http://i.stack.imgur.com/n2gfx.png) I don't want to use `titletoc` as suggested here.


title: Defining abbreviation command

text: I want to make a command that I say for example:               \newcommand{abbre}{...}          \def\abbre{Modular Response}      And `\abbre` should display `MR.` Thanks


title: \to or \longrightarrow and \mapsto or \longrightarrow in functions?

text: I'm typing up a research project and I am not sure which ones I should use when I'm defining functions. I personally prefer `\longrightarrow` and `\longmapsto` but I see a lot of people use `\to` and `\mapsto`. What in your opinion looks more 'presentable'? Thanks in advance.


title: What is the correct way to signal the end a LaTeX command?

text: I am writing a LaTeX export feature for my database. To this end, I am doing a symbol-by-symbol transformation of special characters in latin-1 text fields to LaTeX macros, such as `_` to `\\_`, `~` to `\textasciitilde`, and so end. When doing this, many macro commands need to be separated from text immediately following it, or I will end up with errors like "`~user`" being transformed to "`\textasciitildeuser`". Using Google I came up with a number of different ways to achieve this separation, such as:   * putting a white space at the end of the macro, e.g. '`\textasciitilde `'   * putting an empty pair of brackets at the end, e.g. '`\textasciitilde{}`'   * putting the macro into brackets, e.g. '`{\textasciitilde}`' What is the correct an intended way to separate a LaTeX macro command from the text immediately following it? For instance, the third way seems a little problematic to me since putting stuff in brackets may have additional effect, e.g. when the text is used as content of BibTeX fields. Any advise is appreciated.


title: biber citekey order error

text: I keep getting the error when compiling my thesis:               Entity: line 1957: parser error : Extra content at the end of the document <bcf:citekey order="17">Bell20 ^      when I compile my file and I found that the citekey order actually starts at 8 instead of 1 in the .bcf file. However, if I compile the file in a document with only `\nocite{*}` and `\printbibliography` as below biber works fine and is able to print out all the reference.               \documentclass{article}          \addbibresource{memsb.bib}     \begin{document}          \nocite{*}          \printbibliography          \end{document}


title: Arranging exercises row-wise on the page

text: I have been using `tabularx` to arrange practice exercises on the page, like this:               \documentclass[12pt]{exam}     \usepackage{amsmath}     \usepackage{kpfonts}     \usepackage{tabularx}     \usepackage{titlesec}          \footer{}{}{}     \parindent=0in     \titleformat{\section}[block]{\large\bfseries\filcenter}{}{1em}{}     \setcounter{secnumdepth}{0}          \begin{document}          \section{More Practice With Trig Identities}     Establish each identity.     \begin{questions}     \newlength{\spacer}     \setlength{\spacer}{1in}          \begin{tabularx}{\textwidth}{ XX }         \question $\left(\sec\theta+\tan\theta\right)\left(\sec\theta-\tan\theta\right)=1$              & \question $\dfrac{1-\sin\theta}{1+\sin\theta} = \left(\sec\theta-\tan\theta\right)^2 $     \\ [\spacer]         \question $\tan^2\theta\cos^2\theta+\cot^2\theta\sin^2\theta=1 $              & \question $\sec^4\theta - \sec^2\theta= \tan^4\theta + \tan^2\theta $  \\ [\spacer]         \question $\sec\theta-\tan\theta=\dfrac{\cos\theta}{1+\sin\theta} $              & \question $3\sin^2\theta+4\cos^2\theta=\cos^2\theta+3 $    \\ [\spacer]         \question $1-\dfrac{\sin^2\theta}{1+\cos\theta} = \cos\theta $              &    \question $\cos^2\theta\left(1+\tan^2\theta\right)=1$ \\ [\spacer]     \end{tabularx}     \end{questions}     \end{document}      ![layout of exercises on page](http://i.stack.imgur.com/39RYf.jpg) I know that this is not what tabular environments were designed for, and it's obviously less than ideal, especially when things have different heights. But what should I be using instead of `tabular`?


title: How to remove an entry location for a particular reference of the glossary term?

text: I'm using a custom command `\addacronym` which creates two glossary entries for each acronym:   * the main entry and   * a cross-reference from the abbreviation to the main entry. I also had to redefine the `\glsseeitemformat` command to change the text of the cross-reference links to the long versions of the acronyms by calling `\acrlong`. The problem is that this command adds a new entry location to the main glossary term. How can I avoid that? Here is a MWE:               \documentclass{article}          \usepackage[hidelinks]{hyperref}          \usepackage{glossaries}          \makeglossaries          % A new command creates two glossary entries for each acronym (the main entry     % and a cross-reference from abbreviation to the main entry).     % Syntax: \addacronym[options]{label}{abbreviation}{long}{description}     \newcommand{\addacronym}[5][]{       % Create the main glossary entry with \newacronym       % \newacronym[key-val list]{label}{abbrv}{long}       \newacronym[         name={#4 (#3)},         description={#5},         #1 % pass additional options to \newglossaryentry         ]         {#2}{#3}{#4}       % Create a cross-reference from the abbreviation to the main glossary entry by       % creating an auxiliary glossary entry (note: we set the label of this entry       % to '<original label>_auxiliary' to avoid clashes)       \newglossaryentry{#2_auxiliary}{         name={#3},         sort={#3},         description={\makefirstuc{#4}},         see=[See:]{#2}       }     }          % Change the text of the cross-reference links to long versions of the acronyms     \renewcommand*{\glsseeitemformat}[1]{\emph{\acrlong{#1}}.}          \addacronym      {sample} % label      {ABR} % abbreviation      {long version of the acronym}      {Description of the acronym}          \begin{document}          The first occurrence of the acronym would look like:     \gls{sample}.     Further occurrences would look like: \gls{sample}.          \newpage          \printglossaries          \end{document}      It produces two pages. First page: ![enter image description here](http://i.stack.imgur.com/mXFAh.png) Second page: ![enter image description here](http://i.stack.imgur.com/B2dSA.png) The entry location I want to remove is crossed-out in red.


title: beamer and forest

text: I am preparing beamer presentation and flow chart using forest. For some reason, it is suggesting extra `}` or problem with `\end{frame}`. Here is the code:               \documentclass[12pt,a4paper]{beamer}     \usepackage[latin1]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{forest}     \usetheme{CambridgeUS}     \usefonttheme{professionalfonts}     \author{Dr Vaibhav Banait, }     \title{Hepatitis B and C (For healthcare workers)}     \begin{document}          \begin{frame}     \centering               \begin{forest}     [Exposure to infected blood     [acute hepatitis b     [recovery]     [Carrier state]     [Chronic hepatitis B     [Cirrhosis][Liver Cancer]     ]]     [acute hepatitis c     [recovery]     [chronic hepatitis c     [Cirrhosis][Liver Cancer]     ]          ]     ]     \end{forest}     \end{frame}     \end{document}


title: pdfopen / pdfclose don't work with Acrobat/Adobe Reader XI

text: Can anybody explain how to get `pdfopen`/`pdfclose` working for Adobe Reader XI? If you could make your instructions as detailed as possible that would be really appreciated. I'm using Miktex 2.9 on Windows 7. Tex editor Winedt version 5.5 More information on problem: If Adobe Reader (AR) is closed and I hit Pdf Texify button on Winedt The program compiles and AR opens, however, immediately the file Acrobat OpenDoc.edt opens in Winedt editor and the following message pops up: > Cannot Open DDE link to: "C:\Program Files (x86) \Adobe\Reader > 11.0\Reader\AcroRd32.edx" Service: Acroview Topic:control > DDEOpen(‘%$(“AcroRead”)’,”acroview”,”control”,0); If I want to compile my tex file again, I need to first manually close AR. I thought it might be connected to the problem described here: http://sourceforge.net/p/miktex/bugs/2190/ but I don't know how to implement what is suggested.


title: LyX + fancyhdr issue on chapter

text: I have a LyX document in which I have set a standard header, as is               \fancyhf{}     \fancyhead[EC]{\leftmark}     \fancyhead[ER]{\thepage}     \fancyhead[OC]{\leftmark}     \fancyhead[OL]{\thepage}      And I have created another style, that I want to use exclusively at a new section page               \fancypagestyle{secstyle}{%     \fancyhf{}     \fancyfoot[C]{\thepage}}      A new section needs to be on a new odd numbered page, and the "white page", when existent, must also be plain white. So I had this               \let\stdsection\section     \renewcommand{\section}{\cleardoublepage\stdsection}      and I've tried doing the following               \renewcommand{\section}{\cleardoublepage{\thispagestyle{secstyle}}\stdsection}      and it didn't work. Any ideas?


title: Separation of last author with \citep

text: I came across a solution on how to make an author list where the last author is preceded by "and", as shown in this code:               \newcommand\MidSep{, }% separator for two elements, not the last two (for citeauthorlist and citetlist)     \newcommand\LastSep{ and }% separator for last two elements          \newcommand\citetlist[1]{%       \let\last@elem\relax       \let\last@sep\relax       \@for\@list:=#1\do{%         \ifx\last@elem\relax\else           \ifx\last@sep\relax             \def\last@sep{\LastSep}% the separator between the last two elements should is "and"           \else\MidSep  % the separator between two elements (not the two last) is a comma           \fi           \citet{\last@elem}%         \fi         \let\last@elem\@list       }% the last element of the list:       \ifx\last@elem\relax\else         \last@sep\citet{\last@elem}%       \fi     }      The output is: Author A (2011); Author B (2012) and Author C (2013) I want the same, but for `\citep`. I would like to have: (Author A, 2011; Author B, 2012 and Author C, 2013). I'm using `natbib` package along with the `IEEEtranSN` bibliography style


title: How can I use fork style edges with explicitely positioned TikZ tree nodes?

text: As part of a graphical export facility, I try to render a tree in TikZ were all the node positions are exactly given and were the edges are fork-style. Doing that without the _trees_ package demands that I calculate the edge 'corners' by myself, based on the given node coordinates, which I would like to avoid. Adding explicitly positioned nodes to a TikZ tree is messing up the layout, since (according to the manual), TikZ is changing the coordinate system for each child node. Without trees:               \documentclass{article}     \usepackage{tikz}     \begin{document}          \begin{figure}     \begin{tikzpicture}     \node at (10, 10) (root) {root} ;     \node at (10, 7) (lvl1middle) {lvl1middle} ;     \node at (8, 6) (lvl2left) {lvl2left} ;     \node at (13, 5) (lvl2right) {lvl2right} ;     \node at (10, 5) (lvl2middle) {lvl2middle} ;     \draw (root) -- (lvl1middle);     \draw (lvl1middle) -- (lvl2left);     \draw (lvl1middle) -- (lvl2middle);     \draw (lvl1middle) -- (lvl2right);     \end{tikzpicture}     \end{figure}     \end{document}      With trees:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{trees}      \begin{document}          \begin{figure}     \begin{tikzpicture}     \node at (10, 10) (root) {root}         [edge from parent fork down]         child { node at (10, 7) (lvl1middle) {lvl1middle}              child { node at (8, 6) (lvl2left) {lvl2left} }             child { node at (13, 5) (lvl2right) {lvl2right} }             child { node at (10, 5) (lvl2middle) {lvl2middle} }         };      \end{tikzpicture}     \end{figure}     \end{document}


title: How do I use pdfliteral with tikz?

text: I am learning tikz and how to draw stuff in it. One of the examples I have is to draw the periodic table (since I need to be able to draw a nice one and modify it to my needs). The piece of code that is giving me problems is:               \ifpdf       % Couldn't find a nicer way of doing an outline font with TikZ       % other than using pdfliteral 1 Tr            \pdfliteral direct {0.5 w 1 Tr}{#1}%       \pdfliteral direct {1 w 0 Tr}%     \else        %pstricks can do this with \pscharpath from pstricks            \pscharpath[shadow=false,         fillstyle=solid,         fillcolor=white,         linestyle=solid,         linecolor=black,         linewidth=.2pt]{#1}      \fi      This code compiles well and produces text that has a black outline and is filled in white (when combined with all the other commands). What I want is to change the color of the fill. I cannot find information on `\pdfliteral` and the code given makes no sense to me. The `pstricks` part is easy. Can someone please explain this very strange way of writing commands and what each part of the command means?


title: Package biblatex and subfile not working in subfiles

text: I am trying to use `biber` and package `subfile`. Thank to the community I manage to make it run in the main file. See here: Bibliographies when using subfiles The file `bbl` is not created in the folder where I have my subfile and I get the error:                ! Package biblatex Error: File '05-Introduction.bbl' not created by biblatex.     See the biblatex package documentation for explanation.     Type H <return> for immediate help.     ...     l.3 \begin{document}     This file was apparently not created by biblatex. Rename it or     move it to a location were TeX will not find it. If this error     persists, consider redefining \blxauxsuffix.See the biblatex     manual for details.      I have to precise that I use subfile with the following structure               ./main/main.tex     ./tex/05-Introduction.tex     ./biblio/biblio.bib     ./mystyle.sty      I am running window 7 64bit with MiKTeX 2.9, TeXmaker 4, jabref 2.9 Texmaker and bib database are in UTF8. I already spent 1.5 day to make it work and it is the last bit that is still missing.


title: How to print HTML entities in Latex using pdflatex

text:
I've string of HTML entities containing characters in devnagri font. Sample HTML Entity String is :
इनपुट साधने ऑनलाइन वापरून पहा

आपण निवडलेल्‍या भाषेमध्‍ये टाइप करणे सोपे बनवतात
      I'm looking for LATEX package, which will help to print characters corresponding to HTML Entities using pdflatex. [Sample code to print unicode is mentioned below to show list of packages which I'm already using. Is there any similar way to print HTML Entities]               \documentclass[addpoints,answers,10pt]{exam}     \usepackage{multicol}     \usepackage[T1]{fontenc}     \usepackage{graphicx}     \usepackage{tabularx}     \usepackage{nonfloat}     \usepackage{caption}     \usepackage{amsmath,amssymb}     \usepackage{lmodern}     \usepackage{textcomp}     \usepackage[utf8x]{inputenc}     \usepackage{ifpdf}     \begin{document}     \begin{multicols}{2}     \begin{questions}     \question[4]     \unichar{"00E4}     \end{questions}     \end{multicols}     \end{document}


title: LaTeX beamer package and growing figures

text: I'm using `beamer` package in LaTeX to build my slides. I saw in some final examples in LaTeX (I mean, I saw the PDF format and not the tex format), that contains an image that is being build along several slides. For example:               On slide1:          >          On slide2:          ->          On slide3:          -->          On slide4:          --->      Please imagine this picture as an arrow growing. In this case, I'm building an arrow, but what I really like is having a state diagram appearing along the slides. Is it possible to build this? 2 - If I have the state diagram as an PDF file, and I import the PDF file to the LaTeX, can I put the feature explained on 1) in the imported file?


title: LaTeX Error-Missing Begin Document

text: Below is the LaTeX code for which I am getting the LaTeX error missing `\begin document{}`. How can I resolve this error?                \documentclass{acm_proc_article-sp}         \usepackage{algorithmic}         \usepackage{soul}         \usepackage[english]{babel}         \usepackage{setspace}         \usepackage{psfrag}         \usepackage{epsfig}         \usepackage{graphicx}         \usepackage{amssymb,amsmath}         \usepackage{graphicx}         \usepackage{footmisc}         \usepackage{cases}         \usepackage{verbatim}         \usepackage{fancyhdr}         \usepackage{color}         \usepackage{url}         \usepackage[capitalize]{cleveref}         \usepackage{placeins}         \usepackage{subfigure}         \usepackage{multirow}         \usepackage{makecell}         \usepackage{amsthm}         \usepackage{setspace}         \usepackage{moreverb}         \usepackage{paralist}         \let\proof\relax         \let\endproof\relax              \def\nref#1{(\ref{#1})}         \def\figref#1{Fig.~\ref{#1}}         \def\Dirfig{./Figures/}                        \begin{document}          \title{}         \maketitle         \begin{abstract}              \end{abstract}                        \keywords{D, P, E}                    \bibliographystyle{plain}              \bibliography{allcomm}         \end{document}      Here is what I get by using \filelist in the log file               This is pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9 64-bit) (preloaded format=pdflatex 2013.10.13)  13 OCT 2013 07:50     entering extended mode     **e2sc.tex     (F:\phases4en\trunk\PowerAwSC13\e2sc.tex     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar     abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,      croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga     lician, german, german-x-2012-05-30, greek, gujarati, hindi, hungarian, iceland     ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin, latvian,      lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, n     german-x-2012-05-30, nynorsk, oriya, panjabi, pinyin, polish, portuguese, roman     ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerm     an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl     ishmax, welsh, loaded.     (F:\phases4en\trunk\PowerAwSC13\acm_proc_article-sp.cls     ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\epsfig.sty"     Package: epsfig 1999/02/16 v1.7a (e)psfig emulation (SPQR)          ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphicx.sty"     Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)          ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\keyval.sty"     Package: keyval 1999/03/16 v1.13 key=value parser (DPC)     \KV@toks@=\toks14     )     ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphics.sty"     Package: graphics 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)          ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\trig.sty"     Package: trig 1999/03/16 v1.09 sin cos tan (DPC)     )     ("C:\Program Files\MiKTeX 2.9\tex\latex\00miktex\graphics.cfg"     File: graphics.cfg 2007/01/18 v1.5 graphics configuration of teTeX/TeXLive     )     Package graphics Info: Driver file: pdftex.def on input line 91.          ("C:\Program Files\MiKTeX 2.9\tex\latex\pdftex-def\pdftex.def"     File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX          ("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\infwarerr.sty"     Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO)     )     ("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ltxcmds.sty"     Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)     )     \Gread@gobject=\count79     ))     \Gin@req@height=\dimen102     \Gin@req@width=\dimen103     )     \epsfxsize=\dimen104     \epsfysize=\dimen105     )     ("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\amssymb.sty"     Package: amssymb 2013/01/14 v3.01 AMS font symbols          ("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\amsfonts.sty"     Package: amsfonts 2013/01/14 v3.01 Basic AMSFonts support     \@emptytoks=\toks15     \symAMSa=\mathgroup4     \symAMSb=\mathgroup5     LaTeX Font Info:    Overwriting math alphabet `\mathfrak' in version `bold'     (Font)                  U/euf/m/n --> U/euf/b/n on input line 106.     ))     ("C:\Program Files\MiKTeX 2.9\tex\latex\amsmath\amsmath.sty"     Package: amsmath 2013/01/14 v2.14 AMS math features     \@mathmargin=\skip41          For additional information on amsmath, use the `?' option.     ("C:\Program Files\MiKTeX 2.9\tex\latex\amsmath\amstext.sty"     Package: amstext 2000/06/29 v2.01          ("C:\Program Files\MiKTeX 2.9\tex\latex\amsmath\amsgen.sty"     File: amsgen.sty 1999/11/30 v2.0     \@emptytoks=\toks16     \ex@=\dimen106     ))     ("C:\Program Files\MiKTeX 2.9\tex\latex\amsmath\amsbsy.sty"     Package: amsbsy 1999/11/29 v1.2d     \pmbraise@=\dimen107     )     ("C:\Program Files\MiKTeX 2.9\tex\latex\amsmath\amsopn.sty"     Package: amsopn 1999/12/14 v2.01 operator names     )     \inf@bad=\count80     LaTeX Info: Redefining \frac on input line 210.     \uproot@=\count81     \leftroot@=\count82     LaTeX Info: Redefining \overline on input line 306.     \classnum@=\count83     \DOTSCASE@=\count84     LaTeX Info: Redefining \ldots on input line 378.     LaTeX Info: Redefining \dots on input line 381.     LaTeX Info: Redefining \cdots on input line 466.     \Mathstrutbox@=\box26     \strutbox@=\box27     \big@size=\dimen108     LaTeX Font Info:    Redeclaring font encoding OML on input line 566.     LaTeX Font Info:    Redeclaring font encoding OMS on input line 567.     \macc@depth=\count85     \c@MaxMatrixCols=\count86     \dotsspace@=\muskip1


title: Showing the bibliographic entry in a popup when you hover over the citation key

text: I thought it would be useful to have bibliographic entries displayed as a tooltip so readers are not interrupted by following hyperlinks or trying to find the Bibliography, so I created the following command:               \newcommand\annocite[1]{\pdfmarkupcomment[markup=Underline,subject=Citation]        {\parencite{#1}}{\fullcite{#1}}}      Unfortunately this does not work. Instead of showing the bibliographic entry in the popup, it merely displays the citation key; i.e., the `\fullcite` command seems to have no effect. I believe the problem is related to argument expansion. Here is a MWE:               \documentclass{article}     \usepackage{biblatex,pdfcomment,filecontents}     \bibliography{\jobname}          \newcommand\annocite[1]{\pdfmarkupcomment[markup=Underline,subject=Citation]         {\parencite{#1}}{\fullcite{#1}}}          \begin{filecontents}{\jobname.bib}     @article{Bli74,       author = {Blinder, Alan S.},       year = {1974},       title = {The economics of brushing teeth},       journaltitle = {Journal of Political Economy},       volume = {82},       number = {4},       pages = {887--891},     }     \end{filecontents}          \begin{document}     Hover over this citation: \annocite{Bli74}          The tooltip should contain the following text: \fullcite{Bli74}          \end{document}      Can anyone think of a solution, or better, a way to redefine biblatex' citation commands (e.g., `\parencite`, `\cite`) to do this automatically?


title: Showing the bibliography in popup on mouseover

text: > **Possible Duplicate:**   >  Showing the bibliographic entry in a popup when you hover over the citation > key Recently, I read a paper published in the Compositio Mathematica journal and found a very interesting feature. When I move my mouse over a link which links to a reference, I get detail of the reference showing as a popup window in yellow. I'm interested in knowing how one can do that.


title: Bottom-aligning columns with tikzposter

text: I am using the tikzposter class to create a poster and have three columns extending almost to the bottom of the page. I would like to stretch the space in between `blocks` so that the bottoms of the final block in each column line up. A solution which could be modified pad the contents of the block to achieve the same thing would be ideal for if I ever make another poster where the columns are not as similarly sized. I know this is possible in the beamerposter class, but I have no desire to switch poster classes at this late stage (and tikzposter has very nice default themes). Since tikzposter positions the blocks using tikz, and not the normal LaTeX positioning, it seems like using rubber lengths or `\vfill` directly is out. So, is there a reasonable way of doing this? I don't mind a solution that hacks around with the tikzposter class itself, or has to write things to the aux file.


title: Insert image in LaTeX

text: I'm trying to insert an image in LaTeX with some text around:               Here is our image:     \begin{figure}[h!]         \centering         \includegraphics[width=0.5\textwidth]{idefA0.jpg}         \caption{IDEF0}     \end{figure}     Here is some text!      I'd like to insert image and 'Here is some image' on the same page, but when i'm trying to compile pdf I get: `Warning! !h changed to !ht` and places an image on the next page, and `here is some text` goes right after `Here is some image` What's wrong?


title: Is there any easy way to put boxes around text of selected pages with the page number below the box?

text: I'd like to be able to create boxes around a whole page or selection of pages with the box extending the full length of the page but with the bottom edge of the box above the page number as in the attached example. It would be ideal if this could be defined as an environment so that all pages in that environment are boxed. This environment could be used to set an executive summary off from the rest of the document. Any hints or suggestions would be much appreciated. ![Boxed Page](http://i.stack.imgur.com/6sxca.png)


title: How I can code long down arrow in equations

text: I want to design an equation which includes a long down arrow and long up arrow. I'm having just down arrow which is short. I need some help. ![enter image description here](http://i.stack.imgur.com/dBhev.png)


title: Turn off List of Figures for Appendix material

text: How do I prevent figures in the Appendix from appearing in the list of figures? It seems that after the command `\appendix` the numbering automatically starts. I've tried leaving the first part in the caption command blank like this:               \caption[ ]{First figure caption.}      but I still get a number in the List of Figures: > A.1 ........................23 I have also tried `\captionsetup{list=no}` which seems to have no effect at all. I want nothing in the list of figures for appendix material.


title: tikzscale does not work with the Beamer class

text: I couldn't get tikzscale work with the Beamer document class. Here is a minimal example: **Main.tex** :               \documentclass{beamer}          \usepackage{tikz}     \usepackage{tikzscale}          \begin{document}         \begin{frame}             \includegraphics[width=\linewidth]{Test.tikz}         \end{frame}      \end{document}      **Test.tikz** :               \begin{tikzpicture}         \draw (0,0) rectangle (5,5);     \end{tikzpicture}      This produces the following errors:               line 9: Missing \endcsname inserted \end{frame}     line 9: pgfkeys: I do not know the key '/tikzscale/width=\linewidth ' and I am going to      If I change to another document class and remove the "frame"-environment all works fine. I use a updated TeX-Live 2012 on Windows 7 x64. My used version of tikzscale is v0.2.2 Edit: After a bug-report to the package author the problem is now fixed. :-)


title: Slides justification in TeXnicCenter

text: I could not use the justification in slide presentation. In TeXnicCenter there is center, left alignment and right alignment but I did not see the justification. Is there anyway so that I can fix it.


title: Blank lines in tabular environment

text: I have a problem. I am making a table in the tabular environment; it has multirows and multicolumns and cell colours and all the usual haberdashery. However, there are lines missing in the table (e.g. at the edges of particular cells) and I can't seem to fix them. Here is my MWE:               \documentclass[12pt,letterpaper,twoside,openright]{book}     \usepackage[margin=1.0in]{geometry}          \usepackage{multirow}     \usepackage{booktabs}          \usepackage{hhline}          \usepackage[table]{xcolor}     \usepackage{rotating}     \usepackage[para]{threeparttable}          \usepackage[font=footnotesize,labelfont=bf]{caption}     \usepackage{color, colortbl}          \begin{document}          \begin{table}     \centering     \captionsetup{font=large}     \caption{caption}     \begin{threeparttable}     \begin{tabular}{|c|c|c|c|c|c|}     \hline     \parbox[t]{2mm}{\multirow{6}{*}{\rotatebox[origin=c]{90}{Response 2}}}     & Not tested & 0 & 0 & 0 & 2 \\ \hhline{~|-|-|-|-|-|}     & Nil & 1 & 1 & 0 & 0 \\ \hhline{~|-|-|-|-|-|}     & Inhibited & \cellcolor{green!25}6 & \cellcolor{blue!25}7$^{\dagger}$ & 2 & 1 \\ \hhline{~|-|-|-|-|-|}     & Excited & \cellcolor{red!25}20$^\ast$ & \cellcolor{yellow!25}3 & 0 & 0 \\ \hhline{~|-|-|-|-|-|}     & Total & Excited & Inhibited & Nil & Not tested \\ \hhline{~|-|-|-|-|-|}     & \multicolumn{5}{c}{Response 1} \\ \hhline{|-|-|-|-|-|-|}     \end{tabular}     \begin{tablenotes}     \footnotesize        \item[$\ast$] \textcolor{red}{footnote 1} \\        \item[$\dagger$] \textcolor{blue}{footnote 2}     \end{tablenotes}     \end{threeparttable}     \end{table}          \end{document}      As you can see the far left hand line on the table has little breaks in it, and the bottom right hand corner is not showing a border!! Can someone help me please? Thanks, L


title: Adding different kinds of entities to table of contents

text: I have a number of different kinds of entities in a document using the book documentclass. There are Chapters, Labs, Appendices, etc. Just taking labs as an example, I created a newcommand that defines labs and autonumbers them. I would like them to be in the table of contents at the same level as a Chapter. Right now, as a quick hack, I make labs chapters, which makes them show up, but they display a chapter number and a lab number.               \newcounter{lab}     \newcommand{\lab}[1]{\stepcounter{lab} \chapter{Lab \arabic{lab}: #1}}      How do I specify what entities go into a table of contents? In addition, if I were to create my own independent equivalent of a chapter, In this other question: Custom \chapter definition In one of the answers, I saw reference to the definition of the chapter macro, and I am not seeing how chapter sets the font and text size? Here is the code:               \newcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi                         \thispagestyle{plain}%                         \global\@topnum\z@                         \@afterindentfalse                         \secdef\@chapter\@schapter}      The upshot is, how can I create new entities to put into a table of contents, and how do those entities define their look?


title: T pole in the xcoffins package

text: The documentation for the xcoffins package states: > In addition, coffins containing vertical-mode material also feature poles > which reflect the richer nature of these systems: > > `B` a pole running along the baseline of the material at the bottom of the > coffin. > > `T` a pole running along the baseline of the material at the top of the > coffin. In this example I can't see the difference between `t` and `T`:               \documentclass{article}     \usepackage{xcoffins}     \begin{document}     \NewCoffin \MyCoffin      \SetVerticalCoffin \MyCoffin {60pt} {\noindent This\\ is a\\ small\\ g.}     \DisplayCoffinHandles \MyCoffin {red}     \end{document}      ![This is a small g.](http://i.stack.imgur.com/gU0Kx.png)


title: biblatex, full citation and short citations

text: I have this problem. After the last modification, I have the following Biblatex part in my preamble:               \usepackage[style=verbose-    ibid,firstinits=true,sorting=nty,sortcites=true,useprefix=false,isbn=false,maxnames=6,backend=biber]{biblatex} % originally the style was verbose-ibid     %\usepackage[style=footnote-dw,namefont=smallcaps,firstinits=true,idembib=true,idembibformat=dash,nopublisher=false,edbyidem=false,backend=biber]{biblatex}     %%\DeclareFieldFormat{shorttitle}{\mkbibemph{#1}}     %\DeclareFieldFormat[article]{title}{\mkbibquote{#1}}     %\DeclareFieldFormat{journaltitle}{\mkbibemph{#1}}     %\DeclareFieldFormat{editor}{\mkbibnormal{#1}} %take off the uppercase from the editor, it does not work yet     \renewcommand*{\mkbibnamelast}[1]{\textsc{#1}}     \renewcommand*{\newunitpunct}{\addcomma\space}%put commas instead of periods after some elements of the title     %\usepackage{biblatex}%remove �in� in journal articles     \renewbibmacro{in:}{%     \ifentrytype{article}{}{%     \printtext{\bibstring{in}\intitlepunct}}}     \renewcommand*{\labelnamepunct}{\addcomma\space}     \renewcommand*{\nametitledelim}{\addcomma\space}     \renewcommand*{\bibfont}{\small}          \renewbibmacro*{publisher+location+date}{%     \printtext[parens]{% ADDED     \printlist{location}%     \iflistundef{publisher}       {\setunit*{\addcomma\space}}       {\setunit*{\addcolon\space}}%     \printlist{publisher}%     \setunit*{\addcomma\space}%     \usebibmacro{date}%     }%\nopunct% ADDED     \newunit}     %for citing short forms     \renewbibmacro*{cite:short}{%     \printnames{labelname}%     \setunit*{\nametitledelim}%     % If article:     \ifentrytype{article}{%         \usebibmacro{journal}%         \setunit{\addspace}%         \printfield{volume}}{%     % If incollection:     \ifentrytype{incollection}{%         \usebibmacro{in:}%         \printtext[booktitle]{\printfield[titlecase]{booktitle}}}{%     % Else:     \printtext[bibhyperlink]{\printfield[citetitle]{labeltitle}}}}}          %for defining shorthands     \defbibcheck{noshorthand}{%     \iffieldundef{shorthand}{}{\skipentry}%     }          \DeclareFieldFormat{postnote}{\mkcomprange[{\mkpageprefix[pagination]}]{#1}}     \DeclareFieldFormat{pages}{\mkcomprange{#1}}          \setcounter{mincomprange}{100}     \setcounter{maxcomprange}{100000}     \setcounter{mincompwidth}{10}          \makeatletter     \patchcmd{\blx@comprange@check}     {\blx@comprange@comp{#1}{#2}}     {\blx@tempcnta=#1     \divide\blx@tempcnta100     \multiply\blx@tempcnta100     \ifnumequal{\blx@tempcnta}{#1}      {\blx@range@out@value{#1\bibrangedash#2}}      {\blx@comprange@comp{#1}{#2}}}     {}{}     \makeatother          \DeclareFieldFormat{postnote}{#1}% no postnote prefix in "normal" citation commands     \DeclareFieldFormat{multipostnote}{#1}% no postnote prefix in "multicite" commands      I do not include the bibliographic entry, as it would be the usual in any case. I have not found the information, but I would like to know whether a cite command exists in biblatex to use for having a full quotation of an article for the first quotation of the article itself, with the total page range, and another command when I can quote the first article without having the total page range. So for example no. 1, J. Robinson, "The Missing Island", Nature 78 (2008), 123-135 and for example no. 2, J. Robinson, "The Missing Island", Nature 78 (2008), [without page range] This is also for inquotation for instance. This would be useful in the cases you need to mention the exact pages from an article, without mention them all. The full citation would be in the bibliography in any case. The only solution I have at the moment, is of modifying in order that the full page range will not appear at all, but this means I have to retype the information as needed, instead of a command.


title: Color underline a formula

text: I want to underline different parts of a formula with different colors. What is the best possible option? Soul seems only to provide one color per document.


title: The french babel gives me a missing \begin{document}

text: My impression is that is an already answered question. However, I am really stuck with this: This code:               \documentclass[french]{book}          \usepackage[utf8]{inputenc}     \usepackage{babel}          \usepackage{lipsum}     \usepackage[backend=biber,     uniquename=false,     uniquelist=false,     style=apa,     doi=false,     isbn=false,     url=false,     maxcitenames=3,     uniquelist=false,     natbib]{biblatex}              %%Bibliography format     \addbibresource{allbiblio.bib}     \DeclareLanguageMapping{frenchb}{american-apa}          \AtEveryBibitem{\clearfield{labelmonth}}     \AtEveryBibitem{\clearfield{note}}          \DefineBibliographyStrings{frenchb}{bibliography = {Bibliographie}, references = {Références},}               \begin{document}          \lipsum          An example of citation \citet{Aslin1998}          \printbibliography          \end{document}      gives the following error:               ! LaTeX Error: Missing \begin{document}.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.515   \StartBabelCommands*{\BabelLanguages}{d                                                    ate}      I tried some other thing in place of "french" :   * "francais" and "frenchb" give the same output   * Other language as "english", "canadian"... are ok when I delete the .aux files And when I try to just remove the babel package :               \documentclass{book}          \usepackage[utf8]{inputenc}               \usepackage{lipsum}     \usepackage[backend=biber,     uniquename=false,     uniquelist=false,     style=apa,     doi=false,     isbn=false,     url=false,     maxcitenames=3,     uniquelist=false,     natbib]{biblatex}              %%Bibliography format     \addbibresource{allbiblio.bib}     \DeclareLanguageMapping{frenchb}{american-apa}          \AtEveryBibitem{\clearfield{labelmonth}}     \AtEveryBibitem{\clearfield{note}}          \DefineBibliographyStrings{frenchb}{bibliography = {Bibliographie}, references = {Références},}               \begin{document}          \lipsum          An example of citation \citet{Aslin1998}          \printbibliography          \end{document}      I can't get rid of this error:               ! Undefined control sequence.     <argument> \mkbibdateapalongextra                                        {labelyear}{labelmonth}{labelday}\iffieldu...      **Question:** Is there a way to create document in french (and keep the american APA formatting for the bibliography) ?


title: Extracting the "parent" counter of a sectional unit

text: I am interested in finding the "parent" counter of a specific sectional unit. For example, in the following document structure               1. A section     1.1 A subsection     1.1.1 A subsubsection     1.1.2 A subsubsection     1.1.2.1 A paragraph     1.2 A subsection     1.2.1 A subsubsection     1.2.1.1 A paragraph     1.2.1.2 A paragraph     1.2.2 A subsubsection      the (immediate) "parent" of subsubsection 1.2.1 is (subsection) 1.2. The (immediate) "parent" of (paragraph) 1.1.2.1 is (subsubsection) 1.1.2. The solution should be   * of the form `\parentlabel` that one can call within some sectional unit;   * be able to work with sectional units that have no parent. For example, if the sectional unit is `\chapter`, with `\thechapter` defined as `\arabic{chapter}`, `\parentlabel` should be empty `{}` (say); and   * flexible enough so that redefinition of (say) counter displays does not play a role. That is, if one chooses to use `-` instead of `.`, the solution should still hold. So I don't think string parsing (using, say, `xstring`) would be useful. Here is one attempt and a minimal playground: ![enter image description here](http://i.stack.imgur.com/vF85a.png)               \documentclass{article}     \def\parentlabel{\relax}% Placeholder for parent counter/level/label     \makeatletter     \let\oldsection\section     \renewcommand{\section}{\edef\parentlabel{\@currentlabel}\oldsection}%     \let\oldsubsection\subsection     \renewcommand{\subsection}{\edef\parentlabel{\@currentlabel}\oldsubsection}%     \let\oldsubsubsection\subsubsection     \renewcommand{\subsubsection}{\edef\parentlabel{\@currentlabel}\oldsubsubsection}%     \let\oldparagraph\paragraph     \renewcommand{\paragraph}{\edef\parentlabel{\@currentlabel}\oldparagraph}%     \newcommand{\showparent}{Current: \@currentlabel; Parent: \parentlabel}     \makeatother     \setcounter{secnumdepth}{4}     \begin{document}     \section{A section} \showparent     \subsection{A subsection} \showparent     \subsubsection{A subsubsection} \showparent     \subsubsection{A subsubsection} \showparent     \paragraph{A paragraph} \showparent     \subsection{A subsection} \showparent     \subsubsection{A subsubsection} \showparent     \paragraph{A paragraph} \showparent     \paragraph{A paragraph} \showparent     \subsubsection{A subsubsection} \showparent     \end{document}      The method relies on capturing `\@currentlabel` before it is updated via a sectional command. It is obvious that this methods works fine while drilling down the sectional levels. However, stepping back to a higher level leaves `\parentlabel` to not accurately represent the "parent" label.


title: Basic question on spaces

text: I'm trying to learn LaTeX in my spare time using "Learning LaTeX" by Griffiths and Hingham. I copied down the example code on page 6 and when I compile it there's no paragraphs. Could someone point out where i've gone wrong? Here's the code               \documentclass{article}          \begin{document}          This is a short document to illustrate the basic use of \LaTeX.          Simply leave a blank line to start a new paragraph; indentation is automatic.          Mathematical expressions such as $y = 3 \sin x$ are obtaines with dollar signs. Equations can be displayed, as in      \[       y = 3 \sin x .     \]     Numbered equations are also possible :      \begin{equation}\label{banana}       y = 3 \sin x     \end{equation}     Because we have labeled this equation we can refer to it without having to know its number. Thus, the preceding equation was number~(\ref{banana}).          Powers (also known as superscripts), as in $x^2$ are obtained with \verb"^";     more complicated powers must live in curly braces: $x^{2+\alpha}$.          Likewise, indices (also known as subscripts) are obtained with the underscore: $y_3$ or $y_{n+1}$          We can get both indices and powers at the same time!     $x_{n_1}^{2+\alpha}$          \end{document}       Does it matter what text editor and compiler I use? Sorry about how simple this question is but I can't find anything about paragraphs not showing up online. I ran the compiler a couple of times as well, the paragraphs still arent showing up. Sorry if this is too basic a question for the forum, but I don't know where else to ask.


title: How to easily use UTF-8 with LaTeX?

text: It's probably a stupid question, but I cannot find any easy answers online, and the answers are sometimes contradictory. I am writing a document that uses a few strange alphabets. I want to use some LaTeX variant for typesetting, but nothing works. For example, if I take this document with four example words (one in Russian, one in Czech, one in latin with length indication, one in Vietnamese)               \documentclass[12pt,a4paper]{report}          \usepackage[utf8]{inputenc}     \begin{document}     Днепр kůň dominī Ngữ     \end{document}      and put it through `xelatex`, which people recommend for Unicode, all I get is this ![k domin Ng](http://i.stack.imgur.com/04szt.png) which is not exactly what I want. What is the easiest way of putting UTF-8 encoded file on one side and getting actual text on the other side? edit: To add more information. I am using Ubuntu operating system, and I want to use some font appropriate for a bigger thesis (something like Computer Modern is fine, although I personally prefer Palatino-style fonts)


title: labbook/scrbook new chapter not on separate page

text: I am using labbook document class which relies on scrbook. It starts a new page for each chapter, which I don't want to happen. Is there a way to force it to procede with a new chapter on the same page where the previous ends? I tried               \usepackage{etoolbox}     \makeatletter     \patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{}{}{}     \makeatother      but it did not work. Here is the MWE:               \documentclass[oneside]{labbook}          \usepackage{etoolbox}     \makeatletter     \patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{}{}{}     \makeatother          \begin{document}          \labday{Monday}     First day in the lab.     \labday{Tuesday}     Second day in the lab.          \end{document}      Any suggestions?