title: Why don't appear the accents and the diagrams together?

text: In this situation, when I compile for LATEX-PDF I have the correct text, with all the accents but does not show the diagrams. When I compile for XeLATEX the result displays all diagrams, but the text does not appear in the words accents. How do I get the correct text and diagrams appear?               \documentclass[fullpage, 12pt, openany]{book}     \usepackage[portuguese,brazil]{babel}     \usepackage[latin1]{inputenc}        \usepackage{mathptmx}            \usepackage[T1]{fontenc}         \usepackage[a4paper,bottom=2cm]{geometry}      \usepackage{multicol}            \usepackage{vaucanson-g}                 \usepackage{graphicx}            \begin{document}     Blá blá, Caça, é imposto, título,\\     Caçada, Noções Básicas, Ações, Capítulo\\     To see the result of the graph:\\          \bigskip          \begin{figure}[h]     \begin{center}     \begin{VCPicture}{(0,-2)(9,2)}          \State[q_0]{(0,0)}{A} \State[q_1]{(3,0)}{B} \State[q_2]{(6,0)}{C}     \FinalState[q_3]{(9,0)}{D}     \Initial{A}     \EdgeL{A}{B}{a} \LoopN{A}{b}     \EdgeL{B}{C}{a} \LoopN{B}{b}     \end{VCPicture}     \end{center}     \end{figure}          \end{document}


title: Place several plots on one page

text: I have 4 plots that should be placed on the same page. Does anyone know how to do it? I need to have a caption/title under each plot (and I cannot place it above the plot as there are numbers), a legend can be common to all plots. Here is the code:               \begin{figure}     \begin{tikzpicture}     \begin{axis}[         axis lines*=left,         ybar,         ymin=0,ymax=1,         enlarge x limits=0.5,         bar width=10pt,         legend style={at={(0.5,-0.15)},           anchor=north,legend columns=-1},         ylabel={percentage, \%},         symbolic x coords={P,R},         xtick=data,         major x tick style = transparent,         ymajorgrids = true,         tick align=outside,         nodes near coords,         every node near coord/.append style={anchor=mid west, rotate=90},        %   nodes near coords,       %  nodes near coords align={horizontal},         ]     \addplot [fill=red!50]coordinates {(P,0.4) (R,0.3)  };     \addplot [fill=red!50]coordinates {(P,0.5) (R,0.5)};     legend{min1,min2}     \end{axis}     \end{tikzpicture}     \caption{Results P}      \label{fig:3}     \end{figure}                    \begin{figure}     \begin{tikzpicture}     \begin{axis}[         axis lines*=left,         ybar,         ymin=0,ymax=1,         enlarge x limits=0.5,         bar width=10pt,         legend style={at={(0.5,-0.15)},           anchor=north,legend columns=-1},         ylabel={percentage, \%},         symbolic x coords={P,R},         xtick=data,         major x tick style = transparent,         ymajorgrids = true,         tick align=outside,         nodes near coords,         every node near coord/.append style={anchor=mid west, rotate=90},        %   nodes near coords,       %  nodes near coords align={horizontal},         ]     \addplot [fill=green!50]coordinates {(P,0.94) (R,0.5)  };     \addplot [fill=violet!50]coordinates {(P,0.6) (R,0.6)};     \legend{min1,min2}     \end{axis}     \end{tikzpicture}     \caption{Results I}      \label{fig:4}     \end{figure}               \begin{figure}     \begin{tikzpicture}     \begin{axis}[         axis lines*=left,         ybar,         ymin=0,ymax=1,         enlarge x limits=0.5,         bar width=10pt,         legend style={at={(0.5,-0.15)},           anchor=north,legend columns=-1},         ylabel={percentage, \%},         symbolic x coords={P,R},         xtick=data,         major x tick style = transparent,         ymajorgrids = true,         tick align=outside,         nodes near coords,         every node near coord/.append style={anchor=mid west, rotate=90},        %   nodes near coords,       %  nodes near coords align={horizontal},         ]     \addplot [fill=green!50]coordinates {(P,0.5) (R,0.7)  };     \addplot [fill=violet!50]coordinates {(P,0.4) (R,0.9)};     legend{min1,min2}     \end{axis}     \end{tikzpicture}     \caption{Results U}      \label{fig:5}     \end{figure}               \begin{figure}     \begin{tikzpicture}     \begin{axis}[         axis lines*=left,         ybar,         ymin=0,ymax=1,         enlarge x limits=0.5,         bar width=10pt,         legend style={at={(0.5,-0.15)},           anchor=north,legend columns=-1},         ylabel={percentage, \%},         symbolic x coords={P,R},         xtick=data,         major x tick style = transparent,         ymajorgrids = true,         tick align=outside,         nodes near coords,         every node near coord/.append style={anchor=mid west, rotate=90},        %   nodes near coords,       %  nodes near coords align={horizontal},         ]     \addplot [fill=green!50]coordinates {(P,0.1) (R,0.6)  };     \addplot [fill=green!50]coordinates {(P,0.2) (R,0.9)};     legend{min1,min2}     \end{axis}     \end{tikzpicture}     \caption{Results X}      \label{fig:6}     \end{figure}      I would appreciate any suggestions! I tried `\matrix` environment but cannot add a caption into each plot. A general title to all 4 plots would be nice as well.


title: Citeauthor{authors} not working as stated in the documentation

text: I am using `natbib` package for my citations and whenever I try to cite just the first author I always get et. al. after like `\Citeauthor{authors}` give me `Author et al, xxxx` instead of `Author`. I would like to have Author and co-workers for this citetation. Accordingly to the official documentation it should print just Author. This is my preamble               \documentclass[a4paper,12pt,english,oneside]{report}     \usepackage[square]{natbib}      Thanks for helping


title: How to make the hyphen show right in the middle of the paragraph title and its content

text: I am writing paragraphs that seldom require titles. I'd like the paragraph name to be separated from the actual content with a symbol. It can be an hyphen or whatever. My issue is if I type:               \paragraph*{My great title -} My fantastic content goes here.      there is way too much space between the hyphen and the content and similarly if I type:               \paragraph*{My great title} - My fantastic content goes here.      Is there a way to let the hyphen to nicely plump in the middle?


title: Copy to clipboard using Javascript macro

text: I'm pretty inexperienced with Javascript, especially within LaTeX, so I'd like some pointers, guidance or even an MWE of my proposed "button": I want to create a button to copy data to the system clipboard. For this I'd like to suggest using a workaround with a flash leak (don't know if it works):               function copy(str) {        var D=document;         if(!copy.div) { copy.div = D.createElement('div'); D.body.appendChild(copy.div);  }          flashVar = "Q1dTB3kAAAB4nKtgYI1nYOBfwMDAw8jgzPT//3975lAGBoYOdQYWhu\     SczIKk/MSiFIac1Lz0kgyG4MriktRchuLUEme41DQmBg4GGRDJ6Cc0l4l  BAibCzsDO\     CDSJgwksyRwkzuAA5AIAd7oY/w==";          copy.div.innerHTML =  '<embed src="'+flashVar+'" FlashVars="clipboard='+encodeURIComponent(str) +         '" width="0" height="0" type="application/x-shockwave-flash"></embed>';     }      I want to use the following button which will do the copying:               \documentclass[11pt,a4paper]{standalone}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{tikz}     \usetikzlibrary{shadows}          \newcommand*\button{%       \tikz[baseline=(key.base)]         \node[%           draw,           fill=white,           drop shadow={shadow xshift=0.25ex,shadow yshift=-0.25ex,fill=black,opacity=0.75},           rectangle,           rounded corners=2pt,           inner sep=1pt,           line width=0.5pt,           font=\scriptsize\sffamily         ](key) {Ctrl\strut}       ;         \tikz[baseline=(key.base)]         \node[%           draw,           fill=white,           drop shadow={shadow xshift=0.25ex,shadow yshift=-0.25ex,fill=black,opacity=0.75},           rectangle,           rounded corners=2pt,           inner sep=1pt,           line width=0.5pt,           font=\scriptsize\sffamily         ](key) {C\strut}       ;     }          \begin{document}     \button     \end{document}


title: Presenting a {forest} tree from bottom to top in beamer

text: I would like to present a tree with `forest`in beamer, but parts after parts, starting **from the bottom** , and then ascent to the top. So let's consider a simple tree like the following :               \documentclass{beamer}     \usepackage{forest}          \begin{document}          \begin{frame}       \begin{forest}         [VP, calign=last           [{[ajout]}\\\textit{rapidement},            align=center,           base=top]           [VP, calign=first             [VP, calign=first               [V\\\textit{mange}, align=center,base=top]               [{[compl]}\\\textit{une orange}, align=center,base=top]             ]             [{[ajout]}\\\textit{dans la cuisine}, align=center,base=top]           ]         ]       \end{forest}     \end{frame}          \end{document}      I would like to present the bottom of the tree first (so basically the "T" with the "mange" beneath). Then the branch above (the VP with the child on the right), then the level above, and so on until the top of the tree (I hope I'm clear). Based on this discussion, I know how to do it the other way around (from top to bottom). But how can I do to achieve it as I described?


title: Misnumbering of examples

text: I am trying to use the mdframed package to create a boxed numbered Example environment. This is my first foray into environment definition, so I may be making a rookie mistake. Why doesn’t the numbering work correctly in this example? The examples appear to be numbered starting from 0 (which I don’t want) but when I reference them, the reference number is what I actually want (but not matching the printed example number).               \documentclass[11pt]{book}     \usepackage{graphicx}     \usepackage{amssymb}     \usepackage{amsmath}          %     % Example environment     %     \usepackage[framemethod=TikZ]{mdframed}     \usepackage{xcolor}          %% set the counter for your environment     \newcounter{example}[chapter]     \renewcommand{\theexample}{\thechapter.\arabic{example}}          %% define the style     \mdfdefinestyle{example}{%         frametitle=\mbox{},         backgroundcolor=gray!8,         linecolor=gray,         outerlinewidth=1pt,         roundcorner=3mm,         skipabove=\baselineskip,         skipbelow=\baselineskip,     }     %% setup the environment     \newmdenv[%         style=example,         settings={\global\refstepcounter{example}},         frametitlefont={\bfseries Example~{\theexample}\quad},     ]{example}          \begin{document}          \chapter{Blah}     qf;qiuef;iqugef;iqugef;     \begin{example}     blah blah blah     \end{example}     \begin{example}     blah blah blah     \end{example}          \chapter{Blech}     \begin{example}     Blech Blech Blech     \end{example}     \begin{example}\label{ex:blech}     Blech Blech Blech     \end{example}          Referencing Example \ref{ex:blech}     \end{document}


title: Table of Contents unbold chapter names

text: I require chapter names unbold in Table of Contents. Please guide me how I unbold the heading of chapter names only in Table of Contents.


title: How to insert a paragraph before the chapter title?

text: I need to include several lines before the chapter title for some (not all) chapters. A new chapter always starts with a new page, how to realize the following layout for certain chapter while other chapters are normal?                                             header     -------------------------------------------------------------------     paragraph before the chapter title               Chapter 1 Introduction             xxxxxxxxxxxxxxxxxxxxxxxxxxx          -------------------------------------------------------------------                                   footer


