title: Issue with table captions

text: I have been writing my thesis in LaTeX and has always managed to fix any issues that arose but I just can't go anywhere with this one... :s. Basically any table that I have in my document has the same issue. Their cpation is messed up, it says "Table X:" then inserts a line break before inserting the caption... I could not find in my style sheet. Here is a typical example, both the code and the result as a picture...               \begin{table}[!h]\small \centering{}       \begin{tabulary}{1\textwidth}{C C C C C}         & \multicolumn{4}{c}{$\gamma$-criterion}\\         & {1 mm / 0.5 \%} & {1 mm / 1 \%} & {2 mm / 0.5 \%} & {2 mm / 0.1 \%}\\         \hline \hline         Field & \multicolumn{4}{c}{Passing rate \%}\\         \hline         Spine sarcoma & 93.7 & 92.9 & 94.9 & 96.9\\         Pericardia and lung sarcoma & 93.6 & 92.7 & 95.2 & 97.3\\         Head \& neck field 1 & 94.4 & 93.3 & 95.1 & 97.0\\          Head \& neck field 2 & 94.0 & 92.9 & 94.2 & 96.7\\        \end{tabulary}       \caption{3D $\gamma$-analyses results between GMC's water dose recomputation and the original QA dose computations. Numerous gamma criteria were used.}       \label{GMCtab2}     \end{table}      Result: ![result](http://i62.tinypic.com/xnfcdw.png) Please help!


title: Rotated $\ltimes$ symbol

text: I'd like to use a rotated version of `$\ltimes$` where the vertical line is at the top, and another where the vertical line is at the bottom. I tried using `\rotatebox` with `graphicx`, but it puts the symbol either too high or too low. Any thoughts?


title: How to change origin in axesIIID?

text: I'm tying to plot a figure with pst-solides3d package and would like to move axis from origin (0,0,0) to (-2,-2, 0). I checked the available options for axisIIID (ftp://ftp.cam.ctan.org/ctan/tex- archive/graphics/pstricks/contrib/pst-solides3d/pst-solides3d-doc.pdf) and changing the origin is not among them. Is it possible to change the origin in some other way?


title: Using the TikZ spy library to spy on a pixel value in beamer

text: I tried to use the `TikZ`library `spy` to zoom in on a certain pixel image; I am drawing in the image using a scope and red about the problem concerning coordinates in scopes here Magnify part of picture with TikZ spy, expressed in relative scoped coordinates My problem is, that spy seems to place the point _in_ the image correctly but then chooses the wrong part to magnify, for example in the MWE               \documentclass[german,10pt,xcolor=colortbl,compress]{beamer}     \usepackage{xunicode}     \usepackage{calc}     \usepackage{graphicx,tikz}     \usetikzlibrary{spy,calc}     \RequirePackage[no-math]{fontspec}      \RequirePackage{xltxtra}     \setbeamertemplate{navigation symbols}{}     \begin{document}         \begin{frame}{Example}{Spy on Images in Beamer}             \begin{tikzpicture}[spy using outlines={circle,size=.1\textwidth, magnification=3, connect spies}]                 \node[anchor=south west,inner sep=0pt] (image) at (0,0) {%                 % \includegraphics[height=.5\textwdth]{exampleA}                 \begin{tikzpicture}                     \draw[draw=blue,fill=green!50] (0,0) rectangle (.5\textwidth,.5\textwidth);                     \shade[top color=black, bottom color=white] (.25\textwidth,.25\textwidth) rectangle (.5\textwidth,.5\textwidth);                                     \end{tikzpicture}                 };                 \begin{scope}[x={(image.south east)},y={(image.north west)}]                     % Draw besides image                     \shade[top color=red, bottom color=blue] (1.025,.66) rectangle (1.075,1);                     \node (spy1) at (128/256,192/256) {};                     \coordinate (spyto1) at (-.5,.75);                      \spy [black,thick] on (spy1) in node at (spyto1);                     \node (spy2) at (256/256,224/256) {};                     \coordinate (spyto2) at (-.5,.25);                      \spy [black,thick] on (spy2) in node at (spyto2);                 \end{scope}                 % Adress a point in “pixels”             \end{tikzpicture}     \end{frame}     \end{document}      The magnification should be directly at the border of the green part to the shade. nevertheless, the magnification shows only green and playing around with the second one, i think it's off by both directions to the lower left. ![Wrong spy in beamer with scopes](http://i.stack.imgur.com/Y0vTp.png) I have seen no way to obtain information about the magnification process, so - any clues, which computation is still affected by some wrong **scoped** coordinates would be very helpful. _Edit:_ As Andrew noted, this is fixed (also for me now) with TikZ/PGF 3.0; though if anybody could present details on what is going wrong here - feel free to share.


title: What happened to the mzlatex command?

text: I am using MiKTeX 2.9. I would like to convert a LaTeX file to HTML. I have seen here (http://access2science.com/latex/tutorial_txht.xhtml#x1-50001.2) that I can use the `mzlatex` command to convert this way but I get the following error: > `mzlatex` is not recognized as an internal or external command operable > program or batch file It is mentioned in the above link (http://access2science.com/latex/tutorial_txht.xhtml#x1-50001.2) that MiKTeX 2.9 has some problem and so I have to install version 2.8 but I do not see MiKTeX 2.8 giving following message: > MiKTeX 2.8 has been released in September 2009.This version has reached the > "end-of-life" status. It will not be possible to install packages from the > remote package repository.The current release is 2.9. (http://miktex.org/2.8/status) I am not sure What I am supposed to do now. I tried but it is giving following error: ![enter image description here](http://i.stack.imgur.com/fkLNi.png)


title: How do these two \vspace implementations differ?

text: I'm building my resume in LaTeX and the template I'm using some ideas from defined an environment like such:               \newenvironment{body} {         \vspace*{-16pt}         \begin{changemargin}{-0.25in}{-0.5in}       }          {\end{changemargin}     }      And whenever I start a portion of my resume (a section, that is) I start with `\begin{body}`. However, for spacing issues I always have `\vspace{14pt}` after every `\begin{body}` (and right before `\end{body}` which just seems asinine if I can make it part of the environment. So I changed it to:               \newenvironment{body} {         \vspace*{-2pt}         \begin{changemargin}{-0.25in}{-0.5in}       }          {\end{changemargin}         \vspace{14pt}     }      Is this correct in that it yields the same result? Also, what does the `\vspace*` do as compared to `\vspace`?


title: Tikz and pgfplot problem with plotting

text: I'm using pgfplots. The graph is clipped where it shouldn't, how can I fix it?               \documentclass{article}          \usepackage{tikz}     \usepackage{siunitx}     \usepackage{pgfplots}          \begin{document}         \begin{tikzpicture}         \begin{axis}[             ymin=0,ymax=0.33,             xmin=0,xmax=260,             ticks=none,axis x line=bottom,axis y line=left,xlabel={Voltage (\si{\volt})}, ylabel={Current (\si{\ampere})},         ]         \addplot[             domain=0:249.999,             samples=1000,         ]             {0.0257019* ln(1000 *(250 - x))};         \end{axis}         \end{tikzpicture}     \end{document}      ![The graph of the function is clipped, but it should reach the x axis](http://i.stack.imgur.com/8QHuC.png) Because of the steepness of the graph near 250, I want to add a point at (250,0), so pgfplots can draw a vertical line, I've been trying to do this without success. This is the real example:               \documentclass{article}          \usepackage{tikz}     \usepackage{siunitx}     \usepackage{pgfplots}          \begin{document}     \begin{tikzpicture}[         declare function={             func(\x)= (\x<250) * 0.02570194444* ln(1.470588235e10 -5.882352941e7* \x)) +                 (\x==250)*(0);         }     ]         \begin{axis}[             clip=false,             ymin=0,ymax=0.625,             xmin=0,xmax=260,             every axis y label/.style={                 at={(ticklabel* cs:0.5)},                 anchor=near ticklabel,                 rotate=90,             },             every axis x label/.style={                 at={(ticklabel* cs:0.5)},                 anchor=near ticklabel,             },             ticks=none,             xlabel={Voltage (\si{\volt})}, ylabel={Current (\si{\ampere})},             ]                  \addplot[domain=0:250,samples=3000,thick]{func(x)};         \end{axis}     \end{tikzpicture}     \end{document}      ![Real graph](http://i.stack.imgur.com/Gsgvm.gif) How can I do that?


title: Recommend way to get angular velocity in degree with siunitx

text: The siunitx package has a special macro for setting angles in degrees called like `\ang{42}`, which renders as ![42°](http://i.stack.imgur.com/pEvJB.png), i.e. sets no space between the number and the unit as recommended and in contrast to the normal `\unit`, which inserts a thin space. Unfortunately the `\ang` macro has no optional argument adding additional units (as in `\ang{42}[\per\second]`), which leads to the following question: Having an angular velocity in degree (unit: degree per seconds; I do not want to use rad/s here), what is the recommended way to have a nice (correct) output and what is the recommended way with siunitx? I have two suggestions: First               \SI{42}{\degree\per\second}      resulting in ![](http://i.stack.imgur.com/YWqdw.png) and second               \num{42}\si{\degree\per\second}      which looks like ![enter image description here](http://i.stack.imgur.com/QatCl.png). Both look unfamiliar, but the output of the latter might look a bit more familiar than the first one, altough the code of the former is nicer than that of the second one. Does anyone know what is officially correct?


title: How is \unexpanded defined?

text: I was wondering how `\etoolbox`'s `\expandonce` does what it does. So I looked up how it was defined and found               \unexpanded\expandafter{#1}      But no matter where I look, I cannot find a definition for `\unexpanded`. I've tried                texdef -t latex unexpanded -s      which returns the following:               Source code definition of 'unexpanded' could not be found.     \unexpanded is defined by (La)TeX.          \unexpanded:     \unexpanded      I've also tried looking in the `source2e` documentation, but there's nothing there about `\unexpanded`. Could someone point me in the right direction of where to find the documentation?


title: Undefined control sequence on \subtitle

text: Using the very simple LaTeX document below, named `test.tex`:               \documentclass{scrartcl}          \begin{document}          \title{(Title)}     \subtitle{(Subtitle)}     \author{(Author)}          \maketitle          \end{document}      When running `latex test.tex`, I am getting the error reported as follows in the log file:               This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6)      %&-line parsing enabled.     entering extended mode     (./test.tex     LaTeX2e <2005/12/01>     Babel <v3.8h> and hyphenation patterns for english, usenglishmax, dumylang, noh     yphenation, arabic, basque, bulgarian, coptic, welsh, czech, slovak, german, ng     erman, danish, esperanto, spanish, catalan, galician, estonian, farsi, finnish,      french, greek, monogreek, ancientgreek, croatian, hungarian, interlingua, ibyc     us, indonesian, icelandic, italian, latin, mongolian, dutch, norsk, polish, por     tuguese, pinyin, romanian, russian, slovenian, uppersorbian, serbian, swedish,      turkish, ukenglish, ukrainian, loaded.     (/usr/share/texmf/tex/latex/koma-script/scrartcl.cls     Document Class: scrartcl 2006/07/30 v2.95b KOMA-Script document class (article)          (/usr/share/texmf/tex/latex/koma-script/scrkbase.sty     (/usr/share/texmf/tex/latex/koma-script/scrlfile.sty     Package scrlfile, 2006/03/28 v2.95 KOMA-Script package (loading files)                       Copyright (C) Markus Kohm          ) (/usr/share/texmf/tex/latex/graphics/keyval.sty))     (/usr/share/texmf/tex/latex/base/size11.clo)     (/usr/share/texmf/tex/latex/koma-script/typearea.sty     Package typearea, 2006/07/30 v2.95b KOMA-Script package (type area)                       Copyright (C) Frank Neukam, 1992-1994                       Copyright (C) Markus Kohm, 1994-2002          )) (./test.aux)     ! Undefined control sequence.     l.6 \subtitle                  {(Subtitle)}     ?      [1] [2] (./test.aux) )     Output written on test.dvi (2 pages, 484 bytes).     Transcript written on test.log.      Is there something else I need to define or include to make this work?


title: itemize equations

text: I would like to itemize some equations but they don't appear on the same line as the bullets. Here is a code example.               \documentclass{article}     \begin{document}     \begin{itemize}     \item\begin{equation*}              Pr( Y= n)  = \frac{e^{-7}\times 7^n}{n!}     \end{equation*}          \item\begin{equation*}                            Pr(X = m)  = \frac{e^{-4}\times 4^m}{m!}     \end{equation*}     \end{itemize}     \end{document}      How can I solve this?


title: How to dynamically change the output filename in Vim LaTeX Suite

text: Say, my .tex files are organized like this `~/Projects/proj_name/articles.tex`. After compiling with LaTeX Suite, I want the output PDF file to be `proj_name.pdf` instead of `articles.pdf`. Since I have several projects in `~/Projects/` I want a systematic configuration in `.vimrc`. Here is my current solution `let g:Tex_CompileRule_pdf='pdflatex -interaction=nonstopmode -jobname=%:p:h:t $*'` This method is not satisfying since the name of `.aux` and `.bbl` are also changed to `proj_name` while Vim-LaTeX is still looking for `articles.aux`. My question is, is there any other methods for doing this?


title: How to force page break within a longtable cell when the content is too long

text: > **Possible Duplicate:**   >  Longtable: page breaks within row possible? I'm using longtable and it sometimes contains a text more than 1 page. I couldn't figure out how to break page when it overflows. It seems there is no way to do it by longtable. However, is there an alternative to longtable? To illusturate, what i need is, transforming the following ![What longtable does](http://i.stack.imgur.com/8JAp3.png) to this one: ![What i want](http://i.stack.imgur.com/36SNT.png) Thanks in advance. _PS: Bold lines of the figures are the borders of the longtable. Note that there are only one longtable which contains 4 rows and 2 columns :)_ _PS2: I cannot add more rows since i'm using an`environment` template_


title: How to number an inline-math equation?

text: I want to add an equation number in a formula, but I've got an error: "You can't use `\eqno' in math mode.". This is my code:               $e_{33} = 0 \eqno(4.4)$      How I can fix it?


title: making pretty ebooks using LaTeX

text: > **Possible Duplicate:**   >  Preparing PDF files for ebook readers, etc. I want to make a pretty ebook using LaTeX. I was wondering if somebody help me to find some sample files or templates to do this on the Internet or to introduce me helpful packages.


title: Left-aligned text inside an equation

text: Inside an equation-like environment, I'd like to have some text that is aligned to the left margin of the text block, something like `\intertext`, but in the same line as the equation Something like this:               \usepackage{amsmath,mathtools}     \newcommand*{\midmathskip}{\hskip0.5\displaywidth\hskip-0.5\totwidth@}     \newcommand*{\lefttext}[1]{\llap{\rlap{#1}\midmathskip}}          \begin{align}     \lefttext{and similarly}      \hphantom{nn-nn}      \mathllap{hwnn} &= H+hw. \\     \lefttext{Thus}      nn-nn &= 1.     \end{align}      of course, the `\hphantom` and `\mathllap` are just hacks to make it look right in this case, but I'm looking for something that would work in a gather environment too. `flalign` could help, for it alters the alignment of the equations (they are not in the center of the text block any more), and it doesn't help with `gather` anyway. As a bonus, it would also be nice if it worked with `aligned` and `alignedat`.


title: Problems installing vim latex-suite

text: I'm working on mac.   * I donwloaded the archive 1.8.23 from the SourceForge page   * I extracted its contained files in my `~/.vim/` directory   * I made the necessary changes (described in de vim latex manual) in my `~/.vimrc` file (which I had to create because it did not exist yet)   * I opened vim and typed `:helptags ~/.vim/doc`   * I reopened vim and started editing an existing `.tex` file, but it seems vim latex-suite is not being loaded properly... What am I doing wrong? I tried several things, including going into the `~/.vim/` directory, and used `make`, but I got the following errors :               rm -rf -- ./vim-latex-1.8.23-20100914-r     svn export -r HEAD . vim-latex-1.8.23-20100914-r     svn: '.' is not a working copy     make: *** [snapshot] Error 1      EDIT : My `.vimrc` file here.


title: How do I convert HTML to LaTeX?

text: I would like a way to convert a document from HTML to LaTeX on a Windows platform. What is my best option?


title: Nomenclature sequence in Lyx

text: I am using the Nomenclature package in Lyx. I am sorting my entries between Greek symbols, Roman symbols and acronyms. As you can see in the screenshot ![screenshot](http://i.stack.imgur.com/BKkQJ.png) the symbols are further separated: with or without subscription. How can I change the sequence so that all symbols are alphabetically ordered?


title: Number exercises according to chapter

text: I'm using the `exercise` package together with `memoir` class. How do I number my exercises according to chapter number, in the same way that display equations are numbered? Here's a minimal example               \documentclass{memoir}          \usepackage{mathtools}     \usepackage{exercise}          \begin{document}         \chapter{Foo}             Lorem ipsum dolor sit amet             \begin{Exercise}                 This should come out as Exercise 1.1             \end{Exercise}             \begin{Answer}                 Answer 1.1             \end{Answer}                  \begin{Exercise}                 This should be Exercise 1.2             \end{Exercise}              \chapter{Bar}             Consectetuer adipiscing elit             \begin{Exercise}                 And this should be Exercise 2.1             \end{Exercise}                  \begin{Exercise}                 Certainly this should be Exercise 2.2             \end{Exercise}             \begin{Answer}                 Answer 2.2             \end{Answer}     \end{document}      I'm thinking of tapping into a counter variable in `memoir` or somewhere else. How do I go about it? I would like the numbering to also affect the `Answer` environment.


title: Grouping digits according to the Indian numbering system in siunitx

text: `\num{100000}` prints 100 000 I want to have 1 00 000. Question: How to set `siunitx` package to do the above? Some more `\num{1000}` => 1 000 `\num{10000}` => 10 000 `\num{100000}` => 1 00 000 `\num{1000000}` => 10 00 000               \documentclass[12pt]{article}     \usepackage{siunitx}     \sisetup{group-separator = {,}}          \begin{document}          \num{1000}          \num{10000}          \num{100000}          \num{1000000}          \num{10000000}          \num{100000000}          \num{1000000000}          \SI{1000000000}{m}          \end{document}      The exact rules are described on the Wikipedia entry: > The Indian Numbering System uses separators differently from the Arabic > system; besides the three least significant digits of the integer part, a > comma divides every two rather than every three digits.


title: TeX within a LaTeX document?

text: I'm new to LaTeX and I guess I'm still a little confused about the difference between TeX and LaTeX. Under what circumstances would you actually need to define new TeX macros within a LaTeX document? What's the difference between `\def` and `\newcommand` (other than the fact that one is TeX and the other is LaTeX)? Can someone give me an example?


title: What can't TeX  do?

text: What are TeX's limitations in typography, book design and publishing? (and here TeX also includes all its derivatives, like pdfTeX, LuaTeX, and macro packages built upon it, LaTeX, ConTeXt etc.). Some things (like math and references) are extremely easy in TeX. There are some things that are harder to do in TeX-based systems, but they are possible, even if cumbersome (like precise control of images' placement or manual control over layout and design). Solutions to some problems have been found (like `microtype`). Some things are rarely talked about (like color profiles). Please mention what is either extremely hard to achieve with TeX or is not possible at all (due to inherent limitations of TeX, or due to bugs/limitations in the available tool chain). Please mention also which technological steps do not fit well with TeX workflow.


title: A quirk when using xemacs scripts to automatically expand abbreviations into LaTeX code

text: I am an avid fan of Oleg Alexandrov's method for customizing XEmacs to make it an efficient system for editing LaTeX files. One feature I find particularly useful is the ability to have XEmacs automagically expand abbreviations. (You may ask: why not just use macros? Answer: I like, for example, the ability to simply type `\eq` and, after pressing the spacebar, have my cursor be placed inside a syntactically-correct equation environment.) One quirk of XEmacs seems to be that one cannot use capitalization in the abbreviations. For example, suppose one defines `\s` to be an abbreviation which is expanded into `\mathsf{` (to use a sans-serif font in math mode). Then typing `\S` will be expanded into `\Mathsf`, which will not compile. This behavior is undesirable if one also wants to be able to use the ordinary `\S` command in LaTeX to typeset a "section" symbol. One workaround is to define `\sec` or something similar as an "abbreviation" to be expanded into `\S`, but this is sort of annoying. (Another example: if -- for some reason -- one wants to avoid using macros, one can use abbreviations for the same functionality. But one cannot define `\gl` to be `$\mathfrak{gl}$` and `\GL` to be `\mathrm{GL}` because of the same capitalization issue; the latter will be expanded to `\Mathfrak{gl}`, I believe.) My question: is there a more satisfying workaround for this problem? P.S. If this question is more appropriate for stackoverflow or a different stackexchange site, please let me know.


title: setting tikz styles

text: How do I set labeling styles associated with each style type? For example: (source below) ![](https://88df6ea0630aed8027ff-0caf779119a6537399728d4d80523795.ssl.cf5.rackcdn.com/jrwtbtqxntyz/page/db0d76a9c234046ca1645698d7d8d83e645253cf.jpeg)   * I have an "input" style (medium circle) and a "junction" style (small dot) which I would like to have the labels below by default, but they default to above.   * I also have a "block" style (gradient shaded rectangle) which somehow already has the label default to below, and I want to use a smaller font for the label.  I can't figure out how to do either of these, the only thing I could figure out is how to use the `every label/.style` to change the font of all labels. https://www.writelatex.com/read/jrwtbtqxntyz               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,positioning,fit}     \begin{document}     \begin{tikzpicture}[node distance=5mm,         block/.style={         % The shape:         rectangle, minimum size=6mm,         % The rest         thick,draw=black,         top color=white,         bottom color=black!10         },         input/.style={         % The shape:         circle, minimum size=1mm,         % The rest         thick,draw=black,         fill = white,         },         junction/.style={         % The shape:         circle, minimum size=0.5mm, inner sep=0pt,         % The rest         thick,draw=black,         fill = black         },         every label/.style={             font=\small         },         >=latex         ]     \node (wcmd) [input, label=below:$\omega_{cmd}$]{};     \node (wcmd2) at (0,1) [input, label=$\omega_{cmd}$]{};     \node (jj) at (1,1) [junction, label=Z] {};     \node (C) [block, right=of wcmd] {C};     \node (D) [block,right=of C] {D};     \node (E) [block,right=of D, label=below:Hey] {E};     \node (F) [block,below=of D] {F};     \draw[->] (wcmd) -- (C);     \draw[->] (C) -- (D);     \end{tikzpicture}     \end{document}


title: Math in a table

text: Im trying to put some `\times` and `\power` in a table, but it isn't quite working.               \usepackage{mathtools}     \usepackage{amsmath}          \begin{tabular}{| p{3cm} | p{9cm} }     \hline     \bf hardware & \bf rekensom\\     \hline     6506E & 1 - (1 - 0.9999909)^2 = 0.99999999991 * 100% = 99.9999999917%\\     \hline     6509E & 1 - (1 - 0.9999885)^2 = 0.99999999986 * 100% = 99.9999999868%\\     \hline     \end {tabular}      I also tried this, but it didnt work either:               \hline     6506E &  $$ 1 - (1 - 0.9999909)\power2 = 0.99999999991 \times 100\% $$\\     \hline      The error it gives here is > Undefined control sequence


title: Put the last date of the file versioned with Git

text: I have many TeX files for to get their PDFs versions and I put a date in each of them like as _last updated_ data.               \usepackage[yyyymmdd]{datetime}     updated \today      But this is tricky, because every time that I compile them, this date would change in function of the day that I do it. So, because I track my changes with Git I want to change the `\today` command with the last date when the file was commited; and a file could be commited or not in the last change. I use TeXLive distribution on Windows and I have a `make.bat` file for an automatic compilation of the files:               @echo off     for %%G in ("*.tex") DO (call :singlefile "%%G")     goto :eof          :singlefile     echo compiling %1     latexmk -xelatex -bibtex- -silent -auxdir=output -outdir=output %1     goto :eof      My Git version: 1.9.4.msysgit.0


title: Strange "Too many files" error with pdfTeX

text: That is the `auto-pst-pdf` message I get when I compile the MWE below with the `pdfTeX` engine. I have just (meaning, as of this post's date) reinstalled my entire MikTeX 2.9 system with a complete distribution. My operating system is Windows Xp. I haven't been able to find any useful information on the web about this error message. Am I doing something wrong here? Any help would be appreciated.               \documentclass{memoir}          \usepackage{ifpdf,ifxetex}     \usepackage[pdfcrop = {--hires}]{auto-pst-pdf}     \ifpdf\else\usepackage{pstricks}\fi          \begin{document}     \begin{pspicture}(0,0)(1,1)     \psframe*[linecolor = red](0,0)(1,1)     \end{pspicture}     Hi!     \end{document}       EDIT: The error message seems to be bound to `pdfcrop`. The moment I delete the `pdfcrop = {--hires}` option, the problem disappears. But now there is the inconvenience that I do not get a tightly cropped picture.


title: capmargin for multiline captions but centered for oneline

text: The koma class `scrbook` centers oneline captions if not given `captions=nooneline`. However, settings setcapmargin (`\setcapmargin{0.05\textwidth}`), also one line captions are left aligned with the additional margin. How do I have multiline captions with a fixed margin but one line captions centered? I may use the `subfig` package, if so, I want koma to handle the captions, therefore settings `caption=false`.


title: How to combine \ifdefstring (etoolbox) with \multicolumn

text: I need to make tabulars with either norwegian or english column heading above the numbers. I have defined a command, `\ReportLanguage`, that can be set to either of two values, "`no`" for norwegian, and "`en`" for english. This language choise command is then combined with the etoolbox function `\ifdefstring` to make a switch between norwegian and english header text above the tabular content. This language switch function is shown below:               \documentclass[10pt,a4paper,twosided]{article}     \usepackage{etoolbox}     \usepackage{booktabs}          \newcommand{\ReportLanguage}{en}     % two alternative values for \ReportLanguage:      % "no" for norwegian and "en" for english              \begin{document}          \begin{tabular}{ccc}               \ifdefstring{\ReportLanguage}{no}%                   {Dybde & temperatur & Salinitet  \\}                   {Depth & temperature  & Salinity  \\}                                                \midrule                     100 & 10 & 32 \\                     150 & 7  & 33 \\                                 180 & 4  & 35 \\                     \bottomrule         \end{tabular}         \end{document}      This works fine for either two values of the \ReportLanguage variable, and gives the following compiled result when \ReportLanguage is set to the value "en". ![enter image description here](http://i.stack.imgur.com/uGHV1.png) However, I would like to have a common heading above the two first headings, the "Depth" and "temperature" headings. I have tried to use the `\multicolumn` function inside the `\ifdefstring` language switch function, but I get an error message. The code looks as this:               \documentclass[10pt,a4paper,twosided]{article}     \usepackage{etoolbox}     \usepackage{booktabs}          \newcommand{\ReportLanguage}{no}     % two alternative values for \ReportLanguage:      % "no" for norwegian and "en" for english          \begin{document}     \begin{tabular}{ccc}           \ifdefstring{\ReportLanguage}{no}%               {\multicolumn{2}{c}{Utslippspunkt} & Salinitet  \\                         Dybde & temperatur                &             \\}               {\multicolumn{2}{c}{Release point}  & Salinity  \\                                            Depth & temperature                &            \\}                 \midrule                 100 & 10 & 32 \\                 150 & 7  & 33 \\                             180 & 4  & 35 \\                 \bottomrule     \end{tabular}     \end{document}      and the error message looks as this: ![enter image description here](http://i.stack.imgur.com/jJoPw.png) What is wrong with my code? I will appreciate help on this topic, thanks in advance!


title: Transparency vs image compression dilemma

text: I have a bunch of raster images that I want to include in a poster. For aesthetic reasons I want to replace the image background by a transparent one. So far, I have been grabbing the images I had adding an alpha (transparent) channel manually (for example with GIMP) and saving in PNG format. The images look great when included. However, each image is about 1MB large. Which is unacceptable since I want to include tens of images. If I save the file in JPG format I get a fifth of that size, about 200kB which is much more acceptable. The problem is that JPG doesn't support transparency and the background looks ugly. Since JPG and PNG seems to be the only raster formats that I can include (as far as I know), **I am in a dilemma, either have transparent backgrounds an generate a file 40M big or have white square backgrounds and have a 8M file.** This is for a poster so I would like to avoid changing the resolution of the images and the loosy compression used of JPG is very decent. In fact, I couldn't find a lossy format that also support transparency (correction: see footnote), let alone one that can also be included in with any TeX backend. But **I am wondering if I am missing something obvious or if there is a TeX-based solution around? (for example, like combining JPG and some mask in an intermediate PDF or something like that)** As an example I leave an image for which 1) it makes sense to have transparency (around) 2) can be loosely compressed (in fact the original is) 3) cannot be traced (vectorized) in any practical way (e.g. I want it to have the photographic feeling and certainly I don't want the vectorization to take more space than the JPG file) [quantitative info of this example picture: the original JPG is 80k, a poor vectorization (Inkscape) of the image is 200k, and PNG of this image is 600k] ![engine](http://i.stack.imgur.com/Xtjug.jpg) * * * Correction: There is actually at least one lossy format that supports transparency, it is called PGF (not the same as pgf/tikz) http://en.wikipedia.org/wiki/Progressive_Graphics_File But it seems that it is not supported by the TeX/PDF family. This can be very useful for beamer and posters. * * * **EDIT** : In order to summarize great @Jake's answer and comments there in, I put here a document with a `newcommand` defined to do all the steps. Creates the mask if necessary (assumes white-around background and a JPG original). (Needs `-shell-escape` and ImageMagick `convert`). Applied to the example image the resulting PDF is 103274 bytes only.               \documentclass{article}     \usepackage{pgf}          \newcommand{\includemaskedgraphics}[2][]{         \IfFileExists{#2-mask.png}{}{\immediate\write18{convert #2.jpg -alpha set -channel RGBA -fuzz 3\% -fill none -floodfill +0+0 white -channel RGBA -separate +channel -evaluate-sequence add -threshold 0 -colorspace GRAY -negate #2-mask.png}}         \pgfdeclaremask{themask}{#2-mask.png}         \pgfimage[#1, mask=themask]{#2.jpg}     }          \begin{document}     \pagecolor{cyan}          \begin{figure}\centering     \includemaskedgraphics[width=6cm]{image}% don't use extension     \caption{Vroom!}     \end{figure}          \end{document}


title: how to compose many pictures tightly in LaTex as follow

text: I want to compose some pictures as the example picture. All small pictures need to be ranked alignedly, and the subcaption of each row should be near to the pictures. ![1](http://i.stack.imgur.com/bVQeu.jpg)


title: Fontspec pb since update May 20th, 2013 on MiKTeX2.9 and Win7(32bit)

text: When I want to compile the file `fonspec-example.tex` with the latest version 2.3c of `fontspec`, I get an error (It didn't happen before): `fonspec.lua:45:attempt to call upvalue 'check_script' (a nil value)` error seems to come from line 45 in fontspec.lua: function fontspec.check_ot_script(fnt, script) Anybody knows how that can be solved? Thx.


title: Error in compilation

text: I tried to compile the following document but got an error.               \documentclass[10pt]{book}          \usepackage[utf8]{inputenc}     \usepackage[english]{babel}     \usepackage{blindtext}     \usepackage{siunitx}     \sisetup{output-decimal-marker = {,}}          \usepackage[a5paper]{geometry}     %\usepackage[a5paper, top=2in, bottom=1.5in, left=1in, right=1in]{geometry}     \usepackage{scrextend}     \changefontsizes{10.0pt}  % Change base font size          \usepackage{lettrine}     \usepackage{fancyhdr}          \usepackage{wasysym}     \pagestyle{fancy}     \fancyhf{} % clear all fields     \fancyhead[RO,LE]{\thepage}     \linespread{1.3}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{amsthm}     \newtheorem{thm}{Theorem}[section]     \newtheorem{lem}[thm]{Lemma}     \newtheorem{prop}[thm]{Proposition}          \begin{document}     \tableofcontents     \newpage          \section*{section}     demo     \end{document}                    ! LaTeX Error: Command \iint already defined.                    Or name \end... illegal, see p.192 of the manual.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.505 ...d{\iint}{\DOTSI\protect\MultiIntegral{2}}          ?       I'm I doing something wrong?


title: Fancy header on the first page is not the same on subsequent pages

text: > **Possible Duplicate:**   >  fancyhdr - anomalous behaviour on first page I'm using XeLaTeX (but I've confirmed the same issue in LaTeX), and I can't seem to get my fancy headers to work properly. The first header is always wrong in some way, but headers on any subsequent pages appear how I want them to appear. I believe it's because I'm using an image in the header, since it doesn't seem to be an issue without the image. My code:               \documentclass[12pt]{article}          \usepackage{fancyhdr}     \usepackage{graphicx}          \usepackage[margin=1cm]{geometry}     \setlength\parindent{0pt}          \pagestyle{fancy}          \fancyhf{}     \renewcommand{\headrulewidth}{0pt}     \renewcommand{\footrulewidth}{0pt}          \fancyhead[L]{     \includegraphics[scale=0.1]{test}     }          \begin{document}     test     \newpage     test     \end{document}      The header on the first page looks like this: ![first](http://i.stack.imgur.com/HaCzo.png) Whilst the header on the subsequent pages looks like this: ![second](http://i.stack.imgur.com/UJrgr.png) I don't mind which header I get, as long as I can alter the margins and it stays the same across all pages.


title: Draw a tree with variable node number

text: I would like to draw a tree in tex that is more like a sketch of a tree: It should contain variable node numbers. ![enter image description here](http://i.stack.imgur.com/KMJn7.png) Important is, that the dots are contained in the tree drawn. Is that possible with an automated command? You see, since my painting skills are limitated I don't want to use TikZ and simply add the nodes this tree contains. I would like to say: Here is my structure, draw it for me. All I found is drawing trees with complete defined nodes. **EDIT** Without any style definitions here is a minimal example of what I thought about:               \documentclass{standalone}          \usepackage{tikz}          \begin{document}     \tikzstyle{every node} = [rectangle,                     draw=black,                     fill=gray,                     text=black,                     text centered,                     rounded corners]              \begin{tikzpicture}         [sibling distance=8cm]              \node {Document}             child {                 [sibling distance=2cm]                 node (p1) {Paragraph}                 child {                     node (e11) {Element}                     child {                         node {AttributeSet}                     }                 }                 child {                     node (e1n) {Element}                     child {                         node {AttributeSet}                     }                 }                 child {                     node {AttributeSet}                 }             }             child {                 [sibling distance=2cm]                 [sibling distance=2cm]                 [sibling distance=2cm]                 node (pn) {Paragraph}                 child {                     node (en1) {Element}                     child {                         node {AttributeSet}                     }                 }                 child {                     node (enn) {Element}                     child {                         node {AttributeSet}                     }                 }                 child {                     node {AttributeSet}                 }             }         ;              \path[draw,dashed] (p1)--(pn);         \path[draw,dashed] (e11)--(e1n);         \path[draw,dashed] (en1)--(enn);     \end{tikzpicture}          \end{document}      I would prefer the dashed line to be just three/four dots. ![enter image description here](http://i.stack.imgur.com/go2WE.png)


title: How to change the page height on current page so as to include each section in one page?

text: I consider posting some materials as `.jpg` file on my blog which produced from a `.tex` document. This document includes lots of sections which is about 1500-2300 words. I need neither header nor page number. I can also accept the endnotes. I want each `.jpg` file corresponded with just a whole section, as shown by follow images. (The images were transformed from a `.pdf` file.) * * * page i (also section 1) ![enter image description here](http://i.stack.imgur.com/695LE.png) * * * page ii (also section 2) ![enter image description here](http://i.stack.imgur.com/8XxNj.png) * * * page iii (also section 3) ![enter image description here](http://i.stack.imgur.com/9Q0nc.png) * * * But, I failed on trying to change the page's height on each page. It is seem that the entire document could set only a fixed page size. I think maybe the requirement can be implemented by   1. On the beginning of every section, put a `\newpage` command.   2. Set a sufficient page height value (as we known, the page size of a `.tex` file can be several meter long).   3. Typeset the file, record (using some technique) the total length of `vbox` at the end of current page.   4. Use the record value to set a new page height.   5. typeset again, but just typeset the section I needed. Does above said describe a right way? Could someone tell me how to implement it automatically? Or is there a more convenient way to achieve the result? * * * EDIT: Hi Chris H, the `preview` package suppressed the setting of`\lineskiplimit` or/and `\lineskip`. Try the code below               documentclass{book}          \usepackage[          active, %if annotate the line obtain fig 1          tightpage]{preview}\setlength{\PreviewBorder}{9pt}          \begin{document}          \setlength{\lineskiplimit}{9pt}\setlength{\lineskip}{9pt}          \begin{preview}          \begin{flushleft}          \fbox{It attempt to compare nil with number}          \fbox{It attempt to compare nil with number}          \end{flushleft}          \end{preview}          \end{document}      obtain fig 2. fig 1 ![enter image description here](http://i.stack.imgur.com/zK8pn.png) fig 2 ![enter image description here](http://i.stack.imgur.com/f7ata.png) So, the substances in each section would be inappropriate.


title: How to use small caps black board bold font?

text: Based on this question I really expected the following to work:               \documentclass{memoir}     \usepackage{amssymb}          \begin{document}         $\mathbb{c,g,d,h,t}$     \end{document}      However, out comes something looking like this: ![enter image description here](http://i.stack.imgur.com/ZlCVi.png) I have also tried the `amsfonts` package with the same results. Clearly I have missed something, but what?


title: Use mathematical equation in caption with onlyamsmath

text: Apparently it seems to raise a warning »LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.« if I want to use a mathematical equation in a figure's caption and I use the onlyamsmath and the hyperref packages in the document's preamble as follows:               \documentclass{scrartcl}          \usepackage{amsmath}     \usepackage[all,error]{onlyamsmath}     \usepackage{hyperref}          \begin{document}          Reference~\ref{fig:foobar}.          \begin{figure}[htb!]       \caption{Foo Bar $f=2$}       \label{fig:foobar}     \end{figure}          \end{document}      I have currently no clue why this happens and what I should change ...


title: How to add the title of a page to the table of content?

text: I am trying to write my abstact which is obviously a part of my thesis. However, when I use               \chapter{Abstract}          <text of the abstract>      Its give me "Abstract" as the title of the page. But the required format in our school is to put the title of the thesis and then the "Abstract" word. So I used the follwoing code               \begin{center}        \textbf{Title)     } \\     \textbf{ABSTRACT}     \end{center}       This code works fine, but the Abstract page number will be removed from the table of content. Any help?!


title: Why graphics do not respect the end of line?

text: I see this all the time, inline graphics (in this case tikz picture) do not obey line breaks and flow like a word. In this example document, there are no forces new lines and the picture sticks out to the margin and beyond. (What you see is a screenshot from evince, you can see the margins in both sides. ![rebelpicture](http://i.stack.imgur.com/gJm3T.png) If this is the natural behavior, how can I make the graphics to not stick to the margins? MWE:               \documentclass[]{article}     \usepackage[]{pgfplots}     \begin{document}     aaaaaaaaaa aaaaaaaaaaaaaa aaaaaaaaaaaaa aaaaaaaaaaaa aaaaaaaa %     \begin{tikzpicture}     \begin{axis}     \end{axis}     \end{tikzpicture}      bbbbbbbbbb bbbbbbbbbbbb bbbbbbbbbb     \end{document}      > After posting the question I found possible duplicates: How can one make > LaTeX break lines between graphics correctly? and How to avoid using \sloppy > document-wide to fix overfull \hbox problems? . `\sloppy` seems to be a > partial answer, since it has to be selectively used around the problematic > paragraph, a general solution would be nice too.


title: how to decrease the size of a node and a label - tikz package

text: i trying to draw an automata using tikz package, and i want to decrease the size of node and labels on each edge , im have trying to put the option **[scale=0.5]** but it doesn't work ! I have :               \documentclass{article}      \usepackage{tikz}     \usetikzlibrary{arrows,positioning,automata,shadows,fit,shapes}                \begin{document}               \begin{tikzpicture}[shorten >=1pt, node distance=2.5cm, on grid, auto,thick,initial text=,scale=0.3]      \node[state, initial]            (0)                          {0};      \node[state]                     (1)   [above right =of 0]    {1};      \node[state]                     (2)   [right =of 0]          {2};      \node[state,accepting]           (3)   [right =of 2]          {3};                     \path[->]      (0)  edge       node           {a:a / 1.61}   (1)                  (0)  edge       node           {b:b/ 0.22}   (2)                  (2)  edge       [loop below]  node         {b:a/ 0.69}   ()                  (2)  edge       node           {b:a/ 0.69}   (3);           \end{tikzpicture}     \end{document}      this give me a not pretty picture : ![enter image description here](http://i.stack.imgur.com/wfZoL.jpg)


title: Can I redefine the dollar

text: I want to capture the math mode through a redefinition of the `$`. I thought about something like               \def$#1${here was a formula}     % to test     $x+y=z$      I would expect "here was a formula" as output. Is it possible ? **EDIT** : egreg's solution works for me :               \documentclass{article}      \catcode`\$=\active     \gdef$#1${Formula(\detokenize{#1})}     \begin{document}          voila le calcul $3+4=5$          \end{document}      But i would like also to redefine the double dollar `$$ ...$$`. If i define additionally :               \gdef$$#1$${centered-Formula(\detokenize{#1})}      then the following works :               voila un calcul centré $$x+y=z$$      but I can't use the single dollar anymore: `$3+4=5$` fails now to compile. Question : how can I have both `$...$` and `$$...$$` available ?


title: How to set bounding boxes of groupplots for aligning purposes?

text: How can I set the bounding box of a groupplot to the left and right outer axis of the subplots in the groupplot? In my MWE are three plots and I want to align the outer axis of the groupplots with the first plot in the example. The sum of the width of the groupplots is always \textwidth as the width of the bounding box of the first plot. ![](http://i.stack.imgur.com/kqoyw.jpg)               \documentclass{article}     \usepackage{pgfplots}     \usepgfplotslibrary{groupplots}               \begin{document}          \setlength{\fboxsep}{0pt}%     \fbox{     \begin{tikzpicture}     \begin{pgfinterruptboundingbox}          \begin{axis} [xlabel=x, ylabel=y, height=3.7cm,width=\textwidth]     \addplot {rnd};     \end{axis}          \end{pgfinterruptboundingbox}     \useasboundingbox     (current axis.below south west)     rectangle (current axis.above north east);     \end{tikzpicture}     }          \setlength{\fboxsep}{0pt}     \fbox{\begin{tikzpicture}     \begin{groupplot}[group style={group size=2 by 2,                   horizontal sep=0.02\textwidth, vertical     sep=0.02\textwidth,                   xticklabels at=edge bottom},                   height=3.7cm,width=0.49\textwidth]                 \nextgroupplot[xlabel=x, ylabel=y, ylabel near ticks]     \addplot {rnd};     \nextgroupplot[xlabel=x, ylabel=y,yticklabel pos=right, ylabel near ticks]     \addplot {rnd};     \nextgroupplot[xlabel=x, ylabel=y]     \addplot {rnd};     \nextgroupplot[xlabel=x, ylabel=y,yticklabel pos=right, ylabel near ticks]     \addplot {rnd};          \end{groupplot}     \end{tikzpicture}}          \setlength{\fboxsep}{0pt}     \fbox{\begin{tikzpicture}     \begin{groupplot}[group style={group size=3 by 2,                   horizontal sep=0.02\textwidth, vertical sep=0.02\textwidth,                   xticklabels at=edge bottom},                   height=3.7cm,width=0.32\textwidth]          \nextgroupplot[xlabel=x, ylabel=y, ylabel near ticks]     \addplot {rnd};                               \nextgroupplot[ytick=\empty]     \addplot {rnd};     \nextgroupplot[xlabel=x, ylabel=y,yticklabel pos=right, ylabel near ticks]     \addplot {rnd};     \nextgroupplot[xlabel=x, ylabel=y]     \addplot {rnd};     \nextgroupplot[ytick=\empty]     \addplot {rnd};     \nextgroupplot[xlabel=x, ylabel=y,yticklabel pos=right, ylabel near ticks]     \addplot {rnd};          \end{groupplot}     \end{tikzpicture}}          \end{document}


title: TikZ, tree, some childs without arrows

text: I wanted to create a tree structure and I'm almost done. Note that it is my first "project" with TikZ. My Problem: The childs of the first and part of the second level aren't connected with arrows. Can anyone help me? I don't see a difference compared to the particular last level.               \begin{tikzpicture}[->,>=stealth',     edge from parent/.style={thick,draw=black!70,-latex},     level 1/.style={sibling distance=8.5cm},     ,level distance =3.5cm,auto]          \tikzstyle{and}=[rectangle, rounded corners,thick,draw=black!75,top color=blue!10, bottom color=white,minimum size=5mm]     \tikzstyle{or}=[rectangle,rounded corners,thick,draw=black!75,top color=red!10, bottom color=white,minimum size=5mm]     \tikzstyle{terminal}=[rectangle, rounded corners, thick,draw=black!75, top color=green!5, bottom color=white,minimum size=5mm]     \tikzstyle{relation}=[rectangle,rounded corners,inner sep=2pt, thick,draw=black!75, fill=gray!20,minimum size=5mm, font =\scriptsize]          \tikzstyle{every node}=[font=\footnotesize]               \node[and]  {\begin{tabular}{l} 1 \\ 2 \\ 3\end{tabular}}       child { [sibling distance = 2cm] node [and] (appr) {\begin{tabular}{l} 1 \\ 2 \\ 3\end{tabular}}       child{ node [terminal] (car) {2} }       child{ node [relation] (rel) {\begin{tabular}{l} 1 \\ 2 \\ 3\end{tabular}}  }       child{ node [terminal] (zebra) {\begin{tabular}{l} 1 \\ 2 \\ 3\end{tabular}}  }  }        child { [sibling distance = 6cm] node [or] (obstacle)  {\begin{tabular}{l} 1 \\ 2 \\ 3\end{tabular}}     child{ [sibling distance = 2cm]  node [and] (ped_on_zebra) {\begin{tabular}{l} 1 \\ 2 \\ 3\end{tabular}}           child{ node [terminal] (ped) {1} }         child{ node [relation] (rel_1) {\begin{tabular}{l} 1 \\ 2 \\ 3\end{tabular}}  }         child{  node [terminal] (zebra_2) {\begin{tabular}{l} 1 \\ 2 \\ 3\end{tabular}}  }  }     child { [sibling distance = 2cm]  node [and] (dog_on_zebra)  {\begin{tabular}{l} 1 \\ 2 \\ 3\end{tabular}}            child{ node [terminal] (dog) {3} }         child{ node [relation] (rel_2) {\begin{tabular}{l} 1 \\ 2 \\ 3\end{tabular}}  }         child{ node [terminal] (zebra_1) {\begin{tabular}{l} 1 \\ 2 \\ 3\end{tabular}}  } }}       ;          %Draw Relations     \path [dashed,-]       (zebra) edge node [left] {} (rel)       (rel) edge node [right] {} (car)            (rel_1) edge node [left] {} (ped)       (rel_1) edge node [right] {} (zebra_2)            (rel_2) edge node [left] {} (dog)       (rel_2) edge node [right] {} (zebra_1);          %create legend     \node [relation] (terminal)at (7,-2) {};     \node [right=0.2cm of terminal] {= Relation};     \node [terminal] (terminal)at (7,-1) {};     \node [right=0.2cm of terminal] {= Terminal-Node};     \node [and] (and) at (7,0) {};     \node [right=0.2cm of and] {= And-Node};     \node [or] (or) at (7,1) {} ;     \node [right=0.2cm of or] {= Or-Node};          \end{tikzpicture}


title: Bib entry with urldate but no year uses the year of urldate as year

text: Hi i have the following bibliographic entry:               @misc{Wikipedia,     author = {Wikipedia},     title = {{Software performance testing}},     url = {http://en.wikipedia.org/wiki/Software\_performance\_testing\#Load\_testing},     urldate = {2013-07-10}     }      This entry gets rendered like the following in the bibliography: ![enter image description here](http://i.stack.imgur.com/hzmpP.png) if i add a `year` tag of 2012 to the entry, it becomes: ![enter image description here](http://i.stack.imgur.com/fNKZD.png) I think this is wrong, shouldn't i say something like (o.D. is a german abbreviation for no date, "Besucht am" is "visited at") > Wikipedia o.D. Software Performance testing. Besucht am 10.Juli 2013 ? How can i achieve this?


title: TOC does not appears with ox-beamer (no section, just frametitle)

text: I am using org-mode 8.2.5 with emacs 24.3.2. I want to compile a beamer presentation with ox-beamer. But there is no section/subsection, there is just frametitle in .tex. here is related part of `init.el`:               (require 'ox-latex)     (add-to-list 'org-latex-classes                  '("beamer"                    "\\documentclass\[presentation\]\{beamer\}"                    ("\\section\{%s\}" . "\\section*\{%s\}")                    ("\\subsection\{%s\}" . "\\subsection*\{%s\}")                    ("\\subsubsection\{%s\}" . "\\subsubsection*\{%s\}")))          (require 'ox-beamer)          (setq org-latex-pdf-process           '("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"             "pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"             "pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"))          (setq org-src-fontify-natively t)      If I use ox-latex it works but not pretty for beamer presentation. How to add this section/subsection for ox-beamer package (like ox-latex)


title: Split equation with each element being exactly below each other

text: I have an estimated equation with both coefficients and t-statistics. It's a multiline equation and would like to put the t-statistics right below the coefficient estimates Currently my code looks like this:               \begin{equation}\label{eq:test}     \begin{split}     EST =& 4.00 - 7.00BETA - 2.00SMB + 8.00HML + 3.00MOM + 1.00SMBU - \\       & (8.00)  (-2.20) (-1.60) (9.00) (3.00) (1.00) \\       & 1.00TERMR - 1.00SMBH +  1.00SMBL +  0.00SMBK -  1.30HMLR.\\       & (-1.11) (1.53) (6.81) (2.14) (-1.85)     \end{split}     \end{equation}      So the 4.00 in the first line should be right above the (8.00) from the line below. The 7.00 in the first line should be exactly above the (-2.20). The 2.00 in the first line should be right above the (-1.60) and so on for the other coefficient and t-statistics, respectively. It should look like equation (1) from the Fama/French (1993) paper for those of you who are into finance: ![enter image description here](http://i.stack.imgur.com/j6zUW.png)


title: Mimicking (*office) CV-layout in TeX

text: To me (who considers himself a TeX-beginner for a long while to come) it seems like quite a mountain to climb, with much guessworking required, to convert this CV template into a (reasonably close, or better) TeX equivalent: ![enter image description here](http://i.stack.imgur.com/Oj8dI.png) My guess is that http://en.wikibooks.org/wiki/LaTeX/Boxes might come in handy, and/or knowledge of tables. Would much appreciate some ideas, maybe it's a piece of cake for the TeX-gurus out there?


title: How to write LaTeX as title in acm format?

text: I wrote Latex as `\LaTeX` to properly make the right output on the title part using `acm_proc_article-sp` document class. But as I wrote that way, it prints a very small letter 'A' of the LATEX word. ![enter image description here](http://i.stack.imgur.com/BUNtM.png) I think it wasn't right for the 'A' gets anussual result. Are there any solutions for this?


title: MiKTeX "default papersize" setting

text: Now MiKTeX has the following setting: ![enter image description here](http://i.stack.imgur.com/2XyWn.png) I have it set to A4 (A4size) all the time. But I don't really understand what this setting is supposed to do. When I compile               \documentclass{book}     %\usepackage{fullpage}     \begin{document}     Hello World!     \end{document}      I get an A4 document, however uncommenting the `fullpage` package changes it to lettersize. The package documentation says that it needs the appropriate documentclass option, but I thought that is passed to the class by the MiKTeX default setting. So what exactly does that setting do? Also, why are there two options for Letter, A4 and A6?


title: \pause doesn't work in beamer

text: Good evening, I encounter problems with the `\pause` command in `beamer`. There is not any pause that work in the pdf resulting file and I do not understand why. If any could help me, thanks. Here is my code.               \documentclass[handout]{beamer}% [handout] supprime la barre de navigation en bas à droite.          \usepackage[french]{babel}     \usepackage[T1]{fontenc}     \usepackage[latin1]{inputenc}     \usepackage{graphicx}     %\usepackage{mathtools}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{listings}     \usepackage{soul}     \usepackage{algorithm}     \usepackage{algorithmic}     \usepackage{tikz}     \usetikzlibrary{matrix}     \usepackage{bbm}     \usepackage{amsthm}          \usetheme{Warsaw}          \title{Paramertic free form shape optimization for electromagnetism problem}     \author{Pierre Bonnelie}     \institute{Université de Limoges}     \date{June, 10th 2013}          % Sommaire automatique     \AtBeginSection[]     {       \begin{frame}       \frametitle{Sommaire}       \tableofcontents[currentsection, hideothersubsections, pausesubsections]       \end{frame}      }          \begin{document}          %\beamerdefaultoverlayspecification{<+->} % Pause entre chaque \item de itemize.              % Page de titre         \begin{frame}           \maketitle         \end{frame}              % Sommaire         \begin{frame}           \tableofcontents         \end{frame}              \section{Optimal trajectoy problem}              \begin{frame}           \begin{itemize}             \item ahaha               \pause             \item aaahhaha           \end{itemize}           \end{frame}                     \begin{frame}             Voici ma première idée, je cause, je cause...             \pause             Voici la deuxième idée que j'affiche              quand     je suis prête à en causer.             \pause             Voici la troisième idée après réflexion.           \end{frame}              \begin{frame}           \frametitle{Optimal trajectory problem}                 \begin{itemize}             \item test 1               \pause             \item Vector field               $$\begin{array}{ccccc}                    v & : & \mathbb{R} \times \mathbb{R}^2 & \to & T\mathbb{R}^2\\                    \end{array}$$               \pause               \item Objective function                 $$\begin{array}{ccccc}                      F & : & \mathcal{B}_{N,D} \times \mathcal{C}(\mathbb{R}^2,T\mathbb{R}^2) & \to & \mathbb{R}_+ \\                        &   &     (\gamma,v)  & \mapsto & F(\gamma,v)\\               \end{array}$$                 \pause                 \item Minimization problem                   \[ min ... \]           \end{itemize}         \end{frame}              \begin{frame}           \frametitle{Un exemple de titre}           \framesubtitle{avec un exemple de sous-titre}           Enfin, le texte ! :)         \end{frame}              \section{Shape optimization problem}     \end{document}      I compile with pdflatex `file.tex` but all the pauses does not work at all. Thank you.


title: pgfplots: strange opacity in surf plot

text: I do have the following code to get a surf plot which gives me for some reason the 'backside' of the plot with full opacity. How can I change this behavior? Actually, I think this feature is very nice, but I'd like to control it, if possible. So question nr 1 would be: How to get rid of this and get the 'normal' behavior? nr 2: How can I control (change the opacity etc) the behavior of the 'backside'?               \documentclass{standalone}     \usepackage{pgfplots,tikz}     \begin{document}     \begin{tikzpicture}     \begin{axis}[%     width=\linewidth,     height=0.9\linewidth,     view={-142}{40},     %scale only axis,     xmin=0,     xmax=0.5,     xtick={0,0.1,0.2,0.3,0.4,0.5},     xmajorgrids,     ymin=0,     ymax=30,     ytick={0,10,20,30},     ymajorgrids,     zmin=0,     zmax=1,     ztick={0,0.2,0.4,0.6,0.8,1},     zmajorgrids     ]     \addplot3[%     surf,     %opacity=0.3,fill opacity=0.8,     shader=faceted,     draw=black,     colormap/jet,     mesh/rows=51     ]     table[row sep=crcr,header=false] {data.txt};     \end{axis}     \end{tikzpicture}%     \end{document}      Since the data file is quite large, I uploaded it here: http://pastebin.com/qXmpY6W5 ![enter image description here](http://i.stack.imgur.com/vNBUV.png) Edit: Here is a MATLAB figure of the _same_ data but from a different angle to show how it actually looks like. ![enter image description here](http://i.stack.imgur.com/radcC.png)


title: Plot and non-numerical labels with PGFPlots

text: Given some data (from a file), I would like to use the first two columns as coordinates, and the last column as label for every point.               x    y   label     123  5.2 name      I use the table command to read the first two columns as data:               \begin{tikzpicture}         \begin{axis}             \addplot+[only marks,x=x, y=y, ] table {Data.dat};         \end{axis}     \end{tikzpicture}      The data of the second column should appear above each scatter point as simple text. A promising option seems to be the option nodes near coords, but I don't see how I can use the data from the file and combine it with that. This question is similar to this post, where they had numerical values in the last column.


title: How to install our own template on TeXnicCenter?

text: I am lazy to type the following               \documentclass[pstricks,border=12pt]{standalone}     \usepackage{pst-eucl}     \begin{document}     \begin{pspicture}[showgrid=bottom](6,6)          \end{pspicture}     \end{document}      every time I want to start drawing with PSTricks. I am using TeXnicCenter and it provides its own templates. Shortly speaking, can I install my own templates such that they are available from TeXnicCenter?


title: How to make multicolumn width the total of the declared width of each column?

text: For example I have this table:               \begin{longtable}[c]{ p{1.0in} p{1.5in} p{2.0in} p{2.5in} }        \multicolumn{3}{l}{ Partner } & \hfill Total \\      \end{longtable}      But the result is that the 'Partner' part will adjust depending on the length of the partner name. The total width should be fixed to 4.5 inches(1.0 + 1.5 + 2.0).


title: Bold Chapter Name

text: I can make the chapter name bold by using `\textbf{...}` in the text file like:               \chapter{\textbf{Scholastic Forest Management Planning and Forest Zoning}}      But I want to make the text "Chapter 1" bold as well. ![enter image description here](http://i.stack.imgur.com/ZmFSN.jpg) In order to achieve the above, here is the class that I used/created               % Chapter title formatting     \newcommand*{\chaptertitleformatone}{ % main-matter and appendices       \titleformat{\chapter}[display]               {\normalfont\LARGE\normalfont}              % {\titleline{\leaders\hrule height 1pt\hfill}                   {\titleline{}             \vspace{5pt}             \titleline{}             \vspace{1pt}             \LARGE\MakeUppercase{\chaptername} \thechapter}               {1pc}               {\titleline{}             \vspace{0.5pc}             \LARGE}


title: permission deny

text: This is what I write:               \documentclass [a4paper, 12pt] {article}     \usepackage {amsmath}     \usepackage {mathptmx}     \usepackage[12pt] {moresize}     \begin{document}          \section{2.7 Derivatives}          The \emph{derivative of a function f at a number a}     \[     f'(a) = \lim_{h \to 0}\frac{f(a + h) - f(a)}{h}      \]     \\* if we write x = a + h, then h = x - a     \\*and h approaches 0 if and only if x approaches a          \[     f'(a) = \lim_{h \to 0}\frac{f(x) - f(a)}{x - a}      \]          \section{2.8 Derivative as a Function}          \\*{\ssmall p154 The tangent at A, B is horizontal, so the deriavative is 0 and the graph o f f' cross the x-axis at the poins at A', B'}     \\* if f'(a) exists     \\* f is differentiable at a, it's differentiable on at every number in the interval}          \end {document}      but it comes out like this               \texify.exe: Permission denied: calculus 2.7.log     texify.exe: Data: calculus 2.7.log      did I write anything wrong?


title: Eliminate overfull hbox warning for mdframed frame that goes into margin

text: I like my `mdframed` frames to go into the margin, so that the text is not effected, by using a negative `leftmargin` and `rightmargin`. However this results in an > Overfull \hbox (0.43031pt too wide) in paragraph at lines 16--16 I don't want to eliminate _all_ overfull box warnings as I still want to know if there are issues with the text. So, how do I eliminate this warning just for the frame, but not for the text? ## References:   * What does "overfull hbox" mean?   * How to suppress overfull hbox warnings up to some maximum? ## Code:               \documentclass{article}     \usepackage{showframe}     \usepackage{lipsum}     \usepackage{mdframed}          \mdfdefinestyle{MyStyle}{%         leftmargin=-5pt,         rightmargin=-5pt,         backgroundcolor=yellow!25,     }%          \begin{document}     \begin{mdframed}[style=MyStyle]         \noindent\lipsum[1]     \end{mdframed}     \end{document}


title: LaTeXing (ST3) and zotero: unable to load remote.bib from folder/tag

text: I am using `LaTeXing` for Sublime Text 3. Before buying it I wanted to validate that it's compatible with my "workflow". As a feature `LaTeXing` supports the integration of zotero, a citation management tool. To set it up I followed the documentation on the homepage. Sadly `LaTeXing` is unable to import _references ordered by a folder_ or _references ordered by tag_. My sublime log outputs > [Accessing Zotero.com] and that's it. Only the import of all references works more or less (some recently added papers are missing). Anyone having similar effects?


title: XyPic does not accept targets

text: I am trying to typeset an arrow between the middle points of two other arrows. I thought the more canonical choice would have been to give a target to the labels of the two arrows and then draw an arrow between these targets, like               \xymatrix{A\ar[r]^{a}="a" & B\ar[r]^{b}="b" &C \ar@{->}@/_1pc/"a";"b"}       But all I get is an arrow leaving from C to my label a, and then TeX typeset ;"b", completely ignoring that the semicolon was there to tell it that the arrow should have left from target "b", namely my label b.


title: Change the forms of curves to distinguish between them

text: If we assume 2 curves in the same figure. So to distinguish between them, we set a different colors for them. However, can we change the form not the color ? In other words, if we assume that we have 5 curves, and to distinguish between them, we set a specific form for each of them. Any help? By the way, you can read the code below (taken from this link).               \documentclass{article}     \usepackage{tikz,pgfplots}          \begin{document}        \begin{tikzpicture}             \begin{axis}[%                 axis x line=bottom,                 axis y line=left,                 xlabel=$X$,                 ylabel=$Y$,                 legend pos= south east]                 \addplot[mark=none,blue,thick] coordinates {(0.1, 0.003) (0.5, 0.005) (2, 0.4) (5, 1)};                 \addplot[mark=none,red,thick] coordinates {(0.1, 0.2) (0.5, 0.5) (2, 0.1) (5, 1.4)};                 \legend{$Y_1$,$Y_2$};             \end{axis}         \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/hvg5D.png)


title: Hebrew in Lyx with Ubuntu 13.10

text: Im trying to confing my Lyx to render Hebrew but I dont manage. I have a fresh installation of Ubuntu 13.10, Lyx 2.0.6. I followed these common instructions , downloaded and installed the latest version of culmus (culmus- latex_0.7-1_all_fixed) as required but got warnings from the software centre: > The package is of bad quality and in details some of this type > E: culmus-latex: control-file-has-bad-owner postrm itai/itai != root/root And alot of this type > E: culmus-latex: wrong-file-owner-uid-or-gid etc/ 1000/1000 " I tried the > ignoring and installing anyway, but the lyx still wasnt showing hebrew. I > tried also installing "culmus-latex-0.7-r1.tar.gz" (which i managed to > install without errors) I also installed "TrueType and Type1 Hebrew Fonts > for X11" from the software centre. Normally after configuring the setting and preferences the system language remains English but when typing in Lyx the Hebrew letters appear but now i cant get it to work.   * I remember there is a need to change the cua file in Tools -> Preferences -> Edit -> shortcuts into a special hebrew cua bind file and then be able to set F10 to switch the Hebrew and English (which one of them appears with an underline), but I did no such thing. at this moment F10 only switches the direction of the typing - RTL\LTR   * When I try to render an empty document to PDF after applying those changes I get the error: "LaTeX Error: File `cp1255.def' not found" where cp1255 is of course the Hebrew encoding i chose in the document settings. This is all the information I have Thank you for all the help.


title: Add the word "Algorithm" before each entry in the List of Algorithms

text: I'm trying to add the word "Algorithm" before each entry in the List of Algorithms (because of unavoidable thesis guidelines). I saw similar questions but the solutions listed there don't work for me. I'm not sure about reopening those questions, hence posting it separately. Apologize if that's not the right etiquette. Is it possible to change the way a list of algorithms is generated to include the word "Algorithm" before each element in the list? (I'm using "algorithm" package instead of "algorithm2e") Add algorithm label to list of algorithms (not sure if solutions listed there require other packages as listed solutions don't work for me) Current output:               List of Algorithms     1 Optimization . . . . . . . . 3      Desired output:               List of Algorithms     Algorithm 1 Optimization . . . . . . . . 3      Here's a simplified code sample that illustrates the issue. Your help is much appreciated. Please let me know how to get desired behavior for this sample.               \documentclass[letter,10pt]{book}                                                                                \usepackage[utf8x]{inputenc}          \usepackage[breaklinks]{hyperref}     \usepackage{algorithm}     \usepackage{algorithmic}          \title{Sample book}     \begin{document}     \listofalgorithms          \chapter{Sample}     % Outline     \begin{algorithm}[!hbt]         \centering         \caption{Optimization}\label{alg:pso}         \begin{algorithmic}[1]             \STATE \textit{GenerateInitialPopulation}(pop)             \FOR {particle $ \leftarrow $ 1 \textit{to} numParticles}               \STATE \textit{Evaluate}(particle)             \ENDFOR         \end{algorithmic}     \end{algorithm}          \end{document}


title: How to use `\mathrm` with capital greek letter and `newtx` package?

text: I have macros that use `\mathrm`. However, if the argument is a capital greek letter, `newtx` package changes the outcome to a math symbol in `T1` encoding. I do not expect `\mathrm` to do anything on capital greeks but only pass through. Is there any way to get this result from `newtx` package?               \documentclass{report}     \usepackage[T1]{fontenc}     \usepackage{newtxmath}          \begin{document}         I want $\mathrm{\Gamma}$ to be same as $\Gamma$.     \end{document}


title: path for chinese font with ConTeXt

text: I already use ConTeXt for maths and am fully satisfied, but now I need to write a document with text in chinese. I've read the different PDFs (mchinese.pdf and Uptodate) available here and I visited various forums and tried the following 'hello world' script               \enableregime[utf]     \usemodule[chi-00]     \starttext       你好！     \stoptext      I also tried this one which sounds good for my use:               \setscript[hanzi]     \starttypescript [serif] [stfangsong]           \definefontsynonym [Serif] [name:stfangsong][features=chinese]     \stoptypescript     \starttypescript [stfangsong]           \definetypeface [stfangsong] [rm] [serif] [stfangsong] [default]     \stoptypescript     \setuppagenumber [numberconversion=cn]     \definestructureconversionset [chinese] [numbers] [cn]     \setupheads [sectionconversionset=chinese]     \define[2]\ChineseChapter       {第#1章 #2}     \setuphead [chapter] [command=\ChineseChapter]     \setupbodyfont [stfangsong,12pt]     \mainlanguage[cn]     \setuppagenumbering[state=start]     \starttext     \startchapter[title={你好}]     你好！     \stopchapter     \completecontent[criterium=all]     \stoptext      But while compiling, well, both send me a blank pdf... I guess I have a problem with the fonts path. Working on Ubuntu I have Adobe CNS1, Adobe GB1, ttf-wqyzenhei, various arphic and cwTex fonts installed, but I don't know how to call them properly. They are located in               /usr/share/texmf/fonts/ ( sometimes further in this dir for ex /usr/share/texmf/fonts/type1/arphic/bkaiu)      Following http://wiki.contextgarden.net/Ubuntu, I tried typing                export OSFONTDIR=~/.fonts:/usr/share/fonts:/usr/share/texmf/fonts/opentype/:/opt/libreoffice/basis3.3/share/fonts/       mtxrun --script fonts --reload       mtxrun --script fonts --list --all --pattern=*       context --reload      as said in the page but despite no error, it doesn't change anything (is there a specific directory in which i should type this?) I also read things about `.ttf`, `.pfb` (the format my fonts are installed in), and `.map`. I'm not sure if I even have `.map` file associated to my fonts and I did not understand how it works. My last idea is that I don't use the proper name to call the fonts. For example, I'm not sure wheather 'stfangsong' is a name that calls a chinese font on my machine. I actually didn't find how ConTeXt understands font names in general.


title: Why does the latex command sometimes produces PDF output?

text: I have noticed that on some .tex files (making use of the graphicx and hyperref packages and PDF image files), the `latex` command produces PDF files instead of the expected DVI. How and when does this happen? In case this matters, I'm using TeXLive 2012.20120611-3~ubuntu12.04.1 on Ubuntu 12.04 (from PPA):               $ latex     This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012/Debian)     restricted \write18 enabled.


title: Creating paragraphs with automatic width

text: I've got a bunch of paragraphs that I'm manually "tabbing out" using `hspace` of varying degree. After the varying amount of `hspace`, I'm trying to make a paragraph that fills the remaining width available on the page. Unfortunately, `parbox` requires a finite width to be passed to it, which isn't known unless I calculate it manually for each paragraph. Is there an easier way to do this?               \documentclass{article}     \begin{document}     \hspace{2in}     \parbox{\linewidth}{I have a whole bunch of text here and it will extend past the edge of the page even though I'd like it to break before the page ends and act like a normal paragraph.}     \end{document}      ![Result](http://i.stack.imgur.com/TbXfR.png) **UPDATE** I'm getting very close, but when I try to add my manually-numbered paragraphs, the right margin gets messed up again. Here's an example. If I try to use `adjustwidth` again, it creates a line break after the section number which I don't want.               \documentclass{article}     \usepackage{changepage}     \begin{document}     \begin{adjustwidth}{2.5cm}{}     \parbox{\linewidth}{This paragraph runs to the proper end of the page. It will have a fair bit of space at the end, unlike the next paragraph which will overshoot it because of the makebox that's put in front of it.}     \makebox[2em]{1.1}\parbox[t]{\linewidth}{I have a whole bunch of text here and it will extend past the edge of the page even though I'd like it to break before the page ends and act like a normal paragraph.}     \end{adjustwidth}     \end{document}      ![Second result](http://i.stack.imgur.com/F3cSF.png)


title: dot2tex conversion failing

text: I'm having some trouble using the dot2texi package. I'm using the Sublime Text 2 editor to compile my LaTeX files, and I have LaTeXTools installed. I'm running this on Mac OSX, Mountain Lion. The problem is simply that the dot conversion to tex is failing. I have all necessary packages installed, and if I manually run dot2tex from command line, it produces the figure all well and fine. So I'm guessing this is some problem from the Sublime end? I did a debug log output, and here's the relevant snippet from the log:               \openout3 = `test_latex-dot2tex-fig1.dot'.          Opening dot2tex stream test_latex-dot2tex-fig1.dot     runsystem(dot2tex --figonly -ftikz     --debug --prog=neato -tmath  -o test_lat     ex-dot2tex-fig1.tex  test_latex-dot2tex-fig1.dot)...executed.          Package dot2texi Warning: Conversion of test_latex-dot2tex-fig1.dot failed..          Package dot2texi Warning: Please convert test_latex-dot2tex-fig1.dot manually.      The LaTeX code I'm trying to compile is the simple example from the tutorial:               \documentclass{article}     \usepackage[debug]{dot2texi}     \usepackage{tikz}     \usetikzlibrary{shapes,arrows}     \begin{document}     \begin{dot2tex}[neato,mathmode]     digraph G {     node [shape="circle"];     a_1 -> a_2 -> a_3 -> a_4 -> a_1;     }     \end{dot2tex}     \end{document}      Earlier, I had enabled -shell-escape in my LaTeXTools build file, and debugged some _nocomma error out from running dot2tex (Python related). After all those issues were resolved, I could compile dot files from command line using dot2tex without any issues. I can't figure out why it fails in Sublime Text 2 and would like to resolve this for ease-of-use purposes. Any help would be greatly appreciated! Thanks! P.S. I have an inkling it might be something to do with the command being run from the wrong directory, so it can't find the dot file... I have no idea how to confirm that or fix it.


title: Square root in fraction space problem

text: I'm having some troubles with the square root symbol within a fraction. This code               \documentclass{book}          \begin{document}     \begin{equation}     h_4 = \frac{\sqrt{1.5 \gamma_4 -3.5}-1}{18}      \end{equation}     \begin{equation}     h_3 = \frac{\gamma_3}{4+ \sqrt{6\gamma_4-14}}     \end{equation}     \end{document}      returns this ![square root within a fraction](http://i.stack.imgur.com/hnN43.png) Now, is it just me, or the horizontal line of the square root is really close both to the numbers below it and to the fraction line above it? I find this a little clumsy. Is there a solution? Or this is just my paranoia? :P Thank you very much


title: Managing checkbox representation

text: I tried to create a checkbox, analogous to Creating Boxed Check Mark This woks correctly:               \documentclass{article}     \usepackage{amssymb}     \begin{document}     \makebox[0pt][l]{$\square$}\raisebox{.15ex}{\hspace{0.1em}$\checkmark$}     \end{document}      ![enter image description here](http://i.stack.imgur.com/UeNnY.png) But when I tried to use a cross symbol instead of checkmark, it is shifted to the bottom:               \documentclass{article}     \usepackage{amssymb}     \begin{document}     \makebox[0pt][l]{$\square$}{$\times$}     \end{document}      ![enter image description here](http://i.stack.imgur.com/Do6G8.png)   1. How to vertically center the cross symbol?   2. How to change the size of the box and internal symbol, making them bigger / smaller?


title: Joining parts of equations with lines or arrows

text: I need to add lines or arrows to show the expansion of possibilities as a problem space expand. For example I'm attempting to produce something like this (with the lines added by hand): ![equation lines sample](http://i.stack.imgur.com/bgTOU.png) I can find examples for adding arrows over the top of an equation How to draw arrows between parts of an equation to show the Math Distributive Property (Multiplication)? and I've started by creating the layout I want using an align block (shown below) and I'm trying to join the sections with arrows as shown in the linked question but I've yet to produce anything useful.               \begin{align*}     &&&&(1, 1, 0, 0)&\\     &&(1, 0, 0, 0)&&(1,0,1,0)&\\     0&&(0, 1, 0, 0)&&(1,0,0,1)&\\     &&(0, 0, 1, 0)&&&\\     &&(0, 0, 0, 1)&&&     \end{align*}         This feels somewhat crude, can anybody help me complete what I started or suggest a more elegant way (perhaps using a table to store the options and then linking the cells)?


title: No \xrightrightarrow[a]{b}?

text: It seems that the commands `\xrightarrow`, etc. in mathtools package don't allow me to put text above or below two arrows (`\rightrightarrows`). Is there any way to do this with extensible arrows? A crude way would be               \overset{b}{\underset{a}{\rightrightarrows}}      but the arrows are not extensible. For that matter, it also doesn't support `\twoheadrightarrow`, etc.


title: Using Open Sans font with LaTeX: Alphabetic chars right, numeric chars wrong

text: I've downloaded the Open Sans font from CTAN for use in MiKTeX on Windows (using pdfLaTeX). After the download, I just copied all the files into the MiKTeX root directory (= texmf). As described here, I used the following commands to set up Open Sans for the document:               \usepackage[default,osfigures,scale=0.95]{opensans}     \usepackage[T1]{fontenc}      But when I compile the document to PDF, the result looks strange. For alphabetic chars, it seems to be okay, but for numeric chars, it seems that LaTeX uses some other font, right? These numeric chars are obviously not the Open Sans chars. They are not all on the same level, instead some are lower and some are higher. Why is A-Z shown correctly and 0-9 not? **Document with standard font:** ![enter image description here](http://i.stack.imgur.com/C8Yaq.png) **THE PROBLEM: Document with Open Sans (commands above):** ![enter image description here](http://i.stack.imgur.com/B47FY.png) **Open Sans specimen from Google Fonts:** ![enter image description here](http://i.stack.imgur.com/wCnxL.png) What did I do wrong? Here is the full document source:               \documentclass[a4paper,ngerman,11pt]{article}     \usepackage[ngerman]{babel}     \usepackage[utf8]{inputenc}     \usepackage{setspace}     \onehalfspacing     \usepackage[default,osfigures,scale=0.95]{opensans}     \usepackage[T1]{fontenc}     \usepackage{changepage}     \usepackage[hyphens]{url}     \usepackage[breaklinks]{hyperref}     \hypersetup{colorlinks=false}     \begin{document}     \begin{center}     {\Large \textbf{abc 1234567}\\ abc 1234567}     \end{center}     \end{document}      A short excerpt from the log file:               (C:\Users\John\AppData\Roaming\MiKTeX\2.9\tex\latex\opensans\opensans.sty     Package: opensans 2011/11/11 Opensans          (C:\Users\John\AppData\Roaming\MiKTeX\2.9\tex\latex\opensans\t1fosj.fd     File: t1fosj.fd 2011/11/11 Fontinst v1.927 font definitions for T1/fosj.     )     LaTeX Font Info:    Font shape `T1/fosj/m/n' will be     (Font)              scaled to size 10.40245pt on input line 12.     \AtBeginShipoutBox=\box26     Package hyperref Info: Link coloring OFF on input line 12.          {C:/Users/John/AppData/Roaming/MiKTeX/2.9/fonts/enc/dvips/opensans/opensans-     04.enc}{C:/Users/John/AppData/Roaming/MiKTeX/2.9/fonts/enc/dvips/opensans/open     sans-01.enc}<C:/Users/John/AppData/Roaming/MiKTeX/2.9/fonts/type1/public/opens     ans/OpenSans-Bold.pfb><C:/Users/John/AppData/Roaming/MiKTeX/2.9/fonts/type1/pu     blic/opensans/OpenSans-Regular.pfb>


title: Making arrow heads smaller using "arrowsnew"

text: I want to make the arrowheads smaller on the `$\delta v_A$` arrow and on the `[<->]` arrows. I made the file from this post Is it possible to change the size of an arrowhead in TikZ/PGF? but it didn't work. I added `\input{arrowsnew}` to the preamble and everything. So, how can I make the arrow heads smaller?               \documentclass[11pt]{article}     \usepackage{tikz, tikz-qtree, pgfplots}     \pgfplotsset{compat=1.7}      \usetikzlibrary{arrows, decorations.markings, calc, fadings, decorations.pathreplacing, patterns, decorations.pathmorphing, positioning}          \begin{document}          \begin{tikzpicture}[line join = round, line cap = round, >=triangle 45]       \draw[dashdotted] (3.5,0) -- (-5,0);         \filldraw[top color = green!75!blue, bottom color = blue!40!green] (0,0) circle (.15cm);           \begin{scope}[decoration = {markings, mark = at position 0.265 with {\arrow{>}},} ]             \draw[postaction = decorate] (0,0) circle (1cm);             \node[draw, circle, fill = white, inner sep = .08cm, scale = .75]             at (-.173648,-.984808) {1};             \filldraw[black] (1,0) circle (.05cm);             \draw[->] (1.2,-.25) -- (1.2,.5) node[above, scale = .75] {$\Delta v_A$};             \draw[<->] (-.106066,.106066) -- (-.707107,.707107);           \end{scope}         \end{tikzpicture}     \end{document}


title: Disappearing Lines?

text: I have a strange (and serious) problem. For some reason, text that is showing up in the pdf of my file (I'm using TeXworks) ... is no longer showing up in the file itself. And when I go to the line where it should be, the program crashes. Clicking above and below those lines clearly shows that lines are just missing (as in, it goes from line 300 to 400 over a difference of 10 lines). Any ideas?


title: Cannot produce document with xcookybooky

text: I am trying to create my own cookbook, using package `xcookybooky`. My code is               \documentclass{article}          \usepackage{tikz} % for creating the lines for the hint     \usepackage{graphicx}     \usepackage{xcolor}     %\usepackage[clock, misc, weather]{ifsym} % Symbolpackage e.g. \Interval, \Wecker etc     \usepackage{cookingsymbols} % Cookings symbols e.g. \Oven, \Dish etc     \usepackage{emerald} % Handwritten Fonts     \usepackage{wrapfig} % To wrap the tabular with the ingredients     \usepackage{ifthen}     \usepackage{xkeyval}     \usepackage{lettrine} % numbering the preparation steps     \usepackage{fancyhdr}     \usepackage{units}     \usepackage{eso-pic} % for background pictures     \usepackage{picture} % for modfifying the position of the bg pictures     \usepackage{tabularx} % line breaks in tabular     \usepackage{xcookybooky}          \begin{document}     \begin{recipe}             [     preparationtime = 30 min,     bakingtime = 1 hour,     bakingtemperature = \unit[225]{C},     portion = 4 portions,     calory = 4 kj,     source = My neighbour Sarah     ]{Currywurst}             \graph{     small = strawberry,     smallpicturewidth = 0.3\textwidth,     big = strawberrycake,     bigpicturewidth = 0.6\textwidth,     }     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \ingredients{     2 Tafeln & dunkle Schokolade (über \unit[70]{\%})\\     3 & Eier\\     \unit[200]{ml} & Sahne\\     \unit[40]{g} & Zucker\\     \unit[50]{g} & Butter     }     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \preparation{     \step This is the first step for cooking a brilliant meal.     \step The second step follows...     \step and so on     \step Enjoy your meal!     }     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \setRecipeLengths{     preparationwidth = 0.60\textwidth,     ingredientswidth = 0.35\textwidth,     pictureheight = 6cm,     bigpicturewidth = 0.6\textwidth,     smallpicturewidth = 0.35\textwidth     }     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \setRecipeSizes{     recipename = \fontsize{25pt}{30pt},     ing = \normalsize,     inghead = \normalsize,     prep = \normalsize,     prephead = \normalsize,     hint = \normalsize,     hinthead = \Large     }     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \setRecipenameFont{     %pbsi     %fau     %fwb     %fjd % default when using the option handwritten     cmr % default     }{T1}{m}{n}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \setHeadlines{     inghead = Ingredients,     prephead = Preparation,     hinthead = Hint,     calory = energy content,     continuationhead = Continuation,     continuationfoot = Continuation on next page     }     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \setBackgroundPicture     [%     x = 2cm,     y = -1cm,     width=\paperwidth-3cm,     height,     orientation=pagecenter     ]{pic/bg_transparent} % filepath     \end{recipe}     \end{document}      When I compile it I get 4 errors and no produced output. The following code lines, are from the log.               LaTeX Font Info:    Try loading font information for T1+ cmr  on input line 95.     (C:\Users\thanos\AppData\Roaming\MiKTeX\2.9\tex\generic\tex-ewd\t1.tex     ! Undefined control sequence.     l.5 \headline                  {\bf \title}     The control sequence at the end of the top line     of your error message was never \def'ed. If you have     misspelled it (e.g., `\hobx'), type `I' and the correct     spelling (e.g., `I\hbox'). Otherwise just continue,     and I'll forget about whatever was undefined.          ! I can't find file `dotnot{'.     <to be read again>                         protect      l.5 \headline{\bf                       \title}     Please type another input file name     ! Emergency stop.     <to be read again>                         protect      l.5 \headline{\bf                       \title}     *** (job aborted, file error in nonstop mode)      I see that there is something going on with `T1` fonts but I don't know what. If I remove the relevant line from the document, the errors are 104... There is also an error that has to do with `dotnot` but the package `cookingsymbols` seems to be working fine. Any ideas on what might be wrong?


title: Biblatex-chicago @incollection: showing the volume field for articles in multivolume work

text: Using `biblatex-chicago`, how can I make sure that the `volume` field of an `@incollection` entry is printed in the first citation? My entry looks something like this:               @incollection{ei2:ibn.al.haytham:vernet,         Author = {Vernet, J.},         Pages = {788--9},         Title = {Ibn al-Haytham},         Volume = {3},         Xref = {ei2},         Year = {1971}}          @book{ei2,         Address = {Leiden},         Edition = {2},         Publisher = {Brill},         Shorthand = {EI2},         Title = {Encyclopaedia of Islam},         Volumes = {12},         Year = {1960--2005}}      I'd like the first `\cite{ei2:ibn.al.haytham:vernet}` command (assuming `ei2` has already been cited somewhere above) to output: > J. Vernet, “Ibn al-Haytham,” in EI2, vol. 3, pp. 788–9 or even (but this is perhaps getting too ambitious) > J. Vernet, “Ibn al-Haytham,” in EI2, vol. 3 (1971), pp. 788–9 Currently what I get is: > J. Vernet, “Ibn al-Haytham,” in EI2, 788–9 which is not good, since it ignores the volume number. I call `biblatex-chicago` in my preamble like this:               \usepackage[notes,         backend=biber,         mincrossrefs= 1,         noibid,         doi= false,         eprint= false,         url= false,         usetranslator= true,         abbreviate= true,         uniquename= true     ]{biblatex-chicago}      ## MWE ### test.tex               %!TEX TS-program = xelatex     %!TEX encoding = UTF-8 Unicode          \documentclass[12pt,article,oneside,letterpaper]{memoir}     \usepackage{geometry}     \usepackage{amsmath}     \usepackage{gensymb}     \usepackage{latexsym,amssymb,amsfonts}     \usepackage{graphicx}     \usepackage{ulem}     \usepackage{varioref}     \usepackage{xltxtra,fontspec,xunicode}     \usepackage{classics}     \usepackage{ifthen}     \usepackage[american]{babel}      \usepackage{csquotes}               \setromanfont[Mapping=tex-text]{Palatino}     \setsansfont[Scale=0.80,Mapping=tex-text]{Arial}     \setmonofont[Scale=0.70,Ligatures=NoCommon]{Courier New}               \usepackage[    notes,             backend=biber,             mincrossrefs = 1,             noibid,             doi=        false,             eprint=     false,             url=        false,             usetranslator=  true,             abbreviate= true,             uniquename= true         ]{biblatex-chicago}     \bibliography{test.bib}          \begin{document}          First time citation: \cite{ei2:ibn.al.haytham:vernet}               Second time citation (of a different article in the same book): \cite{ei2:tabari:bosworth}          \end{document}      ### test.bib               %% This BibTeX bibliography file was created using BibDesk.     %% http://bibdesk.sourceforge.net/               %% Created for Alex at 2014-01-28 21:28:36 +0200                %% Saved with string encoding Unicode (UTF-8)                     @book{ei2,         Abstract = {I:  1960     V:  1986},         Address = {Leiden},         Date-Added = {2014-01-28 19:28:22 +0000},         Date-Modified = {2014-01-28 19:28:22 +0000},         Edition = {2},         Publisher = {Brill},         Shorthand = {EI2},         Title = {Encyclopaedia of Islam},         Year = {1960--2005}}          @incollection{ei2:ibn.al.haytham:vernet,         Author = {Vernet, J.},         Date-Added = {2014-01-28 19:28:22 +0000},         Date-Modified = {2014-01-28 19:28:22 +0000},         Notetoself = {III (1971) 788--9},         Pages = {788--9},         Title = {Ibn al-Haytham, Abū ʿAlī…},         Volume = {3},         Xref = {ei2},         Year = {1971}}          @incollection{ei2:tabari:bosworth,         Author = {Bosworth, C. E.},         Date-Added = {2014-01-28 19:28:22 +0000},         Date-Modified = {2014-01-28 19:28:22 +0000},         Keywords = {Tabari},         Pages = {11--15},         Shorttitle = {al-Ṭabarī},         Title = {al-Ṭabarī, Abū DJafar Muḥammad b.\ DJarīr b.\ Yazīd},         Volume = {10},         Xref = {ei2},         Year = {2000}}      ### The output I get > First time citation: J. Vernet, “Ibn al-Haytham, Abū ʿAlī...,” in > _Encyclopaedia of Islam_ , 2nd ed., vol. 3 (Leiden: Brill, 1960–2005), > 788–9, (hereafter cited as EI2). > > Second time citation (of a different article in the same book): C. E. > Bosworth, “al-Ṭabarī, Abū DJafar Muḥammad b. DJarīr b. Yazīd,” in EI2. ### What I'd like to get > First time citation: J. Vernet, “Ibn al-Haytham, Abū ʿAlī...,” in > _Encyclopaedia of Islam_ , 2nd ed. (Leiden: Brill, 1960–2005) (hereafter > cited as EI2), vol. 3 (1971), 788–9. > > Second time citation (of a different article in the same book): C. E. > Bosworth, “al-Ṭabarī, Abū DJafar Muḥammad b. DJarīr b. Yazīd,” in EI2, vol. > 10 (2000), 11–15. Or something like that. What I'm most interested in is being able to depend on the volume number appearing in the citation even when I use a normal `\cite` command and not `\volcite`. (But as one reader kindly pointed out, it may be a problem with my software versions, since I have not updated yet to TeXLive 2013.) ## Update: new MWE with TeXLive 2013 Now I've updated to TeXLive 2013 (and updated all packages using TeX Live Utility). The situation is different, but not resolved. I used precisely the same MWE as above, except that I added \printshorthands \printbibliography to `test.tex` right before `\end{document}`. Now, curiously, the "shorthand" I defined for `ei2` (`Shorthand = {EI2}`) is ignored for the inline citations... ![MWE output using TeXLive 2013](http://i.stack.imgur.com/YFvMy.png)


title: Inserting images into TeXstudio

text: I am using TeXstudio on my Lenovo laptop, and am running into an exasperating difficulty. Whenever I try to drag my file image into the "typing area," all that comes up is a bunch of gibberish. Here is excerpt of this gibberish:               ÿØÿà 2!!22222222222222222222222222222222222222222222222222ÿÀ      And there is much, much more of this. Previously, I could drag the file image into the "typing area" with ease, and actually preferred this method to the one in which I had to do all the typing--that is, the work--, because it would allow me to easily specify certain characteristics of the image (where I wanted to place the image on the image, how large I wanted the image, etc). How can one go about remedying this?