title: bracket with doubled delimiters

text: I want to typeset Hilbert-Schmidt-Products as the Liouville-Equivalent of the Hilbert Space Braket, with doubled delimiters, like this: `\Lbraket{\rho|\rho}` results in `<<rho|rho>>`. I was trying to adapt the definition of `\Braket` from the Braket package to do this, ending up with the following code:               {\catcode`\|=\active                                                                    \xdef\Lbraket{\protect\expandafter\noexpand\csname Lbraket \endcsname}                \expandafter\gdef\csname Lbraket \endcsname#1{\begingroup                                \ifx\SavedDoubleVert\relax                                                              \let\SavedDoubleVert\|\let\|\BraDoubleVert                                          \fi                                                                                \mathcode`\|32768\let|\BraVert                                                        \left\langle\kern-0.2em\left\langle{#1}\right\rangle\kern-0.2em\right\rangle\endgroup}     }     \def\BraVert{\@ifnextchar|{\|\@gobble}% turn || into \|                                    {\egroup\,\mid@vertical\,\bgroup}}                                               \def\BraDoubleVert{\egroup\,\mid@dblvertical\,\bgroup}                                \let\SavedDoubleVert\relax     \begingroup                                                                            \edef\@tempa{\meaning\middle}                                                         \edef\@tempb{\string\middle}                                                         \expandafter \endgroup \ifx\@tempa\@tempb                                              \def\mid@vertical{\middle|}                                                           \def\mid@dblvertical{\middle\SavedDoubleVert}                                        \else                                                                                \def\mid@vertical{\mskip1mu\vrule\mskip1mu}                                           \def\mid@dblvertical{\mskip1mu\vrule\mskip2.5mu\vrule\mskip1mu}                      \fi      This works, but for very large formulas the double delimiters are not sufficiently tight, and the negative kerning should be larger. On the other hand, I've found some code that allows to define double delimiters and doesn't seem to suffer from the same problem. The following is from a newsgroup posting, it defines `\lleft` and `\rright` so that e.g. `\lleft\langle` results in `<<`.               \catcode`@=11                                                                         \def\lleft#1#2\rright{\begingroup%                                                       \def\ts@r{\nulldelimiterspace=0pt \mathsurround=0pt}%                                 \let\@hat=#1%                                                                         \def\sht@im{#2}%                                                                      \def\@t{{\mathchoice{\def\@fen{\displaystyle}\k@fel}%                                        {\def\@fen{\textstyle}\k@fel}%                                                        {\def\@fen{\scriptstyle}\k@fel}%                                                      {\def\@fen{\scriptscriptstyle}\k@fel}}}%                                       \def\g@rin{\ts@r\left\@hat\vphantom{\sht@im}\right.}%                                 \def\k@fel{\setbox0=\hbox{$\@fen\g@rin$}\hbox{%                                          $\@fen \kern.3875\wd0 \copy0 \kern-.3875\wd0%                                         \llap{\copy0}\kern.3875\wd0$}}%                                                       \def\pt@h{\mathopen\@t}\pt@h\sht@im%                                                  \rright}%                                                                       \def\rright#1{\let\@hat=#1%                                                              \def\st@m{\mathclose\@t}%                                                             \st@m\endgroup}                                                                    \catcode`@=12      My question is if there's a way to combine to two code snippets to get a correctly resizing Braket with doubled delimiters. Simply doing the following does not work:               {\catcode`\|=\active                                                                    \xdef\LBraket{\protect\expandafter\noexpand\csname LBraket \endcsname}                \expandafter\gdef\csname LBraket \endcsname#1{\begingroup                                \ifx\SavedDoubleVert\relax                                                              \let\SavedDoubleVert\|\let\|\BraDoubleVert                                          \fi                                                                                \mathcode`\|32768\let|\BraVert                                                        \lleft\langle{#1}\rright\rangle\endgroup}     }      This results in an error message:               ! Extra \middle.     \mid@vertical ->\middle |      My knowledge of lowlevel TeX is not anywhere near sufficient to understand how the implementation of `\lleft` and `\rright` works, but maybe someone sees whether the two snippets can be combined.


title: grabbing a single Greek glyph from an alternative font in math mode?

text: I have a physics textbook that is used by students who typically have no previous familiarity with the Greek alphabet. In the Computer Modern math font, lowercase gamma is highly stylized. The loop at the bottom is squashed flat so that there is no white space inside. It's perfectly legible to people who are already familiar with the Greek alphabet, but for my students it is endlessly confusing. They think it looks just like the Latin "y," and they write it that way on their homework. It drives me crazy, and I would dearly love to find a way to substitute some other font for that one character in math mode. Is there a way to do this? Here are some similar questions on this site with answers that don't quite work for me: Change font in a single paragraph -- This one doesn't seem to do anything in math mode. Importing a Single Symbol From a Different Font -- This approach might work, but mathabx doesn't include an alternative set of Greek characters. Replacing greek glyphs in math mode -- This is about replacing the entire Greek alphabet with some other font. I don't have any problem with that, if it's a reasonable-looking font. However, the only solution that worked seemed to be unicode-math, which is for xetex and luatex; I'm using pdftex, and I'm not crazy about switching this large project to xetex or luatex.


title: Index shouldn't start new page

text: I am writing an article in LaTeX 2e with `\documentclass[twocolumn]{article}`, including an index. The document prelude includes `\usepackage{makeidx}` and the `\makeindex` command. At the point where I want the index to print I say `\printindex`. The indexing operations all work perfectly. However, when the document is formatted, a page break is inserted both before and after the index. I want to eliminate both page breaks. I assume that `\printindex` calls `\include`, which performs `\clearpage`, though I don't really know that. How can I eliminate the two page breaks?


title: Unable to compile a beamer presentation. Don't know why

text: I'm not able to compile this, someone can tell me where is the problem?               \documentclass[aspectratio=169]{beamer}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[brazil]{babel}     \usepackage{graphics,amssymb,amsfonts,amsmath}     \usepackage{tikz}     \usepackage{enumerate,hyperref}     \usepackage{palatino}   % Fonte sem serifa     \usepackage{ragged2e}   % Paragrafo justificado     \usepackage{minted} % Highlight para codigos de programacao     \usepackage{booktabs} % tabelas     % Tema, cor e fonte modo matematico     \usetheme{AnnArbor}     % \usetheme{Pittsburgh}     \usecolortheme{orchid}     \usefonttheme[onlymath]{serif}     % Veja mais temas e cores em http://www.hartwork.org/beamer-theme-matrix/          % Colocando numero de paginas no slide     \setbeamertemplate{footline}[frame number]          % Desativando os botoes de navegacao     \beamertemplatenavigationsymbolsempty          % Tela cheia     \hypersetup{pdfpagemode=FullScreen}          % Layout da pagina     \hypersetup{pdfpagelayout=SinglePage}          % Definicao de novos ambientes     \theoremstyle{Definition}     \newtheorem{defn}{Defini\c c\~ao}     \newtheorem{teo}[theorem]{Teorema}     \newtheorem{ex}[theorem]{Exemplo}          % Definicao de novos comandos     \providecommand{\sin}{} \renewcommand{\sin}{\hspace{2pt}\textrm{sen}}     \providecommand{\tan}{} \renewcommand{\tan}{\hspace{2pt}\textrm{tg}}     \newcommand{\R}{\mathbb{R}}          % Capa - requer o TikZ     \newcommand{\capa}{       \begin{tikzpicture}[remember picture,overlay]         \node at (current page.south west)           {\begin{tikzpicture}[remember picture, overlay]             \fill[shading=radial,top color=orange,bottom color=orange,middle color=yellow]               (0,0) rectangle (\paperwidth,\paperheight);           \end{tikzpicture}           };       \end{tikzpicture}     }          % Ambiente Java (minted)     \newminted{java}{bgcolor=cyan!10}          % Titulo     \title[\sc{Texto no rodap\'e}]{Modelo do Beamer - Digite o titulo}     \author[digite seu Nome]{digite seu Nome}     \institute{nome do instituto} % opcional     \date{\today}          \begin{document}     \justifying % Paragrafo justificado          % Primeiro frame: Capa     \begin{frame}       \capa       \titlepage     \end{frame}          \section{Introdu\c c\~ao}          % Frame 2: Introducao     \begin{frame}[fragile]\frametitle{Introdu\c c\~ao}     Este \'e um modelo do Beamer\cite{tantau2004user}, veja os c\'odigos e altere-os conforme sua necessidade.          Este exemplo cont\'em um pre\^ambulo e algumas figuras.          Este exemplo usa o pacote \verb|minted|. Para compilar \'e necess\'ario usar o comando\\     \verb|-shell-escape| pelo terminal.          \begin{minted}[bgcolor=lightgray!20]{bash}     pdflatex -shell-escape beamer_modelo2013.tex     ou     latexmk -pdf -shell-escape beamer_modelo2013.tex     \end{minted}          \vfill          \begin{flushright}     \url{latexbr.blogspot.com.br}\cite{LaTeXBR}     \end{flushright}          \end{frame}          % Imagem como plano de fundo     % Insere a imagem no proximo slide     {%     \usebackgroundtemplate{       \centering       \includegraphics[width=\paperwidth]{figuras/figBackground}     }          % Frame 3: plano de fundo     \begin{frame}       \begin{center}         % texto colorido         \color{yellow}{\Huge Imagem como plano de fundo}       \end{center}     \end{frame}     }     % esta chave 'fecha' a imagem,     % caso queira a figura em mais frames     % coloque os outros frames antes desta chave.          % Frame 4: expressoes matematicas     % a opcao fragile permite uso do verbatim     \begin{frame}[fragile]\frametitle{Express\~oes Matem\'aticas}          % Paragrafo     \setlength{\parindent}{2em}          Seja $f: \R \to \R$ tal que $y = \sin x$.          Este texto est\'a justificado\footnote{Nota de rodap\'e.} e com uma margem definida pelo comando          \begin{verbatim}     \setlength{\parindent}{2em}     \end{verbatim}          Exemplo de uma equa\c c\~ao matem\'atica centralizada.          \[     S = \int_a^b \frac{\sqrt x}{x}dx     \]     \end{frame}          % Frame 5: exemplo e solucao     \begin{frame}\frametitle{Exemplo e Solu\c c\~ao}            \begin{block}{Exemplo}         Este \'e um ambiente chamado \emph{block} com um titulo \emph{Exemplo}.\cite{knuth}\cite{lamport}       \end{block}            \begin{exampleblock}{Solu\c c\~ao}         Este \'e um ambiente chamado \emph{exampleblock} com um titulo \emph{Solu\c c\~ao}.       \end{exampleblock}          \end{frame}          % Frame 6: novos ambientes     \begin{frame}\frametitle{Novos ambientes}            \begin{defn}         Novo ambiente chamado \emph{defini\c c\~ao}.       \end{defn}            \begin{teo}         Novo ambiente chamado \emph{teorema}.       \end{teo}          \end{frame}          % Frame 7: verbatim     \begin{frame}[fragile]\frametitle{Verbatim}     Para usar o verbatim no Beamer \'e necess\'ario usar a op\c c\~ao \verb|fragile|.          \begin{verbatim}      \begin{frame}[fragile]\frametitle{Verbatim}       % qualquer codigo LaTeX ou outros      \end{frame}     \end{verbatim}          \end{frame}          % Frame 8: Linguagem de programacao     \begin{frame}[fragile]\frametitle{Linguagem de programa\c c\~ao}     Para mostrar c\'odigos de linguagem de programa\c c\~ao use o pacote \verb|minted|.          Exemplo de c\'odigo Java.          \begin{javacode}     public class HelloWorldApp {         public static void main (String args[])         {           System.out.println("Hello World!");         }     }     \end{javacode}          Para compilar com o pacote \verb|minted| \'e necess\'ario usar o comando \verb|-shell-escape| pelo terminal.          \begin{minted}[bgcolor=lightgray!20]{bash}     pdflatex -shell-escape minted01.tex     ou     latexmk -pdf -shell-escape minted01.tex     \end{minted}     \end{frame}          % Frame 9: Inserindo figuras     \begin{frame}\frametitle{Inserindo figuras}     Figuras devem ser inseridas no formato PNG, JPG ou PDF.            \begin{figure}[h]         \centering         \includegraphics[height=0.6\paperheight]{figuras/figCoordEsf02}         %\includegraphics[height=6cm]{figCoordEsf02}         \caption{Sistema de coordenadas esf\'ericas.}\label{figCoordEsf02}       \end{figure}     \end{frame}          % Frame 10: figuras TikZ     \begin{frame}\frametitle{Figuras TikZ}     Figuras feitas com TikZ.            \begin{figure}[h]         \centering         \input{figuras/integral}         \caption{Integral.}\label{figintegral}       \end{figure}     \end{frame}          % Frame 11: tabela     \begin{frame}\frametitle{Tabelas}       \begin{table}         \centering         \begin{tabular}{cclrr}           \toprule           ID & Quant & Produto & Unit & Total\\           \midrule           1 & 2 & manga     & 3,00 & 6,00\\           2 & 7 & laranja   & 1,20 & 8,40\\           3 & 5 & banana    & 3,50 & 17,50\\           4 & 3 & melancia  & 8,00 & 24,00\\           5 & 4 & abacaxi   & 4,00 & 16,00\\           \midrule            Total &   &           &  & 71,90\\           \bottomrule         \end{tabular}         \caption{Lista de compras}       \end{table}     \end{frame}               \section{Transi\c c\~ao}          % Frame 12: Transicao     \begin{frame}\frametitle{Transi\c c\~ao}     Um pequeno exemplo de transi\c c\~ao.          \pause          \begin{enumerate}[a)]       \item<2-> primeiro;       \item<3-> segundo;       \item<4-> terceiro.     \end{enumerate}     \end{frame}          % Frame 13: Bibliografia     \begin{frame}\frametitle{Bibliografia}       % estilo da bibliografia       \bibliographystyle{abbrv}       % chamando o arquivo refs.bib       \bibliography{refs}     \end{frame}          \end{document}


title: Picture environment "rotating" text

text: I'd like to know how can I _rotate_ text in the picture environment. I want to typeset some text from bottom-to-top, making it to appear _sideways_. Basically, the following               \begin{picture}(...,...)       \put(0,0){\rotate{-90}{Text.}}     \end{picture}      should be printed like ![There should be some text here appearing in *sideways* ... now, where did I put it again?](http://i.stack.imgur.com/FnjXS.png) (The text's background is gray, because it's funnier that way!)


title: \mathit spacing with \mathnormal font

text: I noticed that while `\mathit{AHfi}` sets the spaces and ligatures correctly (like `\operatorname`), the letters look narrower than the ones produced by `\mathnormal{AHfi}`. Is there a way to typeset a multi-letter math operator in the mathnormal font?


title: How can I adjust the box around my equation?

text: I currently use the `\boxed{}` command to place boxes around my equations. However, I would like to have more control of the style of the box. Is there a way to do this? To take a specific example, the figure below shows both the standard `\boxed{}` out put (a) and the desired mock-up (b), where I have increased the box size and increased the border thickness slightly. ![enter image description here](http://i.stack.imgur.com/h8z3q.png)


title: How to quickly convert a single BibTeX reference into a formatted reference?

text: I contribute a bit to various forums and Stack Exchange sites and I often want to cite a journal article that I've found from a quick search on Google Scholar. Google Scholar allows for easy exporting of BibTeX references. I then want to get the citation into a reasonable format for inclusion in a post (e.g., an answer on a stack exchange question). I'm not that fussy about the particular bibliographic style, although all the core information should be included (and something like APA style would be good). ### Question   * What is a quick method for getting a single BibTeX reference from Google Scholar into a respectable format for inclusion into an online forum post? Note that I had a look at the online BibTeX Convertor and none of the formats appear suitable.


title: A step by step environment

text: I would like to obtain the following output :               Bla, bla, here are the actions to do.              Action 1             Bla, bla, bla...              Action 2             Bla, bla, bla...              Action 3             Bla, bla, bla...          When the preceding actions have been done, you must do the following things.              Thing 1             Bla, bla, bla...              Thing 2             Bla, bla, bla...              Thing 3             Bla, bla, bla...      The LaTeX code could look like :               Bla, bla, here are the actions to do.          \begin[Action]{step}         \step         Bla, bla, bla...              \step         Bla, bla, bla...              \step         Bla, bla, bla...     \end{step}          When the preceding actions have been done, you must do the following things.          \begin[Thing]{step}         \step         Bla, bla, bla...              \step         Bla, bla, bla...              \step         Bla, bla, bla...     \end{step}


title: TikZ: draw objects in transparent objects (3d)

text: I want to draw a cuboid in another transparent cuboid with TikZ. Therefore I've created a `\newcommand` to draw a cuboid.               \documentclass[11pt, halfparskip]{scrartcl}     \usepackage{ucs}     \usepackage[utf8x]{inputenc}     \usepackage{tikz}          \begin{document}     \newcommand{\cuboid}[7]{         % bottom         \draw[#7] (#1, #2, #3) -- ++(#4, 0, 0) -- ++(0, 0, #6) -- ++(-#4, 0, 0) -- cycle;         % back         \draw[#7] (#1, #2, #3) -- ++(#4, 0, 0) -- ++(0, #5, 0) -- ++(-#4, 0, 0) -- cycle;         % left         \draw[#7] (#1, #2, #3) -- ++(0, 0, #6) -- ++(0, #5, 0) -- ++(0, 0, -#6) -- cycle;         % right         \draw[#7] (#1+#4, #2, #3) -- ++(0, 0, #6) -- ++(0, #5, 0) -- ++(0, 0, -#6) -- cycle;         % front         \draw[#7] (#1, #2, #3+#6) -- ++(#4, 0, 0) -- ++(0, #5, 0) -- ++(-#4, 0, 0) -- cycle;         % top         \draw[#7] (#1, #2+#5, #3) -- ++(#4, 0, 0) -- ++(0, 0, #6) -- ++(-#4, 0, 0) -- cycle;     }     \begin{tikzpicture}               \tikzstyle{bottomfill} = [thick, fill=lightgray, fill opacity=.5]     \tikzstyle{camerafill} = [thick, fill=blue!20]          \cuboid{0}{0}{0}{4}{4}{4}{bottomfill}     \cuboid{1}{1}{1}{1}{1}{1}{camerafill}          \draw[->, thick] (2, 1.5, 1.5) -- ++(4, 0, 0);          \end{tikzpicture}     \end{document}      But the result looks strange (The inner cuboid seems to be outside the transparent cuboid; compare the cuboid and and the arrow of the second image) ![enter image description here](http://i.stack.imgur.com/iD1gm.png) The result looks right if I'm adding the planes in the right z-order (but that's exhausting)               \documentclass[11pt, halfparskip]{scrartcl}     \usepackage{ucs}     \usepackage[utf8x]{inputenc}     \usepackage{tikz}          \begin{document}     \begin{tikzpicture}     \tikzstyle{bottomfill} = [thick, fill=lightgray, fill opacity=.5]     \tikzstyle{camerafill} = [thick, fill=blue!20]          % 1 bottom     \draw[bottomfill] (0, 0, 0) -- ++(4, 0, 0) -- ++(0, 0, 4) -- ++(-4, 0, 0) -- cycle;     % 1 back     \draw[bottomfill] (0, 0, 0) -- ++(4, 0, 0) -- ++(0, 4, 0) -- ++(-4, 0, 0) -- cycle;     % 1 left     \draw[bottomfill] (0, 0, 0) -- ++(0, 0, 4) -- ++(0, 4, 0) -- ++(0, 0, -4) -- cycle;          % 2 bottom     \draw[camerafill] (1, 1, 1) -- ++(1, 0, 0) -- ++(0, 0, 1) -- ++(-1, 0, 0) -- cycle;     % 2 back     \draw[camerafill] (1, 1, 1) -- ++(1, 0, 0) -- ++(0, 1, 0) -- ++(-1, 0, 0) -- cycle;     % 2 left     \draw[camerafill] (1, 1, 1) -- ++(0, 0, 1) -- ++(0, 1, 0) -- ++(0, 0, -1) -- cycle;     % 2 right     \draw[camerafill] (1+1, 1, 1) -- ++(0, 0, 1) -- ++(0, 1, 0) -- ++(0, 0, -1) -- cycle;     % 2 front     \draw[camerafill] (1, 1, 1+1) -- ++(1, 0, 0) -- ++(0, 1, 0) -- ++(-1, 0, 0) -- cycle;     % 2 top     \draw[camerafill] (1, 1+1, 1) -- ++(1, 0, 0) -- ++(0, 0, 1) -- ++(-1, 0, 0) -- cycle;          \draw[thick] (2, 1.5, 1.5) -- ++(2, 0, 0);          % 1 right     \draw[bottomfill] (0+4, 0, 0) -- ++(0, 0, 4) -- ++(0, 4, 0) -- ++(0, 0, -4) -- cycle;     % 1 front     \draw[bottomfill] (0, 0, 0+4) -- ++(4, 0, 0) -- ++(0, 4, 0) -- ++(-4, 0, 0) -- cycle;     % 1 top     \draw[bottomfill] (0, 0+4, 0) -- ++(4, 0, 0) -- ++(0, 0, 4) -- ++(-4, 0, 0) -- cycle;          \draw[->, thick] (4, 1.5, 1.5) -- ++(2, 0, 0);     \end{tikzpicture}     \end{document}      With the result ![enter image description here](http://i.stack.imgur.com/BrOWU.png) My question: is there a possibility in TikZ to draw an object in a transparent object with without adding the shapes in the right z-order?


title: Is there any package like tdclock which can be used in SumatraPDF

text: I find some errors when using `\usepackage[timeinterval=1]{tdclock}`while opening the SumatraPDF. As zeniko says > The tdclock package only works in PDF readers supporting JavaScript, which > SumatraPDF currently doesn't and likely never will. so I want to find the package like tdclock which can be used in SumatraPDF Ps: tdclock is used in beamer to show the clock.


title: Title and DOI are combined in Elsevier BST file

text: I'm using the bibliography style file "elsarticle-num.bst" for Elsevier (link is here). I'd like to include the DOI for journal articles but when I compile there is no space between the title and "doi:". For example it will say: > W. Cornelius, L. W. Huellmantel, H. R. Mitchell, Ammonia as an engine > fueldoi:10.4271/650052. How do I add a space? The BST file is opaque at best. Thanks. The entry itself:               @ARTICLE{Cornelius1965,         author = {Cornelius, Walter and Huellmantel, L. William and Mitchell, Harry R.},         title = {Ammonia as an Engine Fuel},         year = {1965},         month = {Feb},         doi = {10.4271/650052},         owner = {em793},         publisher = {SAE International},         timestamp = {2014.03.14}      }


title: How to avoid page break after \end{multicols*}?

text: I am experimenting in LyX to create a page which has a single column and two column text.   I inserted the following TeX code in the file.               \begin{multicols*}{2}               \lipsum[1]               \columnbreak               \lipsum[2]       \end{multicols*}       \lipsum[3]        The problem I am facing is Lipsum 3rd paragraph is being created in a new page. How can I avoid this? I want all the three paragraphs in the same page(Paragraph 1 and 2 as two column and Paragraph 3 as a single column below the two column text)


title: MinionPro: math accents on swash capitals

text: The `MinionPro` option `swash` makes `\mathcal` use Minion swash capitals. The position of math accents on swash capitals could use some adjustment (see below). For a single accent, applying `\skew{6}` appears to work well. I suppose I could define a command, say:               \newcommand{\accentcal}[2]{\skew{6}{#1}{\mathcal{#2}}}      Is there a more flexible alternative? One of the `MinionPro` developers suggested "modifying the kerning files", but I am not sure how to do this.               \documentclass{article}     \usepackage[swash]{MinionPro}          \begin{document}     \[\begin{array}{ccc}     \hat{K} & \hat{\mathcal{K}} & \skew{6}\hat{\mathcal{K}} \\     \hat{C} & \hat{\mathcal{C}} & \skew{6}\hat{\mathcal{C}}     \end{array}\]          \[\begin{array}{ccc}     \widehat{K} & \widehat{\mathcal{K}} & \skew{6}\widehat{\mathcal{K}} \\     \widehat{C} & \widehat{\mathcal{C}} & \skew{6}\widehat{\mathcal{C}}     \end{array}\]     \end{document}      ![enter image description here](http://i.stack.imgur.com/8TEuq.png)


title: LaTeX Longtable bug: header-only page generated: how do I fix?

text: here is my LaTeX: (how does one format it nicely?): [Edit:] Reducing the example               \documentclass{article}     \usepackage{longtable}     \usepackage{lscape}     \begin{document}     \begin{landscape}     \noindent      \begin{longtable}{ll}     \caption[]{Decomposition } \\        &   \\ \endhead\hline      &      $ \begin{array}{l}     1 \\ +1 \\ +1 \\ +1 \\ +1 \\ +1 \\ +1 \\ +1 \\ +1 \\ +1 \\ +1 \\ +1 \\ +1 \\ +1 \\ +1 \\ +1 \\ +1 \\ +1 \\ +1 \\ +1 \\ +1 \\ +1 \\ +1 \\ +1 \\ +1 \\ +1 \\ +1 \\ +1 \\      \end{array}$     \end{longtable}     \end{landscape}     \end{document}      And here is what I get: latest reduced example original example .pdf Thanks for your help in advance!


title: Sort but do not compress numeric citations in BibLaTeX

text: I'd like to have a citation style somewhat in between `numeric` and `numeric- comp`. To take the example from the documentation, when `numeric` produces **[8, 3, 1, 7, 2]** and `numeric-comp` produces **[1–3, 7, 8]** , I would like to see **[1, 2, 3, 7, 8]**. As the only difference between the two styles seems to be `sortcites=true` and I can't find something like `compresscites`, I'm a bit lost even though this seems so trivial.


title: How to return the target name of a label

text: I would like to get the target name of the first label in a chapter. For example, if my document contains this:               \chapter{Introduction} \label{intro}      I would like a command/macro that returns "intro" when run inside that chapter. Preferably this also returns "intro" after other labels have been defined in sections and subsections. This command is needed in another macro that fetches specific resources from subfolders that have the same name as the chapter label. I tries messing around with macros such as currentHref, currentlabel and currentlabelname but was not able to get what I want. Any pointers that can help me?


title: StrSubstitute and @ inside and outside \lstnewenvironment

text: While further working on code for my answer to Different approach to literate programming for LaTeX, I am encountering a problem to which I am sure there is a very simple solution, but it completely escapes me. The issue is: I want to be able to automatically index macro names, some of which will contain the `@` character; hence, I need to preprocess them and substitute `@` with `"@` for `makeindex` to accept them. I have some code that works _while_ in a `listings` environment but not when used in a normal environment or command (and I need them too). What's more, if I try to replace any normal letter, it works everywhere – it's only the `@` that doesn't work. So, I suspect the answer has got something to do with `listings` doing some wizardry on the catcodes, but I would like to find out what it is and how to reproduce it. Here is the minimal (in which I am reproducing the actual structure of my code, in case the problem lies somewhere there):               \documentclass{article}          \usepackage{listings,etoolbox,xstring}          \makeatletter     \newcommand{\set@macro@type}[1]{\StrSubstitute{#1}{@}{"@}[\entryname]}     \newcommand{\processtexcs}[1]{\set@macro@type{#1}}     \newcommand{\maketexcs}[1]{\forcsvlist{\par\processtexcs{#1}}\entryname}     \makeatother          \lstnewenvironment{code}[1]         {\maketexcs{#1}}         {}     \newenvironment{notcode}[1]         {\maketexcs{#1}}         {}     \newcommand{\command}[1]{\maketexcs{#1}}          \begin{document}          \begin{code}{my@first@macro}     \end{code}          \begin{notcode}{my@second@macro}     \end{notcode}          \command{my@third@macro}          \end{document}      (Note that it all works if you replace the `@` with `y` in `\StrSubstitute`.)


title: tikz: Bigger arrowheads, merging lines

text: I'm trying to add arrows between equations using `TikZ` and I'm having some issues. First, I can't figure out how to make the lines thicker and the arrowheads bigger. Second, I can't figure out how to get lines coming out of two different nodes that merge to form an arrow pointing at a third node. Here is some code showing the basic layout, followed by an image showing where I'm at with the code at this point (I want the red lines all merged). Some of the images at this thread show what I want quite nicely, but I can't figure out how to apply that stuff to my situation.               \documentclass[]{beamer}     \def\newblock{\hskip .11em plus .33em minus .07em}     \usepackage{tikz}     \usetikzlibrary{arrows,shapes}          \begin{document}     \begin{frame}     \begin{block}{Block title goes here}                                  Some text here.                  \begin{tikzpicture}             % \draw[style=help lines] (-1cm,0cm) grid[step=1cm] (5cm,5cm); % These don't work for some reason.                 \node (e0) at (2, 0.0) {$p_{a,i} + p_{n,i} = 1$} ;                 \node (e1) at (2, -0.5) {$E_i = p_{a,i}*\overline{F_a} + (1 - p_{a,i})*\overline{F_n}$} ;                 \node (e2) at (2, -1.0) {$S = \sum^N_{i=1}(E_i - D_i)^2$} ;                 \node (e3) at (1, -2.0) {$\frac{\partial S}{\partial \overline{F_n}} = 0$} ;                 \node (e4) at (1, -4.0) {$\overline{F_a} = \frac{\overline{D}}{\overline{p_a}} + (1 - \frac{1}{\overline{p_a}})\overline{F_n}$} ;                 \node (e5) at (6, -2.0) {$\frac{\partial S}{\partial \overline{F_a}} = 0$} ;                 \node (e6) at (6, -5.0) {$\overline{F_n} = \overline{D} - \frac{covariance(p_a,D)}{variance(p_a)}\overline{p_a}$} ;                  \node (n1) at (5, -4.0) {} ;                  \draw[->] (e2) to (e3) ;             \draw[->] (e2) to (e5) ;             \draw[->] (e3) to (e4) ;             \draw[] (e4) to (n1) ;             \draw[] (e5) to (n1) ;             \draw[->] (n1) to (e6) ;                  \end{tikzpicture}                 \end{block}          \end{frame}     \end{document}      ![image 1](http://i.stack.imgur.com/5JEeK.png) EDIT Apr. 11 at 7:10 pm EDT: Changed code to more clearly illustrate the problem, and to reflect changes made after reading this thread.


title: How do I adjust the margins just at the beginning of certain sections?

text: I'm using plain TeX and I'm writing a document that will have multiple sections. Each sections starts a new page (i.e. it's immediately preceded by an \eject). How can I adjust the top margin just on the first page of the section and not on any others? My goal is to write a macro called `\newsection` which will (among other things) adjust the margin for the current page only. I'm also using eplain, if that matters. Here's an example. How do I write `\newsection`?               \input eplain     % diss page settings     \topmargin=1in     \rightmargin=1in     \bottommargin=1in     \leftmargin=1.5in     \parskip=1em               \def\newsection{}               %not sure what to put          \newsection                     %this page should have 2 in  top margin, and the next should revert to 1in top margin          Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor     incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis     nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo     consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum     dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident,     sunt in culpa qui officia deserunt mollit anim id est laborum.          Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor     incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis     nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo     consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum     dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident,     sunt in culpa qui officia deserunt mollit anim id est laborum.          Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor     incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis     nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo     consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum     dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident,     sunt in culpa qui officia deserunt mollit anim id est laborum.          Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor     incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis     nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo     consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum     dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident,     sunt in culpa qui officia deserunt mollit anim id est laborum.          Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor     incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis     nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo     consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum     dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident,     sunt in culpa qui officia deserunt mollit anim id est laborum.          Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor     incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis     nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo     consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum     dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident,     sunt in culpa qui officia deserunt mollit anim id est laborum.          Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor     incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis     nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo     consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum     dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident,     sunt in culpa qui officia deserunt mollit anim id est laborum.          Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor     incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis     nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo     consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum     dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident,     sunt in culpa qui officia deserunt mollit anim id est laborum.          Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor     incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis     nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo     consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum     dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident,     sunt in culpa qui officia deserunt mollit anim id est laborum.          Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor     incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis     nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo     consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum     dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident,     sunt in culpa qui officia deserunt mollit anim id est laborum.          Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor     incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis     nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo     consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum     dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident,     sunt in culpa qui officia deserunt mollit anim id est laborum.          Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor     incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis     nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo     consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum     dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident,     sunt in culpa qui officia deserunt mollit anim id est laborum.          Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor     incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis     nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo     consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum     dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident,     sunt in culpa qui officia deserunt mollit anim id est laborum.          Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor     incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis     nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo     consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum     dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident,     sunt in culpa qui officia deserunt mollit anim id est laborum.          Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor     incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis     nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo     consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum     dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident,     sunt in culpa qui officia deserunt mollit anim id est laborum.          Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor     incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis     nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo     consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum     dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident,     sunt in culpa qui officia deserunt mollit anim id est laborum.     \bye


title: Hyperlinks and line-numbering

text: For the following MWE `hyperref` complains that it can not find a target for the link, and thus does not create a link. What can I do to make it work?               \documentclass{article}          \usepackage[colorlinks]{hyperref}     \usepackage[pagewise]{lineno}     \usepackage{lipsum}          \pagewiselinenumbers          \begin{document}     \lipsum[1-2]     foo\linelabel{l:foo}          \lipsum[3]     Line~\ref{l:foo} on page~\pageref{l:foo}.     \end{document}


title: Different small-caps in mathpazo and tgpagella - which are better?

text: Both the packages `tgpagella` and `mathpazo` (with "sc"-option) provide the font Palladio with true small-caps. `tgpagella` additionally offers a bold small-cap font. Yet when comparing the normal small-caps, I realized that there is a noticeable difference between the small-caps: those of `tgpagella` are smaller (see MWE). (1) Which of the small-caps versions is objectively better? What is the criterion? (2) What would you prefer? (3) Suppose one decides that `mathpazo` provides superior small-caps. As this package does not have bold small-caps (which I need for two section-titles), would you consider the section title in my MWE an acceptable work-around? (This results in using `pplx` for regular text and `qpl` for the mentioned titles) (I use `eulervm` for equations, so the math font of `mathpazo` is not required.)               \documentclass{article}          \usepackage[T1]{fontenc}     \usepackage[sc]{mathpazo}     \usepackage{tgpagella}     \linespread{1.05}          \begin{document}          % here you can see the difference of the two small-cap types     An arbitrary \fontfamily{qpl}\selectfont \textsc{Acronym} and some text. \par     An arbitrary \fontfamily{pplx}\selectfont \textsc{Acronym} and some text. \par     \fontfamily{qpl}\selectfont \textsc{Acronym}     \fontfamily{pplx}\selectfont \textsc{Acronym}          % my work-around with 'qpl' for titles and 'pplx' for normal text     \fontfamily{qpl}\selectfont     \section{Arbitrary \textsc{Acronym}}     \fontfamily{pplx}\selectfont     An arbitrary \textsc{Acronym} and some text. \par          \end{document}


title: Embedded axis Pgfplots

text: So I need to display data as follows: every day for a month I have a set of values obtained in different hours. I want the axis to contain the date but between a date an another I want to have the hours from 00:00 to 24:00. I just could not figure it out. I would be pleased if anyone gives me a hint. So I'm using the following code and I would only like to display the date but not the hours in the axis x.                   \begin{tikzpicture}      \begin{axis}[             xlabel=$Time$,             ylabel=$Availability (\%)$,                     date coordinates in=x,                     xtick=data,                     xticklabel style={rotate=90,anchor=near xticklabel},                     xticklabel=\day. \hour:\minute,                     date ZERO=2014-04-1 00:00,% <- improves precision!                     ]                           \addplot[color=red,mark=x]             plot coordinates {                     (2014-04-1 00:00, 100)                     (2014-04-1 02:00, 77)                     (2014-04-1 02:15, 62)                     (2014-04-1 15:00, 62)                     (2014-04-1 15:15, 62)                     (2014-04-1 15:30, 62)                     (2014-04-1 19:00, 62)                     (2014-04-2 07:00, 47)                     (2014-04-2 07:15, 11)                     (2014-04-2 11:00, 11)                     (2014-04-2 11:15, 11)                     (2014-04-2 11:30, 11)             };     \end{axis}     \end{tikzpicture}


title: Figure caption and reference formatting

text: I'd like to format my captions of figures. The main source of the problem is in my native language, Hungarian I need to reverse the figure number and the word 'figure'. My current code:               \renewcommand{\figurename}{}     \renewcommand{\thefigure}{\textbf{\arabic{figure}. ábra}}      And it looks like this, under the figures (ábra means figure):   **1. ábra** : The caption.   This is exactly what I want there, but this code has side effects. First of it. When I refer to a figure with the code `\ref{fig:marker}`, it will look like this:   You can see it on the **figure 1**.   And I don't want it to be bold in the reference. Second. With this code, the list of figure look like this: ![enter image description here](http://i.stack.imgur.com/6R4lE.png)   So it is also bold, contains the word 'figure' and overlapped with the caption. I know this is due to my renewcommand codes... And the last one, which is the least important, and I think I need to write a macro to it.   When I refer to a figure I'd need to add a suffix to the word 'figure' in Hungarian, in order to get the meaning ON the figure. This thing is more complicated because the suffix has 3 forms according to the number. So I'd need to check if the number is 1 or 2 then the refered word would be this and if it is 3 or 6... then another.   My question about it: Is this possible to achieve at all? If not I will use another sentence when I refer, which is acceptable, but not so elegant. :) Thank you in advance, Greg


title: How to move the chapter- and section number in ConTeXt

text: I want to create a margin chapter- and section number in Context, like in the offical manual. How can I get this done? This is what I tried for the chapter number.               \define[2]\PlaceChapter{       \hbox{\vtop{#2}}\inoutermargin{#1}     }     \definefont[ChapterNumber][Serif at 90pt]       \setuphead  [chapter,title]       [         after={\nowhitespace\hairline\blank[2*line]},         command=\PlaceChapter,         numberstyle=ChapterNumber,         textstyle=sc,         header=empty,         footer=empty       ]      The underline is too wide because the box under the chapter number is quite large. Furthermore, the chapter number is not centered in the margin. How can I fix this?


title: Aligning tikz node at bottom of page (not paper; including margin)

text: I already know about `\par\vspace*{\fill}` to align a piece of text at the bottom of page (image below, left); but how do I do this with `tikz`? Only thing close I can find is aligning to `current page.base` with `anchor=south` - but that aligns to bottom of page, as shown on image below right ( _code below; click on image for full resolution_ ): ![test.png: left without, right with tikz](http://i.stack.imgur.com/UpAQv.png) Here is the code used for this image (both compiled with `pdflatex test.tex`): left side `test.tex`:               \documentclass[letterpaper,12pt]{article}          % \typeout{ == \the\paperwidth / \the\paperheight ==}     % \typeout{ == \the\pdfpagewidth / \the\pdfpageheight ==}     \pdfpagewidth=\paperwidth \pdfpageheight=\paperheight          % to extract numbers from lengths:  % tex.se:15001     % NOTE: \getlength gets numeric portion as pt always;     \makeatletter       \newcommand*{\getlength}[1]{\strip@pt#1}     \makeatother          \usepackage{lipsum}               \begin{document}            % display page margins based on \textwidth/height       \edef\mw{\getlength{\textwidth}}       \edef\mh{\getlength{\textheight}}       \edef\mp{\getlength{\parindent}}       \newlength{\tmv}       \setlength{\tmv}{\textwidth}       \addtolength{\tmv}{-\parindent}       \edef\mv{\getlength{\tmv}}       \begin{picture}(0,0)       \put(-\mp,0) {\line(1,0){\mw}}       \put(-\mp,0) {\line(0,-1){\mh}}       \put(\mv,0) {\line(0,-1){\mh}}       \put(-\mp,-\mh) {\line(1,0){\mw}}       \end{picture}            \lipsum[1]            \par\vspace*{\fill} % \vfill no dice here            \frame{\begin{minipage}{\textwidth}%         \centering%         Please consider              this information              very carefully.       \end{minipage}}          \end{document}      right side `test.tex`:               \documentclass[letterpaper,12pt]{article}          % \typeout{ == \the\paperwidth / \the\paperheight ==}     % \typeout{ == \the\pdfpagewidth / \the\pdfpageheight ==}     \pdfpagewidth=\paperwidth \pdfpageheight=\paperheight          % to extract numbers from lengths:  % tex.se:15001     % NOTE: \getlength gets numeric portion as pt always;     \makeatletter       \newcommand*{\getlength}[1]{\strip@pt#1}     \makeatother          \usepackage{lipsum}     \usepackage{tikz}          \begin{document}            % display page margins based on \textwidth/height       \edef\mw{\getlength{\textwidth}}       \edef\mh{\getlength{\textheight}}       \edef\mp{\getlength{\parindent}}       \newlength{\tmv}       \setlength{\tmv}{\textwidth}       \addtolength{\tmv}{-\parindent}       \edef\mv{\getlength{\tmv}}       \begin{picture}(0,0)       \put(-\mp,0) {\line(1,0){\mw}}       \put(-\mp,0) {\line(0,-1){\mh}}       \put(\mv,0) {\line(0,-1){\mh}}       \put(-\mp,-\mh) {\line(1,0){\mw}}       \end{picture}            \lipsum[1]            \begin{tikzpicture}[overlay,remember picture,inner sep=0pt, outer sep=0pt]              \path[anchor=south] (current page.base) node[above] (textInfo) {% (286.45807,94.70213)           \frame{\begin{minipage}{\textwidth}%             \centering%             Please consider                  this information                  very carefully.           \end{minipage}}         };       \end{tikzpicture}          \end{document}      To generate image:               convert -density 150 -bordercolor LimeGreen -border 2 test.pdf test1.png #left     convert -density 150 -bordercolor LimeGreen -border 2 test.pdf test2.png #right     montage test1.png test2.png -geometry +2+2 -tile 2x1 test.png      Many thanks in advance for any answers,   Cheers!


title: Hiring someone to help me with LaTeX for my PhD thesis

text: I do not know whether this is an appropriate question, but I was carrying it around for quite some weeks and now it just has to come out. I am working on my PhD thesis. My thesis will include a long English textual analysis in the mainmatter ((almost) no problem with that) and a long appendix providing the source texts on which the analysis is based. These source text will be given in the original language (Arabic) on the left page as a critical edition with two or three apparatus and my english translation on the right page. I have chosen ledmac/ledpar to do the job (because there is no alternative, is there?) and now I've been wrestling for weeks/months to get everything in order -- and by wrestling, I really mean it. Other than that, I already started to edit my texts using the commands that the packages provide and all the while I've been hoping that in the end all problems can be overcome one after another, so that in the end I have a nice typeset thesis and I can confidently claim that I've made the right choice in chosing (Lua-) LaTeX for writing my thesis. This my situation. Now, since I've encountering problems after problems (in between solving one or two while others appear), I've become skeptical whether LaTeX is the right choice for my project. Even more since I also have the feeling that _I myself_ won't be able to solve all the issues, because I am lacking the IT-expertise. I've done a lot of delving into the depths of LaTeX, but I am coming close to my limits there. I still belive in LaTeX, but what I intend to do seems to be some major job for LaTeX and I doubt that I am the one who can get LaTeX to do the job. So, the question I've been having in my mind is this (and I want to repeat that I am not sure whether it is an appropriate question):   1. Is there anybody out there who I could hire (yes: hire) to look through my tex-files and fix the problems I encounter while I can focus on writing my thesis (and of course fix what I can fix myself)?   2. How much would it be to hire someone like that? I am at the point where I have to decide whether to abandon LaTeX for my PhD and to take another application (e.g. CTE), or to stay with it. Once again: I like LaTeX, and I'd also like to stay with it, but I am not sure whether I should. And also, I don't want to realize that using LaTeX was the wrong decision only two months before I hand in my thesis because then it is too late. Sorry for this question, but it had to come out... * * * ### Appendix: Random examples of problems   * the line numbers in the apparatus are one to much (e.g., 7 instead of 6)   * the arabic text has sometimes varying interlinespacing   * the space between the paragraphs (created by ledpar) shouldn't be there (see here)   * the content is not correctly snychronized and the pagebreaks are thus wrong   * the Arabic apparatus has problems with linebreaks   * the page numbers in the table of contents need to be modified (see here)   * ...


title: Drawing phase plane with mfpic4ode

text: I'm trying to draw a phase portrait with `mfpic4ode` and getting problems with it. I'm not sure it is installing properly. I tried installing it with MikTex package manager as admin and non-admin. When I try to build the demo.tex that comes with `mfpic4ode` I get:               ! I can't find file `mfpic4ode.tex'.<to be read again>\relax \input mfpic4ode.tex\relax     ! Emergency stop.<to be read again>\relax \input mfpic4ode.tex\relax     ! ==> Fatal error occurred, no output PDF file produced!      The errors are coming from `\MiKTeX\2.9\tex\latex\mfpic4ode\mfpic4ode.sty` When I open that I see:               \NeedsTeXFormat{LaTeX2e}[1999/12/01]     \ProvidesPackage{mfpic4ode}         [2009/04/15 v0.3 mfpic4ode.dtx  file]     \input mfpic4ode.tex\relax     \endinput      I looked in the directory where the style document is, and I do not see `mfpic4ode.tex`.


title: Command representing an expansion of a summation

text: I am very new to using LaTeX to write equation. And I am now learning how to create my own command. I am going to write a command `\Listn` to help me to do this:               \Listn{\sumup}{(#1)}{+}     $\sumup{n}$\\     \Listn{\sumupaf}{a_{#1}f(x_{#1})}{\times}     $\sumupaf{k+1}$      will give me ![first](http://i.stack.imgur.com/uVflW.png) ![second](http://i.stack.imgur.com/MrbxI.png) Then I try to create `\Listn`               \providecommand{\Define}[2]{\providecommand{#1}{}\renewcommand{#1}[1]{#2}}     \providecommand{\List}[3]{{#1{1}}#2{#1{2}}#2\cdots#2{#1{#3}}}     \providecommand{\Listn}[4]{\Define\f{#2}\Define{#1}{\List{\f}{#3}{#4}}}      But the fourth argument must be filled manually, like this:               \Listn{\sumup}{(#1)}{+}{#1}     $\sumup{n}$\\     \Listn{\sumupaf}{a_{#1}f(x_{#1})}{\times}{#1}     $\sumupaf{k+1}$      If I want to eliminate the fourth argument, I would like to have               \providecommand{\argument}{#1}      which is impossible. Are there any method to overcome this?


title: BibTeX natbib with super does not allow using occasional \citet

text: I am using `natbib` with superscript numbered citations as follows:               \usepackage[super,comma,sort&compress]{natbib}       It works great when I have the case `This is a reference~\cite{author1999}`. My reference appears as a superscript. However, I occasionally want write something like: `As shown by \citet{author1999}` where I want the citation written out and not as a superscript. `natbib` in super mode inserts a superscript when using `\citet`. Is there a way to have `natbib` use `\citet` in regular mode despite being in super mode? Can one change the mode temporarily to not have super and then switch it back on again?


title: Autoref to appendix with appendix package

text: I would like `autoref` to reference chapters in my appendix as `appendix <chapternumber>`. However it fails to print anything besides the chapternumber. From the hyperref documentation page 16 where it states that `\appendixname` is set to `Appendix`, I would expect this functionality to work out of the box. I assume it has something to do with the fact, that I use the `appendices` enviornment instead of `\appendix`. How do I fix this?               \documentclass{report}     \usepackage{hyperref}     \usepackage{appendix}     \begin{document}     \chapter{a}\label{a}     \autoref{a}.          \autoref{app}     \begin{appendices}     \chapter{app}\label{app}     \end{appendices}     \end{document}      Notice how it states `Chapter 1` but only `A` instead of `Appendix A` ![Missing Appendix infront of A](http://i.stack.imgur.com/XgyuJ.png) I took a brief llok at http://tex.stackexchange.com/a/5785/19326, since it however seems to be available out of the box I would like to avoid using `cref`, since it states the links look worse.


title: Format a tutorial with screenshots in LaTeX

text: I want to format a step-by-step tutorial in LaTeX in a way that each step shows one screenshot and a small piece of text for that step. I could think of a formatting where in each step the screenshot is positioned on the left and the text is on the right. However, if I use `\includegraphics` the image is dynamically positioned in the document. How can I realize such formatting?


title: How to change the abstract to have no page break afterwards

text: I am writing a thesis in the report document class. I have a title page that is separate. On the next page I want the Abstract and the Acknowledgements:               \begin{abstract}      This is the abstract.     \end{abstract}          \renewcommand{\abstractname}{Acknowledgements}     \begin{abstract}      I would like to thank...     \end{abstract}      Doing that puts them on two separate pages though. How can I change the abstract environment/create a new environment that behaves in the way I want? Thanks!


title: Any nice packages for word alignment?

text: I want to visualize word alignments between sentence pairs, where the positions of aligned words may differ between the sentences, and a word in one sentence may be aligned to more than one word in the other, or even have no partner at all. A picture is worth a thousand words: ![enter image description here](http://i.stack.imgur.com/fgoFf.png) Are there any nice packages for that job? If there are no specialized packages, what would be a good alternative?


title: Why doesn't biobliography with achemso.bst contain article titles

text: First: I know this question has already been discussed, but the answers don't apply to my case. I want to submit an article to the ACS Journal of Physical Chemistry C using the achemso document class. Recently, this Journal has changed its guidelines for the reference formatting, and titles now HAVE to be encluded. The new configuration file jpccck.cfg (achemso version 3.8d as of 2013/10/04) seems to account for this change by setting               articletitle = true      but this has no effect on the formatting of the References section in my case. The following minimal example illustrates this problem:               \documentclass[     journal=jpccck,     manuscript=article     ]{achemso}          \title{foo}     \date{\today}          \author{Test Person}     \email{tp@uni.com}     \affiliation{00000 Bar Germany}          \begin{document}     \maketitle     \section{Introduction}     \cite{testentry}          \bibliography{literature}          \end{document}      The content of literature.bib looks like this:               @article{testentry,     title = {Test Title of Importance},     volume = {108},     number = {3},     journal = {Proc. Nation. Ac. Sci.},     author = {Testperson Two and Testperson Three},     year = {2013},     pages = {972--984},     }      Compiling with PDFLaTex, this gives me the following entry in the References section:                   (1) Two, T.; Three, T. Proc. Nation. Ac. Sci. 2013, 108, 972–984.      Maybe I should add that when updating the achemso package to version 3.8d, the achemso.bst file was updated as well, so the problem cannot come from an older version of it. EDIT: This is the file list in the output of \listfiles:                achemso.cls    2013/10/04 v3.8d Submission to ACS journals      article.cls    2007/10/19 v1.4h Standard LaTeX document class      size12.clo     2007/10/19 v1.4h Standard LaTeX file (size option)      xkeyval.sty    2008/08/13 v2.6a package option processing (HA)      xkeyval.tex    2008/08/13 v2.6a key=value parser (HA)      geometry.sty   2008/12/21 v4.2 Page Geometry      ifpdf.sty      2009/04/10 v2.0 Provides the ifpdf switch (HO)      ifvtex.sty     2008/11/04 v1.4 Switches for detecting VTeX and its modes (HO)      geometry.cfg      caption.sty    2013/05/02 v3.3-89 Customizing captions (AR)      caption3.sty   2013/05/02 v1.6-88 caption3 kernel (AR)      float.sty      2001/11/08 v1.3d Float enhancements (AL)      graphicx.sty   1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)      graphics.sty   2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)      trig.sty       1999/03/16 v1.09 sin cos tan (DPC)      graphics.cfg   2009/08/28 v1.8 graphics configuration of TeX Live      pdftex.def     2010/03/12 v0.04p Graphics/color for pdfTeX      setspace.sty   2000/12/01 6.7 Contributed and Supported LaTeX2e package      url.sty        2006/04/12  ver 3.3  Verb mode for urls, etc.      jpccck.cfg     2013/10/04 v3.8d achemso configuration: J. Phys. Chem. C      natbib.sty     2009/11/07 8.31a (PWD, AO)      natmove.sty    2010/01/15 v1.1a Automatic citation moving with natbib      mciteplus.sty  2008/09/30 v1.1 enhanced mcite


title: Switching math-mode numerals between serif and sans with the package mathspec

text: This may be a trite question, but I haven't found an answer and my tentative at it doesn't work. I am trying to set a document in which I use both serif and sans numerals in math mode. I am running the files on top of `XeLaTeX` and using the package `mathspec`. I have the following lines in my preamble (actually, in a class file):               \RequirePackage{mathspec}  % This line if in a class or style file     %\usepackage{mathspec}  This one if not in a class or a style file     \defaultfontfeatures{Numbers=OldStyle,Ligatures=TeX}     \setmainfont{NewBaskervilleStd-Roman}     \setsansfont{Legacy Sans ITC Std Book}     \setmathsfont(Digits,Latin)[Numbers={Lining,Proportional}]{NewBaskervilleStd-Roman}     \setmathrm[Numbers={Lining,Proportional}]{NewBaskervilleStd-Roman}     \setmathsf[Numbers=Lining,Scale=MatchLowercase]{Legacy Sans ITC Std Book}      Everything works except for the fact that digits in the command `\mathsf` are typeset in the serif typeface. I know this is related to having `Digits` in `\setmathsfont`, which selects the serif face, but I cannot remove it without getting the default typeface (cmr) for the numerals in "plain" math mode. If I don't use `\setmathsfont`, I get the default (cmr) for both letters and digits in math mode. I have found the same issue described by somebody else on the Internet, but it seems he didn't get any answer. What would be a right way to solve this?


title: Which document class is being used?

text: Is there a way to programmatically determine which document class is in effect? I'd like to be able to write conditional macros that behave differently depending on which document class is currently being used.


title: Current document class name

text: > **Possible Duplicate:**   >  Which documentclass is being used? Is it possible to get the name of the current document class name from a package being used by that document? An example of what I mean: In the document:               \documentclass{article}     \usepackage{foo}     \begin{document}     Foo claims \bar! What does he know?     \end{document}      In the package `foo` used above:               \newcommand{\bar}{the current document class is \DocumentClassName}      I'm actually interested in using this to modify the behavior of some of my own macros slightly, based on the document class. I've currently worked around this issue, by defining options based on class names. I thought I could keep these options to force certain behaviors, but it would be nice if the default could be chosen based on the document class name. It suffices for my purposes to differentiate between books, reports, articles, and "other" (anything else). Testing for the existence of a chapter counter almost works, except that it can't differentiate between books and reports.


title: How to check for document class in conditionals

text: > **Possible Duplicate:**   >  Which documentclass is being used? I know how to use conditionals in LaTeX, but I need to check what documentclass is being used. I need to not include a package when I'm using `g-brief` or `g-brief2`, so how can check for that? I tried:               \@ifclassloaded{g-brief}{%     }{%     \@ifclassloaded{g-brief2}{%     }{%         \usepackage[a4paper, left=2.5cm, right=2.5cm, top=2cm, bottom=3cm]{geometry}     }}      But I get the following error:               ! You can't use `\spacefactor' in vertical mode.     \@->\spacefactor                       \@m {}     l.29 \@            ifclassloaded{g-brief}{%      I'm using XeLaTeX.


title: If-then in a document style for specific document classes

text: > **Possible Duplicate:**   >  Which documentclass is being used? I want to make a style that would include some specific instructions if the document is using the `memoir` class, but I don't want those instructions to be included if the document is using another class. I've found some information about if-then statements in LaTeX, but not how to test the document class.


title: conditional commands in .sty file, conditional on \documentclass

text: > **Possible Duplicate:**   >  Which document class is being used? I'd like to include conditional formatting in a .sty file, conditional on the document class of the document that invokes it. For example, I'd like to redefine the `\section` command like this for all `article`, `letter`, and `book` document classes, but have no special formatting for documents making use of the `beamer` class.               \renewcommand*\section{\@startsection {section}{1}{\z@}%                                    {-3.5ex \@plus -1ex \@minus -.2ex}%                                    {2.3ex \@plus.2ex}%                                    {\normalfont\Large}}      I'd appreciate any help on how to do this.


title: Use \index before or after punctuation?

text: It seems to me that you get different kerning if you use `say\index{say}.` than if you use `say.\index{say}` The following silly example is where I can see it:               \documentclass[12pt]{memoir}     \usepackage{microtype}     \begin{document}     Some simple text about say.\index{say}     Additional text about say\index{say}.     say\index{say}. say.\index{say}     say\index{say}. say.\index{say}     say\index{say}. say.\index{say}     say\index{say}. say.\index{say}     say\index{say}. say.\index{say}     say\index{say}. say.\index{say}     say.\index{say} say.\index{say}     say\index{say}. say.\index{say}     say\index{say}. say.\index{say}     say\index{say}. say.\index{say}     say\index{say}. say.\index{say}     say\index{say}. say.\index{say}     say\index{say}. say.\index{say}     say\index{say}. say.\index{say}     say\index{say}. say.\index{say}     say\index{say}. say.\index{say}     say\index{say}. say.\index{say}     say\index{say}. say.\index{say}     say\index{say}. say.\index{say}     Can you see that there are lots of say\index{say}?     \end{document}      They look different to me: ![Sayings](http://i.stack.imgur.com/k21qU.png) and so I ask, is the proper method `say.\index{say}`? Should any command come after punctuation (i.e., `\label` etc)?


title: list all 3 to 5 author names in the first in-text citation using apacite

text: I use \usepackage{apacite} in the preamble (sublime 2 editor) and \bibliographystyle{apacite}. I did not have to manually install the apacite package. For in-text citations of 3 to 5 authors, I need to have all authors listed in the first occurrence and then the first author et al., in subsequent occurrences. But with the above commands, it is always first author et al. in all occurrences. How could I force it to do the necessary?


title: How to get a specific German bibliography in LaTeX

text: for my master thesis I need a specific format for citations and the layout of the bibliography. I was wondering if anyone can help me to do that with LaTex: This is how cites should look like. The cites have to be in a footnote. After 3 authors there should be "u.a." instead of "et. al". The year of the citation should be in braces after the author names. If there are similar keys for the same literatur the keys should be individually labeled with an additional a, b, c and so on:               Vgl. Booth, Colomb, Williams (1995), S. 15.     Vgl. Aladwani (2002a), S. 339-340.     Vgl. Aladwani (2002b), S. 190-191.      This is how the bibliopgraphy should look like:               Stelzer u. a. (1996)        Dirk Stelzer, Uwe Müller, Michael Kunz, Werner Mellis:        Softwareprozeßverbesserung durch organisatorisches Lernen. Studien zur        Systementwicklung des Lehrstuhls für Wirtschaftsinformatik der Universität        zu Köln. Band 10. Köln 1996      So first there should be the cites key as used in the cites above. Afterwards the complete citation should be listet indented above. This is the structure of the indented complete citation: Surname and lastname of the authors or edtiors (with an additional "(Hrsg.)"). Then a ":". Then the title. Edition. Place of publication (or "o.O" if not availbale) and year of publication (or "o.J". if not available). If I use this commands the text cites are looking fine so far but the bibliography is not right:               \usepackage[ngerman]{babel}     \usepackage{natbib}     (...)     \bibliographystyle{dinat}     \bibliography{literatur}      I appreciate any help and thanks in adavance!


title: How to rename command to avoid double defined command names

text: Hy, I would like to use the packages `vaucanson` and `algorithm`.               \documentclass[11pt,a4paper,twoside,openright]{book}          \usepackage{algorithm}     \usepackage[noend]{algpseudocode}     \usepackage{vaucanson-g}          \begin{document}     \begin{algorithm}     \caption{code}     \begin{algorithmic}[1]     \Function{a}{$G,r,t$}        \State $a \gets g$     \EndFunction     \end{algorithmic}     \end{algorithm}          \begin{figure}[t]       \begin{postscript}[scale=0.6]\special{header=gastex.pro}          \begin{VCPicture}{(0,-2)(6,2)}       \State[s_0]{(0,0)}{0}       \FinalState[s_2]{(3,1)}{1}       \EdgeL{0}{1}{t}     \end{VCPicture}     \end{postscript}     \end{figure}          \end{document}      The problem is that `\State` is already defined in `vaucanson` and I get               ERROR: LaTeX Error: Command \State already defined      Is it possible to simply rename one of the \State commands to avoid the conflict?


title: Improving the POV definition in the listings package

text: I'm attempting to create a language definition in the `listings` package that mimics exactly the syntax highlighting in POV-Ray 3.6 for Windows (http://www.povray.org/download/). Here is a screenshot from POV, which I'm trying to imitate: ![correct syntax highlighting](http://farm9.staticflickr.com/8209/8185370232_4a6e6eb71c_m.jpg) (The POV language definition in the `listings` package is not the same.) I include below my attempt so far, but it has some flaws. First, I cannot get it to make numbers green, despite my attempt. Second, I cannot get it to make angle brackets (or other operators) red, despite my attempts. By contrast, my attempt to get curly braces to show up blue works fine, despite its similarity to the angle brackets problem/solution. I am obviously doing something wrong, but reading the reference manual for the `listings` package didn't clear up my confusion. Here's an example of my wrong results: ![incorrect syntax highlighting](http://farm9.staticflickr.com/8197/8185333037_e0eb61a0e5.jpg) Any tips?               \documentclass[12pt]{article}          \usepackage{listings}     \usepackage{color}          \definecolor{povcodered}{rgb}{0.75,0.25,0.25}     \definecolor{povcodegreen}{rgb}{0.25,0.75,0.25}     \definecolor{povcodeblue}{rgb}{0.25,0.25,0.75}     \definecolor{povcodepurple}{rgb}{0.5,0,0.35}     \definecolor{povcodebluegreen}{rgb}{0,0.5,0.5}          \lstdefinelanguage{myPOV}{         alsoletter={\#\{\}\<\>},         keywords={             sphere, cone, and, so, on,             \#include, \#declare, \#version},         keywords={[2]\{,\}},         keywords={[3]\<,\>},         sensitive=true,         string=[b]{"},         comment=[l]{//},         morecomment=[s]{/*}{*/}}          \lstset{language=myPOV,         basicstyle=\ttfamily\bfseries,         keywordstyle=\color{povcodepurple},         keywordstyle=[2]\color{povcodeblue},         keywordstyle=[3]\color{povcodered},         stringstyle=\color{povcodered},         commentstyle=\color{povcodegreen},         numberstyle=\color{povcodebluegreen}}          \begin{document}          \begin{lstlisting}     #include "somefile.inc"     // now let's add a shape     sphere {       <0,0,0>, 1       translate <5,3,2>     }     \end{lstlisting}          \end{document}


title: Biblatex citation and bibliography misbehaving in Texmaker - help!

text: This is my first post on here and I'm a fairly novice user of LaTeX so forgive my lack of knowledge. I'm trying to use a Cambridge Uni thesis LaTeX template and adapting it to use Biblatex, but after 2 days of struggling and searching existing information, I seem to have reached a bit of an impasse. I've (finally) managed to get it to run without spitting errors out, but the style of the citations is completely messed up. Basically I'm just after a simple clean author-year style in the text, such as "(Authors, Year)", with the bibliography appearing as "Authors, Year. _Title_. Location:Publisher.". The bibliography is appearing as desired, but the in-text citation is bizarrely coming out with the full title of the reference, but no author and no year, even though the option style=authoryear is activated for biblatex in the preamble. The .tex file looks like this               %input macros (i.e. write your own macros file called MacroFile1.tex)     %\include{Macros/MacroFile1}          \documentclass[oneside,12pt]{Classes/salfordthesis}          \usepackage[style=authoryear,hyperref=true,backref=true,backend=biber]{biblatex}     \addbibresource{References/references.bib}     \DefineBibliographyStrings{english}{%       bibliography = {References},% replace "references" with "bibliography"  for `book`/`report`     }               \ifpdf         \pdfinfo { /Title  (CUED PhD and MPhil Thesis Classes)                    /Creator (TeX)                    /Producer (pdfTeX)                    /Author (Harish Bhanderi harish.bhanderi@cantab.net)                    /CreationDate (D:20030101000000)  %format D:YYYYMMDDhhmmss                    /ModDate (D:20030815213532)                    /Subject (Writing a PhD thesis in LaTeX)                    /Keywords (PhD, Thesis)}         \pdfcatalog { /PageMode (/UseOutlines)                       /OpenAction (fitbh)  }     \fi          % Set URL hyperlinks to black     \hypersetup{urlcolor = black}          \title{Writing a PhD Thesis\\[1ex]             in \LaTeXe}          \ifpdf       \author{\href{mailto:harish.bhanderi@cantab.net}{Harish Bhanderi}}       \collegeordept{\href{http://www.eng.cam.ac.uk}{Department of Engineering}}       \university{\href{http://www.cam.ac.uk}{University of Cambridge}}     % insert below the file name that contains the crest in-place of 'UnivShield'       \crest{\includegraphics[width=30mm]{UnivShield}}     \else       \author{Harish Bhanderi}       \collegeordept{Department of Engineering}       \school{school}       \university{University of Cambridge}     % insert below the file name that contains the crest in-place of 'UnivShield'       \crest{\includegraphics[bb = 0 0 292 336, width=30mm]{UnivShield}}     \fi          %\renewcommand{\submittedtext}{change the default text here if needed}     \degreetype{Type of degree}     \degree{Degree Title}     \degreedate{Date submitted\vspace{-3ex}}               % turn off those nasty overfull and underfull hboxes     \hbadness=10000     \hfuzz=50pt          % Put all the style files you want in the directory StyleFiles and usepackage like this:     \usepackage{StyleFiles/watermark}          % Comment out the next line to get single spacing     \onehalfspacing          % Reset URL hyperlinks to blue     \hypersetup{urlcolor = blue}          \begin{document}          %\language{english}          % A page with the abstract on including title and author etc may be     % required to be handed in separately. If this is not so, then comment     % the below 3 lines (between '\begin{abstractseparte}' and      % 'end{abstractseparate}'), normally like a declaration ... needs some more     % work, mind as environment abstracts creates a new page!     % \begin{abstractseparate}     %   \input{Abstract/abstract}     % \end{abstractseparate}               \makeatletter     \def\@makechapterhead#1{%       \vspace*{50\p@}%       {\parindent \z@ \raggedright \normalfont         \ifnum \c@secnumdepth >\m@ne           \if@mainmatter             %\huge\bfseries \@chapapp\space \thechapter             \Huge\bfseries \thechapter.\space%             %\par\nobreak             %\vskip 20\p@           \fi         \fi         \interlinepenalty\@M         \Huge \bfseries #1\par\nobreak         \vskip 40\p@       }}               % Using the watermark package which is in StyleFiles/     % and to remove DRAFT COPY ONLY appearing on the top of all pages comment out below line     \watermark{DRAFT COPY ONLY}               \maketitle          %set the number of sectioning levels that get numbered and appear in the contents     \setcounter{secnumdepth}{3}     \setcounter{tocdepth}{3}          \frontmatter % book mode only     \pagenumbering{roman}     \include{Dedication/dedication}     \include{Acknowledgement/acknowledgement}     \include{Abstract/abstract}          \tableofcontents     \listoffigures     \listoftables     \printnomenclature  %% Print the nomenclature     \addcontentsline{toc}{chapter}{Nomenclature}          \mainmatter % book mode only     \include{Introduction/introduction}     \include{Chapter1/chapter1}     \include{Chapter2/chapter2}     \include{Chapter3/chapter3}     \include{Conclusions/conclusions}          \printbibliography      %\bibliographystyle{plainnat}     %\bibliographystyle{Classes/CUEDbiblio}     %\bibliographystyle{Classes/jmb}     %\bibliographystyle{Classes/jmb} % bibliography style     %\renewcommand{\bibname}{References} % changes default name Bibliography to References     %\bibliography{References/references} % References file               \backmatter % book mode only     \appendix     \include{Appendix1/appendix1}     \include{Appendix2/appendix2}               \end{document}      The modified class file being called looks like this:               %     % CUEDthesis v1.1     % By Harish Bhanderi <harish.bhanderi@cantab.net     % Version 1.0 released 15/07/2002     % Version 1.1 released 14/07/2010     %-------------------------- identification ---------------------     %\NeedsTeXFormat{LaTeX2e}     \ProvidesClass{salfordthesis}[2010/07/14 v1.1 CUED thesis class]     %-------------------------- initial code -----------------------     \newif\ifCU@bookmode     \CU@bookmodetrue          \DeclareOption{report}{\CU@bookmodefalse}     \DeclareOption{book}{\CU@bookmodetrue}     \ProcessOptions\relax%          \ifCU@bookmode     \DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}}%     \ProcessOptions\relax%     \ifx\pdfoutput\undefined%        \LoadClass[dvips, a4paper]{book}%     \else%        \LoadClass[pdftex, a4paper]{book}%     \fi%     \else     \DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}%     \ProcessOptions\relax%     \ifx\pdfoutput\undefined%       \LoadClass[dvips, a4paper]{report}%     \else%        \LoadClass[pdftex, a4paper]{report}%     \fi%     %\renewcommand{\refname}{References}%     \fi          %\DeclareOption{book}{%     %}%     \usepackage{setspace}     \usepackage{tocbibind}     \usepackage{amsmath, amsthm, amssymb}     \usepackage{polynom}     \usepackage{bigstrut}     \usepackage{multirow}     %\usepackage{color}     \usepackage{float}     \usepackage{titlesec}     %\usepackage{hyperref}     \usepackage{setspace}     %\usepackage{fancyheadings}     \usepackage{booktabs}     %\usepackage{graphicx}     \usepackage{fancyhdr}     \usepackage{eucal}     \usepackage[english]{babel}     \usepackage[usenames, dvipsnames]{color}     \usepackage[perpage]{footmisc}     \usepackage{ifthen}     \usepackage{ifpdf}               %Bibliography     %uncomment next line to change bibliography name to references for Book document class     %\renewcommand{\bibname}{References}     % note that this doesn't do much if you later define another bibliography style           % Nomenclature     \usepackage{nomencl}     \makenomenclature     \renewcommand\nomgroup[1]{%       \ifthenelse{\equal{#1}{A}}{%        \item[\textbf{Roman Symbols}] }{%             A - Roman         \ifthenelse{\equal{#1}{G}}{%          \item[\textbf{Greek Symbols}]}{%             G - Greek           \ifthenelse{\equal{#1}{R}}{%             \item[\textbf{Superscripts}]}{%              R - Superscripts               \ifthenelse{\equal{#1}{S}}{%                \item[\textbf{Subscripts}]}{{%             S - Subscripts             \ifthenelse{\equal{#1}{X}}{%              \item[\textbf{Other Symbols}]}{{%    X - Other Symbols             \ifthenelse{\equal{#1}{Z}}{%              \item[\textbf{Acronyms}]}%              Z - Acronyms                             {{}}}}}}}}}}          \ifpdf     %-->     %--> Google.com search "hyperref options"     %-->      %--> http://www.ai.mit.edu/lab/sysadmin/latex/documentation/latex/hyperref/manual.pdf     %--> http://www.chemie.unibas.ch/~vogtp/LaTeX2PDFLaTeX.pdf      %--> http://www.uni-giessen.de/partosch/eurotex99/ oberdiek/print/sli4a4col.pdf     %--> http://me.in-berlin.de/~miwie/tex-refs/html/latex-packages.html     %-->         \usepackage[ pdftex, plainpages = false, pdfpagelabels,                       pdfpagelayout = OneColumn, % display single page, advancing flips the page - Sasa Tomic                      bookmarks,                      bookmarksopen = true,                      bookmarksnumbered = true,                      breaklinks = true,                      linktocpage,                      colorlinks = true,                      linkcolor = blue,                      urlcolor  = blue,                      citecolor = red,                      anchorcolor = green,                      hyperindex = true,                      hyperfigures                      ]{hyperref}          \usepackage[pdftex]{graphicx}         \DeclareGraphicsExtensions{.png, .jpg, .pdf}              \pdfcompresslevel=9         \graphicspath{{ThesisFigs/PNG/}{ThesisFigs/PDF/}{ThesisFigs/}}     \else         \usepackage[ dvips,                       bookmarks,                      bookmarksopen = true,                      bookmarksnumbered = true,                      breaklinks = true,                      linktocpage,                      colorlinks = true,                      linkcolor = blue,                      urlcolor  = blue,                      citecolor = red,                      anchorcolor = green,                      hyperindex = true,                      hyperfigures                      ]{hyperref}              %\usepackage{epsfig}         \usepackage{graphicx}         \DeclareGraphicsExtensions{.eps, .ps}         \graphicspath{{ThesisFigs/EPS/}{ThesisFigs/}}     \fi          %define the page size including an offset for binding     %\setlength{\topmargin}{0.0in}     %\setlength{\oddsidemargin}{0in}     %\setlength{\evensidemargin}{0in}     %\setlength{\textheight}{700pt}     %\setlength{\textwidth}{500pt}               %A4 settings     \ifpdf        \pdfpageheight=297mm        \pdfpagewidth=210mm     \else        \setlength{\paperheight}{297mm}        \setlength{\paperwidth}{210mm}     \fi          \setlength{\hoffset}{0.00cm}     \setlength{\voffset}{0.00cm}          \setlength{\evensidemargin}{1.96cm}     %\setlength{\oddsidemargin}{-0.54cm}     \setlength{\topmargin}{1mm}     \setlength{\headheight}{1.36cm}     \setlength{\headsep}{1.00cm}     \setlength{\textheight}{20.84cm}     \setlength{\textwidth}{14.5cm}     \setlength{\marginparsep}{1mm}     \setlength{\marginparwidth}{3cm}     \setlength{\footskip}{2.36cm}          \pagestyle{fancy}     \renewcommand{\chaptermark}[1]{\markboth{\MakeUppercase{\thechapter. #1 }}{}}     \renewcommand{\sectionmark}[1]{}     \fancyhf{}     \fancyhead[RO]{\bfseries\rightmark}     \fancyhead[LE]{\bfseries\leftmark}     \fancyfoot[C]{\thepage}     \renewcommand{\headrulewidth}{0.5pt}     \renewcommand{\footrulewidth}{0pt}     \addtolength{\headheight}{0.5pt}     \fancypagestyle{plain}{       \fancyhead{}       \renewcommand{\headrulewidth}{0pt}     }          \newcommand{\submittedtext}{{A thesis submitted for the degree of}}     %     %     % DECLARATIONS     %     % These macros are used to declare arguments needed for the     % construction of the title page and other preamble.          % The year and term the degree will be officially conferred     \def\degreedate#1{\gdef\@degreedate{#1}}     % The type of degree     \def\degreetype#1{\gdef\@degreetype{#1}}     % The full (unabbreviated) name of the degree     \def\degree#1{\gdef\@degree{#1}}     % The name of your college or department(eg. Trinity, Pembroke, Maths, Physics)     \def\collegeordept#1{\gdef\@collegeordept{#1}}     % The name of your school     \def\school#1{\gdef\@school{#1}}     % The name of your University     \def\university#1{\gdef\@university{#1}}     % Defining the crest     \def\crest#1{\gdef\@crest{#1}}          % These macros define an environment for front matter that is always      % single column even in a double-column document.          \newenvironment{alwayssingle}{%            \@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn            \else\newpage\fi}            {\if@restonecol\twocolumn\else\newpage\fi}          %define title page layout     \renewcommand{\maketitle}{%     \pagenumbering{roman} % Sasa Tomic     \setcounter{page}{0}  % Sasa Tomic     \begin{alwayssingle}         \renewcommand{\footnotesize}{\small}         \renewcommand{\footnoterule}{\relax}         \thispagestyle{empty}     %  \null\vfill       \begin{center}         { \Huge {\bfseries {\@title}} \par}     {\large \vspace*{35mm} {{\@crest} \par} \vspace*{25mm}}         {{\Large \@author} \par}     {\large \vspace*{1ex}         {{\@collegeordept} \par}     \vspace*{1ex}         {{\@school} \par}     \vspace*{1ex}         {{\@university} \par}     \vspace*{25mm}         {{\submittedtext} \par}     \vspace*{1ex}         {\it {\@degreetype} \par}         {\it {\@degree} \par}     \vspace*{2ex}         {\@degreedate}}       \end{center}       \null\vfill     \end{alwayssingle}}          % DEDICATION     %     % The dedication environment makes sure the dedication gets its     % own page and is set out in verse format.          \newenvironment{dedication}     {\begin{alwayssingle}       \pagestyle{empty}       \begin{center}       \vspace*{1.5cm}       {\LARGE }       \end{center}       \vspace{0.5cm}       \begin{quote} \begin{center}}     {\end{center} \end{quote} \end{alwayssingle}}               % ACKNOWLEDGEMENTS     %     % The acknowledgements environment puts a large, bold, centered      % "Acknowledgements" label at the top of the page. The acknowledgements     % themselves appear in a quote environment, i.e. tabbed in at both sides, and     % on its own page.          \newenvironment{acknowledgements}     {\pagestyle{empty}     \begin{alwayssingle}     \begin{center}     \vspace*{1.5cm}     {\Large \bfseries Acknowledgements}     \end{center}     \vspace{0.5cm}     \begin{quote}}     {\end{quote}\end{alwayssingle}}          % The acknowledgementslong environment puts a large, bold, centered      % "Acknowledgements" label at the top of the page. The acknowledgement itself      % does not appears in a quote environment so you can get more in.          \newenvironment{acknowledgementslong}     {\pagestyle{empty}     \begin{alwayssingle}     \begin{center}     \vspace*{1.5cm}     {\Large \bfseries Acknowledgements}     \end{center}     \vspace{0.5cm}\begin{quote}}     {\end{quote}\end{alwayssingle}}          %ABSTRACT     %     %The abstract environment puts a large, bold, centered "Abstract" label at     %the top of the page. The abstract itself appears in a quote environment,     %i.e. tabbed in at both sides, and on its own page.          \newenvironment{abstracts} {\begin{alwayssingle} \pagestyle{empty}       \begin{center}       \vspace*{1.5cm}       {\Large \bfseries  Abstract}       \end{center}       \vspace{0.5cm}        \begin{quote}}     {\end{quote}\end{alwayssingle}}          %The abstractlong environment puts a large, bold, centered "Abstract" label at     %the top of the page. The abstract itself does not appears in a quote     %environment so you can get more in.          \newenvironment{abstractslong} {\begin{alwayssingle} \pagestyle{empty}       \begin{center}       \vspace*{1.5cm}       {\Large \bfseries  Abstract}       \end{center}       \vspace{0.5cm} \begin{quote}}     {\end{quote}\end{alwayssingle}}          %The abstractseparate environment is for running of a page with the abstract     %on including title and author etc as required to be handed in separately          \newenvironment{abstractseparate} {\begin{alwayssingle} \pagestyle{empty}       \vspace*{-1in}      \begin{center}         { \Large {\bfseries {\@title}} \par}         {{\large \vspace*{1ex} \@author} \par}     {\large \vspace*{1ex}         {{\@collegeordept} \par}         {{\@school} \par}         {{\@university} \par}     \vspace*{1ex}         {{\it \submittedtext} \par}         {\it {\@degreetype} \par}         {\it {\@degree} \par}     \vspace*{2ex}         {\@degreedate}}       \end{center}}     {\end{alwayssingle}}          %ROMANPAGES     %     % The romanpages environment set the page numbering to lowercase roman one     % for the contents and figures lists. It also resets     % page-numbering for the remainder of the dissertation (arabic, starting at 1).          \newenvironment{romanpages}     {\setcounter{page}{1}       \renewcommand{\thepage}{\roman{page}}}     {\newpage\renewcommand{\thepage}{\arabic{page}}}     %{\newpage\renewcommand{\thepage}{\arabic{page}}\setcounter{page}{1}}      I've also tried to use the biblatex-apa style, but Texmaker refuses to compile declaring "! Undefined control sequence. \DeclareLabeldate" and "! Undefined control sequence. \field" and "! Undefined control sequence. \literal". I have attempted to fix this using file modifications found via http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=709790 but to no avail. The references.bib file just contains a couple of sample references, inserted using Texmaker's biblatex bibliography entry insertion tool. The text citations in the chapters are just using \cite{reference}, since it seems I can no longer use \citep or \citet with biblatex. Questions: 1. Could someone point out where the problem with the biblatex in- text citations is? 2. Do I need to write some sort of special .bst file for this? I'm just about reaching my wit's end with biblatex, it seems so impossibly convoluted that things that should be simple take days of research! Any assistance would be greatly appreciated Update: I've come across this discussion on TeX.se: Unexpected citation behavior: biblatex with biber and authoryear This may be the same problem, but I don't know how to implement a solution in Texmaker - can anyone suggest something? Update: After updating via the MikTex package manager, Texmaker is refusing to compile the file at all. During the update I noticed that the package manager had identified biblatex as a package that was obselete and would be removed, which I allowed since I assumed it would know what it was doing. Since the update the file won't compile at all, and I get multiple errors, as shown in the picture: ![Texmaker errors](http://i.stack.imgur.com/ANigk.jpg) If I go the MikTeX package manager now however, biblatex is still listed as installed. I'm at a complete loss.


title: How to change dot spacing in \dotfill?

text: I'm using the \dotfill command in a nomenclature to add units at the end of each line. Here is the code I'm using:               \usepackage[refpage]{nomencl}     \newcommand{\nomunit}[1]{%        \renewcommand{\nomentryend}{\unskip\dofill[#1]}}     \renewcommand*{\pagedeclaration}[1]{\unskip, \hyperpage{#1}}      That works correctly, but in my table of contents where there is also automatic dot filling, spacing in not the same. So how could I modify the \dotfill spacing ? (to match the one of the table of contents actually)


title: uppercase and \spacefactor

text: Apparently, `\uppercase` forgets about the `\spacefactor` at the end. For example,               {What is the spacefactor?} \the\spacefactor.      returns What is the spacefactor? 3000. while               \uppercase{What is the spacefactor?} \the\spacefactor.      produces WHAT IS THE SPACEFACTOR? 1000. _The TeXBook_ did not give me any clue about this behaviour, (but I did not try reading _TeX - The program_ ). Can anybody explain this ?


title: How to align a set of my equations?

text: I just wan't to align the equation like this example (Of course, I can't align these equations on the web page):               ∵△ABC ≌ △A′B′C′     ∴∠ABC = ∠A′B′C′       ∠ACB = ∠A′C′B′       ∠BAC = ∠B′A′C′      If I use `&`, these will be to much spaces...


title: cross references different from tableofcontents

text: I have a document divided into `\part` `\chapter` `\section` and `\subsection`. I have 3 parts and in each part I reset all the counters. I want that, when I do a crossref to something that is in the 1st part, chapter 3 and section 5, that LaTeX prints something like I-3.5, but I don't want that in the tableofcontents part that LaTeX prints the part number. For example, what I want is: > Part I > > chapter 1 section 1.1 section 1.2 > > chapter 2 AND NOT > chapter I-1 section I-1.1 section I-1.2 > > chapter I-2 The command that I've tried               \renewcommand{\thechapter}{\thepart-\arabic{chapter}}     \renewcommand{\thesection}{\thechapter.\arabic{section}}      does exactly what I've said Can anyone help me?


title: Define page layout in geometry similar to Koma Script with DIV 12

text: I want to define a page layout in geometry that has similar values as that defined by KOMA script. Unfortunately the values that I provide for geometry do not end up in the design as expected. This is the code that I use               \documentclass{scrbook}          \usepackage{layouts}          %\KOMAoptions{%     %  DIV=12,% (Size of Text Body, higher values = greater textbody)     %  % DIV=calc % (also areaset/classic/current/default/last)      %  % -> after setting of spacing necessary!        %  BCOR=10mm% (binding correction)     %}%     %     %\KOMAoptions{% (most options are for package typearea)     %  twoside=true, % two side layout (alternating margins, standard in books)     %  twocolumn=false, % (true)     %  %     %  headinclude=false,%     %  footinclude=false,%     %  mpinclude=false,%         %  headsepline=true,%     %  footsepline=false,%     %}%          \usepackage{geometry}          \geometry{%     %%% Paper Groesse        a4paper,        portrait,     %%% Koerper Groesse        textwidth=430pt,    % modifies \textwidth, the width of body        textheight=610pt,   % modifies \textheight, the height of body        %ignoreall,    % sets both ignoreheadfoot and ignoremp to true        heightrounded, % This option rounds \textheight to n-times (n: an integer) of \baselineskip     %%% Margin        inner=4pt,        outer=22pt,        twoside,      % switches on twoside mode with left and right margins swapped on verso pages.        bindingoffset=10mm,  % removes a specified space for binding     %%% Dimensionen        headheight=17pt,  % Alias:  head        twoside,     }               \begin{document}     \pagenumbering{alph}     \pagestyle{empty}      \currentpage      \pagediagram      \pagevalues     \end{document}      For the KOMA script values (geometry commented out) this gives me ![enter image description here](http://i.stack.imgur.com/382MI.png) but for geometry, where I try to define exactly these values especially the margins (even, odd) end up completely different, but also the whole text area is positioned different. I do not expect to have a layout that achieves exactly the same page content, but it should be close. ![enter image description here](http://i.stack.imgur.com/CCmBT.png) How do I need to modify the values for geometry to get a similar layout? And why is it ending up so wrong with the current values?


title: pfgplots: axis with empty range

text: With the following MWE (I want to plot a bar chart with symbolic coordinates using `pgfplots`) I get an error that I have no idea how to fix:               Package pgfplots Warning: You have an axis with empty range (in direction x)      MWE:               \documentclass[tikz]{standalone}     \usepackage{pgfplots}     \pgfplotsset{compat=newest}          \begin{document}     \begin{tikzpicture}      \begin{axis}[         % axis on top,         axis lines*=left,         ymajorgrids,         ybar,         ymin=0, ymax=2000,         xtick=data,         ytick = {0,200,400,600,800,1000,1200,1400,1600,1800},         bar width=0.1cm,         enlarge x limits=0.15,         enlarge y limits={upper, value=0.1},         x tick label style={font=\footnotesize,align=right,rotate=90},         symbolic x coords={jan12,feb12,mar12,apr12,may12,jun12,jul12,aug12,sep12,oct12,nov12,dec12       jan-13,feb-13,mar-13,apr-13,may-13,jun-13,jul-13,aug-13,sep-13,oct-13,nov-13,dec-13},         ]     \end{axis}      \end{tikzpicture}     \end{document}


title: Emacs/AucTeX: can LaTeX-math-list read a macro that requires input?

text: I wanted to make a macro that inserts \left \right delimiters, but I wanted to write it only once and have different bindings pass different delimiters. To wit, I wanted to add the following code:               (setq LaTeX-math-list (quote ( ("C-(" (LaTeX-my-leftright "(" ")") "" nil)         ("C-{" (LaTeX-my-leftright "\{" "\}") "" nil)         )))      Where the program does the following:               (defun LaTeX-my-leftright (charopen charclose)     "Inserts the pattern '\leftC  \rightD' where C is the open input char and D the closed, and places the cursor in the center."         (interactive)         (setq out1 (concat "\\left" charopen " "))         (setq out2 (concat " \\right" charclose))         (insert out1)         (push-mark)         (insert out2)         (exchange-point-and-mark)     )      However, when I run this by pressing ` and then C-( I get a > Wrong type argument: commandp (LaTeX-my-leftright "(" ")") error message. Does anyone know what the correct syntax is here, or if this is even possible with LaTeX-math-list? I've looked a little bit at the latex.el file and I'm beginning to think the answer is no, but maybe I missed something.