title: \multirow - Long name breaking/ruining layout

text: When I use this `tabular` enviroinment, for some reason the second-lowest row gets messed up badly. Can anybody please tell me how to fix this?               \documentclass[11pt, a4paper, fleqn, parskip]{scrartcl}          \usepackage[utf8x]{inputenc}     \usepackage[ngerman]{babel}     \usepackage{mathtools, amssymb}     \usepackage{a4wide}     \usepackage{multirow}          \begin{document}     \begin{tabular}{|c|c|} \hline         $[a, b] := \{x \in \mathbb{R}: a \leq x \leq b\}$ & kompaktes Intervall \\ \hline         $(a, b) := \{x \in \mathbb{R}: a < x < b\}$ & offenes, beschr"anktes Intervall \\ \hline         $[a, b) := \{x \in \mathbb{R}: a \leq x < b\}$ & \multirow{2}{*}{halboffenes, beschr"anktes Intervall} \\         $(a, b] := \{x \in \mathbb{R}: a < x \leq b\}$ \\ \hline         $[a, \infty) := \{x \in \mathbb{R}: a \leq x\}$ \\ \multirow{2}{*}{abgeschlossenes, unbeschr"anktes Intervall} \\         $(-\infty, b] := \{x \in \mathbb{R}: x \leq b\}$ \\ \hline         $(a, \infty) := \{x \in \mathbb{R}: a < x\}$ & \multirow{2}{*}{offenes, unbeschr"anktes Intervall} \\         $(-\infty, b) := \{x \in \mathbb{R}: x < b\}$ \\ \hline     \end{tabular}     \end{document}


title: How to draw a matrix with some framed elements, and some arrows between two frames?

