title: difficulty using \newcommand with previously specified new commands

text: > **Possible Duplicate:**   >  Definining commands/abbreviations that contain numbers I'm having some difficulty with setting a command using `\newcommand`. The command I'm trying to create is as follows:               \newcommand{             checklist1Start         }         {             \begin{description}[style=multiline,                 itemsep=\itemSeparationDistance,                 leftmargin=\leftMarginDistance,                 itemindent=\itemIndentDistance,                 labelindent=\labelIndentDistance,                 font=\normalfont]         }      The distances shown are defined using other other uses of `\newcommand`, in the following manner:               \newcommand{\leftMarginDistance}{9 cm}      The error returned on attempting to compile is as follows:               ! Missing number, treated as zero      Could you point me in the right direction on using `\newcommand` properly here? Many preemptive thanks for any assistance


title: Why this macros doesn't work?

text: ALL i create this macro in my TeX file:               \newcommand{\f2t}[2]{\label{#1}\footnote{\hyperref[#1]{#2}}}      This macro is in order to return to text from the footnote when the reader click the footnote. But when i compile with LaTeX, it give me these error imformation:               ! Missing number, treated as zero.     <to be read again>     t     l.178 ...]{\label{#1}\footnote{\hyperref[#1]{#2}}}     A number should have been here; I inserted `0'.     (If you can't figure out why I needed to see a number,     look up `weird error' in the index to The TeXbook.)     ! You already have nine parameters.     \reserved@a ...def \expandafter \f \reserved@b #10     t{     l.178 ...]{\label{#1}\footnote{\hyperref[#1]{#2}}}     I'm going to ignore the # sign you just used.     ! Illegal parameter number in definition of \label@name.     <to be read again>     1     l.178 ...]{\label{#1}\footnote{\hyperref[#1]{#2}}}     You meant to type ## instead of #, right?     Or maybe a } was forgotten somewhere earlier, and things     are all screwed up? I'm going to assume that you meant ##.     ! Illegal parameter number in definition of \reserved@a.     <to be read again>     1     l.178 ...]{\label{#1}\footnote{\hyperref[#1]{#2}}}     You meant to type ## instead of #, right?     Or maybe a } was forgotten somewhere earlier, and things     are all screwed up? I'm going to assume that you meant ##.      What can i do to make this macro correct? Or, how can i write a macro to realize the function that i need?


title: Defining command \old|

text: I want to let the command `\old|` refer to the command `\|` (which produces the output `||`.) So I do:               \let\old|\|      LaTeX complains "Missing $ inserted." How can I fix it?


title: Command/macro name cannot include numbers and symbols

text: I would like put picture into table, and my idea is define new command as below>   * `\newcommand{\EJ471}{\includegraphics[scale=0.150]{EJ_471.jpg}}` But compiler reports an error. If I use the command name for example `\EJa`, everything is all right. I've read similar questions as   * Definining commands/abbreviations that contain numbers But still I don't understand why it does not work.


title: LaTeX commands starting with a numeral

text: > **Possible Duplicate:**   >  Definining commands/abbreviations that contain numbers   >  newcommand name cannot include numbers for example \Mycomand123 It seems like command names starting with a numeral are not valid when using \newcommand but are valid when using \def. Are there any reasons not to define commands starting with a numeral? For example:               \newcommand{\123MHz}{\SI{123}{MHz}\xspace}  % Causes errors     \def\123MHz{\SI{123}{MHz}}   % seems to work fine


title: about newcommand

text: I have trying to use new command to represent math, and this is what I type in:               \\     \newcommand\fpi2[2][\pi][2]{frac{#1}{#2}}\\     \newcommand\mylim[2][x]{lim_{#1\to #2}}      I'm trying to create a new command which represent `$frac{\pi}{2}$` Is it possible for me to use `\mylim{${\fpi2}^-$}`?


title: Number in name of commands?

text: > **Possible Duplicate:**   >  Definining commands/abbreviations that contain numbers I wanted to know if it was possible to define a new command with a name that contains numbers? e.g. `\newcommand{\agent1}{agent~1}` Or even `\ag1ent` if having a number at the end is problematic. I couldn't find the answer in the FAQ.


title: Can new command end with a number?

text: > **Possible Duplicate:**   >  \newcommand name cannot include numbers, e.g., \Mycomand123 I am trying to define commands `\s1`, `\s2`, etc. Right now the the substitution is very simple but the idea would be to replace it for something that would make for sense later. This is what I have now               \newcommand{\s1}{s1}      and I get the following error:               ! LaTeX Error: Missing \begin{document}.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...          l.52 \newcommand{\s1}{s1}      If I comment the line with the newcommand definition it works fine. (And I other other newcommands defined in the same location, and I do have a `\begin{document}`) Any idea of what I am doing wrong?


title: Numbering macros

text: > **Possible Duplicate:**   >  \newcommand name cannot include numbers, e.g., \Mycomand123 I'm trying something that I thought would be simple               \def\test{Hello}     \def\test2{Hello again}     \test     \test2      Since I cannot control the naming I need to do some hacks.               \catcode30 = 11     \catcode31 = 11     \catcode32 = 11      which works for 0 and 1 but not for 2 I have also tried the `\catcode´1` etc with the same result. I get a missing number treated as zero. If anybody has any ideas on why or another solution to include numbers in the naming of defines it would be much appreciated


title: How do I create a newcommand which outputs a letter with an index?

text: When I use               \newcommand{\F1}{$\mathrm{F}_1$}      I get the `Missing \begin{document}.` error and `missing $ inserted` if I move it inside the document. How do I define a macro so that `\F1` would expand to `$\mathrm{F}_1$`? I can do               \DeclareMathOperator{\F1}{F_1}      but then I have to use it as `$\F1$` instead of just `\F1`.


title: Why does Beamer's table of contents items link to the second slide in a section?

text: When I include a table of contents in a Beamer slide show, each section entry in the TOC ends up linking to the second slide in that section. I would have expected it to link to the first slide. What am I doing wrong?:               \documentclass{beamer}          \begin{document}     \begin{frame}{Test TOC}       \tableofcontents     \end{frame}          \section{Section 1}          \begin{frame}       \frametitle{Test 1}     \end{frame}          \begin{frame}       \frametitle{Test 2}     \end{frame}          \end{document}      Just to clarify: when I click _Section 1_ in the TOC, it takes me to the slide _Test 2_. UPDATE: I am actually not sure if it takes me to slide _Test 2_. When I click the link, the viewer (Evince and Okular) displays most of _Test 2_ , but with a tiny strip of the slide _Test 1_ visible at the top of the window. I suspect that the viewer may treat the link as pointing to the very bottom of slide _Test 1_ and then aligns that with the top of the window. Could this be the explanation?


title: beamer's tableofcontents links to the wrong slide

text: I compiled the following code 3 times to get the table of contents. The problem is that section names links to wrong slides. A links to B1 and B links to B2. So, it's wrong by one slide. How can I fix it?               \documentclass{beamer}          \begin{document}          \frame{\tableofcontents}          \section{A}     \frame{A}          \section{B}     \frame{B1}     \frame{B2}          \end{document}


title: Beamer goes to next slide instead of the target slide

text: I am a new user of Beamer presentation template and noticed that when I click on an entry from the ToC it goes to the next slide instead of the target one. However, when I open the pdf file in a pdf viewer such as Foxit and click on the bookmark it goes to the right slide. Why is this discrepeancy cause and is there a solution for it?


title: Extra author appearing in biblatex-apa (as if two publications with the same first author appeared in the same year)

text: I'm using biblatex v2.5 and the biblatex-apa style v5.7. I have a couple citations with the same first author, including one with six co-authors in 2008. This is the _only publication_ with that first author that was published in 2008, so it should just show up as **Ranney, et al. (2008)** \- at least as I understand APA guidelines (section 6.12 / p. 175 in my 6th ed. copy). biblatex is instead printing it as **Ranney, Rinne, et al. (2008)** , which I assume is to avoid ambiguous author lists. But again, I _think_ this should only happen when you have the same first author on two pubs in a given year. This happens with `\nptextcite` and `\textcite`. The extra weird thing is that _other_ citations with this first author work out fine. For example, I have two pubs (with the same author list) correctly typesetting as **Ranney, et al. (2012a)** (and 2012b). But there are other cites with the same problem as well (e.g., **Ranney, Cheng, et al., 2001** , or **Munnich, Ranney, Nelson, et al. (2003)** ). So, I'm happy to do some hunting and hacking, but I'm not really sure where to start. In other words, please provide a partial answer even if you don't figure this one out! (I also actually _like_ the way biblatex is doing it, as I realize it helps me find references more easily. But it's not APA 6e per my reading.)


title: List of abbreviations/units customisation

text: I'm still working at my thesis template and ran into the next problem:               \documentclass[pdftex, 12pt, oneside]{book}     \usepackage[ngerman]{babel}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[scaled]{helvet}     \renewcommand{\familydefault}{\sfdefault}     \usepackage{tocbibind}     \usepackage{titlesec}     \titleformat{\chapter}{\huge\bfseries}{\thechapter}{20pt}{\huge}     \usepackage[printonlyused]{acronym}     \usepackage[paper = a4paper, margin = 1in, includehead]{geometry}     \usepackage{fancyhdr}     \fancypagestyle{plain}     {         \fancyhf{}         \fancyhead[L]{\rightmark}         \fancyfoot[R]{\thepage}         \renewcommand{\headrulewidth}{0.5pt}         \renewcommand{\footrulewidth}{0pt}     }     \begin{document}         \frontmatter             \tableofcontents             \listoffigures             \listoftables             \pagestyle{plain}                 \chapter*{Abkürzungsverzeichnis}                 \addcontentsline{toc}{chapter}{Abkürzungsverzeichnis}                 \begin{acronym}[SQL]                     \acro{SQL}{Structured Query Language}                     \acro{Bash}{Bourne-again shell}                 \end{acronym}         \mainmatter             \chapter{Einleitung}                 Texttexttexttext \ac{SQL}                      Blablablablablabla \ac{Bash} and \ac{SQL}     \end{document}      As you can see first of the TOC, LOF, LOT and then I wanted to insert my list of abbreviations(/units maybe later on to) which worked really fine, but I wanted my explanations for the abbreviations aligned at the same line. Is there a way to `\hfill` it or put the same space between abbreviation and explanation. And second question (I know only one is allowed, but it is the same MWE) is, if you take a look in the header, the `\rightmark` for my list of abbreviations still is the same as from the LOT. I'm sure I'm missing something again. :(


title: Compiling a main document with many TikZ subfiles efficiently

text: What would be the most efficient way to compile a document of the `article` class with many `TikZ` subfiles? In the main document, I have added `\usepackage{standalone}` and then `\includestandalone` for the individual subfiles.   1. Would it be better to add the options `subpreambles = true`, `sort = true`, and trim all the `TikZ` preambles from the main document?   2. Or should I not use those options and keep all the `TikZ` preambles in both the main `.tex` file and the subfiles? Which method would speed up compiling? If neither of these methods are truly efficient, what should I do instead? As it stands now, my document is around `60` pages but it takes a few minutes to compile. I have over 30 `.eps` figures and over 30 `TikZ` subfiles. Besides the `TikZ` code, everything else is pretty standard `LaTeX`. The document class for the subfiles is `standalone` with the option `convert = false`. One of the other problems that slows down compilation is the fact that every `standalone` picture is compiled when the main document is compiled. However, there may have been nothing change with 95% of the pictures. Main example doc:               \documentclass{article}     \usepackage{standalone}     \usepackage{tikz}     \usepackage{float}     \begin{document}     text here     \begin{figure}[H]       \centering       \includestandalone{test}     \end{figure}     text here     \end{document}      test example doc               \documentclass[convert = false, tikz]{standalone}     \begin{document}     \begin{tikzpicture}       \draw (0, 0) circle[radius = .35cm];     \end{tikzpicture}     \end{document}


title: TikZ/pgf: When using the `graphdrawing` library, how can I draw a circle around a TikZ scope, if I am using "plain" syntax?

text: **What the TikZ/pgf manual says:** In section 27.10, on page 391, the manual begins by giving an example in "plain" syntax example of how scopes might be set up, and what use they might be:               \tikz [spring layout]      {         \begin{scope}[tree layout]             \node (a) {a};             \node (b) {b};             \node (c) {c};             \draw (a) edge (b) edge (c);         \end{scope}              \begin{scope}[tree layout]             \node (1) {1};             \node (2) {2};             \draw (1) edge (2);         \end{scope}          \draw (a) edge (1);     }      One can use different algorithms to draw different "sublayouts" of the entire graph. Great. I then tried to use the syntax provided on pg. 391 itself to specify some sublayout options in order to draw a circle around the sublayout. However, nothing happens. Everything compiles the same as usual, and everything looks the same as usual. **The MWE:**               \documentclass{standalone}          %======================================     \usepackage{tikz}     \usetikzlibrary{graphdrawing}     \usetikzlibrary{arrows}     \usetikzlibrary{graphs}     \usetikzlibrary{decorations.pathmorphing}     \usegdlibrary{force, layered, trees}     %======================================          \begin{document}          \tikz [rounded corners, spring layout, node distance=20mm]         {             \begin{scope}                 \node (a) {a};             \end{scope}                  //  [draw, circle]             {                 \begin{scope}[tree layout, node distance=5mm]                     \node (b) {b};                     \node (c) {c};                     \node (d) {d};                          \draw                         (b) edge[->] (c)                         (b) edge[->] (d)                         (c) edge[->] (d);                 \end{scope}             }                  \draw             (a) edge[->] (b);         }          \end{document}      So, what is the correct way to go about drawing a circle around the "node" that consists of the sublayout?


title: How to prevent linebreaks after hyphen if word starts with hyphen?

text: _(Remark: Maybe this is a typically German problem, I'm not sure in which other languages that might be relevant)_ Sometimes there are words which start with a hyphen, as they are connected with a word used before, e. g. _Werkstoffforschung und -entwicklung_ is a shorter (and I think more elegant) way to say _Werkstoffforschung und Werkstoffentwicklung_. However, if the second word, which starts with the hyphen, is at the beginning of a new line, it can happen that the hyphen stays in the previous line and the word itself is the first one in the next line. Minimal example:               \documentclass[11pt]{scrreprt}     \usepackage[ngerman]{babel}       \begin{document}     Das ist ein Mustertext, der dazu da ist, um diese aa Textsatzproblematik         bzw. -schwierigkeit zu demonstrieren      \end{document}      ![output](http://i.stack.imgur.com/PStli.png) (I hope that the example "works" for you to demonstrate the problem, when I typeset it with pdflatex, the "-" is at the end of the first line and the "schwierigkeit" is in the second one which is not wanted.) Is there a smart* way to avoid that problem?   * pdflatex shall handle this automatically and "know" that a hyphen at the beginning of a word always has to stay connected to the word and shall not be separated from it.


title: How to create a line with "radial" shading?

text: How would you draw a black line with TikZ that shades to white/transparent radially (like this) between two coordinates? Shading is possible for rectangles (TikZ documentation, Ch. 46), though I can not define the start and end coordinate as easily as with a line. ![line shading radially](http://i.stack.imgur.com/G1LYS.png) **Update:** Another approach was to create such an shaded rectangle was posted here.


title: Center hrule in the middle of the page

text: I would like to center a horizontal line on my page and I would like the width of this line to be half `\textwidth`. Here is what I tried but it doesn't work :               \documentclass[10pt,a4paper]{article}     \begin{document}          Hello everyone !           \begin{center}     \hrule width 0.5\textwidth     \end{center}          \end{document}      Thank you for your help !


title: Align captions of subfigures:

text: Hi I want to include the following two tikz figures in my document:               \documentclass{article}          \usepackage{tikz}     \usepackage{subcaption}               \begin{document}     \begin{figure}     \begin{subfigure}[l]{.46\textwidth}     \centering     \resizebox{.8\textwidth}{!}{%     \begin{tikzpicture}     [bend angle =60,inner sep=0pt, minimum size =10mm,very thick,     from/.style={<-},     towards/.style={->},     protein/.style={circle,draw=black,very thick},     reaction/.style={}]     \node[protein] (p) at (-2,0) {$P$};     \node[protein] (ps) at (2,0) {$P^*$}     edge [towards, bend left] node[below=10pt,name=e2,minimum size =0mm] {$E_2$} (p)     edge [from,bend right] node[above=10pt,name=e1,minimum size = 0mm] {$E_1$} (p) ;     \draw[->] (e1) -- +(0pt,-12pt);     \draw[->] (e2) -- +(0pt,12pt);     \end{tikzpicture}%     }     \caption{Goldbeter-Koshland Loop.}     \end{subfigure}     \begin{subfigure}[r]{.46\textwidth}     \resizebox{.8\textwidth}{!}{%     \begin{tikzpicture}     [bend angle =60,inner sep=0pt, minimum size =10mm,very thick,     from/.style={<-},     towards/.style={->},     protein/.style={circle,draw=black,very thick},     reaction/.style={}]     \node[protein] (p) at (-1.5,0) {$P$};     \node[protein] (ps) at (1.5,0) {$P^*$}     edge [towards, bend left] node[below=10pt,name=e2, minimum size =0mm] {$E_2$} (p)     edge [from,bend right] node[above=10pt,name=e1,minimum size =0mm] {$E_1$} (p) ;     \draw[->] (e1) -- +(0pt,-12pt);     \draw[->] (e2) -- +(0pt,12pt);     \node[protein] (q) at (0 , -3) {$Q$};     \node[protein] (qs) at (3 , -3) {$Q^*$}     edge [towards, bend left] node[below=10pt,name=e3, minimum size =0mm] {$E_3$} (q)     edge [from,bend right] node[above=10pt,name=e4,minimum size =0mm] {} (q) ;     \draw[->] (ps) -- +(0pt,-50pt);     \draw[->] (e3) -- +(0pt,12pt);     \end{tikzpicture}%     }     \caption{Goldbeter-Koshland Cascade.}     \end{subfigure}     \end{figure}          \end{document}      Everything is as I want it except that the caption in the two subfigures are not aligned. Thanks for the help.


title: bibliography style for Journal of Financial and Quantitative Analysis

text: Does anyone know which bibliography style meet the following formatting requirements? The followings are the format required by Journal of Financial and Quantitative Analysis, I have spend a long searching online but none seems to fit. Could someone help please? > Brown, S., and J. Warner. "Using Daily Stock Returns: The Case of Event > Studies." Journal of Financial Economics, 14 (1985), 1–31. > > Ross, S. A. "Return, Risk and Arbitrage." In Risk and Return in Finance, > Vol. I, I. Friend and J. L. Bicksler, eds. Cambridge, MA: Ballinger (1977). > > Titman, S.; K. C. Wei; and F. Xie. "Capital Investments and Stock Returns." > Journal of Financial and Quantitative Analysis, 39 (2004), 677–700.


title: How to generate PDF/A and PDF/X?

text: I have heard about PDF subsets PDF/A (for archival) and PDF/X (for printing). How to generate LaTeX documents like that? I'm also interested in answers with plain TeX and ConTeXt, and hopefully with both pdfTeX and XeTeX engines.


title: Can PDFLaTeX produce PDF/A?

text: > **Possible Duplicate:**   >  How to generate PDF/A and PDF/X? I wonder if `pdflatex` can produce a standard PDF/A-1 or PDF/A-2 for archival purposes. That would be quite useful. * * * Of course by that I mean fully standard compliant PDF/A; embedded fonts, metadata... the whole deal.


title: How to make a PDF/A document

text: > **Possible Duplicate:**   >  How to generate PDF/A and PDF/X? Are there any options that I could give to pdflatex and xelatex to make sure that all outputted documents adhere to the PDF/A standard? If there is no commandline options, how should I go about of making documents PDF/A compilant?


title: PDF/A-1a and PDF/A-1b in LaTeX documents

text: > **Possible Duplicate:**   >  How to generate PDF/A and PDF/X? It looks like it is not easy to obtain a PDF/A-1a compliant PDF file with LaTeX/PDFLaTeX. One complain could be missing TreeRoot and MarkInfo. Anyway, the PDF/A-1b format is less restrictive and easier to get. In general, do you have specific LaTeX strategies to make sure that your final files will be compliant with long term archiving rules?


title: best practice towards ISO 19005-1

text: please recommend your experience concerning the creation of a PDF/A (ISO 19005-1) when using pdflatex. my thesis will be submitted to a plagiarism check. they demand PDF/A, but without any clear instructions which LaTeX commands should be used (documentclass options?) and what should be avoided.


title: Symbol index sorted by occurrence

text: I would like to make an symbol index which is sorted by occurence of symbol. For example: Something like               ... $\omega$\index{$\omega$} ... $A^P_k$\index{$A^P_k$} ... $\{\}$\index{$\{\}$}      should produce an index which first mentions `$\omega$` then `$A^P_k$` and then `$\{\}$`. I did not find any option for `makeidx`, so I tried to use a workaround and define a command which does that for me:               \newcounter{occurrence}     \newcommand{\is}[1]{\index{\arabic{occurrence}@{#1}}\addtocounter{occurrence}{1}}      In fact this works to some extend but some symbols get rejected (I do not know which one) and some will not be printed appropriate for example `\is{$\langle \rangle$}` results in the entry "hAB".


title: Is it possible to make odd-numbered columns have implicitly a prefix {}?

text: Prefix `{}` is implicitly inserted for even-numbered columns of `alignedat` (and `alignat`). As a result, `+` (or `-`, etc) becomes a binary operator. The section "Left aligned" below               \begin{alignedat}[t]{3}       {}+abc   &&{}+abcd &&{}+abcde\\       {}+abcde &&{}+abcdef     \end{alignedat}      shows how the implicit prefix `{}` is used to align the operators. The section "Right aligned" below               \begin{alignedat}[t]{3}       &+abc   &&+abcd   &&+abcde\\       &+abcde &&+abcdef     \end{alignedat}      shows the same equations but the variables (instead of the operators) are aligned. My question: Is it possible to let `alignedat` (as well as `alignat`) provide implicit prefix `{}` for the odd-numbered columns to free me from inserting `{}` by hand which is error prone?               \documentclass[preview,border=12pt,varwidth]{standalone}     \usepackage{mathtools}               \begin{document}          \section*{Right aligned}     $     \text{LHS} = \!     \begin{alignedat}[t]{3}     &+abc &&+abcd &&+abcde\\     &+abcde &&+abcdef     \end{alignedat}\\     $          \section*{Left aligned}     $     \text{LHS} = \!     \begin{alignedat}[t]{3}     {}+abc   &&{}+abcd &&{}+abcde\\     {}+abcde &&{}+abcdef     \end{alignedat}\\     $          \end{document}      ![enter image description here](http://i.stack.imgur.com/xkwMO.png)


title: Question mark over equals sign

text: I'd like to have output an equals sign that has a small question mark over the top of it. (I'm proving an equation, but it is not obvious until the final step that the equation is true.) Do I need to create a special symbol myself (via a macro, etc.), or is there already one defined?


title: Biblatex-Chicago in TexShop: Error: Cannot find .bib

text: I'm a doctoral candidate in the humanities who can claim only the osmotic tech savy that comes from living with people who know what they're doing. I'm just beginning my dissertation and hoping to set up BibDesk as a reference management system that integrates with TexShop. So far, I've not been successful in typesetting references or in producing a bibliography. My field requires formatting according to the Chicago Manual of Style, for which I am trying to use Biblatex-Chicago. I have a file which begins:               \documentclass[letterpaper,12pt]{article}     %\documentclass[letterpaper,11pt]{article}          \usepackage{fullpage}     \usepackage{fancyhdr}     \usepackage{nameref}     \usepackage{marginnote}     \usepackage[top=1in, bottom=1in, inner=0.25in, outer=2.75in, marginparwidth=2.50in]{geometry}     \usepackage{setspace}          \usepackage[         notes,         backend=biber,         hyperref=true     ]{biblatex-chicago}          \addbibresource{DissCh2-Bibliography}          \title{Half-Draft}     \author{Dissertation Chapter 2}     \date{6 November, 2013}                % Activate to display a given date or no date               \begin{document}      When typeset, I still see only a cite key in the footnote. I see no error when typesetting in LaTeX. When I switch to BibTex (to do the Latex+Bibtex+Latex+Latex typesetting sequence I've seen recommended) I get the following error:               INFO - This is Biber 1.6     INFO - Logfile is '20131021-Hist934-SeminarPaper-SFD-HalfDraft.blg'     INFO - Reading '20131021-Hist934-SeminarPaper-SFD-HalfDraft.bcf'     INFO - Found 1 citekeys in bib section 0     INFO - Processing section 0     INFO - Looking for bibtex format file 'DissCh2-Bibliography' for section 0     ERROR - Cannot find 'DissCh2-Bibliography'!     INFO - ERRORS: 1      I have the .bib file stored in the same folder as the .tex and other files for this document. I also tried adding a bibliography using:               \bibliographystyle{plain}     \bibliography{DissCh2-Bibliography}          \end{document}      This produced errors when trying to typeset in LaTeX:               Package bib latex Warning: Missing 'hyperref' package.     (biblatex)                 Setting hyperref=false          (./20131021-Hist934-SeminarPaper-SFD-HalfDraft.aux)     *geometry* drive: auto-detecting     *geometry* detected driver: pdftex     No file 20131021-Hist934-SeminarPaper-SFD-HalfDraft.bbl.     (/usr/local/texlive/2013/texmf-dist/tex/latex/base/omscmr.fd) [1{/usr/local/texlive/2013/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] [2]          LaTeX Warning: Citation 'Logan:1677fk' on page 3 undefined on input line 114.          [3] [4] [5]           ! Package biblatex Error: '\bibliographystyle' invalid.          See the biblatex package documentation for explanation.      Type H <return> for immediate help     . . .           l.152 \bibliographystyle{plain}          ?      When I type `H <return>` as prompted, it tells me `Your command was ignored`. Can anyone help? _**_**_EDIT_ ** _*_ **** Thank you to everyone for the insight. It does appear that I was confused about the differences between `\bibliography{}` and `addbibresource{}`. Adding .bib when using the latter has fixed the problem, and I discovered that the former will work too when I handle it correctly. Thank you all!


title: Testing Framework API for LaTeX

text: As part of an online exam application, we need to automate the evaluation of LaTeX scripts written by the students. Essentially, the script should be evaluated against a set of test cases and if it passes all of them should return passed (true) or should throw the error message back so that the student can retry the problem. We came across `qstest`, but I wish to know are there any better solutions out there which can be employed in the web app easily and efficiently. The web app has been developed using Django.


title: Displaying page construction guides

text: Is there any way to overlay some lines and dimensions on the document so that one can see where the margins end and more easily examine the overall layout and ratios of elements on the page? See for example, some of the illustrations of frameworks in this article on the canons of page construction and this one on margins (which displays dimensions).


title: Drawing Benzene resonance mechanism, and reaction mechanism + curly arrows

text: I am new to LaTeX and there are few things at which I am stuck. I can draw benzene with alternate double bonds but I don't know how to draw curly arrows to show bond shifting and electrophile attack. ![Benzene Bond Shifting](http://www.ch.ic.ac.uk/local/organic/pericyclic/bond- shift.svg) I would like to show reaction mechanism of benzene like this: ![Nitration of benzene Part 1](http://www.chemguide.co.uk/mechanisms/elsub/nitratem1.GIF) ![Nitration of benzene Part 1](http://www.chemguide.co.uk/mechanisms/elsub/nitratem2.GIF) and ![Detailed reaction mechanism](http://www.chem.ucla.edu/harding/tutorials/resonance/resonance_str12.GIF) EDIT There is one another thing I need an expert opinion. I wanted to show covalent bonding in comparison with excited and grounded state of electron. This is the code that I have written. Is there any better way to show Cl sharing its electron than what I have done (adding lots of space in my opinion is not a best way)? And is possible to draw a curly arrow from the second box to the third to show that an electron is given energy to go to a higher energy level? ![Covalent sharing](http://i1020.photobucket.com/albums/af321/Uzair_Aziz_Suria/pic1_zps2d99d708.jpg)               \documentclass [11pt] {book}     \usepackage[utf8x]{inputenc}     \usepackage{ucs}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{chemfig}     \usepackage{tikz}     \begin{document}     $_4$Be~: 1s$^2$~2s$^2$     \\     \\     Ground State:     \begin{tabular}{|c|}     \hline $\upharpoonleft$$\downharpoonright$ \\      \hline      \end{tabular}      \begin{tabular}{|c|}     \hline $\upharpoonleft$$\downharpoonright$ \\      \hline      \end{tabular}      \begin{tabular}{|c|c|c|}     \hline ~~~&~~~&~~~\\      \hline      \end{tabular}      \\     \\     Excited State:\begin{tabular}{|c|}     \hline $\upharpoonleft$$\downharpoonright$ \\      \hline      \end{tabular}      \begin{tabular}{|c|}     \hline $\upharpoonleft$~ \\      \hline      \end{tabular}      \begin{tabular}{|c|c|c|}     \hline $\upharpoonleft$~~&~~~&~~~\\      \hline      \end{tabular}           ~~~~~~~~~~~~~~~~~~~~~~~~$\uparrow$~~~~~$\uparrow$          ~~~~~~~~~~~~~~~~~~~~~~~Cl~~~~Cl          \end{document}


title: Quotes on a new page using \quotchap?

text: I am trying to use `\quotchap` to put some text before the chapter title using               \begin{savequote}          The Quote           \qauthor{Quote Author}          \end{savequote}      What I wanted was to put all the text on a page before the chapter and begin the chapter on a new page. The quote and the chapter should be on facing pages. This is required as in some cases there is a lot of text which I want to put. But when there is a lot of text, this text gets overlayed with chapter title and chapter text and the result is awful. Giving `\newpage` after the `savequote` environment does not help. It can be done manually, without using any special environment, it works in some cases. But I would really like to know if it can be done with `\quotchap`. * * * I am using `\documentclass{book}` with `twoside` format. Yes that should always be the case, each chapter is preceded by a quote. * * * When I compile the code in Yiannis' answer, I get two chapters, one with and one without number. But I did not see the `\aquote` that you have defined and make reference to in the code. Do I have to add anything to the code above, am I missing something that needs to be done? When I try to put the `\savequote` before the chapter starts, it is showing up the quote text overlayed on chapter title and not on another page.


title: Multiple Choices Questions in 2 or 3 columns

text: The following code gives a way to produce Multiple Choices Questions. This solution comes from here. I would like to have the possibility to display the choices in 2 or 3 columns by giving one optional argument. Is there a way to do that ?               \documentclass[a4,12pt]{article}         \usepackage[utf8x]{inputenc}         \usepackage{amsmath}              \newcounter{choice}         \renewcommand\thechoice{\Alph{choice}}         \newcommand\choicelabel{\thechoice)}              \newenvironment{choice}{%             \list{\choicelabel}{%                 \usecounter{choice}\def\makelabel##1{\hss\llap{##1}}%                 \settowidth{\leftmargin}{W.\hskip\labelsep\hskip 2.5em}%                 \def\choice{%                     \item                 } % choice                 \labelwidth\leftmargin\advance\labelwidth-\labelsep                 \topsep=0pt                 \partopsep=0pt             }%         }{\endlist}           \begin{document}     Which fractions are reduced ?          \begin{choice}         \choice $\dfrac{4}{7}$         \choice $\dfrac{8}{24}$         \choice $\dfrac{44}{121}$         \choice $\dfrac{9}{11}$     \end{choice}          \end{document}


title: Remove automatic table headline

text: I use LaTeX for creating PDF output from R - not to create long documents. Hence the automatic `Table 1: <caption>` above the table is rather annoying. How can I remove the automatically generated `Table 1:`? Is it at all possible?


title: Can I set the format of an entire column except for the header?

text: I would like to italicize all of the names in the second column of a table, but presently the only way I have found to do this is to use `\textit{}` in each cell, i.e.:               \begin{table}     \begin{tabular}{lll}     PFT & Scientific Name & Common Name\\     PFT1 &  & \\      & \textit{Elymus repens} & quackgrass\\      & \textit{Koeleria macrantha} & prairie Junegrass\\      & \textit{Elymus canadensis} & Canada wildrye\\     %....     \end{tabular}     \label{tab:foo}     \caption{test caption}      Is there an easier / more elegant way to do this?


title: How do I center table headings and stretch the table to full column width?

text: I have the following code for creating a table in the multicols enviroment. I'd like to center the column headings and make it so that the table automatically takes up the entire column from edge to edge. Is this possible within tabular?               \documentclass[11pt, a4paper]{article}     \usepackage{multicol}     \usepackage{booktabs}     \usepackage[left=17.5mm,right=17.5mm,top=24.5mm,bottom=33.95mm]{geometry}     \setlength{\columnsep}{20pt}     \begin{document}     \begin{multicols*}{2}     \begin{center}     \begin{tabular}{ l  l  l }     \toprule     Property&Value&Unit\\     \midrule     Item description& 59& mm \\     Item description& 50& mm \\     Item description long& 76&mm\\     Item description&80&mm\\     Item description long& 20& mm \\     Item description long& 70& mm \\     Item description& 40&mm\\     Item description& 873& K \\     Item description long& 300& K \\     Item description&103,405 &Pa\\     \bottomrule     \end{tabular}     \end{center}     Text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text           \end{multicols*}     \end{document}


title: XeTeX + movie15_dvipdfmx : can it import SWF ?

text: I am using the movie15_dvipdfmx package to embed movies to my textbook when it is compiled with XeLaTeX or the movie15 package when it is compiled with PDFLaTeX. Here is my code for the PDFLaTeX compiler:               \usepackage{movie15}     ...     \includemovie[         label=movie-04-09         ,mouse=true         ,text={\includegraphics[width=\textwidth]{2011-04-09}}     ]{}{}{Video/2011-04-09.swf}     ...     \movieref[pause]{movie-04-09}{ Video }      It makes poster from 2011-04-09.pdf and imports flash movie 2011-04-09.swf. Everything works as expected, in particular the last command in the above code produces bottom `Video` which starts or pause playback of the movie. Same code for XeLaTeX looks a bit different:               \usepackage[dvipdfmx]{movie15_dvipdfmx}     ...     \includemovie[         label=movie-04-09         ,mouse=true         ,text={\includegraphics[width=\textwidth]{2011-04-09}}     ]{}{}{Video/2011-04-09.swf}     ...     \movieref[pause]{movie-04-09}{ Video }      The bottom does not operate, and click on the poster yields the message > Warning: Javascript window: Expected a stream object If I substitute 2011-04-09.swf with AVI movie, click on the poster launch the movie but the button still does not operate. Actually I am satisfied with version of my textbook produced by PDFLaTeX but I would like to invoke XeLaTeX in order to experiment with different fonts. I suspect that XeTeX + movie15_dvipdfmx currently are not able to import flash movies but my experience is limited by only two SWF movies. Origin of my troubles may reside in my SWF files. > Can somebody share here his experience on importing SWF movies into > PDFdocuments, especially produced by xelatex.


title: How to prevent page break in the last three lines of an environment?

text: I want to create an environment, thats content should not allowed a page break in the last three lines of the last paragraph. If the last three lines of the text inside the environment reach the page border, the page break should occur after the forth line from the bottom. Outside of the environment the normal behavior of the page breaks should not be changed. The environment will only contain normal text, but with increased margin on the left and right side. There may occur some inline math equations as well, but that should be it.               \documentclass{scrartcl}          \usepackage{lipsum}          \newenvironment{env}{%         \begin{addmargin}{2em}%     }{%         \end{addmargin}     }%               \begin{document}     \lipsum[1-3]          \begin{env}         \lipsum[1]         This is just some filler text, to reach the page break.         This is just some filler text, to reach the page break.         This is just some filler text, to reach the page break.         This is just some filler text, to reach the page break.         This is just some filler text, to reach the page break.         This is just some filler text, to reach the page break.         This is just some filler text, to reach the page break.         This is just some filler text, to reach the page break.         This last lines should not be broken to the next page.         This last lines should not be broken to the next page.         This last lines should not be broken to the next page.     \end{env}     \end{document}      Edit: I'm not sure, if I can make clear, what I try to achieve: I won't normally know, where exactly the last lines will start. Instead, it is more like to prevent widows, but not only prevent the last line of the paragraph to get broken to the next page, but the last three lines of text inside the environment `{env}` shall always stay together, either on the actual page or the next page.


title: Hindi text does not show using Beamer

text: I am trying to write an example of using unicode font in Latex Beamer. The resulting pdf does not show the Hindi characters, rather shows blank spaces in that place. However, when I use the same code in documentclass[article], it is producing correct results. Can anyone please help where the problem lies?               \documentclass[xetex]{beamer}          \usetheme{Warsaw}                \usepackage{verbatim}     \usepackage{verbatimbox}     \usepackage{subfigure}     \usepackage{framed,color}     \definecolor{shadecolor}{rgb}{0.93,0.91,0.91}     \usepackage{graphicx}      \usepackage{hyperref}          \usepackage{polyglossia}     \usepackage{fontspec}     \usepackage{xunicode} %Unicode extras!     \usepackage{xltxtra}  %Fixes          %\setmainfont{Bitstream Charter}     \setdefaultlanguage{english}     \setotherlanguage{hindi}     \newfontfamily\hindifont[Script=Devanagari]{Lohit Hindi}          \begin{document}     \begin{frame}[fragile]     \frametitle{Writing unicode text: use of \textit{.ttf} files}          \begin{shaded}     \begin{verbatim}     \documentclass{article}     \usepackage{fontspec}          \begin{document}     \setmainfont{Lohit Hindi}     \texthindi{देवनागरी में लिखना बहुत आसान है |}          \end{document}     \end{verbatim}     \end{shaded}          This produces               \texthindi{देवनागरी में लिखना बहुत आसान है |}          \end{frame}     \end{document}


title: pdflatex: Handling of fonts when including other pdfs

text: I was curious about one fact: How will pdflatex deal with fonts embedded in pdfs it includes? For example: When I include 100 pdf-files (e.g. using `\includegraphics`) will the generated output file contain the embedded fonts a hundred times (one complete set for each file included)? Or is it smart enough to recognize that it already has the requested fonts and allow therefore file size reduction?


title: Use a footnote in the heading with amspset package

text: I am using the amspset package as follows               \documentclass[10pt,letterpaper]{amspset}     \usepackage{fullpage, amsthm, amssymb, amsfonts}          % info for header block in upper right hand corner     \name{Eric Auld\footnote{This assignment was done in collaboration with John Smith}}     \class{MATH 2200}     \assignment{Homework 1}     \duedate{April, 10}          \begin{document}            \begin{solution}{1.}Here is the solution to problem 1                 \end{solution}          \end{document}      The footnote that I add after my name is not showing up. A number shows up for the footnote, but the footnote itself is nowhere to be seen. This feature has worked before when I've tried it with `\documentclass{article}`. Does anyone have a fix for this, or a recommendation for a good alternative format to indicate that I've collaborated on an assignment?


title: How do I prevent LyX from using fontenc by default?

text: All of the documents I create with LyX have               \usepackage[T1]{fontenc}      in the preamble, which causes problems when I use certain classes or try to switch from pdfLaTaX to XeTeX (for example). Is there a way to prevent LyX from inserting this line in my documents?


title: Is there a way to replace an environment with a command?

text: Under certain conditions (triggered by selection of a package option) I would like to change specific environments into margin notes. However `marginnote` is not itself an environment, but a command that takes its contents as an argument. So what I want to do is replace               \begin{someenvironment}     ...     \end{someenvironment}      with               \marginnote{     ...     }      but I clearly cannot do this with something like               \renewenvironment{someenvironment}         {\marginnote{ }         { }}      What is the correct way to replace an environment with a command that takes the environment's contents as an argument?


title: Which document class/package produced this document?

text: I'm very curious as to what document class could produce a document like this. I'd like to use it myself but I don't have access to the TeX source. Has anyone seen something similar (or the same)? And is there some central gallery for TeX document classes? ![enter image description here](http://i.stack.imgur.com/IgqkJ.png)


title: how to use \@Alph in the name of node inside a foreach?

text: In this question we use a lot of possibilities to define a cube. One idea is to name the vertices. I would like to find something to create these names automatically. In my last example in the question, I used nodes named 000,010,...,111. Now I would like to transform these names (or references, I don't know what is the exact term in english) in the conventional names A,B,...,H. To make this I use three loops to get 8 numbers in binary representation. I convert these numbers to base 10. Logically the formula is `1+\x+2*\y+4*\z` but I wanted to invert two names because I would get A,B,C,D and not A,B,D,C so I use a little trick : `1+\x+2*\y+4*\z+\y*(\y-2*\x)`. With a counter `cnt` and the macro `\Alph` no problem but now ( **it's my quesion** ) I would like to avoid the use of a counter and to replace `\Alph` by `\@Alph` but something goes wrong. This little code works               \makeatletter     \def\tmp{10}     \def\macro{\@Alph{\tmp}}       \macro      \begin{tikzpicture}       \node(\macro){\macro};       \draw (J)--++(5,1);       \end{tikzpicture}      My main code works also               \documentclass{scrartcl}      \usepackage{tikz}              \begin{document}         \newcounter{cnt}      \begin{tikzpicture}[ x={(-0.5cm,-0.5cm)}, y={(1cm,0cm)}, z={(0cm,1cm)},                          every node/.style={shape=circle,draw}]          \foreach \z in {0,1}       \foreach \y in {0,1}         \foreach  \x in {0,1}             {\pgfmathtruncatemacro{\nb}{1+\x+2*\y+4*\z+\y*(\y-2*\x)}               \setcounter{cnt} {\nb}               \node (\Alph{cnt}) at (4*\x,4*\y,4*\z) {\Alph{cnt}};              }%         \end{tikzpicture}     \end{document}      I would like to write something like that **Wrong code**               \documentclass{scrartcl}      \usepackage{tikz}      \begin{document}      \begin{tikzpicture}[x={(-0.5cm,-0.5cm)}, y={(1cm,0cm)}, z={(0cm,1cm)},                         every node/.style={shape=circle,draw}]     \foreach \z in {0,1}       \foreach \y in {0,1}         \foreach  \x in {0,1}             {\pgfmathtruncatemacro{\nb}{1+\x+2*\y+4*\z+\y*(\y-2*\x)}               \makeatletter              \def\name{\@Alph{\nb}}               \node (\name) at (4*\x,4*\y,4*\z) {\name};              } %     \end{tikzpicture}     \end{document}       But I get a lot of insults and particularly:                 Missing \endcsname inserted.       <to be read again>        \spacefactor       **Where is my mistake ?** The result is a future cube : ![enter image description here](http://i.stack.imgur.com/0RLEC.png)


title: Distressed text: photoshop like effects in LaTeX tikz?

text: Is it possible to create a "distressed" look using TikZ? For example: ![enter image description here](http://i.stack.imgur.com/BQLeS.png) Note that it is akin to a filter over the text/image, as each letter looks different.


title: I'm a cargo cult programmer ...

text: ... because I don't know why this works               \def\my@addextraoption#1{%         \xdef\my@extraoptions{%             \@ifundefined{my@extraoptions}\@empty\my@extraoptions,%              \zap@space#1 \@empty}}     \DeclareOption*{\my@addextraoption\CurrentOption}      but this doesn't:               \DeclareOption*{%         \xdef\my@extraoptions{%             \@ifundefined{my@extraoptions}\@empty\my@extraoptions,%              \zap@space\CurrentOption \@empty}}      The latter gives me this error:               ! Argument of \zap@space has an extra }.     <inserted text>                      \par      l.110 \ProcessOptions\relax      So what gives here? I tend to enable my cargo cult programmer bit when I get that inscrutable `Argument of \@foo has an extra }.` message (or some other inscrutable message coming deep from the core of TeX/LaTeX). Eventually I find some syntax that appears to work, and then I test it to death to make sure it really does work. There has to be a better way than enabling my cargo cult programmer bit. TeX/LaTeX is one of the very few languages that triggers that bit inside me. TeX/LaTeX ranks right up there with JCL (yes, that does date me, doesn't it) and postscript/forth in that regard.


title: Use \subfloat in custom float/caption

text: I am trying to use subfloats in a custom caption/float environment. But I get compilation errors. MWE:               \documentclass[a4paper]{report}          \usepackage[margin=10pt,font=small,labelfont=bf,justification=centering,belowskip=0pt]{caption}     \usepackage[nameinlink,noabbrev]{cleveref}          %%Charts     \DeclareCaptionType[fileext=loc,placement=b,within=chapter]{chart}[Chart][List of Charts] %list of charts is generated by \listofcharts     \crefname{chart}{chart}{charts}          \begin{document}          \begin{chart}[!h]     \centering%     \subfloat[Test 1]{\includegraphics[width=0.4\textwidth]{Test1.pdf}\label{chrt:Tests:1}}%     \quad%     \subfloat[Test2]{\includegraphics[width=0.4\textwidth]{Test2.pdf}\label{chrt:Tests:2}}%     \caption{Tests}%     \label{chrt:Tests}%     \end{chart}          \end{document} If I change `\begin{chart}` to `\begin{table}` and `\end{chart}` to `\end{table}` this suddenly works...


title: Proper way to use \ensuremath to define a macro useable in and out of math mode

text: Based on this solution related to defining a macro I came up with this macro to help me define a macro that I can use either in or outside of math mode. The example as is functions as I want. However, this solution requires me to **NOT** put `$$` around the second parameter to to the `\DefineNamedFunction` macro. I would like to be able to include the $$, or not include it. One solution is to modify `\DefineNamedFunction` to strip out the `$$` if it is included in the macro call using the `xstring` pacakge, but this to me feels like a hack, and am thinking that there is probably a cleaner TeX way to do this. So to summarize: How do I change `\DefineNamedFunction` such that I can use both the commented and uncommented calls to this macro, and still be able to use the definition inside and outside of math mode?               \documentclass{article}          \usepackage{amsmath}     \usepackage{xcolor}          \newcommand{\DefineNamedFunction}[2]{% {FunctionName}{FunctionExpression}         \expandafter\providecommand\expandafter{\csname#1\endcsname}{\textcolor{red}{\ensuremath{#2}}}%     }          \begin{document}          \DefineNamedFunction{FunctionF}{y = 2 \sin x}     %\DefineNamedFunction{FunctionF}{$y = 2 \sin x$}          I can use FunctionF inside math mode as $\FunctionF$,     but can also use this outside of math mode as \FunctionF.          \end{document}


title: Figure not properly placed overlaps text

text: I am having problems inserting a figure in my LaTeX file. Here is the code that I use               \begin{figure}[hbp]     \centering     \includegraphics[width=20mm, height=20mm]{Wheatstone.jpg}     \caption{Wheatstone's Stereoscope.}     \label{fig:cclogo}     \end{figure}      All I want is that the image should come below the text and be properly centered. Right now it comes on the side of the text. Maybe I am doing something wrong with the placement?


title: Drawing vertical hierarchical n-ary tree in tikz

text: I am trying to draw a simple vertical tree to represent a hierarchical partition of a graph in communities. I have written some code to draw it in tikz, but I am not very satisfied of the result. My code is:               \begin{tikzpicture}[shorten >=1pt, auto, node distance=3cm, ultra thick,             node_style/.style={font=\sffamily\Large\bfseries,minimum size=0.7cm},             edge_style/.style={draw=blue, ultra thick},             community_label_style/.style=    {font=\sffamily\Large\bfseries,minimum size=0.7cm,text height=1.5ex,text depth=.25ex,}]     \node[community_label_style] (v15) at (0,-4) {\emph{a}};     \node[community_label_style] (v16) at (1,-4) {b};     \node[community_label_style] (v17) at (3,-4) {c};     \node[community_label_style] (v18) at (4,-4) {d};     \node[community_label_style] (v19) at (8,-4) {e};     \node[community_label_style] (v20) at (9,-4) {f};     \node[community_label_style] (v21) at (11,-4) {g};     \node[community_label_style] (v22) at (12,-4) {h};     \node (v1) at (6,1) {};     \node[community_label_style] (v13) at (1,-2) {$C2$};     \node[community_label_style] (v7) at (9,-2) {$C6$};     \node (v2) at (6,0) {};     \draw  (v1) edge (v2);     \node[community_label_style] (v3) at (2,0) {$C1_2$};     \node[community_label_style] (v4) at (10,0) {$C2_2$};     \node[community_label_style] (v11) at (4,-2) {$C4$};     \draw  (v2) edge (v3);     \draw  (v2) edge (v4);     \node (v5) at (2,-2) {};     \node[community_label_style] (v12) at (3,-2) {$C3$};     \node[community_label_style] (v14) at (0,-2) {$C1$};     \node (v6) at (10,-2) {};     \node[community_label_style] (v9) at (11,-2) {$C7$};     \node[community_label_style] (v10) at (12,-2) {$C8$};     \node[community_label_style] (v8) at (8,-2) {$C5$};     \draw  (v3) edge (v5);     \draw  (v4) edge (v6);     \draw  (v6) edge (v7);     \draw  (v7) edge (v8);     \draw  (v6) edge (v9);     \draw  (v9) edge (v10);     \draw  (v11) edge (v12);     \draw  (v12) edge (v5);     \draw  (v5) edge (v13);     \draw  (v13) edge (v14);     \draw  (v15) edge (v14);     \draw  (v16) edge (v13);     \draw  (v17) edge (v12);     \draw  (v18) edge (v11);     \draw  (v19) edge (v8);     \draw  (v20) edge (v7);     \draw  (v21) edge (v9);     \draw  (v22) edge (v10);     \draw  (v13) edge (v12);     \draw  (v7) edge (v9);     \draw  (v4) edge (v3);     \end{tikzpicture}      The result is: ![enter image description here](http://i.stack.imgur.com/7hLER.jpg) I don't like that lines are separed by white dots. I would like to draw a more elegant representation. Is it possible? How could I improve my drawing? Thank you for your help.


title: How can I have list of figure etc. labelled D. List of Figures, E. List of Tables, F. Bibliography...?

text: I am using KOMA class scrreport and want the following structure of my appendix: > A. Abbreviations   >  B. ...   >  C. ...   >  D. List of Figures   >  E. List of Tables   >  F. Bibliography   >  G. Acknowledgments Right now, what I can achieve is > A. Abbreviations   >  B. ...   >  C. ...   >  List of Figures   >  List of Tables   >  Bibliography   >  Acknowledgments The relevant code is               \documentclass[11pt,colorlinks=true,pdftex]{scrreprt}     \usepackage{tocloft}     \usepackage[nottoc]{tocbibind}      Using the KOMA class option `listof=totocnumbered` didn't help.


title: xypic putting a hole when two arrows cross

text: I am trying to draw the following figure in trying to typeset the lattice diagram of the semidihedral group or order 16. Here is my tex code.               \documentclass[11pt]{amsart}     \usepackage[all]{xypic}               \begin{document}     \begin{displaymath}         \xymatrix{     &&&& G \ar@{-}[dl] \ar@{-}[d] \ar@{-}[dr]   \\     &&& A \ar@{-}[dl] \ar@{-}[d]\ar@{-}[dr]& B  \ar@{-}[d]&C \ar@{-}[dl] \ar@{-}[d]\ar@{-}     [dr] \\               &&D \ar@{-}[dll] \ar@{-}[dl] \ar@{-}[drr] & E \ar@{-}[dl]|!{[dl];[l]}\hole \ar@{-}[d] \ar@{-}[dr] & F \ar@{-}[d] & H & I    \\              J \ar@{-}[drrrr] &K \ar@{-}[drrr]&L \ar@{-}[drr]& M \ar@{-}[dr]& N \ar@{-}[d] \\              &&&& F}     \end{displaymath}                    \end{document}       I want EL to have a hole when it crosses DN and I want EM to have a hole when it crosses DN. How do I achieve this? Thanks for your time.


title: Shortcut for changing text color

text: I want to create a shortcut in LyX for changing the color of selected text. I tried to create a shortcut for "set-color green" or "set-color green green", but none of these worked. What is the magic word?


title: Em dash out of right margin

text: I am almost sure this question was already asked somewhere (I couldn't find it). Still why my em dash and the word proceeding it are typeset out of margins? ![enter image description here](http://i.stack.imgur.com/NPEiq.png) the source is               proliferation---nextword      Has it something to do with the hyphenation of the word _proliferation_? I am using the package `microtype` if it matters and I tried what suggested in this answer (although the problem is slightly different).


title: String parsing macro fails within custom cite command of biblatex?

text: I am trying to use the same string parsing macro as in String parsing macro fails within a minipage environment?; but this time in context of `biblatex` \- and I'm having similar problems, I guess. Here is an MWE, partially borrowing code from Biblatex: ifx inside DeclareFieldFormat:               \documentclass{article}            \def\parseMyNumHelper num0#1\relax{\edef\MyNum{#1}}       \def\parseMyNum#1{\edef\temp{#1}%         \expandafter\parseMyNumHelper\temp\relax}            \usepackage{filecontents}       \begin{filecontents}{\jobname.bib}       @misc{num01,           title = {Title1},           eprint = {MR001},           eprinttype = {mrnumber}}       @misc{num02,           title = {Title},           eprint = {002},           eprinttype = {mrnumber}}       @misc{num03,           title = {Title},           eprint = {MR003 (aa)},           eprinttype = {mrnumber}}       @misc{num04,           title = {Title},           eprint = {004 (bb)},           eprinttype = {mrnumber}}       \end{filecontents}       \usepackage{biblatex}       \addbibresource{\jobname.bib}                 \DeclareFieldFormat{myentrykey}{%         \parseMyNum{#1} %         \textbf{Testing \MyNum: \textit{#1}}%       }            \makeatletter       \newbibmacro*{myentrycite}{% custom       \printfield[myentrykey]{entrykey}       } % end \newbibmacro*{       \makeatother            \DeclareCiteCommand{\myentrycite}         {\usebibmacro{prenote}}         {\usebibmacro{citeindex}%          \printtext{\usebibmacro{myentrycite}}}         {}         {\usebibmacro{postnote}}                    \begin{document}            \def\testvar{num01}       \typeout{ a== \testvar, }       \typeout{ -- \meaning\parseMyNumHelper}       \typeout{ -- \meaning\parseMyNum}       \parseMyNum{\testvar}       \typeout{ b== \testvar, - \temp, - \MyNum}            \myentrycite{num03}          \end{document}      Here, as a result of the cite command, I'd like to print the last numeral of the citation entry key. If you run this code once with `pdflatex`, things look reasonable:                a== num01,       -- macro:num0#1\relax ->\edef \MyNum {#1}      -- macro:#1->\edef \temp {#1}\expandafter \parseMyNumHelper \temp \relax       b== num01, - num01, - 1      However, if you then run `bibtex`, and `pdflatex` again, at this second run you get:                a== num01,       -- macro:num0#1\relax ->\edef \MyNum {#1}      -- macro:#1->\edef \temp {#1}\expandafter \parseMyNumHelper \temp \relax       b== num01, - num01, - 1     ! Use of \parseMyNumHelper doesn't match its definition.     \temp ->n              um03     l.59   \myentrycite{num03}          ? i     insert>\typeout{ \meaning\parseMyNumHelper }      macro:num0#1\relax ->\edef \MyNum {#1}     ...      Here is the strange thing - I expect `num03` to arrive to the macro, and it does; and yet, macro still crashes on it? And even more strange - if we continue to the end, the following output is generated: ![test.png](http://i.stack.imgur.com/ERKJ6.png) ... and what I can see is that the parsing "almost" succeeded (I get "Testing X" as I expected) - except the last validly set number is returned.... Well, in String parsing macro/minipage... , the problem was minipage not having the correct argument, and therefore interfering with the next of the \parse commands - in  Biblatex: ifx inside DeclareFieldFormat, it is mentioned: > This is happening because you are using the \ifx test, which will only be > true if the category codes of M and R are 'letter'. biblatex is passing the > argument as a detokenized string, so the test fails. ... and I'm not really sure if that is related to this.. But in any case, I'd appreciate a lot if anyone can explain why does this "string parsing" macro crash here - and how can I get it to work as intended.. Many thanks in advance for any answers,   Cheers!


title: Same vertical space at the top and bottom of the statement of changes

text: How to center horizontally and vertically cell contents of this table ?               \documentclass[a4paper,12pt]{article}     \usepackage[upright]{fourier}     \usepackage[no-math]{fontspec}     \usepackage{luacode,luatextra,luaotfload}     \usepackage{tikz,tkz-tab}     \usepackage[frenchb]{babel}     \usepackage{tabularx,array}     \begin{document}     \begin{table}     \renewcommand{\arraystretch}{4}\centering     \begin{tabular}{|>{\centering\arraybackslash}m{1cm}|>{\centering    \arraybackslash}m{1cm}|>{\centering\arraybackslash}m{10cm}|}      \hline      \boldmath{$a$} &\boldmath{$\Delta$}& \textbf{Signe de \boldmath{$f(x)$}}\\      \hline      $1$  & $12$ &\begin{tikzpicture}[baseline=-1.5cm]     \tikzset{t style/.style={style=thin}}     \tkzTabInit[espcl=1.8,lgt=1.5]     {$x$ /0.8, $f(x)$ /0.8 }{$-\infty$,$x_1$,$x_2$,$+\infty$}     \tkzTabLine{,$+$,z,$-$,z,$+$}      \end{tikzpicture} \\      \hline      $2$ &&   \\      \hline      $4$ & &   \\      \hline      $6$ & &   \\      \hline     \end{tabular}     \end{table}     \end{document}enter code here


title: Vertical centering of text spanning multiple rows

text: > **Possible Duplicate:**   >  How to vertically-center the text of the cells? I am using multicolumn to create a table. The code that I have is here:                  \documentclass[10pt]{article}          \usepackage{multicol}         \begin{document}          \begin{table}            \centering           \begin{tabular}{|c|c|c|}            \hline            \multicolumn{2}{|c|}{Data A} & Data B \\\cline{1-2}            Set A1 & Set A2 &              \\\hline            a & b & c \           \hline            \end{tabular}            \caption{List of test cases.}            \label{tab:Tests}          \end{table}     \end{document}      This results in a table where the entry 'Data B' is aligned with the top hline of the table as in ![this](http://i.stack.imgur.com/eKxI6.png). I would like to know how I can vertically center the entry ''Data B''. Any ideas would help a lot!


title: Capital Omega problem, I can not renewcommand it

text: I want to change all the `\Omega` in my paper into `\varOmega`, but always receive an error information. Here is the details. I have add the line in the preamble `\renewcommand{\Omega}{\varOmega}` when I compile the TeX file, it said that               Command `\Omega' already defined. \begin{document}      Because there are too many `\Omega`, it is almost impossible to change them one by one. Therefore I want to use `\renewcommand{\Omega}{\varOmega}` to realize my purpose. What is wrong with my method? This is my MWE:               \documentclass{article}      \usepackage{amsmath,amssymb}      \renewcommand{\Omega}{\varOmega}     \usepackage{xeCJK}      \begin{document}      $\Omega$      \end{document}


title: Increasing the size of \square?

text: Beginner here! All I want to do is make a couple of boxes on my document. I'm currently using this:               \makebox[10pt][l]{$\square$}\raisebox{.15ex}{\hspace{0.4em}$\texttt{1}$}      but I need to make the actual boxes bigger. Is there any way to do this? I tried searching, but to no avail. Thanks!


title: tex4ht compile error using mathml switch using multline with pmatrix and easybmat

text: It took me a long time to find this and be able to make a MWE. I hope someone has an idea what is causing it and if there is a work around. This problem shows up in this small example, only when I use the mathml switch in tex4ht. Which is really strange. I've had problems before using tex4ht with mathml, but these show up in the HTML file, never in the actual compile stage. I was trying to use a solution to add dashed lines to a matrix as shown is it possible to add dashed lines between rows/column of pmatrix from amsmath?               \documentclass{article}     \usepackage{amsmath}     \usepackage{easybmat}     \begin{document}          \begin{multline*}     \bgroup     \renewenvironment{pmatrix}{\left(\begin{BMAT}(@){c.c}{c.c}}     {\end{BMAT}\right)}     \begin{pmatrix}     A & B\\     C & D     \end{pmatrix}     \egroup     \end{multline*}         \end{document}      compiles with no problem with pdflatex ![Mathematica graphics](http://i.stack.imgur.com/9IGpb.png) But gives this error with tex4ht               htlatex foo.tex "htm,mathml"          (/usr/local/texlive/2013/texmf-dist/tex/generic/tex4ht/html-mml.4ht)     (/usr/local/texlive/2013/texmf-dist/tex/generic/tex4ht/html4-uni.4ht))     (./foo.aux)     l.16 --- TeX4ht warning --- \halign translated into linear text ---     ! Missing # inserted in alignment preamble.     <to be read again>                         &     l.16 \end{multline*}                         ?       but using this command, it now compiles fine and the HTML file displays fine with the dashed lines in the matrix.               htlatex foo.tex "htm"  %ok      If I remove the `multline*` environment, it now works ok in both modes               \documentclass{article}     \usepackage{amsmath}     \usepackage{easybmat}     \begin{document}         \[     \bgroup     \renewenvironment{pmatrix}{\left(\begin{BMAT}(@){c.c}{c.c}}     {\end{BMAT}\right)}     \begin{pmatrix}     A & B\\     C & D     \end{pmatrix}     \egroup     \]         \end{document}          htlatex foo.tex "htm"   %ok     htlatex foo.tex "htm,mathml"  %ok compile, but wrong HTML display on firefox      ![Mathematica graphics](http://i.stack.imgur.com/f2YPY.png) The above code was small fragment from large file. Any idea what is causing this error and is there a workaround it? I'd like to use mathml since I use mathjax for final display (in this small example, I did not show this) and like to keep using mathml. I also need to use `\usepackage{easybmat}`. One final fact point: If I remove the `easybmat` part, then it works OK again:               \documentclass{article}     \usepackage{amsmath}     \begin{document}          \begin{multline*}     \begin{pmatrix}         A & B\\         C & D     \end{pmatrix}     \end{multline*}         \end{document}          htlatex foo.tex "htm,mathml"  %ok     htlatex foo.tex "htm"  %ok      But I need to use `easybmat` to add the dashed lines as explained in the question here So the problem shows up, only when using `easybmat` with `multline`. Fyi, here is a question also on error using multline with pmatrix, not sure if it is related Error with pmatrix inside multline* inside minipage inside tabular texlive 2013, on linux mint 16               tex4ht.c (2012-07-25-19:36 kpathsea)


title: How to place block in top of beamer poster

text: Why when I write empty block in beamer poster, that block was placed in center of frame. How to place that block in the top of frame, eventhough that block empty.               \documentclass[final]{beamer}       \mode<presentation>       {     % you can chose your theme here:     \usetheme{Berlin}     % further beamerposter themes are available at      % http://www-i6.informatik.rwth-aachen.de/~dreuw/latexbeamerposter.php     }     \usepackage{grffile}     \usepackage[english]{babel}     \usepackage[latin1]{inputenc}     \usepackage{amsmath,amsthm, amssymb, latexsym}          \usepackage[absolute,overlay]{textpos}     \usepackage[orientation=portrait,size=a0,scale=1.4,debug]{beamerposter}          \begin{document}     \begin{frame}{}     \begin{columns}[t]         \begin{column}{0.3\textwidth}             \begin{block}{\Large Introduction}             \end{block}         \end{column}         \begin{column}{0.3 \textwidth}             \begin{block}{\Large Result}             \end{block}         \end{column}         \begin{column}{0.3 \textwidth}             \begin{block}{\Large Simulasi}             \end{block}         \end{column}     \end{columns}     \end{frame}     \end{document}      ![enter image description here](http://i.stack.imgur.com/04GKL.png)


title: Changing the style with biblatex

text: I'm still a LaTeX beginner. I'm using kile and KBibTeX on lubuntu. I try to use `biblatex`. I copied this from a help document into my preamble:               \usepackage[style=authortitle-icomp]{biblatex}          \usepackage[babel,german=guillemets]{csquotes}          \bibliography{Quellen}      "Quellen" is the name of my KBibTeX document. It works like that even if after running BibTeX, LaTeX says `finished with exit code 2`. When I try to change the style e.g. to apalike by writing               \usepackage[style=apalike]{biblatex}       LaTeX says `package 'apalike' not found\RequireBibliographyStyle{\blx@bbxfile}`. I already tried to download the `apalike.sty` and `apalike.bst` and put it the same folder as the LaTeX document, but it doesn't work. I although checked all of the entries in the KBibTeX file. There is no error.


title: Include image in a table

text: > **Duplicate of:**   >  How to Label and Caption a Tikzpicture inside a tabular environment I am trying to include an image inside a table cell. But I am declaring the image using the `figure` environment, where I can include a label to reference to inside the document (that's why I did't use `\includegraphics`, because this hasn't got a label to use as reference) As it appears to be, I can't put the `figure` environment inside a table, because they are incompatible. But this is the only way I know for later referencing inside the text.


title: How to Label and Caption a Tikzpicture inside a tabular environment

text: What is the correct way to label and captionize a tkizpicture inside a tabular environment? (Since figures are not allowed inside a tabular) Excerpt from my .tex:               \begin{tabular}{l r}          &        \begin{tikzpicture}        ... % I want to label this tikzpicutre and give it a nice caption        \end{tikzpicture}     \end{tabular}      Outside the tabular I would have done it like this:                  \begin{figure}        \begin{tikzpicture}        ...         \end{tikzpicture}        \label{fig:...}\caption{...}        \end{figure}      Basically I want to create a page that looks like this:               ----------------------------     |Text Text    TKIZ    TKIZ |     |TextText     TKIZ    TKIZ |     | Text Text   Figure X: ...|     |                          |     |This text is under the    |     |table and references above|     |TKIZ Figure with \ref{..} |     ----------------------------


title: VIM-LaTeX F5 package insertion problem

text: When I insert a package into my preamble in VIM-LaTeX using F5 and select for instance `floatflt`, instead of `\usepackage{floatflt}`, I often get the following. How can I solve this?               <++>]{floatflt}"`usepackage[X


title: latexdiff is not working

text: I installed latexdiff to track changes. The first question is where to give the command (latexdiff old.tex new.tex > diff.tex). I saw on the internet that it can be done in the Command/DOS environment. But then I get the error that the file new.tex cannot be found in the directory. I have checked where the other packages are located which is downloaded and which are working. And I have downloaded Perl. What am I doing wrong?


title: Errors/Warnings in LaTeX Output

text: I use Vim to edit LaTeX documents and pdflatex to compile the documents. One problem with using pdflatex is that it takes time to go through the output to see if there is any warning/errors. Sometimes, I even spend few minutes trying to understand whether a certain line is just an information line or an error/warning. Any idea to make this task easier? Any rules for reading the output of pdflatex? Or may be some tools?


title: Drawing with scalable shapes

text: Prologue: this is not yet-another "how do you scale node shapes?" question, but a follow-up to the usual answers ("you kind of can, but it's awkward, and you probably shouldn't") in a specific context. * * * I'm working on a family of diagrams made up of 1D rows of pixels or tasks (represented mostly by rectangles): ![pixel diagram](http://i.stack.imgur.com/FRraw.png) Coming from the TikZ tutorials, I started doing this using styled `node`s for nearly everything: all the pixels, as well as the borders around groups of them, and deriving positioning boxes around sub-regions of the figure. This made positioning (using, e.g., the `positioning` and `fit` libraries) relatively straightforward. All the smarts for drawing paths between nodes (picking nice locations on their borders), automatically offsetting to compensate for line width (so, e.g., `right = of <last node>, node distance = 0` draws rectangles with perfectly overlapping shared strokes), etc., are quite useful. It becomes incredibly convenient to be able to draw things like the blue dependence arrows seen here, just by naming the corresponding nodes, since these are just classic node to node paths. One consequence of this is that the size of these pixel rectangles is specified using `inner sep` and/or `minimum size`. However, coming from a graphics background where I appreciate transform stacks as an extremely useful way to write simple and composable drawing code. However, once I started trying to use relative coordinates (e.g., `inner sep = 0.5`, so each pixel is exactly 1 logical PGF unit in width/height, combined with `/tikz/x = 3mm, /tikz/y = 3mm`, to set the unit size for the whole canvas) and coordinate transforms (setting `scale` for a scope to slightly shrink the pixels in some region; using `shift` to move the location of a sub- drawing) I ran head long into the fact that TikZ applies transforms to everything _but_ intra-node geometry. I know about the `transform shape` option, but (1) that seems to be generally frowned upon (to paraphrase some answers on the subject, transforms + nodes = evil), and (2) even that does not make the simple example of defining `x` and `y` coordinate vectors to the desired size work correctly with `inner sep`/`minimum size`, since these are _always_ interpreted as measures with absolute units. The recommended method for drawing shapes which do conform to the transform stack seems to be to just use paths. Then, a pixel might be something like `\draw[pixelstyle] (0,0) rectangle +(1,1);`. This respects the transform context as expected, but loses all the nice behavior of nodes for positioning and drawing connecting paths by reference. So my question is one of design: how would TikZ experts approach this type of drawing?


title: How to install XyMTeX to work with TeX Live on Windows 7

text: I write my reports with LaTeX. I use TeXmaker plus TeX Live distribution. I want to use XyMTeX in a document when I wanna use `\usepackage{xymtex}` but there are errors. I don't know anything about how to install a new package. I'm new to LaTeX but I'm well experienced with Windows


title: Adding math behavior to custom macro in AUCTeX

text: I have defined a custom macro for my equations, to simplify and decrease the amount of code I write               \newcommand{\eqn}[1]{       \begin{equation}         #1       \end{equation}     }          \eqn{\alpha + \beta = \gamma}      But I don't have the syntax highlighting for math macros and sub/superscript stylings which AUCTeX provides, because it doesn't realize it is a math environment. What should I do to enable those features inside `\eqn{}`?


title: Conditional pagebreak?

text: Is there a way I can have LaTeX insert a pagebreak, if the last line of the page is a certain string? e.g.               \noindent \textsl{Solution}:      thanks very much!


title: How to start new chapters on the right hand side

text: I use the `report` document class, and I would like that chapters always start on the right hand side, anyone an idea how this could be easily done?


title: How does this answer work?

text: Harald Hanche-Olsen posted some interesting code in answer to this question. Could someone explain how it works? I understand (I think) the futurelet and the expansions. I don't understand:   1. Where does the `<null>` character come from in `\ifcat\next9`?   2. How does the expanded text actually get broken into the `\hbox`'s? (Pages 98-99 of the TeXbook didn't really help me understand the trace output in this case, so I'm hoping someone can clarify.) Thanks! Here is the code reproduced from the referenced answer:               \def\breaknumberanywhere{\hskip0pt\futurelet\next\breaknumberi}     \def\breaknumberi{\ifcat\next9\expandafter\breaknumberii\fi}     \def\breaknumberii#1{#1\breaknumberanywhere}          \def\foo#1#2{\vtop{\hsize=#1\rightskip=0pt plus 1fil \leftskip=0pt\noindent\breaknumberanywhere#2}}          Here is a long number:     \foo{2in}     {17823941237490812347123904712389407123408917234890123748912034712985712389012351}     \bye


title: How to replace an expression in several TeX files?

text: Can I replace all instances of one string expressions in the `TeX` files in one directory? For example, let's say I want to replace all `\frac` with `\myfrac` in more than one file simultaneously.


title: How to use the quote environment inside a \framebox?

text: Now I run into a problem with frameboxes. Why is the following not valid LaTeX code?               \framebox{     The following text was taken from:     \begin{quote}     Erik Pickles: How it will end     \end{quote}     }      I get the following error: > something's wrong -- maybe an missing item?


title: Which DVI viewer on linux?

text: Today, to my complete disbelief, I realized `evince` on Gnome 3 is not able to open DVI files. Which readers do you suggest, and why? It would prefer gnome applications of course, but I don't mind KDE/Qt either. _update:_ I'm on Fedora with TeX Live 2011.


title: How to write a vertical vector in LaTeX for LyX

text: I can't work out how to write a vertical (two dimensional) vector, with brackets spanning two lines. Do you know how to write it for LyX?


title: how to launch skim from auctex on mac os?

text: > **Possible Duplicate:**   >  Launching an external PDF viewer from Emacs/AUCTeX on a Mac OSX fails. I am using emacs 24.2.1 with mac os (Mountain Lion). I am using auctex to edit my latex document. I do not have evince in my mac and installed skim instead. To launch an external viewer from my auctex View command(C-c C-c), I add the following line in my .emacs file.               (add-hook 'LaTeX-mode-hook 'TeX-source-correlated-mode)      (setq TeX-source-correlate-method 'synctex)     (setq TeX-source-correlate-method 'latex)     (add-hook 'LaTeX-mode-hook       (lambda()         (add-to-list 'TeX-expand-list              '("%q" skim-make-url))))     (defun skim-make-url () (concat         (TeX-current-line)         " \""         (expand-file-name (funcall file (TeX-output-extension) t)             (file-name-directory (TeX-master-file)))         "\" \" "         (buffer-file-name)     "\""));     (setq TeX-view-program-list       '(("Skim" "/Applications/Skim.app/Contents/SharedSupport/displayline %q")))     (setq TeX-view-program-selection '((output-pdf "Skim")))     ; *** end adding pdf viewer skim**      When I trigger View command(C-c C-c), it says complains "No mathing viewer found". The skim has been installed properly.


title: Table environment that can break inside a cell

text: I am wondering if there is an environment for creating a table in LaTeX that will not only break at `\hline`, but instead can break in the middle of a cell. I have to write very long reports in one table cell that will certainly span more than one page: As an example:               %        File: Minimal.tex     %     Created: Tue Feb 15 07:00 PM 2011 G     % Last Change: Tue Feb 15 07:00 PM 2011 G     %     \documentclass[a4paper]{article}          \usepackage{longtable}          \begin{document}     \begin{longtable}{c | p{10 cm}}     Header 1 & Header 2 \\                \hline                Little text &                 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin nulla augue, ultricies vestibulum auctor vitae, scelerisque sit amet tellus. Etiam adipiscing elementum pellentesque. Pellentesque ac nulla libero, quis venenatis augue. Donec ut egestas nisi. Sed non ligula at purus molestie blandit quis quis eros. Phasellus venenatis ante quis ligula molestie semper ornare est sollicitudin. Ut lacus ipsum, dictum vitae malesuada eget, luctus sed tortor. Curabitur a augue ipsum. Quisque accumsan odio et ipsum euismod volutpat. Praesent porta nunc adipiscing justo convallis nec tempor augue auctor. Nam magna nibh, gravida ut placerat nec, posuere et sem. Sed tincidunt, justo vel euismod pretium, enim tortor fermentum augue, iaculis bibendum nunc mi vel quam. Donec nec gravida ligula. Vivamus dictum libero eget elit scelerisque sit amet accumsan mi mollis.                     Phasellus eros magna, posuere facilisis sollicitudin dignissim, tincidunt ac eros. Vestibulum non vestibulum elit. Donec dictum vulputate nisl sed iaculis. Suspendisse ut ipsum arcu, ac molestie odio. Vivamus dapibus convallis arcu non ultricies. Sed id aliquet mi. Mauris vel nisi orci. Aenean pulvinar nulla et est rhoncus vestibulum. Morbi interdum, leo vel semper commodo, lectus velit blandit ipsum, quis euismod ante metus at nisl. Donec interdum scelerisque elit, auctor vestibulum elit mattis ultrices.                     Nam a velit dolor. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce et augue vel augue pulvinar rhoncus laoreet quis dolor. Cras id dolor enim, non bibendum nisi. In ac nisl velit, ut lobortis dui. Etiam dapibus, lectus nec consectetur aliquam, sapien diam sagittis lorem, nec pellentesque ante ante vel libero. Fusce dapibus eros non metus condimentum placerat. Nam sem mi, sollicitudin eu molestie non, scelerisque ut velit. Morbi ultrices quam et tortor tempor quis interdum mauris ornare. Maecenas sit amet arcu massa, ut adipiscing leo. Ut fermentum elit vel ante bibendum et semper augue ullamcorper. Sed ac sapien felis.                     Aenean suscipit, quam nec condimentum ullamcorper, ante metus rhoncus nisl, sit amet vulputate est leo ac lectus. Cras pulvinar eleifend enim. Fusce sapien est, tristique a aliquam auctor, tempus vel turpis. Praesent dapibus vehicula rutrum. Sed ac felis felis. Proin vitae dui ac ligula hendrerit feugiat id malesuada felis. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Phasellus vel ante nibh. Donec ut metus sed ipsum luctus posuere et sed mauris. Suspendisse posuere libero nec tortor elementum tincidunt. Duis rhoncus mollis sodales. Mauris sit amet quam eget enim pulvinar facilisis. Duis porttitor eros quis lorem molestie egestas. Nam sagittis erat vitae metus consequat ornare. Suspendisse et nisl ligula. Aenean sed tellus dolor, eu lacinia ipsum.                     Aenean suscipit, quam nec condimentum ullamcorper, ante metus rhoncus nisl, sit amet vulputate est leo ac lectus. Cras pulvinar eleifend enim. Fusce sapien est, tristique a aliquam auctor, tempus vel turpis. Praesent dapibus vehicula rutrum. Sed ac felis felis. Proin vitae dui ac ligula hendrerit feugiat id malesuada felis. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Phasellus vel ante nibh. Donec ut metus sed ipsum luctus posuere et sed mauris. Suspendisse posuere libero nec tortor elementum tincidunt. Duis rhoncus mollis sodales. Mauris sit amet quam eget enim pulvinar facilisis. Duis porttitor eros quis lorem molestie egestas. Nam sagittis erat vitae metus consequat ornare. Suspendisse et nisl ligula. Aenean sed tellus dolor, eu lacinia ipsum.                \\                     And &                So on     \end{longtable}          \end{document}      This table will be too big to fit onto one page, but will not break in any package I tested (longtable, LTXtable, xtab). Is there any any environment that does support in-cell page breaks? Thanks in advance for any help.


title: Collecting tikZ drawings in a box

text: Please is it possible to collect tikz picture in the following way? I get `\box40=\hbox(0.0+0.0)x0.0 []`. I would even prefer a `\vbox`, but I get a worse outcome.               \makeatletter     \newbox\tempbox     \newbox\mainbox     \def\collecttikzpicture{\@testopt\@collecttikzpicture{}}     \def\@collecttikzpicture[#1]{%       \global\setbox\tempbox=\hbox\bgroup\begin{tikzpicture}[#1]%     }     \def\endcollecttikzpicture{%       \end{tikzpicture}\egroup       \setbox\mainbox=\hbox{\unhbox\mainbox\unhbox\tempbox}%     }          \begin{collecttikzpicture}[remember picture,overlay]       \draw [cyan,fill=yellow]       (0cm,0cm)--(2cm,0cm)--(2cm,-2cm)--(0cm,-2cm)--cycle;     \end{collecttikzpicture}          \showbox\mainbox     \makeatother


title: How to link two terms in math mode

text: I am trying to get something like this: ![enter image description here](http://i.stack.imgur.com/TnVBa.jpg) which is different from `\underbrace` or `\underbracket`. It says that `a.c=3`. Is there already a command for that? I have not found it. Or should one define it? If yes, can someone help me how to define it? Thanks.


title: How to deal with (probably bogus) errors from third party on my pdf?

text: I use a print-on-demand company (lulu.com) that has always been picky and inconsistent about the PDF files they accept. I'm giving them files produced by pdftex. They use various subcontractors to fill orders (e.g., a Spanish one for European orders), and the subcontractors use different hardware and software. The result is that a book will print 100 times over a period of years, and then one day a certain subcontractor will try to print it, it will fail, and lulu will make the book unavailable for several days until they'll allow me to upload the same PDF file again -- which will then work fine for the next n orders. Recently they have gotten better about at least reporting what the specific error is. For the first time, they've sent me a screenshot from PitStop Pro, reading: "critical failures. failure (critical parser failure: XObject resource missing) occurred during Select all (6x on pages 243-244)." Lulu also says, "Usually this means there is some corruption int he file that might cause an issue. While the book has printed one other time, this issue makes the file unstable and could cause the file to continue to print sometimes and not others." PitStop Pro is $800 proprietary software that doesn't run on the OS that I use (linux), so buying it isn't an option for me. Even if I bought it and could run it, this error message wouldn't help me to fix the problem. I've tried preflighting the book using open-source software as follows:               qpdf --check genrel_lulu_failed.pdf      gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=b.pdf genrel_lulu_failed.pdf      Neither qpdf's parser not GhostScript's has any problem with the file, which was output by pdftex. Pdffonts reports that all fonts are embedded, none are subsetted, and none are multiply embedded. The two pages referred to in the error message contain pdf figures output by inkscape. The figures aren't anything huge that would be expected to crash a parser due to a lack of memory. I have several hundred existing figures in various books that were all done with inkscape. If anyone cares to take a look, here is the book: http://www.lightandmatter.com/lulu_stackexchange/book.pdf Lulu says there are commercial services that will fix my file, but I suspect that those services would say, "OK, first give us your MS Word file..." Does anyone have any suggestions for how to deal with this problem?


title: landscape with \addtolength messing up location of page number

text: I want a page number in the normal position but when I combine my methodology of margin stretching with `landscape` then the page number moves to the right **_a lot_**. Note that "TABLE GOES HERE" is actually a `longtable` table in my code.               \documentclass{article}     \usepackage{lscape}          \begin{document}                    \clearpage     \addtolength{\textwidth}{4in}     \addtolength{\hoffset}{-0.45in}     \begin{landscape}     LONGTABLE TABLE GOES HERE     \end{landscape}     \addtolength{\textwidth}{-4in}     \addtolength{\hoffset}{0.45in}     \clearpage           \end{document}


title: Tikz: the use of \tilde is not working in the tikz environment

text: From my post on placing a node at the intersection of two circles, I came across a problem. When I compile the document, `\tilde F` renders `~F` and not a tilde over the F. I can't duplicate this issue on a smaller scale though. Here is my preamble:               \documentclass[11pt, dvipsnames]{article}          \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{eucal}     \usepackage{pxfonts}     \usepackage{setspace}     \usepackage{enumerate}     \usepackage{amscd}     \usepackage{dsfont}     \usepackage{wasysym}     \usepackage{tikz}     \usepackage{tikz-qtree}     \usepackage{mathtools}     \usepackage{kurier}     \usepackage{pgfplots}     \usepackage{listings}     \usepackage{etoolbox}     \usepackage{tikz-3dplot}     \usepackage{float}     \usepackage{wrapfig}     \usepackage{multirow}     \usepackage{array}     \usepackage{tkz-fct}     \usepackage{graphicx}     \usepackage{datetime}     \usepackage{fancyhdr}     \usepackage{xcolor}     \usepackage[protrusion = true, expansion]{microtype}     \usepackage{marvosym}     \usepackage{starfont}     \usepackage{fixltx2e}                                                       \usepackage{hyperref}     \usepackage[margin = 0.75in]{geometry}     \usepackage[caption = false]{subfig}     \usepackage[all]{hypcap}          %  arctanh                                                                                \DeclareMathOperator\arctanh{arctanh}          %  phantom sections for itemize linking use hyperref and name                             \AtBeginEnvironment{itemize}{\apptocmd{\item}{\phantomsection}{}{         \errmessage{couldn't patch item}}}          %\listfiles                                                                                \hypersetup{       colorlinks,       citecolor = Violet,       linkcolor = Blue,       urlcolor = Blue     }          \hypersetup{       citebordercolor = Violet,       filebordercolor = Red,       linkbordercolor = Blue     }          \lstset     {       breaklines = true,       tabsize = 3,       showstringspaces = false     }          \lstdefinestyle{Common}     {       extendedchars = \true,       language = {Python},       frame = single,       % ===========================================================                             framesep = 3pt,%expand outward.                                                           framerule = 0.4pt,%expand outward.                                                        xleftmargin = 3.7pt,%make the frame fits in the text area.                                xrightmargin = 3.5pt,%make the frame fits in the text area.                               % ===========================================================                             rulecolor = \color{Red}     }          \lstdefinestyle{A}     {       style = Common,       backgroundcolor = \color{Yellow!10},       basicstyle = \scriptsize\color{Black}\ttfamily,       keywordstyle = \color{Orange},       identifierstyle = \color{Cyan},       stringstyle = \color{Red},       commentstyle = \color{Green}     }          \lstdefinestyle{B}     {       style = Common,       backgroundcolor = \color{Black},       basicstyle = \scriptsize\color{White}\ttfamily,       keywordstyle = \color{Orange},       identifierstyle = \color{Cyan},       stringstyle = \color{Red},       commentstyle = \color{Green}     }          \usepackage{mdframed}          \pgfplotsset{compat = 1.8}          \usetikzlibrary{arrows, decorations.markings, calc, fadings,       decorations.pathreplacing, patterns, decorations.pathmorphing, positioning,       through, intersections, backgrounds}          \makeatletter     \tikzset{circle through extra radius/.code = {         % unorthodox addon for the through library                                                % needs to be used after 'circle through'!                                                % this can be avoided by slightly changing the source                                     \tikz@addoption{%                                                                           \pgfmathsetlengthmacro\pgf@tempa{             \pgfkeysvalueof{/pgf/minimum width} + 2 * (#1)}%                                        \pgfset{/pgf/minimum width/.expanded = \pgf@tempa}%                                     }%                                                                                }}     \tikzset{       special style/.code = {%                                                                    \if#1\tikz@nonactiveexlmark           \pgfkeysalso{@special style}%                                                           \else           \pgfkeysalso{style/.expanded=#1}%                                                       \fi       },       @special style/.style = {draw = none, fill = none}     }     \makeatother          % line numbering for tabbing                                                             \newcommand{\tagthisaux}{%                                                                 \refstepcounter{equation}%                                                               (\theequation)%                                                                        }     \newcommand{\tagthisline}{\`\tagthisaux}     %                                                                                \newcommand\idea[1]{\begin{center}#1\end{center}}          %                                                                                \newenvironment{definition}[1][Definition]{\begin{trivlist}                                  \item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}      Here is the offending example but this example works fine for Qrrbrbilbel (maybe misspelled) and not me.               \begin{tikzpicture}[scale = .7,         every label/.append style = {font = \small},         dot/.style = {fill, outer sep = +0pt, inner sep = +0pt,           shape = circle, draw = none, label = {#1}},         dot/.default =,         small dot/.style = {minimum size = 2.5pt, dot = {#1}},         small dot/.default =,         big dot/.style = {minimum size = 5pt, dot = {#1}},         big dot/.default =       ]         \begin{scope}[rotate around ={-23.9625:(.75, -1)}]           \begin{scope}             \clip(-1, -4) rectangle (.5, 4);             \draw [samples = 50, domain = -0.99:0.99, xshift = 1cm, red, thick]             plot ({0.8 * (-1 - (\x)^2) / (1 - (\x)^2)},             {1.83 * (-2) * (\x) / (1 - (\x)^2)});           \end{scope}           \node[scale = .75, small dot = {below: \(P_1\)}] (P1) at (3, 0) {};           \node[scale = .75, small dot = {above, left = 3.5pt: \(P_2\)}] (P2) at           (-1, 0) {};           \node[scale = .75, small dot = {below: \(F\)}] (F)           at (.75, -1) {};           \path[blue] (F) edge (P1) edge (P2) (P1) edge (P2);           \path ($(P1)!.7!(P2)$) coordinate (Fm) node[small dot =           {below = 10pt, right = 3pt: \(F_m^*\)}] {};           \foreach \cPoint in {1, 2}             \foreach \dDeltaRadius[count = \cRadius from 0] in             {.0cm, .4cm, .8cm}               \node[draw, name path global/.expanded = \cPoint:\cRadius] at               (P\cPoint.center) (\cPoint:\cRadius) [circle through = (Fm),               circle through extra radius = \dDeltaRadius] {};           \foreach \cRadius in {1, 2} {             \tikzset{name intersections = {of/.expanded = {1:\cRadius} and                 2:\cRadius, name/.expanded = n'-\cRadius}}             \foreach \cSolution in {1, 2}               \node[black, scale = .5, big dot =               {right: $\ifnum\cSolution = 1\expandafter\tilde\fi F^*_\cRadius$}]               (n-\cRadius-\cSolution) at (n'-\cRadius-\cSolution){};           }         \end{scope}     \end{tikzpicture}


title: How to customize selected slides in latex?

text: I'm new at using `beamer`, and I would really appreciate your help. Preparing a presentation I've chosen the `Goettingen` theme, which places a sidebar showing the contents for each of the slides. I would like to remove it from the title page and the table of contents, so frames 1 and 2 would   1. show a different them with the same colourtheme, or    2. find a command to remove the sidebar from the selected frames.  This is mi minimal example,               \documentclass{beamer}          \mode<presentation>     {       \usetheme{Goettingen}            \usecolortheme{beaver}        \usefonttheme{default}         \setbeamertemplate{navigation symbols}{}       \setbeamertemplate{caption}[numbered]     }           \usepackage[spanish]{babel}     \usepackage[utf8x]{inputenc}          \title[ShortTitle]{Fulltitle}     \author{GV, R}     \institute{University}     \date{16 de Junio, 2014}          \begin{document}          \begin{frame}       \titlepage     \end{frame}          \begin{frame}        \frametitle{Contents}       \framesubtitle{}       \tableofcontents      \end{frame}          ....          \end{document}