title: Line numbers reset incorrectly using lineno package

text: Having a strange problem using lineno. The document I'm creating is a 24-page legal document. I'm numbering all the lines using lineno for easy reference. The line numbers need to be reset every page and it all works perfectly until page 17. From page 18 on, instead of line '1' being on the top of the page, it appears as the last line of the previous page. The only relevant code I can see are both in the preamble:               \usepackage{lineno}     ....     ....     ....     \pagewiselinenumbers     ....     \begin{document}      Problem with this question is I understand it may be hard to answer. I'm hoping someone else has had similar problems that they found the solution to.


title: Hyperref levels are embedded, aren't being reset

text: I'm using the hyperref package with a custom class, and I'm having a problem with hyperref not creating the tree correctly. What I expect to see is this:               + Section 1     ++ Section 1.1     ++ Section 1.2     +++ Section 1.2.1     +++ Section 1.2.2     ++ Section 1.3     + Section 2     ++ Section 2.1      But what I'm seeing instead is this:               + Section 1     ++ Section 1.1     ++ Section 1.2     +++ Section 1.2.1     +++ Section 1.2.2     ++++ Section 1.3     +++++ Section 2     ++++++ Section 2.1      I am guessing there is some kind of level counter that keeps track of what level of section, subsection, subsubsection, etc. the tree is on, and this just isn't being reset when I run `\clearpage` or when I create a chapter or section header. But I don't know how to reset it, and I don't know what kind of mechanism hyperref uses to keep track of this. I've been unable to figure out how hyperref does this on my own. How can I control hyperref's level "counter" from the Latex class level? Any help would be greatly appreciated.


title: Numbered equations with additional text part 2

text: I would like to have numerated equations with some additional text added, where the numbering automatically increases for any next equation, with the possibility to add a different text for any equation (or no text). This question is partially answered under "Numbered equations with additional text" Something like this (ennumereation should be flushed to the right): a=b (1.1) some text The next equation is is just numbered with no additional text b=c (1.2) And this one has a different text a=c (1.3) some other text


title: Insert chapters into letter document

text: I am writing an extensive letter document, and I would like to put a summary and a few chapters inside it. Is it possible to do that? Here my preamble:               \documentclass[boldsubject,italicsignature,smartindent]{letteracdp}     \usepackage[italian]{babel}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{layaureo}     \usepackage{lipsum}


title: nested diagrams in TikZ-cd

text: Since the last update, the following code does not compile anymore               \documentclass{article}     \usepackage{tikz-cd}     \begin{document}     \begin{tikzcd}     UL     \arrow{r}{{\begin{tikzcd}1\arrow{r}{a}&2\end{tikzcd}}}     &UR     \\     DL     \arrow{r}     &DR     \end{tikzcd}     \end{document}      with the error message > Package pgf Error: No shape named tikz@f@2-2-1 is known. The strange thing is that if there is only the first arrow, the code compile and gives the desired diagram. Moreover, if I use the syntax`\arrow[r, "{\begin{tikzcd}1\arrow{r}{a}&2\end{tikzcd}}"]` for the first arrow, the code does not compile even with only one arrow. This time the error message is > TeX capacity exceeded, sorry [grouping levels=255]. \bgroup Edit : the above code do not compile with pgf 3.0 and tikc-cd 0.9 (latest versions), but did compile with TeXLive 2013 and previous version of pgf and tikz-cd.


title: How to make the character è "work" in PlainTeX?

text: I'm using TeX with the plain format. On my keyboard there is the 'è' character (as well as é, ò, à, ù, ì). I'd like to make it work so that, when put è in the input file, TeX transforms it into `\`e`, i.e. the letter e with an accent. I think I have to change the character code of è and do something like that, but I don't know what to do exactly. Can you help me?


title: enumerated list in proof - margin, qed symbol

