title: Printing bibliography with biblatex in Tufte-handout fullwidth environment

text: I'm trying to print the bibliography (using biblatex) inside the `fullwidth` environment. But when I place the `\printbibliography` command inside the `fullwidth` environment, every line other than the very first gets indented. As far I as can tell, `biblatex` prints bibliographies as follows:   1. The first line of each item is flushed left.    2. Any other line of each item is indented using `\bibhang`.  If I simply place `\printbibliography` at the end of my file, I get the expected behavior: ![Default behavior\\printbibliography](http://i.stack.imgur.com/7QZbQ.png) If instead I place it inside a `fulldiwth` environment, every line in the bibliography other than the first one gets indented the same amount. Here's a minimal example               \documentclass[nobib]{tufte-handout}      \usepackage[style=authoryear-comp]{biblatex}      \begin{filecontents*}{mybib5.bib}      @MISC{Volkmann,        author = {Volkmann, Albert},        title = {My Title},        year = {2005},        addendum={Lorem ipsum dolor sit amet, consectetur adipisicing elit,      sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.}      }           @MISC{Caesar,        author = {Caesar, Gaius J.},        title = {My long title},        year = {2005},        addendum={Lorem ipsum dolor sit amet, consectetur adipisicing elit,      sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.}      }           \end{filecontents*}      \title{Test}      \author{Me}      \bibliography{mybib5}      \begin{document}      \maketitle      Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut  aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \cite{Volkmann,Caesar}           \begin{fullwidth}      \printbibliography      \end{fullwidth}      \end{document}       The output looks like so: ![Odd behavior: biblatex and fullwidth environment](http://i.stack.imgur.com/SAUfz.png) If I set `\parindent` to 0pt right before `\printbibliography`, I get the same result. If instead I set `\bibhang` to 0pt right before `\printbibliography`, so that               \begin{fullwidth}     \printbibliography     \end{bibliography}      is replaced by:               \begin{fullwidth}     \bibhang=0pt     \printbibliography     \end{bibliography}      no line in the bibliography is indented: ![After setting \\bibhang to 0pt](http://i.stack.imgur.com/CTY2B.png) What I can't get is the default behavior (first line of each item flushed left, every additional line indented) within the `fullwidth` environment. Any thoughts? UPDATE: I'm using version 3.5.2 of `tufte-common.def`.


title: Properly capture chapter name

text: I have a code that looks like the following:               \documentclass{scrbook}     \usepackage[automark]{scrpage2}     \usepackage{lipsum}               \let\oldchapter\chapter     \newcommand\temphead{}     \newcommand\chaphead{}     \renewcommand\chapter[2][\temphead]{%         \renewcommand\temphead{#2}%         \renewcommand\chaphead{#2}%                              \oldchapter[#1]{#2}}          \title{My title}          \makeatletter                  \let\titlehead\@title              \makeatother          \cfoot[\rule{6mm}{0.8pt}\\\pagemark]{\rule{6mm}{0.8pt}\\\pagemark}     \ofoot[]{}     \lehead[]{}     \cehead[]{\titlehead}         \cohead[]{\chaphead}                                               \ohead[]{}          \renewcommand*{\chapterpagestyle}{scrplain}               \begin{document}     \pagestyle{scrheadings}          \chapter{My first chapter}          \lipsum     \lipsum               \chapter{My second chapter}          \end{document}      The goal is to display the chapter name on right pages, and the title of the book of left pages. Now when the page preceding a new chapter is a right page, the chapter displayed is the one of the following chapter. My sample code shows it, as the last page of the first chapter says "My second chapter". How can I fix this?


title: compilation problem: "Extended mathchar used as mathchar" with mathastext

text: When compiling a file using XeLaTex in TeXShop on Mac OS X, the console persistently hangs after the detection of the XeTeX driver:               *geometry* driver: auto-detecting     *geometry* detected driver: xetex     ./paper.tex:53: Extended mathchar used as mathchar (71311379).     <to be read again>                         \relax      l.53 \begin{document}      It's possible to continue the compilation, but I'd like to understand what is going on. The problem seems to be related to the `mathastext` package, which I use to allow math and text formatting both to use the TeX Gyre Termes font; commenting out the `\usepackage` line for `mathastext` relieves the problem. I've seen discussions from 2006 (long predating the existence of `mathastext`) saying that there is a bug in the XeTeX distro (v. 0.995 rev. D) and the only solution is to compile from source. (Google search results here.) The version of XeTeX currently installed on Mac OS 10.6.7 by TeX Live is 0.9997.4, but the problem persists, and I wonder if there is any newer intelligence on how to repair it or what causes it. I am having trouble building XeTeX manually. * * * **Edit, 20110505** Because the discussion below became quite involved, I am summarizing the two main conclusions:   * There turns to be a bug in `amsmath` that requires the option `noendash` to be passed to `mathastext`. An alternate fix is offered by Philipp.   * Discussion of how to get math formatting to apply to non-math text, without looking like math mode, was transfered to a different posting: applying math formatting to a non-math font. your code loading mathspec which itself caused behind the scenes fontspec to be loaded with option no-math? * * * **Edit: minimal example, as requested by Philipp**               %!TEX TS-program = xelatex     %!TEX encoding = UTF-8 Unicode          \documentclass[12pt]{article}     \usepackage{geometry}     \usepackage{amsmath}     \usepackage{mathspec}            % replaces amssymb; do not use unicode-math     \usepackage[italic]{mathastext}  % propagates document text font to math mode     \usepackage{xeCJK}     \usepackage{fontspec}          \defaultfontfeatures{Mapping=tex-text}     \setromanfont{TeX Gyre Termes}          \begin{document}          The expected number of collisions in a given unit is \[E(collisions)=k\times\left(1-\left(1-\left(1/n\right)\right)^{{\left(k-1\right)}}\right)\]          \end{document}      * * * **Another edit** , 2011.05.04, replying to JFBU's comment about `[no-math]`. _With_ `no-math` being passed to `fontspec`:               \usepackage[no-math]{fontspec}     ...     \setmainfont[Scale=1,Mapping=tex-text]{TeX Gyre Termes}     ...     \usepackage[italic,noendash]{mathastext} % set *after* setmainfont     ...     \begin{document}     au\(_{\rm3yā}\)     \end{document}      I get ![with no-math](http://i.stack.imgur.com/4fGcv.png). But _without_ `no- math` being passed to `fontspec`:               \usepackage{fontspec}     ...     \setmainfont[Scale=1,Mapping=tex-text]{TeX Gyre Termes}     ...     \usepackage[italic,noendash]{mathastext} % set *after* setmainfont     ...     \begin{document}     au\(_{\rm3yā}\)     \end{document}      I get ![without no-math](http://i.stack.imgur.com/KL3Yx.png). I believe these are the same; I chose ā because the height of the macron is very distinctive in Termes. * * * **Edit, 2011.05.04b** : In response to another comment of @JFBU, appearance of `\centerline{0123456789}\centerline{$0123456789$}` with and without `no-math` passed to `fontspec`. With `no-math`: ![with no-math 2](http://i.stack.imgur.com/Ec1MT.png) W/o `no-math`: ![without no-math 2](http://i.stack.imgur.com/GZH8h.png) I see no obvious difference.


title: Creating a mask with n empty pages for stamping

text: I want to use pdftk's multistamp feature to add annotations to a script of which I don't own the source code. My goal is to create an empty pdf file of n empty pages (this would then serve as my mask for stamping), in such a way that I can, for any k, easily add some content to the k-th page. I do not know how to do that and would appreciate any input!


title: Horizontal line in Algorithmic Environment

text: I'd like to separate two sections in an `algorithmic` environment with a horizontal line, like:               -------------     Algorithm 1: MyAlgorithm     -------------       Part 1:       Do some stuff     -------------       Part 2:       Other stuff      `\hline` causes an error. My code so far looks like:               \begin{algorithm}       \caption{Caption}       \begin{algorithmic}         \STATE algorithm here         %I'd like to do \hline here!         \STATE part 2 here       \end{algorithmic}     \end{algorithm}


title: Using string conditionals to determine document class

text: I am trying to set up a set of templates for most of the styles I have created or collected. Right now I am using a bunch of LaTeX files with the `\input{}` and setting variables with `\def`. What I am looking to accomplish is to have the template setup execute a series of steps depending on the variable sent. For example. My main document will have something like this on the first couple of lines.               \def\doctype{letter} % this could also be a book, article, beamer presentation, etc.     \input{template-setup}      Based on the `doctype` I want to get my template setup to select the right document class. I know of the `xstring` or `xifthen` packages, but since I want to use the `doctype` variable to select the right document class, this is not possible (since you cannot use a package before `\documentclass`). Can somebody please help me?


title: LaTeX cannot find my personal packages

text: I'm venturing into writing my own packages, but LaTeX is not finding them. I working on a iMac OS X, but I don't want to use `TEXMFHOME=~/Library/texmf`. I would like to put my packages in a different directory: for the sake of this post let's call it `~/private/texmf`. My `TEXINPUTS` is set as `TEXINPUTS=.:~/private/texmf//:` and works perfectly well for standard `.tex` files. But when I place a new `.sty` file in these directories, LaTeX complains that they can't be found. I've tried numerous things. The two most notable are:   1. Setting `TEXMFHOME=~/private/texmf:~Library/texmf`   2. Setting `TEXMFHOME=~/private/texmf` Both times, I've entered `~/private/texmf` and run `sudo texhash` to update everything (I've never had to do this before). I've moved to the directory in which my packages are located `~/private/texmf/tex/latex/packages/` and called `texhash` again. All to no avail. I've search the web and this site for clues about what to do:   1. Change TEXMFHOME per-user   2. Where do I place my own .sty files, to make them available to all my .tex files?   3. How to access style files in texlive-publishers from Kile What's mentioned above is what seemed to be suggested at various different sites. Nothing's working. Help.


title: How to cite newspaper with natbib

text: When I check my `bib` file, the newspaper article is included as `@misc` with all the information (I use Mendeley to build up my `bib` file). In the bibliography, however, the citation only includes author's and article's name (No newspaper name, month and day). How should I include newspaper article in the `bib` file to cite it properly?


title: switching beamer mode with commands

text: I have a beamer main document which is called by various wrappers and I want to make all `\mode`-switching dependent from commands defined in the preamble of this wrappers. For normal modes like `\mode<presentation>` this works fine, but the only way I found to include `\mode*` in this system was to hack an internal command. Has someone a better idea to achieve the same goal? And do someone some danger in my redefinition (apart from the general danger to redefine internal commands)?               \documentclass[]{beamer}     \newcommand\secondmode{presentation}     \newcommand\mainmode{*}     \makeatletter     \def\beamer@@@mode<#1>{\if#1*                               \expandafter\@firstoftwo                             \else                               \expandafter\@secondoftwo                             \fi                             {\beamer@modeoutsideframe}                             {\beamer@closer\@ifnextchar\bgroup{\beamer@modeinline<#1>}{\beamer@switchmode<#1>}}}     \makeatother     \begin{document}     \mode     <\mainmode>     some text outside a frame in main mode     \begin{frame}     test in frame in main mode     \end{frame}               \mode     <\secondmode>          some text outside a frame in second mode          \begin{frame}     second mode in a frame     \end{frame}          \mode     <\mainmode>          some text outside a frame               \mode     <all>     \end{document}


title: How to align integers on the right, but still center them

text: Suppose we have a table like this:               \begin{tabular}{c}     Heading \\     1 \\     10 \\     100 \\     \end{tabular}      This will center all the numbers. If I want to align them to the right, I could change the column definition to `r`, but that would but the numbers on the right end of the table. What I would like is for the widest number (in this case `100`) to be centered with respect to the column, and the others to be right-aligned to that number. There seem to be a bajillion packages out there that deal in one way or another with aligning numbers by their decimal points, but none seem to offer a simple way to pad numbers to a fixed width. Does anyone have a suggestion?


title: Export eps figures from TikZ

text: Section 32 _Externalization Library_ of the _pgfmanual_ (v2.10) explains how to generate PDF figures and EPS figures. I successfully tried it with PDF output (there is an example with a full explanation in the manual), but failed with EPS (no example provided). Can anyone give me a minimal example?


title: Transparent table captions when using onslide with overprint and setbeamercovered{invisible}

text: The following works correctly in that the right table is shown at the right time, and all alignment works as expected. The only issue is that while the table body is shown as normal, the table captions are shaded as if by `\setbeamercovered{transparent}`.               \begin{frame}     \frametitle{Reduced Resource Requirements}     \begin{columns}       \begin{column}[c]{0.5\textwidth}       \setbeamercovered{transparent}         \hspace{-2em}         \begin{itemize}         \onslide<1>\item $95\%$ decrease disk footprint         \onslide<2>\item $86\%$ decrease memory footprint         \onslide<3>\item $62\%$ decrease in runtime         \end{itemize}       \end{column}            \begin{column}[c]{0.5\textwidth}       \setbeamercovered{invisible}         \begin{overprint}                \onslide<1>             \begin{table}               \centering               \caption{On Disk Requirement}               \begin{tabular}{r|l}                 AST & Source code         \\                     & \& build toolchain  \\                 ASM & Assembly code       \\                     & assembler \& linker \\                 ELF & Compiled executable \\               \end{tabular}             \end{table}                \onslide<2>             \begin{table}               \centering               \caption{Memory(MB) Requirements}               \begin{tabular}{r|l}                 AST & 1402 \\                 ASM & 756  \\                 ELF & 200  \\               \end{tabular}             \end{table}                \onslide<3>             \begin{table}               \centering               \caption{Runtime (Sec)}               \begin{tabular}{r|l}                 AST & 229.50 \\                 ASM & 278.30 \\                 ELF & 74.20  \\               \end{tabular}             \end{table}              \end{overprint}       \end{column}          \end{columns}     \end{frame}      I tried wrapping each table in a block, but that lead to TeX stack overflow issues. Any ideas are much appreciated.


title: Printing only one bib file

text: Hi I am using biblatex with beamer. I want to add 2 bib files using `\addbibresource`, cite entries from both bib files so that they show up on the page where I am citing them. However, in the final references using `\printbibliography`, I would like to show entries from only one bib file. How can I do that?


title: how change the text in \IEEEkeyword

text: IEEE papers has `\IEEEkeyword` command, but for other use in other languages. How change the text "Index terms" ?


title: How to make the line number in algorithm shown in bold

text: I have tried following which works (making the number in second line bold)               \begin{algorithm}[h]     \begin{algorithmic}[1]     \State TSO.assignStartTs()     {\bf\State} TSO.assignCommitTs()     \end{algorithmic}     \end{algorithm}      The problem is if I want to make the same for first linenumber, as below, it does not work, and complaints with `Missing endcsname`. This looks quite like undefined behaviour to me, and in general, is there anyway to make line number bold?               \begin{algorithm}[h]     \begin{algorithmic}[1]     {\bf\State} TSO.assignStartTs()     {\bf\State} TSO.assignCommitTs()     \end{algorithmic}     \end{algorithm}


title: Font Appears different

text: Hi I am using Sanskrit2003 font and it appears with additional circle in TeXWorks, just to verify I copied it to MS Word & open office and it appeared fine in word. I am attaching an image to show you the difference. I am not sure why same font behaves differently in two applications. I want it to appear in TeXworks the way it appears in MS word. Should I be using any special package I am running on Texlive2010, ubuntu 10.10 and Texworks. thanks for your help ![alt text](http://i.stack.imgur.com/zfxBg.jpg)


title: pgfplots: problem with stacked histograms

text: I want to plot data for a node that has several inflows and one outflow, using stacked histograms. I want the plot to look like this: ![This is what I want](http://i.stack.imgur.com/86JcD.png) First, I have tried stacked histograms (`ybar stacked`, see the code below), where I draw the negative series first and then add it to the first series. Unfortunately, it does work, even if it works with lines and `area style`: ![](http://i.stack.imgur.com/u5Y4G.png) ![](http://i.stack.imgur.com/FBVMJ.png) Then I tried using separate `axis` environment for positive and negative values, as suggested in this answer. The problem is that the stacked histogram breaks down once I change `ymin` \- is this a bug? ![this works](http://i.stack.imgur.com/0AHgO.png) ![this does not](http://i.stack.imgur.com/yqE6b.png) _My question is:_ is there some way to make this work, other than the hack I used to create the first figure? (There, I am stacking the columns manually - OK for two inflows, but very impractical for five or more - though I guess it could be scripted..) PS: I realized that the figure has to work also black-and-white, so I need to use patterns. This made my manual stacking impossible, since the patterns have transparent backgrounds - until I found this answer which showed how to combine patterns and fill, so I could get this: ![enter image description here](http://i.stack.imgur.com/FQNv2.png) Here is the full code for all the figures:               \documentclass{article}     \usepackage{tikz,pgfplots,pgfplotstable}     \usetikzlibrary{patterns}     \pagestyle{empty}          \begin{document}          \pgfplotstableread{     t   in1 in2 out     1   5   2   7     2   3   0   6     3   1   2   5     4   0   4   4     5   1   6   5     6   4   4   6     7   6   2   7     }\flowData          \begin{tikzpicture}         \begin{axis}[small,title=This is what I want,ybar,bar shift=0pt,]             \addplot table[x=t,y expr={-\thisrow{out}}] {\flowData};             \addplot table[x=t,y expr={\thisrow{in1}+\thisrow{in2}}] {\flowData};             \addplot table[x=t,y expr={\thisrow{in2}}] {\flowData};         \end{axis}     \end{tikzpicture}     \      \begin{tikzpicture}         \begin{axis}[small,title=First attempt using ybar stacked,ybar stacked]             \addplot table[x=t,y expr={-\thisrow{out}}] {\flowData};             \addplot table[x=t,y expr={\thisrow{out}+\thisrow{in1}}] {\flowData};             \addplot table[x=t,y=in2] {\flowData};         \end{axis}     \end{tikzpicture}          \begin{tikzpicture}         \begin{axis}[small,title=Check: using lines is OK,stack plots=y]             \addplot table[x=t,y expr={-\thisrow{out}}] {\flowData};             \addplot table[x=t,y expr={\thisrow{out}+\thisrow{in1}}] {\flowData};             \addplot table[x=t,y=in2] {\flowData};         \end{axis}     \end{tikzpicture}     \      \begin{tikzpicture}         \begin{axis}[small,title=Check: using area style is OK,stack plots=y,area style]             \addplot table[x=t,y expr={-\thisrow{out}}] {\flowData} \closedcycle;             \addplot table[x=t,y expr={\thisrow{out}+\thisrow{in1}}] {\flowData} \closedcycle;             \addplot table[x=t,y=in2] {\flowData} \closedcycle;         \end{axis}     \end{tikzpicture}          \begin{tikzpicture}         \begin{axis}[small,title=Test: only inflows,ybar stacked]             \pgfplotsset{cycle list shift=1}             \addplot table[x=t,y=in1] {\flowData};             \addplot table[x=t,y=in2] {\flowData};         \end{axis}     \end{tikzpicture}     \     \begin{tikzpicture}         \begin{axis}[small,title={Test: only inflows with ymin=-8},ybar stacked,ymin=-8]             \pgfplotsset{cycle list shift=1}             \addplot table[x=t,y=in1] {\flowData};             \addplot table[x=t,y=in2] {\flowData};         \end{axis}     \end{tikzpicture}          \pgfplotsset{ % redefine the cycle list used for bar- and area plots         /pgfplots/bar cycle list/.style={/pgfplots/cycle list={%             {blue!80!black,fill=white,postaction={pattern=north east lines,pattern color=blue!75!white}},%             {green!75!black,fill=white,postaction={pattern=crosshatch dots,pattern color=green!90!white}},%             {red!80!black,fill=white,postaction={pattern=crosshatch,pattern color=red!67!white}}}         }     }     \begin{tikzpicture}         \begin{axis}[small,title={This is what I \emph{really} want},ybar,bar shift=0pt,]             \addplot table[x=t,y expr={-\thisrow{out}}] {\flowData};             \addplot table[x=t,y expr={\thisrow{in1}+\thisrow{in2}}] {\flowData};             \addplot table[x=t,y expr={\thisrow{in2}}] {\flowData};         \end{axis}     \end{tikzpicture}          \end{document}


title: Line breaks inside inline code break syntax highlighting. Any workaround?

text: I want to have both code snippets ABC and ABC_DEF in red (in both cases only ABC is red). If I remove the literate line it works but I also want to have automatic line breaks at underlines. How can I achieve both aims?               \documentclass{article}          \usepackage{listings}     \lstset{         emph={ABC, ABC_DEF},         emphstyle={\color{red}},         literate={\_}{}{0\discretionary{\_}{}{\_}} % line breaks at underlines     }     \usepackage[colorlinks=true]{hyperref}               \begin{document}     \lstinline{ABC}     \lstinline{ABC_DEF}     \end{document}


title: Fine-tuning letter space for small caps with fontspec

text: I'd like to have different settings for small caps letter space as a function of font size by using the appropriate `fontspec` settings when the compilation is done over `XeLaTeX`. So far I haven't been successful. This is my MWE:               \documentclass[12pt]{memoir}          \usepackage{xcolor,fontspec}          \setmainfont[       UprightFont = *-Regular,       BoldFont = *-Bold,       SizeFeatures = {         {           Size = { -10},           Color = green,           SmallCapsFeatures = {                                 LetterSpace  =  30.0,                                 WordSpace  =  { 1.5, 1.5, 1.5 },                               },         },         {           Size = {10-14},            Color = red,           SmallCapsFeatures = {                                 LetterSpace  =  9.0,                                 WordSpace  =  { 1.5, 1.5, 1.5 },                                },        },        {          Size = {14- },          Color = yellow,          SmallCapsFeatures = {                                 LetterSpace  =  6.0,                                 WordSpace  =  { 1.5, 1.5, 1.5 },                              },        }       }] {BulmerMTStd} %<- Any OpenType font of your choice          \pagestyle{empty}          \begin{document}     \noindent\scshape     {\tiny A tiny line.}\\     {\normalsize A normalsize line.}\\     {\LARGE A LARGE line.}     \end{document}      Colors are just for size range identification and letter space values are set as they are just for the sake of making the difference clear. I've tried with different fonts, and I always get the same result, namely, letter space seems to be right for "intermediate" and "large" sizes, but it is wrong for the "smallest" sizes (with no apparent letter space at all). I guess I'm doing something wrong. What is the right way to achieve what I want? EDIT: Actually, by playing with the `LetterSpace` key values and by explicitly closing in the `Size` key the open ranges from below or above I get different kinds of apparently weird behavior, in the guise of the letter spacings being intermingled among the different font size ranges.


title: How can I eliminate section headers, while keeping the first paragraph of each section unindented?

text: I would like to have the sections of my document to just be separated by a vertical space, with no visible section header. Furthermore, I would like the first paragraph of each section start without an indent. I tried the following minimal working example for an `\invisiblesection` command, taken from this question. Unfortunately, any text that follows this `\invisiblesection` command gets indented:               \documentclass{article}          \newcommand\invisiblesection[1]{%       \refstepcounter{section}%       \addcontentsline{toc}{section}{\protect\numberline{\thesection}#1}%       \sectionmark{#1}}               \begin{document}          \invisiblesection{First Section}     The section header is invisible :) but the paragraph starts with an indent :(          \section{Second Section}     The section header is visible :( but the paragraph starts with no indent :)          \end{document}      Adding `\noindent` to the end of `\invisiblesection` doesn't fix this. Adding `\noindent` to the beginning of each new section does fix it, but I would like this to happen automatically, as it does when I use the normal `section` environment.


title: Heaped up tikz figure-how to fix

text: My problem is: The figure looks ok on Geogebra, but after exporting to Tikz code and importing to LaTex, it is ugly and have some heaped up between point, lines, and the name of the point or line. Here is the picture on Geogebra: ![enter image description here](http://i.stack.imgur.com/gwR41.png) Here is the MWE:               \documentclass[10pt]{article}     \usepackage{pgf,tikz}     \usetikzlibrary{arrows}     \pagestyle{empty}     \begin{document}     \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm,scale=0.5]     \draw (2,2)-- (0,-2);     \draw (0,-2)-- (8,-2);     \draw (8,-2)-- (10,2);     \draw (10,2)-- (2,2);     \draw (2,2)-- (2.94,0.52);     \draw (2.94,0.52)-- (0,-2);     \draw (2.94,0.52)-- (9.25,0.5);     \begin{scriptsize}     \fill [color=black] (2,2) circle (0.5pt);     \draw[color=black] (2.16,2.18) node {$A$};     \fill [color=black] (0,-2) circle (0.5pt);     \draw[color=black] (0,-2.24) node {$B$};     \fill [color=black] (8,-2) circle (0.5pt);     \draw[color=black] (8.1,-2.24) node {$C$};     \fill [color=black] (10,2) circle (0.5pt);     \draw[color=black] (10.16,2.18) node {$D$};     \fill [color=black] (2.94,0.52) circle (0.5pt);     \draw[color=black] (3.18,0.84) node {$X$};     \fill [color=black] (9.25,0.5) circle (0.5pt);     \draw[color=black] (9.4,0.36) node {$Y=Z$};     \end{scriptsize}     \end{tikzpicture}     \end{document}      So, how can I fix it? How can I place the points' names properly as in Geogebra? Please help me. Thanks.


title: Unwanted space after using a glossary term

text: I have a problem with using the glossary package. I use sharelatex. When I use a glossary term (first and others), there appears an unwanted space in the output document. This is the code I use: Main               \usepackage[acronym, translate=babel, nopostdot]{glossaries}     \makeglossaries          % External files     \loadglsentries{Z_glossary}     \loadglsentries{Z_afkortingen}          % Not in table of contents     \glstocfalse          % First appearance in italic     \defglsdisplayfirst[\glsdefaulttype]{\textit{#1}}      The Glossary               \newglossaryentry{workflowpattern}%     {%         name={Workflowpattern},          description={Blablabla},          text={workflowpattern},          plural={workflowpatterns},          first={workflowpattern},                     firstplural={workflowpatterns},     }      The text               zijn de \glspl{workflowpattern} en beschrijven      And the result: ![The output](http://i57.tinypic.com/316mgie.png)


title: How to achieve nested alignment of formulas?

text: I'm trying to get a nested alignment in math mode:               +----------------------------------------------------------------+     | ..... & ................                                       |     |       +--------------------------------------------------+     |     |       | ..... & .................                        |     |     |       |         .............................            |     |     |       +--------------------------------------------------+     |     +----------------------------------------------------------------+      Using               \startformula       \startalign         \NC ..... \NC ................ \NR         \NC       \NC \startalign                   \NC ..... \NC ................. \NR                   \NC       \NC .............................                   \stopalign       \stopalign     \stopformula      does not produce the desired result. How can I achieve this alignment?


title: How to set the color of page number

text: I am using white colored font on black page and somehow I am losing my page numbers. I suppose the page number is still in black color. So How do we set the color of page number? And while on the topic, how about color of page runners etc.


title: Bold mathematics in eulervm

text: The `eulervm` package documentation indicates that one should use `\mathbold` instead of `\mathbf` to produce bold maths. Could one write `\renewcommand{\mathbf}{\mathbold}`? What are the side effects?


title: Remove vertical space in examples (Linguex)

text: I use the `linguex` package for numbering my examples. After each example I want there to be a reference, right aligned on the next line. This is my code               \documentclass [a4paper, 12 pt]{memoir}          \usepackage[cyr]{aeguill}          \usepackage[utf8]{inputenc}          \usepackage[T1]{fontenc}          \usepackage[francais]{babel}          \usepackage{linguex}          \begin{document}          \ex. This is an example that is too long for me to use the hfill-command. This is an example that is too long for me to use the hfill-command This is an example that is too long for me to use the hfill-command   \begin{flushright}(Reference 2014)\end{flushright}          \ex. This is an example that is too long for me to use the hfill-command This is an example that is too long for me to use the hfill-command This is an example that is too long for me to use the hfill-command \begin{flushright}(Reference 2014b)\end{flushright}          \end{document}      The problem is that the reference between the examples comes with an equal distance to the preceding and the following example. I want the reference to follow the example with not extra vertical space, so that the only added space is between the examples. I have tried using `\raggedright` instead of `flushright`, but the problem persists. Best, Christine


title: biblatex output like REVTeX style

text: I am using `biblatex` 2.0 and Biber. A multiple-entry citation using `\mcite` gives as output: > [1] a) Author 1, Phys. Rev. Lett. 11, 1 (2012); b) Author 2, Phys. Rev. > Lett. 22, 2 (2012). but I would like to have the output like some REVTeX styles, in which consecutive citations on the same journal appears as "ibid." > [1] a) Author 1, Phys. Rev. Lett. 11, 1 (2012); b) Author 2, ibid. 22, 2 > (2012). Is there a simple way to get this automatically?


title: How to make a shortcut for a \displaystyle?

text: I want to make a shortcut at LyX that if I press it I'll get what the `\displaystyle` does (in math mode). e.g.: If I'll press `Ctrl`+`I` I'll get an integral... Is there a way to do this?


title: using \marginnote inside a math environment in tufte-book

text: I've recently started using `tufte-book` for typesetting solutions to math problems. I like it very much that you're encouraged to use the margin, which is very nice for giving hints, pointers and references concerning the steps of finding a solution. Unfortunately, the `sidenote` and `marginnote` commands don't work in math environments _(not in outer par mode)_. Most of the time, I'm able to work around it by putting the commands after the environment, using the optional offset with a decimal value via `\marginnote[-length]{content}`. But this breaks when a math environment is pushed to the end of a page: the notes are then pushed to the next page, no longer appearing on the same page. This also happens if you first put the commands and then the environment. So, is there any way to enable `sidenote` and `marginnote` in math environments? (I thought of using the `samepage` environment, but this adds a lot of ugly whitespace, as the whole math environment is pushed to the next page without necessity)               \documentclass{tufte-book}     \usepackage{amsmath}     \usepackage{lipsum}     \usepackage{tikz}          \newcommand{\filler}[1][10]%     {   \foreach \x in {1,...,#1}         {   test          }     }          \begin{document}          \lipsum[1]          \begin{align*}         &\int\int\int t\ dt^3\\         =&\int\int \frac{t^2}{2}\ dt^2\\         =&\int  \frac{t^3}{6}\ dt\\         =&\frac{t^4}{24}     \end{align*}\marginnote[-3.7cm]{first note}\marginnote[-1.7cm]{second note}          \lipsum[2]     \filler[50]          \begin{align*}         &\int\int\int t\ dt^3\\         =&\int\int \frac{t^2}{2}\ dt^2\\         =&\int  \frac{t^3}{6}\ dt\\         =&\frac{t^4}{24}     \end{align*}\marginnote[-3.7cm]{first note}\marginnote[-1.7cm]{second note}          \end{document}      ![enter image description here](http://i.stack.imgur.com/uy5JA.png) As you can see, the second `align*` is still on the first page, but the `marginnote`s are pushed to the second page.


title: TikZ counter and logical comparison

text: Does TikZ have counter that is similar to `for` loop in c language and logical comparison? e.g.,               \foreach \x in {0mm,11.200000mm,...,33.600000mm}     {       counter++; <== is this possible in tikz       if(counter == 0) <== is this possible in tikz         output something     }


title: How to write a date interval?

text: What is a correct way of writing a date interval?               a) Jun 2010 -- Aug 2012     b) Jun 2010--Aug 2012     c) Jun 2010 - Aug 2012     d) Jun 2010-Aug 2012     c) other?


title: Changing the font for braces

text: I managed to successfully hack mathspec to use parentheses `()` and brackets `[]` from the specified font via e.g.               \DeclareMathSymbol{]}{\mathord}{\eu@DigitsArabic@symfont}{`]}      Obviously, I'd like to do the same thing with braces `{}`, but `\DeclareMathSymbol{\{}...` causes XeLaTeX to throw the following error:               ! Latex Error: Command '\{' already defined.      I was half-expecting this to happen all along to be honest. Does anyone know how to make this work?


title: sidewaystable doesn't fit in a page

text: How could we fit these tables into a page each? **TABLE 1**               \begin{sidewaystable}[ht]     \centering % used for centering table     \begin{tabular}{l c c c c c c c c c c c}      \hline %inserts double horizontal lines     & \multicolumn{3}{c}{Agriculture} & &  \multicolumn{3}{c}{Industry}& & \multicolumn{3}{c}{Services}\\        \cline{2-4} \cline{6-8} \cline{10-12}     & Male & Female & \% of GDP && Male & Female & \% of GDP && Male & Female & \% of GDP \\      \cline{2-4} \cline{6-8} \cline{10-12}     \textbf{Africa} &&&&&&&&&&&\\     Liberia\footnote{Data of 2010}&49.5&48.3&53.1&&13.5&4.8&4.8&&37&46.8&37.9\\     South Africa\footnote{Data of 2011}&5.5&3.5&2.5&&32.8&13.2&29.2&&58.3&68.4&68.3\\     \textbf{Asia}&&&&&&&&&&&\\     Cambodia$^b$&55&56.6&36.7&&16.3&17.5&23.5&&28.7&26&39.8\\     Indonesia$^b$&37&35&14.7&&24&15&47.2&&40&50&38.1\\     Malaysia$^a$&16&8.5&10.4&&31.3&21&40.3&&52.8&70.5&48.5\\     Sri Lanka$^a$&30.2&37.8&12.1&&23.9&24.8&29.4&&28.3&27.2&57.8\\     Philippines$^b$&41.3&22.5&12.8&&17.7&9.9&31.5&&41.1&67.6&55.7\\     Thailand$^b$&40.5&36.6&12.4&&22.9&18&41.2&&36.6&45.4&46.5\\     Bhutan$^b$&53.3&67.8&15.9&&9.8&8.5&43.9&&36.9&23.7&40.2\\     \textbf{Latin America}&&&&&&&&&&&\\     Colombia$^a$&26.1&5&7.1&&22.7&15.8&35&&51&79.1&57.9\\     Costa Rica$^a$&20.1&4.3&7.1&&24.9&11.4&26.2&&54.6&84.2&66.7\\     Honduras$^a$&49.9&11.9&12.5&&18.6&21.2&26.5&&31.3&66.7&60.9\\     Mexico$^a$&18.6&4&3.9&&30.1&17.8&34.7&&50.5&77.5&61.4\\     Nicaragua$^a$&44.2&15.2&18.6&&17.6&14.8&23.8&&38.1&69.8&57.6\\     \textbf{Developed Countries}&&&&&&&&&&&\\     United Kingdom$^b$&1.7&0.7&0.7&&29.1&7.5&21.6&&68.5&91.2&77.7\\     United States$^a$&2.3&0.8&1.2&&25.1&7.2&19.8&&71.7&91.9&79\\       [1ex] % [1ex] adds vertical space     \hline \hline     \footnotesize Source: \cite{wb}, tabs. 2.3 (p.47), 4.2 (p.76)     \end{tabular}     \end{sidewaystable}      **TABLE 2**               \begin{sidewaystable}[ht]     \centering % used for centering table     \begin{tabular}{l c c c c c c}      \hline %inserts double horizontal lines     & \textbf{GNI} & \textbf{Life} & \textbf{Prevalence of} & \textbf{Health}  & \textbf{Access to} & \textbf{Access to}  \\     & \textbf{per capita} & \textbf{expectancy} & \textbf{under-nourishment} & \textbf{expenditure} & \textbf{improved} & \textbf{ improved}\\     &&&&& \textbf{water source} & \textbf{sanitation facilities}\\     & \textit{constant 2005 US \$ (2011)} & \textit{total (years)} & \textit{\% of population} & \textit{\$ (2011)} & \textit{\% of population (2010)} & \textit{\% of population}\\     \hline% inserts single horizontal line     \textbf{World} & 7519.76 & 70.54 & 12.76 & 951.58 & 88$^w$ & 63$^w$ \\      \textbf{Low Income} & 407.79 & 61.14 & 28.15 & 31.17 & 65 & 37 \\      \textbf{Middle Income} & 2589.99 & 69.92 & 12.65 & 245.71 & 90 & 59 \\      \textbf{High Income} & 30638.66 & 78.88 & 5 & 4607.2 & 100 & 100 \\       [1ex] % [1ex] adds vertical space     \hline \hline     \end{tabular}     \end{sidewaystable}


title: Several makeindex in TeXnicCenter

text: I have a problem relating to using `\makeindex` in TeXnicCenter. I use different indexes (such as `\makeindex{name}` and `\makeindex{place}`), but TeXnicCenter gives a warning asking for nameoftexfile.idx. This file should not exist, but the files name.idx and place.idx seems to be made the way they should. What "Command line arguments to pass to MakeIndex" should I use in the build setting when I have several named indexes?


title: Placing a .bib file in a package folder - TeXWorks can't find it?

text: I have created a `courses.bib` database file for all my course litterature, which I have placed along with a package of mine named `tlnames.sty` that defines some related macros. The folder in which both files reside is `~/documents/texlive/texmf/tex/latex/tlnames`. I'm compiling this from inside TeXWorks using a modified version of the LaTeXmk script, which works fine except for the bibliography - it can't find `courses.bib`. Finding `tlnames.sty` works OK - I can import the package and use macros from it. I have, since I placed `courses.bib` there, run `texhash ~/documents/texlive/texmf` and recievd the following output               $ texhash texmf     texhash: Updating /home/tomas/documents/texlive/texmf/ls-R...      texhash: Done.      Why is this not working? What do I need to do to help BiBTeX find my database? For completeness of the question: I'm running Ubuntu 12.04, with TeX Live 2011 and TeXWorks version 0.5 r.952.


title: Reference an item without displaying the text

text: > **Possible Duplicate:**   >  Reference plain text I want to reference an item in a description, without actually displaying the text of the specific item. I have a description with labeled items               \begin{description}         \item[House\label{bld:house} is a building] \hfill \\         A house is a building...     \end{description}      And I would want to use something like this               House\ref{bld:house} is something I don't own.      So that the output looks like this               House is something I don't own.      But instead I get this               House is a building is something I don't own.      So it references the whole text within the item. How would I just have a reference with my own individual text, like in HTML (Google)? And for some reason when I click on the reference it only jumps to the nearest section, but not exactly to the item.


title: Profile face TikZ

text: My goal is get such head drawing: http://www.shutterstock.com/pic.mhtml?id=87217450 ![enter image description here](http://i.stack.imgur.com/GHZwY.jpg)


title: Alternative for `\linebreak` in inline math mode

text: Looking at this question and the chat that followed it, I was wondering what would be considered best practise to include line breaks in inline math mode (breqn does not quite work; there's some problem with the unicode support, and even breqn doesn't resolve all the problems so some manual optimisation does always seem to be required if you have a lot of inline equations araound text). The minimal working example is by no means small, but I tried to get rid of everything that is not related to the question. The problem is that removing one of my definitions in the preamble will alter the layout of specific lines and therefore the line breaking "errors" won't be reproducible. Well, here it is:               \documentclass{scrreprt}          % basic     \usepackage{fontspec}     \setmainfont{Linux Libertine O}          \usepackage{polyglossia}     \setdefaultlanguage[babelshorthands=true]{german}          \parindent = 0px     \parskip = 10px          \def\labelitemi{‒}          \usepackage{enumitem}          \usepackage[autostyle=true]{csquotes}          \usepackage[fleqn]{amsmath}     \usepackage{amssymb}     \setlength{\mathindent}{0px}     \usepackage{mathtools}          \usepackage{stmaryrd}          % bidirektionaler Äquivalenzbeweis     \newlength{\beweispfeil}     \settowidth{\beweispfeil}{\enquote{\( \implies \quad \)}}          \newlist{beweis}{itemize}{1}     \setlist[beweis]{leftmargin=\beweispfeil}          % Äquivalenz durch beidseitige Inklusion     \newlength{\inklusionszeichen}     \settowidth{\inklusionszeichen}{\enquote{\(\subseteq\quad\)}}          \newlist{inklusion}{itemize}{1}     \setlist[inklusion]{leftmargin=\inklusionszeichen}          \newcommand*\setdiff{\mathbin{∖}}     \newcommand*\qed{\quad\square}     \newcommand*\sem{\mathrel{\mathop{;}}}     \newcommand*\wid{\quad\lightning}          \DeclareMathOperator{\Span}{Span}     \DeclareMathOperator{\Loes}{Lös}          \newcommand*\ordpair[2]{\left( #1, #2 \right)}     \newcommand*\struct[2]{\(\ordpair{#1}{#2}\)}     \newcommand*\field{\struct{K}{+, \cdot}}     \newcommand*\restr[2]{#1_{\left|#2\right.}}     \newcommand*\LoesG{\Loes \left(\left(\alpha_{j_k}\right)_{\substack{1 \leq j \leq m\\1 \leq k \leq n}} \sem 0\right)} % Solution to a general system of linear equations          \newcommand*\N{\mathbb{N}}     \newcommand*\R{\mathbb{R}}          % Hyperlinks     \usepackage{hyperref}          % Zeilenabstände     \linespread{1.15}          \newcounter{einschub}[chapter]          % Festlegungen für Nummerierungsumgebungen     \setlist[enumerate, 1]{label=\roman*), leftmargin=*, widest=viii, parsep=1ex}     \setlist[enumerate, 2]{label=\alph*), leftmargin=*, parsep=1ex}          \setenumerate[0]{label=\roman*)}          \begin{document}          Es sei \field{} ein Körper, \( U \subseteq K \). Danh heißt \(U\) Unterkörper von \field, wenn     \struct{U}{\restr{+}{U \times U}, \restr{\cdot}{U \times U}} ein Körper ist.          Weiter gilt \( \forall \left(x_1, \dots, x_n \right) \in K^n : \left(x_1, \dots, x_n \right) + \left(0, \dots, 0 \right) = \left(x_1+0, \dots, x_n+0 \right)     = \left(x_1, \dots, x_n \right) \), also ist \( \left(0, \dots, 0 \right) \in K^n \) ein rechtsneutrales Element bezüglich \(+\) und     \( \left(x_1, \dots, x_n \right) \in K^n : \left(x_1, \dots, x_n \right) + \left(-x_1, \dots, -x_n \right) = \left(x_1+\left(-x_1\right), \dots, x_n+\left(-x_n\right) \right)     = \left(0, \dots, 0 \right) \), sodass \( \left(-x_1, \dots, -x_n \right) \) ein Rechtsinverses zu \( \left(x_1, \dots, x_n \right) \) bezüglich \( \left(0, \dots, 0 \right) \) ist.          \begin{enumerate}     \item Sei \(V\) ein \(K\)-Vektorraum und \(x \in V\).          \begin{itemize}     \item Damit ist \(p+q\) eine Polynomfunktion (mit Koeffizienten \( \lambda_0 + \nu_0, \dots, \lambda_m + \nu_m,     \lambda_{m+1}, \dots, \lambda_n\)), also \(p+q\in K[\alpha]\).     \end{itemize}     \end{enumerate}          \begin{inklusion}     \item[\enquote{\( \subseteq \)}] Seien \( x_1, \dots, x_{n+1} \in A, \alpha_1, \dots, \alpha_{n+1} \in K \). Nach Induktionsvoraussetzung gilt \( \sum _{k=1} ^n \alpha_k x_k \in \Span A \).     \end{inklusion}          \begin{enumerate}     \item Wir setzen \( \LoesG \coloneqq \left\{ (\xi_1, \dots, \xi_n) \in \R^n, \xi_1, \dots, \xi_n \text{ sind Lösungen von (\star)} \right\} \) die Menge aller Lösungen von (\star). Dann ist \( \LoesG \) ein Unterraum von \(\R^n\), denn (mit Äquivalenzsatz):          Setzt man \( a_1 \coloneqq \left(\begin{smallmatrix}\alpha_{m1}\end{smallmatrix}\right), \dots, a_n \coloneqq \left(\begin{smallmatrix}\alpha_{mn}\end{smallmatrix}\right) \) und schreibt man die Elemente von \(\R^m\) als Spalten anstatt als Zeilen, so gilt \( a_1, \dots, a_n \in \R^n \) und \( \left(\xi_1, \dots, \xi_n\right) \in \LoesG \) genau dann, wenn     \end{enumerate}          \begin{enumerate}     \item Behauptung: \( x_1, \dots, x_n \) linear abhängig \( \iff \exists j \in \left\{ 1, \dots, n \right\} : x_j     \text{ Linearkombination}     \text{ von } x_1, \dots, x_{j-1}, x_{j+1}, \dots, x_m \).          \begin{beweis}     \item[\enquote{\( \implies \)}] \( x_1, \dots, x_m \) linear abhängig \( \implies \exists (\xi_1, \dots, \xi_n) \in K^m \setdiff \left\{0\right\} : 0 = \sum _{l=1} ^m \xi_l x_l \)          Wegen \((\xi_1, \dots, \xi_m) \neq (0, \dots, 0)\) existiert \( j \in \left\{ 1, \dots, m \right\} \) mit \( \xi_j \neq 0 \implies 0 = \xi_j ^{-1} \cdot 0 = \xi_j ^{-1} \cdot \sum _{l=1} ^m \xi_l x_l = \xi_j ^{-1} \xi_1 x_1 + \dots + \xi_j ^{-1} \xi_{j-1} x_{j-1} + x_j + \xi_j ^{-1} \xi_{j+1} x_{j+1}     + \dots + \xi_j ^{-1} \xi_m x_m \implies  x_j = \left(-\xi_j ^{-1} \xi_1\right) x_1 + \dots + \left(-\xi_j ^{-1} \xi_{j-1}\right) x_{j-1} +     \left(-\xi_j ^{-1} \xi_{j+1}\right) x_{j+1} + \dots + \left(-\xi_j ^{-1} \xi_m\right) x_m \), also ist \(x_j\) Linearkombination von \( x_1, \dots, x_{j-1}, x_{j+1}, \dots, x_m \).     \end{beweis}     \end{enumerate}          \begin{beweis}     \item[\enquote{\( \implies \)}] Beweis: Angenommen, \( \{ x_1, \dots, x_n \} \cap \{ y_1, \dots, y_m \} \neq \emptyset \implies x_1, \dots, x_n,     y_1, \dots, y_m \) paarweise verschieden und nach (\star) gilt \( 0 = x - x = \sum _{j=1} ^n \alpha_j x_j + \sum _{k=1} ^m (-\beta_k) y_k \implies \alpha_1 = \dots = \alpha_n = -\beta_1 = \dots = -\beta_m = 0 \), da \(A\) linear unabhängig ist. \(\wid_{b_{k_0}\neq0}\)          Mit dieser Hilfsbehauptung können wir nach eventueller Umnummerierung von     \( x_1, \dots, x_n \) annehmen, dass es \( l \in \{ 1, \dots, n \} \) gibt mit \( \{ x_1, \dots, x_n \} \in \{ y_1, \dots, y_m \} \), \( \{ x_{l+1}, \dots, x_n \}     \cap \{ y_1, \dots, y_m \} = \emptyset \) und \( x_j = y_j \) für alle \( 1 \leq j \leq l \).     \end{beweis}     \end{document}


title: Unable to reference new environments with RefTeX

text: I was trying to add new environments to AUCTeX doing what the RefTeX's manual says, so I added the following to my .emacs:               (add-hook 'LaTeX-mode-hook 'turn-on-reftex)          (setq reftex-label-alist        '(("axiom"   ?a "ax:"  "~\\ref{%s}" nil ("axiom"   "ax.") -2)          ("theorem" ?h "thr:" "~\\ref{%s}" t   ("theorem" "th.") -3)))          (add-hook 'LaTeX-mode-hook        (lambda ()          (LaTeX-add-environments            '("axiom" LaTeX-env-label)            '("theorem" LaTeX-env-label))))      The problem is that i have to reference these labels manually. I've tried to do what the RefTeX manual says: > For example if you write: ‘As we have shown in Theorem’and then press C-c ), > RefTeX will know that you are looking for a theorem label and restrict the > menu to only these labels without even asking. But with the following MWE               \documentclass{article}     \usepackage{amsmath}     \usepackage{amsthm}     \newtheorem{axiom}{Axiom}     \newtheorem{theorem}{Theorem}     \begin{document}     \begin{axiom}       \label{ax:1}       An axiom     \end{axiom}     \begin{theorem}       \label{thr:1}       A theorem     \end{theorem}          As we have shown in Theorem     \end{document}      it does not work, because it shows me the Axiom and the Theorem and doesn't even let me choose one (so I have to press `s``space` and then choose one). What could be the problem?


title: Gibberish when using HTML labels with dot2texi

text: I'm attempting to use some of the psuedo-HTML markup in graphviz to style my nodes:               \documentclass{hitec}     \usepackage{tikz}     \usetikzlibrary{shapes,arrows}     \usepackage{dot2texi}     \begin{document}     \title{Test}          \begin{tikzpicture}     \begin{dot2tex}[dot]       digraph G {         node [shape=plaintext]         "Test"[shape=box,label=<         <TABLE>         <TR>         <TD>         </TD>         </TR>         </TABLE>         >];              }     \end{dot2tex}     \end{tikzpicture}          \end{document}      When running this through either LaTeX or pdftex, I get output like this: ![enter image description here](http://i.stack.imgur.com/X4rCv.png) This happens regardless of if I have the graphviz code in line, or in an external file. Is this something unsupported by dot2tex, or do I have to escape the tags somehow?


title: Can DITA be rendered to PDF via LaTeX rather than XSL-FO?

text: (Typing "DITA" and "LaTeX" into Google is NSFW, but this is a genuine question!) I'm a technical writer rather than coder, but I'd appreciate a coder's answer. DITA is a maturing standard for modular technical writing. It seems to be gaining some popularly in the enterprise, but it's a bit hard to tell. The DITA-OT's PDF rendering is well known for being underwhelming, and this seems to be a feature of the limited XSL-FO transforms. I think this is a big factor in DITA's (so far) low adoption. I've used LaTeX via Org-mode, texinfo, LyX, etc., and these all produce lovely PDFs with the classy TeX look. I'm wondering why no-one seems to have produced a DITA to PDF rendering via LaTeX. Maybe it's technically very difficult, or maybe no-one's thought of it. Neither of these seem all that likely. Has any work been done on this? -- thanks


title: TeXShop command line arguments

text: Is there, somewhere, some documentation explaining what arguments TeXShop accepts when started, for example with the shell command "open" on mac os X? My specific problem is that I would like to be able to open a pdf at a specific page with TeXShop, from a unix shell script. Does anyone know how to do that? Thanks for any hint!


title: Lyx template for scientific paper

text: Anyone know of any simple Template for scientific paper which is easy to modify and looks great? So that i don't have to use several hour to find out the syntax.


title: error on generating pdf by Latex with CJK support

text: After adding unicode characters to `\title{}` micro:               \title{标题}      the following error occurs when running `make all-pdf` with a `.tex` file:               Writing index file mybook.idx     No file mybook.aux.     (/usr/share/texmf-dist/tex/latex/base/ts1cmr.fd)     (/usr/share/texmf-dist/tex/latex/psnfss/t1ptm.fd)     (/usr/share/texmf-dist/tex/context/base/supp-pdf.mkii     [Loading MPS to PDF converter (version 2006.09.02).]     ) (/usr/share/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty     (/usr/share/texmf-dist/tex/latex/oberdiek/grfext.sty)     (/usr/share/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))     (/usr/share/texmf-dist/tex/latex/hyperref/nameref.sty     (/usr/share/texmf-dist/tex/generic/oberdiek/gettitlestring.sty))     (/usr/share/texmf-dist/tex/latex/cjk/texinput/UTF8/UTF8.bdg)     (/usr/share/texmf-dist/tex/latex/cjk/texinput/UTF8/UTF8.enc)     (/usr/share/texmf-dist/tex/latex/cjk/texinput/UTF8/UTF8.chr)     ! Extra \else.     \CJK@XXX ...\number `#1\endcsname {`#2}{`#3}\else                                                       \csname u8:\string #1\stri...     l.124 \tableofcontents          ?      I have added the follow setting to the `.tex` file:               \hypersetup{unicode=true}     \usepackage{CJKutf8}     \AtBeginDocument{\begin{CJK}{UTF8}{gbsn}}     \AtEndDocument{\end{CJK}}      If I remove the unicode characters, and replace them with acsii characters, it works well. If anything I forgot to add to the `.tex` to achieve this? * * * the minimal `.tex` file to reproduce the error:               % Generated by Sphinx.     \def\sphinxdocclass{report}     \documentclass[letterpaper,10pt,english]{sphinxmanual}     \usepackage[utf8]{inputenc}     \DeclareUnicodeCharacter{00A0}{\nobreakspace}     \usepackage[T1]{fontenc}     \usepackage{babel}     \usepackage{times}     \usepackage[Bjarne]{fncychap}     \usepackage{longtable}     \usepackage{sphinx}     \usepackage{multirow}          \usepackage{CJKutf8}     \AtBeginDocument{\begin{CJK}{UTF8}{gbsn}}     \AtEndDocument{\end{CJK}}          \title{title 中文}     \date{June 21, 2013}     \release{1.0.0}     \author{author}     \newcommand{\sphinxlogo}{}     \renewcommand{\releasename}{Release}     \makeindex          \makeatletter               \begin{document}          \maketitle     \tableofcontents          \printindex     \end{document}      the specific error message:               (/usr/share/texmf-dist/tex/context/base/supp-pdf.mkii     [Loading MPS to PDF converter (version 2006.09.02).]     ) (/usr/share/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty     (/usr/share/texmf-dist/tex/latex/oberdiek/grfext.sty)     (/usr/share/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))     (/usr/share/texmf-dist/tex/latex/hyperref/nameref.sty     (/usr/share/texmf-dist/tex/generic/oberdiek/gettitlestring.sty))     (./mybook.out) (./mybook.out)     (/usr/share/texmf-dist/tex/latex/cjk/texinput/UTF8/UTF8.bdg)     (/usr/share/texmf-dist/tex/latex/cjk/texinput/UTF8/UTF8.enc)     (/usr/share/texmf-dist/tex/latex/cjk/texinput/UTF8/UTF8.chr)     ! Extra \else.     \CJK@XXX ...\number `#1\endcsname {`#2}{`#3}\else                                                       \csname u8:\string #1\stri...     l.32 \tableofcontents          ?      if I remove the unicode characters from `\title{title 中文}` into `\title{title}`, it works well.


title: Runaway argument

text: The following code:               \begin{align*} \lim_{u\rightarrow\infty}\frac{\psi(u)}{\overline{F_I}(u)}&=\left(\frac{\rho}{1+\rho}\right)\sum_{n=0}^{\infty}n(1+\rho)^{-n}\\     &=\left(\frac{\rho}{1+\rho}\right)\sum_{n=0}^{\infty}\sum_{m=0}^{n}(1+\rho)^{-n}\\     &=\left(\frac{\rho}{1+\rho}\right)\sum_{m=0}^{\infty}\sum_{n=m}^{\infty}(1+\rho)^{-n}\\     &=\sum_{m=0}^{\infty}(1+\rho)^{-m}=\frac{(1+\rho)^{-1}}{1-(1+\rho)^{-1}}=\rho^{-1}.\qed \end{align*}      produces following error:               "! Paragraph ended before \align* was complete.     <to be read again>                         \par "      What seems to be the problem? Edit: * * * Actually, the culprit was the following alignment above the original alignment               \documentclass[a4paper, twoside, ngerman, openright, 12pt]{report}      \usepackage[T1]{fontenc}     \usepackage[ngerman]{babel}     \begin{document}      \begin{align*}      \frac{\psi(u)}{\overline{F_I}(u)}&=\left(\frac{\rho}{1+\rho}\right)\sum_{n=1}^{\infty}(\frac{\lambda\mu}{c})^{n}\frac{\overline{F_I^{n }}(u)}{\overline{F_I}(u)}\\     &\leq K\left(\frac{\rho}{1+\rho}\right)\sum_{n=1}^{\infty}\left(\frac{1+\rho\right)^{-n}(1+\epsilon)^{n}<\infty.     \end{align*}     \end{document}


title: How to draw lines between nodes that point at the node center, but stop at the nodes edge

text: I'm drawing nodes on a circle and switched from drawing lines based on coordinates to drawing them based on named nodes. The problem now is, that with the following code the lines stop at the edges of the nodes, but don't point at the center. How do I fix this?               \begin{tikzpicture}         \xdef\nodes{16}         \pgfmathsetmacro{\nodesminusone}{\nodes-1}         \pgfmathsetmacro{\N}{log2(\nodes)}         \xdef\deltadegree{360/\nodes}         \draw (0,0) circle (6);              \foreach \i in {0,...,\nodesminusone}             \node[circle,fill=white,draw=black,thick] (node\i) at (-\i*\deltadegree+90:6) {\i};              \foreach \i in {0,...,\nodesminusone}{             \foreach \j in {0,...,\N}{                 \pgfmathsetmacro{\result}{mod(\i+2^\j,\nodes)}                 \draw[->,thick,color=black!10] (node\i) -- (node\result);                  }         }              \foreach \i in {2} {             % predecessor             \pgfmathsetmacro{\result}{mod(\i-1,\nodes)}             \draw (node\i) -- (node\result);                       % successor             \pgfmathsetmacro{\result}{mod(\i+1,\nodes)}             \draw (node\i) -- (node\result);                  % fingers             \foreach \j in {0,...,\N}{                 \pgfmathsetmacro{\result}{mod(\i+2^\j,\nodes)}             \draw[->,color=blue,thick] (node\i) -- (node\result);             }         }     \end{tikzpicture}


title: is it possible to change the depth of subscripts?

text: I have the following formula:               $ F_{\!\bm{H}}  F_{\overline{\!\!\bm{H}\!}} $      In this case both subscripts end at different depths (but start at the same height). I'd like them to end at the same depth. Has anybody an idea?


title: How do I get the exact dimension of a picture in LaTeX?

text: This question is pretty simple: I'd like to have the possibility to get the exact size of a picture in LaTeX with, for example, the macro `\the`. In fact, I've founded the way `\settoheight{}` and so on, but it didn't work at all. What I've got doesn't match with what I can see in the image properties (I suppose that's the name in English). The result: 8pt versus 1300 pixels. It's may be a mis-use... Edit: In the end, my aim was to find a way to fit the picture in LaTeX. If width and height were both less than the dimensions of the body, then it should just be centred. It look like this : * * * Require:               \usepackage{graphicx}     \usepackage{xifthen}     \usepackage{calc}      Code (pretty ugly, I agree):               % Centrering+fitting for image, with captation and label (not auto)     \newlength\imageheight     \newlength\imagewidth     \newcommand{\pic}[3]{%     \settoheight\imageheight{\includegraphics{pictures/#1.png}}%     \settowidth\imagewidth{\includegraphics{pictures/#1.png}}%     \ifthenelse{\lengthtest{\imagewidth > \textwidth}}{\ifthenelse{\lengthtest{\imageheight > \imagewidth}}{\par\vspace{0.95em}%     \begin{figure}         \centering\includegraphics[height=0.85\textheight]{pictures/#1.png}         \caption{#2}         \label{#3}     \end{figure}%     \par\vspace{0.95em}}{\par\vspace{0.95em}%     \begin{figure}         \centering\includegraphics[width=0.95\textwidth]{pictures/#1.png}         \caption{#2}         \label{#3}     \end{figure}%     \par\vspace{0.95em}}}{\ifthenelse{\lengthtest{\imageheight > \textheight}}{\par\vspace{0.95em}%     \begin{figure}         \centering\includegraphics[height=0.85\textheight]{pictures/#1.png}         \caption{#2}         \label{#3}     \end{figure}%     \par\vspace{0.95em}}{\par\vspace{0.95em}%     \begin{figure}         \centering\includegraphics{pictures/#1.png}         \caption{#2}         \label{#3}     \end{figure}%     \par\vspace{0.95em}}}}     %      To use it : put your png files in a "pictures" directory, then, just simply call the picture like this : `\pic{name_whitout_extension}{Captation_if_needed}{Label_if_needed}`. * * * Edit 2 : Thanks to Martin Scharrer's `easyfig` package, I've got a more or less 1,6 times faster solution to put my pictures, centred, with the perfect size. CTAN: http://www.ctan.org/pkg/easyfig VC: https://bitbucket.org/martin_scharrer/easyfig Version v1.2 – 2012/05/15 * * * This could be useful for some others, I hope.


title: Multiple Files input to one pgfplotstable

text: I have several data files that I would like to combine into one table using pgfplots table. Specifically, I would like to use one file to set the first three columns and then have each data file fill in another column after that (the first two columns are experimental parameters, consistent in every file). The files are tab delineated. Can I set pgfplots up to do this, and if so, how? I've dug through the manual and tried using `pgfplotscreatecolumn` and `createonuse` but neither one seems to be suited to the task.


title: Bar plot legend not displaying correctly

text: In the legend for a bar plot that I'm building, I'm only getting a small tick next to the name, not a block of color. I'm not defining any special cycle lists. The code for the plot is:               \begin{figure}     \caption{Comparison of Solutions}     \begin{tikzpicture}       \begin{axis}[xbar interval=0.7, height=400pt, width=3.25in, symbolic y coords={a,b,c,d,e}, ylabel={Number of Nodes}, xlabel={Number of Colors}, yticklabels={50,100,200,500,100}, legend style={cells={anchor=south west, inner xsep=0, inner ysep=0, fill}, nodes={inner sep=0}}]       \addplot table [x=colors, y=symb]{\colorseight};       \addplot table [x=colors, y=symb]{\colorssixteen};       \addplot table [x=colors, y=symb]{\colorsthirtytwo};       \addplot table [x=colors, y=symb]{\dfseight};       \addplot table [x=colors, y=symb]{\dfssixteen};       \addplot table [x=colors, y=symb]{\dfsthirtytwo};       \addplot table [x=colors, y=symb]{\comeight};       \addplot table [x=colors, y=symb]{\comsixteen};       \addplot table [x=colors, y=symb]{\comthirtytwo};       \legend{DiMa2eD (4 links), DiMa2ed (8 links), DiMa2ed (16 links),4,5,6,7,8,9,10,11,12}       \end{axis}     \end{tikzpicture}     \label{plo:colors}     \end{figure}      Each macro refers to a different tab deliniated file. Here is one that can be duplicated for experimenting.               nodes   colors  links   symb     50  178     16  a     100     176     16  b     200     177     16  c     500     183     16  d     500     183     16  e      and the preamble command to create the macro:               \pgfplotstableread{data/dfs.tab}\bestdfs


title: Spacing in Dirac's ket vector

text: I have defined myself a `\ket` which does `\left| #1 \right\rangle`. For a state with two numbers, say `n` and `m`, one writes, on paper, `|a b>`. What kind of distance should I use to separate those numbers? `\,` or more?


title: Detecting all pages which contain color

text: In an larger LaTeX document there are often only some pages with color content (mainly figures) and the remaining ones are only black and white. Because printing costs for color pages are much higher than for black and white it would be good to be able to extract all pages with color and print them separately. The first step for this is to be able to detect if a page contains color or not. This could be in a form of an text list of page number suitable to be read by a PDF page extraction script (using e.g. `pdftk`). A simple solution sufficient for many people would be to detect all pages which contain a `figure` and assume that only these have color. However, a general solution would be nice. Only color elements which are printed should be taken into account, while e.g. the color frames around link by `hyperref` should not. It is OK that the solution would disable these for the detection.


title: \caption{title subsubsection}

text: I am entering the following code in more than 180 times after each `\subsubsection`. Is there any way to automate `\caption{subsubsection title}`? I tried with `\caption{\subsubsectiontitlename}` but it does not work.               %%%%%%%%          \begin{figure}[H]     \caption{títol \subsubsection}     \subfloat[Mostres absolutes]{     \includegraphics[width=0.50\linewidth]{Columna_34_absol.jpg}}     \subfloat[Mostres ponderades]{     \includegraphics[width=0.50\linewidth]{Columna_34_pond.jpg}}     \\     \subfloat[]{     \includegraphics[scale=0.1]{Formatge_34_preg.jpg}}     \subfloat[]{\includegraphics[width=0.33\linewidth]{Formatge_34_absol.jpg}}     \hfil     \subfloat[]{\includegraphics[width=0.33\linewidth]{Formatge_34_pond.jpg}}\hfil     }     \end{figure}          %%%%%%%%%%%%%%%%


title: Testing for macros by name

text: I'm curious to know how I would go about testing for macros by name. I need to do something that would be the logical equivalent of the following:               \def\doit#1{%     \if#1==\foo I got a foo\fi     \if#1==\bar I got a bar\fi     }      Now, of course I'm aware that `\if` doesn't work that way. The notation == isn't actually a thing, and the fact that `\if` expands macros is undesirable for my purposes, because I might want to do `\doit\foo` without `\foo` even being defined. However, I hope that the above pseudo-code serves to illustrate my question nonetheless. I'm aware that there are better ways to pass named "flags" to a macro than as control sequences, but for reasons I won't go into here I really am constrained to macro names, and I really do need to be able to check if, given two macro tokens, their names are both the same. Note that I'm using Plain TeX, and I'm seeking a solution that uses only TeX primitives and/or Plain TeX macros.


title: Different arrow line styes and different row sizes in tikzpicture

text: I am using `tikzpicture` environment, together with `\matrix` command to draw a diagram. I have two questions:   1. Can I use different arrow line styles in the same matrix? For instance, the matrix called m, let's say, I want dashed arrow from `m-1-2` to `m-1-4` and solid arrow from `m-3-1` to `m-3-3`, also I want a solid arrow from `m-3-1` to `m-1-2`.   2. Can I use different row sizes in one matrix?


title: Controlling the exact position of objects on a page

text: I'm using Linux on a server (CentOS 5) to generate a one page PDF report using LaTeX. The LaTeX distribution is quite old - `latex --version` returns the following:               pdfeTeX 3.141592-1.21a-2.2 (Web2C 7.5.4)     kpathsea version 3.5.4     Copyright (C) 1997-2004 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).     Kpathsea is copyright (C) 1997-2004 Free Software Foundation, Inc.     There is NO warranty.  Redistribution of this software is     covered by the terms of both the pdfeTeX copyright and     the GNU General Public License.     For more information about these matters, see the files     named COPYING and the pdfeTeX source.     Primary author of pdfeTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).     Kpathsea written by Karl Berry and others.      As a result, there are several packages that are not available to me (`wallpaper` for example). I've made a pdf file for headers and footers which I insert as figures at the top and bottom of the page, and have some images inserted in the center part of the page. Is there a way that I can specify the location of objects using co-ordinates, rather than letting LaTeX choose the positioning? For the most part my current layout is satisfactory, but I would like to make sure that my footer is locked to the bottom of the page (for example). I'd prefer not to install a recent version of LaTeX on the server as most things are currently working but just need some fine tuning.


title: How to install mathpazo correctly from TeX Live Manager?

text: I've just installed BasicTeX 2013, which is the MacTeX equivalent of the TeX Live "small" scheme. Using TeX Live Utility (MacTeX's GUI for `tlmgr`), I've installed `mathpazo`, but a minimal example               \documentclass{article}     \usepackage{mathpazo}     \begin{document}     \end{document}      yields the error: (after the usual Metafont complaints)               ./small.tex:3: Font OT1/ppl/m/n/10=pplr7t at 10.0pt not loadable: Metric (TFM)      file not found.      After installing the `palatino` package, this error goes away, but a slightly less minimal example:               \documentclass{article}     \usepackage[osf]{mathpazo}     \begin{document}     hello 123     \end{document}      Now yields the less promising:               !pdfTeX error: /usr/texbin/pdflatex (file fplrc8a.pfb): cannot open Type 1 font      file for reading      ==> Fatal error occurred, no output PDF file produced!      Uh oh. I'm stuck for ideas for what to try next.


title: Node diagram with encompassing circles

text: I'm attempting to draw an image similar to this one: ![enter image description here](http://i.stack.imgur.com/YkEpy.gif) However, I only want to draw three nodes as text ("A", "B", "C") with double headed arrows and the larger overlapping circles.... I've had marginal success with the following:               \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=2.8cm,semithick]       \tikzstyle{style}=[fill=white,draw=none,text=white]       \tikzstyle{line} = [draw, -latex']            \node[state]         (A)              {A};       \node[state]         (B) [right of=A] {B};       \node[state]         (C) [right of=B] {C};            \path [line, <->] (A) -- (B);       \path [line, <->] (B) -- (C);     \end{tikzpicture}      However I cannot get the overlapping outer circles. They should overlap such that the one around A encompasses B, the one around B encompasses A and C, and the one around C encompasses B.


title: Customize table of contents

text: I have a table of contents page which has several sections and subsections. Now, before i start a topic i want to display the all the sections+ sub section of the topic i am going to start. How can i achieve this? I have tried hideallsubsections but it hides all the subsections..is there any command call display current subsection or anything like that? please help               \tableofcontents[hideallsubsections]


title: List sections of chapter at beginning of that chapter

text: How can one have a mini table of contents for the current chapter appear just after the chapter name listing all sections of that chapter?


title: Each chapter with own contents?

text: > **Possible Duplicate:**   >  List sections of chapter at beginning of that chapter I'm wondering whether its possible to have each chapter of a thesis with its own **contents page**? I tried it using the next few lines, and everything works...except that the next main page is affected.               \pagestyle{empty}     \maketitle     \thispagestyle{empty}     \pagestyle{empty}      The idea is to have something like this (just an additional page, not to affect the main chapter page). However, the next page shows continuation of 1.3, doing '1.4 Introduction'                   --------------------         Chapter One              1.1 Introduction         1.2 Overview         1.3 Aims of thesis         --------------------      Any ideas to break the link between the two pages?


title: How to put table of contents at the beginning of each chapter?

text: How can i have such a format in every chapter in my thesis. More specifically i would like this table of contents for each chapter depending on its subsections.![enter image description here](http://i.stack.imgur.com/eLFJ2.png)


title: Automated partial TOC

text: > **Possible Duplicate:**   >  List sections of chapter at beginning of that chapter Hello, I need to make a small chapter TOC at each chapter. What I need is something like: ## Chapter 3 - Chapter 3 name               This chapter describes.....      > >     The section list is: >   >      - Section 3.1 name >      - Section 3.2 name >      - Section 3.3 name >                 And the text continues here...      Is there any automated way to produce that chapter TOC (highlighted) instead of building it myself with references to labels (I need it to be a clickable reference without page numbers)? The problem of doing it in a manual way is that each time I change a section I have to come back and adjust this part of the chapter. And I will need to do this to many chapters in my report. Thanks in advance!


title: Fraction with longer line

text: I'm trying to display some axioms and operational rules with LaTeX. Those are basically . They work quite well when used with frac, but it's not really nice, I'd like the fraction line to be a bit longer. I know that sounds a bit vague, so here is a picture of what I am trying to achieve. I'm pretty sure that document has been typeset in LaTeX, so it should be doable. ![Photo of what I am trying to achieve](http://i.stack.imgur.com/JAAZH.jpg)


title: Why does manually loading hyperref change the font size for captions in Tufte documents?

text: I'm using Tufte document classes and need to manually load `hyperref` rather than have it loaded by the Tufte class. So I'm using the `nohyper` option with the document class, and later use `\usepackage{hyperref}` in code. When I do this, the font size for captions (though not footnotes) changes to that of body text:               \documentclass[nohyper]{tufte-handout}     \usepackage{inputenc}     \usepackage{graphicx}          \usepackage[pdftex,hyperfootnotes=false]{hyperref}          \begin{document}     Body text.     \begin{marginfigure}     \includegraphics[width=1\columnwidth]{agraphic}\caption{Caption text}     \end{marginfigure}          \end{document}      If I remove the `\usepackage[...]{hyperref}` line, the caption font size is correct (whether I specify `nohyper` or not). As near as I can tell, except for some link coloring details and metadata assignment, I'm doing exactly the same thing that the Tufte class would do without the `nohyper` option.


title: Problem with thmtools + scrbook + parskip=half

text: I want to draw a frame around my "thmtools" theorems. Theorems should look like the first example. The problem is that sometimes my theorems are getting quite long and should be spanned over two pages. This only works if I define my frames using the mdframed=... parameter (example 2). So far so good... The problem is that I use KOMA-Script together with "parskip=half" parameter and the top rule strikes out the first text row if I draw the frames using mdframes=.... How can I fix this? It works if I remove the parskip=half but I don't want this.               \documentclass[parskip=half]{scrbook}     \usepackage{blindtext}     \usepackage{amsthm}     \usepackage{thmtools}          \declaretheoremstyle[         shaded={rulecolor=black, bgcolor={rgb}{1,1,1}, rulewidth=1pt}     ]{mystylea}          \declaretheoremstyle[         mdframed={backgroundcolor=white, innertopmargin=0pt, innerbottommargin=1pt, innerleftmargin=1pt, innerrightmargin=1pt, skipabove=1em, skipbelow=1pt, splittopskip=10pt, splitbottomskip=6pt}     ]{mystyleb}          \declaretheorem[style=mystylea]{definitiona}     \declaretheorem[style=mystyleb]{definitionb}               \begin{document}     \blindtext     \begin{definitiona}[Definition 1]       \blindtext     \end{definitiona}     \blindtext     \begin{definitionb}[Definition 2]       \blindtext     \end{definitionb}     \blindtext     \end{document}


title: Wrap equation to new line, in array environment

text: Is it possible to wrap an equation to a new line (such as in How to wrap a long equation in latex but within an array environment? I have a column vector of regressors that I want to show over two rows. My code without wrapping looks like this               \begin{equation}       \label{eq:designmat}       X_i=\left[\begin{array}{ccccccccc}1&\textrm{CitySize}_i&           \textrm{NoMotorways}_i&\textrm{ElevatedMotorways}_i&           \textrm{SpeedLimit}_i&\textrm{Policing}_i&\textrm{TrafficLights}_i&           \textrm{TransitLanesTrue}_i&\textrm{Aggression}_i\end{array}\right]^T     \end{equation}      I'd like it to look something like:               X = [var1 var2 var3 var4             ... var5 var6 var7 var8]^T


title: What benefits can I get from using utf-8 encoding instead of cp1251 for Russian?

text: I'm preparing to make a small package for typesetting math textbooks in Russian, under Windows (MikTeX distribution). What input encoding should I prefer? I've always been using cp1251, but as I learned after exploring this incredible site, using utf-8 will allow authors to use some nice fonts. What else can get with utf-8?


title: Horizontal margincaption alignment using floatrow

text: I want to switch from `sidecap` to `floatrow` in putting figure captions in the margin. When using `sidecap`the text is perfectly positoned within the margin. When i use floatrow there is a slight shift. What am i doing wrong? Note: Adding `marginparsep=50pt`to the geometry package exacerbates this problem. Seems like the distance `marginparsep` is not properly set by floatrow. Mh. ![enter image description here](http://i.stack.imgur.com/PqzJw.png) Code:                 \documentclass[twoside]{scrartcl}       \usepackage[a4paper,textwidth=300pt,marginparwidth=150pt,inner=1in,asymmetric]{geometry}       \usepackage{blindtext}       \usepackage{showframe}       \usepackage[format=plain]{caption}       \usepackage[english]{babel}       \usepackage{floatrow}       \usepackage[margincaption]{sidecap}       \begin{document}            \section{one}            \blindtext[1]            \begin{SCfigure}[][h]       \rule{3.5in}{0.5in}       \caption{Nulla malesuada porttitor diam. Donec felis erat, congue non, volut- pat at, tincidunt tristique, libero.}       \label{fig}       \end{SCfigure}            \thisfloatsetup{%       floatwidth=\linewidth,       capposition=beside,       capbesideposition={bottom,right},       capbesidewidth=\marginparwidth,       }       \begin{figure}[h]       \raggedleft       \rule{3.5in}{0.5in}       \caption{Nulla malesuada porttitor diam. Donec felis erat, congue non, volut- pat at, tincidunt tristique, libero.}       \label{fig}       \end{figure}                      \end{document}


title: Subsections of one section do not appear in TOC (LaTeX beamer mode)

text: I'm trying to prepare a presentation using LaTeX's beamer mode. For some reason the subsections of my last section do not show up in the TOC. Here is my MWE (incl. all the packages I'm using):               \documentclass[a4paper,11pt,fleqn,compress]{beamer}     \usepackage[english,ngerman]{babel} % language listed last is default setting     \usepackage[utf8x]{inputenc}          \usepackage{amsmath, amsthm, amssymb, amsbsy}     \usepackage{nccmath} % includes {fleqn} environment     \usepackage{bbm} % includes \mathbbm{} symbols           \usepackage{braket} % Bra-Ket notation in quantum mechanics           \usepackage{helvet} % font set to "helvetica"          \usepackage[normalem]{ulem}     \usepackage{microtype}           \parindent=0mm % indent to indicate new paragraph prohibited          \makeatletter     \@addtoreset{section}{chapter}     \makeatother % section count set to 0 when new chapter begins          \usepackage{listliketab}     \usepackage{tabto}     \usepackage{isotope}      \usepackage{extarrows}          \usepackage{graphicx}     \usepackage{grffile} % changes the algorithm to check for known file extensions instead of using the first dot "." to find the file extension as conducted by "graphicx" and also "graphcis"          \DeclareMathSizes{12}{9}{7}{5}          \usepackage{caption}     \usepackage{subfigure}           \let\origitem\item     \renewcommand{\item}{\normalfont\origitem}     \newcommand{\bolditem}{\normalfont\bfseries\origitem}          \newcommand{\eqqcolon}{\mathrel{=\!\!\mathop:}}     \newcommand{\coloneqq}{\mathrel{\mathop:\!\!=}}          \usepackage{pdfpages}                % following content recommended for LaTeX beamer mode          \title{\textbf{Title}}     \subtitle{Subtitle}     \author{Author}      \institute{Institute}     \date{\scriptsize{Date}}               \setbeamertemplate{navigation symbols}{} % default navigation symbols hidden     \usetheme{Berlin}          \setbeamertemplate{section in toc}[sections numbered]     \setbeamertemplate{subsection in toc}[subsections numbered]          \setbeamertemplate{section in head/foot}    {\hfill\insertsectionheadnumber.~\insertsectionhead}     \setbeamertemplate{section in head/foot shaded}{\color{structure!50}\hfill\insertsectionheadnumber.~\insertsectionhead}     \setbeamertemplate{section in toc}{\inserttocsectionnumber.~\inserttocsection}          \AtBeginSection[]     {     \begin{frame}     \frametitle{Table of Contents}     \small \tableofcontents[currentsection,hideothersubsections]     \end{frame}     } % display table of contents with current section higlighted automatically               \begin{document}          { % to delimit a block (changes apply for this block only)     \makeatletter % to change template     \setbeamertemplate{headline}[default]     \def\beamer@entrycode{\vspace*{-\headheight}}     \setbeamertemplate{footline}[default]     \def\beamer@entrycode{\vspace*{-\footheight}}     \makeatother     \frame{\titlepage}      }          { % to delimit a block (changes apply for this block only)     \makeatletter % to change template     \setbeamertemplate{headline}[default]     \def\beamer@entrycode{\vspace*{-\headheight}}     \makeatother     \begin{frame}     \frametitle{Table of Contents} \small \tableofcontents     \end{frame}     }               \section{Section 1}          \subsection{Subsection 1.1}          \subsection{Subsection 1.2}          \subsection{Subsection 1.3}          \subsection{Subsection 1.4}               \section{Section 2}          \subsection{Subsection 2.1}          \subsection{Subsection 2.2}               \section{Section 3}          \subsection{Subsection 3.1}          \subsection{Subsection 3.2}          \subsection{Subsection 3.3}          \subsection{Subsection 3.4}               \section{Section 4}               \section{Section 5}          \subsection{Subsection 5.1}          \subsection{Subsection 5.2}          \end{document}      I can't seem to find my mistake. Thank you for your help.


title: How to put a figure on below paragraph in latex

text: I want put figure below the paragraph in Latex (one page) i use winshell but always it's apply the figure above the paragraph note: there is enough space to put figure I want to put figure below the paragraph in one page both figure and paragraph should be in one page but always figure go above how solve this ================== I put caption here !               \begin{figure}      \centering     \includegraphics[width=4in]{image}     \caption[my image]{Imy image}     \end{figure}


title: 4 set venn diagram in TikZ

text: Is it possible to make a 4-set venn diagram using the tikz packages, like the following one? I know it must be, but the only information I can find on the subject uses R as the language. ![enter image description here](http://i.stack.imgur.com/z4pKb.jpg) So, an update. I am now wondering how to best fill just the isolated fields, that is, the part only in A, the part only in B, etc. For now, I have just the part in D filled. Any suggestions? Code below:               \documentclass[12pt]{article}          \usepackage{tikz} \usetikzlibrary{positioning,shapes.geometric}          % For drawing     \def\firstellip{(1.6, 0) ellipse [x radius=3cm, y radius=1.5cm, rotate=50]}     \def\secondellip{(0.3, 1cm) ellipse [x radius=3cm, y radius=1.5cm,     rotate=50]} \def\thirdellip{(-1.6, 0) ellipse [x radius=3cm, y radius=1.5cm,     rotate=-50]} \def\fourthellip{(-0.3, 1cm) ellipse [x radius=3cm, y     radius=1.5cm, rotate=-50]} \def\bounding{(-5,-3) rectangle (5,4)}          \begin{document}          \begin{tikzpicture} \filldraw[fill=black, opacity=0.2] \bounding;              \scope \fill[white] \fourthellip; \endscope \filldraw[fill=red,         opacity=0.2] \fourthellip;              %single colors         \scope \fill[white] \secondellip; \fill[white] \thirdellip; \fill[white]         \firstellip; \endscope              \draw \firstellip node [label={[xshift=2.0cm, yshift=-0.9cm]$A$}] {};         \draw \secondellip node [label={[xshift=2.2cm, yshift=2.1cm]$B$}] {};         \draw \thirdellip node [label={[xshift=-2.0cm, yshift=-0.9cm]$C$}] {};         \draw \fourthellip node [label={[xshift=-2.2cm, yshift=2.1cm]$D$}] {};         \draw \bounding node [label=above left:$U$] {};          \end{tikzpicture}  \end{document}      And displays as follows, I'm trying to get red in the four "corners". Thanks so much: ![enter image description here](http://i.stack.imgur.com/j2UB6.png)


title: Multibib question

text: I have the following problem with multibib: when I use the tex code * * *               \documentclass[a4paper,11pt,german,american]{article}          \usepackage[resetlabels,labeled]{multibib}     \newcites{J}{\normalsize{Journal publications}\vspace*{0truemm}}     \newcites{C}{\normalsize{Conference publications}\vspace*{0truemm}}     \newcites{R}{\normalsize{General publications}\vspace*{0truemm}}          \begin{document}          x \citeJ{dokodurime14} \citeC{pikorihl14}      y \citeR{dokodurime14} \citeR{pikorihl14}      z \citeJ{dokodurime14} \citeC{pikorihl14}          \bibliographystyleR{IEEEtran}     \bibliographyR{references}               \bibliographystyleJ{IEEEtran}     \bibliographyJ{references}          \bibliographystyleC{IEEEtran}     \bibliographyC{references}     \end{document}      * * * then the outcome is: x [R1] [R2] y [R1] [R2] z [R1] [R2] but it should be: x [J1] [C1] y [R1] [R2] z [J1] [C1] Any idea what I made wrong? (The three bibliographies are correct.)


title: How to automatically resize the vertical bar in a set comprehension?

text: I have a simple command which I use to write set comprehensions so that the braces automatically resize with respect to size of the enclosed arguments, e.g.               \usepackage{amsmath}     \newcommand{\set}[1]{\left\lbrace #1\right\rbrace}          \begin{equation*}     \set{x \in X \mid x > \frac{1}{2}}       \end{equation*}     % Produces something like: { x : X | x > 1/2 }      However, the `\mid` vertical bar wont resize like the braces `{ .. }` do. How can I get the `\mid` to resize as well?


title: pgfplots pins in front of the axes

text: I wish to draw two pins on a plot:               \documentclass{standalone}     \usepackage{pgfplots,tikz}     \begin{document}     \begin{tikzpicture}      \begin{axis}       \addplot {x^2} node[pos=1,pin={[pin distance=0.5em, rounded corners, red, draw=red, fill=red!10!white]20:{$c$}}] {}       node[pos=0.8,pin={[pin distance=0.5em, rounded corners, red, draw=red, fill=red!10!white]20:{$c$}}] {};      \end{axis}     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/tV2Ie.png) As you can see, the top-right pin is behind the axes and therefore is clipped and partially unreadable. Is there a way to alter the z-axis ordering of the nodes so that the pin is in front of the rest of the image and thus is not cropped?


title: Caption at foot of long tables ('longtable' package)

text: I would like to ask a question about `longtable` package. I've already posted it in other forums. I have a long table (a several-pages-long one) using `longtable` package and I would like to add a table caption at the bottom of every piece of table, but a different one in the FIRST page. `longtable` package allows a different "header" in the first page of the table (`\endfirsthead`) and/or a different "footer" in the LAST page of the table (`\endlastfoot`). What I would like to do is a different foot caption in the FIRST page of the table. My example would be something like this: First page table foot caption: "Table 1.2: Table description and so, and so...". Following page table foot captions: "Table 1.2 (contd.): Table description and so, and so...". It is similar to the example available at the documentation of `longtable` package about the usage of `\endfirsthead`, but I want to put it at the bottom of the tables because captions for all figures and tables in my document are at the foot, not at the head. Is it so strange what I want to do?? How can I do it with `longtable`? I would be very grateful if you could give me any hint or tip. Thank you in advance for your answers! :)


title: Unset caption preface for figure

text: > **Possible Duplicate:**   >  Change caption name of figures I have a caption and it reads Figure 1: etc.... I would like to replace "Figure" with "Image". I think the answer is similar to my other question about subsection numbering here but I am not certain.               \documentclass[12pt, a4paper, twoside]{article}     \usepackage[margin=1in,bindingoffset=15.5mm,heightrounded]{geometry}     \usepackage[T1]{fontenc}     \usepackage{graphicx}     \begin{document}     I have some text here.  Then pics.     \newpage     \begin{figure}[ht!]     \centering     \includegraphics[scale=0.75, angle=90, width=\textwidth]{hamlet.jpg}     \caption{cool picture}     \end{figure}     \newpage     \begin{figure}[ht!]     \centering     \includegraphics[scale=0.75, angle=270, width=\textwidth]{kinglear.jpg}     \caption{cool picture 2}     \end{figure}     \newpage     some more text here     \end{document}


title: Change abstractname

text: > **Possible Duplicate:**   >  Change caption name of figures   >  How to change the name of document elements like “Figure”, “Contents”, > “Bibliography” etc.? I'm using the `book` class in my document and I created an abstract using this piece of code:               \newenvironment{abstract}%         {\cleardoublepage\thispagestyle{empty}\null\vfill\begin{center}%         \bfseries\abstractname\end{center}         {\vfill\null}      Now I would like to change `\abstractname`. I tried `\renewcommand{\abstractname}{Name}`, but it didn't work.


title: How to change figure caption to Fig. 1. in stead of Fig. 1:

text: My Figure caption is now like this: (Fig. 1:Caption of figure) and I want to change it to (Fig. 1. Caption of figure). Also in the Table caption I want to get it like this: (Table II. Title of table). I am uisng IEEE conference document.


title: Caption for figure

text: > **Possible Duplicate:**   >  Change caption name of figures I have a figure. When I use `\caption{Example}`. I get `Figure 1: Example`. If I want `Figure 1. Example`, how must I do? Please help me. This is my code               \documentclass{article}     \usepackage{amsmath,amsxtra,amssymb,latexsym, amscd,amsthm}     \usepackage{color, graphicx}     \usepackage{pstricks-add}     \begin{document}     \begin{figure}[!ht]     \centering     \psset{xunit=1.0cm,yunit=1.0cm,algebraic=true,dotstyle=*,dotsize=3pt 0,linewidth=0.8pt, arrowsize=3pt 2,arrowinset=0.25}     \begin{pspicture*}(-3.6,-1.71)(7.28,5.43)     \psline[linestyle=dashed,dash=2pt 2pt](0,0)(-2,-1)     \psline[linestyle=dashed,dash=2pt 2pt](0,0)(6,0)     \psline[linestyle=dashed,dash=2pt 2pt](0,0)(0,4)     \psline(0,4)(-2,-1)     \psline(0,4)(6,0)     \psline(1,-1)(0,4)     \psline(-2,-1)(1,-1)     \psline(1,-1)(6,0)     \psline[linestyle=dashed,dash=2pt 2pt](0,2)(-2,-1)     \psline[linestyle=dashed,dash=2pt 2pt](0,2)(3,2)     \psline(3,2)(1,-1)     \psline{->}(6,0)(6.98,0)     \psline{->}(-2,-1)(-2.66,-1.33)     \psline{->}(0,4)(0,5)     \rput[tl](-2.78,-1.03){$x$}     \rput[tl](6.84,-0.16){$y$}     \rput[tl](-0.5,4.32){$2a$}     \rput[tl](5.9,0.5){$2a$}     \rput[tl](-2.2,-0.7){$a$}     \psdots(0,0)     \rput[bl](-0.04,-0.32){$A$}     \psdots(-2,-1)     \rput[bl](-2.2,-1.4){$B$}     \psdots(6,0)     \rput[bl](5.86,-0.32){$D$}     \psdots[dotsize=1pt 0,dotstyle=o](6.98,0)     \psdots[dotsize=1pt 0,dotstyle=o](-2.66,-1.33)     \psdots(0,4)     \rput[bl](0.08,4.1){$S$}     \psdots[dotsize=1pt 0,dotstyle=o](0,5)     \rput[bl](0.08,5){$z$}     \psdots(1,-1)     \rput[bl](0.94,-1.35){$C$}     \psdots[linecolor=black](0,2)     \rput[bl](-0.5,2.09){\black{$M$}}     \psdots[linecolor=black](3,2)     \rput[bl](3.08,2.09){\black{$N$}}     \end{pspicture*}     \caption{Example}     \end{figure}     \end{document}


title: Abbreviate "figure"

text: > **Possible Duplicate:**   >  Change caption name of figures I'm using scrbook for the document class. Is there an easy way to abbreviate "Figure 1" in order to have "Fig. 1" ? The proposed answer didn't solve it, see a MWE below:               \documentclass[12pt,oneside,ngerman,toc=bibliographynumbered,toc=flat]{scrbook}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{babel}     \renewcommand\figurename{Fig.}     \makeatother     \begin{document}     \begin{figure}     \caption{\textbf{\label{fig:Verlaufsformen-der-MS}Verlaufsformen der MS als graphische Abbildung nach Lublin und Reingold 1996}}     \end{figure}     \end{document}


title: How can I replace colon with dot in caption figure?

text: I have a `\documentclass[11pt, twoside, a4paper, twocolumn]{article}` I have something like this: `Figure: xxxxxxxx` And I need: `Figure. xxxxxxxxx` I need change the colon with a dot. An example of my figures:               \begin{figure*}       \centering       \includegraphics[width=0.7\textwidth]{ZonaInfluencia.png}       \caption{Study area}       \label{AreaInfluencia}     \end{figure*}


title: Figure to Fig in both Caption and Autoref

text: I need to change the caption Figure to Fig. for a journal. I am currently using: `\usepackage[font=small,labelsep=period]{caption}` and               %Caption display style     \captionsetup{figurename=Fig.,tablename=Table}      to rename the caption. The `\autoref` however, is still showing a `Figure 1` instead of `Fig. 1`. Can someone tell me the alternative to the code `\addto\extrasngerman{\renewcommand\figureautorefname{Abb.}}` used in here, applicable for `Caption` package.


title: customize of autoref

text: in this example, how can I customize `\autoref`. ie instead of printing `table 1`, it puts `Tab.1` same question with `Figure = Fig.` and `equation = Eq.`               \documentclass{article}     \usepackage[T1]{fontenc}     %\usepackage[francais]{babel}      \usepackage{graphicx}     \usepackage[font=footnotesize,labelfont={bf,sc,small},figurename=Fig.,tablename=Tab.]{caption}     \usepackage[colorlinks=true,linkcolor=blue]{hyperref}           \begin{document}          change the writing of \autoref{tab} to Tab.1          \begin{table}[htbp]     \begin{center}     \begin{tabular}{|l|l|}     \hline     table & Tab. \\     \hline     figure & Fig. \\     \hline     equation & Eq. \\     \hline     \end{tabular}     \end{center}     \caption{Exemple d'environnement table}     \label{tab}     \end{table}          \end{document}


title: Configure latexmk to recognize an old file with a new name

text: When the `asymptote` package is used, it generates Asymptote source files with sequential names. For instance, if the `tex` file is called `foo.tex`, then running LaTeX on it will generate Asymptote source files `foo-1.asy`, `foo-2.asy`, `foo-3.asy`, etc. If `latexmk` is used with the configuration file asymptote_latexmkrc, then it automatically recognizes when a file has not changed and compiles only the ones that have changed--which is a huge timesaver. Unfortunately, if an Asymptote image is added or removed early in the document, then it changes the filenames of all the subsequent images. This makes `latexmk` think that these all need to be recompiled, which is time- consuming and a real pain. Can `latexmk` be configured to recognize an old file with a new name, and simply change the name of the compiled image to match without recompiling it? I imagine that this would involve having `latexmk` maintain a database of the contents of the `.asy` source files from the last run.


title: Adding vertical lines to each side of a paragraph

text: How can I add vertical lines to each side of a paragraph? To illustrate, what I need is:                some paragraphs...          |My paragraph begins|     |here and goes like |     |this... ~~~~~~~~~~~|     |~~~~~~~~~~~~~~~~~~~|     |~~~~~~~~~~~~~~~~~~~|     |~~~~~~~~~~~~~~~~~~~|     |~~~~~~~~~~~~~~~~~~~|     --------------------- <- Here is a page break     |~~~~~~~~~~~~~~~~~~~|     |~~~~~~~~~~~~~~~~~~~|     |~~~~~~~~~~~~~~~~~~~|     |~~~~~~~~~~~~~~~~~~~|     |The paragraph ends |     |here.              |          Some other paragraphs...      I could not use any tabular or boxing commands since they don't allow page breaks inside. Thanks in advance...


title: Aligning numbers in array

text: What am I doing wrong here?:               \documentclass[11pt,a4paper]{article}     \usepackage[latin1]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}          \begin{document}          \begin{align}     \begin{array}{c|c c c c c}        & R & U & \rho & \eta & \alpha \\       \hline       \mathrm{L} & 1 & 1 & -3 & -1 & 0 \\       \mathrm{M} & 0 & 0 & 1 & 1 & 1 \\       \mathrm{T} & 0 & -1 & -1 & -2 & 1      \end{array}     \end{align}          \end{document}      ![](http://i.stack.imgur.com/7gpPq.png) I hope someone can help! And yes, I have seen some of the other similar questions, but I can't seem to get it to work. I want the numbers in the columns to be aligned under each other.