title: Error when specifying width of column in table

text: \documentclass{beamer}     \begin{document}          \begin{frame}     \begin{table}     \begin{tabular}{c{15mm} | c | c | c | c}     Television & Radio & Washer & Dryer & Computer \\     \end{tabular}     \end{table}     \end{frame}          \end{document}      I'm making a Beamer presentation, and I want to limit the width of some column so that the entry appears as two lines instead of making the column too wide. But when I specify the width as 15mm, I got               LaTeX Error: Illegal character in array arg.      How can I fix it?


title: Overfull vbox - text paragraph not page breaking

text: I've got what seems to me to be a fairly simple article document. The issue is that the first page doesn't break onto the second (it seems until there's a new section or subsection). Whatever is there just overflows off the page and I get overfull \vbox error message. Here's my snippet, with all of my boring writing taken out for simplicity:               \documentclass[12pt,a4paper]{article}     \usepackage[top=3cm, bottom=3cm, left=2.5cm, right=3cm]{geometry}     \usepackage{amsmath}     \usepackage{setspace}     \onehalfspacing     \usepackage{fontspec}          \usepackage{vrsion}     \usepackage{graphicx}     \usepackage{hyperref}     \usepackage{cite}     \usepackage{natbib}     \usepackage{caption}     \captionsetup[figure]{labelfont=bf}          \date{}     \begin{document}     \title{Draft}     \author{Me}          \maketitle          \begin{abstract}     Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sapien elit, placerat non quam nec, gravida consectetur justo. Mauris pretium pellentesque lorem, vel viverra turpis placerat sit amet. Nunc fermentum nunc non purus consequat, non varius diam suscipit. Vestibulum ut dapibus erat, ut scelerisque lectus. Duis viverra elit magna, eget congue ligula consequat non. In bibendum aliquet neque, sed condimentum sem ultricies at. Vivamus tempus nisi sit amet orci commodo volutpat. Integer ut laoreet eros, eu mattis diam. Donec nec dui tortor. Aliquam tellus mauris, mollis vel orci sit amet, rutrum ullamcorper justo. Morbi ultricies mauris quis magna volutpat, at aliquam nisl interdum.          \end{abstract}          \tableofcontents          \section{Scope}     Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sapien elit, placerat non quam nec, gravida consectetur justo. Mauris pretium pellentesque lorem, vel viverra turpis placerat sit amet. Nunc fermentum nunc non purus consequat, non varius diam suscipit. Vestibulum ut dapibus erat, ut scelerisque lectus. Duis viverra elit magna, eget congue ligula consequat non. In bibendum aliquet neque, sed condimentum sem ultricies at. Vivamus tempus nisi sit amet orci commodo volutpat. Integer ut laoreet eros, eu mattis diam. Donec nec dui tortor. Aliquam tellus mauris, mollis vel orci sit amet, rutrum ullamcorper justo. Morbi ultricies mauris quis magna volutpat, at aliquam nisl interdum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sapien elit, placerat non quam nec, gravida consectetur justo. Mauris pretium pellentesque lorem, vel viverra turpis placerat sit amet. Nunc fermentum nunc non purus consequat, non varius diam suscipit. Vestibulum ut dapibus erat, ut scelerisque lectus. Duis viverra elit magna, eget congue ligula consequat non. In bibendum aliquet neque, sed condimentum sem ultricies at. Vivamus tempus nisi sit amet orci commodo volutpat. Integer ut laoreet eros, eu mattis diam. Donec nec dui tortor. Aliquam tellus mauris, mollis vel orci sit amet, rutrum ullamcorper justo. Morbi ultricies mauris quis magna volutpat, at aliquam nisl interdum. Donec nec dui tortor. Aliquam tellus mauris, mollis vel orci sit amet, rutrum ullamcorper justo. Morbi ultricies mauris quis magna volutpat, at aliquam nisl interdum. Donec nec dui tortor. Aliquam tellus mauris, mollis vel orci sit amet, rutrum ullamcorper justo. Morbi ultricies mauris quis magna volutpat, at aliquam nisl interdum.          \section{Scope}     Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sapien elit, placerat non quam nec, gravida consectetur justo. Mauris pretium pellentesque lorem, vel viverra turpis placerat sit amet. Nunc fermentum nunc non purus consequat, non varius diam suscipit.           \end{document}      To me this all looks pretty simple, so I can't see why this would be happening. Any ideas? Same when using LaTeX or XeLaTex.


title: drawing smooth parabolic curves in tikz

text: I am trying to draw the following picture with Tikz. However it doesn't seem possible to get the correct smoothness like in the picture. ![enter image description here](http://i.stack.imgur.com/vqRhh.png) Can anyone tell me how to achieve it. What I have tried so far is using `parabola` function and `smooth` plot.               \documentclass{article}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}          \draw [<->,thick] (0,5) node (yaxis) [above, text width=3.5cm,align=center] {$s_1$}             |- (7,0) node (xaxis) [right] {$s_2$};          \coordinate (A) at (2.5,4.7);     \coordinate (B) at (2.80,2.0);     \coordinate (C) at (3.75,1.50);     \coordinate (D) at (6.7,0.75);          %\draw[thick] plot [smooth] coordinates{(A) (B) (C) (D)};     % \draw (2.5,4.7) parabola bend (2  .8,2) (6.7,0.75);     \draw  (6.7,1.00) parabola bend (3.5,0.95) (2.5,4.7) ;          \node [yshift=0.25cm] at (A) {$T = C$};     \node [xshift=0.65cm] at (D) {$c_1/\psi$};          \draw[dotted] (0,4.5) node[xshift=-8pt] {$n_1$} -- (6.5,4.5);     \draw[dotted] (6.5,4.5) -- (6.5,0) node[yshift=-8pt] {$n_2$};               %\draw[dotted] (0,0.9) node[xshift=-8pt] {$1$} -- (4.5,0.9);     \draw[dotted] (1.5,4.5) -- (1.5,0) node[yshift=-8pt] {$I_1/\psi$};          \node[text width=2.5cm,align=center] at (3,0.75) {Transfer domain \\ $T > C$};     \node[text width=4cm,align=center] at (4.75,3.5) {Computation domain \\ $T < C$};          \end{tikzpicture}     \end{document}


title: Indent math blocks?

text: I want all math blocks `\begin{math}` in my document to be intended automatically, like it's the case with `\begin{itemize}`. Can anyone please give me a hint on how to do this? Thanks :-)


title: Rounded box with image and text

text: I'm trying to create a rounded box with both text and image. The desired result is as this: ![mockup](http://i.stack.imgur.com/D1wvA.png) Where the image is rounded at the left edges. I have managed everything except the the image part using `mdframed` as follows:               \documentclass[a4paper,11pt]{article}     \usepackage[utf8]{inputenc}     \usepackage{graphicx}     \usepackage{color}     \usepackage[margin=0pt,bottom=1em]{geometry}     \usepackage{tikz}     \usetikzlibrary[shadows]     \usepackage[framemethod=TikZ]{mdframed}          \mdfdefinestyle{item}{roundcorner=10pt,                           leftmargin=20pt,                           rightmargin=20pt,                           backgroundcolor=gray,                           innertopmargin=.5em,                           innerbottommargin=10pt,                           innerleftmargin=200pt,                           middlelinewidth=0pt,                           font=\normalfont\large,                           shadow=true,                           frametitlefont=\normalfont\Large\bfseries,                           frametitleaboveskip=1em}          \begin{document}          \vfill % autospace boxes when there are more than one     \begin{mdframed}[style=item,frametitle=title]     Auto wrapped text aaa aaaa a aaa a aaaaa aaaaaaa aaaa a aaa a aaaaa aaaaaaa aaaa a aaa a aaaaa aaaaaaa aaaa a aaa a aaaaa aaaaaaa aaaa a aaa a aaaaa aaaaaaa aaaa a aaa a aaaaa aaaaaaa aaaa a aaa a aaaaa aaaaaaa aaaa a aaa a aaaaa aaaaaaa aaaa a aaa a aaaaa aaaaaaa aaaa a aaa a aaaaa aaaaaaa aaaa a aaa a aaaaa aaaaaaa aaaa a aaa a aaaaa aaaaaaa aaaa a aaa a aaaaa aaaa     \end{mdframed}          \end{document}      ![output](http://i.stack.imgur.com/xWrgP.png) If the image scales to fit height of box and then crops at the text that would be good, but as long as aspect ratio is preserved I can adapt my images to work with most ways. Any ideas how to proceed from here? Is there a better way than using `mdframed`?


title: How to fix a table that is too wide for margins?

text: I have created a table that is too wide for the margins. What I tried to do was implement `\hspace*{-50pt}` before `\begin{tabular}` and `\hspace{-50pt}` after `\end{tabluar}`. Which gets rid of the `overfull \hbox` message but the table is right to the edge of the paper. Is there way to scale it down so it centers and is not at the edge of the paper? Here is the MWE:               \documentclass[11pt,twoside,openright]{memoir}     \usepackage[size=pocket,trim,bleed]{createspace}     %\usepackage[paperwidth=4.25in, paperheight=6.875in,bindingoffset=.75in]{geometry}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[english]{babel}     \usepackage{tgtermes}          \usepackage{mathpazo}     \usepackage[protrusion=true,expansion=true]{microtype}     \usepackage{lipsum}     %\usepackage{type1cm}     %\usepackage{lettrine}          %\checkandfixthelayout          % See the ``Memoir customise'' template for some common customisations     % Don't forget to read the Memoir manual: memman.pdf          %\title{TITLE OF BOOK}     %\author{NAME OF AUTHOR}     %\date{} % Delete this line to display the current date          %% BEGIN TITLE          \makeatletter     \def\maketitle{%       \null       \thispagestyle{empty}%       \vfill       \begin{center}\leavevmode         \normalfont         {\LARGE\raggedleft \@author\par}%         \hrulefill\par         {\huge\raggedright \@title\par}%         \vskip 1cm     %    {\Large \@date\par}%       \end{center}%       \vfill       \null       \cleardoublepage       }     \makeatother     \author{AUTHOR}     %\author{NAME OF AUTHOR}     \title{TITLE}     %\date{}                                                       %%% BEGIN DOCUMENT          \begin{document}     \pdftitle{TITLE}     \pdfauthor{AUTHOR}     \pdfsubject{SUBJECT}     \chapterstyle{bianchi}          \let\cleardoublepage\clearpage               \maketitle                                   \frontmatter          \null\vfill          \begin{flushleft}          Copyright \copyright       %\textit{TITLE}          All rights reserved.          ISBN:           ISBN--13:      \bigskip                              \end{flushleft}     \let\cleardoublepage\clearpage     \clearpage     \tableofcontents              \chapter{[Chapter name]}         \begin{figure}     \hspace*{-50pt}         \begin{tabular}{l l l l }             Open & $512$ & P/E & $21.0$ \\             Range & $500-598$ & Mkt.Cap & $100.5$B\\             52 Week high/low & $456-612$ & \# of shares & $256$m\\             VOL/Avg. & 355458760/2914515 & Beta & $1.02$ \\             Ask & $510.25$ & Inst. Own & $45$\% \\             Div/Yield & - & Bid & $511.25$ \\             & & EPS & 25.07              \end{tabular}             \hspace{-50pt}             \caption{TEXT}         \end{figure}               \mainmatter     \sloppy     %Input all of the chapter here               \backmatter               \end{document}


title: Texmaker user commands: output to log/messages

text: I'm using several User Commands with texmaker on Mac OS X. My problem is, that some of the commands are just shellscripts, or other programs like `texcount` that produces output to the STDOUT. Is there a way to tell texmaker, that the output generated by user commands should be displayed inside the log/message view of texmaker? e.g. I have a user command for word count `/usr/texbin/texcount %.tex -inc -sum` that runs properly on the terminal, but doesn't produce any output to texmaker's log window when ran as a user command. thx!


title: What can go wrong if I set naturalnames to true when using hyperref?

text: I have some hyperlink problems in a PDF that I appear to be able to solve by adding `\hypersetup{naturalnames=true}` to my .tex file. What might go wrong by adding this command? The text of my paper doesn't appear to have changed, and the links that went to the wrong places before now go to the right places, but might some other links go to the wrong places without warning? I don't have a short example to show; I'm just wondering if there are any common problems to look out for.


title: Parsing commands with multiple optional arguments

text: Some LaTeX commands accept multiple optional arguments. Here are some examples:   * `\makebox[<width>][<pos>]{<text>}`   * `\framebox[<width>][<pos>]{<text>}`   * `\parbox[<pos>][<height>][<contentpos>]{<width>}{<text>}`   * `\raisebox{<lift>}[<height>][<depth>]{<text>}`   * `\begin{minipage}[<pos>][<height>][<contentpos>]{<width>} <content> \end{minipage}` (actually an environment) (But my question is meant in a fully general way.) It would seem intuitive that if only a proper subset of optional arguments is supplied, they are filled in starting from the left. ( **< \- Note that this guess turns out to be incorrect!**) **But is the behavior documented somewhere? Does anybody know of any counterexamples?** There is no a priori reason why all commands would _have_ to behave like that.


title: Automatic line break for writing context-free grammars?

text: I am currently writing context-free grammars in Latex, I have one production in each line, e.g.               S -> a | B     B -> C     C -> D | d      Currently I am using the math mode for this and a manual line break. Is there a better environment for my case? One where I e.g. don't need manual line breaks? Thanks :-)


title: Searching for a LaTeX Processor

text: I would like to know if there exists a LaTeX processor that works similar to SAXON for XML and XSLT documents. I would need it to extract some information from source code, and define its semantics.


title: Regarding the `book`, `report`, and `article` document classes: what are the main differences?

text: What are the main differences between the `book`, `report`, and `article` document classes? I am interested in the following:   1. visual differences in the final document;   2. differences in the way the document must be coded;   3. differences between the standard classes and their `KOMA-Script` equivalents; and   4. any other significant differences.


title: Does pdfpages break the floating mechanism?

text: I have the problem, that I need to insert some external pates in my thesis. After that I start a new section and want to add a (floating) figure. The problem is that the figure is not set here as I defined (`\begin{float}[htp]`). Instead it is always set on a separate page as far as I can see. I will give an example. The file to be included (Call it `includefile.tex` or modify the other file later and run pdflatex on it.):               \documentclass[a4paper,12pt]{scrartcl}     \usepackage[utf8x]{inputenc}     \title{This is just a simple sample file}     \begin{document}     \maketitle     \end{document}      The main file:               \documentclass[a4paper,12pt]{scrartcl}     \usepackage[utf8]{inputenc}     \usepackage{pdfpages}     \usepackage{lipsum}     \begin{document}     \section{First}     \lipsum[1-4]     \includepdf{includefile.pdf}     \pagebreak     \section{Problem}     Here comes some simple text.          \begin{figure}[htp]         \centering         \rule{0.5\textwidth}{0.3\textheight}         \caption{A simple picture.}     \end{figure}          This should come after the figure.     \end{document}      You will see, that the black box is typeset on the forth page. Although there is clearly enough space on the third page. If you just diable the input of the external PDF file (comment out line 8), you will get the expected result. How to place the figure generally correct? Is this a problem of pdfpages? I do know of the possibilty to use the `float` package and the `H` modifier. The is not what I want to do because this should be done automatically. I have it in an user defined macro for easy modification of e.g the appearence. Therefore setting to `H` would lead to multiple changes in the text, which is what I would like to avoid.


title: Printing is cutting off the edges of my fboxes

text: \documentclass[10pt]{article}     \usepackage{mathpazo}       \usepackage[a4paper,margin=10mm]{geometry}     \begin{document}     \fbox{%       \begin{minipage}{\linewidth}         \textbf{Course:} \hfill \textbf{Essay} \rule{2em}{0.2pt} \textbf{of} \rule{2em}{0.2pt}       \end{minipage}     }     \end{document}      The right margin of the fbox is cut off when I print the document. It looks fine in print preview, however. What can I do about this? Where is the problem? What should I try to diagnose the problem? Looking more closely at the pdf onscreen, it seems like the left margin is still bigger than the right margin: they should be the same. Could this have something to do with it?


title: Drawing quadric surfaces using TiKz

text: Is there any built-in functionality in TiKz/PGF that allows for drawing quadric surfaces, i.e. surfaces given by the equation               Ax^2 + By^2 + Cz^2 + Dz = E?      I'm aware of the raw gnuplot command enabling the use of virtually every gnuplot command (at least to my knowledge). I tried using the following command:               \begin{tikzpicture}       \draw[thick] plot[raw gnuplot] function{set urange [0:2*pi]; set vrange [0:pi]; set parametric; set isosample 40; splot cos(u)*sin(v)/3, sin(u)*sin(v), cos(v)};       \end{tikzpicture}      but the result is less than satisfactory.


title: TeXmacs page header alignment and page numbering

text: I am trying to create a header like "Document ABC (Page xxx of xxx)" which is center-aligned on my TeXmacs document. However, I could not get set-header content to be center-aligned, they always appear on the top-left corner. Also, if I use page-nr in the set-header text, it always appears as 0. What should I do to achieve what I want? Thanks!


title: Labeling problems with exam class usage when using multiple chapters

text: Using the `exam` document class I'm trying to create a questions/answers-sheet for a book. When working on the first chapter, everything worked nicely. When I came to the second chapter, I realized I would have problems with the question numbering, since there are questions with the same numbers. The specific warnings I got was:               LaTeX Warning: Label `question@1' multiply defined.      The basic layout of the body of my document is as follows:               \section*{Chapter 1}     \setcounter{section}{1}         \begin{questions}             \numberwithin{question}{section}             \setcounter{question}{0}             \question                      \begin{solution}                      \end{solution}         \end{questions}          \section*{Chapter 2}     \setcounter{section}{2}         \begin{questions}             \numberwithin{question}{section}             \setcounter{question}{0}             \question                      \begin{solution}                      \end{solution}         \end{questions}      Compilation still works, but my editor is giving me a page full of warnings. There has to be a better more correct way, than what I'm doing right now. Could you recommend me a different way to make such a document?


title: Check for a valid file before using \includegraphics

text: I know how to check if a given argument represents an existing file (see this question). But is there also a possibility to check if this file can be included by `\includegraphics`? What I want to achieve is a command that   * includes an image (and does some more things) if it can, but   * includes some kind of info box and adds an entry to a 'list of missing images' if the argument doesn't point to a (existing and valid) image file.


title: babel \L command reverses letters, inserts Ł symbol

text: It's time for Eyal's babel+Hebrew (or right-to-left) incompatibility of the week; and this time, it's hyperref again. If you have:               \documentclass{article}     \usepackage[hebrew,english]{babel}     \usepackage{hyperref}     \begin{document}     \selectlanguage{hebrew}     מלל בעברית, \L{Some English within the Hebrew} ועוד עברית לאחר מכן.     \end{document}      You get the following: ![Ł and reversed English text](http://i.stack.imgur.com/LKrcr.png) if you use just babel without hyperref, you get the expected effect of `\L`: ![English text appears properly](http://i.stack.imgur.com/rURk4.png) This is pretty easy to work around - but I just noticed it, I thought it was some weird part of my other babel+hyperref compatibility issue. Why would hyperref do this? For those interested, here's some information about the Ł character.


title: Tikz's drop shadow key creates solid shape for curved path instead of a shadow - How to create a shadow?

text: I'm in the process of making a glyph. I want the final shape to have a shadow. Creating a shadow for the arrow tip works as intended. Making a shadow under the curved path at the bottom, does not. A weird solid gray filling is created instead when I issue the `drop shadow` key. How do I get the shadow in the right place*, just like the arrow tip? * * *   * = An arbitrary offset will work for me. I used `shadow xshift=.725pt, shadow yshift=-.725pt` for the arrow tip. ![enter image description here](http://i.stack.imgur.com/itQe2.png)               \documentclass[border={1pt -15pt 1pt 1pt},convert={density=3000,outext=.png}]{standalone}     \usepackage{tikz}     \usetikzlibrary{fadings,shadows}     \tikzfading[name=fade,right color=black!10, left color=black]     \definecolor{rgray}{RGB}{188,188,214}     \begin{document}     \begin{tikzpicture}     \draw[path fading=fade, opacity=.5, drop shadow={shadow scale=.5, shadow xshift=-1.6pt, shadow yshift=1.5pt,     opacity=.5, fill=black}, fill=white, draw=rgray] (1.475,0.11) .. controls (1.45,.825) and (1.45,0.9875) .. (2,1);% how to get a shadow here?     \draw[path fading=fade, draw=rgray!100!black!90] (1.4375,.88) .. controls (1.45,.85) and (1.45,1.15) .. (2,1.2);     \draw[drop shadow={shadow scale=1, shadow xshift=.725pt, shadow yshift=-.725pt,     opacity=.5, fill=rgray!47}, fill=white, draw=rgray!50] (2,1) -- (2,.95) -- (2.23,1.1) -- (2,1.25) -- (2,1.2);     \end{tikzpicture}     \end{document}


title: Temporarily modifying the chapter headings' layout

text: I would like to modify the layout of some "special" chapters in my document, but afterwards reset to the layout I used before, i.e.               \documentclass{report}     \usepackage{titlesec}          \begin{document}          \chapter{Normal Chapter}     \section{Normal Section}     \subsection{Normal Subsection}          % ask for current lay out:          \titlespacing*{\chapter}{0pt}{-40pt}{10pt}     \titleformat{\chapter}{\centering\Large\bf}{}{0pt}{}{}     \titleformat{\section}{\large\bf}{}{0pt}{}     \titleformat{\subsection}{\normalsize\it}{}{0pt}{}          \chapter{Special Chapter}     \section{Special Section}     \subsection{Special Subsection}          % reset to initial lay out          \chapter{Normal Chapter Again}     \section{Normal Section Again}     \subsection{Normal Subsection Again}          \end{document}      How can I define variables that store the current settings and subsequently use them to reset?


title: Is there a way to change the TeX engine from PDFLaTeX to XeLaTeX in Ipe?

text: In my document, I have to use XeLaTeX to get the output. On the other hand, I'm using `Ipe` to produce some graphic files with some labels on them. I want to have these labels in Persian. Is there a way to change the TeX engine from pdfLaTeX to XeLaTeX in Ipe?


title: how can I prepare a word document, so that writer2latex will give me the best result?

text: I'm in the process of converting some Word documents to latex. I decided to go the following route: Word -> ODF (with odf export or via libreoffice) -> latex (writer2latex). The documents generated by writer2latex do look quite good, unfortunately, writer2latex creates what seems like a million different styles for every individual text element. Is there a way that I can minimize the amount of styles created? I understand that using the option `clean` or `ultraclean` will remove any styling, however, then I end up having to go through the entire document again, and apply styling manually. Is there a clever way around this? And also: is there a way to convince writer2latex to use `\chapter` and not `\section` as the top level category? Any advice regarding these issues is greatly appreciated!! **EDIT:** The entire project is ~ 250-300 pages, made of 10 independent word documents.


title: Is it possible to use \begin{align} in an inline math mode with \displaystyle?

text: Is it possible to use `\begin{align}` in an inline math mode with `\displaystyle`?


title: A list of theorems grouped into sections

text: I want to create a list of theorems grouped into different sections as shown below. I am happy with the output, but for other reasons that don't bear going into, I want to know if there is a way to use `ntheorem`'s `\theoremprework` or `\theorempostwork` commands to achieve the same effect without having to define an inner environment, and then a wrapper environment.               \documentclass{article}         \usepackage{ntheorem}              \newtheorem{theoreminner}{}         \newenvironment{theorem}[1][]         {             \begin{theoreminner}[#1]             \addcontentsline{toc}{subsection}{\protect\numberline{\thetheoreminner}#1}         }         {             \end{theoreminner}         }          \begin{document}          \tableofcontents          \section{title of section 1}          \begin{theorem}[title of theorem 1.1]     text of theorem 1.1     \end{theorem}          \begin{theorem}[title of theorem 1.2]     text of theorem 1.2     \end{theorem}          \section{title of section 2}          \begin{theorem}[title of theorem 2.1]     text of theorem 2.1     \end{theorem}          \begin{theorem}[title of theorem 2.2]     text of theorem 2.2     \end{theorem}          \end{document}


title: How can I place a displaymath environment and an align* environment side by side?

text: I have a `displaymath` environment and an `align*` environment I would like to display next to each other. My idea was to wrap them in a `tabular` environment:               \begin{tabular}{c c}       \[         %math stuff here       \]       &       \begin{align*}         %laign stuff here       \end{align*}     \end{tabular}      Both environments work fine on their own, but as soon as I add in `tabular`, the following error starts coming up (repeatedly):               Missing $ inserted.      I've also tried the `multicol` environment as suggested in How to place a program and a text side by side?, but that just led to an error like the following:               Overfull \vbox blah blah blah       repeat like 20 times. I am not able to get past this point. How can I get a `displaymath` environment and an `align*` environment to be side by side?


title: Parallel chapters in eledpar

text: I'm trying to typeset two parallel texts using `eledpar`. I want to have `\chapter` in both texts independently running in parallel. I would want to have two independent TOCs. When I add them they are typeset one after another not in parallel. How can I make parallel `\chapter`s in `eledpar`? Here's my code:               \documentclass{book}     \usepackage[xetex,a4paper,landscape]{geometry}     \usepackage{fontspec}     \usepackage{xunicode}     \usepackage{polyglossia}     \usepackage{bidi}     \usepackage{eledmac}     \usepackage{eledpar}         \setdefaultlanguage{russian}     \setotherlanguage{hebrew}         \setmainfont[Ligatures=TeX]{Linux Libertine O}     \newfontfamily\hebrewfont[Script=Hebrew]{Linux Libertine O}     \newfontfamily\russianfont[Script=Cyrillic]{Linux Libertine O}         \newcommand{\mybeginru}{ %     \begin{russian}%     \begin{Leftside} %     \beginnumbering%     }     \newcommand{\mybeginhe}{ %     \begin{RTL}%     \begin{hebrew}%     \begin{Rightside} %     \beginnumbering%     }     \newcommand{\myendru}{ %     \endnumbering%     \end{Leftside}%     \end{russian}%     \Columns     }     \newcommand{\myendhe}{ %     \endnumbering%     \end{Rightside}%     \end{hebrew}%     \end{RTL}%     }           \begin{document}     \numberlinefalse     \numberpstarttrue      \sidepstartnumtrue           \begin{pairs}     \mybeginhe     \chapter{המאמר השני}     \pstart     בפנות התוריות, ר״ל שהם יסודות ועמודים אשר בית אלהים נכון עליהם, ובמציאותם יציר מציאות התורה מסדרת ממנו יתברך, ואלו יציר העדר אחת מהם תפל התורה בכללה חלילה.     \pend         \myendhe     \mybeginru     \chapter{Трактат Второй}         \pstart     О краеугольных [принципах] Торы, имеется ввиду, которые [есть] основы и столпы на которых дом Б-жий опирается/нахон, и с существованием их может быть представлено существование Торы упорядоченной от Него, благословенного, и если бы было представлено отсутствие одного из них — упадет Тора в общем, [Б-же] упаси.     \pend     \myendru     \end{pairs}     \end{document}      Here's what I have: ![current layout](http://s10.postimg.org/3oj3c2dqx/tex_is.png) Here's what I want: ![desired layout](http://s12.postimg.org/ypmi6zvn1/tex_want.png)


title: Change space style using listings package

text: I'd like to make all space characters in the code gray. Is there an easy way to do this? Is there something like `spacestyle` (I've commented it)?               \documentclass[a4paper, 10pt]{book}          \usepackage[UTF8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[T2A]{fontenc}     \usepackage[russian, ukrainian]{babel}          \usepackage{amsmath}     \usepackage{listings}          \usepackage[usenames, dvipsnames]{color}          \lstset{%         language     = [77]Fortran,         basicstyle   = \ttfamily,         keywordstyle = \color{black},         stringstyle  = \color{Gray},         showspaces   = true,     %   spacestyle   = \color{Gray}          numbers      = left,         numberstyle  = \ttfamily \color{black}     }          \begin{document}          \begin{lstlisting}           PROGRAM HELLO           WRITE(*, *) "Hello, World!"           END PROGRAM     \end{lstlisting}          \end{document}      ![enter image description here](http://i.stack.imgur.com/5Cm8u.png) Also I want to change all spaces to gray bullets. Is it possible?


title: Downwards arrows in forest

text: I have the following tree and want the connections between nodes to be arrows rather than plain lines. Is this possible? I found the `edge` option, but this does not provide an appropriate option.               \documentclass{article}                                         \usepackage{forest}     \forestset{     sn edges/.style={for tree={parent anchor=south, child anchor=north,align=center,base=bottom,where n children=0{tier=word}{}}},      background tree/.style={for tree={text opacity=0.2,draw opacity=0.2,edge={draw opacity=0.2}}}     }                    \begin{document}               \begin{forest}     sn edges     [D-Struktur        [S-Struktur             [Tilgungsregeln{,}\\Filter{,} phonol. Regeln                     [Phonetische\\Form (PF)]]             [Regeln des anaphorischen Bezugs{,}\\der Quantifizierung und der Kontrolle                     [Logische\\Form (LF)]]]]     \end{forest}          \end{document}


title: Table with indices under every cell

text: Is possible to create a table (for example using tabular environment or tikz)in latex, but which under every cell has an index, which describes order of this cells? Something like this: ![enter image description here](http://i.stack.imgur.com/qbvYu.png)


title: tikz: How to place an arrow with label exactly in the middle of a line?

text: In the following example, the label is in the middle of the line. But the arrow, which acts as a marker, is not in the middle. Only its head but not the center of the arrow.               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{arrows,decorations.markings}          \begin{document}     \begin{tikzpicture}[         middlearrow/.style 2 args={             decoration={                              markings,                  mark=at position 0.5 with {\arrow{triangle 45}, \node[#1] {#2};}             },             postaction={decorate}         }     ]     \draw[middlearrow={below}{+}]        (0,0) -- (1,0);     \end{tikzpicture}     \end{document}      ![Example: Label in the middle. But arrow isn't.](http://i.stack.imgur.com/RP76H.png)


title: Page size won't change even after using geometry package

text: I'm trying to change the page size of my thesis document. As adviced in other threads, the graphics package can be used for this purpose. I currently have the following command where I also specified the page margins.               \usepackage[pass,paperheight=26cm,paperwidth=19cm,top=20mm,bottom = 15mm, left = 30mm, right = 30mm ]{geometry}       On the thesis document, the pdf page size wont change from 8.50x11inch. The thesis document contains inputs from 4 other files (4 chapters) too. If I create a new tex file and have the same command, the pdf document will have the correct dimensions. For instance,               \documentclass[11pt]{report}     \usepackage[paperheight=26cm,paperwidth=19cm]{geometry}          \begin{document}          hello world          \end{document}      Works perfectly. Can anybody tell me why it wouldn't work in my previous file?


title: Horizontal space in a new environment after \label{}

text: Why is the horizontal space inserted in the following mwe?               \documentclass{scrartcl}          \usepackage[american]{babel}     \usepackage{environ}     \usepackage{amsthm}          % proof environment     \makeatletter     \let\proof\relax     \let\endproof\relax     \NewEnviron{proof}[1][true]{%       \pushQED{\qed}%       \csname if#1\endcsname         \trivlist         \item\relax{\sffamily\bfseries Proof}\par\noindent         \BODY         \popQED\endtrivlist       \fi     }     \makeatother          \begin{document}     \begin{proof}       Just some text     \end{proof}          \begin{proof}\label{foo}       Just some text (after a label)     \end{proof}          \begin{proof}[true]       Just some text after optional argument true     \end{proof}     \end{document}


title: BibTex error: Can't find any citations, bibdata or bibstyle

text: been writing up my thesis and everything works pretty well except for the citations and the bibliography. I am using a Tex file that is split up into different parts which I include using the `\input {something.tex}` command. Everything compiles just fine, except when I try to compile the document again using Bibtex I get the following output:               This is BibTeX, Version 0.99d (TeX Live 2013)     The top-level auxiliary file: BA.aux     A level-1 auxiliary file: 00-Titel_etc/Titelblatt.aux     A level-1 auxiliary file: 00-Titel_etc/eidesstattliche_Erklaerung.aux     I found no \citation commands---while reading file BA.aux     I found no \bibdata command---while reading file BA.aux     I found no \bibstyle command---while reading file BA.aux     (There were 3 error messages)      I call the citations in the subfiles using for example: `\cite {Scott.2011}` with the corresponding line in the .bib file: `@article{Scott.2011, …}` I call the bibliography using the following:               \defbibheading{Literaturverzeichnis}{\section{Literaturverzeichnis}}     \bibliographystyle {plain}     \bibliography {Quellen}      \nocite {*}      \printbibliography[heading=Literaturverzeichnis]      And my bibliography file is in the same folder as the overall Tex file (namely BA.tex). But even with the `\nocite {*}` command all I get on the bibliography page is the output "Quellen" which is the name of my .bib file. Don't actually know what I am doing wrong… been googling all over the internet, found similar problems, but none of the solutions brought any help or even change. I am using Texshop on a Mac by the way. Appreciate any kind of help or hint as to what to try or do!!!! Thanks a lot in advance!


title: Customizing some aspect of algorithmic environment

text: I'm using the `algorithmic` environment for typesetting algorithm in my document, but I'd like to customize some aspect and fix problems. I'm using the `algpseudocode` package with `noend` option, but it produces an ugly vertical gap when the end lines are suppressed (see picture below between the sixth and the seventh lines). How can I fix this problem? Second, I'm using `function` command to produce two distinct procedures in the same `algorithm` environment, but I'd like to have only the function body to be line-numbered and the line count should restart from 1 for the Reduce function. Third and last, I've separated the two functions using the `\Statex` command, but I'd like to have a less vertical space width than a whole white line. This is my code.               \begin{algorithm}[H]         \caption{Calcola il grado di ogni vertice del grafo $G = (V,E)$}         \label{degree}         \begin{algorithmic}[1]             \Function{\textsc{Map}$( \left \langle u;v \right \rangle )$}{}                 \State \textbf{emit} $\left \langle u;v \right \rangle$             \EndFunction             \Statex             \Function{\textsc{Reduce}$( \left \langle u;\Gamma(u) \right \rangle )$}{}                 \State $d(u) \gets 0$                 \ForAll{$v \in \Gamma(u)$}                     \State $d(u) \gets d(u) + 1$                 \EndFor                 \State \textbf{emit} $\left \langle u;d(u) \right \rangle$             \EndFunction         \end{algorithmic}     \end{algorithm}      ![enter image description here](http://i.stack.imgur.com/69f3F.jpg) Thank you!


title: How can I draw this simple tree in tikz?

text: ![enter image description here](http://i.stack.imgur.com/ktgX3.jpg) How could I draw something like this in tikz ? Thanks               \documentclass{article}      \usepackage{tikz}      \usetikzlibrary{arrows}      \newcommand{\midarrow}{\tikz \draw[-triangle 90] (0,0) -- +(.1,0);}          \begin{document}      \begin{tikzpicture}      \begin{scope}[very thick, every node/.style={sloped,allow upside down}]        \draw (0,0)-- node {\midarrow} (2,0);        \draw (2,0)-- node {\midarrow} (2,2);        \draw (2,0)-- node {\midarrow} (4,0);        \draw (4,2)-- node {\midarrow} (4,0);        \draw (4,0)-- node {\midarrow} (6,0);        \draw (4,0)-- node {\midarrow} (4,-2);        \draw (4,-2)-- node {\midarrow} (6,-2);        \draw (4,-2)-- node {\midarrow} (4,-4);      \end{scope}     \end{tikzpicture}      \end{document}      But how do I add the `$\alpha$` and `$\beta$` and arrow labels?


title: Document Blending: An Analysis of the Sex Appeal of Business Instruments

text: > Here is what I'm working with so far:               \documentclass{letter}     \usepackage{background}     \usepackage{lipsum}     \backgroundsetup{%       scale=4,       %% change accordingly       angle=0,       %% change accordingly       opacity=.1,    %% change accordingly       color =green,  %% change accordingly       contents={\begin{tikzpicture}[remember picture,overlay]             \node at ([yshift=11pt,xshift=5pt]current page.center) {\includegraphics[width=5cm]{example-image-a}};         \end{tikzpicture}}     }     \usepackage{invoice}     \address{\emph{Invoice from:} \\ My Address \\ My Address \\ My Address}     \signature{Elmo Face}     \date{23. May 2009}     \begin{document}       \begin{letter}{\emph{Invoice to:} \\ Your Address \\ Your Address \\ Your Address}         \opening{Invoice no. 1}         My greeting \footnote{Super important, so don't forget.}         \begin{invoice}{USD}{0}           \ProjectTitle{Example Project}           \Fee{Development} {1000.00} {1}         \end{invoice}         \closing{Invoice Release Authorization}       \end{letter}     \end{document}      > I'd like to have the comment box here, but I don't know how to get > `stackengine`:               \documentclass{letter}     \usepackage[usestackEOL]{stackengine}     \edef\tmpbs{\the\baselineskip}     \setstackgap{L}{\tmpbs}     \newlength\tmpwd     \newlength\tmpht     \usepackage{invoice}     \fboxrule=1pt          \let\svaddress\address     \renewcommand\address[2][]{ OPTIONAL ARGUMENT AS [~] FOR EMPTY INVOICE BOX       \ifx\relax#1\relax\svaddress{#2}\else       \def\theaddress{#2}\invoicenote{#1}\fi}          \def\invoicenote#1{       \def\stackalignment{l}       \setbox0=\hbox{\expandafter\Longstack\expandafter{\theaddress}}       \tmpwd=\wd0\relax       \tmpht=\ht0\relax       \def\y{\fboxsep=0pt\fbox{\rule{0pt}{\tmpht}         \stackon[\tmpht-\tmpbs]{\rule{\dimexpr\textwidth-\tmpwd-3cm\relax}{0pt}}         {~\textsf{\strut INVOICE}~~\smash{\Longunderstack{#1}}}}}       \svaddress{\llap{\y\hspace{3cm}}\expandafter\Longstack\expandafter{\theaddress}}     }            ANY OF THESE FORMS WILL WORK:     \address{\emph{Invoice from:} \\ My Address \\ My Address \\ My Address}     \address[~]{\emph{Invoice from:} \\ My Address \\ My Address \\ My Address}     \address[Hi, Joe\\ Here is your order]{\emph{Invoice from:} \\ My Address \\ My Address \\ My Address}          \signature{Piglet Master}     \date{23. May 2009}     \begin{document}       \begin{letter}{\emph{Invoice to:} \\ Your Address \\ Your Address \\ Your Address}         \opening{Invoice no. 1}         My greeting \footnote{I am a man.}         \begin{invoice}{Euro}{0}           \ProjectTitle{Example Project}           \Fee{Development} {1000.00} {1}         \end{invoice}         \closing{Invoice Release Authorization}       \end{letter}     \end{document}      > Starting with what I've got so far---in addition to this comment-boxed > version, I'd like to blend it with some of the elements of the following--- > which I'll explain below the image: ![enter image description here](http://i.stack.imgur.com/aqdpi.jpg) > I want the "Thank you for your business." slogan at the very bottom---like > 1.5cm above the bottom of the page (centered) and a comment box right above > the "Invoice Release Authorization" text that has a width, but dynamic > height, that is the same as the lines separating the invoice. Also, I need a > big QR code that encodes my invoice number that has an edge length the same > length as the line above the footnote. * * * I'm also having trouble with aligning the watermark. It's not centered, and why is it that whole document seems shifted down so low below the top of the page? * * *


title: Using baposter class

text: So I'm trying to produce a poster using this baposter thing and I'm failing miserably at getting the thing to run. I have WinEdt and MiKTeX installed (I'm running Windows Vista) but when I try to `pdftexify` any of the example that comes in the folder you download I get the error:               ! LaTeX Error: Missing \begin{document}.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.1 .          ./../baposter.cls     ?           Process has been terminated ...      And I don't understand why... the class file is in the folder that's being compiled so I'm not sure what I'm missing. Anyway, in my frustration I then reinstalled both MiKTeX and WinEdt, which only seems to have made things worse; when I try to compile old reports I've made it tells me things such as:               ! LaTeX Error: File `amsmath.sty' not found.          Type X to quit or <RETURN> to proceed,     or enter new name. (Default extension: sty)          Enter file name:       Which is weird as according to the MiKTeX Package Manager these packages are definitely installed, and in the past, whenever I've needed a new package, the thing has automatically installed. So I guess my questions amount to: how have I managed to break this? and how do I get the `baposter` class working? Sorry, I know I'm probably being very stupid, and there are probably very easy, obvious answers, but I'm really rather rubbish at computers and I can't get my head around this! :(


title: Is it possible to implement an equivalent syntax of (*x {\f(x)}) but the ordinate is specified first?

text: PSTricks provides us with a useful syntax `(*x {\f(x)})` to specify a point with abscissa `x` and ordinate `\f(x)`. For example, let `\def\f(#1){#1+.5}`, a point `(1,1.5)` can be written as `(*1 {\f(x)})`. I want to have the opposite way in which the ordinate is given first and the abscissa is calculated by the given expression `\g(y)`. For example, let `\def\g(#1){#1-.5}`, I want to have a point `(1,1.5)` but it has to be represented in the form `(**{\g(y)} 1.5)`. Is it possible to implement it? I will give 4 bounties of 500 each if you can **implement** it.


title: Editor with a TeX-aware spellchecker

text: Is there around a TeX editor with a spellchecker that recognizes and handles properly TeX commands? For instance, I'd like it to underline with a red wavy line if I write "ntheorem" in my text, but not `\usepackage{ntheorem}`, figuring out automatically that the argument of `usepackage` is not meant to be a word but a "special command". Similarly, it should ignore most mathematical content (but not that inside `\[ \text{} \]`).


title: Why does my RPN expression to find a distance of 2 nodes produce a wrong output?

text: I want to find a variant for the following, ![enter image description here](http://i.stack.imgur.com/gi8YT.png)               \documentclass[pstricks,border=12pt]{standalone}     \usepackage{pst-eucl}     \addtopsstyle{gridstyle}{gridlabels=0pt,griddots=0}     \begin{document}     \begin{pspicture}[showgrid](-2,-2)(2,2)         \pstGeonode[PosAngle={180,45,-90}]             (-1.5,-1){A}             (1.5,1){B}             (1.5,-1){C}         \pstRightAngle[RightAngleSize=0.2,fillstyle=solid,fillcolor=green!50]{A}{C}{B}         \pstArcOAB[arcsepB=-1,arcsepA=-2.5]{A}{B}{B}         \pstCurvAbsNode[CurvAbsNeg=true,PointName=none]{A}{B}{D}{\pstDistVal{.75}}         \psline[linestyle=dashed](A)(D)(D|C)(C)         \psset{shortput=nab,labelsep=-3pt}         \ncline{A}{B}^{$g$}         \ncline{B}{C}^{$a$}         \ncline{C}{A}^{$b$}     \end{pspicture}     \end{document}      by calculating the distance with `Pyth2` operator. The following is my attempt.               \documentclass[pstricks,border={12pt 12pt 2cm 12pt}]{standalone}     \usepackage{pst-eucl}     \addtopsstyle{gridstyle}{gridlabels=0pt,griddots=0}     \psset{saveNodeCoors}     \begin{document}     \begin{pspicture}[showgrid](-2,-2)(2,2)         \pstGeonode[PosAngle={180,45,-90}]             (-1.5,-1){A}             (1.5,1){B}             (1.5,-1){C}         \pstRightAngle[RightAngleSize=0.2,fillstyle=solid,fillcolor=green!50]{A}{C}{B}             \pstVerb{/Dist {N-A.x N-A.y N-B.x N-B.y Pyth2} def}%             \pnode(!Dist 10 PtoC){D}         \psarc[arcsepB=-1,arcsepA=-2.5](A){!Dist}{(D)}{(B)}         \psline[linestyle=dashed](A)(D)(D|C)(C)         \psset{shortput=nab,labelsep=-3pt}         \ncline{A}{B}^{$g$}         \ncline{B}{C}^{$a$}         \ncline{C}{A}^{$b$}     \end{pspicture}     \end{document}      And its output below is different from the first version shown above. ![enter image description here](http://i.stack.imgur.com/r8R8O.png) Could you find the glitch?


title: References to named theorems

text: I would like to know how to give `theorem` type environments names and then how to later reference them using those names. I was able to use this thread to create named theorems. However, this seems more complicated than it needs to be and I can't figure out how to reference things by their names later in the paper. In particular, I want to do the following. I want to list the assumptions that I'm using at the beginning of my paper. However, instead of giving boring, uninformative names like Assumption 1, I want to give them names that will help the reader remember what the assumption is later in the paper. For instance, an assumption about continuity could be named "Assumption C" while an assumption about integrability could be named "Assumption I." Then later in the paper I'd like to refer to Assumption C by a `\ref{}` command.


title: Misc in plainnat appearance

text: I use `plainnat` to cite online material as follows:               @misc{Group2009,       author = {Miniwatts Marketing},       title = {{Internet World Stats}},       howpublished = "\url{http://www.internetworldstats.com/stats.htm}",         year = {2013},         note = "[Online; accessed 19-July-2013]"      }      but it gives a lot of space between the words, as can be seen in the following screenshot: ![output](http://i.stack.imgur.com/4fGb7.png)! How do I fix this?


title: How to add thumbnail photo to frametitles in beamer

text: Is there a `beamer` theme that allows one to add small thumbnails of authors to the right end of the `frame` title line? Ideally I'd like something that can easily work on successive pages throughout a document. Is there an automatic sizing facility?


title: ! Improper \halign inside $$'s

text: I know this is not a minimal example, but I have to have this much code, in order to create my error. I had this error already several times and I cannot get rid of it?! I don't know where the problem is. Something is not correct with align and footnotes, at least this seems to be the reason for me? Here is my code:               \documentclass[a4paper,              12pt,                                            bibliography=totoc,                  index=totoc,                 abstracton,                  headsepline,                 ]{scrreprt}     \usepackage{latexsym}                \usepackage[latin1]{inputenc}        \usepackage[ngerman,english]{babel}        \usepackage{amsmath}      \usepackage{subfig}          \usepackage{float}           \usepackage{graphicx}            \usepackage{rotating}        \usepackage{mathrsfs}     \usepackage{eurosym,bm,amsmath,amssymb,verbatim}     \usepackage{listings}     \usepackage[T1]{fontenc}     \usepackage{setspace}     \usepackage [round,authoryear] {natbib}     \usepackage{amsthm}     \usepackage{graphicx,eso-pic,lipsum}     \usepackage{url}     \usepackage{tikz}     \usepackage{tocstyle}     \usetocstyle{allwithdot}      \usepackage[bookmarksopen,hyperfootnotes=false,pdftitle=test, pdfauthor=test,pdfsubject=test]{hyperref}     \usepackage{fancyhdr}     \usepackage{listings}      \usepackage{remreset}      \makeatletter     \@removefromreset{footnote}{chapter}     \makeatother     \usepackage{dblfnote}      \usepackage{booktabs}      \KOMAoption{footnotes}{multiple}      \usepackage[top=2cm,bottom=2cm]{geometry}      \usepackage{cleveref}                \definecolor{headercolor}{rgb}{0,0,0}     \definecolor{white2}{rgb}{255,255,255}                    \begin{document}                                        \begin{titlepage}     test          \end{titlepage}          \onehalfspacing           \fancypagestyle{plain}{%       %% Clear all headers and footers       \fancyhf{}     \fancyhead[L]{\hspace{5.5mm}\textcolor{white2}{\leftmark}\\ \text{ }\textcolor{white2}{\hspace{0.4cm}\rightmark}\hfill\textcolor{white2}{}\hspace{2mm}}     \renewcommand{\headrule}{\vspace{-\headheight}\textcolor{white2}{\vrule height \headheight width 2pt\relax\rule{\textwidth}{2pt}\vrule height \headheight width 2pt\relax}}     \fancyfoot[C]{-\thepage -}     }          \pagestyle{fancy}     \fancyhf{}     %\renewcommand{\chaptername}{}     \renewcommand{\chaptermark}[1]{%     \markboth{\MakeUppercase{\thechapter. \hspace{1.5mm} \  #1}}{}}               \fancyhead[L]{\hspace{5.5mm}\textcolor{headercolor}{\leftmark}\\ \text{ }\textcolor{headercolor}{\hspace{0.4cm}\rightmark}\hfill\textcolor{headercolor}{}\hspace{2mm}}     \renewcommand{\headrule}{\vspace{-\headheight}\textcolor{headercolor}{\vrule height \headheight width 2pt\relax\rule{\textwidth}{2pt}\vrule height \headheight width 2pt\relax}}     \fancyfoot[C]{-\thepage -}          \begin{appendix}     \clearpage     \chapter{Appendix}               \subsection[Text]{Text}     \label{parameterestimation}     text texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext text\footnote{\citep[pp. 7-8]{Author1:1993}}. text texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext text\footnote{\citep[para. 4]{Author2:2002}}.          \subsubsection[Textn]{Text}     text texttext texttext texttext texttext texttext texttext texttext texttext texttext text\footnote{\citep[para. 4] {Hazewinkel:2002}}.     \paragraph{ML}\footnote{Text \citep[p. 12-13]{A:2006}}     text texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext text     \begin{align*}     54=54     \end{align*}     and the log likelihood by     \begin{align*}     54=54     \end{align*}     vtext texttext texttext texttext texttext texttext text     \begin{align*}     54=54     \end{align*}     text texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext text\footnote{\citep[p. 3] {Author1:2006} text texttext text}. text texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext text\footnote{\citep[para. Details] {Author2}}. text texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext text\footnote{\citep[para. Details] {RDocumentationoptim}} text texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext text\footnote{\citep[para. Details] {RDocumentationfitdistr}}). \\ \newline     text texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext text\footnote{\citep[p. 53] {Ruppert:2004}}:     \begin{align*}     54 = 45     \end{align*}     text texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext texttext text\footnote{\citep[p. 7] {Steenbergen:2006}}:            \end{appendix}                    \clearpage     \fancyhead[L]{\hspace{4mm}\textcolor{headercolor}{}\text{ }\textcolor{headercolor}{\rightmark}\hfill\textcolor{headercolor}{}\hspace{2mm}}     \renewcommand{\headrule}{\vspace{-\headheight}\textcolor{headercolor}{\vrule height \headheight width 2pt\relax\rule{\textwidth}{2pt}\vrule height \headheight width 2pt\relax}}     \fancyfoot[C]{-\thepage -}          \end{document}        I get the error: ! Improper \halign inside $$'s. \halign This is NOT due to a specific align environment, e.g. a typo error in an align environment, I have this problem throughout my complete thesis!


title: How can I make a table of symbols with TeX?

text: I have used the following command:               \documentclass{article}     \usepackage{xypic}     \usepackage[final]{showexpl}     \begin{document}      \begin{LTXexample}[pos=r,rframe=single,numbers=none,basicstyle=\ttfamily\small,]     \xymatrix{A \ar[r]^f & B}     \xymatrix{A \ar@{^{(}->}[r]^f & B}     \end{LTXexample}     \end{document}      This gives me ![enter image description here](http://i.stack.imgur.com/OWVa3.png) but I'd prefer to create the following table: ![enter image description here](http://i.stack.imgur.com/2yhTd.png)


title: Piecing together a diagram from other files

text: I'm in `\documentaclass[landscape]{article}` and I'm trying to figure out how I can put together a bunch of figures I've created (with the generous help of TSE users) on this document. What I'm trying to do is this ![Diagram](http://i.stack.imgur.com/5pE2X.jpg) I've tried using help grid to at least get the arrows in place, but the grid keeps shifting every time I add something.               \PassOptionsToPackage{dvipsnames}{xcolor}      \documentclass[landscape]{article}     \usepackage{tikz}     \usepackage{pgf}     \usetikzlibrary{shapes.geometric}     \usepgflibrary{decorations.shapes}     \usetikzlibrary{decorations.shapes, arrows, decorations.markings, shapes, fit, arrows, positioning, trees, mindmap, calc}     \begin{document}     \begin{tikzpicture}     % figures          % text          % figures          % text          % and last time down           \end{tikzpicture}     \end{document}      Since I don't have a minimal working code, I don't expect to magically work this out for me, but any advice or examples would be helpful.


title: Getting back the paragraph in cleanThesis?

text: I want to use http://cleanthesis.der-ric.de/ for my PhD diss because I dont get into classicThesis. But unfortunately if I press return in my latex code this does not produce an paragraph as usual but an entire new line. Therefore I cant add a paragraph and I have only block text (Funny though: This is exactly what I wanted when I started writing with latex, but now I am really thankful for the paragraph). Is there a possibility to write an own command that produces a paragraph or can I invert the function of "return" to a paragraph again?


title: Create image from statistical data automatically

text: I am looking for a way to automatically create images like the one below: ![Bart chart graph](http://i.stack.imgur.com/HMXsY.png) There is no MWE because all I have, for now, is this image (created, I believe, by SPSS, but I have nothing to do with that part.) I could simply add this image to my document, of course, but since these issues come up with some frequency I'd like to try a "native" LaTeX way, as it were. I am pretty sure some graphics package is more than up to the task, but I don't even know where to start looking. I don't expect you to do the work for me, so all I'm asking for, really, is a pointer in the right direction, an FAQ, a HOWTO, perhaps a sample.


title: Cross-platform package manager for packages *not* on CTAN

text: I do not want to reinvent the wheel, so perhaps you could help me find a tool that fits my needs. ## Background As far as I know, it takes some time to get a LaTeX package available on CTAN. And some people (including me) develop packages on Github etc. So it would be nice to have a tool (just like `apt-get` or `tmgr`) which can manage LaTeX packages outside of CTAN. ## Requirements   * **Cross-platform** The tool should run on all major operating systems and should be compatible with TeXLive and MiKTeX.   * **Github support** Download and update LaTeX-packages from services like Github / Sourceforge / Google Code.   * **Command-line interface** There should be options to _update_ all installed packages or _install_ a package from a given URL


title: Negative indent?

text: Is a negative indent of a particular paragraph possible or does another command need to be used? I.e., the first line should begin inside the margin. Can a command similar to `\noindent` be constructed that flushes the first line (of a paragraph) to an arbitrary value, or does a negative indent already exist, or is there an easy-to-make solution?


title: Subfigures in Margin note

text: My codes,               \documentclass[a4paper,twoside,openright,11pt]{scrbook}     \usepackage[left=1.5cm,right=1cm,top=3cm,bottom=1.5cm,marginparwidth=5.5cm,marginparsep=1cm,outer=8cm]{geometry}          \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{lmodern}     \usepackage[fulladjust]{marginnote}     \usepackage{sidenotes}     \usepackage[svgnames]{xcolor}     \usepackage{caption}     \usepackage{subcaption}     \usepackage{tikz}     \usetikzlibrary{positioning}     \usepackage{showframe}          \captionsetup{     justification=raggedright,     labelfont={color=Maroon,bf},     font=small}          \begin{document}          \begin{figure}         \centering       \begin{subfigure}[t]{0.45\textwidth}         \centering         \includegraphics[width=\textwidth]{IMAGE}         \caption{One Circuit}\label{fig:1a}       \end{subfigure}       \quad       \begin{subfigure}[t]{0.45\textwidth}         \centering         \includegraphics[width=\textwidth]{IMAGE}         \caption{Two Circuit}\label{fig:1b}       \end{subfigure}       \caption{What a nice circuits.}\label{fig:1}     \end{figure}          \marginpar{     \begin{center}     \includegraphics[width=\marginparwidth]{IMAGE}     \captionof{figure}{Picture One in Margin}     \end{center}}          \marginpar{     \begin{center}     \includegraphics[width=\marginparwidth]{IMAGE}     \captionof{figure}{Picture Two in Margin}     \end{center}}     \end{document}      And output, ![enter image description here](http://i.stack.imgur.com/ds3a9.png) No problem but If possible, **subfigures** in body, same subfigures attached in margin note. Again If possible use to my preamble. I didn't find duplicate another question. I found like its, don't working in full my code. Does anyone know how to fix it? ![enter image description here](http://i.stack.imgur.com/ynAf2.png)


title: Is there another symbol that is slightly different from \forall (likewise for \exists)?

text: ## What Is there a symbol that is slightly different from `$\forall$` (e.g. having a second line from upper left to lower middle)? It should obviously mean "for all" but be sufficiently different to not be mistaken for `$\forall$`. Similarly, is there a slightly different symbol than `$\exists$` (e.g. with two lines downward)? ## Why I need two different symbols to differentiate whether I'm in some formal logic or on the meta level (talking about the logic). Currently I use "f.a." and "ex.", but I think it's easier to grasp complex descriptions if quantifiers stand out. ## Where I looked in amssymb and http://www.math.union.edu/~dpvc/jsmath/symbols/welcome.html, but didn't find a suitable symbol.


title: gnuplot calculated curve shifts to the left

text: The following code samples are borrowed from   * Test 1 and   * Test 2. My computer configuration is   * Windows XP SP.3 Japanese version,   * MiKTeX 2.9 (already updated),   * TeXmaker 3.5 or TexStudio 2.4 and   * gnuplot 4.6.  The code samples compile correct running an English version of Windows XP. # Test 1 ## Code               \documentclass[border=2pt]{standalone}     \usepackage{pgfplots}          \begin{filecontents}{test.dat}     2   12     5   55     10  96     20  135     50  144     100 147     200 147     500 146     \end{filecontents}          \begin{document}     \begin{tikzpicture}     \begin{axis}[         xmode=log,         ymode=linear,         axis x line*=bottom,         axis y line*=left,         tick label style={font=\small},         grid=both,         tick align=outside,          tickpos=left,         xlabel= {[ACh]} (nM),         ylabel=Response (mm),         xmin=0.1, xmax=1000,         ymin=0, ymax=160,         width=0.8\textwidth,         height=0.6\textwidth,     ]          \addplot[only marks] file {test.dat};          \addplot+[raw gnuplot, draw=red, mark=none, smooth] gnuplot {         set log x;         f(x)=Ymax/(1+(EC50/x)^nH);         Ymax=150;         nH=2;         EC50=60;         fit f(x) 'test.dat' using 1:2 via Ymax,EC50,nH;         plot [x=0.1:1000] f(x);        };          % Below is the correct line using the equation: {Ymax/(1+(EC50/[A])^nH)}     \addplot[draw=blue, domain=0.1:1000, smooth] {147.5/(1+(6.75/x)^1.95)};          \end{axis}     \end{tikzpicture}     \end{document}      ## Output The red plot (calculated by `gnuplot`) is shifted to the left. ![enter image description here](http://i.stack.imgur.com/J7GQH.jpg) # Test 2 ## Code               \documentclass[border=2pt]{standalone}     \usepackage{pgfplots,pgfplotstable}          \begin{filecontents}{drc1.dat}     2   17     5   55     10  96     20  125     50  144     100 147     200 147     500 146     \end{filecontents}          \begin{document}     \begin{tikzpicture}     \begin{axis}[         legend pos=north west,         xmode=log,         ymode=linear,         axis x line*=bottom,         axis y line*=left,         tick label style={font=\small},         grid=both,         tick align=outside,          tickpos=left,         xlabel= {[ACh]} (nM),         ylabel=Response (mm),         xmin=0.1, xmax=1000,         ymin=0, ymax=160,         width=0.7\textwidth,         height=0.4\textwidth,     ]          \addplot[only marks, mark size=1.8, black] file {drc1.dat};     \addlegendentry[anchor=mid,font=\tiny]{Experiment 1}     \addplot+[raw gnuplot, red, mark=none, smooth] gnuplot {         set log x;         f(x)=Ymax/(1+(EC50/x)^nH);         Ymax=150;         nH=1;         EC50=50;         set fit errorvariables;         fit f(x) 'drc1.dat' using 1:2 via Ymax,EC50,nH;         plot [x=0.1:1000] f(x);         set print "parameters.dat"; % Open a file to save the parameters into         print Ymax, Ymax_err;       % Write the parameters to file         print nH, nH_err;         print EC50, EC50_err;     };     \addlegendentry[font=\tiny, text depth=2ex]{         \pgfplotstableread{parameters.dat}\parameters % Open the file Gnuplot wrote         \pgfplotstablegetelem{0}{0}\of\parameters \pgfmathsetmacro\paramA{\pgfplotsretval}        % Get first element, save into \paramA         \pgfplotstablegetelem{1}{0}\of\parameters \pgfmathsetmacro\paramB{\pgfplotsretval}         \pgfplotstablegetelem{2}{0}\of\parameters \pgfmathsetmacro\paramC{\pgfplotsretval}         $\frac{\pgfmathprintnumber{\paramA}}{\left(1+\frac{\pgfmathprintnumber{\paramB}}{[ACh]}\right)^{\pgfmathprintnumber{\paramC}}}$         }     \end{axis}     \end{tikzpicture}          \pgfplotstabletypeset[         dec sep align,         fixed,         columns/0/.style={column name=Parameter},         columns/1/.style={column name=Standard Error}     ]{parameters.dat}     \end{document}      ## Output The result is the same: The `gnuplot` curve is getting shifted to the left. ![enter image description here](http://i.stack.imgur.com/wajTE.jpg) * * * Please tell me why it happens. There are warnings in the log                LaTeX Warning: Overwriting file `./drc1.dat'.       ......      ! Package pgfplots Warning: running in backwards compatibility mode (unsuitable tick labels; missing features). Consider writing \pgfplotsset{compat=1.6} into your preamble.              PGFPlots: reading {drc1.dat}     runsystem(gnuplot curveshitf.pgf-plot.gnuplot)...disabled (restricted).     ......     PGFPlots: reading {curveshitf.pgf-plot.table}     NOTE: coordinate (-1.0000000e+000,1.3778365e-001) has been dropped because it is unbounded (in x).      NOTE: coordinate (-9.5959596e-001,1.6059627e-001) has been dropped because it is unbounded (in x).     NOTE: coordinate (-9.1919192e-001,1.8718116e-001) has been dropped because it is unbounded (in x).     NOTE: coordinate (-8.7878788e-001,2.1816037e-001) has been dropped because it is unbounded (in x).     NOTE: coordinate (-8.3838384e-001,2.5425793e-001) has been dropped because it is unbounded (in x).     NOTE: coordinate (-7.9797980e-001,2.9631632e-001) has been dropped because it is unbounded (in x).     NOTE: coordinate (-7.5757576e-001,3.4531556e-001) has been dropped because it is unbounded (in x).     NOTE: coordinate (-7.1717172e-001,4.0239527e-001) has been dropped because it is unbounded (in x).     NOTE: coordinate (-6.7676768e-001,4.6888008e-001) has been dropped because it is unbounded (in x).     NOTE: coordinate (-6.3636364e-001,5.4630898e-001) has been dropped because it is unbounded (in x).     NOTE: coordinate (-5.9595960e-001,6.3646891e-001) has been dropped because it is unbounded (in x).     NOTE: coordinate (-5.5555556e-001,7.4143341e-001) has been dropped because it is unbounded (in x).     NOTE: coordinate (-5.1515152e-001,8.6360674e-001) has been dropped because it is unbounded (in x).     NOTE: coordinate (-4.7474747e-001,1.0057741e+000) has been dropped because it is unbounded (in x).     NOTE: coordinate (-4.3434343e-001,1.1711584e+000) has been dropped because it is unbounded (in x).     NOTE: coordinate (-3.9393939e-001,1.3634852e+000) has been dropped because it is unbounded (in x).     NOTE: coordinate (-3.5353535e-001,1.5870537e+000) has been dropped because it is unbounded (in x).     NOTE: coordinate (-3.1313131e-001,1.8468179e+000) has been dropped because it is unbounded (in x).     NOTE: coordinate (-2.7272727e-001,2.1484748e+000) has been dropped because it is unbounded (in x).     NOTE: coordinate (-2.3232323e-001,2.4985601e+000) has been dropped because it is unbounded (in x).     NOTE: coordinate (-1.9191919e-001,2.9045527e+000) has been dropped because it is unbounded (in x).     NOTE: coordinate (-1.5151515e-001,3.3749826e+000) has been dropped because it is unbounded (in x).     NOTE: coordinate (-1.1111111e-001,3.9195432e+000) has been dropped because it is unbounded (in x).     NOTE: coordinate (-7.0707071e-002,4.5492015e+000) has been dropped because it is unbounded (in x).     NOTE: coordinate (-3.0303030e-002,5.2763015e+000) has been dropped because it is unbounded (in x).       in preambule, then I have added               \pgfplotsset{compat=1.6}     \pgfplotsset{filter discard warning=false}      \listfiles       and for calling gnuplot, i have added -enable-write18 which can work to make plot like this http://www.texample.net/tikz/examples/gnuplot-basics/ . After doing all, it seems does not change. the filelist is like this                  *File List*      article.cls    2007/10/19 v1.4h Standard LaTeX document class      size11.clo    2007/10/19 v1.4h Standard LaTeX file (size option)      pgfplots.sty    2012/08/23 v1.6.1 (git show 1.6.1 )          tikz.sty    2010/10/13 v2.10 (rcs-revision 1.76)           pgf.sty    2008/01/15 v2.10 (rcs-revision 1.12)        pgfrcs.sty    2010/10/25 v2.10 (rcs-revision 1.24)       everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS)         pgfrcs.code.tex       pgfcore.sty    2010/04/11 v2.10 (rcs-revision 1.7)       graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)        keyval.sty    1999/03/16 v1.13 key=value parser (DPC)      graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)       trig.sty    1999/03/16 v1.09 sin cos tan (DPC)       graphics.cfg    2007/01/18 v1.5 graphics configuration of teTeX/TeXLive        pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX       infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)      ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)        pgfsys.sty    2010/06/30 v2.10 (rcs-revision 1.37)        pgfsys.code.tex       pgfsyssoftpath.code.tex    2008/07/18  (rcs-revision 1.7)     pgfsysprotocol.code.tex    2006/10/16  (rcs-revision 1.4)       xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)        color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive     pgfcore.code.tex     pgfcomp-version-0-65.sty    2007/07/03 v2.10 (rcs-revision 1.7)     pgfcomp-version-1-18.sty    2007/07/23 v2.10 (rcs-revision 1.1)       pgffor.sty    2010/03/23 v2.10 (rcs-revision 1.18)     pgfkeys.sty        pgfkeys.code.tex       pgffor.code.tex         tikz.code.tex     pgfplotstable.sty    2012/08/23 Part of pgfplots        array.sty    2008/09/09 v2.4c Tabular extension package (FMi)     filecontents.sty    2011/10/08 v1.3 Create an external file from within a LaTeX     document     supp-pdf.mkii      After suggestion from Christian Feuersängern, I found this in the log               Package pgfplots: checking gnuplot -V : `\par ' (if this fails, set `/pgfplots/     gnuplot writes logscale=true|false')     ! Package pgfplots Warning: Sorry, I can't reliably check which version of gnup     lot is available. I guess it is gnuplot < 4.4. Please set `/pgfplots/gnuplot wr     ites logscale=true|false' manually if anything fails.     Package pgfplots: I found gnuplot version < 4.4. This one writes log() coordina     tes. I'll handle it accordingly.     PGFPlots: reading {drc1.dat}     runsystem(gnuplot curveshitf.pgf-plot.gnuplot)...disabled (restricted).      What should I do to solve it? I am using gnuplot 4.6, but why it is written 4.4?


title: \textsc not working after \renewcommand

text: I recently fond a nice document template (here) andI would like to use it for my thesis. However, the template uses the following line to change the default font for small capitals text:               \renewcommand{\scdefault}{ssc}      Then the `\textsc` command is used in the preambule to modify the appearance of `\chapter` and it works fine. The problem is that anywhere in the text, if I try to use the `\textsc` command (or the `\lettrine` command), it does not transform the text in small caps. When I remove the `\renewcommand` line it work fine again, but the chapter does not look as I want. Am I forgetting something? Here is the code of my document:               \documentclass[a4paper,english, makeindex, oneside]{memoir} \usepackage{lettrine}          % New commands      \renewcommand{\scdefault}{ssc}      \newcommand{\uppercaps}[1]{\textsc{\MakeUppercase{#1}}}          % Style for chapters     \makechapterstyle{newchap}{     \renewcommand{\printchaptername}{}     \renewcommand{\chapternamenum}{}     \renewcommand{\printchapternum}{}     \renewcommand{\afterchapternum}{}     \renewcommand{\printchaptertitle}[1]{     \raggedright\huge\uppercaps{##1}     }}          \begin{document} \chapterstyle{newchap}          \chapter{First chapter}          \lettrine{T}{his is a lettrine} and this and      this is supposed to be in \textsc{small caps font}               \end{document}      And here is the output with the `\renewcommand` ![enter image description here](http://i.stack.imgur.com/H9yZh.png) And here is the output without the `\renewcommand` ![enter image description here](http://i.stack.imgur.com/rIqUo.png) I am using pdfLaTex and the `memoir` class.


title: Filled \Diamond-product sign

text: I use the multiple `\Diamond`-product sign (`\bDiamond`) as described in sign for multiple $\Diamond$-product. Now, in addition, I would like to have a filled `\Diamond`-product sign, i.e. filled with black. Any suggestions?


title: Can citation numbers be stored as variables, then used in my tex file?

text: I'm trying to create a "flow chart" of papers that shows the progression of key ideas over time. A very basic example is this:               \documentclass{article}     \usepackage{tikz}               \begin{document}          \newcommand{\oldpaper}{2}     \newcommand{\newpaper}{1}          \begin{tikzpicture}[show/.style={circle,draw}]     \node[show]    (\newpaper)    at    (0,2)     [label=right:{This 2011 paper utilizes the good ideas and makes them even better}]    {\newpaper};     \node[show]    (\oldpaper)   at     (0,0)    [label=right:{This paper came out in 1900 and has good ideas}]    {\oldpaper};     \draw[->]    (\oldpaper) -- (\newpaper);     \end{tikzpicture}               \bibliographystyle{amsplain}     \begin{thebibliography}{10}          \bibitem{newpaper}C. Charles, \emph{New Stuff}, 2011.          \bibitem{oldpaper}H. Huckley, \emph{Old Stuff}, 1900.               \end{thebibliography}                    \end{document}      The point is that the circular nodes have a number inside of them that equals the number in the bibliography, so if you're looking at the flowchart and see a paper that looks interesting, you can look at the references to see exactly what paper it is. The only way I could figure out how to do this somewhat efficiently was by the `\newcommand` stuff -- but this requires me compiling the code, looking at the bibliography, and then manually defining the `\newpaper` and `\oldpaper` to be what they "should" be. If I add another reference, say,               \documentclass{article}     \usepackage{tikz}               \begin{document}          \newcommand{\oldpaper}{2}     \newcommand{\newpaper}{1}          \begin{tikzpicture}[show/.style={circle,draw}]     \node[show]    (\newpaper)    at    (0,2)     [label=right:{This 2011 paper utilizes the good ideas and makes them even better}]    {\newpaper};     \node[show]    (\oldpaper)   at     (0,0)    [label=right:{This paper came out in 1900 and has good ideas}]    {\oldpaper};     \draw[->]    (\oldpaper) -- (\newpaper);     \end{tikzpicture}               \bibliographystyle{amsplain}     \begin{thebibliography}{10}          \bibitem{newerpaper}B. Becker, \emph{Even Newer Stuff}, 2012.          \bibitem{newpaper}C. Charles, \emph{New Stuff}, 2011.          \bibitem{oldpaper}H. Huckley, \emph{Old Stuff}, 1900.          \end{thebibliography}               \end{document}       then I have to redefine my `\oldpaper` and `\newpaper` variables by hand. It's also important that the nodes are named with the same variable, that way the drawing looks right no matter what value the variables have. My real flow chart has over 30 papers in it, and the real bibliography has over 50. Obviously it's getting cumbersome to do this by hand, so I'm wondering if I can somehow use `\cite{}` and extract what the reference number "should be," and name/number the nodes accordingly, and it will update dynamically should I add or drop a reference (some of my references don't show up in the flow chart). I tried adding               \makeatletter     \renewcommand*{\@biblabel}[1]{#1}     \makeatother      in the preamble, then defining               \newcommand{\oldpaper}{\cite{oldpaper}}      so that the variable `\oldpaper` would have the value equal to the current citation number `\cite{oldpaper}` but that didn't work at all. The error message is: > Argument of \XC@definec@lor has an extra } This is beyond my TeX knowledge, and I've spent hours reading about BiBTeX and googling to no avail. Does anyone know how to solve this? Thank you in advance, and I hope my question is clear.


title: \includegraphics clipping and trim is squishing image

text: Clipping keeps squishing my image. My command is:               \includegraphics[keepaspectratio=false,clip=true,trim=90px 0 0 0]{blue.jpg}      But I'm getting: ![enter image description here](http://i.stack.imgur.com/U7X5f.png) Where the original image is: ![unclipped](http://i.stack.imgur.com/CXjB7.png) Why can't I clip or trim an image _without_ squishing? There is a part of an image that I want to _cut off_ without having to go into a photo editor to do it.


title: Should I code a custom class for my template?

text: I am looking into the feasibility of using Latex to write reports. The reports which I generally write are quite repetitive and only really include small changes, such as an address, zone rules, predictions, etc. What I was hoping to do was basically hoping to achieve is the ability to do something along the lines of defining a class (which has rather set wording and structure) and then input the necessary information such as address, etc. So I imagine it would looks something along the lines of...               \documentclass(report_centre_type1)          \address(123 some st)          \zonerules(thiszone)          etc...      There would be a rather large number inputs, but the basic idea is the wording would be change within the template at the relevant places.... ie. > Text text text blah blah blah [address]. blah blah blah text [zone]. > > New section(thiszone) > > if(thiszone) text text text, image, table, etc. > > if(thatzone) text text text, image, etc. Hopefully that makes sense, I am just having trouble finding a tutorial for achieving this, and I may be going down the wrong path in trying to define a class for this, rather than perhaps just utilising an existing class and creating functions with the required inputs? Any help pointing me in the right direction would be much appreciated.


title: Error adding new value to LaTeX-math-list with custom function

text: I am using Auctex with math mode enabled. One of my favorite features is insert `\mathcal` with the key sequence "[backtick] c". I decided to try and customize the variable `LaTeX-math-list` so I can do something similar for `\mathbb`. Borrowing the code for the function `LaTeX-math-cal`, I added following code to my .emacs file:               (defun my-LaTeX-math-mathbb (char dollar)       "Insert {\Bbb CHAR} or \mathbb{CHAR} if latex2e is in TeX-style-list.  If DOLLAR is non-nil, put $'s around it."       (interactive "*c\nP")       (if dollar (insert "$"))       (if (member "latex2e" (TeX-style-list))           (insert "\\mathbb{" (char-to-string char) "}")         (insert "{\\Bbb " (char-to-string char) "}"))       (if dollar (insert "$")))          (setq LaTeX-math-list ())     (add-to-list 'LaTeX-math-list '("=" 'my-LaTeX-math-mathbb "" nil))      However when I try to type th sequence "[backtick] =" I get the following error message:               Wrong type argument: commandp, (quote my-LaTeX-math-mathbb)      When I manually evaluate the expression `(commandp 'my-LaTeX-math-mathbb)` in the scratch buffer, the expression returns true, so I am perplexed as to why I receive the error message. P.S. I am using `=` for the binding only as a temporary measure during testing because this symbol had no previous definition in math mode.


title: Problem setting lengths in an environment (spilling outside of the environment)

text: I am having with spacing between paragraphs in my document, and I think I have been able to trace back to a custom environment I have defined.               \makeatletter     \def\remarkname{Remark}     \newcounter{counter@myremarks}     \newenvironment{remark}{\par\vspace{0.2cm}\par\noindent\begingroup\small%       \addtocounter{counter@myremarks}{1}%       \textbf{\remarkname~\arabic{counter@myremarks}.}~~\ignorespacesandallpars}{%       \endgroup\par\vspace{0.2cm}\par\@afterindentfalse\@afterheading}     \newenvironment{remark*}{\par\vspace{0.2cm}\par\noindent\begingroup\small%       \textbf{\remarkname.}~~\ignorespacesandallpars}{%       \endgroup\par\vspace{0.2cm}\par\@afterindentfalse\@afterheading}     \makeatother      The `\ignorespacesandallpars` command is by Martin Scharrer and comes from a previous StackExchange question. (I know that there are many other ways - packages, or the definitions in amsmath - to get this sort of environment, but I have not yet found something that I'm completely happy with, and it is easier at the moment to use a custom definition.) After I use this definition, I think I notice spacing being a bit wacky, and requiring additional \smallskip or \medskip commands. I wonder what I am doing wrong. Is my problem somewhere else, or am I doing something wrong here? **UPDATE:** The following snippet illustrates one of the problems (the spacing before the second itemize list is not the same than the first): ![enter image description here](http://i.stack.imgur.com/7eEPw.png)               \documentclass{article}          \makeatletter     \def\ignorespacesandallpars{%       \begingroup       \catcode13=10       \@ifnextchar\par         {\endgroup\expandafter\ignorespacesandallpars\@gobble}%         {\endgroup}%     }     \def\remarkname{Remark}     \newenvironment{remark*}{\par\vspace{0.2cm}\par\noindent\begingroup\small%       \textbf{\remarkname.}~~\ignorespacesandallpars}{%       \endgroup\par\vspace{0.2cm}\par\@afterindentfalse\@afterheading}     \makeatother          \begin{document}          Following is an item list     \begin{itemize}     \item One     \item ...     \end{itemize}          \begin{remark*}       Now a remark.     \end{remark*}          And another item list     \begin{itemize}     \item One     \item ...     \end{itemize}          \end{document}


title: Lifespan lines in TeX

text: I'm writing a document (written in plainTeX) about the lives of important mathematicians and physicists in human history. Now I have a problem I'd like to tackle. I need to be able to _visualize_ their lifespans (so that reader can see who was whose contemporary/coeval). Unfortunatelly, I'm not that skilled in making TeX's macros. Can anyone give me a hint how to do it? Specifically, I imagine it would work this way:               \person{name}{surname}{year_of_birth}{year_of_death}     \person{name}{surname}{year_of_birth}{year_of_death}     ...     \renderpeople      which would produce (for instance, with instances of Bach & Mozart)               Bach J.S.              |----------------|     Mozart A.                      |-----------------|     ...               |----------|-----------|----------|-----------|---------|            1750        1800        1850       1900        1950      2000      Mainly, how would one implement rescaling of lines, so they would fit?


title: How do I add syntax coloring to my C++ source code in beamer

text: I have just learned how to insert source code into `beamer` with the `listings` package. However I dont know how to go about adding any syntax coloring on the C++ source code. How do I do that? Here is the code I am currently using for source code insertion.               \documentclass{beamer}      \setbeamercovered{transparent}     %\usepackage{pxfonts}     \usepackage{listings}               \begin{document}          \begin{frame}[fragile]     \frametitle{Inserting source code}       \lstset{language=C++}     \begin{lstlisting}         #include<stdio.h>         #include<iostream>         int main(void)         {         printf("Hello World\n");         return 0;         }     \end{lstlisting}     \end{frame}     \end{document}


title: Drop shadow of node with pgfplot inside

text: I have this code:               \documentclass[tikz]{standalone}     \usepackage{pgfplots}     \usetikzlibrary{shadows}     \begin{document}     \begin{tikzpicture}     \node[drop shadow,draw,fill=green] {       \begin{tikzpicture}       \begin{axis}        \addplot coordinates {(0,0) (1,1)};       \end{axis}       \end{tikzpicture}     };     \path [use as bounding box] (-5,-5) rectangle (5,5);     \end{tikzpicture}     \end{document}      which gives ![enter image description here](http://i.stack.imgur.com/FmIPq.png) The problem is now that the plot has also a drop shadow. How can I avoid this? I tried to use `fill` either in `pre`\- or `postaction` or changing the pgfplot background to white but that dind't help.


title: Is there a WYSIWYG editor for biblatex styles?

text: Does anyone know if a WYSIWYG editor for `biblatex` exists, where I simply can enter some kind of template (e.g. regular expression or whatever) and the needed commands to produce this style would be generated. Especially for the style of entries in the reference list. Considering different orders of e.g. author, journal, year ... brackets or not, or colon, semicolon or just a dot and so on. From what I saw on the net, LyX seems to be not compatible with `biblatex`. I think this would be a helpful tool – not only for `biblatex` newbies. ## Remark This question seeks for:   * Generators of BibLaTeX _styles_ , not of BibLaTeX _contents_.   * Hence only a tool whose output is a set of BibLaTeX commands to be put in a document preamble is what the answers should be about.   * Examples of what are _not_ the right tools (making **not valid answers** ):     * JabRef, BibDesk, ... (manages bibliography entries, not BibLaTeX styles)     * `makebst`, `custom-bib`, ... (good try, but it is for BibTeX, not BibLaTeX)


title: Adjusting the book document class for large volume writings

text: Given that my writing is relatively large in volume, I would like to make more efficient use of space. I therefore set `\documentclass[a4paper,11pt]{book}`, but I suppose that there is a way to use _a bit_ more of margins. What would be the way to it? Could I manually set the parameter, relative to default.


title: How to set up texi2dvi with synctex and error handling?

text: I would like to set up `texi2dvi` (with error-handling, synctex for forward and backward syncronization, and Okular as viewer) to compile `.tex` documents (under Ubuntu 12.04 with Emacs 24). (In case this matters) here is my general LaTeX/AUCTeX setup in `.emacs` (feel free to comment if you see nonsense here already):               ;; basics     (add-to-list 'load-path "/usr/share/emacs23/site-lisp"); path to tex-site.el     (require 'tex-site); enable AUCTeX     (load "auctex.el" nil t t)     (load "preview-latex.el" nil t t); preview in .tex file     (setq TeX-auto-save t); enable parsing buffers on save      (setq TeX-parse-self t); enable parsing buffers on load     (setq TeX-save-query nil); autosave before compiling (=> do not ask for saving)     (setq TeX-PDF-mode t); use pdflatex by default     (setq TeX-clean-confirm nil); don't ask for confirmation on cleaning via M-x TeX-clean     (add-hook 'LaTeX-mode-hook 'LaTeX-math-mode); turn on latex math mode     (add-hook 'LaTeX-mode-hook 'turn-on-auto-fill); turn on auto-fill mode     (setq-default TeX-master nil); for master/slave projects          ;; start (first) emacs session in server mode (required for backward search from     ;; .pdf to .tex)     ;; see http://stackoverflow.com/questions/6397323/how-to-avoid-the-message-of-server-start-while-opening-another-emacs-session     (require 'server)     (or (server-running-p)         (server-start))      In case of an error, the TeX Help buffer should be displayed, indicating the error. If the error is resolved and the `.tex` file compiled again, the buffer should disappear. For the latter, we need the following function:               ;; for closing the help buffer after all errors are resolved     ;; see http://stackoverflow.com/questions/9249458/latex-emacs-automatically-open-tex-help-buffer-on-error-and-close-it-after-c     (defun demolish-tex-help ()       (interactive)       (if (get-buffer "*TeX Help*")           (progn             (if (get-buffer-window (get-buffer "*TeX Help*"))                 (delete-window (get-buffer-window (get-buffer "*TeX Help*")))               )             (kill-buffer "*TeX Help*")             )         )       )      The following function is the main problem (as mentioned below). It should call `texi2dvi` in such a way that synctex works (for forward and backward syncronization with Okular) and errors should be displayed in the TeX Help buffer.               ;; texi2dvi -- define nice function with error handling      ;; see http://stackoverflow.com/questions/11565998/elisp-texi2dvi-how-to-call-texi2dvi-from-emacs/11587555#11587555     (defun mytexi2dvi ()       (interactive)       (let ((TeX-save-query nil)             (TeX-process-asynchronous nil)             (master-file (expand-file-name (TeX-master-file t)))); append .tex         (TeX-save-document ""); save document         ;; run texi2dvi on master         (TeX-run-TeX "texi2dvi"; name              (TeX-command-expand               "texi2dvi -p %s"; command; TODO: errors are not caught ...               (lambda (ext-ignored nondir)                 (TeX-master-file t nondir)))                      master-file)         ;; error handling         (if (plist-get TeX-error-report-switches (intern master-file))             (TeX-next-error t)           (progn             (demolish-tex-help); that's the function that closes the TeX Help buffer when there is no error anymore (see above)             (minibuffer-message "texi2dvi: done."))         )       )     )      For making `mytexi2dvi` available on `C-c C-c`, I use:               ;; Compiling .tex files     ;; adapted from http://stackoverflow.com/questions/9454839/how-to-add-a-function-latexmk-variant-to-tex-command-list-in-auctex     (add-hook 'LaTeX-mode-hook        (lambda ()          ;; texi2dvi           (add-to-list 'TeX-command-list               '("texi2dvi" "(mytexi2dvi)" TeX-run-function nil t :help "Run texi2dvi") t)          ;; default          (setq TeX-command-default "latexmk")))      Finally, Okular is set up like this:               ;; set default pdf viewer     ;; see http://tex.stackexchange.com/questions/29813/setup-synctex-with-emacs     ;; Additionally, do: Okular -> Settings -> Editor -> change to Emacs client     (defun Okular-make-url () (concat                    "file://"                    (expand-file-name (funcall file (TeX-output-extension) t)                              (file-name-directory (TeX-master-file)))                    "#src:"                    (TeX-current-line)                    (expand-file-name (TeX-master-directory))                    "./"                    (TeX-current-file-name-master-relative)))     (add-hook 'LaTeX-mode-hook '(lambda ()                       (add-to-list 'TeX-expand-list                            '("%u" Okular-make-url))))     (setq TeX-view-program-list          '(("Okular" "okular --unique %u")))     (setq TeX-view-program-selection '((output-pdf "Okular") (output-dvi "Okular"))); use okular for displaying .pdf and .dvi      Interestingly, the following works: Set in `~/.profile`:               PDFLATEX="pdflatex --shell-escape -synctex=1 -file-line-error"     export PDFLATEX       I can then call `texi2dvi -p foo.tex` in the shell, open Okular via `C-c C-v` and get forward and backward sync, so this is working from the shell. However, from within Emacs, it's not working. Here are the problems: 1) `C-c C-c` compiles the document, but not `.synctex.gz` is written, so synctex (for backward sync) is not working. This problem remains if I replace `texi2dvi -p %s` by `"PDFLATEX='pdflatex --shell-escape -synctex=1 -file-line- error' texi2dvi -p %s"`. 2) On `C-c C-l` I receive ``No process for this document.'' instead of the output generated by`texi2dvi`. 3) In case of an error, no TeX Help buffer is shown, so errors are not caught/detected. 4) `C-c C-v` opens Okular at the correct spot, so forward sync is working; backward sync (on `Shift + left mouse`) is not working (as stated above) Overall, I would consider what I try as a minimal setup to efficiently work with LaTeX. Since I only found some information and even this quite scattered on the web, I am wondering how others work with LaTeX/AUCTeX/Emacs? Is there a more efficient way? The setup above seemed pretty nice to me, you just have to hit `C-c C-c` (even inside sub-files of a project), the master `.tex` file is compiled (as many times as necessary), and in case of an error, you directly see what happened. Without the "close-help-buffer-if-error-is-resolved" I always get confused if I actually solved the error, that's why I find this useful.


title: Error with \topic while using the minutes package in LateX

text: I am using the `minutes` package in LaTeX, and everything works just fine, except that the command `\topic` doesn't work. `\subtopic` works just fine, but when I use `\topic` it gives the following error:               Extra \else \strc@sect ... csname the#1 endcsname }\fi #7}\else def\@svsechd {#6hskip #...      and I have no idea what that means. How can I solve this error?


title: TeXworks + pdflatex + PSTricks autopp suffix problem

text: I have managed to make PSTricks work with TeXworks. However after compilation it adds `-autopp` to the basename of the pdf file, e.g. `report.pdf` becomes `report-autopp.pdf`. As a result TeXworks is not able to preview the file in a window. How can I make TeXworks preview the pdf file? Am I doing something wrong? Here is my tex file:               \documentclass{article}     \usepackage[pdf]{pstricks}     \begin{document}     \begin{figure}     \begin{pspicture}(4,5)     \psframe(0.7,2)(3.3,3)     \rput(2,2.5){First Example}     \end{pspicture}     \end{figure}     \end{document}


title: Alternate of \setitemize only for bibliography

text: I want the alternate of the command `\setitemize` only for the bibliography section. Currently it is working for whole document.


title: A theoremstyle with complete indentation using amsthm

text: I want to define a theoremstyle using amsthm, such that the complete environments content produced by `\newtheorem` with this style are indented. The following standalone example uses an adapted version of a suggestion posted in theorem-environment-with-hanging-indentation:               \documentclass{article}     \usepackage{amsmath,amssymb,amsthm}     \usepackage[english]{babel}     \usepackage{blindtext}     \newtheoremstyle{indented}{3pt}{3pt}{\addtolength{\leftskip}{2.5em}}{}{\bfseries}{.}{.5em}{}          \theoremstyle{indented}     \newtheorem{definition}{Definition}          \begin{document}       \blindtext       \begin{definition}[test]         some text         \begin{enumerate}           \item an item           \item another item         \end{enumerate}         more text.       \end{definition}       \blindtext     \end{document}      which will produce a result like this: ![result](http://i.stack.imgur.com/RLZV4.png) The question at hand is of course, how can an indentation be realized, such that lists will be indented too. Would it for instance be advisable, to format the whole environment as a list? If so, how? I would prefer to keep the definition as simple as possible, without for instance redefining amsthm commands.


title: How to remove all of ticks keeping the extra ticks

text: I want something like               \begin{axis}[       y ticks=\empty,       extra y ticks={-1,1},       extra y tick style={yticklabels={{name1},{name2}}     ] ...     \end{axis}


title: TikZ: connecting nodeparts

text: I'm new to TikZ. Last couple of hours in fact. I was wondering if there was a way of connecting `nodepart`s from different nodes. Here's an example               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{shapes}     \begin{document}          \begin{tikzpicture}[       grow=right,           level 1/.style={sibling distance=3.5cm,level distance=5.2cm},       edge from parent/.style={draw=white},     ]          \node[name=block1, rectangle split, rectangle split parts=4, draw=black]       { \textbf{Block 1}         \nodepart{second} connect to a         \nodepart{third} connect to b         \nodepart{fourth} connect to c       }       child {         node[name=block2, rectangle split, rectangle split parts=4, draw=black]          {  \textbf{Block 2}             \nodepart{second} \Huge{a}             \nodepart{third} \Huge{b}             \nodepart{fourth} \Huge{c}         }     };     \end{tikzpicture}     \end{document}      ![connect the dots](http://i.stack.imgur.com/w45E5.jpg) I want to connect the nodeparts of block 1 to 2. I was hoping I could do something like:               \draw [->] (block1.second.east) -- (block2.second.west);      ...but alas, it did not work, and I couldn't figure out how to do this. (I guess I could just stack plain nodes and connect them as per usual, but still interested in a solution here.)