text: ![enter image description here](http://i.stack.imgur.com/IKNEJ.png) I have two questions. 1\. Can I delete the red-colored space? 2\. If I use enumerate in proof, QED symbol appears the next line of the end, as above. If I do not want to type manually \qedhere, should I use ntheorem?               \documentclass[a4paper]{article}     \usepackage[scale=0.75]{geometry}          \usepackage[english]{babel}     \usepackage[utf8x]{inputenc}     \usepackage{amsmath}     \usepackage{amsthm}     \usepackage{amssymb}     \usepackage{textcomp}     \usepackage{enumitem}     \setlist[enumerate]{nosep, label=(\arabic*)}          \theoremstyle{definition}     \newtheorem{lem}{Lemma}          \begin{document}          \begin{lem}     \begin{enumerate}     \item xxxx     \item yyyy     \end{enumerate}     \end{lem}     \begin{proof}     \begin{enumerate}     \item xxxxxxxxxxxxxxxxxxxxxxxxx. xxxxxxxxxxxxxxxxxxxxxxxxx. xxxxxxxxxxxxxxxxxxxxxxxxx. xxxxxxxxxxxxxxxxxxxxxxxxx. xxxxxxxxxxxxxxxxxxxxxxxxx. xxxxxxxxxxxxxxxxxxxxxxxxx.      \item yyyyyyyyyyyy. yyyyyyyyyyyy. yyyyyyyyyyyy. yyyyyyyyyyyy. yyyyyyyyyyyy. yyyyyyyyyyyy. yyyyyyyyyyyy. yyyyyyyyyyyy. yyyyyyyyyyyy. yyyyyyyyyyyy. yyyyyyyyyyyy. yyyyyyyyyyyy. yyyyyyyyyyyy. \end{enumerate}     \end{proof}          \end{document}


title: Conditional navigation bar on custom beamer theme

text: I'm trying to create a custom beamer template. However, I can't make the navigation bar to correctly behave in the `title page`. As shown in the image, where the navigation bar is supposed to be I get a white bar instead of the navigation bar. How can I make it totally invisible, so the background fill the entire frame? **And while maintaining the navigation bar on the other slides.** ![enter image description here](http://i.stack.imgur.com/eJY9N.jpg) As you can see, I tried several things:   * To rewrite the `\titlepage` command to automatically redefine the `headline` part, but it didn't work. **BONUS: I would really like a solution on these lines, as it allows me to also remove`footlines`, or other tweaks that need to be removed from the `title page`.** However, I can't control the expansion of the declared macros.   * To manually reset `headline` before calling it in the example. However, I would prefer an automatic solution.   * To add a condition (`\ifnum\thepage>1\relax`) on the headline to behave differently for the first page, but it removes the navigation bar from the first slide too. This was the closest to a solution I got. The code is:               \documentclass[compress]{beamer}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}          \usepackage{tikz}          \title{There Is No Largest Prime Number}     \date[ISPN ’80]{27th International Symposium of Prime Numbers}     \author[Euclid]{Euclid of Alexandria \texttt{euclid@alexandria.edu}}          %\usetheme{udp}          %% Color theme     \definecolor{frontColor}{RGB}{119,95,85}%MedianBrown     \definecolor{firstColor}{RGB}{148,182,210}%MedianLightBlue     \definecolor{secondColor}{RGB}{221,128,71}%MedianOrange          % Settings     \setbeamercolor*{title page header}{fg=white}     \setbeamercolor*{author}{fg=white}     \setbeamercolor*{date}{fg=white}     \setbeamercolor*{item}{fg=secondColor}     %color for the navigation bar     \setbeamercolor*{section in head/foot}{fg=white,bg=black}          %% beameroutertheme     %headline with navigation bar     % I need to change this to behave differently on the title page         \setbeamertemplate{headline}     {%     %\ifnum\thepage>1\relax%     \begin{beamercolorbox}[wd=\the\paperwidth,ht=0.6cm]{section in head/foot}       \begin{tikzpicture}         \useasboundingbox[fill=white](0,0) rectangle(\the\paperwidth,0.6);         \fill[secondColor] (0,0) rectangle(0.3,0.6);         \fill[firstColor] (0.35,0) rectangle(\the\paperwidth,0.6);         \node[anchor= west, white] at (0.3,0.3){\insertnavigation{0.85\paperwidth}};%       \end{tikzpicture}     \end{beamercolorbox}     %\fi     }          % Frame title     \defbeamertemplate*{frametitle}{udp}[1][]     {%     \vskip-1pt%skip after the begginning of the slide       \begin{beamercolorbox}[wd=\paperwidth,ht=0.6cm]{frametitle}        \begin{tikzpicture}         \useasboundingbox[fill=white](0,0) rectangle(\the\paperwidth,0.6);         \fill[secondColor] (0,0) rectangle(0.3,1);         \fill[firstColor] (0.35,0) rectangle(\the\paperwidth,0.6);         {\node[anchor=west, white,font=\large] at (0.4,0.3){\insertframetitle};}       \end{tikzpicture}       \end{beamercolorbox}     }               %% beamerinnertheme     \setbeamertemplate{background}{       \begin{tikzpicture}         \useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);         \fill[color=frontColor] (0,2) rectangle (\the\paperwidth,\the\paperheight);         \fill[color=secondColor] (0,0) rectangle(2.95,1.9);         \fill[color=firstColor] (3.05,0) rectangle(\the\paperwidth,1.9);         \ifnum\thepage>1\relax%           \fill[white,opacity=1] (0,0) rectangle(\the\paperwidth,\the\paperheight);         \fi       \end{tikzpicture}     }          % Title page     \defbeamertemplate*{title page}{udp}[1][]     {%       %do the title page       \vskip0.5cm%       \begin{minipage}[r]{\linewidth}         \begin{flushright}           % logo goes here         \end{flushright}       \end{minipage}       \vskip0.5cm%       \begin{minipage}[t][5cm][b]{\textwidth}         \begin{beamercolorbox}[wd=\the\paperwidth,leftskip=3cm,sep=8pt,#1]{title page header}           \usebeamerfont{title}\inserttitle\par%         \end{beamercolorbox}%       \end{minipage}       \vskip0.5cm%       \begin{minipage}[c][1.6cm][c]{\textwidth}         \begin{beamercolorbox}[wd=\the\paperwidth,leftskip=3.5cm,#1]{author}           \usebeamerfont{author}\insertauthor%         \end{beamercolorbox}          \vskip0.2cm%         \begin{beamercolorbox}[wd=\the\paperwidth,leftskip=3.5cm,#1]{date}           \usebeamerfont{author}\insertdate%       \end{beamercolorbox}       \end{minipage}       \vfill     }          % I also tried to fix the title page navigation bar by redefining the title command     %\def\oldtitlepage\titlepage     %\def\titlepage{\setbeamertemplate{headline}{test}\oldtitlepage}          % Items     \setbeamertemplate{items}[square]     \setbeamertemplate{sections/subsections in toc}[square]              \begin{document}     {% I tried to remove the headline here     \setbeamertemplate{headline}{}     \begin{frame}     \titlepage     \end{frame}     }     \section{First section}     \subsection{1}          \begin{frame}      \frametitle{There Is No Largest Prime Number}      \framesubtitle{The proof uses \textit{reductio ad absurdum}.}      \begin{theorem}     There is no largest prime number. \end{theorem}      \end{frame}          \begin{frame}      \frametitle{There Is No Largest Prime Number}      \framesubtitle{The proof uses \textit{reductio ad absurdum}.}      \begin{theorem}     There is no largest prime number. \end{theorem}      \end{frame}          \end{document}


title: How to put table in portrait mode?

text: I put the table as below but it is coming out in landscape mode....else it ll go last page.... I need to have the table in the middle of my document and it should be in portrait. The code I have used is below:               \documentclass{llncs}     \usepackage{rotating}         \begin{document}          \title{xyz}          \begin{sidewaystable}[p]          %\begin{table*}[ht!]     \small     \centering          \caption{Comparison on Data Intensive Computing and MapReduce paradigm in Hadoop}\label{table:MCCS}     \begin{tabular}{|p{2cm}|p{2cm}|p{1.5cm}|p{1.5cm}|p{2.5cm}|p{2.5cm}|p{1cm}|p{2cm}|}     \hline           %\begin{tabular}{ | l | l | l | l | l | l | l | l |}         \hline     abc & S & D & Al & Eff & Co & Fs \\ \hline          \hline     \end{tabular}     \end{sidewaystable}      %\vspace*{3cm}     \end{document}


title: Annotated Bibliography

text: I'm trying to create an annotated bibliography. Here's my `.tex` document:               \documentclass[12pt]{article}     \title{Annotated Bibliography}          \begin{document}          \nocite{*}          \bibliography{annotatedbib}          \end{document}      And here is the associated `.bib` document:               @Misc{hacker,         AUTHOR = `{Andrew Hacker'},         TITLE = {Is Algebra Necessary?},         HOWPUBLISHED = {New York Times},         MONTH = {July 31},         YEAR = {2012},         ANNOTE = {This article was published in the New York Times.},     }      No matter into which format I compile my `.tex` document, the annotation will not show up! Is there something that I'm missing?


title: Automatically stretch/fit contents of a paragraph

text: I am preparing my thesis and in many places I find the `Overfull/Underfull` warnings. Usually it is not very alarmingly visible in the document but sometimes it is painfully out of the specified margins. The MWE below exhibits one such instance:                   \documentclass[12pt]{report}         \usepackage[margin=1.25in]{geometry}         \usepackage{hanging}         \usepackage{doi}              \begin{document}              \begin{hangparas}{.3in}{1}         Aguero-Valverde, J., \& Jovanis, P. P. (2006). Spatial analysis of fatal and injury crashes in Pennsylvania. \textit{Accident Analysis \& Prevention, 38}(3), 618-625. \doi{10.1016/j.aap.2005.12.006}         \end{hangparas}              \end{document}      The end product is this: ![enter image description here](http://i.stack.imgur.com/gYltj.jpg) As can be seen the text overflows over the margin. How can I fix this? Is there a package or a command that can be used here to make the text "justified".


title: Prevent page break after \midrule in \longtable

text: I'm trying to tell `longtable` to only issue a page break at one specific point (by using `\\*`. Putting a `\midrule` anywhere near that point causes a page break after the midrule, and not where I want it to be. Consider this MWE:               \documentclass[12pt,a4paper]{article}          \usepackage{longtable,booktabs}          \begin{document}          \begin{longtable}{c}     bla \\* bla \\* bla \\* bla \\* bla \\* bla \\* bla \\*     bla \\* bla \\* bla \\* bla \\* bla \\* bla \\* bla \\*     bla \\* bla \\* bla \\* bla \\* bla \\* bla \\* bla \\*     bla \\* bla \\* bla \\* bla \\* bla \\* bla \\* bla \\*     bla \\* bla \\* bla \\* bla \\* bla \\*     bla \\*     Last line on this page \\     bla \\*%\midrule     bla \\*     bla \\* bla \\* bla \\* bla \\* bla \\* bla \\* bla \\*     \end{longtable}          \end{document}      It produces the correct result: > ![enter image description here](http://i.stack.imgur.com/rB2Ue.png) My problem comes up after uncommenting the `\midrule`: > ![enter image description here](http://i.stack.imgur.com/bqn9e.png) I tried preventing the page break after the `\midrule` by inserting `\nopagebreak` before and/or after it, but to no avail. P.S.: I know that right fter a rule would usually be a desired point for a page break in a table. However, I am using rules before and after certain lines to create some kind of seperator between blocks of rows. Thus, the rule must stay on top of the following line and the page brak should occur right after the last `\\*` _before_ the rule.


title: From CTAN to TeX Live and MiKTeX

text: A few months ago (before the release of TL2013) I uploaded a script to CTAN. What are the next steps (if any) that need to be taken to get the script or package part of the TeX Live and MiKTeX distributions?


title: How to Insert a Figure Properly?

text: I'm trying to insert a figure in my report, I get an error each time when I try this:               \begin{figure}[H]     \hfill{}\includegraphics[width=15cm,height=16cm,bb = 0 0 200 100, draft, type=eps]{\string"C:/Users/Nectarys/Desktop/bur/rapports/tex/images/cu_global_initial\string".png}\hfill{}     \caption{Diagramme de cas d'utilisation global initial}     \end{figure}      Using this, I get a void rectangle containing the path.


title: Leveraging a dynamic preamble to generate multiple output formats

text: # Background The diagram below shows an architecture for generating books using a dynamic preamble. The top part of the image shows the database relations between a book theme and its preamble. The top set of numbered items represent:   1. A LaTeX _snippet_ , later collated into a preamble, stored in a table.   2. Various snippets controlling aspects of the final document (e.g., colours, fonts, layout).   3. A _theme_ comprised of a default set of snippets (e.g., **A** , **B** , & **C** below). When the user selects a theme, a database query dynamically creates a preamble. The user can select a theme then tweak it by overriding the default snippets, as illustrated by the browser wire-frame (i.e., palette, font, photo, etc.). ![System Architecture](http://i.stack.imgur.com/adt2B.jpg) # Output Format The user creates a book as shown in the diagram. The system performs the following actions when the user clicks the "download" button:   1. Generates an XML document to gather the information for the book.   2. Dynamically creates the LaTeX preamble based on theme and tweaks.   3. Transforms the XML into a `.tex` file, injecting the LaTeX preamble.   4. Calls `pdflatex` to create a `.pdf`, complete with multiple indexes, table of contents, etc.   5. Returns the PDF to the user. Although the LaTeX preamble is almost all database-driven, parts are coded in XSLT, such as the `\documentclass` declaration. This is trivial to parameterize. # Question I would like to revise the architecture to allow users to create version of their documents for different devices and file formats (e.g., ePub, Mobi, Kindle, PDF). There is no math, but any images must be fixed on the page (i.e., they cannot float; here, definitely). Given the constraints of such an architecture, what approach should I take to convert the LaTeX documents for various eReaders such that the output produced is as high a quality as possible, and as true to the PDF layout as possible? # Efforts I have tried to convert the LaTeX, as it stands, directly to XHTML. This failed in spectacular ways using Hevea, latex2html, pandoc, and mk4ht (htlatex), mostly due to the dependency on the `.cls` file. My thoughts are that I'm going to have to do the following, at least:   * Allow the user to choose ePub format (prior to "clicks" in the diagram).   * Update the XSLT To remove the reference to the `.cls` file (for ePub format). After that...? # Source Code The .cls source code is part of an open source project. There is an example .tex file in the repository, along with example themes. Note that the images in the example `.tex` file are not in the repository, so generating a PDF will require minor modifications. Also, there is an installation script (`install.sh`) that drops dependent artefacts into specific directories. It probably won't work for other LaTeX installations without modification. # Errors This section describes the errors I encountered, from memory. ## pandoc Could not parse the `.tex` file. ## latex2html Could not find the `.cls` file, despite it being located in `TEXMFHOME`. The `pdflatex` program can generate the PDF without any issues. Generates many PNG images that are difficult to read, even though the content is mostly text: ![LaTeX2HTML Generated Image](http://i.stack.imgur.com/fSqyZ.png) ## mk4ht & htlatex Was able to generate HTML documents, but there appear to be some UTF8 encoding issues (the output is gibberish). There are also image scaling issues (i.e., the images didn't shrink). Not sure why the result is gibberish, as it is UTF8-encoded:               $ file -bi 22.tex      text/x-tex; charset=utf-8      ## hevea Requires the `.cls` file be converted to `.hva`. The `.cls` file has a dependency on `memoir` and `enumitem`, which aren't currently implemented. ## plastex Generates a number of warnings and some errors, such as:               ERROR: Error while expanding "csname" in /usr/local/texlive/2013/texmf-        dist/tex/latex/ccicons/ccicons.sty on line 31 (sequence item 4: expected        string or Unicode, @currname found)      Although it can initially find the `.cls` file, it cannot open it:               Traceback (most recent call last):       File "/usr/local/bin/plastex", line 108, in <module>         main(sys.argv)       File "/usr/local/bin/plastex", line 54, in main         tex.parse()       File "/usr/local/lib/python2.7/dist-packages/plasTeX/TeX.py", line 387, in parse         for item in tokens:     ...      # Alternative to LaTeX I am leaning towards a non-LaTeX solution. Since XML and XSLT are already part of the architecture, creating a book using DocBook might be an easier path at this point. There are a number of supporting tools, and DocBook readily converts to formats such as EPUB2, EPUB3, HTML, and more.


title: How to use predefined command in LNCS

text: When I check the `llncs.cls`, I find several commands that are already defined, for example:               \def\ackname{Acknowledgement.}       \def\appendixname{Appendix}       But how to use these commands? I tried with `\begin{ackname} ... \end{ackname}`, and it doesn't work. Thanks.


title: How to implement Circuit_macros on windows, with TexLive

text: I'm a Windows 7 user new to LaTeX, and I've gotten pretty decent at it rather quickly. I started with MiKTeX and then switched to TeX Live. As an electrical engineering undergraduate, I want to use `circuit_macros`. But despite my lengthy searches I can't seem to find a way to get the packages, or I guess they are m4 files, into TeX Live so I can mess around with it for writing homework. I have already downloaded the latest `circuit_macros` files. I should mention that I already tried downloading the package with the command               tlmgr install circuit_macros      and I keep getting an error called as:               package circuit_macros not present in package repository      I would be immensely appreciative if someone could point me in th right direction. I would also settle with having to reinstall MiKTeX if it yields a simpler solution to my problem.


title: Typesetting Supertabular in two columns

text: The problem is how to typeset **supertabular** in two columns. Really, I didn't understand the solution in Balancing long table inside multicol in LaTeX. As you see in the picture below, first, the **supertabular** begins from the right column and second, it's continue in next page, not in the other column. ![Supertabular in two columns - fail](http://i.stack.imgur.com/jrfev.jpg) Please, use XeLaTeX to launch the MWE:               \documentclass[11pt]{article}     \usepackage{xeCJK}     \setCJKmainfont{MS PMincho}          \usepackage{polyglossia}     \setmainlanguage[babelshorthands=true]{russian}     \newfontfamily\russianfont{Calibri}          \usepackage{array}     \usepackage[table]{xcolor}     \usepackage{supertabular}          \usepackage{ruby}     \renewcommand{\rubysep}{-0.1ex}          \usepackage{fmultico}          \begin{document}          \definecolor{文法字引表薄い}{rgb}{0.99,0.91,0.85}     \definecolor{文法字引表濃い}{rgb}{0.99,0.83,0.7}     \definecolor{文法字引表見出し}{rgb}{0.99,0.91,0.85}          \begin{multicols}{2}     \begin{center}     \rowcolors{1}{文法字引表薄い}{文法字引表濃い}     \setlength\extrarowheight{5pt}     \begin{supertabular}{|m{25mm}|m{57mm}|} \hline     \multicolumn{2}{|l|}{\cellcolor{文法字引表見出し} \bfseries\qquad \ruby{品詞}{ひんし}・Части речи} \\ \hline\hline     \ruby{動詞}{どうし} & \emph{глагол} \\ \hline     動詞I & \emph{глагол 1 группы} \\ \hline     動詞II & \emph{глагол 2 группы} \\ \hline     \ruby{自動詞}{じどうし} & \emph{непереходный глагол} \\ \hline     \ruby{他動詞}{たどうし} & \emph{переходный глагол} \\ \hline     \ruby{意思}{いし}\ruby{表示}{ひょうじ}動詞 & \emph{волевой (волеизъявительный глагол)} \\ \hline     \ruby{無}{む}意思表示動詞 & \emph{неволевой (неволеизъявительный) глагол} \\ \hline     \ruby{形容詞}{けいようし} & \emph{прилагательное} \\ \hline     い形容詞 & \emph{предикативное прилагательное} \\ \hline     な形容詞 & \emph{полупредикативное прилагательное} \\ \hline     \ruby{名詞}{めいし} & \emph{существительное} \\ \hline     \ruby{用言}{ようげん} & \emph{изменяемые части речи(動詞＋い形容詞)} \\ \hline     \ruby{体言}{たいげん} & \emph{неизменяемые части речи(名詞＋な形容詞)} \\ \hline     \ruby{副詞}{ふくし} & \emph{наречие} \\ \hline     \ruby{助詞}{じょし} & \emph{частица} \\ \hline     \ruby{接続詞}{せつぞくし} & \emph{союз} \\ \hline     \ruby{疑問視}{ぎもんし} & \emph{вопросительное слово} \\ \hline     \ruby{助数詞}{じょすうし} & \emph{счётный суффикс} \\ \hline     \multicolumn{2}{|l|}{\cellcolor{文法字引表見出し} \bfseries\qquad \ruby{品詞}{ひんし}の\ruby{形}{けい}・Формы частей речи} \\ \hline\hline     X\ruby{本}{ほん} & \emph{функциональная основа, X=1,2,3,4,5} \\ \hline     \ruby{普通形}{ふつうけい} & \emph{простая форма} \\ \hline     \ruby{丁寧形}{ていねいけい} & \emph{нейтрально-вежливая форма} \\ \hline     \ruby{辞書形}{じしょけい} & \emph{словарная форма} \\ \hline     ます\ruby{形}{けい} & \emph{нейтрально-вежливая форма; утв., наст-будущее время} \\ \hline     ない\ruby{形}{けい} & \emph{простая отрицательная форма} \\ \hline     た\ruby{形}{けい} & \emph{простая форма прошедшего времени} \\ \hline     て\ruby{形}{けい} & \emph{срединная форма на て} \\ \hline     たり\ruby{形}{けい} & \emph{репрезентативная форма глагола} \\ \hline     たら\ruby{形}{けい} & \emph{условная форма на たら} \\ \hline     \ruby{条件形}{じょうけんけい}　&　\emph{условная форма} \textbf{用言、４本＋ば} \\ \hline     \ruby{意向形}{いこうけい} & \emph{форма желательного наклонения} \\ \hline     \ruby{命令形}{めいれいけい} & \emph{форма повелительное наклонения} \\ \hline     \ruby{禁止形}{きんしけい} & \emph{запретительное наклонение} \\ \hline     \ruby{可能形}{かのうけい} & \emph{форма потенциального залога} \\ \hline     \ruby{受身}{うけみ} & \emph{форма страдательного залога} \\ \hline     \ruby{使役形}{しえきけい} & \emph{форма побудительного залога} \\ \hline     \end{supertabular}     \end{center}     \end{multicols}     \end{document}


title: TikZ - Recursive Arc Drawing

text: I'm trying to make Farey diagrams similar to those seen here (click) or the screenshot as follows, ![enter image description here](http://upload.wikimedia.org/wikipedia/commons/d/db/Farey_diagram_horizontal_arc.png) Namely, I'd like an example of the one seen on the **top of page 6**. From there I hope I can figure out how to do the rest. Anyway, I was wanting to do this using TikZ and I was hoping to have some **algorithm that could generate these images for n levels deep**. Here is my brute-force attempt:                   \documentclass[tikz]{standalone}         \begin{document}         \begin{tikzpicture}[scale=12]         \draw (0,0) -- (1,0);         \draw (0,0) -- (0,.618);         \draw (1,0) -- (1,.618);         \draw (1,0) arc (0:180:.5);              \draw [dotted] (0,0) -- (0,-.1) node[below]{$\frac{0}{1}$};         \draw [dotted] (1,0) -- (1,-.1) node[below]{$\frac{1}{1}$};              \draw (1,0) arc (0:180:.25);         \draw [dotted] (.5,0) -- (.5,-.1) node[below]{$\frac{1}{2}$};         \draw (.5,0) arc (0:180:.25);              \draw (1,0) arc (0:180:1/6);         \draw [dotted] (2/3,0) -- (2/3,-.1) node[below]{$\frac{2}{3}$};         \draw (2/3,0) arc (0:180:1/12);              \draw (1/3,0) arc (0:180:1/6);         \draw [dotted] (1/3,0) -- (1/3,-.1) node[below]{$\frac{1}{3}$};         \draw (1/2,0) arc (0:180:1/12);              \end{tikzpicture}         \end{document}      which yields ![enter image description here](https://88df6ea0630aed8027ff-0caf779119a6537399728d4d80523795.ssl.cf5.rackcdn.com/mpvhfcckshsq/page/14865612c48204d837a6357909cc64c42ddd82fe.jpeg) I have to admit, I'm a novice when it comes to TikZ and to programming in LaTeX. So any help, no matter how basic, would be appreciated. Thanks.


title: Entering infinite loop when defining command with a weird argument

text: I thought that I was following the model offered in Splitting delimited token list argument. The only difference is that I did not see the need for using the lower case trick.               \documentclass{article}          \usepackage[T1]{fontenc}     \usepackage{lmodern}          \usepackage{xparse}     \ExplSyntaxOn          \cs_new:Npn \__aedl_extract_first:w  #1=#2<#3> \q_stop { #1 }     \cs_new:Npn \__aedl_extract_second:w #1=#2<#3> \q_stop { #2 }     \cs_new:Npn \__aedl_extract_third:w  #1=#2<#3> \q_stop { #3 }          \tl_new:N \l_aedl_a_tl     \tl_new:N \l_aedl_b_tl     \tl_new:N \l_aedl_c_tl          \NewDocumentCommand{\showComponents}{ m }         {             \tl_set:Nn \l_aedl_a_tl \__aedl_extract_first:w   #1 \q_stop             \tl_set:Nn \l_aedl_b_tl \__aedl_extract_second:w  #1 \q_stop             \tl_set:Nn \l_aedl_c_tl \__aedl_extract_third:w   #1 \q_stop              \begin{tabular}{ccc}               a           & b            & c            \\              \l_aedl_a_tl & \l_aedl_b_tl & \l_aedl_c_tl               \end{tabular}         }          \ExplSyntaxOff     \usepackage{lipsum}     \begin{document}          \showComponents{headrulewidth=8pt<cmd>}          \end{document}      Here's the message after I break the infinite loop:               ! Interruption.     \showComponents ...aedl_extract_first:w #1\q_stop                                                        \tl_set:Nn \l_aedl_b_tl \_...     l.32     \showComponents{headrulewidth=8pt<cmd>}      But my command is entering into an infinite loop: as best I can tell, my command just keeps expanding `\q_stop`. One other point: `\showComponents` is supposed to be passed a comma delimited argument. That is, I want it to accept arguments like               \showComponents{headrulewidth=8pt<cmd>,fboxrule=2pt<dim>}      The third argument is meant to be a directive to determine whether a command should be redfined or a length should be set. But for the purposes of this MWE I stripped out the `\clist_map_inline` content. I know I could do this following @egreg 's solution on the same page as posted above, but I would like to know how to get this first attempt at defining my own command with weird arguments to work.


title: Gradient colour in tikz pgfplot marker

text: I'm trying to replicate the dual colours of the circles in this graph: ![enter image description here](http://i.stack.imgur.com/Afnvw.png)               \documentclass[tikz,border={40pt 12pt}]{standalone}     \usepackage{pgfplots}     \usetikzlibrary{plotmarks}     \begin{document}     \begin{tikzpicture}[trim axis left,trim axis right]          \begin{axis}[%     width=4.52083333333333in,     height=1.9359375in,     scale only axis,     xmin=0,     xmax=2,     xlabel={Partition},     ymin=0,     ymax=5,     ytick={1,...,5},     xtick={0,0.5,...,2},     ylabel={No Partition}     ]     \addplot [     color=red,     only marks,     mark=ball,     mark options={solid, line width=1pt},     forget plot     ]     table[row sep=crcr]{     0.752891515 1.119390244\\     0.918362178 1.65402439\\     0.794259181 4.527682927\\     1.10865344 0.515142276\\     1.621612495 1.002439024\\     };     \addplot [     color=black,     dashed,     line width=1pt,     forget plot     ]     table[row sep=crcr]{     0.6 2.64921945346413\\     0.7 2.44758628403132\\     0.8 2.24595311459851\\     0.9 2.04431994516571\\     1 1.8426867757329\\     1.1 1.64105360630009\\     1.2 1.43942043686729\\     1.3 1.23778726743448\\     1.4 1.03615409800167\\     1.5 0.834520928568865\\     1.6 0.632887759136058\\     };     \end{axis}     \end{tikzpicture}%     \end{document}      So far I have this: ![enter image description here](http://i.stack.imgur.com/HtjUx.png) Does anyone know of inbuilt gradient options for colouring? If not I'll settle for


title: How to create a text box that can be styled globally?

text: I'm writing a thesis and would like to add a box with text at the beginning of each chapter summarising main points. At the moment I'm using `framed` with `itemize` within it, which looks okay and does the job, but I would like to make it look nicer. At the moment it looks like that: ![http://i.stack.imgur.com/LdBiq.png](http://i.stack.imgur.com/5aerQ.png) But I would like something like this: ![http://i.stack.imgur.com/7C5Cd.png](http://i.stack.imgur.com/neJrJ.png) I'm quite new to LaTeX and suspect `framed` may not be the right environment here, but I'm a bit lost. What is the best way to present styled text boxes that can be modified globally?


title: Preventing page break after sectioning when body begins with a command?

text: I use the `acro` package heavily in my thesis, but I noticed that one section has a page break right after the section header. This appears to be a result of the first paragraph beginning with `\Ac{}` from the `acro` package. I know I could find some manual way to stop it (e.g., `\clearpage` right before the section header) but I don't want to do this, as the length of the document changes as I write/edit and this header won't always straddle the page (and new headers might straddle pages later). Is there a general fix for this problem? Here's my MWE:               \documentclass[12pt,letterpaper,oneside]{memoir}     \usepackage{acro}     \DeclareAcronym{TAFTS}{short=TAFTS, long=test acronym for \TeX{} Stackexchange}          \begin{document}     \chapter{Introduction}     \section{Filler Text}     Lorem \\      ipsum \\      dolor \\      sit \\      amet, \\      consectetur \\      adipiscing \\      elit. \\      Aenean \\      eu \\      faucibus \\      orci, \\      interdum \\      mattis \\      metus. \\     Pellentesque           \section{Example}\label{sec:example}     \subsection{The Sub-Example}\label{sec:the-sub-example}     \Ac{TAFTS} placed at the beginning of a sentence causes an inappropriate page break.     How can I prevent this without messing up the spacing between my subsection and           On the next page, you'll see that this does not happen if the paragraph does \emph{not} begin with the \texttt{\textbackslash{}Ac} command     \chapter{How it Should Work}     \section{Filler Text}     Lorem \\      ipsum \\      dolor \\      sit \\      amet, \\      consectetur \\      adipiscing \\      elit. \\      Aenean \\      eu \\      faucibus \\      orci, \\      interdum \\      mattis \\      metus. \\     Pellentesque           \section{Example of Proper Page-Breaking}     \subsection{The Good Sub-Example}     If I start with regular text and then insert my \acf{TAFTS}, the page breaks \emph{before} my new section.     I want this to happen with the text from section~\ref{sec:example}     \end{document}


title: "Description" for compactitem on the same page

text: Sometimes a have a construct like:               Some examples:     \begin{compactitem}     \item first     \item second     \item third     \end{compactitem}      With the `samepage` environment, I can enforce to put the entire list on one page, but I would like to have at least one of the items on the same page than "Some examples:". Is there a way to avoid a pagebreak there?


title: Disabling shortened citations in biblatex

text: I'm trying to disable short citations with the `biblatex` style `verbose- ibid`. It does everything I want, except for subsequent citations of the same work, where it only outputs a shortened citation (as confirmed by the manual). Is it possible to force `biblatex` to use the full citation each time the work is cited for the first time on a new page?


title: Reduce spacing between two (custom) paragraphs in scrreprt

text: I have defined a custom paragraph named `myparagraph` to use it as a small, unnumbered headline within my document. The reason is that I like the font of the `paragraph` heading, which is not as bold as compared to `\textbf{}`. Now I have just realized that each new use of `myparagraph` leaves a little bit too much vertical space, see the following picture with the gap in red: ![enter image description here](http://i.stack.imgur.com/ZEzk5.png) I need to control this gap, either globally, or locally between these two `myparagraphs` (maybe use half the value which is used now, or something close, in order to save space) by redefining `myparagraph` somehow. edit: If you got a different solution feel free to post it. It doesn't strictly have to be a redefinition of `paragraph`. edit2: The headlines should not be part of the TOC. They are supposed to be very simple headlines on the lowest level so to say, nothing more. The code is quite simple:               \documentclass[a4paper, 12pt, headsepline, headings=small,]{scrreprt}     \usepackage[onehalfspacing]{setspace}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{mathptmx}     \usepackage[a4paper,showframe]{geometry}     \geometry{left=2cm,right=5cm,top=2cm,bottom=2cm}     \usepackage[pangram]{blindtext}          \newcommand{\myparagraph}[1]{\paragraph{#1}\mbox{}\\[3pt]}          \begin{document}          \myparagraph{Test}     \Blindtext[1][1]     \myparagraph{Test}     \Blindtext[1][1]     \textbf{}     \end{document}      error log:               ! Undefined control sequence.     <argument> \subparagraphnumdepth


title: Trouble changing font size in figure legends

text: I'm trying to set the font size smaller in the legends for all of my figures and tables. The way I was trying to do this was using \AtBeginEnvironment but that doesn't seem to do anything at all. This is a minimal example of what is failing:               \documentclass[a4paper, 12pt]{report}          \usepackage{etoolbox}     \usepackage{relsize}          \AtBeginEnvironment{figure}{\smaller}          \begin{document}     \begin{figure}     \caption{whatever}     Text     \end{figure}          Outside text     \end{document}      Now that should, I think, make 'Text' appear smaller than 'Outside text' exactly as it would if you put the `\smaller` inside the figure environment. But it doesn't. I tried using the floatrow package instead but it messes up the ordering of the figure caption and the legend text and `\captionsetup` will only alter the caption itself not the legend text. Any help? Why does `\AtBeginEnvironment` not work?


title: How to get the square brackets that are involved in integration working

text: The clearest way to clearly show what I want is using an example: ![Integration](http://i.stack.imgur.com/KsZpe.png) I am looking for the Latex syntax that gives me the stuff on the right-hand side of the equation.


title: How to enumerate the items in line within the paragraph not each item in a separate line?

text: I want to have the following:               A graph can be cut in several ways including      \begin {enumerate*} [label=\itshape\alph*\upshape)]     \item minimum cut, \item normalised cut and \item average cut.      \end {enumerate*}      In our project we have surveyed the Normalised Cut (Ncut)  algorithm for image segmentation.      A graph can be cut in several ways including 1) minimum cut, 2) normalised cut and 3) average cut. In our project we have surveyed the Normalised Cut (Ncut) algorithm for image segmentation.


title: whitespaces in alltt environment get merged

text: \begin{frame}{Beispiel Mergesort}         \begin{alltt}                 mergesort :: (Ord a, Trans a) => [a] -> [a]                      mergesort []   =  []                      mergesort [x]  =  [x]                      mergesort xs   =  sortmerge (process mergesort \# xs1)                                              (process mergesort \# xs2)                           where (xs1,xs2) = unshuffle xs         \end{alltt}     \end{frame}      I'm doing a beamer presentation and try to display some source code, but I'm loosing all intendation, all whitespaces get merged into a single space. (not only at the beginning of the lines, but also around the '=' characters) I don't know what I'm doing wrong. Can someone help? Cheers, Lukas


title: Add publisher to online source with biblatex/biber?

text: I was told to add a publisher for my online resources but I struggle at how I can add this information behind the auhtor. Is this possible with the "@ONLINE"? Or should I take an different style?               \documentclass[     ngerman,     draft     ]{scrreprt}          \usepackage[UTF8]{inputenc}     \usepackage[ngerman]{babel}     \usepackage[babel,german=quotes]{csquotes}     \usepackage[T1]{fontenc}     \usepackage{acronym}     \usepackage{url}     \usepackage[backend=biber]{biblatex}          \addbibresource{Bibliographie.bib}          \begin{document}          Lorem Ipsum \autocite{zdnetElke} Lorem Ipsum.     \printbibliography          \end{document}      Bibliographie.bib:               @ONLINE{zdnetElke,     title = {Virtual Private Cloud: Kompromiss zwischen Kosten und rechtlichen Anforderungen},     author = "{Elke Rekowski}",     publisher = {GZDNet},     urldate = {2014-03-19},     url = {http://zdnet.de/41549540/}     }


title: How to index without tagging every entry

text: Is there a way to index a long document without having to find every entry in text? I am using `\makeindex` which requires the insertion of `\index{xyz}` after every entry in text that I want indexed.


title: Beamer page numbering: Figure disappears

text: I am trying to get my frames numbered. I'm trying it with the command `\setbeamertemplate{footline}[frame number]` But it's not really working... I have a logo on my title page, which disappears with the above command. If I use `\begin{frame}[plain]` for my title page, the logo AND the section overview (I'm using the theme `Goettingen`) on the right disappear. Is there a way to fix this? Here's my code:               \documentclass[xcolor=svgnames, handout]{beamer}     \usecolortheme[named=MidnightBlue]{structure}      \usetheme{Goettingen}     \usepackage{array}     \usepackage{wrapfig}     \usepackage{graphics}     \usepackage{graphicx}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{amsthm}     \setbeamertemplate{navigation symbols}{}          \setbeamertemplate{footline}[frame number]          \mode<presentation>     {       \usetheme{Goettingen}        \setbeamercovered{transparent}     }          \title{title of the pres}     \subtitle{..}     \author{me}          \begin{wrapfigure}{r}{0.47\textwidth}       \vspace{60pt}       \begin{center}         \includegraphics[width=0.20\textwidth]{logo}       \end{center}     \end{wrapfigure}          \beamerdefaultoverlayspecification{}          \begin{document}          \bibliographystyle{plainnat}          \begin{frame}     \titlepage     \end{frame}          \section{Background}     \begin{frame}        first frame....     \end{frame}     \end{document}      I'm happy about any ideas :)


title: getting user-defined math function in proper font in beamer

text: When I use beamer, things like `\sin`, `\cos`, etc. appear in the sans-serif font. But if I say               \DeclareMathOperator{\lcm}{lcm}      and then use `\lcm` inside a math formula, it appears in the cmr font. How can I get it to appear in the sans-serif font like other math functions?


title: TeXLive 2011 - what's new, what is no longer available - i.e. what should be known before upgrading

text: According to http://www.tug.org/texlive/ TeXLive 2011 is almost released, so it's a good moment to initiate some early reports about it, especially:   * what it brings new to the table - e.g. killer features (packages?),   * what it takes from us - e.g. if you heavily depend on this or that, know that you'll have to go the other way,   * upgrade pitfalls - e.g. if you're XYZ distro user, as I, you must be aware of ... It will help others to make their minds about upgrading or delaying such decision for reasons stated in answers, e.g. describing some (hopefully they will be only minor) bothering problems.


title: Why is the final column of this table running off the page?

text: \begin{document}     \begin{exe}     \ex     \begin{tabular}{ l   l   l }     & + -naqa (diffuse) & + -nuqa (placer) \\     \hline     alli- `dig' & `knock over or destroy, to throw something to the floor' &    `destroy or make some construction collapse' \\     jari- `wash' &  `wash here and there' (as when clothing is so dirty, that one does not know where to begin, so starts just washing randomly) & `wash everything which is dirty' \\         k'uta- `crush' &    `hit something here and there thereby reducing it into various parts' & `hit (chancar) something and destroy it completely' \\      kut(a)-t'(a)-  & `return, go back'  `go and come back' (as when someone leaves and returns because he forgot something)  &  `return to one's original place (after some time)' \\     puri- `arrive' & `arrive at various places/houses' (as if homeless)' & `arrive with all one's things when one was previously living elsewhere' \\     sara- `go'  & `walk around as if lost'  &   `stay in a certain place' \\     taki- `kick' &  `step in various places' &  `step cautiously' \\     wali-ch(a)- `arrange, improve'  & `arrange or order something here and there'   `organize or arrange things which were in a bad condition' \\         wayu- `take something by the handle'    & `bring something from one place to another and back; to move something from hand to hand' & `put something (like a bag) on something' \\         wawa-cha- `give birth' &    `give birth in various places' (as certain animals may do) &    `give birth' \\         will(u)- `spill' &  `throw objects into the air haphazardly, as when one is urgently searching for something' & `throw objects from above to below' \\         \end{tabular}     \end{exe}          \end{document}


title: How do I provide/trigger the special support for letters in AUCTeX?

text: As you probably know, the `letter` document class has quite a few pieces of metadata that go along with it, e.g. `name`, `address`, `signature`, etc. It would be really nice if all of this was put into the document when I `C-c C-e RET letter RET RET` (create a skeleton `letter` document). Currently, the above command produces               \documentclass{letter}          \begin{document}     ?     \end{document}      where `?` is the cursor position. * * * This support already _seems_ to be in place via `.../auctex-<ver,11.86>/style/letter.el`, but I don't know how to trigger it. A search of AUCTeX manual for `letter` doesn't turn up anything useful, either (at least not that I could find). How can I trigger this functionality (maybe hooking it onto the command above which _seems_ appropriate)? `TeX-add-style` doesn't have very good documentation. (It is used in `letter.el`.)


title: Shift a figure element more to the left corner

text: How can I put the image more to the left page side to have more space for it?               \begin{figure}[!htb]     \centering     \includegraphics[width=0.9\textwidth]{timetable}     \caption{Zeitplan}     \label{fig:timetable}     \end{figure}      thanks for your answer


title: Too much space between title lines? Vspace does not work

text: I want to create a beamer presentation and I have the following code:               \documentclass{beamer}          \title[Value at Risk, Name1, Name2{\&} Nam3]{Calculate the Value at Risk \tiny \\using the Delta-Normal model, nonparametric methods,\\ MonteCarlo simulations and historical sim                    University\\     \vskip1em          Chair\\     Chairholder: Name\\     Supervisor: Name\\     %\vskip1em     %\vskip1em     \definecolor{darkblue}{RGB}{12,013,148}     \textcolor{darkblue}{\textit{Course description}}           \small     Place, July 2013\\          \footnotesize     \textit{$^1$$^{, 2}$ Master ,  Semester}}     %\textit{$^2$ Master,  Semester}}     \normalsize               % Comment the following command, if you don't want, that the pdf file starts in full screen mode:     \hypersetup{pdfpagemode=FullScreen}          %Start of the document     \begin{document}                \frame{         \frametitle{Table of Contents}     \begin{enumerate}[\bfseries \begingroup\color{blue} 1)\endgroup]     \item Test     \item Test     \end{enumerate}               }     \end{document}      So now, you see the title is very long and I need some linebreaks, but the space is too much and if I try:                \title[Value at Risk, Name1, Name2{\&} Nam3]{Calculate the Value at Risk \tiny \\using the Delta-Normal model, nonparametric methods,\\ MonteCarlo simulations and historical simulations}      does not work. How can I get this? (I used the extra footnotes, since the normal in \authora did not work)


title: Problem with includestandalone of a tikz graphics

text: From my post (Circuitikz: arrows on the path and changing directions of arrow with variable resistor), Gonzalo Medina helped correct a variable resistor. However, when I use include standalone in my main doc, it won't compile. The separate tikz document compiles fine. The main doc is set up like:               \documentclass{article}     \usepackage{standalone}     \usepackage[american, cuteinductors]{circuitikz}     \usepackage{siunitx}          \makeatletter     \ctikzset{bipoles/vresistorm/height/.initial=.6}     \ctikzset{bipoles/vresistorm/width/.initial=.8}     \def\pgf@circ@vresistorm@path#1{\ifpgf@circuit@europeanresistor       \pgf@circ@bipole@path{tgeneric}{#1}\else\pgf@circ@bipole@path{vresistorm}{#1}       \fi}          \tikzset{variable resistorm/.style = {\circuitikzbasekey,         /tikz/to path = \pgf@circ@vresistorm@path, l = #1}}     \tikzset{variable american resistorm/.style= {\circuitikzbasekey,         /tikz/to path = \pgf@circ@bipole@path{vresistorm}{#1}, l = #1}}          \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vresistorm/height}}{vresistorm}{       \ctikzvalof{bipoles/vresistorm/height}}{\ctikzvalof{bipoles/vresistorm/width}}     {\pgf@circ@res@step = \ctikzvalof{bipoles/vresistorm/width}\pgf@circ@Rlen       \divide \pgf@circ@res@step by 12       \def\myfrac{.5}       \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}         \pgfstartlinewidth}            \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}       \pgf@circ@res@other = \pgf@circ@res@left       \advance\pgf@circ@res@other by \pgf@circ@res@step       \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\myfrac\pgf@circ@res@up}}       \advance\pgf@circ@res@other by 2\pgf@circ@res@step       \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\myfrac\pgf@circ@res@down}}       \advance\pgf@circ@res@other by 2\pgf@circ@res@step       \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\myfrac\pgf@circ@res@up}}       \advance\pgf@circ@res@other by 2\pgf@circ@res@step       \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\myfrac\pgf@circ@res@down}}       \advance\pgf@circ@res@other by 2\pgf@circ@res@step       \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\myfrac\pgf@circ@res@up}}       \advance\pgf@circ@res@other by 2\pgf@circ@res@step       \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\myfrac\pgf@circ@res@down}}       \advance\pgf@circ@res@other by \pgf@circ@res@step       \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}       \pgfusepath{draw}            \pgfscope       \pgfsetarrowsend{latex'}       \pgfpathmoveto{\pgfpoint{.7\pgf@circ@res@other}{-\pgf@circ@res@up}}       \pgfpathlineto{\pgfpoint{-.7\pgf@circ@res@other}{-\pgf@circ@res@down}}       \pgfusepath{draw}       \endpgfscope     }     \makeatother          \begin{document}          \begin{figure}       \centering       \includestandalone[width = 3in]{tikz}     \end{figure}     \end{document}      Then the standalone do is               \documentclass[convert = false]{standalone}          \usepackage[american, cuteinductors]{circuitikz}     \usepackage{siunitx}          \makeatletter     \ctikzset{bipoles/vresistorm/height/.initial=.6}     \ctikzset{bipoles/vresistorm/width/.initial=.8}     \def\pgf@circ@vresistorm@path#1{\ifpgf@circuit@europeanresistor       \pgf@circ@bipole@path{tgeneric}{#1}\else\pgf@circ@bipole@path{vresistorm}{#1}       \fi}          \tikzset{variable resistorm/.style = {\circuitikzbasekey,         /tikz/to path = \pgf@circ@vresistorm@path, l = #1}}     \tikzset{variable american resistorm/.style= {\circuitikzbasekey,         /tikz/to path = \pgf@circ@bipole@path{vresistorm}{#1}, l = #1}}          \pgfcircdeclarebipole{}{\ctikzvalof{bipoles/vresistorm/height}}{vresistorm}{       \ctikzvalof{bipoles/vresistorm/height}}{\ctikzvalof{bipoles/vresistorm/width}}     {\pgf@circ@res@step = \ctikzvalof{bipoles/vresistorm/width}\pgf@circ@Rlen       \divide \pgf@circ@res@step by 12       \def\myfrac{.5}       \pgfsetlinewidth{\pgfkeysvalueof{/tikz/circuitikz/bipoles/thickness}         \pgfstartlinewidth}            \pgfpathmoveto{\pgfpoint{\pgf@circ@res@left}{\pgf@circ@res@zero}}       \pgf@circ@res@other = \pgf@circ@res@left       \advance\pgf@circ@res@other by \pgf@circ@res@step       \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\myfrac\pgf@circ@res@up}}       \advance\pgf@circ@res@other by 2\pgf@circ@res@step       \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\myfrac\pgf@circ@res@down}}       \advance\pgf@circ@res@other by 2\pgf@circ@res@step       \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\myfrac\pgf@circ@res@up}}       \advance\pgf@circ@res@other by 2\pgf@circ@res@step       \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\myfrac\pgf@circ@res@down}}       \advance\pgf@circ@res@other by 2\pgf@circ@res@step       \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\myfrac\pgf@circ@res@up}}       \advance\pgf@circ@res@other by 2\pgf@circ@res@step       \pgfpathlineto{\pgfpoint{\pgf@circ@res@other}{\myfrac\pgf@circ@res@down}}       \advance\pgf@circ@res@other by \pgf@circ@res@step       \pgfpathlineto{\pgfpoint{\pgf@circ@res@right}{\pgf@circ@res@zero}}       \pgfusepath{draw}            \pgfscope       \pgfsetarrowsend{latex'}       \pgfpathmoveto{\pgfpoint{.7\pgf@circ@res@other}{-\pgf@circ@res@up}}       \pgfpathlineto{\pgfpoint{-.7\pgf@circ@res@other}{-\pgf@circ@res@down}}       \pgfusepath{draw}       \endpgfscope     }     \makeatother          \begin{document}     \begin{circuitikz}[scale = 2]       \draw                                                 (0, 0)             to[american voltage source, v^ = $e(t)$]        (0, 3)             to[R, l^ = $R_1$, -*]                           (1.5, 3)             to[variable american resistorm, l_ = $R_2(t)$]  (1.5, 1.5)             to[L, l^ = $i_L(t)$, i = $ \ $, -*]             (1.5, 0)             to[short]                                       (0, 0);       \draw                                                 (1.5, 0)             to[short, -*]                                   (3, 0)             to[C, l^ = $v_c(t)$, -*]                        (3, 3)             to[short]                                       (1.5, 3);       \draw                                                 (3, 3)             to[short]                                       (4.5, 3)             to[R]                                           (4.5, 0)             to[short]                                       (3, 0);               \draw                                                 (4.5, 2.75)             to[short, i = $f_v(c)$]                         (4.5, 2);                  \node at (1.25, .75) {$L$};       \node at (3.35, 1.5) {$C$};       \node at (3.1, 1.65) {$+$};       \node[align = left] at (5.1, 1.5) {Nonlinear \\ resistor};     \end{circuitikz}     \end{document}      When I compile the main document, I receive the following messages:               ! Undefined control sequence.     <argument> ...ipole@path{tgeneric}{##1}\else \pgf                                                        @circ@bipole@path{vresisto...     l.65 \begin{document}          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.          ! You can't use `macro parameter character #' in restricted horizontal mode.     <argument> ...pgf @circ@bipole@path{vresistorm}{##                                                       1} \fi } \par \tikzset {va...     l.65 \begin{document}          Sorry, but I'm not programmed to handle this case;     I'll just pretend that you didn't ask for it.     If you're in the wrong mode, you might be able to     return to the right one by typing `I}' or `I$' or `I\par'.          ! Extra }, or forgotten \endgroup.     <argument> ...c@bipole@path{vresistorm}{##1} \fi }                                                        \par \tikzset {variable r...     l.65 \begin{document}          I've deleted a group-closing symbol because it seems to be     spurious, as in `$x}$'. But perhaps the } is legitimate and     you forgot something else, as in `\hbox{$x}'. In such cases     the way to recover is to insert both the forgotten and the     deleted material, e.g., by typing `I$}'.      And it goes on and on.