text: I will do a drawing work. It is a matrix which would emphasize some elements, as follow ![enter image description here](http://i.stack.imgur.com/ePN1r.png) I know the pgf's node `matrix` could easily add a frame to element, but how to add the arrow?


title: Automatically formatting a table from a file with a list of words

text: I have a list of ~1000 words in a text file. The words are listed in a text file `"my_words.txt"` with no breaklines as follows:               word1, word2, word3, etc.      I would like to display these words in a figure/table with vertical alignment (and central alignment within each column), i.e.               word1 word2 word3 word4     word5 word6 word7 word7     word8      where either I specify the number of rows or columns, or LaTeX figures them out from the width that I specify for the table. I thought the package datatool could help with this problem, but I can't get it to work. I tried:               \usepackage{datatool}     % ...          \begin{document}     % ...          \DTLsetseparator{,}     \DTLloaddb[noheader,keys={source,package,target,brokenpkg,impactset,brokensource}]{mytable}{full_concept_list.csv}               \begin{table}[htbp]       \centering       \DTLdisplaydb{mytable}      \caption{CSV Table test}     \end{table}      but I get the error:               Missing $ inserted      \DTLdisplaydb{mytable}      Why is datatool not working? Are there other tools more appropiate for this task?


title: Noindent in \thanks, left align

text: I am using the following command in WinEdt to have the corresponding author contact info at the footnote. I used `\\\` to have a new line since it was long. I have two problems. First I need to left align letter "C" of the "Corresponding author" with the letter "E" of Email in the footnote. Second, I should interchange *,a with a,* in the 2nd line after first Author Name. Thanks and sorry if the first version of my question was not clear.               \documentclass[12pt]{article}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{authblk}     \title {\bf  Title}      \author[,a]{Author Name\thanks{Corresponding author. Tel.: +0 (000) 000 0000 ext. 00000; fax: +0 (000) 000 0000.\\ E-mail: email@123.com}}          \author[b]{Author Name}     \affil[a]{Department of , University of , Address, BB, CC}     \affil[b]{Department of , University of , Address, BB, CC}          \date{\today}     \begin {document}     \maketitle     \end{document}      ![enter image description here](http://i.stack.imgur.com/zDscX.jpg)


title: How to turn off an environment (e.g. tikzpicture) for faster draft compiling

text: I'm currently writing my thesis and have been looking for ways to speed up compile time. I can shave off a lot of time by using draft mode so that images aren't processed, but I have several TikZ diagrams which also take some time to compile. Is there a way for me to put a switch in my header that can ignore processing the TikZ diagrams when I'm just checking my writing? For example, I'd just like to 'turn off' the `tikzpicture` environment when compiling drafts.


title: Differences between \addbibresource and \bibliography with biblatex's ids field

text: What exactly does `\addbibresource` do that `\bibliography` does not? I am aware of the advantages mentioned here which concern, for example, the use of an optional argument and the possibility of specifying remote resources. However, nothing I've come across to date really explains the following. The manual for `biblatex` explains a useful-sounding feature for users who want to change their citation keys without breaking existing documents: > ids field (comma-separated list of entrykeys) > > Citation key aliases for the main citation key. An entry may be cited by any > of its aliases and biblatex will treat the citation as if it had used the > primary citation key. This is to aid users who change their citation keys > but have legacy documents which use older keys for the same entry. This > field is consumed by the backend processing and does not appear in the .bbl. I took this to mean that adding an `ids` field containing the old key to a renamed entry in my `.bib` file would enable me to cite the entry with either the old key or the new one. However, I could not get this to work. Here is a minimal example showing the problem.               \documentclass{article}          \usepackage{filecontents}     \usepackage[backend=biber]{biblatex}       \bibliography{my}          \begin{filecontents}{my.bib}         @article{somebody-sgt,           ids       =   {someone-sgt},           author    =   {Somebody, Someone},           title     =   {Some Great Title},           journal   =   {Best Journal},           year      =   3019,           pages     =   {32--39},           volume    =   3,           number    =   4}     \end{filecontents}          \begin{document}          Here is some text with a citation \autocite{somebody-sgt}. Here is some more text using the old key \autocite{someone-sgt}.          \printbibliography          \end{document}      When I run this through `pdflatex`, `biber`, `pdflatex`, `pdflatex`, I get the following error message in the output:               LaTeX Warning: There were undefined references.          Package biblatex Warning: Please (re)run Biber on the file:     (biblatex)                question     (biblatex)                and rerun LaTeX afterwards.      Rerunning the compilation sequence makes no difference to either error or output: ![wrongful output](http://i.stack.imgur.com/EjrjH.png) I periodically returned to this problem but I just could not figure out any way to make it work. Nor could I figure out any plausible reading of the manual which would suggest the feature was designed to do something completely different. This has bugged me for a long time. So much so that I decided to ask this question. However, it turns out that unlike my initial code, the following code works as I'd expected:               \documentclass{article}          \usepackage{filecontents}     \usepackage[backend=biber]{biblatex}       \addbibresource{my.bib}          \begin{filecontents}{my.bib}         @article{somebody-sgt,           ids       =   {someone-sgt},           author    =   {Somebody, Someone},           title     =   {Some Great Title},           journal   =   {Best Journal},           year      =   3019,           pages     =   {32--39},           volume    =   3,           number    =   4}     \end{filecontents}          \begin{document}          Here is some text with a citation \autocite{somebody-sgt}. Here is some more text using the old key \autocite{someone-sgt}.          \printbibliography          \end{document}      which produces: ![rightful output](http://i.stack.imgur.com/QbHhW.png) So now I'm curious. The documentation mentions no specific requirements for using `ids` that I can find excepting the requirement to use `biber`. However, it seems to require `\addbibresource`. But, in that case, more is going on than is indicated in the answer to the question I referenced above. This is not a remote database, no optional argument is required. Really, the set up could not be much simpler. I am also hoping that I may learn why `\addbibresource` has to be so much more annoying to use than `bibliography`! This is basically why I have continued to use the latter - everything I'd read suggested the advantages of the former were not ones I currently had any use for, so the ease of using the latter trumped. I have a complex set up which involves loading quite a number of `.bib` files. This means that specifying them one at a time would be quite a pain. (I've not yet decided if it is worth the benefit of getting the ids feature to work.)


title: natbib - Citation in English and German

text: I am writing a document, which combines a German chapter (the intro) with several English chapters (the main document). Hence I would like to use the `natbib` in the intro, to provide a citation which is consistent with... Author 1 und Author 2 (Year) and afterwards the English version. I.e., the same article would for instance be quoted like this: > Intro: Fama und French (2000)   >  Main Part: Fama and French (2000) I read a couple of articles in this list and asked Google for help. But did not manage to find a solution, any ideas?


title: how to deal with multiple titles and multiple documents?

text: I am compiling my dissertation which is composed with several separate papers (with independent LaTeX code). I have a title for my dissertation and want to insert my individual papers with their own titles (different authors, etc., for each paper). Someone suggested use               \begin{document}     \include{paper1}     \include{paper2}     \end{document}      where `paper1` has the codes as               \begin{document}          \end{document}      But it doesn't solve my problem. For each individual latex code for the individual paper, I have title code outside of the `\begin{document}`. Any suggestion about how to insert the entire LaTeX code of a academic paper, A, into another academic paper, B, while remain everything not changed for A.


title: How to not have bold acronym, but still allow customization via enumitem package?

text: I use the `acronym` package to manage my acronyms. And I customize the horizontal and vertical indentation of the acronym list via the `setlist` command from the `enumitem` package. `\ac{MWE}` below.               \documentclass{article}     \usepackage{enumitem}     \usepackage{acronym}              \begin{document}              \setlist[description]{labelwidth=3cm, itemsep=2cm}       % 2 cm is just for illustration purposes          Here comes the acronym list, unfortunately the acronyms are in bold.           % Removing the bolding can be done by inserting the code from     % the "how-to-change-the-format-of-acronyms"  solution.     % but then the setlist customizations are ignored     %\renewcommand\acsfont{\normalfont}     %\makeatletter     % ... insert rest of code here     %\makeatother             \begin{acronym}         \acro{ATM}{Asynchronous Transfer Mode}         \acro{MWE}{Minimum Working Example}     \end{acronym}              \end{document}      The `acronym` packages bolds the acronym in the glossary list, which is not what I want. I tried to undo the bolding via the answer to the question How to change the format of acronyms?, and that works (after removing the dash). However, now my `setlist` customization is ignored. Is there an easy way to undo the acronym bolding, but still keep the convenience of the `enumitem` package?


title: How to increase/fit the width of x-axis to fit all points in pgfplots?

text: This is my code:               \documentclass{article}     \usepackage{pgfplots}          \begin{document}               \begin{tikzpicture}     \begin{axis}[scale only axis,         symbolic x coords={v1,v3,v4,v7,v8,v9,v10,v11,v15,v16,v17,v18,v20,v23,v25,v27,v28,v29,v30,v31},         symbolic y coords={1,2,3,Not in top 3},             xtick=data,         ytick=data]         \addplot[color=blue] coordinates {             (v1,3)             (v3,1)             (v4,1)             (v7,1)             (v8,Not in top 3)             (v9,2)             (v10,1)             (v11,2)             (v15,1)             (v16,1)             (v17,Not in top 3)             (v18,1)             (v20,Not in top 3)             (v23,2)             (v25,1)             (v27,Not in top 3)             (v28,1)             (v29,1)             (v30,Not in top 3)             (v31,1)         };     \end{axis}     \end{tikzpicture}          \end{document}      This is how it looks: ![enter image description here](http://i.stack.imgur.com/khmNw.png) How to make the plot fit properly?


title: Math Spacing in the presence of a trailing/non-trailing comma

text: I thought I knew how to use a `\hphantom{}` but don't know of an easy way to handle this case due to the comma. I want to get the text aligned for the `X` row. I added the appropriate `\hphantom{{}+1}` _after_ the comma on the `X` row and yet the spacing is not correct. If I add the `\hphantom{{}+1}` _before_ the comma, as in the `Z` row the spacing is ok, but I want the comma on the left. ![enter image description here](http://i.stack.imgur.com/FIzvz.png) But surprisingly, if I add an _additional phantom_ comma on the right hand side to _all three_ rows, then things align properly: ![enter image description here](http://i.stack.imgur.com/IdT9y.png) ## Questions:   * What is the appropriate `\hphantom` to use to adjust for the spacing issues caused by the comma?   * Why does adding an _additional phantom_ comma to _all three_ rows fix things?  # Notes:   * Yes I could add an additional alignment point just before the `that is` text, but I want the entire text to be able to wrap properly if the text is longer than the width of the column. ## Code:               \documentclass{article}     \usepackage{tabularx}          \begin{document}     \begin{tabularx}{\linewidth}{r@{}X}         $X$~ &represents $n = 4k, \hphantom{{}+1}$ that is \ldots,\\         $Y$~ &represents $n = 4k+1,              $ that is \ldots,\\         $Z$~ &represents $n = 4k \hphantom{{}+1},$ that is \ldots,\\     \end{tabularx}          \bigskip     But adding an additional phantom comma fixes the alignment:     \smallskip          \begin{tabularx}{\linewidth}{r@{}X}         $X$~ &represents $n = 4k,   \hphantom{{}+1,}$ that is \ldots,\\         $Y$~ &represents $n = 4k+1, \hphantom{,}$ that is \ldots,\\         $Z$~ &represents $n = 4k    \hphantom{{}+1}, \hphantom{,}$ that is \ldots,\\     \end{tabularx}     \end{document}


title: Manipulating list items

text: **Is there a way to get the n'th element of a list, e.g. an enumerate?** `Itemize`, `enumerate` and others are all wrappers for the `list` environment, defined in the LaTeX kernel. Regardless of the existence of the n'th element, I want to place the `item`s into a `tabular` environment. The first thing to do would be to prevent the list environment from printing the items. I couldn't exactly grasp the how `list` operates with `\item`, but I would guess calling `\item` does not store the contents of that item in somewhere? And I also guess that what I want to do requires some hooks, since the items are going to be placed arbitrarily in an arbitrary `tabular` environment? Right, I'm a bit confused. Further explanation: I want to create a multiple choice question environment with a flexible format. Look at here. {32} means 2 tabular environments, one with 3 and the other with 2 columns. I am modifying `choices` environment from the `exam` package.


title: An index of nested subitems, indented, and hyperlinked

text: # Background Looking to indent an arbitrary n-level hierarchy within an index and have hyperlinks for the final item, using the memoir class and pdfTeX 3.1415926-2.4-1.40.13 (TeX Live 2012). For example:               \index[classification]{Anthropoidea!Hominoidea!Hominidae!Homo!sapiens}      Should produce: ![mockup](http://i.stack.imgur.com/dNGlB.png) Where the 2 in "sapiens, 2" is hyperlinked back in the document (PDF). # Problem First, `makeindex` can only nest 3-levels deep. Second, `xindy` is incompatible with hyperref; from the man page: > In particular, this means that by default the LaTeX package "hyperref" will > create raw index files that cannot be processed with xindy. This is not a > bug, this is the unfortunate result of an intented [sic] incompatibility. It > is currently not possible to get both hyperref's index links and use xindy. # Question How would you create hyperlinked indexes that nest to an arbitrary depth? # Example Document A minimal document might resemble:               \documentclass{memoir}     \usepackage{filecontents}          \begin{filecontents*}{style1.xdy}     (markup-index :open  "~n\begin{theindex}~n"                   :close "~n\end{theindex}~n"                   :tree)     (markup-indexentry :open "~n            \sssssubitem "  :depth 5)     \end{filecontents*}          \long\def\lettergroup#1\item{\item\textbf}     \let\lettergroupDefault\lettergroup          \usepackage{makeidx}     \makeindex          \begin{document}     Start          \index{Anthropoidea!Hominoidea!Hominidae!Homo!sapiens}          End     \printindex     \end{document}       However, this does not produce the correct results, when run with:               pdflatex file.tex; texindy file.idx; pdflatex file.tex      # Related Links   * Creating an index with sub-sub-subentries   * Xindy: Encapsulations for Index   * How can I convince hyperref and xindy to play together nicely?   * How to use xindy with XeTeX/LuaTeX?


title: Tabbing in the \address section of the letter document class

text: I am writing a letter using LaTeX's `letter` template, in which I include my e-mail address and phone numbers in the `\address` section. I would like to use icons from the `marvosym` package instead of writing "E-mail:" etc. Further, I would prefer for the e-mail address and phone numbers to be aligned as in a table. Here is the code I try to use in the `\address` section:               \address{Kurt Han Peek \\ Piet Heinlaan 23 \\ 2341 SG  Oegstgeest \\ \begin{tabbing} \Letter \= \hspace{0.5em}\= kurt.peek@gmail.com \\ \Mobilefone \> \>06-14920959 \\ \Telefon \> \> (071) 517 7081 \end{tabbing}}      However, I get the error: `! LaTeX Error: Something's wrong--perhaps a missing \item.` in TeXworks. I suspect the `tabbing` environment can't be used in the `\address`, because it does work in the main text. I have also tried using a `tabular` environment which works, but the cells have some "padding", so the marvosym icons then are not left-aligned with the address above. Any ideas on how to solve this would be much appreciated. P.S. For the sake of completeness, here is the complete LaTeX code:               \documentclass{letter}     \usepackage{graphicx}     \usepackage[margin=2cm]{geometry}     \usepackage{marvosym}        \usepackage[pdfborder=0]{hyperref}          %\address{Kurt Han Peek \\ Piet Heinlaan 23 \\ 2341 SG  Oegstgeest \\ \Letter~\href{mailto:kurt.peek@gmail.com}{kurt.peek@gmail.com} \\ %\Mobilefone~0614920959 \\ \Telefon~  071 517 7081}          \address{Kurt Han Peek \\ Piet Heinlaan 23 \\ 2341 SG  Oegstgeest \\ \begin{tabbing} \Letter \= \hspace{0.5em}\= kurt.peek@gmail.com \\ \Mobilefone \> \>06-14920959 \\ \Telefon \> \> (071) 517 7081 \end{tabbing}}          \date{23 februari 2012}     \begin{document}     \begin{letter}{TNO \\ t.a.v. Maaike Blikslager \\ High Tech Campus 5 \\ 5656 AE  Eindhoven}     \opening{Beste ...,}     Graag wil ik solliciteren op de functie .... Het werk van de ...groep sluit goed aan bij interesses en carri\`eredoelen, ik en zou me verheugen om mijn kandidatuur persoonlijk met u te bespreken.           \begin{tabular}{r@{\hspace{1em}}l}       \Letter&\href{mailto:...@gmail.com}{...@gmail.com}\\                               \Mobilefone&06 14920959\\                                 \Telefon&(071) 517 7081\\ \end{tabular}          \begin{tabbing}     \Letter \= \hspace{0.5em} \= kurt.peek@gmail.com \\     \Mobilefone \> \>06-14920959 \\     \Telefon \> \> (071) 517 7081     \end{tabbing}          Bedankt voor uw tijd, en ik verheug me op uw reactie.          \closing{Met vriendelijke groet, \\     %\fromsig{\includegraphics[scale=0.5]{signature_kurt.jpg}} \\     \fromname{Kurt Peek}     }          \end{letter}     \end{document}


title: Level of "boldness" changeable?

text: In my document which I compile with `pdflatex` (Ubuntu 11.04 TeX Live package). I use the Sans Serif font. Some keywords should be printed **bold**. I use the `{\bf text}` construct for this. However, the bold printed keyword appear (to my taste) too bold, i.e. too fat. Is it possible to control the boldness of bold printed text?


title: Different page numbering in appendix?

text: How can I use an independent page numbering in the appendix, either with Roman or Arabic numberals as page numbers? (I.e. the first page of the appendix should start again with 1, as it is often done for the introduction and the main part of a long document, then typically using Roman numerals for the introduction.)


title: xdvi not showing pages of tex file

text: I am using the commands:               latex <filename>.tex     xdvi <filename>.dvi      The document is compiling fine but in the xdvik viewer only the first page is visible. I am unable to understand why is it happening. I think it is because of some error in the code. Can you point out the error I am making in the code? The images are not causing a problem, i.e after removing the code for the figure (image to be inserted) also I am not able to view the rest of the pages in xdvik.               \documentclass[a4paper,11pt]{article}     \author{Name}     \title{Doc Name}     \usepackage{graphics}      \begin{document}     % generates the title     \maketitle     \newpage     % insert the table of contents     \tableofcontents     \newpage          \section{Acknowledgement}     \paragraph{We wish to thank .....}     \newpage          \section{Abstract}     \paragraph{Our project is ....}          \begin{figure}[h]     \centering     \includegraphics{Name1.eps}     \caption{cap1}     \end{figure}          \begin{figure}[h]     \centering     \includegraphics{Name2.eps}     \caption{cap2}     \end{figure}          \section{Introduction}     \paragraph{....}          \section{Design Approach}     \paragraph{.....Aribitrary paragraph follows.Mrs. Southcott had recently attained her five-and-     twentieth blessed birthday, of whom a prophetic private in     the Life Guards had heralded the sublime appearance by     announcing that arrangements were made for the     swallowing up of London and Westminster. Even the     Cock-lane ghost had been laid only a round dozen of     years, after rapping out its messages, as the spirits of this     very year last past (supernaturally deficient in originality)     rapped out theirs. Mere messages in the earthly order of     events had lately come to the English Crown and People,     from a congress of British subjects in America: which,     strange to relate, have proved more important to the     human race than any communications yet received     through any of the chickens of the Cock-lane brood.     France, less favoured on the whole as to matters     spiritual than her sister of the shield and trident, rolled     with exceeding smoothness down hill, making paper     money and spending it. Under the guidance of her     Christian pastors, she entertained herself, besides, with     such humane achievements as sentencing a youth to have     his hands cut off, his tongue torn out with pincers, and his     body burned alive, because he had not kneeled down in     the rain to do honour to a dirty procession of monks     which passed within his view, at a distance of some fifty or     }          \section{Software Design}     \paragraph{.....Arbitrary paragraph follows.the latter, when every posting-house and ale-house could     produce somebody in ‘the Captain’s’ pay, ranging from     the landlord to the lowest stable non-descript, it was the     likeliest thing upon the cards. So the guard of the Dover     mail thought to himself, that Friday night in November,     one thousand seven hundred and seventy-five, lumbering     up Shooter’s Hill, as he stood on his own particular perch     behind the mail, beating his feet, and keeping an eye and a     hand on the arm-chest before him, where a loaded     blunderbuss lay at the top of six or eight loaded horse-     pistols, deposited on a substratum of cutlass.     }          \section{Hardware Design}     \paragraph{......}          \section{Conclusions and Future Work}     \paragraph{......}          \section{References}     \paragraph{}          \ldots{} The End     \end{document}


title: Highest resolution with ps2pdf following the dvi > dvi2ps > ps2pdf route

text: I would like to know the highest resolution that I can set in the conversion of a postscript file to its pdf file using `ps2pdf`. In **Ghostscript** help pages I see: **The default internal resolution for pdfwrite is 720dpi** This is achieved by a `-r720` with `ps2pdf`. Normally in my `dvi2ps` conversion I have a high resolution setting: `-D7200`. So can we use the same resolution with `ps2pdf`? Of course the final printout depends on the resolution that the printer allows. Thanks a lot...


title: Table width equal line width

text: I generated this table but it's width exceeds the line width as i am working in two column paper And i need it to fit only in one column, Any help ? ![enter image description here](http://i.stack.imgur.com/nKS0B.png)               \begin{table}[t]     \centering     \begin{tabular}{|c|c|c|}     \hline     Generated Cluster Number & Real Cluster Number & Ratio of mapped spikes \\     \hline              2 &          3 &     0.4233 \\     \hline              3 &          2 &     0.3545 \\     \hline              4 &          1 &     0.8463 \\     \hline              5 &          1 &     0.3432 \\     \hline              6 &          3 &     0.6345 \\     \hline              7 &          2 &     0.2349 \\     \hline              8 &          2 &     0.4267 \\     \hline     \end{tabular}     \label{tab:template}     \end{table}


title: LATEX image formatting giving problems with PNG

text: I am trying to include images into my latex code. I use the following code:               \begin{figure}[ht!]     \centering     \includegraphics[width=90mm]{fixed_dome1.png}     \caption{A simple caption}     \label{overflow}     \end{figure}      In the preview it comes out nicely. But when I export document to a pdf, the image gets blown up like this: ![enter image description here](http://i.stack.imgur.com/KzK9A.png) What is going wrong? I am using Latexlab.org for my project.


title: How to get my teletype (\tt) text to wrap to the next line, rather than run off the edge of the PDF?

text: > **Possible Duplicate:**   >  \texttt overfull hbox problem   >  How to automatically hyphenate within \texttt? Much of the LaTeX documents I write deal with computer-sciencey stuff that I like to put in monospace using either `\tt` or `\texttt`, but if the pieces of text that I wrap in teletype are toward the end of a line in the pdf, instead of breaking to the next line, they continue off the edge of the PDF. Is there a way to get this to break to the next line? A similar question to this regarding underlined text uses an extra package to do this. Is there a way for me to do this with the existing `\tt` command or is there some extra package that I will have to use? **Edit** - Here is an example of the problem:               Here is a bunch of text explaining all the intimate details of the oh so very     important research that I do. At about this point in my description, I would     like to reference the qualified name of an important method that I will then     go into a great amount of detail about,     so here it is {\tt fantasticPackageName.LongAndFancyClassName.importantMethodName()}      And the result: ![enter image description here](http://i.stack.imgur.com/PSCUh.png)


title: Allowing hyphenation in menu sequences

text: I've adapted Peter Grill's `\Menu` command in Create a command for 'menu sequences' to type menu sequences in some documents. It looks like hyphenation is not allowed inside these menu sequences and I'd like to allow it. How can I do it? As you can see from next code, hyphenation is working outside `\menu`               \documentclass[a5paper]{article}     \usepackage[english,catalan]{babel}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{lmodern}     \usepackage{tikz}     \usepackage{etoolbox}          \newtoggle{FirstOne}%     \newcommand*{\menu}[1]{%        \toggletrue{FirstOne}%        \foreach \x in {#1} {%           \iftoggle{FirstOne}{}{${}\rightarrow{}$}%           \texttt{\x}%           \global\togglefalse{FirstOne}%        }%     }%          \begin{document}     Configura la simulació per analitzar les següents \emph{Global Statistics}:              Configura la simulació per analitzar les següents \menu{Global Statistics}:     \begin{itemize}     \item \menu{Traffic Sink, Traffic Received (bist/sec).} Marca també la casella \menu{Generate scalar data} i selecciona \menu{sample mean} del menú desplegable.     \item \menu{Traffic Source, Traffic Sent (bist/sec).} Marca també la casella \menu{Generate scalar data} i selecciona \menu{sample mean} del menú desplegable.     \item \menu{Node Statistics, Ethcoax, Collision Count} i \menu{Transmission attempts}.     \item \menu{Node Statistics, Traffic Sink, Traffic Received (bist/sec).}     \item \menu{Node Statistics, Traffic Source, Traffic Sent (bist/sec).}     \end{itemize}     \end{document}      ![enter image description here](http://i.stack.imgur.com/TkRCl.png)


title: \texttt overfull hbox problem

text: I asked a question earlier about `\verb` and overfull hbox : In-line \verb -- overfull hbox problem And regarding the solution there, changed many of my `\verb`s to `\texttt{}`s. I have come up with a new problem now. An example:               \documentclass {article}     \begin{document}     \section {Introduction}              The entry point is in \texttt{TRCS.Main()} (\texttt{TRCS\char`\\TRCS.cs}).        The stateless (see \S 3.4.3) forms are started immediately, then another controller       is invoked, namely  \texttt{Workflow}.     \end{document}      Compiling this example will show my problem. `\texttt{Workflow}` causes an overflow, and a rather significant one. What should I do to alleviate the problem? Thanks in advance for your help!


