title: How to hide some references in biblatex?

text: I've almost figured out how to cite a multi-volume book (as per my other question). I've separated it into 3 entities - and then used Set to put it into bibliography.               @Book{Boncompagni_2_vol,       author="Boncompagni, Baldassarre",       title="Scritti di Leonardo Pisano matematico del secolo decimoterzo.",       address="Roma",        publisher="Tipografia delle scienze matematiche e fisiche",       date={1857/1862},       volumes = {2},       note="(in Lat.)"     }     @Book{Boncompagni_vol_1,       volume = {I},       title="Leonardi Pisani, Liber Abbaci = Il Liber Abbaci di Leonardo Pisano.",       date={1857},       pagetotal={459},     }     @Book{Boncompagni_vol_2,       volume={II},       title= "Leonardi Pisani Practica geometriae ed opuscoli = La Practica Geometriae di Leonardo Pisano; Opuscoli di Leonardo Pisano.",       date={1862},       pagetotal={283},     }          @Set{Boncompagni_collection,       entryset={Boncompagni_2_vol, Boncompagni_vol_1, Boncompagni_vol_2},     }      However, the problem is that now I have 4 references showing up - 3 originals and 1 set. I've used the `\nocite{*}` to always show all references. Is there a way to hide only 3 of those references while printing everything else? EDIT: Well it seems that by using @Set I automatically get all the individual entries hidden. So this question itself is wrong. But it still applies if the @Set is not present.


title: MacTeX 2011, Xetex and Tex Live Utility

text: I tried several times to play with XeLaTeX (being used to "classical" LaTeX) but since I installed MacTeX 2011 and updated it with TeX Live Utility, I got that kind message :               (/usr/local/texlive/2011/texmf-dist/tex/latex/l3packages/xparse/xparse.sty     /usr/local/texlive/2011/texmf-dist/tex/latex/l3packages/xparse/xparse.sty:57: U     ndefined control sequence.     <argument> \ExplFileName           l.57 ...e}{\ExplFileVersion}{\ExplFileDescription}      If I continuously press "Return", I got a lot of error messages linked to Unicode font scripts, for instance :               /usr/local/texlive/2011/texmf-dist/tex/latex/fontspec/fontspec.sty:1909: Undefi     ned control sequence.     l.1909 \newfontlanguage{Efik}{EFI}\newfontlanguage                                                   {Greek}{ELL}      I seems there is a problem between version of xparse, fontspec etc. But it occurs even after re-installing Tex Live and updating only one package not linked to xelatex or fonts. The log file is quite long with all these errors (about 4200 lines). Could it be caused by the scripts run by tlmgr after updating a package? Edit:Sorry for mistake about "answer". Here is a link to the log file : http://dl.dropbox.com/u/6420461/xelatex3.log


title: Setting colour of beamer itemize bullet depending on alert mode

