Why is the tnote of my threeparttable's table cheekily protruding? How can the width be (automatically) adjusted here?               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage{tabulary}     \usepackage{threeparttable}     \usepackage{array}     \usepackage{siunitx}     \usepackage{booktabs}     \usepackage{lipsum}     \renewcommand{\arraystretch}{1.2}     \sisetup{round-mode=places,round-precision=1, add-decimal-zero=true, add-integer-zero=true, round-integer-to-decimal}          \begin{document}                    \lipsum[1]                    \begin{table}     \centering     \begin{threeparttable}     \caption{Some long boring caption don't fall asleep 2013}          \begin{tabulary}{\textwidth}{@{}*{1}{l}*{2}{S[table-format=3.2]}@{}}     \toprule     & {incl.\ Ingredients A\tnote{1a}} & {excl.\ Ingredients A\tnote{1b}} \\     \midrule     DDDDDDDDDDD & 36.1 & 22.0\\     GGGGGGGGGGGG & 30.9 & 20.0\\     GGGG\tnote{2} & 33.0 & 22.8\\     OOOO\tnote{2} & 33.766 & 24.643     \\ \bottomrule     \end{tabulary}          \begin{tablenotes}     \item [2] Unweighted Average     \item [] Source: radiowaves from outer space 1999     \end{tablenotes}          \end{threeparttable}     \end{table}                    \lipsum[2]                    \end{document}


title: Ignoring arguments of label, ref etc. for spell checking in TeXnicCenter

text: It is well-known that the argument of certain commands (`label`, `ref`, `cite` are typical examples) almost never make any sense in LaTeX, and should be hence avoided when spell checking is performed. I have found examples for environments where it is not working (TeXMaker), and instances where it seems to work (kile, TeXlipse). However, I simply wasn't able to get any information about this problem in TeXnicCenter! So the question is: is it somehow possible to perform spell checking in TeXnicCenter with the arguments of these commands ignored?


title: Visualizing broad Tikz tree graph

