title: Trying to generate a Table of Contents for a Thesis

text: The class file I'm using has this code inside the Table of Contents section. The problem with it is it doesn't conform to the university thesis requirements that the sections be indented inside the Table of Contents. For example I would like the Table of Contents to look more like this example: Format ToC for thesis Everything else is okay except for this indentation issue. I was wondering if I could get some help changing this code to fix this issue. So here is my code which I have also pasted at this link here http://www.texpaste.com/n/nv5i42qf               % TABLEOFCONTENTS     %  In thesis class, \tableofcontents, \listoffigures, etc. are always     %  set in single-column style.  @restonecol               \def\tableofcontents{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn       \fi\chapter*{\bf Table of Contents\@mkboth{}{}\addcontentsline{toc}{chapter}{Table of Contents}}      \@starttoc{toc}\if@restonecol\twocolumn\fi} %added \bf to print Table of Contents in bold on pg 2006nm               \def\l@part#1#2{\addpenalty{-\@highpenalty}        \addvspace{2.25em plus 1pt}  % space above part line        \begingroup        \@tempdima 3em         % width of box holding part number, used by          \parindent \z@ \rightskip \@pnumwidth             %% \numberline          \parfillskip -\@pnumwidth          {%\large \bfseries          % set line in \large boldface 2006nm          \leavevmode          % TeX command to enter horizontal mode.          #1\hfil \hbox to\@pnumwidth{\hss #2}}\par          \nobreak             % Never break after part entry        \endgroup}               \def\l@chapter#1#2{\pagebreak[3]        \vskip 1.0em plus 1pt  % space above chapter line        \@tempdima 1.5em       % width of box holding chapter number        \begingroup          \parindent \z@ \rightskip \@pnumwidth          \parfillskip -\@pnumwidth          %\bfseries                  % Boldface removed. 2006nm          \leavevmode          % TeX command to enter horizontal mode.          #1\hfil \hbox to\@pnumwidth{\hss #2}\par        \endgroup}          \def\l@chapter{\@dottedtocline{0}{1.5em}{2.3em}}  %added this line 2006nm     \def\l@section{\@dottedtocline{1}{1.5em}{2.3em}} %changed 1 to 0 2006nm     \def\l@subsection{\@dottedtocline{2}{3.8em}{3.2em}}     \def\l@subsubsection{\@dottedtocline{3}{7.0em}{4.1em}}     \def\l@paragraph{\@dottedtocline{4}{10em}{5em}}     \def\l@subparagraph{\@dottedtocline{5}{12em}{6em}}          % LIST OF FIGURES AND ILLUSTRATIONS     %     \def\listoffigures{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn       \fi\chapter*{\bf{List of Figures and Illustrations}\markboth        {}{}\addcontentsline{toc}{chapter}{List of Figures}}%(NM 2005 added List of Figures to TOC)        \@starttoc{lof}\if@restonecol\twocolumn       \fi}          \def\l@figure{\@dottedtocline{1}{1.5em}{2.3em}}          % LIST OF TABLES     %     \def\listoftables{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn       \fi\chapter*{\bf{List of Tables}\markboth        {}{}\addcontentsline{toc}{chapter}{List of Tables}}%(NM 2005 added List of Tables to TOC)        \@starttoc{lot}\if@restonecol\twocolumn       \fi}          \let\l@table\l@figure          % List of Symbols, Abbreviations and Nomenclature     %     \def\listofsymbols{\input{symbols} \clearpage}     \def\addsymbol #1: #2{$#1$ \> \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \   \parbox{5in}{#2}\\}     \def\newnot#1{\label{#1}}                    %    ****************************************     %    *             BIBLIOGRAPHY             *     %    ****************************************     %     % The thebibliography environment executes the following commands:     %     %  \def\newblock{\hskip .11em plus .33em minus -.07em} --     %      Defines the `closed' format, where the blocks (major units of     %      information) of an entry run together.     %     %  \sloppy  -- Used because it's rather hard to do line breaks in     %      bibliographies,     %     %  \sfcode`\.=1000\relax --     %      Causes a `.' (period) not toproduce an end-of-sentence space.          \def\thebibliography#1{\altchapter{Bibliography}\list       {[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}\leftmargin\labelwidth         \advance\leftmargin\labelsep         \usecounter{enumi}}         \def\newblock{\hskip .11em plus .33em minus -.07em}         \sloppy         \sfcode`\.=1000\relax}          \let\endthebibliography=\endlist          % \def\@biblabel#1{[#1]\hfill}  % Produces the label for a \bibitem[...]                                     % command.     % \def\@cite#1{[#1]}            % Produces the output of the \cite command.


title: Footnote to a footnote

text: How can I make a footnote to a footnote? E.g.,               Playfair's axiom\footnote{so called in honor of mathematician John Playfair, etc, etc., but was actually discovered by Proclus\footnote{Greek mathematician, etc, etc.}}


title: part with setcounter -- destination with the same identifier

text: When using two parts in my document and resetting the counter for the second one, I get the following warning: > destination with the same identifier (name{section.1}) has been already > used, duplicate ignored A minimal example:               \documentclass{scrartcl}          \usepackage{hyperref}          \begin{document}          \tableofcontents          \newpage     \part{Part 1}     \section{Section 1-1}     \newpage     \setcounter{section}{0}     \part{Part 2}     \section{Section 2-1}          \end{document}      How can I get rid of this warning?


title: Using different bibliographic styles in the same document

text: > **Possible Duplicate:**   >  Can I have two different styles of bibliography in the same document? I'd like to use in the same document:   1. the numerical style in `natbib` to list my own bibliography using `bibunit` (to separate Journal papers from conference papers, and so on ...),    2. and then the `authoryear` style in `natbib` to list the bibliography of the whole document at the end of that document. It is however mentioned in the `bibunit.pdf` file, which comes with the `bibunit` package, that: "With `natbib`, you cannot use numerical and author- year reference schemes together. ..." And that is exactly what I'm experiencing because my end bibliography appears in the numerical style which is not desired. I've noticed that if I comment the numerical style bibliography (as described in the number 1 above), I get my end bibliography displayed in the author year style as desired. How to manage to get `natbib` display in the same document numerical and author-year styles? The `natbib` package is loaded with the `authoryear` option               \usepackage[authoryear]{natbib}      Any help is very appreciated.


title: Pgfplotstable converting zeros to -- in a knitr inline table

text: how do I change each 0.0 to `\--` without having to reference each as `string type` or making the whole table `string type`? The actual table is quite long and it would take too long to do it manually. For the same reason there would be a marked improvement in readability if the table wasn't cluttered up with lots of zeros. The final table should look something like               Flow            Bibble         Bobble        Gumph     Extant             1              2             3     Intant             --             4             5     My sainted aunt    --             6             7      using for example the MWE below,               \documentclass{article}     \usepackage{pgfplotstable}     \begin{document}     \pgfplotstabletypeset[columns/Flow/.style={string type,column type={l}},ignore chars={\^^M},col sep=&,row sep=\\]{         <<results='asis',echo=FALSE>>=             someStuff=read.table(textConnection("                       Flow,   Bibble ,   Bobble ,   Gumph                     Extant,    1,           2,      3                     Intant,    0.0 ,        4,      5            My sainted aunt,    0.0,         6,      7),header=F,sep=",")         print(xtable(someStuff),include.rownames=F,include.colnames=F,hline.after=NULL,only.contents=T)         @     }     \end{document}


title: How to get rid of a particular PDFLaTeX warning?

text: I am writing my bachelor's thesis and I want for the first pages (title, table of contents, abstract) to be numbered with roman numbers, and the rest of the pages with arabic numbers. I have almost managed to do this, except the fact that my abstract page and table of contents page are numbered with the same number, i, and I get the following warning:               destination with the same identifier (name{page.i}) has been already used,         duplicate ignored <to be read again>\relaxl.31 \newpage[1      I have read this page Hyperref and repeated page numbers and I have tried all these 3 options in the file `mystyle.sty`:               \usepackage[plainpages=false]{hyperref}     \usepackage[pdfpagelabels]{hyperref}     \usepackage[plainpages=false, pdfpagelabels]{hyperref}      But none of these help. Here is my document:               \documentclass[a4paper,10pt]{report}     \usepackage{mystyle}          \fancypagestyle{empty}{%     \fancyhf{}% Clear header/footer     \fancyhead[c]{Header}     \fancyfoot[c]{Town, year}}          \renewcommand{\headrulewidth}{0pt}     \setlength{\headheight}{35.0pt}     \setlength{\parskip}{0.4cm}     \setlength{\parindent}{0pt}          \title{Title}     \author{Author}          \date{}          \begin{document}     \pagenumbering{roman}          \maketitle          \newpage     \input{abstract.tex}     \newpage          \tableofcontents     \newpage          \input{./tex/chapter1.tex}     \pagenumbering{arabic}               \input{./tex/chapter2.tex}     \input{./tex/chapter3.tex}     \input{./tex/chapter4.tex}     \input{./tex/chapter5.tex}     \input{./tex/chapter6.tex}          \end{document}        This is my `abstract.tex` file:               \begin{abstract}     \thispagestyle{plain}     Abstract     \end{abstract}      And here is an example for one of the chapters file:               \chapter{Introduction}     \label{into}     Introduction      The `mystyle.sty` file:               \ProvidesPackage{mystyle}     \usepackage[utf8x]{inputenc}     \usepackage{hyperref}     \usepackage{fancyhdr}


title: How to resize a line with the text height with TikZ?

text: I made a new style of quoting. But I have to put the line height and width of the quote manually. Someone have a solution for make a environment with just 2 or 3 parameters? The quote, the author and the width of the quote environment? Here is my code:               \def\linesize{1.50} % The height of my line     \begin{tikzpicture}     \draw[gray!75] (0,0) -- (0,\linesize);     \draw[gray!75] (0,0.5*\linesize) node [right] {Alfred de Musset};     \draw (0,0.5*\linesize) node [left] {%     \begin{minipage}{0.25\textwidth}     \begin{flushright}     Entre presque oui et oui, il y a tout un monde.     \end{flushright}     \end{minipage}     };     \end{tikzpicture}      And a second question, how to choose the text position of my quote? (right, left of the center line) all this in an environment?


title: Error with the lastpage package

