title: Fixing picture heights (to avoid overlap with text)

text: I’m using the `picture` environment (with `linguex`). However my pictures overlap with the text: ![enter image description here](http://i.stack.imgur.com/iElx1.png) I've fixed the problem by adding in a rule with zero width and height equivalent to the picture (30 times 0.3ex) plus 1ex (for extra clearance): `\rule[-10ex]{0ex}{10ex}`. How can I avoid this manual fix? ![enter image description here](http://i.stack.imgur.com/jP8Ue.png) * * * Separate question: to get characters with ascenders and descenders to align with the baseline of the text, I’m sticking them into boxes with zero height and depth: `\raisebox{0ex}[0pt][0pt]{$\omega$}`. Surely there’s a less verbose way? * * *               \documentclass[12pt]{article}     \usepackage{lipsum, mathptmx, qtree, linguex}          \begin{document}     \lipsum[1]          \ex.   \setlength\unitlength{.3ex}     \begin{picture}(24,-30)     \multiput(2.5,-1.5)(12,-15){2}{\line(20,-30){6}}     \put(0,0){\makebox(0,0)[t]{\raisebox{0ex}[0pt][0pt]{$\omega$}}}     \put(12,-15){\makebox(0,0)[t]{\raisebox{0ex}[0pt][0pt]{$\pi$}}}     \put(24,-30){\makebox(0,0)[t]{\raisebox{0ex}[0pt][0pt]{$\varphi$}}}     \end{picture}     \rule[-10ex]{0ex}{10ex}          \lipsum[1]     \end{document}


title: image position problem

text: I have a problem with images positioning. I dont know why but latex puts the last figure on a new page. I want it all at the same page. And I cant find what is wrong. Here is my code:               \documentclass[12pt,a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage[czech]{babel}     \usepackage[T1]{fontenc}     \usepackage{graphicx}     \usepackage{amsmath,amsfonts,amssymb}     \usepackage{epsfig}     \usepackage{subfig}     \usepackage[lighttt]{lmodern}     \usepackage[left=2.5cm,right=2.5cm,top=2cm,bottom=2cm]{geometry}     \usepackage{fancyhdr}          \newcounter{priklad}     \newenvironment{priklad}     {\refstepcounter{priklad}     \medskip          \textbf{Příklad \thepriklad .\ }}          \lhead{TEXT}          \pagestyle{fancy}              \begin{document}          \begin{priklad}     text-n-1     \end{priklad}          \begin{figure}[hbtp]     \subfloat[]{\includegraphics[height=3cm]{11.eps}}     \hspace{10pt}     \subfloat[]{\includegraphics[height=3cm]{16.eps}}     \hspace{10pt}     \subfloat[]{\includegraphics[height=3cm]{23.eps}}     \hspace{10pt}     \subfloat[]{\includegraphics[height=3cm]{14.eps}}     \hspace{10pt}     \subfloat[]{\includegraphics[height=3cm]{15.eps}}     \hspace{10pt}     \subfloat[]{\includegraphics[height=3cm]{12.eps}}     \end{figure}          \begin{priklad}     text-n-2     \end{priklad}     \begin{figure}[hbtp]     \includegraphics[height=1.8cm]{E.eps}     \hspace{20pt}     \subfloat[]{\includegraphics[height=1.5cm]{Eb.eps}}     \hspace{8pt}     \subfloat[]{\includegraphics[height=1.5cm]{Eano.eps}}     \hspace{8pt}     \subfloat[]{\includegraphics[height=1.5cm]{Ec.eps}}     \hspace{8pt}     \subfloat[]{\includegraphics[height=1.5cm]{Ed.eps}}     \hspace{8pt}     \subfloat[]{\includegraphics[height=1.5cm]{Ee.eps}}     \end{figure}          \begin{priklad}     text-n-3     \end{priklad}          \begin{figure}[hbtp]     \includegraphics[height=2.7cm]{7.eps}     \hspace{8pt}     \subfloat[]{\includegraphics[height=2.5cm]{7b.eps}}     \hspace{0pt}     \subfloat[]{\includegraphics[height=2.5cm]{7d.eps}}     \hspace{2pt}     \subfloat[]{\includegraphics[height=2.5cm]{7ano.eps}}     \hspace{4pt}     \subfloat[]{\includegraphics[height=2.5cm]{7c.eps}}     \end{figure}          \begin{priklad}     text-n-4     \end{priklad}          \begin{figure}[hbtp]     \includegraphics[height=4.2cm]{2u.eps}     \subfloat[]{\includegraphics[height=1.9cm]{2a.eps}}     \hspace{3pt}     \subfloat[]{\includegraphics[height=1.9cm]{2b.eps}}     \hspace{3pt}     \subfloat[]{\includegraphics[height=1.9cm]{2c.eps}}     \hspace{3pt}     \subfloat[]{\includegraphics[height=1.9cm]{2d.eps}}     \hspace{3pt}     \subfloat[]{\includegraphics[height=1.9cm]{2e.eps}}     \end{figure}          \end{document}      Would anyone know what may cause my problem?


title: Arrow between parts of equation in LaTeX

text: I want to make an arrow under an equation pointing from one part of the equation to another. A bit like an underbrace, but with an arrow. How can I do this?


title: Metapost label based on variable value

text: I want to label a scale based on a variable value and I wrote a metapost code like this.               $ := 1;     for i = -.3cm step .6cm until 3.6cm:         label.bot(str$,(i,-3.7cm));         $ := incr($);     endfor;      It just labels "$" instead of its value. How to output the variables value?


title: Set a colormap to fill a bar plot using pgfplots

text: I'm trying to change the default color of the bar plot with a a colormap without success. The thing is that I don't like the default color sequence. However, I was wondering if there is a way of automatically switching between colors. I try using the `cycle list name` but it only changes the line and doesn't fill the bars. Is there any hope or do I have to set the colors by hand every time in the `\addplot` command? This is an example of what I have               \documentclass{article}          \usepackage{tikz}     \usepackage{pgfplots}          \pgfplotsset{width=\linewidth,compat=1.3}          \begin{document}     \pagestyle{empty}          \begin{tikzpicture}     \begin{axis}[     x tick label style={     /pgf/number format/1000 sep=},     ylabel=Population,     enlargelimits=0.05,     legend style={at={(0.5,-0.15)},     anchor=north,legend columns=-1},     ybar interval=0.7,     cycle list name=color list`enter code here`     ]     \addplot     coordinates {(1930,50e6) (1940,33e6)     (1950,40e6) (1960,50e6) (1970,70e6)};     \addplot     coordinates {(1930,38e6) (1940,42e6)     (1950,43e6) (1960,45e6) (1970,65e6)};     \addplot     coordinates {(1930,15e6) (1940,12e6)     (1950,13e6) (1960,25e6) (1970,35e6)};     \addplot     coordinates {(1930,15e6) (1940,12e6)     (1950,13e6) (1960,25e6) (1970,35e6)};          \legend{Far,Near,Here,There}     \end{axis}     \end{tikzpicture}               \end{document}


title: Draw cirle/point in text

text: I want to (re-)construct circles and points within a paragraph (green). It looks like the circle is not the letter `o`.   In the lower part of the image I tried to highlight that the symbols are not regular letters because they do not stick to the base line (red horizantal line). ![Screenshot](http://i.stack.imgur.com/GDkJR.jpg) Can you give me some guidance how to achieve that? Do not hesitate to leave a comment if you wish further details.


title: Connecting text in a tikz-qtree with other text by arrow

text: I want to connect the NP[...], NP[...] text in the left daughter of the following tree with the NP[...], NP[...] in the right daughter.               \documentclass{article}          \usepackage{xspace}          \usepackage{tikz-qtree}     \tikzset{every roof node/.append style={inner sep=0.1pt,text height=2ex,text depth=0.3ex}}          \newcommand{\feattab}[1]{[\begin{tabular}[t]{@{}l@{}}#1 ]\end{tabular}}     \newcommand{\vform}{{\sc vform}\xspace}          \newcommand{\type}[1]{{\it #1}}     \newcommand{\sliste}[1]{%     \mbox{%     $\left\langle\mbox{\sc #1}\right\rangle$}%     }               \begin{document}               \begin{tikzpicture}     \tikzset{level 1+/.style={level distance=4\baselineskip}}     \tikzset{frontier/.style={distance from root=8\baselineskip}}     \Tree[.V\feattab{                   \vform \type{fin},\\                   \sliste{ NP[\type{nom}], NP[\type{acc}] } }              [.V\feattab{                   \vform \type{bse},\\                   \sliste{ NP[\type{nom}], NP[\type{acc}] } } lesen ]             [.V\feattab{                   \vform \type{fin},\\                   \sliste{ NP[\type{nom}], NP[\type{acc}], V } } wird ]     ]     \end{tikzpicture}          \end{document}      I tried to achieve this with `\node` and `\draw`, but somehow this does not work:               \documentclass{article}          \usepackage{xspace}          \usepackage{tikz-qtree}     \tikzset{every roof node/.append style={inner sep=0.1pt,text height=2ex,text depth=0.3ex}}          \newcommand{\feattab}[1]{[\begin{tabular}[t]{@{}l@{}}#1 ]\end{tabular}}     \newcommand{\vform}{{\sc vform}\xspace}          \newcommand{\type}[1]{{\it #1}}     \newcommand{\sliste}[1]{%     \mbox{%     $\left\langle\mbox{\sc #1}\right\rangle$}%     }               \begin{document}               \begin{tikzpicture}     \tikzset{level 1+/.style={level distance=4\baselineskip}}     \tikzset{frontier/.style={distance from root=8\baselineskip}}     \Tree[.V\feattab{                   \vform \type{fin},\\                   \sliste{ NP[\type{nom}], NP[\type{acc}] } }              [.V\feattab{                   \vform \type{bse},\\                   \sliste{ \node(lesen){NP[\type{nom}], NP[\type{acc}]}; } } lesen ]             [.V\feattab{                   \vform \type{fin},\\                   \sliste{ \node(wird){NP[\type{nom}], NP[\type{acc}]};, V } } wird ]     ]     \draw[semithick,->] (lesen)..controls +(south east:5) and +(south west:5)..(wird);     \end{tikzpicture}          \end{document}      Is there a way to do this? I would also like to highlight the NP[...], NP[...] part by turning the background into gray.


title: reference overlay numbers with names

text: I have two-column slides where there is a tikz figure on the left, and itemization on the right. There is >10 overlays due to pauses in the itemization, and some pieces of the tikz picture are added/removed/modified accordingly (with `\only<>`) as are the items uncovered. It is easy to break the code by adding one `\pause`, because all numbers have to be rewritten. Is there a way (no hint in Beamer Manual, chap. 9) to assign the value of `beamerpause` counter to symbolic names, at the point when that part gets uncovered for the first time, something like (needs multiple passes to be resolved) the following?               \begin{column}{..}        \only</bar->{...}  % <2-> (use e.g. / to reference labels)        \only<-/baz>{...}  % <-3>     \end{column}     \begin{column{..}        \begin{itemize}           \item foo \pause           \item bar \firstUncoveredLabel{bar}\pause % assign 2 to label /bar           \item baz \pause[baz]       % nicer syntax; assign 3 to label /baz           \item end        \end{itemize}     \end{column}      **EDIT:** minimal working example:               \documentclass{beamer}     \usepackage{tikz}     \begin{document}        \begin{frame}           \begin{columns}              \begin{column}{.5\textwidth}                 \tikz{                    \draw< -3>        (0,0) grid (3,3);                    \draw<2-3>[red]   (0,0) -- (3,1);                    \draw<3- >[green] (0,0) -- (3,2);                    \draw<4  >[blue]  (0,0) -- (3,3);                 }              \end{column}              \begin{column}{.5\textwidth}                 \begin{itemize}                    %%%% uncomment this item and all numbers above have to be shifted :-(                    % \item important remark at the beginning \pause                     \item grid \pause                    \item grid, red \pause                    \item grid, red, green \pause                    \item green, blue                 \end{itemize}              \end{column}           \end{columns}        \end{frame}     \end{document}      and this is what I dream of ( _does not compile_ ):               \documentclass{beamer}     \usepackage{tikz}     \begin{document}        \begin{frame}           \begin{columns}              \begin{column}{.5\textwidth}                 \tikz{                    %% use symbolic names for overlay specificaiton                    \draw<-/gridRedGreen>                (0,0) grid (3,3);                    \draw</gridRed-/gridRedGreen>[red]   (0,0) -- (3,1);                    \draw</gridRedGreen->        [green] (0,0) -- (3,2);                    \draw</last>                 [blue]  (0,0) -- (3,3);                 }              \end{column}              \begin{column}{.5\textwidth}                 \begin{itemize}                    %%%% uncomment and overlays are still correct :-)                    % \item important remark at the beginning \pause                     \item grid                \pause[grid]                    \item grid, red           \pause[gridRed]                    \item grid, red, green    \pause[gridRedGreen]                    \item green, blue                       \end{itemize}              \end{column}           \end{columns}        \end{frame}     \end{document}


title: changing point to colon for natbib

text: I am using bibtex/natbib, with apalike style. Bibliographic items appears in the following way in my .pdf file: Cox, D. (1972). Regression Models and Life-Tables. _Journal of the Royal Statistical Society. Series B (Methodological)_ , 34(2):187220. I would like to know if I can change the point between "(1972)" and the title into a colon.


title: %!TEX root = to parent directory

text: Currently, I am writing a large report. In my previous ones, I always had the chapters and the main file (`thesis.tex`) in the same directory as the individual chapters. This time, however, I created a subfolder called "chapters" and put the chapter `.tex` files in there. But obviously, the command               %!TEX root = thesis.tex"`      which I previously put at the beginning of each `chapter.tex`, does not work anymore. Since I work on the report from different locations, I can not define an absolute path but need to define a relative one. I tried `%!TEX root = ../thesis.tex` and `/%!TEX root = thesis.tex`, both of which do not work. I found threads and solutions for `\input` and other commands, none of which solve by problem, though. If anyone was able to shed some light here, I'd be very thankful!


title: Inverse Hyperbolic Functions in pgfplots

text: What I want is to plot a function that includes an inverse hyperbolic sine in it. This is my code/               \documentclass[border= 5mm]{standalone}     \usepackage{pgfplots}     \usepackage{amsmath}          \DeclareMathOperator{\arcsinh}{arcsinh}          \begin{document}     \begin{tikzpicture}     \begin{axis} [restrict z to domain=0:100,zmax=200]     \addplot3 [surf, samples=30,domain=-155:205,y domain=0:10, z buffer=sort]     ({sin(x)*y},{cos(x)*y},{60.13+1.9*tan(\arcsinh y)-15.69*cos(1.794+y-tanh(0.9074*y))});      \end{axis}      \end{tikzpicture}     \end{document}      Unfortunately, this comes up with an error saying that:               Argument of \pgfplotsforeachungrouped@ has an extra }.      meaning the `}` before the `\end{axis}`. But also deleting it does no good (And I know it is needed there.)


title: How to include "Bookman Old Style" font as a main font in my Ph.D thesis?

text: I am unable to figure out simple solution to add "Bookman Old Style" as a main font in my latex document. I have used below line but does not give me required font.               \usepackage{bookman}      Could not find any Simple correct answer for this. Pl. suggest how to do it. I am using windows, pdflatex. thank you


title: Color switches are problematic with footnotes, longtable and hyperref

text: When using the `color` package in its switch form (`\color` cf. `\textcolor`), things can get confused using certain packages, with footnotes, and with section headings. The section headings issue was discussed in another of my questions but, even with the `\zcolor` robust command definition suggested by David Carlisle (the color author) there, this still causes problems with footnotes, and the `longtable` and `hyperref` packages. See the LaTeX source below: (a) Footnotes from coloured text lose their colour. (b) `hyperref` URLs within footnotes get the colour back! (This doesn't happen if using the `url` package instead.) (c) Floating longtables can/will get the color of text on the page they float to, even when defined in a non-coloured area. (Using `table` and `tabular` doesn't have this problem. I used the `afterpage` package to force the table to be on the next page, and assume the problem still exists if it 'naturally' did.)               \documentclass[11pt,a4paper,twoside,notitlepage]{article}          %\usepackage{url}      % URLs in footnotes consistent (no color) if use this instead     \usepackage{hyperref}     \usepackage{breakurl}     \usepackage[usenames,dvips]{color}     \usepackage{lipsum}     \usepackage{afterpage}     \usepackage{longtable}          \newcommand{\startToDo}{\color{Purple}}     \newcommand{\stopToDo}{\color{Black}}          \author{Stuart Rossiter}     \title{Color weirdness test}     \date{4th November 2013}          \begin{document}          \maketitle          \startToDo          % Works with titles     \section{Wibble Wobble}     \lipsum[1-4]     What about footnote weirdness?\footnote{A profound footnote that should be     colored with a URL:     \url{http://wibblewobble.org}.}     \stopToDo          \lipsum[1-3]          \afterpage{         % Just to force it to be on page with colored text     \begin{longtable}{ccc}      % Table is OK if use normal table and tabular     %\begin{table}     %\begin{tabular}{ccc}     a & b & c \\     d & e & f \\     \caption{An astonishing table that shouldn't be coloured.}     %\end{tabular}     %\end{table}     \end{longtable}     }          \section{Wobble Wibble}          \startToDo     \lipsum     \stopToDo          \end{document}      I guess my question is: Can my use of `color` be 'fixed' to work robustly in all such scenarios? (David's answer to my other question suggests `color` is fundamentally problematic in such contorted constructs, and can't be 'fixed' itself.) As the `\startToDo` and `\stopToDo` (custom) macros suggest, I use `color` to mark-up to-do text. I'll ask a separate question about better alternatives (that avoid these colour issues).


title: \AtBeginEnvironment adds spurious spaces to .toc when using \addtocontents

text: I'm using `scrartcl` and am trying to move the appendices in the toc one level up so that they are formatted as if they where a subsection instead of a section. I've adapted my solution from this question and my current MWE (min.tex) looks like this:               \documentclass{scrartcl}          \usepackage[page]{appendix}  % better appendices: \begin{appendices}     \usepackage{etoolbox}           % needed for code below (\AtBeginEnvironment)     \AtBeginEnvironment{appendices}{%         \addappheadtotoc             % add Appendices to toc         \makeatletter         \addtocontents{toc}{%        % move appendix sections one level up in toc             \begingroup              % make sure we reset section level redefinition after appendices             \let\protect\l@section\protect\l@subsection             \let\protect\l@subsection\protect\l@subsubsection}}     \AtEndEnvironment{appendices}{%         \addtocontents{toc}{\endgroup}}  % reset section level redefinition          \begin{document}     \tableofcontents          \begin{appendices}     \section{Variablen}     \section{Tabellen}     \end{appendices}          \end{document}      When compiling with lualatex the second time to get the table of contents, I get the following error:               ) (./min.toc          ! LaTeX Error: Something's wrong--perhaps a missing \item.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...          l.3 ...tsline {section}{\numberline {A}Variablen}{1}      Looking at min.toc, it is clear why. There are spourious spaces added in the commands               \begingroup \let \l @section\l @subsection \let \l @subsection\l @subsubsection      which should read               \begingroup \let \l@section\l@subsection \let \l@subsection\l@subsubsection      When I add the `\let` commands just after `\begin{appendices}` it works fine. So my suspicion is, that `\AtBeginEnvironment` is adding those spaces. I'd rather like to keep this in the preamble and not put it in the main document. Is there a way to fix this? ## Update The formatting problem described below is fixed imho quite more elegantly in the accepted answer than my edit here. I suggest to use that. But I'll leave my fix for the record. * * * The solution from the answer below and from the above question with the fix in the comments by cgnieder has inconsistency problems with the "Appendices" heading of the `appendix` package. To adapt it to the formatting of sections used in `scrartcl`, the command `\@sec@pppage` has to be renwed (modified from the `appendix` package):               \makeatletter     \renewcommand{\@sec@pppage}{%       \par       \addvspace{4ex}%       \@afterindentfalse       {\parindent \z@ \raggedright        \interlinepenalty \@M        % the following line was changed from the original        \usekomafont{disposition} \usekomafont{section} \appendixpagename%        \markboth{}{}\par}%       \if@dotoc@pp         \addappheadtotoc       \fi       \nobreak       \vskip 3ex       \@afterheading     }     \makeatother      This code might be a bit overkill, but it works. Unfortunately, my LaTeX programming skills are not quite where they could be. Maybe someone has a better solution?


title: How can I link to the bibliography chapter within the text of a document with \ref?

text: I have a project which has a bibliography which I have included into my table of contents using `tocbibind`. In my report I have a section which details the structure of the report, I mention each chapter within but I can't reference the bibliography as the link goes to the previous section. See example code:               \documentclass[a4paper, 12pt]{report}     \usepackage[nottoc,numbib]{tocbibind}          \begin{document}     \tableofcontents     \chapter{first chapter}\label{chap:one}     first we have \ref{chap:one} then \ref{chap:two} followed by \ref{chap:bib}          \chapter{second chapter}\label{chap:two}          \bibliography{references}{}\label{chap:bib}     \bibliographystyle{ieeetran}          \end{document}      The `\ref{chap:bib}` points to chapter two since bibliography is not a real chapter, how do I link to it or reference it in text?


title: Is this a hyperref forms bug?

text: I tried to create a fillable form for our school using `hyperref`. Look at the following MWE:               \documentclass[10pt,a4paper]{article}          \usepackage[headheight=2in,headsep=0.1in,left=0.8in,right=0.8in,bottom=0.5in]{geometry}      \usepackage{xcolor}      \usepackage{hyperref}          \begin{document}     \begin{Form}     \noindent\textbf{DESCRIPTION OF ACTIVITY}\raisebox{-2pt}{\TextField[width=4.3in]{~}}\\     \textbf{NATURE OF ACTIVITY} \hfil \raisebox{-2pt}{\CheckBox{}} Curricular (course requirement) \hfil \raisebox{-2pt}{\CheckBox{}} Extra-curricular\\     \textbf{OBJECTIVES OF ACTIVTY}\raisebox{-2pt}{\TextField[width=4.48in]{~}}\\     \hspace*{0.57in}\raisebox{-3pt}{\TextField[width=6.01in]{~}}\\     \textbf{VENUE} \hfill \raisebox{-1pt}{\CheckBox{}} Campus Premises\hfill \raisebox{-0.5pt}{\CheckBox{}} Campus Dormitory  \hfil \raisebox{-1pt}{\CheckBox{}} Off-Campus \raisebox{-3pt}{\TextField[width=1.8in]{~}}     \end{Form}          \end{document}      When I opened it with `evince` it acts okay. But when I open it with `Adobe Reader` version 9.4.1 I get weird a weird TextField behavior: an entry in one text field is replicated in the other Text Fields as you can see in the figure below: ![enter image description here](http://i.stack.imgur.com/XOCM3.png) So I opened it in a newer version Adobe Reader X in Windows 7 and I still get the same weird result. I also tried Foxit PDF also in Windows 7 and still get the buggy result. So is this buggy behavior a `hyperref` thing or am I missing something (in my code).


title: How to add page numbers to APA citations in ConTeXt?

text: I have created a basic document with APA citations using the course code for creating bibliographies in MK IV in APA format, as found at the ConTeXt garden:               \setupbibtex[database={sample},sort=author]     \setuppublications[alternative=apa]     \starttext         \placepublications[criterium=text]     \stoptext      To place citations on the page, I am using `\cite[articleID]`. As APA format is selected, this appears as `(Author, Year)` in the text, as expected. In some situations, as is explained in the APA Formatting and Style Guide, I need to include page number information. The resulting format should look like this example, also from the guide:               She stated, "Students often had difficulty using APA style" (Jones, 1998, p. 199), but she did not offer an explanation as to why.      How can I add this page number information to my APA citations in ConTeXt?


title: Spell Check in VIM Latex Suite not working after a particular word

text: In latex I need to type the sequence`$G^{\\{ x \\}}$` to get the desired equation. The equation works fine, but after this spell check does not work for the remaining text. Spell check works fine before the occurrence of this word and works find if I delete such occurrence. If the same sequence occurs outside maths mode i.e not inside `$ $`, then there is no problem. I get issues with syntax highlighting also after the occurrence of that sequence. What is the issue here.


title: Automatic camel case breaking

text: Based on my old question Push long words in a new line, I search for a possibility to allow linebreak before a capital character in camel case terms. For example the term **createUnspecifiedNodeErrorMarker** can be break into **create-Unspecified-Node-Error-Marker**.               \documentclass{scrartcl}          \begin{document}     \section{Test}     And another example the show must go on, but we have too less text (\textbf{createUnspecifiedNodeWarningMarker} and     \textbf{createUnspecifiedNodeErrorMarker}, sdjklashjksa \textbf{createUnspecifiedLinkWarningMarker} and     \textbf{createUnspecifiedLinkErrorMarker}).     \end{document}


title: TikZ: How to scale the spy box with the tikzpicture?

text: With the help of How do I zoom a rectangle area in pgfplots adding a gray background even for the axis labels? and No content in zoom Tikz spy I have been able to get the most of what I want. Using stand alone this example looks likes this: ![Output](http://i.stack.imgur.com/2oE4b.png) I have used the following "standalone" code to generate the picture.               % Source 1: http://tex.stackexchange.com/questions/102477/     % Source 2: http://tex.stackexchange.com/questions/62953/          \documentclass[tikz,border=2pt,png]{standalone}          \usepackage{pgfplots}     %\usepackage{tikz}% no needs since pgfplots loads already it     \pgfplotsset{compat=1.7} % Set the pgf plots to a current version     \usetikzlibrary{spy}          \begin{document}     \tikzset{new spy style/.style={spy scope={%      magnification=5,      size=1.25cm,       connect spies,      every spy on node/.style={        rectangle,        draw,        },      every spy in node/.style={        draw,        rectangle,        }       }      }     }      \begin{tikzpicture}[new spy style]     \begin{axis}[%       height=0.3\textwidth,       width=0.96\textwidth,       name = BG,       unbounded coords=jump,       scale only axis,       xmin=-3.68158764150225, xmax=4.05456770289782,       ymin=-1.44575077919192, ymax=1.15200357048622,       axis lines*=left,       axis equal image]       \addplot [         color=blue,         solid,         mark=+,         mark options={solid},         ]         {sin(deg(x))};            \addplot [         color=red,         solid,         mark=*,         mark options={solid},         ]         {sin(deg(x))+0.1};            \addplot [         color=green,         solid,         mark=x,         mark options={solid},         ]         {sin(deg(x))-0.1};              \coordinate (spypoint) at (axis cs:0,0.0);          \coordinate (spyviewer) at (axis cs:1.7,-.5);           \end{axis}     %using axis coordinates and without "spy style" defined above     \spy[width=2cm,height=3cm] on (spypoint) in node [fill=white] at (spyviewer);           \end{tikzpicture}%     \end{document}      As you can see the I have been able to set the coordinates for \spy relative to the axis (near end of code). However I have not been able to define the size in the same way. As a consequence the graph may look different if used within a main document. I am quite sure that this has to do with my use of "height" and "width" in the axis setup and/or the usage of "cm" in the \spy command. My preferred solution would be something where I use the "\spy" in a way that I can refer to the coordinate system of the axis to determine its size as well. Any attempt of moving the "\spy" command inside the "axis" have so fare failed me. * * * The motivation behind this question can be seen form the following two images using my real data. If compiled as standalone: ![Standalone](http://i.stack.imgur.com/UOUcm.png) And for comparison when compiled in the main document: ![As part of main document](http://i.stack.imgur.com/1lz5V.png) * * *


title: Possibility to pass options to packages

text: I am searching for a possibility to give additional options to another package.   I have tried it with `\PassOptionsToPackage`. My idea was that I can use something like `\documentclass[hyperref={bookmarksnumbered=true}]{asjgdhoia}`. cls file:               \NeedsTeXFormat{LaTeX2e}     \ProvidesClass{asjgdhoia}[2012/02/10 Mini class for testing proposal]     \RequirePackage{ifthen}     \newboolean{isDraft}     \setboolean{isDraft}{false}     \DeclareOption{hyperref}{\PassOptionsToPackage{\CurrentOption}{hyperref}}     \DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}}     \ProcessOptions\relax     \LoadClass[fontsize=11pt,twoside=false,paper=a4,numbers=noenddot,captions=tableheading]{scrartcl}     \usepackage[pdfdisplaydoctitle=true,%                      pdfstartview={Fit},%                      bookmarksopen,%                      colorlinks=true,%                      linkcolor=black,%                      urlcolor=black,%                      citecolor=black]%                      {hyperref}      tex file:               \documentclass{asjgdhoia}          \begin{document}     \section{Test}     {     \raggedright     Finally there is a simple solution using \textsc{\textbf{XMLResource.OPTION\_RECORD\_UNKNOWN\_FEATURE}} option. And the     text must go on \ldots.     \par     And another example the show must go on, but we have too less text (\textbf{createUnspecifiedNodeWarningMarker} and     \textbf{createUnspecifiedNodeErrorMarker}, sdjklashjksa \textbf{createUnspecifiedLinkWarningMarker} and     \textbf{createUnspecifiedLinkErrorMarker}).     }     \end{document}


title: Header and footer in IEEEtran

text: How to do this in IEEEtran `conference` format: > Add a header on first page of the paper as ,conference name   >  Add a footer on first page of the paper , notice   >  Add a footer on rest of the pages of the paper, SCEECS


title: Encapsulating style in an sty

text: sorry if this question seems off topic, but I had no place to ask it besides here. I have a big manual I am building in laTeX using either LuaTeX or XelaTeX, doesn't work on pdflaTeX. It took a lot of crafting to assemble the packages and modifying the fancyhdr, geometry, and tabular environments to make some decent graphics for the manual. ### My question is mostly about design... I want to move all those usepackage to an **sty** file that would allow me to reuse the files. This way I focus on the content and I could create a set of tutorials with the same styling. With some scripting I could create different sets of manuals (print edition, digital edition, tutorial 1,2,3,...,n and html version for docx compatibility). What do you think of this? Is there some guideline on how to build a proper sty, I am only using packages to generate my styling right now and my newcommand or renewcommand are fairly simple (rarely I use and if expression). Now I did find some tutorials on sty files, but they do post some very hardcore page formatting to enforce things. And as far as I could see, they don't seem like the place you plaster your usepackages.


title: Vertical Alignment in multirow using cells with >1 lines

text: I want to vertically align (best would be to center) the text ("TEST") in the left (yellow) column of the following table. It works fine with multirow when every row has exactly the hight of one line:               \documentclass[ngerman,a4paper,12pt,pdftex]{report}     \usepackage[utf8]{inputenc}     \usepackage{rotating}     \usepackage{multirow}     \usepackage{longtable}     \usepackage{colortbl}          \begin{document}     \begin{longtable}{|p{0.025\textwidth}|p{0.775\textwidth}|>{\centering arraybackslash}m{0.2\textwidth}|}      & \textbf{foo} & \textbf{bar} \\     \hline     \hline      \endfirsthead      & \textbf{foo} & \textbf{bar} \\     \hline     \hline     \endhead     \cellcolor{yellow}& short text & 1 \\     \cline{2-3}      \cellcolor{yellow} & short text & 2 \\     \cline{2-3}      \cellcolor{yellow} & short text & 3 \\     \cline{2-3}      \cellcolor{yellow} & short text & 4 \\     \cline{2-3}      \cellcolor{yellow} & short text & 5 \\     \cline{2-3}      \cellcolor{yellow} & short text & 6 \\     \cline{2-3}      \cellcolor{yellow} & short text & 7 \\     \cline{2-3}      \cellcolor{yellow} & short text & 8\\     \cline{2-3}      \cellcolor{yellow} & short text & 9 \\     \cline{2-3}      \multirow{-10}{*}{\cellcolor{yellow}\begin{sideways}TEST\end{sideways}}  & short text &  10 \\     \hline     \end{longtable}          \end{document}      ![enter image description here](http://i.stack.imgur.com/gJxaF.png) When there is a long text in one of the cells, the text of the left cell ("TEST") is aligned somewhere:               \documentclass[ngerman,a4paper,12pt,pdftex]{report}     \usepackage[utf8]{inputenc}          \usepackage{rotating}     \usepackage{multirow}     \usepackage{longtable}     \usepackage{colortbl}          \begin{document}     \begin{longtable}{|p{0.025\textwidth}|p{0.775\textwidth}|>{\centering\arraybackslash}m{0.2\textwidth}|}      & \textbf{foo} & \textbf{bar} \\     \hline     \hline      \endfirsthead      & \textbf{foo} & \textbf{bar} \\     \hline     \hline     \endhead     \cellcolor{yellow}& short text & 1 \\     \cline{2-3}      \cellcolor{yellow} & medium text ........ ....... ....... ....  ........ ....... ....... .... ........ ....... ....... ....needs two lines & 2 \\     \cline{2-3}      \cellcolor{yellow} & short text & 3 \\     \cline{2-3}      \cellcolor{yellow} & short text & 4 \\     \cline{2-3}      \cellcolor{yellow} & medium text ........ ....... ....... ....  ........ ....... ....... .... ........ ....... ....... ....needs two lines & 5 \\     \cline{2-3}      \cellcolor{yellow} & very long text ....... ......... ........ ....... ....... ....... ........ ............. ....... ........ ...... ....... ....... ........ ...... ....... ....... ........ ...... ....... ....... ........ ...... ....... ....... ........ ...... ....... ....... ........ ...... ....... ....... ........ ...... needs lots of lines & 6 \\     \cline{2-3}      \cellcolor{yellow} & short text & 7 \\     \cline{2-3}      \cellcolor{yellow} & medium text ........ ....... ....... ....  ........ ....... ....... .... ........ ....... ....... ....needs two lines & 8\\     \cline{2-3}      \cellcolor{yellow} & short text & 9 \\     \cline{2-3}      \multirow{-10}{*}{\cellcolor{yellow}\begin{sideways}TEST\end{sideways}}  & short text &  10 \\     \hline     \end{longtable}          \end{document}      ![enter image description here](http://i.stack.imgur.com/CXfNG.png) How can I align the text of the left column in the second example?


title: Windows Beamer presentation with notes

text: Have anybody have success by finding a PDF Reader for Windows, that have possiblity to show notes on one screen and the presentation on the projector? I am looking for one, otherwise I need to convert my presentation to Powerpoint


title: eledmac and two column footnotes

text: I like `dblfnote` and have been working with it for a good while. Now my footnotes are just getting too long and the typesetting results accordingly undesirable, they would be way better if footnotes could be split across pages. `eledmac` shows this desired behaviour. The following command almost gets it right:               \usepackage{eledmac}     \foottwocolX{A}     \let\footnote\footnoteA      But I didn't manage to have the colums typeset justified. For some reason my               \renewcommand*{\twocolfootfmt}[3]{...\justified...}      isn't recognized. Does anyone know how this works?


title: "Tape" environment in LaTeX

text: I have never defined an entirely new environment in a LaTeX document - I have only ever modified existing environments to suit my purposes. Now, however, I suddenly have a use for an obscure environment, and have no idea where to start in creating it. I am looking to define an environment in LaTeX where I can type text and equations in small connected boxes, so that the end result looks like a "tape", with each block containing equations and/or text and/or images. It also needs the following three additional properties:   1. If the length of the sequence of blocks exceeds the width of the page (excluding margins), then the first block that would have exceeded that length is transferred to the next line, and the tape continues from there.   2. The height of each block in a given line is equal to the height of the of the tallest block in that line, which is determined by wrapping around the tallest equation or text block with a small amount of padding.   3. The final block has the option of not having a box drawn around it. Here is a picture of the sort of thing I have in mind: ![Tape environment demo](http://i.stack.imgur.com/rJh3e.png) As I mentioned above, I am beyond my skills here. Does anyone know how to make such an environment? Anything ranging from general advice on how to figure this out to the completed code I need to make the environment would be very much appreciated. Thanks very much.


title: How to compile \nomencl in order to have a list of abbreviation?

text: I am quite new in LaTeX and I am using it to write my master thesis. Everything works quite fine until I wanted to make a list of abbreviations. I read most I could, including the nomencl package documentation and a lot of subjects here, but I still can't understand how to compile it. I'm using TeXShop on Mac and I have the main page with the code and a smaller window of command, that displays any mistake when I typeset, for instance. My code is the following :                   \documentclass{article}         %other packages         \usepackage[intoc]{nomencl}         \renewcommand{\nomname}{Abbreviations}         \makenomenclature               \begin{document}         %title and other stuffs              \newpage         \setcounter{tocdepth}{3}         \tableofcontents         \printnomenclature             %Then some example of my abbreviations :         \section{Experimental Part}        \textit{Synthesis of some compound \textbf{(aa)} \cite{FAP}}\\ %E13         To a solution of 2-bromo-5-methoxybenzoic acid in DMF \nomenclature{DMF}{Dimethylformamide} (33 mL) is added CuCN\nomenclature{CuCN}{Copper Cyanide}.               \end{document}      When I compile it, even twice as for other commands, nothing appears, not even a blank page. And I can't type in my command window, so impossible to type the command :               makeindex master thesis.nlo -s nomencl.ist -o master thesis.nls      recommanded by the nomencl package documentation.


title: pgfplots axis multiplier \times symbol

text: Similar to this question, I want the scientific `\times` symbol instead of the * symbol for pgfplots' multipliers. However, I need it for the whole axis- multiplier and not for every tick like in the other question.               \documentclass{standalone}     \usepackage{pgfplots}          \begin{document}     \begin{tikzpicture}         \begin{axis} [xmin=0, xmax=10000, ymin=0, ymax=10000]             \addplot plot coordinates {(5000, 5000)};         \end{axis}     \end{tikzpicture}     \end{document}      ![Illustration](http://i.stack.imgur.com/d1Rkb.png)


When I try to use `\usepackage{glossaries}` then I get the error message: > "LaTeX Error: File datatool-base.sty not found". Is something else needed?


title: underbrace matrix inside brackets

text: I would like to put an underbrace below the matrix like this:               $$\left(\underbrace{     \left[\begin{array}{ccc}         a&b&c\\         d&e&f\\         g&h&i     \end{array}\right]}_{A}     \left[\begin{array}{c}         x_1\\         x_2\\         x_3     \end{array}\right]\right)$$      ![enter image description here](http://i.stack.imgur.com/ji7Za.png) But I don't want the outer brackets `\left(` and `\right)` to stretch vertically. I want them to remain as if there was no underbrace. How to achieve that behaviour?


title: Automatically scale an XY-Matrix in the Index of a math symbol

text: Consider the following code:               \documentclass[a4paper,12pt]{article}     \usepackage[all,2cell]{xy}      \UseAllTwocells           \newcommand{\partinto}[3][]{%     \xymatrix@C=.85em@1{%         *+{#2\,} \ar@{|-}[r]_-*-{\scriptstyle #1} & *+{\,#3} %     }}          \begin{document}     Let $\partinto[n]{\lambda}{d}$ be a partition of $d$ into at most $n$ parts.     Also, \[ \bigoplus_{\partinto[n]{\lambda}{d}} V_\lambda. \]     \end{document}      My problem is, the `xymatrix` in the index of the big direct sum symbol does not scale. Is there any way I can make it _automatically_ scale? I could certainly make a new command `\scrpartinto` which works as an index, but I would like to know a way to make `\partinto` scale automatically once it is used as an index.


title: How can I change the font of section numbers such as \thechapter?

text: I would like to change the font of the chapter and section numbers appearing in my titles. I found that I can change the number style from arabic to roman etc. but I couldn't find a way to change the font of the number itself. When I tried changing the font of the chapter heading it changed only the heading title text and not the numbering. So I get "1.1" in times roman and "section name" in sans serif :/ I tried using `sectsty`, `titlesec` and renewing the `\chapter` command. class definition is: `\documentclass[twoside,12pt,a4paper,pointlessnumbers,headsepline,idxtotoc]{scrbook}` Any tips or advice would be great!


title: Manual download for bibleref-xidx.sty?

text: I'm trying to produce a separate index of Bible verses for an article and my problem is that well, I simply get no index. Error message is "File: bibref- xidx.sty not found" so I hope a manual installation should solve it, as it seems not to have been installed with the bibleref package. I can't find a directory from which the files can be downloaded manually. Any ideas please?


title: Table/Matrix/Array with no space between cells and all same size

text: I have several graphics like objects(tikzpictures) I would like to put in a matrix like configuration. I've been using multicols but I can't seem to figure out how to set the cells to all be the same size. When I try tabular or array the cells have to large spacing/padding and it causes a non-matrix like configuration(it wraps some rows). How can I create a simple 4x4 matrix where all cells are of the same size which is equal to the size of the largest cell AND no extra spacing between the cells(my objects already have the necessary spacing... although I might need/want to manually add a little extra).


title: How to define a section title for volumes in ConTeXt?

text: I have a lengthy document, which must be divided into separate volumes. So that it can be compiled in one pass, the source file is organized like this:               \starttext         \startfrontmatter             % this contains the title page and table of contents         \stopfrontmatter         \startbodymatter             % this contains the text for volume 1         \stopbodymatter              \startfrontmatter             % this contains the title page and table of contents         \stopfrontmatter         \startbodymatter             % this contains the text for volume 2         \stopbodymatter              \startfrontmatter             % this contains the title page and table of contents         \stopfrontmatter         \startbodymatter             % this contains the text for volume 3         \stopbodymatter     \stoptext      ConTeXt already has definitions for parts, chapters, and sections, but I could not find any details about volumes. I have found this documentation about adding new section titles, but I do not know if this is proper usage. First, unlike other section titles, I need the volume title to appear on the title page of each volume, but not in the body matter, e.g.:                __________________     |                  |     |THIS IS THE TITLE |     |                  |     |    by Author     |     |                  |     |                  |     |                  |     |     Volume I     |     |__________________|      Second, it should still appear in the table of contents like a regular section, e.g.:               Table of Contents         Volume I             Part 1 - Animals   3             Part 2 - Plants   6         Volume II             Part 3 - Rocks   9      The documentation on creating custom section titles does not seem to cover these points. Volumes seem so different from the other sections that I am not sure if it is correct to use `\setuphead` to define them. What is the best way to go about adding volumes to the document?


title: pgfplots: custom axis arrow head

text: I'm using this answer to make a bigger arrow head. I would like to use this new arrow head as my default arrow head (both in pgfplots axis and in tikz pictures). Here is a MWE:               \documentclass[tikz]{standalone}          \usepackage{pgfplots}     \pgfplotsset{compat=newest,      standard/.style={       axis lines=middle, axis line style=-triangle 45 % I WANT "big arrow" HERE      }     }          \usetikzlibrary{arrows,decorations.markings}     \tikzset{      big arrow/.style={       decoration={markings,mark=at position 1 with {\arrow[scale=2.5]{latex'}}},       postaction={decorate}},     >=triangle 45 % I ALSO WANT "big arrow" HERE     }          \begin{document}     \begin{tikzpicture}     % \draw [big arrow] (0,0) -- (0,5) node [left]{$y$};     % \draw [big arrow] (0,0) -- (5,0) node [right]{$x$};     \begin{axis}[standard, xmin=0, xmax=5, xlabel=$x$, ymin=0, ymax=5, ylabel=$y$]     \end{axis}     \end{tikzpicture}     \end{document}      In a pgfplot axis instead of having               axis line style=-triangle 45      I would like to have something like               axis line style=-big arrow      In a tikz picture, instead of the lines               % \draw [big arrow] (0,0) -- (0,5) node [left]{$y$};     % \draw [big arrow] (0,0) -- (5,0) node [right]{$x$};      I would like, for instance, to write               \draw [<->] (0,5) node [left]{$y$} |- (5,0)  node [right] {$x$};      and have the arrow head be "big arrow".


title: Correct spacing when using \sim as negation

text: When using `\sim` as a symbol for negation it gives incorrect spacing and this is clear if the spacing is compared to the spacing of `\lnot`: ![\\sim gives bad spacing when used as negation compared to \\lnot](http://i.stack.imgur.com/BZ1HM.png) How can the spacing be corrected?               \documentclass{article}          \begin{document}          \(p \leftrightarrow \lnot \lnot p\)          \(p \leftrightarrow \sim \sim p\)          \(\lnot (p \land q) \leftrightarrow (\lnot p \lor \lnot q)\)          \(\sim (p \land q) \leftrightarrow (\sim p \lor \sim q)\)          \end{document}


title: Problems with setbeamerfont

text: I'm trying to change the size of fonts in the title of my `beamer` blocks but am getting nowhere. Here is a link to a ZIP file containing what you should need to see… Too much code to post here. The problem is centered around line 28 of the .sty file:               \setbeamerfont*{block title}{family=\sffamily,series=\bf,size=\Huge}      No matter how I try to set the font size, it doesn't reflect any changes when rendering the PDF. The family and series seem to work just fine. Using the `beamerposter` package, if that matters. Thanks in advance.


title: Period after math-mode equation

text: If I write               If $x \rightarrow y$, then $y \rightarrow z$.      it looks fine. But if the sentence is more involved and formulas longer, I tend to change `$...$` to `\\[...\\]`. In many cases I think the result is ok, especially if there's only one equation in the end of the sentence. However, in the above example it would be like: * * * If      x→y , then      y→z . * * * The comma and period doesn't look very nice. Sure, I could break it up and say _If formula (1) holds, then formula (2) holds_ , but this is usually an overkill in my opinion. **TL;DR:** What do you do with periods after sentences ending with a `\\[...\\]`-equation?


title: Numbers in text, without having to update values from external files by hand?

text: I am writing a paper discussing numerical results of simulations. I am still tuning those simulations itself, so the results keep changing slightly. I don't want to re-type numbers over from what I computed all the time into the LaTeX document by hand. I am currently using python to extract results and spit it out files in LaTeX format which are then `\include`'d (`tabular`s with numbers, basically), but this approach is not very flexible -- in particular, I can't refer to those numbers in running text. Is there a packaged way to have e.g. text file with `name value` lines and then refer to `value` using `\name` in LaTeX, or something similar?


title: Biblatex: Combine filters

text: _I posted the exact same question on comp.text.tex_ I wonder if I am missing something or not, but I think the following feature for biblatex would be great: Biblatex offers the possibility to define so- called filters for the bibliography.   1. Is there a way to combine filters by using some syntax like: `\defbibfilter{myNewFilter}{filter=AnOldFilter and not ( filter=AnotherFilter )}`?   2. [A simpler suggestion] Is there a way to say something like: `\printbibliography[notfilter=MyFilter]`? I know that `\printbibliography[filter=...]` and `\printbibliography[nottype=...]` exist for instance, and I wonder if the "notfilter" option could be implemented.


title: Bibliography first citation is indented

text: I started using LaTeX to write my assignments and also my thesis. Today I came up with a problem (for me at least it kind of is). When I'm writing               \bibliographystyle{plain}     \bibliography{assignment}      to print the references of the assignment (its class is article) what comes up is the following: ![enter image description here](http://i.stack.imgur.com/ciZGT.png) Before printing the references what I have is just a section with a paragraph and a pagebreak to print the references in a separate page.               \section{Summary}     {bla bla bla}     \pagebreak      Why is the first reference indented and the others not? To be honest the rest of the document starts at the same position as the first reference. So I want all of them to be like the first one. How do I achieve that?


title: How to shift x ticks in pgfplots having multiple stacked bars

text: My goal is to generate this bar chart: ![enter image description here](http://i.stack.imgur.com/JTlaw.png) I was able to achieve this chart as my MWE:               \documentclass[parskip]{scrartcl}     \usepackage[margin=15mm]{geometry}     \usepackage{pgfplots}     \pgfplotsset{width=10cm,compat=1.6}     \usepackage{xifthen}     \usetikzlibrary{patterns}     \usepackage{filecontents}          \makeatletter     \pgfplotsset{         /pgfplots/flexible xticklabels from table/.code n args={3}{%             \pgfplotstableread[#3]{#1}\coordinate@table             \pgfplotstablegetcolumn{#2}\of{\coordinate@table}\to\pgfplots@xticklabels             \let\pgfplots@xticklabel=\pgfplots@user@ticklabel@list@x         }     }     \makeatother          % argument #1: any options     \newenvironment{customlegend}[1][]{%         \begingroup         % inits/clears the lists (which might be populated from previous         % axes):         \csname pgfplots@init@cleared@structures\endcsname         \pgfplotsset{#1}%     }{%         % draws the legend:         \csname pgfplots@createlegend\endcsname         \endgroup     }%          % makes \addlegendimage available (typically only available within an     % axis environment):     \def\addlegendimage{\csname pgfplots@addlegendimage\endcsname}          \begin{filecontents}{testdata.csv}     matrix   P   methodAfirstPhase   methodAsecondPhase methodBfirstPhase   methodBsecondPhase     a    2   3   7   2  5     a    4   1   4   1  3     b    2   2   6   1  5     b    4   1   2   1  1        \end{filecontents}          \begin{document}     \begin{tikzpicture}[remember picture]     \def\numpsPLOT{2}     \def\nummtx{2}          \foreach \matrixid/\P/\axisState/\barShift/\Pshift in {0/2//0/0, 0/4/hide axis/30/.1, 1/2/hide axis/70/.3, 1/4/hide axis/100/.4} {     \pgfkeys{/pgf/number format/.cd,fixed,precision=0}%     \pgfmathparse{\matrixid*\numpsPLOT-1}%     \pgfmathtruncatemacro\le{\pgfmathresult+1}%     \pgfmathparse{\matrixid*\numpsPLOT+\numpsPLOT}%     \pgfmathtruncatemacro\us{\pgfmathresult}%     \pgfmathparse{\nummtx*\numpsPLOT}%     \pgfmathtruncatemacro\ue{\pgfmathresult}%          \begin{axis}     [   ybar stacked,     \axisState,     bar shift=\barShift-100,     enlarge x limits=9,     ymin=0,ymax=11,     x filter/.code={\expandafter\ifnum \thisrow{P}=\P\else\def\pgfmathresult{}\fi},     flexible xticklabels from table={testdata.csv}{matrix}{}, %ignore chars={\%,\_}     x tick label style={font=\small,text width=1.7cm,align=center,rotate=45},     xtick=data,     nodes near coords*,     ]       \addplot[black,fill=black!20] table     [   x expr=\coordindex,         y=methodAfirstPhase,        skip coords between index={-1}{\le},  skip coords between index={\us}{\ue}     ] {testdata.csv};     \addplot[black,pattern=north west lines,] table     [  x expr=\coordindex,         y=methodAsecondPhase,        skip coords between index={-1}{\le},  skip coords between index={\us}{\ue}     ] {testdata.csv};     \end{axis}          \begin{axis}     [   ybar stacked,     \axisState,     bar shift={\barShift+10-100},     enlarge x limits=9,     ymin=0,ymax=11,     x filter/.code={\expandafter\ifnum \thisrow{P}=\P\else\def\pgfmathresult{}\fi},     flexible xticklabels from table={testdata.csv}{matrix}{}, %ignore chars={\%,\_}     x tick label style={font=\small,text width=1.7cm,align=center,rotate=45},     xtick=data,     nodes near coords*,     ]       \addplot[black,fill=black!40] table     [   x expr=\coordindex,         y=methodBfirstPhase,         skip coords between index={-1}{\le},  skip coords between index={\us}{\ue}     ] {testdata.csv};     \addplot[black,fill=black!40,pattern=north east lines,] table     [   x expr=\coordindex,         y=methodBsecondPhase,        skip coords between index={-1}{\le},  skip coords between index={\us}{\ue}     ] {testdata.csv};     \end{axis}     \node[below left] at (rel axis cs:0.65+\Pshift,1) {P=\P};     }     \end{tikzpicture}          \begin{tikzpicture}         \begin{customlegend}[legend columns=2,legend style={align=left,draw=none,column sep=2ex},legend entries={Method A $\Phi1$,Method B $\Phi1$,Method A $\Phi2$,Method B $\Phi2$}]         \addlegendimage{black,fill=black!20,area legend}         \addlegendimage{black,fill=black!40,area legend}            \addlegendimage{black,fill=black!50,area legend,pattern=north west lines,}         \addlegendimage{black,fill=black!0,area legend,pattern=north east lines,}         \end{customlegend}      \end{tikzpicture}     \end{document}      Outcome: ![](http://i.stack.imgur.com/idYzs.jpg) Here what I want: ![](http://i.stack.imgur.com/0mVtK.jpg) There are three problems: 1) I want names of matrices to be put below related bars. I cannot use `symbolic x coords={a,b}` since matrix names must be loaded from data file. In my MWE, only matrix name `a` is visible, but `b` is missing. I shift bars via `bar shift=...` but I cannot shift x ticks. Is there any way to shift x ticks? 2) I cannot put numbers inside the bars. Matrix names and numbers must be shifted as the bar shifted via `bar shift=...`. (Same problem) Again note that I cannot use `symbolic x coords={a,b}` since matrix names are determined dynamically according to data file. 3) I want to put processor numbers according to bars and just above or preferably below the corresponding bar. In my MWE, I have put processor numbers manually. I want to automatically put according to related bar. In my original code; number of processors, matrix names, number of matrices, ... everything may change so my code should be flexible.


title: Use different chapter title in TOC, in the first chapter page, and in header

text: Say I have two titles t1 and t2 for a chapter. I want to show t1 in TOC, and t2 in the first chapter page as well as the in the header. I use `\chapter[t1]{t2}` which works for TOC and the first chapter page. However the header shows t1 instead of t2. Is there a way to enforce t2 in the header? Thanks.


title: How do I enable protrusion for footnotes with \fnsymbol using microtype?

text: In microtype package (v.2.5 beta 06) and footnote protrusion, custom protrusion for footnote numbers is enabled. However, as soon as I edit the footnote characters to the ones generated by `\fnsymbol` and alter the corresponding character to be protruded, it stops working. Here's an MWE for the footnote with numbers:               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage{geometry}     \geometry{a5paper,showframe}     \usepackage[protrusion=true,factor=2000]{microtype}     \SetProtrusion[context=footnote]{encoding=T1}{1={,650}}              \makeatletter     \newcommand*\new@makefnmark{\hbox{\@textsuperscript{\normalfont         \microtypecontext{protrusion=footnote}\@thefnmark}}}     \renewcommand*\@footnotemark{%         \leavevmode \ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi         \new@makefnmark \ifhmode\spacefactor\@x@sf\fi \relax}     \makeatother          \begin{document}     Here's some text to show the behaviour of footnote marker at%     %     \footnote{A footnote}     %     the end of a line, which disappears when the code for setting  microtypecontext is used in fnmark redefinition.     \end{document}      Here's an MWE for the footnote with the symbols defined by `\fnsymbol`:               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage{geometry}     \geometry{a5paper,showframe}     \usepackage[protrusion=true,factor=2000]{microtype}     \SetProtrusion[context=footnote]{encoding=T1}{*={,650}}         %\SetProtrusion[context=footnote]{encoding=T1}{\ast={,650}}         %\SetProtrusion[context=footnote]{encoding=T1}{\textasteriskcentered={,650}}         % None of the above work          \makeatletter     \newcommand*\new@makefnmark{\hbox{\@textsuperscript{\normalfont         \microtypecontext{protrusion=footnote}\@thefnmark}}}     \renewcommand*\@footnotemark{%         \leavevmode \ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi         \new@makefnmark \ifhmode\spacefactor\@x@sf\fi \relax}     \makeatother          \renewcommand{\thefootnote}{\fnsymbol{footnote}}     \begin{document}     Here's some text to show the behaviour of footnote marker at%     %     \footnote{A footnote}     %     the end of a line, which disappears when the code for setting  microtypecontext is used in fnmark redefinition.     \end{document}      However, given the definition of `\@fnsymbol` I know for a fact that the symbol for the first footnote is `*`:               \fnsymbol=macro:     #1->\expandafter \@fnsymbol \csname c@#1\endcsname          \@fnsymbol=macro:     #1->\ensuremath {\ifcase #1\or *\or \dagger \or \ddagger \or \mathsection \or \     mathparagraph \or \|\or **\or \dagger \dagger \or \ddagger \ddagger \else \@ctr     err \fi }      So my question is, how do I configure `microtype` correctly to get this to work? Note that I am using `microtype` v2.5. Below are the errors I get from running the nonworking MWE:               Package microtype Warning: I cannot find a protrusion list for font     (microtype)                `OT1/lmr/m/n/7' (context: `footnote'). Switching off     (microtype)                protrusion for this font on input line 20.               Package microtype Warning: I cannot find a protrusion list for font     (microtype)                `OT1/lmr/m/n/5' (context: `footnote'). Switching off     (microtype)                protrusion for this font on input line 20.               Package microtype Warning: I cannot find a protrusion list for font     (microtype)                `OT1/lmr/m/n/10' (context: `footnote'). Switching off     (microtype)                protrusion for this font on input line 20.


title: Is there any way to typeset my Beamer presentations on my iPad?

text: I'm considering buying one of the available LaTeX apps for my iPad. Among other things, one of the main things I'm interested in is tweaking my `beamer` presentations (particularly handy when on the go). Does anyone if there's an app that can compile `beamer` locally, i.e. without connecting to some server as is the case for some? I'm not always guaranteed an Internet connection when traveling/commuting.


title: Beamer presentation fails to compile after TeX Live upgrade

text: After an upgrade from Ubuntu 12.04 (Precise) to 13.04 (Raring), pdfLaTeX fails to compile a simple presentation using Beamer. Besides Beamer, the only package I am explicitly using is `minted`, for syntax-highlighting purposes. This is the header of my my document:               \documentclass[11pt,utf8]{beamer}     \usetheme{CambridgeUS}     \usecolortheme{dolphin}     \usepackage{minted}      The invocation of `pdflatex -shell-escape doc.tex` fails with the following error:               LaTeX Warning: You have requested, on input line 406, version                `2010/12/07' of package ltxcmds,                but only version                `2010/03/09 v1.4 LaTeX kernel commands for general use (HO)'                is available.          ! Undefined control sequence.     l.542 \ltx@newglobalif                       \ifGPT@pagecolor      Any idea on what might have changed between the different TeX Live versions that could have produced this error? And more importantly, what can I do to fix it?


title: How to draw two \hline and two vertical line?

text: I want to draw a table with two `\hline` and two vertical line. But as shown in the figure, the first vertical line do not cross the two hline. How to solve this problem?               \documentclass{article}     \usepackage{hhline}     \begin{document}          \begin{tabular}{c||c||c}     \hline      1 & 2 & 3 \\ \hhline{=|=|=}     4 & 5 & 6 \\ \hline     7 & 8 & 9 \\ \hline     \end{tabular}          \end{document}      ![output](http://i.stack.imgur.com/Va0gO.png)


title: Beamer : Changing font size in notes when using \setbeameroption{show notes on second screen}

text: I'm using Beamer with `\setbeameroption{show notes on second screen}` to add notes for each slide. I'd like to change the font size of the text in the notes so I can fit more text on the page. Clues?


title: How to add newline while using everyline in mdframed?

text: I am working on `mdframed` and found solution of using `mdframed` on multiple pages by using everyline but it new box has no margin or newline. So it starts from beginning which looks odd?               \begin{mdframed}[roundcorner=10pt,leftmargin=1, rightmargin=1,     linecolor=maincol,outerlinewidth=.5, innerleftmargin=8,     innertopmargin=8,innerbottommargin=8, everyline = true]      ![enter image description here](http://i.stack.imgur.com/pXuBS.png) How can i add margin or newline to it? Regards


title: Cases environment makes latex hang

text: My `.tex` was compiled fine using `pdflatex`. Now I added to it               \[     f(p(x,y))=\begin{cases}     1 & 1\end{cases}     \]      and the compilation never ends (`pdflatex` is stuck in an infinite loop). If I run the same code in a new document there's no problem. So it must be a collision with another package. Any ideas? EDIT: I found a workaround. I actually use lyx, and it adds               \usepackage{amsmath}      to the top of the exported `.tex` file when adding a `cases` environment. I overrode it (a flag in the .lyx), and used `mathtools` instead, and the problem was bypassed. (I guess I should report a bug or something.)


title: Automatically adding \noindent after \section{*}

text: I'm using `titlesec` package and a document class ABNT Class which follows a Brazilian standard for document development. So far I've managed to follow the Brazilian Computer Association guidelines for making a scientific article (which is my real objective, for further reuse), however using both the `abnt` class and the `titlesec` package breaks document indentation, as each paragraph had a fixed indentation which `titlesec` could not manage, adding `[noindentafter]{titlesec}` produces no results, so I've decided to force document's whole indentation by using `setspace` and using the following code               \setlength{\parindent}{1.25cm}      To prevent first paragraph's indentation (which is required by this scientific article model), I've to use `\noindent` after `\section{}`, `\subsection{}` and `\subsubsection` which is really annoying, is there any way to automatically embed `\noindent` to the end of the section function call? this would be as simple as `\section{*}\noindent` \edit I'm providing a MWS for further checking               \documentclass[12pt,a4paper]{abnt}          \usepackage{setspace,titlesec,setspace}     \usepackage[utf8]{inputenc}      \titleformat{\section}{\fontsize{13.5pt}{12pt}\selectfont\bfseries}{\thesection}{0.75cm}{}[]     \renewcommand{\thesection}{\arabic{section}.}     \setlength{\parindent}{1.25cm}     \titlespacing*{\section} {0pt}{0pt}{0pt}          \begin{document}      \section{Lorem Ipsum}     This first paragraph is indented, consectetuer adipiscing elit. Etiam lobortis facilisis sem.     Nullam nec mi et neque pharetra sollicitudin.           This paragraph is also indented, ultricies vel, semper in, velit. Ut porttitor. Praesent in     sapien.           \section{Pellentesque Placerat}\noindent     This first paragraph is using noindented, praesent in     sapien. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.           This paragraph is indented, ultricies vel, semper in, velit. Ut porttitor. Praesent in     sapien. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis fringilla tristique neque.     Sed interdum libero ut metus.      \end{document}


title: More economic and robust command for abstract at the beginning of chapters

text: I want to put an abstract at the beginning of each chapter. I have cooked up a command in that aim, but it looks neither economic, nor robust (sometimes it is shifted to the right). How to improve this command? My command is:               \def\chapstract#1{%       \medskip%       \begingroup%         \itshape\small\noindent%         \parbox{\linewidth}{%           \leftskip=1em%           \rightskip=1em%            #1%         }%       \endgroup%       \medskip%     }


title: How can I padding in a cell and put text color in a string cell pgfplotstable

text: The code:               \usepackage{pgf,tikz}     \usepackage{pgfplots}     \usetikzlibrary{arrows}     \usepackage{pgfplotstable,booktabs,array,colortbl,multirow}          \newcolumntype{C}{>{\centering\arraybackslash}m{5cm}}     \pgfplotsset{compat=1.5}     \begin{table}[!hbt]     \begin{center}     \pgfplotstabletypeset[         row sep=\\,         col sep=&,         trim cells,         columns={f(x),f'(x)},         columns/f(x)/.style={string type, column type={|C|}},         columns/f'(x)/.style={string type, column type={C|}},         every nth row={1}{before row=\hline},         every head row/.style={before row=\hline, after row=\hline},         every last row/.style={after row=\hline}     ]     {     f(x) & f'(x) \\     {$k$} & $0$\\     {$x$} & $1$\\     {$x^{n}$} & $n\cdot x^{n-1}$\\     {$u^{n}$} & $n\cdot x^{n-1}\cdot u^{'}$\\     {$\sqrt{x}$} & $\dfrac{1}{2\sqrt{x}}$\\     {$\sqrt[n]{u}$} & $\cfrac{u^{'}}{n\sqrt[n-1]{u^{n-1}}}$\\     {$\ln u$} & $\dfrac{u^{'}}{u}$\\     {$\log_{a}u$} & $\dfrac{u^{'}}{u}\cdot\dfrac{1}{\ln a}$\\     {$a^{u}$} & $a^{u}\cdot u^{'}\cdot\ln a$\\     {$e^{x}$} & $e^{x}$\\     {$e^{u}$} & $e^{x}\cdot u^{'}$\\     {$\sin u$} & $\cos u\cdot u^{'}$\\     {$\cos u$} & $-\sin u\cdot u^{'}$\\     {$\tan u$} & $\dfrac{u^{'}}{\cos^{2}u}$\\     {$\arcsin u$} & $\dfrac{u^{'}}{\sqrt{1-u^{2}}}$\\     {$\arccos u$} & $-\dfrac{u^{'}}{\sqrt{1-u^{2}}}$\\     {$\arctan u$} & $\dfrac{u^{'}}{1+u^{2}}$\\     {$\sinh u$} & $u^{'}\cdot\cosh u$\\     {$\cosh u$} & $u^{'}\cdot\sinh u$\\     {$\tanh u$} & $-u^{'}\cdot cosech^{2}u$\\     {$cosech\: u$} & $-u^{'}\cdot cosech\: u\cdot\coth u$\\     {$sech\: u$} & $-u^{'}\cdot sech u\cdot\tanh u$\\     {$coth\: u$} & $-u^{'}\cdot cosech^{2} u$\\     }     \caption{Tabla De Derivadas}     \end{center}     \end{table}      I want put in blue color to the text in f(x) and f'(x) When I use in a cell a fraction expression, the text touches the bottom line and top line of the cell, How can I increase the high of these cells? Thanks.


title: How to get the drop shadow for a pgfplots legend right?

text: When using drop shadows in `legend style` of a plot created with `pgfplots` not only the legend box but also the lines that are part of the legend images "cast a shadow" in the final picture. Since markers that are part of the legend images don't "cast a shadow" I'd say that this is not the intended behavior. Is there a way to get rid of the line shadows within the legend box?               \documentclass{standalone}          \usepackage{pgfplots}     \usetikzlibrary{shadows}          \begin{document}          \begin{tikzpicture}     \begin{axis}[       small,       legend style={         rounded corners=3pt, legend pos=north west,         drop shadow={fill=black, opacity=0.5, shadow xshift=2pt, shadow           yshift=-2pt}         }         ]       \addplot[thick, blue]{x};       \addplot[thick, red]{2*x};       \legend{$x$,$2x$}     \end{axis}     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/bUzh5.png)


title: Finding/Removing ligature from Tex

text: Is there anyway to find and remove ligatures from tex file? Sometimes when I copy/paste a text to Winedt, it shows perfect, but when I compile it to Pdf, some issues appear, e.g. finding becomes nding. I am wondering if there is any way to search and find these characters? Here is an example file (needs utf8 encoding).               \documentclass{article}     \begin{document}     ﬁ     \end{document}


title: Which package can be used to draw automata?

text: I'm looking for a LaTeX package which helps drawing automata problems. I googled and found A package for drawing automata and graphs (Version 0.4). But I'm not sure is this package a standard one, or there are some better alternatives. Any suggestion?


title: two column article templates

text: I have been looking on `tex.stackexchange` and Googling but I can't find a decent two column template. Does anyone know of site or have a template for a two column article style tex file? That has a bibliography portion as well?


title: List of Algorithms: space between number and algorithm caption too small

text: I'm facing a problem with KOMA-Script and `algorithm2e`: algorithm captions in the list of algorithms collide with the numbers preceding them. See the image for an impression. How would I go about fixing this? ![enter image description here](http://i.stack.imgur.com/zxdbb.png)


title: How to achieve bold section titles in a Europass CV via europecv package?

text: I have a problem getting the section headers of my Europass CV to appear bold in the `europecv` package. Neither `\bf` nor `\textbf{}` seem to work. I am using XeLaTeX and this is how my document looks:               \documentclass[helvetica,narrow,german]{europecv}     \usepackage[a4paper,top=1.27cm,left=1.2cm,right=1cm,bottom=2cm]{geometry}     \usepackage[ngerman]{babel}     \usepackage{graphicx,fontspec}          \ecvlastname{}     \ecvfirstname{}     \ecvaddress{}     \ecvtelephone{}     \ecvemail{}     \ecvnationality{}     \ecvdateofbirth{}     \ecvgender{}          \begin{document}     \begin{europecv}          \ecvpersonalinfo[1em]          \ecvsection{}          \ecvitem{}{}     \ecvitem{}{}     \ecvitem{}{}          \end{europecv}     \end{document}      `\evcsection{Bla bla}` is what I want to have in bold like in this sample CV. Any help would be greatly appreciated!


title: Labels on left in align environment

text: I am using the `align` environment, but wish my numbering of equations to be on the left-hand side of the page. Is there an easy way to do this?


title: Creating an environment that uses macros

text: I have a macro that requires some setup code before being called :               \documentclass{minimal}     \usepackage{color}     \begin{document}     % some setup code     \colorbox{green}{This is green.}     % some cleanup code     \end{document}      All is good, but I don't like duplicating the setup/cleanup code. How can I get a similar result using Environments? That way I could place the setup code in the "begin" section and the cleanup in the "end" section. I tried the following, but obviously that's not how it works :               \documentclass{minimal}     \usepackage{color}          % % % % THIS DOES NOT WORK % % % %     \newenvironment{green}{\colorbox{green}\begingroup}{\endgroup}     % % % % THIS DOES NOT WORK % % % %          \begin{document}          \begin{green}     This should be green as well.     \end{green}          \end{document}      This gives the error `! Extra }, or forgotten \endgroup.` I tought that `\begingroup` and `\endgroup` were specifically for using in unbalanced situations. What are my options?


title: How to write this math term?

text: I have the following sequence definition: ![enter image description here](http://i.stack.imgur.com/8Yocl.png) I can't find a way to write this in Latex. Any hints where to start?


title: Table padding in LyX

text: I'm creating in LyX a table wich has a single character for every cell. Problem is, a lot of space is wasted, because each cell has some padding points which I'd like to reduce. A cell is now big enough to contain 3 characters, but I need them to be a little bigger than the character itself. Ideal objective is to get all the cells square shaped of equal size. A screenshot is attached to let you understand what I'd like to accomplish (they are not really regular as my drawing skills are poor :P) I tried with this thread Column padding in tables but without luck: cells are still wide. What can I do? Thanks in advance ~Aki ![A table with reduced padding and square cells](http://i.stack.imgur.com/Ip3o0.png)


title: set the font family for lstlisting

text: I have the following set up for my listings :               \lstset{basicstyle=\footnotesize,breaklines=true}     \lstset{framextopmargin=50pt,frame=bottomline}      I would like to change the font family to `Courier`. How can I enable this?


title: Translate ONLY italian text, inside LaTeX sources, into english

text: I want to translate my LaTeX italian sources into english, using e.g. "google translate". I must "extract" italian text, leaving LaTeX keywords and formulas unchanged. Example:               \section{Introduzione}          \newcommand{\erelmax}{10^{-3}}     \EXE{Calcolare con uno scarto relativo minore o uguale a $\erelmax$     i valori $\xi$ t.c.     \beq       \sin(\xi) = \cos(\xi) % \label{eq:ln=cos}     \eeq     } % end EXE      Should be converted into:               \section{Introduction}          \newcommand{\erelmax}{10^{-3}}     \EXE{Compute with a relative gap less than or equal to $\erelmax$     the values $\xi$ s.t.     \beq       \sin(\xi) = \cos(\xi) % \label{eq:ln=cos}     \eeq     } % end EXE      Any hint?


title: 6 lines in one inch

text: I am writing a proposal to the National Science Foundation, and they require no more than 6 lines in one-inch vertical spaces, with 11 pt sized Computer Modern fonts. I am using the `article` document class, and playing around with               \linespread{0.9}     \selectfont      I was wondering if there is a way that I can make it sure that there are no more than 6 lines in one-inch vertical spaces, perhaps using something like `\fontsize{10}{12}`? There might be some ways to compute the font size and the maximum possible line spacing to make it sure no more than 6 lines.


title: GhostScript and GhostView

text: I am about to install W32TeX on a flash drive. Among the files to be installed (via a vbs script) are GhostScript and GhostView. My question is, do I really need GS and GV, because I only create very simple personal letters, with no PS drawings, etc.


title: What causes this beamer block to be slightly offset to the right?

text: I'm facing a problem with the `block` environment in `beamer`. Adding a `tikzpicture` seems to offset the following block slightly to the right. What is causing that behaviour and how can I prevent it?               \documentclass{beamer}     \usetheme{Berlin}          \usepackage{tikz}          \begin{document}          % as expected          \begin{frame}{Test}     \begin{block}{centered}     Test     \end{block}          \centering          \begin{tikzpicture}     \node [] (box){%         dsdsadsad     };     \end{tikzpicture}%          \begin{block}{not properly centered}     Test     \end{block}          \end{frame}          \end{document}      ![enter image description here](http://i.stack.imgur.com/wE2K9.png)


title: pgfplots ycomb width

text: Is there a simple way to control the width\thickness of the strokes in the `ycomb/xcomb` commands proposed in `pgfplots`? Or should I dive into the source code to clarify?


title: Can someone help revise the style file to make captions of figures as Figure 1.1, 1.2...2.1,2.2 ...3.1,3.2?

text: Now it seems that the captions are numbered from 1,2,3,...... I want it numbered as Figure 2.1, Figure 2.2,... Figure 3.1, ... The style file is as follows:               \@ifundefined{DeclareOption}{}{% LaTeX2e option     \ProvidesPackage{cuthesis}[2003/04/04 \space  v 1.2]          \DeclareOption{manuscript}{\def\@wantmanuscript{true}}     \DeclareOption{standard}{}          \DeclareOption{phd}{\def\@phddissertation{true}}     \DeclareOption{masters}{}          \DeclareOption{nocopy}{\def\@nolibraryrights{true}}     \DeclareOption{copy}{}          \DeclareOption{noleadpages}{\def\@noleadpages{true}}     \DeclareOption{leadpages}{}          \DeclareOption{norefbib}{\def\@norefbib{true}}     \DeclareOption{refbib}{}          \DeclareOption{noextrapages}{\def\@noleadpages{true}\def\@norefbib{true}}     \DeclareOption{extrapages}{}          \DeclareOption{nonsequential}{\def\@wantnonsequential{true}}     \DeclareOption{sequential}{\def\@wantsequential{true}}          \DeclareOption{4committee}{\def\@fourcommittee{true}}     \DeclareOption{5committee}{\def\@fivecommittee{true}}     \DeclareOption{3committee}{\def\@threecommittee{true}}     \DeclareOption{2committee}{\def\@twocommittee{true}}     \DeclareOption{1committee}{}          \ProcessOptions     }          \@ifundefined{@wantmanuscript}{       % standard       \@ifundefined{@wantnonsequential}{}{\def\@nonsequential{true}}     }{       % manuscript       \@ifundefined{@wantsequential}{\def\@nonsequential{true}}{}     }          \def\bibliocite#1{%       \if@filesw\immediate\write12{\string\citation{#1}}\fi}          \@ifundefined{@wantmanuscript}{          \@ifundefined{@extra@b@citeb}{     % this is for use without the cite package     \def\@citex[#1]#2{%       \let\@citea\@empty       \@cite{\@for\@citeb:=#2\do         {\@citea\def\@citea{,\penalty\@m\ }%          \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%          \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi          \if@filesw\immediate\write12{\string\citation{\@citeb}}\fi          \@ifundefined{b@\@citeb}{\mbox{\reset@font\bfseries ?}%            \G@refundefinedtrue            \@latex@warning              {Citation `\@citeb' on page \thepage \space undefined}}%            {\hbox{\csname b@\@citeb\endcsname}}}}{#1}}     }     {     % this is for use with the cite package     \def\@nocite#1{\xdef\@no@sparg{\@ignsp#1 \! }% remove *ALL* spaces      \if@filesw \immediate\write\@auxout {\string\citation {\@no@sparg}}\fi      \if@filesw \immediate\write12{\string\citation{\@no@sparg}}\fi}     }          }     {          % this section is basically chapterbib          \newenvironment{cbunit}%     {\global\advance\c@inputfile\@ne \xdef\the@ipfilectr{@-\the\c@inputfile}%       \immediate\write\@auxout{\string\gdef\string\@extra@binfo{\@exele@b@citeb}}}%     {\gdef\the@ipfilectr{}%       \immediate\write\@auxout{\string\gdef\string\@extra@binfo{\@exele@b@citeb}}%       }          \let\cb@include\include     \def\include#1{\clearpage \cbunit \xdef\@currentipfile{#1}%       \cb@include{#1}%     \refsforcb%     \global\let\@currentipfile\@savedjobname\endcbunit}          \newcommand\cbinput[1]{\cbunit \xdef\@currentipfile{#1}%       \input{#1}\global\let\@currentipfile\@savedjobname\endcbunit}          \@ifundefined{@extra@binfo}{%       \def\bibcite#1#2{\global\@namedef{b@#1\@extra@binfo}{#2}}%     }{}          \@ifundefined{@exele@b@citeb}{%      \def\@citex[#1]#2{%        \let\@citea\@empty%        \@cite{\@for\@citeb:=#2\do%          {\@citea\let\@citea\citepunct%           \edef\@citeb{\expandafter\@iden\@citeb}%           \ifnum0=\value{mychapcitecount}%           \if@filesw\immediate\write\@auxout{\string\bibstyle{cubiblio}}\fi%           \if@filesw\immediate\write\@auxout{\string\bibdata{\@reffile}}\fi%           \setcounter{mychapcitecount}{1}%           \fi%           \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi%           \if@filesw\immediate\write12{\string\citation{\@citeb}}\fi%           \@ifundefined{b@\@citeb \@exele@b@citeb}{\mbox{\reset@font\bf ?}%              \@warning{Citation `\@citeb' in file `\@currentipfile'                  on page \thepage \space undefined}\G@refundefinedtrue}%           {\hbox{\citeform{\csname b@\@citeb \@exele@b@citeb\endcsname}}}}}{#1}}     }{}% 2nd arg of \@ifundefined{@exele@b@citeb}          \def\@iden#1{#1}          \@ifundefined{citeform}{\let\citeform=\relax}{}     \@ifundefined{citepunct}{\def\citepunct{,\penalty\@m\ }}{}          \xdef\@savedjobname{\jobname}% save root file name as a macro     \let\@currentipfile\@savedjobname     \gdef\the@ipfilectr{}     \def\@exele@b@citeb{\the@ipfilectr}     \newcount\c@inputfile \global\c@inputfile=0          \gdef\@extra@binfo{}  % in case .aux files are left from old run.          \@ifundefined{reset@font}{\let\reset@font\relax}{}     \@ifundefined{G@refundefinedtrue}{\let\G@refundefinedtrue\relax}{}          \let\cb@bibliographystyle\bibliographystyle     \def\cb@roottest{2\ifx\the@ipfilectr\@empty 1\else2\fi}          \def\bibliographystyle#1{\if\cb@roottest\cb@bibliographystyle{#1}\fi}          \def\bibliography#1{\if\cb@roottest%        \if@filesw\immediate\write\@auxout{\string\bibdata{#1}}\fi%        \fi \@input{\@currentipfile.bbl}}          \@ifundefined{PackageWarning}{\def\cb@warning{\@warning}}%      {\def\cb@warning{\PackageWarning{chapterbib}}}          \let\@test@defiii\@testdef          \def\@testdef#1#2#3{%       \if#1b\relax\@test@defiii b{#2\@extra@binfo}{#3}%       \else \@test@defiii #1{#2}{#3}\fi%     }          \@ifundefined{bibname}{\def\bibname{Bibliography}}{}          % end of chapterbib section     }          \renewcommand\contentsname{Table of Contents}          \newcounter{myfigcount}     \newcounter{mytablecount}     \newcounter{myeqncount}     \newcounter{mychapcitecount}     \newcounter{mychaptercount}     \newcounter{myappendixcount}          \def\myusefigurespage{%       \gdef\@myusefigurespage{true}     }          \def\myusetablespage{%       \gdef\@myusetablespage{true}     }               \makeatletter          \setlength{\oddsidemargin}{.5in}     \setlength{\textwidth}{6.0in}     \setlength{\marginparsep}{.2in}     \setlength{\marginparwidth}{1in}          \setlength{\topmargin}{-0.3in}     \setlength{\headheight}{0.25in}     \setlength{\headsep}{0.25in}     \setlength{\textheight}{8.6in}     \setlength{\footskip}{.5in}          \brokenpenalty=10000          \renewcommand{\baselinestretch}{1.6}     \renewcommand{\arraystretch}{1.4} % 1.3 spacing for tables and arrays          \def\myps@plain{%       \let\@mkboth\@gobbletwo       \let\@oddfoot\@empty\let\@evenfoot\@empty       \def\@evenhead{\thepage\hfil\slshape\leftmark}%       \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%     }          \def\ele@chapapp{}          \def\@makechapterhead#1{%       \vspace*{50\p@}%       {\parindent \z@ \raggedright \normalfont         \ifnum \c@secnumdepth >\m@ne             \Large\bfseries \@chapapp\space \thechapter             \par\nobreak             \vskip 20\p@         \fi         \interlinepenalty\@M         \LARGE \bfseries #1\par\nobreak         \vskip 40\p@       }}               \def\@makeschapterhead#1{%       \vspace*{50\p@}%       {\parindent \z@ \raggedright         \normalfont         \interlinepenalty\@M         \LARGE \bfseries  #1\par\nobreak         \vskip 40\p@       }}          \def\cl@chapter{%       \setcounter{mychapcitecount}{0}%       \@ifundefined{@nonsequential}{%         \@elt{section}\@elt{footnote}%       }{%         \@elt{equation}\@elt{figure}\@elt{footnote}\@elt{section}\@elt{table}%       }}     \def\thefigure{%       \addtocounter{myfigcount}{\value{figure}}%       \@ifundefined{@nonsequential}{%         \@arabic\c@figure%       }{%         \thechapter.\@arabic\c@figure%       }}     \def\thetable{%       \addtocounter{mytablecount}{\value{table}}%       \@ifundefined{@nonsequential}{%         \@arabic\c@table%       }{%         \thechapter.\@arabic\c@table%       }}     \def\theequation{%       \@ifundefined{@nonsequential}{%         \@arabic\c@equation%       }{%         \thechapter.\arabic{equation}%       }}           %%%%%%%%%%%%%%%%%%%                    \long\def\@footnotetext#1{\insert\footins{\def\baselinestretch{1}\footnotesize         \interlinepenalty\interfootnotelinepenalty         \splittopskip\footnotesep         \splitmaxdepth \dp\strutbox \floatingpenalty \@MM         \hsize\columnwidth \@parboxrestore        \edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext         {\rule{\z@}{\footnotesep}\ignorespaces           #1\strut}}}          \def\thebibliography#1{\chapter*{List of References     \@mkboth{}{}}\list      {[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}\leftmargin     \labelwidth      \advance\leftmargin\labelsep      \usecounter{enumi}}      \setlength{\baselineskip}{0.70\baselineskip}      \def\newblock{\hskip .11em plus .33em minus .07em}      \sloppy\clubpenalty4000\widowpenalty4000      \sfcode`\.=1000\relax}     \let\endthebibliography=\endlist          \def\thesisbib{\chapter*{Bibliography     \@mkboth{}{}}\trivlist      \setlength{\baselineskip}{0.70\baselineskip}      \def\newblock{\hskip .11em plus .33em minus .07em}      \sloppy\clubpenalty4000\widowpenalty4000      \sfcode`\.=1000\relax}     \let\endthesisbib=\endtrivlist          \def\dept#1{\gdef\@dept{#1}}     \def\supervisor#1{\gdef\@supervisor{#1}}     \def\firstcommittee#1{\gdef\@firstcommittee{#1}}     \def\secondcommittee#1{\gdef\@secondcommittee{#1}}     \def\thirdcommittee#1{\gdef\@thirdcommittee{#1}}     \def\fourthcommittee#1{\gdef\@fourthcommittee{#1}}     \def\departmentchair#1{\gdef\@departmentchair{#1}}     \def\copyrightyear#1{\gdef\@copyrightyear{#1}} % \author, \title in report     \def\@title{}\def\@author{}\def\@dept{Mechanical and Aerospace Engineering}     \def\@supervisor{} \def\@firstcommittee{} \def\@secondcommittee{}     \def\@thirdcommittee{} \def\@fourthcommittee{} \def\@departmentchair{}     \def\@copyrightyear{\number\the\year}     \def\submitdate#1{\gdef\submitdate{#1}}          \def\@reffile{references}          \def\reffile#1{%       \def\@reffile{#1}     }          \def\abstract#1{%       \def\@abstract{#1}     }          \def\acknowledgements#1{%       \def\@acknowledgements{#1}     }          \def\contributions#1{%       \def\@contributions{#1}     }          \def\dedication#1{%       \def\@dedication{#1}     }          \def\acronyms#1{%       \def\@acronyms{#1}     }          \def\symbols#1{%       \def\@symbols{#1}     }               \def\@bibliofileext{bib}     \def\@bibliofile{\jobname\@bibliofileext}          \def\@awork{%     \@ifundefined{@phddissertation}{       thesis     }{       dissertation     }}          % Print title page     \def\titlep{%         \thispagestyle{empty}%         \begin{center}             {\Large\bf\@title}\\             \mbox{}\\             \mbox{}\\             by\\             \mbox{}\\             \mbox{}\\             {\textbf{\@author}}\\         \end{center}         \mbox{}         \begin{center}             A \@ifundefined{@phddissertation}{           Thesis         }{            Dissertation         } submitted to \\         the Faculty of Graduate Studies and Research\\         in partial fulfilment of\\         the requirements for the degree of\\              \@ifundefined{@phddissertation}{         % CHAGE BELOW MASTER OF ARTS TO MASTER OF SCIENCE OR DOCTOR OF PHIL...           \textbf{\\Master of Applied Science in Electrical and Computer Engineering}\\     }{      \textbf{Doctor of Philosophy}\\     }     %\mbox{in}         \end{center}         \mbox{}        % \begin{center}           % Electrical and Computer Engineering         %\end{center}         \mbox{}         \begin{center}             \@dept\\             xxxx University\\             xxxx\\             \submitdate\\         \end{center}         \mbox{}         \begin{center}             Copyright \copyright\\             \@copyrightyear\ - \@author         \end{center}\clearpage}               \long\def\signature#1{%       \begin{minipage}[t]{4in}         \vspace{.4in}         \hbox{\hfil\shortstack{\vrule width 3in height 0.4pt \\#1}}       \end{minipage}}          \def\comprof{%     \begin{minipage}[t]{1.5in}       \begin{flushright}         \@ifundefined{@phddissertation}{           Thesis         }{            Dissertation         }         Committee\\         Supervisor       \end{flushright}     \end{minipage}}          % Print signature approval page     \def\signaturepage{%     \thispagestyle{plain}%     \begin{center}         The undersigned recommend to\\         the Faculty of Graduate Studies and Research\\         acceptance of the \@ifundefined{@phddissertation}{           Thesis         }{            Dissertation         }\\     \end{center}     \mbox{}     \begin{center}         {\large\bf\@title}     \end{center}     \mbox{}     \begin{center}         Submitted by \textbf{\@author}\\         in partial fulfilment of the requirements for the degree of\\             \@ifundefined{@phddissertation}{      \textbf{\bf{Master of Science}}\\     }{      \textbf{\bf{Doctor of Philosophy}}\\     }     \end{center}     \vfill     \begin{center}       \begin{tabular}{rl}           & \signature{\@supervisor}\\         \@ifundefined{@twocommittee}{}         {           & \signature\@firstcommittee\\         }         \@ifundefined{@threecommittee}{}         {           & \signature\@firstcommittee\\           & \signature\@secondcommittee\\         }         \@ifundefined{@fourcommittee}{}         {           & \signature\@firstcommittee\\           & \signature\@secondcommittee\\           & \signature\@thirdcommittee\\         }         \@ifundefined{@fivecommittee}{}         {           & \signature\@firstcommittee\\           & \signature\@secondcommittee\\           & \signature\@thirdcommittee\\           & \signature\@fourthcommittee\\         }          & \signature{\@departmentchair}     \\     \end{tabular}     \end{center}     \vfill     \begin{center}{       xxxxx University\\       \@copyrightyear}     \end{center}}          \def\startingpages{%       \setcounter{page}{0}       \pagestyle{plain}       \pagenumbering{roman}       \titlep      % \signaturepage       \immediate\openout12=\@bibliofile.aux       \immediate\write12{\string\bibstyle{cubiblio}}       \immediate\write12{\string\bibdata{\@reffile}}       \@ifundefined{@abstract}{}{         \doourabstract{\@abstract}       }       \@ifundefined{@dedication}{}{         \doourdedication{\@dedication}       }       \@ifundefined{@acknowledgements}{}{         \doouracknowledgements{\@acknowledgements}       }       \@ifundefined{@contributions}{}{         \doourcontributions{\@contributions}       }       \contentspages       \@ifundefined{@acronyms}{}{         \doouracronyms{\@acronyms}       }       \@ifundefined{@symbols}{}{         \dooursymbols{\@symbols}       }       \pagenumbering{arabic}       \pagestyle{plain}     }          \def\doourabstract#1{%       \sloppy       \chapter*{Abstract}       \addcontentsline{toc}{chapter}{Abstract}       \@ifundefined{@phddissertation}{         \thispagestyle{plain}         %\thispagestyle{empty}         \pagestyle{plain}       }{         \thispagestyle{plain}         \pagestyle{plain}       }       \input{#1}       \newpage       \pagestyle{plain}     }          \def\doouracknowledgements#1{%       \chapter*{Acknowledgments}       \addcontentsline{toc}{chapter}{Acknowledgments}       \input{#1}     }          \def\doourdedication#1{%       \newpage       \thispagestyle{plain}       \include{#1}     }          \def\doourcontributions#1{%       \chapter*{Contributions}       \addcontentsline{toc}{chapter}{Contributions}       \input{#1}     }          \def\doouracronyms#1{%       \chapter*{List of Acronyms}       \addcontentsline{toc}{chapter}{List of Acronyms}       \input{#1}       \newpage     }          \def\dooursymbols#1{%       \chapter*{List of Symbols}       \addcontentsline{toc}{chapter}{List of Symbols}       \input{#1}       \newpage     }          \def\contentspages{\newpage       \addcontentsline{toc}{chapter}{Table of Contents}       \tableofcontents       \newpage           \@ifundefined{@myusetablespage}{}{         {\addvspace{10pt}         \let\saveaddvspace=\addvspace         \def\addvspace##1{}         \addcontentsline{toc}{chapter}{List of Tables}         \listoftables         \let\addvspace=\saveaddvspace}       \newpage       }       \@ifundefined{@myusefigurespage}{}{         {\addvspace{10pt}         \let\saveaddvspace=\addvspace         \def\addvspace##1{}         \addcontentsline{toc}{chapter}{List of Figures}         \listoffigures         \let\addvspace=\saveaddvspace}       \newpage       }     }          \def\newchapter#1{%       \ifnum0=\value{mychaptercount}         \@ifundefined{@noleadpages}{           \startingpages         }{}         \setcounter{mychaptercount}{1}            \fi       \include{#1}     }          \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne                              \refstepcounter{chapter}%                              \typeout{\@chapapp\space\thechapter.}%                              \addcontentsline{toc}{chapter}%                                        {\ele@chapapp\space \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\newappendix#1{%       \ifnum0=\value{myappendixcount}         \startappendix         \setcounter{myappendixcount}{1}       \fi       \include{#1}     }          \def\startappendix{%       \def\ele@chapapp{Appendix}       \@ifundefined{@wantmanuscript}{         \addcontentsline{toc}{chapter}{List of References}          \bibliographystyle{cubiblio}         \@ifundefined{@norefbib}{           \bibliography{\@reffile}         }{}         \newpage       }{}            \appendix       % This causes latex to number equations, tables, figures with       % A-1, A-2, ...     %  \renewcommand{\theequation}{\Alph{chapter}.\arabic{equation}}     %  \renewcommand{\thetable}{\Alph{chapter}.\arabic{table}}     %  \renewcommand{\thefigure}{\Alph{chapter}.\arabic{figure}}     }          % used for manuscript form chapter references     \def\refsforcb{%       \@ifundefined{@wantmanuscript}{       }{         \ifnum0=\value{mychapcitecount}           \relax         \else           \newpage           \addcontentsline{toc}{section}{List of References}     %      \addcontentsline{toc}{chapter}{List of References}           \bibliography{\@reffile}           \bibliographystyle{cubiblio}           \newpage         \fi       }     }          \def\biblio{%       \ifnum0=\value{myappendixcount}         \startappendix       \fi       \ifnum0=\value{myfigcount}         \relax       \else         \if@filesw\immediate\write\@auxout{\string\myusefigurespage}\fi       \fi       \ifnum0=\value{mytablecount}         \relax       \else         \if@filesw\immediate\write\@auxout{\string\myusetablespage}\fi       \fi       \addcontentsline{toc}{chapter}{Bibliography}       \@input{\@bibliofile.bbl}     }          \def\bibliox{\bibliography{\@reffile}}          \@ifundefined{@norefbib}{       \let\@enddocumenthook\biblio     }{       \let\@enddocumenthook\bibliox     }