title: Testing for TeX boolean in Lua code

text: How can I test for a TeX boolean in Lua? This kind of code doesn't work:               \newif\if@mypkg@someif          \begin{luacode}             -- some lua code             \if@mypkg@someif           -- some more lua code        \else           -- another lua code        \fi             -- again some lua code     \end{luacode}      Is there a way to achieve this?


title: Configure multiline autocompletion in TeXStudio

text: I would like to configure a longer completion in TeXStudio, like this one:               \begin{table}[htbp]         \centering         \caption{}         \label{tab}         \begin{tabular}{lcS[table-format = -1.3e0]p{0.25\columnwidth}}             \toprule                  \midrule                  \bottomrule         \end{tabular}     \end{table}      I found the `cwl` files on my computer and online. However, there is no example to configure a longer auto-completion. Can you give me an example?


title: Undesirable highlighting of a keyword name (dh) occuring within an identifier (0dh)

text: I'm using the `x86masm` dialect of `Assembler` and register names are emphasized even when they occur inside of a label or a hexadecimal number. For example, `dh` is register, but `0dh` is a number, yet the `dh` part of it is emphasized. I haven't had this problem in `listings` with any other languages, so I'm assuming it's a problem with the language definition. Is there simple way to redefine the language so that this doesn't happen? ![enter image description here](http://i.stack.imgur.com/WGVTF.png)               \documentclass[12pt]{article}     \usepackage{courier, listings}          \lstset{       language={[x86masm]Assembler},       basicstyle=\ttfamily\small,       frame=single     }          \begin{document}     \begin{lstlisting}     cmp al, 0dh ; dh = register, 0dh = number     je somewhere     \end{lstlisting}          \end{document}


title: How to get a custom citation type in BibTeX?

text: I would like to cite a movie in a paper I'm preparing. The style is APA, so (according to this document) the citation in the text should be "(Mulcahy, 1986)" and the reference itself should appear as Mulcahy, R. (Director). (1986) _Highlander_. Cannon Films. I'm using BibDesk to manage my references, but there doesn't seem to be any kind of motion picture entry type. For now I can achieve the desired effect by entering it as a book, with `Cannon Films` as the publisher and `{Mulcahy, R. (Director).}` as the author. The citation in the text comes out as "(Mulcahy, R. (Director)., 1986)", but I can achieve the right appearance by entering "`(Mulcahy \citeyear{MUL86})`". However, this is obviously a hack, and I'd like to know if there's a "right way" to do what I'm trying to do here.


title: Pre-text (cover, dedicatory, table of contents, list of figures) printed one-sided, rest two-sided

text: My thesis commitee demands that the pre-text elements, including table of contents, list of figures, list of algorithms goes only on the odd pages, with the body of the thesis go two-sided, with new chapters initiating on odd pages. I do almost all, except by the lists. How can I get the toc, lof, loa, lot to go only in odd pages?


title: Vertical line spanning fraction