text: I know how to globally set the colour of beamer's itemize bullets. I've defined my own symbols for them and I'd like to colour them in `\alert` mode. (At the moment only the colour of the text changes, but not the colour of the bullets.) At the moment I'm using the following definition for the "bullets":               \setbeamertemplate{itemize        item}{\CorkSquare[size=0.18,linewidth=0.70pt]}     \setbeamertemplate{itemize     subitem}{\CorkSquare[size=0.16,linewidth=0.67pt]}     \setbeamertemplate{itemize  subsubitem}{\CorkSquare[size=0.14,linewidth=0.65pt]}     \def\CorkSquare[size=#1,linewidth=#2]{%         \begin{tikzpicture}         \draw[use as bounding box]              (+0.75*#1,-0.15*#1)              (+0.80*#1,+0.75*#1)              (+0.75*#1,-0.15*#1);         \filldraw[line width=#2,draw=cork@colour@normal,fill=cork@colour@normal!19!white]                  (0,0) rectangle (#1,#1);         \end{tikzpicture}%     }      Any help would be greatly appreciated.


title: No errors after copying

text: While i am editing a .tex file , when i compiles it is showing error . At that time when copy the same code in to a different named .tex file , then new .tex file is showing no errors on compilation . What may be the reason ? And after undoing the code that caused error also compilation showing errors until i copies the code to some other new .tex file. Error is as follows : Runaway argument? {\headcommand {\slideentry {9}{1}{18}{28/28 ! File ended while scanning use of \@writefile. \par l.9 \begin{document}


title: How to create a block matrix with centered elements

text: everybody. I was trying to compile a block matrix whose first line has a part that should be centered in that part of the line. My closest attempt is the code:               \begin{align}     \mathbf{\hat{F}}_{11}^{(1)-1}     =      \left[     \begin{array}{c|cc}     0 & \mathbf{1}_{10}& \\     \hline     \mathbf{1}_{10}       &      \mathbf{M}_{11}^{(1)} &      \mathbf{M}_{11}^{(1)\ast}\mathbf{\bar{I}}_{5} \\     &     \mathbf{\bar{I}}_{5}\mathbf{M}_{11}^{(1)H} &     \mathbf{\bar{I}}_{5}\mathbf{M}_{11}^{(1)}\mathbf{\bar{I}}_{5}\\     \end{array}     \right]     \end{align}      which produce the result: ![enter image description here](http://i.stack.imgur.com/3zw6O.jpg) Ideally, the element $1_{10}$ should be centered in both, line 1 and column 1. Any trick? Thank you!! :)


title: Create an overview of scattered items / requirement list

text: I'm writing a document where I have to define **multiple requirements**. These requirements are scattered all over the document, since they belong in different sections and are explained seperately. It would be good to have a **central overview of all these requirements in one place** , e.g. a table. Unfortunately I can't figure out, how to do this, so I don't have to write the text of the requirement manually into the table (in case I am changing the words in one of them later, it should also automatically change in the overview, similar to a glossary or a ToC). I already made an own counter, so I don't have to number everything manually, since it's possible that I'm adding a requirement later on. However, I also tried to solve this problem before with an additional glossary, but these packages are quite... difficult to handle for me, so I failed with this approach. A perfect solution would be, if I just have to write \newreq{Requirement description} and it would generate an automatically numbered output like R01 Requirement description - and in addition I can use a command like \printreqoverview which is printing the table. Details like formatting or appearance I can modify later, but I am currently stuck with this referencing - and it would really help, since I have to write every description two times and check for spelling mistakes every time - a reference would help. I'm sorry, I can't describe the problem very well I guess... I added a minimum working example, which does not contain any referencing, just automatic numbering:               \documentclass[10pt]{article}     \usepackage[utf8]{inputenc}     \usepackage{lipsum}     \usepackage{fmtcount}          \newcounter{rcount}     \setcounter{rcount}{0}     \newcommand{\newreq}{         \stepcounter{rcount}         \textbf{R\padzeroes[2]{\decimal{rcount}}}     }          \begin{document}          \section{First Chapter}          \lipsum[4]          \begin{enumerate}         \item[\newreq] This is the first requirement.         \item[\newreq] This is the second requirement.     \end{enumerate}          \lipsum[4]          \begin{enumerate}         \item[\newreq] This is the third requirement.     \end{enumerate}          \lipsum[4]          \section{Overview Table}          \begin{tabular}{|l|l|}         \hline         \# & Requirement \\ \hline         \hline         R01 & Text of R01 \\ \hline         R02 & Text of R02 \\ \hline         R03 & Text of R03 \\ \hline     \end{tabular}          \end{document}


title: Alternate section title for use in header

text: I'm TeXing a course for a teacher of mine, and he wants me to have the section titles in the headers (I use `fancyhdr` to achieve this). He also wants me to retain the section titles he gave me in the original (word) file. Since some of these section titles are too long to fit in the header title, is there a way to define a shorter version that is to be used in the header? Enabling multiple header lines would also do. I'm using the `book` class.


title: Use tikz (for example) to draw pictures in hyperbolic geometry

text: I would like to draw pictures in the Poincaré disk model for hyperbolic geometry. Are there any built-in or add-on packages for tikz to do this? For example, it would be nice to have functions for drawing Saccheri quadrilaterals or Lambert quadrilaterals or asymptotic triangles. (In my brief use so far, the tkz-euclide package looks very good for Euclidean geometry, and now I'm looking for a hyperbolic analogue of it.)


title: How to prevent space before a column environment in beamer?

text: I'm having the following block layout on one frame               \subsection{Typen}     \begin{frame}      Zwei Arten von Typen      \begin{block}{Wertetypen mit \texttt{rt::ValueType}}        {        \setbeamertemplate{blocks}[rounded] % disable shadow        \textit{Simple} oder \textit{Array}        \begin{columns}         \column[t]{.45\textwidth}         \begin{block}{Bei \textit{Simple}}          Der genaue Typ         \end{block}         \column[t]{.45\textwidth}         \begin{block}{Bei \textit{Array}}          Anzahl an Elementen         \end{block}        \end{columns}        \setbeamertemplate{blocks}[default] % enable again        }      \end{block}     \end{frame}      But it creates an ugly vertical space before the column environment. If I comment out the 4 column-environment specific commands, the vertical space is gone, which makes me think it's the column-environment's fault. Is there a way to remove that vertical initial space?


title: toc/hyperref heading issue

text: The bibliography in my document is "incorporating" the appendices in the TOC and the bookmark structure using hyperref. The page number in TOC for Bibliography is also bigger than all other page numbers and it's really annoying. This is a new independent post of part of lyx hyper-ref toc appendix and bibliography and A.0.1 figure labels in Appendix. I thought it was worth separating since it is a different issue than the other things posted with. here is an MWE with custom class file I'm using for my thesis. both a lyx and .tex file here


title: Print section number with moderncv

text: Using `moderncv`, I want to print the section number before the section name. Does anyone know how to do it?


title: Can I use webp images in Latex?

text: I have an .webp image that I want to use in my Latex document. However, I can't really find how to use it or is it simply not possible with Latex?


title: How can I escape % in a lstlisting?

text: I have a little lstlisting to show a snippet of code but since the code has % in it for modulo calculation the listing breaks down. How can I escape it? I have tried the backslash, verbatim and `\text` commands               \begin{lstlisting}     int RSAEncrypt(char m)     {         return (int)pow(charToNumber(m), e) % n;     }     \end{lstlisting}


title: remove box borders

text: I have the following code, in which I fit three logos into a box:                 \setlength\fboxsep{0pt}       \setlength\fboxrule{0.5pt}         \fbox{             \begin{minipage}{14em}                 \includegraphics[height=4em]{images/logo1.png} \\                 \includegraphics[height=4em]{images/logo2.png}                  \includegraphics[height=4em]{images/logo3.jpg}             \end{minipage}         }       }      Now, I don't want the borders/margins of this box to appear. Is there an option somewhere to do this? Thanks.


title: How to define a breakable, resumeable three column list environment

text: How can I obtain the following? It should have some features:   1. List environment is able to break over pages;   2. Each line in list environment has 3 columns. 1st column (counters) is left aligned. 2nd column is right aligned. 3rd column is left aligned.   3. List environment is able to be resumed. in the following file, after 3b. we have some text and after that, we have 4a.   4. We can put a label for every list item (for example `\label{1a}` or `\label{2}`), and anywhere in the body of text, we can refer to this item. For example we put `in \ref{1a}` in the TeX file and we'll have `in 1a`. in the output file. ![enter image description here](http://i.stack.imgur.com/HP9ob.jpg)


title: TOC and companion headings in memoir class

text: I'm writing my thesis in the `memoir` class, with the companion headings (`\pagestyle{companion}`). Following on from the TOC, I have the acknowledgements, abbrevations and abstract, before the introduction, which is marked               \chapter*[Introduction}{Introduction}       Unfortunately, I'm getting the "Contents" heading above all the pages until the Introduction. Is there any way to have no heading there at all?


title: Inline comments in LaTeX

text: Is it possible to make inline comments in LaTeX that do not extend until the end of the line? The actual problem I'm trying to solve is vim's annoying highlighting of the non-curly end-bracket here:               \renewcommand{\thesubsection}{         \arabic{section}.         \alph{subsection})     }      **Update** ![Screenshot](http://i.stack.imgur.com/56e70.png)


title: Beamer equation problem setting

text: \documentclass{beamer}          \mode<presentation> {          % The Beamer class comes with a number of default slide themes     % which change the colors and layouts of slides. Below this is a list     % of all the themes, uncomment each in turn to see what they look like.          %\usetheme{default}     %\usetheme{AnnArbor}     %\usetheme{Antibes}     %\usetheme{Bergen}     %\usetheme{Berkeley}     %\usetheme{Berlin}     %\usetheme{Boadilla}     %\usetheme{CambridgeUS}     %\usetheme{Copenhagen}     %\usetheme{Darmstadt}     %\usetheme{Dresden}     %\usetheme{Frankfurt}     %\usetheme{Goettingen}     %\usetheme{Hannover}     %\usetheme{Ilmenau}     %\usetheme{JuanLesPins}     %\usetheme{Luebeck}     \usetheme{Madrid}     %\usetheme{Malmoe}     %\usetheme{Marburg}     %\usetheme{Montpellier}     %\usetheme{PaloAlto}     %\usetheme{Pittsburgh}     %\usetheme{Rochester}     %\usetheme{Singapore}     %\usetheme{Szeged}     %\usetheme{Warsaw}          % As well as themes, the Beamer class has a number of color themes     % for any slide theme. Uncomment each of these in turn to see how it     % changes the colors of your current slide theme.          %\usecolortheme{albatross}     %\usecolortheme{beaver}     %\usecolortheme{beetle}     %\usecolortheme{crane}     %\usecolortheme{dolphin}     %\usecolortheme{dove}     %\usecolortheme{fly}     %\usecolortheme{lily}     %\usecolortheme{orchid}     %\usecolortheme{rose}     %\usecolortheme{seagull}     %\usecolortheme{seahorse}     %\usecolortheme{whale}     %\usecolortheme{wolverine}          %\setbeamertemplate{footline} % To remove the footer line in all slides uncomment this line     %\setbeamertemplate{footline}[page number] % To replace the footer line in all slides with a simple slide count uncomment this line          %\setbeamertemplate{navigation symbols}{} % To remove the navigation symbols from the bottom of all slides uncomment this line     }          \usepackage{graphicx} % Allows including images     \usepackage{booktabs} % Allows the use of \toprule, \midrule and \bottomrule in tables          %----------------------------------------------------------------------------------------     %   TITLE PAGE     %----------------------------------------------------------------------------------------          \title[Short title]{Full Title of the Talk} % The short title appears at the bottom of every slide, the full title is only on the title page          \author{John Smith} % Your name     \institute[UCLA] % Your institution as it will appear on the bottom of every slide, may be shorthand to save space     {     University of California \\ % Your institution for the title page     \medskip     \textit{john@smith.com} % Your email address     }     \date{\today} % Date, can be changed to a custom date          \begin{document}          \begin{frame}     \titlepage % Print the title page as the first slide     \end{frame}          \begin{frame}     \frametitle{Overview} % Table of contents slide, comment this block out to remove it     \tableofcontents % Throughout your presentation, if you choose to use \section{} and \subsection{} commands, these will automatically be printed on this slide as an overview of your presentation     \end{frame}          %----------------------------------------------------------------------------------------     %   PRESENTATION SLIDES     %----------------------------------------------------------------------------------------          %------------------------------------------------     \section{First Section} % Sections can be created in order to organize your presentation into discrete blocks, all sections and subsections are automatically printed in the table of contents as an overview of the talk     %------------------------------------------------          \subsection{Subsection Example} % A subsection can be created just before a set of slides with a common theme to further break down your presentation into chunks          \begin{frame}     \frametitle{Paragraphs of Text}     Sed iaculis dapibus gravida. Morbi sed tortor erat, nec interdum arcu. Sed id lorem lectus. Quisque viverra augue id sem ornare non aliquam nibh tristique. Aenean in ligula nisl. Nulla sed tellus ipsum. Donec vestibulum ligula non lorem vulputate fermentum accumsan neque mollis.\\~\\          Sed diam enim, sagittis nec condimentum sit amet, ullamcorper sit amet libero. Aliquam vel dui orci, a porta odio. Nullam id suscipit ipsum. Aenean lobortis commodo sem, ut commodo leo gravida vitae. Pellentesque vehicula ante iaculis arcu pretium rutrum eget sit amet purus. Integer ornare nulla quis neque ultrices lobortis. Vestibulum ultrices tincidunt libero, quis commodo erat ullamcorper id.     \end{frame}          %------------------------------------------------          \begin{frame}     \frametitle{Bullet Points}     \begin{itemize}     \item Lorem ipsum dolor sit amet, consectetur adipiscing elit     \item Aliquam blandit faucibus nisi, sit amet dapibus enim tempus eu     \item Nulla commodo, erat quis gravida posuere, elit lacus lobortis est, quis porttitor odio mauris at libero     \item Nam cursus est eget velit posuere pellentesque     \item Vestibulum faucibus velit a augue condimentum quis convallis nulla gravida     \end{itemize}     \end{frame}          %------------------------------------------------          \begin{frame}     \frametitle{Blocks of Highlighted Text}     \begin{block}{Block 1}     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer lectus nisl, ultricies in feugiat rutrum, porttitor sit amet augue. Aliquam ut tortor mauris. Sed volutpat ante purus, quis accumsan dolor.     \end{block}          \begin{block}{Block 2}     Pellentesque sed tellus purus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Vestibulum quis magna at risus dictum tempor eu vitae velit.     \end{block}          \begin{block}{Block 3}     Suspendisse tincidunt sagittis gravida. Curabitur condimentum, enim sed venenatis rutrum, ipsum neque consectetur orci, sed blandit justo nisi ac lacus.     \end{block}     \end{frame}          %------------------------------------------------          \begin{frame}     \frametitle{Multiple Columns}     \begin{columns}[c] % The "c" option specifies centered vertical alignment while the "t" option is used for top vertical alignment          \column{.45\textwidth} % Left column and width     \textbf{Heading}     \begin{enumerate}     \item Statement     \item Explanation     \item Example     \end{enumerate}          \column{.5\textwidth} % Right column and width     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer lectus nisl, ultricies in feugiat rutrum, porttitor sit amet augue. Aliquam ut tortor mauris. Sed volutpat ante purus, quis accumsan dolor.          \end{columns}     \end{frame}          %------------------------------------------------     \section{Second Section}     %------------------------------------------------          \begin{frame}     \frametitle{Table}     \begin{table}     \begin{tabular}{l l l}     \toprule     \textbf{Treatments} & \textbf{Response 1} & \textbf{Response 2}\\     \midrule     Treatment 1 & 0.0003262 & 0.562 \\     Treatment 2 & 0.0015681 & 0.910 \\     Treatment 3 & 0.0009271 & 0.296 \\     \bottomrule     \end{tabular}     \caption{Table caption}     \end{table}     \end{frame}          %------------------------------------------------          \begin{frame}     \frametitle{Theorem}     \begin{theorem}[Mass--energy equivalence]     $E = mc^2$     \end{theorem}     \end{frame}          %------------------------------------------------          \begin{frame}[fragile] % Need to use the fragile option when verbatim is used in the slide     \frametitle{Verbatim}     \begin{example}[Theorem Slide Code]     \begin{verbatim}     \begin{frame}     \frametitle{Theorem}     \begin{theorem}[Mass--energy equivalence]     $E = mc^2$     \end{theorem}     \end{frame}\end{verbatim}     \end{example}     \end{frame}          %------------------------------------------------          \begin{frame}     \frametitle{Figure}     Uncomment the code on this slide to include your own image from the same directory as the template .TeX file.     %\begin{figure}     %\includegraphics[width=0.8\linewidth]{test}     %\end{figure}     \end{frame}          %------------------------------------------------          \begin{frame}[fragile] % Need to use the fragile option when verbatim is used in the slide     \frametitle{Citation}     An example of the \verb|\cite| command to cite within the presentation:\\~          This statement requires citation \cite{p1}.     \end{frame}          %------------------------------------------------          \begin{frame}     \frametitle{References}     \footnotesize{     \begin{thebibliography}{99} % Beamer does not support BibTeX so references must be inserted manually as below     \bibitem[Smith, 2012]{p1} John Smith (2012)     \newblock Title of the publication     \newblock \emph{Journal Name} 12(3), 45 -- 678.     \end{thebibliography}     }     \end{frame}          %------------------------------------------------          \begin{frame}     \Huge{\centerline{The End}}     \end{frame}          %----------------------------------------------------------------------------------------          \end{document}       In the above template When I add any equation in the section title, then it is not showing but in the body, equations appears. What more need to be added?


title: Specify row height in a table globally

text: > **Possible Duplicate:**   >  How to specify a fixed height for all rows in a table? I know that it is possible to specify the row heights of a tabular environment individually as explained in this answer: http://tex.stackexchange.com/a/19594/4011 However suppose I have a very large table and every row should have the same fixed height. Is it possible to change this height globally without adding something like `[2cm]` to each line?


title: How can I put the page numbers where I need them?

text: I need to put the number for each page that is numbered at the top right hand corner of the document. Currently that condition is satisfied except for the first page of each chapter. That is, for the page that contains the title of the chapter the number is at the bottom (center) of the page. Can anyone help with this?


title: Description-like environment with fixed labels width

text: Which is the right way to do something like 'description' list but with customizable and fixed-width labels? I.e. something like this:               Label:         Text text text text text text                    text text text text.     Longer label:  Text text text text text text                    Text text text text.      The way I see it to use two-column table (first columt for labels and second column for descriptions), but this solution seems ugly. Is there any other way?


title: How can I achieve this aligned two-column word-list-like layout?

text: This is my first tex question. I couldn't find a duplicate since I'm not even sure how to describe this layout in English...It looks like this:               [item1]     [explanation of item1......may be very long                 accross several lines, may contain math, and                 need to be wrapped automatically]          [item2]     [explanation of item2.......................                 ............................................                 ....................]      The space between items and explanations should be adjustable (usually several tabs in vim). I have tried the alltt package and use tabs(spaces) to get the layout, however, it cannot do automatic line wrapping and I have to manually break lines, so that's not really a solution. Thanks in advance for any help.


title: How can I use cross-references and hyperlinks to parts of an align environment?

text: I'm writing an exercise book, and in some exercises I'll have several numbered equations in an align environment, e.g., (1) x^2+x+1=0, (2) ax^3+2x=0, (3) x^5=2i, (4) x^4=-i, (5) x-1/x=2, (6) cosh(x)=3. (I'll want them to be aligned with respect to the number). I'm using a macro `\newcommand*\ExoEq{\refstepcounter{ExoEq}(\theExoEq)~}` so that the previous example is typed as:               \begin{align*}     \ExoEq&x^2+x+1=0,&     \ExoEq&ax^3+2x=0,&     \ExoEq&x^5=2i,\\     \ExoEq&x^4=-i,&     \ExoEq&x-\frac1x=2,&     \ExoEq&\cosh(x)=3.     \end{align*}      All is good so far, except that I sometimes need to refer to an equation, e.g.,               In Equation~(2), we assume that $a\neq0$.      The thing is when I want to use `\label` and `\eqref`, I get weird results in the align environment: here is a minimal example that shows what goes wrong:               \documentclass{amsart}          \usepackage{amsthm}     \usepackage[pdftex]{hyperref}          \parindent0pt          \newtheoremstyle{myexercise}{\baselineskip}{\baselineskip}{}{}{\bfseries}{.}{ }{\thmname{#1}\ \thmnumber{#2}}%     \theoremstyle{myexercise}     \newtheorem{Exo}{Exercise}[section]          \newcounter{MyCounter}     \newcommand*\Number{\refstepcounter{MyCounter}(\theMyCounter)~}          \let\oldlabel\label          \begin{document}     \section{Exercises}     \begin{Exo}     \begin{align*}     \Number\oldlabel{L1}&x^2+x=2,&     \Number\oldlabel{L2}&x^3+x^2=0.     \end{align*}     Equation~\eqref{L1} is very nice, and Equation~\eqref{L2}     is lovely too.     \end{Exo}     \end{document}      Without the hyperref package, I get the exercise reference, instead of the equation reference. With the hyperref package, I get an error on the second latex pass. I'm using a `\let\oldlabel\label` trick, as the align* environment redefines `\label`, and it just doesn't work with `\label` instead. How can I work around this annoying thing to have it work?


title: Option clash for package inputenc when using Lyx with LaTeX class that already uses inputenc

text: I use Lyx to edit document whose class declares `\usepackage[latin2]{inputenc}` in its .cls file. While I only use languages for which Lyx uses the same encoding it only adds the same command (`\usepackage[latin2]{inputenc}`) to preamble of the document. However when I started to use some more languages the command that is added by Lyx to preamble is changed to something like `\usepackage[latin9, latin2]{inputenc}`. Then I get following error:               LaTeX Error: Option clash for package inputenc.      \setcounter                {secnumdepth}{3}     The package inputenc has already been loaded with options:       [latin2]     There has now been an attempt to load it with options       [latin9,latin2]      Lyx does not seem to expect that classes may use `inputenc` themselves. What is the right solution to this problem? Should I prevent Lyx from adding any `inputenc` to preamble? Is there some LaTeX command that can override `\usepackage`? Or is this problem of the class I'm using so I should modify it? Perhaps I should delete that `\usepackage[latin2]{inputenc}` from that class or replace it by something... ## Edit **Important note:** I'm not really asking for some quick dirty fix (I could figure out some myself). I'm trying to make that class work with Lyx also for other users (writing Lyx layout file for it etc.). So I want to do this the right way. If the problem is poor design of LaTeX class I should fix that one. If it is poor Lyx design I should try to submit bug report or fix it myself.


title: \expandafter usage and plain TeX programming

text: Hello everybody out there using TeX, Actually, I wanted to write a LaTeX macro in plain TeX in order to include source code examples with individual modifications like stripping off comments and the first 21 characters in LaTeX documents. My code so far looks as follows:               \documentclass{article}     \edef\hashmark{\string#}     \def\getfirst#1#2\getfirst{\string#1}     \def\gobble#1#2{\expandafter#2}     \newread\myread     \begin{document}     \openin\myread=complete.txt       \newcount\linecount       \global\linecount1       \loop         \unless\ifeof\myread         \read\myread to \myinput         \if\hashmark\expandafter\getfirst\detokenize\expandafter{\myinput}\getfirst           \relax         \else           \newcount\position           \global\position1           {             \loop               \unless\ifnum\position>21                 \edef\myinput{\expandafter\gobble\myinput}                 \global\advance\position1             \repeat           }           \fi         \global\advance\linecount1       \repeat     \closein\myread     \end{document}      This results in the error message `! Paragraph ended before \gobble was complete.` Unfortunately, this is already for the second time I have to ask for help here, because I'm lacking experience in developing TeX and interpreting the error messages. All these difficulties in manipulating text input using TeX make me wonder, whether it makes really sense to use TeX to manipulate and trim my source code files instead of say sed, Perl, Python or any other programming language in which I have more experience and allowing for easy text manipulation. Any contribution to this consideration is appreciated.


title: Problem in modifying contour label style in pgfplots

text: I am trying to modify the contour label style in a TikZ picture. I would like to have the label values in the format 0.0 instead of being integers. The following code produces a picture in which labels are shown as integers with no decimal point.               \documentclass[crop=true, border=0mm]{standalone}     \usepackage{pgfplots}          \begin{document}          \begin{tikzpicture}         \begin{axis}[             axis on top,             title = {$\omega_\phi\left(x, \sigma\right) = \frac{\Gamma}{\pi{R_c}^2}\exp\left[-\frac{\left(x-x_0\right)^2+\left(\sigma-R_0\right)^2}{{R_c}^2}\right]$},             xmin=2, xmax=3,             ymin=2, ymax=3,             view={0}{90},             xlabel = {$x$},             ylabel = {$\sigma$},             ]             \addplot3[                 contour gnuplot = {contour label style={nodes={text=black}}},                 samples=10,                 contour/draw color={black},                 ]                 {1/3.1415927/0.25^2*exp(-((x-2.5)^2+(y-2.5)^2)/0.25^2)};         \end{axis}     \end{tikzpicture}          \end{document}      The following picture is the result of the above code with 2000 samples. ![enter image description here](http://i.stack.imgur.com/kHPLH.png) How can I use the following code to adjust the label value format? For some reasons LaTeX complains about unknown key.               contour label style={         /pgf/number format/fixed,         /pgf/number format/precision=1,     }


title: Moving from fancyvrb to listing – need to reconstruct my font settings

text: I have happily used the `fancyvrb` package with the `Verbatim` environment so far, but I want to change my figures to use the `listing` package with the `lstlisting` environment in order to have bold-faced keywords which improve readability. Unfortunately, I have no clue to adjust the listing settings to get the same (very nice) font I had before with fancyvrb... Here is my fancy verb settings:               % fancy verb     \usepackage[T1]{fontenc}     \usepackage{fancyvrb}     \usepackage{relsize}     \fvset{fontfamily=fvm}     \fvset{fontsize=\relsize{-2}}     \fvset{baselinestretch=1.3}      And here for listings, using the Scala language:               % listings     \usepackage{listings}     \lstdefinelanguage{scala}{ % "define" Scala       morekeywords={abstract,case,catch,class,def,do,else,extends,false,final,%         finally,for,if,implicit,import,match,mixin,new,null,object,override,package,%         private,protected,requires,return,sealed,super,this,throw,trait,true,try,%         type,val,var,while,with,yield},       otherkeywords={=>,<-,<\%,<:,>:,\#,@},       sensitive=true,       morecomment=[l]{//},       morecomment=[n]{/*}{*/},       morestring=[b]",       morestring=[b]',       morestring=[b]"""     }     \lstset{ % activate the language and predefine settings         language=scala,%         fontadjust=true,%         columns=[c]fixed,%         keepspaces=true,%         basewidth={0.58em, 0.53em},%         tabsize=2,%         basicstyle=\renewcommand{\baselinestretch}{0.95}\ttfamily,%         commentstyle=\itshape,%         keywordstyle=\bfseries,%         mathescape=true,%         escapechar=€,%         captionpos=b,%         framerule=0.3pt,%         firstnumber=0,%         numbersep=1.5mm,%         numberstyle=\tiny,%     }      And here is the document body contrasting both:               \documentclass{article}     % ... paste the fancy verb and listing settings from above here     \begin{document}          \begin{Verbatim}     object Stream {       def cons[A](hd: A, tl: => Stream[A]) = new Stream[A] {          def head = hd          lazy val tail = tl          ...       }     }     \end{Verbatim}          \begin{lstlisting}     object Stream {       def cons[A](hd: A, tl: => Stream[A]) = new Stream[A] {          def head = hd          lazy val tail = tl          ...       }     }     \end{lstlisting}          \end{document}      Neither does the font of listing look remotely like the T1/fancyvrb one, nor does LaTeX seem to pay attention to setting the keywords in bold-face: ![enter image description here](http://i.stack.imgur.com/9PPGy.png) I guess I need to change the `basicstyle` entry, but how?


title: Acronyms like \ac and \acs with no hyperlink

text: I want to use acronym package for acronyms. And for that I use `\ac` and `\acs` in text and `\caption` or `\section`. However, in `\caption` and `\section` I don't want hyperlinks to the acronym table, but only in the text. Therefore, is there a way to define new two commands based on `\ac` and `\acs` that when used do not make hyperlink, but work in the same behavior as the previous ones and includes the acronyms in the table of acronym? Probably part of the code of `acronyms.sty` shall be used for that. But I do not know where to start.


title: How to make inner and outer regions transparent?

text: The white regions are required to be true transparent (preserved in both PDF and PNG). How do you do this in TikZ or PSTricks? The following diagram is just an example for illustration. ![enter image description here](http://i.stack.imgur.com/8oYHf.png)


title: I'm getting the error: ! Paragraph ended before \@@label was complete

text: I've scoured this forum and it looks to me like I'm setting up the tree correctly, but I'm still getting this error, I have               \usepackage{tikz}     \usepackage{tikz-qtree}      in the header. Here is the code that is causing the problem:               \begin{tikzpicture}          \Tree      [.{Boolean Groups}         [.{Abelian Groups}             [.Groups]         ]         [.{Class 3}              [.{Class 5}]             [.{Class 1}]             [.{Class 2}]             [.{Class 4}]         ]     ]          \end{tikzpicture}


title: caption setting, bolded figure and table, and single spacing without caption package

text: These limitations and difficulties I face because I couldn't use `caption` package. If I add `\usepackage{caption}`, I couldn't preview my document.. I'm using BaKoMa TeX. There are a lot of bugs which is beyond repair for this moment. :-(   1. I need to have the word `Figure` in the `figure` environment caption to be **bold**. (same goes for `table`)   2. If possible I want the caption length is equal to table's width and it is in single spacing. The whole document is in double spacing. For example ![enter image description here](http://i.stack.imgur.com/uEmaF.png) Here is the LaTeX code:               \documentclass{report}     \usepackage{amsmath}     \usepackage{graphicx}     \usepackage{booktabs,xcolor,amssymb} %% also needed     \begin{document}     \begin{table}[H]\label{comparisonfourierandnonfourier1}\caption{Comparison between Fourier and Non-Fourier heat conduction equation (HCE).}\centering     \begin{tabular}{l c c}     \toprule     \textbf{\textcolor{blue}{Item}} & \textbf{\textcolor{blue}{Fourier HCE}} &         \textbf{\textcolor{blue}{non-Fourier HCE}}\\     \midrule     1) conservation energy & same & same \\      2) heat flux equation & $q=-k\triangledown T$ & $\tau\displaystyle\frac{\partial q}        {\partial t}+q=-k\frac{\partial T}{\partial r}$ \\      3) equation form & parabolic  & hyperbolic \\      4) heat propagation & infinite  & finite \\      5) temperature gradient & moderate  & extreme \\      \bottomrule\end{tabular}     \end{table}     \end{document}      Is there any other way to do this given that the limitation I face... by only using the `graphicx` package? Maybe some `\renewcommand` perhaps... I do appreciate for your advice.


title: R: Prettify xtable() output for printing a matrix or dataframe

text: Following a suggestion, this is a repost from stackoverflow. I am trying to print out this table from `R` using `xtable()`. The default output is ugly. Is it possible to embed latex code within xtable() to manipulate what individual columns look like? Specifically, I would like to include the `\phantom{}` switch in some of the rows.


title: Implementing car and cdr in TeX

text: I've been trying to implement a macro that reads and transforms its argument into a different form...but I'm having quite a bit of trouble finding or creating even the most basic parsing tools. Case in point: I can't find a way to make a safe version of either car (which returns the first element of a list) or cdr (which returns the rest of the list). I learned from this answer that LaTeX includes implementations named `\@car` and `\@cdr`, defined as follows:               \def\@car#1#2\@nil{#1}     \def\@cdr#1#2\@nil{#2}      However, both of these can only be used alone, no nesting is possible. For example, the following produces an error:               \@car \@cdr content\@nil\@nil      The correct output, if `\car` and `\cdr` worked as in Lisp, would be 'o': the first element of the rest of the argument passed to `\cdr`. However, `\@car` runs first, and doesn't execute its input, taking `\@cdr` as `#1` and `content` as `#2`, and returns `\@cdr`. This leaves the remaining input as `\@cdr\@nil`, which results in the error "Paragraph ended before `\@cdr` was complete". We also can't use `\@cdr` more than once to trim off more than the first token, if we try:               \@cdr \@cdr content\@nil\@nil      ...the result is `content\@nil`, because the first `\@cdr` discards the second before it is run. I feel like the answer would be something along the lines of               \def\car#1{\@car #1\@nil}     \def\cdr#1{\@cdr #1\@nil}      ...if it were possible to tell TeX to evaluate #1 until it contains no macros before passing it to `\@car` or `\@cdr`. To that end, I've also tried:               \def\car#1{\edef\temp{#1}\expandafter\@car\temp\@nil}     \def\cdr#1{\edef\temp{#1}\expandafter\@cdr\temp\@nil}      ...which again works correctly for `\car{content}` or `\cdr{content}`, but causes compilation of the document to silently fail for `\car{\cdr{\cdr{content}}}`, and I have no idea why. Any ideas on how car and cdr could be implemented safely?


title: alignat not correctly aligning

text: I have the following code:               \begin{alignat}{4}         \sum_{r}\sum_{p} & X_{i,m,r,p}       & = d_m                          \quad & \forall i, m\\     \sum_{q=0}^{d_{m}-1} & X_{i,m,r,(p+q)}   & = d_m \times \hat{X}_{i,m,r,p} \quad & \forall i, m, r, p\\                 \sum_{p} & \hat{X}_{i,m,r,p} & \leq 1                         \quad & \forall i, m, r     \end{alignat}      Which should show three lines with the X's aligned, the RHS aligned, and the `\forall` conditions on the right aligned. What I'm getting, instead, is something like this: ![alignat problem](http://i.stack.imgur.com/ztahc.png) I use `alignat` in my other LaTeX document, and it works perfectly. I have no idea what I've done wrong, but I can't find anything different in the way I've used `alignat` in this document compared to my other one.


title: Issue for inserting queries in \title

text: I am using `marginnote` package for inserting queries. But in `\title` I am unable to print query. Can anybody suggest me what is the problem? please check now I have changed the code:               \documentclass{article}          \usepackage{xifthen,array}     \makeatletter     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Queries %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %     \newwrite\@qrynotes     \newif\if@qrynotesopen \global\@qrynotesopenfalse          \def\@openqrynotes{\immediate\openout\@qrynotes=\jobname\thechapqry.qry\relax     %\immediate\write\@auxout{\string\newif\csname if\jobname\roman{chapqry}\endcsname}     %\expandafter\csname if\jobname\roman{chapqry}\endcsname%     %\expandafter\global\csname jobname\roman{chapqry}false\endcsname           \global\@qrynotesopentrue}          \long\def\Protected@immwrite#1#2{%           \begingroup%            \let\protect\@unexpandable@protect%            \edef\reserved@a{\immediate\write#1{\fontsize{12bp}{14bp}\selectfont #2}}%            \reserved@a%           \endgroup}%          \newif\ifbwf@querymark\bwf@querymarktrue     \newif\ifprintquery\global\printqueryfalse          \newcounter{chapqry}     \setcounter{chapqry}{0}          \newcounter{qrycount}[chapqry]          \newdimen\querywidth          \querywidth=3pc          \def\defaultcondition{TRUE}          \DeclareRobustCommand\AQ{\unskip\@ifnextchar[{\@AQtbmove}{\@AQprint}}%          \def\@AQtbmove[#1]#2{\@ifnextchar[{\@AQtbmoveprint[#1]{#2}}{\@AQtbmoveprint[#1]{#2}[0pt]}}%          \def\@AQtbmoveprint[#1]#2[#3]{\ifbwf@querymark\stepcounter{qrycount}%     \if@qrynotesopen \else  \@openqrynotes \fi%      \Protected@immwrite\@qrynotes{\string AQ\the\c@qrycount & #2 &\protect\\ }%     % \ifnum\thechapqry=\thechapqry     %\expandafter\if\csname jobname\roman{chapqry}\endcsname     \expandafter\ifx\csname processcount\roman{chapqry}\endcsname\defaultcondition%      \AQ@margtext[#1]{AQ\the\c@qrycount}[#3]%     \fi\fi}%          \def\@AQprint#1{\@ifnextchar[{\@AQprintquery{#1}}{\@AQprintquery{#1}[0pt]}}%          \def\@AQprintquery#1[#2]{\ifbwf@querymark\stepcounter{qrycount}%     \if@qrynotesopen \else  \@openqrynotes \fi%      \Protected@immwrite\@qrynotes{\string AQ\the\c@qrycount & #1 & \\ }%     % \expandafter\if\csname jobname\roman{chapqry}\endcsname     \expandafter\ifx\csname processcount\roman{chapqry}\endcsname\defaultcondition%      {\AQ@margtext[0pt]{AQ\the\c@qrycount}[#2]}%     \fi\fi}%          \newif\if@rightcolumnquery\global\@rightcolumnqueryfalse%          \def\RAQ#1{\global\@rightcolumnquerytrue\AQ{#1}}          \newdimen\lastpagetotaldim     \def\AQ@margtext[#1]#2[#3]{%       \ifmmode%       \else%         \setbox\@tempboxa=\vbox to 0pt{\vskip-9pt\vskip#1%         \if@rightcolumnquery%         \global\@rightcolumnqueryfalse%           \hbox to \hsize{\hfill\hskip#3\rlap{\hbox to \querywidth{\hskip12pt\reset@font\normalcolor\normalsize #2\hfill}}}%         \else%           \ifdim\pagetotal=\lastpagetotaldim{\protect\par\vskip12pt}\else\fi%           \global\lastpagetotaldim=\pagetotal%           \hbox to \hsize{\hskip#3\llap{\hbox to \querywidth{\reset@font\normalcolor\normalsize #2\hfill}}\hfill}%         \fi}%         \dp\@tempboxa\z@%         \ifvmode%           \@tempdima=\prevdepth%           \nointerlineskip\box\@tempboxa\nobreak%           \prevdepth=\@tempdima%         \else%           \vadjust{\box\@tempboxa\nobreak}\space%         \fi%       \fi\penalty10000%     }     \newbox\qrylabelbox          \newenvironment{qrylist}[1][\relax]{%     \list{}%     {\setbox\qrylabelbox\hbox{\normalsize#1.}     \labelsep8pt     \labelwidth\wd\qrylabelbox%     \leftmargin\labelwidth%     \advance\leftmargin\labelsep%     \rightmargin\z@%     \def\makelabel##1{\hbox to \labelwidth{\hfill##1.}}}%     }%     {\endlist}          \def\notesname{\fontfamily{ptm}\fontsize{17bp}{17bp}\selectfont\bfseries Author Query Form}%     \def\qnoteheading{%     \clearpage%     \gdef\watermarktext{}     \addtocounter{page}{-1}%     \pagestyle{empty}     \ifthenelse{\isodd{\thepage}}{\addtocounter{page}{-1}}{\addtocounter{page}{-1}}     \vspace*{-7pc}     %\lineno@off%     %\ifbwf@rmblankpage     %\addtocounter{page}{-1}%     %\setcounter{curpage}{\arabic{page}}     %\else     %\setcounter{curpage}{\arabic{page}}     %\ifodd\thecurpage     %\addtocounter{curpage}{-1}%     %\fi%     \fi%     \centerline{\notesname}%     \rule{\textwidth}{1pt}\vskip2\baselineskip\noindent{\fontfamily{ptm}\fontsize{12bp}{12bp}\selectfont\bfseries Journal: Statistics in Medicine\par\addvspace{10.5\p@}Article: STA\par\addvspace{20pt}}\fontfamily{ptm}\fontsize{12bp}{14bp}\selectfont Dear Author,\par\addvspace{2pc} During the copyediting of your paper,the following queries arose. Please respond to these by annotating your proofs with the necessary changes/additions.\begin{itemize}     \item If you intend to annotate your proof electronically, please refer to the E-annotation guidelines.     \item If you intend to annotate your proof by means of hard-copy mark-up, please refer to the proofmark-upsymbols guidelines.     If manually writing corrections on your proof and returning it by fax, do not write     too close to the edge of the paper. Please remember that illegible mark-ups may delay publication     \end{itemize}     Whether you opt for hard-copy or electronic annotation of your proofs,     were commend that you provide additional clarification of answers to queries     by entering your answers on the query sheet, in addition to the textmark-up.     }          \RequirePackage{longtable}     \def\printquery{     \immediate\write\@auxout{\string\gdef\expandafter\string\csname processcount\roman{chapqry}\endcsname{TRUE}}\printquerytrue\ifprintquery%\immediate\write\@auxout{\expandafter\string\expandafter\global\csname\jobname\roman{chapqry}true\endcsname}%     \immediate\closeout\@qrynotes \global\@qrynotesopenfalse%     %%     \ifnum\c@qrycount>0     \qnoteheading     \vspace*{2pc}          \begin{longtable}{@{}|l|>{\raggedright\parindent0pt}p{.6\textwidth}|p{.175\textwidth}|@{}}\hline%     \textbf{Query No.} & \textbf{Query} & \textbf{Remark}\\     \endfirsthead     \hline     \textbf{Query No.} & \textbf{Query} & \textbf{Remark}\\     \hline     \endhead     \hline     \multicolumn{1}{c}{}& \multicolumn{1}{c}{}& \multicolumn{1}{r}{\hfill (Continued..)}\\     \endfoot     \hline     \endlastfoot     \hline     \input{\jobname\thechapqry.qry}     \hline     \end{longtable}     \fi\par\addvspace{24\p@}     %\fi%\lineno@on\setcounter{lastpage}{\arabic{page}}\addtocounter{lastpage}{-\c@curpage}     }%          %     %%%%%%%%%% Author query part end %%%%%%%%%%%%     \makeatother          \begin{document}          \title{title}     \author{author}     \maketitle          this is a sample\AQ{first query} document               \printquery     \end{document}


title: More basic versions of \prescript

text: Sometimes I want to put a subscript or superscript to the left of an argument. In LaTeX documents, I have used the `\prescript` command from the `mathtools` package, as described here. But Mathjax does not recognize this command. Is there an alternative using more basic commands that might be supported by Mathjax?


title: \alsoaffiliation undefined control sequence with \documentclass{comjnl}

text: I have a problem with `\documentclass{comjnl}`. I'm writing the first page and have a problem with authors labels. I have 4 authors, and **I would like two have to labels for the second and the third author (author, lab 1,2)**. Heres my `*.tex` file:               \documentclass{comjnl}          \title{Title}               \author{Author 1}     \affiliation{lab 1}     \alsoaffiliation{lab 2}          \author{Author 2}     \email{author@lab}          \author{Author 3}     \affiliation{lab 3}     \alsoaffiliation{lab 2}          \author{Author 4}     \affiliation{lab 2}          \date{\today}          \begin{document}     \maketitle      \end{document}      I'm using Texmaker 3.4 on Xubuntu Linux and I get the 'Undefined control sequence' with `alsoaffiliation` command. Heres my `*.log` file:               This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian) (format=pdflatex 2013.10.21)  22 DEC 2013 14:53     entering extended mode      restricted \write18 enabled.      %&-line parsing enabled.     **test1.tex     (./test1.tex     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, po     lish, portuguese, loaded.     (./comjnl.cls     Document Class: comjnl 2009/07/27 v0.1c The Computer Journal class (DPC)     (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo     File: size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)     )     \c@part=\count79     \c@section=\count80     \c@subsection=\count81     \c@subsubsection=\count82     \c@paragraph=\count83     \c@subparagraph=\count84     \c@figure=\count85     \c@table=\count86     \abovecaptionskip=\skip41     \belowcaptionskip=\skip42     \bibindent=\dimen102     )     (/usr/share/texlive/texmf-dist/tex/latex/rotating/rotating.sty     Package: rotating 2009/03/28 v2.16a rotated objects in LaTeX          (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty     Package: graphicx 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)          (/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty     Package: keyval 1999/03/16 v1.13 key=value parser (DPC)     \KV@toks@=\toks14     )     (/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty     Package: graphics 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)          (/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty     Package: trig 1999/03/16 v1.09 sin cos tan (DPC)     )     (/usr/share/texlive/texmf-dist/tex/latex/latexconfig/graphics.cfg     File: graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live     )     Package graphics Info: Driver file: pdftex.def on input line 91.          (/usr/share/texlive/texmf-dist/tex/latex/pdftex-def/pdftex.def     File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX          (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty     Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO)     )     (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty     Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO)     )     \Gread@gobject=\count87     ))     \Gin@req@height=\dimen103     \Gin@req@width=\dimen104     )     (/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty     Package: ifthen 2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)     )     \c@r@tfl@t=\count88     \rotFPtop=\skip43     \rotFPbot=\skip44     \rot@float@box=\box26     \rot@mess@toks=\toks15     )     \c@affil=\count89     \c@remaffil=\count90     \absbox=\box27          (/usr/share/texlive/texmf-dist/tex/latex/amscls/amsthm.sty     Package: amsthm 2009/07/02 v2.20.1     \thm@style=\toks16     \thm@bodyfont=\toks17     \thm@headfont=\toks18     \thm@notefont=\toks19     \thm@headpunct=\toks20     \thm@preskip=\skip45     \thm@postskip=\skip46     \thm@headsep=\skip47     \dth@everypar=\toks21     )     \c@definition=\count91     \c@lemma=\count92     \c@proposition=\count93     \c@corollary=\count94     \c@axiom=\count95     \c@remark=\count96     \c@example=\count97     \c@algorithm=\count98     \c@theorem=\count99     LaTeX Info: Redefining \rm on input line 468.     LaTeX Info: Redefining \sf on input line 469.     LaTeX Info: Redefining \tt on input line 470.     LaTeX Info: Redefining \bf on input line 471.     LaTeX Info: Redefining \it on input line 472.     LaTeX Info: Redefining \sl on input line 473.     LaTeX Info: Redefining \sc on input line 474.     LaTeX Info: Redefining \cal on input line 475.     LaTeX Info: Redefining \mit on input line 476.     )     (/usr/share/texlive/texmf-dist/tex/latex/graphics/epsfig.sty     Package: epsfig 1999/02/16 v1.7a (e)psfig emulation (SPQR)     \epsfxsize=\dimen105     \epsfysize=\dimen106     )     ! Undefined control sequence.     l.8 \alsoaffiliation                         {lab 2}     The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.               ! LaTeX Error: Missing \begin{document}.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.8 \alsoaffiliation{l                           ab 2}     You're in trouble here.  Try typing  <return>  to proceed.     If that doesn't work, type  X <return>  to quit.          ! Undefined control sequence.     l.15 \alsoaffiliation                          {lab 2}     The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.               ! LaTeX Error: Missing \begin{document}.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.15 \alsoaffiliation{l                            ab 2}     You're in trouble here.  Try typing  <return>  to proceed.     If that doesn't work, type  X <return>  to quit.          (./test1.aux)     \openout1 = `test1.aux'.          LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 22.     LaTeX Font Info:    ... okay on input line 22.     LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 22.     LaTeX Font Info:    ... okay on input line 22.     LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 22.     LaTeX Font Info:    ... okay on input line 22.     LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 22.     LaTeX Font Info:    ... okay on input line 22.     LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 22.     LaTeX Font Info:    ... okay on input line 22.     LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 22.     LaTeX Font Info:    ... okay on input line 22.      (/usr/share/texlive/texmf-dist/tex/context/base/supp-pdf.mkii     [Loading MPS to PDF converter (version 2006.09.02).]     \scratchcounter=\count100     \scratchdimen=\dimen107     \scratchbox=\box28     \nofMPsegments=\count101     \nofMParguments=\count102     \everyMPshowfont=\toks22     \MPscratchCnt=\count103     \MPscratchDim=\dimen108     \MPnumerator=\count104     \makeMPintoPDFobject=\count105     \everyMPtoPDFconversion=\toks23     ) (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty     Package: pdftexcmds 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO     )          (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty     Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO)     Package ifluatex Info: LuaTeX not detected.     )     (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty     Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO)     Package ifpdf Info: pdfTeX in PDF mode is detected.     )     Package pdftexcmds Info: LuaTeX not detected.     Package pdftexcmds Info: \pdf@primitive is available.     Package pdftexcmds Info: \pdf@ifprimitive is available.     Package pdftexcmds Info: \pdfdraftmode found.     )     (/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty     Package: epstopdf-base 2010/02/09 v2.5 Base part for package epstopdf          (/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty     Package: grfext 2010/08/19 v1.1 Manage graphics extensions (HO)          (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty     Package: kvdefinekeys 2011/04/07 v1.3 Define keys (HO)     ))     (/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty     Package: kvoptions 2011/06/30 v3.11 Key value format for package options (HO)          (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty     Package: kvsetkeys 2012/04/25 v1.16 Key value parser (HO)          (/usr/share/texlive/texmf-dist/tex/generic/oberdiek/etexcmds.sty     Package: etexcmds 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)     Package etexcmds Info: Could not find \expanded.     (etexcmds)             That can mean that you are not using pdfTeX 1.50 or     (etexcmds)             that some package has redefined \expanded.     (etexcmds)             In the latter case, load this package earlier.     )))     Package grfext Info: Graphics extension search list:     (grfext)             [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPE     G,.JBIG2,.JB2,.eps]     (grfext)             \AppendGraphicsExtensions on input line 452.          (/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg     File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv     e     ))     [1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}               ]     caffil>1     LaTeX Font Info:    External font `cmex10' loaded for size     (Font)              <12> on input line 23.     LaTeX Font Info:    External font `cmex10' loaded for size     (Font)              <8> on input line 23.     LaTeX Font Info:    External font `cmex10' loaded for size     (Font)              <6> on input line 23.     LaTeX Font Info:    External font `cmex10' loaded for size     (Font)              <9> on input line 23.     LaTeX Font Info:    External font `cmex10' loaded for size     (Font)              <5> on input line 23.          Class cj Warning: No keywords.               Class cj Warning: No received date.               Class cj Warning: No accepted date.          [2               ] (./test1.aux) )      Here is how much of TeX's memory you used:      1885 strings out of 495009      25574 string characters out of 3180581      78556 words of memory out of 3000000      5065 multiletter control sequences out of 15000+200000      9184 words of font info for 32 fonts, out of 3000000 for 9000      36 hyphenation exceptions out of 8191      41i,8n,24p,242b,223s stack positions out of 5000i,500n,10000p,200000b,50000s     </usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/     cmcsc10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10     .pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb></     usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmti7.pfb></usr/sha     re/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmti9.pfb>     Output written on test1.pdf (2 pages, 49976 bytes).     PDF statistics:      31 PDF objects out of 1000 (max. 8388607)      21 compressed objects within 1 object stream      0 named destinations out of 1000 (max. 500000)      1 words of extra memory for PDF output out of 10000 (max. 10000000)


title: get the width (in pt) of a box

text: I would get the width (so a dimension) of a string in a box. I need to know the width of `\hphantom{some text}`, in order to use it into a tikz picture, for example as `\draw (0,0)--(\mylen,0);` that represents a line with the same width of the string `some text`.


title: How to draw double circle node in tikz?

text: Consider the following code:               \begin{document}                    \begin{figure}     \begin{tikzpicture}[>=stealth',shorten >=1pt,auto,node distance=5 cm, scale = 1, transform shape]               \node[initial,state] (A)                                    {$s_0$};     \node[state]         (B) [right of=A]                       {$s_2$};     \node[state]         (C) [above of=B]                       {$s_1$};     \node[state]         (D) [below of=B]                       {$s_3$};          \path[->] (A) edge [left]       node [align=center]  {$ c = c + 1 $} (C)           (A) edge [above]      node [align=center]  {$ c = c + 5 $} (B)           (A) edge [left]       node [align=center]  {$ c = c - 1 $} (D)           (B) edge [right]      node [align=center]  {$ c = c - 1 $} (D)           (C) edge [loop above] node [align=center]  {$ c = c + 1 $} (C)           (D) edge [loop below] node [align=center]  {$ c = c - 2 $} (D);          \end{tikzpicture}     \caption{An example of SST}     \end{figure}          \end{document}      I get the following automaton : ![enter image description here](http://i.stack.imgur.com/jLjQ1.png) How can I draw S2 and S4 as final states (double circle)?


title: List of Abbreviations/Acronyms in Latex. Several issues

text: I want a list of abbreviations in my thesis. My thesis consist of multiple parts, which are included into the final document with the "include" command. The distinct parts of the thesis introduce sometimes the same abbreviations. However, i do not want to maintain abbreviations on the level of the whole thesis, but on the level of the included parts. Two packages are commonly used for abbreviations: nomencl and glossaries. Both have issues. Nomencl: I cannot have duplicate abbreviations, thus i have to maintain them at the thesis' level, which is complicated and distracting. I want the distinct parts to be as independent as possible. Glossaries: Glossaries does not work good with natbib, e.g. \gls{SOM}\citep{Kohonen2001} results in (SOM) (Kohonen, 2001), what is considered bad style. It would be nicer, if it would produce (SOM; Kohonen, 2001). So, my idea is to use the glossaries-package in a similar manner to nomencl. Only defining acronyms for the list of abbreviations, but not using \gls, glspl, etc. in the text. However, to print the acronyms in the list, they must explicitly added with /glsaddall, but this command does not work for acronyms defined in included documents. I consider this a bug. So, the best i think would be to stick with nomencl and somehow force it to ignore redefinitions of acronyms in the included documents. Is this possible? Alternatively, what approach would you suggest for my usecase (need abbrev list, multiple included documents)?


title: Misalignment of table columns when using multirow

text: I have a LaTeX document in which I am using custom environment and commands to make everything a bit easier. However, when I use the multirow command in one of my custom environments, the alignment of the left and right table columns is muddled (see below). ![Example of table column misalignment](http://i.stack.imgur.com/do4Dk.png) A minimum working example follows. Note that, in the case shown above, a multirow isn't required. However, there are other situations where the text in the left column is longer than a single table cell from the left column, and hence the multirow is required to prevent the contents of the right column from being spaced further apart.               \documentclass[10pt]{article}          \usepackage{filecontents}     \begin{filecontents*}{cvtools.sty}     \NeedsTeXFormat{LaTeX2e}     \ProvidesPackage{cvtools}[2012/07/16 v1.0.0]          \RequirePackage{etoolbox}           % for \ifstrempty, \ifdef     \RequirePackage{ifthen}             % for \ifthenelse     \RequirePackage{longtable}          % for tables that span more than one page     \RequirePackage{multirow}           % for table columns that span more than one row     \RequirePackage{tabularx}           % for simple column stretching     \RequirePackage{xcolor}             % for colours          %================================================%     % Declare options     %================================================%     \newif\if@showgrades          \DeclareOption{showgrades}{\@showgradestrue}     \DeclareOption*{\PackageWarning{cvtools}{Unknown option `\CurrentOption'}}          \ProcessOptions          %================================================%     % For table styling     %================================================%     \definecolor{lightgray}{gray}{0.8}%     \newcolumntype{L}[1]{>{\raggedleft}p{#1}}%     \newcolumntype{R}[1]{p{#1}}%     \newcommand\VRule{\color{lightgray}\vrule width 0.5pt}%     %------------------------------------------------%          %================================================%     % \begin{education}     % \educationItem{beginYear}{endYear}{name}{institution}{\educationGrade{subject}{grade} ...}     % \end{education}     %================================================%     \newenvironment{education}%     {%     \def\lwidth{0.16\textwidth}%     \def\rwidth{0.78\textwidth}%     %     \newcommand\educationGrade[2]{##1 & ##2\\}%     %     \newcommand\educationItem[5]{%     % Check if we should display tools     \if@showgrades%         \ifstrempty{##5}%             {% showGrades is true, but this \educationItem has no grades to display.                 \gdef\@numRows{1}%                 \gdef\@shouldshowgrades{0}%             }%             {% showGrades is true and this \educationItem has grades to display.                 \gdef\@numRows{2}%                 \gdef\@shouldshowgrades{1}%             }%     \else%         % showGrades is false.         \gdef\@numRows{1}%         \gdef\@shouldshowgrades{0}%     \fi%     %     % Education period     \multirow{\@numRows}{\lwidth}{##1 -- ##2}%     %     % Name and institution     & \textbf{##3 (##4)}%     %     % Grades     \ifthenelse{\equal{\@shouldshowgrades}{1}}%         {%             \\*%             & \begin{tabularx}{\rwidth}{Xr}%             ##5%             \end{tabularx}%         }%         {}%     \\[0.5em]%     }%     %     \begin{longtable}{L{\lwidth}!{\VRule}R{\rwidth}}%     }%     {\end{longtable}}%     \end{filecontents*}               \usepackage[showgrades]{cvtools}%     \usepackage[margin=3cm]{geometry}   % extend page margins          \begin{document}     \section*{Education}     \begin{education}         \educationItem{2008}{2012}         {Education 1}         {University 1}         {}              \educationItem{2002}{2007}         {Education 2}         {University 2}         {         \educationGrade{Subject 1}{90/100}         \educationGrade{Subject 2}{88/100}         \educationGrade{Subject 3}{97/100}         \educationGrade{Subject 4}{94/100}         \educationGrade{Subject 5}{95/100}         }              \educationItem{January 2002}{December 2007}         {Education 3}         {University 3}         {         \educationGrade{Subject 1}{90/100}         \educationGrade{Subject 2}{88/100}         \educationGrade{Subject 3}{97/100}         \educationGrade{Subject 4}{94/100}         \educationGrade{Subject 5}{95/100}         }     \end{education}     \end{document}      The third `\educationItem` demonstrates a longer entry which (I believe) justifies the use of multirow... without multirow I get something like this (note the undesired whitespace between "Education 3" and "Subject 1": ![Example of a wide left column.](http://i.stack.imgur.com/NYOQJ.png) Any assistance would be greatly appreciated.


title: Define colour transparency in relation to existing colour

text: # Background Using ConTeXt to develop a nice theme where users can change the colour scheme, but still get the same "feeling" for the output, primary, secondary, and tertiary colours are defined. For example:               \definecolor[ColourSecondary][h=9A957A]      Each colour can then be "lightened" by setting its transparency:               \definecolor[ColourSecondaryLighter][h=9A957A,a=1,t=.5]     \definecolor[ColourSecondaryLightest][h=9A957A,a=1,t=.3]      This works but is not ideal. # Problem The `ColourSecondary` value of `9A957A` is repeated for the lighter colours, resulting in triplicated code. # Question How do you create a transparent variation on an existing colour? For example:               \definecolor[ColourSecondaryLighter][h=\tohex{ColourSecondary},a=1,t=.5]      The following did not work:               \definecolor[ColourSecondaryLighter][1.0(ColourSecondary),a=1,t=.5]      # References   * http://wiki.contextgarden.net/Command/definecolor


title: Poetrytex package

text: I'm trying to create a poetry anthology using the `poetrytex` package. I'm following the instructions in the `poetrytex` manual on CTAN and so far my code is               \documentclass[12pt,a4paper]{article}     \usepackage[latin1]{inputenc}          \RequirePackage{expl3}     \RequirePackage{tocloft}     \AtEndOfPackage{\RequirePackage{hyperref}}     \usepackage[numberpoems,clearpageafterpoem]{poetrytex}          \newcommand*{\pttitle}{Title}     \newcommand*{\ptsubtitle}{Subtitle}     \newcommand*{\ptauthor}{Author}          \begin{document}          \end{document}      I always get the `File 'poetrytex.sty' not found` message. Am I missing a piece of code somewhere?


title: Can I add border margin into beamer frame body

text: In default, `beamer` class loads the `geometry` package. And I dont know how to map the `\paperwidth` and `\textwidth` to its mechanism. My requirement is very simple. I want to add some margin to {top, left, bottom, right}. Do you know how to do that? For simplification, I upload a sketch image: ![enter image description here](http://i.stack.imgur.com/GAFMa.jpg) Can I do this with `\setbeamersize` command? Edit: Thank you for your answer. But can I do this with no walk-around way. I mean can I just customize beamer class. I also need to separate header/body/footer to customize. I dont want to cron them or zoom them as whole document


title: Verbments: listofpyglistings numwidth

text: im really new to latex and now have tryed to make an List of my SourceCode. To Highlight I used verbments. It provides the Command ListOfPyglist. This works fine. Now I want to set the Counter to count within section, subsection and subsubsection. This also works fine, but now there is one Problem: When I make the ListOf the Listing looks ugly because the numbering overlaps the Captions. I had the same problem with figures and Tables, but there I solved it with               \usepackage[titles]{tocloft}     \addtolength{\cftfignumwidth}{2em}     \addtolength{\cfttabnumwidth}{2em}      This works fine. Previously I used the Package listings and there I solved the Issue with the Numbering with               \makeatletter         \let\l@lstlisting\l@figure     \makeatother      So I thought i could fix it in my pyglisting with the same way...               \makeatletter         \let\l@pyglist\l@figure     \makeatother      But It didn't work. So I looked at the Source of verbments... And there I found the line which makes probably the line:               \newcommand{\l@pyglist}[2]{%       \@dottedtocline{1}{1.5em}{2.3em}{#1}{#2}     }      So I thought if i renew the command it should work...               \makeatletter         \renewnewcommand{\l@pyglist}{%             \@dottedtocline{1}{1.5em}{4.3em}         }     \makeatother      But didn't affect.. So, does anybody know a Solution? Here is an short sample:               \documentclass[12pt,oneside,a4paper,toc=listof,toc=bibliography]{scrreprt}          \usepackage{verbments}          \plset{         style=vs,         listingnamefont=\sffamily\bfseries\color{yellow},%         captionfont=\sffamily\color{white},captionbgcolor=gray,%         fvset={frame=bottomline,framerule=4pt,rulecolor=\color{gray}},         listingname=Some Listing Name     }          \usepackage{chngcntr}          \AtBeginDocument     {         \counterwithin*{pllisting}{section}         \counterwithin*{pllisting}{subsection}         \counterwithin*{pllisting}{subsubsection}         % Numbering for pyglisting         \renewcommand{\thepllisting}         {%             \ifnum\value{subsection}=0          \thesection.\arabic{pllisting}%             \else          \ifnum\value{subsubsection}=0           \thesubsection.\arabic{pllisting}%          \else           \thesubsubsection.\arabic{pllisting}%          \fi             \fi         }%     }          \begin{document}          %List of Pyglist     \listofpyglistings          \chapter{Some Chapter}     \section{Some Section}     \subsection{Some Subsection}     %Sample Listing     \begin{pyglist}[language=c++,caption=SomeSample, listingname=SomeListing]     int main(char[] args)     {       cout << "hello World";     }     \end{pyglist}     \end{document}


title: Is there a way to provide a starred variant of a (xkeyval) boolean (class) option

text: I'd like to define, for a class I'm working on, two boolean keys rather similar and, instead of giving them different names, I'd like to let the latter be a starred variant of the former. Let me give an example with a minimal class file which defines such a starred boolean value. By changing the catcode of the `*` character into `11`, I managed to make it work:               \begin{filecontents*}{myclass.cls}     \NeedsTeXFormat{LaTeX2e}[1999/12/01]     \ProvidesClass{myclass}     \RequirePackage{xkeyval}     \define@boolkey{myclass.cls}[MYC@]{land*}[false]{}     \ProcessOptionsX     \LoadClass{article}     \begingroup     \catcode`\*=11\relax     \ifMYC@land*     \endgroup     \RequirePackage[landscape]{geometry}     \else     \RequirePackage{geometry}     \fi     \endinput     \end{filecontents*}     %     \documentclass[land*=true]{myclass}     \begin{document}     Test.     \end{document}      but it is unstable as it only works with the `true` value. With the `false` value, I get an error involving `\providecommand*` which is clearly unknown if `*` is a letter. Hence my question: how could I define a robust starred variant of a (xkeyval) boolean (class) option?


title: What is this endnote format in BibTex?

text: I am trying to convert endnote format into bibtex for this article. I have               %0 Journal Article     %T A Novel Automatic Detection System for ECG Arrhythmias Using Maximum Margin Clustering with Immune Evolutionary Algorithm     %J Computational and Mathematical Methods in Medicine     %V 2013     %A Zhu, Bohui     %A Ding, Yongsheng     %A Hao, Kuangrong     %R 10.1155/2013/453402     %D 2013     %U http://dx.doi.org/10.1155/2013/453402     %] 453402     %P 8      My suggestion               % journal article     @article{zhu,         author = {Zhu, Bohui, and Ding, Yongsheng, and Hao, Kuangrong},         title = {A Novel Automatic Detection System for ECG Arrhythmias Using Maximum Margin Clustering with Immune Evolutionary Algorithm},         journal = {Computational and Mathematical Methods in Medicine},         publisher = {Hindawi Publishing Corporation},         pages = {8},         doi = {10.1155/2013/453402},         year = {2013}     }      **What is the article ID, following, and the correct BibTex citing?**                   %] 453402


title: How to span \textit{} and \Large several lines in \author{}

text: I would like to span `\textit{}` in several line in `\author{}` tag. So far I know I can do this ( but here `\LARGE` will only affect the `Name`) :               % title     \title{\textbf{Cool title}}     \author{\LARGE Name\\             \emph{University}\\             \emph{Faculty}\\             \emph{mail@mail.com}             }     \date{}         % Do not print the date on the final paper!     \maketitle      But if I try to               \author{\LARGE{Name\\             \emph{University\\              Faculty\\              mail@mail.com}             }             }      I get the following error :               There were errors in your LaTeX source          ./main.tex:60: Missing } inserted. [\maketitle]     ./main.tex:60: Missing } inserted. [\maketitle]     ./main.tex:60: Missing \cr inserted. [\maketitle]     ./main.tex:60: Missing \cr inserted. [\maketitle]     ./main.tex:60: Misplaced \cr. [\maketitle]      **EDIT**               \author{\itshape Name\\             University\\              Faculty\\              mail@mail.com             }      This would only affect `Name` also. **EDIT** I use following the `documentclass`               \documentclass[a4paper,11pt]{article}


title: tikz-timing & T1 fontenc

text: When using `\usepackage[T1]{fontenc}`, the text output produced by `tikz- timing` is rastered; the following MWE               \documentclass{article}     \usepackage{tikz-timing}     \usepackage[T1]{fontenc}                          \begin{document}          \begin{tikztimingtable}     & 2D{a} \\     \end{tikztimingtable}          \end{document}      results in this output: ![enter image description here](http://i.stack.imgur.com/DIKOt.png) This is independent of the document class, and only happens if I specify `\usepackage[T1]{fontenc}`. Even with just `\usepackage{fontenc}`, the output is ok. Unfortunately, I have no idea on how to even approach debugging this...


title: How to remove date appearing on every page

text: I'm using a template from a website, and the month/year is appearing on every page in the main body of my dissertation. I can't seem to find the line where this feature is turned on, please help me out.


title: Getting rid of period and comma

text: I am using apa.bst and want to know how to: 1) Get rid of the period after the year; and 2) Get rid of the comma after the journal title. I currently have: Baba, SA (1997). Democracies and inefficiency. Economics and Politics, 9(2):99–114. I need it to be: Baba, SA (1997) Democracies and inefficiency. Economics and Politics 9(2):99–114.


title: How to include a programming language source code file in a plain TeX document?

text: I have some Java and C source codes and I want to include them in my `.tex` document. I can't simply copy and paste them into my document: In fact, doing this way, the code won't appear with the right spacings and indentations. I'd like that the source code does appear the same way it looks when opened in any text editor. Is there a simple way to do it? Is there a macro (for the plain format) that takes care of that automatically?


title: Breaking formulas before and after binary operators

text: Page 195 of the TeXBook reads: > Although formulas within a paragraph always break after binary operations > and relations, displayed formulas always break before binary operations and > relations. What is the reason for this rule?


title: Help with aligning equations and numbering

text: I'm new to `LaTeX` so you're going to have to bear with me. I am trying to write a project report using it and I have got this so far for a certain section: Then,               \documentclass[a4paper,12pt]{article}     \usepackage{amsmath,graphicx,hyperref,parskip,gensymb}      % In case you are wondering what these packages are for:      % amsmath provides extra mathematical constructs and symbols      % graphicx facilitates the inclusion of graphics files      % hyperref makes links into clickable hyperlinks      % parskip leaves more space between paragraphs      \usepackage[cm]{fullpage}      % The above package makes the page margins smaller. I included it      % to save you printing costs.     % Feel free to also print two-sheets per page and double-sided          %==================     %.....     %==================          \begin{equation}\label{eq:six}       x = Vtsin(K),       \end{equation}       and        \begin{align*}       X       &= x-(l+h)sin(\phi), \\       &= Vt\sin(K)-(l+h)sin[K-2\tan ^{ - 1}\{\tan(K/2).exp((-Vt)/l)\}],       \end{align*}      This is what it says at the top:               \documentclass[a4paper,12pt]{article}       \usepackage{amsmath,graphicx,hyperref,parskip,gensymb}       And I would like to get all three lines of equations in line- so the x and X equations- and the first and third lines have numbers assigned to them. All my other equations have `\begin{equation}...\end{equation}` around them and those ones have been given reference numbers- like the x equation but I wanted to have these two in line so I used the align formula instead of the equation one and then tried both together but it didn't work. (Also, the labelling isn't working but that's another issue!) Any help would be greatly appreciated!


title: How to position the destination of the link generated by hyperref in the center of the page?

text: I'm using the package `hyperref`, and it works perfectly. But I want that when I click in link generated by the package, the destination of the link, the figure or the equation, stays centralized on the screen, not at the extremes. How could I do this?


title: Customization of the title slide in a beamer presentation

text: I'm using `CambridgeUSnew` beamer theme. And I need to add additional information between `author` text and `date` text. At this point I found only one working solution: add this text into author text, like this               \title[]{Title Text}          \author[Author B.C.]{Author B.C. \\     \quad \\     \quad \\     some extra text 1 \\     some extra text 2 \\     \quad \\     some extra text 3     }          \date{date text}      But I don't like this solution. Is there any better way to customize title page?


title: Problem with \addkey as of v4.08 of glossaries

text: Having run TeX Live Utility today, glossaries was updated to the 30-July-2014 version (4.08). With this, a bug seems to have been introduced to the `\addkey` feature (run under both XeLaTeX and LuaTeX).               \documentclass[b5paper,11pt,twoside,one column,openright]{memoir}          \usepackage[bookmarks,colorlinks=true,linkcolor=blue,citecolor=blue,filecolor=black,urlcolor=blue,breaklinks=true, pdftitle={KKF},pdfauthor={KGF},unicode]{hyperref}         \usepackage[toc,xindy]{glossaries}          % Define "ic" key:     \glsaddkey*       {ic}% key       {\glsentrytext{\glslabel}ic}% default value       {\glsentryic}% command analogous to \glsentrytext       {\Glsentryic}% command analogous to \Glsentrytext       {\glsic}% command analogous to \glstext       {\Glsic}% command analogous to \Glstext       {\GLSic}% command analogous to \GLStext          \makeglossaries     \loadglsentries{glossfile}          %%% BEGIN DOCUMENT HERE     \begin{document}     \Gls{syllable} becomes \glsic{syllable}     \printglossary     \end{document}      Glossfile contains the following:               \makeglossaries     \newglossaryentry{syllable}{%     name={syllable},     ic={syllabic},     description={TO BE DEFINED}     }      The output now contains 'Syllable becomes @gls@user@icsyllabic' rather than 'Syllable becomes syllabic'. Any ideas as to what happened? I did want to revert to the previous version of the package to make sure the fault lay in the update, and read details at Is there a way to revert manually to earlier versions of a package? but didn't make any headway with it.


title: Beamer references are zero-indexed

text: I'm using `\bibliographystyle{amsalpha}` for my bibliography style since I read in this thread that that particular bibliography style allows the references to be more compact, which was correct. In addition, after reading through this thread, I used the workaround `\setbeamertemplate{bibliography item}{[\theenumiv]}`. My problem is that, curiously, the bibliography entries appear to be zero-indexed, as shown in this screenshot: ![](http://img707.imageshack.us/img707/6733/irk9.png) Any help would be appreciated.


title: How to track changes that need to be retranslated?

text: I often need to write multilingual documents. I usually put the translations into a macro like this, so that I can quickly render documents with either of the languages or both, but modify the syntax if necessary.               \text{This is the English translation.}{这是中文的发言。}      I focus on the English primarily, then add the other language latter and get help with challenging parts. The problem is, sometimes I will go back through the document, making many small corrections, it is difficult to remember which parts were changed and thus require and updated translation. Is there any tool for keeping track of the changes occurring to the English and corresponding updates to the other language?


title: Mysterious problem with ps2pdf in texlive 2013

text: The following code comiled fine in texlive 2012, but gives me an error now:               Error: /typecheck in --restore--     Operand stack:        --nostringval--   --nostringval--   --nostringval--   502.75   80.6952   512.75   80.6952   507.661   138.665   497.661   138.665   138.665     Execution stack:        %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1910   1   3   %oparray_pop   1909   1   3   %oparray_pop   1893   1   3   %oparray_pop   1787   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   1839   11   5   %oparray_pop   --nostringval--   1823   11   5   %oparray_pop   --nostringval--     Dictionary stack:        --dict:1164/1684(ro)(G)--   --dict:1/20(G)--   --dict:123/200(L)--   --dict:182/300(L)--   --dict:86/200(L)--     Current allocation mode is local     Last OS error: 2     Current file position is 136214     GPL Ghostscript 9.05: Unrecoverable error, exit code 1      What can be done about this?               \documentclass{beamer}          \usepackage{pstricks,pst-node}               \begin{document}                    \frame[shrink]{     \begin{pspicture}(-0.4,0.8)(21.2,13.4)          \rput[B](18.5,1){\rnode{verbtrace}{[ \_ ]}}          \rput[B](18.5,3){\rnode{vverbtrace}{V}}\nput[labelsep=2pt,ref=t]{0}{vverbtrace}{\!/\!/V}%               \ncdiag{vverbtrace}{verbtrace}               \end{pspicture}               }               \end{document}      **Edit:** This is the full example with correct positioning and sensible shrinking and resizing. LaTeX ok, but ps2pdf complains:               \documentclass{beamer}          \usepackage{pstricks,pst-node}          \newcommand<>{\rot}[1]{{\color#2{red!75!black}#1}}     \newcommand<>{\gruen}[1]{{\color#2{green!60!black}#1}}          \newcommand{\sliste}[1]{%     \mbox{%     $\left\langle\mbox{\scshape #1}\right\rangle$}%     }               \begin{document}                    \frame[shrink]{     \frametitle{Eine Beispielanalyse}     \parskip0pt     \resizebox{\linewidth}{!}{%     \psset{xunit=1cm,yunit=5.4mm}     %     \begin{pspicture}(-0.4,0.8)(21.2,13.4)     %\psgrid          \only<5-6,10-11>{     \pscurve[%showpoints=true,%     linecolor=green,arrows=<->](4.2,9.8)(7.725,11)(13,10)(16.4,7.6)(17.2,5.6)(16.6,3.6)     }          \rput[B](1,1){\rnode{zzm}{zum zweiten Mal}}     \rput[B](5,1){\rnode{dw}{die Weltmeisterschaft}}     \rput[B](8,1){\rnode{spurvf}{[ \_ ]}}          \rput[B](11,1){\rnode{errang}{errang}}          \rput[B](15,1){\rnode{clark}{Clark}}          \rput[B](16.5,1){\rnode{extractiontrace}{[ \_ ]}}          \rput[B](18.5,1){\rnode{verbtrace}{[ \_ ]}}          \rput[B](16.5,3){\rnode{vextractiontrace}{V}}\nput[labelsep=2pt]{0}{vextractiontrace}{\only<6-8>{\sliste{ \textit{nom} }}}     \nput[labelsep=2pt]{0}{vextractiontrace}{\only<9-11>{\!/\!/\gruen{V}\sliste{\textit{nom}}}}     \nput[labelsep=0pt]{0}{vextractiontrace}{\only<5>{/\!/\gruen{V}}}          \rput[B](18.5,3){\rnode{vverbtrace}{V}}\nput[labelsep=2pt,ref=t]{0}{vverbtrace}{\only<2>{\!/\!/\rot{V}}}%     \nput[labelsep=2pt]{0}{vverbtrace}{\only<8->{\sliste{ \textit{nom}, V/\!/\gruen{V} }}}               \rput[B](17,5){\rnode{vkomplex}{V}}\nput[labelsep=2pt]{0}{vkomplex}{\only<2>{\!/\!/\rot{V}}}%     \nput[labelsep=2pt]{0}{vkomplex}{\only<8->{\sliste{ \textit{nom} }}}     \rput[B](15,5){\rnode{npclark}{NP[\textit{nom}]}}          \rput[B](16,7){\rnode{vp}{VP}}\nput[labelsep=0pt]{0}{vp}{\only<2>{/\!/\rot{V}}}          \rput[B](11,3){\rnode{verrang}{\gruen<7-11>{V}}}          \rput[B](11,5){\rnode{errang_mvf_lr}{\rot<2>{V}}}     \nput[labelsep=2pt]{0}{errang_mvf_lr}{\only<7-11>{\sliste{ \alt<8->{\textit{nom}}{\ldots},  V/\!/\gruen{V} }}}          \rput[B](11,7){\rnode{errang_v1_lr}{V}}\nput[labelsep=2pt,ref=B]{0}{errang_v1_lr}{\only<2>{\sliste{ VP/\!/\rot{V} }}}          \rput[B](12.5,9){\rnode{vp2}{VP}}               \rput[B](8,5){\rnode{vspurvf}{V}}\nput[labelsep=2pt]{0}{vspurvf}{\only<3>{\sliste{ \textit{nom}, \textit{acc} }}}%     \nput[labelsep=0pt]{0}{vspurvf}{\only<4-5,11>{/\!/\gruen{V}}}     %     \rput[B](5,5){\rnode{np_dw}{NP[\textit{acc}]}}          \rput[B](6.5,7){\rnode{v'_vf}{V$'$}}\nput[labelsep=2pt]{0}{v'_vf}{\only<3>{\sliste{ \textit{nom} }}}%     \nput[labelsep=0pt]{0}{v'_vf}{\only<4-5,11>{/\!/\gruen{V}}}          \rput[B](1,7){\rnode{pp_zzm}{PP}}          \rput[B](3.25,9){\rnode{v'_vf_2}{V$'$}}\nput[labelsep=2pt]{0}{v'_vf_2}{\only<3,6>{\sliste{ \textit{nom} }}}%     \nput[labelsep=0pt]{0}{v'_vf_2}{\only<4-5,11>{/\!/\gruen{V}}}          \rput[B](7.725,12){\rnode{vp3}{VP}}          \pstriangle(1,1.8)(2.8,4.9)     \pstriangle(5,1.8)(3.4,2.9)          \psset{angleA=-90,angleB=90,arm=0pt}          \ncdiag{vextractiontrace}{extractiontrace}     \ncdiag{vverbtrace}{verbtrace}          \ncdiag{vkomplex}{vextractiontrace}     \ncdiag{vkomplex}{vverbtrace}          \ncdiag{npclark}{clark}     \ncdiag{vp}{npclark}     \ncdiag{vp}{vkomplex}          \ncdiag{verrang}{errang}     \alt<7>{     \ncline[linecolor=red,arrows=->]{verrang}{errang_mvf_lr}     }{     \ncdiag{errang_mvf_lr}{verrang}     }     \alt<2>{     \ncline[linecolor=red,arrows=->]{errang_mvf_lr}{errang_v1_lr}     }{     \ncdiag{errang_v1_lr}{errang_mvf_lr}     }          \ncdiag{vp2}{errang_v1_lr}     \ncdiag{vp2}{vp}          \ncdiag{vspurvf}{spurvf}     \ncdiag{v'_vf}{vspurvf}     \ncdiag{v'_vf}{np_dw}          \ncdiag{v'_vf_2}{pp_zzm}     \ncdiag{v'_vf_2}{v'_vf}          \ncdiag{vp3}{v'_vf_2}     \ncdiag{vp3}{vp2}               \end{pspicture}     }     \small     \pause     \begin{itemize}[<+->]     \item Verbbewegung im Kernsatz wie erklärt: Lexikonregel lizenziert V1-Verb     \item Kombination von Elementen in der Vorfeldprojektion ganz normal     \item Da Kopf im VF eine V-Spur ist, werden V-Informationen nach oben gegeben.     \item VF-Projektion steht zu Extraktionsspur im VK in Beziehung \only<6>{(auch Valenz)}     \pause     \item Mult-VF-LR lizenziert Verb, das eine Spur plus deren Argumente selegiert.     \item Dieses steht in Verbletztstellung und bildet einen Komplex.     \end{itemize}               }               \end{document}


title: Itemize environment within a tabular environment

text: I've got the following code:               \begin{tabular}{r|l}          {Column 1 content}&{\begin{itemize}              \item Column 2 content          \end{itemize}}     \end{tabular}      But for some reason, the editor I'm using to code - Latexian - keeps giving me errors at lines 3 and 4 of this code, stating > **LaTeX error: Something's wrong - perhaps a missing \item** > > Line 59: \item C In the PDF preview, the list displays without bullet points, but the table appears properly formatted. What does this error mean, and how can it be fixed?


title: What is required to use background layer as specified in Tikz manual?

text: The example in PGF/Tikz manual on the pp. 77-82 throws an error when incorporated into my simple org chart: `! Package pgf Error: Sorry, the requested layer 'background' could not be found. Maybe you misspelled it?.See the pgf package documentation for explanation.Type H <return> for immediate help.... \begin{pgfonlayer}{background}` Realizing that example was not self-contained I did search for `background` but could not see it being explicitly declared, maybe I am missing something.               \documentclass[10pt]{article}     \usepackage[landscape,paper=letterpaper]{geometry}     \usepackage{tikz}     \usetikzlibrary{trees}     \usetikzlibrary{shadings}     \tikzstyle{every node}=[draw=black,thin]          \begin{document}          \begin{figure}[!htb]     \begin{tikzpicture}[]         \node[anchor=south](Supervisor){Supervisor}[]              % Teammate and Subordinates         child{node {Teammate1}}         child{node {Teammate2}}         child{node {Teammate3}}         child{node {Teammate4}}         child{node {Teammate5}};              \begin{pgfonlayer}{background}             \clip[xshift=-1cm] (-.5\textwidth,-.5\textheight) rectangle ++(\textwidth,\textheight);             \colorlet{upperleft}{green!50!black!25}             \colorlet{upperright}{orange!25}             \colorlet{lowerleft}{red!25}             \colorlet{lowerright}{blue!25}             % The large rectangles:             \fill [upperleft] (Supervisor) rectangle ++(-20,20);             \fill [upperright] (Supervisor) rectangle ++(20,20);             \fill [lowerleft] (Supervisor) rectangle ++(-20,-20);             \fill [lowerright] (Supervisor) rectangle ++(20,-20);             % The shadings:             \shade [left color=upperleft,right color=upperright]([xshift=-1cm]Supervisor) rectangle ++(2,20);             \shade [left color=lowerleft,right color=lowerright]([xshift=-1cm]Supervisor) rectangle ++(2,-20);             \shade [top color=upperleft,bottom color=lowerleft]([yshift=-1cm]Supervisor) rectangle ++(-20,2);             \shade [top color=upperright,bottom color=lowerright]([yshift=-1cm]Supervisor) rectangle ++(20,2);         \end{pgfonlayer}              \end{tikzpicture}     \end{figure}          \end{document}


title: Combine rounded corners and arc

text: Is there a way to combine rounded corners and arc? If I try it like this, I always get "additional lines". I need the black shape (without lines on both corners) and the 180 degree rotated version.               \documentclass{standalone}     \usepackage{pgfplots}                      \usepackage{tikz}     \usetikzlibrary{shadows, shadows.blur, shapes, arrows, positioning, circuits.ee.IEC, decorations, matrix, intersections, patterns, shapes}   % Zusätzlich Libraries, werden standardmäßig nicht geladen     \pgfplotsset{compat=newest}                         \begin{document}               \begin{tikzpicture}          \begin{axis}[name=plot1, xmin=-3, xmax=3, ymin=-3, ymax=3, x=2cm, y=2cm, ytick=\empty, xtick=\empty,                 axis lines=none, disabledatascaling]                      \draw[-, thin, blue]{[rounded corners=20pt] (0, 1.6) -- (1.4, 1.6) -- (0, 2.6) -- (-1.4, 1.6) -- (0, 1.6)};                       \draw[-, thin]{[rounded corners=20pt] (0, 0.1) -- (1.4, 0.1) -- (1.4, 0.1) arc[start angle=0, end angle=180, radius=1.4] -- (-1.4, 0.1) -- (0, 0.1)};                                     \draw[-, thin, red]{[rounded corners=20pt] (0, -0.1) -- (1.4, -0.1) -- (1.4, -0.1) arc[start angle=0, end angle=-180, radius=1.4] -- (-1.4, -0.1) -- (0, -0.1)};                  \end{axis}               \end{tikzpicture}                 \end{document}      ![pic1](http://i.stack.imgur.com/I5AJq.png) Thanks, Konne.


title: Latex Error: 'Sweave.sty' not found?

text: I downloaded the most recent version of Miktex Basic Installer (2.9.5105). After following the Miktex's instructions, I began working through Nicola Satori's Sweave Tutorial. The R portion of example 1 worked fine, however, when I compiled the .tex file, I received the error below.               !Latex Error: 'Sweave.sty' not found      After spending hours pouring over numerous forums, I found the reason why I received this error and the likely reason that you're receiving this error as well. My answer below is the initial answer that I was looking for. Feel free to add comments and explanations, however, keep in mind that the instructions are simply to fix this error and allow Miktex to function properly when calling the Sweave package.


title: math environment again

text: This follows a previous post which can be found here.   I'm now trying to used that command but I get lots of compilation mistakes and I really don't understand where the problem comes from. This is how I'm using the command:               \documentclass{article}     \usepackage{mathtools}     \newcommand{\twopartdef}[3]{%        \left\{           \begin{array}{ll}               #1 & \mbox{if } #2 \\               #3 & \mbox{otherwise}           \end{array}        \right.     }     \begin{document}      %some text ...      \[      join^\sharp_{KSet_n}(\{ \alpha_1, \hdots, \alpha_p \}, \{ \beta_1, \hdots, \beta_q \}) =      \twopartdef{\{\alpha_1, \hdots, \alpha_p\} \cup \{\beta_1, \hdots, \beta_q\}}{p \leq n et q \leq n}{\top}      \]      %more text     \end{document}      Here are the main compilation errors:               Missing $ inserted     I've inserted a begin-math/end-math symbol since I think you left one out     ....     I've deleted a group-closing symbol because it seems to be spurious, as in `$x}$'..     ....     I can't figure out why you would want to use a tab mark here.     ....     A left brace was mandatory here, so I've put one in.     ....      I found that the problem is from this line (by commenting it)               \twopartdef{\{\alpha_1, \hdots, \alpha_p\} \cup \{\beta_1, \hdots, \beta_q\}}{p \leq n et q \leq n}{\top}      So I tried to put `$ $`, `lbrace rbrace` instead of `\\{ \\}` but it didn't change anything. I've used the same command for other definition and it work fine. What am I missing? Edit: I tried compiling the code above alone and it worked. So why doesn't it work with the remaining document?