text: Can somebody help me with this error:               LaTeX /b/c12/cWarning:/b/c0/c Reference `lastpage' on page 1 undefined on input line 24.     /b/c4/cOverfull/b/c0/c \hbox (9.14719pt too wide) has occurred while \output is active      [][]      ! Missing number, treated as zero.     <to be read again>                         w     l.24 \newpage      My text in LaTeX is below:               \documentclass[a4paper,11pt,oneside]{book}     \usepackage[pdftex]{graphicx}     \usepackage[pdfborder={0 0 0}]{hyperref}     \usepackage{epsfig}     \usepackage{float}     %\usepackage{multicol}     \usepackage{array}     \usepackage[table]{xcolor}     %\usepackage{multirow}     %\usepackage{lastpage}     %\usepackage{amsmath}     \usepackage{caption}     \usepackage[portuguese,brazilian]{babel}     \usepackage[T1]{fontenc}     \usepackage[latin1]{inputenc}     \usepackage{fancyhdr}     \usepackage{tikz}          \usepackage{afterpage}          \newcommand\blankpage{%         \null         \thispagestyle{empty}%         \addtocounter{page}{-1}%         \newpage}          \hyphenation{ra-dio-gra-fi-a in-dus-tri-al}          %\usepackage{helvet}     %\renewcommand{\familydefault}{\sfdefault}          \usetikzlibrary{matrix,arrows,shapes.geometric,positioning}          \usepackage[hmargin=2cm,top=4cm,headheight=2cm,footskip=1cm,height=23cm]{geometry}     \renewcommand{\headrulewidth}{}          \setlength{\parindent}{1.3cm}     \usepackage{indentfirst} %Determinar que cada primeiro paragrafo seja também indentado          \newenvironment{tquote}{\begin{list}{}        {\setlength{\leftmargin}{13mm}        \setlength{\rightmargin}{0mm}}        \item[]}{\end{list}}          % \widowpenalty=300     % \clubpenalty=300            \input{macros}          \pagestyle{fancy}     \fancypagestyle{plain}{%         \fancyhf{}         \fancyhead[c]{%         \centering               \begin{tabular}{|m{3.5cm}|m{10.0cm}|m{2.5cm}|}               \hline               \centering               \includegraphics[height=1.59cm,width=3.0cm]{logo} &               \centering               \Large{PROCEDIMENTO ESPECIFICO DE \\ PROTECAO RADIOLOGICA} \\               \tiny{SR F.30}&               \centering              { \scriptsize      PER \numero \\REV. \rev \\Data:\data \\Pagina.\thepage \ de \pageref{lastpage}} \tabularnewline               \hline               \end{tabular}         }              \fancyfoot[R]{         \hrulefill \\         {\scriptsize         Elaboração: \sprNome \\         Supervisor de Proteção Radiológica -  \sprRegistro         }         }               }          \pagestyle{plain}     \begin{document}          \input{capa}          \newpage      \tableofcontents          % \mainmatter     % \newpage          \input{Transporte-body}     \end{document}


title: Sorting according to more than one key in pgfplotstable

text: Is it possible to sort rows of a `pgfplotstable` according to multiple keys? For example, input file is as follows:               Mtx Kind P   Sp     A   LP   16  4.2     C   OPT  16  72.5     A   LP   64  20.3     B   OPT  16  5.7     B   OPT  64  16.4     A   LP   256 90.4      We want to sort by column `Kind` first, then by `Mtx`, then by `P`. Desired table should look like as follows:               Mtx Kind P   Sp     B   OPT  16  5.7     B   OPT  64  16.4     C   OPT  16  72.5     A   LP   16  4.2     A   LP   64  20.3     A   LP   256 90.4          I am able to sort more than one numeric column. However, since, I was not able to convert a string to a numeric value (e.g. via using hash of string), I could not sort such data. It is also ok to sort the file directly using multiple keys without using `pgfplotstable`.


title: moderncv - How do I put the date column on the right rather than on the left

text: The career advisor at my university suggests putting the title of the position on the left, and dates on the right side of the resume. I'm wondering how to I do that in `moderncv` themes?


title: Fira Sans installation in Latex

text: Latex noob here. Is there any well explained way to install Fira Sans in LaTeX? The README file says: > To install this package on a TDS-compliant TeX system download the file > "tex-archive"/install/fonts/fira.tds.zip where the preferred URL for "tex- > archive" is http://mirrors.ctan.org. Unzip the archive at the root of an > appropriate texmf tree, likely a personal or local tree. If necessary, > update the file-name database (e.g., texhash). Update the font-map files by > enabling the Map file fira.map. But there's some instruction that I did wrong, and the LaTeX keep accusing > "! LaTeX Error: File `FiraSans.sty' not found." Any help would be appreciated. (Sorry for any grammar mistake)


title: How to get a little frac

text: I am wondering how to make a fraction in LaTeX small enough to fit on a line, or at least just a little larger. I could have sworn I had seen this before but I just cannot find it. In particular, I would like to use it in an equation environment, and have it maintain this size. I am sure there is a simple solution, but I cannot find it.


title: nodes near coords with logarithmic axis: Wrong values

