title: \newpage and \clearpage does not work

text: The following problem shows up: Usually after the end of every chapter, there's a blank page before the new chapter starts in my document. Funnily enough, there is one point in my pdf where is no blank page between the end of the chapter and the new chapter. I tried to `\newpage` as well as `\clear` without success. Maybe my .cls file causes the problem. I added some lines of it below. If I add a > `\newpage $\mbox{ }$` it generates two blank pages. Without the $\mbox{ }$ nothing happens. Same for `\clearpage`. Hopefully someone could help me! Thank you for your advices. math abridgment for the .cls file               % RPI option chap:     \newif\ifchap  % true for chap option       \chapfalse   % false by default     \DeclareOption{chap}{\chaptrue} % option to print "Chapter" at each new chapter     \newcommand\docsize{}  % to allow 10pt or 11pt to be specified as option     \DeclareOption{10pt}{\renewcommand\docsize{10pt}}     \DeclareOption{11pt}{\renewcommand\docsize{11pt}}     \DeclareOption{12pt}{\renewcommand\docsize{12pt}}     %  Prepare to load the standard report class (12pt):     \DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}     \ExecuteOptions{12pt}         % define 12pt as the default doc size     \ProcessOptions     \LoadClass[\docsize]{report}  % load report.cls          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %                            SECTION HEADINGS     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%      \newcommand\chaptersize{\large}     \newcommand\sectionsize{\large}     \newcommand\subsectionsize{\normalsize}     \newcommand\subsubsectionsize{\normalsize}     \newcounter{firstchapter}     \setcounter{firstchapter}{0}          \setcounter{secnumdepth}{3}    % Number subsubsections in the chapters     \setcounter{tocdepth}{0}       % Put subsubsections in the table of contents          % Print "CHAPTER" if chap option is specified:     \ifchap       \renewcommand\@chapapp{\chaptername}     \else       \renewcommand\@chapapp{}     \fi          \def\specialhead#1{%   GENERAL HEADING WITHOUT A NUMBER (for abstract, etc.)          \ifx\phantomsection\undefined          \else             \clearpage\phantomsection          \fi          \addcontentsline{toc}{chapter}{#1}          \chapter*{\centering #1 \@mkboth{#1}{#1}}}               \def\@chapter[#1]#2{\ifnum\c@firstchapter=0    % start of rpi added stuff                           \if@twoside\cleardoublepage\suppressfloats[t]\fi                           \pagenumbering{arabic}                            \setcounter{firstchapter}{1}                         \fi                         \renewcommand{\thepage}{\arabic{page}}                         \thispagestyle{plain}                         \pagestyle{myheadings}      % end of rpi added stuff                         \ifnum \c@secnumdepth >\m@ne                              \refstepcounter{chapter}%                              \typeout{\@chapapp\space\thechapter.}%                              \addcontentsline{toc}{chapter}%                                        {\protect\numberline{\thechapter.}#1}%                         \else                           \addcontentsline{toc}{chapter}{#1}%                         \fi                         \chaptermark{#1}%      %                    \addtocontents{lof}{\protect\addvspace{10\p@}}%     %                    \addtocontents{lot}{\protect\addvspace{10\p@}}%                         \if@twocolumn                           \@topnewpage[\@makechapterhead{#2}]%                         \else                           \@makechapterhead{#2}%                           \@afterheading                         \fi}     \def\@makechapterhead#1{%       \vspace*{0\p@}%       {\parindent \z@ \raggedright \centering \normalfont \chaptersize         \ifnum \c@secnumdepth >\m@ne           \ifchap              \bfseries \@chapapp{} \thechapter    % print "Chapter" and number              \vskip -3pt           %\par\nobreak (original)            \else              \bfseries \thechapter.             \fi         \fi         \interlinepenalty\@M         \bfseries #1\par\nobreak         \vskip 15\p@       }}          \def\@makeschapterhead#1{%    heading for chapter* command (no numbering)       \vspace*{0\p@}%       {\parindent \z@ \raggedright \centering         \normalfont  \chaptersize          \interlinepenalty\@M         \bfseries  #1\par\nobreak         \vskip 15\p@       }}          \renewcommand\section{\@startsection {section}{1}{\z@}%                                        {3.5ex \@plus 1ex \@minus .2ex}%                                        {.5ex \@plus .3ex}%{1.4ex \@plus.2ex}%                                        {\normalfont\sectionsize\bfseries}}     \renewcommand\subsection{\@startsection{subsection}{2}{\z@}%                                          {3.25ex\@plus 1ex \@minus .2ex}%                                          {.3ex \@plus .2ex}%{1.2ex \@plus .2ex}%                                          {\normalfont\subsectionsize\bfseries}}     \renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%                                          {3.25ex\@plus 1ex \@minus .2ex}%                                          {.2ex \@plus .1ex}%{1ex \@plus .2ex}%                                          {\normalfont\subsubsectionsize\bfseries}}     % \paragraph and \subparagraph headings unchanged from report.cls.          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %  FOR RPI TITLEPAGE, ABSTR. TITLEPAGE & COPYRIGHT PAGE      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%           \def\thesistitle#1{\gdef\@thesistitle{#1}}      \def\author#1{\gdef\@author{#1}}      \def\degree#1{\gdef\@degree{#1}}      \def\department#1{\gdef\@department{#1}}      \newcount\numcomm \numcomm=1      \def\signaturelines#1{\numcomm=#1}      \def\thadviser#1{\gdef\@thadviser{#1}}       \def\projadviser#1{\gdef\@projadviser{#1}} \projadviser{*}      \def\cothadviser#1{\gdef\@cothadviser{#1}} \cothadviser{*}       \def\coprojadviser#1{\gdef\@coprojadviser{#1}} \coprojadviser{*}      \def\cocothadviser#1{\gdef\@cocothadviser{#1}} \cocothadviser{*}      \def\cocoprojadviser#1{\gdef\@cocoprojadviser{#1}} \cocoprojadviser{*}       \def\doctype{\if \@projadviser *Thesis \else Project \fi}      \def\adviser{\if \@projadviser *\@thadviser \else \@projadviser\fi}      \def\coadviser{\if \@coprojadviser *\@cothadviser\else \@coprojadviser\fi}      \def\cocoadviser{\if \@cocoprojadviser *\@cocothadviser\else \@cocoprojadviser\fi}      \def\memberone#1{\gdef\@memberone{#1}}      \def\membertwo#1{\gdef\@membertwo{#1}}      \def\memberthree#1{\gdef\@memberthree{#1}}      \def\memberfour#1{\gdef\@memberfour{#1}}      \def\memberfive#1{\gdef\@memberfive{#1}}      \def\membersix#1{\gdef\@membersix{#1}}      \def\copyrightyear#1{\gdef\@copyrightyear{#1}} \copyrightyear{\the\year}      \def\submitdate#1{\gdef\@submitdate{#1}}          \newcount\numcount     \def\sigblock{        \ifnum\numcomm < 4  % master's thesis or project          \vskip .8in plus 24pt minus 24pt          %\leftline{Approved: \hfil}\vskip 48pt plus 2pt minus 10pt          %\hrule width 2.6in\hfil \vskip -6pt          \leftline{Supervisor: \adviser\hfil}          \if \coadviser * % no co-adviser            \else \vskip 12pt plus 6pt minus 2pt %\hrule width 2.6in\hfil \vskip -6pt                    \leftline{Coordination: \coadviser\hfil}          \fi          \if \cocoadviser * % no coco-adviser             \else \vskip 36pt %plus 6pt minus 2pt \hrule width 2.6in\hfil \vskip -6pt           \leftline{\cocoadviser, \doctype Adviser\hfil}          \fi             \vskip 6pt         \else  % PhD thesis           \numcount=\numcomm           \leftline{Approved by the\hfil}           \leftline{Examining Committee:\hfil}           \vskip 28pt \vfil            \hrule width 2.8in \hfil \vskip -3pt           \leftline{\adviser, \doctype Adviser\hfil}            \advance \numcount by -1           \if \coadviser * \else % there's a co-adviser             \vskip 19pt\vfil\hrule width 2.8in\hfil\vskip -3pt             \leftline{\coadviser, \doctype Adviser\hfil}             \advance \numcount by -1           \fi           \vskip 19pt\vfil\hrule width 2.8in\hfil\vskip -3pt           \leftline{\@memberone, Member\hfil}           \advance \numcount by -1           \vskip 19pt\vfil\hrule width 2.8in\hfil\vskip -3pt           \leftline{\@membertwo, Member\hfil}           \advance \numcount by -1 \ifnum\numcount > 0           \vskip 19pt\vfil\hrule width 2.8in\hfil\vskip -3pt           \leftline{\@memberthree, Member\hfil}  \fi           \advance \numcount by -1 \ifnum\numcount > 0           \vskip 19pt\vfil\hrule width 2.8in\hfil\vskip -3pt           \leftline{\@memberfour, Member\hfil}   \fi           \advance \numcount by -1 \ifnum\numcount > 0           \vskip 19pt\vfil\hrule width 2.8in\hfil\vskip -3pt           \leftline{\@memberfive, Member\hfil}  \fi           \advance \numcount by -1 \ifnum\numcount > 0           \vskip 19pt\vfil\hrule width 2.8in\hfil\vskip -3pt           \leftline{\@membersix, Member\hfil} \fi           \fi}            \def\sigblockabs{%        \ifnum\numcomm < 4  % master's thesis or project          \vskip 1.8in plus 24pt minus 24pt          \leftline{Approved: \hfil}\vskip 24pt plus 2pt minus 10pt          \leftline{\adviser, \doctype Adviser\hfil}          %\leftline{Supervisor: \adviser \hfil}%my corrections          \if \coadviser * % no co-adviser            \else \vskip 8pt plus 6pt minus 2pt                     \leftline{\coadviser, \doctype Adviser\hfil}            %\leftline{Coordination: \coadviser} %my corrections          \fi          \if \cocoadviser * % no coco-adviser             \else \vskip 8pt plus 6pt minus 2pt            \leftline{\cocoadviser, \doctype Adviser\hfil}          \fi       %    \vglue 24pt        \else  % PhD thesis         \numcount=\numcomm         \leftline{Examining Committee: \hfil}         \begin{quote}              \adviser, \doctype Adviser\\[4pt]  \advance \numcount by -1           \if \coadviser * \else              \coadviser, \doctype Adviser\\[4pt]    \advance\numcount by -1           \fi           \@memberone, Member\\[4pt] \advance \numcount by -1           \ifnum\numcount > 0           \@membertwo, Member\\[4pt] \advance \numcount by -1 \fi           \ifnum\numcount > 0           \@memberthree, Member\\[4pt] \advance \numcount by -1 \fi           \ifnum\numcount > 0           \@memberfour, Member\\[4pt] \advance \numcount by -1  \fi           \ifnum\numcount > 0           \@memberfive, Member\\[4pt]\advance \numcount by -1  \fi           \ifnum\numcount > 0           \@membersix, Member\\[4pt] \advance \numcount by -1\fi         \end{quote}       \fi        }           \def\titlepage{%          \pagenumbering{roman}          \thispagestyle{empty}          \ifnum\numcomm<4 \vglue .5in\vfil \fi  % masters          \ifnum\numcomm>5 \hbox{ } \vspace{-24pt}\fi % make more space on page          \begin{singlespace}          \begin{center}              \parindent=0pt              {\large\uppercase\expandafter{\@thesistitle}}\\ [36pt]              A Bachelor-\doctype Submitted to\\ [8pt]              ETH ZURICH\\ [12pt]              Departement of Mathematics\\ [36pt]              Presented By \\ [12pt]              \@author\\ [36pt]              \@date             % in Partial Fulfillment of the\\ [8pt]             % Requirements for the Degree of\\ [8pt]             % \uppercase\expandafter{\@degree}\\ [8pt]             % Major Subject:~~\uppercase\expandafter{\@department}\\               \ifnum\numcomm < 7 \vskip 64pt \else \vskip 24pt \fi              \sigblock                \ifnum \numcomm < 7 \vskip 32pt \else \vskip 24pt \fi             %  Rensselaer Polytechnic Institute\\             % Troy, New York\\ [14pt]              \ifnum\numcomm>6 \vskip -8pt \fi              \@submitdate          \end{center}          \end{singlespace}          \newpage          \pagestyle{plain}     %    \pagenumbering{roman}     %    \setcounter{page}{2}     }           \def\abstitlepage{%          \if@twoside\thispagestyle{empty}\cleardoublepage\fi          \pagenumbering{roman}          \thispagestyle{empty}          \ifnum\numcomm<4 \vglue .5in \fi  % masters          \begin{singlespace}          \begin{center}              \parindent=0pt              \vglue 24pt plus 24pt minus 12pt              {\large\uppercase\expandafter{\@thesistitle}}\\ [11pt]              By \\ [11pt]              \@author\\ [11pt]              An Abstract of a Thesis Submitted to the Graduate\\ [7pt]              Faculty of Rensselaer Polytechnic Institute\\ [7pt]              in Partial Fulfillment of the\\ [7pt]              Requirements for the Degree of\\ [7pt]              \uppercase\expandafter{\@degree}\\ [7pt]              Major Subject:~~\uppercase\expandafter{\@department}\\  [7pt]              The original of the complete thesis is on file\\              in the Rensselaer Polytechnic Institute Library\\            \vfill            \sigblockabs             \vskip 36pt plus 2pt minus 12pt              Rensselaer Polytechnic Institute\\             Troy, New York\\ [12pt]              \@submitdate          \end{center}          \end{singlespace}          \newpage          \pagestyle{plain}     %    \pagenumbering{roman}     %    \setcounter{page}{2}     }          \def\copyrightpage{         \hbox{ }         \vfill         \begin{center}         \copyright\ Copyright \@copyrightyear \\         by \\         \@author \\         All Rights Reserved \\ [12pt]         \end{center}         \clearpage}