title: Using the same picture over and over?

text: Suppose I have a complex figure made with TikZ. How do I use it several times without having to repeat all the commands?               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage{tikz}          \begin{document}          Base figure          \begin{tikzpicture}       \draw[blue] circle (2);       \foreach \i in {0,10,...,350}         \draw[blue] (\i:1.9) -- (\i:2.1);     \end{tikzpicture}          Using base figure.          \begin{tikzpicture}       \draw[blue] circle (2);       \foreach \i in {0,10,...,350}         \draw[blue] (\i:1.9) -- (\i:2.1);       \foreach \i in {0,10,...,350}         \node at (\i:2.7) {\tiny $\i^\circ$};     \end{tikzpicture}          Using base figure.          \begin{tikzpicture}       \draw[blue] circle (2);       \foreach \i in {0,10,...,350}         \draw[blue] (\i:1.9) -- (\i:2.1);       \foreach \i in {0,10,...,350}         \draw (0,0) -- (\i:2);     \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/8mgLI.png)


title: Alignment margin note with equation in pages

text: It's my problem, I am not writing margin note in \equation and \align. It's an error. But it's working in text. My aim, margin note with equation must be aligned.               \definecolor{background}{RGB}{255,255,170}          \begin{equation}% \begin{align}     \colorbox{background}{$\displaystyle{} R_A+R_B=\frac{R_3(R_1+R_2)}{R_1+R_2+R_3}$}     \end{equation}% \end{align}      **_odd page_** ![enter image description here](http://i.stack.imgur.com/TwCSL.png) **_even page_** ![enter image description here](http://i.stack.imgur.com/NXTE4.png) I'm sure this is a duplicate of another question that I just can't find. So, does anyone know how to fix it.


title: Need help formatting table without row and column header cell borders