title: how to auto bold a keyword?

text: I would like to auto bold some keywords in my file.tex without writing `\keyword`. For instance, I would like to bold all the word "example" in my text without doing anything. I don't know if it possible to do such a thing without using the `\newcommand{}` Does anyone help me please ? In my researchs I have read that the `\def` command might help. Thanks.                   \documentclass[a4paper,12pt]{memoir}     \usepackage[T1]{fontenc}          \usepackage{lipsum}     \nonzeroparskip     \begin{document}     \section     lorem non justo. Nam lacus libero, pretium at, lobortis vitae, ultricies et, tellus.     Donec aliquet, tortor sed accumsan bibendum, erat ligula aliquet magna, vitae     Nam     ornare odio metus a mi.          Nam     %how to autobold the word "Nam" ?     \end{document}


title: What is Metapost/Metafont and how can I get started using it?

text: Inspired by Why Metapost discrimination?, I'd like to come to know Metapost _far_ better than I do now. All I really know is that Metapost is a language for describing graphics, and Metafont is used specifically for describing fonts. So what is Metapost/Metafont?   * do Metafont/Metapost have similar syntax, as the names would suggest?   * are the tools to work with and compile them included in the popular TeX distributions?   * is there anything like a 'Hello World' for these systems? (Various examples with Metapost can be found throughout the site, but not so much Metafont, it seems.)   * can pdfTeX use fonts created with Metafont without too much hassle?   * (same for Metapost, but it would seem that the multiple examples on this site speak for themselves)


title: Separate bibliography in Roman numerals, citeable everywhere