title: How to have upside down text in body?

text: I have environments Question (described in To clearly separate block inside a chapter) and Answer blocks. I want the Answer block be the same as as Question block but the text upside down in it. Minimal example               \documentclass{article}     \usepackage{rotating}          \usepackage[framemethod=tikz]{mdframed}     \newtheorem{question}{Question}     \mdfdefinestyle{que}{       linecolor=cyan,       backgroundcolor=cyan!20,     }     \surroundwithmdframed[style=que]{question}          \newtheorem{answer}{Answer}     \mdfdefinestyle{ans}{       linecolor=cyan,       backgroundcolor=yellow!20       % , rotatebox     }     \surroundwithmdframed[style=ans]{answer}               \begin{document}     \begin{question}     \textbf{E.coli.}     Escherichia coli ...     \end{question}     \begin{answer}     Lorem     \end{answer}     \end{document}      I get ![enter image description here](http://i.stack.imgur.com/qj4zm.png) **How can you have upside down text in the Answer environment?** I want that the text is difficult to read so the readers try to answer the question themselves before looking for the answer. Any other way to include answers is also accepted, since I am not sure which is the best way to do it. I however want personally that those answer are visible in the draw code just after the question.


title: I want no idention after \newpage

text: I defined with `\parindent=0cm` that there should be no idention after new paragraphs. But the very first `\chapter` and every `\newpage` is idented! I don't want to have that, so how can I work around? Example:               \documentclass[12pt]{article}          \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{geometry}     \usepackage[english]{babel}     \selectlanguage{english}                    \parindent=0cm          \geometry{a4paper,left=20mm,right=20mm, top=1cm, bottom=1cm, includeheadfoot}               \usepackage{fancyhdr}     \pagestyle{fancy}     \fancyhead[L]{\small{\textbf{Spacecraft Dynamics\\     Problem sheet 1}}}     \fancyhead[R]{\small{2012-09-10}}     \renewcommand{\headrulewidth}{0.5pt}     \renewcommand{\footrulewidth}{0.5pt}     \setlength{\headheight}{15pt}               \begin{document}          \chapter{\textbf{\begin{large}     Problem P1: Rotations in $\mathbb{R}^2$     \end{large}}}\\     text text text     \newpage     \chapter{\textbf{\begin{large}     Problem P1: Rotations in $\mathbb{R}^2$     \end{large}}}\\     text text text\\     \chapter{\textbf{\begin{large}     Problem P1: Rotations in $\mathbb{R}^2$     \end{large}}}\\     \end{document}


title: Subscript size different in LaTeX and Matplotlib

text: I'm using matplotlib to prepare figures for a LaTeX document. I use TeX-mode in matplotlib. But subscript and superscipt in math mode gets a different size than in my LaTeX document. Rendered with matplotlib: ![Rendered with matplotlib](http://i.stack.imgur.com/9PHbF.png) Rendered with LaTeX: ![Rendered with LaTeX](http://i.stack.imgur.com/TG7Kz.png) Sorry for the slightly different size, but I think it is clear that the _mean_ has a different relative size to the _d_. Below is my matplotlib settings I use:               plt.rc('font', **{'family':'serif', 'serif':['Computer Modern Roman'],                       'monospace':['Computer Modern Typewriter']})     params = {'backend': 'ps',               'text.latex.preamble': [r"\usepackage{upgreek}",                                       r"\usepackage[nice]{units}"],               'axes.labelsize': 12,               'text.fontsize': 12,               'legend.fontsize': 8,               'xtick.labelsize': 10,               'ytick.labelsize': 10,               'text.usetex': True,               'figure.figsize': fig_size,               'axes.unicode_minus': True}     plt.rcParams.update(params)      Does anyone know what setting I have to add? Is there anything from my .cls file that I have to input into the rcParams?


title: tikz-3dplot rotation around the x-axis

text: I'm trying to create a simple spherical quadrant grid using the `tikz-3dplot` package. The longitudinal grid lines look fine but when I try to create the latitudinal lines I get really strange results that I don't understand. I was expecting to see a series of latitude arcs rotating around the x-axis (so they're not quite the same as latitude lines). Instead, it appears that my attempt to rotate around the x-axis is rotating around all three axes. I'm not sure what I'm doing wrong.               \documentclass{article}     \usepackage{tikz}     \usepackage{tikz-3dplot}          \begin{document}     \tdplotsetmaincoords{60}{155}     \usetikzlibrary{3d}          \begin{tikzpicture}[scale=5,tdplot_main_coords]     \tikzstyle{grid}=[thin,color=red,tdplot_rotated_coords]          \draw[thick,->] (0,0,0) -- (1,0,0) node[anchor=north east]{$x$};     \draw[thick,->] (0,0,0) -- (-1,0,0);     \draw[thick,->] (0,0,0) -- (0,1,0) node[anchor=north west]{$y$};     \draw[thick,->] (0,0,0) -- (0,0,1) node[anchor=south]{$z$};          \foreach \rot in {0, 30, 60, 90} {         \tdplotsetrotatedcoords{\rot}{0}{0};         \tdplotdrawarc[grid]{(0,0,0)}{1}{0}{180}{}{};     }          \foreach \rot in {-90, -60, -30, 0, 30, 60, 90} {         \tdplotsetrotatedcoords{\rot}{90}{0};         \tdplotdrawarc[grid]{(0,0,0)}{1}{90}{180}{}{};     }          \end{tikzpicture}     \end{document}      ![Results shown in QTikz](http://i.stack.imgur.com/YrWAA.png) Edit: After more investigation it appears that attempting to rotate around the x-axis actually rotates around the z-axis, as can be clearly seen in this image. Placing the `\rot` in the x- or z-position has the same effect. ![Image with only x rotated and shortened arcs.](http://i.stack.imgur.com/u1oOf.png)


title: Is it possible to use the punctuation of one font within another font?

text: I'm in the process of trying to turn an English document into Hindi based on a translation in Word. However, I'm struggling to find a font that does what I want. As I'm working with an existing document in XeLaTeX, I need fonts with bold and italics available, which many Hindi unicode fonts don't have. I have found one font that does what I want (Osho), but I don't like its punctuation marks (eg, the comma looks like an 'undo'-type up arrow). Is it possible for me to use the Osho font, with punctuation coming from another font? I've now included a sample of my file below - some of the code may not be necessary, but I think most of it is - and heaps has been left out style-wise.               \documentclass[twoside]{report}     \usepackage{fontspec}      \usepackage{polyglossia}      \usepackage{xltxtra}      \setdefaultlanguage{hindi}     \setotherlanguage{english}     \setmainfont[Script=Devanagari,Ligatures=TeX]{Osho}     \newfontfamily\devanagarifont[Script=Devanagari,Ligatures=TeX]{Osho}     %\setotherfont[Script=English,Ligatures=TeX]{Times New Roman}     \newfontfamily{\englishfont}{Times New Roman}     \usepackage{newunicodechar}     \newunicodechar{‘}{{\englishfont ‘}}     \newunicodechar{’}{{\englishfont ’}}          \begin{document}          \section{परमेश्वर का प्रेरित वचन}          बाइबल की 66 पुस्तकें विशेष क्या है? क्या परमेश्वर ने अन्य दूसरी पुस्तकें भी लिखी है? इस अंक में हम      ‘‘प्रेरणा’’पर विचार करेंगे, जिसके द्वारा परमेश्वर ने बाइबल को लिखा। (2~पतरस 1:12-2:3)          \end{document}


title: breqn in journals

text: I read the `breqn` manual, and I love the ideas in it (semantic markup for equations, automagic line breaks in math displays). I would like to use it in my work (I am a research mathematician, so I mean mostly producing journal papers). However, I am a little bit worried about compatibility issues. Does anyone have experience with it in a similar context? Namely, what I would like to know is:   1. do math journals support it out of the box, or do I risk getting a nice message from them on the lines of "could you please re-format each and every formula in your paper before publication?"   2. are there any outstanding incompatibilities with commonly-used packages?   3. has the API changed a lot recently? I.e., will my collaborators with a slightly outdated TeX version still be able to compile the documents? I hope that the question is in-topic here.


title: Why does \expandafter not expand the full { } group?

text: I thought I had understood the principle of expansion ... but apparently not!               \def\a{AAA}     \def\b{BBB}             \expandafter\detokenize\expandafter{\a\b}      I thought that the 2 `\expandafter` would store `\detokenize` and `{}` resp. and then expand `\a` into `AAA` and `\b` into `BBB`. Therefore after one round of expansion, we would have:               \detokenize{AAABBB}      and thus the output should be simply "AAABBB". But it is not the case. Where is my mistake?


title: wrapfigure in moderncv

text: I want to add my photo in moderncv environment! Itemize positioning and other floats are missed up! I tried to use \textpos package but didn't work! Here is the code               \usepackage{graphicx}     \usepackage{wrapfig}     \usepackage{adjustbox}     \usepackage[absolute,overlay]{textpos}          \begin{wrapfigure}{r}{0.3\textwidth}         \vspace*{-2.3cm}         \hspace*{-2cm}         \centering         \adjustbox{cframe=color1}{\includegraphics[scale=0.07]{photo}}     \end{wrapfigure}      and with \textpos               \begin{textblock}{7}(7,7)         \begin{figure}             \includegraphics[scale=0.7]{photo}         \end{figure}     \end{textblock}      I get these errors: Environment \begin{figure} is undefined and textblock ended with \end{figure}


title: Span column in a multicols environment

text: I am using the `multicol` package to make a 2 columns based document but I want in a place to have just fusion these two columns, and then go back to the 2 columns but I can't figure out how to achieve this.


title: Automatically Insert Environment Arguments

text: How can I automatically insert `[<+->]` arguments to the `itemize` environment when I'm in a `beamer` frame so I get pretty incremental display during presentation?


title: Formatting subequations where one of them is a piece-wise function

text: I have the following LaTeX code:               \begin{subequations}      \begin{align}     F_h(t) = F(\Delta y) = \left\{                 \begin{array}{lr}                     K_h (\Delta y)^{P_h} \; \text{if} \; \Delta y > 0\\                     0 \; \; \hspace{1.23cm}\; \text{if} \; \Delta y \leq 0                 \end{array}                 \right. \label{eqn: hammer1}\\     F_h(t) = -m_h \label{eqn: hammer2}     \end{align}     \end{subequations}      when I compile it, the 2nd equation is aligned to the right-most margin of equation 1. How do I set it such that the 2nd equation is aligned to the left- most margin of the first equation?


title: tilde and scalable fonts

text: I regularly use a combination of pslatex.sty and pdflatex to produce pdf documents. Some of this are for student use and I have come across a problem with the tilde character. Using default LaTeX fonts and \textasciitilde, I can copy and paste from the PDF to a Unix terminal window and all is well, but I have yet to find a way of doing this in the presence of pslatex Any ideas?


title: Fixed Point Arithmetic: Why does the fp work sometimes but others it errors?

text: Why does `fixed point arithmetic` like to error on parts of the code that aren't doing any math? I am using the package to improve the calculation of some angles I have it printing out, but it is evaluating a node that is just a number and returning an error:               ERROR: FP error: Illegal character \c@pgf@counta  found in float number!.          --- TeX said ---     \FP@errmessage #1->\errmessage {FP error: #1!}          l.13   {};          --- HELP ---     From the .log file...          This error message was generated by an \errmessage     command, so I can't give any explicit help.     Pretend that you're Hercule Poirot: Examine all clues,     and deduce the truth by order and method.      * * *               \documentclass[convert = false, tikz]{standalone}     \usepackage{fp}     \usetikzlibrary{fixedpointarithmetic}     \begin{document}     \begin{tikzpicture}[fixed point arithmetic]       \node[label = x] {};     \end{tikzpicture}     \end{document}      From the code above, we see that `fp` has an issue with this node. If I remove `fp`, there isn't a problem, but I want the package to be used later on in the code where there is an actual calculation.


title: How do I shade various regions defined by a hobby curve?

text: Use the following code, I am able to generate the curve easily.               \documentclass{article}     \usepackage{pgf,tikz}     \usetikzlibrary{arrows}     \usetikzlibrary{hobby}     \begin{document}         \begin{tikzpicture}[scale=1.0,>=latex, use Hobby shortcut]             \draw[-] (0,3) .. (3,0) .. (4,-2);             \draw[-] (4,-2) .. (5,0) .. (6,1);             \draw[-] (6,1) -- (7,1);             \draw[-] (7,1) .. (8,0) .. (11,-2);             \draw[->,thick] (-.25,0) -- (12,0) node[above] {\footnotesize $x$};             \draw[->,thick] (0,-3) -- (0,4) node[below right]{\footnotesize $f(x)$};             \node[below] at (3,0) {\footnotesize $a$};             \node[below] at (5,0) {\footnotesize $b$};             \node[below] at (8,0) {\footnotesize $c$};             \node[below] at (11,0) {\footnotesize $d$};         \end{tikzpicture}     \end{document}      My problem is I need to shade the regions bounded by f(x) and the x-axis over [0,b], [a,b], [b,c], and [c,d]. How do I achieve that with, say, red for the regions above the x-axis, and blue for the region below?


title: Combine class does not sort citations

text: There are three files in the next section of code; all three should go in the same folder. The main document is bibProblem (combine document class), the import document is inputDoc1a (article class), and the bib file is the BibTeX bibliography. I am using the cite package with the sort option. (You must create the bibliography for the article using the article (inputDoc1a) and then format the main document to build the bibliography.) Notice that the two citations appear as [1,2] and [1,2] in the article and as [1,2] and [2,1] in the main document. Why are the citations not sorted when I format with the main document?               % bibProblem     \documentclass[book]{combine}     \usepackage{amsmath,amssymb,amsfonts,amsthm,times}     \usepackage{filecontents}     \usepackage{appendix}     \usepackage{blindtext}     \usepackage[sort]{cite}          % The main document     \begin{document}     \title{The collection}     \author{A. N. Editor}     \date{\today}     \maketitle          \chapter{First chapter}     \section{Introduction}     \ldots     \begin{papers}[]         \coltoctitle{First article}\label{coltitle}         \coltocauthor{Author of first article}         \import{inputDoc1a}     \end{papers}     \bibliographystyle{abbrv}     \bibliography{bibliography}     \end{document}           % inputDoc1a     \documentclass{article}     \usepackage{amsmath,amssymb,amsfonts,amsthm,times}     \usepackage{appendix}     \usepackage{blindtext}     \usepackage[sort]{cite}     \makeatletter     \@ifclassloaded{combine}       {\let\@begindocumenthook\@empty         }       {}     \makeatother     \begin{document}     \title{First article}     \author{Author of first article}     \maketitle     \section{first section}     This is a problem.\index{problem}     \cite{article-minimal, article-full}     and notice that the order is reversed in the ``book.''     \cite{article-full, article-minimal}\\     \blindtext[1]     \section{Second section}     \blindtext[1-2]     \bibliographystyle{abbrv}     \bibliography{bibliography}     \appendix%\renewcommand{\thesection}{\Alph{section}}     \section{An appendix}     \blindtext[1]     \end{document}          % bibliography     @ARTICLE{article-minimal,        author = {Thomas Price},        title = {My article},        journal = {Math fun facts},        year = 1986,     }          @ARTICLE{article-full,        author = {D.P. Story},        title = {A better article},        journal = {Math research facts},        year = 1986,        volume = 41,        number = 7,        pages = "73+",        month = jul,        note = "This is a full ARTICLE entry",     }


title: tikz circuit library annotation based on shape dimensions

text: I'm trying to define a new annotation for tikz circuit library which surrounds a shape with a circle of max(minimum width, minimum height). updated with new information from Qrrbrbirlbel's comments, here's a semi- working example:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{circuits.ee.IEC}          \begin{document}     \tikzset     {         circuit declare annotation={encapsulated}{\n1}         {             [shift=(\tikzlastnode.center)]             let                 \n1={max(\pgfkeysvalueof{/pgf/minimum width},\pgfkeysvalueof{/pgf/minimum height})*\tikzcircuitssizeunit}             in                 (0, 0) edge[to path={circle[radius={\n1}]}] ()         }     }          \begin{tikzpicture}[circuit ee IEC]         \draw (0, 0) to [resistor={encapsulated={info={$R_1$}}}] ++(right:3) to [diode={encapsulated={info={$D_1$}}}] ++(right:3);     \end{tikzpicture}     \end{document}      This is almost what I want, as the circle around the diode is correct. However, it doesn't surround the resistor correctly. ![enter image description here](http://i.stack.imgur.com/ZjjnL.png) Instead, what I want looks like this: ![enter image description here](http://i.stack.imgur.com/IvAiT.png) I was able to achieve this by modifying the draw command as below, but I want this adjustment to be made without having to manually specify the `minimum width` each time.               \draw (0, 0) to [resistor={encapsulated={info={$R_1$}}}, minimum width=2] ++(right:2) to [diode={encapsulated={info={$D_1$}}}] ++(right:2);


title: Multirow with strike through?

text: Could somebody give me a hint, why the `\multirow` doesn't work as it should?               \documentclass{article}     \usepackage{multirow}     \begin{document}          \begin{tabular}{c|c|c|c|c|c|}     \emph{step} & 0 & 1 & 2 & 3 & 4 \\ \hline     1. step  &  &  &  &3  &   \\ \hline \hline     \multirow{2}{*}{2nd step}  & 6 &  & 2 &3  &   \\ \hline                 &  &  &  &8  &   \\ \hline \hline          \end{tabular}          \end{document}


title: Page numbers invisible in resume class

text: I have a quite weird problem with resume class (`res.cls`). I am typing my resume but I do not see the page numbers. I just want simple plain page numbers at the end of each page, i.e., the standard format that you get once you type a latex document. I think the numbers should be there for all documents. Thus, it might be the case that they are invisible due to some issue. How can I display the numbers?


title: Initials of first name in footcite

text: Is it possible to display initials of first name in footcite? I use `verbose- trad2` citestyle:               \usepackage[citestyle=verbose-trad2,bibstyle=authortitle-icomp,sortcites=true,%         block=space,firstinits=true]{biblatex}      When i footcite first time it is ok: > [First name initials] [last name], [title] ... but in next citations of the same book it's only > [last name], [title] ...


title: Footnotes are formatted wrong/messy

text: I have a problem with formatting my footnotes. They look very messy and just wrong. I could not find a way to change that, but I assume it is some kind of property, like with a \usepackage[] commant or anything similar. I use the online Latex editor and compiler writelatex.com, so it can't be a problem of my compiling properties. Does anybody have a hint for me how this issue can be fixed? Here is a screenshot of the messy footnotes. The command I use for the footnotes is just \footnote{Title. Link: http://www.link.li. [Date] ![Footnotes formatted wrong](http://i.stack.imgur.com/Nd8YF.png)


title: language problem

text: I created this command:               \newcommand{\NewPart}[1]{\section*{\uppercase{#1}}}      and run it like this:               \NewPart{Personal details}{}      My problem is that instead of 'Personal details' I want to give a name in greek. I used `babel` and ran `\selectlanguage{greek}` but it is not enough. The letters remain in English. Can you give me any idea to handle my problem? I am new here so excuse my several mistakes. This is my MWE:               \documentclass[paper=a4,fontsize=11pt]{scrartcl}                % KOMA-article class     \usepackage[iso-8859-7]{inputenc}     \usepackage{kerkis}     \usepackage{a4}     \usepackage{amssymb}     \usepackage{amsmath}     \usepackage[vcentering,dvips]{geometry}     \usepackage{calc}     \input{epsf.tex}     \usepackage[greek,english]{babel}                                    \usepackage{amsmath,amsfonts,amsthm}      \usepackage[svgnames]{xcolor}       \usepackage{geometry}     \textheight=700px                    \usepackage{url}               \usepackage{wrapfig}            \frenchspacing                  \pagestyle{empty}                                         \usepackage{sectsty}                                 \sectionfont{%                                       \usefont{OT1}{phv}{b}{n}%                        \sectionrule{0pt}{0pt}{-5pt}{3pt}     \newlength{\spacebox}     \settowidth{\spacebox}{888888888}                   \newcommand{\sepspace}{\vspace*{1em}}                \newcommand{\NewPart}[1]{\section*{\uppercase{#1}}}     \begin{document}     \selectlanguage{greek}     \NewPart{Personal details}{}     \end{document}      When I run the tex-file "Personal details" are written in English instead of Greek despite the fact that I have already changed the language.


title: How to change the starting reference number in Natbib in a given bibunit?

text: I'm using bibunit and Natbib packages with a numerical numbering.               \begin{bibunit}[plainnat]         \nocite{ref1,ref2}         \putbib[mybiblio]     \end{bibunit}          \begin{bibunit}[plainnat]         \nocite{ref3,ref4}         \putbib[mybiblio]      \end{bibunit}      How can I set the starting number for ref3 and ref4 to be different from 1 (say 15), without affecting the starting number for ref1 and ref 2? The desired result is the following:   * [1] ref 1   * [2] ref 2   * [15] ref3   * [16] ref4


title: Why are the lines off, when tikzpicture is rotated?

text: OK, I have some rather long code. I tried to reduce it as much as I could, but it's heavily tangled and I'm still not good in the usage of pgfkeys or xparse. The problem: If the `tikzpicture` is rotated by any non-multiple of 90° the lines are off. If the `tikzpicture` is rotated by any multiple of 90° the lines are fine. Why is that and how can i prevent it?               %%%%%%%%%%%%%% Common file     \documentclass{standalone}     \usepackage{etoolbox}          %Declare Macros for each floor to be defined by the building files. They are of the form: \ESKFPfloorEG, \ESKFPernEG, \ESKFPlabelsEG     \newcommand{\ESKFPcreatefloor}[1]{%     \expandafter\def\csname ESKFPfloor#1\endcsname{nothing defined}     }     \ESKFPcreatefloor{EG}          % Define Macros for the current floor to be used by the room files.     \newcommand{\ESKFPcurrentfloorcommand}{none}     \newcommand{\ESKFPsetfloor}[1]{%     \renewcommand{\ESKFPcurrentfloorcommand}{\csname ESKFPfloor#1\endcsname}     }          \newcommand{\ESKFPcurrentroom}{0}     \newcommand{\ESKFPsetroom}[1]{     \renewcommand{\ESKFPcurrentroom}{#1}     }     \newcommand{\ESKFPcurrentadditionaltext}{}               \newcommand{\ESKFPdoorata}{0}     \newcommand{\ESKFPdooratb}{0}     \newcommand{\ESKFPdooratc}{0}     \newcommand{\ESKFPdooratd}{0}     \newcommand{\ESKFPdoorapos}{\ifnumequal{\ESKFPdoorata}{1}{0.75}{0.25}}     \newcommand{\ESKFPdoorbpos}{\ifnumequal{\ESKFPdooratb}{1}{0.75}{0.25}}     \newcommand{\ESKFPdoorcpos}{\ifnumequal{\ESKFPdooratc}{1}{0.75}{0.25}}     \newcommand{\ESKFPdoordpos}{\ifnumequal{\ESKFPdooratd}{1}{0.75}{0.25}}     \newcommand{\ESKFPmisceins}{1}     \newcommand{\ESKFPmisczwei}{2}     \newcommand{\ESKFPmiscnull}{0}     \newcommand{\ESKFPcurrentexitdoorat}{0}          \newcounter{ESKFPcurrentdoor}     \setcounter{ESKFPcurrentdoor}{0}          \makeatletter     \long\def\ESKFPifnodedefined#1#2#3{%         \@ifundefined{pgf@sh@ns@#1}{#3}{#2}%     }     \makeatother          \usepackage{tikz}     \usetikzlibrary{calc}     \usetikzlibrary{shapes.geometric}          \tikzset{%     every node/.style={outer sep=0pt},     ESKFPdoorcommonstyle/.style={%      transform shape,      text width=,      circular sector,      sloped,      allow upside down,      anchor=sector center,      circular sector angle=90,      draw,      minimum size=200pt,      },     ESKFPdoorstyle1/.style={%      pos=#1,      fill=yellow,      ESKFPdoorcommonstyle,      yscale=-1,      rotate=45,      },ESKFPdoorstyle1/.default=0.75,     ESKFPdoorstyle2/.style={%      pos=#1,      fill=blue,      ESKFPdoorcommonstyle,     %  xscale=-1,      rotate=225      },ESKFPdoorstyle2/.default=0.25,     door1/.style={ESKFPdoorstyle1},     door2/.style={ESKFPdoorstyle2},     ESKFPnothighlightedstyle/.style={fill=white},     ESKFPhighlightedstyle/.style={fill=red},     ESKFPexitdoorstyle/.style={%      alias=ESKFPcurrentexitdoor      },     exitdoor/.style={ESKFPexitdoorstyle},     ESKFProomstyle/.style={ultra thick,fill=white,ESKFPcommonroomstyle},     ESKFPemptyroomstyle/.style={fill=none,ESKFPcommonroomstyle},     ESKFPcommonroomstyle/.style={draw},     ESKFPstairsstyle/.style={ultra thick,fill=green!80!black,ESKFPcommonroomstyle},     ESKFPelsestyle/.style={ESKFPcommonroomstyle},     stairs/.style={ESKFPelsestyle/.style={ESKFPstairsstyle}},     ESKFProomtextstyle/.style={inner sep=0pt,outer sep=0pt,font={\bfseries}},     ESKFPbackgroundstyle/.style={fill=green!50!white},     set door at 1/.code={\renewcommand{\ESKFPdoorata}{#1}},     set door at 2/.code={\renewcommand{\ESKFPdooratb}{#1}},     set door at 3/.code={\renewcommand{\ESKFPdooratc}{#1}},     set door at 4/.code={\renewcommand{\ESKFPdooratd}{#1}},     set door at 1/.default=1,     set door at 2/.default=1,     set door at 3/.default=1,     set door at 4/.default=1,     set exit door/.code={\renewcommand{\ESKFPcurrentexitdoorat}{#1}},     set exit door/.default=0,     set door 1 pos/.code={\renewcommand{\ESKFPdoorapos}{#1}},     set door 2 pos/.code={\renewcommand{\ESKFPdoorbpos}{#1}},     set door 3 pos/.code={\renewcommand{\ESKFPdoorcpos}{#1}},     set door 4 pos/.code={\renewcommand{\ESKFPdoordpos}{#1}},     set door 1 pos/.default=0.5,     set door 2 pos/.default=0.5,     set door 3 pos/.default=0.5,     set door 4 pos/.default=0.5,     }     %Layers of the Graphic     \pgfdeclarelayer{background}     \pgfdeclarelayer{rooms}     \pgfdeclarelayer{text}     \pgfdeclarelayer{test}     \pgfsetlayers{background,main,rooms,text,test}          %Highlightingstyle     \newcommand{\ESKFPdoifhighlighted}{%     \tikzset{ESKFPcurrentroomstyle/.style={ESKFPhighlightedstyle}}     }     \newcommand{\ESKFPdoifnothighlighted}{%     \tikzset{ESKFPcurrentroomstyle/.style={ESKFPnothighlightedstyle}}     }          \newcommand{\ESKFPcreateroom}[5][]{%#1=local tikz options,#2=name,#3=room number,#4=path with doors,#5=text coordinate     %The path has to be defined counter clockwise. Otherwise, the doors would be outside the room.     %To force the doors to be outside the room, use the option "shape border rotate=90" or "shape border rotate=270"     %If #5 is empty, than it is assumed, that the room has corners at the coordinates ESKFPc#2lu,ESKFPc#2ru, ESKFPc#2lo and ESKFPc#2ro and the text will be positioned at the barycentre of these 4 points.           %Find out, if room has to be highlighted or not     \ifdefmacro{#2}%     {\ifdefstrequal{\ESKFPcurrentroom}{#2}{\ESKFPdoifhighlighted}{\ESKFPdoifnothighlighted}}     {\ifdefstring{\ESKFPcurrentroom}{#2}{\ESKFPdoifhighlighted}{\ESKFPdoifnothighlighted}}     %Apply given options in a local scope     \begin{scope}[#1]     \ifstrempty{#4}     {%      \setcounter{ESKFPcurrentdoor}{0}      \draw[ESKFProomstyle,ESKFPcurrentroomstyle,%      to path=%       {% the following adds the doors, if specified. This definition resides in the macros \ESKFPdoorata, \ESKFPdooratb, \ESKFPdooratc, \ESKFPdooratd and can have the values 1,2 or anything else       \pgfextra{\stepcounter{ESKFPcurrentdoor}}       \ifcsequal{ESKFPdoorat\alph{ESKFPcurrentdoor}}{ESKFPmisceins}        {--node(ESKFProom#2door\the\value{ESKFPcurrentdoor})[door1,pos=\csname ESKFPdoor\alph{ESKFPcurrentdoor}pos\endcsname]{}(\tikztotarget)\tikztonodes}        {%         \ifcsequal{ESKFPdoorat\alph{ESKFPcurrentdoor}}{ESKFPmisczwei}         {--node(ESKFProom#2door\the\value{ESKFPcurrentdoor})[door2,pos=\csname ESKFPdoor\alph{ESKFPcurrentdoor}pos\endcsname]{}(\tikztotarget)\tikztonodes}         {--(\tikztotarget)\tikztonodes}        }       }      ]%      (ESKFPc#2lu)to(ESKFPc#2ru)to(ESKFPc#2ro)to(ESKFPc#2lo)to(ESKFPc#2lu)--cycle;     \ifnumgreater{\ESKFPcurrentexitdoorat}{0}     {\coordinate(ESKFProom#2exitdoor) at ($(ESKFProom#2door\ESKFPcurrentexitdoorat.sector center)!0.5!(ESKFProom#2door\ESKFPcurrentexitdoorat.arc start)$);}%Exit door is defined, that door will be used. It is assumed, that this door is indeed defined.     {%      \renewcommand{\ESKFPcurrentadditionaltext}{Exit door guessed}      \ESKFPifnodedefined{ESKFProom#2door1}{\coordinate(ESKFProom#2exitdoor) at ($(ESKFProom#2door1.sector center)!0.5!(ESKFProom#2door1.arc start)$);}      {       \ESKFPifnodedefined{ESKFProom#2door2}{\coordinate(ESKFProom#2exitdoor) at ($(ESKFProom#2door2.sector center)!0.5!(ESKFProom#2door2.arc start)$);}       {        \ESKFPifnodedefined{ESKFProom#2door3}{\coordinate(ESKFProom#2exitdoor) at ($(ESKFProom#2door3.sector center)!0.5!(ESKFProom#2door3.arc start)$);}        {         \ESKFPifnodedefined{ESKFProom#2door4}{\coordinate(ESKFProom#2exitdoor) at ($(ESKFProom#2door4.sector center)!0.5!(ESKFProom#2door4.arc start)$);}         {          \coordinate(ESKFProom#2exitdoor) at ($(ESKFPc#2lu)!0.5!(ESKFPc#2ro)$);          \renewcommand{\ESKFPcurrentadditionaltext}{No exit door}         }        }       }      }     }     }     {%Path is supplied, especially a door with the style ESKFPexitdoorstyle must be given     %Also the coordinates ESKFPc[ROOMNAME]lu, ESKFPc[ROOMNAME]ru, ESKFPc[ROOMNAME]lo and ESKFPc[ROOMNAME]ro should be defined      \draw[ESKFProomstyle,ESKFPcurrentroomstyle]{#4}--cycle;      \coordinate(ESKFProom#2exitdoor) at (ESKFPcurrentexitdoor);     }          \ifstrempty{#5}     {\coordinate(ESKFProom#2textcenter) at ($0.25*(ESKFPc#2lu)+0.25*(ESKFPc#2ru)+0.25*(ESKFPc#2lo)+0.25*(ESKFPc#2ro)$);}     {\coordinate(ESKFProom#2textcenter) at #5;}          %Text (room number is set), the coordinate ESKFProom[ROOMNAME]textcenter is calculated before. This is #5 or is calculated from ESKFPc[ROOMNAME]lu, ESKFPc[ROOMNAME]ru, ESKFPc[ROOMNAME]lo and ESKFPc[ROOMNAME]ro if not given     \begin{pgfonlayer}{text}     \node[ESKFProomtextstyle](ESKFProom#2text) at (ESKFProom#2textcenter) {#3\ESKFPcurrentadditionaltext};     \end{pgfonlayer}     \end{scope}     }               \newcommand{\ESKFPcreateelse}[5][]{%#1=local tikz options,#2=name,#3=room number,#4=path with doors,#5=text coordinate     %The path has to be defined counter clockwise. Otherwise, the doors would be outside the room.     %To force the doors to be outside the room, use the option "shape border rotate=90" or "shape border rotate=270"     %If #5 is empty, than it is assumed, that the room has corners at the coordinates ESKFPc#2lu,ESKFPc#2ru, ESKFPc#2lo and ESKFPc#2ro and the text will be positioned at the barycentre of these 4 points.           %Apply given options in a local scope     \begin{scope}[#1]     %Test if path is given     \ifstrempty{#4}     {%If Path is NOT given      \setcounter{ESKFPcurrentdoor}{0}      \draw[ESKFPelsestyle,%      to path=%       {% the following adds the doors, if specified. This definition resides in the macros \ESKFPdoorata, \ESKFPdooratb, \ESKFPdooratc, \ESKFPdooratd and can have the values 1,2 or anything else       \pgfextra{\stepcounter{ESKFPcurrentdoor}}       \ifcsequal{ESKFPdoorat\alph{ESKFPcurrentdoor}}{ESKFPmisceins}        {--node(ESKFPstairs#2door\the\value{ESKFPcurrentdoor})[door1,pos=\csname ESKFPdoor\alph{ESKFPcurrentdoor}pos\endcsname]{}(\tikztotarget)\tikztonodes}        {%         \ifcsequal{ESKFPdoorat\alph{ESKFPcurrentdoor}}{ESKFPmisczwei}         {--node(ESKFPstairs#2door\the\value{ESKFPcurrentdoor})[door2,pos=\csname ESKFPdoor\alph{ESKFPcurrentdoor}pos\endcsname]{}(\tikztotarget)\tikztonodes}         {--(\tikztotarget)\tikztonodes}        }       }      ]%      (ESKFPc#2lu)to(ESKFPc#2ru)to(ESKFPc#2ro)to(ESKFPc#2lo)to(ESKFPc#2lu)--cycle;     }     {%If Path IS given. A door with the style ESKFPexitdoorstyle must be given     %Also the coordinates ESKFPc[ROOMNAME]lu, ESKFPc[ROOMNAME]ru, ESKFPc[ROOMNAME]lo and ESKFPc[ROOMNAME]ro should be defined      \draw[ESKFPelsestyle]{#4}--cycle;     }          \ifstrempty{#5}%Test if coordinate for Text is given     {\coordinate(ESKFPstairs#2textcenter) at ($0.25*(ESKFPc#2lu)+0.25*(ESKFPc#2ru)+0.25*(ESKFPc#2lo)+0.25*(ESKFPc#2ro)$);}%If textcoordinate is NOT given     {\coordinate(ESKFPstairs#2textcenter) at #5;}%If textcoordinate is given     %Text (room number is set), the coordinate ESKFProom[ROOMNAME]textcenter is calculated before. This is #5 or is calculated from ESKFPc[ROOMNAME]lu, ESKFPc[ROOMNAME]ru, ESKFPc[ROOMNAME]lo and ESKFPc[ROOMNAME]ro if not given     \begin{pgfonlayer}{text}     \node[ESKFProomtextstyle](ESKFPstairs#2text) at (ESKFPstairs#2textcenter) {#3\ESKFPcurrentadditionaltext};     \end{pgfonlayer}     \end{scope}     }               %%%%%% Floor file          \newcommand{\ESKFPfloorGSEG}{%     \begin{scope}[scale=0.1]     %A101     \coordinate(ESKFPcA101lu) at (0,0);     \coordinate(ESKFPcA101ru) at (136,0);     \coordinate(ESKFPcA101ro) at (136,127);     \coordinate(ESKFPcA101lo) at (0,127);     %A102     \coordinate(ESKFPcA102lu) at (ESKFPcA101lo);     \coordinate(ESKFPcA102ru) at (ESKFPcA101ro);     \coordinate(ESKFPcA102lo) at ($(ESKFPcA101lo)+(0,90)$);     \coordinate(ESKFPcA102ro) at ($(ESKFPcA101ro)+(0,90)$);     %A103     \coordinate(ESKFPcA103lu) at (ESKFPcA102lo);     \coordinate(ESKFPcA103ru) at (ESKFPcA102ro);     \coordinate(ESKFPcA103lo) at ($(ESKFPcA102lo)+(0,90)$);     \coordinate(ESKFPcA103ro) at ($(ESKFPcA102ro)+(0,90)$);     %A104     \coordinate(ESKFPcA104lu) at (ESKFPcA103lo);     \coordinate(ESKFPcA104ru) at (ESKFPcA103ro);     \coordinate(ESKFPcA104lo) at ($(ESKFPcA103lo)+(0,120)$);     \coordinate(ESKFPcA104ro) at ($(ESKFPcA103ro)+(0,120)$);     %STA2CAFE     \coordinate(ESKFPcSTA2CAFElu) at ($(ESKFPcA104ro)+(0,-30)$);     \coordinate(ESKFPcSTA2CAFElo) at ($(ESKFPcA104ro)+(0,30)$);     \coordinate(ESKFPcSTA2CAFEru) at ($(ESKFPcSTA2CAFElu)+(120,0)$);     \coordinate(ESKFPcSTA2CAFEro) at ($(ESKFPcSTA2CAFElo)+(120,0)$);          %Rooms     \begin{pgfonlayer}{rooms}     %Left side     \ESKFPcreateroom[set door at 2,set exit door=2]{A101}{A101}{}{}     \ESKFPcreateroom[set door at 1,set door at 2=2,set exit door=2]{A102}{A102}{}{}     \ESKFPcreateroom[set door at 1,set door at 2,set exit door=2]{A103}{A103}{}{}     \ESKFPcreateroom[set door at 1,set door at 2=2,set exit door=2]{A104}{A104}{}{}     %Top side     \ESKFPcreateelse[stairs]{STA2CAFE}{To Cafeteria}{}{}     %     \ESKFPcreateelse{EMPTYA2CAFE}{}{(ESKFPcSTA2CAFElu)coordinate(ESKFPcEMPTYA2CAFElo)--++(0,-30)coordinate(ESKFPcEMPTYA2CAFElu)--node(ESKFPdoorEMPTYA2CAFEleft)[door2]{}node(ESKFPdoorEMPTYA2CAFEright)[door1]{}++(120,0)coordinate(ESKFPcEMPTYA2CAFEru)--++(0,30)coordinate(ESKFPcEMPTYA2CAFEro)}{(0,0)}%No Text to be set     %     \ESKFPcreateelse[stairs]{STAEG2AOGINEARCAFE}{Stairs}{($(ESKFPcSTA2CAFEro)+(0,-30)$)coordinate(ESKFPcSTAEG2AOGINEARCAFElo)--++(0,-120)coordinate(ESKFPcSTAEG2AOGINEARCAFElu)--node(ESKFPdoorSTAEG2AOGINEARCAFEleft)[door2]{}node(ESKFPdoorSTAEG2AOGINEARCAFEright)[door1]{}++(80,0)coordinate(ESKFPcSTAEG2AOGINEARCAFEru)--++(0,120)coordinate(ESKFPcSTAEG2AOGINEARCAFEro)--node(ESKFPdoorSTAEG2AOGINEARCAFEout)[door1,pos=0.25,rotate=180]{}(ESKFPcSTAEG2AOGINEARCAFElo)}{}     \end{pgfonlayer}     \end{scope}          %Backgroundlayer     \begin{pgfonlayer}{background}     \fill[ESKFPbackgroundstyle](ESKFPcA101lu)rectangle(ESKFPcSTAEG2AOGINEARCAFEro);     \end{pgfonlayer}     }     \let\ESKFPfloorEG\ESKFPfloorGSEG          %%%%%%%%%%%Actual Room file          \ESKFPsetfloor{EG}     \ESKFPsetroom{A102}          \begin{document}     \begin{tikzpicture}[mystyle/.style={ESKFPcurrentfloorstyle},rotate=45]     \ESKFPcurrentfloorcommand     \begin{pgfonlayer}{test}     \draw[red](ESKFProomA101exitdoor)to[in=0,out=0](ESKFProomA102exitdoor);     \end{pgfonlayer}     \end{tikzpicture}     \end{document}


title: Remove part numbering in backmatter

text: I want part numbering in the `\backmatter` to behave like chapters do (no numbering but included in ToC). I'm using `scrbook` as my document class.


title: Documentation for changes to pst-eucl package

text: I just noticed today that when I use the `eucl` package, I get the following message:               (/usr/local/texlive/2013/texmf-dist/tex/generic/pst-eucl/pst-eucl.tex     `PST-Euclide v1.47, 2013/03/12  (Dominique RODRIGUEZ)      This version uses the pst-xkey package for managing parameters      Please read the doc, some macros have a new syntax      use option old for upward compatibility)     File: pst-eucl.tex 2013/03/12  v1.47 `PST-eucl' (dr)     )      I'm currently using TeXLive 2013 (I think I updated just two weeks ago). The most recent documentation I have for the `eucl` package is dated `January 9th, 2013`. In appendix B of this documentation it is mentioned that changes have been made, but when I compare this documentation with the one I have from TeXLive 2011, I can't find any differences. Does anyone know where I can go to readily find out what these changes are? **UPDATE** When I run `diff` on `euclide-english-tex` versions for 2013 and 2011, I only get very superficial changes: mostly spelling from French to English. Also, when I look at Changes, I don't find anything which mentions what these _syntactic_ changes are. :(


title: Who do I have to ask, if I need a \mathsfup{\Theta} (missing unicode character)?

text: Strange question, I guess, but I am needing a `\mathsfup{\Theta}` and this char is not included to the range of unicode characters. Who should I ask, if I want to obtain this letter in medium weight sans serif and upright? The unicode, ISO? Some font developer? Or this community here, to show me some hack for this symbol, which I did not find? Any clue is welcome. Here is my MWE to start with:               % arara: lualatex          \documentclass{article}          \usepackage{mathtools}     \usepackage{unicode-math}          \begin{document}     $\mathsfup{\Theta} \mathup{\Theta}$     \end{document}      ![enter image description here](http://i.stack.imgur.com/rFrEV.png)


title: How to generate unordered list with hyphen?

text: I need to write a list of hyphen. Following are subjects in high-school.               - Physics     - Chemistry      - Biology      How can i generate such list with hyphen as indicator?


title: How do I get this strange alignment?

text: I would like to get a nonstandard alignment in the following code:               \begin{align}       \text{First left hand side}  & = \text{First right hand side} \\       \text{Second left hand side} & = \text{Second right hand side} \\         & = \text{Loooooooooooooooooooooooooooooooong expanded right hand side}     \end{align}      where the last line should _not_ be aligned with the first two lines. I know that I could split the last line to form multiple right hand sides, but I would rather avoid it, as it would fill four equations in my case. I found an evil way of doing it by nesting align and gather:               \begin{gather}       \begin{align}         \text{First left hand side}  & = \text{First right hand side} \\ %% \label{} does not work here         \text{Second left hand side} & = \text{Second right hand side}       \end{align}\\      = \text{Loooooooooooooooooooooooooooooooong expanded right hand side} \label{eq3}     \end{gather}      but alas, while this gives the visual output I want, I can not use labels to refer to the equations within the align. I also don't want to place `&` somewhere in the middle of the third line due to spacing issues, and because it is a fragile way of doing that. So how can I type that   1. the first and second line align at `=`   2. the third line is not aligned ot the first two lines (preferably flushed right)   3. all three lines are numbered, and can be referenced   4. all three lines are in one equation group (for the semantics and the spacing)?


title: Algorithmcx and array representation

text: I'm using package `algorithmcx` and `algpseudocode` to describe an algorithm in a paper. Each function in the algorithm receive an array/list of numerical values, e.g. `{x1, x2, ..., xn}`.               \documentclass{article}     \usepackage{algorithm}     \usepackage{algorithmicx}     \usepackage{algpseudocode}          \begin{document}          \begin{algorithm}       \begin{algorithmic}[1]              \Statex         \Function{FUN\_NAME}{$\{x_i^j \,|\, i \in A, j \in B \}$}          ....         \EndFunction%       \end{algorithmic}     \end{algorithm}          \end{document}      I don't know if the list of values/variables is represented in the right way. I've got a look through the Web to see if there was such an accepted convention for representing an array, but I didn't find any example. How can I represent them?


title: \marginnote misalignment in \begin{split}

text: When I use `\marginnote` in `\begin{equation}\end{equation}`, it seems to work fine, but if I try to place a margin note inside a multiline equation (at least when I use `\begin{split}\end{split}`), there is a weird extra space between the first two lines of the margin note. I've attached a MWE so you can see what I mean. (I made the font smaller with `\footnotesize` so it is easier to see (and also because in practice I would like the font to be the size of footnotes anyways).) ![MWE](http://i.stack.imgur.com/6Ank5.png)               \documentclass{article}          \usepackage{amsmath}     \usepackage{marginnote}          \begin{document}          \begin{equation}     \begin{split}     3x+2 & =\marginnote{\footnotesize{The solution is $x=1$.  Blah.  Blah.  Blah.  Blah.  Blah.  Blah.}}5 \\     4y-3 & =7.     \end{split}     \end{equation}          \end{document}


title: Arrow from last line of equation to the first

text: I would like to have something similar to the arrow in this picture: ![Equation with arrow](http://i.stack.imgur.com/iNE5m.png) Is this possible to include without a lot of coding? At the moment the code is:               \documentclass[10pt,a4paper]{scrbook}     \usepackage[T1]{fontenc}      \usepackage[english]{babel}      \usepackage{amsmath}      \begin{document}          \begin{equation}     \begin{split}     & ^\text{1}\text{H} + {}^\text{1}\text{H}  \rightarrow {}^\text{2}\text{H} + \text{e}^+ + \nu \\     & ^\text{2}\text{H} + {}^\text{1}\text{H}  \rightarrow {}^\text{3}\text{He} + \gamma  \\     & ^\text{3}\text{He} + {}^\text{4}\text{He}  \rightarrow {}^\text{7}\text{Be} \\     & ^\text{7}\text{Be} + \text{p}  \rightarrow {}^\text{8}\text{B} + \gamma \\     & ^\text{8}\text{B}  \rightarrow {}^\text{8}\text{Be} + \nu + \text{e}^+ \\     & ^\text{8}\text{Be} \rightarrow \text{2}~ ^\text{4}\text{He}     \label{eq:ppkette3}     \end{split}     \end{equation}          \end{document}      I tried some stuff with a box but did not get any usable results. Thanks in advance


title: is it possible to make reference to an index entry

text: my document looks like this                   \section{Foo bar}         \label{sec:foo}         Lorem ipsum dolor sit amet, consectetur adipisicing elit\index{blahblah}         \section{laborum}         As seen in section \ref{sec:foo}, ...      And I want be more precise as the section "foo bar" may be long and I just want to refere to the index entry `blahbla`.


title: Align table-text in Lyx 1.6.9

text: I created a table with normal font text inside. After I select the text and go to `Edit>>Text style>>Customized` and select `Larger`, in the input the text looks aligned ok (it's right in the middle of the cell, as it is supposed to be), but when I do `View>>PDF(xelatex)`, the text is no longer aligned (it is closer to the top of the cell than to the bottom, although in the source the option `Align center` is pressed). How can I make it display the table-text aligned in the output pdf?


title: How can I plot 2 figures around a node using tkz-collection in a single tikz picture?

text: Usually I can specify a node location relative to location of another node, e.g., using `left of` and alike               \usepackage{tikz}     \usetikzlibrary{positioning}     ...     \matrix (first) [left of=arrow, matrix of math nodes, ampersand replacement=\&,       left delimiter=\|, right delimiter=\|, xshift=-2.5cm] {     ...      Now I want to plot two simple figures using tkz-collection separated by a node with text `vs`. However I want to show same domain, i.e., I want to have same coordinates in `\tkzInit`. I thought I can isolate coordinates conflict using scope but it does not look like the case. Is the coordinate space defined by `\tkzInit` global for entire `tikzpicture`? Shall I use overlay to somehow combine 2 figures? Here is what I've tried               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{positioning}     \usepackage{tkz-fct}          \begin{document}          \begin{tikzpicture}     \begin{scope}     \tkzInit[xmin=-3,xmax=3,xstep=2, ymin=-3,ymax=3,ystep=2]     \tkzGrid[sub,subxstep=1,subystep=1](-2,-2)(2,2)     \tkzAxeXY     \node (a) at (3,0) {hello};     \end{scope}          \begin{scope}     \tkzInit[xmin=-3,xmax=3,xstep=2, ymin=-3,ymax=3,ystep=2]     \tkzGrid[sub,subxstep=1,subystep=1](-2,-2)(2,2)     \tkzAxeXY     \node[right=5cm of a] (b) at (3,0) {hello};     \end{scope}          \end{tikzpicture}          \end{document}      I see 2 separated *hello*s but only a single figure.


title: How to get \copyright when mixing T1 fonts and fontspec?

text: This example:               \documentclass{minimal}          \usepackage{fontspec}     \usepackage[T1]{fontenc}     \usepackage[osf]{mathpazo}          \begin{document}          \copyright 2011     \end{document}      Gives:               ! LaTeX Error: Command \copyright unavailable in encoding T1.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.9 \copyright                    2011     ?      What can I do to get a copyright symbol? Is there another command I should use perhaps?


title: Align text and logo in footer

text: I can't seem to be able to align our logo and page number in the footer. I have the code below:               \pagestyle{fancy} % enable fancy page style     \renewcommand\headrulewidth{0pt}     \renewcommand\footrulewidth{0pt}     \fancyhf{} % clear header and footer     \fancyhead[L]{\leftmark} % leftmark shows the chapter, rightmark shows the section.     \fancyfoot[C]{\thepage}     \fancyfoot[R]{ % right        \includegraphics[scale=0.5]{general_images/logo.png}     }      How can I align the page number and the logo? Any ideas?


title: Problems with a matrix of multipart nodes

text: Just for fun I wanted to reproduce the memory of Can't get split rectangle to shrink small enough in this TikZ picture using a matrix of nodes avoiding the use of `\foreach` loops to place nodes. My intention was to use a matrix of `alu` nodes with `nodes in empty cells` option (no need of typing each particular node) and a particular column of `controlcache` nodes. After some tests I've found some problems which I don't know how to solve. You can look at the following code and results. First test (right figure): If I use a matrix of `alu` nodes and overwrite some column with `controlcache` nodes (multipart nodes), filling colors disappear. I've test to follow advices in Matrix of nodes column style inconsistency but I could not find the solution. Second test (left matrix): If the whole matrix is made with `controlcache` nodes, the filling colors keep its value and there is no problem overwriting them with `alu` nodes even with particular filling colors. Could you explain this contradiction? And a second problem with nodes alignment. If you look carefully, blue `alu` nodes in the left matrix are misaligned with `controlcache` nodes, while gray `controlcache` ones are misaligned in second matrix. The reason and solution (`0.5\pgflinewidth yshift`) are in Andrew Stacey addendum to Jake's answer to the original question. May be a better solution would be to draw two matrices, one for `controlcache` and another one for `alu` but I would like to know to control particular multipart nodes within a matrix.               \documentclass[border=3mm]{standalone}          \usepackage[rgb,hyperref]{xcolor}     \usepackage{tikz}          % Define colors     \definecolor{shade1}{rgb}{0.9, 0.9, 0.9}     \definecolor{shade2}{rgb}{0.75, 0.75, 0.75}     \definecolor{shade3}{rgb}{0.5, 0.5, 0.5}     \definecolor{shade4}{rgb}{0.35, 0.35, 0.35}          % Load TikZ libraries     \usetikzlibrary{shapes,matrix}     \usetikzlibrary{positioning}          % Text settings     \newcommand{\figureTextSize}{\tiny}          % Figure element lengths     \newlength{\gpgpuElemSep}     \setlength{\gpgpuElemSep}{1mm}     \newlength{\gpgpuElemSize}     \setlength{\gpgpuElemSize}{8mm}          % TikZ styles     \newcommand{\arrowStyle}{stealth}     \newcommand{\bendAngle}{45}     \newcommand{\lineThickness}{semithick}     \tikzstyle{box} = [%       draw,       rectangle,       \lineThickness,     ]          \begin{document}     \begingroup     \figureTextSize     \begin{tikzpicture}[%         every node/.style={%           node distance=0.375\gpgpuElemSep,         },         component/.style={%           box,           minimum size=0.42\gpgpuElemSize,           inner sep=0pt,         },         alu/.style={%           component,           fill=shade1,           outer sep=0pt         },         controlcache/.style={%           component,           rectangle split,           rectangle split parts=2,           rectangle split part fill={shade2, shade3},           rectangle split every empty part={},           rectangle split empty part height=0.21\gpgpuElemSize-\pgflinewidth,         },         layoutalu/.style={%         matrix of nodes,             nodes in empty cells,         nodes=alu,         column sep=\gpgpuElemSep,         row sep=\gpgpuElemSep     },     layoutcc/.style={%         matrix of nodes,         nodes in empty cells,         nodes=controlcache,         column sep=\gpgpuElemSep,         row sep=\gpgpuElemSep     }       ]          \matrix (alu)         [layoutcc,          column 3/.style={nodes={alu,yshift=-.5\pgflinewidth}},         row 2 column 5/.style={nodes={alu,fill=blue!15}}]     { & & & & & & & \\        & & & & & & & \\       & & & & & & & \\       & & & & & & & \\       & & & & &|[alu,fill=blue!15]| & & \\       & & & & & & & \\       & & & & & & & \\     };          \matrix[right = 1cm of alu.east] (alu2)        [layoutalu,         column 3/.style={nodes={controlcache,fill=red!30,yshift=.5\pgflinewidth}},        column 5/.style={nodes={rectangle split part fill={red,blue},controlcache}}]     { & & & & & & & \\        & & & & & & & \\       & & & & & & & \\       & & & & & & & \\       & & & & & & & \\       & & & & & & & \\       & & & & & & & \\     };     \end{tikzpicture}     \endgroup     \end{document}      ![enter image description here](http://i.stack.imgur.com/m91FF.png)


title: Uralic phonetic alphabet or UPA – unusual diacritics

text: I am writing a linguistics MA thesis in LaTeX, and I will possibly need to use the Uralic Phonetic Alphabet, for example in glossing environments. What would be the best way to do this? I've seen there are separate packages to facilitate using IPA, but my department generally prefers UPA. Mostly I would need letters like a̮, š and ĺ. The source text is in UTF-8 Finnish.


title: english number and ltr direction in xetex

text: I'm writing a document using xepersian and the text direction is right to left. Also I need to add formulas in the document. My problem is that all numbers in the formula are persian and if I add text in the formula it will be in the wrong order. This is how I'm doing it:               \begin{align*}         Q_{n,0}&=1         \quad Q_{0,k}=[k=0]; \\         Q_{n,k}&=Q_{n-1,k}+Q_{n-1,k-1}+\binom{n}{k}, \quad\text{for$n,k>$0.}     \end{align*}      In this example all 1's and 0's are persian and the text in the fromula is in the revers order. How do I fix it? EDIT: This is a sample doc that has the same problem:               \documentclass{article}     \usepackage{amsmath,amsthm,amssymb}          \usepackage{xepersian}     \settextfont{XB Niloofar}     \setdigitfont{XB Niloofar}               \begin{document}     \begin{align*}         Q_{n,0}&=1         \quad Q_{0,k}=[k=0]; \\         Q_{n,k}&=Q_{n-1,k}+Q_{n-1,k-1}+\binom{n}{k}, \quad\text{for$n,k>$0.}     \end{align*}           \end{document}


title: Guide to draw charts (basic, pie, bar) from data

text: I went through the examples of using PSTricks and TikZ for drawing pie and bar chart. They looked quiet complicated to me. Is there any simple guide (blogs/text) to drawing these charts using PDFLaTeX. Learning to use gnuplot will be too much for a small presentation I am trying to create!


title: How to use autopair for double quotes in .tex files (so that typing " leads to ``'')?

text: I'm working with Aquamacs 2.3a to compile .tex documents. Typing double quotes `"` one time leads to ````. Then writing a word and finishing with `"` again, expands to ```myword''`. How can I have autopair to directly give me ```''` when typing `"` once? I used autopair before to pair "$" in .tex documents, but I couldn't get this to work for the above problem:               (add-hook 'TeX-mode-hook         (lambda ()             (modify-syntax-entry ?$ "\"")         )     )


title: Coloring Arab suffix without losing connection

text: How can I change the color of Arab word endings without losing the connections? It's just ugly and loses readability. I'm using Tex Live 2012: `arabxetex` with `xelatex` but any package and/or engine is welcome.               \documentclass{article}          \usepackage{arabxetex}          \newcommand{\colorred}[1]{{\addfontfeature{Color=FF00FF}#1}}               \begin{document}          \textarab[voc]{kitab\colorred{hA}}          \textarab[voc]{kitabhA}          \end{document}


title: How to add a third author while using the gSCS2e document class?

text: I want to write an article using `gSCS2e.tex` template available here with three authors with two addresses. The template is given for two different authors, how to add one more author?               \documentclass{gSCS2e}          \begin{document}          \title{{\itshape Journal of Statistical Computation and Simulation} \break \LaTeX\ style guide for authors (Style 2 + NLM reference style)}          \author{A.N. Author$^{\rm a}$$^{\ast}$\thanks{$^\ast$Corresponding author. Email: latex.helpdesk@tandf.co.uk     \vspace{6pt}} and I.T. Consultant$^{\rm b}$\\\vspace{6pt}  $^{a}${\em{Taylor \& Francis, 4 Park Square, Milton Park, Abingdon, UK}};     $^{b}${\em{Institut f\"{u}r Informatik, Albert-Ludwigs-Universit\"{a}t, Freiburg,     Germany}}\\\received{v3.3 released October 2013} }          \maketitle          \end{document}


title: command is not defined, fresh installation

text: I want to learn LaTeX and so I downloaded MacTeX, as I read that this would be the nicest solution for a Mac I am using. Well, I opened TeXShop and inserted following source code:               \begin{document}     Hello World     \end{document}      But when I click to "typeset" I get following error: > "test.tex: LaTeX Error: The font size command \normalize is not defined: > there is probably something wrong with the class file. Do you know what to do here? Thank you =)and sry for new be questions ;) Dary


title: Bold type and font specification with fontspec

text: When I manually specify the Linux Libertine O font types `fontspec` should load, the bold type is significantly bolder than when I load the exact same font family as a system font. MWE:               \documentclass{article}     \usepackage{fontspec}     \setmainfont % load font from path         [             Path = C:/Windows/Fonts/,             Extension = .otf,             UprightFont = LinLibertine_R,             BoldFont = LinLibertine_RB,             ItalicFont = LinLibertine_RI,             BoldItalicFont = LinLibertine_RBI,         ]         {libertine}     \newfontfamily\libertinesystemfont{Linux Libertine O} % load font from system font          \begin{document}     \LARGE{\textbf{A large heading in bold type}}          \textit{ABC\textbf{\underline{V\char"0306}}DE}.          \libertinesystemfont{     \LARGE{\textbf{A large heading in bold type}}          \textit{ABC\textbf{\underline{V\char"0306}}DE}.     }     \end{document}      ![enter image description here](http://i.stack.imgur.com/y7Mae.png) Peeking into my `.log` file, I cannot detect anything that would explain why these font types look different:               .................................................     . fontspec info: "defining-font"     .      . Font family 'libertine(0)' created for font 'libertine' with options [ Path     . = C:/Windows/Fonts/, Extension = .otf, UprightFont = LinLibertine_R,     . BoldFont = LinLibertine_RB, ItalicFont = LinLibertine_RI, BoldItalicFont =     . LinLibertine_RBI, ].     .      . This font family consists of the following shapes:          [...]          . * 'bold' with NFSS spec.:     . <->"[C:/Windows/Fonts/LinLibertine_RB.otf]/ICU:script=latn;language=DFLT;"          [...]          . * 'bold italic' with NFSS spec.:     . <->"[C:/Windows/Fonts/LinLibertine_RBI.otf]/ICU:script=latn;language=DFLT;"          [...]          . Font family 'LinuxLibertineO(0)' created for font 'Linux Libertine O' with     . options [].     .      . This font family consists of the following shapes:          [...]          . * 'bold' with NFSS spec.:     . <->"Linux Libertine O/B/ICU:script=latn;language=DFLT;"          [...]          . * 'bold italic' with NFSS spec.:     . <->"Linux Libertine O/BI/ICU:script=latn;language=DFLT;"


title: Overfull \hbox caused by em-dash

text: There is one problem that currently seems insolvable to me. I am typesetting a book in Russian language and I noticed that, in some cases, an overfull box appears which cannot be solved via manual `\hyphenation` or `\linebreak` or even `\emergencystretch`, because an em-dash is causing it. Due to the typesetting rules, the em-dash MUST stay at the end of the line if the line is about to break at this point, which is why moving it to the beginning of the next line cannot be considered. I tried applying `microtype`, but it seems not being able to condense the em- dash ONLY in case it is positioned at the end of the line AND is causing an overfull. Or to condense it at all, to be honest. If I re-define the width of the em-dash-symbol, the same problem will occur at other positions in the book. Changing the width of the text body didn't bring the desired effect either, because same situation came up as described above. Here comes the MWE:               \documentclass[fontsize=11pt,russian,open=any]{scrbook}      \usepackage[T2A]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[russian]{babel}     \usepackage{fancyhdr}      \usepackage[paperwidth=14.2cm, paperheight=20.4cm, top=1cm, bottom=1.3cm, twoside, inner=1.0cm, outer=1.2cm, bindingoffset=0.5cm, footskip=0.65cm, headsep=0cm, headheight=0cm, voffset=0pt, hoffset=0pt]{geometry}     \usepackage[kerning=true, tracking=true, spacing=true, selected=true, babel=true, stretch=10, shrink=10]{microtype}          \deffootnote[1.5em]{0.5em}{0em}{     \textsuperscript{\thefootnotemark}}          \setlength{\parindent}{1.25em}     \setlength{\emergencystretch}{1pt}          \frenchspacing      \righthyphenmin=2           \renewcommand{\baselinestretch}{0.9}          \clubpenalty=10000      \widowpenalty=10000     \flushbottom           \pagestyle{fancy}     \fancyhf{}     \fancyfoot[EC,OC]{\thepage}      \renewcommand{\headrulewidth}{0pt}          \begin{document}          Когда его вопль, отражаясь испуганной белкой от пустых котлов и голых стен, замер, завязнув в тягучей темноте, снова воцарилась тишина, нарушить которую было не в силах даже потрескивание дров в одиноком камине. Конечно, надо было бы пойти бросить в него ещё несколько поленьев, но за это время эти подонки смогут улизнуть или спрятаться получше!..          --- Да. Его так зовут. Забавно, правда? Царство Костей. Костей~--- правитель Царства Костей.           Агафон насупился, поколебался несколько секунд между <<Именно секрет>> и <<А тебе зачем?>>, но вздохнул подавленно, махнул рукой и признался.          --- В Царство Костей,~--- с надеждой вскинул на него глаза Иван~--- уж не вспомнит ли дед ещё что-нибудь полезное?          --- Ну хорошо. А как насчёт неразговаривания с набитым ртом?~--- не сдавался Костей.          \end{document}      Oh, and I'm using TeXstudio 2.5.2. If you take a closer look at the screenshot you'll see that sometimes even the hyphenation symbol is protruding into the margin, which also causes an overfull hbox: ![enter image description here](http://i.stack.imgur.com/xVfhY.jpg) I'd like to know how to handle these overfull boxes. Is there a way to narrow those symbols depending on their position in text or something like this?


title: Signature over printed name

text: I am writing a letter using `newlfm`, which implements the typeset signature with this code:               \namefrom{\textbf{Juan de la Cruz}\\               "Expert" TeXnician\\               Telephone: \printphonefrom\\               E-mail: \printemailfrom}      How do I add my (scanned) signature over my printed name? I want it to look like it was actually signed by hand. I wouldn't want to use `jpg` because it doesn't support transparency. Probably `png` or other format with transparency. I might as well print it, sign it, then scan it back; but then everything will be treated as graphics (e.g. text can't be selected).


title: Create multiline fraction

text: How to create an equation like in the image below. I tried to use `\cfraq` and `\hline` but with no success. I am asking for the layout only, not the formulae. ![enter image description here](http://i.stack.imgur.com/R0ZS6.png)


title: How to see the Steps number in an algorithm

text: In below algorithm I have used the package               \usepackage[linesnumbered,ruled,vlined]{algorithm2e}      1) How do I see steps number after step 2? 2) Is there any command apart from               \renewcommand{\labelenumi}{(\Roman{enumi})}       to get the item number as in roman font?               \begin{algorithm}     \DontPrintSemicolon % Some LaTeX compilers require you to use \dontprintsemicolon    instead     \KwIn{a,b,c,d}     \KwOut{e,r}     Calculate $x$, and $y$\\     Check,     \renewcommand{\labelenumi}{(\Roman{enumi})}     \begin{enumerate}[noitemsep,nolistsep]     \item If  $k \geq n$, then the  $m_{2}$.     \item If  $h \geq j$, then  $m_{1}$.     \end{enumerate}     Otherwise,\\     Initialisation: \textit{$g(0)=nj$}\\     $i=0$\\     Compute $n_{2}$,     \[     n(i)=\frac {a}{b(i)\sqrt{3v}}     \]\\     Update $b$,     \[     b(i+1)=( -\frac{1}{2(g(i)/D}+1)     \]\\     $i=i+1$,\\     Repeat \textit{Steps 3 to 6}, till $|a(i+1)-a(i) |<\epsilon$     \caption{algo of g}     \label{algo:b}     \end{algorithm}      ![enter image description here](http://i.stack.imgur.com/QxKnC.png)


title: Latex acronym package, \acsu does not print the page in list of acronyms

text: I encounter the following problem when working with the "used" option (`\acsu`) of the acronym package. Here is my minimal working example:                \documentclass[fontsize=11pt, listof=numbered, twoside, open=right, headsepline, plainheadsepline]{scrreprt}     \usepackage[printonlyused,withpage]{acronym}     \begin{document}          \ac{LED}          \acsu{LCD}          \appendix     \chapter{Acronyms}     \begin{acronym}[ABCD]         \acro{LED}{Light Emitting Diode}         \acro{LCD}{Liquid Crystal Display}     \end{acronym}     \end{document}      In the list of acronyms, "LED" is printed with the corresponding page, but "LCD" is printed without the page number, although I marked it as used with the `\acsu` command. Does anyone have an idea how to solve this issue?


title: cleveref doesn't use correct capitalized name if used with amsthm?

text: It seems that the `cleveref` package does not capitalize properly when referring to a newtheorem if both `\crefname` and `\Crefname` have been defined. Or is it just me? Here is my MWE:                \documentclass[a4paper,10pt]{article}      \usepackage{amsthm}      \newtheorem{theorem}{Theorem}      \usepackage[capitalise]{cleveref}      \crefname{theorem}{theoLowercase}{theoLowercaseS}      \Crefname{theorem}{TheoUpperCase}{TheoUppercasesS}      \begin{document}      \begin{theorem}\label{theo:test}         Test theorem      \end{theorem}      This is a reference to \cref{theo:test}.           \begin{figure} Test Figure         \caption{Test figure caption}         \label{fig:test}      \end{figure}      This is a reference to \cref{fig:test}.      \end{document}      On my machine, the refrence to the theorem uses the lowercase version if both `\crefname` and `\Crefname` are defined, namely : > This is a reference to theoLowercase 1. If I comment out the `\crefname` definition on line 5, I get the expected: > This is a reference to TheoUpperCase 1. In both cases, the reference to the figure is correctly capitalized though. Am I crazy?


title: Veitch diagram draw with TikZ

text: How can I make the same diagram like this in LaTeX? ![enter image description here](http://i.stack.imgur.com/UQwjn.png) I see that i could use package `karnaugh` but i don´t like placement of x. ![enter image description here](http://i.stack.imgur.com/YkwaY.png)


title: How to take the following paragraph

text: I'm new to TeX and I'm a bit lost. Could someone tell me how this should be written (marked 'PROBLEM HERE' in the code) Situation: When argument #2 is space (empty paragraph), I want to use next paragraph               \def\adjustParagraph#1\par{...some code here (which works ok)...}          \def\headline#1#2\par      % takes headline (#1) and the paragraph which follows (#2)        {\myFont#1\par      % headline        \if #2 {\adjustParagraph}   % if argument #2 is a space (empty paragraph) <= PROBLEM HERE        \else{\adjustParagraph#2\par}   % argument #2 is text        \fi}          \headline{This is headline}     Lorem ipsum dolor sit amet consectetuer ...          \headline{Another headline}          This time, argument 2 is that blank space above this line...


title: beamer block inside an itemize environment with overlays

text: I have a frame like this, there is a block inside the itemize environment, and there is an overlay :               \begin{frame}   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%       \frametitle{Comparing two Gaussian means: equality}          \begin{itemize}          \item<1-> Assume for instance that each measurement is $\approx 1000$           \item<1-> Would you mind if $\mu_1=1000$ and $\mu_2=1000.1$ ?          \item<1->[]      \begin{alertblock}{Significant difference does not mean important difference}       "The mean of the Gaussian distribution is well estimated whenever $n \geq 30$        "Significant difference" is a shortcut for \emph{significantly different from $0$}.        The presence of a significant difference shows that there is a strong evidence that        $\boxed{\mu_1 \neq \mu_2}$      \end{alertblock}          \vspace{-13pt}     \item<1->[]      \begin{columns}[T]     \column{.5\linewidth}     \begin{itemize}     \item<1-> Whether $\mu_1=\mu_2$ or  $\mu_1 \neq \mu_2$  is \emph{not} the question of interest     \item<2-> xx     \end{itemize}     \column{.5\linewidth}     \only<2->{\begin{figure}     ...     \end{figure}     }     \end{columns}     \end{itemize}          \end{frame}      You can see the rendering here. The problem is that the two slides are not well superposed, and I have done many unsuccessful attempts to solve that. ![enter image description here](http://i.stack.imgur.com/mWApi.png)


title: Identification of an empty macro from pgfplots using \ifx

text: Consider following MWE and the output thereafter. I have defined an empty macro and used `\ifx` to identify it as such. However, when an empty macro is received from `\pgfkeysgetvalue`, `\ifx` doesn't work.               \documentclass{article}     \usepackage{pgfplots, filecontents}     \pgfplotsset{compat=1.6}     \begin{filecontents}{test.dat}       Time Distance       0 0       1 1     \end{filecontents}          \pgfplotstableset{       columns/Distance/.style={          column name={$D_{\alpha}$},       }     }     \begin{document}     %     \def\tmp{}     \ifx\tmp\empty     \noindent Tmp is \tmp.\\     \fi     %     \pgfplotstableread{test.dat}{\loadedtable}%     \pgfplotstableforeachcolumn\loadedtable\as\col{%       \pgfplotstableset{columns/\col/.try}%       \pgfkeysgetvalue{/pgfplots/table/column name}\temp%       \ifx\temp\empty%         \noindent Temp is empty.\\%       \else%         \noindent Macro col is \col. Macro temp is \temp.\\%       \fi%     }%     \end{document}      ![Output of MWE](http://i.stack.imgur.com/VhRuJ.png) I am not sure whether macro `\temp` returned by `\pgfkeysgetvalue` is `\empty`. But it doesn't print anything. I have looked at these related posts: How to check if a macro value is empty or will not create text with plain TeX conditionals? Why doesn't \ifx work inside a node command in TikZ? What is the difference between \pgfutil@empty and \empty in an \ifx environment


title: Disable TeXstudio auto completion of square brackets?

text: I've disabled auto completion of `{}` from the advanced settings menu, but the program still automatically adds a `]` when I type `[` in examples like:               \item[--]      Is this a bug or can I disable it some other way?


title: \Latex{} : undefined control sequence

text: I use `teXworks` and I have a file called `textwork1.ltx`. Here is the code:               \documentclass{article}          \usepackage{amsmath}     \usepackage{amstext}     \usepackage{amssymb}     \usepackage{graphicx}          \begin{document}     \title{My first \Latex{} Document}     \maketitle          Hello world!     \end{document}      and it gives me this error:               Errors: 1, Warnings: 0, Bad boxes: 0               textwork1.ltx     11     Undefined control sequence.     \@title ->My first \Latex                                {} Document     l.11 \maketitle      What can be the reason?


title: How to compile all LaTeX files in subdirectories?

text: I have a directory which has subdirectories (of arbitrary depth) that all have files, but have LaTeX (.tex) files as well. However, I do not want to go to each file and compile each separately. Is there a script to compile all of them at once from the top directory?


title: Print from A4 to A0

text: I am a math teacher and am working on a brochure for my students, but I'm doing this aquivo in A0 size, how can I do to change to A4 without unconfigure the page. Excuse my lack of knowledge in Latex.                \documentclass{sciposter}     \usepackage{preposterTikz} %pacote com o preambulo.          %%comandos exclusivos deste poster.     \hypersetup{pdfpagelayout=SinglePage,linkcolor=true} %abre a pagina em modo simples     \geometry{paperwidth=90cm,paperheight=100cm,centering,         textwidth=77cm,textheight=87cm,left=4cm,top=4cm}     %********************************************************************     \begin{document}          %%Preencha os comandos abaixo com seus dados.     \newcommand{\tituloposter}{Poster Cient\'ifico no {\LaTeX} com TikZ} %%titulo do poster     \newcommand{\nome}{Fulano de Tal} %%seu nome     \newcommand{\curso}{Acad\^emico do Curso de Ci\^encias} %%curso     \newcommand{\myemail}{email@email.com} %%email     \newcommand{\nomecongresso}{1$^\circ$ Congresso Nacional de Inicia\c{c}\~ao Cient\' ifica} %%congresso     \newcommand{\abrev}{I CNIC} %%abrevia\c c\~ao          %%Imagem de fundo (background)     \imgfundo{abstract_0079}          %%titulo feito com TikZ (usando \newcommand).     %%informe o primeiro e segundo logo e a cor.     \titulo{logo}{sbm_simb}{twoblue}     %\titulo{logo}{sbm_simb}{OrangeLampLight}          %%informe a cor.     %\congresso{GreenTeal}          \vspace{5cm} %espa\c{c}o          %%informe o terceiro e quarto logo e a cor.     \rodape{logo_redebrasil}{cnpq}{twoblue}     %\rodape{logo_redebrasil}{cnpq}{OrangeLampLight}          %%Definindo largura para as caixas.     \newdimen\largura     \largura=.3\textwidth     %%Estilos     \tikzstyle{mybox}=[draw=blue,fill=yellow!20,very thick,         rectangle,rounded corners=5mm,inner sep=10mm]     \tikzstyle{subtitulo}=[fill=twoblue,text=white,yshift=5mm,inner sep=10pt]          %%Primeira caixa     \begin{tikzpicture}[node distance=.05*\textwidth]%,opacity=.75] %%se quiser voce pode usar uma transpar\^encia.          \node[mybox] (box1) {         \begin{minipage}[t][20cm]{\largura}           %%Paragrafo.           \setlength{\parindent}{2em}           %%digite seu texto aqui           \begin{center}           \textbf{Progressão Aritmética (PA)}           \end{center}          Fórmula do termo geral de uma PA          $$a_n = a_1 +(n-1)r$$          Soma dos $n$ primeiros termos de uma PA          $$S_n = \displaystyle \frac{(a_1 + a_n)n}{2}$$          \begin{center}     \textbf{Progressão Geométrica (PG)}     \end{center}          Fórmula do termo geral de uma PG          $$a_n = a_1 \times q^{n-1}$$          Soma dos $n$ primeiros termos de uma PG          $$S_n =\displaystyle \frac{a_1(q^n -1)}{q-1}$$                    \end{minipage}         };     %%digite o subtitulo aqui.     \node[subtitulo,minimum width=\largura] at (box1.north) {\tituloA{Progressões}};                    %%Segunda caixa     %%Definindo nova largura.     \largura=.3\textwidth     \node[mybox] (box2) [right = of box1.north east,anchor=north west] {         \begin{minipage}[t][20cm]{\largura}                %%Paragrafo.           \setlength{\parindent}{2em}           %%digite seu texto aqui           \indent Definição:\\     \begin{center}     $\log_b a = x \Leftrightarrow a= b^x$, com $a > 0$ e $0< b \neq 1$     \end{center}               Propriedades:          \begin{enumerate}     \item[1.]$\log_c (a.b) = \log_c a + \log_c b$ com $a>0, b>0, 0<c\neq1$     \item[2.]$\log_c \displaystyle{\frac{a}{b}} = \log_c a - \log_c b$ com $a>0, b>0, 0<c\neq1$     \item[3.]$\log_c a^m = m\log_c a$ com $a>0$, $0<c\neq 1$, $m \in \mathbb{R}$     \end{enumerate}                   \end{minipage}         };     %%digite o subtitulo aqui.     \node[subtitulo,minimum width=\largura] at (box2.north) {\tituloA{Logaritmo}};               \largura=.3\textwidth     \node[mybox] (box6) [right = of box2.north east,anchor=north west] {         \begin{minipage}[t][20cm]{\largura}                %%Paragrafo.           \setlength{\parindent}{2em}           %%digite seu texto aqui           \indent Relações Métricas no Triângulo Retângulo:\\          \begin{figure}[!h]       \centering       %\input{figuras/figtikz}\\       \includegraphics[scale=1.3]{ab.png}     \end{figure}          $$h^2 = m\cdot n$$     $$b^2 = a\cdot m$$     $$c^2 = a\cdot n$$     $$b\cdot c = a\cdot h$$     \begin{center}     $a^2 = b^2 + c^2$ (Pitágoras)     \end{center}           \end{minipage}         };     %%digite o subtitulo aqui.     \node[subtitulo,minimum width=\largura] at (box6.north) {\tituloA{Logaritmo}};                              %%Terceira caixa     \node[mybox] (box3) [below = of box1.south west,anchor=north west] {         \begin{minipage}[t][16cm]{\largura}           %%Paragrafo.           \setlength{\parindent}{2em}           %%digite seu texto aqui           \indent Função injetora, sobrejetora e bijetora     \begin{enumerate}     \item[•] Uma função $f: A \rightarrow B$ é injetora se todos os elementos distintos em A têm imagens distintas em B.     \item[•] Uma função $f:A \rightarrow B$ é sobrejetora se todos os elementos de B são imagens de elementos de A.     \item[•] Uma função $f: A \rightarrow B$ é bijetora se é injetora e sobrejetora.     \end{enumerate}          \begin{figure}[!h]     \centering     \includegraphics[scale=1.0]{fcinj.png}     \end{figure}              \end{minipage}         };     %%digite o subtitulo aqui.     \node[subtitulo,minimum width=\largura] at (box3.north) {\tituloA{Figuras TikZ}};               \largura=.3\textwidth     \node[mybox] (box7) [below = of box3.south west,anchor=north west] {         \begin{minipage}[t][16cm]{\largura}                %%Paragrafo.           \setlength{\parindent}{2em}           %%digite seu texto aqui           \indent \begin{enumerate}     \item[•] Combinação: $\displaystyle C_{n,p} = \frac{n!}{p!(n-p)!}$     \item[•] Arranjo: $\displaystyle A_{n,p} = \frac{n!}{(n-p)!} $     \item[•] Permutação de $n$ objetos distintos: $P_n = n!$     \item[•] Permutação de elementos repetidos: $P_{n}^{\alpha,\beta,\gamma} = \displaystyle\frac{n!}{\alpha ! \beta! \gamma !}$     \item[•] Probabilidade de ocorrer um evento $\displaystyle = \frac{n(A)}{n(E)}$          \end{enumerate}           \end{minipage}         };     %%digite o subtitulo aqui.     \node[subtitulo,minimum width=\largura] at (box7.north) {\tituloA{Análise Combinatória}};                                        %%Quarta caixa     %%Definindo nova largura.      \largura=.3\textwidth     \node[mybox] (box4) [right = of box3.north east,anchor=north west] {         \begin{minipage}[t][16cm]{\largura}           %%Paragrafo.           \setlength{\parindent}{2em}           %%digite seu texto aqui           \indent Razões Trigonométricas no Triângulo Retângulo :\\          \begin{figure}[!h]     \centering     \includegraphics[scale=1.3]{ba.png}     \end{figure}          \begin{center}     $sen (\alpha) = \displaystyle{\frac{b}{a}}$ \hspace{4cm} $sen (\beta) = \displaystyle{\frac{c}{a}}$     \end{center}     \begin{center}     $cos (\alpha) = \displaystyle{\frac{c}{a}}$ \hspace{4cm}  $cos (\beta) = \displaystyle{\frac{b}{a}}$     \end{center}     \begin{center}     $tg (\alpha) = \displaystyle{\frac{b}{c}}$ \hspace{4cm}  $cos (\beta) = \displaystyle{\frac{c}{b}}$          \end{center}                        \end{minipage}         };     %%digite o subtitulo aqui.     \node[subtitulo,minimum width=\largura] at (box4.north) {\tituloA{Conclus\~ao}};          %%Quinta caixa     \begingroup     \renewcommand{\section}[2]{}     \node[mybox] (box5) [below = of box4.south west,anchor=north west] {         \begin{minipage}[t][17cm]{\largura}           Área e Comprimento da Circunferência:\\          \begin{figure}[!h]     \centering     \includegraphics[scale=1.7]{abc.png}     \end{figure}           $$C = 2\cdot \pi \cdot R$$     $$A = \pi \cdot R^2$$              \end{minipage}         };     %%digite o subtitulo aqui.     \node[subtitulo,minimum width=\largura] at (box5.north) {\tituloA{Refer\^encias}};     \endgroup     \end{tikzpicture}     \end{document}


title: How to arbitrarily stretch braces

text: I want to stretch the `\rbrace` command by an arbitrary vertical scale factor in order to have precise control over its size inside a TikZ picture. Surely there's a simply command to stretch it, any ideas?


title: Underlining fractions

text: I need to be able to underline equations involving fractions, which are aligned using the `alignedat` environment from `amsmath`. To be able to underline at all, I'm using the solution from this question \- but when fractions get 'underlined', the line goes through the middle of the fraction rather than beneath it. Also, is it possible to modify the underlining to make it a double underline? # Code - main file               \documentclass[answers]{exam}          \addtolength{\textwidth}{1cm}     \addtolength{\hoffset}{-0.5cm}     \addtolength{\textheight}{1cm}     \addtolength{\voffset}{-0.5cm}          \usepackage{xcolor} % Use colour!     \usepackage{titlesec} % Allow creation of new sectioning commands     \usepackage{amsmath} % Needed for splitting equations over multiple lines     \usepackage[normalem]{ulem} % Underlining effects     \usepackage{environ} % Tinkering with environments     \usepackage{gensymb} % Degree symbol     \usepackage[pdfstartview=FitH,bookmarks=true]{hyperref}      \usepackage[numbered]{bookmark} % PDF Bookmarks     \usepackage{tikz} % Underlining spanning alignment marks          \titleformat{\section}{\normalfont\large\bfseries}{Chapter }{0em}{\thesection: }     \renewcommand\sectionmark[1]{\markright{#1}} % Set up \rightmark     \renewcommand{\thesection}{\texorpdfstring{}{Chapter }\arabic{section}\texorpdfstring{}{:}} % Correct text for bookmarks          \titleclass{\exercise}{straight}[\section]  % Create new 'section' command for exercises - this replaces \subsection     \newcounter{exercise}     \titleformat{\exercise}{\normalfont\large\bfseries}{Exercise }{0em}{\theexercise}     \titlespacing*{\exercise}{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}     \newcommand{\exerciseautorefname}{exercise}     \renewcommand{\theexercise}{\texorpdfstring{}{Exercise }\arabic{section}\Alph{exercise}} % Correct text for bookmarks     \makeatletter     \providecommand*{\toclevel@exercise}{2} % Make sure exercises appear below sections in bookmarks     \makeatother          \renewcommand{\thepartno}{\roman{partno}} % Format part numbers as lower-case roman numerals     \renewcommand{\solutiontitle}{\noindent} % Format solution - just print solution as entered     %\newcommand{\ans}[1]{\uuline{#1}} % Double underline final answer     \newcommand{\ans}[1]{\tikzmarkin{\theexercise\thequestion\thepartno}#1\tikzmarkend{\theexercise\thequestion\thepartno}} % Double underline final answer          \pagestyle{headandfoot} % Let's have both     \header{\oddeven{Exercise \theexercise}{Chapter \thesection: \rightmark}}{Core 1}{\oddeven{Chapter \thesection: \rightmark}{Exercise \theexercise}}     \headrule     \footer{\oddeven{}{\thepage}}{}{\oddeven{\thepage}{}}     \footrule               \NewEnviron{sol}{ % Align solutions sensibly         \begin{solution}             $\begin{alignedat}{2}                 \BODY             \end{alignedat}$         \end{solution}     }               \makeatletter % Use tikzmarks to underline across alignment marks     \tikzset{%          remember picture with id/.style={%            remember picture,            overlay,            save picture id=#1,          },          save picture id/.code={%            \edef\pgf@temp{#1}%            \immediate\write\pgfutil@auxout{%              \noexpand\savepointas{\pgf@temp}{\pgfpictureid}}%          },          if picture id/.code args={#1#2#3}{%            \@ifundefined{save@pt@#1}{%              \pgfkeysalso{#3}%            }{              \pgfkeysalso{#2}%            }          }        }             \def\savepointas#1#2{%       \expandafter\gdef\csname save@pt@#1\endcsname{#2}%     }          \def\tmk@labeldef#1,#2\@nil{%       \def\tmk@label{#1}%       \def\tmk@def{#2}%     }          \tikzdeclarecoordinatesystem{pic}{%       \pgfutil@in@,{#1}%       \ifpgfutil@in@%         \tmk@labeldef#1\@nil       \else         \tmk@labeldef#1,(0pt,0pt)\@nil       \fi       \@ifundefined{save@pt@\tmk@label}{%         \tikz@scan@one@point\pgfutil@firstofone\tmk@def       }{%       \pgfsys@getposition{\csname save@pt@\tmk@label\endcsname}\save@orig@pic%       \pgfsys@getposition{\pgfpictureid}\save@this@pic%       \pgf@process{\pgfpointorigin\save@this@pic}%       \pgf@xa=\pgf@x       \pgf@ya=\pgf@y       \pgf@process{\pgfpointorigin\save@orig@pic}%       \advance\pgf@x by -\pgf@xa       \advance\pgf@y by -\pgf@ya       }%     }     \makeatother          \newcommand{\tikzmarkin}[2][]{%           \tikz[remember picture,overlay,baseline=0.25ex]           \draw[line width=0.3pt,#1]           (pic cs:#2) -- (0,0)           ;}          \newcommand\tikzmarkend[2][]{%     \tikz[remember picture with id=#2,baseline=0.25ex] #1;}               \begin{document}          \unframedsolutions % Print solutions as plain text     \SolutionEmphasis{\color{blue}} % Print solutions in blue          \include{Chapter1}          \end{document}      # Code - Chapter1.tex               \section{Basic Algebra}     \begin{questions}         \question Simplify the following fractions as much as possible.         \begin{parts}             \part $\dfrac{ab}{ac}$             \begin{sol}                 \ans{\dfrac{ab}{ac} &= \dfrac{b}{c}}             \end{sol}         \end{parts}     \end{questions}