text: How do I make a table like this in LaTeX? ![enter image description here](http://i.stack.imgur.com/xdiHi.png)


title: How can I get unnumbered chapters in the center of headers?

text: With `titlesec`, how can I include unnumbered chapter titles in the center of headers?


title: "Package xcolor error" shows up when a child doc has an embedded pdf

text: I am working on LyX Version 1.6.9. While compiling ClassicThesis, I receive the following error message:               package xcolor error: undefined color 'Blue'/'Maroon'/'Black' etc       This only happens when one of the child documents has a pdf embedded in it (via insert - file - external material). There is no problem viewing pdf of the child document alone (using `pdfview`). Please help.


title: Numbering of subsections in the appendix

text: I trying to write an appendix where:   * The appendix is considered a section, and has the title "appendice"   * Subsections are numbered with letters (it does it for sections by default) but I can't get the appendix to be called anything, neither have I succeded in modifying the default numbering. Thanks for any help!


title: How can I change a glyph in a Verbatim environment?

text: I have a document which contains example program code in `Verbatim` environments. The caret symbol produced by typing `^` looks too flat to me, so I defined a macro to produce a sharper version.               \documentclass[12pt]{article}     \usepackage[T1]{fontenc}     \usepackage{graphicx}     \usepackage{fancyvrb}          %A more wedge-like caret for use in code.      \newcommand\pow{\hspace{-1pt}\raisebox{-1pt}{\scalebox{1.2}{\textsf{\textasciicircum}}}\hspace{-1pt}}          %Set up code environment       \DefineVerbatimEnvironment{code}{Verbatim}{xleftmargin=12pt,xrightmargin=12pt,commandchars=\\\{\}}          \begin{document}     \begin{code}     y = x^2       y = x\pow2     \end{code}     \end{document}      ![caret](http://i.stack.imgur.com/jA52V.png) Unfortunately, it's easy to forget the necessity to use `\pow` and not `^` in code examples. Therefore I would like to set things up so that typing `^` in a `code` environment produces the result of `\pow`. How can this be achieved?


title: PSTricks: Dataplot

text: Consider the following example:               \documentclass{article}     \usepackage{pst-plot}          \begin{document}          \savedata{\data}[{1999,6276},{2000,6827},{2001,7783},{2002,9819}]     \psset{xAxisLabel={Year},yAxisLabel={Ocapi}}     \begin{psgraph}[Ox=1999,xlabelOffset=0.5,Dy=2000]{->}(1999,0)(2004,13000){13.5cm}{8.1cm}     \dataplot[plotstyle=dots,dotstyle=o,fillcolor=red]{\data}     \end{psgraph}          \end{document}      I tried to re-use this answer from Herbert but it is not working. The error is               ! Dimension too large.     <recently read> \pst@xunit           l.8 ...000]{->}(1999,0)(2004,13000){13.5cm}{8.1cm}      If I can get a solution and an explanation as to why it is not working, I would be greatful.


title: changing font in a particular environment

text: For a book, I want to change the default font in the Examples environment (declared in the same way as theorem) to the usual roman (not italic) so that there are not very large areas of italic font. How do I do this without causing complications elsewhere? Can it be done in one declaration or must it be done separately in every case?


title: Sweave and R 3.1.0: no pdfs generated

text: After upgrading R to version 3.1.0 (from some version 2.x.x), the following sweave code does not produce any pdfs for the plots anymore:               \documentclass[a4paper,10pt]{article}     \SweaveOpts{echo=FALSE}          \begin{document}          \begin{figure}     \begin{center}     <<fig = T, echo = F, include=T>>=     x=rnorm(100)     plot(x)     @     \caption{My Graph}     \end{center}     \end{figure}          \end{document}      To compile, I use `R CMD Sweave foo.Rnw` followed by `R CMD pdflatex foo.tex`. Why is that and how can I fix it? I played around with the options: `fig = TRUE`, `pdf = TRUE` and so on - to no avail. Edit: Here is the output of `R CMD Sweave foo.Rnw`, which should create the pdf files:               R CMD Sweave foo.Rnw     stat_bin: binwidth defaulted to range/30. Use 'binwidth = x' to adjust this.     Output file:  foo.tex     R CMD pdflatex foo.tex     ....


title: Insert a blank page after current page

text: I want to insert a blank page in a document so that the text would be added to the content of the current page till it reaches end of the page, the next page would be empty, and the text continue from the third page! If I used `\afterpage{\newpage}` but it just does not work! what should I do?


title: How can I make a simple graph with grids using pgfplots?

text: I want it to look like this: ![example](http://i.stack.imgur.com/umlw7.jpg) Preferably with comments so I can learn how to make my own!


title: What is the difference between headings and useheadings in the pagestyle command?

text: I use `classicthesis` and a warning suggests me to replace               \pagestyle{headings}      with               \pagestyle{useheadings}      What's the difference?


title: Custom backref Text

text: Hi I would like to change backref text. Here is what I mean: ![enter image description here](http://i.stack.imgur.com/tfntG.png) Instead "Siehe S." I would like to have "Zitiert auf S.:" Here is my MWE, and thanks for your help!               \documentclass[a4paper,11pt]{scrartcl}     \usepackage[latin1]{inputenc}     \usepackage{csquotes}     \usepackage{blindtext}     \usepackage{filecontents}     \usepackage{hyperref}     \hypersetup{         colorlinks,          citecolor=black,          filecolor=black,          linkcolor=black,          urlcolor=black     }     \begin{filecontents}{\jobname.bib}      @incollection{athanasius1857,         Address = {Parisiis},         Author = {{Athanasius Alexandrinus}},         Booktitle = {S. P. N. Athanasii archiepiscopi Alexandrini opera omnia quae exstant},         Editor = {Jacques Paul Migne},         Keywords = {source},         Pages = {14013-1422},         Publisher = {Accurante J.-P. Migne},         Series = {Patrologia Graeca},         Shortauthor = {Ath.},         Shorttitle = {ep. fest. 12.},         Title = {Epistola XII heortastica},         Volume = {26},         Year = {1857}}     @book{athanasius1858,         Address = {Parisiis},         Author = {{Athanasius Alexandrinus}},         Booktitle = {S. P. N. Athanasii archiepiscopi Alexandrini opera omnia quae exstant},         Editor = {Jacques Paul Migne},         Keywords = {source},         Pages = {1403-1412},         Publisher = {Accurante J.-P. Migne},         Series = {Patrologia Graeca},         Shortauthor = {Ath.},         Shorttitle = {ep. fest. 11.},         Title = {Epistola XI heortastica},         Volume = {26},         Year = {1857}}     \end{filecontents}     \usepackage[ngerman]{babel}     \usepackage[style=historische-zeitschrift, maxnames=2, hyperref=true, backref=true, backrefstyle=none, backend=bibtex,idemtracker=true]{biblatex}     \bibliography{\jobname}     %     \begin{document}     \blindtext\footcite{athanasius1858}     \pagebreak     \blindtext\footcite{athanasius1857}     \pagebreak     \printbibliography          \end{document}


title: (arara) make rule failure non-fatal

text: I have a rule that attempts to download the bibliography as part of the build, but I would preferably have the option to have it soft-fail when the download fails, as I probably have a up-to-date copy from the last download. I tried the script below (localhost replaced with ocalhost to avoid the SE filter), with the following two problems:   1. I get the error "I'm sorry, but the default value set for the argument 'conditionalFail' of the 'zoterobib' task (referencing the 'zoterobib.yaml' file located at 'C:\Program iles\arara\rules') has an unavailable variable/method in the rule context: 'base'"   2. If I remove the @{base} reference, the rule fails reliably and silently (iow, the || ... do not seem to get executed)   3. if I add the || ... directly to the commands line, it does what I expect it to do, but then it will _always_ soft-fail, and I would prefer this to be an explicit option .               !config     # Pull bibliography from zotero as part of build     # author: Emiliano Heyns     # last edited by: eeh, Dec 2nd 2013     # requires arara 3.0+     #     # Sample usage     #     # % arara: zoterobib     # % arara: zoterobib: {format: biblatex}     #      # for windows, use http://www.confusedbycode.com/curl/#downloads     identifier: zoterobib     name: ZoteroBib     commands:      - <arara> @{ isWindows( "cmd /c ", "" ) } curl --connect-timeout 1 -s -o "@{base}.bib" "http://ocalhost:@{port}/better-bibtex/collection?@{collection}.@{format}" @conditionalFail     arguments:      - identifier: base       flag: <arara> @{parameters.base}       default: <arara> @{getBasename(file)}     - identifier: port       flag: <arara> @{parameters.port}       default: 23119     - identifier: format       flag: <arara> @{parameters.format}       default: biblatex     - identifier: collection       flag: <arara> @{parameters.collection}     - identifier: continue       flag: <arara> @{parameters.continue}     - identifier: conditionalFail       default: <arara> isTrue(@continue, "|| (echo could not download @{base}.bib && exit 0)")


title: Using minted with mixed Python code and output

text: I'm using `minted` to highlight code in Python. In some cases I want to mix code with output that the user will see. This gives me the red syntax error boxes, for example like so: ![enter image description here](http://i.stack.imgur.com/oVreA.png) And sometimes it gives me no error but I would like to turn off the highlighting (second line): ![enter image description here](http://i.stack.imgur.com/AtPHR.png) So what I would like to know if it's possible to turn off the highlighting for a few lines but at the same time keeping the options such as the line numbering and background. MWE:               \documentclass{article}          \usepackage{minted}     \definecolor{bg}{rgb}{0.95,0.95,0.95}     \newminted{python3}{bgcolor=bg, linenos=true, tabsize=4}          \begin{document}          I want lines 2 and 4 not to be highlighted but still keep the background and line numbering.          \begin{python3code}     >>> type(3.14)     <class 'float'>     >>> print(name)     NameError: name 'name' is not defined     \end{python3code}          \end{document}      **Edit:** To clarify: There are lines that I want highlighted that start with `>>>` and there are lines I want highlighted which don't start with `>>>`. There are also lines that I don't want highlighting for. So the default should be that it highlights the line but that I can add an exception to some lines.


title: using AMA reference style while using the achemso.sty

text: I've written a paper for the AIChE Journal, but using the achemso.sty, given that this journal does not provide with a style file. Now that the article is finished and approved, the editor is asking me to use the AMA reference style. After re-searching the web for a correct .sty for the journal I'm submitting to (AIChE Journal) I couldn't find none. And I could not set achemso.sty to use the AMA reference style. I've found ama.sty and aichej.sty, but I dont know how to override the achemso.sty in order to access such styles. In this sense, I've tried to use the command \bibliographystyle{ama} but I've got errors when generating the references file. Has anyone tried to do something similar? does anybody know how to set up the AMA reference style in achemso? thanks in advance...


title: How to prevent a page break before an itemize list?

text: It is not nice to have a page break right after the colon and have the list start on a new page:               And here, finally, is the list of mission-critical items:     \begin{itemize}     ...     \end{itemize}      How can I prevent that?


title: Multiple Citations without outer parentheses

text: Using the AAAI style included here and detailed here, when I cite several authors like so:               \cite{X,Y,Z}      I get:               (Xauthor, Xyear; Yauthor, Yyear; Zauthor, Zyear)      when I cite like so:               \citealt{X,Y,Z}      I get:               XauthorYear; YauthorYear; ZauthorYear      Is there a way to cite without those outer parens? So that I can achieve               Yada yada yada (e.g., Xauthor, Xyear; Yauthor, Yyear; Zauthor, Zyear)      instead of               Yada yada yada (e.g., (Xauthor, Xyear; Yauthor, Yyear; Zauthor, Zyear))      or               Yada yada yada (e.g., (XauthorYear; YauthorYear; ZauthorYear))      The only solution I can find is to do               \citeauthor{xcitation} \citeyear{xcitation}, \citeauthor{ycitation}  \citeyear{ycitation}, \citeauthor{zcitation} \citeyear{zcitation}      But it seems like there _has_ to be a more efficient way to accomplish this.


title: Applying breqn in bulk to typeset a math book for my kindle?

text: I'm trying to typeset this book for my Kindle: http://linear.ups.edu/ Unfortunately some of the equations result in overfull hboxes, and I can't read them. Though I've managed to manually convert some of the examples, the process is very difficult. The tricky bits primarily involve removing alignment markers from amsmath `align` environments, and nesting each sub-equation in its own `\begin{dmath*}`... For example:               \begin{align*}     2x+3y-4z&=13     &     4x_1+5x_2-x_3+x_4+x_5&=0     &     9a-2b+7c+2d&=-7     \end{align*}      (I've not even begun trying to figure out tables, so automatically scaling those would also be nice!) Perhaps there is a simple way to automatically wrap or scale all equasions/tables? I'm not so concerned with them looking that good yet, my first priority is being able to see them... I based my approach on LaTeX options for kindle? but this type of conversion is too much even with liberal application of Perl.


title: inline math with \ldots

text: what should be preferred: `$x_1,\, x_2,\ldots,\, x_n$` or `$x_1$, $x_2$, ..., $x_n$` I'm hesitating for the `\ldots` versus `...`


title: Beamer short forms, and automatic labelling of header

text: I'm using the `Goettingen` theme, and I'm automatically labelling the header with the name of the subsection. As the `Goettingen` theme has a side navigation bar, some of the subsections are too long to be displayed on a single line. What I'd like to do is specify a short form for the side bar (using `[...]`) and a long form for the header (using `{...}`). However, the code also inserts the short form in the header. Can anyone get this to work (i.e., use the short form in the side bar, and the long form as the header)? Here's a minimal working example;               \documentclass[xcolor=svgnames,smaller,12pt,table]{beamer}          \usepackage{helvet}          \usetheme{Goettingen}          \usecolortheme{seahorse}          \addtobeamertemplate{frametitle}{\let\insertframetitle\insertsubsectionhead}{}          \begin{document}          \section{Section One}          \subsection[sub 1]{Subection One}          \begin{frame}{x}          Some text          \end{frame}          \end{document}


title: What makes my line get shifted to the left when I invoke \LoadConstants?

text: ![enter image description here](http://i.stack.imgur.com/d2Bzv.gif) In the beginning I use the following code. So far so good. ![enter image description here](http://i.stack.imgur.com/bN0ot.png)               \documentclass[pstricks,border=12pt]{standalone}     \usepackage{multido}     \usepackage[nomessages]{fp}     \def\LoadConstants{}     \newcommand\const[3][3]{%         \edef\temporary{round(#3}%         \expandafter\FPeval\csname#2\expandafter\endcsname             \expandafter{\temporary:#1)}%             \edef\LoadConstants{\LoadConstants                 \noexpand\pstVerb{/#2 \csname#2\endcsname\space def}}%     }               \const[1]{G}{9.8}     \const[1]{Tfinal}{2.0}     \def\y(#1){-G/2*#1^2}     \const[1]{Yfinal}{\y(Tfinal)}          \SpecialCoor     \usepackage{siunitx}     \begin{document}     \begin{pspicture}[showgrid=false](3.5,\Yfinal)         \LoadConstants         \psline(1.5,0)(1.5,\Yfinal)         \multido{\n=0.0+0.5}{5}         {             \const[1]{Yt}{\y(\n)}%             \rput[r](*1.25 {\y(\n)}){$\SI{\Yt}{\meter}$}             \psline(1.4,\Yt)(1.6,\Yt)             \rput[l](*1.75 {\y(\n)}){$t=\SI{\n}{\second}$}             \pscircle*(*3.5 {\y(\n)}){5pt}         }     \end{pspicture}     \end{document}      I changed my mind to use `Yt` instead of `\Yt` for the following. Because `Yt` is in PostScript world, I have to invoke an extra `\LoadConstants` again (see it in the looping). ![enter image description here](http://i.stack.imgur.com/qXVDh.png)               \documentclass[pstricks,border=12pt]{standalone}     \usepackage{multido}     \usepackage[nomessages]{fp}     \def\LoadConstants{}     \newcommand\const[3][3]{%         \edef\temporary{round(#3}%         \expandafter\FPeval\csname#2\expandafter\endcsname             \expandafter{\temporary:#1)}%             \edef\LoadConstants{\LoadConstants                 \noexpand\pstVerb{/#2 \csname#2\endcsname\space def}}%     }               \const[1]{G}{9.8}     \const[1]{Tfinal}{2.0}     \def\y(#1){-G/2*#1^2}     \const[1]{Yfinal}{\y(Tfinal)}          \SpecialCoor     \usepackage{siunitx}     \begin{document}     \begin{pspicture}[showgrid=false](3.5,\Yfinal)%         \LoadConstants%         \psline(1.5,0)(!1.5 Yfinal)%         \multido{\n=0.0+0.5}{15}%         {%             \const[1]{Yt}{\y(\n)}%             \LoadConstants%This is needed to provide Yt in PostScript world.             \rput[r](*1.25 {\y(\n)}){$\SI{\Yt}{\meter}$}%             \psline(!1.4 Yt)(!1.6 Yt)%             \rput[l](*1.75 {\y(\n)}){$t=\SI{\n}{\second}$}%             \pscircle*(*3.5 {\y(\n)}){5pt}%         }%     \end{pspicture}%     \end{document}      Unfortunately, the vertical line gets shifted to the left. I have tried to find the cause of problem but I give up. You can see I have removed all possible white spaces but the problem still exists. Could you find the source of problem? It is a hard puzzle! ## Edit: I checked the value of `Yt` using `\psPrintValue` and they use `,` instead of `.` as the decimal separator. Is it OK?               \documentclass[pstricks,border=12pt]{standalone}     \usepackage{multido}     \usepackage[nomessages]{fp}     %\def\LoadConstants{}     %\newcommand\const[3][3]{%         %\edef\temporary{round(#3}%         %\expandafter\FPeval\csname#2\expandafter\endcsname             %\expandafter{\temporary:#1)}%             %\edef\LoadConstants{\LoadConstants\ignorespaces                 %\noexpand\pstVerb{/#2 \csname#2\endcsname\space def}\ignorespaces}\ignorespaces%     %}     \newcommand\const[3][3]{%         \edef\temporary{round(#3}%         \expandafter\FPeval\csname#2\expandafter\endcsname             \expandafter{\temporary:#1)}%             \pstVerb{/#2 \csname#2\endcsname\space def}%     }          \const[1]{G}{9.8}     \const[1]{Tfinal}{2.0}     \def\y(#1){-G/2*#1^2}     \const[1]{Yfinal}{\y(Tfinal)}          \SpecialCoor     \usepackage{siunitx}     \usepackage{pst-tools}     \begin{document}     \begin{pspicture}[showgrid=false](5,\Yfinal)%         %\LoadConstants%         \psline(1.5,0)(!1.5 Yfinal)%         \multido{\n=0.0+0.5}{15}%         {%             \const[1]{Yt}{\y(\n)}%             %\LoadConstants%             \rput[r](*1.25 {\y(\n)}){$\SI{\Yt}{\meter}$}%             \psline(!1.4 Yt)(!1.6 Yt)%             \rput[l](*1.75 {\y(\n)}){$t=\SI{\n}{\second}$}%             \pscircle*(*3.5 {\y(\n)}){5pt}%             \rput(*4 {\y(\n)}){\psPrintValue{Yt}}         }%     \end{pspicture}%     \end{document}


I am writing my thesis using a LaTeX template. When I tried to import my references, I got the following errors when I texifyed my `thesis.tex`:               This is BibTeX, Version 0.99d (MiKTeX 2.9 64-bit)     The top-level auxiliary file: thesis.aux     A level-1 auxiliary file: 0_frontmatter/abstract.aux     A level-1 auxiliary file: 0_frontmatter/acknowledgement.aux     A level-1 auxiliary file: 1_introduction/introduction.aux     The style file: aaai.bst     I found no \bibdata command---while reading file thesis.aux     Warning--I didn't find a database entry for "Chang04"     Warning--I didn't find a database entry for "Madhavan07"     Warning--I didn't find a database entry for "Liu03"     Warning--I didn't find a database entry for "Zhai05"     Warning--I didn't find a database entry for "Zhai06"     Warning--I didn't find a database entry for "Zhao05"     Warning--I didn't find a database entry for "Zhao06"     Warning--I didn't find a database entry for "Simon05"     Warning--I didn't find a database entry for "Miao09"     Warning--I didn't find a database entry for "Liu05"     Warning--I didn't find a database entry for "Zhu06"     Warning--I didn't find a database entry for "Crescenzi01"     Warning--I didn't find a database entry for "Chang01a"     Warning--I didn't find a database entry for "Wang03"     Warning--I didn't find a database entry for "Arasu03"     Warning--I didn't find a database entry for "Liu10"     Warning--I didn't find a database entry for "Cai03"     Warning--I didn't find a database entry for "Weng11"     Warning--I didn't find a database entry for "Weng12"     Warning--I didn't find a database entry for "Lu07"     Warning--I didn't find a database entry for "Lu11"     (There was 1 error message)          Command Line:   texify.exe --src "C:\Users\dweng\Dropbox\My PhD Thesis\thesis.tex"     Startup Folder: C:\Users\dweng\Dropbox\My PhD Thesis          This is pdfTeX, Version 3.1415926-2.4-1.40.13 (MiKTeX 2.9 64-bit)     entering extended mode     ("C:/Users/dweng/Dropbox/My PhD Thesis/thesis.tex"     LaTeX2e <2011/06/27>     Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ar     abic, armenian, assamese, basque, bengali, bokmal, bulgarian, catalan, coptic,      croatian, czech, danish, dutch, esperanto, estonian, farsi, finnish, french, ga     lician, german, german-x-2012-05-30, greek, gujarati, hindi, hungarian, iceland     ic, indonesian, interlingua, irish, italian, kannada, kurmanji, latin, latvian,      lithuanian, malayalam, marathi, mongolian, mongolianlmc, monogreek, ngerman, n     german-x-2012-05-30, nynorsk, oriya, panjabi, pinyin, polish, portuguese, roman     ian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedish, swissgerm     an, tamil, telugu, turkish, turkmen, ukenglish, ukrainian, uppersorbian, usengl     ishmax, welsh, loaded.     ("C:\Users\dweng\Dropbox\My PhD Thesis\Latex/Classes/PhDthesisPSnPDF.cls"     Document Class: Latex/Classes/PhDthesisPSnPDF 2007/09/06 v2 PhD thesis class     ("C:\Program Files\MiKTeX 2.9\tex\latex\base\book.cls"     Document Class: book 2007/10/19 v1.4h Standard LaTeX document class     ("C:\Program Files\MiKTeX 2.9\tex\latex\base\bk12.clo"))     ("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\amssymb.sty"     ("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\amsfonts.sty"))     ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphics.sty"     ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\trig.sty")     ("C:\Program Files\MiKTeX 2.9\tex\latex\00miktex\graphics.cfg")     ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\dvips.def"))     ("C:\Program Files\MiKTeX 2.9\tex\latex\caption\caption.sty"     ("C:\Program Files\MiKTeX 2.9\tex\latex\caption\caption3.sty"     ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\keyval.sty")))     ("C:\Program Files\MiKTeX 2.9\tex\latex\fancyhdr\fancyhdr.sty")     ("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\eucal.sty")     ("C:\Program Files\MiKTeX 2.9\tex\generic\babel\babel.sty"     *************************************     * Local config file bblopts.cfg used     *     ("C:\Program Files\MiKTeX 2.9\tex\latex\00miktex\bblopts.cfg")     ("C:\Program Files\MiKTeX 2.9\tex\generic\babel\english.ldf"     ("C:\Program Files\MiKTeX 2.9\tex\generic\babel\babel.def")))     ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\color.sty"     ("C:\Program Files\MiKTeX 2.9\tex\latex\00miktex\color.cfg")     ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\dvipsnam.def"))     ("C:\Program Files\MiKTeX 2.9\tex\latex\footmisc\footmisc.sty")     ("C:\Program Files\MiKTeX 2.9\tex\latex\base\ifthen.sty")     ("C:\Program Files\MiKTeX 2.9\tex\latex\tools\multicol.sty")     ("C:\Program Files\MiKTeX 2.9\tex\latex\tocbibind\tocbibind.sty"          Package tocbibind Note: Using chapter style headings, unless overridden.          ) ("C:\Program Files\MiKTeX 2.9\tex\latex\nomencl\nomencl.sty")     Writing nomenclature file thesis.nlo     ("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\ifpdf.sty")     ("C:\Program Files\MiKTeX 2.9\tex\latex\hyperref\hyperref.sty"     ("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\hobsub-hyperref.sty"     ("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\hobsub-generic.sty"))     ("C:\Program Files\MiKTeX 2.9\tex\generic\ifxetex\ifxetex.sty")     ("C:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\auxhook.sty")     ("C:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\kvoptions.sty")     ("C:\Program Files\MiKTeX 2.9\tex\latex\hyperref\pd1enc.def")     ("C:\Program Files\MiKTeX 2.9\tex\latex\00miktex\hyperref.cfg")     ("C:\Program Files\MiKTeX 2.9\tex\latex\hyperref\backref.sty"     ("C:\Program Files\MiKTeX 2.9\tex\latex\oberdiek\rerunfilecheck.sty"))     ("C:\Program Files\MiKTeX 2.9\tex\latex\ltxmisc\url.sty"))          Package hyperref Message: Driver: hdvips.          ("C:\Program Files\MiKTeX 2.9\tex\latex\hyperref\hdvips.def"     ("C:\Program Files\MiKTeX 2.9\tex\latex\hyperref\pdfmark.def"          Package hyperref Warning: You have enabled option `breaklinks'.     (hyperref)                But driver `hdvips.def' does not suppport this.     (hyperref)                Expect trouble with the link areas of broken links.          )) ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\epsfig.sty"     ("C:\Program Files\MiKTeX 2.9\tex\latex\graphics\graphicx.sty")))     \@input{Latex/Macros/MacroFile1.aux}     ("C:\Users\dweng\Dropbox\My PhD Thesis\Latex/Macros/MacroFile1.tex")     ("C:\Program Files\MiKTeX 2.9\tex\latex\jknappen\mathrsfs.sty")     ("C:\Program Files\MiKTeX 2.9\tex\latex\dstroke\dsfont.sty")          LaTeX Warning: Unused global option(s):         [pdftex].          ("C:\Users\dweng\Dropbox\My PhD Thesis\thesis.aux"     ("C:\Users\dweng\Dropbox\My PhD Thesis\0_frontmatter/abstract.aux")     ("C:\Users\dweng\Dropbox\My PhD Thesis\0_frontmatter/acknowledgement.aux")     ("C:\Users\dweng\Dropbox\My PhD Thesis\1_introduction/introduction.aux"          LaTeX Warning: Label `fig1' multiply defined.          )) ("C:\Program Files\MiKTeX 2.9\tex\latex\hyperref\nameref.sty"     ("C:\Program Files\MiKTeX 2.9\tex\generic\oberdiek\gettitlestring.sty"))     ("C:\Users\dweng\Dropbox\My PhD Thesis\thesis.out")     ("C:\Users\dweng\Dropbox\My PhD Thesis\thesis.out") <qub.png> [1     \FN@pp@footnotehinttrue      ] ("C:\Users\dweng\Dropbox\My PhD Thesis\0_frontmatter/abstract.tex" [2]     [3]) [4     \FN@pp@footnotehinttrue      ] ("C:\Users\dweng\Dropbox\My PhD Thesis\0_frontmatter/acknowledgement.tex"     [1]) [2     \FN@pp@footnotehinttrue      ] ("C:\Users\dweng\Dropbox\My PhD Thesis\thesis.toc") [3] [4]     ("C:\Users\dweng\Dropbox\My PhD Thesis\thesis.lof"     ("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\umsa.fd")     ("C:\Program Files\MiKTeX 2.9\tex\latex\amsfonts\umsb.fd")     ("C:\Program Files\MiKTeX 2.9\tex\latex\jknappen\ursfs.fd")) [5] [6]     ("C:\Users\dweng\Dropbox\My PhD Thesis\thesis.lot") [7] [8]     ("C:\Users\dweng\Dropbox\My PhD Thesis\1_introduction/introduction.tex"     Chapter 1.          LaTeX Warning: Citation `Chang04' on page 1 undefined on input line 18.               LaTeX Warning: Citation `Madhavan07' on page 1 undefined on input line 18.          <1_introduction/figures/abebooks_query_interface.eps>     <1_introduction/figures/abebooks_two_records_prefix.eps> [1]     <1_introduction/figures/two_plates_examples.eps> [2]          LaTeX Warning: Citation `Liu03' on page 3 undefined on input line 47.               LaTeX Warning: Citation `Zhai05' on page 3 undefined on input line 47.               LaTeX Warning: Citation `Zhai06' on page 3 undefined on input line 47.               LaTeX Warning: Citation `Zhao05' on page 3 undefined on input line 47.               LaTeX Warning: Citation `Zhao06' on page 3 undefined on input line 47.               LaTeX Warning: Citation `Simon05' on page 3 undefined on input line 47.               LaTeX Warning: Citation `Miao09' on page 3 undefined on input line 47.               LaTeX Warning: Citation `Liu05' on page 3 undefined on input line 47.               LaTeX Warning: Citation `Zhu06' on page 3 undefined on input line 47.               LaTeX Warning: Citation `Crescenzi01' on page 3 undefined on input line 47.               LaTeX Warning: Citation `Chang01a' on page 3 undefined on input line 47.               LaTeX Warning: Citation `Wang03' on page 3 undefined on input line 47.               LaTeX Warning: Citation `Arasu03' on page 3 undefined on input line 47.               LaTeX Warning: Citation `Liu10' on page 3 undefined on input line 47.               LaTeX Warning: Citation `Liu10' on page 3 undefined on input line 47.               LaTeX Warning: Citation `Cai03' on page 3 undefined on input line 47.               LaTeX Warning: Citation `Crescenzi01' on page 3 undefined on input line 47.               LaTeX Warning: Citation `Chang01a' on page 3 undefined on input line 47.               LaTeX Warning: Citation `Wang03' on page 3 undefined on input line 47.               LaTeX Warning: Citation `Arasu03' on page 3 undefined on input line 47.               LaTeX Warning: Citation `Liu03' on page 3 undefined on input line 47.               LaTeX Warning: Citation `Zhai05' on page 3 undefined on input line 47.               LaTeX Warning: Citation `Zhai06' on page 3 undefined on input line 47.               LaTeX Warning: Citation `Zhao05' on page 3 undefined on input line 47.               LaTeX Warning: Citation `Zhao06' on page 3 undefined on input line 47.               LaTeX Warning: Citation `Simon05' on page 3 undefined on input line 47.               LaTeX Warning: Citation `Miao09' on page 3 undefined on input line 47.               LaTeX Warning: Citation `Liu05' on page 3 undefined on input line 47.               LaTeX Warning: Citation `Zhai05' on page 3 undefined on input line 47.               LaTeX Warning: Citation `Zhai06' on page 3 undefined on input line 47.               LaTeX Warning: Citation `Simon05' on page 3 undefined on input line 47.               LaTeX Warning: Citation `Liu05' on page 3 undefined on input line 47.               LaTeX Warning: Citation `Zhu06' on page 3 undefined on input line 47.               LaTeX Warning: Citation `Zhao06' on page 3 undefined on input line 49.               Underfull \vbox (badness 3579) has occurred while \output is active [3]          LaTeX Warning: Citation `Cai03' on page 4 undefined on input line 55.          [4] [5]          LaTeX Warning: Citation `Weng11' on page 6 undefined on input line 67.          [6] <1_introduction/figures/abebooks_two_records_prefix.eps>          LaTeX Warning: Citation `Weng11' on page 7 undefined on input line 81.               LaTeX Warning: Citation `Weng12' on page 7 undefined on input line 81.               LaTeX Warning: Citation `Lu07' on page 7 undefined on input line 81.               LaTeX Warning: Citation `Lu11' on page 7 undefined on input line 81.               LaTeX Warning: Citation `Wang03' on page 7 undefined on input line 81.          [7]          LaTeX Warning: Citation `Cai03' on page 8 undefined on input line 83.               LaTeX Warning: Citation `Weng11' on page 8 undefined on input line 83.          <1_introduction/figures/annotation_flow_chart.eps>) [8] [9]     ("C:\Users\dweng\Dropbox\My PhD Thesis\thesis.bbl"     ("C:\Users\dweng\Dropbox\My PhD Thesis\thesis.brf")          ! LaTeX Error: Something's wrong--perhaps a missing \item.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.3 \end{thebibliography}          ?       So how to solve these warnings and especially how to solve the 'missing `\item`' one. I know the problem must occurs in the bibliography section. The content of my bibtex file is like:               @article{Abdessalem10,       author    = {Talel Abdessalem and                    Bogdan Cautis and                    Nora Derouiche},       title     = {ObjectRunner: Lightweight, Targeted Extraction and Querying                    of Structured Web Data},       journal   = {PVLDB},       volume    = {3},       number    = {2},       year      = {2010},       pages     = {1585-1588},       ee        = {http://www.comp.nus.edu.sg/$\sim$vldb2010/proceedings/files/papers/D18.pdf},       bibsource = {DBLP, http://dblp.uni-trier.de}     }      I am using the following code:                   \bibliographystyle{aaai}%{CUEPhDbiblio-url}         \bibliography{12_backmatter/myrefs} % adjust this to fit your BibTex file      I am using Winedt 6 & MikTex2.9 x64, and after I ran BibTex in 'Tex', the following errors popped up:               Command Line:   bibtex.exe "thesis"     Startup Folder: C:\Users\dweng\Dropbox\My PhD Thesis          This is BibTeX, Version 0.99d (MiKTeX 2.9 64-bit)     The top-level auxiliary file: thesis.aux     A level-1 auxiliary file: 0_frontmatter/abstract.aux     A level-1 auxiliary file: 0_frontmatter/acknowledgement.aux     The style file: aaai.bst     I found no \citation commands---while reading file thesis.aux     Database file #1: 12_backmatter/myrefs.bib     (There was 1 error message)


title: Tikz: Problem with Standalone

text: I have difficulty in using standalone package along with TikZ. I have the following standalone file: `l1NormInAction.tex` * * *               \documentclass[tikz,border=3mm]{standalone}          \begin{document}          \begin{tikzpicture}     \draw [thick, ->] (-1.5,0)--(3,0);     \draw [thick, ->] (0,-1.5)--(0,2);     \draw[blue,dashed, thick] (-1,0)--(0,1)--(1,0)--(0,-1)--cycle;     \node[above right] at (0,1) {$\hat{\mathbf{x}}$};     \node[below left] at (0,0) {$\mathbf{x}$};     \draw[<->,shorten <=-1cm, shorten >=-3mm,thick] (0,1)--(2,0) node [right, above] {$\mathbf{D}$};     \end{tikzpicture}          \end{document}          _________________________________________________________________      Using standalone package I used the following code in my document.               \begin{figure}[!htb]     \centering     \includestandalone[width=.8\textwidth]{figures/l1NormInAction}     \end{figure}      The output is attached here. This is not in the expected format and it contains some strange number. Where am I going wrong? ![enter image description here](http://i.stack.imgur.com/Cuazh.jpg)


title: How to align if-condition in equation systems

text: I use this environment for an equation system:               \newenvironment{sistema}{\left\lbrace\begin{array}{@{}l@{}}}{\end{array}\right.}      But in this way the "if-conditions" are not aligned, as an example:               \[     \lvert a \rvert =     \begin{sistema}     a \quad \text{if } a > 0 \\     -a  \quad \text{otherwise}     \end{sistema}     \]      Is it possible to align them? (Or even simpler) is there any other enviroment that build sytems automatically?


title: Multicolumn doesn't work well with onslide

text: I have the following code which works without error:               \documentclass{beamer}     \usetheme{Boadilla}     \usepackage[frenchb]{babel}          \begin{document}     \begin{frame}     \begin{tabular}{ll|ll}       \onslide<1->{a & b & c & d}       \onslide<2->{         \\ \hline         \multicolumn{2}{l|}{Line 1}         \\         \multicolumn{2}{l|}{Line 2 left}         & Line 2 right       }       \\ \hline     \end{tabular}     \end{frame}     \end{document}      However, I changed `Line 2 right`to `\multicolumn{2}{l}{Line 2 right}`, it didn't compile anymore. Then I removed `onslide<2->`, it compiled again, but without overlays effect. So it seems that the 3rd `multicoulmn` does not work well with `onslide`, does anyone know how to solve it?               ...     \onslide<2->{       \\ \hline       \multicolumn{2}{l|}{Line 1}       \\       \multicolumn{2}{l|}{Line 2 left}       & \multicolumn{2}{l}{Line 2 right} \\\hline     }     \onslide<3->{       \multicolumn{2}{l|}{Line 1}       \\        \multicolumn{2}{l|}{Line 2 left}       & \multicolumn{2}{l}{Line 2 right} \\\hline     }      ...


title: Compiling table of contents with memoir class yields block in position after the number when using the \part command

text: When I compile a table of contents using the memoir class for my phd thesis, and I use the `\part{}` command, in the output Part 3 and Part 4 have a little black block on the position immediately after the defining number. Also, Latex puts the first letter of the part title in the same position as this block. Does anyone know what could be causing this, and where to correct it? An example of the output: ![Output after compiling the Table of Contents using the \\part command](http://i.stack.imgur.com/MZ1c0.png)


title: LaTeX plugin for vim editor in Linux

text: I have installed gvim on my Ubuntu 12.04 operating system.How to install the LaTeX plugin for gvim?I have TeXlive installed. I used the following link to follow to the instructions: http://vim- latex.sourceforge.net/index.php?subject=download&title=Download I have .vim folder in my home folder but no .vimrc


title: Pagestyle wrong after \cleardoublepage

text: Using KOMA-script I have problems with a twosided document. I want my sections to start on an odd page, so i use `\cleardoublepage` before starting the next section. I want the section title to be displayed in the right headline and the subsection title displayed in the left headline. Whenever a section ends on an odd page everything works fine, one empty page is added and the sections starts on the next odd page with the correct pagestyle. But it blows up when a section ends on an even side. The new section correctly starts on the next odd page without an additional blank page but it has the wrong pagestyle and no headers at all.               \documentclass[a4paper,11pt,headsepline=true,twoside=true]{scrartcl}          \usepackage{scrpage2}     \pagestyle{scrheadings}     \setheadsepline{1pt}          \rohead{\leftmark}     \lehead{\rightmark}     \automark[subsection]{section}     \usepackage{lipsum}          %Dokument     \begin{document}     \section{test}     blah blah blah     \cleardoublepage     \section{test2}     \lipsum     \cleardoublepage     \section{test3}     \lipsum     \end{document}      Headers are shown on the page where section test2 starts but not on the page where section test3 starts. What goes wrong here?


title: Make a heading in beamer

text: I would like to have the ability to add "headings" to content in my beamer slides. By heading I just mean slightly larger text that automatically breaks the row and adds some margins to the surrounding text. Basically something that is exactly like the `\section` command when writing an article. I have so far done this using the `block` environment like               \begin{block}{The heading}     The content goes here.     \end{block}      which worked with my previous theme since the block background was the same as the slide background. But in my new theme I want to have the usual colored boxes, so some other method is required. I tried implementing a new `headingblock` environment that is basically a block environment with new colors:               \newenvironment{headingblock}[1]{%       \setbeamercolor{block body}{bg=white, fg=black}       \setbeamercolor{block title}{bg=white, fg=liu_blue}       \begin{block}{#1}}{\end{block}}      The problem is that everything else inside the block is affected by the `\setbeamercolor` calls which means I can't have another block inside the headingblock. Also it feels kind of hackish. What is the best way to implement this? **Edit** To be extra clear, I am not looking for a frame title, but subheadings within the frame. Something like:               \begin{frame}       \frametitle{The slide}            \myheading{The first heading}       Some text and stuff that goes with the first heading            \myheading{Second heading}       More stuff goes here.     \end{frame}


title: "Display math should end with $$" error

text: I'm trying to write math in a code listing, like so :               \documentclass{article}     \usepackage{listings}     \begin{document}          \begin[mathescape]{lstlisting}     $\infty$     \end{lstlisting}          \end{document}      I get the following error :               ! Display math should end with $$.     <to be read again>                         \infty      l.10 $\infty                 $     ?


title: Draw tangents from point to ellipse using PSTricks

text: I'd like to create an ellipse (using psellipse, say). Call it E. And I'd like to specify a point P outside E. And then I'd like to construct, using PSTricks, the two rays starting at P and tangent to E. Is there an easy way to do this? I know I could do this by doing it for a circle and then "stretching" the picture to make it an ellipse, but that complicates other things I'd like to do. And of course one could figure this all out using explicit computations. But I'd like to know if there is some simple straightforward way.


title: XML or other markup to LaTeX?

text: In my university project I am doing software testing - planning, implementation, evaulation. All test documents have the format:   * General information   * Test categories   * Test cases   * Test implementation information   * Test run results   * Conclusion, errors As the test subject (software) is about graphs, the test cases are also represented with images (one visio file for one word document). I also have to put some comments on classes and methods. Now I am storing a lot of redundant information in a quite unstructured format (for the computer). The main test results are also in trx files (which are XML and can be parsed easily with powershell). I would like to make this "system" less redundant. I would like to store the test document in a strongly structured format (like xml). My question is whether there is any XML to LaTeX converters? I don't want to use XSLT. Google did not help me this time.


title: how to make the line connecting the parent node to child node longer?

text: I wish to draw a tree using the following code, however, the line connecting S0 and S1 is not long enough as described in the following picture, may someone help me?![enter image description here](http://i.stack.imgur.com/JebTn.png)               \documentclass[tikz]{standalone}     \usepackage{tikz}     \begin{document}     \tikzset{level 1/.style={level distance=0.7cm, sibling distance=4.5cm}}     \tikzset{level 2/.style={level distance=0.7cm, sibling distance=4.5cm}}          \tikzset{bag/.style={text width=20em,text centered,yshift=-0.2cm}}     \begin{tikzpicture}[grow=down, -stealth]     {\node[bag]{$S_0{:}(m)$}         child{ edge from parent node[left=0.1cm]{$$}; \node[bag]{$S_1{:}(i_1)$}            child{ edge from parent node[right=0.1cm]{$$}; \node[bag]{$S_4{:}(s)$}            }         }         child{ edge from parent node[right=0.1cm]{$$};         \node[bag,yshift=-1.0cm]{$S_2{:}(t_1)$}            child{ edge from parent node[left=0cm]{$$}; \node[bag]{$S_5{:}(t_1{+}t_2)$}            }            child{ edge from parent node[right=0cm]{$$}; \node[bag]{$S_6{:}(t_1{+}t_3)$}            }         }         child{edge from parent node[right=0.1cm]{$$}; \node[bag]{$S_3{:}(t_3)$}            child{ edge from parent node[right=0.1cm]{$$}; \node[bag]{$S_6{:}(t_1{+}t_3)$}            }         };     }     \end{tikzpicture}     \end{document}


title: How to change caption in a figure?

text: Let us consider the following example:               \documentclass{book}     \usepackage{graphicx}          \begin{document}     \title{\textbf{ \Huge{My \LaTeX}}}     \author{\textbf{MKS}}     \date{\today}     \maketitle          \begin{figure}[c]      \begin{center}          \rotatebox{0}{\scalebox{.40}{\includegraphics{fig1.png}}}     \caption{This is a Flower}          \end{center}     \end{figure}          \end{document}       This gives : ![enter image description here](http://i.stack.imgur.com/aeCrh.jpg)   ![enter image description here](http://i.stack.imgur.com/cWLWa.jpg) That is they take two different pages. I want to do it in a single page as well as I want to change the caption given in the following figure : ![enter image description here](http://i.stack.imgur.com/OQ2VO.jpg)


title: Problem on coding table in latex

text: I am wondering if you can help me on coding a table using LaTeX. I have difficulty in doing it. This is the code I have done:               \documentclass[12pt]{article}     %\documentclass[12pt,english]{report}     \usepackage[a4paper,bindingoffset=0.2in,left=0.40in,right=0.40in,top=1in,bottom=1in,footskip=0.75in]{geometry}     \usepackage{graphicx}     \usepackage{times}     \usepackage{ifthen}     \usepackage{url}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{graphicx}     \usepackage{lipsum}     \usepackage{setspace}     \usepackage{tabularx}     \usepackage{booktabs}     \usepackage{multirow}     \usepackage{rotating}     \author{}     \title{\fontsize{18}{28}\bf {A 0-1 Integer programming Formulation for solving the College Student-project assignment problem}}     \date{\today}     \begin{document}          \maketitle     \begin{abstract}     The assignment process for graduated students at the beginning of each semester is an           important process for all academic programs at Benghazi University. This paper presents a model that includes a number of constraints relating to the minimum and maximum number of students in each academic program and the prerequisites and corequisites for each project in each academic program. The objective is to determine a way to assign students to projects according to their preferences. A linear grade function that represents the preferences of each student is introduced to be maximized. A 0-1 integer programming formulation is proposed that was implemented using data from the 2008 fall and 2009 spring semesters in the Industrial Engineering and Manufacturing Systems Department at the University of Benghazi in Benghazi, Libya. The assignment solutions were obtained using different preference criterions and were then compared with the solutions previously obtained using a manual system.\\     \end{abstract}     \begin{table}[htb]     \begin{scriptsize}     %\renewcommand{\arraystretch}{1.3}     \caption{Comparison between IMPROVE algorithm, developed IMPROVE algorithm with other earlier approaches} \label{table_example}     \centering     \scalebox{0.84}{     \begin{tabular} {|c|p{1cm}|c|c|p{1cm}|c|p{1cm}|c|p{1cm}|c|p{1cm}|c|p{1cm}|c|c|c|c|c|c|c|c|c|}     %{\textwidth}{c @{\extracolsep{\fill}} ccccccccccccccc}          \hline            \begin{sideways}Case\end{sideways}& \multicolumn{1}{c}{Solution \linebreak source} & Approach &Cell &  exceptional elements&  void element & Grouping index &  Cell &  exceptional elements &  void element & Grouping index &  Cell &  exceptional elements &  void element & Grouping index \\              \hline     1   &   Kusiak & With p=2 & 2& 19 & 246 & $0.65^b$ & 2 & 13 & 232 & 0.67 & 2 & 13 & 232 & 0.67 \\     1   &   Kusiak & With p=2 & 2& 19 & 246 & $0.65^b$ & 2 & 13 & 232 & 0.67 & 2 & 13 & 232 & 0.67 \\     1   &   Kusiak & With p=2 & 2& 19 & 246 & $0.65^b$ & 2 & 13 & 232 & 0.67 & 2 & 13 & 232 & 0.67 \\     1   &   Kusiak & With p=2 & 2& 19 & 246 & $0.65^b$ & 2 & 13 & 232 & 0.67 & 2 & 13 & 232 & 0.67 \\     1   &   Kusiak & With p=2 & 2& 19 & 246 & $0.65^b$ & 2 & 13 & 232 & 0.67 & 2 & 13 & 232 & 0.67 \\     1   &   Kusiak & With p=2 & 2& 19 & 246 & $0.65^b$ & 2 & 13 & 232 & 0.67 & 2 & 13 & 232 & 0.67 \\     1   &   Kusiak & With p=2 & 2& 19 & 246 & $0.65^b$ & 2 & 13 & 232 & 0.67 & 2 & 13 & 232 & 0.67 \\     1   &   Kusiak & With p=2 & 2& 19 & 246 & $0.65^b$ & 2 & 13 & 232 & 0.67 & 2 & 13 & 232 & 0.67 \\         \hline     \end{tabular}     }     \end{scriptsize}     \end{table}     \end{document}      ![enter image description here](http://i.stack.imgur.com/mQwb5.jpg) I need code that can generate the same table as in the figure.


title: How to write a bibtex style for my university?

text: My university uses Harvard UTS referencing system. I have to write an engineering report and my references are more than 50. I think if I do all 50 references by hands, it takes too much time. So I would like to write a package and a bibtex style to ease the writing of references. Unfortunately I am not much familiar with bibtex. Can someone please help me writing a bibtex style file?


title: MetaUML -- generate image as output

text: I'm planning to use MetaUML to automatically generate UML diagrams (as images) and display them. I found that there is an utility, mptopdf, that helps generating the output as a PDF file:               mptopdf example.mp      Is there any way that I can generate the output as an image file (png/jpg, or any format)? Please suggest. Am entirely new to this.


title: How to insert logo in exam document class?

text: I would like to insert a logo for the exam questionnaire on the upper right where the title is placed but i dont know how.. i would like to appear it this way.


title: Listing, zebra effect and broken lines

text: In Creating a zebra effect using listings, I've found one solution to produce a zebra effect for listing. Unfortunately, this only works if the lines are not broken. Is there a way to fix this? Here is a code with an example showing the problem:               \documentclass[10pt,a4paper]{article}         \usepackage[utf8x]{inputenc}         \usepackage{ucs}         \usepackage[T1]{fontenc}         \usepackage{lmodern}         \usepackage[frenchb]{babel}         \usepackage[x11names, svgnames]{xcolor}         \usepackage{graphicx}         \usepackage{listings}         \usepackage{amsfonts}         \usepackage{amssymb}              \makeatletter             % Patch line number key to call line background macro             \lst@Key{numbers}{none}{%                 \def\lst@PlaceNumber{\lst@linebgrd}%                 \lstKV@SwitchCases{#1}%                 {none&\\%                  left&\def\lst@PlaceNumber{\llap{\normalfont                             \lst@numberstyle{\thelstnumber}\kern\lst@numbersep}\lst@linebgrd}\\%                  right&\def\lst@PlaceNumber{\rlap{\normalfont                             \kern\linewidth \kern\lst@numbersep                             \lst@numberstyle{\thelstnumber}}\lst@linebgrd}%                 }{\PackageError{Listings}{Numbers #1 unknown}\@ehc}}                  % New keys             \lst@Key{linebackgroundcolor}{}{%                 \def\lst@linebgrdcolor{#1}%             }             \lst@Key{linebackgroundsep}{0pt}{%                 \def\lst@linebgrdsep{#1}%             }             \lst@Key{linebackgroundwidth}{\linewidth}{%                 \def\lst@linebgrdwidth{#1}%             }             \lst@Key{linebackgroundheight}{\ht\strutbox}{%                 \def\lst@linebgrdheight{#1}%             }             \lst@Key{linebackgrounddepth}{\dp\strutbox}{%                 \def\lst@linebgrddepth{#1}%             }             \lst@Key{linebackgroundcmd}{\color@block}{%                 \def\lst@linebgrdcmd{#1}%             }                       % Line Background macro             \newcommand{\lst@linebgrd}{%                 \ifx\lst@linebgrdcolor\empty\else                 \rlap{%                     \lst@basicstyle                     \color{-.}% By default use the opposite (`-`) of the current color (`.`) as background                     \lst@linebgrdcolor{%                     \kern-\dimexpr\lst@linebgrdsep\relax%                     \lst@linebgrdcmd{\lst@linebgrdwidth}{\lst@linebgrdheight}{\lst@linebgrddepth}%                     }%                 }%                 \fi             }         \makeatother              \lstset{     %    * Number for lines             numbers=left,                   % Where to put the line-numbers             numberstyle=\footnotesize,      % Size of the fonts used for the line-numbers             stepnumber=1,                   % Step between two numbers             numbersep=5pt,                  % How far the line-numbers are from the code     %     %    * Back returns for long lines             breaklines=true,                % Sets automatic line breaking             breakatwhitespace=false,        % Automatic breaks only happen at whitespace ?             breakindent=0pt,                % Space before the text of a break             postbreak=\mbox{                % Character used at the begining of a break                 \rotatebox[y=0.9ex]{180}{\color{Red} $\Lsh$}%             },         }          \begin{document}          \begin{lstlisting}[language=Python,linebackgroundcolor={\ifodd\value{lstnumber}\color{gray}\fi}]     for i in range(5): for i in range(5): for i in range(5): for i in range(5): for i in range(5): for i in range(5):         sum += i**3     print sum          print('Fin de la boucle...')     \end{lstlisting}          \end{document}


title: Using parindent within the longtable environment

text: Here is a simple test case of the problem I'm having:               \documentclass{article}          \usepackage{longtable}          \begin{document}          \begin{longtable}{p{2in}|p{5in}}       foo & \parindent=1in bar \\     \end{longtable}          \begin{tabular}{p{2in}|p{5in}}       foo & \parindent=1in bar \\     \end{tabular}          \end{document}      This produces the following output ![this output](http://i.imgur.com/IkwFA.png) (I'm using "XeTeX, Version 3.1415926-2.2-0.9995.2 (TeX Live 2009/Debian)" on Ubuntu 11.04). There are two problems with this:   1. There are different default indentation settings in `tabular` and `longtable`   2. In the `longtable` environment, I can't seem to redefine the indentation using `\parindent` I'm not so much concerend with #1 if I can solve #2.


title: Place TikZ coordinate or \zlabel at every (base)line

text: I'm currently adjusting the code shown in Test if a paragraph has a page break in it? to support underlining and highlighting using TikZ similar as shown in Cool Text Highlighting in LaTeX, but without the need of `soul` or any other package which influences the typesetting of the text. For this I'm placing a TikZ coordinate (using `overlay,remember picture`) at the begin and end and use this to draw the lines. At the moment I simply calculate the baselines of the intermediate lines by adding `\baselineskip` to the Y-coordinate of the first marker (or subtracting it from the second of there is a page break between them). This works fine for normal text but leads to wrong positions if the line distance is not equal to `\baselineskip`, e.g. caused by an overly high element on the line. Would it be possible to automatically place such a TikZ marker on every line TeX produces? I also might use `\zlabel` from the `zref` package in addition to that to determine the page. I searched a little through _The TeXBook_ and had a look at the source code of `lineno` but both without success. It would be enough to add the marker only when the line is higher than normal. (My current _funny idea_ TM to solve this is to make some frequent letter active, but I try to avoid such trickery.)


title: sub- and superscripting together in text mode

text: I want to use sub- and superscript together in text mode. I've found this macro to solve the problem `\def\textsubsuperscript#1#2{\rlap{\textsubscript{#1}}\textsuperscript{#2}}` But it doesn't works well when the subscript is long. In that case the subscript overlaps with the following character. What could be the macro to enable sub- and superscripting in all cases?


title: Placing extra x tick on the upper axis

text: Please consider the following MWE. In addition to the `xstick` of the bottom x-axis (or primary x-axis) I would like to add a `extra tick` at the upper x-axis (or secondary x-axis).               \documentclass{article}          \usepackage{tikz}     \usepackage{pgfplots,pgfplotstable}     \usetikzlibrary{pgfplots,groupplots}          \begin{document}               \begin{tikzpicture}         \begin{groupplot}[             group style={                 group size=2 by 2,                 xlabels at=edge bottom,                 ylabels at=edge left,         vertical sep= 1.5cm,         horizontal sep= 2cm,         every axis y label/.style={at={(ticklabel cs:0.5)},rotate=90,anchor=near ticklabel}             },             footnotesize,             xlabel=xlabel,             ylabel=very long label             ,xtick={42,44,46,48}             ,extra x ticks={41}             ,extra x tick style={pos=right, grid=major,             tick label style={pos=left,font=\footnotesize,anchor=north}},         extra x tick labels={VLP},     ]         \nextgroupplot[title=\#1]             \addplot[dashed] coordinates{(42, 255) (43, 1584) (44, 1296) (45, 432) (46, 972) (47, 540) (48, 1104) (49, 0)};             \addplot[blue] coordinates{(41, 608) (42, 608) (43, 1068) (44, 1068) (45, 870) (46, 654) (47,654) (48, 654) (49, 0)};         \nextgroupplot[title=\#2]             \addplot[dashed] coordinates{(42, 400) (43, 400) (44, 0) (45, 400) (46, 0) (47, 0) (48, 0) (49, 0)};             \addplot[blue] coordinates{(41, 267) (42, 267) (43, 267) (44, 200) (45, 200) (46, 0) (47, 0) (48, 0) (49, 0)};         \nextgroupplot[title=\#3]             \addplot[dashed] coordinates{(42, 1800) (43, 2100) (44, 1800) (45, 900) (46, 2100) (47, 2100) (48, 2100) (49, 0)};             \addplot[blue] coordinates{(41, 1613) (42, 1613) (43, 1613) (44, 1613) (45, 1613) (46, 1613) (47, 1613) (48,1613) (49, 0)};         \nextgroupplot[title=\#4]             \addplot[dashed] coordinates{(42, 6800) (43, 2800) (44, 2800) (45, 2800) (46, 2000) (47, 2800) (48, 0) (49, 0)};             \addplot[blue] coordinates{(41, 3600) (42, 3600) (43, 2799) (44, 2789) (45, 2708) (46, 2254) (47, 2254) (48, 0) (49, 0)};         \end{groupplot}     \end{tikzpicture}               \end{document}


title: Bibliography and Index \label for cross-reference

text: I have each chapter of my `book` class in a different file all linked up in a master file. I also have bibliography in `refs.bib` file and also have an index. I'm trying to create a cross-reference to the Bibliography and Index special chapters of the book.               \usepackage{natbib}     \renewcommand\bibname{References}          \bibliographystyle{unsrt}     \bibliography{./tex/refs}          \cleardoublepage     \phantomsection     \addcontentsline{toc}{chapter}{Index}     \printindex      In my introduction, I would like to say to summarise my content where I say, "Chapter 1 descibes so and so, Chapter 2 .. etc. The end of the book also contains the list of references which you can link to by clicking on the numbers in the square brackets. An Index is contained at the very end of the book to make finding concepts and key words easy by clicking on the concept, which shoudl take you to the place in the book it is described in." I have struggled to find a way to provide cross-reference links to both Bibliography and Index. I know how to use the `\label` command and have no problem with it. But I don't know where or how to put a `\label` command in the above mentioned special chapters. I've tried labels like so:               \bibliography{./tex/refs}\label{cha:refs}     \addcontentsline{toc}{chapter}{Index}\label{cha:index}      but that seems to have put the wrong reference number - the number of the conclusion chapter was displayed for both links, but each one actually correctly taken me to each pseudo chapter! Can anyone advise   1. if this is the correct way of doing it    2. if it is, how can I display either proper numbers or ideally show References and Index as links themselves so I don't confuse the reader by giving numbers to the chapters that don't have numbers in the TOC?


title: How can get rid of margins and minimize white space to fully use a page in LaTeX?

text: I want to create a formulary in LaTeX. I can use it at the exam and it has do be at maximum a page recto-verso. I don't want margins (little margins for the print, no more). I want to minimize the withe space (between text and formulas, ...). I want to use the page in landscape and subdivide it in 4-5 columns. It is possible to create a similar thing? I'm a LaTeX user since three years, but i never modified layout of the page, so I don't know any package or any command. It has to look like this (sorry for the bad quality): ![handwritten page](http://i.stack.imgur.com/Pg7S0.jpg)


title: Headers of \chapters* take the headers of their previous \chapter

text: When using `book.cls` and using `\chapter*` after a `\chapter`, the header used in `\chapter*` is wrong. An example is pasted below. Is there any known workaround for that? I have tried quite some tricks without success.               \documentclass[]{book}          \begin{document}          \chapter{First Chapter}     aslkjdf          \chapter*{Unnumbered Chapter}     The GNU General Public License is a free, copyleft license for software and other kinds of works.          The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.          When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.          To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.          For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.          Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.          For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.          Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.          Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.          The precise terms and conditions for copying, distribution and modification follow.          \end{document}


title: Environment lstlisting undefined

text: Hi I have installed the listings package in order to display my code. I am running the following code within my document:               \begin{lstlisting}     public static void main(String[] args) {     System.out.println("Hello World");     }     \end{lstlisting}      But that is giving me the following error:               ! LaTeX Error: Environment lstlisting undefined.      I have mentioned `\usepackage{listings}` so I really dont know what the problem can be. Would anyone be kind enough to help or guide me the right way? EDIT: Minimum working example:               \documentclass[a4paper,12pt]{book}          \usepackage{times,a4wide}     \usepackage{graphicx}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{listings}          \begin{document}          \begin{lstlisting}     public static void main(String[] args) {     System.out.println("Hello World");     }     \end{lstlisting}          \end{document}


title: equation number problem

text: I'm relatively new to TeX/LaTeX, writing classroom notes. here's what I got:               \begin{equation} \label{eqn:constantspeed}     v=\frac{s}{t}     \end{equation}          It is very important to remember that Equation \ref{eqn:constantspeed} only works for objects moving at \emph{constant speed}.       The pdf output has (3.1) as the number on the left side of the page where the equation is but in the text that follows, it shows "Equation 3". Please tell me what I'm doing wrong and how to make the numbers match. Thank you.


title: microtype - does beta 08 exist, or is beta 07 the latest?

text: I see lots of mention of microtype beta-08, including on the tlcontrib page itself, but my downloaded version (from that page) reports itself as: 2011/08/18 v2.5 beta-07 when I run LuaLaTeX. Am I missing the real beta-08 somewhere, or is what I have really the most recent version, please?


title: Error on table inside a beamer

text: I'm preparing a presentation using the `beamer` class, and I need to put a tabular environment inside it and I always get the errors > Undefined control sequence `\end{frame}` and > Missing number, treated as zero `\end{frame}` The document is not compiling. I'm kinda new to LaTeX and I keep all my packages from document to document, I forgot what are some for. Do you have an idea what is happening?               \PassOptionsToPackage{table}{xcolor}     \documentclass[xcolor=dvipsnames]{beamer}          \usepackage[utf8]{inputenc}      \usepackage[T1]{fontenc}     \usepackage{lmodern}     \usepackage{graphicx}     \usepackage[french]{babel}     \usepackage{xlop} %opérations de beau gosse     \hypersetup{pdfpagemode=FullScreen} %probablement fullscreen at launch     \graphicspath{{images/}}     \usepackage{graphicx}          \usetheme{Berkeley}     \definecolor{color1}{RGB}{0,165,50} %creer une couleur     \setbeamercolor{normal text}{bg=white,fg=black}     \usecolortheme[named=color1]{structure} %utiliser une couleur     \setbeamertemplate{navigation symbols}{}           \theoremstyle{definition} %pour des boites a théorèmes     \newtheorem*{dfn}{Définition}                 \usepackage{multicol}     \usepackage{setspace}     \usepackage{hyperref}     \usepackage{lastpage}     \usepackage{textcomp}     \usepackage{rotating}               %\usepackage{colortbl}     \usepackage[table]{xcolor}          \addtobeamertemplate{footline}{\hfill\insertframenumber/\inserttotalframenumber\hspace{0.1cm}\null\vspace{0.05cm}} %numéro des diapos          \usepackage{setspace}               \begin{document}     \begin{frame}     \begin{figure}[H]     \doublespacing     \begin{center}     \begin{tabular}{cccc}          \hline     \textbf{Wear mechanisms} & \textbf{Applications} & \textbf{Deposited materials} & \textbf{Deposition processes}\\     \hline     Abrasive wear & Pump shafts & Cr-Co & HOVF, plasma, detonation\\     \hline     Adhesive wear & Pistons, brakes & Mo, Ni-Cr, Cu-Ni-In & Plasma, flame, HOVF\\     \hline     Contact wear & Aircraft leading edge & Tungsten carbide, Co & Detonation HVOF\\     \hline     Erosion & Power plant fan & Tungsten carbide, $\textnormal{Al}_{2}\textnormal{O}_{3}$, $\textnormal{Cr}_{2}\textnormal{O}_{3}$ & Detonation, HVOF\\     \hline          \end{tabular}     \caption{Examples of thermal sprayed coatings against wear}     \end{center}     \end{figure}     \end{frame}     \end{document}


title: how to align label of \tllabelcventry in moderncv+moderntimeline with \hintscolumnwidth?

text: I think the title is obvious but I will explain my idea with the following picture:   (I am using moderncv classic style toghether with moderntimeline) ![mockup](http://i.stack.imgur.com/ZHSm4.png) The first panel on the left shows the current output. The one in the center is something that I put together in photoshop to explain my objective (see below). The right panel is what I expect to obtain. This is not a new problem and other have given good solutions to the problem (moderntimeline: alignment of text on start and end of bars or Moderncv with moderntimeline - how do I center the label above the timeline?). However, none of them fulfill all my requirements and most of all they are not completely automatic, i.e. if the time scale changes I will have to change some code by hand). We know the length of `hintscolumnwidth` because we have to set it and here in my example is represented by green lines. All I want is the labels of`\tllabelcventry` and `\tldatelabelcventry` to stay inside that space. However, if the label using the default settings does not cross the green lines (orange box) than it should be left as is. Now let's consider that the label is inside a box (here represented by blue and orange). If that box cross the green lines (blue box) than it should be moved either left or right. But how much? well it should be the minimum value so its border align with the green line it has crossed.   This way, the label keeps some "information" to its mark but is also aligned within _hintscolumn_. I think if one could work with label boxes and `hintscolumnwidth` than the process should be automatic and whenever the timeline increases the label box that was once blue could become orange and would not require the hack.


title: Changing lstlistoflistings title

text: I'm having difficulty getting the list-of-listings section to display the proper title, it simply says "Contents" no matter what sort of changes I make. Here is the command I put in the preamble at a suggestion: ![Relevant preamble portion](http://i.stack.imgur.com/an9TH.png) here is where I include the list of listings ![list of listings code](http://i.stack.imgur.com/v03Fw.png) but here is the listings page title... ![enter image description here](http://i.stack.imgur.com/vW532.png) and if it's relevant here is the output of a sample listing in my document: ![enter image description here](http://i.stack.imgur.com/20LJV.png) to input the listings I am using insert-->Program Listing. I've googled a bit and searched around here but couldn't find anyone with a similar problem.. Any help is appreciated. Edit: An attempt at a minimum nonworking example. I'll do my best to make this helpful, but as I assume that I'm simply using the package incorrectly I'm not sure if this example is properly called 'nonworking' Screencap of example (here I have made no changes to the preamble, everything is defaults) ![enter image description here](http://i.stack.imgur.com/g2EwB.png) and its output: ![enter image description here](http://i.stack.imgur.com/68v8u.png) Now when I add the suggested line to preamble:               \renewcommand{\lstlistingname}{Matlab Code}      the output is identical.


title: I am trying to use circuitikz, but this error pops up whenever I compile

text: I am currently trying to run some examples in the `circuitikz` library, and I keep getting the following error and the document will not compile:               Package pgfkeys Error: I do not know the key '/tikz/circuitikz/label/align' and I am going to ignore it. Perhaps you misspelled it.          See the pgfkeys package documentation for explanation.      I don't know if I am missing any essential packages, but I have installed `circuitikz` and `xstring` and I assume that TikZ is part of the TeX distribution I have. (MacTeX 2010) I am compiling my documents with TeXShop on Mac OSX 10.6.8 with that distribution if that helps anyone. An example:               \documentclass{article}     \usepackage{mathtools}      \usepackage{graphicx}      \usepackage{circuitikz}      \DeclareGraphicsExtensions{.pdf,.png,.jpg}      \title{}      \author{}      \date{}      \begin{document}      \maketitle      \begin{circuitikz}[scale =1.2]     \draw (0,0) node[op amp] (opamp {} (opamp.+)                  node[left] {$v_+$} (opamp.-)                  node[left] {$v_-$} (opamp.out)                  node[right] {$v_0$} ;     \end{circuitikz}      \end{document}


title: Debugging a custom-bib bst file that crashes on book items

text: I created my own bibliography file with custom-bib (makebst), but when I run it with a reference to a book I get:               $ bibtex PhD     [...normal output]     Database file #1: PhD.bib     You can't pop an empty literal stack for entry oecd2001brc     while executing---line 1504 of file wdsphd.bst      The only thing on that line is a high-level `ITERATE` call. The style was created with these options:               %% merlin.mbs  (with options: `head,exlang,annote,seq-no,nm-rvvc,dt-beg,yr-par,xmth,tit-qq,qx,bt-qq,vol-bf,volp-sp,num-xser,pub-date,isbn,issn,doi,english,pp,ord,url,url-nl,nfss,,{}')     %% english.mbs  (with options: `exlang,annote,seq-no,nm-rvvc,dt-beg,yr-par,xmth,tit-qq,qx,bt-qq,vol-bf,volp-sp,num-xser,pub-date,isbn,issn,doi,english,pp,ord,url,url-nl,nfss,,{}')     %% merlin.mbs  (with options: `tail,exlang,annote,seq-no,nm-rvvc,dt-beg,yr-par,xmth,tit-qq,qx,bt-qq,vol-bf,volp-sp,num-xser,pub-date,isbn,issn,doi,english,pp,ord,url,url-nl,nfss,,{}')      The code for book items looks like:               FUNCTION {book}     { output.bibitem       author empty$         { format.editors "author and editor" output.check         }         { format.authors output.nonnull           crossref missing$             { "author and editor" editor either.or.check }             'skip$           if$         }       if$       format.btitle "title" output.check       crossref missing$         { format.bvolume output           new.block           format.number.series output           new.sentence           format.publisher.address output         }         {           new.block           format.book.crossref output.nonnull         }       if$       format.edition output       format.isbn output       format.doi output       new.block       format.note output       fin.entry       write.url     }      And this is the entry:               @book{oecd2001brc,      author = {OECD},      doi = {10.1787/9789264193550-en},      isbn = {9789264186903},      publisher = {OECD Publishing},      title = {{Biological Resource Centres: Underpinning the future of life sciences and biotechnology}},      url = {http://www.oecd-ilibrary.org/science-and-technology/biological-resource-centres\_9789264193550-en},      year = {2001}     }      Is there a way to get a better stacktrace from bibtex? What I have now doesn 't really tell me what is going on. If it can be fixed simply, help would also be appreciated.


title: Customize ToC entries for appendices

text: I want to customize the names of the appendix in the ToC. I redefined the chapternames to "Week" with               \addto\captionsdutch{         \renewcommand\chaptername{Week}}      and I included the chapter name in the ToC with               \titlecontents*{chapter}     [0pt]     {\addvspace{1em}}     {\bfseries\chaptername\ \thecontentslabel\quad}     {}     {\bfseries\hfill\contentspage}      to get a ToC like this: > **Week 1** Chaptername   > > > ### 1.1 Sectionname   > > > 1.1.1 Subsectionname   >  1.1.2 Subsectionname   > > >   >  **Week 2** Chaptername > > ### 2.1 Sectionname   > > > ### 2.2 Sectionname   > > > 2.2.1 Subsectionname Unfortunately, the chapters in the appendix are now added as > **Week A** Appendixname > > ### A.1 Sectionname I would like to change "Week" for all appendices in the ToC to something else, say "Custom appendix". I tried to use `\renewcommand` combined with `\chaptername`and `\appendixname`, but I could not solve it. The packages that could possibly influence this and which are included are               \usepackage{minitoc}     \usepackage{titletoc}     \usepackage{appendix}     \usepackage[ngerman,dutch]{babel}      I also changed the following:               \addto\extrasdutch{%          \def\sectionautorefname{hoofdstuk}         \def\chapterautorefname{week}         \def\subsectionautorefname{sectie}         \def\lstlistingautorefname{code}         \def\appendixautorefname{bijlage}      }      Is there anyone who can help me with this? ## Minimal working example               \documentclass[pdftex,11pt,a4paper,titlepage,oneside]{book}          % ////////////// PACKAGES /////////////////     \usepackage{minitoc}     \usepackage{listings}     \usepackage{color}     \usepackage{fancyhdr}     \usepackage{fancyref}     \usepackage{float}     \usepackage[pdftex]{hyperref}     \usepackage[pdftex]{graphicx}     \usepackage{titletoc}     \usepackage{appendix}     \usepackage[latin1]{inputenc}     \usepackage[ngerman,dutch]{babel}          % ////////////// ADDITIONS /////////////////     \addto\captionsdutch{%         \renewcommand\chaptername{Week}}          \addto\extrasdutch{%          \def\sectionautorefname{hoofdstuk}         \def\chapterautorefname{week}         \def\appendixautorefname{bijlage}      }          \lstset{ %         caption={\protect\filename@parse{\lstname}\protect\filename@base\text{.}\protect\filename@ext}     }          % ////// Include Chapter in TOC ////////////     \titlecontents*{chapter}     [0pt]     {\addvspace{1em}}     {\bfseries\chaptername\ \thecontentslabel\quad}     {}     {\bfseries\hfill\contentspage}          % ////////////// MAIN DOCUMENT /////////////////          \begin{document}     \frontmatter     \setcounter{tocdepth}{2}     \tableofcontents     \mainmatter     \chapter{Chapter in main part}     \section{title}     \chapter{Chapter in main part}     \section{title}          \appendix          \chapter{Chapter in appendix}          \chapter{Another chapter in appendix}          \section{Section in appendix}          \end{document}


title: How to reduce spacing before each section in latex

text: Below is my latex code. I have also uploaded a screenshot. As you can see from the screenshot that I want to reduce the space before the section title. I found some solution but they change the section title style. I want to keep this style but just need to reduce the space before the section.               %\title{My two column CV}     %     % tccv (two columns curriculum vitae) is a LaTeX class inspired by     % the template found at latextemplates.com by Alessandro Plasmati.     %     % Create by Nicola Fontana, the original files can be downloaded from:     % http://dev.entidi.com/p/tccv/     %     \documentclass{tccv}     \usepackage{amsmath}%     \usepackage{MnSymbol}%     \usepackage{wasysym}%     \usepackage[english]{babel}               \begin{document}          \part{Md name}          \section{Software skills}          \begin{eventlist}     \textbf{Good level: } Ruby, Ruby on Rails, Active Record, MySQL, C, C++, HTML5, CSS3, Jquery, handlebars.js, Jquery UI, Twitter Bootstrap, Git, Github, Linux, Windows, Apache, MS Visual Studio 2012 \& 2008, Net-beans, RubyMine, Pivotal Tracker     \newline \newline     \textbf{Intermediate: } Backtrack 5, Latex, Wordpress     \newline \newline     \textbf{Basic level: } Java, C\#, PHP, Oracle 10g, AutoCAD 2007, MATLAB 7.0          \end{eventlist}          \section{Achievements}     \begin{itemize}     \item 4 years govt. scholarship for HSC result.      \item 2 years govt. scholarship for SSC result.      \end{itemize}     \end{document}      ![enter image description here](http://i.stack.imgur.com/dyvRl.png)