text: I would like to have two bibliographies in my PhD thesis, where the first one lists my own publications that are included in the thesis, and appears in the beginning, numbered by roman numerals. The main body of the text should then be able to cite this bibliography, with the roman numerals, and the main bibliography with ordinary numerals. My best attempt this far, following Subbibliography with roman numbers and Biblatex and some other threads, has two faults: the citations to the first bibliography are numbered with latin numerals, and I cannot cite the first bibliography at all from within the main text (which is where I'd like to cite it). Minimal (not quite) working example:               \documentclass{article}     \usepackage[backend=biber]{biblatex}     \DeclareFieldFormat{Roman}{\RN{#1}}     % The following definition is copied from numeric.bbx     \defbibenvironment{roman-numerals}       {\list          {\printtext[labelnumberwidth]{%         \printfield{prefixnumber}%         \printfield[Roman]{labelnumber}}}          {\setlength{\labelwidth}{\labelnumberwidth}%           \setlength{\leftmargin}{\labelwidth}%           \setlength{\labelsep}{\biblabelsep}%           \addtolength{\leftmargin}{\labelsep}%           \setlength{\itemsep}{\bibitemsep}%           \setlength{\parsep}{\bibparsep}}%           \renewcommand*{\makelabel}[1]{\hss##1}}       {\endlist}       {\item}          \begin{filecontents}{\jobname.bib}     @misc{A01,       author = {Author, A.},       year = {2001},       title = {Alpha},     }     @misc{B02,       author = {Buthor, B.},       year = {2002},       title = {Bravo},     }     \end{filecontents}          \begin{filecontents}{\jobname-mine.bib}     @misc{Mine1,       author = {Me, M.},       year = {2001},       title = {Alpha},     }     @misc{Mine2,       author = {Me, M.},       year = {2002},       title = {Bravo},     }     @misc{Mine3,       author = {Me, M.},       year = {2003},       title = {Charlie},     }          \end{filecontents}          \addbibresource{\jobname.bib}     \addbibresource{\jobname-mine.bib}          \begin{document}     \begin{refsection}[\jobname-mine.bib]     \nocite{*}     \printbibliography[title={My publications}, env=roman-numerals]     \end{refsection}     Some text that won't be here, but note roman numerals don't work even here \cite{Mine1, Mine3}.          \section{Main text}          \begin{refsection}[\jobname.bib]     Citing things in body \cite{A01, B02}. Would like to cite things in section mine    \cite{Mine1}     \printbibliography[title=References]     \end{refsection}          \end{document}


title: Table with "curly" break

text: I searched a lot but I wasn't able to find a package that can really fit my needs. I want to achieve something like the “Page Table” in this image: ![http://i.stack.imgur.com/wBTQm.gif](http://i.stack.imgur.com/bZY01.gif) A regular table but with some “curly breaks” that gave the idea of a continuation and possibly a table under the first one whit a specular break line that continue to extend my list. I'm also looking for two other techniques: I want to describe the content of some cells (maybe with arrows or some other references) and I want to highlight an entire block of the table (maybe with colors or some background texture like a plant or a house) giving me the ability of writing some legenda.


title: Display references in alphabetic order of authors in bibliography.

text: I am using `\bibliography{Temp_Bib}` command to import reference entries in my report. In Temp_Bib.bib file I keep the BibTex entries of cited articles. I am using `\cite{Keyword}` to cite an entry from my bibliography file. When I use latex2pdf then the entries of bibliography section shown in the order in which they are called by `\cite` command. So is there any way in which I can display the entries in my bibliography with the sorted manner of authors second name? Right now no matter what I put the bibtex entries, they are displayed in the order in which they are cited in report. I want that in whatever order they are cited; they should be display according to authors name in sorted manner.


title: The use of subindices with greek letters

text: I need to use subindices with greek letters. But I find that the result is sometimes decipherable. Examples:               $\alpha_{H}$, $\gamma_{H}$      Do you have any suggestion in that regard? Of course, I do not want to use another subindex than "H".


title: How to use \sloppy for just some references?

text: I’m using XeLaTeX within MiKTeX and also the `biblatex` package for the literature. I’ve noticed that my bibliography set using `\printbibliography` is not set with the `\sloppy` option by default, which is quite good in my opinion. What I would like to be able to do is to make `\sloppy` or `\sloppypar` only those references in the bibliography that actually need it, that means those records which get overfull `\hbox`. I don’t want it to be done automatically but I haven’t found a way to do it even manually. Is this even possible?


title: Erroneous vertical spacing in tabular in combination with makeindex

text: I'm having some trouble with vertical whitespace appearing in a `tabularx` environment where I really don't expect it to. Consider the following MWE:               \documentclass{article}     \usepackage{tabularx}          \makeindex % removing this line also removes the           \newcommand{\loc}[1]{\index{#1@\emph{#1} (location)}\emph{#1}}          \begin{document}          \begin{tabular}{|l|}       \hline       foo \\       \hline       \loc{bar} \\       \hline       baz \\       \hline     \end{tabular}          And now for something completely different:          \begin{tabularx}{\textwidth}{|X|}       \hline       foo \\       \hline       \loc{bar} \\       \hline       baz \\       \hline     \end{tabularx}          \end{document}      The two tables have the same body. For some reasons, there's a vertical gap in the second table: ![problem](http://i.stack.imgur.com/OBvmX.png) The space disappears if I comment out the `\makeindex` command, but obviously that's not an option in my real-life document. Where does the space come from, and how can I avoid it?


title: Change font of document title

text: I have used fontspec to style all of my headers with a new font with:               % Specify different font for section headings     \newfontfamily\headingfont[]{Gill Sans}     \titleformat*{\section}{\LARGE\headingfont}     \titleformat*{\subsection}{\Large\headingfont}     \titleformat*{\subsubsection}{\large\headingfont}      Now I want to style my document title to use Gill Sans as well since it would match the style of the rest of the document. How do I do this?


> **Possible Duplicate:**   >  TikZ: Node at same x-coordinate as another node, but specified > y-coordinate?   >  Extract x, y coordinate of an arbitrary point in TikZ How to use x coordinate of a point and y coordinate of other point? I need similar to               \coordinate (A) at (2,1);     \coordinate (B) at (3,0);     \coordinate (C) at (4,3);     \coordinate (D) at (5,-1);          \draw (xA,yB) -- (xC,yD);


title: TikZ: Node at same x-coordinate as another node, but specified y-coordinate?

text: In TikZ, if I have a node (A), how do I create a node (B) with the same x-coordinate as (A), but a given y-coordinate?


title: How can I change the layout of my page so that it doesn't block everything on one page?

text: I've been writing my CV in LaTeX and used a template. The issue is that where I've put all my entries into this specific section it's grouped all of my entries together in one block and put them on the next page leaving half a page blank. The relevant code that came with the template is below, I am wondering how I can change it so that it will allow the entries to spill across multiple pages instead of putting it all together on the next page with the requisite space? Thanks.               \setlength{\tabcolsep}{0pt}     \newenvironment{entrylist}{%       \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}ll}     }{%       \end{tabular*}     }     \renewcommand{\bfseries}{\headingfont\color{headercolor}}     \newcommand{\entry}[4]{%       #1&\parbox[t]{11.4cm}{%         \textbf{#2}%         \hfill%         {\footnotesize\addfontfeature{Color=lightgray} #3}\\%         #4\vspace{\parsep}%       }\\}      Implementing the above code:               \section{Experience}     \begin{entrylist}     \entry     {This text is the wrong colour}     {Text}     {Text}     {\emph{Bold text} \\     Text.}     %------------------------------------------------     \entry     {This text is the wrong colour}     {Text}     {Text}     {\emph{Bold text} \\     Text.}     %------------------------------------------------     \entry     {This text is the wrong colour}     {Text}     {Text}     {\emph{Bold text} \\     Text.}     %------------------------------------------------     \entry     {This text is the wrong colour}     {Text}     {Text}     {\emph{Bold text} \\     Text.}     %------------------------------------------------     \end{entrylist}


title: Paragraph titles disappearing

text: So, I'm trying to use the `listings` package for some code samples in my document. When I converted my `verbatim` sections to `lstlisting` my `paragraph` titles disappeared. I've attached some example code with an identical preamble to my actual document. Any one see anything that would cause this? Before: ![before](http://i.stack.imgur.com/Zeb7y.png) After: ![after](http://i.stack.imgur.com/2d1sg.png)               \documentclass{article}          % New commands     \newcommand{\HRule}{\rule{\linewidth}{0.5mm}}     \newcommand{\superscript}[1]{\ensuremath{^{\textrm{#1}}}}          %%%%% Packages and configuration %%%%%     \usepackage[firstpage]{draftwatermark}     \SetWatermarkText{\textsc{Confidential}}     \SetWatermarkScale{4}     \SetWatermarkColor[gray]{0.9}          \usepackage{tabularx}          \usepackage[table]{xcolor}     \definecolor{dark-red}{rgb}{0.4,0.15,0.15}     \definecolor{dark-blue}{rgb}{0.15,0.15,0.4}     \definecolor{medium-blue}{rgb}{0,0,0.5}     \definecolor{light-grey}{gray}{0.8}          \usepackage[hidelinks]{hyperref}% keep at end     \hypersetup{         colorlinks,         linkcolor={black},         citecolor={dark-blue},          urlcolor={medium-blue}     }          \usepackage[margin=0.5in]{geometry}          %\usepackage{color}     \usepackage{listings}     \lstset{ %     language=C,                % choose the language of the code     basicstyle=\footnotesize,       % the size of the fonts that are used for the code     %numbers=left,                   % where to put the line-numbers     %numberstyle=\footnotesize,      % the size of the fonts that are used for the line-numbers     %stepnumber=1,                   % the step between two line-numbers. If it is 1 each line will be numbered     numbersep=5pt,                  % how far the line-numbers are from the code     %backgroundcolor=\color{white},  % choose the background color. You must add \usepackage{color}     showspaces=false,               % show spaces adding particular underscores     showstringspaces=false,         % underline spaces within strings     showtabs=false,                 % show tabs within strings adding particular underscores     %frame=single,           % adds a frame around the code     tabsize=4,          % sets default tabsize to 4 spaces     captionpos=b,           % sets the caption-position to bottom     breaklines=true,        % sets automatic line breaking     breakatwhitespace=false,    % sets if automatic breaks should only happen at whitespace     %escapeinside={\%*}{*)}          % if you want to add a comment within your code     }          \usepackage{mdwlist}     \usepackage{underscore}     \usepackage{tikz}     \usepackage{float}          \begin{document}          \setcounter{tocdepth}{3} % Only display to subsubsection     \setcounter{secnumdepth}{5} % Number to paragraph     \tableofcontents          \section{Section A}     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas nec malesuada dolor. Quisque ornare suscipit cursus. Donec posuere neque quis urna vulputate euismod. Proin a elit nec mauris molestie sodales ac a mauris. Praesent nec mauris ut odio varius cursus non ac sapien. Fusce metus ante, aliquet in vestibulum et, dictum non tortor. Phasellus luctus purus lacinia nisl posuere in rhoncus lorem semper. Nulla at diam sed urna volutpat porta eget eu turpis. Curabitur rutrum euismod convallis. Vestibulum nec justo risus, id pulvinar tellus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Morbi semper metus id augue dignissim vel pretium diam dictum.          \subsection{Sub Section A}     Aliquam facilisis sagittis pellentesque. Duis pharetra quam eget quam blandit quis ultrices risus ultrices. Aenean non tortor aliquet justo convallis condimentum a a metus. Suspendisse ipsum urna, eleifend egestas vehicula vel, fermentum ac ipsum. Fusce cursus massa vestibulum nulla imperdiet suscipit. Curabitur at tortor at nunc sagittis facilisis nec sed lectus. Fusce vitae lacus quam, eget lobortis turpis. Sed quam ligula, porta quis bibendum et, condimentum id felis. Fusce nisi lorem, congue nec pharetra ut, scelerisque sit amet dui. \\               \begin{lstlisting}     typedef enum             {             CODE_HERE /* comment here */             } enum_name;     \end{lstlisting}          \subsubsection{Sub Sub Section}     Vivamus vel mi leo, dictum semper lacus. Aliquam erat volutpat. Nam laoreet luctus diam vitae consequat. Fusce sit amet metus vitae nunc accumsan feugiat sed quis arcu. Aliquam erat volutpat. Morbi nec neque in turpis suscipit volutpat vitae vitae magna. Donec sed neque quis ipsum varius fringilla id at magna. Fusce tristique vehicula nisi nec pellentesque. Suspendisse volutpat pharetra dolor, non mattis purus aliquet in. Vivamus vitae felis ac elit porttitor porttitor porttitor ut sem. Sed posuere elementum facilisis. Curabitur sagittis, dui nec imperdiet tincidunt, lacus metus placerat arcu, eget rutrum ipsum nisi a sapien. Donec congue tempus elementum. Suspendisse blandit fermentum ultricies. Nullam elementum dignissim interdum.          \paragraph{Paragraph A}     \begin{lstlisting}     void foo( void );     \end{lstlisting}          Phasellus porta lorem vitae risus volutpat laoreet. Nullam a nisl nunc. Morbi eu lorem eget purus pretium volutpat ac a lorem. Praesent bibendum, lorem sed fermentum mollis, nisi sapien pellentesque diam, at dapibus lacus eros sed sapien. Nullam at dapibus magna. In eget fermentum dui. Vestibulum at fermentum quam. Curabitur porta dignissim dui, facilisis imperdiet dui placerat vitae. Praesent ornare sapien eget enim convallis pellentesque.          \paragraph{Paragraph B}     \begin{lstlisting}     void bar( void );     \end{lstlisting}          Maecenas eget nisl at sem imperdiet facilisis. Cras a massa sit amet massa dignissim faucibus eget sed risus. Phasellus dapibus dignissim consequat. Nullam malesuada hendrerit orci, ac lacinia turpis ultrices vel. Aliquam vitae dui vestibulum justo malesuada feugiat. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Maecenas ullamcorper, risus sit amet vehicula consequat, justo eros fermentum magna, sed tempus sem arcu ac tellus. Sed metus justo, dictum sed semper vel, rutrum at diam. Mauris porta blandit pretium. Donec ipsum lorem, rutrum nec commodo vitae, vulputate quis sapien. Vestibulum fringilla elit ut diam pellentesque vehicula. Proin volutpat urna non massa facilisis nec varius elit gravida. Nullam ut lacinia erat. Maecenas adipiscing sagittis erat in malesuada. Pellentesque in nulla eget metus venenatis convallis.          \end{document}


title: framed or mdframed? (Pros/Cons)

text: I'm currently thinking about using shaded and framed sections in my document. But for now, I couldn't clarify the **differences between`framed` and `mdframed`** (or other packages). Although the documentation of `framed` says that it handles page breaks, `mdframed` states it doesn't. Honestly, I'm confused for now and would be very happy if somebody could recommend a solution which is solid and reliable for the future, so that I don't need to switch the package in the coming time.


title: tex4ht leaving equations unchanged - including \[...\] and \(...\)

text: I want to let tex4ht leave the equations unchanged. Using the tip given at tex4ht leaving equations unchanged, it works for `$` and `$$` equations. In the case of `\\[...\\]` and `\\(...\\)` equations it does not work. How do I have to modify the provided `my.cfg` to work in the case of following document?               \documentclass {article}     \begin{document}     \[a*b^3\]     \end{document}      `my.cfg`:               \Preamble{html}     \newtoks\eqtoks      \def\AltMath#1${\eqtoks{$#1$}%         \HCode{\the\eqtoks}$}     \Configure{$}{}{}{\expandafter\AltMath}       \begin{document}      \EndPreamble      `\Configure{[]}` seems to take only two arguments. Using `\Configure{[]}{$}{$}` does not help. This leads to               Runaway argument?     a*b^3\] \end {document}     ! File ended while scanning use of \AltMath.      For a complete test, the following file should work:               \documentclass {article}     \begin{document}     \begin{math}     math^3     \end{math}     \begin{displaymath}     math^3     \end{displaymath}     \begin{equation*}     equation*^3     \end{equation*}     \end{document}


title: Itemize with tags

text: Is there an itemize or enumerate like environment that allows you to use words preceding each item instead of a dot or number. So it'll output something nice for text structures like the following: **Blogiddy Bloop** --- A bloggidy bloop is a thing that does stuff. **Apwitchik** --- A apwitchik is a thing that does other stuff. **Deddydoo** --- A Deddydoo does all the stuff a Bloggiddy Bloop and an Apwitchik do, but even more.


title: Is there a polar coordinate registers in the let command?

text: I have seen that we ca use `\x1` and `\y1` to access cartesian coordinates of point register `\p1` declared in `let`. Is there a way to access the polar coordinates (something like `\a1` for the angle and `\r1` for the distance) of the point `\p1`? If not, what is the best way to do something like this :               \draw let \p1=(35:1cm) in (\a1+30,\r1) -- (\a1-30,2*\r1);


title: pgfplot: Datafile format for datetime field

text: I have a datafile (which I may manipulate to any format), it contains a date- time stamp currently in the form "year-month-day hour:min" and a single variable for each recorded time. When I attempt to plot this datafile it is parsed as if the date-time stamp is two variables, my question is how should I be formatting the datafile for it to be parsed as a single variable. Thanks


title: XeLaTeX - Invalid Font: -1

text: I try to compile the following document using XeLaTeX:               \documentclass[twoside,openright,draft]{scrreprt}          \usepackage{fontspec}     \setsansfont{Univers 65 Bold}            \begin{document}          \section{Lorem Ipsum}     Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod      tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.           \end{document}      As a result I get the following (stripped) logfile:               Running `LaTeX' on `test' with ``xelatex  -interaction=nonstopmode "\input" test.tex''     This is XeTeX, Version 3.1415926-2.4-0.9998 (TeX Live 2012)      restricted \write18 enabled.     entering extended mode     LaTeX2e <2011/06/27>          [...]          *************************************************     * LaTeX warning: "xparse/redefine-command"     *      * Redefining document command \oldstylenums with arg. spec. 'm' on line 107.     *************************************************          [...]          LaTeX Font Warning: Font shape `EU1/Univers65Bold(0)/bx/n' undefined     (Font)              using `EU1/Univers65Bold(0)/m/n' instead on input line 15.          [1] (./test.aux)          LaTeX Font Warning: Some font shapes were not available, defaults substituted.               ** ERROR ** Invalid font: -1 (0)          Output file removed.      )     Error 256 (driver return code) generating output;     file test.pdf may not be valid.     Transcript written on test.log.          LaTeX finished at Sun Jan 27 19:50:35      I have some trouble to interpret `Invalid font: -1`. Any thoughts on what might be causing the problem and, more importantly, how to solve it?


title: How to make a ruler

text: In _The TeXbook_ (Ch. 10, after exercise 10.3), DEK shows some nice rulers. But I couldn't figure out how he did them. I'm sure I could look it up from the texbook source, but for some reason I'm drawing a blank on where that might be. So the question is: how do you typeset rulers (I assume they'd be some form of `\leaders`)?


title: Why doesn't parskip=half work together with fontenc in bibliographies?

text: If `\usepackage[T1]{fontenc}` is used and `parskip=half` is set: ![incorrect output](http://i.stack.imgur.com/zZpWK.png) Else (either `\usepackage[T1]{fontenc}` isn't used or `parskip=half` isn't set): ![correct output](http://i.stack.imgur.com/uIT3I.png) I consider the second one the correct style. Why is there a problem when using `parskip`? And more importantly, why does `fontenc` influence anything here?               \documentclass[         parskip=half     ]{scrbook}          \usepackage[T1]{fontenc}     \usepackage[ansinew]{inputenc}     \usepackage{lmodern}          \usepackage[style=authoryear]{biblatex}          \usepackage{filecontents}          \begin{filecontents}{biblatextest.bib}     @misc{A01,       author = {Author, A. and Buthor, B.},       year = {2001},       title = {Alpha Alpha Alpha Alpha Alpha Alpha Alpha Alpha Alpha Alpha Alpha Alpha Alpha Alpha Alpha Alpha Alpha Alpha Alpha Alpha },     }     @misc{A02,       author = {Authora, A. and Buthora, B.},       year = {2002},       title = {Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta },     }     \end{filecontents}          \addbibresource{biblatextest.bib}          \begin{document}          Some text \cite{A01}. More... \cite{A02}.          \printbibliography          \end{document}


title: Weird behavior of ntheorem.

text: I have the following strange phenomena using ntheorem: ![Weird phenomena](http://www.cgti.nl/gf/weird.png) I get $\Lambda$ instead of a `\box`. In other proofs I might get a `\box` or `\Lambda`. In the example I end with `\\[ \\]` if I use `equation` instead the box is not on the correct height. This is the first part of my preamble:               \documentclass[a4paper,11pt, leqno, draft]{scrreprt}     \usepackage{amsmath, amssymb, bm, mathtools, marvosym}     \usepackage[amsmath, amsthm, thmmarks]{ntheorem}     \usepackage[varg]{txfonts}     \usepackage{theoremref}     \usepackage{graphicx}     \usepackage{fancyref}      A minimal example where this occurs:               \documentclass[a4paper,11pt, leqno, draft]{scrreprt}     \usepackage{amsmath}     \usepackage[amsmath, amsthm, thmmarks]{ntheorem}     \usepackage[varg]{txfonts}          \theoremstyle{change}     \newcounter{acounter}[chapter]     \def\theacounter{\thechapter.\arabic{acounter}}     \newtheorem{lemma}[acounter]{Lemma}     \begin{document}     \begin{proof}     \[     f = g     \]     \end{proof}     \end{document}      How do I solve this? It seems like the problem is with `txfonts`.


title: Modify example dropdown in memoir

text: In LyX, in `book` format `memoir`, the drop down has the `Example` format. Just wanted to know how do I change this `Example` format layout. Or where is the code to be changed. Edit: The example might be coming because of the modules I have used. I have a snap of both the example shown in the drop down as well as the modules, if that helps. ![enter image description here](http://i.stack.imgur.com/2c4EO.png) ![enter image description here](http://i.stack.imgur.com/hEwC2.png)


title: Title distance to axis/labels

text: How can I change the distance from the title to the axis of a plot? I'd like to have some tick labels at a axis at the top of a plot and a title above it. The title and the labels are written to near to each other as in the example below.               \documentclass{minimal}          \usepackage{pgfplots}     \pgfplotsset{compat=1.10}          \newcommand{\width}{6cm}     \newcommand{\height}{8cm}     \newcommand{\vertShift}{3cm}          \begin{document}          \begin{tikzpicture}     \begin{axis}[%         width=\width, height=\height,          yshift=\vertShift, % trying to shift the plot to give the title some space.         axis x line*=bottom,         hide y axis,         ]     \end{axis}     \begin{axis}[%          title=A title,         width=\width,height=\height,          yshift=\vertShift, % Trying to shift the plot to give the title some space.         ybar,xticklabel pos=right,         xticklabels={?,L,A},          xlabel near ticks,         ]          \addplot coordinates {(0,50) (0.2,20)};      \end{axis}     \end{tikzpicture}     \end{document}


title: Can I create a zoomed-in rectangle between two separate tikzpictures without the spy-function (<-- actually, same function, different contents)?

text: I'd like to have the smaller rectangle on the right put as the magnifypoint. Explanation:   * The magnified part on the right essentially shows a magnification of the contents on the left, except not quite.   * It's the same object, just a different photo (taken by myself) from another angle with another position of the camera. Thus, it's a new piece of content that I'd like to have displayed. So I need something to draw the fancy rectangles/or whatever shape I choose and lines between some, yet unspecified, parts in the left and right tikzpictures. Note: In the end, I'd like to have multiple tikzpictures in the right minipage. ## Picture ![enter image description here](http://i.stack.imgur.com/f009n.png) ## MWE               \documentclass[     a4paper     ]     {scrartcl}          \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{lmodern}          \usepackage{     tikz,     }          \begin{document}     \begin{minipage}[t][][b]{0.48\linewidth}     \centering     \begin{tikzpicture}[font=\small]     \draw[thick] (0,0) rectangle (3,6) node[below left] {Lots.};     \end{tikzpicture}     \end{minipage}     \hfill     \begin{minipage}[t][][b]{0.48\linewidth}     \begin{tikzpicture}[font=\small, label=above:bla]     \draw[thick] (0,0) rectangle (2,2) node[below left] {Yes.};     \end{tikzpicture}     \end{minipage}     \end{document}


title: How do I get my comma back (C++ lstlisting section)

text: > **Possible Duplicate:**   >  Comma inside \texttt{} does’nt show up I've been writing code in my book and just noticed that the comma has gone. I've been moving between machines so I don't know if this is just a setup issue, or I've not ever had commas. my listing setup:               \lstset{ %         language=C++,         basicstyle=\scriptsize\ttfamily,         numbers=left,         numberstyle=\tiny\color{gray},         numbersep=15pt,         backgroundcolor=\color{white},         showspaces=false,         showstringspaces=false,         showtabs=false,         frame=single,         rulecolor=\color{black},         tabsize=2,         captionpos=b,         breaklines=true,         breakatwhitespace=false,         title=\lstname,         keywordstyle=\color{blue},         commentstyle=\color{dkgreen},         stringstyle=\color{red},     }      and it's not showing commas in a variable declaration:               int a, b, c, d;


title: Beamer: Oxygen theme with logo in header

text: I want to put my college emblem in the `oxygen` header. Please tell me how I can edit the `oxygen` header image to insert the logo?


title: fontsize setting with newcommand and newlength

text: How do I set a `\newcommand` so that the field `#1`, which is calculated to be `1.2*#2` Optional? Something similar to the following commands, but that did not work.               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}          \newlength{\myskip}     \setlength{\myskip}{1.2}          \newcommand{\mysize}[3][#2\myskip]{{\fontsize{#2}{#1}\selectfont #3}}


title: luatex and starting TeX macros which handle new line characters

text: This here is actually some kind of isolated follow-up question to Workaround for open lualatex bug in \scantokens? . I tried to use `tex.print("<some tex macro>{<something with a newline inside>}")` and expected it to work as if I would have typed the content of `tex.print` in TeX directly. More precisely, I tried to write               \pgfplotstabletypeset{A B     2 3     4 5     }      inside of `tex.print`. The entire motivation is in the linked question. No matter what I tried, I could not get the same treatment of the (mandatory) newline characters as if I typed them in TeX. So, the question is: how can I use `tex.print` from LUA in order to get the same effect as if I wrote the stuff directly into TeX? Here is a list of my attempts. Perhaps I overlooked something more or less obvious. You see that I started with something trivial (printing two empty lines to generate a paragraph) to see how this is handled:               \documentclass{article}          \usepackage{pgfplotstable}          \begin{document}     \parskip=20pt     \parindent=0pt          \expandafter\ifx\csname directlua\endcsname \relax \else        \directlua {tex.enableprimitives('',tex.extraprimitives ())}        %         % using tex.print(42, ...) does not make a difference:        %\savecatcodetable 42     \fi          This is what I would like to generate -- from within LUA:          \pgfplotstabletypeset{A B     2 3     4 5     }          FAIL:     \def\n{\noexpand\n}     Here is a lua paragraph\directlua{tex.print("\n\n")}And here is the rest.          GOOD:     Here is a lua paragraph\directlua{tex.print("", "")}And here is the rest.          FAIL:     Here is a lua paragraph\directlua{tex.sprint("", "")}And here is the rest.          FAIL:     \directlua{         % FAILS: the newline appears to have some strange catcode- and is         % reported in a different way         %tex.print("\noexpand\\pgfplotstabletypeset{A B\n 2 3\n 4 5\n}")     }          FAIL:     \directlua{         % FAILS: the newline appears to have some strange catcode- and is         % reported in a different way         %tex.sprint("\noexpand\\pgfplotstabletypeset{A B\n 2 3\n 4 5\n}")     }          FAIL:     \directlua{%         %         % FAILS: the curly brackets do not match, it interpretes         % \pgfplotstabletypeset{A B         %         % as first statement and does not see the rest         %tex.print("\noexpand\\pgfplotstabletypeset{A B", "2 3", "4 5}")     }          FAIL:     \directlua{%         %         % FAILS: the curly brackets do not match, it interpretes         % \pgfplotstabletypeset{A B         %         % as first statement and does not see the rest         %tex.sprint("\noexpand\\pgfplotstabletypeset{A B", "2 3", "4 5}")     }          \end{document}      I uncommented the items which produce compile failures. It should be noted that `\pgfplotstabletypeset` redefines the category code of newline to be 12 (other) and then it does its operation. I suppose this is what caused the problem (in conjunction with LUA's catcodetables). ![enter image description here](http://i.stack.imgur.com/yvHkg.png)


title: Putting citation on right side of the equation

text: I have written an equation in LaTeX and I need to cite the author name with date (Einstein 1915) on the right side of my equation, I tried with the margin note command but it gets split in two lines, how do I get it in one line just right-below my equation?


title: Automated end-of-lecture Biblatex bibliographies in Beamer?

text: ## Problem description For a multi-lecture Beamer+Biblatex setup, I would like to automate the process of generating per-lecture bibliographies. I would like to achieve this by having the following code issued _automatically_ :   * A `\newrefsection` command at the _beginning_ of each lecture   * A `\printbibliography` command at the _end_ of lecture. While the former can easily be achieved via `\AtBeginLecture{}`, the latter suffers from the absence of an equivalent `\AtEndLecture{}` command. ## Questions   1. Is it _generally_ possible to implement an equivalent `\AtEndLecture{}`, or is this somehow out of reach (for example, because `\lecture` is a command, not an environment, and therefore one cannot tell that a lecture has ended before a new one starts)?   2. If it _is_ possible, how could I achieve it? ## Hackish workaround that I'd like to replace So far, my workaround has been to define a custom command `\newlecture`, which   1. Issues a `\printbibliography` for the _previous_ lecture   2. Issues a `\newrefsection` and `\lecture` for the _new_ lecture This works for all lectures except the very first and last ones:   * Before the very first lecture, an empty bibliography frame will be printed - yuck!   * No bibliography will be printed at all after the very last lecture (unless I attempt additional trickery using `\AtEndDocument`, which I have not yet tried). ## Summary My main concern is whether it is possible to replace the above hack by somehow detecting the _end_ (rather than the beginning) of a lecture. As far as I can tell, a solution to this problem should also apply to automated per- _chapter_ bibliographies in standard document classes such as `book`.


title: pgfplots: auto-size chart?

text: I have an xbar graph with some some data that I don't necessarily know the length of beforehand. Is there some way I can tell pgfplots to automatically expand the height of the chart according to the amount of data? For example, in this example, there are so many data points that the bars overlap because the height is constant.               \documentclass[letterpaper]{article}     \usepackage{tikz}     \usepackage{pgfplots}     \begin{filecontents}{my.dat}     Label     value       num     992       70          1     993       120         2     994       30          3     995       330         4     999       50          5     988       50          6     989       50          7     983       50          8     973       50          9     963       50          10      953       50          11     941       60          12     942       70          13     943       20          14     944       30          15     945       10          16     \end{filecontents}     \begin{document}          \begin{tikzpicture}     \begin{axis}[         xbar,         xlabel=My value,         ylabel=Label here,         xmajorgrids=true,         ytick=data,         yticklabels from table={my.dat}{Label},         nodes near coords,     ]         \addplot table [x=value, y=num]         {my.dat};     \end{axis}          \end{tikzpicture}          \end{document}      ![bar graph with overlapping bars](http://i.stack.imgur.com/NrTlL.png)


title: Using multiple versions (allographs) of each glyph randomly

text: I wonder if there exists any system to make LaTeX print different versions of each letter randomly. The idea is to make a realistic handwritten or typewritten document where almost every «a» is a bit different from each other. Are there any font with dynamic parameters, such as the thickness of each part, to emulate this way different pressure patterns in a typewriter, for example?


title: Would like a mdframed environment style with framed title box inset above without fill

text: Here's a slight tweak to one of the `mdframed` examples that produces a framed title inset above the theorem box               \documentclass{article}          \usepackage{amsmath}     %\usepackage{svgcolor}     \usepackage[svgnames]{xcolor}     \usepackage[framemethod=tikz]{mdframed}          \newcounter{Lemma}[section]     \newenvironment{Lemma}[1][]{%       \stepcounter{Lemma}%       \ifstrempty{#1}%       {\mdfsetup{%         frametitle={%           \tikz[baseline=(current bounding box.east),outer sep=0pt]           \node[anchor=east,rectangle,fill=blue!20]         {\strut \color{DarkOliveGreen}{Lemma}~\theLemma};}}       }%       {\mdfsetup{%         frametitle={%           \tikz[baseline=(current bounding box.east),outer sep=0pt]           \node[anchor=east,rectangle,fill=blue!20]         {\strut \color{DarkOliveGreen}{Lemma}~\theLemma:~\color{Maroon}{#1}};}}%       }%       \mdfsetup{innertopmargin=10pt,linecolor=blue!20,%                 linewidth=1pt,topline=true,%                 frametitleaboveskip=\dimexpr-\ht\strutbox\relax,}       \begin{mdframed}[]\relax%       }{\end{mdframed}}               \begin{document}          \begin{Lemma}[Distribution of inner products]\label{thm:stokesTheoremGeometricAlgebraII:1420}     Given two blades $A_s, B_r$ with grades subject to $0 < r < s$, and a vector $b$, the inner product distributes according to     \begin{equation*}         A_s \cdot \left( b \wedge B_r \right) = \left( A_s \cdot b \right) \cdot B_r.     \end{equation*}     \end{Lemma}          \end{document}      This looks like: ![lemma box](http://i.stack.imgur.com/iShZH.png) I'd like the title box to have a framed look instead of filled, but am unsure how to do that. There are examples, like " Example 5 – complex example with TikZ, where there is a distinct frame around the title, but that example isn't a good one for me to attempt to build from since it does a lot that I don't want (like overriding the Exercise environment).


title: How to raise a generic curve. Problem with \pgfdeclaredecoration

text: The goal I want to obtain is to have a parallel curve to a generic curve defined in a `\draw` command trough TikZ. To achieve it, I used the TikZ decorations library and the command \pgfdeclaredecoration to create it. The solution adopted by me is not very efficient but it works conceptually. Here it is a minimal example of my listing:               \documentclass{standalone}          \usepackage{tikz}          \usetikzlibrary{calc,decorations}     \makeatletter     \newlength\@l     \newcount\@c     \tikzset{     raise line/.initial   = 25pt,     raise points/.initial = 100     }     \pgfdeclaredecoration{Parallel Line}{initial}{     \state{initial}[persistent precomputation={%                        \pgfmathsetlength{\@l}%                        {\pgfdecoratedpathlength/(\pgfkeysvalueof{/tikz/raise points})}%                        \@c=1%                      },                      next state = middle,                      width      =\@l]{\coordinate (DecoratedPointRaised-\the\@c) at                                             ($(0,0)+(0,\pgfkeysvalueof{/tikz/raise line})$);}          \state{middle}[persistent precomputation = {\@c=\numexpr\the\@c+1\relax},                    width = \@l]{\coordinate (DecoratedPointRaised-\the\@c) at                                      ($(0,0)+(0,\pgfkeysvalueof{/tikz/raise line})$);}          \state{final}[persistent precomputation  = {\@c=\numexpr\the\@c+1\relax},                   persistent postcomputation = {\foreach[count=\t from 1]\n in{2,...,100}{ %                                                 \draw (DecoratedPointRaised-\t)--          % Here it does not work!!                                                 (DecoratedPointRaised-\n);}}]{             %     \pgfcoordinate{DecoratedPointRaised-\the\@c}{\pgfpointdecoratedpathlast}     }     }     \makeatother     \begin{document}     \begin{tikzpicture}     \draw (0,0) .. controls++(1,1) and (6,-3).. (7,0);          \draw[decorate,decoration=Parallel Line] (0,0)  .. controls++(1,1) and (6,-3).. (7,0);          %\foreach[count=\t from 1]\n in{2,...,100}{                       %                       %     \draw (DecoratedPointRaised-\t)--(DecoratedPointRaised-\n); % Here it works!!!!     %}                                                                %      \end{tikzpicture}     \end{document}      This is what I draw: ![enter image description here](http://i.stack.imgur.com/nGyeq.jpg) The line below is the original one while the above one is the decoration. The step to create the parallel curve are the following:   1. I create a new length `\@l` which is the step of the `decoration`. I create a new counter `\@c` to have a sequential name of thecoordinate I will create.   2. The first state is `initial` where it is computed the pitch `\@l` and where at the beginning `\@c` is set equal to one. Then the first coordinate of the `DecoratedPointRaised-\the\@c` series is created. Finished the initial state, the decoration passes to the middle state.   3. In the middle state precomputation it is computed the new `\@c` as `\@c=\@c+1`. After the `\@c` coordinate is created.   4. When necessary, the decoration passes to the final state, where the last `\@c` coordinate is computed. Here I use post computation to draw all the segments that connect all created coordinates. The problem is that the post computation in the final state doesn't work, while, if I write the code inside it after the `\draw` command, I have no problem. Why? How can I avoid it? In the final state, is the coordinate system I use into the `\state` command the global one and not the transformed one?


title: Breaking Horizontal Rule Running Across Adjacent Columns in a Table

text: Is there any way to force a break in the horizontal rule running across two adjacent cells of a table. To be more precise, here is what I'm looking for: ![enter image description here](http://i.stack.imgur.com/MTltx.png) Notice how I wish the lines to fall short of the left and right borders of the table as well. I would really appreciate it if someone can provide a simple and compact solution. This is the usual scenario for comparing against: ![enter image description here](http://i.stack.imgur.com/Rmz1T.png) Here is the simple code for quick access:               \begin{tabular}{ccccc}     \hline     \multirow{2}{*}{C1} & \multicolumn{2}{c}{C2} & \multicolumn{2}{c}{C3} \\ \cline{2-3} \cline{4-5}                         & C21 & C22              & C31 & C32            \\ \hline     Val1                & Val2 & Val3            & Val4 & Val5 \\           \end{tabular}


title: Draw a bivariate normal distribution in TikZ

text: For a small class I want to draw a bivariate normal distribution and show where the means from the two variables meet in the space. Has anyone done this in TikZ?


title: Can one instruct LuaLaTeX to use T2A encoded fonts?

text: As it is stated in answer to Can XeTeX | LuaTeX use MetaFont fonts?, LuaLaTeX can use MetaFont fonts. **If so, how can one instruct LuaLaTeX to use T2A encoded fonts (e.g. cm-super) to typeset cyrillic text?** I used to think that LuaLaTeX can use only those fonts which are internally encoded accoding to Unicode. Am I right? **UPDATE:** The following code (slightly modifed from @Leo Liu's answer) prints "Б-Б-Б" if it is compiled by pdflatex but "Б--Б" in case of lualatex:               \documentclass{minimal}     \usepackage[T2A]{fontenc} % cyrillic font encoding     \usepackage[utf8]{inputenc} % source file encoding     \begin{document}     \symbol{"C1}-Б-\CYRB     \end{document}      I wonder why `\usepackage[utf8]{inputenc}` does not work for lualatex. I tried also `luainputenc` with same result. Note that `\CYRB` command is defined by `fontenc` which loads `t2aenc.def`. As to `inputenc` it should match unicode chars in source file to corresponding `\cyr...` macros. And it did so for `pdflatex` but not `lualatex`.


title: Good small caps font to use with arev?

text: I am typesetting a `beamer` presentation with the `arev` package (using plain old `pdftex`). By convention, some of the keywords in my presentation are usually typeset in small caps—which `arev` does not provide. Any suggestions for a good font to use for small caps, that would fit in well with `arev` for the main body? (Bonus points for providing instructions for setting up that font!)


title: How can I use right curly braces in MathTımeProfessional II?

text: I want to wrap 2 or more cases in right _curly_ brace using the MathTıme Professional II font. When I use 2 lines it seems to work, but with 3 or more it doesn't show correctly. I've used this code :               \documentclass{article}       \usepackage{amsmath}       \usepackage[lite]{mtpro2}       \begin{document}            $\left.         \begin{aligned}           &\frac{\sqrt{9}}{\sqrt{16}}=\frac{3}{4}=0,75\;\\ % use \quad as spacer between  equation and right brace           &\sqrt{\frac{9}{16}}=\sqrt{0,5625}=0,75           \end{aligned}           \right\}\Rightarrow \frac{\sqrt{9}}{\sqrt{16}}=\sqrt{\frac{9}{16}}$         \end{document}


title: Fixing fill on arrows in "compass"

text: How do I fix the coloring in the arrow head? It doesn't fill like the line width does. Also, you'll notice that the arrow touches `D`. How do I push D down? (Or is it best to just manually adjust it?)               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{arrows, positioning, trees, mindmap, calc}     \begin{document}     \begin{tikzpicture}      \node (a) at (9,7.5) {};     \node (b) at (9,4.5) {B};     \node (c) at (10.5,6) {};     \node (d) at (7.5,6) {D};          \path[draw=black!60,solid,line width=0.8mm,fill=black!60,preaction={-triangle 90,thin,draw,shorten >=-1mm}] (a) -- (b);     \path[draw=black!60,solid,line width=0.8mm,fill=black!60,preaction={-triangle 90,thin,draw,shorten >=-1mm}] (c) -- (d);     \end{tikzpicture}     \end{document}


title: "Foldable" "Booklet" like Toodledo's one (pocketmod)

text: ![Toodledo's foldable booklet](http://i.stack.imgur.com/dFOfH.png) How to achieve in pdfLaTeX foldable booklets similar to those provided by Toodledo ? (to make question usable to others LuaTex, ConTeX and other systems answers are highly welcome) Note: look, how many pages can fit on one paper sheet.


title: How can I list fonts available to LuaTeX in ConTeXt (TeX Live 2013)?

text: I've looked at How do I get a list of all available fonts for luaotfload?, but the answers don't work for me in TeX Live 2013, at least not without LaTeX. This is because there they rely on the file `otfl-names.lua` under `\luatex- cache\generic\names`; but in my installations of TeX Live 2013 (ConTeXt scheme), the only directory under `\luatex-cache` is `context`, and there is no `otfl-names.lua` that I can find. P.S. Following this comment, I also looked for `luaotfload-names.lua`, but can't find that file either. Do I need to run a program to build it? I looked for `mkluatexfontdb` but no such command seems to exist. I tried the following ConTeXt mkiv (LuaTeX) document:               \starttext     \startluacode     myfonts=dofile(fonts.names.path.path)          for i,v in ipairs(myfonts.mappings) do      tex.print(-2, v.familyname)      tex.print(', ')      tex.print(-2, v.fontname)      tex.print('\\par')     end          \stopluacode     \stoptext      But I get the error: > ! LuaTeX error [string "\directlua "]:2: attempt to index field 'path' (a > nil value) Any suggestions would be appreciated.


title: MikTeX: How to run pdflatex from cmd prompt on Windows 7 compared to Windows XP?

text: In Windows XP I create my `test.tex` in emacs and then run it in the cmd promt as `pdflatex test.tex` in the corresponding directory, and it works without a problem. However, in Windows 7 doing the same thing I need to use the full file path in the cmd promt `pdflatex "...dir/test.tex"` and then it runs but stops because it can't find the `test.aux` file, probably since the program looks for it in the current directory where the `test.tex` file is located. How can one do this in Windows 7?


title: Parts and tocloft compatibility

text: Whenever I try using both `tocloft` (to be more precise `\usepackage[titles]{tocloft}` and `\part{}`, the table of contents doesn't render completely (it only renders until the first Part starts). My question is simple: is there any way to make Parts compatible with `tocloft`, or any other way to show my document-defined typeface on the TOC without using the `tocloft` package, so that the Parts don't enter in conflict with `tocloft` iself? A sample document that shows this incompatibilty:               %--------------------------------------------------------     %    PACKAGES AND OTHER DOCUMENT CONFIGURATIONS     %--------------------------------------------------------     \documentclass[paper=a4, fontsize=13pt, twoside=semi]{scrartcl}     \usepackage[utf8]{inputenc}     \usepackage[catalan]{babel}          \usepackage{sectsty}     \allsectionsfont{\normalfont\scshape}     \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage[titles]{tocloft}          \renewcommand\partheadstartvskip{\clearpage\null\vfil}      \renewcommand\partheadmidvskip{\par\nobreak\vskip 20pt\thispagestyle{empty}}     \renewcommand\partheadendvskip{\vfil\clearpage}     \renewcommand\raggedpart{\centering}          %--------------------------------------------------------     %    DOCUMENT     %--------------------------------------------------------     \title{\normalfont Title}     \author{Author}     \date{ }          \begin{document}     \maketitle     \tableofcontents     \part{Lorem ipsum}     \section{Dolor}     \section{Sit}     \part{Amet}          \end{document}      If I don't use the `tocloft` package, I get all the sections on the TOC. But If I do use it, the TOC stops rendering after the first `\part`; the document renders perfectly, though.


title: Empty page on the Part page

text: I'm using this on my document (scrartcl documentclass):               \usepackage{etoolbox}     \pretocmd{\section}{\cleardoubleevenemptypage}{}{}     \pretocmd{\part}{\cleardoubleevenemptypage}{}{}      This makes me get blank pages so that the sections and parts always start on even pages, which is nice. (I shall say I'm using fancyhdr to define the header and footer). So my question, is there any similar command to `\pretocmd` that applies to the current section page instead of the previous pages? I've looked for such thing in the `etoolbox` documentation, but I couldn't find anything. **More precisely, what I want is to get no header and footer on the _Part_ pages.** Edit: I know I can use `\part{}\thispagestyle{empty}` but I'd like to make this step automatic by defining it (similar to the `\pretocmd` command) within the the document preamble.


title: Robust way to mark draft text?

text: When writing documents, I like to 'mark up' draft/partial text (e.g., short summaries of what will go in a section) so that I can clearly see what needs to be adjusted. I know that things like the todonotes package exist (see this question, for example), but I want something that can span arbitrary parts of the document (e.g., multiple paragraphs or even sections with whatever text is in there). I have been using the color package's \color 'switch' to do this (with an alternate \textcolor based command for short inline bits of text), with commands like this:               \usepackage[usenames,dvips]{color}     \newcommand{\todo}[1]{\textcolor{Purple}{#1}}         \newcommand{\startToDo}{\color{Purple}}     \newcommand{\stopToDo}{\color{Black}}      However, this has problems in various situations (such as footnotes, URLs, tables), some dependent on the particular other packages used. (See this question and this one.) Does anyone have any ideas on a robust alternative I could use? I would prefer not to use marginal lines (as used to indicate changes) so that it is clear exactly which bits of text, figures, etc. are included. Differently-coloured text was the obvious choice for me. **EDIT** : Since my current \color method **does** work very nicely as a 'start/end' switch across arbitrary LaTeX constructs ( **except** for the special cases mentioned above), I would only change to something that continues to give me that, but is more robust (especially since this is used to 'highlight' text that I need to adjust/rewrite, and is thus only used when working towards a 'proper' first draft; i.e., convenience of use outweighs absolute correctness since this won't normally be in any public-facing versions of the document). There's a chance that my outstanding question will get an answer that 'fixes' my explicit \color usage (though I imagine with lots of very arcane low-level TeX) but obviously a pre-existing package or simple LaTeX that achieves the same or similar effect would be better.


title: Statecharts using TikZ

text: I haven't found any example of using TikZ for drawing Harel's statecharts notation. There are numerous examples of finite-state automata, but that cannot be applied for statecharts for two reasons: no hierarchy and no orthogonality. Can anyone suggest me please what is the best way to draw something as simple as this: (A) --> (B(C) | C(D)), where there are two top-level states: A and B|C (state with two orthogonal regions B and C, divided by a dashed line in the middle of state); B has a nasted state C, whereas C has a nested state D; interlevel connections should be possible, i.e. a directed connection between A and C. Edited: here's the picture ![enter image description here](http://i.stack.imgur.com/8rp0k.png)


title: Silent problems: bugs that do not result in an error or warning

text: If you do not use the `inputenc` package and have non-ascii characters in your source, this does not generate a error or warning. It does generate a > Missing character: There is no ▒ in font cmr7! in the log, but this is easy to miss. My question: are there any **other** common 'silent' problems, i.e. situations where something is clearly going wrong, but no error or warning is generated? And for each such situation, is there anything one can do to make the error explicit (as `inputenc` does for my example)?


title: How to make graphic caption rotate?

text: I have a large graph that has to fit the paper in the landscape mode, therefore I have to rotate the graph using `includegraphics[angle=-90]`. However, the usual `\caption{}` statement remains the same as before, so that even though the graph is rotated, the caption is not. Is there a way to rotate both the graph the its caption accordingly? Thanks a lot!


title: right align in align environment

text: I use a `align*` environment and on one line I have a very long equation which does not contain into a line. Thus for this line I would like to have the same behavior as a `multline` environment, that is after the break line I would like the end of the equation to be right aligned. Here I add a `\hspace` command to do that but I think that something should exist ...               \begin{align*}     \hat{H} \Psi(r,\theta) & = \left\lbrace\frac{-\hbar^2}{2m_er^2} \left[      \frac{\partial}{\partial r} \left(r^2\frac{\partial }{\partial r}\right)     + \frac{1}{\sin\theta}\frac{\partial}{\partial \theta}     \left(\sin\theta\frac{\partial}{\partial\theta}\right)     + \frac{1}{\sin^2\theta}\frac{\partial^2}{\partial\varphi^2}\right]      - \frac{e^2}{4\pi \epsO r} \right\rbrace \Psi(x,\theta) \\     & = \frac{-\hbar^2}{2m_er^2} \left[      \frac{\partial}{\partial r} \left(r^2\frac{\partial }{\partial r}\right)\Psi(x,\theta)     + \frac{1}{\sin\theta}\frac{\partial}{\partial \theta}     \left(\sin\theta\frac{\partial}{\partial\theta}\right)\Psi(x,\theta)     + \frac{1}{\sin^2\theta}\frac{\partial^2}{\partial\varphi^2}\Psi(x,\theta)\right] \\     & \hspace{12cm} - \frac{e^2}{4\pi \epsO r}\Psi(x,\theta) \\     \end{align*}      ![enter image description here](http://i.stack.imgur.com/likL5.png)


title: Figure caption problem

text: Is there anybody who can guess what is wrong with this figure caption?               \caption{Graphical representation of the simple approximation proposed to determine the linewidth of a laser from its frequency noise PSD $S_{\delta\nu}(f)$, calculated from the surface \emph{A} of the slow modulation area. The shadowed areas on this schematized frequency noise spectrum represent the surface \emph{A} that encloses all spectral components for which $S_{\delta\nu}(f)$ exceeds the $\beta$\nobreakdash-separation line $S_{\delta\nu}(f) = \frac{8\ln2}{\pi ^2}f$ (dashed line).}      If I don't comment it out, I get these error messages:               inputenc: Keyboard character used is undefined(inputenc) in inputencoding `utf8'. ...) = \frac{8\ln2}{\pi ^2}f$ (dashed line).}          Incomplete \iffalse; all text was ignored after line 71      Thanx, Richard


title: arrowhead rotation

text: I want the arrowhead to look more natural as opposed to goofy (which is the present state)               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{arrows.new, decorations.markings, calc, fadings,     decorations.pathreplacing, patterns, decorations.pathmorphing, positioning}     \newcommand{\AxisRotator}[1][rotate=0] {%       \tikz \draw[x = .5em, y = 1.25em, line width = .2ex, -latex, #1] (0,0)  arc (-150:150:.5 and .5);%                                                          }          \begin{document}     \begin{center}       \begin{tikzpicture}[scale = .75]         \draw (-2,0) -- (-3,1.5);         \draw (2,0) -- (3,1.5);         \draw (-2,0) -- (2,0);         \draw[-latex] (0,.75) -- (0,2);         \draw (0,1.5) node {\AxisRotator[rotate = -90]};         \begin{scope}[yshift = .25cm]           \clip (-2.5,1) -- (2.5,1) -- (2.5,.25) -- (-2.5,.25) -- cycle;           \draw (0,1) ellipse (2.75cm and .5cm);         \end{scope}       \end{tikzpicture}     \end{center}     \end{document}


title: Stars symbol in FEN

text: > How to put stars symbol in FEN notation? I can not do it in the DiagTransfer > 3.0.1. ![enter image description here](http://i.stack.imgur.com/T2xpM.png) > I wrote (without the stars):               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage{xskak}          \begin{document}          \centering     \newchessgame[setfen=8/8/8/8/4K3/8/8/8 w - - 0 1]     \showboard          \end{document}


title: How to automatically remove space before punctuation and adding after sign?

text: Sometimes when I write some text, I mistakingly put space before dot/comma or I forget to put space after dot/comma. I would like LaTeX to remove all space before dots and add space after punctuation. For example: "This is some text . This is some text" should be "This is some text. This is some text" and "This is some text.This is some text" should be "This is some text. This is some text" I'm from Europe.