title: problem with biblatex-chem bundle, babel, and inbook entry

text: I'm writing my thesis in French, and thus use the package babel. I have chosen the "chem-angew" bibliography style, and all is good so far, except for citations of chapters in books. Here is my bib entry for that peculiar reference:               @InBook{Lumb1978,     author = {G.F.Imbusch},     editor = {M.D.Lumb},     booktitle = {Luminescence Spectroscopy},     chapter = {1},     publisher = {Academic Press},     year = {1978},     pages = {27}     }      And here is what comes out : > G.F.Imbusch dans, Luminescence Spectroscopy, (éd. : M.D.Lumb), Academic > Press, 1978, chap. 1, p. 27 (cf. p. 7). It's all good, since "dans" means "in" in French. However, there should not be a comma after that "dans". How comes this is there and how do I remove it ?


title: Two column nomenclature

text: I want to achieve this for my nomenclature, making it two column with title on top of the columns and not part of the first one. I also want to keep my nomenclature's name changed to `Appendix` which I do with `\renewcommand{\nomname}{Acronyms}`. Can anyone help me "port" the code in this post to my needs?


title: How to automatically draw tree diagram of prime factorization with LaTeX?

text: I want to have a simple interface to _automatically_ draw tree diagrams of prime factorization. For example, by invoking the following code,               \PrimeTree{36}     \PrimeTree{90}     \PrimeTree{112}     \PrimeTree{612}     \PrimeTree{7875}     \PrimeTree{22230}      we will get the following output. ![enter image description here](http://i.stack.imgur.com/Zm6PM.png) ![enter image description here](http://i.stack.imgur.com/tm6zo.png) ![enter image description here](http://i.stack.imgur.com/QkTKv.png) ![enter image description here](http://i.stack.imgur.com/jAABn.png) ![enter image description here](http://i.stack.imgur.com/yBmjq.png) ![enter image description here](http://i.stack.imgur.com/g164Z.png) How to do this in LaTeX (PSTricks, TikZ, Asymptote, Metapost, etc)? My uneducated effort is as follows.               \documentclass[border=3pt,preview,varwidth,multi]{standalone}     \usepackage{pst-tree}     \psset{levelsep=1,treesep=1,nodesep=2pt}               \begin{document}          \preview     \psTree{\TR{36}}         \Tcircle{2}         \psTree{\TR{18}}             \Tcircle{2}             \psTree{\TR{9}}                 \Tcircle{3}                 \Tcircle{3}             \endpsTree         \endpsTree     \endpsTree     \endpreview          \preview     \psTree{\TR{90}}         \Tcircle{2}         \psTree{\TR{45}}             \Tcircle{3}             \psTree{\TR{15}}                 \Tcircle{3}                 \Tcircle{5}             \endpsTree         \endpsTree     \endpsTree     \endpreview          \preview     \psTree{\TR{112}}         \Tcircle{2}         \psTree{\TR{56}}             \Tcircle{2}             \psTree{\TR{28}}                 \Tcircle{2}                 \psTree{\TR{14}}                     \Tcircle{2}                     \Tcircle{7}                 \endpsTree             \endpsTree         \endpsTree     \endpsTree     \endpreview          \preview     \psTree{\TR{612}}         \Tcircle{2}         \psTree{\TR{306}}             \Tcircle{2}             \psTree{\TR{153}}                 \Tcircle{3}                 \psTree{\TR{51}}                     \Tcircle{3}                     \Tcircle{17}                 \endpsTree             \endpsTree         \endpsTree     \endpsTree     \endpreview          \preview     \psTree{\TR{7875}}         \Tcircle{3}         \psTree{\TR{2625}}             \Tcircle{3}             \psTree{\TR{875}}                 \Tcircle{5}                 \psTree{\TR{175}}                     \Tcircle{5}                     \psTree{\TR{35}}                         \Tcircle{5}                         \Tcircle{7}                     \endpsTree                 \endpsTree             \endpsTree         \endpsTree     \endpsTree     \endpreview          \preview     \psTree{\TR{22230}}         \Tcircle{2}         \psTree{\TR{11115}}             \Tcircle{3}             \psTree{\TR{3705}}                 \Tcircle{3}                 \psTree{\TR{1235}}                     \Tcircle{5}                     \psTree{\TR{247}}                         \Tcircle{13}                         \Tcircle{19}                     \endpsTree                 \endpsTree             \endpsTree         \endpsTree     \endpsTree     \endpreview     \end{document}      In order to appreciate your effort, I can only offer the following! ![enter image description here](http://i.stack.imgur.com/Z5fHf.gif)


title: How to NOT print some of the sections in Table of Contents?

text: So basically I want to create a Table of Contents in my latex document (class - article). But I don't want the first half sections to be printed. For examples, suppose there are four sections in my document - Section 1, Section 2, Section 3 and Section 4. Then I want my TOC to look like this   1. Section 3 -- pagenumber   2. Section 4 -- pagenumber While I want to retain the section number and names in the main text. Thanks!


title: In Lyx how do I get chapters to start on odd pages

text: I'm using Lyx and I want the pdf output to print Contents, new chapters and bib on a odd page. How can I do this? What information do you require from lyx?   Class is Report. * * * > Document > Configuration > Document class > Class options > write > twoside,openright > Check that source code (view menu) start with > \documentclass[english,twoside,openright]{report} – Fran We are almost there!   Now My layout is   1. Title Page   2. Abstract // I'd want this on page 2.   3. Blank (pg2)   4. Contents (pg3)   5. Blank (pg4)   6. Chapter 1 (pg5) What I really want is   1. Title Page   2. Blank <<<< EXTRA BLANK Page   3. Abstract (p2)   4. Blank (pg3)   5. Contents (pg4)   6. Blank (pg5)   7. Chapter 1 (pg6) What info do you need? * * * Okay I've found a solution. I inserted Latex code (⌘L) `\cleardoublepage{}` before Abstract now it is beautiful!


title: How to plot a complicated multi-variable function in a tex document automatically, not just importing an image

text: I have the following Tex functions and I want to plot them in my tex thesis, but I don't know how. I mean, I want the Tex to draw the function, not just to include an external image to it.               y[\text{x$\_$},\text{m$\_$},\text{n$\_$}]\text{:=}\text{Abs}\left[1-\left(1-\left(\frac{x+1}{2}\right)^2\right){}^{\wedge}m\right]{}^{\wedge}n;          \text{F}[\text{x$\_$},\text{m$\_$},\text{n$\_$}]\text{:=}(-y[0,m,n]+(y[0,m,n]-1)x+y[x,m,n])/(1-2y[0,m,n])          \text{Plot}[\{\text{F}[x,0.2,0.5],\text{F}[x,1,5],\text{F}[x,1,10]\},\{x,-1,1\}]


title: How to explicitly set the color to transparent/nothing in the options of mdframed?

text: Is it possible to explicitly set the `backgroundcolor` option in `mdframed` package, so that the background stays transparent (or, let's say "empty")? It could be               \begin{mdframed}[backgrouncolor = ***]     Test     \end{mdframed}      with `***` = `no color`, `empty`, `{}` but none of those work. **Is it possible to explicitly set the color to transparent/nothing in the options of mdframed?** * * * ## edit To say it more explicitly, is there a value `***` such that               \begin{mdframed}[backgrouncolor = ***]     Test     \end{mdframed}      and               % assuming no global options have been set     \begin{mdframed}     Test     \end{mdframed}      are equivalent?


title: Mapping of symbol (say \alpha) to font + char-id (in ams/foobar.pfb)

text: ## Update: Per Yan's suggestion, currently reading: ctan.tug.org/ctan/macros/latex/doc/encguide.pdf ## Setup When I type $\alpha$ in LaTeX, this \alpha becomes mapped to some character inside of some foobar.pfb file. ## Question Where is this mapping stored? ## Context This is a followup to: Generating fonts of all LaTeX math symbols I have figured out that:               * I want *.pfb, not *.ttfs     * I can load *.pfbs into my Java display code and they work perfectly fine      Now, I need a way to map the various defines in ams math to the various characters in the various *.pfb files. ## Elegant Solution Given that the mapping is likely not in an easily parseable format, is there a way to get TeX to query it for me? I.e. I'm totally happy defining some macro of the form: \magicmacro{symbol-name} which then dumps out to output.log which *.pfb file and which character symbol-name maps to. Thanks!


title: Math mode in tables

text: I am trying to write notations like degree, micro etc in a table with math mode on. To form the table, i am using -               \usepackage{booktabs}     \usepackage{array}      But in my table when i type               $^\circ$      it gives out the same `($^\circ$)` as a result, where its supposed to give me a degree notation. Can anyone please tell me how to solve this? Thanks


title: position of the slash in hatted \slashed

text: So I want to denote the Dirac operator with a hat, and I tried both `\hat{\slashed{D}}` and `\slashed{\hat{D}}`: the first one has the $^$ rather distant to the $\slashed{D}$, while the second one has the slash much too to the left of the $D$, almost coincide the semi-vertical stroke of the letter $D$. Is there any way to adjust the position of the hat or slash?


title: What are the rules in typesetting mathematical fractions?

text: What are the rules for typesetting superscript, subscript and fractions (as in a/b but with an horizontal fraction bar)? I am centring the subscript on the baseline, the superscript on the cap height and the fraction bar on the x height. Latex appears to be doing that as well. What I haven't figured out is how to position the numerators and denominators relative to the fraction bar. I know the bounding box of the numerator and denominator, but how much spacing should there be with the fraction bar? I can access all the regular metrics of the font (ascender, descender, leading, cap-height, x-height). Edit: (based on appendix g) As far as I can tell, the distance between the fraction bar and the numerator/denominator box is three times the fraction bar thickness. It seems to me that this would not produce a symmetrical output if the font descent value is different from the ascent value minus the cap height value. I mean the apparent distance between the fraction bar and the bottom of the numerator text, and, the distance between the fraction bar and the top of the denominator text. Visually either the numerator or denominator would appear further away from the fraction bar even if both contain the same text.


title: How do I produce Theorems and equations which are numbered by hand?

text: I'd like to be able to write a LaTex document with numbered theorems and equations, but I would like _not_ to have them numbered automatically, but rather put in by hand. Ideally, I'd like to be able to write something like               \begin{thm-handnumbered}{3.1416}.       The number $\pi$ is rational.     \end{thm-handnumbered}          As a consequence,     \begin{equation-handnumbered}{2.718}     e^{\pi i} = -1.003+0.014 i.     \end{equation-handnumbered}      and so produce "Theorem 3.1416", and an equation numbered "(2.718)". (I can create a new theorem type for each numbered theorem (\newtheorem{thm-3.1416}...), but I've got a lot of them. I can handcraft a "thm-handnumbered" command, but it looks ugly...)


title: When should we use \DeclareMathSizes, \xxxstyle and font size changing macros (\tiny, \small, etc)?

text: Could you give me a complete overview when we should use `\DeclareMathSizes`, `\xxxstyle` (such as `\scriptstyle`, etc), and font size changing macros (`\tiny`, `\small`, etc)? I want this answer to be CW so all of you can collaborate the answer as complete as possible. You can elaborate any relevant aspects that you think they are important for most users.


title: Polar coordinates problem

text: I do not understand how it is interpreted by a specified angle when using polar coordinates. I prepared three examples in my MWE:                   \documentclass{article}      \usepackage{tikz}                      % TikZ and PGF picture           \usetikzlibrary{intersections}          \usetikzlibrary{calc}          \usetikzlibrary{positioning}           \usetikzlibrary{matrix,arrows,decorations.pathmorphing}       \usetikzlibrary{positioning}          \newdimen\XCoord     \newdimen\YCoord     \newcommand*{\ExtractCoordinate}[1]{\path (#1); \pgfgetlastxy{\XCoord}{\YCoord};}%          \begin{document}               \begin{figure}[htp]             \begin{tikzpicture}               \coordinate (A) at (0,0);               \coordinate (B) at (0,1);               \coordinate (C) at (1,1);               \node[left, color=blue] at (A) {A};               \node[left, color=blue] at (B) {B};               \node[right, color=blue] at (C) {C};               \draw (A) -- (B) -- (C);                       \draw [color=cyan] let \p1=(A), \p2=(B), \p3=(C),                     \n1={atan2(\y2-\y1,\x3-\x1)} in                     (A) -- (\n1:2cm);               \ExtractCoordinate{B};               \node [below] at (1cm,-2cm) {B $(\XCoord,\YCoord)$};               \ExtractCoordinate{C};               \node [below] at (1cm,-2.5cm) {C $(\XCoord,\YCoord)$};                       \end{tikzpicture}                   \begin{tikzpicture}               \coordinate (A) at (-90.58205pt, 119.0348pt);               \coordinate (B) at (-90.58205pt, 133.26117pt);               \coordinate (C) at (-40.43698pt, 119.0348pt);               \node[left, color=blue] at (A) {A};               \node[left, color=blue] at (B) {B};               \node[right, color=blue] at (C) {C};               \draw (B) -- (A) -- (C);                       \draw [color=cyan] let \p1=(A), \p2=(B), \p3=(C),                     \n1={atan2(abs(\y2-\y1), abs(\x3-\x1))} in                     (B) -- (74.161134732:2cm);               \draw[right, color=green] (B) -- (0:2cm);               \draw[right, color=red] (B) -- (45:2cm);                       \ExtractCoordinate{B};               \node [below] at (1cm,-2cm) {B $(\XCoord,\YCoord)$};               \ExtractCoordinate{C};               \node [below] at (1cm,-2.5cm) {C $(\XCoord,\YCoord)$};                       \end{tikzpicture}                  \begin{tikzpicture}               \coordinate (A) at (2, 2);                \draw[right, color=green] (A) -- (0:2cm);               \draw[right, color=red] (A) -- (45:2cm);               \draw[right, color=blue] (A) -- (90:2cm);               \draw[right, color=black] (A) -- (74.161134732:2cm);             \end{tikzpicture}          \end{figure}     \end{document}        * first example: everything works fine.    * second example: problem: In the following command:               \draw [color=cyan] let \p1=(A), \p2=(B), \p3=(C), \n1={atan2(abs(\y2-\y1), abs(\x3-\x1))} in (B) -- (74.161134732:2cm);      I tried to calculate the angle so I joined B to C. Unfortunately, unsuccessfully. I thought that atan2 function works wrong, so I replaced value in the variable \n1 by manually calculated angle, but again I did not connect the two points. I reached to the conclusion that I can not properly use polar coordinates, and so I tried to test everything in the third example. I expected the green line will be horizontal, but instead, the line is vertical. For illustration, I attach a picture: ![enter image description here](http://i.stack.imgur.com/J3SmF.png) Can you explain where I'm wrong?


title: Adjusting the caption of an algorithm2e code

text: I'd like to typeset the caption of an algorithm environment such that it is bold, fills the available width of the paper, and neither the caption nor the line numbers encroach into the margins. In the example, the caption is indented and encroaches to the margin. I know that I can set the width of the caption but setting the width of the caption doesn't remove the caption indentation. I also know how to decrease the caption's indentation, but, removing the caption indentation makes the line numbers encroach to the margins. How can I make the caption fill the whole width (without any indentation) and keep the line numbers from encroaching to the margins? I'd like to keep the caption a figure caption but I'm open to configuring the "algorithm2e" or "caption" packages.               \documentclass[10pt]{article}     \usepackage{showframe}     \usepackage[figure,noend,noline,linesnumbered]{algorithm2e}     \usepackage[font=bf,skip=\baselineskip]{caption}     \begin{document}     \begin{algorithm}[t]     Some algorithm step \;     \caption{Here is a long caption for an algorithm. I'd like to typeset the caption such that it is bold and fills the available width of the page without encroaching into margins.}     \end{algorithm}     \end{document}      ![enter image description here](http://i.stack.imgur.com/MURMa.png)


title: New list environment not working in class file

text: Sorry in advance for the length of this one.... The following MWE contains an enumerate environment I defined:               \documentclass{memoir}     \usepackage{multicol}     \usepackage{enumitem}          \newlist{argo}{enumerate}{1}         \setlist[argo,1]{label=\arabic*.}         \newcommand{\prem}{\item}         \newcommand{\conc}{\rule{.3\linewidth}{1pt}\\[0em]\vspace{-3ex} \item[C.]}          \begin{document}              \begin{argo}             \prem Blah                  \prem Blah                  \conc Blah         \end{argo}          \begin{multicols}{3}             \begin{argo}             \prem Blah                  \prem Blah                  \conc Blah         \end{argo}              \begin{argo}             \prem Blah                  \prem Blah                  \conc Blah         \end{argo}              \begin{argo}             \prem Blah                  \prem Blah                  \conc Blah         \end{argo}              \begin{argo}             \prem Blah                  \prem Blah                  \conc Blah         \end{argo}     \end{multicols}     \end{document}      The main thing I'm looking to achieve is an environment for typesetting arguments in premise-conclusion form, where a rule is automatically inserted to separate the premises from the conclusion. I've included `multicols` because columns are what seems to mess things up. Here is the PDF, with the list working as it should: ![enter image description here](http://i.stack.imgur.com/aCxpb.jpg) Once I embed this list definition into my .cls file, however, the behavior changes and the rules no longer properly scale to 1/3 line width. Like so: ![enter image description here](http://i.stack.imgur.com/RdoBD.jpg) Here is the custom `.cls` file I'm working with:               \NeedsTeXFormat{LaTeX2e}     \ProvidesClass{dkhandout}[2014/05/04 DK Handout]     \LoadClass[article,oneside,oldfontcommands]{memoir}          %%%%%LOAD FOLLOWING PACKAGES%%%%%     \RequirePackage[T1]{fontenc}     \RequirePackage[utf8]{inputenc}     \RequirePackage{geometry}     \let\footruleskip\undefined % makes memoir compatible with fncyhdr     \RequirePackage{fancyhdr}     \RequirePackage{tikz}     \RequirePackage{datetime}     \RequirePackage{etoolbox}     \RequirePackage{enumitem}     \RequirePackage{multicol}     %%%%%CLASS OPTIONS%%%%%%%%%%%%          \DeclareOption{10pt}{       \PassOptionsToClass{\CurrentOption}{memoir}     }     \DeclareOption{11pt}{       \PassOptionsToClass{\CurrentOption}{memoir}     }     \DeclareOption{12pt}{       \PassOptionsToClass{\CurrentOption}{memoir}     }     %% Fallback     \DeclareOption*{       \ClassWarning{myclass}{Unknown option '\CurrentOption'}     }     %%%%%DEFAULT CLASS OPTIONS%%%%%%%     \ExecuteOptions{10pt}          %%%%%PROCESS OPTIONS%%%%%%%%%%     \ProcessOptions\relax          %%%%%HEADER OPTIONS%%%%%%%%%%%          \pagestyle{fancy}     \lhead{\thetitle}     \rhead{Phil 164 - \ifnumcomp{\value{MONTH}}{<}{7}{Spring}{Fall} \the\year}%          \fancypagestyle{plain}{%       \lhead{\thetitle}%       \rhead{Phil 164 - \ifnumcomp{\value{MONTH}}{<}{7}{Spring}{Fall} \the\year}%     }          %%%%%DOCUMENT FORMATTING%%%%%%%         % Title flush left and compact spacing         \pretitle{\vspace*{-10ex}\flushleft\Large\bfseries}         \posttitle{\par\vspace{0em}}         \preauthor{\par\vspace{0em}}         \postauthor{\par\vspace{0em}}         \predate{\par\vspace{0em}}         \postdate{\par\vspace{5ex}}              % No paragraph indentation         \setlength{\parindent}{0pt}         \nonzeroparskip             % Blank date and author         \date{}         \author{}              % New argument environment "argo"         \newlist{argo}{enumerate}{1}         \setlist[argo,1]{label=\arabic*.}         \newcommand{\prem}{\item}         \newcommand{\conc}{\rule{.3\linewidth}{1pt}\\ \relax \vspace{-3ex} \item[C.]}          %%%%%END OF CLASS%%%%%%%%%%%%%     \endinput      Some tinkering gives me the vague impression that `fancyhdr` is to blame, but this is my first `.cls` and so I might have done something wrong at an even more basic level. So what is going wrong here? Why does the rule (and only the rule) get messed up when I put the list definition in a .cls file?


title: insert big images…cut in two parts, LaTeX

text: i would like to know how can i cut a figure in a way that some part is show in one page and the continuation in other page. Actually it just take the all figure to the next page and i get a lots of space empty that really looks ugly


title: Omitting the date when using \maketitle

text: I'm using the `\author` and `\title` commands to produce a title with `\maketitle`. I also know that there is a `\date` command to specify the date of my work. However, if I omit `\date`, `\maketitle` will produce the current date. How do I achieve that no date is displayed at all?


title: siunitx: aligning numbers by decimal points in tables doesn't work for bolded or italicized numbers

text: This is a follow-up question for Aligning numbers by decimal points in table columns. User lockstep provided this solution:               \usepackage{siunitx}     \begin{document}     \begin{tabular}{S[table-format=3.2]}     555 \\     7.77 \\     99.9     \end{tabular}      The accepted answer worked; but I subsequently found that it did not if the numbers are bolded in the table (i.e. within \textbf{}). In this case, everything is flushed left. I do need to use bold face in my case (to direct the user's eyes towards a particular column in a larger table). To give an example, below is a test table and the output.               \begin{table}        \begin{tabular}{@{}l S[table-format=3.2] S[table-format=3.2]@{}}               \toprule               \textbf{Foo} & \textbf{Normal} & \textbf{Bold}  \\               \midrule               foo1 & 111 & \textbf{111}\\               foo2 & 222.2 & \textbf{222.2}\\               foo3  & 3.33 & \textbf{3.33}\\               foo4  & 4 & \textbf{4}\\               foo5  & 5.5 & \textbf{5.5}\\               \bottomrule         \end{tabular}     \end{table}      Output: ![alt text](http://i.stack.imgur.com/gkntY.png) I checked the manual but didn't find anything about this. I suppose the presence of the markup confuses the parser to believe there cell is not a number, but this is mere speculation and I could be wrong. Thanks in advance for suggestions.


title: Section Titles, not the crossing next page

text: It's my code,               \documentclass[a4paper,twoside,openright,11pt]{scrbook}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{lmodern}     \usepackage[svgnames]{xcolor}     \usepackage{lipsum}     \usepackage[explicit]{titlesec}     \usepackage{tikz}          \titleformat{\section}[block]%             {\normalsize\bfseries\itshape\tikz[overlay] \shade[left color=red!20!yellow,right color=black!40!white] (0,-1ex) rectangle  (\linewidth,1em);}%     {\thesection}%                        {1em}%     {\color{Maroon}#1}          \begin{document}     \chapter{Chapter One}     \section{Section One}     \section{Section Two}     \section{Mass}     \section{Time}     \section{Velocity}     \section{Force}     \section{Section}     \section{Lorem}     \section{Badness}     \section{Underfull}     \section{Section One}     \section{The Basic Structure Of an Atom}     \section{Mass}     \section{Time}     \section{Section One}     \section{Section Two}     \section{Mass}     \section{Time}     \section{Velocity}     \section{Force}     \section{Section}     \section{Lorem}     \section{Badness}     \section{Underfull}     \section{Section One}     \section{The Basic Structure Of an Atom}     \section{Mass}     \section{Time}     \end{document}      Display... ![enter image description here](http://i.stack.imgur.com/HAX7Z.png) That is, at the bottom page **Section Titles** are not the crossing next page. I'm sure this is a duplicate of another question that I just can't find. So, does anyone know how to fix it.


title: Passing arguments to nested newcommands

text: I thought that doubling hashes was sufficient to pass arguments to nested `\newcommand`.               \newcommand{\notice}[1]{       \vspace{10px}       \textbf{#1:}       \begin{quotation}         ##1       \end{quotation}}          \newcommand{\hint}[1]{       \notice{Hint}     }      What am I doing wrong here? The above produces the following error: > "You can't use `macro parameter character #' in vertical mode."


title: Is it possible to make LaTeX retrieve date information from system clock?

text: Well, this question is pretty weird ;) I know TeX is strictly sandboxed, but I guess there is at least some possibility? After all, system clock (for instance, UNIX time on UNIX-like systems) is only 8 bytes or so in memory. I would be very impressed if retrieving date information in LaTeX is actually possible! :D That way I would be able to create such a template that I do not need to adjust the date of each new article...


title: How to capture the result of \StrSubstitute into a macro?

text: I have a macro, say defined as follows:               \edef \temp{A.input 1}      I want to replace the dot with hyphen and have the result being stored in `\mystart`. Something like that:               \edef \mystart{\StrSubstitute{\temp}{.}{-}}      `\show \mystart` should ouput `A-input 1`. I've messed up with many variants, but none of them works.


title: Using tables to typeset proof - how to align equal signs?

text: I'm a student teaching myself to use LaTeX (and related tools) to type up my homework. It's going great, and I'm already very happy with what I've been able to do so far. Though, I have questions. I'm trying to type up a proof with steps in one column and explanations in a second column, separated by a nice vertical bar. A two column table has gotten me most of the way there:               \documentclass[a4paper,12pt]{article}     \usepackage{amsthm}     \begin{document}     We want to show that -2 = 2.     \begin{proof}     \begin{tabular}{r|l}     $-2 = 2$ & assuming the conclusion \\     $(-2)^2 = 2^2$ & square both sides \\     $4$ = $4$ & as desired     \end{tabular}          \end{proof}     \end{document}      However, the equals signs in the left column don't line up. Ideally, I'd like to be able to line them up as I would in an `align` environment or similar. Can this be done? Moreover, I don't really like having to repeat the `$` on every row of the left column. Is there a way to automate that? Thanks in advance for any answers, this is my first question here too, so please let me know if I've accidentally violated any mores of this community.


title: How to plot a discontinuous function curve and diagram of Markov chain with TikZ?

text: Please apologize my ingnorance of tips to use for asking questions. I would like to realise the plots and the diagram like those shown on page 158, ![enter image description here](http://i.stack.imgur.com/MSvMX.png) 160 ![enter image description here](http://i.stack.imgur.com/EIBsf.png) and 161 ![enter image description here](http://i.stack.imgur.com/wMZsq.png) on this document Chaine de Markov. Any answers are welcome.


title: Add a new section-like level, which isn't subordinated by any other counters

text: Is possible to set up a doc structure level `newlevel`, which is not subordinated by any other counters like `section`, `subsection`, `subsubsection`, etc., that is, when the else sec counter is added 1, the new level counter does not change. So we get a document like this:               section 1: the first section          subsection 1.1: the 1st subsection of the fist section          subsection 1.2: the 2nd subsection of the fist section          newlevel 1: I          subsection 1.3: the 3rd subsection of the fist section          newlevel 2: Have          section 2: the second subsection of the fist section          newlevel 3: A          subsection 2.1: the 1st subsection of the second section          subsection 2.2: the 2nd subsection of the second section          subsection 2.3: the 3rd subsection of the second section          newlevel 4: Dream      The most essential reason why I want to implement these is I can get display newlevel's label and title in both TOC and Header.


title: Macro for typesetting acronyms

text: All-caps acronyms and brand names like IBM look better when typeset a little smaller than usual. My simple solution is the following macro:               \def\<#1>{{\small #1}}      It's used like here `\<IBM>` and `\<CACM>`. However, it does not work well in section titles and the like. One could use small caps instead but I find those likewise standing out too much. Any better ideas?


title: Opening a PDF URL with tilde character link using Google Chrome

text: I am using `hyperref` to create an url with tilde character link in a pdf document, as shown below:               \documentclass{article}     \usepackage{hyperref}     \begin{document}     \url{http://lyle.smu.edu/~tspell/jaws}     \end{document}      Clicking on it, with Acrobat Reader, works fine for Firefox and IE but it doesn't for Google Chrome. In the address bar/line in Google Chrome appears `lyle.smu.edu/%257Etspell/jaws` instead. The url is shown correctly if I copy and paste it from Acrobat Reader manually into Google Chrome’s address line, but it doesn't open. It only opens in Google Chrome if I type it directly in the address line. I've chosen to open Google Chrome as my predetermined navigator, when asked by the navigator. Any help to make it work on both Google Chrome and the others?


title: Table always goes to bottom of document?

text: > **Possible Duplicate:**   >  How to fix table position I'm defining a table in my document like so...               \begin{table}      \caption{my table}      \centering            \begin{tabular}{c llll c c c c}       \hline                 Stuff & \multicolumn {1}{ c }{  } & more Stuff       \end{tabular}       \label{table:nonlin}      \end{table}      The table itself is pretty big, takes up almost the entire page. I'm creating it between two blocks of text however when compiled into a pdf it appears to just "float" to the bottom of the document. Why is this happening? How do I correct it?


title: Using TikZ and psfrag

text: I use psfrag to replace tags in figures by LaTeX text and formulas. Recently I wanted to go one step further, lets say I have a figure that has two tags in it "a" and "b", I'd like to have a nice arrow going from "a" to "b", so my idea was to create nodes using psfrag               \psfrag{a}{\tikz[remember picture]\node (A){a};}     \psfrag{b}{\tikz[remember picture]\node (B){b};}      then import the figure and then add the arrow               \tikz \draw[->, remember picture] (A) -- (B) ;      needless to say (?) it doesn't work.....psfrag is doing some clever things in the background, but the nodes that have created are not available for me later... Any ideas on how I could either make psfrag work or get similar functionality (within my framework more-or-less)?


title: Place parentheses around superscript citations

text: To meet a journal's requirements I'd like to tweak my current bibliography in a REVTeX4.1 document to:   1. Put parentheses around my (superscripted) citations so they read `(1)`, `(4)`, and `(2,3,5)` rather than `1`, `4`, and `2,3,5`.   2. Put parentheses around each numbered reference in the bibliography so they all read similar to `(12)` rather than `12`. If possible, the bibliography list should be non-superscript while the in-text citations are superscript (not my rules... journal's request). My MWE is as follows:               \documentclass[a4paper,twocolumn,       %   A4 paper, two columns       nofootinbib,superscriptaddress,       %              aps,prb,citeautoscript, 10pt,         %   The prb style of RevTex uses superscript cross-references for citations       eqsecnum,notitlepage,showkeys]{revtex4-1}          \usepackage{hyperref}   % Hyperref likes to be the last package included but putting it last breaks figure references!     \begin{document}     The manuscript elements have been formatted for you with LaTeX.      References can be included such as \cite{R2006} or \cite{R2009}.     Multiple references are also handled \cite{R2007, R2002,CDCgirlGrowthCharts}.     \bibliographystyle{PAPER_IJAE_BIBTEX_plain}     \bibliography{PAPER_JSAE_template_BIBLIOGRAPHY}     \end{document}      With `PAPER_JSAE_template_BIBLIOGRAPHY.bib` containing:               @Article{R2007,        Author="Another, J.  and van Alphabet, B.  and Master, M. A. ",        Title="{{A}utomatic data is nice}",        Journal="Med Image",        Year="2007",        Volume="11",        Number="1",        Pages="35--46",        Month="Feb"     }     @mastersthesis{R2009,         author    = "Matthew W. Author",         title     = "Paper title here",         school    = "University of Virginia",         type     = "Master's thesis",         address  = "",         year      = "2007",         month    = "",         note     = "",     }     @online{CDCgirlGrowthCharts,       author = {{National Center for Health Statistics}},       title = {{CDC} Clinical Growth Charts},       year = 2000,       url = {http://www.cdc.gov/growthcharts/clinical_charts.htm},       urldate = {30/09/2010}       howpublished = {\url{http://www.cdc.gov/growthcharts/clinical_charts.htm}}      }     @article{R2006,        author = {Rabbit, Peter F  and Brown, J Charlie and Duck, Donald R},        title = {Factors of growth},        journal = {Journal of Surgery},        volume = {41},        number = {11},        pages = {1854-1858},        year = {2006}     }     @inproceedings{R2002,        author = {Kane, M. and Freed, Y.},        title = {Development for safety ({THUMS})},        booktitle = {Proceedings of conference},        year = {2002}     }      And my `PAPER_IJAE_BIBTEX_plain.bst` is really just a copy of `plain.bst` with a little tweak for formatting names - nothing that would affect the numbering (link to file here). I'm happy to make further changes to the .bst file, I just can't seem to narrow down the bit that affects what I'm trying to change. Any help appreciated. ![Showing un-parenthesised cites-bibs](http://i.stack.imgur.com/MJkHt.png)


title: Count in document used source references

text: I currently gathering some statistical information about my thesis for reporting purposes. One metric I want to determine is how many sources I have referenced. I have a BibTeX file with more than 150 sources, but I only use a subset in my thesis. Is there a way to count the used sources (the sources in the source-index, not the `\cite` commands). I don't use a number based short reference and I don't want to change my citation style. Is there a count-macro or something else to count referenced sources in LaTeX?


title: Shadings in head

text: I am currently trying to code in beamer the following image. So far I got the three `beamercolorbox` but I can't get the shaded background. Here is the aspect I want: ![enter image description here](http://i.stack.imgur.com/beu4f.png)               \documentclass[xcolor=dvipsnames,14pt]{beamer}     \usepackage[english]{babel}     \usepackage[latin1]{inputenc}     \usepackage{tikz}     \usetikzlibrary{positioning,shapes}     \usetikzlibrary{calc}     \setlength\fboxsep{0pt}     \setlength\fboxrule{0.5pt}     \setlength\parskip{0.75em}     \setlength\parindent{0pt}     \setbeamersize{text margin left=3mm,text margin right=3mm}{}     \setbeamerfont{section in head/foot}{size=\scriptsize}     \setbeamerfont{subsection in head/foot}{size=\scriptsize}     \setbeamerfont{date in head/foot}{size=\scriptsize}     \setbeamercolor{section in head/foot}{fg=black,bg=gray}     \setbeamercolor{subsection in head/foot}{fg=black,bg=gray}     \setbeamercolor{date in head/foot}{fg=black,bg=gray}     \setbeamertemplate{headline}{     \leavevmode\hbox{%     \begin{beamercolorbox}[wd=54mm,ht=3ex,dp=1ex,right]{section in head/foot}%     \usebeamerfont{section in head/foot}\insertsectionhead\hspace*{2ex}%     \end{beamercolorbox}%     \begin{beamercolorbox}[wd=65mm,ht=3ex,dp=1ex,right]{subsection in head/foot}%     \usebeamerfont{subsection in head/foot}\insertsubsectionhead\hspace*{2ex}%     \end{beamercolorbox}%     \begin{beamercolorbox}[wd=9mm,ht=3ex,dp=1ex,right]{date in head/foot}%     \usebeamerfont{date in head/foot}\insertframenumber{}\hspace*{2ex}%     \end{beamercolorbox}%     }\vskip0pt}          \begin{document}     \section{Section title}     \subsection{Subsection title}     \begin{frame}     \frametitle{Frame title}     some text     \end{frame}     \end{document}      Solution: In fact, I just had to put the shadings in a hbox and use `\hskip` and `\vskip`. Here is the solution:               \setbeamertemplate{headline}{     \leavevmode%     \hskip-1mm\hbox{%     \pgfdeclarehorizontalshading{beamer@topshade}{4ex}{     color(0mm)=(headsectionback1);      color(54mm)=(headsectionback2);     color(54.001mm)=(headsubsectionback1);      color(119mm)=(headsubsectionback2);     color(119.001mm)=(headpageback);      color(128mm)=(headpageback)}     \pgfuseshading{beamer@topshade}     }\hskip-128mm\vskip-4ex%     \hbox{%     \begin{beamercolorbox}[wd=54mm,ht=3ex,dp=1ex,right]{section in head/foot}%     \usebeamerfont{section in head/foot}\insertsectionhead\hspace*{2ex}     \end{beamercolorbox}%     \begin{beamercolorbox}[wd=65mm,ht=3ex,dp=1ex,right]{subsection in head/foot}%     \usebeamerfont{subsection in head/foot}\insertsubsectionhead\hspace*{2ex}     \end{beamercolorbox}%     \begin{beamercolorbox}[wd=9mm,ht=3ex,dp=1ex,right]{date in head/foot}%     \usebeamerfont{date in head/foot}\insertframenumber{}\hspace*{2ex}     \end{beamercolorbox}%     }\vskip0pt%     }


title: About memoir and titlesec incompatibility

text: In page 2 of the `titlesec` documentation, Javier Bezos writes > `titlesec` works with the standard classes and with many others, including > the AMS ones, and it runs smoothly with `hyperref`. Unfortunately, it is not > compatible with `memoir`, which provides its own tools with a limited subset > of the features available in `titlesec`. I don't use the `memoir` document class so I am not familiar with its features, but I've made a few simple tests (really few and simple) using it together with `titlesec` and couldn't detect any problems. To what extent can `titlesec` be safely used with `memoir`? Which exactly are the incompatibilities mentioned?


title: Using \sqrt in the denominator of the \frac command

text: Below is the following code that I am trying to use in math mode. When I do this it distorts the sqrt line and blends into the fraction line.               z=$\frac{ Estimate_{t} - Estimate_{t-1}} \sqrt{Var_{t} + Var_{t-1}}$      I don't know if it is a spacing issue with the `\frac` command or if I am missing a `{` some place. Any help would be appreciated.