title: Sidenotes and marginnotes change color when hyperlinks break over a line in tufte-latex

text: When using the `tufte-book` or `tufte-handout` document class, if a sidenote or marginnote is placed on a line that ends with a hyperlink which continues onto the next line (i.e. the hyperlink breaks over the end of the line), then the sidenote/marginnote takes on the coloring of the link. The MWE below shows this behavior. Shortening the long links so that they no longer break onto the next line removes the coloration from the corresponding marginal material.               \documentclass{tufte-book}     \hypersetup{colorlinks}          \begin{document}          Here is my label.\label{label}          This\sidenote{this is colored} \hyperref[label]{is a very very very very long link that breaks onto the next line}.          This\sidenote{this is not} \hyperref[label]{is a short link}.          This\marginnote{this is colored} \hyperref[label]{is a very very very very long link that breaks onto the next line}.          This\marginnote{this is not} \hyperref[label]{is a short link}.          \end{document}      ![tufte-latex and hyperref colored marginalia](http://i.stack.imgur.com/XiIhH.png) How can I prevent marginal material from taking on the link color in this situation?


title: How should I handle bibtex files of my co-authors?

text: I have my own master bibtex files that I use in all my research papers, which I strive to keep up-to-date. However, I have numerous co-authors with whom I am writing papers, and they sometimes send me their bibtex files as they contribute to our common article tex file. Occasionally, their files contain entries for the same articles in my master file, with the same bibtex reference name (whatever that is called). Can I just save their file in my bib folder and then use it like this in my tex file?               \bibliography{MyBiblioFile,MySecondBibliofile,CoAuthorsBiblioFile}      What I would want is that in the cases that our bibtex names are the same, then it uses my bibtex file first. Is that what occurs? I am on a grant deadline, so I'd really appreciate a fast answer. And I'd rather not have to sort through the bibtex file comparing entries, if I can be confident that my file will get preference by being first on the list, since there are hundreds of entries in the files. Thanks very much and I'm very happy for this resource.


title: Help me to debug long LaTex equations with errors

text: I want to learn debugging of long LaTeX equations like below:               $\tau=\int\frac{dt}{\gamma} = \int\sqrt{1-\frac{v(t)^2}{c^2}}dt = \int\sqrt{1-\frac{1}{c^2}\left(\left(\frac{dx}{dt}\right)^2+\left(\frac{dy}{dt}\right)^2+\left(\frac{dz}{dt}\right)^2 \right) dt$      I have tried to find LaTeX -debugger in places such as iPad's MathBot but MathJax is pretty much the best tool as you can see below and particularly this script here but the tool is only for ready outputs, I press it and it will display in red if something wrong. I would be very happy if I found some tool that put my equation to red in points where I may have error, does such debugging TeX -tool exist? ![enter image description here](http://i.stack.imgur.com/sfQBw.jpg) **Perhaps useful to readers** >   1. Help me to write Long LaTeX equations fast with colours and possibly > with other aids > >   2. How to best debug LaTeX? > >


title: "Too many math alphabets" error

text: I just got the error               Too many math alphabets used in version normal.      on a document I'm editing. What can I do to fix this, other than stop using an alphabet? All I've found online is instructions on what to do if you're using the bm.sty package, which I'm not calling (but maybe it's hidden in the AMS stuff?). I'll note, the thing that broke it was adding mathrsfs and using `\mathscr`. Anyways, as you'll see in my preamble, I tried what they suggested anyways, and it didn't work. My preamble:               \documentclass[11pt]{amsart}       \newcommand{\bmmax}{0}       \newcommand{\hmmax}{0}       \usepackage{amsmath, amssymb, amsthm, latexsym, amscd, enumerate, MnSymbol,bbm, etex,nicefrac,mathrsfs}      I'm using               \mathbf     \mathcal     \mathfrak     \mathscr     \mathsf     \mathbb     \mathbbm %(for a lower case blackboard bold letter)      I recognize this is a lot of math fonts, but doesn't seem unreasonable. * * * **EDIT:** getting rid of MnSymbol fixed things...


title: Inserting git commit date without hooks

text: Is there a way to insert the last git commit date into a document without having to add git hooks (like the gitinfo package does it)? I'm not 100% sure how LaTeX packages work, but if they can access the current directory during compile-time and if they can execute external commands, that should easily be possible...


title: Vectors and ClassicThesis (with eulermath)

text: Normaly I use ClassicThesis with the `eulermath` option. When I started to use vectors, I redefined the standard command as               \renewcommand{\vec}{\mathbf}      The problem is that that the letter written whit `mathbf` is completely different to the letter written in `eulermath`. How can I fix this problem? This is a MWS:               \documentclass[%         10pt,%         a4paper,%         onside,%         headinclude,%         footinclude,%         BCOR5mm,%         captions=tableheading]%             {scrartcl}          \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}          \usepackage[french]{babel}          \usepackage{amsmath}          \renewcommand{\vec}{\mathbf}          \usepackage[%         nochapters,%         beramono,%         eulermath,%         pdfspacing,%         listings]%             {classicthesis}          \author{Author}     \title{Test}     \date{}          \begin{document}          \maketitle          As you can see, there is a big difference:     \[        a \neq \vec{a}     \]          \end{document}


title: How to adjust the space between pictures using minipage?

text: I use minipages to place three graphs, however the spaces between each two is not with the same width. Here is the code, may someone help me? and how to locate the (a) (b) (c) above the each of the graph?                   \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{         shapes.geometric,         positioning,         fit,         calc     }     \usepackage{scalefnt}     \begin{document}     \begin{figure}[htbp]     \hspace{-4mm}     \begin{minipage}{0.33\linewidth}     \centering     %\includegraphics[width=2.3in]{image/CompositionalStucture}     (a)     \tikzset{      block/.style = {circle, draw,align=center,inner sep=0pt},      line/.style = {draw,->},      }     {\scalefont{0.8}     \begin{tikzpicture}[node distance=15mm]     \node[block,minimum size=6mm] (s2) {1};     \node[block,right of =s2,anchor=center,minimum size=4mm] (s3){2};     \node[block, right of=s2,anchor=center,,minimum size=6mm] (s4) {};          \path[line] (-0.8,0)-- (s2){};     \path[line] (s2)-- node[above]{Err}(s4);     \path[line] (s2) to [out=120,in=40,looseness=5] node[above] {$\Sigma$/Err}(s2);     \path[line] (s4) to [out=120,in=40,looseness=5]node[above] {$\Sigma$}(s4);     \end{tikzpicture}     }     %\red{2}     \end{minipage}     \begin{minipage}{0.33\linewidth}     \centering     %\includegraphics[width=2.3in]{image/CompositionalStucture}     (b)     \tikzset{      block/.style = {circle, draw,align=center,inner sep=0pt},      line/.style = {draw,->},      }     {\scalefont{0.8}     \begin{tikzpicture}[node distance=15mm]     \node[block,minimum size=6mm](s2) {1};     \node[block,right of =s2,anchor=center,minimum size=4mm] (s3){2};     \node[block, right of=s2,anchor=center,minimum size=6mm] (s4) {};          \path[line] (-0.8,0)-- (s2){};     \path[line] (s2)-- node[above]{ru}(s4);     \path[line] (s2) to [out=120,in=40,looseness=5] node[above] {$\Sigma$/ru}(s2);     \path[line] (s4) to [out=120,in=40,looseness=5]node[above] {$\Sigma$}(s4);     \end{tikzpicture}     }     %\red{3}     \end{minipage}     \begin{minipage}{0.33\linewidth}     \centering     %\includegraphics[width=2.3in]{image/CompositionalStucture}     (c)     \tikzset{      block/.style = {ellipse, draw,align=center,inner sep=0pt},      line/.style = {draw,->},      }     {\scalefont{0.8}     \begin{tikzpicture}[node distance=10mm]     \node[align=center](s1) {\ldots};     \node[block,minimum size=3.5mm,below of =s1](s5) {(19,1)};     \node[block,minimum size=3.5mm,below of = s5](s6) {(20,2)};          \path[line] (s1)-- (s5);     \path[line] (s5)-- node[right]{ru}(s6);     \end{tikzpicture}     }     %\red{3}     \end{minipage}     \caption{Monitoring Automata}     \label{fig:monitoringAutomata}     \end{figure}          \end{document}       ![enter image description here](http://i.stack.imgur.com/Q6sqb.jpg)


title: Oversized colored row in beamer block

text: As a follow up to this question, I am trying to insert tables in my beamer presentation so that they have the same style as blocks. However, I want to avoid using rules in my tables, and I am trying to used colored rows (with package `xcolor`) to improve readability. Here is an example of my code:               \PassOptionsToPackage{table}{xcolor}     \documentclass{beamer}          \usepackage{tabularx}          \definecolor{RowColorOdd}{rgb}{0.914,0.914,0.953}     \definecolor{RowColorEven}{rgb}{1,1,1}          \usetheme{Darmstadt}     \usecolortheme{seahorse}          \begin{document}          \begin{frame}[plain]       \begin{block}{\centering\begin{tabularx}{1\textwidth}{@{}p{0.56\textwidth}@{}X@{}X@{}}\textcolor{white}{Header 1} & \textcolor{white}{Header 2} & \textcolor{white}{Header 3}\end{tabularx}}%       \centering         \rowcolors{1}{RowColorOdd}{RowColorEven}%         \begin{tabularx}{1\textwidth}{@{}p{0.56\textwidth}@{}X@{}X@{}}%           1.1 & 1.2 & 1.3 \\%           2.1 & 2.2 & 2.3 \\%           3.1 & 3.2 & 3.3 \\%           4.1 & 4.2 & 4.3         \end{tabularx}%       \end{block}%     \end{frame}          \end{document}      However, this code results in the following table, where rows are oversized with respects to the block frame: ![Result](http://i.stack.imgur.com/C7ERt.png) Any idea how I can fix this ?


title: point-and-click open source javascript equation editor for latex?

text: Does anyone have experience with a good open source equation editor for online use? I'm not interested in WYSIWYG (What are the Open source WYSIWYG Independent Web Equation Editors available on LaTeX/MathML), just a nice point-and-click solution for inputting things like `$\frac{}{}$` etc.


title: Remove entries from short ToC but not from long ToC

text: Please find a minimal example illustrating this question below. The problem is this:   * There is only one appendix chapter, which is divided into several paragraphs. These paragraphs should appear in the detailed ToC (made possible using the shorttoc package) but not in the short ToC.   * In the detailed ToC appendix paragraphs (but only appendix(!!) paragraphs) should appear as sections meaning they are intended to be aligned on the same level as sections in the rest of the ToC. The solution shown in the minimal example arised from the answers to two related questions I posted here. However, one problem is still unsolved: _How can I achieve in the code given below that the appendix sections(=paragraphs) do not figure in the short ToC (which currently they do since paragraphs actually are sections modified so that they look like paragraphs)?_ I found several related problems on the web but in the end they amount to removing certain sections from ToC (see the parts of my code commented out). This of course has the consequence that they do not appear in the detailed ToC either since the detailed ToC gets its data from the .toc file ... I hope I made clear what the problem is!? Seems to me a quite tricky issue!               \documentclass[10pt, a4paper]{report}          \usepackage[titletoc]{appendix}     \usepackage{titlesec}     \usepackage{titletoc}     \usepackage{shorttoc}     \usepackage{hyperref}          %\newcommand{\nocontentsline}[3]{}     %\newcommand{\tocless}[2]{\bgroup\let\addcontentsline=\nocontentsline#1{#2}\egroup}          \begin{document}          \setcounter{secnumdepth}{3}                                       \renewcommand*\contentsname{Contents (detailed)}                  \pdfbookmark[1]{Contents}{toc}                               \shorttoc{Contents}{1}                                            \cleardoublepage                                                  \setcounter{tocdepth}{4}                                     \renewcommand*\contentsname{Contents (detailed)}             \pdfbookmark[1]{Contents (detailed)}{toc (detailed)}         \tableofcontents          \chapter{Test Chapter}     \section{Test Section}     \subsection{Test Subsection}     \subsubsection{Test Subsubsection}     \paragraph{Test Paragraph}          \begin{appendices}          \renewcommand\thechapter{}          \chapter{Test Appendix}          \titleformat{\section}[runin]       {\normalfont\normalsize\bfseries}{}{1em}{}     \titlespacing*{\section}       {0pt}{3.25ex plus 1ex minus .2ex}{1em}     \titlecontents{section}[1.5em]       {}{}{}{\titlerule*[7.5pt]{.}\contentspage}          %\tocless\section{Test Section One}     \section{First section looking like a paragraph}     %\tocless\section{Test Section Two}     \section{Second section looking like a paragraph}          \end{appendices}          \end{document}


title: Spacing of \multline inside align (i.e. \multlined)

text: Related with How can I use multline within an align environment?. Consider this document:               \documentclass{minimal}     \usepackage{amsmath,mathtools}     \begin{document}     \begin{align*}      & \left[k(k+\hbar),[k(k+\hbar),z]\right] \\      & \qquad = 2[k(k+\hbar),m_yx-m_xy+i\hbar z] \\      & \qquad = 2m_y[k(k+\hbar),x]-2m_x[k(k+\hbar),y]+2i\hbar[k(k+\hbar),z] \\      & \qquad = 4m_y(ym_z-m_yz)-4m_x(m_xz-xm_z)+2\left\{k(k+\hbar)z-zk(k+\hbar)\right\} \\      & \qquad = \!\begin{multlined}[t][10.5cm]       4(m_xx+m_yy+m_zz)-4(m_x^2+m_y^2+m_z^2)z+{} \\       +2\left\{k(k+\hbar)z-zk(k+\hbar)\right\} .      \end{multlined}     \end{align*}     \end{document}      ![enter image description here](http://i.stack.imgur.com/GWmus.png) This gives the alignment I'm looking for. But there are a couple of nitpicks: 1) Why do I need the `\!` before `\begin{multlined}`? Is there some other way of coding that removes the need for it? 2) The use of a hardcoded width (`[10.5cm]`) is less than optimal. I'd like to have the last line shoved to the right, or maybe right-aligned with the longest line. Any chance this can be achieved?


title: Paragraph break when combining tabbing and font change

text: I have found a strange behavior when combining the `tabbing` environement with a font change. When I write the following code               blah blah blah blah     blah blah blah blah     blah blah blah blah     \begin{tabbing}     SELECT \= * \\     FROM \> Student S \\     WHERE \> Dept = 1     \end{tabbing}     more more more more     more more more more     more more more more      the `tabbing` environment DOES NOT start a new paragraph and therefore the subsequent text (more ...) is not indented. On the other hand when I want to change to `\sf` within the `tabbing` environment as follows               blah blah blah blah     blah blah blah blah     blah blah blah blah     \textsf{     \begin{tabbing}     SELECT \= * \\     FROM \> Student S \\     WHERE \> Dept = 1     \end{tabbing}     }     more more more more     more more more more     more more more more      THERE IS a paragraph break and the subsequent text is therefore written indented. Any idea why this happen and how to circumvent it?


title: TikZ labelling venn diagram

text: I have a 3-circle venn diagram               \def\firstcircle{(0,0) circle (2cm)}     \def\secondcircle{(55:2.67cm) circle (2cm)}     \def\thirdcircle{(0:3cm) circle (2cm)}          % Now we can draw the sets:     \begin{tikzpicture}         \draw \firstcircle node[below] {$A$};         \draw \secondcircle node [above] {$B$};         \draw \thirdcircle node [below] {$C$};     \end{tikzpicture}      How do I add text labels where the circles overlap?


title: How to render some macro content twice?

text: I am looking for a three-column layout, in which two columns contain two seperate lists, and the third column a summary of the two lists. ![Mockup](http://i.stack.imgur.com/VW7MH.png) I am under the impression that there is no "native" way to do this in LaTeX (and haven't found a package that appears to do the trick), so in a first step I have prepared a custom environment and a custom item entry macro:               \documentclass{scrbook}     \usepackage{multicol}     \newenvironment{MyList}[1]{         \subsection{#1}         \begin{enumerate}     }{         \end{enumerate}     }     \newcommand{\myEntry}[2]{\item \textbf{#1} -- #2}     \begin{document}     \begin{multicols}{3}     \begin{MyList}{ListOne}     \myEntry{OneOne}{Some text regarding item OneOne}     \myEntry{OneTwo}{Some text regarding item OneTwo}     \end{MyList}     \columnbreak     \begin{MyList}{ListTwo}     \myEntry{TwoOne}{Some text regarding item TwoOne}     \myEntry{TwoTwo}{Some text regarding item TwoTwo}     \end{MyList}     \columnbreak     \end{multicols}     \end{document}      But that does not even take me half of the way. I need to render the contents of my macros _twice_ : Once in the summary column, once in the individual list column. Not only that, but on the opposite page I would have to do it _the other way around_ (i.e., individual column first, summary column second). It's pretty clear that no simple replace-this-with-that transformation can do that, and that some "programming" is required, but I have no idea **if** there is some way to do this in LaTeX. I could probably write some Perl script to do it via a preprocessing step, but _boy_ does _that_ feel hack-ish... If there _is_ a way to do this in LaTeX, could someone please give me some pointers what to look for?


title: Whats the appropriate paper size command with xelatex these days?

text: i am trying to use xelatex from the mactex 2012 package to build a paper at DIN A4 paper size. using any of the following commands does not do the trick, it keeps set at 21,59 × 27,94 cm which is us-letter format i guess. those are the commands i found by researching on the internet to change the paper size:               \documentclass[paper=a4]{report}      throws the error `LaTeX Warning: Unused global option(s): [paper=a4].` same thing using just `[a4]`               \documentclass[a4paper]{report}      does not throw the error, but its not changing the paper size either. it simply does nothing. so my question is: how do i set the paper size to A4 = 21 × 29,7 cm correctly?


title: Looking for guides on setting text with regards to good typography

text: I'm about to dive into LaTeX in preparation for writing a (technical) Master's Thesis. Since I'm kind of disappointed with the disregard to typography that is sometimes shown in such works I want to do it better, and just picked up _The Elements of Typographic Style_ by Robert Bringhurst. Thanks to LaTeX and clever templates there are of course many things I no longer need to worry so much about, but there were interesting notions such as using small caps for acronyms and text figures ("old-style" small numbers), which I'll likely use rather frequently. I've found the syntax for these two, but I fear there are other aspects that I should also know right from the beginning so that I correctly set the markup right away and don't later need to go through the document for all that stuff. So long story short: Does someone know a nice guide on using LaTeX in regards of good typography, rather than all the technical aspects of constructing and structuring a document for which there's plenty of reference?


title: Auctex indentation with xemacs

text: I'm running xemacs 21.4.22 and auctex 11.66 on a win7 PC. Althought I'm quite sure auctex is loaded (e.g. I got the LaTeX menu with some AUCTeX references). I cannot get indentification to work. Pressing TAB gives me the following message in the minibuffer:               Symbol's function definition is void: match-string-no-properties.      Same message when I try M-x fill-paragraph or any of the kind. Note that I use to have auctex indentation working on previous xemacs and auctex versions, so I know what I'm expecting. I turned to the new version to get the preview function on top, but it looks like I have to choose between indent and preview features which is as awkward as it is frustrating.


title: What is the mandatory argument of alignedat for?

text: `alignedat` has a mandatory argument. But Herbert (in his `mathmode.pdf`) wrote as follows, ![enter image description here](http://i.stack.imgur.com/XYySj.png) I have made a trial and error, I noticed that the largest number that can be passed is 1073741823 and no failure occurs.               \documentclass[twocolumn]{article}     \usepackage[a4paper,margin=1cm]{geometry}     \usepackage{amsmath}     \begin{document}     \begin{enumerate}         \item The degree of (C) is 3.         \item The degree of (A) is 1.         \item%         $\!         \begin{alignedat}[t]{1073741823}           -3x(x+1)&-2x(x-1)\\                   &+4(x^2-3x-1)                       &&=\rlap{$-3x^2-3x-2x^2+2x+v$} \\                   &   &&\hphantom{{}={}}{+}4x^2&&-12x-4\\                   &   &&=-3x^2 &&-3x-2x^2+2x+v \\                   &   &&       &&+4x^2-12x-4 \\                   &   &&=\rlap{$-x^2-13x-4$}         \end{alignedat}         $     \end{enumerate}     \end{document}      My question: What is this argument for? Why is it mandatory if it is not necessary? It should be an optional argument, I think.


title: Can't use theorems in lyx (mac)

text: I want to switch to lyx, but I'm having a hard time trying to use environments. I red that they are supposed to be as a class in the drop down list at the top left (If I'm nor wrong, together with section, subsection, etc). But I don't see theorem or anything like that. I guess I can just use a piece of tex code, but I would like to use it properly. Am I doing something wrong or is there any problem with lyx? I'm using the 2.0.5.1 version for mac.


title: Using double for-loop in tikz

text: In the manual one can find the `...` option to obtain a range in the for-loop. For example:               \foreach \x in {0,0.1,...,6} {\x, }      On the other hand, one can have a for-loop which runs over two variables simultaneously. For example:               \foreach \i / \y in {1/0,2/0.25,3/0.5,4/0.75,5/1} {          \only<\i>{          \draw (0,0) -- (1,0) -- (1,1) -- (0,1) -- cycle;          \draw (0,0) -- (1,\y);          }     }      which can produce some simple "animation" when used along with beamer. My question is how to combine the two. Namely, I would like to have something like:               \foreach \i / \y in {1/0,2/0.25,...,5/1}      which will produce the list _(1,0),(2,0.25),(3,0.5),(4,0.75),(5,1)_. Is there a way to do it?


title: printing the value of a boolean to terminal without stopping latex

text: I'm trying to debug some LaTeX3 code. To do so I would like to write the value of an internally generated boolean to the terminal, but I don't want to stop the work-flow of the LaTeX run. For the sake of explanation, let's say the boolean is called               \l__my_private_boolean_bool      I don't want to do the following:               \bool_show:N \l__my_private_boolean_bool      because that stops everything. Instead, I would like to do something like the following:               \msg_term:x { Boolean~value~is:~~\use:c {l__my_private_boolean_bool}}       But what gets sent to the terminal is               Boolean value is: \__my_private_boolean_bool      I was expecting (and hoping) to see               Boolean value is:  false      or               Boolean value is:  true      Any suggestions? **EDIT** I've also tried:               \msg_term:x { Boolean~value~is:~~\cs_meaning:c {l__my_private_boolean_bool}}       But then I get a cryptic               \char"0      printed to the screen. > MWE This example does what I want, but what I would like to know is whether there is already a native LaTeX3 command that achieves the same thing as my `\__ace_show_bool:N`               \documentclass{article}     \usepackage{xparse}     \ExplSyntaxOn     \bool_new:N \l__ace_test_bool     \cs_new:Npn \__ace_show_bool:N #1 {         \bool_if:nTF { #1 }             { true }{ false }     }          \NewDocumentCommand{\testsetbool}{ m }{         \str_if_eq:nnTF {true}{#1}             {                 \bool_gset_true:N \l__ace_test_bool             }             {                 \bool_gset_false:N \l__ace_test_bool             }         \msg_term:x { Boolean~is:~~\__ace_show_bool:N \l__ace_test_bool }     }          \ExplSyntaxOff     \begin{document}          First \testsetbool{true}          Second \testsetbool{false}          Third \testsetbool{true}     \end{document}


title: Text overflows table cell width

text: I am building a LaTeX table for a report. I defined a fix width to the second (and last) column, so that it doesn't exceed the size of the page. For some reason, the text is overflowing the size of the cell. Here is my code:               \begin{table}[ht]     \centering     \begin{tabular}{| l | p{12cm} |}     \hline     \textbf{Código} & \textbf{CU03} \\ \hline \hline     \textbf{Nome} & Pesquisa \\ \hline     \textbf{Custo} & 3 \\ \hline     \textbf{Prioridade} & Alta \\ \hline     \textbf{Descrição} & O utilizador faz uma pesquisa simples por um paciente \\ \hline     \textbf{Pré-Condições} & O utilizador está autenticado na aplicação \\ \hline     \textbf{Pós-Condições} & São apresentados os resultados para a pesquisa feita \\ \hline     \textbf{Fluxo de acções} &          \begin{tabular} {l  l}             1.  É pressionado o menu “Documentos” \\             2.  É preenchido um ou vários dos campos disponíveis (campo1, campo2, campo3 ou       campo3) \\             3.  É pressionado o botão “Procurar” \\             4.  São apresentados os resultados \\         \end{tabular}      \\ \hline     \textbf{Dependências} & ~\ref{tab: CU01} (CU01)\\ \hline     \textbf{Mokup} & Mokup03 \\ \hline     \textbf{Testes} & TODO \\ \hline     \end{tabular}     \caption{CU03}     \label{tab: CU03}     \end{table}      and my output is this: ![table with overflowing cell](http://i.stack.imgur.com/A3nKL.png) One last thing, I am using scribtex to compile my code.


title: Implementing a way to show data structures in LaTeX

text: Is there a way to implement data structures in LaTeX? I am currently taking two classes that require large numbers of heaps (min,max) and queues (FIFO,LIFO) and the like to be drawn after inserting elements. I would like there to be a way for me to implement something that would all me to pass in the number to add the the structure, and then draw it or something? Currently, I have little programs written in C++ that take in the inputs, and then spit out the correct latex code (using some fairly horrible syntax), which I then copy and paste, but this is annoying (though far better than drawing everything manually). **what I have now:**   **input:** 4 ci5 ci6 ci7 cp cr cp   **output:**               \[\begin{array}{|c|c|c|c|}         \hline         5 &6 &7 & \\         \hline     \end{array}\]     \[\begin{array}{|c|c|c|c|}         \hline         6 &7 & & \\         \hline     \end{array}\]      Is there a way to do this in purely in LaTeX?


title: Table align in description environment

text: Why table doesn't align as a text in description environment? I want it has same left indent and width as text. Is that possible?               \documentclass[a4paper,oneside]{book}     \usepackage[paper=a4paper, left=1.5cm, right=1cm, top=1.7cm, bottom=2.5cm]{geometry}     \usepackage{ltablex}     \usepackage[utf8]{inputenc}     \parindent=0pt     \begin{document}     \textbf{Just an example}          \begin{description}     \item[\textit{Lorem Ipsum is}] \hfill \linebreak     Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard.     \end{description}          \begin{description}     \item[\textit{Lorem Ipsum is}] \hfill \linebreak     Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard.     \begin{tabularx}{\linewidth}{|X|X|X|} \hline     {\centering Header1} & {\centering Header2} & {\centering Header3} \\ \hline     cell 1.1 & Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard  & cell 1.3 \\ \hline     cell 1.1 & Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard  & cell 1.3 \\ \hline     \end{tabularx}     \end{description}          \begin{tabularx}{\linewidth}{|X|X|X|} \hline     {\centering Header1} & {\centering Header2} & {\centering Header3} \\ \hline     cell 1.1 & Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard  & cell 1.3 \\ \hline     cell 1.1 & Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard  & cell 1.3 \\ \hline     \end{tabularx}          \end{document}      ![enter image description here](http://i.stack.imgur.com/PxfLF.png)


title: Quick way to enter Norm in LyX?

text: In LyX, if I go to the insert delimiters menu, I can insert a norm. Is there way to attach a shortcut to this? By norm, I am referring to the double bar on each side.


title: Included PDF gets corrupted after Acrobat’s color conversion

text: I found a strange error … I’m typesetting a musical score with Sibelius 7. And to add some text and notes I use LaTeX (i.e. `xelatex` but the error is the same with `pdflatex`). To get a complete PDF of the text and the score I use `pdfpages` to input the score PDF into the TeX document, like this               \documentclass{scrartcl}          \usepackage{pdfpages}          \begin{document}     \includepdf{score}     \end{document}      Which produces this output: ![Input to Acrobat](http://i.stack.imgur.com/LRnfg.png) To change the color of some other included images I use Acrobat’s color conversion (Gray Gamma 1.8; keep black) and that make the result look bad: ![Acrobat’s output](http://i.stack.imgur.com/GaC5n.png) **Proceeding**   Create `score.pdf` with Sibelius 7   → include `score.pdf` in `input.tex` with `pdfpages`   → run `pdflatex input` or `xelatex input`   → open `input.pdf` with Acrobat [first screenshot]   → convert colors using “Gray Gamma 1.8” and “keep black“ (?) option   → save converted PDF as `output.pdf` [second screenshot] If I color convert `score.pdf` directly with Arcobat there are no problems, why I guess there is an issue with `pdfpages` … any ideas? You can find all files in this ZIP (http://tweh.de/texsx/pdfpages_error.zip) (its my server). * * * I asked the same question in the german typography community typografie.info (direct link to my question). * * * Since I didn’t find a real solution yet I started a third thread at HilfDirSelbst.ch (in german). It seems like it’s an Acrobat bug but I’m not sure right now. I’ll be back here if it comes out as a TeX problem … ;-)


title: Sharp corners to tcolorbox

text: This works:               \documentclass{article}          \usepackage{tcolorbox}     \tcbuselibrary{theorems}     \tcbuselibrary{skins}     \newtcbtheorem[number within=section]{coloredtheorem}{Theorem}{colback=red!15{th}          \begin{document}          \begin{coloredtheorem}{Pigs}{pig}     Pigs are pink.     \end{coloredtheorem}          \end{document}      But I want sharp corners. When I change defining line to               \newtcbtheorem[number within=section]{coloredtheorem}{Theorem}{colback=red!15, sharp corners}{th}      I get               Package pgfkeys Error: I do not know the key '/tcb/sharp corners' . . .      Is this a bug in packaging system? I am using Fedora Linux version 20, TeXLive installed from rpm-packages and system is updated with yum.


title: Why use \listoffigures \listoftables

text: Why do people include "Lists of Figures" and "Lists of Tables" in their theses/books? (as generated by \listoffigures, \listoftables, etc.) Besides the obvious reason that they take up space and hence make theses look longer. http://www.mhhe.com/mayfieldpub/tsw/fig-list.htm claims that these help readers locate visuals. But then shouldn't the list, be a list of thumbnails rather than five word summaries? This is only superficially related to TeX, but I feel like TeX contributes to the propagation of these sections because TeX makes it so easy to create them.


title: Which texmf directory to use for non-texlive deb-package

text: I'd like to provide a collection of packages/classes/fonts in a custom .deb package, i.e. that is not part of texlive. Which directory should I choose for installing? texlive tells me to use `TEXMLOCAL` for additional packages which is normally `/usr/local/share/texmf`. But debian says `/usr/local` is not allowed for deb- packages.


title: Including LaTeX font in PowerPoint chart

text: I am running Windows 7 and create some charts in PowerPoint 2010. I export the charts to PDFs and load them into a LaTeX document. Can I load the default LaTeX font into Office? How? Essentially, I just need a few letters in the LaTeX font, but in arbitrary positions in my charts.


title: How to prevent preview from discarding my PostScript constants defined in the preamble?

text: ## _Considerations:_   * I have to use `beamer` document class to create a step-by-step tutorial.   * I have to use `preview` package to trim everything outside `pspicture`.   * Using `standalone` document class is not possible because we cannot accomplish both requirements above.   * I have to define constants that must be available in both TeX and PostScript worlds.    * Constant declarations must not be verbose. A single declaration must provide a constant in both worlds at once. ## _What I have done:_   * I have defined (with the help of David Carlisle) a macro `\const[]{}{}` to defined a constant in both TeX and PostScript worlds at once. Please see the MWE below for the details. ## _MWE:_               \documentclass{beamer}     \usepackage[nomessages]{fp}     \newcommand\const[3][6]{%         \edef\temporary{trunc(#3}%         \expandafter\FPeval\csname#2\expandafter\endcsname             \expandafter{\temporary:#1)}%             \pstVerb{/#2 \csname#2\endcsname\space def}%     }          \usepackage{pst-node}          \usepackage[active,tightpage]{preview}     \PreviewEnvironment{pspicture}     \PreviewBorder=12pt          \const{Major}{3}% semi major     \const{Minor}{2}% semi minor          \begin{document}     \begin{frame}     \begin{pspicture}[showgrid](-\Major,-\Minor)(\Major,\Minor)         \pause         \psellipse(0,0)(!Major Minor)% produces GhostScript errors         %\psellipse(0,0)(!\Major\space \Minor)     \end{pspicture}     \end{frame}     \end{document}      ## _Problems:_ Compilation with GhostScript fails because all constants in PostScript world get discarded by `preview`. ## _Failed Solutions:_   * Moving               \const{Major}{3}% semi major     \const{Minor}{2}% semi minor      from preamble to the body of `pspicture`              \begin{frame}     \begin{pspicture}[showgrid](-\Major,-\Minor)(\Major,\Minor)         \const{Major}{3}% semi major         \const{Minor}{2}% semi minor         \pause         \psellipse(0,0)(!Major Minor)% produces GhostScript errors         %\psellipse(0,0)(!\Major\space \Minor)     \end{pspicture}     \end{frame}      is not possible because the constants in TeX world must be accessible for `\begin{pspicture}[showgrid](-\Major,-\Minor)(\Major,\Minor)`. ## _Bad Solutions:_   * Using `\psellipse(0,0)(!\Major\space \Minor)` instead of `\psellipse(0,0)(!Major Minor)` makes the RPN expressions cryptic.   * Using `\pstheader` is not convenient because I have to declare a single constant for each world manually. ## _Promising Idea:_ Edit `\const[]{}{}` implementation to create a new header file (if not exists) and append each PostScript constant to the the header file. Later this header file can be loaded with `\pstheader{}` macro. ## _Question:_ How to prevent preview from discarding my PostScript constants defined in the preamble while making my scenario done?


title: Cases environment without the brace

text: I want to vertically align one equation against two, similar to the `cases` environment but without the brace: e.g. similar environment to: ![withbraces](http://i.stack.imgur.com/TFdUs.png) There must be another solution to the alignment solution like Case equation without curly brace \- I'd like to label it as a single equation.


title: Reduce float size to fit page

text: I've got a longish sidewaystable which currently is to large for its page. At least with `\footnotesize` it is. With `\scriptsize` it becomes too small, which looks strange and is hard to read. **Is there some way to (semi-)automatically scale a table to best fit the page?** I'm thinking about some package which iteratively adjusts font sizes, or which does a magnification of a single box, or some such. Lacking an automated solution, what's the best way to adjust font sizes to a without too much trouble? I'd like to keep the header unscaled, and the caption as well if possible.


title: Align a figure in a specific position of a line?

text: I want to align a figure on the left, but not at the very beginning of the line, but 20 points away from the beginning of the line so that it is at the same width as an itemization that I did in the previous chapter. Anyone know how to do it? My code is               \begin{itemize}         \item F\"{u}r low-spin Komplexe         \item \"{a}usserste s, p, d- Orbitale     \begin{figure}[!htb]             \flushleft             \includegraphics[width= 7 cm]{./VBtheory.png}     \end{figure}     \end{itemize}      What should I change?


title: Wrap text to one line under cvitem

text: I am using the `moderncv` package. When listing items using the `\cvitem{}{}`, it seems to put these over two lines what I actually want is for everything to be on one line. Here is my code: `\cvitem{Programming Languages}{C, JAVA, Python}` This puts "Programming" and "Languages" on two separate lines instead of on a single line, as desired. Any ideas?


title: \newpage inside of \newtheorem

text: Ηow to enter `\newpage` in the environment so that each exercise is contained in its own page.               \newtheorem{exercise}{ \color{magenta} \Large \bfseries }[chapter]      Something seemingly simple but troubling enough time now without any result I would prefer `\newtheorem` . And this because I have already thousands of exercises and just want each one on a separate page so that I can make handwritten corrections


title: Parcolumns: Matching height of two adjacent columns

text: I am using `parcolumns` package for my resume. I have following section in it: ![enter image description here](http://i.stack.imgur.com/V7SMG.jpg) The `LaTeX` code corresponding to this section is as follows:               \begin{parcolumns}[nofirstindent, colwidths={1=.15\linewidth}]{2}       \colchunk[1]{%       \fontsize{8pt}{8pt}\selectfont{}%       EDUCATION\\*       \\*       \\*       \\*       [.5\baselineskip]       }       \colchunk[2]{%       \textbf{University of California, XYZ}\hfill 2011 - 2013 (Expected)\\*       Master of Science, Computer Science, 4.0/4.0\\*       [0.5\baselineskip]       \textbf{University of California, ABC}\hfill 2007 - 2011\\*       Bachelor of Science, Computer Science, 4.0/4.0       }     \end{parcolumns}      As you can see, I am having trouble aligning heights of two columns, 'EDUCATION' doesn't start from the top of the column. How do I achieve that?


title: How can I use \input and \include with biblatex (biber backend)?

text: I have a document with external files. The only reason I am using external files is to make it easier to organize my large project. I have taken a small piece of the larger project and attempted to give a concise overview of the problem. I have found similar queries, but they have not adequately addressed the issue. The two that I found:   1. BibTeX not working with \input or \include (closed)   2. Including a .bib file with \input does not work Normally I would create a nice single piece of code to add below. In this case, however, it would defeat the purpose of the question. I have included 3 pieces below—the main document, the included document (arbitrarily using \input or \include), and the bibliography file. When typesetting with TeX Live 2012, I receive the following error message: > Argument of \language@active@arg" has an extra }. > > ^^I\input{"Argument of Expert Opinion.tex"} UPDATE: There are two problems with the code below:   1. quotes need to be preceded by \string e.g. \string"file name with spaces.tex\string" (huge thanks to David Carlisle below!)   2. The slide with \parencite{Reed2007} did not have any text (besides the environments) see comments below. **Main Document:**               \documentclass[handout]{beamer}     \usepackage{fontspec}               \usetheme{Berlin}     \usecolortheme{beaver}     \setbeamerfont*{frametitle}{size=\normalsize}     \setbeamertemplate{navigation symbols}{}          \newenvironment{conclusion}{\begin{block}<2->{Schluss}}{\end{block}}          % Bibliography Stuff     \usepackage{csquotes}%must be before babel     \usepackage[german]{babel}%the bibliography locale must be before biblatex     \usepackage[backend=biber,style=authoryear]{biblatex}     \DeclareLanguageMapping{german}{german-apa}%after biblatex, important     \addbibresource{./bibexport.bib}%needs .bib extension, location of bib file          \usepackage{xparse}     \NewDocumentEnvironment{premise}{O{}}{%     % Start code with optional #1     \begin{block}     <2->{Ansatz #1}     }{%     %  End code with optional #1     \end{block}     }          \begin{document}          \section{Schema der Argumenten}         \input{"Argument of Expert Opinion.tex"}          \section{Bibliography}         \begin{frame}             \printbibliography         \end{frame}     \end{document}      **Slide for include: (Argument of Expert Opinion.tex)**               \begin{frame}     \frametitle{Scheme for Argument from Expert Opinion}         \begin{premise}[Major Premise]             Quelle E ist ein Sachkenner in Fach F, der sich Aussage A befasst         \end{premise}         \begin{premise}[Minor Premise]             E behauptet, dass Aussage A (in Fach F) wahr ist (oder nicht wahr)         \end{premise}         \begin{conclusion}             A ist möglicherweise wahr (oder nicht wahr)         \end{conclusion}         \parencite{Reed2007}     \end{frame}      **Bibliography: (bibexport.bib)**               @article{Reed2007,     author = {Reed, Chris and Walton, Douglas},     title = {{Argumentation Schemes in Dialogue}},     year = {2007},     pages = {1--11},     month = oct     }


title: Create references with part number and frame number

text: I created a beamer theme which uses parts (for lecture slides) and where the slides are numbered using the part number and the frame number. The frame number is reset at the beginning of each part. The problem is, when I create a reference with `\ref`, only the frame number is shown. How can I show both the part number and the frame number? Here is a minimal example:               \documentclass{beamer}     \AtBeginPart{\setcounter{framenumber}{0}}     \makeatletter     \newcommand{\slidenumber}     {slide \ifnum\c@part=0     \insertframenumber     \else     \insertpartnumber-\insertframenumber     \fi}     \makeatother     \begin{document}     \frame{\slidenumber, ref: \ref{one-two}}     \frame{\slidenumber}     \part{one}     \frame{\slidenumber}     \frame[label=one-two]{\slidenumber}     \part{two}     \frame{\slidenumber}     \frame{\slidenumber}     \end{document}      This example shows "ref: 2" on the first slide, but I would like it to show "ref: 1-2". I guess I'll have to somehow redefine `\label` and/or `\ref`, but sadly, this is way beyond my TeX/LaTeX skills.


title: Custom algorithm environment enumerated with algorithm2e and appearing in table of contents

text: I would like to have two environments sharing a counter and appearing in the same list. One of these environments is algorithm2e and the other is a simple frame for holding algorithms I want to typeset in another way. The following code gets both environments to appear in the same list of algorithms, but their numbering doesn't match and the formatting for each line in the list of algorithms does not match. Here is the code I have so far:               \documentclass{book}     \usepackage[lined,vlined,linesnumbered,algochapter,ruled]{algorithm2e}      \newcommand{\listofalgorithmes}{\tocfile{\listalgorithmcfname}{loa}}     \usepackage{float}     \newfloat{framealgorithm}{tbp}{loa}[chapter]     \floatname{framealgorithm}{Algorithm}     \makeatletter     \let\c@foo\c@algorithm     \renewcommand{\fnum@framealgorithm}{{\bf  Algorithm~\theframealgorithm}\linespacing{1}}     \newcommand{\l@framealgorithm}{\@dottedtocline{1}{1.5em}{2.3em}}     \makeatother          \begin{document}     \listofalgorithms     \begin{algorithm}     Hello world!     \caption{Algorithm}     \end{algorithm}          \begin{framealgorithm}     Hello world from a Frame     \caption{Frame Algorithm}     \end{framealgorithm}          \end{document}      and here is the output ![output of code](http://i.stack.imgur.com/C196j.png)


title: Perl interpreter error appearing out of the blue

text: I am using TeXworks on Windows7. About an hour ago, I was happily working along and compiling documents just fine. Now, suddenly, when I try to compile anything, I get this error: latexmk.exe: The Perl interpreter could not be found. I closed the program and started it again, but I still get the error. Does anyone know what happened, or how I can fix it?


title: Font issue on using lualatex with beamer

text: I am trying to use `beamer` with `lualatex` to produce a presentation (MacTex 2011). Somehow, it doesn't seem to honor the font settings. See the sample below, is there anything I am missing here?               \documentclass[lualatex]{beamer}          \usepackage{fontspec}     \setmainfont{Helvetica}          \title{Something to do}          \begin{document}          \maketitle          \begin{frame}     \frametitle{I am impressed}     Text     \end{frame}     \end{document}


title: Conversion of graphics

text: since I am lacking of skills in tikz and others, I am currently doing some graphics in Powerpoint (Word) and trying to include them into LaTeX afterwards. For now, I am copying the graphic into paint, where I save them as .PNG-file. However, I get a pretty bad solution in the .PNG-file itself, in LaTeX it even looks way worse than in the origial. Do you have a better solution for me, so I can enjoy high-res graphics in LaTex? Best wishes, Jens


title: Is it possible to store \pgfmathresult in a pgfkey?

text: I would like to perform a calculation using `\pgfmathparse` and then store `\pgfmathresult` as the value of a `pgfkey`.                   \documentclass{article}         \usepackage{tikz}         \begin{document}            \pgfkeys{/junk/.initial=0}                 \pgfmathparse{5+10}            \pgfkeys{/junk=\pgfmathresult}                 junk = \pgfkeysvalueof{/junk}\par                 \pgfmathparse{8*5}                 % This second use of \pgfmathparse will change the contents of \pgfmathresult.            % The key value will now be changed to the new contents of \pgfmathresult.            junk is now = \pbfkeysvalueof{/junk}/par              \end{document}      The output of the code is:               junk = 15.0          junk is now = 40.0      So it looks like the value of the key points to the contents of the macro. If the contents of the macro change, then the value of the key changes. This is not what I want. I want the value of the key to be the value of the macro. If the value of the macro changes, then the value of the key should remain unchanged. I tried to use               \pgfmathsetmacro{\tempmacro}{5+30}     \pgfkeys{/junk=\tempmacro}      but if I use `\tempmacro` later on for something else               \pgfmathsetmacro{\tempmacro}{8*5}      then once again the value of the key is changed to the new value of the macro. I don't want to have to define a macro for every key value that is stored. That seems to me to defeat the purpose of using `pgfkeys`. I could just use the macros, but I would really like to use the keys. I also tried the suggestions in the post Store \pgfmathresult in a variable, but the result is the same.


title: Using the erdc package on Mac OS X

text: I have the MacTeX-2012 Distribution installed on my MacBook Pro running OS X 10.8.3 Mountain Lion. Opening TeX Live Update, I see that the erdc package is installed. However, as stated in `erdc.pdf`, mathgifg is required to provide access to Microsoft Georgia and ITC Franklin Gothic fonts, but mathgifg isn't available via TeX Live Update. ## Questions   1. How can I install mathgifg on OS X, since it isn't available on TeX Live Update?    2. Is it possible to install the Microsoft Georgia and ITC Franklin Goth fonts on OS X, or are they available only on Windows?   3. How can I install the fonts for use with MacTeX-2012?


title: Dedication page in article class

text: Alignment of dedication page in the document class `article`.               \documentclass[a4paper,12pt]{article}      \usepackage[paper=a4paper,left=30mm,right=20mm,top=25mm,bottom=30mm]{geometry}         \newenvironment{dedication}             {\vspace{6ex}\begin{quotation}\begin{center}\begin{em}}             {\par\end{em}\end{center}\end{quotation}}     \begin{document}     \begin{dedication}     \hspace{4cm}     \vspace*{9cm}{Dedicated to google and wikipedia.}     \end{dedication}     \end{document}      The alignment is moving horizontally but not vertical. Am i missing something here? Using Texmaker in Linux.


title: Is it possible to use the pipe character, |, to separate cells in a table?

text: I was wondering if it is possible to use the pipe character, `|`, instead of the `&` to separate cells. Something like this:               c1 | c2 | c3 \\     c4 | c5 | c6 \\      instead of this:               c1 & c2 & c3 \\     c4 & c5 & c6 \\


title: Was this set with TeX?

text: This maybe seems like a weird question, but since I started using TeX/LaTeX I see more and more things in "real life" that seem to be set with it. E.g. the train timetables here in Germany are set with some kind of TeX usually and you can clearly recognize the computer-modern-fontface. Now, after quite a long time, I looked something up in my Brockhaus (German encyclopedia) from 1980 and, though, I am no expert, I believe it was set with TeX too. The font looks pretty much like CM, the equations look a lot like CM and so on. ![enter image description here](http://i.stack.imgur.com/gpxtr.jpg) So, does anyone know what the Brockhaus was set with in the 80's? Or does anyone recognize what it was if it wasn't some kind of TeX?


title: Is there a good definition for highlighting PHP code in listings?

text: Does someone have a good definition for highlighting PHP code with the `listings` package?


title: everyshi.sty is missing, how to install

text: I'm trying to use the package pgfplots, and I have successfully installed it along with the pre-requisite pgf. Whenever I compile, I get the error message "The required file ...everyshi.sty is missing", and then nothing works. I am using a Windows (64bit) computer with MikTeX 2.9 (when I installed it, I only did the basic set up). I am using TeXnicCenter as my environment. Help would be much appreciated. Thank You.


title: Table of contents in book

text: I am preparing for my thesis and I have some problems on the tableofcontents. My text source is the following                 \documentclass[12pt,twoside,openright]{book}           ..................      ...............................            \include{{./Chapter1/chapter1}}            \thispagestyle{empty}                \thispagestyle{empty}    \bibliographystyle{alpha}            \bibliography{refs.bib}            \addcontentsline{toc}{chapter}{Bibliography}           \include{{./Samenvatting/Samenvatting}}            \addcontentsline{toc}{chapter}{Samenvatting}            \thispagestyle{empty}    \include{{./Samenvatting/summary}}            \addcontentsline{toc}{chapter}{Summary}            \thispagestyle{empty}    \include{{./Samenvatting/Sommario}}            \addcontentsline{toc}{chapter}{Sommario}            \thispagestyle{empty}    \include{{./ack/ack}}            \addcontentsline{toc}{chapter}{Acknowledgements}            \thispagestyle{empty}    \include{{./CV/CV}}            \addcontentsline{toc}{chapter}{Curriculum Vitae}           \thispagestyle{empty}      However, in the table of contents, there are some problems :   1. the last item (CV in my tex) does not appear.   2. The page number of later sections : from Bibliography to the end, are wrong. They match with the number in the total text, but do not match with the number of their pages. How could I fix this? Many thanks in advance.


title: Text environment with vertical header and border

text: I have no experience with creating latex environments, so I hope that someone would be so kind helping me trying to create a new text environment with a border and a vertical header to the right of the text area. I've tried to depict it using my MS Paint skills: ![image](http://i.imgur.com/FmcGV.png) Is there anyone who can help me create such an environment or give me some hints on how to do it? Any help will be much appreciated.


Is it possible to omit the word "and" before the last author name in the bibliography? I'll be grateful for any help, because I have no idea about where to find a solution. I use Lyx 2.0.0 and the bibliography is prepared with JabRef 2.7.2.


title: Extra alignment tab has been changed to \cr end template?

text: I get the error mentioned in the title of the question.               \begin{table*}[!ht]       \centering         \caption{\textit{first scenario : heuristic methods}} \label{Table2}         \resizebox{2\columnwidth}{!}{%          \begin{tabular}{|ccc||cccc||cccccccc|}     \multicolumn{3}{c}{\textbf{Instances}}     &\multicolumn{4}{c}{\textbf{Weekly Problem}}     &\multicolumn{8}{c}{\textbf{Daily Problem}}     &\multicolumn{3}{c}{}      &\multicolumn{4}{c}{\underline{Heuristic (WPA)}}     &\multicolumn{2}{c}{} & \multicolumn{3}{c}{\underline{Heuristic (DPA)}} & \multicolumn{3}{c}{\underline{Large Neighborhood Search (LNS)}}     \\     Staff &Activities &Periods  &Workload  &Transport costs  &Time(s)    &Gap   &Total activities &Activities added  &Total cost  &Time(s)  &Gap  &Total cost  &Time(s)  &Gap \\ \hline       3     &72         &10        &391       &2175            &5        &0\%         &90              &18                  &2425      &3600   &28\%    &3839      &2012     &21\% \\       \hline       3     &72         &10        &360       &2254            &2        &0\%         &90              &18                &2654      &3600   &36\%    &3095      &2000     &24\% \\         \hline       3     &72         &10        &402       &2147            &7        &0\%         &90                &18                &2887      &3600   &33\%    &3581      &2004     &22\% \\         \hline       5     &120        &10        &179       &2812            &2000     &1\%         &150             &30                  &4101      &3600   &59\%    &5194      &2000     &22\% \\       \hline       5     &120        &10        &359       &3432            &101      &5\%         &150             &30                  &5120      &3600   &44\%    &6646      &2005     &24\% \\         \hline       5     &120        &10        &285       &3409            &489      &7\%         &150             &30                  &4325      &3600   &34\%    &6156      &2001     &23\% \\       \hline       6     &140        &10        &137       &3384            &616      &13\%        &175             &35                  &6387      &3600   &70\%    &8382      &2000     &25\% \\         \hline         6     &140        &10        &240       &3145            &2000     &9\%           &175             &35                  &6175      &3600   &64\%    &8425      &2000     &21\% \\         \hline         6     &140        &10        &198       &3454            &1871     &12\%          &175             &35                  &6324      &3600   &57\%    &8642      &2000     &22\% \\         \hline          \end{tabular}%     }     \end{table*}      ![enter image description here](http://i.stack.imgur.com/l7STj.jpg) Thank you.


title: longtable: extra table structure after last entry

text: My long table extends one more column after the last row and is not smooth. What am I missing?               \usepackage{longtable}          \begin{longtable}{|l|l|}     \caption{sample table with extra lines} \\     \hline     \textbf{ID} & \textbf{symbol} \\ \hline     100505607 & LOC100505607\\ \hline     100506282 & unknown \\ \hline     100506342 & unknown \\ \hline     \label{tab:exclusivelyByAbid}     \end{longtable}


title: Edit space for overbraces in equation

text: I would like to use `\overbrace`s and `\underbrace`s in my equation. However, when I make the text for `\overbrace`s too long, the `\overbrace` doesn't contain the correct part. ![enter image description here](http://i.stack.imgur.com/pDOa0.png)               \documentclass[12pt]{article}     \usepackage{amsmath}     \begin{document}     \[     \rlap{$\overbrace{\phantom{(r+\epsilon)V_t}}^{\text{Required return}}$} (r+\epsilon)V_t     =     \rlap{$\overbrace{\phantom{V_{t+1}^e-V_t}}^{\text{Expected capital gain}}$}\underbrace{D^e_t+V_{t+1}^e-V_t}_{\text{Total expected return on shares}}     \]     \end{document}


title: text grouped style in sidewaystable

text: I have a problem with my `sidewaystable`. I have quite a lot text in one of my columns. I have used `tabularx` so that the text doesn't run out of the page at the right side. Now the text is in grouped style which looks odd and I would like to have it left-aligned. When I use `{llllll}` there is no word- wrap anymore so the text runs out of the page again. What can I do? Does anyone have an idea? This is my table:               \begin{sidewaystable}     \caption{Darstellung anderer Studien zur MMN/MMR bei depressiven Patienten}               \begin{tabularx}{\textwidth}{llXXXX}     \toprule      Studie & Verfahren & Patienten N & Medikation & Deviants & Ergebnisse\\     \toprule     Ogura 1993 & EEG & 36 Depression und Bipolare Störung & keine & Frequenz(Std 1000 Hz, Dev 2000 Hz), ISI: 1.5 $\pm 0.1$ s & verringerte MMN \\\\          Umbricht 2003 & EEG & 22 Depression & vermutlich ja & Dauer- und Frequenz-Deviants & Keine veränderte MMN\\\\          Kähkönen 2007 & EEG+MEG & 13, Depression, in akuter Episode & keine & 10 \% und 20 \% Frequenz-Deviants + „neue/komplexe Töne“ & erhöhte MMN bei 10\%-Frequenz-Deviants\\\\          Takei 2009 & MEG & 14, Depression in akuter Episode & ja & Dauer-Deviants (Std 50 ms, Dev: 100 ms) , Frequenz (Std: 1000 Hz, Dev 1200 Hz) Vokal-Deviants (Std:a/Dev:o), ISI: 445 $\pm$ 15 ms & verringerte mGFP der MMNm\\\\          He 2010 & EEG & 22 TRD-Patienten & keine Medikation ab 72 h vor Testung & Frequenz-Deviants (Std: 1100 Hz, Dev: 1200 Hz), ISI: 0.625 s, Dauer: 50 ms & erhöhte MMN\\\\          Qiao 2013 & EEG & 24, erste Episode & keine & Dauer-Deviants (Std: 50 ms, Dev:150 ms/ Std: 150 ms, Dev: 50 ms), Frequenz 700 Hz, ISI: 1000 ms & verringerte fronto-zentrale MMN-Amplitude bei Dev: 150 ms, MMN-Amplituden-peak-latency länger\\          \bottomrule           \end{tabularx}     \end{sidewaystable}


title: author-year and footnote citations in biblatex

text: I use `natbib` and switching to `biblatex` in order to produce documents that can be converted with relative ease between author-date citations with a reference list and the "everything in footnotes" style with a full citation at first occurrence and abbreviated citations thereafter. I feel a bit daunted. It does not seem likely that I can reasonably expect one source file can produce both formats simply by changing an option, but that might be the ideal solution. In any case, I am really just looking for advice on the best way to write my documents. For author-date citations, I like to freely mix references to authors and references to papers, and I give the first and last name of the author the first time it appears, the last name alone thereafter. So, a typical passage might look like this: > David Lewis's (1980) Principal Principle is one of my favorite principles. > One of my favorite papers is Lewis 1994. Everybody should be rational (Lewis > 1980; van Fraassen 1984). Lewis said a lot of things. For instance, he said > that everybody should be rational (1980), and he said that everybody should > drive on the right side of the road (1969). Now, even in `natbib`, I don't think I was coding these things right. For instance, I didn't know the right way to get the apostrophe in the first citation; I didn't know any automated way of enforcing my first-name-at-first- use-only policy; and I was making heavy use of `\citealp` for paper citations and `(\citeyear{XXX})` for parenthetical citations, which doesn't seem to be the recommended style. But what is the optimal way to do all this in `biblatex`? For the "everything in footnotes" style, it seems that substantial changes to my source will be necessary. Most citations will have to be moved to the end of the sentence, and I will have to use references to papers less freely since I will need to refer to them by title, which is cumbersome. Also, citations within footnotes will need to be restructured. Most obviously, they will need to be written with sensitivity to whether the citation is a first citation or not because first occurrence citations are long and will break the flow of a sentence. However, it does appear that at least I am not likely to have to learn any new citation commands for writing citations in footnotes beyond those I will need to learn to do author-date citations in `biblatex`. Any words of wisdom from more experienced biblatexers?


title: TeXworks won't detect my dictionaries

text: I followed the instructions on this page to install spell checking dictionaries. > If you have version 0.3 or later, you can use "Scripts -> Scripting TeXworks > -> Show Scripts Folder" and navigate to the parent directory in the window > that opens. (...) You should have a TeXworks resources directory in your > "user profile" directory, typically C:\Documents and Settings\Your Name. > This is automatically created the first time you run TeXworks, and some > default resources are copied there. There should be a dictionaries > subdirectory, but it is initially empty. Place the *.dic and *.aff files > there, and then re-start TeXworks. I let TeXworks open my scripts folder (which is _C:\Users\Pieter\TeXworks\scripts_ ), created a subdirectory called _dictionaries_ and added the DIC/AFF files for _en_US_. After restarting TeXworks it still doesn't report any spell checking languages. What gives?


title: Making a square centered at a point in TikZ

text: Im a newbie to TikZ, so this question may seem stupid. Im a looking at a facility location problem in the plane where I have generated some data points consisting of (x,y)-coordinates for each customer node and each facility node. In the literature, customers nodes are usually marked by a circular dot so I have used the notation               \draw [fill] (x,y) circle [radius=0.05];       for some point specified by (x,y). The facility nodes are usually marked with a small square. But how do I create a square centered at the point (x,y)? I have looked at rectangle function. But as I have the center point, this approach does not seem to be the right way to go. Can anyone help me here?


title: Biblatex: backref at the very end and year after title when referencing a reprint

text: I'm using `biblatex` to reference a reprint. I need to change the following in my MWE: i) the backref showing the page number should be at the very end (after the period) ii) the year of the reprinted book (test2) should go after the title and between parenthesis. So I would like to achieve the following:               Foo, John (2012), Test 1. Helsinki:Blah Press. Rpt. as Test 2 (2013). Chicago: Baz Press. (cit. on p. 1)      Here is the MWE:               \documentclass{article}          \usepackage[style=authoryear-comp,backend=biber,backref=true]{biblatex}          \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}     @Book{foo12,       author      = {John Foo},       title       = {Test 1},       year        = {2012},       publisher   = {Blah Press},       address     = {Helsinki},       related     = {foo13},       relatedtype = {reprintas}      }     @Book{foo13,       author    = {John Foo},       title     = {Test 2},       year      = {2013},       publisher = {Baz Press},       address   = {Chicago},      }     \end{filecontents}          \addbibresource{\jobname.bib}          \begin{document}     \textcite{foo12}     \printbibliography     \end{document}


title: Figure not being typeset properly

text: I'm writing a report with using the IEEE Transactions template, and the template itself includes an example figure:               \begin{figure}[htbp]     \begin{centering}     \textsf{A single column figure goes here}     \par\end{centering}     \caption{Captions go \emph{under} the figure}     \end{figure}      which is typeset very nicely as it should be. However, when I replicate that, but also add in an image:               \begin{figure}[htbp]     \begin{centering}     \includegraphics{photo of stuff}     \par\end{centering}     \caption{things}     \label{fig:stuff}     \end{figure}      I get no image in the body of the text as it should be, but instead an ugly sprawl of all my figures on the following page: ![Bad code doing bad things](http://i.stack.imgur.com/sudF0.png) Any ideas as to whats going wrong here and how to fix it would be greatly appreciate. Thank you!


title: How to order 3 images horizontally (two with sub-figure and the third one is one figure)

text: I put three figures in a row. One figure is independent one and with a caption underneath; the other two figures are sub-figures. Please see the picture below. ![image](http://i.stack.imgur.com/VZmIi.jpg) I tried to combine `minipage` with `subfigure`, but it didn't work. Can you please help me?


title: Command for transverse, and not \pitchfork, as used in Guillemin and Pollack

text: In Guillemin and Pollack's Differential Topology book, they use the notion of transverse, but not the \pitchfork to denote it. It is very similar, but has a 'T' in it instead of just a ' | ' in the symbol. The following picture (taken from the book preview in Google Books, page 68) shows the symbol ![enter image description here](http://i.stack.imgur.com/ykkAs.png) I and my peers have searched for a convenient way to produce this symbol, but the quick and easy ways produce unsatisfying result, such as \overline and \bar. Before we go and draw one and make a command, I thought I would see if anyone has knowledge of this being available in some package or a better way to get what we want. Thanks.


title: positioning two subfigure properly

text: I am trying to use subfigure               \documentclass[10pt,a4paper,xcolor=dvipsnames,xcolor=table]{beamer}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %                  PACKAGES     \usepackage{       mathrsfs, amsmath,    amsfonts,   amssymb,    makeidx,       graphics, textpos,    color,      everysel,   amsthm,       epigraph, enumerate,  mathrsfs,   bm,     amssymb,       amsbsy,   mathtools,  graphicx,   sidecap,    color,       tikz,     pgf,        xxcolor,    subcaption     }     \begin{document}     \begin{frame}       \frametitle{two subfig}       \begin{figure}[h]         \begin{subfigure}[h]{.6\textwidth}           \centering         \includegraphics[scale=.250]{images/graph.png}         \end{subfigure}         \begin{subfigure}[t]{.15\textwidth}         \includegraphics[scale=.2]{images/arrow.png}         \end{subfigure}       \end{figure}     \end{frame}     \end{document}      where two graph is in one png file `graph.png` and blue arrow over the grey balls is `arrow.png` As you can see, the two picture are overlapping over one another, though there is a lot of space on left. Any idea what can be done so that they are placed in a better way? ![two subfig](http://i.stack.imgur.com/DI1aD.png)


title: Stable alternative to \thepage

text: As I read and found out the command `\thepage` doesn't always output the correct page number. The proposed alternative is to use `\pageref{here}\label{here}`. But this seems too unhandy, because I have to change the label every time I want to get the current page, which makes it impossible to just replace it by a simple new command. P.S.: In the end I want to define this:               \newcommand{\see}[1]{\cref{#1}\ifthenelse{\equal{\pageref{#1}}{\thepage}}{}{ on \cpageref{#1}}}      where the part `on \cpageref{#1}` should only be output if it is not the current page.


title: What is the normal font used by LaTeX in the amspset class?

text: I am using the `amspset` package, which can be found here. I am using               \documentclass[reqno, 11pt, letterpaper]{amspset}     \usepackage{fullpage, amsthm, amssymb, amsfonts}      What is the right command to change the font? I like the 11pt size I have chosen. I just want to change it to the font a normal LaTeX document uses. I don't know the command for this.


title: Indicator at end of theorem

text: I'm writing a text with some very long theorem-environments in it and I find the italicised theorems visually not pleasing when they are rather longish. So I'm using the **definition** theorem style most of the times. This however has disadvantage that it is pretty unclear when a theorem actually ends. I have tried the following:               \documentclass{book}     \usepackage{amsthm}     \parindent0pt          \theoremstyle{definition}     \newtheorem{theorem}{Theorem}     \newenvironment{thm}{\begin{theorem}}{\hfill$\diamond$\end{theorem}}          \begin{document}          \begin{thm} This is some long theorem. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.           \begin{enumerate}     \item Part A     \item Part B     \end{enumerate}          Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. \end{thm}          Here is some text not in the theorem anymore.          \begin{thm}     Here is some other theorem that ends with a list.     \begin{enumerate}     \item Part 1     \item Part 2      \end{enumerate}      \end{thm}          Some more text.          \end{document}      The result is: ![LaTeX document](http://i.stack.imgur.com/xuNAr.png) I like the diamond indicator in theorem 1. It is not distracting and makes it very clear where the theorem actually ends. In theorem 2 however the position of the diamond looks a bit awkward. What would you recommend in such situations?


title: Creating labes on diagram edges

text: I want to add labels 3, 4, 5 on tree edges like you can see on picture, but I don't know how :( ![enter image description here](http://i.stack.imgur.com/SVm4T.jpg) My minimal example:                   \documentclass{article}         \usepackage[T1]{fontenc}         \usepackage{tikz}         \usepackage{tikz-qtree}              \usetikzlibrary{positioning}         \usetikzlibrary{trees}              \begin{document}              \begin{center}         \begin{tikzpicture}[sibling distance=40pt]         \tikzset{edge from parent/.style=         {draw,         edge from parent path={(\tikzparentnode.south)         -- +(0,-8pt)         -| (\tikzchildnode)}}}         \Tree [.\textrm{} [.$x_2=1$  ]                   [.$x_2\neq1$ [.$x_2=2$ ]                                [.$x_2\neq2$ [.$x_2=3$ ]                                             [.$x_2=4$ ] ] ] ]        \end{tikzpicture}        \end{center}             \end{document}


title: Rounding a coordinate in TikZ

text: I'm trying to combine animate's `\multiframe` command with a TikZ `\fill` command so that in every fourth frame, the top of my rectangle is moved by one unit:               \multiframe{20}{rya=10+-0.25}{       \fill[green!10] (4,0) rectangle (6,\rya);     }      The problem with my current approach is that instead of resizing the rectangle by one unit every fourth frame, it gets resized by a _quarter_ unit in _each_ frame. What I'm after is some kind of "floor" function that I could apply to `\rya`, or any kind of alternative way to achieve the same result. (There are some other things being animated at the same time, preventing me from simply lowering the frame rate and using `iya=10+-1` instead of `rya=10+-0.25`. I left them out here for the sake of brevity.)


title: Equation without any symbols

text: I got a strange Problem while writing on my bachelor thesis. If i set up a equation the result is displayed without any mathematic symbols. For example:               \begin{equation}                 \frac{2 + dc}{9}     \end{equation}      becomes ![Equation without +](http://i.stack.imgur.com/AM0IB.png) "=" does also not work. These are the packages i've used in this work, maybe there is one which breaks the equation stuff. Would be cool if someone could help me.               \usepackage[utf8]{inputenc} %Kodierung, Zeichensatz     \usepackage[ngerman]{babel} %Deutsche Sonderzeichen/Umlaute     \usepackage{tocloft} %Kontrolle über alle automatischen Listen     \usepackage{geometry} %Ermöglicht das erweiterte Verändern der Dokumentgeometrie     \usepackage{fancyhdr} % Erweiterte Formattierungsmöglichkeiten der Kopf- und Fusszeilen               \usepackage{etex}     \usepackage{ifthen} % ermöglicht If Bedingungen (\ifthenelse{}{}{})     \usepackage{xstring} % Auswerten und Manipulieren von Strings     \usepackage{tikz} %Erstellen und Manipulation von Grafiken, sowie Logische Operatoren          \usepackage{fourier} %Erweiterter Mathematischer Zeichensatz, nutzt Adobe Utopia Font     \usetikzlibrary{chains,shapes.arrows,fit} %Tikzlibrary zum erstellen der notwendigen Grafiken               \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{siunitx} %SI-Einheiten     \usepackage{xfrac}                    %%% Texteigenschaften     \usepackage[onehalfspacing]{setspace} %Zeilenabstand     \usepackage{microtype} %Mikrotypographischer Zeicheneigenschaften     \usepackage{mathptmx}     \usepackage[scaled=.90]{helvet}%Schriftart Times Roman     \usepackage{courier}%Schriftart Times Roman     \usepackage{parskip}          %%% Literaturverzeichnis und Zitate     \usepackage{url}     \usepackage[numbers]{natbib}     %\usepackage[natbib=true]{biblatex}          %%% Tabellenformattierung     \usepackage{longtable,ragged2e} %Erlaubt Tabellen über den Zeilenrand zu ragen     \usepackage{multirow}  %Verbinden mehrerer Zeilen in Tabellen        \usepackage{array} %Erweiterung der Tabellen und Array Umgebung      \usepackage{booktabs} %Verbesserung der Tabellenerstellung          %%% Objekteigenschaften     \usepackage{float}  %Verbesserte Eigenschaften von float-Objekten     \usepackage{pst-all} %PostScript macros     \usepackage{graphicx} %Erweiterte Grafikeigenschaften     \usepackage[margin=0pt,font={small,it,onehalfspacing,sf},labelsep=colon,parskip=6pt]{caption} % Formattierung der Objektcaptions          %%% Zusatzpakete     \usepackage[printonlyused]{acronym} % Verwalten und Erstellen eines Kurzzeichenverzeichnises     \usepackage[]{pdfpages} % Erlaubt das Einbinden von PDF-Dateien     \usepackage{etex} %Erweitert die bereitgestellten Packageregister


title: apacite not working in tex

text: I've been requested to change the bibliographic reference style of one of my papars to APA style, but when using the apacite command the document is not compiling. A MWE is shown below. My problems are: 1) when using `\usepackage{apacite}` and `\bibliographystyle{apacite}` with a `\citep` reference, I obtain an error:               ! "Argument of \citeauthoryear has an extra }."      2) If I change the reference style to `\cite` or `\citeA`, styles corresponding to apacite package, I obtain another error:               ! Extra \endgroup.      3) When trying to use the option `\usepackage[natbibapa]{apacite}`, it doesn´t recognise the option               ! LaTeX Error: Unknown option `natbibapa' for package `apacite'.      although the package apacite is actualized from 2013. I would thank any help since I have a short due date to present it and after a long search for a similar problem in forums I couldn't find any working answer. Thanks in advance               \documentclass[english]{elsarticle}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \usepackage{array}     \usepackage{units}     \usepackage{textcomp}     \usepackage{multirow}     \usepackage{amsmath}     \usepackage{esint}     \usepackage{babel}     \usepackage{apacite}     %\usepackage[natbibapa]{apacite}          \makeatletter     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.     %% Because html converters don't know tabularnewline     \providecommand{\tabularnewline}{\\}          \usepackage{endfloat}     \usepackage{array}          \makeatother          \begin{document}          \title{Title of my paper}          \author[rvt]{M.~Surname\corref{cor1}}     \ead{aaaaa@aaaa.com}     \author[focal]{A.B.~Doe}     \author[rvt]{C.D.~Smith}     \cortext[cor1]{Corresponding author}               \address[rvt]{Department of Physics, University of Aaaaa, Aaaaa St,     1234 City, Country }          \address[focal]{Institute of Technology, University of Bbbb,     Bbbb St, 4321 City, Country}          \begin{abstract}     The analysis of data from measurements is analyzed.      \end{abstract}          \begin{keyword}     key1\sep key2\sep key3\sep key4\sep key5.     \end{keyword}          \maketitle          \section{Section 1 of my paper}          Lorem ipsum ad his scripta blandit partiendo, eum fastidii accumsan euripidis in, eum liber hendrerit an. Qui ut wisi vocibus suscipiantur, quo dicit ridens inciderint id. Quo mundi lobortis reformidans eu, legimus senserit definiebas an eos \citep{author99,author05}. Eu sit tincidunt incorrupte definitionem, vis mutat affert percipit cu, eirmod consectetuer signiferumque eu per. In usu latine equidem dolores. Quo no falli viris intellegam, ut fugit veritus placerat per.          Ius id vidit volumus mandamus, vide veritus democritum te nec, ei eos debet libris consulatu. No mei ferri graeco dicunt, ad cum veri accommodare. Sed at malis omnesque delicata, usu et iusto zzril meliore.           \begin{equation}     A_{b}=\frac{B_{c}}{2\pi\mu}.\label{eq:Eq-classic}     \end{equation}          Dicunt maiorum eloquentiam cum cu, sit summo dolor essent te. Ne quodsi nusquam legendos has, ea dicit voluptua eloquentiam pro, ad sit quas qualisque. Eos vocibus deserunt quaestio ei.          \section*{References}          \bibliographystyle{apacite}     \bibliography{bibliotest}          \end{document}      And the bibliotest.bib file:               @article{author99,     title = {A fine title},     year = {1899},     volume = {40},     number = {12},     pages = {1052-1057},     author = {A.B. Cdefg and W. Z. John},     journal = {Madness}     }               @article{author05,     title = {The best title},     year = {1905},     volume = {40},     number = {12},     pages = {1052-1057},     author = {Doe, J. and Kirk, J.P.},     journal = {Insanity}     }


title: pgfplot: how to render 3dplot with colors black, white and gray

text: I my previous question, I rendered a 3d plot, but as I want to print my plots they should be in black, white or gray coloring format. How should I change the coloring scheme?               \documentclass{standalone}     \usepackage{pgfplots}     \pgfplotsset{compat=1.9}          \begin{document}     \begin{tikzpicture}         \directlua{             q = function(x)                 return x-1             end                 Z = function(x,y)                 return x^2+y^2+q(x)             end         }         \pgfmathdeclarefunction{Z}{2}{%             \edef\pgfmathresult{\directlua{tex.print(Z(\pgfmathfloatvalueof{#1},\pgfmathfloatvalueof{#2}))}}%         }%         \begin{axis}         [         grid=both,minor tick num=1,         xlabel=$x$,ylabel=$y$,zlabel=$z$,         enlargelimits,         tick align=inside,         domain=-1:1,         samples=30,         minor tick num=5,         ]         \addplot3 [surf] {Z(x,y)};         \end{axis}     \end{tikzpicture}     \end{document}


title: Where do I download .bst files for bibtex?

text: This should be a basic question, but my search engine is failing me. Where do I go to download .bst files for LaTeX/bibtex? Precise format is flexible but I want something that will work with natbib and author-year formats, and that can gracefully handle urls as @misc entries.


title: Text gets out beyond the table

text: I use WinEdit and try to make a table. The problem is that I can not move the text in a multirow to the second line. There are the packages I use:               \documentclass[12pt, a4paper]{article}     \usepackage{russ}     \usepackage[left=1cm,right=1cm,top=2cm,bottom=2cm]{geometry}     \usepackage{mathenv}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{amsmath}     \usepackage{multirow}          \ifpdf     \usepackage[pdftex]{graphicx}     \usepackage{epstopdf}          \usepackage{rotating}     \begin{document}          % And there is a table (I left the text, which is not important, in Russian,      % if you don't mind).          \begin{table}[h]     \begin{center}     \begin{tabular}{|p{1cm}|p{3cm}|p{5cm}|p{3cm}|}     \hline       \multicolumn{2}{|c|}{Преобразователь}& Электрооптический  &n оптический\\       \multicolumn{2}{|c|}{\quad} & коэффициент & фазовый \\       \hline       \multirow{3}{2cm}{\begin{sideways} nonlinear-crystal types \end{sideways}}& ZnTe & $r_{41}$=4.04 & 2 \\       \cline{2-4}       &GaP & $r_{41}$= 0.97& 4 \\       \cline{2-4}      &GaSe &$r_{41}$=14 & 0.7\\       \cline{2-4}      &GaAs&$r_{41}$=1.5& 2\\       \cline{2-4}      &CdTe & $r_{41}$=4.5&  \\       \cline{2-4}      &CdSe & $r_{41}$=18& \\     \hline     \end{tabular}     \caption{Параметры генераторов ТГц импульсов}     \label{5}     \end{center}     \end{table}          \end{document}      So, the turned phrase "nonlinear-crystal types" gets out beyond the table and I should move the word "types" to the second line of the column. I tried to use the command `\tabularnewline`, but it didn't work for me, maybe because I use it in a wrong way. Can you tell me how to do this?


title: Referencing Webpage using "apalike" and "natbib

text: I need to reference some websites in my paper using APA style, I am using natbib and apalike in my tex file. Here is my bibtex record               @misc{cnn2011rahm,         Author = {Editor CNN},         Date-Added = {2013-11-21 09:15:03 +0000},         Date-Modified = {2013-11-21 09:26:00 +0000},         Howpublished = {http://edition.cnn.com/2011/POLITICS/01/27/emanuel.ballot/},         Lastchecked = {Nov 01, 2013},         Month = {January},         Title = {Illinois Supreme Court keeps Emanuel on ballot},         Url = {http://edition.cnn.com/2011/POLITICS/01/27/emanuel.ballot/},         Urldate = {Jan 28, 2011},         Year = {2011}}      But when it was render, it is showed this way ![enter image description here](http://i.stack.imgur.com/bNZxp.png) And the necessary information e.g. last accessed is not shown, may I know how do I fix this?


title: pgfplots: Displaying a bar graph and a table from the same input file

text: I try to display on one Beamer slide a bar graph and a table with numbers taken from the same input file (to avoid repetition when copying the data). For now, I am stuck on this error message:               PGFPlots: reading {benchmarks.data}     ! TeX capacity exceeded, sorry [input stack size=5000].     \@setfontsize #1#2#3->\@nomath #1                             \ifx \protect \@typeset@protect \let \@curr...     l.33 \end{frame}      My data file is the folllowing:               paradigm                                          position  time     {\scriptsize \shortstack{Procedural\\(append)}}     1       53     {\scriptsize \shortstack{Procedural\\(prepend)}}    2       64     {\scriptsize Object-Oriented}                       3       45     {\scriptsize Functional}                            4       44     {\scriptsize List Comprehension}                    5       30      And, here is a stripped down version of my LaTeX code:               \documentclass[10pt]{beamer}     \usepackage{pgfplots,pgfplotstable}          \begin{document}          \begin{frame}       \frametitle{Benchmark Results}       \begin{columns}[m]         \begin{column}{.5\textwidth}           \begin{tikzpicture}[scale=.75]             \begin{axis}[%               ybar, bar width=0.65cm,%               xmin=0.5,xmax=5.5, xtick=data,%               xticklabels from table={benchmarks.data}{paradigm},%               xticklabel style={rotate=45,anchor=north east,inner sep=0mm},%               ylabel={\Large Time (s)}, ylabel near ticks]               \addplot table [x=position,y=time] {benchmarks.data};             \end{axis}           \end{tikzpicture}               \end{column}         \begin{column}{.35\textwidth}           \pgfplotstabletypesetfile[%           every even row/.style={before row={\rowcolor{blue!15}}},           every head row/.style={before row=\toprule, after row=\midrule},           every last row/.style={after row=\bottomrule},           columns/paradigm/.style={column name={Paradigm}},           columns/position/.style={column name={Position}},           columns/time/.style={column name={Time (s)}}] {benchmarks.data}         \end{column}       \end{columns}      \end{frame}          \end{document}      The most strange things is that the bar chart is working well, but I cannot make the table compile properly. Any help is welcome !


title: Naming equations with breqn

text: I know that the `tag` command from `amsmath` should be used to name equations (see below a mwe).               \documentclass{article}     \usepackage{amsmath}     \begin{document}     \begin{align}       c^2 &= a^2 + b^2       \tag{Pythagoras' theorem}       \label{eq:pit}     \end{align}     \end{document}      But if I like to use the `breqn` package the `tag` command won't work.               \documentclass{article}     \usepackage{amsmath}     \usepackage{breqn}     \begin{document}     \begin{dmath}       c^2 = a^2 + b^2       \tag{Pythagoras' theorem}       \label{eq:pit}     \end{dmath}     \end{document}      )) I get the below error when try to compile the mwe above.               ! Package amsmath Error: \tag not allowed here.          See the amsmath package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.7   \tag               {Pythagoras' theorem}     ?      ! Emergency stop.      ...                                                        l.7   \tag               {Pythagoras' theorem}     \tag cannot be used at this point. If you don't understand why     you should consult the documentation.     But don't worry: just continue, and I'll forget what happened.


title: Strange integral symbol

text: I'm getting the following rendering of my \int command inside equation environment This is in my opinion really ugly! I want the usual one back! ![enter image description here](http://i.stack.imgur.com/rwxSZ.png) Do you have any idea about what happened to my latex environment?


title: Table with rotated headings on fixed height rows

text: I am trying to create a 2 x 2 table with centered headings. The row headings need to be rotated as shown below (mocked-up in another program). The cells are supposed to be 1in tall and 1.4in wide. ![Example to table](http://i.stack.imgur.com/trpKk.png) What I get instead is the following. The height of the parbox seems to have been added to the cell height. I have tried correcting this with `\raisebox` and `\strut` and `\rule` to no avail: ![Example of table](http://i.stack.imgur.com/SuV6z.png) My code currently looks like this:               \begin{supertabular}{c | p{1.4in} | p{1.4in} |}         \multicolumn{1}{c}{} & \multicolumn{1}{c}{\centering Full} & \multicolumn{1}{c}{\centering Partial} \\         \cline{2-3}         \raisebox{-1in}[0in][0in]{\rotatebox{90}{\parbox[c]{1in}{\centering Shutdown}}} & {Pellentesque enim mi, ornare in blandit quis, dignissim ut velit. Etiam tempus tortor quam.} & {Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin a lorem sed dui aliquam feugiat eget at arcu.} \\[1in]         \cline{2-3}         \raisebox{-1in}[0in][0in]{\rotatebox{90}{\parbox[c]{1in}{\centering Active}}} & {Pellentesque convallis scelerisque libero, eu gravida metus porttitor nec. Nulla facilisi.} & {Sed auctor nibh at purus mattis porta. Nunc vitae ante lacus.} \\[1in]         \cline{2-3}     \end{supertabular}


title: Spacing around inline equations

text: What is the parameter determining spacing and stretchability around inline equations? I want to tweak spacing exactly but cannot find where the parameters are.


title: Selecting specific nodes and changing style (for those nodes)

text: Is it possible to select specific nodes and color them green? I was thinking of using another for loop, but it doesn't seem like I can define more than 1 style.               \documentclass{article}     \usepackage[dvipsnames]{xcolor}     \usepackage{tikz}          \begin{document}     \begin{tikzpicture}[darkstyle/.style={circle,draw,fill=MidnightBlue!25,minimum size=2.0em}][lightstyle/.style={circle,draw,fill=Green!25,minimum size=2.0em}       \foreach \x in {0,...,4}         \foreach \y in {0,...,4}             {\pgfmathtruncatemacro{\label}{5 + 5*\x - \y}            \node [darkstyle]  (\x\y) at (1.5*\x,-1.5*\y) {\label};}             \foreach \x in {0,...,4}         \foreach \y [count=\yi] in {0,...,3}             \draw (\x\y)--(\x\yi) (\y\x)--(\yi\x) ;            \foreach \x in {0,...,4}         \for each \y in {0, 4}             \node [lightstyle]          \end{tikzpicture}     \end{document}


title: Making a table span multiple columns

text: I have some tabular data and two column page layout. The number of columns is bigger such that that the table cannot fit into one column. How can I make the table span two columns such that the table is centered. I don't want to stretch it to the whole. Just take up two columns and center it since it is not big enough to take the whole space. Any suggestions?


title: Automatically adding space before punctuation in old-style English texts

text: I'm typesetting an English text in an 18th century style (based on a 1725 edition of Alexander Pope's "Dunciad"). Is there a LaTeX package I can use to automatically add the correct space before (and after) punctuation? I need something similar to the spacing given for "french" in babel, but there doesn't seem to be an option to do this for "english", and the closest I can find in another package is ecclesiastic.sty, which does a similar thing for Latin.


title: xelatex biblatex russian indexing

text: I use the `xelatex` with the `biblatex` package and with indexing author names. The `biber` works fine with bibliography of books in English and in Russian. The author index is generated. In the bibliography the order is correct but in the index of names I get bad order - Russian names does not follow the latin index names order. How can I correct it? Here is the `test.tex` example:               \documentclass{article}          \usepackage{geometry}     \geometry{a5paper}          \usepackage{xltxtra}     \usepackage{polyglossia}          \setdefaultlanguage{english}     \setotherlanguages{russian}     \defaultfontfeatures{Mapping=tex-text}     \setmainfont{FreeSerif}     \newfontfamily\russianfont{FreeSerif}          \usepackage{index}     \newindex{default}{idx}{ind}{My Index}     \newindex{titles}{tdx}{tnd}{My Titles}          \usepackage[style=authortitle-icomp,indexing=true,sorting=nty,backend=biber]{biblatex}     \addbibresource{\jobname.bib}     \DeclareIndexFieldFormat{indextitle}{\index[titles]{#1}}          \listfiles     \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}     @BOOK{Alma,         author = {Alma, B.},         title = {Test},         year = {2000}     }     @INBOOK{Roma,         author = {Рома, Ю.},         title = {Oбраз},         booktitle = {Материал},         year = {2001},         sortkey = {Roma}     }     @BOOK{Sama,         author = {Sama, C.},         title = {Last one},         year = {2002}     }     \end{filecontents}          \begin{document}          \section{Testing}          Three \cite{Sama}.     Two \cite{Roma}.     One \cite{Alma}.          \printbibliography          \printindex          \end{document}      The References are almost OK (there are two dots after the `Рома, Ю`):               References     Alma, B. Test. 2000.     Рома, Ю.. “Oбраз”. In: Материал. 2001.     Sama, C. Last one. 2002.      But the index is not (by means of `makeindex test`):               My Index     Alma, B., 1     Sama, C., 1     Рома, Ю., 1      The `texindy test.idx` makes the same error:               A     Alma, B., 1     S     Sama, C., 1     Рома, Ю., 1      This is, of course, because in the `test.idx` we have `               \indexentry {Sama, C.}{1}     \indexentry {Рома, Ю.}{1}     \indexentry {Alma, B.}{1}     \indexentry {Alma, B.}{1}     \indexentry {Рома, Ю.}{1}     \indexentry {Sama, C.}{1}      We should have there something like: `               \indexentry {Roma@Рома, Ю.}{1}      because there is `sortkey = {Roma}` in the `bib` file for `biblatex`.


title: REVTeX 4.1 + fixltx2e + includegraphics = doesn't work?

text: I use MacOSX Leopard and TeXShop. This piece of code works:               \documentclass[preprint,floatfix]{revtex4-1}     \usepackage{graphicx}     \begin{document}          \title{empty}          \section{fixltx2e or REVTeX 4.1 problem or mine?}          \begin{figure}[htb]     \centering     \includegraphics[width=0.5\textwidth]{fig1.pdf}     \caption{Awesome Image}     \label{fig:awesome_image}     \end{figure}          \end{document}      But if I load `fixltx2e`, the same piece of code it DOESN'T work!               \documentclass[preprint,floatfix]{revtex4-1}     \usepackage{fixltx2e}     \usepackage{graphicx}     \begin{document}          \title{empty}          \section{fixltx2e or REVTeX 4.1 problem or mine?}          \begin{figure}[htb]     \centering     \includegraphics[width=0.5\textwidth]{fig1.pdf}     \caption{Awesome Image}     \label{fig:awesome_image}     \end{figure}          \end{document}      This is the error that is produced:               <fig1.pdf, id=1, 61.25pt x 74.7pt> <use fig1.pdf>     No file test3.bbl.     [1{/usr/local/texlive/2011/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]     ! Missing number, treated as zero.     <to be read again>      \aftergroup      l.20 \end{document}      Any idea how to fix this?


title: Bibliography is not printed using Kile on Ubuntu

text: I am having a problem with my LaTeX output that is not printing the bibliography part. I am using Kile to code it. The strange thing is that, it was working out of the box before I reinstalled Ubuntu. After Ubuntu reinstallation, it does not work at all. A minimal example added by Marco               \documentclass{article}          \usepackage{filecontents}     \begin{filecontents*}{\jobname.bib}     @book{test,     author={John Smith},     title={TITLE},     year={2011},     publisher={...},     }     \end{filecontents*}     \begin{document}          \cite{test}     \bibliography{\jobname}     \bibliographystyle{IEEEtran}          \end{document}       Everybody should consider I have another file of `biblioFile.bib` in the same directory as my LaTeX source file.


title: \atop vs. \substack for multiple lines under a sum

text: I did a search trying to find out how one can typeset multiple lines under a sum and found out that there is the possibility to use `\atop` or `\substack` together with a remark that one shouldn't use `\atop`. Is there any good reason for that? Does it commit some typographical sins I am not aware of?


title: pdflatex bash script to supress all output except error messages?

text: I have a bash script which I use to compile a file with pdflatex twice (to make sure it sorts out references properly, etc.). This is the 'latexbuild' script I use:               module load ctan     pdflatex --shell-escape --interaction=nonstopmode $1     bibtex $1     pdflatex --shell-escape --interaction=nonstopmode --interaction=batchmode $1      I would then call this script with `latexbuild test.tex`. It produces a lot of output which I would like to supress, except for the error messages which I'd like to see. Is there any way to only allow error messages to be displayed?


title: HTML and LaTeX code conversion using TeX4HT

text: All the display equations/centered equations are no need to convert to MathML or PNG and need to retain in LaTeX coding only. If it is possible convert to HTML tag in-between text part only convert to HTML tag. But no need to convert to same positions of Superscript and Subscript, Same positions of Limits Superscript and Subscript and so on in the text part.               \documentclass{book}          \usepackage{amssymb,amsmath}          \begin{document}          Schematic representation of the model, including the following populations: $e$ vaue is $e=2$ and `%e and e=2 convert to html tag`     thalamic reticular nucleus; $s^2_3$ `%s^2_3 should be in latex as its tag`     primary and secondary thalamic relay nuclei themselves with gains $\pi + 2\pi n (n=0,1,\ldots)$ `%\pi + 2\pi n (n=0,1,\ldots) convert to html tag`     and $G_{ii}$ `%G_{ii} convert to html tag. Schematic to and $G_{ii}$ is a text part position`          \end{document}


title: How to reduce space in begining but not in end of itemize

text: This refers to my question. How to reduce space in begining of itemize? [topsep=0] also reduces space between the itemize and text below to itemlist. I just want to reduce space in the begining not in the last. How can i implement it?