text: I would like to write the following equation: ![enter image description here](http://i.stack.imgur.com/t30lq.jpg) How do I produce the vertical line and the subscript 'iso-effect'?


title: An environment which be used to arrange exercises mostly similiar with common enumerate list

text: I want a customized environment to typeset exercises. Write               \newitem text text text     \newitem text text text     \newitem long text typeset on left column     \newitem text text text     \newitem text text text     \newitem text text text     \newitem long text typeset on left column     \newitem text      get               1. text text text      2. text text text     3. long text typeset on left column     4. text text text      5. text text text     6. text text text     7. long text typeset on left column     8. text      ---EDIT--- I have tried the `shortlst` package but it has some shortcoming like   1. doesn't support a float picture inside it for figure;   2. couldn't embed an enumerate environment as conditions or conclusions list;   3. couldn't set the number of columns in advance. The `multienum`' package's implement doesn't fit my need.


title: Formatting of coordinates?

text: In case I want to describe the pixels of a picture with cartesian coordinates, how would I properly typeset the coordinates? Is `p_\mathrm{x}, p_\mathrm{y}` correct or rather `c_x, c_y`? `x` and `y` represent the global cartesian coordinates -- again: italic or not?


title: Using \parbox in \resizebox

text: I tried resizing a `\parbox`-d text into a `5cm x 5cm` square box (without keeping the aspect ratio). The output is absolutely strange to me, even if I don't specify the height. Couldn't find the cause/culprit. Why does the output happen to be this? Is there a way to do this somehow? ![enter image description here](http://i.stack.imgur.com/tMJgV.png)               \documentclass{article}          \usepackage{lipsum}     \usepackage{lmodern}     \usepackage[demo]{graphicx}          \begin{document}          \resizebox{5cm}{!}{\parbox{20cm}{\lipsum{1}}}     \includegraphics[width=5cm, height=5cm]{}          \newpage          \resizebox{5cm}{5cm}{\parbox{20cm}{\lipsum{1}}}     \includegraphics[width=5cm, height=5cm]{}          \end{document}      I've some tried some possibilities like `\parbox[t][][t]...` but the output was even worse that way.


title: Odd problem with spacing using memoir when switching from oneside to twoside

text: For reasons I won't bore anyone with, I being forced to change my document at the last minute from `oneside` to `twoside` using `memoir`. However, when I do, I suddenly get odd problems with spacing; the title pages have the entire page's text shifted to the bottom, and the last subsection or paragraph in each chapter is moved to the bottom of the page as well (leaving a huge chunk of vertical whitespace between the last and the penultimate paragraph). I'm sorry, I'd like to provide a minimal working example, but I can't come up with one, so I'm just hoping that someone can point me in the direction of general things to check. Here's some possibly relevant code, though it's a long document:               \documentclass[12pt,A4,twoside]{memoir}     \setcounter{errorcontextlines}{30}     \strictpagecheck     \usepackage[sectionbib]{natbib}     \usepackage{chapterbib}     \usepackage{graphicx}     \usepackage{amsthm}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{authblk}     \usepackage{multirow}     \usepackage{memhfixc}     \usepackage[draft]{hyperref}     \usepackage{lscape}     \usepackage[T1]{fontenc}     \bibpunct[, ]{(}{)}{;}{a}{}{;}                \setlrmarginsandblock{4cm}{3cm}{*}     \setulmarginsandblock{4cm}{3cm}{*}     \checkandfixthelayout     \fixpdflayout          \makepagestyle{mystyle}     \makeoddhead{mystyle}{}{}{\thepage}     \makeevenhead{mystyle}{\thepage}{}{}     \pagestyle{mystyle}          ...          \cleartooddpage[\thispagestyle{empty}]     \include{foreword}     \pagestyle{plain}     \mainmatter     \cleartooddpage[\thispagestyle{empty}]     \include{chap1}          ...       and so on.


title: algorithm2e - Unwanted warnings when apply commands to content block

text: In this page, Andrew Swann points me a way to make verbose formatting of algorithms (I need this only for pedagogical reasons). The problem with this solution is that it produces unwanted warnings with my second algorithm in the following example. Is there a way to not have this warnings ? ## MWE               \documentclass[10pt,a4paper]{article}         \usepackage[vlined]{algorithm2e}              \newcommand\BlockIf[1]{\KwSty{Start If} \\ #1 \\ \KwSty{End If}}         \newcommand\BlockElseIf[1]{\KwSty{Start Else If} \\ #1 \\ \KwSty{End Else If}}         \newcommand\BlockElse[1]{\KwSty{Start Else} \\ #1 \\ \KwSty{End Else}}              \makeatletter             \renewcommand{\algocf@uIf}[2]{\If@ifthen{#1}\If@noend{\BlockIf{#2}}}             \renewcommand{\algocf@uElseIf}[2]{\ElseIf@elseif{#1}\If@noend{\BlockElseIf{#2}}}             \renewcommand{\algocf@Else}[1]{\Else@else\If@endif{\BlockElse{#1}}}         \makeatother          \begin{document}          \begin{algorithm}[H]         \uIf{1}{if...}         \uElseIf{2}{else if...}         \Else{else...}     \end{algorithm}           \begin{algorithm}[H]         \uIf{1}{if...}         \uElseIf{2}{\ForAll{$i$}{Action $i$}}         \Else{else...}     \end{algorithm}           \end{document}      ## Unwanted warning               ! LaTeX Error: There's no line here to end.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.26     \uElseIf{2}{\ForAll{$i$}{Action $i$}}


title: How to apply a custom pagestyle (with titlesec package) to a part of a document

text: I have defined a personal page style using the package titlesec. The style defined is:               \newpagestyle{myStylePage}[\large\sffamily]{\headrule     \sethead{\thechapter . \chaptertitle}{}{\thesection . \sectiontitle}     \setfoot{}{\usepage}{}     }      I want this style be applied only to all my chapters. But I don't want this style be applied to the `\tableofcontents`, for example. In order to solve it, I tried to define a another style:               \newpagestyle{myEmptyPage}{     \sethead{}{}{}     \setfoot{}{\usepage}{}     }      My document follows as:               \pagestyle{myEmptyPage}          \pagenumbering{roman}          \tableofcontents     \pagenumbering{arabic}     \pagestyle{myStylePage}     \include{tex/introduction}     ... etc.      My problem is that the second page of the table of contents appears with the same style as defined in `myStylePage`. What I am doing wrong?


title: How to include multiple pages in latex

text: I have a pdf file consisting of four pages (see attached). I want to include it in Latex, but when I use the basic code given below, only the first page of the pdf appears. I want to do is to present one pdf page in each latex file. Suggestions please               \begin{figure}[h!]     \centering     \includegraphics[scale=0.77]{bplot.pdf}      ![enter image description here](http://i.stack.imgur.com/hRk2A.png)


title: Change \textwidth after first page in scrlttr2

text: I am looking for an automated mechanism to change the effective `\textwidth` at the first pagebreak of a letter in `scrpage2`. I've tried `\afterpage` and `\nextpage` (ideally they would be set within `\firsthead`), both without success. I do not want to use the `geometry` package because firstly, IMO `scrlttr2` _should work_ with a change of `KOMAoptions` and friends and secondly, it does not seem to work anyways if used within `scrlttr2` and the KOMA layout. Ideas and suggestions are very welcome. Here's a MNWE. Page 2 and following should have a wider text block than the first page -- but doesn't.               \documentclass{scrlttr2}%     \usepackage[english]{babel}     \usepackage{lipsum,afterpage}%     \setlength{\textwidth}{125mm}%     \nexthead{%       \global\areaset{170mm}{\textheight}%       \global\KOMAoptions{DIV=areaset}%       \global\recalctypearea%     }     \afterpage{%       \global\areaset{170mm}{\textheight}%       \global\KOMAoptions{DIV=areaset}%       \global\recalctypearea%     }     \begin{document}     \begin{letter}{Receipient}       \opening{Dear receipient,}       \lipsum[1-6]       \closing{Yours}     \end{letter}     \end{document}      And BTW, I genuinely think that this is _not_ covered by Change \textwidth and \textheight in mid-document and related questions and instead somehow relates to the internals of the KOMA classes.


title: Modify the stored value of enumeration in output file

text: This question is in reference to a previous question: Write the value of enumerate to output file. I would like to take the solution one step further, but I couldn't get it to work.               \documentclass{article}          \makeatletter     \newwrite\solutions@file     \newcommand{\collectSolutions}{\immediate\openout\solutions@file=\jobname.sol}     \newcommand{\sol@enumi}{\theenumi}     \newcommand{\sol@enumii}{\theenumi.\theenumii}     \newcommand{\sol@enumiii}{\theenumi.\theenumii.\theenumiii}     \newcommand{\solution}[1]{%       \immediate\write\solutions@file{%         \csname sol@\@enumctr\endcsname: \unexpanded{#1}%       }%     }          \newcommand{\printSolutions}{%       \immediate\closeout\solutions@file       \noindent\input{\jobname.sol}     }     \makeatother     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \begin{document}     \collectSolutions          \begin{enumerate}     \item Text      \begin{enumerate}       \item Part Q 1 \solution{Ans}       \item Part Q 1 \solution{Ans}       \item Part Q 1 \solution{Ans}     \end{enumerate}     \item Another Q \solution{Ans}     \end{enumerate}          \printSolutions     \end{document}      This results in a solutions being typeset as: 1.a: Ans 1.b: Ans 1.c: Ans 2: Ans Ideally I would like to have 1.a: Ans, b: Ans, c: Ans. 2: Ans. There are two differences: 1: the leading enumi number is only mentioned once; 2: there are commas between parts an a fullstop at the last one. So it seems that I need to redefine \sol@enumi, \sol@enumii and \sol@enumiii macros. I suppose what I want is that the macro takes one value at a certain situation (first for 1: and last for 2:) I tried the following using the `ifthen` package:               \renewcommand{\sol@enumi}{\theenumi.\let\OLDtheenumi\theenumi}     \renewcommand{\sol@enumii}{\ifthenelse{\equal{\theenumi}{\OLDtheenumi}}{theenumii}{\theenumi(\theenumii)}.}      but I get errors; probably due to what gets expanded where. Is there a way to achieve this?


title: Chapter title on even header and section title in odd header

text: I wanted to put the title of the chapter on even header and the title of the section of the chapter to the odd pages. My headers are now are using this code:                \begin{document}          \frontmatter % Use roman page numbering style (i, ii, iii, iv...) for the pre-content pages          \setstretch{1.3} % Line spacing of 1.3          % Define the page headers using the FancyHdr package and set up for one-sided printing     \fancyhead{} % Clears all page headers and footers     \rhead{\thepage} % Sets the right side header to show the page number     \lhead{} % Clears the left side page header          \pagestyle{fancy} % Finally, use the "fancy" page style to implement the FancyHdr headers      Moreover, chapters are in separate files and called in a main file.


title: How do I add section/subsection numbers to pdf bookmarks?

text: I'm writing up solutions to some exercises, and having problems with the bookmarks produced in the resulting pdf file. In the document I'm using `\section` (slightly modified) and `\exercise` (based on `\subsection`) - I'd like these to appear in the bookmarks in _exactly_ the same way they appear in the document, including the numbering. Without the numbering, `\exercise` appears as a blank bookmark... I know I could use the optional parameter for the `\section` and `\exercise` commands to manually specify the text used in the bookmarks, but I'd like to avoid it! # Code - main file               \documentclass[answers]{exam}          \addtolength{\textwidth}{1cm}     \addtolength{\hoffset}{-0.5cm}     \addtolength{\textheight}{1cm}     \addtolength{\voffset}{-0.5cm}          \usepackage{xcolor} % Use colour!     \usepackage{titlesec} % Allow creation of new sectioning commands     \usepackage{amsmath} % Needed for splitting equations over multiple lines     \usepackage{ulem} % Underlining effects     \usepackage{environ} % Tinkering with environments     \usepackage{gensymb} % Degree symbol     \usepackage[pdfstartview=FitH,bookmarks=true]{hyperref}      \usepackage{bookmark} %PDF Bookmarks          \titleformat{\section}{\normalfont\large\bfseries}{Chapter }{0em}{\thesection: }          \titleclass{\exercise}{straight}[\section]  % Create new 'section' command for exercises - this replaces \subsection     \newcounter{exercise}     \titleformat{\exercise}{\normalfont\large\bfseries}{Exercise }{0em}{\theexercise}     \titlespacing*{\exercise}{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}     \newcommand{\exerciseautorefname}{exercise}     \makeatletter     \providecommand*{\toclevel@exercise}{2} % Make sure exercises appear below sections in bookmarks     \makeatother          \pagestyle{headandfoot} % Let's have both     \header{\oddeven{Exercise \theexercise}{Chapter \thesection: \rightmark}}{Core 1}{\oddeven{Chapter \thesection: \rightmark}{Exercise \theexercise}}     \headrule     \footer{\oddeven{}{\thepage}}{}{\oddeven{\thepage}{}}     \footrule          \renewcommand\sectionmark[1]{\markright{#1}} % Set up \rightmark          \begin{document}          \unframedsolutions % Print solutions as plain text     \SolutionEmphasis{\color{blue}} % Print solutions in blue     \renewcommand{\thepartno}{\roman{partno}} % Format part numbers as lower-case roman numerals     \renewcommand\theexercise{\thesection\Alph{exercise}} % Print exercise numbers as 1A, etc...     \renewcommand{\solutiontitle}{\noindent} % Format solution - just print solution as entered     \newcommand{\ans}[1]{\uuline{#1}} % Double underline final answer          \NewEnviron{sol}{ % Align solutions sensibly         \begin{solution}             $\begin{aligned}                 \BODY             \end{aligned}$         \end{solution}     }          \include{Chapter1}          \end{document}      # Code - Chapter1.tex               \section{Basic Algebra}          \exercise{}     Some text...


title: How to make fancyhdr examples work

text: In the Training slides, with examples of the fancyhdr resources there's an example which unfortunately doesn't work or is poorly documented. According to http://ftp.fernuni-hagen.de/ftp- dir/pub/mirrors/www.ctan.org/info/german/fancyhdr/fancyfolien+bsp.pdf (page after 17)               \documentclass[a4paper,10pt]{article}     \usepackage[utf8]{inputenc}     \usepackage{fancyhdr}     \usepackage{lipsum}          \pagestyle{fancy}     \fancyhf{}     \fancyhead[EL]{\thepage}     \fancyhead[OR]{\thepage}     \fancyhead[ER]{     \begin{tabular}[b]{l}     Beispielezu\texttt{fancyhdr}\\     HansFriedrichSteffani\\     LehrstuhlElektr.Masch.u.Antriebe     \end{tabular}     \includegraphics[height=3\baselineskip]{tulogo}     }     \fancyhead[OL]{     \includegraphics[height=3\baselineskip]{tulogo}     \begin{tabular}[b]{l}     Beispielezu\texttt{fancyhdr}\\     HansFriedrichSteffani\\     LehrstuhlElektr.Masch.u.Antriebe     \end{tabular}     }          \addtolength{\headheight}{2\baselineskip}     \addtolength{\headheight}{0.61pt}          \begin{document}     \maketitle     \begin{abstract}     \end{abstract}          \section{}     fdklsafjlksdafjlksadjf fjdsaklfj sdalk fdskjlaf lkösad jfklösad jflöksadjf lsdkfj kölsadjf dsklalöjdfj          kfdjslakjf salökfj klsdöafj klsdafj lksöadfj lkösadfj lkösadf jklösafmn          fdklsafjlksdafjlksadjf fjdsaklfj sdalk fdskjlaf lkösad jfklösad jflöksadjf lsdkfj kölsadjf dsklalöjdfj          kfdjslakjf salökfj klsdöafj klsdafj lksöadfj lkösadfj lkösadf jklösafmn     fdklsafjlksdafjlksadjf fjdsaklfj sdalk fdskjlaf lkösad jfklösad jflöksadjf lsdkfj kölsadjf dsklalöjdfj          kfdjslakjf salökfj klsdöafj klsdafj lksöadfj lkösadfj lkösadf jklösafmn     fdklsafjlksdafjlksadjf fjdsaklfj sdalk fdskjlaf lkösad jfklösad jflöksadjf lsdkfj kölsadjf dsklalöjdfj          kfdjslakjf salökfj klsdöafj klsdafj lksöadfj lkösadfj lkösadf jklösafmn     fdklsafjlksdafjlksadjf fjdsaklfj sdalk fdskjlaf lkösad jfklösad jflöksadjf lsdkfj kölsadjf dsklalöjdfj          kfdjslakjf salökfj klsdöafj klsdafj lksöadfj lkösadfj lkösadf jklösafmn     fdklsafjlksdafjlksadjf fjdsaklfj sdalk fdskjlaf lkösad jfklösad jflöksadjf lsdkfj kölsadjf dsklalöjdfj          kfdjslakjf salökfj klsdöafj klsdafj lksöadfj lkösadfj lkösadf jklösafmn     fdklsafjlksdafjlksadjf fjdsaklfj sdalk fdskjlaf lkösad jfklösad jflöksadjf lsdkfj kölsadjf dsklalöjdfj          kfdjslakjf salökfj klsdöafj klsdafj lksöadfj lkösadfj lkösadf jklösafmn     fdklsafjlksdafjlksadjf fjdsaklfj sdalk fdskjlaf lkösad jfklösad jflöksadjf lsdkfj kölsadjf dsklalöjdfj          kfdjslakjf salökfj klsdöafj klsdafj lksöadfj lkösadfj lkösadf jklösafmn     fdklsafjlksdafjlksadjf fjdsaklfj sdalk fdskjlaf lkösad jfklösad jflöksadjf lsdkfj kölsadjf dsklalöjdfj          kfdjslakjf salökfj klsdöafj klsdafj lksöadfj lkösadfj lkösadf jklösafmn     fdklsafjlksdafjlksadjf fjdsaklfj sdalk fdskjlaf lkösad jfklösad jflöksadjf lsdkfj kölsadjf dsklalöjdfj          kfdjslakjf salökfj klsdöafj klsdafj lksöadfj lkösadfj lkösadf jklösafmn     fdklsafjlksdafjlksadjf fjdsaklfj sdalk fdskjlaf lkösad jfklösad jflöksadjf lsdkfj kölsadjf dsklalöjdfj          kfdjslakjf salökfj klsdöafj klsdafj lksöadfj lkösadfj lkösadf jklösafmn     fdklsafjlksdafjlksadjf fjdsaklfj sdalk fdskjlaf lkösad jfklösad jflöksadjf lsdkfj kölsadjf dsklalöjdfj          kfdjslakjf salökfj klsdöafj klsdafj lksöadfj lkösadfj lkösadf jklösafmn     fdklsafjlksdafjlksadjf fjdsaklfj sdalk fdskjlaf lkösad jfklösad jflöksadjf lsdkfj kölsadjf dsklalöjdfj          kfdjslakjf salökfj klsdöafj klsdafj lksöadfj lkösadfj lkösadf jklösafmn     fdklsafjlksdafjlksadjf fjdsaklfj sdalk fdskjlaf lkösad jfklösad jflöksadjf lsdkfj kölsadjf dsklalöjdfj          kfdjslakjf salökfj klsdöafj klsdafj lksöadfj lkösadfj lkösadf jklösafmn     fdklsafjlksdafjlksadjf fjdsaklfj sdalk fdskjlaf lkösad jfklösad jflöksadjf lsdkfj kölsadjf dsklalöjdfj          kfdjslakjf salökfj klsdöafj klsdafj lksöadfj lkösadfj lkösadf jklösafmn     fdklsafjlksdafjlksadjf fjdsaklfj sdalk fdskjlaf lkösad jfklösad jflöksadjf lsdkfj kölsadjf dsklalöjdfj          kfdjslakjf salökfj klsdöafj klsdafj lksöadfj lkösadfj lkösadf jklösafmn     fdklsafjlksdafjlksadjf fjdsaklfj sdalk fdskjlaf lkösad jfklösad jflöksadjf lsdkfj kölsadjf dsklalöjdfj          kfdjslakjf salökfj klsdöafj klsdafj lksöadfj lkösadfj lkösadf jklösafmn     fdklsafjlksdafjlksadjf fjdsaklfj sdalk fdskjlaf lkösad jfklösad jflöksadjf lsdkfj kölsadjf dsklalöjdfj          kfdjslakjf salökfj klsdöafj klsdafj lksöadfj lkösadfj lkösadf jklösafmn     fdklsafjlksdafjlksadjf fjdsaklfj sdalk fdskjlaf lkösad jfklösad jflöksadjf lsdkfj kölsadjf dsklalöjdfj          kfdjslakjf salökfj klsdöafj klsdafj lksöadfj lkösadfj lkösadf jklösafmn     fdklsafjlksdafjlksadjf fjdsaklfj sdalk fdskjlaf lkösad jfklösad jflöksadjf lsdkfj kölsadjf dsklalöjdfj          kfdjslakjf salökfj klsdöafj klsdafj lksöadfj lkösadfj lkösadf jklösafmn     fdklsafjlksdafjlksadjf fjdsaklfj sdalk fdskjlaf lkösad jfklösad jflöksadjf lsdkfj kölsadjf dsklalöjdfj          kfdjslakjf salökfj klsdöafj klsdafj lksöadfj lkösadfj lkösadf jklösafmn     fdklsafjlksdafjlksadjf fjdsaklfj sdalk fdskjlaf lkösad jfklösad jflöksadjf lsdkfj kölsadjf dsklalöjdfj          kfdjslakjf salökfj klsdöafj klsdafj lksöadfj lkösadfj lkösadf jklösafmn     fdklsafjlksdafjlksadjf fjdsaklfj sdalk fdskjlaf lkösad jfklösad jflöksadjf lsdkfj kölsadjf dsklalöjdfj          kfdjslakjf salökfj klsdöafj klsdafj lksöadfj lkösadfj lkösadf jklösafmn     fdklsafjlksdafjlksadjf fjdsaklfj sdalk fdskjlaf lkösad jfklösad jflöksadjf lsdkfj kölsadjf dsklalöjdfj          kfdjslakjf salökfj klsdöafj klsdafj lksöadfj lkösadfj lkösadf jklösafmn     fdklsafjlksdafjlksadjf fjdsaklfj sdalk fdskjlaf lkösad jfklösad jflöksadjf lsdkfj kölsadjf dsklalöjdfj          kfdjslakjf salökfj klsdöafj klsdafj lksöadfj lkösadfj lkösadf jklösafmn     fdklsafjlksdafjlksadjf fjdsaklfj sdalk fdskjlaf lkösad jfklösad jflöksadjf lsdkfj kölsadjf dsklalöjdfj          kfdjslakjf salökfj klsdöafj klsdafj lksöadfj lkösadfj lkösadf jklösafmn     fdklsafjlksdafjlksadjf fjdsaklfj sdalk fdskjlaf lkösad jfklösad jflöksadjf lsdkfj kölsadjf dsklalöjdfj          kfdjslakjf salökfj klsdöafj klsdafj lksöadfj lkösadfj lkösadf jklösafmn     fdklsafjlksdafjlksadjf fjdsaklfj sdalk fdskjlaf lkösad jfklösad jflöksadjf lsdkfj kölsadjf dsklalöjdfj          kfdjslakjf salökfj klsdöafj klsdafj lksöadfj lkösadfj lkösadf jklösafmn     fdklsafjlksdafjlksadjf fjdsaklfj sdalk fdskjlaf lkösad jfklösad jflöksadjf lsdkfj kölsadjf dsklalöjdfj          kfdjslakjf salökfj klsdöafj klsdafj lksöadfj lkösadfj lkösadf jklösafmn     fdklsafjlksdafjlksadjf fjdsaklfj sdalk fdskjlaf lkösad jfklösad jflöksadjf lsdkfj kölsadjf dsklalöjdfj          kfdjslakjf salökfj klsdöafj klsdafj lksöadfj lkösadfj lkösadf jklösafmn     fdklsafjlksdafjlksadjf fjdsaklfj sdalk fdskjlaf lkösad jfklösad jflöksadjf lsdkfj kölsadjf dsklalöjdfj          kfdjslakjf salökfj klsdöafj klsdafj lksöadfj lkösadfj lkösadf jklösafmn     fdklsafjlksdafjlksadjf fjdsaklfj sdalk fdskjlaf lkösad jfklösad jflöksadjf lsdkfj kölsadjf dsklalöjdfj          kfdjslakjf salökfj klsdöafj klsdafj lksöadfj lkösadfj lkösadf jklösafmn     fdklsafjlksdafjlksadjf fjdsaklfj sdalk fdskjlaf lkösad jfklösad jflöksadjf lsdkfj kölsadjf dsklalöjdfj          kfdjslakjf salökfj klsdöafj klsdafj lksöadfj lkösadfj lkösadf jklösafmn     fdklsafjlksdafjlksadjf fjdsaklfj sdalk fdskjlaf lkösad jfklösad jflöksadjf lsdkfj kölsadjf dsklalöjdfj          kfdjslakjf salökfj klsdöafj klsdafj lksöadfj lkösadfj lkösadf jklösafmn     fdklsafjlksdafjlksadjf fjdsaklfj sdalk fdskjlaf lkösad jfklösad jflöksadjf lsdkfj kölsadjf dsklalöjdfj          kfdjslakjf salökfj klsdöafj klsdafj lksöadfj lkösadfj lkösadf jklösafmn     fdklsafjlksdafjlksadjf fjdsaklfj sdalk fdskjlaf lkösad jfklösad jflöksadjf lsdkfj kölsadjf dsklalöjdfj          kfdjslakjf salökfj klsdöafj klsdafj lksöadfj lkösadfj lkösadf jklösafmn     fdklsafjlksdafjlksadjf fjdsaklfj sdalk fdskjlaf lkösad jfklösad jflöksadjf lsdkfj kölsadjf dsklalöjdfj          kfdjslakjf salökfj klsdöafj klsdafj lksöadfj lkösadfj lkösadf jklösafmn     fdklsafjlksdafjlksadjf fjdsaklfj sdalk fdskjlaf lkösad jfklösad jflöksadjf lsdkfj kölsadjf dsklalöjdfj          kfdjslakjf salökfj klsdöafj klsdafj lksöadfj lkösadfj lkösadf jklösafmn     v     \end{document}      should work, but it only compiles with one text for one page on which the header is not displayed (picture tulogo is present), `\lipsum[1-20]` doesn't work neither.


title: Problem with the background image?

text: I am trying to insert a background image in my LaTeX file, but as I write the commands and compile, the background images are in the correct positions but the rest of the images get shifted to the end of the document. I am using `\begin{figure}[h].....\end{figure}`. Still the images get displaced whereas when I run the same file without background image, the rest of the images come to their proper places.


title: Where can I find the scrpage.cfg file?

text: I want to put my pagestyles in the `scrpage.cfg` file but I don't know where this file is or where I have to put this after creating it. Can somebody answer me this?


title: How can I prevent TOC from appearing in TOC in LyX?

text: I'm using the `book` class and I already tried everything that prevents the Table of Contents being listed in itself that works for LaTeX, but nothing works in LyX.


title: Extra space within bold text

text: I want to extra space within a bold text. When I use the `\textbf{}` command it removes the extra space I put in it. My code is as follows:               \textbf{My bold text\qquad:}      Here `\textbf` removes the extra space that I put inside the bold text. It removes the extra space even if I move it out out of the bold part.               \textbf{My bold text}\qquad\textbf{:}      This is the same when I use italic or underlined text. Extra space I use is removed. This problem only occurs when you use a colon as the last character in the bold part. If I use something else as the last character the space is reserved. But, it is removed if you use a colon as the last character within the bold part. How can I solve this problem?               % !TeX encoding = UTF-8          \documentclass{article}          \usepackage[turkish]{babel}     \usepackage[utf8]{inputenc}          \begin{document}          \flushleft     \underline{\textbf{ACIKLAMALAR \quad}:} \\          \end{document}      If put something else instead of the colon at the end it works just right. If I put the colon outside the `\underline` it works. But that is not what I want.


title: Can I use TikZ (instead of PSTricks) for latex2html5?

text: I found this today: http://latex2html5.com/ > Author interactive math equations and diagrams online using LATEX and > PSTricks It looks nice, but I'm more familiar with _TikZ_. Is anybody aware of something equivalent which is not based on _PSTricks_ but _TikZ_?


title: Toward a Stamper Package

text: ![MWE](http://i.stack.imgur.com/E36zm.png) **Imagine that you want to simulate a hand stamp on every page in some large documents**. It must be an imperfect print, with **random** page-to-page variations in ink intensity, fading, rotation and blur. Imagine also that stamp content must change with each document. The traditional solution would be to buy rubber stamps for each document and make stamping and scanning exercises, but besides being expensive, what fun would it be? A cheaper solution is to insert a PNG or PDF image in every page at some place, but designing each stamp is still a lot of previous work. Moreover, it will be too obviously computer-generated if the stamp is always the same image in the same place on every page, even when the original is a very realistic stamp. In How to make a realistic old rubber stamp? it is shown that stamps could include LaTeX text and how a fading effect could mimic in part a rubber stamp. Beyond this, I am trying to make the whole stamp in LaTeX (excepting some inner image too complex for coding), with easily configurable content and ink color and with some noise in circle lines, with the help of TikZ library `decorations.pathmorphing`, transparencies, and text layers. The result is the above image and below dirty slow-witted code. I find this still a very poor result. Not only because an expert could make a more realistic blur and/or cleaner code and/or faster compilation, but mainly because while thinking what would be a good general purpose LaTeX stamper, I thought of several **minimal requirements** :   * **pdflatex compatible**   * **Highly configurable** by a end user (user-defined text contents, ink color, size, central coat of arms)    * Result **compatible with usual PDF viewers** (not only Acrobat Reader)   * **Random page-to-page stamp rotation** (probably best limited around +/- 30 degrees)    * **Random page-to-page fading**. Probably a simple fading of the whole stamp with random orientation (360 degrees) is enough, but it must not affect the overlapping text.    * **Random page-to-page ink intensity** (i.e., whole transparency between 0.5 to 0.8)   * **Random page-to-page position between a concrete area** (i.e, around +/- 2 cm in the x,y position of page) Unfortunately I still have very little experience to improve the code significantly, mainly with TikZ. Is this all possible? Finally, what could be your own desired milestone for a hypothetical stamper package? Making alternate stamps oval or rectangular shapes, for example? My apologies for the broad question but I think that in this case even a partial answer could be more manageable than a storm of complete answers to isolated problems.               \documentclass{article}     \usepackage{lipsum}     \usepackage{xcolor,pgfplots}     \usepackage{tikz}     \usetikzlibrary{calc,patterns,fadings,positioning,decorations.pathmorphing,fit}     \usetikzlibrary{decorations.text}     \pgfplotsset{compat=1.7}      \usepackage{amssymb}     \usepackage{graphicx}     \usepackage{rotating}          % STAMP CONFIGURABLE CONTENT          \definecolor{stampink}{RGB}{0 34 85}           % Define color old stamp in RGB      \newcommand\textUp{TOWARD A STAMPER PACKAGE}   % Top label     \newcommand\textDown{Open question}            % Bottom label     \newcommand\textCap{\texttt{\bfseries\today}}                    % Center label     % PDF (name and path) for best result with same RGB that stampink     \newcommand\CoatOfArms{stampcoat.png}                 % STAMP FIXED CODE      % free hand style of circles stolen from http://tex.stackexchange.com/a/49272/11604     \pgfdeclaredecoration{free hand}{start}     {       \state{start}[width = +1pt,                     next state=step,                     persistent precomputation = \pgfdecoratepathhascornersfalse]{}       \state{step}[auto end on length    = 3pt, % 3                    auto corner on length = 3pt, % 3                                   width=+1pt] % 1       {         \pgfpathlineto{           \pgfpointadd           {\pgfpoint{1pt}{1pt}}           {\pgfpoint{rand*.25pt}{rand*.2pt}} % good values .2pt aand .15pt         }       }       \state{final}       {}     }      \tikzset{free hand/.style={         decorate,         decoration={free hand}         }      }      \def\freedraw#1;{\draw[free hand] #1;}                %CENTRAL STAMP CONTENT     \newcommand\textCenter{     \begin{minipage}{2.2cm}{}     \vspace{-1em}     \centering     \includegraphics[width=1.8cm,height=1.8cm]{\CoatOfArms}\par     \resizebox{2cm}{.205cm}{\textcolor{stampink}{\textCap}}%     \end{minipage}     }          % STAMPER MACRO     \newcommand\Stamper{\resizebox{3cm}{3cm}{ % FINAL SIZE TAMP     \begin{tikzpicture}[opacity=.8,transparency group]     \normalsize\sffamily     % EXTERIOR CIRCLE     \freedraw[color=stampink,opacity=.3,line width=5pt,rotate=0] (0,0.02) circle (3.6cm);     \freedraw[color=stampink,opacity=.5,line width=3pt,rotate=30] (0,0.01) circle (3.6cm);     \freedraw[color=stampink,opacity=.7,very thick,rotate=20] (0,0) circle (3.6cm);     % TOP CIRCULAR LABEL      \path [opacity=.2,postaction={decorate,decoration={raise=-1.3ex,text along path,      reverse path,text align=center,     text={|\huge\bfseries\color{stampink}|\textUp}}}] (-31:3.055cm) arc (-31:210:3.055cm);     \path [opacity=.4,postaction={decorate,decoration={raise=-1.7ex,text along path,      reverse path,text align=center,     text={|\huge\bfseries\color{stampink}|\textUp}}}] (-30.7:3.055cm) arc (-30.7:210:3.055cm);     \path [opacity=.8,postaction={decorate,decoration={raise=-1.5ex,text along path,      reverse path,text align=center,     text={|\huge\bfseries\color{stampink}|\textUp}}}] (-30:3.05cm) arc (-30:210:3.05cm);     % BOTTOM CIRCULAR LABEL     \path [opacity=.2,postaction={decorate,decoration={raise=-1.2ex,text along path, text align=center,     text={|\huge\bfseries\color{stampink}|\textDown}}}] (210:3.05cm) arc (210:330:3.05cm);     \path [opacity=.4,postaction={decorate,decoration={raise=-.85ex,text along path, text align=center,     text={|\huge\bfseries\color{stampink}|\textDown}}}] (210:3.05cm) arc (210:330:3.05cm);     \path [opacity=.8,postaction={decorate,decoration={raise=-1ex,text along path, text align=center,     text={|\huge\bfseries\color{stampink}|\textDown}}}] (210:3.05cm) arc (210:330:3.05cm);     %INNER CIRCLE AND CENTRAL CONTENT     \freedraw[color=stampink,opacity=.3,line width=4pt,rotate=0] (0.015,0.02) circle (2.5cm) node[scale=1.54] (m) {\textCenter};      \freedraw[color=stampink,opacity=.5,line width=3pt,rotate=30] (-0.025,-0.01) circle (2.5cm) node[scale=1.5] (m) {\textCenter};      \freedraw[color=stampink,opacity=.7,very thick,rotate=20] (0,0) circle (2.5cm) node[scale=1.52] (m) {\textCenter};      \draw[draw=none]          [postaction={path fading=north,fill=white!99,opacity=0.6}]         (-5,-5) rectangle (5,5);%          \end{tikzpicture}}}               \begin{document}          % stamp under text     \vspace{5.5cm}\hspace{8cm}\rotatebox[origin=c]{-30}{\Stamper}\vspace{-5.5cm}          \lipsum[2]      % stamp over text     \vspace{-2cm}\Stamper          \end{document}      **Edit** : As `stampcoat.pdf` cannot be uploaded, the MWE is changed to include a PNG version: ![stampcoat.png](http://i.stack.imgur.com/vlhTH.png) This can be changed with any PDF or PNG image with transparent background and the same RGB that the `stampink` defined color.


title: How to align limits of double integrals?

text: I'd like to have the limits of two integrals vertically aligned. In this example, the `x` and `b` should be positioned on the same line.               \[\int\limits_x^{\infty}\int\limits_b^{\infty} x^2+y^2 \mathrm{d}x \mathrm{d}y \]      ![enter image description here](http://i.stack.imgur.com/zLTC6.png) Has anybody an idea how to achieve this?


title: Ignore inner sep for tikz bounding box

text: Is there a way to have `tikz` ignore the white space produced by a `node`'s `inner sep` when calculating the picture's bounding box? Consider the following MWE:               \documentclass{article}          \usepackage[showframe,pass]{geometry}     \usepackage{tikz}          \begin{document}          \noindent \begin{tikzpicture}     \node[inner sep=0pt] (X) {X};     \draw (X) -- ++ (0.5, 0);     \draw[gray] (current bounding box.south west) rectangle (current bounding box.north east);     \end{tikzpicture}          \noindent X          \noindent \begin{tikzpicture}     \node[inner sep=2pt] (X) {X};     \draw (X) -- ++ (0.5, 0);     \draw[gray] (current bounding box.south west) rectangle (current bounding box.north east);     \end{tikzpicture}          \end{document}      Here's the output: ![enter image description here](http://i.stack.imgur.com/ZvaHv.png) In this example, the `inner sep` is useful when drawing lines from/to the node (see the horizontal line in the example), but on the other side, it indents the second `X` with regard to the normal text. Some way of specifying the bounding box as the smallest rectangle containing all "ink" (and thereby clipping all `inner sep`s and possibly other white spaces that needlessly extend the bounding box) would be great here...


title: It there a way to make URL link in bibliography as one word `Link`?

text: This is my code:               % arara: pdflatex: { shell: yes }     % arara: biber     % arara: pdflatex: { shell: yes }     % arara: pdflatex: { shell: yes }     \documentclass[12pt,a4paper]{article}     \usepackage{filecontents}     \begin{filecontents}{jobname.bib}     @techreport{NBERw10828,      title = "Accounting for Cross-Country Income Differences",      author = "Francesco Caselli",      institution = "National Bureau of Economic Research",      type = "Working Paper",      series = "Working Paper Series",      number = "10828",      year = "2004",      month = "October",      URL = "http://www.nber.org/papers/w10828",      abstract = {Why are some countries so much richer than others? Development Accounting is a first-pass attempt at organizing the answer around two proximate determinants: factors of production and efficiency. It answers the question "how much of the cross-country income variance can be attributed to differences in (physical and human) capital, and how much to differences in the efficiency with which capital is used?" Hence, it does for the cross-section what growth accounting does in the time series. The current consensus is that efficiency is at least as important as capital in explaining income differences. I survey the data and the basic methods that lead to this consensus, and explore several extensions. I argue that some of these extensions may lead to a reconsideration of the evidence.},     }}     \end{filecontents}     \usepackage[utf8]{inputenc}     \usepackage{hyperref}     \hypersetup{     colorlinks = true,     linkcolor = black,     anchorcolor = black,     citecolor = black,     urlcolor=blue,     bookmarksopen = true,     bookmarksnumbered = true,     bookmarksopenlevel = 2,     pdfstartview = {FitH},     pdfborder = {0 0 0}     }     \usepackage[indexing=cite,style=authoryear,citestyle=authoryear,sorting=none,backend=biber]{biblatex}     \makeatletter     \AtEveryCite{%       \let\parentext=\parentexttrack%       \let\bibopenparen=\bibopenbracket%       \let\bibcloseparen=\bibclosebracket}     \makeatother     %\renewcommand{\mkbibnamelast}[1]{\mkbibemph{#1}}     \addbibresource{jobname.bib}     \begin{document}     First \cite{NBERw10828}\par     \printbibliography     \end{document}      This is what it gives: ![enter image description here](http://i.stack.imgur.com/YE6p8.jpg) This is what I want to have as a URL link, one short word `Link` which is underlined and blue: ![enter image description here](http://i.stack.imgur.com/pkbBO.png) How it can be done? P.S. BTW how can be star be added to citation if front `*Caselli`?


title: Where can I find collections of bibliography styles?

text: Is there a central 'warehouse' or, perhaps, a 'list of collections', of bibliography styles? My preference is for BibLaTeX, but I'm sure answers for BibTeX would also be helpful. I don't have any specific requirements, but I would be interested in (a) trying things out to see examples of bibliography formatting and (b) learning how to build such things myself.


title: Multirowed multicolumn

text: I need something like that:               \multicolumn{2}{|c|}{in this place I want multirow text like in fixed width cells without multicolumn}      Without use `\makecell` and `\\\` in it. Is it possible? # MWE               \documentclass{article}      \begin{document}      \begin{tabular}{|p{3cm}|p{1.5cm}|p{1.5cm}|p{1.5cm}|p{1.5cm}|}        \hline        This text block is automaticaly goes down. It makes multirow.          &          \multicolumn{2}{l|}{This text is not :( even if the cell width is fixed. It breaks the table. }          & \multicolumn{2}{l|}{} \\        \hline &&&& \\        \hline      \end{tabular}      \end{document}


title: What is the correct way to get a pgfkey value?

text: This is my first foray into the pgfkeys package and I found the following behavior really odd. The Tikz/pgfkeys manual mentions two ways for setting key values: `\pgfkeys{key=value}` and `\pgfkeyssetvalue{key}{value}`. When I tried both, they return different values. MWE:               \documentclass{article}     \usepackage{tikz}          \pgfkeys{/my color/.initial = red, /my color/.estore in = \mycolor}          \begin{document}          \pgfkeys{/my color=blue}     The colors are \mycolor{} and \pgfkeysvalueof{/my color}.          \pgfkeyssetvalue{/my color}{yellow}     The colors are \mycolor{} and \pgfkeysvalueof{/my color}.          \end{document}      The output is:               The colors are blue and red.     The colors are blue and yellow.      I was expecting all blue on the first line and all yellow on the second. What went wrong?


title: pagenumbering basic alph and subpages arabic

text: For my master thesis I want a clean looking pagenumbering for the non-content pages. " For example the Glossary should start on Page "C" (only "C" as entry in the toc) but if it is more than one Page long the additional pages should be numbered "C1","C2",... Yet I have included a `\pagenumbering{Alph}` which makes the non-content pages counted with Alpha numeric letters but my glossary, acronyms, references and appendix pages are quite much and there are several letters "skipped" in the toc... (Glossaries occupies space from C to H)


title: `\foreach` command in TiKz

text: How come that in the code below, `\foreach` is unable to give me round numbers?               \documentclass{standalone}     \usepackage{tikz}     \usepackage{pgfplots}          \usetikzlibrary{positioning, calc}          \begin{document}         \begin{tikzpicture}     \foreach\x in {0.1,0.2,...,0.9}\node at (0,{-2*\x}){\tiny\x};         \end{tikzpicture}     \end{document}      Thanks for your help


title: Is there a decent table editor for use in LyX?

text: Is there a decent editor to create tables for inclusion in LyX? The standard table editor can't even do the most simple things in a straightforward manner.


title: How can I automate this item overlay (in beamer)?

text: For a presentation, I would like to reveal several items in a list in succession. Right now, the code is as follows; the corresponding (and desired) output is shown at the bottom of my post.               \documentclass{beamer}          \begin{document}          \frame{     \begin{itemize}       \item stay         \begin{itemize}           \item<2-> one           \item<3-> two           \item<4-> three         \end{itemize}       \item stay 2         \begin{itemize}           \item<5-> and four             % \item<> Ooops, forgot something           \item<6-> and five         \end{itemize}     \end{itemize}     }          \end{document}      How can I automate (counters?) the revealing of the items such that there be no need to increase the numbers in `<...>` by hand. If I need to include one more `\item` somewhere at the beginning, increasing every subsequent `<...>` is tedious. I'm thinking about something like a new '\itemnext item I forgot'... ![enter image description here](http://i.stack.imgur.com/UsnUE.png)


title: Beamer mini-frames: remove links from subsection navigation circles

text: In this thread (including minimal working example) One navigation bullet per subsection with subsection=false in custom beamer theme I found a solution for drawing only one circle by subsection instead of a circle per frame when using miniframes. It works very well, except one problem: In many PDF viewers (e.g. on Windows: Foxit, SumatraPDF, Adobe Acrobat; on Linux: Evince) the circles link to the last frame of the subsection instead of linking to the first. With qpdfview for example the navigation works correctly. My PDF will be distributed, so it should work correctly in most common PDF viewers. Does anyone have an idea what could be the reason for this behaviour and how I could solve the problem? **EDIT:** As nobody seems to have a solution, does anybody know how I could simply remove the links from the navigation circles in order to avoid the problem of linking to the wrong page?


title: Pros and cons of different presentation classes?

text: > **Possible Duplicate:**   >  Which package to use for presentations ? Beamer, Prosper, or Other The Tex.SE-wiki mentions `beamer`, `powerdot`, `HA-prosper`, `prosper`, `slides` and `seminar` under the presentations tag. Please, outline their strengths and weaknesses. Which purposes are they meant for?


title: How to use Latex to print a document to look like a lined notebook?

text: I would like to print a document with text on lined paper like a notebook like http://www.highschoolmathandchess.com/2013/05/25/latex-handwriting-on- notebook-paper/ However, I would like to be able to edit the line colours. I would like to put the header/title in the blank white space. Is there a way to do the document above without using the background jpg? The document is also multiple pages. I have looked at this question too and would like to have lines only and not a grid. Is there a latex template that makes a page look like a math notepad? Thanks!


title: Create diagrams in LaTeX with TikZ

text: I am relatively new to the concept of generating diagrams in LaTeX, and do not know if LaTeX is capable of generating the diagram i wish to create. The diagram looks like this: ![enter image description here](http://i.stack.imgur.com/TcPYE.png) I was hoping someone could point me in the right direction as to how I would go around creating a diagram like this. FYI this was generated in Powerpoint, and when I insert it as an image in LaTeX, the resolution is very poor, also I would eventually like to add some text to the diagram. I have started using TikZ, and am learning a lot as I read through the manual, but I cant see how I can create diagrams like the one shown here. Edited: Eventually I wish to add some text on the diagram showing some of the processes that occur within the water column. At the moment I have simply generated the features of the diagram individually i.e. create a sine wave for the surface, used 'tension' for the shape of the lake, and then connect these together with straight lines. It just seems that the method that I'm adopting is rather long winded, and wont end up producing a nice outcome.


title: Struggling to define variable using variable previously defined

text: new to tikz and am struggling to figure out how to define a variable using variables I have just defined. I think the problem in the code below is coming from the following section:               \def\vx{\asx-\sqx}     \def\vy{\asy-\sqy}     \def\magv{sqrt({\vx*\vx} + {\vy*\vy})}     \def\propx{\sqx + \vx/\magv+\winsetshock}     \def\propy{\sqy + \vy/\magv+\winsetshock}      The error I'm receiving is:               "Package pgf Error: no shape is known.      ...     \node at (\propx,\propy){\textbf{$p$}};"      Any ideas where I'm going wrong here? Also, any suggestions as to how to make this more applicable to other tikz newbies greatfully received...               \usetikzlibrary{calc}     \def\axisoffset{0.1};     \def\labeloffset{.05};     \def\winsetshock{.1}     \def\sqx{.5}     \def\sqy{.5}     \def\asx{.7}     \def\asy{.9}     \def\vx{\asx-\sqx}     \def\vy{\asy-\sqy}     \def\magv{sqrt({\vx*\vx} + {\vy*\vy})}     \def\propx{\sqx + \vx/\magv+\winsetshock}     \def\propy{\sqy + \vy/\magv+\winsetshock}     \foreach \i in {0, \thexshift}{       \foreach \j in {0}{           \begin{scope}[shift={(\i,\j)}]           \draw[thick] (0, -\axisoffset) --  (1, -\axisoffset);            \draw[thick] (-\axisoffset,0) --  (-\axisoffset, 1);          \end{scope}        }     }     \def\laboffset{-.35};     \begin{scope}[shift={(0,0)}]       \node at (.5, 1.25) {\textbf{Non-crisis}};           \draw[dotted] (\sqx,\sqy) circle [radius=\winsetshock];       \draw[dashed] (.5,.9) --  (.7, .1);       \node at (\sqx,\sqy) {\textbf{$SQ$}};       \node at (\asx,\asy) {\textbf{$AS$}};       \node at (\propx,\propy) {\textbf{$p$}};     \end{scope}


title: Which spaces exactly are ignored by \halign?

text: Some spaces seem ignored by the `\halign` primitive. For instance,               \setbox0=\vbox{\halign{ # \cr \space b \cr}}     \showbox0      indicates that there is no glue before `b`, but that there are two spaces after. It seems that spaces in the preamble are lost as soon as it is read, but I can't be sure. > Which spaces (implicit spaces, funny spaces, macros expanding to spaces, > other spaces) are lost where in `\halign`?


title: To modify Verbatim generated by sphinx-python

text: I would like to define `\renewenvironment` (later will put it in preamble in conf.py) so that `tcolorbox` appears around `Verbatim` code. Here is a sample of `Verbatim`:               \begin{Verbatim}[commandchars=\\\{\},formatcom=\footnotesize]     \PYG{n}{var}\PYG{p}{(}\PYG{l+s}{'}\PYG{l+s}{x1 x2 x3}\PYG{l+s}{'}\PYG{p}{)}     \end{Verbatim}      So far I tried:               \makeatletter     \let\oldverbatim=\Verbatim     \renewenvironment{Verbatim}[1][]{         \begin{tcolorbox}[colframe=nicedarkerblue,colback=niceblue,leftrule=3mm]         \begin{oldverbatim}[commandchars=\\\{\},formatcom=\footnotesize]     }{         \end{oldverbatim}         \end{tcolorbox}     }\makeatother      But with this LateX screams at me with:               ! TeX capacity exceeded, sorry [grouping levels=255].     \stepcounter ...addtocounter {#1}\@ne \begingroup                                                    \let \@elt \@stpelt \csnam...     l.2271 ...andchars=\\\{\},formatcom=\footnotesize]


title: Tabular form wrapped around article

text: I have a strange beast of a technical report format for my job that I would like to port to `TeX` to help formatting. The problem is I'm not sure where to start. The essential problem is this: every page of the report is a tabular form. Cover page has boxes to input document control data, and a central section for a summary, that can include text, as well as tables and pictures (`article`-style). Body pages have across the top and along the side, text boxes (which, other than the page number, contain the same document control data as boxes on the cover page) and a main area for the report. What I would like is to create a format of some type that would allow for the document control data to be initialized for the whole report, and then let me write, `article` - style, in a large tabular field on each page. Is that even possible?


title: Altering cell colour hides cell border in LyX

text: I'm probably doing something simple wrong, but I'm having the following problem. I've got a table with two columns, on the left there are multirows with coloured cells, on the right there are normal cells which are each coloured individually. Hopefully this is clear in the following pictures: ![lyx table](http://i.stack.imgur.com/EBMSD.png) ![pdf table](http://i.stack.imgur.com/ff85R.png) As you can see, the cells on the right in the generated table do not have the correct borders, even though they seem to be fine in LyX. Does anybody know what might be causing this? Any help would be greatly appreciated.


title: LaTeXTools on sublime: Please help me find the LaTeXTools.sublime-settings file

text: Im desperately trying to find the LaTeXTools.sublime-settings file that I'm supposed to edit in order to use latextools. I'm looking in this file: /Users/MyName/Library/Application Support/Sublime Text 2/Packages/LateXTools and its not there. Any ideas?


title: Revisiting: Plotting Population Regression Function with pgfplot

text: I want the make the following population regression function after some modifications with `pgfplot` (response from previous question here). ![enter image description here](http://i.stack.imgur.com/c92rX.png) **Required Modifications**   1. Draw small circle at each normal distributions mean.   2. Draw a line that passes through the means.   3. Join means with `xticklabs` and `yticklabs`. Here is my MWE. Thanks for any help.               \documentclass{standalone}     \usepackage{pgfplots}          \begin{document}          \begin{tikzpicture}[ % Define Normal Probability Function     declare function={                 normal(\x,\m,\s) = 1/(2*\s*sqrt(pi))*exp(-(\x-\m)^2/(2*\s^2));             }            ]          \draw [help lines] (0,0) grid (6,6);          \begin{axis}[         no markers,         domain=-3.2:3.2,         samples=100,         axis lines=left,         enlarge x limits=true,         enlarge y limits=true,         xtick={0,0.5,1},         ytick={0,0.5,1},         xticklabels={$X_1$, $X_2$, $X_3$},         yticklabels={$Y_1$, $Y_2$, $Y_3$},         xlabel=$X$, xlabel style={at=(xticklabel cs:1), anchor=south},         ylabel=$Y$, ylabel style={at=(yticklabel cs:1), rotate=-90, anchor=west},       ]               \addplot [samples=2, domain=0:1.4] {2.5+4*x};     \addplot[cyan!50!black, thick, domain=0:6] ({normal(x, 3, 1)+0.0},x);     \addplot[cyan!50!black, thick, domain=2:8] ({normal(x, 5, 1)+0.5},x);     \addplot[cyan!50!black, thick, domain=4:10] ({normal(x, 7, 1)+1},x);          \draw (0, 0) --(5, 16) -- (0, 16);     \draw[fill] (5, 16) circle [radius=2.0pt];          \node[above right] (5,15) {$\mathbf{E}\left(Y|X_{i}\right)=\beta_{0}+\beta_{1}X$};          \node[above right] (15,25) {Distribution of \\$Y$ values \\given $X=x_3$};          \end{axis}               \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/pHtPF.png) My node placement is not correct. **Edited** Following @Qrrbrbirlbel comment, I have partial solution:               \documentclass{standalone}     \usepackage{pgfplots}          \begin{document}          \begin{tikzpicture}[ % Define Normal Probability Function     declare function={                 normal(\x,\m,\s) = 1/(2*\s*sqrt(pi))*exp(-(\x-\m)^2/(2*\s^2));             }            ]          \draw [help lines] (0,0) grid (6,6);          \begin{axis}[         no markers,         domain=-3.2:3.2,         samples=100,         axis lines=left,         enlarge x limits=true,         enlarge y limits=true,         xtick={0, 0.5, 1},         ytick={3, 5, 7},         xticklabels={$X_1$, $X_2$, $X_3$},         yticklabels={$Y_1$, $Y_2$, $Y_3$},         xlabel=$X$, xlabel style={at=(xticklabel cs:1), anchor=south},         ylabel=$Y$, ylabel style={at=(yticklabel cs:1), rotate=-90, anchor=west},       ]               \addplot[cyan!50!black, thick, domain=0:6] ({normal(x, 3, 1)+0.0},x);     \addplot[cyan!50!black, thick, domain=2:8] ({normal(x, 5, 1)+0.5},x);     \addplot[cyan!50!black, thick, domain=4:10] ({normal(x, 7, 1)+1},x);          \draw[dashed] (axis cs: 0, -1) -- (axis cs: 0, 3);     \draw[dashed] (axis cs: -1, 3) -- (axis cs: 0, 3);     \draw[fill] (axis cs: 0.0, 3) circle [radius=2.0pt];          \draw[dashed] (axis cs: 0.5, -1) -- (axis cs: 0.5, 5);     \draw[dashed] (axis cs: -1, 5) -- (axis cs: 0.5, 5);     \draw[fill] (axis cs: 0.5, 5) circle [radius=2.0pt];          \draw[dashed] (axis cs: 1, -1) -- (axis cs: 1, 7);     \draw[dashed] (axis cs: -1, 7) -- (axis cs: 1, 7);     \draw[fill] (axis cs: 1, 7) circle [radius=2.0pt];          \addplot [samples=2, domain=0:1.4] {3+4*x};          \node[above right] (cs:1, cs:7) {$\mathbf{E}\left(Y|X_{i}\right)=\beta_{0}+\beta_{1}X$};          \node[above right] (axis cs: 15, 25) {Distribution of \\$Y$ values \\given $X=x_3$};          \end{axis}               \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/0HpUr.png) **Still Issues**   1. Text nodes are correctly placed.   2. Line passes through the means does not intersect y-axis.


title: Is it necessary to give a \\ before \intertext?

text: I am not sure which one is correct when using `\intertext` or `\shortintertext`. Adding `\\\` before them or not.               \documentclass[preview,border=12pt]{standalone}     \usepackage{amsmath}     \begin{document}     \section*{Without a line break }     \begin{gather*}     E = mc^2     \intertext{Multiply both side by 2, we have}     2E = 2mc^2     \end{gather*}          \section*{With a line break}     \begin{gather*}     E = mc^2\\     \intertext{Multiply both side by 2, we have}     2E = 2mc^2     \end{gather*}     \end{document}      ![enter image description here](http://i.stack.imgur.com/Nujuh.png) I don't see any differences. Or there is something wrong with my eyes. So the question is: _Is it necessary to give a`\\\` before `\intertext` or `\shortintertext`?_


title: Argument in "thebibliography"

text: I was reading the explanation about `thebibliography` and was totally confused: > The `thebibliography` environment has an argument which should be a string > at least the length of the widest entry label in the source list. Instead of > using the numbers generated by the environment as entry labels, you can > specify your own by using an optional argument to `\bibitem`, but remember > to increase the length of the argument to the `thebibliography` command. What does "widest entry label" mean? Practically, what should I put as the argument in               \begin{thebibliography}{?}      or is the argument not necessary?


title: Exam class: wrong \totalpoints

text: I have a problem with the `exam` class. Almost all of my questions have parts and I intend to mention, not only the points given for each part, but also the points total at the beginning of the questions, like thus: ![What I want to do](http://i.stack.imgur.com/GyWEF.jpg) But for some questions (not all, strangely) the `\totalpoints` command doesn't give out the right points total, even if I compile many times. See what I mean: ![the problem](http://i.stack.imgur.com/RpVWF.jpg) The points total for this question is obviously 8, so why does it count 5 points? I first thought it had something to do with the `oneparcheckboxes` environment, as other questions whose total is wrong have such an environment inside them. But this one doesn't. The code I used to customise the points appearance is               \pointsinrightmargin     \pointformat{\dots/\themarginpoints}     \qformat{\shadowbox{\thequestion}~\hrulefill ~\emph{\totalpoints\ points}}


title: Section indentation

text: I'd like to have each of my sections, subsections, etc indented similar to how code is normally nested:               int func() {          if (x) {             do this stuff            }          // more code here      }      I'm not trying to format code, I just visually really like using indentation to understand where a section ends. What's the best way to implement this? I've tried using `adjustwidth` but it won't support nested subsections. I'd like to stay away from nested \items because I'd like all the support that accompanies sectioning (table of contents, etc).


title: Portable LaTeX system for Mac

text: So my MacBook Air broke down, and I plan to make use of the Macs in the university library to write papers. But the problem is: I do not have admin control there (so I cannot install anything) and LaTeX is not installed originally. So I wonder if there is a way to put latex system & TexShop into a USB and use them on those Macs? * * * Final edit: Thanks all for the advice. Succeeded installing a working TexLive system on my portable hard drive. But my story has a funny ending: It turns out that the university iMac does not run any software besides those already installed, nor can I use the Terminal or any advanced features. Well, I dig out my old notebook with Windows 7 and THE END : )


title: PGFPlots Parametric Plot, Arrow Spacing by Constant Time

text: For a parametric plot of a particle's position (x(t),y(t)), is it possible to use`pgfplots` to draw arrows equally spaced in time to indicate the direction of travel? For example, with (x(t),y(t)) = (t,t^2), I know how to produce arrows equally spaced in length:               \documentclass{article}     \usepackage{pgfplots}     \usetikzlibrary{decorations.markings}     \pgfplotsset{compat=1.8}          \begin{document}     \begin{tikzpicture}     \begin{axis}[axis lines = middle,smooth,xlabel = $x$, ylabel =$y$, minor tick num =1, grid=both, unit vector ratio*=1 1,enlargelimits = true]     \addplot[thick, variable=\t, domain=0:2, decoration={         markings,         mark=between positions 0.2 and 0.99 step 2em with {\arrow [scale=1.5]{stealth}}         }, postaction=decorate] ({t^2}, {t^4});     \end{axis}     \end{tikzpicture}          \end{document}      yielding ![enter image description here](http://i.stack.imgur.com/rfDB6.png) But can I get constant spacing in time, similar to: ![enter image description here](http://i.stack.imgur.com/xAT9j.png)


title: Frontmatter chapter title size in memoir

text: How do I specify the chapter title font size in the frontmatter of a document typeset with `memoir`? I want to set different font sizes for the frontmatter, mainmatter, and backmatter. I need to reduce the font size like in this picture. ![enter image description here](http://i.stack.imgur.com/mU8wh.png)


title: Error when using biblatex together with nature-style file

text: I recently decided to use biblatex the first time for a project, so please make your explanations understandable for a complete biblatex beginnner. I like the citation style of the http://ctan.org/pkg/biblatex-nature package, but when I run it with biblatex, I get this error: Bibliography macro 'related' undefined My (probably very unsophisticated) solution to this problem was to comment out all `\usebibmacro{related}%` instances in the `nature.bbx` file, which - surprisingly - is working up till now, but it still left me wondering:   * What is this macro good for?   * Will I run into any problems once I cite more than 3 references? If it is of any relevance, I use biblatex 1.7 because that is the latest version in the repositories for ubuntu. And I'm using bibtex as a backend.


title: Vertical space between tables vspace won't work

text: I have 2 tables, one above the other. At the moment I can't make any space between them in my report. The strange thing is I moved them in to a new blank document with all the same preamble and `\vspace` worked. I don't really know what the problem is but it's frustrating that they are stuck together. My tables are within a subsection of a section. My preamble and table code are below:               \documentclass[a4paper,12pt,reqno]{amsart}          \usepackage{tikz}        % only needed if you include TpX drawings     \usepackage{graphicx} % only needed if you include graphics files other than TpX     \usepackage{amsthm}     \usepackage{amssymb}     \usepackage{verbatim}     \usepackage{epstopdf}     \usepackage{color}     \usepackage{pdflscape}     \usepackage[section]{placeins}     \usepackage{amsfonts}     \usepackage{xfrac}     \usepackage{mathrsfs}     \usepackage{array}     \usepackage{subfig}     \usepackage{titletoc}     \usepackage{hyperref}               \theoremstyle{definition}     \newtheorem{example}{Example}     \numberwithin{figure}{section}     \numberwithin{equation}{section}     \numberwithin{table}{section}          \newcommand{\by}{\bf y}      \newcommand{\bx}{\bf X}      \newcommand{\T}{\text{T}}                \newcommand{\bb}[1]{{\bf#1}}     \newcommand{\bo}[1]{\boldsymbol{#1}}     \newcommand{\E}[1]{{\mathbb E}\left[ #1 \right]}     \newcommand{\Var}[1]{{\mathbb {V}}\left(#1 \right)}          \newcommand{\ssc}[1]{\ensuremath{^{\textrm{#1}}}}          \newenvironment{changemargin}[2]{%     \begin{list}{}{%     \setlength{\topsep}{0pt}%     \setlength{\leftmargin}{#1}%     \setlength{\rightmargin}{#2}%     \setlength{\listparindent}{\parindent}%     \setlength{\itemindent}{\parindent}%     \setlength{\parsep}{\parskip}%     }%     \item[]}{\end{list}}          \setlength\extrarowheight{0pt}          \let\stdsection\section     \renewcommand\section{\newpage\stdsection}          \setlength\parindent{0pt}               \setcounter{tocdepth}{3}% to get subsubsections in toc          \let\oldtocsection=\tocsection          \let\oldtocsubsection=\tocsubsection          \let\oldtocsubsubsection=\tocsubsubsection          \renewcommand{\tocsection}[2]{\hspace{0em}\oldtocsection{#1}{#2}}     \renewcommand{\tocsubsection}[2]{\hspace{1em}\oldtocsubsection{#1}{#2}}     \renewcommand{\tocsubsubsection}[2]{\hspace{2em}\oldtocsubsubsection{#1}{#2}}               \begin{document}          \begin{table}[h!]     \caption{MCMC mixing results for the MH within Gibbs sampler} % title of Table     \centering % used for centering table     \bgroup     \def\arraystretch{2}     \begin{tabular}{c c c} % centered columns (4 columns)          \bb{Response}: & \bb{ESS} (\%) & \bb{Acceptance rate} (\%) \\ \hline          \bb{TST} & 100.0 & 52.90 \\          \bb{WASO} & 99.90 & 56.68  \\          \bb{N2} & 98.56 & 50.23 \\          \bb{R} & 99.33 & 63.19  \\     \hline     \end{tabular}     \egroup     \label{mix} % is used to refer this table in the text     \end{table}     \vspace*{10mm}          \begin{table}[h!]     \caption{MCMC mixing results for the strongest and weakest models for benchmark $g$ for response \bb{TST}.} % title of Table     \centering % used for centering table     \bgroup     \def\arraystretch{2}     \begin{tabular}{c c c} % centered columns (4 columns)          \bb{Model}: & \bb{ESS} (\%) & \bb{Acceptance rate} (\%) \\ \hline          Strongest & 87.04 & 69.3 \\          Weakest & 6.74 & 10.9 \\     \hline     \end{tabular}     \egroup     \label{mix2} % is used to refer this table in the text     \end{table}\               \end{document}      Any help is appreciated.


title: \par vs \paragraph

text: What is the difference between `\par` and `\paragraph`? I can skip a space between two paragraphs and have it retained on in the output on XeLaTeX. How is the effect different from using `paragraph` environment?


title: Error viewing dvi file: Postscript specials could not be rendered

text: How to rectify this error while viewing `.dvi` file,               *******     Error: /undefined in H.S     Operand stack:        --nostringval--   PermitFileReading   --nostringval--   PermitFileWriting   --nostringval--     Execution stack:        %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1930   1   3   %oparray_pop   1929   1   3   %oparray_pop   1913   1   3   %oparray_pop   1803   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--     Dictionary stack:        --dict:1176/1684(ro)(G)--   --dict:0/20(G)--   --dict:80/200(L)--   --dict:95/300(L)--   --dict:17/200(L)--     Current allocation mode is local     MiKTeX GPL Ghostscript 9.05: Unrecoverable error, exit code 1          *************      my tex file


title: It is possible to make fonts appear heavier (darker) in pdf output of Latex?

text: [Edited to include what I have learned from the answers.] I am using Latex in TeX Live on my Mac, through TeXLive. I compile .pdf files using Pdflatex. I use the default fonts. [These fonts are called Computer Modern.] I like the appearance of these fonts, but I would like the fonts in the .pdf files generated by Latex to be heavier (or darker) than they are now. NOTE: I am talking about both plain text and math. It appears that this issue is independent of the compiler, and it's not possible to "fine-tune" the .pdf output without changing the font package used. The solution is therefore to change the font package used. For someone using mathematical formulas, like me, there are fonts "with math support". A list may be found here. In the above list of font packages, there are quite a few that are heavier than Computer Modern. For example, Times or "Utopia Regular with Fourier". Clicking on them on the page linked to above, one finds two lines of code that need to be inserted in the Latex document in order to call a particular font package. [See also this question from which one can extract pretty much the same information, and possibly more.]


title: Special macro definition (2opt, 1mand)

text: How can you define a macro `\cmd` in TeX primitives using two optional arguments (and a mandatory one) that fulfills the property that calling `\cmd[opt]{mand}` is equivalent to `\cmd[][opt]{mand}`. Yet, I only managed to create this macro with beeing `\cmd[opt]{mand}` an equivalent call to `\cmd[opt][]{mand}`. I don't really get which kind of questions I have to propose to TeX in order to achieve what I have in mind. Do you have any suggestions?


title: Libertine Mono and lualatex

text: Using lualatex on latest TeXLive 2012 I am not able to select Libertine Mono by its full name via fontspec. luaotfload is finding the font and it is written into `~/.texlive2012/texmf-var/luatex-cache/generic/names/otfl- names.lua` However I am able to select the different styles by their psname like `LinLibertineMO`. Is there something wrong with the font itself or am I doing something wrong? **edit:** As requestet a working example.               \documentclass{scrartcl}     \usepackage[english]{babel}     \usepackage{fontspec}     \usepackage{blindtext}     \setmainfont{Linux Libertine O}     \setsansfont{Linux Biolinum O}     % \setmonofont{Linux Libertine Mono O}          \begin{document}          \blindtext          \end{document}      Uncommenting `setmonofont` leads to not working:               ! fontspec error: "font-not-found"     !      ! The font "LinuxLibertineMonoO" cannot be found.     !       ! See the fontspec documentation for further information.      Here’s an excerpt from `~/.texlive2012/texmf-var/luatex- cache/generic/names/otfl-names.lua`               {     ["familyname"]="Linux Libertine Mono O",     ["filename"]={ "LinLibertine_M.otf", false },     ["fontname"]="LinLibertineMO",     ["fullname"]="Linux Libertine Mono O",     ["names"]={      ["family"]="Linux Libertine Mono O",      ["fullname"]="Linux Libertine Mono O",      ["psname"]="LinLibertineMO",      ["subfamily"]="Mono",     },


title: How does one typeset a URL?

text: I'd like to insert a URL into this document. Is there a "correct" way of doing that? If so, is there a way to turn it into a link inside the final pdf generated with pdfTeX or XeTeX?


title: URLs and justification

text: I am having difficulties in keeping long URLs inside the correct margins in LyX. I can understand why there are difficulties in hyphenating URLs at a point that will ensure the average reader will understand that it's an inserted hyphen and not part of the URL, but is it not possible to ensure that additional spaces are placed in the line (to justify it) so that the URL all appears on one line, or that it breaks at a '/' or similar? Or is there a more appropriate solution to this problem - here is one example of a problematic line:               \footnote{This is based on data for desktop performance found at \texttt{http://www.frc.ri.cmu.edu/\textasciitilde hpm/book97/ch3/processor.list.txt} - accessed 25 May 2013 - and data we collected on real time device performance.}


title: Is it possible to have URLs link from a pdf to the webpage?

text: > **Possible Duplicate:**   >  How does one insert a URL correctly? I'm writing up a document, and at one point I cite a file online found at `http://www.math.uconn.edu/~kconrad/blurbs/grouptheory/groupsp3.pdf` I made a footnote with `\footnote{http://www.math.uconn.edu/\textasciitilde kconrad/blurbs/grouptheory/groupsp3.pdf}` I had to find an alternative for the `~` since it would not show up in the final document. This works fine when copy+pasting to a web browser, but is it possible to just link to the page from the pdf by clicking on the footnote? P.S. If there's a better fix to the `~` issue, I'd be glad to see that as well.


title: Dividing Scrolling text

text: Based on the video available here : http://www.youtube.com/watch?v=vkBCeOBbAmM I try to understand what the following code does               \def\text{\setbox\galley=\vbox\bgroup     \hsize= 5cm     \hrule}          \makeatletter     \def\endtext{\vskip-\prevdepth     \vfil\egroup     \setbox0=\vsplit\galley to\z@}     \makeatother          \def\lines#1{\vsplit\galley     to #1\baselineskip}      unfortunately, I am not sucessful. In the video, he speaks about "floating, scrolling text" which you can cut in pieces and place the different pieces in the page. But I fail to understand how to do that with the previous code lines. I begin in macro writing so it could be I do not understand because I do not undestand the effect of the different commands put under these macros. I tried               \text blablablabla \endtext      to check the effect but the page does not display any text at all then.


title: Adding a glossary with ShareLaTeX

text: I'm trying to add a glossary to an article in ShareLaTeX but It seems the whole `\makeglossaries`command doesn't work if you don't use the `makeglossaries document_name`when compiling (as it says here). Is there any way to force the compiler to execute that (I mean the shareLaTeX online compiler)? **EDIT:** 6 days ago, I received a newsletter from the ShareLaTeX team where they explain the latest additions they've made into their compiler; among which is the possibility of use the glossaries package, without shell-calling `makeglossaries` so I gave it a try:               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage{glossaries}     \title{EjGlos}     \newglossaryentry{bitcoin}     {       name=Bitcoin,       description={(\btc)  is a peer-to-peer payment system and digital currency introduced as open source software in 2009 by pseudonymous developer Satoshi Nakamoto. It is a cryptocurrency, so-called because it uses cryptography to control the creation and transfer of money}     }     \makeglossaries     \begin{document}     \maketitle     \section{How does Bitcoin work?}     From a user perspective, \gls{bitcoin} is nothing more than a mobile app or computer program that provides a personal Bitcoin wallet and allows a user to send and receive bitcoins with them. This is how Bitcoin works for most users.     \printglossaries     \end{document}      And it seems to work properly: ![ShareLaTeX_glossaries](http://i.stack.imgur.com/DxtfA.png)


title: Avoid empty line after full-length footnote

text: I'm editing a thesis using XeLaTeX. In some pages there are at least two footnotes and sometimes one of them ends with a filled line (I'm not sure this is the best name), so there is an empty line before the next footnote, as shown in the figure ![empty line between footnotes](http://i.stack.imgur.com/Z3HtO.png). The author of the thesis doesn't like that empty line; is there any way of avoiding those lines? Edit: a MWE which shows the same problem, but also that the blank line does not always shows up.               \documentclass{article}     \usepackage[nopar]{lipsum}          \begin{document}          This is a sentence.\footnote{ \lipsum[1] } This is another sentence.\footnote{ \lipsum[2] }          This is another paragraph.\footnote{\lipsum*[3]} This is yet another sentence.\footnote{ \lipsum[4] }          \end{document}      In the thesis I could get rid of the blank lines by removing a trailing space in the first footnote, as suggested by @David Carlisle. Why isn't there an empty line between footnotes 1 and 2 of the MWE?


title: Indentation in list environment

text: How can I specify explicitly both the indentation of the label and the actual item's text from the left margin in a list environment. I would like to achieve the following: ![](http://i.stack.imgur.com/EkJko.jpg)


title: How can I add a list of sections within a chapter at the start of every chapter?

text: As the title says, I want to basically list all of the sections within a chapter in a small table of contents at the beginning of every new chapter. See the image for clarification. ![Graph Theory, by J.A. Bondy & U.S.R. Murty](http://i.stack.imgur.com/xpv1Y.jpg)


title: \subsection{\citeauthor{some-bib-ref}} => "Token not allowed in PDF string"

text: I've got a section in my document in which every `\subsection{}` is about some paper and should be headed by a (textual) reference to that paper in the bibliography. However, with hyperref included, `\subsection{\citeauthor{some-bib-ref}}` leads   1. to a "Token not allowed" warning. This is because the output of `\citeauthor{}` is not just textual, but a PDF link.   2. to a toc entry named some-bib-ref; I would much prefer the author's name. If I had just `\subsection{\cite{some-bib-ref}}`, I gather, I could just use the starred-version of `\cite{}`. However, for `\citeauthor`, the starred version just produces different (linked) output. Does anyone know how to get the author's name as plain text?


title: How can I get a nice alignment without using \hspace?

text: I have two pieces of TeX-code producing almost the same (except numbering) results. Both outputs are desired. However, they contain an ugly thorn `\hspace*{-7mm}`. I need this command as I am trying to get proper alignment for `\Big[` and `+\sum` from the one hand and for `a_i` and `+b_i` from another. How can I achieve that output without using that `\hspace*{-7mm}`? ![enter image description here](http://i.stack.imgur.com/TMrg6.png)               \documentclass{article}     \usepackage{amsmath}     \begin{document}          \begin{alignat}{3}        G&&{}=&\Big[ && \hspace*{-7mm} a_i \nonumber\\        &&&&&\hspace*{-7mm} + b_i \Big]\nonumber\\        &&&+\sum_{i}&&c_i     \end{alignat}          \begin{equation}        \begin{alignedat}{3}           G&&{}=&\Big[ &&\hspace*{-7mm} a_i\\           &&&&&\hspace*{-7mm}+ b_i \Big]\\           &&&+\sum_{i}&&c_i     \end{alignedat}     \end{equation}          \end{document}


title: Captions for tables in Beamer

text: I am attempting to add a caption to a table in a Beamer presentation. The caption I would like to add is "this is my caption" but when I compile the caption reads "Table : this is my caption". What instruction can I use that will remove "Table : " from my caption? A simple example is provided below. Thanks...               \documentclass[10pt,t]{beamer}     \usetheme{default}     \begin{document}     \begin{frame}     \begin{table}[h]     \centering     \begin{tabular}{l c c c c }     \hline     Column A  & Column B & Column C \\ \hline     Blah      & 100      & 110      \\     Blah blah & 200      & 220      \\ \hline     \end{tabular}     \caption{this is my caption}     \end{table}     \end{frame}     \end{document}


title: Setting subcaption width for specific subcaptions

text: In the `subfig` packge, the command `\captionsetup[subfigure]{width=<length>}` can set the width of all subcaptions within a figure. How can the width of just a single subcaption in a figure be set?


title: Bug with framed, listings and xcolor are together

text: When using a combination of the packages `framed`, `listings`, and `xcolor`, that causes a strange bug, that I cannot manage to fix. The problem is that, when a box (made with the `framed` package, and `fcolorbox`) contains a listing just before a page breaks, the rest of the block appears blank on the next page. Moreover, the block on the firxt page is not framed anymore. ![enter image description here](http://i.stack.imgur.com/aui2b.png) This does not happens if I use fbox instead of fcolorbox. The minimal example is the following:                   \documentclass[a4paper,12pt]{scrartcl}          \usepackage[english]{babel}     \usepackage{blindtext}          \usepackage{framed}     \usepackage{listings}     \usepackage{xcolor}          \lstnewenvironment{python}{\lstset{language=python}}{}          \renewcommand*{\FrameCommand}{%     \setlength{\fboxrule}{\FrameRule}\setlength{\fboxsep}{\FrameSep}%     \fcolorbox{black}{white}}          \begin{document}     \blindtext     \blindtext     \blindtext          \begin{framed}{Block}     \blindtext          Foo          \blindtext          \begin{python}     def f(x):         foo     \end{python}     THIS NEVER APPEARS     \blindtext     \end{framed}     End of block     \end{document}      What I am looking for is any kind of workaround, not necessarily a full solution.


title: ntheorem + autoref + aliascnt cause TeX to exceed grouplimit capacity

text: I'm using MikTeX 2.9. When processing the following:               \documentclass{article}     \usepackage{hyperref}     \usepackage[hyperref]{ntheorem}     \usepackage{aliascnt}          \newtheorem{lemma}{Lemma}     \newaliascnt{definition}{lemma}     \newtheorem{definition}[definition]{Definition}     \aliascntresetthe{definition}          \begin{document}          \begin{definition}     \label{def:first}     This is my definition.     \end{definition}          \begin{definition}[Alternative to \autoref{def:first}]     This is my second definition.     \end{definition}          \end{document}      I get:               ! TeX capacity exceeded, sorry [grouping levels=255].     \HyRef@autoref #1#2->\begingroup                                       \Hy@safe@activestrue \expandafter \HyRef@au...     l.31 ...ition}[Alternative to \autoref{def:first}]      If I remove the autoref, all is well. This doesn't happen to me with `amsthm` instead of `ntheorem`. Am I doing something wrong? Is it an `ntheorem` bug? an `aliascnt` bug?


title: Upgrading hyperref to avoid error (\pdfendlink ended up in different nesting level than \pdfstartlink)

text: I'm running into the `\pdfendlink ended up in different nesting level than \pdfstartlink` error in my system (elementary OS 0.2, based on Ubuntu 12.04) The question mysterious error: \pdfendlink ended up in different nesting level than \pdfstartlink describes the exact same issue and the same MWE given there also fails in my case:               \documentclass[%draft                   ]{article}     \usepackage{hyperref}     \setlength{\textwidth}{3cm}     \setlength{\textheight}{3cm}          \begin{document}     Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam     nonumy eirmod tempor invidunt ut labore et dolore magna     \href{http://www.tug.org/errors}{aliquyam erat, sed diam voluptua.}     \end{document}      The answer given by the OP himself involves upgrading the `hyperref` package. I'm using `pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian)`, I've followed the instructions given here to upgrade Tex Live but the issue remains. The version of the `hyperref` package installed is: 6.82q. The question is then, how can I upgrade this package to the latest version in case it is not installed already? Add: I'm using a fixed template and I can't add new definitions to my document.


title: Section added by \addcontentsline on the wrong page

text: I am adding a section with the bibliography references by using `\addcontentsline` in order to add a link to the table of contents. Unfortunately the link in the table of contents links to a wrong page, previous to the page with the bibliography. How can I immediately place an anchor for a new section in table of contents?               \printbibliography[heading=offline,filter=offline]     \addcontentsline{toc}{section}{\bibname}     \printbibliography[heading=online,filter=online]


title: biblatex - change formatting of references section title

text: Trying to Change Bibliography/References Header explains how to change the name of the section - but I want to change how it's printed. Any ideas? The customization I have in mind is quite simple - but this didn't work:               \DefineBibliographyStrings{english}{%         references = {\hspace{-.82in}References},     }


title: Making bibliography appear in ToC (BibLaTeX, Article class)

text: I'm having trouble getting my bibliography visible in my Table of Contents. I've googled and read especially the earlier thread, but still can't get this to work. See below part of my preamble:               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage{biblatex}     \usepackage{tocbibind}     \bibliography{references.bib}      However, I still can't get the References to ToC. Would anyone have any further tips?


title: Overlay subfigure caption with TikZ

text: I'm trying to place my figure captions on top of the figures. I've found some code that does this and I can get it to work for a normal figure - e.g. I can overlay "Figure 1" on top of the figure. However it doesn't work for overlaying the caption of subfigures e.g. "(a)" etc. See end of my post for a drawn example of what I'd like to do. In the example below I've pasted the code I'm trying use. The subfigures appear in the document but are missing the caption. The normal figure works correctly and the caption is displayed in the center of the figure in white. I don't really understand how this code works so I'm having trouble fixing it for the subfigure case, but I'm guessing it has something to do with the `\gdef\capoverlay{#1#2#3\par}` line? Does anyone know how to get this working please? Thanks for any help!               \documentclass{article}     \usepackage{graphicx,caption,subcaption,tikz}          \usetikzlibrary{calc}     \DeclareCaptionFormat{overlay}{\gdef\capoverlay{#1#2#3\par}}     \DeclareCaptionStyle{overlay}{format=overlay}          \newcommand{\captionOverlay}[1]{%     \captionsetup{format=overlay}     \caption{}     \begin{tikzpicture}     \node[anchor=south west,inner sep=0](image)at(0,0){#1};     \begin{scope}[x={(image.south east)},y={(image.north west)}]     \draw let \p1 = (1,0) in node[color=white] at (0.5,0.5) {\capoverlay};     \end{scope}     \end{tikzpicture}%     }          \begin{document}          \begin{figure}[htpb]     \centering          \begin{subfigure}[b]{0.3\textwidth}     \centering     \captionOverlay{\includegraphics[width=\textwidth]{image03}}     \label{subA}     \end{subfigure}     %     %     \begin{subfigure}[b]{0.3\textwidth}     \centering     \captionOverlay{\includegraphics[width=\textwidth]{image}}     \label{subB}     \end{subfigure}          \caption{}     \label{mainFig}     \end{figure}               \begin{figure}[htpb]     \centering     \captionOverlay{\includegraphics[width=\textwidth]{image}}     \label{normalFig}     \end{figure}          \end{document}      ![Desired result \(if image is a black rectangle\)](http://i.stack.imgur.com/2Hc8e.png)


title: Is there a way to find out how long it took for my document to compile?

text: I was thinking it'd be nice to know how much time each package I load adds on to the total time between clicking "compile" and seeing the PDF come up on my screen, so that I can figure out which ones I shouldn't load unless necessary. If there were a way of measuring the precise amount of time it takes to compile (i.e., have the computer measure it, not try to approximate it by hand with a stopwatch), I can just remove one package at a time and measure the differences. But I can't find a way of doing this; I hunted around in the "log" file and didn't see this info, and I couldn't find any packages that add this functionality. Ultimately, I admit it's not that big of a deal - compiling usually only takes a second, maybe two - but now I'm curious how to do this, and it could be relevant in much larger documents (with longer compile times).


title: How to set scrlttr2 refvpos automatically based on address length

text: I am creating an letter options (lco) file that I will use for multiple letters. The `scrlttr2` class is designed for a fixed placement of the address field, and places the date at a fixed position from the top of the page (`refvpos`). I would like to change this so that `refvpos` is automatically adjusted based on the height of the address. This example results in the date and opening of the letter colliding with the address:               \documentclass[paper=letter]{scrlttr2}     \usepackage[american]{babel}     \areaset{6.5in}{9in}          \KOMAoptions{parskip=full,refline=dateleft,fromalign=right}          \makeatletter     \@setplength{toaddrvpos}{0.5in}     \@setplength{refvpos}{1.5in}     \makeatother          \date{16 February 2012}          \begin{document}     \begin{letter}{Dr.~Leo Lion\\Fordstan University\\Room 50\\1600 Pennsylvania Ave\\Somewhere\\United States of America}     \opening{Dear Sir,}     This is a test.     \closing{Sincerely yours}     \end{letter}     \end{document}      Can I fix this so that the date will always be one `\baselineskip` after the address, regardless of whether the address is two lines or ten?


title: Difference between \tableofcontents and \tableofcontents{}

text: What if any difference is there between `\tableofcontents` and `\tableofcontents{}`? I noticed that inserting a TOC in LyX uses the `{}` while the `classicthesis` template for LyX does not. Any reason?


title: How to typeset function restrictions

text: I wonder how to typeset the restriction of a function to some subdomain, a la `$f|_A$` or `$f\restriction_A$` , but with the vertical bar being as big as possible.


title: Document class downloads for LyX

text: I'm looking for document class downloads for LyX, i.e. .cls and .layout files for multiple purposes, mostly life sciences article writing. Anyone familiar with a source for a collection of those?


title: Finding LaTex output files

text: I'm using TeXstudio 2.6.2 with MiKTeX-pdfTeX 2.9.4535 on Windows7. I configured TeXstudio to store all output files in a separate directory. It now looks like this:               -src         |_Report.tex         |_*.tex (all chapters)         |_Report.bib     -build         |_Report.pdf         |_Report.log         |_Report.bbl         |_*.aux      which is my desired structure. My problems are   1. There are many messages like "citation 'X' on page Y undefined. There's the error message "no file Report.bbl"   2. the inbuilt pdf-viewer doesn't open (find?) Report.pdf My configuration looks looks this: ![enter image description here](http://i.stack.imgur.com/Z6jJs.png) How do I have to configure TeXstudio properly in order to solve these issues?


title: A scheme in LaTeX

text: I have 5 statements and some of them are equivalent, for some of them implications hold only in one direction. I would like to draw the scheme of these relations in LaTeX. Fortunately, two pairs of these statements are equivalent, so the scheme will not be overloaded with arrows. In fact, there will be a triangle with 3 nodes (1),(2),(3) with some arrows between them, and (4) will have just a connection with (2), (5) will have the only connection with (3). How to draw it in LaTeX? Here is an example from Visio: however I need arrows to be without corners and like `$\Rightarrow$` or `$\Leftrightarrow$`. ![The scheme](http://i.stack.imgur.com/YPuPk.jpg)


title: A command/environment for "spot the error" type of multiple choice tests

text: I wonder if there is already a package that makes me create a _spot the error_ kind of test like the one below: ![enter image description here](http://i.stack.imgur.com/zRVUJ.png) This must preferably be in an enumerate environment. I tried a `tikz` approach but I could not make it work out.               \documentclass[10pt]{article}          \usepackage{tkz-base}     \usetkzobj{all}               \begin{document}          \begin{enumerate}     \item The principal \tikz [remember picture] \node (said) {}; that \tikz [remember picture] \node (weather) {}; the government \tikz [remember picture] \node (announces) {}; a holiday or not, his school \tikz [remember picture] \node (hold) {}; classes. \tikz [remember picture] \node (error) {};     \end{enumerate}               \begin{tikzpicture}[remember picture]     \def\abovebelow#1#2#3{     \node at (#1) {\underline{#2}};     \node [below=1pt of #1] {#3};     }          \abovebelow{said}{said}{A}     \abovebelow{weather}{weather}{B}     \abovebelow{announces}{announces}{C}     \abovebelow{hold}{will still hold}{D}     \abovebelow{error}{NO ERRROR}{E}     \end{tikzpicture}          \end{document}      Below is the output. ![enter image description here](http://i.stack.imgur.com/0HuIR.png) I am looking for a general solution, something that can be used in list environments.


title: Is there any feature for plotting level curves in pst-solides3d

text: Does `pst-solides3d` **still** have a mechanism for plotting level curves? I say "still" because of the following lines in the manual * * * ## Changes compared to version 3.0   * Suppression of the argument `tracelignedeniveau` * * * which (I guess) roughly translates to   * _trazar lineas de nivel_ => _trace level curves_ So, is this a dead feature? is it comming back? where is it **if** it is still there? how does/did it fare in comparison with _implicit plot_ from `pst- func`?