text: I created a horizontal bar plot to compare benchmark times. Since one of the tested components is really slow, I need a logarithmic y axis for the other values to be distinguishable. Combined with "nodes near coords" this results in the calculated values showing, instead of the original ones. Is there any way to fix this? What it looks like: ![Correct plot, wrong labels](http://i.stack.imgur.com/Uf2aW.png) What the values(!) should look like: ![Wrong plot, correct labels](http://i.stack.imgur.com/xYXVY.png) Clearly, I'm overlooking something terribly obvious. I'm just a beginner at PGFPlots, so please don't kill me. :) MWE:               \documentclass[fontsize=12pt]{scrartcl}          \usepackage{pgfplots}     \pgfplotsset{compat=1.8}          \begin{document}       \begin{tikzpicture}       \begin{axis}[          width=12.5cm,         xbar=0.1cm,         xmin=0,         y=0.6cm,         bar width=0.4cm,         xlabel={Time (ms)},         xmode=log,         major x tick style = transparent,         major y tick style = transparent,         symbolic y coords={           {SpreadsheetGear},           {Aspose.Cells},           {NPOI},           {C1.Excel},           {Spire.XLS},           {GemBox.Spreadsheet},           {SmartXLS},         },         ytick=data,         y dir = reverse,          nodes near coords,         nodes near coords align={horizontal},       ]            \addplot coordinates {           (3078.6,{Aspose.Cells})           (10059.2,{C1.Excel})           (28794.8,{GemBox.Spreadsheet})           (7437079.8,{SmartXLS})           (19975.2,{Spire.XLS})           (573.2,{SpreadsheetGear})           (10025.2,{NPOI})};       \end{axis}       \end{tikzpicture}     \end{document}


title: Question regarding proof environment with bigcap and bigcup

text: When I use `proof` environment, the `\bigcap` and `\bigcup` become regular `\cap` and `\cup`. I wonder is this a bug? and how can I work around this issue? Thank you. ![enter image description here](http://i.stack.imgur.com/fodS7.png) **Minimal Example**               \documentclass[10pt,letterpaper]{article}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{amsthm}          \begin{document}             Give a careful proof of the second DeMorgan's laws, given on page 26              $$\bigg(\bigcap_{i=1}^{n}E_{i}\bigg)^{c} = \bigcup_{i=1}^{n}E_{i}^c$$             for sets $\{E_i\}_{i=1}^{n} \subseteq S$.         \begin{proof}             Assume $x \in \bigg(\bigcap_{i=1}^{n}E_{i}\bigg)^{c} \implies x \not\in \bigcap_{i=1}^{n}E_{i}             \implies x \not\in E_i, \forall i, 1 \leq i \leq n \implies x \in E_i^c, \forall i, 1 \leq i \leq n$             $\implies x \in \bigcup_{i=1}^{n}E_{i}^c$. Therefore $\bigg(\bigcap_{i=1}^{n}E_{i}\bigg)^{c} =             \bigcup_{i=1}^{n}E_{i}^c$.         \end{proof}     \end{document}


title: How to get this theorem numbering to work?

text: I'm using the thmtools package to format my theorems. I want theorems to be labeled like: I.1.0, which refers to the first theorem of the first section of the first chapter. (Also, the section counter for chapter I should start at 5.) (Sorry for the stupid question. I am sure that the answer to it is in the documentation, but I have been poring over it for the past hour, and honestly I can't find it.) Thanks!


title: Formatting a \paragraph to look like a \section

text: I'm writing a document that contains a rather deep tree of nested lists, and was wondering if how I would go about reformatting the `\paragraph` macro to format the text contained within it as a `\section`, specifically by separating the title from the body and placing it above the body. I've encountered the `titlesec` package but I'm confused as to how to use it since it seems to be used very little so there are very few examples to follow. * * * **Update 1** : I'm using the article document class.


title: avoid \headrulewidth appearing at chapter beginning

text: I am using the following code set my headers.               \fancypagestyle{plain}     \fancyhf{}     \pagestyle{fancy}     \fancyhead{}     \fancyhead[L]{\textit{\sffamily\ifthenelse{\isodd{\value{page}}}{\leftmark}{\rightmark}}}     \fancyhead[R]{\textit{\sffamily\thepage}}     \fancyfoot[C]{}     %\headrulewidth{0.1pt}          \renewcommand{\headrulewidth}{0.1pt}       The `\headrulewidth` (line below the head) is also appearing at the beginning of a chapter and **I WANT TO DISABLE** this. How can I change the behaviour of the headrulewidth for the first page of a chapter?


title: How to adjust the slant angle of a diacritic

text: I am trying to change the slant angle of an accent. I have used the `fontdimen` to adjust the quantity. The first portion of the code that follows adjusts fontdimen5 (the x-height). This works as you can see from the example. However, when I adjust fontdimen1 (slant) there is no change. I would appreciate it if someone can shed some light.               \documentclass[10pt]{article}          \usepackage{graphicx}                \begin{document}          \font \romanfont=cmr10     \font\specroman=cmr10     %% Next, the special registers     \newdimen\savedvalue     \savedvalue=\fontdimen5\romanfont     \newdimen\specialvalue     \specialvalue=4.75pt     %% Finally, definitions.          \def\specrm{%       \aftergroup\restoredimen       \fontdimen5\specroman=\specialvalue       \specroman  }     \def\restoredimen{%     \fontdimen5\romanfont=\savedvalue }                \scalebox{10}{\romanfont \'o}  {\scalebox{10}{\specrm \' o}}          \medskip     {\noindent\obeylines\specrm      the value of fontdimen1 (slant)  is \the\fontdimen1\font     the value of fontdimen2 (interword space) is \the\fontdimen2\font       the value of fontdimen3 (interword stretch) is \the\fontdimen3\font      the value of fontdimen4 (interword shrink) is \the\fontdimen4\font      the value of fontdimen5 (x-height) is \the\fontdimen5\font      the value of fontdimen6 (quad width) is \the\fontdimen6\font      the value of fontdimen7 (extra space)  is \the\fontdimen7\font      }     \medskip          \font \romanfont=cmr10     \font\specroman=cmr10     %% Next, the special registers     \newdimen\savedvalue     \savedvalue=\fontdimen1\romanfont     \newdimen\specialvalue     \specialvalue=0.15pt     %% Finally, definitions.          \def\specrm{%       \aftergroup\restoredimen       \fontdimen1\specroman=\specialvalue       \specroman  }     \def\restoredimen{%     \fontdimen1\romanfont=\savedvalue }                \scalebox{10}{\romanfont \'o}  {\scalebox{10}{\specrm \' o}}          \medskip     {\noindent\obeylines\specrm      the value of fontdimen1 (slant)  is \the\fontdimen1\font     the value of fontdimen2 (interword space) is \the\fontdimen2\font       the value of fontdimen3 (interword stretch) is \the\fontdimen3\font      the value of fontdimen4 (interword shrink) is \the\fontdimen4\font      the value of fontdimen5 (x-height) is \the\fontdimen5\font      the value of fontdimen6 (quad width) is \the\fontdimen6\font      the value of fontdimen7 (extra space)  is \the\fontdimen7\font      }               \end{document}      **Edit** : Lots of relevant information have been uploaded to github courtesy of zellyn. https://github.com/zellyn/accentbx


title: Pstricks bug: adding empty line messes pspicture

text: I have the following Example:                   \documentclass{article}         \usepackage{auto-pst-pdf}         \newcommand{\directionFieldOneTangent}[2]{            \pstVerb{%               /aaaaaaaaa #1 \space def              }%         \pscircle*[linecolor=red!60]( #1, #2){0.2}         }         \begin{document}         \begin{pspicture}(-2.7,-2.7)(2.7,2.7)         \directionFieldOneTangent{0}{0}              \directionFieldOneTangent{0}{0}         \end{pspicture}         \end{document}      Now the same example, with one empty line removed:                   \documentclass{article}         \usepackage{auto-pst-pdf}         \newcommand{\directionFieldOneTangent}[2]{            \pstVerb{%               /aaaaaaaaa #1 \space def              }%         \pscircle*[linecolor=red!60]( #1, #2){0.2}         }         \begin{document}         \begin{pspicture}(-2.7,-2.7)(2.7,2.7)         \directionFieldOneTangent{0}{0}         \directionFieldOneTangent{0}{0}         \end{pspicture}         \end{document}      The first file produces the output in the first pdf file: the two points do not coincide. Where should I report this bug, how can that be fixed, what is the issue? ![Buggy image](http://i.stack.imgur.com/CCJ33.png) ![Displays correctly](http://i.stack.imgur.com/GaU7l.png)


title: Declare different strings for different references

text: How can I declare different strings for different entry? For example, for ordinary url, the urldate will be printed as "Accessed: urldate" while for Wikipedia, the urldate will be printed as "Last modified: urldate". I tried something like \iffieldequalstr but it seems to be not working. Below is a MWE               \documentclass{article}     \usepackage[style=ieee,backend=bibtex]{biblatex}     \usepackage{xpatch}          \begin{filecontents}{\jobname.bib}     @ELECTRONIC{MEMSnet,       title = {What is {MEMS}?},       organization = {MEMSnet},       url = {http://www.memsnet.org/mems/what_is.html},       urldate = {2013-12-01},     }          @ELECTRONIC{WikiMEMS,       author = {Wikipedia},       title = {Microelectromechanical systems},       organization = {Wikipedia.org},       url = {http://en.wikipedia.org/wiki/Microelectromechanical_systems},       timestamp = {09:59},       urldate = {28 November 2013}     }          \end{filecontents}          \addbibresource{\jobname.bib}     \addbibresource{biblatex-examples.bib}          \xpatchbibdriver{online}       {\printtext[parens]{\usebibmacro{date}}}       {\iffieldundef{year}         {}         {\printtext[parens]{\usebibmacro{date}}}}       {}       {\typeout{There was an error patching biblatex-ieee (ieee.bbx's @online driver)}}           \AtEveryBibitem{       \ifentrytype{online}{        \iffieldequalstr{author}{Wikipedia}{          \DefineBibliographyStrings{english}{%            urlseen = {Last modified}           }          \DeclareFieldFormat{urldate}{\mkbibbrackets{\bibstring{urlseen}\addcolon\space#1\addcomma\space\printfield{timestamp}}}         }{          \DefineBibliographyStrings{english}{%           urlseen = {Accessed}          }          \DeclareFieldFormat{urldate}{\mkbibbrackets{\bibstring{urlseen}\addcolon\space#1}}         }        }{}       }          \begin{document}       \nocite{MEMSnet,WikiMEMS,wilde,markey}       \printbibliography     \end{document}


title: Equation number on wrong line

text: Hi my equations produce their numbers on the following line as opposed to the same line. Here's an example               \documentclass{article}     \usepackage{amsmath}          \begin{document}     \begin{equation}$$ $I_{3}^{-}(sol) \longleftrightarrow I_{2}(sol)+I^{-}(sol)...  Dissociation$ $$ \end{equation}     \end{document}


title: Problem with caption numbering custom float after renewing section command

text: How can I avoid this extra dot in caption that appears without removing `\renewcommand{\thesection}{\arabic{section}.}`               \documentclass[12pt,a4paper]{article}     \usepackage[croatian]{babel}     \usepackage{float}           \renewcommand{\thesection}{\arabic{section}.}          \floatstyle{plain}     \newfloat{graphic}{thp}{lop}[section]      \floatname{graphic}{Grafikon}          \begin{document}          \begin{graphic}     \caption{some fancy \texttt{caption} }     \label{fig:flowchart}     \end{graphic}          \end{document}


title: Subfigure is not working fine into a beamer presentation -

text: I have this in the preamble ...               \documentclass{beamer}          \usepackage[spanish]{babel}     \usepackage[utf8]{inputenc}     \usepackage{color}     \usepackage{xcolor}     \usepackage{graphicx}     \usepackage{caption}     \usepackage{subcaption}     \captionsetup{compatibility=false}               \begin{document}      and in a frame I have               \begin{frame}{Experimento y análisis de resultados}     \vspace{0pt}     \begin{figure}[ht!] % fl1400          \centering     \begin{subfigure}[b]{0.10\textwidth} %1 MODS         \includegraphics[ height= 2cm, width=\textwidth]{Rfl1400MODS}         \caption{{\scriptsize MODS}}         \label{fig:MODS}     \end{subfigure}%     \begin{subfigure}[b]{0.10\textwidth} %2 EMODS         \includegraphics[height= 2cm,width=0.10\textwidth]{Rfl1400EMODS.eps}         \caption{{\scriptsize EMODS}}         \label{fig:EMODS}     \end{subfigure}          \vspace{0pt}     \begin{subfigure}[b]{0.10\textwidth} %3 SAMODS         \includegraphics[height= 2cm,width=\textwidth]{Rfl1400SAMODS.eps}         \caption{{\scriptsize SAMODS}}         \label{fig:SAMODS}     \end{subfigure}     \vspace{0pt}     \begin{subfigure}[b]{0.10\textwidth} %4 SAGAMODS         \includegraphics[height= 2cm,width=\textwidth]{Rfl1400SAGAMODS}         \caption{{\scriptsize SAGAMODS} }         \label{fig: SAGAMODS}     \end{subfigure}     \vspace{0pt}     \begin{subfigure}[b]{0.10\textwidth} %5 PARMODS         \includegraphics[height= 2cm,width=\textwidth]{Rfl1400PARMODS}         \caption{{\scriptsize PARMODS}}         \label{fig:PARMODS}     \end{subfigure}         \caption{Resultados para fl1400}     \label{fig:Resultados para fl1400}     \end{figure}          \end{frame}      it it's showing only the image 1 and 4 of the 5 images, images 2, 3 and 5 are not showing up


title: Subsection as Frametitle with no visible subsection in beamer

text: I am trying to have `subsection` of `beamer` as `frametitle`. I have until now achieve what is pasted below. Problem is it is showing both `subsection` (in smaller font) and then `subsection` as `Frametitle` in bigger font. I only want the subsection to be shown with a bigger font. Kindly help               \documentclass[10pt,a4paper,xcolor=dvipsnames,xcolor=table]{beamer}     \mode<presentation>     {\usetheme{Warsaw} \setbeamercovered{transparent}}     \usetheme{Darmstadt}     \usepackage{lipsum}          \addtobeamertemplate{frametitle}{\let\insertframetitle\insertsubsectionhead}{}     \makeatletter       \CheckCommand*\beamer@checkframetitle{\@ifnextchar\bgroup\beamer@inlineframetitle{}}       \renewcommand*\beamer@checkframetitle{\global\let\beamer@frametitle\relax\@ifnextchar\bgroup\beamer@inlineframetitle{}}     \makeatother          \begin{document}       \section{sec1}       \subsection{sss}     \begin{frame}       \frametitle{}       \lipsum     \end{frame}     \end{document}


title: Colored background in inline listings

text: I would like to make inline code more distinguishable from the text surrounding it, and I thought that using a background might work (like it is done on the stackexchange pages.) Since I use the listings package for my other code samples, I tried the inline version of listings, but the key=value pairs seem not to work in the inline version (although the documentation seems to indicate that they should). Full example:               \documentclass{article}     \usepackage{color}     \usepackage{listings}     \begin{document}     This is a test where \lstinline[backgroundcolor=\color{yellow}]{A=1} should have a yellow background.          This, on the other hand, actually works:       \begin{lstlisting}[backgroundcolor=\color{yellow}]         A = 1       \end{lstlisting}     \end{document}      Questions:   1. Can it be done with listings? And how?    2. What other ways to increase the distinguishability of inline verbatim do you use?


title: Color for comment (To view this on PDF)

text: When writing in word, I'm used to mark text with colors, so it's easy to recognize this when editing (ex. if some text is to be corrected later). In TeX i have found the `%` command, but this command is only visible in TeX, and not the compiled PDF... Therefore i have found this command:               \textcolor{red}{Text}      But when marking a text an inserting the above as a macro, is replaces the text... Can't you make it insert the marked text in the `{text}`?


title: package calc Error :\gdef invalid at this point \title

text: I get the following error message when I try to compile the code below.               package calc Error :'\gdef' invalid at this point \title      What am I doing wrong?               \documentclass[a4paper,11pt]{book}          \usepackage[utf8]{inputenc}     \usepackage[frenchb]{babel}     \usepackage{lipsum}          % permet de faire une table des matieres par chapitre     \usepackage[french]{minitoc}     \setlength{\parskip}{10pt plus 1pt minus 1pt}          \setlength{\parindent}     % biblio ordonnee classique      %\bibliographystyle{unsrt}     \title {Titre}     \author{Sssss}     \date{\today}     \begin{document}     % le titre          \maketitle          % preparation des minitocs     \dominitoc          % table des matieres generale     \tableofcontents     \include{intro}     \include{chap1}     \include{chap2}     \include{chap3}     \include{conclu}          \appendix          \include{annexe}          % bibliographie     \bibliography{allbiblio}          \end{document}


title: How to correctly format (and align) a LaTeX proof?

text: I'm new to LaTeX and I'm trying to figure out how to correctly format a proof. Can someone show me a basic template for how to do this? The part I am having the most trouble with is creating new columns and customizing alignment... for instance, how do I add a right-aligned annotation (i.e. `by distributive property`) to a line of this sample proof? Should I use `eqnarray*` or is there a better option?               \begin{proof}       Let $t,u \in \mathbb{R}$ where $t=xy$ and $u=zw$. So,       \begin{eqnarray*}         4xyzw &=& 2\cdot2tu \\         &\le& 2\cdot(t^2+u^2) \\         &=& 2\cdot((xy)^2+(zw)^2) \\         &=& 2\cdot(x^2y^2+z^2w^2) \\         &=& 2x^2y^2+2z^2w^2 \\         &\le& ((x^2)^2+(y^2)^2)+((z^2)^2)+(w^2)^2) \\         &=& x^4+y^4+z^4+w^4       \end{eqnarray*}     \end{proof}


title: Best Pattern For Adding Commentary in align Environment?

text: I've been using the align environment to line up equations in proofs/explanations/etc and I like to place parenthetical commentary for each step, similar to the code below:               \documentclass{article}     \usepackage{amsmath}     \begin{document}                              \begin{align*}       f(ax + by) & = f(ax) + f(by) & (By Property 1) \\                  & = af(x) + bf(y) & (By Property 2) \\     \end{align*}                              \end{document}      ` The problem I have with this is that the commentary completely distorts the overall alignment of the equation area; far too much space is allocated to the column containing the commentary. I would like, insofar as it is possible, for the equations themselves to be aligned in the center of the page and for the commentary to simply appear on the right without affecting the overall justification of the equations. What's the best way to achieve this?


title: Changing align environment tag styles and colors

text: I'm using `amsmath` and `amsfonts` to typeset my homework, and since it will be read on a screen, I would like to make `\tag{comments inside equations}` differently colored, and optimally downsize them by a few points. While I could put `\color` and font instructions in every `\tag` instance, I've got them scattered all over the place and would like a unified way to change it globally. I have figured out how to use the `sectsty` package to color all section fonts to make them stand out on-screen slightly, is there a similar method for `amsmath`'s align environment and tags? Forgive my extreme TeX ignorance. Also forgive my math ignorance... here's some sample stuff:               \begin{align*}     A &= B     \\ &=     \frac{B}{\text{sometimes the equation gets really long so the tag goes on the next line}}     \tag{Here is where I say something stupid}     \\ &=     \frac{1}{0} = \infty     \tag{Tags often include math, like $\frac{\sin \theta}{\theta}$}     \end{align*}


title: In-line comments in align?

text: Is there a way to insert comments at the end of a line, within a block of TeX? For example, something like the following               $$\begin{align}      &(B \cap A) = (C \cap A) \\    'given      &(B \cap A) \cup (B  \cap \overline{A}) = (C \cap A) \cup (C  \cap \overline{A}) \\ 'substitution and distributive law \end{align}$$     &B = C       where `'` would indicate a comment. It would be handy for justifying certain steps when writing proofs.


title: Adding parentheses to figure references

text: Using pretty much no packages, when using the `\ref{label of figure}` i get just the number of the figure. Is there an easy way to set it to make parentheses around that number? At the moment I have to do it manually, but would be nicer if it could be done automatically


title: TikZ grid and remember picture, overlay

text: In A package to help with layout generation? Graph paper in the background? the question was asked in the comments as to why it was necessary to shift the whole picture in order to line up the grid properly. It never had a satisfactory answer. Unfortunately, it appears that the position as well as the grid generation routine are influenced by the paragraph indentation. Consider the MWE below and run it with both commented as well as un-commented lines.               \documentclass{article}     \usepackage{tikz}     \begin{document}     %\null     %\noindent     \begin{tikzpicture}[remember picture, overlay]          \draw[line width=1pt,color=teal,step=1cm] (current page.south west) grid ++(5cm,5cm);       \end{tikzpicture}     XXXX     \end{document}      This produces the following: ![enter image description here](http://i.stack.imgur.com/PqJCz.jpg) If you un-comment the lines you get a different layout. If you add a shift of 7.8mm it results in integral squares               \draw[line width=1pt,color=teal,step=1cm,xshift=-7.8mm,yshift=-7.8mm] (current page.south west) grid ++(5cm,5cm);      What is the right way to compensate and why does the algorithm does not produce integral squares? How can I enforce integral squares?


title: Improving my latex codes for matrices

text: i want to write my latex code as in the image inserted below. Please can someone help me to improve my code here to let them look like in the image.               \begin{multline*}     \begin{bmatrix}      k_{A,t} \\  k_{BC,t} \\  k_{M,t}  \\   k_{NB,t} \\   k_{NS,t} \\   k_{O,t}  \\  k_{PEI,t}\\  k_{Q,t}\\   k_{S,t}     \end{bmatrix}     =     \begin{bmatrix}     .43&-.03 & .03 & .09 & .03 & .06 & .30&-.11&-.10&-.22\\      .0008 & .57 & .12& .19& .08 & .50 &.0035 & -.25 & -.40\\     041 & .15 & -.11 & .30 & .10  & .22& .01 & -.07 & .02\\     .048 &  .10 &.03 & .28  &  .28  &  -.09 & .10 & .17 & -.13\\     .34 &   -.04 & .26&  .05& -.54 & .26 & 0.23 & .10 & .10 \\     .14 &   .20 & -.12 &  -.06 & .01 & .86 & .08 & -.001 & -.17 \\     .038 & -.07 &.07 &  .23 & -.08 & .31& .15 & .32 &-.32\\     .20 & .09 & .12 &-.05 & .04 & .10& .09 & .14 & .701&-.03\\     .14 & .06 & .17 & .32 &  0.25 & 0.12 & -.06 & - .12&-.04\\     \end{bmatrix}     \begin{bmatrix}      k_{A,t-1} \\   k_{BC,t-1} \\  k_{M,t-1} \\    k_{NB,t-1} \\    k_{NS,t-1} \\     k_{O,t-1} \\    k_{PEI,t-1} \\  k_{Q,t-1} \\  k_{S,t-1}     \end{bmatrix}     + \\     \begin{bmatrix}     -.26 & -.227 & -.26 &-.23 &.13 &-.05&0.34&-0.05 & -.18 \\      %.04 & -.25 & .08 & .20 & .03 & .30 & -.12 & -.09 & -.29\\      %.26 & .27 & -1.38 & .44 & -.02 & .12 & .01 & -.06 & .23\\      %.46 & .18 & -.23 & -.41 & .14 & -.13 & -.13 & -.01 & -.12\\      %.25 & -.19 & -.32 & .44 & -.35 &.52 &.24 &-.19 &-.33\\      %.19 & .16 & -.24 & .02 & -.01 & .01 & .03 & -.04 & -.16\\      %-.19 & .06 & -.03 & .09 & .24 & -.58 & .36 & -.48 & .002\\      %.29 & .04 & -.18 & .13 & .07 & .20& .15 & -.32 & .31\\      %.23 & .04 & -.9 & .40 & -.05 & .17 & -.07 & .17 & -.72\\      \end{bmatrix}     \begin{bmatrix}      \lambda      \end{bmatrix}     +     \begin{bmatrix}      11.74  \\ 8.59 \\ 10.93 \\  9.46 \\  -8.55 \\  .096 \\ -12.76 \\ -0.37\\  7.91\\     \end{bmatrix}     \end{multline*}      ![enter image description here](http://i.stack.imgur.com/XBY1r.jpg)


title: Is it possible to make the body text in a proof environment a bold red instead of black?

text: Is it possible (using _ntheorem_ ) to change the default text colour of the proof environment (of course black) to a boldface red? I am typesetting an Analysis book, and a friend and I are looking [for content and also for stylistic purposes] for a rather unique look. Thus, we thought about having the proofs in a bold-faced red font. So, I would like to know if that is achievable? Thanks! Currently, these are how I have my theorem-like environments defined and here is a MWWE:               \documentclass[12pt,a4paper]{article}          % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %     % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %     % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %           \usepackage[left=2.50cm,right=2.50cm,top=2.50cm,bottom=2.75cm]{geometry}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{amstext}     \usepackage{pstricks}     \usepackage{framed}     \usepackage[amsmath,framed,thmmarks]{ntheorem}     \usepackage{textcomp}          % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %     % % % % % % % % % % % % % % %     % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %          \newtheorem{Theorem}{Thm}     \theoremclass{Theorem}     \theoremstyle{break}     \shadecolor{blue}     \newshadedtheorem{thm}[Theorem]{Theorem}          \theoremclass{Theorem}     \theoremstyle{break}     \shadecolor{gray}     \newshadedtheorem{prop}[Theorem]{Proposition}          \theoremclass{Theorem}     \theoremstyle{plain}     \newframedtheorem{lem}[Theorem]{Lemma}          \theoremclass{Theorem}     \theoremstyle{plain}     \newframedtheorem{cor}[Theorem]{Corollary}               \theoremstyle{plain}     \theoremsymbol{\ensuremath{\blacktriangle}}     \theoremseparator{.}     \theoremprework{\bigskip\hrule}     \theorempostwork{\hrule\bigskip}     \newtheorem{defn}{Definition}          \theoremstyle{plain}     \theorembodyfont{\upshape}     \theoremsymbol{\ensuremath{\bullet}}     \theoremseparator{}     \newtheorem{exam}{Example}          \theoremstyle{plain}     \theorembodyfont{\upshape}     \theoremsymbol{\ensuremath{\bullet}}     \newtheorem{exer}{Exercise}[section]               \theoremheaderfont{\sc}     \theorembodyfont{\textcolor{red}}     \theoremstyle{nonumberplain}     \theoremseparator{.}     \theoremsymbol{\rule{1ex}{1ex}}     \newtheorem{proof}{Proof}          \theoremstyle{plain}     \theorembodyfont{\upshape}     \theoremsymbol{\ensuremath{\bigstar}}     \theoremseparator{.}     \newtheorem{rem}{Remark}          % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %          \begin{document}          \begin{thm}[Bolzano-Weirstrass Theorem]     Every bounded sequence in $\mathbb{K}^m$ has a convergent subsequence ...     \end{thm}          \begin{proof}     We consider first the case where $\mathbb{K} = \mathbb{R}$ and prove     the  case by induction on $m \ldots$     \end{proof}          \begin{exam}\mbox{}     Let the universe be the set of real numbers. Then:     \begin{enumerate}        \item  $(\exists x)(x \ge 3)$ is true because the truth set of $x \ge 3$ contains $3, \pi, 5$, and many other real numbers; and hence is nonempty.        \item sdfdkjwfdwsjfdws     \end{enumerate}     \end{exam}               \begin{rem}     Note that the previous proposition is quite useful in helping us to find negations for quantified propositions.     \end{rem}               \begin{defn}[Logical Equivalence]      Two propositions are said to be logically equivalent iff ...     \end{defn}            \end{document}      I posted a very similar question earlier regarding a problem I was having with __and _pstricks_ , and cmhughes helped me a lot. But now, I just want to change the font in the proof environment to a bold red, and I (think) I shall be done fiddling with these darn environments! Thanks cmhughes and everyone else who has been of **so** much help to me here!!! Would a start be something like the following (not sure, but I shall take a stab):               \renewenvironment{proof}[1]{proof}{}     \theoremstyle{plain}     \theoremheaderfont{sc}\theorembodyfont{\textcolor{\red[1]{\bfseries}}}     \theoremseparator{}     \theoremsymbol{\rule{1ex}{1ex}}     \newtheorem{proof}{Proof}      I am really not sure if that works at all, but I did want to at least put some effort into this before I 'blindly' asked the question this time. Thanks again. -MD


title: Problem with uline and table-format in siunitx table

text: I asked a previous question about underlining data in a table when using the siunitx `S` column definition (see Use of underline and siunitx in a table). The advice given was perfect until I added `\sisetup{table-format=2.1}` to reduce the amount of space being used up the numbers. I have managed to get my table spaced out perfectly now, so I don't really want to remove the `\sisetup`, but this line means that any underlined values in the table are now not aligned by decimal point. Is there any way to combine underlining with this `\sisetup`? MWE:               \documentclass{article}     \usepackage{etoolbox,siunitx,booktabs,threeparttable,multirow,array,graphicx}     \usepackage[normalem]{ulem}     \robustify\bfseries     \robustify\uline     \sisetup{detect-weight        = true,              detect-inline-weight = math,              tight-spacing        = true,              table-format         = 2.1,              }          \begin{document}         \begin{table}         \caption{Insert caption here}         \centering         \begin{threeparttable}[b]             \begin{tabular}{SS}             \toprule                 {Column 1} & {Column 2}\\             \midrule                 7.1 & 4.2\\                 \uline{8.7} & 6.5\\                 9.3 & \uline{1.0}\\             \bottomrule             \end{tabular}         \end{threeparttable}         \end{table}     \end{document}


title: undefined control sequence <argument>

text: ! Undefined control sequence.     <argument> Non-linear version of \stabilized     \ conforming nodal integration ...     l.15 for Galerkin mesh-free methods}     .     The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.      above is the error i am facing.the line mentioned after is not used in the tex file but it is the title of a book in .bib file. tried removing \ from both sides of stabilized in .bib file, but that didnt work. please suggest possible solutions


title: How to force a table into page width?

text: I have the following table:               \begin{table}[htb]     \begin{tikzpicture}     \node (table) [inner sep=0pt] {     \begin{tabular}{ l | l }       {\bf Symptom} & {\bf Metric} \\     \hline     Class that has many accessor methods and accesses a lot of external data & ATFD is more than a few\\     Class that is large and complex & WMC is high\\     Class that has a lot of methods that only operate on a proper subset of the instance variable set & TCC is low\\     \end{tabular}     };     \draw [rounded corners=.5em] (table.north west) rectangle (table.south east);     \end{tikzpicture}     \caption{God class symptoms}     \label{tbl:god_class}     \end{table}      Now I want to force the width of the table to be the same as the `\textwidth`, either by linewrapping of table text or by scaling. How can I achieve that?


title: Making table width fit into text width

text: I'm using `p{}` format to adjust the width of a table. I expected using `{p{0.1\textwidth}||p{0.2\textwidth}|p{0.2\textwidth}|p{0.2\textwidth}|p{0.2\textwidth}}` makes the table width smaller than the text width (1 > 0.1 + 0.2*4), but the result is not what I expect. ![enter image description here](http://i.stack.imgur.com/dBklZ.png) What might be wrong? Why the total width of the table is wider than text width? This is the code.               \documentclass[oneside, openany, 10pt]{article}     %\documentclass[article, oneside, openany, 10pt]{memoir}     \newcommand{\HRule}{\rule{1.0\textwidth}{0.5mm}}     \newcommand{\Hrule}{\rule{1.0\textwidth}{0.3mm}}          \makeatletter% since there's an at-sign (@) in the command name     \renewcommand{\@maketitle}{%       \parindent=0pt% don't indent paragraphs in the title block       \centering       {\Large \bfseries\textsc{\@title}}       \HRule\par%       \textit{\@author \hfill \@date}       \par     }     \author{prosseek}     \title{test}          \begin{document}          \maketitle          \begin{table}[hbtp]     \footnotesize     \centering     \begin{tabular}{p{0.1\textwidth}||p{0.2\textwidth}|p{0.2\textwidth}|p{0.2\textwidth}|p{0.2\textwidth}}       \hline     & Function & Pre conditions & Post conditions & Constraints \\     \hline\hline     R1 & An election official is assigned for each precinct & Precincts and     elections officials are created & Unique one on one mapping from an     election official to precinct & Before voting starts\\  \hline     \end{tabular}     \caption{Requirements before voting starts}     \label{eoRequirements}     \end{table}          \end{document}


title: How to make table spanning textwidth

text: Consider the following code:               \documentclass{article}     \usepackage{booktabs,pgf}     \begin{document}     \pgfmathsetlengthmacro{\ratio}{\the\textwidth/4}          \hrulefill \\          \begin{tabular}{@{}llll@{}}       \toprule       \makebox[\ratio][l]{xx}&\makebox[\ratio][l]{1} &\makebox[\ratio][l]{2}&\makebox[\ratio][l]{3}\\       \makebox[\ratio][l]{xx}&\makebox[\ratio][l]{1} &\makebox[\ratio][l]{2}&\makebox[\ratio][l]{3}\\       \bottomrule     \end{tabular}     \end{document}      with output ![enter image description here](http://i.stack.imgur.com/hbcP7.png) How can I determine `\ratio` such that the table fills (exactly) the textwidth of the page? As seen, currently the `\ratio` is too large such that the table becomes wider than the text width.


title: Table with tabular, column type p grabbing available space

text: I have a table with one column which contains a longer description spanning multiple lines. Therefore I use the column type `p`, which requires me to specify a fixed column width. Is it possible to specify the column in such a way, that the table column simply "grabs" all available horizontal space?               \documentclass[ngerman]{scrbook}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}          \begin{document}         % I would like to avoid hard coding the column width here         \begin{tabular}{l p{5cm}}             column 1 & column 2 \\             name & The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. \\         \end{tabular}     \end{document}


title: titlesec and bibliography

text: I use titlesec to capitalize and display the chapter title at the center. Everything is fine until I get to the bibliography, the word 'bibliography' is not capitalized. Here is an example               \documentclass[a4paper, 12pt]{report}     \usepackage{cite}          \usepackage{titlesec}      \titlespacing*{\chapter}{0pt}{1in}{20pt}      \titleformat{\chapter}[display]        {\centering\normalfont\normalsize}{\MakeUppercase{\chaptertitlename} \thechapter}{0pt}{\small}           \titleformat{\section}          {\normalfont\normalsize\bfseries}{\thesection}{1em}{}      \titleformat{\subsection}          {\normalfont\normalsize\bfseries}{\thesubsection}{1em}{}      \titleformat{\subsubsection}          {\normalfont\normalsize\bfseries}{\thesubsubsection}{1em}{}          \begin{document}     \chapter{Chapter 1}     This is a workingn example     \begin{thebibliography}{100}          \bibitem{Niesen}     Niesen, Social networks/blogs now account for one in every four and a half       minutes online,       http://blog.nielsen.com/nielsenwire/global/social-media-accounts-for-22-perc%     ent-of-time-online/, report (June 2010).          \bibitem{AirwideSolutions}     AirwideSolutions, Mobile social networking and the rise of the smart machines -       2015ad,       http://www.airwidesolutions.com/whitepapers/MobileSocialNetworking.pdf, white       paper (November 2010).     \end{thebibliography}          \end{document}      Thanks.


title: Detect beginning of a sentence in a macro for capitalization

text: Is it possible to make macros give different results at the beginning of a new sentence? Suppose that I want the macro "\secname" to write "Section" at the beginning of a new sentence, and "section" anywhere else. How can I do so?


title: Automatically capitalize macro output if used after a period

text: > **Possible Duplicate:**   >  Detect beginning of a sentence in a macro for capitalization Is it possible to write a macro that is able to determine if it is used at the beginning of a sentence? For example, imagine               \def\location{street}     ...     This \location is nice. \location has its charm.      A simple and silly one, but anyway, you get the idea. I want the second street to be "Street." How would one do this? I am using `lualatex`, so if only a lua-specific solution is possible, I'd be happy with it. If it is not possible then I would have to do it manually, but that would be a lot of work in my text :-(


title: Xypic not rendering edges

text: First off, I'm rather new to LaTeX and use it in a limited fashion (typing up notes + problem sets for my math classes). As such I'd like to apologize in advance for not knowing the correct terminology or details to include. Anyway, I'm trying to create a directed graph in using the XYpic package. My usual workflow for something like this is to use sample code from a tutorial and massage it until it does what I need to. I did that in this case, drawing from http://www.math.unm.edu/~loring/links/graph_s07/tex_graphs.pdf and the XYpic reference manual. The sample bits I used complied without error, but the edges (the bits defined by "a"-"b" for example) simply weren't displayed in the pdf. I pulled the sample file wholesale from the third page of my first link and tried it in a new document and the same problem appeared. So, I suppose my question is: how does one troubleshoot this sort of thing? It seems pretty clear that the problem is on my machine, but I'm not sufficiently versed in the inner workings of TeX to even know where to begin. Any advice would be greatly appreciated. This is on a Mac, using the 2011 texlive distribution and texpad & texworks as editors.


title: Line break in the caption of subfigure

text: I would like to add a line break in the caption of a `subfigure`:               \begin{figure}       \subfigure[a long line]{%         \includegraphics[width=0.23\textwidth]{figures/cells_time.eps}       }     \end{figure}      So I want to add a line break at a specific position inside `a long line`, does anyone know how to do it?


title: Suppress \unspace command to force biblatex to add spaces (DIN 1505)

text: DIN 1505 requires breakable interword spaces in front of punctuation. A bibliography entry is supposed to look like this: > >     Lastname1, Firstname1 ; Lastname2, Firstname2: Title : Subtitle [...] >   > >                                       **^** > **^** I tried to accomplish this by redefining the `\multinamedelim` and `\subtitlepunct` commands. Unfortunately the `\addspace` in front of `\addsemicolon` respectively `\addcolon` doesn't show up in the resulting file. The reason for this is the `\unspace` command, which removes preceding whitespaces. It is implicitly executed by `\addspace`. MWE:               \documentclass[a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[ngerman]{babel}     \usepackage{csquotes}     \usepackage[     style=alphabetic,     backend=biber,     ]{biblatex}     \addbibresource{test.bib}          \begin{filecontents}{test.bib}     @BOOK{Author2001,       author = {Alastname, Afirstname},       title = {Title},         subtitle = {Subtitle},       year = {2001},     }     \end{filecontents}          % Setup bibliography     \DeclareNameAlias{default}{last-first}     \renewcommand*{\multinamedelim}{\addspace\addsemicolon\addspace}     \renewcommand*{\finalnamedelim}{\addspace\addsemicolon\addspace}     \renewcommand*{\multilistdelim}{\addspace\addsemicolon\addspace}     \renewcommand*{\finallistdelim}{\addspace\addsemicolon\addspace}     \renewcommand*{\labelnamepunct}{\addcolon\addspace}     \renewcommand*{\subtitlepunct}{\addspace\addcolon\addspace}     \renewcommand*{\finentrypunct}{}          \begin{document}     Filler text \cite{Author2001}          \printbibliography     \end{document}      ![MWE](http://i.stack.imgur.com/W8uy5.png) I found an example of a DIN 1505 style (see here). The author substituted `\addspace` with `\mbox{ }`. Unfortunately this is not officially supported by `biblatex`. Does anyone know a better solution?


title: How to see figures prepared in ...eps in Yap?

text: I have MikTEX2.8, WinEdt5.5, Windows XP In the style article figure, presented in title.eps sometimes (unpredictable) after obtaining dvi file cannot be seen in Yap, they are seen in pdf (via dvi- pdf). How to see these figures always?


title: Bad interaction between keycommand and environ?

text: I suspect the `keycommand` and `environ` packages are not playing nicely together, because the following code gives an error. Can anybody explain what's going on?               \documentclass{article}          \usepackage{environ}     \usepackage{keycommand}     \usepackage{graphicx}          % Turn scalebox into an environment     \NewEnviron{scaleboxenv}[1]{%       \scalebox{#1}{\BODY}%     }          % An environment with a named argument     \newkeyenvironment{scaled}[scale=1]{%       % My real code does some more stuff here       \begin{scaleboxenv}{\commandkey{scale}}     }{%       \end{scaleboxenv}     }          \begin{document}          \begin{scaled}[scale=0.7]     Hello     \end{scaled}          \end{document}


title: Different footer position in different pages

text: I am creating document with headers and footers. The problem that I faced with is that I cannot get nice view of first and the other pages: different spacing is set. See my code and picture.               \documentclass[]{article}     \usepackage     [             a6paper,             left=2.5cm,             right=2cm,             top=2.5cm,             bottom=2.5cm,     ]     {geometry}          \usepackage{graphicx}          \setlength{\headsep}{0.5in}     \usepackage{fancyhdr,lipsum}     \pagestyle{fancy}          \fancyhf{}     \lfoot{My Title \\ \today}     \rfoot{User Guide \\ version 1.0}     \lhead{\includegraphics[width=1cm]{blank.png}}     \rhead{\thepage}     %\setlength{\headsep}{1in}     \renewcommand{\headrulewidth}{0pt}          \begin{document}     \section{Section 1}     \newpage     \section{Section 2}     \end{document}      ![enter image description here](http://i.stack.imgur.com/dr35f.png)


title: Multirow results in text overlapping border

text: when using multirow in the following example, the content of the multirow cell is placed above the cell border. Is there any means to remove the border automatically where multirow is used? Code:               \begin{tabular}{|c|c|c|c|c|c|p{4cm}|}     \hline     Titel & Dat. & Künstler & Nationalität & Technik & Maße=(H,B,Einheit) & Ikonographie\\ \hline     Der Mönch am Meer & 1808 & \multirow{2}{*}{Caspar David Friedrich} & Deutschland & Öl auf Leinwand &(110,171.5,cm) & (...)\\ \hline     Frau am Fenster & 1822 & & Deutschland & Öl auf Leinwand &(44.1,37,cm) & (...)\\ \hline     Die Welle & 1869 & Gustave Courbet & Frankreich & Öl auf Leinwand & (112,144,cm) & (...)\\ \hline     \end{tabular}     \end{adjustbox}     \end{table}      Screenshot: ![Screenshot](http://i.imgur.com/4uokJRW.png) Thanks and best, Christian


title: Simple example of pgfkeys

text: I'm struggling to get my head around the `pgfkeys` package. I currently use the `keycommand` package, which I find very easy to understand: it's just ordinary LaTeX commands with named rather than numbered arguments. However, I would like to use `pgfkeys` because my project is heavily based on TikZ, and I believe it is a more powerful solution. I think understanding how to translate the following little example from `keycommand` to `pgfkeys` would help me a lot. ## Example I make a command to draw a `doublecircle` gadget. It has two arguments: `diameter` and `color`, both optional, with default values `1` and `red` respectively.               \documentclass[border=5mm]{standalone}          \usepackage{tikz}     \usepackage{keycommand}          \newcounter{currentheight}     \setcounter{currentheight}{0}          \newkeycommand{\doublecircle}[diameter=1,color=red]{%       \fill[\commandkey{color}] (0,\thecurrentheight) circle (\commandkey{diameter}/2);       \fill[\commandkey{color}] (\commandkey{diameter}/2,\thecurrentheight) circle (\commandkey{diameter}/2);     }          \begin{document}          \begin{tikzpicture}[y=-1cm]     \doublecircle[color=blue]     \addtocounter{currentheight}{5}     \doublecircle[diameter=4]     \addtocounter{currentheight}{6}     \doublecircle[diameter=3,color=green]     \end{tikzpicture}          \end{document}      ## Result ![three doublecircle gadgets](http://i.stack.imgur.com/5IahZ.png)


title: Plain TeX vs. LaTeX Macros

text: I was wondering what's the (advantage) of doing something one way over the other in different systems. For instance, I read that users of plain TEX should use `\def` whenever they want to create a new command rather than using `\(re)newcommand` in LaTeX, and `dimen` assignments whenever they want to set lengths to something rather than using `\setlength`. I was just wanting to know the reasons for this, because I use `LaTeX2e`, but I tend to choose `\def` over using `\(re)newcommand` or `\newcommand`. To be more clear, I am looking for an explanation similar to the case of using `\(...\)` and `\[...\]` over `$...$` and `$$...$$` respectively.


title: Proper way to change a font temporarily with fontspec

text: I have been using fontspec in a lualatex document where as instructed by the manual I set my main/sans/mono font in my preamble with some default features. However at some point I wish to temporarily redefine the mono font (in my particular case in a longtabu, but any thing which spans multiple page behave the same way.) an additional feature of the document is that I have my email address in my header inside a `\url{}`. trying things out I enclosed my longtabu in a group and call setmonofont in the group before the table. This works fine, the text in mono font in the table is changed appropriately, the text in monofont outside the table is as defined in the preamble, but the email address in the header of the first page containing the multiple page table is changed to the redefined monofont (the header of the second page has the correct font). I originally thought it was a bug in longtabu, then reproduced it with longtable, but then also reproduced it with simply have a group with text spanning 2 pages. I guess it could also be a bug in fancyhdr but the same behaviour occurs with scrpage2. So either it is a bug in fontspec or I am doing something wrong. The manual specifically says that the `\set{main,sans,mono}font` command should happen in the preamble. If this is the case, how can I redefined or addfeatures to a set font temporarily. I do not want to use the \addfeatures{} in the group indescrimitately as I only want to affect the text in `\texttt` and in `\url` within that group hence the redefinition of the monofont. compiling the following MWE, you can see that on page 1, the text is changed as it should, on page 2 however, the text in the page is fine but the header changes as well as the text in the group, while on page 3 the header is back to normal.               \documentclass[a4paper]{article}     \usepackage{fontspec}     \usepackage{lipsum}     \usepackage{longtable}     \usepackage{url}     %\usepackage{scrpage2}     \usepackage{fancyhdr}     \usepackage{hyperref}     \setmainfont{Iwona}     \setmonofont{Inconsolata}          %\clearscrheadfoot     \lhead{\href{mailto:address@email.com}{\nolinkurl{address@email.com}}}     \rhead{\texttt{\thepage}}          %\pagestyle{scrheadings}     \pagestyle{fancy}     \begin{document}          \lipsum[1]          \texttt{some text in monospace font}          \lipsum[2]          {\setmonofont{Courier New}     \lipsum[3]          \texttt{some text in monospace font}          \lipsum[4]     }     \newpage     \lipsum[5]          \texttt{some text in monospace font}          \lipsum[6]          \begingroup     \setmonofont{Courier New}     \lipsum[7]          \texttt{some text in monospace font}          \lipsum[8-9]          \texttt{some text in monospace font}          \lipsum[10-11]          \texttt{some text in monospace font}          \lipsum[12]     \endgroup          \lipsum[13]          \texttt{some text in monospace font}          \lipsum[14]     \end{document}      I apologise for the length of the MWE but I guess in this case it really is a MNWE. I guess my question is what I am doing wrong, and if the answer is "nothing", how can I fix the bug.


title: Variability in the line spacing of paragraph breaks?

text: Don't know how to describe my problem properly, but there seems to be a variablility in the line spacing of paragraph breaks, with my settings or generally or anything. Since I don't know what is effecting this, I copied just some lines of the preamble, which might have some relevance to the problem and two screenshots, where you can see, what I mean.               \documentclass[paper=15cm:23cm, headinclude=true, draft]{scrbook}          \renewcommand{\footnotesize}{\fontsize{8.0pt}{9.5pt}\selectfont}     \renewcommand{\normalsize}{\fontsize{9.7pt}{10.5pt}\selectfont}          \areaset[10mm]{112mm}{194mm}      The spaces between the Paragraph are slightly different.. Why? I also get the message:               Package typearea Warning: Maybe no optimal type area settings!                                The maximum limit of line width is about 16%     (typearea)                larger than the heuristically detected line width.     (typearea)                You may e.g. increase DIV, decrease fontsize     (typearea)                or change the papersize.      I would like to get a consistent spacing, which seems for me more in the right way, than an inconsistent one. I also never saw this in books (academic publishing). ![Example one](http://i.stack.imgur.com/VDYXx.png) ![Example two](http://i.stack.imgur.com/7QA8k.png)


title: Spacing in flalign affected by mathpazo

text: I got the following (partly shorted) equation: ![align](http://i.stack.imgur.com/KvAAx.png) I would like to get rid of the space left of the equation (left of `Q'`) so that the label (0.2) fits on the right side.               \documentclass[         a4paper,         12pt,         parskip=half     ]{scrbook}     \usepackage[showframe]{geometry}     \usepackage{amsmath}          \newcommand*{\op}[1]{\mathrm{#1}}          \begin{document}     \begin{align}         Q'&(s,x) \nonumber\\         &\mid s=(f,r)() \wedge x=\mathcal{E}(r) &&= [\mathcal{E}(f())]\\         &\mid s=(f,r)(q_1,...,q_z) &&= \left[\mathcal{E}(f(p_1,...,p_z)) \middle\vert                 \begin{aligned}                   &x' = \op{split}(x,r(q_1,...,q_z)),\\                     &(x_1,...,x_z) \in x',\\                     &p_i \in Q'(q_i,x_i),1 \leq i \leq z                 \end{aligned}                 \right]     \end{align}     \end{document}      Using `flalign`: ![flalign](http://i.stack.imgur.com/SIpwJ.png) Using `flalign` and `\usepackage{mathpazo}`: ![flalign+mathpazo](http://i.stack.imgur.com/ytZrH.png)               \documentclass[         a4paper,         12pt,         parskip=half,     ]{scrbook}     \usepackage[showframe]{geometry}     \usepackage{amsmath}     \usepackage{mathpazo}          \newcommand*{\op}[1]{\mathrm{#1}}          \begin{document}     \begin{flalign}     Q'&(s,x) \nonumber\\     &\mid s=(f,r)() \wedge x=\mathcal{E}(r) &&= [\mathcal{E}(f())]\\     &\mid s=(f,r)(q_1,...,q_z) &&= \left[\mathcal{E}(f(p_1,...,p_z)) \middle\vert             \begin{aligned}               &x' = \op{split}(x,r(q_1,...,q_z)),\\                 &(x_1,...,x_z) \in x',\\                 &p_i \in Q'(q_i,x_i),1 \leq i \leq z             \end{aligned}             \right] \label{eq:q'_fr}     \end{flalign}     \end{document}      While `flalign` solves the problem, `mathpazo` seems to distort the alignment in the middle of the equation. Why is that?


title: Asymptote-LaTeX: Evince not displaying coordinate axes in plots

text: I was using asymptote in order to do some plot I needed and in stand alone it all seem to work. The code is:               import graph;      size(10cm);          scale(Linear,Linear(-1));          typedef real realfcn(real);      realfcn F(int p) {      return new real(real x) {return -1/x*log(exp(x)*cosh(x*p)+sqrt(exp(2*x)*cosh(x*p)^2-2*sinh(2*x)));};      };           for(int i=0; i < 6; ++i)     draw(graph(F(i),0.001,10),Pen(i),"$h={"+((string) i)+"}$");          xlimits(0,10,Crop);     ylimits(-10,0,Crop);          xaxis("$\beta$",BottomTop,0,10,LeftTicks);      yaxis(Label("$f_{\Lambda}$",BeginPoint,W),BottomTop,-10,0,LeftTicks);           attach(legend(2),(point(S).x,truepoint(S).y),10S,UnFill);      and the correct output is correct: ![1](http://i.imgur.com/VQtrM1L.jpg) However when passing to pdfLaTeX the output no longer shows the coordinate axes: ![1](http://i.imgur.com/oQDqL2C.jpg) How can I solve this problem? Thank you There was only a problem in the Evince PDF viewer, with other PDF viewer like Okular or Acrobat it works fine. Still I don't know how to get it right in the PDF viewer without changing it.


title: Table exceeds page

text: I'm new to tex and got a problem with a table that exceeds the page, because the content is too wide. I'd expect the table to wrap the text into a new line / new lines, if the text is too long for the tables width. I guess that this is not a default behaviour. How do I turn it on? This is my minimal tex code:               \documentclass[12pt,a4paper,oneside,fleqn]{report}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{geometry}     \geometry{a4paper,left=15mm,right=15mm, top=1cm, bottom=2cm}     \usepackage{euler}      \usepackage{graphicx}     \parindent 0pt     \setlength{\abovedisplayskip}{0pt}     \begin{document}     \begin{tabular}[ht]{|l|c|l|}     \hline       a & b & Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.\\       \hline     \end{tabular}     \end{document}


title: Why does underlined text not get wrapped once it hits the end of a line ?

text: Sometimes I want to underline some text, and it extends past the end of a line. Why does `\underline{}` not automatically wrap my text for me ? Also, how can I underline text so that it will still wrap ?


title: Why doesn't \underline{REALLY LONG TEXT} wrap?

text: > **Possible Duplicate:**   >  Why does underlined text not get wrapped once it hits the end of a line ? The string `\underline{FOO BAR FOO BAR FOO BAR ... [100 more of these]}` runs off the page in my compiled pdf. How can I make it wrap?


title: How to enable use of minus and plus in tex documents?

text: I see many `cls` files using `plus` and `minus` operators to set lengths. How can I use these operators (or some equivalent macro(s)) to do something like the following?               \setlength{\lengtha}{.5\textwidth}     \setlength{\lengthb}{.5\textwidth}     \begin{tabular*}{\lengtha plus \lengthb}{cc}     a & b \\     \end{tabular*}


title: How to specify the step in sum?

text: The traditional sum's step is 1, but what if I want to specify the step to be some integer else?


title: Auto-completion for (only) \citet using bibtex and natbib using texmaker does not work

text: I am using bibtex and natbib for a scrartcl and the editor texmaker and everything works fine, except that I don't have auto-completion for (only) the command `\citet`. For `\citep` it works just fine. And both citation commands also do work. It's just a question of convenience for me. How do I get auto- completion to work here? Here's the tex file code (text reduced to a minimum):               \documentclass[a4paper, 12pt]{scrartcl}     \usepackage{fancyhdr}     \pagestyle{headings}          \usepackage{natbib}     \bibpunct{(}{)}{;}{a}{,}{,~}          \usepackage[english]{babel}     \usepackage[T1]{fontenc}     \usepackage[latin1]{inputenc}     \newcommand{\changefont}[3]{\fontfamily{#1} \fontseries{#2} \fontshape{#3} \selectfont}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}          \usepackage{blindtext}                    %----------------end-of-preamble----------------     %---------------begin-of-document---------------               \begin{document}          \section{Local Density Estimator}     Considering only equal-mass stars, \citet{vonhoerner1963} defined the local mean density around a star as ...          \bibliographystyle{plainnat}     \bibliography{/home/hmm/bib/clusters}          \end{document}


title: Still trying to draw a simple arc

text: Not having overcome the problems I asked about in this question, I tried deleting from the LaTeX file I was working with all `\usepackage` commands except `\usepackage{curves}`. I included this line in my file:               \put(80,8){\arc(10,0){53}}      I got an error message saying "bezier" is already defined, and it said this was on line 246, and my file doesn't have that many lines, so I went to line 246 of curves.sty and it was the end of a sequence of lines that started with \newcommand\@bezier. So I commented those out and tried to compile again. Then it said this:               \! Undefined control sequence.     <argument> \fourteenrm                         \hss .     l.23 \put(80,8){\arc(10,0){53}}      The sequence "fourteenrm" appears nowhere either in my file nor in curves.sty. So now I feel as if I've spent a week on something that should take a minute and I'm wondering if I should use xfig instead. Does drawing an arc of a circle exceed the ability of all technology?


title: What typographic rules are there for indenting paragraphs?

text: I wonder what typographic rules there are for indenting. Does it require a certain amount of lines to be justified or should it be applied per default. ![enter image description here](http://i.stack.imgur.com/GY1Kf.png) In my opinion, the text colour is not very nice, when having two-liners as in my example. But what are the more qualified opinions on this?


title: Modify default description style

text: I need to modify description style. I want the description entry to be on the next line, with a different color and               \newenvironment{mydescription}{%         \let\olditem\item%          \begin{list}{}{             \renewcommand\item[2][]{                 \olditem \textbf{\textsc{\color{black}{##1}}} \\ \normalfont \color{light-gray} ##2             }             \setlength{\leftmargin}{1.5em}             \setlength{\itemsep}{0.05em}             \setlength{\parskip}{5pt}             \setlength{\parsep}{0.8em}             }     }     {         \end{list}%     }      My problem is the extra space between the first and the second letters of the description. I am not able to post an image as it is my first post.


title: latexdiff + svn not working with multiple files (flatten)

text: **Short question** Seems like `--flatten` doesn't work properly with `latexdiff-vc`. How can I get this working, without reverting to my elaborated workflow described below? **Context** I track the history of my Latex documents using SVN. I've recently started using `latexdiff` to generate PDFs highlighting the changes between certain revisions. My initial workflow of svn+latexdiff was (1) to copy over the whole svn folder to a temporary lcoation, (2) update this to the relevant revision, (3) go back to the original svn folder and (4) start `latexdiff` specifying the relevant folders and files. As I split up my latex document in multiple files using `\input{}` statements, I have to use the `latexdiff --flatten` option to get this working. So, at the Windows command prompot I type something like:               latexdiff --flatten ..\..\copy_at_r48\main.tex main.tex > diff.tex      I figured there must be an easier way and bumped into `latexdiff-vc` which supports specifying svn revisions directly. However, the following doesn't seem to work, as the old versions of linked files doesn't seem to get retrieved/flatten; there are only DIFF markings in the main content:               latexdiff-vc --flatten -r 48 main.tex


title: Error while trying to start chapters on the same page

text: This is my first post here. I have tried the solution proposed in this site to start chapters in the same page as the previous one ended but I always get an error. I am a TeX newbie and I feel that I'm not capable of finding the answer myself. I am using the report class and a few other commands and packages to make the titles behave according to my thesis specifications but when I used the clearpage solutions proposed in the other topic I get an error: Chapter 2. ! Package titlesec /b/c9/cError:/b/c0/c Entered in horizontal mode. See the titlesec package documentation for explanation. How can I solve this and start chapters right after the previous one ended? I'll do my best to provide a MWE:               \documentclass[11pt,a4paper]{report}     \usepackage{titlesec}     \newcommand{\cchapter}[1]{\chapter[#1]{\centering #1}}     \newcommand{\ssection}[1]{\section[#1]{\centering #1}}     \newcommand{\ssubsection}[1]{\subsection[#1]{\centering #1}}     \titleformat{\chapter}[hang]       {\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter:}{1em}{}     \titlespacing*{\chapter}{0pt}{0pt}{40pt}     \usepackage{etoolbox}      \makeatletter      \patchcmd{\chapter}{\if@openright\cleardoublepage\else\clearpage\fi}{}{}{}      \makeatother           \begin{document}     ...     \cchapter{first}     bla bla bla     \cchapter{second}     bla bla bla2     \end{document}      Thanks!


title: Using a new document class/template with LyX?

text: I tried googling this elsewhere but I'm new to LaTeX and extremely confused about certain things. Basically I downloaded MikteX and I'm using the latest version of Lyx with it. Now all I basically know how to do is make pretty looking mathematics and add contents pages/titles/references/etc. I'm looking to make a dissertation and my unviersity provides a template which can be found here: http://www.maths.ox.ac.uk/help/faqs/latex/thesisclass So, what exactly do I need to do (and please be super specific as I am totally clueless to all the jargon I read). Basically, I need to download ociamthesis.cls in the first line of that webpage. Does it matter where I save it? What exactly do I do next?


title: Histogram plot with different base value using pgfplots?

text: How can I plot the following bar graph with a base value of -60 instead of 0(default)? ![enter image description here](http://i.stack.imgur.com/UVkJ2.png)               \documentclass[convert={density=400,outext=.png}]{standalone}     \usepackage{pgfplots}     \pgfplotsset{compat=newest}     \begin{document}     \begin{tikzpicture}[baseline]     \centering     \begin{axis}[ybar,bar width=1,line width=2,      ylabel=Output Power(dBm),     xlabel=Frequency(GHz),label style={font=\bfseries\LARGE},     legend style={legend pos= south east},     tick label style={font=\bfseries\Large},     grid=major,anchor=north]     \addplot coordinates     {(100,-24)(200,5.5)(300,-55)(400,-9.5)};     \end{axis}          \end{tikzpicture}     \end{document}


title: How to make this object look like a nice cuboid?

text: I wrote a snippet of code to get a beautiful cuboid but it looks a little distorted. I'd be glad if someone can infuse beauty into the output. (I am sorry if the question is too localised; feel free to (vote to) close if you consider so.)               \documentclass{amsart}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{tikz}     \usetikzlibrary{matrix,arrows}     \newcommand{\Z}{\mathbb Z}     \begin{document}     \begin{tikzpicture}      \matrix (m) [matrix of math nodes, row sep=0.5em,                   column sep=2em]{           &\Z/30\Z& \\     \Z/15\Z&&\\            &\Z/10\Z& \\            &&\Z/6\Z \\     \Z/5\Z&& \\           &\Z/3\Z& \\           &&\Z/2\Z \\           &\{1\}& \\};      \path[-]         (m-1-2) edge (m-2-1)          edge (m-3-2)         edge (m-4-3)         (m-3-2) edge (m-5-1)         (m-2-1) edge [-,line width=6pt,draw=white](m-6-2)         edge (m-6-2)         (m-2-1) edge (m-5-1)         (m-8-2) edge (m-5-1)         edge (m-6-2)         edge (m-7-3)         (m-7-3) edge (m-4-3)         (m-3-2) edge (m-7-3)         (m-4-3) edge [-,line width=6pt,draw=white](m-6-2)         edge (m-6-2);     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/RFaDd.png)


title: How to automatically generate Venn diagrams given the inclusion relations?

text: I'm writing a paper about classes of formal languages, and I'd like to have a diagram showing their heirarchy. Something similar to this (from Wikipedia:) ![enter image description here](http://i.stack.imgur.com/wFKDi.png) Is there a LaTeX package which, I can give the relationship between the classes to, and have automatically generate and lay-out a venn-diagram for me? The idea is that I would give it the list of classes, and some relations between them, i.e. which were contained in each other, which were disjoint, which were incomparable but not disjoint. Containment is assumed to be transitive (i.e. if A is in B, B is in C, then A is in C). Is there a way to do this programatically, or a package to do it automatically? The idea is that I'm continually adding new classes to the diagram, and would love if it would automatically update itself every time I discovered a new relation.


title: Why does the beamer banner appear slightly lighter on any frame that has a pdf figure in it?

text: I'm using beamer, with Warsaw theme, to prepare a talk. When I include a pdf graphic in a frame, the banners - both head and foot - in that frame are noticeably lighter than all the other frames. This doesn't happen on frames with other figures of other graphics formats, such as jpeg or png. It only happens when I include a pdf figure. What is going on and how can I make the banners not appear lighter on these slides?


title: Remove \cite{ref1} output of [1]

text: I added the references using `BibFile1.bib` and in `BibFile1.bib` include the reference label as `ref1`. My TeX document code is:               \documentclass[12pt,a4paper,oneside]{report}     \begin{document}     \cite{ref1}     \bibliographystyle{IEEEtran}     \bibliography{BibFile1}     \end{document}      In out put first print [1] and then reference information. I need to delete this [1]. What I need to do?


title: Problems with special characters with Jabref on Windows when using the DOI to BibTeX feature

text: I use JabRef on Windows 7 64 bit. The option for the .bib-file is set to UTF8. When I use the _DOI to BibTeX_ feature in Jabref and import any DOI that leads to a source with special characters in its properties, say this one ...               10.1007/978-3-540-92788-4_1      ## Windows ... I get this result on Windows (version 2.9): ![enter image description here](http://i.stack.imgur.com/EWI71.png) ... it's the same with 2.10 beta3 on Windows: ![enter image description here](http://i.stack.imgur.com/KcxUJ.png) ... and the same for the final release for 2.10 for the doi `10.1051/jp2:1995145`: ![enter image description here](http://i.stack.imgur.com/iEThj.png) Here is a screenshot of the saved file opened in Notepad++: ![enter image description here](http://i.stack.imgur.com/Q7iqo.png) ## Linux It is working on Linux (Xubuntu 13.10 with version 2.10 beta): ![enter image description here](http://i.stack.imgur.com/Nkrox.png) ## Options Here are my options, which are equal for both installations (imported the options file into the other installation): ![enter image description here](http://i.stack.imgur.com/T64kn.png) However I'd like to stay with utf-8-encoded files and try not to rework the faulty entries. Is there some way to have the .bib-file in utf-8 and still use the DOI to BibTeX feature? It's a bit odd JabRef can load the .bib-file which is already encoded in utf-8 but when I add something, it produces the faulty parts. The thing is, whether I open a .bib-file saved by JabRef on either Windows or Linux, Notepad++ says (in the lower right) it is encoded **Ansi as UTF-8** so I'm quite confused what is actually causing this if there aren't any encoding issues.


title: Connected dashed lines between 3 diagrams and curvy lines

text: I would like to make the three following diagrams which are interconnected.![enter image description here](http://i.stack.imgur.com/OPPZY.png) I meet two difficulties: both how to make these curvy lines within each diagram and how to connect them with dashed lines.               \documentclass{article}          \title{pgfplots - motor}          \usepackage{tikz}     \usepackage{pgfplots}          \begin{document}               \begin{tikzpicture}     \draw[thick, ->] (0,0)--(0,4) node[left]{$Q$};     \draw[thick, ->] (0,0)--(4,0) node[below]{$L$};     \end{tikzpicture}     \begin{tikzpicture}     \draw[thick, ->] (0,0)--(0,4) node[left]{$C$};     \draw[thick, ->] (0,0)--(4,0) node[below]{$Q$};     \end{tikzpicture}     \begin{tikzpicture}     \draw[thick, ->] (0,0)--(0,4) node[left]{$C$};     \draw[thick, ->] (0,0)--(4,0) node[below]{$Q$};     \draw[thick, -] (0,1)--(4,1) node [right]{$FC$};     \end{tikzpicture}     \end{document}      **EDIT: TP, AP, MP curves** ![enter image description here](http://i.stack.imgur.com/YR8ze.png)


title: Maintaining Optical Margins with Hanging Punctuation

text: To achieve hanging quotation marks, I am changing their protrusion settings in my preamble:               \documentclass{minimal}          \setlength{\parindent}{0cm}     \usepackage{luatextra}       \setmainfont{Times}     \usepackage{microtype}       {       \SetProtrusion{encoding=EU2}       {\textquotedblleft={1000,},\textquotedblright={,1000}}       }          \begin{document}          This minimal instance\\     of a left-side margin\\     “should help”\\     should help\\     to provide an example\\     of the issues faced\\     “of the issues faced”\\     with optical alignment\\     and hanging punctuation.          \end{document}      Since `microtype` performs protrusion only on the glyph closest to the margin, every glyph adjacent to a hanging quote receives no protrusion with this method. I want to maintain optical margin alignment in my text block, with the hanging quotes' adjacent glyphs protruded to align with the block. Is there a way I can apply the appropriate protrusion to those adjacent glyphs? It cannot be font-specific, as I'd like to apply the same settings to any font.


title: ! Undefined control sequence on tables

text: I am new in LaTeX. I have created LaTeX and Gnuplot to build my graphs. Currently I have to add new table using LaTeX. but I get error:               ! Undefined control sequence.     l.60 \mycaption                    {tab-comp}{Table Component}{      This is my LaTeX file:               \documentclass{article}          \usepackage{graphicx}          \begin{document}     \includegraphics{eps/a1-count}     \includegraphics{eps/a2-type}     \includegraphics{eps/a2-typereal}     \includegraphics{eps/a3-aspect}     \input{tab-comp/tab-comp}     \end{document}      I guess this because missing package in LaTeX, but I don't have Idea what are the packages. Anyone who know about this? Thanks!


title: PGFPLOTS: Show x labels for every second tick

text: How can I show xaxis labels for every second data in this dataset. I want a bar for each tick, but not a label.               \documentclass{article}     \usepackage{pgfplots}     \pgfplotsset{compat=newest}     \usepackage{filecontents}% http://ctan.org/pkg/filecontents     \usepackage{silence}% http://ctan.org/pkg/silence     \WarningFilter{latex}{Overwriting file}% Remove LaTeX warnings starting with "Overwriting file"     \begin{filecontents*}{data.csv}     _MINPT_,_OBSPCT_     0,99.198665453     10,11.622687291     20,7.279344859     30,4.6982104944     40,3.4728541098     50,1.5862905672     60,2.0837124659     70,1.0433727631     80,1.313315135     90,0.8462238399     100,0.7703973309     110,0.5125872005     120,0.8826205641     130,0.4458598726     140,0.4185623294     150,0.4519259933     160,0.5065210798     170,0.2183803458     180,0.3973309069     190,0.2274795268     \end{filecontents*}     \begin{document}     \begin{tikzpicture}     \begin{axis}[         ybar interval,         enlarge x limits=false,         xmin=0.1,ymax=100,ymin=0.1,         xtick=data     ]     \addplot+ table [x, y, col sep=comma] {data.csv};     \end{axis}     \end{tikzpicture}     \end{document}      I don't want to manually specify the xticks because I've a series of histograms to produce! The last observation (190) is also missing. How can I ensure it's included?


title: Long form of acronyms capitalized in section headings

text: I use the glossaries package and defined headers often in section titles. In general I keep the first letter of each word in the headings in capital case, but if an acronym occurs the first time, it is printed in full length, but I can only capitalize the first letter by command.               \documentclass{scrartcl}          \usepackage[acronym]{glossaries}     \newacronym{test}{TTSbCiH}{this text should be capitalized in headings}     \makeglossaries          \begin{document}     \section{\Gls{test}}     \Glsfirst{test}          \glsfirst{test}     \end{document}      which looks like ![enter image description here](http://i.stack.imgur.com/pNtM1.png) But it should rather be "1 This Text Should Be Capitalized In Headings" (even better was "1 This Text Should be Capitalized in Headings") How can I achieve that?


title: How to adjust the arrow head tip of a bezier curve?

text: I want to adjust the arrow head tip of a bezier curve on the left such that it looks like the one on the right. As there is no `\ncbezier` or `\pcbezier` available, I cannot use `nodesep` to adjust it. `arcsep` does not work as well. Using `\psbezier{->}([offset=4pt]R)([offset=-4pt]CR)([offset=-4pt]CL)([offset=4pt]L)` is not perfect because it produces a new different bezier curve. In the right figure, can you see the filled region bounded by the first created bezier curve is not exactly enclosed by the second one? ![enter image description here](http://i.stack.imgur.com/NEG3v.png)               \documentclass[border=12pt]{standalone}     \usepackage{pst-node}     \addtopsstyle{gridstyle}{griddots=0,gridwidth=0.4pt,subgriddiv=10,subgridwidth=0.1pt}          \def\Common{%         % define nodes           \pnode(0,0){L}         \pnode(1;45){T}         \pnode(!2 sqrt 0){R}         \pnode[-0.5,0.75](T){CL}         \pnode[0.5,0.75](T){CR}         % draw a bezier curve         \pscustom[fillstyle=solid,fillcolor=red,linestyle=none]{\psbezier(R)(CR)(CL)(L)\closepath}         % draw dots         \pscircle(L){4pt}         \pscircle(R){4pt}     }          \begin{document}     \begin{pspicture}[showgrid=false](1.45,1.25)         \Common         \psbezier{->}(R)(CR)(CL)(L)     \end{pspicture}     \qquad     \begin{pspicture}[showgrid=false](1.45,1.25)         \Common         \psbezier{->}([offset=4pt]R)([offset=-4pt]CR)([offset=-4pt]CL)([offset=4pt]L)     \end{pspicture}     \end{document}      So how to adjust it? More general question: Is it possible to put the arrow head to any point on the path (as in TikZ it is possible)?


title: How to automatically keep the indentation level when a line has to be broken

text: I'm using the `algpseudocode` package with two custom commands, `\Let` and `\LongState` to handle automatic indentation of (broken) long lines in the spirit of Werner's answer, which uses `\parbox` to wrap the long line's content. However, the following approach does not work well when the indentation level is more than one. Here is an example:               \documentclass{article}          \usepackage{algorithm}     \usepackage[noend]{algpseudocode}     \usepackage{calc}          % A command for defining assignments within the algorithmic environment which     % supports automatic indentation when the second argument is too long to fit     % on one line     \newcommand*{\Let}[2]{\State #1 $\gets$     \parbox[t]{\linewidth-\algorithmicindent-\widthof{ #1 $\gets$}}{#2\strut}}     % A \State command that supports automatic indentation when the argument's     % content is too long to fit on one line     \newcommand*{\LongState}[1]{\State     \parbox[t]{\linewidth-\algorithmicindent}{#1\strut}}          \begin{document}          \begin{algorithm}     \caption{This is some testing pseudo-code showing what happens with nested long     lines}          \begin{algorithmic}[1]       \Function{test}{$(x, y)$}         \Let{$a$}{some math expression}         \Let{$b$}{some very very long expression that doesn't fit on one line and is         even longer and longer}         \For{each $e$ in a list}             \Let{$l(e)$}{the length of element $e$}             \If{some condition on $l(e)$}                 \LongState{run some complex sub-routine and get the result and this                 description is very very long, long indeed...}                 \Let{$a$}{some math expression}                 \Let{$b$}{some very very long expression that doesn't fit on one                 line and is even longer and longer}                 \If{some other condition}                     \Let{$c$}{another math expression}                 \EndIf             \EndIf         \EndFor       \EndFunction     \end{algorithmic}          \end{algorithm}          \end{document}      The following renders as: ![enter image description here](http://i.stack.imgur.com/3j5F5.png) Line 3 is an example of a well broken long line, whereas lines 7 and 9 stretch out too far. **Edit:** I initially encountered this problem when writing my PhD Thesis using the cam-thesis class and XeLaTeX. My setup is Fedora 17 with TeXLive 2013 as packaged by Jindrich Novy. If I use Gonzalo Medina's answer and change the document's class to `\documentclass{cam-thesis}` (following is a MWE):               \documentclass{cam-thesis}     \usepackage{algorithm}     \usepackage[noend]{algpseudocode}     \usepackage{calc}     \usepackage{linegoal}          % A command for defining assignments within the algorithmic environment which     % supports automatic indentation when the second argument is too long to fit     % on one line     \newcommand*{\Let}[2]{\State #1 $\gets$     \parbox[t]{\linegoal}{#2\strut}}     % A \State command that supports automatic indentation when the argument's     % content is too long to fit on one line     \newcommand*{\LongState}[1]{\State     \parbox[t]{\linegoal}{#1\strut}}          \begin{document}          \begin{algorithm}     \caption{This is some testing pseudo-code showing what happens with nested long     lines}          \begin{algorithmic}[1]       \Function{test}{$(x, y)$}         \Let{$a$}{some math expression}         \Let{$b$}{some very very long expression that doesn't fit on one line and is         even longer and longer}         \For{each $e$ in a list}             \Let{$l(e)$}{the length of element $e$}             \If{some condition on $l(e)$}                 \LongState{run some complex sub-routine and get the result and this                 description is very very long, long indeed...}                 \Let{$a$}{some math expression}                 \Let{$b$}{some very very long expression that doesn't fit on one                 line and is even longer and longer}                 \If{some other condition}                     \Let{$c$}{another math expression}                 \EndIf             \EndIf         \EndFor       \EndFunction     \end{algorithmic}          \end{algorithm}          \end{document}      I get the following (`cam-thesis` with `XeLaTeX`): ![enter image description here](http://i.stack.imgur.com/zYoTW.png) Debugging this further, however, I found that the following combinations work:   1. `cam-thesis` with `pdfLaTeX`: ![enter image description here](http://i.stack.imgur.com/B5Kxv.png)   2. `article` with `XeLaTeX`: ![enter image description here](http://i.stack.imgur.com/kwC6N.png)   3. `article` with `pdfLaTeX`: ![enter image description here](http://i.stack.imgur.com/v9ZsA.png) All three of the above options work fine, but I really need to use `cam- thesis` with `XeLaTeX`.


title: Defining TeX count in a group

text: I thought that TeX counts were local definitions, but that is not what I am seeing. I was expecting that if I used `\newcount` within a group, that the `etoolbox` `\ifdefcounter` would say that the counter is not defined outside the group. The following code produces:               \documentclass{minimal}          \usepackage{etoolbox}     \begin{document}     \ifdefcounter{\mycount}{The counter is defined}{The counter is NOT defined}          \begingroup     \newcount\mycount     \endgroup     \ifdefcounter{\mycount}{The counter is defined}{The counter is NOT defined}     \end{document}      > The counter is NOT defined > > The counter is defined Suggesting to me that the counter is not defined at the beginning, but its existence persistence outside the group and hence is not local.