text: Modules of software I created produce Tikz QTree diagrams for visualisation. The problem is that some trees grow quite broad... ![enter image description here](http://i.stack.imgur.com/zCoD4.png) Even when I try to massively shrink them by Tikz settings, I cannot fit them on the page. I use the following, which has no effect:               \begin{tikzpicture}[level/.style={sibling distance=1mm/#1}]     \tikzstyle{every node}=[font=\tiny]       \tikzstyle{level 1}=[sibling distance=2mm]       \tikzstyle{level 2}=[sibling distance=2mm]       \tikzstyle{level 3}=[sibling distance=2mm]      Is there a way to further size them down or/ and another way to visualize Tikz output (like an applet or something?).


title: Apacite for in proceedings

text: I am using `apacite` to format inproceedings entries, and from what I read, in APA style the volume and pages should be separated by commas, like this:               Author, A. A., & Author, B. B. (1996). Title of journal article: Subtitle of journal article. Title of journal, volume number, first page-last page.      Instead, apacite puts the volume and page in brackets: IEEE International Conference on Systems, Man and Cybernetics, (Vol. 1, p. 317-322). I thought `apacite` formats according to the APA standard, yet in this case it doesn't seem so. Is there a way to change this behavior?


title: Bib file does not update in TexMakerX when I build the file

text: I am using `Bib.bib` file for all the references. When I use `\cite{someref}` it works fine for the first time but when I update the `Bib.bib` file it does not get the updated information, it just show the previous information. I just build the file by quick build button.


title: How to avoid cutting tables at end of page?

text: How to avoid this kind of things? The table has the double of height you can see ![enter image description here](http://i.stack.imgur.com/BNOvb.png)


title: LyX error - 'Document format failure' for file in temporary folder

text: I have been working during the last year in my thesis with LyX. Yesterday I opened my file in another computer and when I open it in mine this error appears: ![enter image description here](http://i.stack.imgur.com/IQSok.png) What can I do to solve this issue? Thank you very much in advance. It is very urgent because I will submit my thesis in a few weeks. Greetings


title: \textit doesn't work with babel’s russian and mathptmx

text: `\textit` doesn't work in a LaTeX template for a thesis in English. Now I am writing my thesis in Russian using the same template. MWE:               \documentclass{article}           \usepackage[utf8]{inputenc}     \usepackage[russian]{babel}     \usepackage{mathptmx}     \begin{document}     оценка эвапотранспирации тростника обыкновенного     \textit{(Phragmites Australis)}     \end{document}      ![output](http://i.stack.imgur.com/jgq4a.png)


title: Breakage of Tikz fill operation on cycle path with let and node reference?

text: Consider this MWE:               \documentclass[varwidth]{standalone}          \usepackage{tikz}     \usepackage{calc} % \widthof     \usetikzlibrary{calc}          \pagecolor{yellow!15}     \begin{document}     \begin{tikzpicture}          \node (neL0) at (1,4) {};     \node (neRM) at (5,2.5) {};     \path let \p1=(neL0), \p2=(neRM), \p3=(\x1,\y2), \p4=($(\p3)+(0,10pt)$), \p5=($(neRM)+(0,-10pt)$) in       [draw=red,fill=yellow,opacity=0.9] (\p3) -- (\p4) -| (neRM) -- cycle ;          \node (neL0) at (1,5) {};     \node (neRM) at (5,3.5) {};     \path let \p1=(neL0), \p2=(neRM), \p3=(\x1,\y2), \p4=($(\p3)+(0,10pt)$), \p5=($(neRM)+(0,-10pt)$) in       [draw=red,fill=yellow,opacity=0.9] (\p3) -- (\p4) -| (\p2) -- cycle ;          \end{tikzpicture}     \end{document}      The two paths should be identical - however, when I compile, I get this output: ![test03.png](http://i.stack.imgur.com/QsrPg.png) ... that is, the below (first) path, has its fill broken - and the reason for that apparently is using `(neRM)` in the path construction, instead of `(\p2)`. Not sure - is this supposed to work this way with `let` path construction commands - or is this a bug?


title: LyX and Nomenclatures

text: I'm using LyX and trying to use the `nomenclature` package to insert a bunch of acronyms into my document. I've inserted a Nomenclature table (`Insert` -> `List/TOC` -> `Nomenclature`). I've then created a Nomenclature entry (`Insert` -> `Nomenclature entry`), and I can insert one fine. And I've also just figured out how to insert another one - you just delete the old text and enter in new details. It's not the most intuitive, and I would have thought LyX could supply you with a list of previously used acronyms to reinsert, but ah well. However, how do I get the actual acronyms to print the text? As it is, I have to type in both the text I want displayed, and the acronym entry. I'm fairly certain there's an easier way, but I'm not sure if I can do it within LyX or I have to use LaTeX directly?


title: Generating Glossaries again without deleting the old ones

text: I am generating my glossaries (perl installed) with               makeglossaries      and they are all created and shown in my pdf when I create them the first time. Over the time my glossaries change and new ones are added etc. But when I call make glossaries again they aren't updated. Regardless on how many times a call the command. The only way to "refresh" them is to delete all temporary files from the tex- compilation and compile everything again. But that can't be right, right? :) Hopefully somebody can help me. Grettings Lukas * * * Edit: Thanks so far! I do all the recompiling before and after "makeglossaries". In addition I experience the following:   * Only existing glossaries aren't changing after e.g. I fixed a typo in the description or want to have another \first occurence.    * Completely new entries are added after the whole recompiling/makeglossaries process and shown as they should. Her is my MWE including (hopefully) all relevant information:               \documentclass{scrreprt}     %[...] other packages, commands, etc.     \usepackage{hyperref}     \usepackage[toc, nonumberlist, acronym, translate=babel]{glossaries}      \begin{document}     \listoftables     \listoffigures     \tableofcontents     \printglossary[type=\acronymtype]     %[...] includes, etc. ...     \input{Inhalt/glossaries}     \printglossary[type=main]      \glsresetall     \end{document}


title: tikz complex mindmap of all disciplines and subdisciplines of knowledge

text: just started using LaTex yesterday and I am stuck on my very ambitious diagram of all disciplines of knowledge. Problems (some simple, some probably more complicated):   * change the page size to even fit it all ?   * center the main parent node ?   * is there a simple way of using sibling angle with a diagram this vast?   * i still havent added all nodes to all disciplines (but see e.g. physics or logic node, they have so many, i don't know how to align them)   * ultimately connections between subdisciplines would be nice too, but the vastness is already overwhelming. Any help and advice is greatly appreciated! Here's my code so far:                    \documentclass[tikz] {standalone}          \usetikzlibrary{mindmap}          \usepackage[paperwidth=100cm,paperheight=100cm,hmargin=0cm,vmargin=0cm]{geometry}                         \begin{document}          \begin{tikzpicture}               \path[mindmap, concept color=black, text=white,            level 1 concept/.append style={level distance=52mm, sibling angle=100},            level 2 concept/.append style={sibling angle=30},            level 3 concept/.append style={sibling angle=20}]               node[concept] {Disciplines}          [clockwise from=0]          child[concept color=blue] {            node[concept] {Humanities}            [clockwise from=120, level 2 concept/.append style={sibling angle=50}]               child { node[concept] {Human History} }               child { node[concept] {Linguistics} }               child { node[concept] {Literature} }               child { node[concept] {Arts} }               child { node[concept] {Philosophy} }               child { node[concept] {Religion} }          }          child[concept color=green!60!black] {            node[concept] {Social Sciences}            [clockwise from=0]            child { node[concept] {Anthropology} }            child { node[concept] {Archaeology} }            child { node[concept] {Area studies} }            child { node[concept] {Cultural and ethnic studies} }            child { node[concept] {Economics} }            child { node[concept] {Gender and sexuality studies} }            child { node[concept] {Geography} }            child { node[concept] {Political science} }            child { node[concept] {Psychology} }            child { node[concept] {Sociology} }          }          child[concept color=red] {             node[concept] { Natural Sciences}             [clockwise from=-110]            child { node[concept] {Space sciences} }            child { node[concept] {Earth sciences} }            child { node[concept] {Biology} }            child { node[concept] {Chemistry} }            child { node[concept] {Physics}               [concept color=red!60]              [clockwise from=30]              child [grandchild] {node[concept] {Acoustics} }              child [grandchild] {node[concept] {Applied Physics} }              child [grandchild] {node[concept] {Astrophysics} }              child [grandchild] {node[concept] {Atomic, molecular and optical physics} }              child [grandchild] {node[concept] {Biophysics} }              child [grandchild] {node[concept] {Computational physics} }              child [grandchild] {node[concept] {Condensed matter physics} }              child [grandchild] {node[concept] {Cryogenics} }              child [grandchild] {node[concept] {Electromagnetism} }              child [grandchild] {node[concept] {Elementary particle physics} }              child [grandchild] {node[concept] {Fluid dynamics } }              child [grandchild] {node[concept] {Geophysics} }              child [grandchild] {node[concept] {Materials science} }              child [grandchild] {node[concept] {Mathematical physics} }              child [grandchild] {node[concept] {Medical physics} }              child [grandchild] {node[concept] {Mechanics} }              child [grandchild] {node[concept] {Molecular physics} }              child [grandchild] {node[concept] {Newtonian physics} }              child [grandchild] {node[concept] {Nuclear physics} }              child [grandchild] {node[concept] {Optics} }              child [grandchild] {node[concept] {Plasma physics} }              child [grandchild] {node[concept] {Quantum physics} }              child [grandchild] {node[concept] {Solid mechanics} }              child [grandchild] {node[concept] {Solid state physics} }              child [grandchild] {node[concept] {Statistical mechanics } }              child [grandchild] {node[concept] {Theoretical physics} }              child [grandchild] {node[concept] {Thermodynamics} }              child [grandchild] {node[concept] {Vehicle dynamics} } }          }          child[concept color=orange] {             node[concept] { Formal Sciences}             [clockwise from=140]            child { node[concept] {Logic}               [concept color=orange!60]               child [grandchild] {node[concept] {Mathematical Logic} }               child [grandchild] {node[concept] {Philosophical Logic} }               child [grandchild] {node[concept] {Logic in Computer Science} } }            child { node[concept] {Mathematics}               [concept color=orange!60]               child [grandchild] {node[concept] {Algebra} }               child [grandchild] {node[concept] {Analysis} }               child [grandchild] {node[concept] {Probability theory} }                child [grandchild] {node[concept] {Geometry} }               child [grandchild] {node[concept] {Number theory} }               child [grandchild] {node[concept] {Logic and Foundations of mathematics} }               child [grandchild] {node[concept] {Applied Mathematics} } }            child { node[concept] {Statistics} }            child { node[concept] {Systems science} }          }          child[concept color=gray] {             node[concept] { Applied Sciences and Professions}             [clockwise from=0]            child { node[concept] {Agriculture} }            child { node[concept] {Architecture and design} }            child { node[concept] {Business} }            child { node[concept] {Divinity} }            child { node[concept] {Education} }            child { node[concept] {Engineering} }            child { node[concept] {Environmental studies and forestry} }            child { node[concept] {Family and consumer sciences} }            child { node[concept] {Healthcare science} }            child { node[concept] {Human physical performance and recreation} }            child { node[concept] {Journalism, media studies and communication} }            child { node[concept] {Law} }            child { node[concept] {Library and museum studies}}            child { node[concept] {Military sciences} }            child { node[concept] {Public administration} }            child { node[concept] {Social work} }            child { node[concept] {Transportation} }          }                    \end{tikzpicture}          \end{document}      Thanks again!


title: How to draw up this hierarchical diagram?(Or similar way)

text: I Would like to know how to draw this diagram or similar. Thx. ![enter image description here](http://i.stack.imgur.com/HAzvi.jpg) I have started to use LaTeX just a few weeks to try pass a `.doc` to `.tex`, but I don't know how do this image. I tried use one exemple to do that, but I could not adjust the size and add dashed line.               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage{tikz}     \usepackage{tikz-qtree}     \usetikzlibrary{trees} % this is to allow the fork right path               \title{Tikz}     \author{fernando_bcc }     \date{April 2014}          \begin{document}          \begin{tikzpicture}[level.style={sibling distance=1mm}]     \tikzset{edge from parent/.style=                  {thick, draw, edge from parent fork down},              every tree node/.style=                 {draw,minimum width=0.8in,text width=1in,align=center,{sibling distance=1mm}}}               \Tree          [. Sistema              [.{Estáticos}             ]             [.{Dinâmicos}                 [.{Variante no tempo } ]                 [.{Invariante no tempo}                     [.{Linear} ]                     [.{Não Linear}                          [.{Estados contínuos} ]                         [.{Estados discretos}                              [.{Dirigidos pelo tempo} ]                             [.{Dirigidos por eventos}                                  [.{Determinísticos} ]                                 [.{Não determinísticos}                                     [.{Tempo discretizado} ]                                     [.{Tempo contínuo} ]                                 ]                             ]                         ]                     ]                 ]             ]          ]     \end{tikzpicture}          \maketitle          \section{Introduction}          \end{document}


title: Tables: Automatic adjustment of columnwidth to its content gives error "Misplaced \noalign" at \toprule

text: I am trying to put two tables next to each other, vertically aligned top, with some below listed adjustments I unfortunately can't get together. First, I'd like to know if/how I can avoid the error `! Misplaced \noalign` in combination with `\toprule` and `\bottomrule` before `{tabular}`. Inside of tabular the `\\...rule` would work, but I'd like to have one single line above and below the tables. Also   1. How can i adjust the width of some columns automatically to it's widest content (to avoid the fixed `L{xxcm}` at the tabular definition)?    2. _How is it possible to make the content of the first row centered without a multicolumn for each entry?_   3. Where and how do I properly set the width of both tables together to for example 75% of the pagewidth (at the environment of `mytable`, `subfloat`, `[minipage]`?)  These things I'd like to apply to the example below. Many thanks in advance               \documentclass[a4paper,oneside,titlepage]{scrbook}     %\usepackage[T1]{fontenc} %Silbentrennung     %\usepackage[utf8]{inputenc} % Umlaute     %\usepackage[ngerman]{babel}     \usepackage{booktabs}     \usepackage{tabularx}     \usepackage{subfig}      \newcommand{\mW}[2]{$\overline{#1}=#2$}      \newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}     \newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}     \newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}}     \captionsetup[subfloat]{position=top}          \newenvironment{mytable}[1][htb] {%         \begin{table}[#1]\small         }         {\end{table}         }                \begin{document}          \begin{mytable}         \centering         \caption{Worms}         \toprule         \subfloat{%         %\begin{minipage}[c]{6.5cm}             \begin{tabular}{L{1.6cm}R{1.2cm}R{0.7cm}R{0.7cm}R{0.5cm}}                 Klasse & Zeit & y & x & Bez. \\                 \midrule                 0,0 - 2,1& a, 16:45 & 0,0   & 1,0   & H1 \\                 \mW{x}{1,1}& a, 16:56 & 5,0   & 0,5   & H2 \\                 & a, 17:15 & 10,0  & 1,0   & H3 \\                 & a, 17:37 & 15,0  & 2,1   & H4 \\                 & b, 12:40 & 37,4  & 1,0   & H7 \\                 \midrule                 5,0 - 6,0& a, 16:20 & 0,0   & 5,0   & I1 \\                 \mW{x}{5,2}& a, 16:58 & 5,0   & 5,0   & I2 \\                 & a, 17:19 & 10,0  & 6,0   & I3 \\                 & b, 12:39 & 37,4  & 5,0   & I7 \\                 \midrule                 10,0 - 12,1& a, 16:30 & 0,0   & 10,0  & J1 \\                 \mW{x}{10,4}& a, 17:00 & 5,0   & 10,0  & J2 \\                 & b, 12:44 & 31,0  & 10,0  & J6 \\                 & b, 12:38 & 37,4  & 10,0  & J7 \\             \end{tabular}%                  \label{tab:khlkjlkjlk}%         %\end{minipage}         }         \quad         \subfloat{         %\begin{minipage}[c]{6.5cm}             \begin{tabular}{L{1.6cm}R{1.2cm}R{0.7cm}R{0.7cm}R{0.5cm}}                 Klasse & Zeitpunkt & y & x & Bez. \\                 \midrule                 15,0 - 17,1& a, 16:32 & 0,0   & 15,0  & K1 \\                 \mW{x}{15,7}& a, 17:04 & 5,0   & 15,0  & K2 \\                 & a, 17:25 & 10,0  & 16,0  & K3 \\                 & a, 17:49 & 15,0  & 17,1  & J4 \\                 & b, 12:36 & 37,4  & 15,0  & K7 \\                 & b, 08:24 & 37,4  & 16,5  & M7 \\                 & b, 12:50 & 37,4  & 16,5  & M7 \\                 \midrule                 18,6 - 20,6 & a, 16:38 & 0,0   & 20,0  & L1 \\                 \mW{x}{19,7}& b, 06:13 & 5,0   & 18,6  & M2 \\                 & b, 11:05 & 5,0   & 18,6  & M2 \\                 & a, 17:07 & 5,0   & 19,0  & L2 \\                 & b, 06:17 & 7,5   & 20,2  & M3 \\                 & b, 06:21 & 15,0  & 20,6  & M4 \\                 & b, 06:25 & 23,1  & 20,3  & M5 \\                 & b, 06:30 & 31,0  & 19,7  & M6 \\                \end{tabular}%             \label{tab:blablabel}%         %\end{minipage}         }         \bottomrule     \end{mytable}     \end{document}      ![enter image description here](http://i.stack.imgur.com/qHCdp.png) [Edit author: _Changed title is misleading!   Should be something like that: 1.) Automatic adjustment of columnwidth to its content 2.) '!Misplaced \noalign' at \toprule 3.) Horizontal alignment of the contents of a row_ ]


title: Define command depending on whether beamer is in handout mode or not

text: I'm defining a command that should behave differently in handouts vs presentation. Is there a simple way to check that? Ideally, it should be something like this:               \newcommand{\mycom}{     \ifthenelse{[check if handout mode]}{[Behave accordingly]}{[Behave otherwise]}     }      How can I do this?


title: The best way to create illustrations for a book, reports, etc

text: I use LaTeX in Mac for my scientific reports. I want to include illustrations like this: ![enter image description here](http://i.stack.imgur.com/3KFOn.jpg) One of my professors recommended DrawPerfect 1.1. It is obvious that he is outdated. I was thinking of using Illustrator or other vector drawing program or use PGF, TikZ, PSTricks, but I not sure what is the best option for a drawing program properly integrated with LaTeX which is not too difficult to use. What are the reasons to choose from the various options?


title: unscalable oldstyle numbers through \newfont with XeLaTeX (Minion)

text: In what is below, the `\newfont` command does not scale the numbers. I would like to know why.               \documentclass{book}     \usepackage{fontspec}     \setmainfont[Ligatures={Common}, Numbers={OldStyle}]{Minion Pro}     \newfont{\myFont}{MinionPro-BoldCn.otf scaled 5000}     \begin{document}     \myFont 123456789 \Huge 123456789     \end{document}


title: Page with Symbols and Notation

text: I want to make a section for symbols and special notation, which should look like this: ![enter image description here](http://i.stack.imgur.com/hDghX.png) What would you suggest in doing this? Should I just do like a table and create an array of 3 columns?


title: \subsection{...}-result in line with following text

text: Hello this is my first question here. Normally, if I write something like               \subsection*{a)}      blabla      it is displaid like **a)**   blabla Now I want to achieve that this two elements are inline like **a)** blabla Is this possible?


title: Limit a section to a number of pages?

text: Is there a way I can limit a section to a specific number of pages ? For example, I am currently in a section that must not exceed two pages, however I have not completed the previous section, so I cannot scale it to how it might look like in the PDF (type, compile, check, fix, compile, check etc)... I can also start a new Tex file and do it there, but that's not very efficient. Is there a way I can say this section cannot exceed two pages worth of words ?


title: Opacity in PDF not rendered the same between Adobe Reader and TeXworks

text: When producing a PDF from the following example using `pdflatex`, I get different results between Adobe Reader and TeXworks. I think this is a bug in the way that Reader handles opacity/transparency. My goal is to have just a small space between the black node and each edge (like how TeXworks is rendering it), and the way I'm doing that is by setting a black fill and `color=transparent`/`opacity=0` edge for each node. Can anyone suggest a nice workaround to get consistent results? I have many trees I am trying to render that suffer from this issue and I would like to have the space between the edge and node be transparent rather than white. Maybe I can draw fully transparent nodes, and then draw a smaller black node on top of each of these. Can this be automated as part of the `state` syle? Or can I set a gap between the start and end of every edge? (How would I do this?)               \documentclass{article}     \usepackage{tikz}          \tikzstyle{lts}=[       state/.style={circle,draw,minimum size=4pt,inner sep=0pt,line width=2pt,draw opacity=0,color=transparent,fill=black},       edge from parent/.style={-stealth,draw},       obs/.style={edge from parent/.style={-stealth,draw,very thick}},     ]          \begin{document}         \begin{tikzpicture}[lts]           \node[state] {}             child[obs] {node[state] {}             edge from parent node {}}             child[obs] {node[state] {}             edge from parent node {}};         \end{tikzpicture}     \end{document}      Comparing the rendering in TeXworks to Reader: ![http://i.stack.imgur.com/xw3zu.png](http://i.stack.imgur.com/xw3zu.png)


title: How to insert Greek letters directly in math environment?

text: Why are non-Latin characters not displayed in formulas, even when using XeLaTeX?               \documentclass{article}     \usepackage{xltxtra}          \begin{document}          $\omega$ %displyed       $ω$ %not displyed          \end{document}      **A complementary for following answers:** You can use the following sites to copy and paste a lot of math symbols directly to your tex file, using unicode-math package:   * http://access2science.com/indexMathLanguages.html   * http://jrgraphix.net/r/Unicode   * http://tlt.its.psu.edu/suggestions/international/bylanguage Beside more readability in your markup you have not to search for a specific package that provide a special symbol.


title: Problem with hyperref/cleveref interaction and specially tagged equations

text: I would like to resolve the infamous warning `destination with the same identifier (name{equation.0.1}) has been already used, duplicate ignored` in my MWE below. Reading around this site, the package order seems to be correct. One solution I found was to use `hypertexnames=false` as an option for `hyperref`, which indeed fixes the links, but cannot be used in a document with front/main/backmatter, as then the page links are wrong.               \documentclass{article}          \usepackage{amsmath}     \usepackage{hyperref} % don't use hypertexnames=false     \usepackage{cleveref}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \begin{document}          \begin{equation}\label{eq:special1}       a = b \tag{*}     \end{equation}     and     \begin{equation}\label{eq:special2}       c = d \tag{**}     \end{equation}          \Cref{eq:special1} and \cref{eq:special2}.     \end{document}


title: TikZ, a selfloop without an arrow at the end

text: In TikZ, within the context of `automata`, I would like to draw a loop without arrow in order to be able to highlight a path in an automaton, as shown by the following example (which highlight a path without any loop). For standard arc (i.e. arcs between two distinct states) I just draw two arcs:   * first a thick colored arc without any arrow at its end   * second a standard arc but this does not work for loops.               \usepackage{color}     \usepackage{tikz} \usetikzlibrary{shapes,arrows,automata,backgrounds,matrix,decorations,trees}          \def\ctrref#1{$\constraint{#1}$\index{#1@$\constraint{#1}$|indexuse}}     \def\ctrrefself#1{$\constraint{#1}$}     \def\argument#1{\mathtt{#1}}     \def\constraint#1{\mathtt{#1}}          \definecolor{MyYellowlight}{cmyk}{0,0,0.05,0}          \begin{figure}[!h]     \begin{center}     {\footnotesize         \begin{tikzpicture}[shorten >=1pt,auto,node distance=18mm,semithick]           \node[initial,initial text= ,initial distance=10mm,state,fill=MyYellowlight]  (s00)               {$s_{00}$};           \node[state,fill=MyYellowlight]                               (s11) [right of=s00]    {$s_{11}$};           \node[state,fill=MyYellowlight]                               (s12) [right of=s11]    {$s_{12}$};           \node[state,fill=MyYellowlight]                               (s21) [below of=s12]    {$s_{21}$};           \node[state,fill=MyYellowlight]                               (s31)    [below of=s21] {$s_{31}$};           \node[accepting,state,fill=MyYellowlight]                     (s41) [below of=s31]    {$s_{41}$};           \node[accepting,state,fill=MyYellowlight]                     (s51)    [left of=s41]  {$s_{51}$};           \node[accepting,state,fill=MyYellowlight]                     (s61)    [left of=s51]  {$s_{61}$};           \path           (s00) edge [line width=4pt,orange!70]             node {$\bf 3$} (s11)                 (s00) edge [->,>=stealth']                        node {} (s11)                 (s11) edge [line width=4pt,orange!70]             node {$\bf 3$} (s12)           (s11) edge [->,>=stealth']                        node {} (s12)           (s12) edge [->,>=stealth',loop above]             node {$3$} (s12)           (s12) edge [->,>=stealth']                        node [left] {$4$} (s21)           (s12) edge [->,>=stealth',bend left]              node [right, very near end] {$5$} (s31)           (s12.325) edge [line width=4pt,orange!70,bend left]   node {$\bf 6$} (s41)           (s12.325) edge [->,>=stealth', bend left]         node {} (s41)           (s21) edge [->,>=stealth']                        node [left] {$5$} (s31)           (s21) edge [->,>=stealth',bend right]             node [left] {$6$} (s41)           (s31) edge [->,>=stealth']                        node [left] {$6$} (s41)           (s41) edge [->,>=stealth',loop right]             node {$6$} (s41)           (s41) edge [->,>=stealth']                        node [above] {$7$} (s51)           (s41) edge [line width=4pt,orange!70,bend left]       node {$\bf 8$} (s61)           (s41) edge [->,>=stealth', bend left]             node {} (s61)           (s51) edge [->,>=stealth']                        node [above] {$8$} (s61);         \end{tikzpicture}     }     \end{center}     \caption{Automaton of the \ctrrefself{increasing\_global\_cardinality} constraint of the {\bf Example} slot: the path corresponding to the solution $\langle {\color{orange!70}\bold{3}},{\color{orange!70}\bold{3}},{\color{orange!70}\bold{6}},{\color{orange!70}\bold{8}}\rangle$ is depicted by thick orange arcs}     \label{fig:increasing_global_cardinality1}     \end{figure}


How to prevent longtable to put header alone in one page like in image below. I used `endhead` to prevent this but this will print the header on each page. ![enter image description here](http://i.stack.imgur.com/otoMO.png) Sorry I don't give **MWE** because I haven't succeeded to reproduce it with minimum data.


title: Referencing subfigures in main caption (with \subfloat and \subref)

text: I've used subfloat to include subfigures, with their relevant labels but with empty captions. what I'm going to do is to reference these figures with \subref in the main caption of the figure. But what I get is only ?? signs in the caption [main caption]. I can't figure out what's the problem. this is what I have:               \begin{figure}     \centering     \subfloat[][]     {     \includegraphics[scale=0.55]{signal}     \label{signal_model}     }     \subfloat[][]     {     \includegraphics[scale=0.55]{amplitude}     \label{amplitude_mod}     }     \caption{phase noise variability: \subref{signal model} some text \subref{amplitude_mod} some other text}     \end{figure}


title: Why use .sty files?

text: Why is it preferable to put inclusions of commonly used packages and user defined commands in a `.sty` file instead of putting them in an ordinary `.tex` file?


title: Changing the alignment of comments when using algorithmics

text: When using comments in the algorithmicx package like in the code below, the comment is aligned at the right. How do I change that? I'd like the comment to appear next to the code, separated by a tab.               \usepackage{algorithm}     \usepackage{algpseudocode}     \begin{algorithm}     \begin{algorithmic}     \State $var$ \Comment{comment about var}     \end{algorithmic}     \end{algorithm}


title: Hightlight an XML code beamer

text: To hightlight an XML code I have refer to XML syntax highlighting, so I write:               \documentclass[10pt]{beamer}     \usepackage{listings}          \usepackage{color}     \definecolor{gray}{rgb}{0.4,0.4,0.4}     \definecolor{darkblue}{rgb}{0.0,0.0,0.6}     \definecolor{cyan}{rgb}{0.0,0.6,0.6}          \lstset{     basicstyle=\ttfamily,     columns=fullflexible,     showstringspaces=false,     commentstyle=\color{gray}\upshape     }          \lstdefinelanguage{XML}     {       morestring=[b]",       morestring=[s]{>}{<},       morecomment=[s]{<?}{?>},       stringstyle=\color{black},      identifierstyle=\color{darkblue},      keywordstyle=\color{cyan},      morekeywords={xmlns,version,type}% list your attributes here      }          \begin{document}          \begin{frame}[fragile]{Structure}          \lstset{language=XML}     \begin{lstlisting}     <?xml version="1.0"  encoding="iso-8859-1"?>     <country>         <name> France </name>         <city> Paris </city>         <region>             <name> Nord-Pas De Calais </name>             <population> 3996 </population>             <city> Lille </city>        </region>        <region>            <name> Valle du Rhone </name>            <city> Lyon </city>            <city> Valence </city>            </region>     </country>     \end{lstlisting}     \end{frame}          \end{document}      Now I want to put in evidence some tags, color them or put them in a color rectangle, I looked for this two posts Mark a pseudocode block and insert comments near it or Beamer - Source code highlighting/annotation tips but I did not understand how it works.


title: TeXnicCenter quick build

text: I use TeXnicCenter to build my LaTeX documents under Windows 7. I usually have 3-4 tabs open in TeXnicCenter corresponding to the different sections of my document. To build my document I have to go to the first tab (the index of my file), build, and then go back to the old tab where I was editing (one of the sections). Is there a smarter way of doing this? I would like a hotkey that just move to the first tab and compile. `F5` only compiles the current tab, it is not aware if it is the index or not.


title: Read single value from a table

text: I will use in many places in my LaTeX document a specific value given in, say, the row 2 and column 1 from a table. Is it possible to make a macro for it, such as \read{2}{1} ? Here is an simple example of a table, from which I want to read the value 22.                  \begin{filecontents}{testdata.dat}           height 20           length 21           depth 22         \end{filecontents}


title: Are there guidelines on how to read commented sources of LaTeX packages?

text: I'm trying to read `source2e.pdf` (`texdoc source2e` on the command line), but I'm stumped. It seems a rather mysterious tome to me. As I understand from this answer about what arguments a command expects, a source file is somehow the _de facto_ "complete reference" for LaTeX macros that a particular package provides. `source2e.pdf` doesn't provide clues as to where to start reading. The beginning chapters `ltdirchk.dtx`, `ltplain.dtx`, etc. don't seem to help. Are there guidelines on how to read source files? Or is there prerequisite knowledge that I might have missed? I'm familiar with the syntax, and I would like to know what options and arguments are available for a particular command. **In response to TH's answer:**   I come from a programming background. I see that LaTeX has many elements of programming such as macros, commands, arguments, etc. So I'm approaching it the way I would learn a new programming language. **To put it simply:**   If, in the course of tutorial, I read about _italicizing_ text using `\textit`. For some odd reason, the tutorial didn't mention how to make **bold** text. Instinctively as a programmer, I would want to look up a reference library, go to the **Text Formatting** section, then, "Aha! Here are all the macros for formatting text!". There, I'll find things like italicize, bold, underline, strikethrough, superscript, subscript, etc., as well as syntax guidelines and some live examples. **Another example:**   When I learn that a particular package has an `\author` macro, I'll say, "Aha! This package has capabilities to make writing _front matter_ easier." So I would want to look up the reference library, then see all the other capabilities, like the date, or even specifying a separate title page. **About tutorials and reference libraries:**   For me, tutorials are what I call a "linear" mode of learning, e.g. step-by- step or _ouido_. They make a good launch pad from which I learn what a particular tool is able to do. In my example above, I learned that LaTeX can italicize text. I think to myself "Oh, LaTeX can do some fancy text formatting, therefore it must be able to do other related things." At this point, I switch to "hierarchical" mode of learning. I begin to classify the capabilities as **Text Formatting** , or **Front Matter** , then I'll know how to look for it in the reference library. **What I'm trying to get from reading commented sources:**   I want to see how LaTeX macros are related to each other, then I'll be able to effectively use my "hierarchical" learning approach. Also have a look here (same link as at the beginning of the question). I want to be able to read through all the `@`'s and `{#1}%`'s and `{#2}%`'s. So I'm also looking for guidelines on what all those symbols mean.


title: Keep all footnotes on the according page

text: Is there a way to keep all footnotes on the page where they belong to? I have several (20-30) footnotes per page (some short, some stretch over multiple lines). Sometimes latex places the last one or two footnotes on the next page. Is there a way to enforce a strict footnote placement?


title: biblatex problem - year dropped from only one citation for some reason

text: Good day. Here is my preamble:               \documentclass[12pt]{article}     \usepackage{amsmath}    % needed for including graphics e.g. EPS, PS     %\usepackage{natbib}     \usepackage[T1]{fontenc}     \usepackage{titling}     \setlength{\droptitle}{-3cm}     \topmargin -0.5cm        % read Lamport p.163     \oddsidemargin -0.04cm   % read Lamport p.163     \evensidemargin -0.04cm  % same as oddsidemargin but for left-hand pages     \textwidth 16.59cm     \textheight 21.94cm     %\captionsetup[table]{font=bf,position=below}     %\captionsetup[figure]{font=bf}     \usepackage{ctable}     \usepackage[style=authoryear,natbib=true, url=true,backend=bibtex]{biblatex}     \setlength\bibitemsep{1.5\itemsep}     \renewbibmacro{in:}{%       \ifentrytype{article}{}{%       \printtext{\bibstring{in}\intitlepunct}}}       \DefineBibliographyStrings{english}{%         urlseen = {Accessed on},       }     \makeatletter     \AtEveryBibitem{%       \global\undef\bbx@lasthash%       \clearfield{extrayear}}     \makeatother     \bibliography{turkeybanking}     \nocite{*}     \usepackage{url}     %\pagestyle{empty}       % Uncomment if don't want page numbers     \parskip 7.2pt           % sets spacing between paragraphs     \usepackage{setspace}     %\doublespacing     \renewcommand{\baselinestretch}{1.6}    % Uncomment for 1.5 spacing between lines     %\linespread{2}     \parindent 0cm        % sets leading space for paragraphs      My problem is strange. I have a list of 45 citations in my biblatex file. When I do a quickbuild in TexMaker, whatever the 36th citation is, the year is dropped in the reference list and the intext citation becomes author (title) instead of author (year). If I change the order of the references in my biblatex file, the problem jumps to a new reference. But for some reason it is always the 36th reference that has the problem. Everything before and after is fine. I also have another tex file that uses the same preamble and the same biblatex file and everything works fine. I know this sounds a bit odd and I am a bit of a LaTeX neophyte, but if anyone can give me some help, I would appreciate it. UPDATE Take the following document as an example:               \begin{document}          \textcite{altunbas2009turkish}, \textcite{assunccao2013eliminating},     \textcite{baer2000privatization}, \textcite{beck2005state},     \textcite{biglaiser2004expansion}, \textcite{blyth2002great},     \textcite{bongini2009emerging}, \textcite{calomiris2011fragile},     \textcite{cizre2005turkish}, \textcite{de2003globalization},     \textcite{demello2012bye}, \textcite{epstein2013foreign},     \textcite{garman2001fiscal}, \textcite{gerschenkron1962economic},     \textcite{haggard1995financial}, \textcite{hutchcroft1998booty},     \textcite{kohli2004state}, \textcite{levy2004should},     \textcite{lukauskas2000explaining}, \textcite{marois2011emerging},     \textcite{martinez2003financial}, \textcite{martinez2009globalizing},     \textcite{maxfield1991bankers}, \textcite{montinola2003recovers},     \textcite{mukherjee2013candidate}, \textcite{ogura2002banking},     \textcite{onder2010banks}, \textcite{onics1998state},     \textcite{onics2009beyond}, \textcite{paula2011regulation},     \textcite{pepinsky2009openness}, \textcite{rodriguez2008banking},     \textcite{satyanath2006globalization}, \textcite{taylor2009institutional},     \textcite{thebanker2013regionalbanks}, \textcite{thebanker2013riding},     \textcite{thies2009politics}, \textcite{treisman2004stabilization},     \textcite{verdier2000rise}, \textcite{von2010federal},     \textcite{wade1990governing}, \textcite{wellons1985international},     \textcite{winters1994power}, \textcite{zhang2004changing},     \textcite{zysman1983governments}          \begin{spacing}{1.15}          \printbibliography          \end{spacing}          \end{document}      And here is my corresponding .bib file:               @article{rodriguez2008banking,     title={Banking on democracy: The political economy of international private bank lending in emerging markets},     author={Rodr{\'\i}guez, Javier and Santiso, Javier},     journal={International Political Science Review},     volume={29},     number={2},     pages={215--246},     year={2008},     }          @article{montinola2003recovers,     title={Who recovers first? Banking crises resolution in developing countries},     author={Montinola, Gabriella R},     journal={Comparative Political Studies},     volume={36},     number={5},     pages={541--574},     year={2003},     }          @article{verdier2000rise,     title={The rise and fall of state banking in OECD countries},     author={Verdier, Daniel},     journal={Comparative Political Studies},     volume={33},     number={3},     pages={283--318},     year={2000},     }          @book{gerschenkron1962economic,     title={Economic backwardness in historical perspective},     author={Gerschenkron, Alexander},     year={1962},     publisher={Cambridge, Mass.: Harvard University Press}     }          @book{haggard1995financial,     title={Financial systems and economic policy in developing countries},     author={Haggard, Stephan and Lee, Chung H},     year={1995},     publisher={Ithaca, NY.: Cornell University Press}     }          @article{de2003globalization,     title={Globalization and recent political transitions in Brazil},     author={De Castro, Marcus Faro and De Carvalho, Maria Izabel Vallad{\~a}o},     journal={International Political Science Review},     volume={24},     number={4},     pages={465--490},     year={2003},     }          @article{maxfield1991bankers,     title={Bankers' Alliances and Economic Policy Patterns Evidence from Mexico and Brazil},     author={Maxfield, Sylvia},     journal={Comparative Political Studies},     volume={23},     number={4},     pages={419--458},     year={1991},     }          @article{martinez2003financial,     title={Financial markets and politics: The confidence game in Latin American emerging economies},     author={Martinez, Juan and Santiso, Javier},     journal={International Political Science Review},     volume={24},     number={3},     pages={363--395},     year={2003},     }          @article{taylor2009institutional,     title={Institutional development through policy-making: a case study of the Brazilian Central Bank},     author={Taylor, Matthew M},     journal={World Politics},     volume={61},     number={3},     pages={487--515},     year={2009},     }          @article{marois2011emerging,     title={Emerging market bank rescues in an era of finance-led neoliberalism: A comparison of Mexico and Turkey},     author={Marois, Thomas},     journal={Review of International Political Economy},     volume={18},     number={2},     pages={168--196},     year={2011},     }          @article{thies2009politics,     title={The Politics of Exchange Rate-Based Stabilization Versus Structural Reforms in Latin America},     author={Thies, Cameron G and Arce, Moises},     journal={Comparative Political Studies},     volume={42},     number={9},     pages={1193--1216},     year={2009},     }          @article{biglaiser2004expansion,     title={The expansion of neoliberal economic reforms in Latin America},     author={Biglaiser, Glen and DeRouen, Karl},     journal={International Studies Quarterly},     volume={48},     number={3},     pages={561--578},     year={2004},     }          @article{lukauskas2000explaining,     title={Explaining styles of financial market opening in Chile, Mexico, South Korea, and Turkey},     author={Lukauskas, Arvid and Minushkin, Susan},     journal={International Studies Quarterly},     volume={44},     number={4},     pages={695--723},     year={2000},     }          @article{garman2001fiscal,     title={Fiscal decentralization: A political theory with Latin American cases},     author={Garman, Christopher and Haggard, Stephan and Willis, Eliza},     journal={World Politics},     volume={53},     number={2},     pages={205--236},     year={2001},     }          @article{winters1994power,     title={Power and the Control of Capital},     author={Winters, Jeffrey A},     journal={World Politics},     volume={46},     number={3},     pages={419--52},     year={1994},     }          @article{cizre2005turkish,     title={The Turkish encounter with neo-liberalism: economics and politics in the 2000/2001 crises},     author={Cizre, {\"U}mit and Yeldan, Erin{\c{c}}},     journal={Review of International Political Economy},     volume={12},     number={3},     pages={387--408},     year={2005},     }          @article{onics2009beyond,     title={Beyond the 2001 financial crisis: The political economy of the new phase of neo-    liberal restructuring in Turkey},     author={{\"O}ni{\c{s}}, Ziya},     journal={Review of International Political Economy},     volume={16},     number={3},     pages={409--432},     year={2009},     }          @article{mukherjee2013candidate,     title={Candidate-centred systems, public banks and equity market restrictions in developing democracies},     author={Mukherjee, Bumba and Yadav, Vineeta and Bejar, Sergio},     journal={Review of International Political Economy},     number={forthcoming},     pages={1--40},     year={2013},     }          @article{pepinsky2009openness,     title={Openness without Liberalization: Why Bankers in Emerging Markets Support Financial Internationalization},     author={Pepinsky, Thomas B},     journal={Review of International Political Economy},     number={forthcoming},     year={2013},     }          @article{epstein2013foreign,     title={When do foreign banks 'cut and run'? Evidence from west European bailouts and east European markets},     author={Epstein, Rachel A},     journal={Review of International Political Economy},     number={forthcoming},     pages={1--31},     year={2013},     }          @article{assunccao2013eliminating,     title={Eliminating entry barriers for the provision of banking services: evidence from 'banking correspondents' in Brazil},     author={Assun{\c{c}}ao, Juliano},     volume = {37},     pages = {2806-2811},     journal={Journal of Banking \& Finance},     year={2013},     }          @article{beck2005state,     title={State bank transformation in Brazil--choices and consequences},     author={Beck, Thorsten and Crivelli, Juan Miguel and Summerhill, William},     journal={Journal of Banking \& finance},     volume={29},     number={8},     pages={2223--2257},     year={2005},     }          @article{baer2000privatization,     title={Privatization and restructuring of banks in Brazil},     author={Baer, Werner and Nazmi, Nader},     journal={The Quarterly Review of Economics and Finance},     volume={40},     number={1},     pages={3--24},     year={2000},     }          @article{demello2012bye,     title={Bye, bye financial repression, hello financial deepening: The anatomy of a financial boom},     author={De Mello, Jo{\~a}o Manoel P and Garcia, M{\'a}rcio GP},     journal={The Quarterly Review of Economics and Finance},     volume={52},     number={2},     pages={135--153},     year={2012},     }          @article{treisman2004stabilization,     title={Stabilization tactics in Latin America: Menem, Cardoso, and the politics of low inflation},     author={Treisman, Daniel},     journal={Comparative Politics},     pages={399--419},     year={2004},     }          @book{zysman1983governments,     title={Governments, markets, and growth: financial systems and the politics of industrial change},     author={Zysman, John},     year={1983},     publisher={Ithaca, NY.: Cornell University Press}     }          @article{calomiris2011fragile,     title={Fragile Banks, Durable Bargains: Why Banking is All about Politics and Always Had Been},     author={Calomiris, Charles and Haber, Stephen},     journal={Book manuscript in progress},     year={forthcoming}     }          @article{levy2004should,     title={Should the government be in the banking business? The role of state-owned and development banks},     author={Levy-Yeyati, Eduardo and Micco, Alejandro and Panizza, Ugo},     year={2004},     publisher={Research Working Paper \#517. Inter-American Development Bank}     }          @article{onder2010banks,     title={Banks, regional development disparity and growth: evidence from Turkey},     author={{\"O}nder, Zeynep and {\"O}zy{\i}ld{\i}r{\i}m, S{\"u}heyla},     journal={Cambridge journal of economics},     volume={34},     number={6},     pages={975--1000},     year={2010},     }          @book{martinez2009globalizing,     title={Globalizing in Hard Times: The Politics of Banking-Sector Opening in the Emerging World},     author={Martinez-Diaz, Leonardo},     year={2009},     publisher={Cornell University Press}     }          @book{blyth2002great,     title={Great Transformations: Economic Ideas and Institutional Change in the Tewntieth Century},     author={Blyth, Mark},     year={2002},     publisher={Cambridge, Mass.: Cambridge University Press}     }          @InCollection{paula2011regulation,     author = {{de Paula}, Luiz Fernando and Sobreira, Rog{\'e}rio},     title = {The 2008 Financial Crisis and Banking Regulation in Brazil},     booktitle = {An Assessment of the Global Impact of the Financial Crisis},     OPTcrossref = {crossref},     OPTkey = {key},     publisher = {Basingstoke: Palgrave Macmillan},     year = {2011},     editor = {Arestis, Philip and Sobreira, Rog{\'e}rio and Oreiro, Jos{\'e} Luis},     }               @book{onics1998state,     title={State and market: The political economy of Turkey in comparative perspective},     author={{\"O}ni{\c{s}}, Ziya},     year={1998},     publisher={Bo{\u{g}}azi{\c{c}}i University Press Istanbul},     }          @article{wellons1985international,     title={International debt: the behavior of banks in a politicized environment},     author={Wellons, Philip A},     journal={International Organization},     pages={441--471},     year={1985},     }          @book{bongini2009emerging,     title={Emerging Banking Systems},     author={Bongini, Paola Agnese and Chiarlone, Stefano and Ferri, Giovanni},     year = {2009},     publisher={Palgrave Macmillan}     }          @book{von2010federal,     title={Federal banking in Brazil: Policies and competitive advantages},     author={Von Mettenheim, Kurt E},     year={2010},     publisher={Pickering \& Chatto Publishers}     }          @book{hutchcroft1998booty,     title={Booty Capitalism: The Politics of the Banking in the Philippines},     author={Hutchcroft, Paul David},     year={1998},     publisher={Ithaca, NY: Cornell University Press},     }          @article{thebanker2013regionalbanks,     author={Cooper,Jane},     year={March 2013},     month={March},     title={Report: International banking operations - Supra-regional banks - Emerging markets take hold in the developing world},     journal={The Banker},      }          @article{thebanker2013riding,     author={Rumsey, John},     year={March 1, 2013},     title={Americas: Brazil - Banking - Riding out the storm},     journal={The Banker},      }          @book{ogura2002banking,     title={Banking, the state, and industrial promotion in developing Japan, 1900-73},     author= {Ogura, Shinji},     year={2002},     publisher={Palgrave Macmillan: United Kingdom}     }          @book{altunbas2009turkish,     title={Turkish Banking: Banking Under Political Instability and Chronic High Inflation},     author={Altunbas, Yener and Kara, Alper and Olgu, Ozlem},     year={2009},     publisher={Palgrave Macmillan: United Kingdom},     }          @book{zhang2004changing,     title={The Changing Politics of Finance in Korea and Thailand: from deregulation to debacle},     author={Zhang, Xiaoke},     year={2004},     publisher={Routledge}     }          @book{satyanath2006globalization,     title={Globalization, politics, and financial turmoil},     author={Satyanath, Shanker},     year={2006},     publisher={Cambridge: Cambridge University Press}     }          @book{kohli2004state,     title={State-directed development: political power and industrialization in the global periphery},     author={Kohli, Atul},     year={2004},     publisher={Cambridge: Cambridge University Press}     }          @book{wade1990governing,     title={Governing the market: Economic theory and the role of government in East Asian industrialization},     author={Wade, Robert},     year={1990},     publisher={Princeton, New Jersey: Princeton University Press}     }      If I run the .tex file with the preamble above, everything is ok. My problem is that if I delete 10 or more in text citations (i.e. so that I have 35 or fewer \textcite citations in my .tex file), the problem as I described above shows up. That is, the 36th citation in my .bib file (currently von2010federal) has an intext citation is author (title) instead of author (year) and the same citation contains no year in the reference list. I am beginning to think this is a bug of some kind. Everything seems so straightforward, yet the problem is so strange (to me at least). But any help or suggestions you or anyone else might have is of course greatly appreciated.


title: Generating UML Entity-Relationship Diagrams in LaTeX

text: Would you recommend LaTeX for this kind of UML diagramming? http://yuml.me/ is great for quickly drawing Use Case and Class diagrams. Please recommend a library of some sort for LaTeX, or alternatively a non- LaTeX text-generated UML-diagramming tool which support Entity-Relationship Modelling.


title: Weird “\bfseries invalid in math mode” problem

text: I am compiling an Appendix file as part of my report. I have the file complete and the funny thing is when I compile the main file, it works fine, but if I make a mistake that somehow leads to 'bfseries invalid in math mode', I will never get out of it. I have not used bfseries explicitly anywhere in my code, and I have only used mathbf once or textbf twice in math and text mode, respectively. Once the error occurs once, I have to delete part of the code in Appdendix I was writing when the error initially popped up, and rerun the code, once it works, i copy back the deleted section and it all works again. What could be wrong? I have posted the section here, it's a bit lengthy. I am not sure how to get a minimum working example. Well that's because it's quite hard to see where actually went wrong. The thing is this section does actually work. But when that error I mentioned pops up, I'll have to delete this particular section -> run -> add back the section -> run, and it works again.               \textbf{Calculation of} $\mathrm{H} [p(m_{ij} | \mathcal{D})]$ \\     Since $m_{ij}$ is a binary outcome, $\mathrm{H}[...]$ is just a binary entropy function. The difficult part lies in computing $p(m_{ij} | \mathcal{D})$, the predictive distribution for $m_{ij}$. According to \citep[eq.(4.153)]{ref2}, we can approximate $p(m_{ij} | \mathcal{D})$ using the following result:     \begin{align} %first line of equations     p(m_{ij}=1|\mathcal{D}) &= \iint p(m_{ij}=1|U,V,\mathcal{D}) p(U,V|\mathcal{D}) \mathrm{d}U \mathrm{d}V \nonumber\\ %equation 1     &= \iint \sigma(u_i v_j^T) p(U,V|\mathcal{D}) \mathrm{d}U \mathrm{d}V \ldots \text{from } \eqref{eqn:pmuvdef} \nonumber\\     &\approx \iint \sigma(u_i v_j^T) Q(U,V) \mathrm{d}U \mathrm{d}V \ldots \text{definition of } Q(U,V) \nonumber\\     &\approx \int \sigma(t) \mathcal{N} (t | \mu_0, \sigma_0^2) \mathrm{d}t \ldots \text{let } t=u_i v_j^T \nonumber\\     &\approx \sigma(\kappa(\sigma_0^2) \mu_0) \ldots \text{from } \citep[\text{eq.}(4.153)]{ref2} \label{eqn:pm1} \\     \text{where }& %equation 2     \begin{cases}     \kappa(\sigma_0^2) = (1 + \frac{\pi \sigma_0^2}{8})^{-\frac{1}{2}} \ldots \text{from } \citep[\text{eq.}(4.153)]{ref2} \\     \mu_0 = {\bar{u}}_i {\bar{v}}_j^T \ldots \text{from } \eqref{eqn:uvdistribution} \\     \sigma_0^2 = \mathrm{Trace}[({\bar{u}}_i^T {\bar{u}}_i + \Psi_i) ({\bar{v}}_j^T {\bar{v}}_j + \Phi_j)] \ldots \text{from } \eqref{eqn:uvdistribution}     \end{cases} \label{eqn:pm1c}     \end{align}     Now it is easy to calculate the binary entropy function:     \begin{align} %first line of equations     \mathrm{H}[p(m_{ij} | \mathcal{D})] &= - p(m_{ij}=1|\mathcal{D}) \log{p(m_{ij}=1|\mathcal{D})} - (1-p(m_{ij}=1|\mathcal{D})) \log{(1-p(m_{ij}=1|\mathcal{D}))} \label{eqn:entropy1} \\     \text{where }& p(m_{ij} = 1 | \mathcal{D}) \text{ can be computed using } \eqref{eqn:pm1} \text{ and } \eqref{eqn:pm1c} \nonumber \text{.}     \end{align}     \textbf{Calculation of} $\mathbb{E}_{p(U,V|\mathcal{D})} \left[ \mathrm{H}[p(m_{ij}|U,V,\mathcal{D})] \right] $ \\     Although $\mathrm{H}[p(m_{ij}|U,V,\mathcal{D})]$ can be obtained exactly, the fact that it involves logistic functions means it is impossible to integrate it w.r.t. $p(U,V|\mathcal{D})$. A practical approach, mentioned in \citep[p. 2, Supplementary Material]{ref3}, can be used to approximate the likelihood probability into an exponential form.          Similar to \eqref{eqn:entropy1}, we have:     \begin{equation} \label{eqn:entropylike}     \mathrm{H}[p(m_{ij} | U,V,\mathcal{D})] = - \sigma(u_i v_j^T) \log{\sigma(u_i v_j^T)} - (1-\sigma(u_i v_j^T)) \log{(1-\sigma(u_i v_j^T))}     \end{equation}     Hence $\mathrm{H}[p(m_{ij}|U,V,\mathcal{D}]$ is a function of $\sigma(u_i v_j^T)$ only:     \begin{align} %first line of equations     \text{Define }& %equation 1     \begin{cases}     h(\sigma(x_{ij})) &= \mathrm{H}[p(m_{ij}|U,V,\mathcal{D})] \ldots x_{ij}=u_i v_j^T \\      f(x_{ij}) &= \log{h(\sigma(x_{ij}))}     \end{cases} \\     \Rightarrow f(x_{ij}) &= f(0) + \frac{f'(0) x_{ij}}{1!} + \frac{f''(0) x_{ij}^2}{2!} + \ldots \leftarrow \text{Taylor expansion} \label{eqn:taylor} %equation 2     \end{align}     And from \eqref{eqn:entropylike}:     \begin{align} %first line of equations     f'(x_{ij}) &= -\frac{\sigma'(x_{ij})}{h(\sigma(x_{ij}))} (\log{\sigma(x_{ij})} - \log{[1-\sigma(x_{ij})]}) \nonumber\\ %equation 1     \begin{split}     f''(x_{ij}) &= -\frac{\sigma'(x_{ij})}{h(\sigma(x_{ij}))} (\frac{\sigma'(x_{ij})}{\sigma(x_{ij})} + \frac{\sigma'{(x_{ij})}}{[1-\sigma(x_{ij})]}) \\     & \quad + \left( \log{\sigma(x_{ij})} - \log{[1-\sigma(x_{ij})]} \right) \frac{-h(\sigma (x_{ij})) \sigma''(x_{ij}) + \sigma'(x_{ij}) h'(\sigma (x_{ij}))}{h^2 (\sigma(x_{ij}))}     \end{split} \nonumber\\ %equation 2     \Rightarrow&     \begin{cases} %equations 3     f(0) = \log{\log{2}} \\     f'(0) = 0 \\     f''(0) = -\frac{1}{4\log{2}}     \end{cases} \label{eqn:f0set}     \end{align}     Using \eqref{eqn:taylor} and \eqref{eqn:f0set}, $f(x_{ij})$ can be approximated up to second order:     \begin{align} %first line of equations     f(x_{ij}) &\approx f(0) + \frac{f'(0) x_{ij}}{1!} + \frac{f''(0) x_{ij}^2}{2!} \nonumber\\ %equation 1     &\approx \log{\log{2}} - \frac{1}{8\log{2}} x_{ij}^2 \nonumber\\     \Rightarrow \log{h(\sigma(x_{ij}))} &\approx \log{\log{2}} - \frac{1}{8\log{2}} x_{ij}^2 \nonumber\\ %equation 2     \Rightarrow h(\sigma(x_{ij})) &\approx \log{2} \exp{[- \frac{x_{ij}^2}{8\log{2}}]} \label{eqn:htay} %equation 3     \end{align}     Equation \eqref{eqn:htay} gives the required exponential form for $\mathrm{H}[p(m_{ij}|U,V,\mathcal{D})]$, so now it is possible to integrate w.r.t. posterior $p(U,V|\mathcal{D})$.     \begin{align} %first line of equations     \text{Make things simple looking: } h(\sigma(u_i v_j^T)) &\approx k \exp{[c (u_i v_j^T)^2]} \\ %equation 1     \text{where }& k = \log{2}, c = -\frac{1}{8\log{2}} \nonumber\\ %equation 2     \Rightarrow \mathbb{E}_{p(U,V|\mathcal{D})} \left[ \mathrm{H}[p(m_{ij}|U,V,\mathcal{D})] \right] &= \iint h(\sigma(u_i v_j^T)) p(U,V|\mathcal{D}) \mathrm{d}U \mathrm{d}V \nonumber\\ %equations 3     &= \int h(\sigma(t)) \mathcal{N}(t| \mu_0 \sigma_0^2) \mathrm{d}t \ldots t=u_i v_j^T \nonumber\\     &= k \int e^{ct^2} \frac{1}{\sqrt{2\pi \sigma_0^2}} e^{-\frac{(t-\mu_0)^2}{2\sigma_0^2}} \mathrm{d}t  \nonumber\\     &= k \int \frac{1}{\sqrt{2\pi \sigma_0^2}} e^{-\frac{(1-2\sigma_0^2 c)^2 t^2 - 2\mu_0 t + \mu_0^2}{2\sigma_0^2}} \mathrm{d}t \label{eqn:entropy2t1}     \end{align}     Completing the square in t in \eqref{eqn:entropy2t1} gives:     \begin{align} %first line of equations     \mathbb{E}_{p(U,V|\mathcal{D})} \left[ \mathrm{H}[p(m_{ij}|U,V,\mathcal{D})] \right] &= \frac{\sigma_N k}{\sigma_0} \int \left( \frac{1}{\sqrt{2\pi \sigma_N^2}} e^{-\frac{(t-\mu_N)^2}{2\sigma_N^2}} \right) e^{\frac{\mu_N^2}{2\sigma_N^2} - \frac{\mu_0^2}{2\sigma_0^2}} \mathrm{d}t \nonumber\\ %equation 1     &= \frac{\sigma_N k}{\sigma_0} \times 1 \times e^{\frac{\mu_N^2}{2\sigma_N^2} - \frac{\mu_0^2}{2\sigma_0^2}} \\      \text{where }&     \begin{cases}      \mu_N = \frac{\mu_0}{1-2\sigma_0^2 c} \\     \sigma_N^2 = \frac{\sigma_0^2}{1-2\sigma_0^2 c}     \end{cases} \nonumber\\ %equation 2     \Rightarrow \mathbb{E}_{p(U,V|\mathcal{D})} \left[ \mathrm{H}[p(m_{ij}|U,V,\mathcal{D})] \right] &= \frac{k}{\sqrt{1-2\sigma_0^2 c}} \exp{\left[\frac{-\mu_0^2 c}{1-2\sigma_0^2 c}\right]} \nonumber\\ %equation 3     &= \frac{\log{2}}{\sqrt{1-2\sigma_0^2 c}} \exp{\left[\frac{-\mu_0^2 c}{1-2\sigma_0^2 c}\right]} \label{eqn:entropy2} \\     \text{and }& c = -\frac{1}{8\log{2}} \nonumber     \end{align}     Equation \eqref{eqn:entropy2} is our approximate solution to $\mathbb{E}_{p(U,V|\mathcal{D})} \left[ \mathrm{H}[p(m_{ij}|U,V,\mathcal{D})] \right] $.           Now it is time to combine the results we have:     \begin{align}     & \quad \mathrm{H} [p(m_{ij} | \mathcal{D})] - \mathbb{E}_{p(U,V|\mathcal{D})} \left[ \mathrm{H}[p(m_{ij}|U,V,\mathcal{D}] \right] \nonumber\\     &= \underbrace{\mathrm{H}[\sigma(\kappa(\sigma_0^2)\mu_0)]}_{H_2} - \underbrace{\frac{\log{2}}{\sqrt{1-2\sigma_0^2 c}} \exp{\left[\frac{-\mu_0^2 c}{1-2\sigma_0^2 c}\right]}}_{H_1} \label{eqn:entropy3}     \end{align}     The last equation \eqref{eqn:entropy3} is the final equation used for a BALD procedure: choose the new entry (i,j) such that \eqref{eqn:entropy3} is maximised. $\mathrm{H}[...]$, in this case, is the binary entropy function. Formulae for $\kappa(), \mu_0, \sigma_0^2$ and $c$ can be found in \eqref{eqn:pm1c} and \eqref{eqn:entropy2}, respectively.          If only $H_2$ is maximised in equation \eqref{eqn:entropy3}, then the algorithm becomes an entropy maximisation (EM) algorithm.


title: Printing stdout with pythontex and line referencing

text: I have a problem with PythonTeX and Beamer : I don't understand why the code below doesn't work: `\stdoutpythontex` is supposed to print the last output of the last block of python instructions, but it doesn't here. Moreover, when you call `\stderrpythontex`, the line number is false, even with the option `fragile=singleslide`. Could you please help me with this?               \documentclass{beamer}               \usepackage[french]{babel}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[framemethod=TikZ]{mdframed}     \usepackage[makestderr]{pythontex}     \usepackage{multicol}          \begin{document}          \begin{frame}[fragile]     \frametitle{Affichage à l'écran: Commande \pyv{print()} }       \begin{itemize}     \item En mode console:   résultats automatiquement affichés.     \item Dans l'éditeur: utiliser \pyv{print()}     \end{itemize}     %          \begin{pyblock}[][numbers=left]     a, b =  2, 3     print(a, 'hello', a+b)     \end{pyblock}     %     a pour résultat     \stdoutpythontex          De plus,      \begin{pyblock}[][numbers=left]     a = 5     print('a vaut ' a)     \end{pyblock}     donne     \stderrpythontex     \end{frame}               \end{document}


title: Figure caption missing

text: I have this LaTeX document:               \section{header}          Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod     tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim     veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea     commodo consequat. Duis aute irure dolor in reprehenderit in voluptate     velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint     occaecat cupidatat non proident, sunt in culpa qui officia deserunt     mollit anim id est laborum.          \begin{Shaded}     \begin{Highlighting}[]          \KeywordTok{library}\NormalTok{(ggplot2)}     \KeywordTok{ggplot}\NormalTok{(mtcars, }\KeywordTok{aes}\NormalTok{(wt, hp)) +}\StringTok{ }\KeywordTok{geom_point}\NormalTok{()}     \end{Highlighting}     \end{Shaded}          \begin{figure}[H][htbp]     \centering     \includegraphics{figure/model.png}     \caption{plot of chunk model}     \end{figure}      This produces this PDF: ![output](http://i.stack.imgur.com/Wd6O6.jpg) There are 4 things that need fixing with PDF:   1. Get rid of `[]` above figure;   2. Get rid of `[H][htbp]` below figure;   3. Centre figure;   4. Show figure caption. I've tried various combinations of LaTeX code without success. Doe anyone have solutions to above 4 tasks?


title: ! LaTeX Error: File `nomencl.sty' not found

text: using the following link, how can I install the missed package (nomencl.sty)? http://www.ctan.org/tex-archive/macros/latex/contrib/nomencl


title: tabu, booktabs and line spacing

text: The following MWE illustrates the problem               \documentclass{scrartcl}     \usepackage{booktabs,tabu,blindtext}     \begin{document}     \begin{tabu} spread \linewidth {X}     test\\\midrule     Nunc quis urna dictum turpis accumsan semper.\\\midrule     \blindtext{}\\\midrule     \blindtext{}\newline{}test\\\midrule     asdg\\\midrule     \end{tabu}     \end{document}      The line space is not the same, if there is a linebreak in a row. I would like to have the same line space in the entire table. ![enter image description here](http://i.stack.imgur.com/Ni2iO.png)


title: Problem with font map

text: Compiling a `beamer` project, I get the following error:               mktexpk: /home/matthieu/.texlive2012/texmf-var/fonts/pk/ljfour/public/cm/cmss8.525pk: successfully generated.      </home/matthieu/.texlive2012/texmf     -var/fonts/pk/ljfour/public/cm/cmss8.525pk>     kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 0+525/600 --dpi 525 mathkerncmssi8     mktexpk: don't know how to create bitmap font for mathkerncmssi8.     mktexpk: perhaps mathkerncmssi8 is missing from the map file.     kpathsea: Appending font creation commands to missfont.log.          !pdfTeX error: /usr/bin/pdflatex (file mathkerncmssi8): Font mathkerncmssi8 at      525 not found      ==> Fatal error occurred, no output PDF file produced!      Reading some answers, I added `\pdfmapfile{+sansmathaccent.map}` to my `.tex` file and the compilation worked but I want to solve the problem. Hence I also tried to run `updmap-sys` and `mktexlsr` but I got lost between the locations of the map files... I copy below the output of these two commands. If anyone can help me...               [root@localhost matthieu]# updmap-sys /usr/share/texmf/fonts/map/pdftex/updmap/pdftex.mapupdmap is using the following updmap.cfg files (in precedence order):   /etc/texmf/web2c/updmap.cfg dvips output dir: "/var/lib/texmf/fonts/map/dvips/updmap" pdftex output dir: "/var/lib/texmf/fonts/map/pdftex/updmap" dvipdfmx output dir: "/var/lib/texmf/fonts/map/dvipdfmx/updmap" pxdvi output dir: "/var/lib/texmf/fonts/map/pxdvi/updmap"          updmap is creating new map files using the following configuration:   LW35 font names                  : URWkb (/etc/texmf/web2c/updmap.cfg) prefer outlines                  : true (/etc/texmf/web2c/updmap.cfg)  texhash enabled                  : true   download standard fonts (dvips)  : false (/etc/texmf/web2c/updmap.cfg)   download standard fonts (pdftex) : true (/etc/texmf/web2c/updmap.cfg)   kanjiEmbed replacement string    : noEmbed (default)   kanjiVariant replacement string  :  (default)   create a mapfile for pxdvi       : false (default)          Scanning for LW35 support files  [  3 files] Scanning for MixedMap entries    [ 37 files] Scanning for KanjiMap entries    [  0 files] Scanning for Map entries         [ 73 files]          Generating output for dvipdfmx... Generating output for ps2pk... Generating output for dvips... Generating output for pdftex...          Files generated:   /var/lib/texmf/fonts/map/dvips/updmap:            11448 2013-05-22 16:04:24 builtin35.map            15911 2013-05-22 16:04:24 download35.map           324599 2013-05-22 16:04:24 psfonts_pk.map           577080 2013-05-22 16:04:24 psfonts_t1.map           577075 2013-05-22 16:04:24 ps2pk.map               14 2013-05-22 16:04:24 psfonts.map -> psfonts_t1.map   /var/lib/texmf/fonts/map/pdftex/updmap:           577082 2013-05-22 16:04:24 pdftex_dl14.map           575509 2013-05-22 16:04:24 pdftex_ndl14.map               15 2013-05-22 16:04:24 pdftex.map -> pdftex_dl14.map   /var/lib/texmf/fonts/map/dvipdfmx/updmap:              281 2013-05-22 16:04:24 kanjix.map          Transcript written on "/var/lib/texmf/web2c/updmap.log". updmap: Updating ls-R files.          [root@localhost matthieu]# mktexlsr mktexlsr: Updating /etc/texmf/ls-R...  mktexlsr: Updating /usr/share/texmf/ls-R...  mktexlsr: Updating /usr/share/texmf-dist/ls-R...  mktexlsr: Updating /usr/share/texmf-local/ls-R...  mktexlsr: Updating /var/lib/texmf/ls-R...  mktexlsr: Done.


title: Small capital in chapter title

text: I've defined the following command               \newcommand{\CI}{\textsc{Ci}~}      which produces a C with a small uppercase _i_. The only problem I have is that when I use this command in the `\chapter` or `\section` environment the _i_ is lower case. How can I fix that?


title: Colored Small Caps

text: > **Possible Duplicate:**   >  Small Caps and Bold Face I'm trying to get some bold, colored, small-cap text. I've tried different variations, including:               {\bf \textcolor{blue}{\textsc{text}}}      and it doesn't work. Any suggestions?


title: How to write mathematics in cover letter?

text: I can't write `$\ell_1$` and other mathematics symbol in this cover letter: what packages are needed?               \documentclass[a4paper,parskip=full,]{scrlttr2}     \usepackage[urw-garamond]{mathdesign}     \usepackage[T1]{fontenc}     \usepackage{amsmath}     \usepackage{fontspec}     %\setmainfont{GaramondNo8}     %\setlength{\parindent}{0pt}     \usepackage{xcolor}     \usepackage[english]{babel}     \nonfrenchspacing          %\setkomavar{fromname}{Ole Nordmann}     %\setkomavar{fromaddress}{Storebakken 15 \\ 5500 Haugesund}     %\setkomavar{fromphone}{+47 5222 8183}     \makeatletter               \renewcommand*{\raggedsignature}{\raggedright}          \makeatother     \begin{document}          \begin{letter}{H.P. \\ K. N.  Technology     Tehran, I. R. Iran      \\ Email Add.:}     \\ Tel: : }          %\KOMAoptions{fromphone=true,fromfax=false}     \setkomavar{subject}{COVER LETTER FOR SUBMISSION OF MANUSCRIPT}     %\setkomavar{date}     \opening{Dear Dear Editor,}                         \closing{Sincerely}     %\encl{loan application, gift certificate for chocolate}          \begin{itemize}     \item[No.] 1:\\     \begin{tabular}{|l|r@{~}|c|@{~}l@{\qquad}|r|}     \hline         %& Column 1& Column 2\\\hline     Ful name& hatam84analysis@gmail.com  \\\hline     Institution  & ...\\\hline     Country & \\\hline     E-mail Address  & \\\hline     \end{tabular}     \end{itemize}     \begin{itemize}     \item[No.] 2:\\     \begin{tabular}{|l|r@{~}|c|@{~}l@{\qquad}|r|}     \hline         %& Column 1& Column 2\\\hline     Ful name& ... \\\hline     Institution  & ...\\\hline     Country & \\\hline     E-mail Address  & \\\hline     \end{tabular}     \end{itemize}     \begin{itemize}     \item[No.] 3:\\     \begin{tabular}{|l|r@{~}|c|@{~}l@{\qquad}|r|}     \hline         %& Column 1& Column 2\\\hline     Ful name& ... \\\hline     Institution  & ...\\\hline     Country & \\\hline     E-mail Address  & \\\hline     \end{tabular}     \end{itemize}     \begin{itemize}     \item[No.]4:\\     \begin{tabular}{|l|r@{~}|c|@{~}l@{\qquad}|r|}     \hline         %& Column 1& Column 2\\\hline     Ful name& ... \\\hline     Institution  & ...\\\hline     Country & \\\hline     E-mail Address  & \\\hline     \end{tabular}     \end{itemize}     \end{letter}     \end{document}


title: What is the exact purpose of \ftype@<TYPE>?

text: I currently working on some float related code an saw that the standard float environments `figure` and `table` define (beside others) the macros `\def\ftype@figure{1}` and `\def\ftype@table{2}`. The LaTeX source documentation `source2e` "describes" these macros as:               \ftype@TYPE : The type number for floats of type TYPE.      which is not that meaningful. The only place these macros are used seem to be in `\@xfloat` which is used by the standard floats. There is defines the value of a `count` register (Pseudo code from `source2e` documentation):               \count\@currbox :=G 32*\ftype@TYPE + bits determined by PLACEMENT      I figured that it has something to do with the float placement and/or boxing process. I looked into some float related packages like `float` and `caption` and learned that each new float type requires a number which is a power of 2, i.e. the next float would need to be 4, then 8 etc. This makes `\count\@currbox` look like a bitmap to me. However, I have difficulties to understand it further. What is the the exact reason and usage of `\ftype@<TYPE>` and `\count\@currbox`? If I define my own floats is it OK if I exponentially increase it for every new float type?


title: Loading a class within a class

text: I'm trying to develop a set of custom classes. They are all very similar, but each do slightly different things (a custom `letter`, `article` and `report` for example. Since they share things in common, I thought that to cut down on repeated code, I could have a 'base' class, which would define everything they have in common, and then I would have the specific classes, with their individual code. That base class is called `frigaard-base.cls`, and then I have a class for essays, called `frigaard-essay.cls`. The structure is that `frigaard-base` loads the default `article` and then `frigaard-essay` loads `frigaard-base`. However in a document when I load `frigaard-essay.cls`, I get the following error:               File `frigaard-base.cls' not found. \LoadClass{frigaard-base}      Normally though, it should be found since `frigaard-base` and `frigaard-essay` are in the same folder, and here is their declarations:               \NeedsTeXFormat{LaTeX2e}[2011/06/27]     \ProvidesClass{frigaard-base}[2013/07/24]     \LoadClass[a4paper, 12pt]{article}                    \NeedsTeXFormat{LaTeX2e}[2011/06/27]     \ProvidesClass{frigaard-essay}[2013/07/24]     \LoadClass{frigaard-base}[2013/07/24]      What is happening here? Should I not be using `\LoadClass` twice within the same hierarchy and change `frigaard-base` into some other file type, such as a `.def` (if this is the case, please explain how). **More Info** It has been worked out that when `frigaard-base.cls`, `frigaard-essay.cls`, and a test document are in the same folder, then it works fine, but when say the test document is in a folder, `frigaard-essay.cls` is in a subfolder, and `frigaard-base.cls` is in a subfolder of that, it gives the same error.


title: Two-columns, 10pt bibliography / specific pages only, in a one-column, 12pt text body

text: For the writing of a document with a limited number of pages that I would like to keep easy to read and scheme over, I would like to have   * the main text in one column, 12pt   * the bibliography in two-columns, 10pt Is this possible ? How to do that ? N.B.: I know the multicol command is working well for the two-column / one- column change, but what about the 12 / 10 pt change ? Since the bibliography is not too long, I can eventually suppose it to be a specific page, and do some manual command locally if required.


title: Capitalize no date "n.d." in in-text citation with apacite style

text: Is there a way to capitalize the "n.d." or no date in in-text citation in LaTeX? As in:               Lorem ipsum (Doe, n.d.) to Lorem Ipsum (Doe, N.D.)      Or for the sake of it is there a way to customize "n.d." to something else? I am using APA citation style for BibTeX:               \bibliographystyle{apacite}          Sample reference with no date:               @misc{Git,       author = {Git},       title = {Git: the fast version control system},       howpublished = {Retrieved November 11, 2011, from CVS: \url{"http://git-scm.com/"}}     }


title: Not enough space in table for fractions

text: The table that I'd like to make does not display fractions with enough space between lines. What's the reasoning for this? (Not enough rep to be able to post a picture yet unfortunately.)               \documentclass{article}     \usepackage{amsmath,amsfonts}     \usepackage{booktabs}          \begin{document}     \begin{table}     \centering     \begin{tabular}{lcccc}     \toprule     \textbf{Care type} & $\mathbb{P}(Pat \cap H)$ & $\mathbb{P}(Pat \cap H')$ & $\mathbb{P}(Pat' \cap H)$ & $\mathbb{P}(Pat' \cap H')$\\     \midrule     Direct care  &$\displaystyle \dfrac{58}{197}$  &  $\displaystyle \dfrac{48}{197}$  & $\displaystyle \dfrac{21}{197}$* &$1-\displaystyle \dfrac{58}{197}$ \\     Housekeeping &$\displaystyle \dfrac{12}{17}$  &  $\displaystyle \dfrac{2}{17}$  & $\displaystyle \dfrac{5}{17}$* &$1-\displaystyle \dfrac{12}{17}$\\     \bottomrule     \end{tabular}     \caption{Probabilities of hand hygiene given direct patient contact}     \label{tab:handwash_given_pat}     \end{table}     \end{document}      Edit: Image added and MWE completed. > ![Table with too narrow rows](http://i.stack.imgur.com/laHGG.png)


title: Wrapfig - why is figure placed in margins?

text: I've created a wrapfig environment               \newenvironment{usefulterms}{     \begin{wrapfigure}{l}[0pt]{0.05\textwidth}     \vspace{-15pt}     \includegraphics[width = 0.05\textwidth]{abc.jpg}     \vspace{-25pt}     \end{wrapfigure}     \noindent{\textbf{Useful Terms}} \\     \newline}     {\newline}      The problem is that even thought I specify an overhang of 0pt, it is still placed in the margin; ![enter image description here](http://i.stack.imgur.com/ynYwS.png) Why is this command being "disobeyed"? Thanks Nick


title: Beamer compilation error, ps error

text: I have a presentation in beamer and I've used the trick with overlays, the one I asked about here. And in other presentation everything worked. I compiled the document, first to dvi, and then to ps, but when I want to create pdf from ps (either via ps2pdf or Adobe distiller) I get the error:               %%[ Warning: Helvetica not found, using Font Substitution. Font cannot be embedded. ]%%     %%[ Warning: Times-Italic not found, using Font Substitution. Font cannot be embedded. ]%%     %%[ Error: syntaxerror; OffendingCommand: ? ]%%     %%[ Flushing: rest of job (to end-of-file) will be ignored ]%%     %%[ Warning: PostScript error. No PDF file produced. ] %%      MWE is:               \documentclass[xcolor=dvipsnames,mathserif,12pt]{beamer}      \usecolortheme[named=Emerald]{structure}      \useoutertheme{infolines}      \usetheme[height=7mm]{Rochester}      \setbeamertemplate{items}[ball]      \setbeamertemplate{blocks}[rounded][shadow=true]      \setbeamertemplate{navigation symbols}{}     %\usefonttheme{serif}     \usefonttheme{professionalfonts}                    \usepackage{amsmath,amssymb,amsthm,amssymb}     \usepackage{mathtools}     \usepackage{bbm}     \usepackage{graphicx}     \usepackage{float}     \usepackage[croatian]{babel}     \usepackage{ucs}     \usepackage[utf8x]{inputenc}     \usepackage{txfonts}     \usepackage{subfigure}     \usepackage{color}     \usepackage{xcolor}     \usepackage{listings}     \usepackage{time}     \usepackage{extarrows}                              \title{Random title}     \subtitle{Random subtitle}     \author{}     \institute[Random institute]{Random institute}     \date{\today}          \begin{document}     \maketitle                    \begin{frame}     \frametitle{About}     \begin{columns}         \begin{column}{0.5\textwidth}         \begin{itemize}         \item something something\pause         \centerline{\includegraphics[width=1.0\textwidth]{1graf.eps}}\pause         \end{itemize}         \end{column}         \begin{column}{0.5\textwidth}         \begin{itemize}         \item bla\pause         \item bla         \end{itemize}         \end{column}     \end{columns}     \end{frame}          \end{document}      It worked before, I dk what's wrong now :\ If I try with dvipdfm it messes up the image, if I try with pdflatex the picture won't show because it's .eps. What's wrong, and what should I do? :( EDIT: oh and when I make dvips in texmakerx it gives out:               Process started          This is dvips(k) 5.99 Copyright 2010 Radical Eye Software (www.radicaleye.com) ' TeX output 2011.06.04:1347' -> prezproba.ps <C:\Users\Denis\AppData\Local\MiKTeX\2.9\fonts\pk\ljfour\public\bbm\dpi600\bbm12.pk> <C:/Program Files (x86)/MiKTeX 2.9/dvips/base/tex.pro> <C:/Program Files (x86)/MiKTeX 2.9/fonts/enc/dvips/fontname/8r.enc> <C:/Program Files (x86)/MiKTeX 2.9/dvips/base/texps.pro> <C:/Program Files (x86)/MiKTeX 2.9/dvips/base/special.pro> <C:/Program Files (x86)/MiKTeX 2.9/dvips/base/color.pro>. <C:/Users/Denis/AppData/Roaming/MiKTeX/2.9/fonts/type1/public/txfonts/txsy.pfb> <C:/Users/Denis/AppData/Roaming/MiKTeX/2.9/fonts/type1/public/txfonts/rtxmi.pfb> <C:/Users/Denis/AppData/Roaming/MiKTeX/2.9/fonts/type1/public/txfonts/rtxr.pfb> [1] [2<1graf.eps><D:/LaTeX/1graf.eps>          dvips: expected to see %%EndBinary at end of data; struggling on ] [3<1graf.eps><D:/LaTeX/1graf.eps>          dvips: expected to see %%EndBinary at end of data; struggling on ] [4<1graf.eps><D:/LaTeX/1graf.eps>          dvips: expected to see %%EndBinary at end of data; struggling on ] [5<1graf.eps><D:/LaTeX/1graf.eps>          dvips: expected to see %%EndBinary at end of data; struggling on ] [6<1graf.eps><D:/LaTeX/1graf.eps>          dvips: expected to see %%EndBinary at end of data; struggling on ] [7<1graf.eps><D:/LaTeX/1graf.eps>          dvips: expected to see %%EndBinary at end of data; struggling on ]          Process exited normally


title: Add numbers to snake(box plot)

text: I have the following code:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{arrows,backgrounds,snakes}          \begin{document}               \begin{tikzpicture} [thick, framed]           \filldraw[fill=green!20] (2.85,0) rectangle (5.7,1);           \draw (4.45,0)--(4.45,1) node[above]{$\textsc{M}$};           \draw (5.7,0.5)--(11,0.5);%vandret linie til max           \draw (2.85,0.5)--(1,0.5);%vandret linie til min           \draw (11,0.39)--(11,0.61);           \draw (1,0.39)--(1,0.61);           \draw (0,-1) -- (11,-1);              \draw[snake=ticks,segment length=1cm] (0,-1) -- (11,-1);          \end{tikzpicture}          \end{document}      I would like to have numbers( like in a coordinate system) along with the line beneath the boxplot, how to do that? I am very new with LaTeX so as basic as possible:-)


title: Table in golden ratio

text: I'd like to create a table with two columns which follow the rules of the golden ratio. The width of the table should be equal to `\textwidth` of the corresponding class. Here is an example image: ![enter image description here](http://i.stack.imgur.com/h5fEJ.gif) But instead of 960px it should use the full textwidth. **Edit:** As the image is not really clear I need to clarify my requirements. I'd like to have a little space between the two columns which will not be included in the calculation of the golden ratio. For example if the pagewidth would be 1000px and the space between is 40px the golden ratio should be calculated from the 960px. And additionally I don't want to have any padding on the left and the right side of and inside the columns.


title: Remove blank pages after title and Table of contents

text: I'm using the book style, and I've got a title and ToC, they generate a lot of blank spaces after them that is completely unnecessary; how do I stop this behaviour? Here is my example code               \documentclass[12pt]{book}     \usepackage[width=4.375in, height=7.0in, top=1.0in, papersize={5.5in,8.5in}]{geometry}     \usepackage[pdftex]{graphicx}     \parindent 10in     \parskip 0.05in     \title{My Broken Example}     \begin{document}     \frontmatter     \maketitle     \tableofcontents     \mainmatter     \raggedright          \chapter{First chapter}          Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sit amet justo ut odio fringilla varius. Maecenas porttitor convallis suscipit. Aenean dictum faucibus purus nec gravida. Phasellus laoreet dolor sit amet orci ultrices varius. Curabitur tempus feugiat nisl, non pretium lacus tincidunt ut. Suspendisse placerat, sem eu rhoncus auctor, diam nisi pulvinar est, id venenatis urna mauris vel dui.           In vitae arcu ac tortor vehicula dignissim ac sit amet velit. Aenean sapien velit, vestibulum at facilisis nec, egestas sed quam. Nunc sem lectus, condimentum eget porttitor sit amet, euismod vel lorem. Nullam vulputate pellentesque cursus.           Vestibulum porta, purus id ultricies facilisis, neque nunc aliquet lectus, sit amet vulputate arcu mauris in diam. Praesent interdum lectus ac ligula cursus sed pretium mi tincidunt. Mauris blandit interdum sem, ac porta metus sagittis et. In at ligula id justo gravida rhoncus at vitae massa. Morbi mi tortor, dignissim et pellentesque quis, placerat ut lorem.           \chapter{Second} Aliquam ut lorem sed tortor gravida feugiat. Aenean mattis aliquam diam, vitae tempus est lobortis ut. Nam augue urna, iaculis eget varius non, sagittis tempus nibh. Donec vitae laoreet enim. Vivamus vel quam ut nunc ultrices mollis. Cras a magna dolor. Sed et luctus lorem. Vivamus nunc felis, volutpat quis bibendum in, dapibus et justo. Donec eget nulla nunc.          Mauris et magna libero, sed euismod turpis. Morbi accumsan rhoncus tempor. Integer venenatis ipsum sit amet erat porttitor a scelerisque nisl malesuada. Mauris porta ultricies risus, sit amet tincidunt risus fermentum interdum. Nunc massa ipsum, tincidunt nec fermentum eget, euismod sit amet leo. Quisque consequat, erat dictum luctus tristique, justo odio congue velit, ac lacinia dolor erat vel libero. Sed pulvinar metus ut est interdum dignissim. Quisque lacus velit, porttitor nec malesuada sed, placerat et augue.          \end{document}


title: Enforcing new paragraph indents in book style

text: I'm having trouble getting the paragraphs in my document to indent. I'm not sure what could be wrong, as I thought this was default behaviour. Here is a cut down version of my tex file:               \documentclass[12pt]{book}     \usepackage[width=4.375in, height=7.0in, top=1.0in, papersize={5.5in,8.5in}]{geometry}     \usepackage[pdftex]{graphicx}     \parindent 10in     \parskip 0.05in     \title{My Broken Example}     \begin{document}     \frontmatter     \maketitle     \tableofcontents     \mainmatter     \raggedright     \chapter{First chapter}          Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sit amet justo ut odio fringilla varius. Maecenas porttitor convallis suscipit. Aenean dictum faucibus purus nec gravida. Phasellus laoreet dolor sit amet orci ultrices varius. Curabitur tempus feugiat nisl, non pretium lacus tincidunt ut. Suspendisse placerat, sem eu rhoncus auctor, diam nisi pulvinar est, id venenatis urna mauris vel dui.           In vitae arcu ac tortor vehicula dignissim ac sit amet velit. Aenean sapien velit, vestibulum at facilisis nec, egestas sed quam. Nunc sem lectus, condimentum eget porttitor sit amet, euismod vel lorem. Nullam vulputate pellentesque cursus.           \indent Vestibulum porta, purus id ultricies facilisis, neque nunc aliquet lectus, sit amet vulputate arcu mauris in diam. Praesent interdum lectus ac ligula cursus sed pretium mi tincidunt. Mauris blandit interdum sem, ac porta metus sagittis et. In at ligula id justo gravida rhoncus at vitae massa. Morbi mi tortor, dignissim et pellentesque quis, placerat ut lorem.           \par Aliquam ut lorem sed tortor gravida feugiat. Aenean mattis aliquam diam, vitae tempus est lobortis ut. Nam augue urna, iaculis eget varius non, sagittis tempus nibh. Donec vitae laoreet enim. Vivamus vel quam ut nunc ultrices mollis. Cras a magna dolor. Sed et luctus lorem. Vivamus nunc felis, volutpat quis bibendum in, dapibus et justo. Donec eget nulla nunc.          Mauris et magna libero, sed euismod turpis. Morbi accumsan rhoncus tempor. Integer venenatis ipsum sit amet erat porttitor a scelerisque nisl malesuada. Mauris porta ultricies risus, sit amet tincidunt risus fermentum interdum. Nunc massa ipsum, tincidunt nec fermentum eget, euismod sit amet leo. Quisque consequat, erat dictum luctus tristique, justo odio congue velit, ac lacinia dolor erat vel libero. Sed pulvinar metus ut est interdum dignissim. Quisque lacus velit, porttitor nec malesuada sed, placerat et augue.          \end{document}      I've tried several things, such as ending lines with `\\\` and `\\\\*` and as you can see I've tried using `\indent` and `\par`. I've set `\parindent` to something crazy. Nothing seems to work, how do I get indentation?


title: Schrodinger's equation

text: Trying to get Schrodinger's equation to format better. The first term is               -\dfrac{\hslash^2}{2m} \, \dfrac{\mathrm{d}^2 \psi}{\mathrm{d} x^2}      However, because of the exponent in the denominator, the second fraction prints lower than the first one, and looks unbalanced. Is there a way to drop the baseline for the exponent of the first fraction so they line up? Also, this is in beamer, if that adds other complexity to the issue


title: pgfplots: Plot only parts of table and in "random" order

text: I have been lurking around stackexchange for a long time and so far been able to find solutions for my newbie problems but now I'm really stuck! My problem is probably not that complicated, yet a bit hard to explain. In my data file is a table with 4 columns. First column hold sample ID and the three remaining columns hold the y-data for 3 different stages. So far I have plotted Sample 13 to 17 as a line plot and I know how to do that:               \documentclass[12pt]{article}     \usepackage{amsmath}     \usepackage{a4wide}     \usepackage{amssymb}     %\usepackage{hyperref}     %\usepackage{siunitx} % requires packages "l3packages" and "l3kernel"     \usepackage{pgfplots}     \usepackage{pgfplotstable}     \usepackage{subfig}     \usepackage{float}     \usepackage{graphicx}            \usepackage{tikz}     \usepackage{microtype}     \usepackage[bottom = 0.50cm]{geometry}          \usetikzlibrary{matrix,spy,backgrounds}     \usepgfplotslibrary{units}               \begin{document}          \pgfplotstableread{     SampleNo     Phase_1    Phase_2 Phase_3     13   10.72447   120.495518  280.505095     14  20.07597    170.114048  360.86694     15  -40.29807   120.443185  380.23223     16  -10.280941  160.268171  350.588343     17  10.591254   140.887412  310.085956     18  20.18464    190.566417  390.946054     19   10.63166   130.196773  270.610362     20  20.05172    180.115205  370.31739     21  10.71398    140.007552  290.080619     22   20.01196   170.877254  350.66182     23  20.21736    190.038692  380.31596     }\data          \begin{figure}[H]          %\centering     %\hspace{-1cm}     \begin{tikzpicture}[spy using outlines={circle, magnification=4, size=1cm, connect spies}]     \pgfplotsset{         every axis/.append style={line width=1pt},         use units = true,         xlabel = Sample No.,         ylabel = Deformation,        xmin=13,        xmax=17,         legend style={            cells={anchor=west},             legend pos=outer north east,             %font=\scriptsize,         },         cycle list name=exotic,         legend entries={             Phase 1,Phase 2,Phase 3             }     }     \begin{axis}[grid=major,cycle list name=exotic,]         \addplot+[line join=bevel,line width=1pt,mark=none] table[y=Phase_1]{\data};         \addplot+[line join=bevel,line width=1pt,mark=none] table[y=Phase_2]{\data};         \addplot+[line join=bevel,line width=1pt,mark=none] table[y=Phase_3]{\data};     \end{axis}          \end{tikzpicture}     \end{figure}          \end{document}       Producing: ![](http://i.stack.imgur.com/kW6Vo.png) Now to my problem: I want to, preferbly in the same graph, plot a line plot also for Sample 13,24,23,22 and 21 (In that give order!) They should span the same "x domain" as the first sample plotted and the ticks have to say "13/13" "14/24" and so on. That I guess could be solved more or less manually... My biggest issue is to get the mentioned sample in "my" order and located with no empty sample number inbetween. Thanks in advance! I'll be more than happy to answer any further questions!


title: Arrow in sequence diagram is too short for text

text: I'm struggling with pgf-umlsd. As you can see in the image the arrow does not "grow" with my text length, producing a very ugly layout: ![enter image description here](http://i.stack.imgur.com/Ak0Cd.png) My code:               \documentclass[a4paper]{article}          \usepackage{mathtools}     \usepackage{tikz}     \usetikzlibrary{arrows,shapes, shadows, positioning, trees}     \usepackage[underline=false,rounded corners=false]{pgf-umlsd}          \begin{document}            \begin{sequencediagram}         \newthread{t}{Teilnehmer}{}         \newinst{s}{Server}{}              \begin{call}{t}{Anfrage}{s}{Parameter $P=e(K,K_{pub})$}         \end{call}            \end{sequencediagram}     \end{document}      I tried using a box with `\begin{call}{t}{Anfrage}{s}{\makebox[10em]{Parameter $P=e(K,K_{pub})$}}` but this doesn't change the result, no matter if I put it to the top or bottom arrow. Is there a possibility to fix this?


title: Includegraphics in a new page after the title page

text: How to put a picture in a new page after the title page? I write it as follows, but it appears in the top and with a numbered page.               \begin{document}     \title{ }      \author{me \\      \includegraphics[width=0.5\textwidth]{logo.jpg}}       \date{Thesis\\       for \\       September 2012}       \newpage     \begin{center}       \includegraphics[width=.7\textwidth]{basm.png}       \end{center}     \maketitle     \end{document}


title: suspended hyphen without linebreak between word and hyphen

text: I have a word combination like this _metallo-porphyrins and -phthalocyanines_ which eventually gives a linebreak between the hyphen and the word phthalocyanines. I tried to include the `ngerman` package as described here. This works fine but messes up the quotes used in the text elsewhere (I used so far `"word"`). I know I could use ''word`` instead for having english quotes. However the suspended hyphen appears once in the text and the quotes several times in the document (several files). I would therefore prefere to use a different solution for the hyphen. If this is not possible and I have to change the quotes, then I still get the ugly bookmarks and would need an alternative to this solution.