title: Online LaTeX editor or local LaTeX editor?

text: Now there are a couple of online LaTeX editors that seems fancy and handy to use, such as ShareLaTeX and writeLaTeX. On the other hand, there are classic local Latex installation packages that are also easy to set up and use, like MiKTeX and TeX Live. I wonder what are pros and cons of online vs. local LaTeX editors and which I should use. (I am a PhD student and I need to write papers and thesis using LaTeX.)


title: Label a block or systems of equations with one label

text: > **Possible Duplicate:**   >  How to get only one vertically centered equation number in align > environment with two equations I have a big system of equations which I want to label as one block. I do want to use `align` as the backbone of the typeset. I can produce, using `\nonumber`, something like               \begin{align}     a &= & b \nonumber\\     x+y & & =z\nonumber\\     w =& v & \nonumber\\     1 & 2 & 3     \label{eq1}     \eng{align}      However, this produces the label at the end, and I guess that a better look would be that the label will be typeset at the middle of the vertical height of the block. I tried to use a combination of `\equation` and `\split` but then I don't know how to take advantage of the columns available in `\align`. So, how can I achieve this? If you think that this won't look good then what are the other possibilities I can take?


title: label multiple lines of equations

text: Suppose I have the equations               \begin{align}      f(x) = x^2      g(x) = \exp( x )     \end{align}      I would like to use on single label for these lines, and ideally the equation number would be placed vertically between these two lines. Although this question appears very basic, I have not found an explanation neither via search engines, nor on this website.


title: How to number two-line function definitions

text: Lets say we have a two line function definition, for example, a translation               \begin{align}         t_{p,q}\text{ : }&\mathbb{R}^2 \longrightarrow \mathbb{R}^2 \\         &(x,y) \longmapsto (x+p, y+q) \notag     \end{align}      What/how is the correct way of numbering this? I personally just number the first line, but is it possible to have this number vertically centred? Or is there a better way?


title: How can I type formula cosine of two vectors nice?

text: I want to find cosine of two vectors, I define the command `\cross` for cross product of two vectors. I tried               \documentclass[12pt,a4paper]{article}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{fourier}     \usepackage{esvect}     \usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}     \newcommand{\cross}[2]{\biggl[\vv{#1},\vv{#2} \biggr]}     \begin{document}     \[\cos \varphi =\dfrac{\cross{CA'}{CB} \cdot \cross{CA'}{CD}}{\left \vert \cross{CA'}{CB} \right\vert \cdot \left \vert \cross{CA'}{CD} \right\vert}. \]     \end{document}      ![enter image description here](http://i.stack.imgur.com/dHVil.jpg) I feel the brackets in command `\cross` is not good. How can I repair them?


title: Creating an enumerate-description style environment

text: I've been trying to create a list environment to produce something that does the following:   1. It has a counter (like the enumerate environment).   2. The first line of each item is an overview of the item (probably in boldface).   3. Some items have nothing other than the first line, while others have more description. The description is aligned with the title above it. The following was my attempt:               \newcounter{numberdesc}     \newenvironment{numberdescription}{\begin{list}{}{%       \renewcommand{\makelabel}{\textbf{\thenumberdesc.\hfill}}}}{%       \end{list}}     \newcommand{\descitem}[1]{\stepcounter{numberdesc}\item\textbf{#1}\newline}          \begin{numberdescription}     \descitem{First item}       has some description below it     \descitem{Second item does not}     \descitem{Third item}       also has description     \end{numberdescription}      but I know that this is rather crude (not least the `\newline` in the definition of the `\item` replacement). It was suggested to me in a previous attempt that the `enumitem` package does what I want, but as far as I can tell this doesn't align the text of the description in the manner I want. To be specific: each item has a number and a title, and the text of the item should be aligned with the title but not the number. I want it to produce something like the following (which was produced in a more crude manner): ![enter image description here](http://i.stack.imgur.com/b4rX7.jpg)


title: Bibliography or Content page heading (problem with \chapter*{})

text: I'm using `\documentclass{book}` and I have also redefined my `\chapter` and `\part` heading styles. However, these styles do not apply to the heading of the Content page (the word "Contents") or the bibliography page (the word "Bibliography"). How do I modify their styles? I mean the way the word Contents or Bibliography is displayed on top of the corresponding pages. The same hold for any section that uses \chapter{}* as the heading style. Any ideas? Here is an MWE. Please take a look at the heading of the contents the word "contents" or "Acknowledgements". I want them to have the same style as the chapter heading minus the number!               \documentclass[draft]{book}     \usepackage[table]{xcolor}     \usepackage{epigraph}     \usepackage[explicit]{titlesec}     \usepackage{type1cm}          \setlength\epigraphwidth{.6\textwidth}          \titleformat{\chapter}[display]     {\normalfont\Large\rmfamily}     {\sffamily\flushright\fontsize{100}{0}\textbf{\textcolor{black!25}{\thechapter\vskip-10pt}}}{-10pt}     {\flushright\fontsize{25}{0}{#1}\vskip60pt}     \titlespacing*{\chapter}      {0pt}{-40pt}{0pt}               \titleformat{\part}[display]       {\normalfont\Large\rmfamily}       {\sffamily\flushright\fontsize{100}{0}\textbf{\textcolor{black!25}{\thepart\vskip-10pt}}}{-10pt}       {\flushright\fontsize{25}{0}{#1}\vskip60pt}     \titlespacing*{\part}       {0pt}{-40pt}{0pt}          \begin{document}          \chapter*{Acknowledgments}     \addcontentsline{toc}{chapter}{Acknowledgments}     Let's acknowledge those who answer this question!           \tableofcontents     \cleardoublepage          \epigraphhead[450]{Fairy tales are more than true: not because they tell us that dragons exist, but because they tell us dragons can be beaten.\par\hfill\textsc{C.K. Chesterton}}     \part{A Test Part Title}               \chapter{A Test Chapter Title}          \end{document}


title: Issue with fp "missing number" macro

text: I write an fp macro that calculates the distance between frets on a guitar neck:               \def\ScaleLength{25.5}     \def\ScaleFactor{0.1}          \def\FretDist#1{\FPmul\resulta{-1}{#1}%     \FPdiv\resulta{\resulta}{12}%     \FPpow\resulta{2}{\resulta}%     \FPsub\resulta{1}{\resulta}%     \FPmul\resulta{25.5}{\resulta}     \FPmul\resulta{\resulta}{\ScaleFactor}     \resulta     }      And putting things like               \FretDist{3}      In latex gives the proper floating point value. When I try to use that value in a package like               \put(3,\FretDist{3}){\circle{3}}      I get an error "Missing number, treated as zero", yet if I do               \put(3,3){\circle{3}}      works fine


title: Error "Please insert PRERENDERUNICODE"

text: I meet a subtle problem. My simplest code is as follows. I am working in Win 7-32bit, my editor is WinEdt 7.0 (Build: 20120125 (v. 7.0)), saved as UTF-8, compiled with `pdflatex`(MiKTeX2.9).               \documentclass{amsart}     \usepackage[utf8x]{inputenc}          \begin{document}          \title{U}%Ü     \author{ü}     \date{\today}     \maketitle          \end{document}      The result is ![enter image description here](http://i.stack.imgur.com/IqeF1.png), there is error message               [PLEASEINSERT\PRERENDERUNICODE{}INTOPREAMBLE]      What subtle is if I change `amsart` to `article`, or change the first U to Ü, the problem disappears.


title: Macro naming best practice?

text: Is there a preferred or generally accepted idiom for naming user defined macros? I notice that in the change from Tufte 3.5.0 to 3.5.2, for example, the names of the debugging macros have change, for example from               \TufteDebugInfoNL      to               \@tufte@debug@info@noline      Does this correspond to some agreed to practice?


title: Antichronological ordering of references in moderncv using apacite

text: I'm using the `moderncv` documentclass to create my CV and I need the reference list to adhere to the APA guidelines. I know `biblatex` provides sorting options but unfortunately `moderncv` does not support `biblatex`. I'm using `multibib` with `apacite` to split my references into different sublists.               \documentclass[11pt,a4paper,sans]{moderncv}     \moderncvstyle{casual}     \moderncvcolor{grey}     \usepackage{apacite}     \usepackage[scale=0.75]{geometry}          \firstname{John}     \familyname{Doe}          \makeatletter                           % subheadings in multibib as \subsection     \renewenvironment{thebibliography}[1]          {\subsection*{\refname}%           \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}%           \list{\@biblabel{\@arabic\c@enumiv}}%                {\settowidth\labelwidth{\@biblabel{#1}}%                 \leftmargin\labelwidth                 \advance\leftmargin\labelsep                 \@openbib@code                 \usecounter{enumiv}%                 \let\p@enumiv\@empty                 \renewcommand\theenumiv{\@arabic\c@enumiv}}%           \sloppy           \clubpenalty4000           \@clubpenalty \clubpenalty           \widowpenalty4000%           \sfcode`\.\@m}          {\def\@noitemerr            {\@latex@warning{Empty `thebibliography' environment}}%           \endlist}     \makeatother          \usepackage{multibib}     \newcites{articles,conferences}{{Articles},{Conference contributions}}          \begin{document}     \maketitle          \section{References}     \nocitearticles{article1,article2}     \bibliographystylearticles{apacite}     \bibliographyarticles{articles}     \nociteconferences{conference1,conference2}     \bibliographystyleconferences{apacite}     \bibliographyconferences{conferences}          \end{document}      Is there any way to get `apacite` to sort the publications by year? I've tried manually by assigning numbers from 1 to _n_ to the `key`-attributes of each publication in the bib-file but the it is used only for citations. Also adding `\phantom`-characters to the author names did not work. Furthermore, the references stretch across the entire width of the page instead of being printed in the right column only. Any ideas how this can be fixed?


title: Numbering chess diagrams (skak)

text: How do I put a number beside the chess diagram? I want to make a document of chess diagrams to be solved and then the solutions at the end. If someone has a skeleton to make this I would be happy. Thanks in advance! * * * Thanks for the quick answer. Is it possible to change the notation numbers of the board to right side? In that case it would be good to have the number to the left (and up) of the diagram. If that is not possible, would it be possible to position the number between where the white or black move mark is. To the right of the diagram. I have several positions in one row like this:               \begin{tabular}{c}          \newgame     \def\myfen{8/8/8/pk6/8/P1K5/1P6/8 b - - 0 1}     \chessboard[tinyboard,setfen=\myfen]          \newgame     \def\myfen{8/8/8/pk6/8/P1K5/1P6/8 b - - 0 1}     \chessboard[tinyboard,setfen=\myfen]          \end{tabular}


title: In LyX, what do I need to do to force bibtex to run?

text: In LyX, if I make changes to code related to my bibliography or citations (e.g. chaining the citation style in BibLaTeX) these changes are (generally) not reflected in my document until I close and reopen my file (or quit and restart LyX). It seems that nether editing my file, nor editing any associated classes, is sufficient to trigger LyX to run bibtex. Is there something (else, more convenient) I can do to force LyX to run `bibtex`?


title: Is there a way to color (only real) math in pdflatex?

text: I'd like to change the color of all math in my document. I understand that several packages and some engines provide support for changing the color of all math, and I understand that something like               \everymath{\color{green}}      _almost_ works, but also ends up coloring things like URLs and captions, while failing to color displayed equations. Is there a reliable way to change the color of _just_ math, in `pdflatex`, without relying on special packages or classes?


title: pgfkey to set anchor for negative values in a bar chart

text: I have a ybar chart with positive and negative bars and "node near coords". I'd like to have the nodes of pos. bars at the top and nodes of neg. bars at the bottom/under the bar. With the following if-case I'm able to address the neg. ones, but I can't find the correct pgfkey or whatever to change the anchor in order to get a bottom position. I hope, you could come up with a simple solution.   Many thanks!               \documentclass{article}     \usepackage{pgfplots,lipsum}       \usepackage{tikz}            \pgfplotsset{%         /pgfplots/ybar legend/.style={          /pgfplots/legend image code/.code={%            \draw[##1,/tikz/.cd,bar width=6pt,yshift=-0.14cm,bar shift=0pt]            plot coordinates {(0cm,0.35cm)};}         }}       \pgfplotsset{compat=newest}            \begin{document}            \begin{figure}[H]           \centering        \begin{tikzpicture}         \centering         \begin{axis}[small,ybar,                height=7.2cm, width=14.5cm,bar width=0.35cm,               scaled ticks=false,               y tick label style={/pgf/number format/.cd,fixed,fixed   zerofill,precision=3,/tikz/.cd},               ymin=-0.016, ymax=0.056,ymajorgrids,tick align=inside,axis y line=left,               ylabel={[dimless]},               xtick=data,enlarge x limits=0.25,axis x line*=bottom,major x tick style = transparent,               symbolic x coords={$A$,$B$,$C$},               every node near coord/.append style={rotate=90,anchor=west, font=\scriptsize, xshift=-3pt, yshift=0pt},                   nodes near coords={%               \pgfkeys{/pgf/fpu=true}%               \pgfmathparse{\pgfplotspointmeta<0}%               \pgfmathfloattofixed{\pgfmathresult}%               \pgfkeys{/pgf/fpu=false}%               \ifdim\pgfmathresult pt=1pt                    \pgfkey{anchor={east}} % <<<<<<<<<<<<< What's the right pgfkey to set the anchor?               \else                    \pgfmathprintnumber[fixed,fixed zerofill,precision=3,print sign]{\pgfplotspointmeta}                    \fi               },               legend style={draw=none,draw opacity=0, at={(0.5,-0.1)},anchor=north, legend columns=5, transpose legend, font=\small,                   /tikz/every even column/.append style={column sep=0.15cm}}           ]           \addplot [draw=none, fill=red] coordinates {             ($A$,-0.012)             ($B$,+0.000)              ($C$,+0.024) };          \legend{ABC}         \end{axis}         \end{tikzpicture}       \end{figure}            \end{document}


title: Installation of Vollkorn font

text: I'm trying to install Vollkorn font from `.otf` files on OSX with the help of `autoinst`. On a separate folder I run the command `autoinst -target=~/Library/texmf/ Vollkorn-*.otf` which should install the different versions of Vollkorn (http://vollkorn-typeface.com/). Without luck so far this ends with such messages for all font variants:   * `otftotfm: encoding ‘fontools_ot1’ not found`   * `otftotfm: encoding ‘fontools_t1’ not found`   * `otftotfm: encoding ‘fontools_ly1’ not found` Finally, `[WARNING] 'otftotfm' returned non-zero; something's wrong! at /usr/texbin/autoinst line 643.`so that the operation has failed. Note that LCDF-typetools are installed.


title: specify the exact page for table of contents

text: If am using documentclass like book, is it possible to force the table of contents to appear on a particular page say page 17?


title: How do I put a label inside a Feynman diagram circle?

text: I have this simple Feynman diagram with a circle: ![enter image description here](http://i.stack.imgur.com/DfRQ6.png) I would like to put the number "1" in the middle of that circle. I've tried these: `\fmfiv{lab=1}{c}` `\fmfiv{lab=1}{.5[nw,se])` `\fmfiv{lab=1}{(.4999w, .5h)}` `\fmfiv{lab=1}{(.5001w, .5h)}` but whatever constants I put, latex refuses to put it INSIDE the circle. The latex:               \documentclass[24pt]{article}     \usepackage{amsmath,amsfonts,epsf}     \usepackage{amssymb}     \usepackage[pdftex]{graphicx}     \usepackage{grffile}     \usepackage{feynmp-auto}          \begin{document}              \begin{fmffile}{2ptcorrection1}         \begin{fmfgraph*}(220,12)         \fmfpen{thick}         \fmfleft{i1}         \fmfright{o1}         \fmf{plain}{i1,v1}         \fmf{dashes, left=1, tension=0.3}{v1,v2}         \fmf{plain, right=1, tension=0.3}{v1,v2}         \fmf{plain}{v2,o1}         \end{fmfgraph*}         \end{fmffile}          \end{document}      btw, the coordinates are: "c" for center, sw, se, ne, nw. Update: thank you hftf for the answer.


title: Inputting files alphabetically

text: I am creating an anthology of poems and songs, and have a main file where I am using `\input` to insert separates TeX files which contain the poems. I was wondering if there was a simpler way of inserting all of the files in alphabetical order based on filename instead of a separate `\input` for each file? Could anybody help? * * * Thank you to for pointing me in the direction of the other questions - they didn't come up when I googled my queries. I am trying to adapt the code in this post but I am getting 2 errors from it. My code is as follows at the moment               \documentclass{minimal}          \makeatletter%     \def \app@exe {\immediate\write18}          \def \inputAllFiles [#1]{%       \app@exe{cmd /c dir /b *.tex > \jobname.tmp}       \InputIfFileExists{\jobname.tmp}{}{}       \AtEndOfDocument{\app@exe{rm -f #1/\jobname.tmp}}}     \makeatother%          \begin{document}          \inputAllFiles{.}          \end{document}      The errors messages I am getting are both on the line with the `\inputAllFiles` command and say: `Use of \inputAllFiles doesn't match its definition` and `Too many }'s`. I have tried fiddling around with the code, but noting I seem to do helps. Could anybody help to see where I am going wrong?


title: Insert quotations

text: I would like to insert some literature quotations in my thesis. My first thought was to modify the verse environment as demonstrated in another question, though the result is not so pleasing. I would like each quotation to be in quotation marks, provide an easy way to attribute the source below the quotation and be right aligned.


title: How can I include one bibtex item in the manuscript body?

text: Can I include one bibtex item in the manuscript body? For example, I want something like: > Blah blah blah blah blah Blah blah blah blah blah Blah blah blah blah blah > Blah blah blah blah blah Blah blah blah blah blah Blah blah blah blah blah > Blah blah blah blah blah Blah blah blah blah blah. > > [32] J. Doe, "Hello, World", Journal of Hello, 32(1), 13-24, 2009. > > Blah blah blah blah blah Blah blah blah blah blah Blah blah blah blah blah > Blah blah blah blah blah Blah blah blah blah blah Blah blah blah blah blah > Blah blah blah blah blah Blah blah blah blah blah. > > Bibliography > > [1] ... > > [2] ... > > ........ > > [32] J. Doe ... > > [33] ... .... Is this possible? How can I do this? I am using bibtex.


title: Display Reference in document

text: > **Possible Duplicate:**   >  How can I list references from BibTeX file in-line with commentary? Is it possible to display reference information inline with the reference? I use `\cite{reference}` to cite work but is there a command that would display the reference in my text. I have:               \bibliographystyle{plain}     \bibliography{linkToBibTex}      But I need to show the details of a reference in my text is it possible? And I don't just want to show a reference number.


title: Place a bibtex entry mid-document

text: I am writing a contributions page of my thesis and thus I would like to use the referencing system built into LaTeX to format a few journal entries. Is there anyway to place individual BibTeX entries mid document? For example I would like to write a paragraph of text, followed by a full reference on its own line, followed by another paragraph of text. Thanks.


title: How to get rid of \ref's parentheses (e.g., for subfigure)

text: I use `\ref` to refer to a subfigure and it shows like this in my text:               This thing (Figure 5(b))      Double parentheses appear! I want this style:               This thing (Figure 5b)      How to make it happen?


title: How to speed up a large plot?

text: I have a large plot. It is a big file and it renders slowly. What is the best method to slim it down without loosing to much of its visual properties ?   I know that PDF and PS support cubic splines.   Is there a software that takes adventage of that and approximates true plot curve with splines?


title: Disable printing of fonts/packages to STDOUT

text: Is it possible to disable most of the boilerplate information that is output to STDOUT, like package and font paths? For example some Unix commands have "verbose" or "quiet" command line options that allow you to adjust how much information gets written to STDOUT. It is very common that I will miss important warnings because they get buried in all this other information.


title: endfloat can't handle many floats with redefined \efloatseperator

text: I have a LaTeX-document with a large number of figures that I want to be displayed at the end of the document using the `endfloat` package. Since I don't want a `\clearpage` after every one of them I redefined `\efloatseparator` as recommended in the documentation using               \renewcommand{\efloatseparator}{}      This works fine as long as there's just a few figures in the document. With the number of figures in my document however I get a number of LaTeX-errors and the figures are displayed badly or not at all. In this example, the nineteenth figure seems to be to much:               \documentclass{scrartcl}          \usepackage[figuresonly, nolists, nomarkers]{endfloat}     \renewcommand{\efloatseparator}{}          \usepackage{graphicx}          \begin{document}          \begin{figure}         \scalebox{10}{\fbox{}}         \caption{one}     \end{figure}          \begin{figure}         \scalebox{10}{\fbox{}}         \caption{two}     \end{figure}     \begin{figure}         \scalebox{10}{\fbox{}}         \caption{three}     \end{figure}          \begin{figure}         \scalebox{10}{\fbox{}}         \caption{four}     \end{figure}          \begin{figure}         \scalebox{10}{\fbox{}}         \caption{five}     \end{figure}          \begin{figure}         \scalebox{10}{\fbox{}}         \caption{six}     \end{figure}          \begin{figure}         \scalebox{10}{\fbox{}}         \caption{seven}     \end{figure}          \begin{figure}         \scalebox{10}{\fbox{}}         \caption{eight}     \end{figure}          \begin{figure}         \scalebox{10}{\fbox{}}         \caption{nine}     \end{figure}          \begin{figure}         \scalebox{10}{\fbox{}}         \caption{ten}     \end{figure}          \begin{figure}         \scalebox{10}{\fbox{}}         \caption{eleven}     \end{figure}          \begin{figure}         \scalebox{10}{\fbox{}}         \caption{twelve}     \end{figure}          \begin{figure}         \scalebox{10}{\fbox{}}         \caption{thirteen}     \end{figure}          \begin{figure}         \scalebox{10}{\fbox{}}         \caption{fourteen}     \end{figure}          \begin{figure}         \scalebox{10}{\fbox{}}         \caption{fifteen}     \end{figure}          \begin{figure}         \scalebox{10}{\fbox{}}         \caption{sixteen}     \end{figure}          \begin{figure}         \scalebox{10}{\fbox{}}         \caption{seventeen}     \end{figure}          \begin{figure}         \scalebox{10}{\fbox{}}         \caption{eighteen}     \end{figure}          \begin{figure}         \scalebox{10}{\fbox{}}         \caption{nineteen}     \end{figure}          \end{document}      The nineteenth figure is not displayed. Adding another float makes a total mess of the first few figures. Is LaTeX just not able to handle that many figures without `\clearpage` between them? Is there a solution to this issue?


title: Alignment with tikz-qtree

text: When using labels with different lengths with `tikz-qtree`, tree nodes are sometimes not aligned. See the following MWE:               \documentclass{scrreprt}     \usepackage{tikz-qtree}          \begin{document}              \begin{tikzpicture}[text depth=0pt]             \Tree [.{a}                 [.{b}                     [.{d} ]                     [.{e} ]                     [.{ffffff} ]                 ]                 [.{c}                     [.{g} ]                 ]             ]         \end{tikzpicture}          \end{document}      Just as `c` and `g` are aligned, I'd like to make the edge between `b` and `e` go straight down; I do realize that this way, the horizontal space between the the child nodes elements will be different, but this I find less annoying than the angles leaving a node not lining up correctly :). ![enter image description here](http://i.stack.imgur.com/tVyrb.png)


title: Beamer columns environment in article document

text: I'd like to use something like `beamer`'s `\columns` environment in an article-like document. Does anyone know if this is possible and how to do it? I found this: (beamer blocks in ordinary article-style document) which shows how to use `beamer`'s `block` environments in an article-like document, but it didn't show how to use the columns.


title: Make specific author bold using biblatex

text: I am writing my CV in LaTeX. I am using `biblatex` and want my name (and only my name) to be bold for every reference. Is there a magic way to do this? A similar question Make one author's name bold every time it shows up in the bibliography was asked, but that answer used BibTeX. While I use the BibTeX backend, I use `biblatex`. Any suggestions?


title: Special format for an author's name in biblatex bibliography

text: To use bold text format for an author's name in `biblatex` bibliography I use `\textbf{LastName, FirstName, MiddleName}` command in bibliography database. I wonder if it is possible to use some special text format for an author's name in `biblatex` bibliography by defining some command in `LaTeX` preamble. Thanks Something like this               \renewcommand{\mkbibnamefirst}[1]{\textbf{#1}}     \renewcommand{\mkbibnamelast}[1]{\textbf{#1}}


title: Multiple Tables Sweave/Latex

text: I am very new to LaTeX and Sweave but am excited that it may make my life much simpler when combined with R. What I am looking to do: Create multiple crosstabs, most likely in a loop. As a result, the number of tables will not be determined ahead of time and I am hoping to have a page break in between each. Lastly, for the time being, I am looking to make this a report instead of a presentation (Beamer). My question: I assume this is possible, but is it easier to do in Sweave or LaTeX and how should I get started. I have had some bumps in the road getting up and running, but I have been able to compile some very basic examples of both. This would be my first document in LaTeX, so I am open to any and all suggestions.


title: \ref should use enumerate label name

text: I have done this:               \begin{enumerate}     \renewcommand{\labelenumi}{\textbf{S.\theenumi}}     \item a     \item \label{l} b     \item c. goto \ref{l}     \end{enumerate}      The `\ref` just uses the enumerate number. But I want it to be the full `enumerate` label. I also could just type `S.\ref{l}` but that has the two disadvantages that   1. if I update the enumerate label, I also have to update this reference,   2. together with `hyperref`, this doesn't look so nice. How would be a clean/nice way to solve this?


title: Highlight elements in the matrix

text: I have a matrix and need to highlight some elements in the matrix. I have found how to highlight a single element (I want to put the cell in the square):               $$ A = \begin{bmatrix}     \fbox{0} & \fbox{0} & 0 \\      \fbox{0} & \fbox{0} & 0 \\     1 & 1 & 1 \\      \end{bmatrix}$$      But how can I outline elements of the submatrix like in the picture below? I need just a frame where some elements are located. ![Submatrix](http://i.stack.imgur.com/feoXP.jpg)


title: How to highlight sub-matrix / nodes with tikz?

text: I'm trying to highlight a box of different cells of a matrix that I'm rendering. Currently, this highlights the entire matrix in green. What I would like to do is within that box highlight another series of nodes. For instance, I would like to draw a box / circle / etc around N1, N2, N3, and N4. Is there a relatively pain free way of going about doing this?               \begin{tikzpicture}[        inner/.style={circle,draw=blue!50,fill=blue!20,thick,inner sep=3pt},        outer/.style={draw=green,fill=green!20,thick,inner sep=10pt, column sep=1cm, row sep=1cm}     ]       \matrix (A) [matrix of nodes, outer, nodes={inner}]{            &    & N5 & N9  \\            & N2 & N6 & N10 \\         N1 & N3 & N7 & N11 \\            & N4 & N8 &     \\        };      EDIT: I was looking for a solution that could both enclose and highlight a subset of nodes, which makes it differ from the duplicate questions a bit.


title: Drawing a box around certain parts of a matrix

text: > **Possible Duplicate:**   >  Highlight elements in the matrix i have a matrix:               \begin{equation}      \begin{bmatrix}         1 & 5 & 4 & 2 & 1 \\         1 & 5 & 4 & 2 & 1 \\         1 & 5 & 4 & 2 & 1 \\     \end{bmatrix}     \label{e:crop1}     \end{equation}      and i would like to draw a box around a few of the values to highlight a selection & label it, how would i go about this? I've looked at nodes but havent got a clue. thanks


title: draw a box for part of a matrix in math environment

text: > **Possible Duplicate:**   >  Highlight elements in the matrix I have a big matrix as follows:               \documentclass{article}     \usepackage{amsmath}          \begin{document}              \[     \tilde{M}_{R+1,N}=       \begin{pmatrix}       r_{1,(1)}^{(1)},r_{1,(2)}^{(1)} \cdots, r_{1,(n)}^{(1)}, r_{2,(1)}^{(1)}, r_{2,(2)}^{(1)}, \cdots, r_{2,(n)}^{(1)}, \cdots, r_{m,(1)}^{(1)}, r_{m,(2)}^{(1)}, \cdots, r_{m,(n)}^{(1)}\\       r_{1,(1)}^{(2)},r_{1,(2)}^{(2)} \cdots, r_{1,(n)}^{(2)}, r_{2,(1)}^{(2)}, r_{2,(2)}^{(2)}, \cdots, r_{2,(n)}^{(2)}, \cdots, r_{m,(1)}^{(2)}, r_{m,(2)}^{(2)}, \cdots, r_{m,(n)}^{(2)}\\       \vdots \\       r_{1,(1)}^{(R)},r_{1,(2)}^{(R)} \cdots, r_{1,(n)}^{(R)}, r_{2,(1)}^{(R)}, r_{2,(2)}^{(R)}, \cdots, r_{2,(n)}^{(R)}, \cdots, r_{m,(1)}^{(R)}, r_{m,(2)}^{(R)}, \cdots, r_{m,(n)}^{(R)} \\       r_{1,(1)}^{(0)},r_{1,(2)}^{(0)} \cdots, r_{1,(n)}^{(0)}, r_{2,(1)}^{(0)}, r_{2,(2)}^{(0)}, \cdots, r_{2,(n)}^{(0)}, \cdots, r_{m,(1)}^{(0)}, r_{m,(2)}^{(0)}, \cdots, r_{m,(n)}^{(0)}       \end{pmatrix}     \]          \end{document}      Resulting in: ![image](http://i.stack.imgur.com/yHmZJ.png) Now I want to draw several boxes on this big matrix. The first box contains elements from the first n columns and all rows; the second box contains elements from the next n columns and all rows, and so on. When I use `\boxed` command, it can only take characters that are 'together'. How can I make such boxes in the math environment that contain "non-together" characters?


title: How can I add some enhancement to the matrix

text: > **Possible Duplicate:**   >  Highlight elements in the matrix               \documentclass[12pt,a4paper]{mwrep}     \usepackage{amsmath}     \usepackage[nodisplayskipstretch]{setspace} \setstretch{1.5}     \begin{document}     \begin{equation}     P=     \begin{bmatrix} 0.3 & 0.1 & 0.6 & 0.0 & 0.0 & 0.0 & 0.0 \\                     0.2 & 0.1 & 0.7 & 0.7 & 0.0 & 0.0 & 0.0 \\                     0.3 & 0.4 & 0.3 & 0.0 & 0.0 & 0.0 & 0.0 \\                     0.0 & 0.0 & 0.0 & 0.2 & 0.8 & 0.0 & 0.0 \\                     0.0 & 0.0 & 0.0 & 0.3 & 0.7 & 0.0 & 0.0 \\                     0.0 & 0.4 & 0.1 & 0.0 & 0.0 & 0.2 & 0.3 \\                     0.0 & 0.0 & 0.1 & 0.0 & 0.3 & 0.1 & 0.5     \end{bmatrix}     \end{equation}     \end{document}      This produces nice looking matrix. I need two enhancements:   \- A box around some elements in matrix with caption   \- Labels above the matrix and on the left side (in my example 1, 2, 4, 3, 6, 5, 7). My idea is to show and name 'submatrices' in my matrix. If there is better looking way to show what I want, you can change my design. Pictute showing what I want to acomplish: ![](http://i.stack.imgur.com/vdNN3.png) Edit:   There is a problem with `\usepackage[nodisplayskipstretch]{setspace} \setstretch{1.5}`. Vertical space in matrix is too big when I use it with code from accepted solution.


title: How to make frame in matrix?

text: I want to draw :   ![enter image description here](http://i.stack.imgur.com/ZB0IU.jpg) I have tried to make this by the following command :               \documentclass[11pt,twoside,openright]{book}     \usepackage{geometry,tikz,amsmath}                    \begin{document}          $$J_5=\left(\begin{array}{ccc} \lambda & 1 & 0\\ 0 & \lambda & 0\\ 0 & 0 & \frame{$\lambda$} \end{array}\right)     $$          \end{document}      But this gives :   ![enter image description here](http://i.stack.imgur.com/HhRSX.jpg)   How can I do so ?


title: Problems to cite properly figures in tufte-handout class

text: I'm working in a handout where I include few pictures with the helping of the environments `figure` and `marginfigure`. But my problem is that when I compile my handout the reference's number of one of the figures doesn't prints in the PDF. Here is a MWE               \PassOptionsToPackage{usenames,dvipsnames,table}{xcolor}     \documentclass[]{tufte-handout}     \usepackage[LGRx,TS1,T1]{fontenc}     \usepackage[utf8x]{inputenx}     \usepackage[polutonikogreek,spanish,activeacute,mexico]{babel}     \usepackage[sc,osf]{mathpazo}          \usepackage{amsmath,amssymb,amstext,amsthm}     %\usepackage{textcomp}          \usepackage{array,multirow,tabularx,ragged2e,booktabs}     \newcolumntype{Y}{>{\RaggedRight\arraybackslash}X}          \usepackage[per-mode=symbol]{siunitx}     \sisetup{     %output-decimal-marker = {,},     detect-weight= true,      range-units = brackets,     list-final-separator = { \translate{and} },     list-pair-separator = { \translate{and} },     range-phrase = { \translate{to (numerical range)} },     }          \usepackage{hyperref}          \usepackage{graphicx,subfigure,etex,tikz,pgfplots}     \graphicspath{{./imagen/}}          \usepackage[colorinlistoftodos,spanish,textsize=footnotesize]{todonotes}          \usepackage{acronym}         \acrodef{AHA}{American Heart Asociation}     \newcommand{\greek}[1]{{\selectlanguage{polutonikogreek}#1}}          \begin{document}          Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent nec urna at lectus facilisis fringilla eu vel odio. Pellentesque luctus massa vel ipsum feugiat hendrerit. Suspendisse tristique malesuada consequat. Donec mi turpis, faucibus sit amet commodo sed, condimentum at sapien. Suspendisse consectetur urna dolor. Nulla vel libero at tortor suscipit accumsan. Donec sit amet mauris a ipsum malesuada molestie. Nulla fermentum nunc in metus pellentesque aliquet. Aenean hendrerit sem eu dui ornare, at interdum urna dictum. Donec nisi urna, varius eget consectetur ac, cursus non velit. Vestibulum eget sollicitudin dui, non interdum lectus. Vivamus eleifend euismod orci, sit amet posuere mauris placerat id.          Integer gravida laoreet massa sed scelerisque. Aenean scelerisque suscipit metus non suscipit. Aenean arcu metus, mollis eu sagittis et, cursus in justo. Nullam mollis auctor bibendum. Integer nec congue est, vitae scelerisque ipsum. Nullam ultrices sapien orci, eget vestibulum turpis euismod eget. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Vivamus sed quam id risus consequat gravida id a enim. Duis non nulla ac neque fringilla molestie. Mauris vel sagittis sapien. Morbi in posuere nisl. Vivamus consequat accumsan leo ut malesuada. Integer pretium fringilla suscipit. Suspendisse gravida urna ut luctus lobortis. Nunc at odio vel neque sagittis pharetra at a quam~\ref{fig:esqAHA}. Mauris quis ligula porttitor, mollis dui at, rutrum enim.          \begin{figure*}[htb]     \begin{flushleft}     \includegraphics[width=\textwidth]{F5_large}     \end{flushleft}     \caption[Drawing of cross-sections]{Drawing of cross-sections of identical, most proximal part of six left anterior descending coronary arteries. The morphology of the intima ranges from adaptive intimal thickening always present in this lesion-prone location to a type VI lesion in advanced atherosclerotic disease. Other cross-sections show sequence of atherosclerotic lesion types that may lead to type VI. Identical morphologies may be found in other lesion-prone parts of the coronary and many other arteries.}     \label{fig:esqAHA}     \end{figure*}          Mauris tristique imperdiet orci id rhoncus. Nam neque est, pellentesque non aliquam ac, eleifend nec lectus. Integer mollis porta elit, non pharetra diam. Duis eget est hendrerit, iaculis urna id, rutrum dui. Vivamus egestas sem a diam consequat commodo. Donec quis purus ultrices, sagittis eros nec, sagittis enim. Quisque egestas lorem ac pretium aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam sed posuere leo. Mauris odio velit, commodo at commodo id, rutrum nec justo. Donec in elit quis purus vestibulum scelerisque vitae eu lorem.          \begin{figure*}[htb]          \begin{flushleft}     \includegraphics[width=4in]{F4_large}     \end{flushleft}     \caption[Flow diagram]{Flow diagram in center column indicates pathways in evolution and progression of human atherosclerotic lesions. Roman numerals indicate histologically characteristic types of lesions enumerated in Table 2 and defined at left of flow diagram. The direction of arrows indicates sequence in which characteristic morphologies may change. From type I to type IV, changes in lesion morphology occur primarily because of increasing accumulation of lipid. The loop between types V and VI illustrates how lesions increase in thickness when thrombotic deposits form on their surfaces. Thrombotic deposits may form repeatedly over varied time spans in the same location and may be the principal mechanism for gradual occlusion of medium-sized arteries. }     \label{fig:sixAHA}     \end{figure*}          Phasellus commodo sed metus ac hendrerit. Ut feugiat molestie sem in viverra. Mauris sed suscipit erat, non pretium est. Cras auctor massa sit amet nulla aliquam, et dapibus ante lacinia. Donec et tempor risus, dignissim vulputate ipsum. Curabitur dui eros, vulputate euismod sollicitudin quis, aliquet eget nisi. Fusce id auctor tellus, quis congue dolor. Nam vel dignissim est. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nam eget arcu ut tellus adipiscing sodales (see the figure~\ref{fig:sixAHA}). Pellentesque sed nunc urna.          Praesent blandit purus vitae tortor vestibulum, sit amet pharetra diam vestibulum. Phasellus sit amet gravida elit. Nulla laoreet blandit libero. Nam adipiscing congue adipiscing. Integer a nulla sit amet tortor scelerisque placerat at at lectus. Quisque tincidunt nisi in iaculis egestas. In ligula augue, aliquet a dui eu, malesuada rhoncus leo. Donec sit amet luctus ipsum. Nullam cursus erat erat, sit amet elementum lorem tempus nec. Ut nec augue porta, tristique justo eu, feugiat elit. Fusce semper, sapien feugiat tempor sodales, nulla justo laoreet sem, id placerat tortor elit ut erat. Nullam vitae nunc urna. Duis laoreet enim id metus egestas, rhoncus congue justo feugiat.      \end{document}      Both figures where taken from here and are the 4 and 5 respectively. In my pdf the reference to the second figure doesn't print any number, and it happens in every reference I make of that. It's strange. All the other features works fine. Now I'm working in a PC with MS Windows XP and MikTeX 2.9 updated, so I don't know what's wrong. I have more figures and all works fine with the others. That's all, regards.


title: unpleasent character protrusion using microtype, biblatex and block=nbpar

text: Using `microtype` together with `biblatex`'s `entrysets` and `block=nbpar` options leads to an unpleasent result. The left bracket of (a) is moved too much to the right. (b) and (c) are less affected by the protrustion. What can I do about it except disabling microtype?               \documentclass{article}     \usepackage[backend=biber,subentry,block=nbpar]{biblatex}          \usepackage{microtype}          \addbibresource{biblatex-examples.bib}          \begin{document}     Filler text \cite{stdmodel}          \printbibliography          \end{document}      ![mwe](http://i.stack.imgur.com/URDn2.jpg)


title: How to handle special characters in LaTeX?

text: I am working on one file which has some special chacters.                   König IR   : KA}unig ,K ~ A}unig      %          : Comment in latex (so no text after this %)     -          : escape      I get different output which seems to be very funny. How can i handle such characters in LaTeX?


title: PGFplots - single legend in a group plot

text: I have a group plot and when I try to add a legend it repeats on all subgraphs. I want a single common legend line at the top of the whole graph.               \documentclass{standalone}     \usepackage{graphicx}     \usepackage{tikz}     \usepackage{pgfplots}     \usepgfplotslibrary{groupplots}     \pgfplotsset{compat=newest}     \begin{document}          \begin{tikzpicture}         \begin{groupplot}[group style={group size= 2 by 4},height=5cm,width=6.4cm,legend entries = {curve1,curve2,curve3}]             \nextgroupplot[title=type1,ylabel={Range1 },symbolic x coords={1,2,4,8,16,32,64,128},xtick=data]                     \addplot[blue]  table{Data/test.dat};                     \addplot[red]   table{Data/test1.dat};                     \addplot[green] table{Data/test2.dat};                       \coordinate (top) at (rel axis cs:0,1);% coordinate at top of the first plot                         \nextgroupplot[title=type2,symbolic x coords={1,2,4,8,16,32,64,128},xtick=data]                     \addplot[blue]  table{Data/test.dat};                     \addplot[red]   table{Data/test1.dat};                     \addplot[green] table{Data/test2.dat};             \nextgroupplot[ylabel={Range2 },symbolic x coords={1,2,4,8,16,32,64,128},xtick=data]                     \addplot[blue]  table{Data/test.dat};                     \addplot[red]   table{Data/test1.dat};                     \addplot[green] table{Data/test2.dat};             \nextgroupplot[symbolic x coords={1,2,4,8,16,32,64,128},xtick=data]                     \addplot[blue]  table{Data/test.dat};                     \addplot[red]   table{Data/test1.dat};                     \addplot[green] table{Data/test2.dat};             \nextgroupplot[ylabel={Range3 },symbolic x coords={1,2,4,8,16,32,64,128},xtick=data]                     \addplot[blue]  table{Data/test.dat};                     \addplot[red]   table{Data/test1.dat};                     \addplot[green] table{Data/test2.dat};             \nextgroupplot[symbolic x coords={1,2,4,8,16,32,64,128},xtick=data]                     \addplot[blue]  table{Data/test.dat};                     \addplot[red]   table{Data/test1.dat};                     \addplot[green] table{Data/test2.dat};             \nextgroupplot[xlabel={Number of Threads},ylabel={Range4 },symbolic x coords={1,2,4,8,16,32,64,128},xtick=data]                     \addplot[blue]  table{Data/test.dat};                     \addplot[red]   table{Data/test1.dat};                     \addplot[green] table{Data/test2.dat};             \nextgroupplot[xlabel={Number of Threads},symbolic x coords={1,2,4,8,16,32,64,128},xtick=data]                     \addplot[blue]  table{Data/test.dat};                     \addplot[red]   table{Data/test1.dat};                     \addplot[green] table{Data/test2.dat};                     \coordinate (bot) at (rel axis cs:0,0);% coordinate at bottom of the last plot         \end{groupplot}         \path (top-|current bounding box.west)-- node[anchor=south,rotate=90] {Throughput} (bot-|current bounding box.west);     \end{tikzpicture}     \end{document}      ![output](http://i.stack.imgur.com/zQwOJ.png)


title: Finding a font for XeTeX

text: I am trying to customize this document, it's a CV template for XeTeX. What I'd like to be able to do is change the main font. I belive the section of the code I need to change is this:               %FONTS     \defaultfontfeatures{Mapping=tex-text}     \setmainfont[SmallCapsFont = Fontin SmallCaps]{Fontin}      I downloaded and installed Fontin just to be able to see the document in its original form before trying to customize it. It works fine. Now I need some other fonts to try, and I can't figure out how to find out the font names I could use. I tried a few well-known names like _Times_ and _Verdana_ , these fonts were not found. Also tried some font names I have found in different documents and webpages, eg. _Cambria_ , _TeX Gyre Bonum_ , _Lucida Grande_ , which were rejected because either they were not found or their names contained an illegal character: a space. (Which pretty much stunned me since the `fontspec` documentation is full of multi-word font names...) The documentation on the `fontspec` package (v2.1e 2010/11/17) doesn't help me much. All it says about this is "TODO: add explanation for how to find out what the _font name_ is." So how do I find the names of the fonts I can use? * * * Edit: I'm using Ubuntu 10.10 with the latest TeXlive 2010 from tug.org.


title: latex end section or sebsection

text: how can I specify the end of subsection. In my example: ![enter image description here](http://i.stack.imgur.com/xBOo5.png) I have a subsection with only 3 rows, but I see the next paragraph also as continuance of the subsection:               \subsection{Kontrolle}     Zur Kontrolle eines physischen Systems werden die Time Series, welche durch Sensoren produziert werden, ebenfalls analysiert, um die besonderen Ereignisse zu entdecken.\\\\     In der Time-Series-Analyse gibt es besondere Herausforderungen. Time Series haben üblicherweise eine enorme Größe. Jeder Zeitpunkt in einer Time Series ist eine Dimension, deswegen haben die Punkte in einer Time Series hohe dimensionale Räume. Z. B.  jeder Punkt in einer Time Series mit der Länge 1000 hat 1000 Dimensionen. Die Bearbeitung solcher Höhen dimensionaler Räume ist nicht einfach, sogar mit Super-Rechner.     Um darüber hinaus eine Time Series zu..      how can I solve this problem?


title: Will TikZ compilation become faster?

text: I find that TikZ compilations are rather slow. I often work with old computers and the LaTeX compilation is very fast but TikZ slows down the process. Externalizing the graphics helps but making a separate compilation for the graphics is not the idea in my opinion. I think that TikZ is still under development and it's a modern language so will his compilation become faster?


title: Page margins problem with the title page and rest of the pages in the chapter

text: I am writing a thesis, and the university has some rules. The word `Chapter` should be 2in from the top of the page, and the for the rest of the pages, the text should start 1.25in from the top edge. I am using the directions from here: http://en.wikibooks.org/wiki/LaTeX/Page_Layout The pagestyle is `plain`. So I use these parameters:                  \documentclass{report}     \usepackage{lipsum}% http://ctan.org/pkg/lipsum     \newcommand{\setdimensions}{         %         % Horizontal         %         \setlength{\hoffset}       {0.00 in} % 1.00 in         \setlength{\oddsidemargin} {0.26 in} % 1.25 in         \setlength{\evensidemargin}{0.26 in} % 1.25 in         \setlength{\textwidth}     {6.6 in} % 7.75 in         \setlength{\marginparsep}  {0.00 in} % 7.75 in         \setlength{\marginparwidth}{-0.1 in} % 7.75 in         %                                    % 8.50 in         %         %         % Vertical         %         \setlength{\voffset}   {-0.43 in}              %  0.75 in         \setlength{\topmargin} { 0.00 in}              %  0.75 in         \setlength{\headheight}{ 0.200636502006365 in} %  0.200636502006365 in         \setlength{\headsep}   { 0.475 in} %  0.299363497993635 in         \setlength{\textheight}{ 8.60 in}               %  9.75 in         \setlength{\footskip}  { 0.55 in}              % 10.25 in                                                        % 11.00 in     }          \setdimensions          \newcommand\utdchapter{\if@openright\cleardoublepage\else\clearpage\fi                         \thispagestyle{plain}%                         \global\@topnum\z@                         \@afterindentfalse                         \secdef\@utdchapter\@schapter}          \def\@utdchapter[#1]#2{\ifnum \c@secnumdepth >\m@ne                              \refstepcounter{chapter}%                              \typeout{\@chapapp\space\thechapter.}%                              \addcontentsline{toc}{chapter}%                                        {\chaptername\, \protect\numberline{\thechapter} \uppercase{#1}}%                         \else                         \addcontentsline{toc}{chapter}{\chaptername\, \uppercase{#1}}%                         \fi                         \chaptermark{#1}%                         \addtocontents{lof}{\protect\addvspace{10\p@}}%                         \addtocontents{lot}{\protect\addvspace{10\p@}}%                         \if@twocolumn                           \@topnewpage[\@makechapterhead{#2}]%                         \else                           \@makechapterhead{#2}%                           \@afterheading                         \fi}                    \begin{document}     \chapter{A chapter}\lipsum[1-10]     \end{document}      This gives a gap of 1.5in for all the non-title pages in the thesis. I want to change it to 1.25in without altering anything in the title page.


title: How do I import a text file into Lyx keeping its formatting?

text: I apologize in advance if this question has been asked before. I am trying to import a text file, that contains my MySQL output, into the LyX document I'm working on. The text file contains tables created by MySQL. This is what part of the file looks like (it's 146 pages long so I won't paste the whole thing):               +-------------------+----------+     | Name              | Area     |     +-------------------+----------+     | Africa            | 30254700 |     | America           | 39872000 |     | Asia              | 45095300 |     | Australia/Oceania |  8503470 |     | Europe            |  9562490 |     +-------------------+----------+      This is the smallest table, of course, there are far bigger tables. I don't want to have to do write it all down by hand, if I can avoid it. I have tried converting the file to JPEGs and import them but that messes up formatting. I have also tried to copy and paste but that changes the formatting and gets rid of extra spaces. I'd really appreciate any help that you guys can give me here. I am a noob at LyX so I'd also appreciate simple instructions.


title: Tikz - How to overlay Decorations over longtable

text: I asked similar question here Colored Curly Brackets spanning across multiple pages but may be I did not provide enough detail. On its own the solution works great. I have about 32 longtables in my document with varying row numbers ranging anywhere from 40 to 250. Longtable was the choice because I wanted my data in a columns, which gave nice alignment and text wrapping. There are sections and subsections at the beginning of each longtable. Upto this point life is good. This is where I became bit greedy. I wanted to show curly or square brackets on the left side, these braces needs to span across pages and can start from one table and terminate anywhere in the next table. Some braces need to span about 5 or 6 long tables. I thought of using tikz overlay but could not find any example where I can see how to span braces across pages. I am attaching a sample image created in word to better explain the need. In the attached image the brown vertical and horizontal line are legacy of MS word screen shot and does have to the part of tex solution. Any examples, help or documentation would be appreciated. ![enter image description here](http://i.stack.imgur.com/cKgmf.jpg)


title: Which field does "LNCS" belongs to?

text: I am entering bibliography for my paper, i have cited a paper with "LNCS 2257" where "LNCS" stands for "Lecture Notes in Computer Science". I would like to know in the file `.bib", which field should this "LNCS" belong to? Thank you very much


title: How to randomize content with examdesign package using Sweave

text: Forgive me in advance if this is a dumb question, or too specific to one package. I've been using `examdesign` to randomize the order of questions, but I also want to randomly generate the content. I've begun using `Sweave` to generate random numbers in R for some of the questions. However, when I ask for several different versions, it keeps the content the same from one version to the next. In other words, it first creates the random content from R, then it uses that same content across the several versions. What I want it to do is to call the R functions every time it creates a new version. Here's an example:               \documentclass[10pt]{examdesign}     \usepackage{Sweave}     \usepackage{amsmath}     \NumberOfVersions{2}          \begin{document}     \begin{examtop}     \renewcommand{\arraystretch}{1.5}     \begin{tabular}{ll}     Name:& \rule{2in}{.4pt}\\     \end{tabular}     \vspace{0.5in}       \begin{center}         \textbf{Introduction to Statistics} \\         \textbf{Practice Exam, Form \Alph{version}} \\       \end{center}     \end{examtop}          \begin{shortanswer}[title={\Large Short Answer (10 pts each)}]          \begin{question}     <<ifst, echo=FALSE>>==     N = round(runif(1, 5, 20))     mu = 75     xbar = round(runif(1, 76, 84))     sig = round(runif(1, 5, 15))     z = round((xbar-mu)/(sig/sqrt(N)), digits=2)     p = round(1-pnorm(z), digits=4)     @          John wants to know whether his students are smarter than the average student.      John has \Sexpr{N} students and their average was \Sexpr{xbar}.      Assuming a population $\mu$ of \Sexpr{mu} and a standard deviation of      \Sexpr{sig}, can we conclude his students are smarter?             \examvspace*{1.5in}       \begin{answer}         \begin{align}         \nonumber Z_{obt} = \frac{\Sexpr{xbar}-\Sexpr{mu}}{\Sexpr{sig}/\sqrt{\Sexpr{N}}} =& \Sexpr{z} \\         \nonumber p_{obt} =& \Sexpr{p}          \end{align}       \end{answer}     \end{question}          \end{shortanswer}          \end{document}      You'll notice that once you sweave it, there will be two versions, but the mean/sd/N will be identical for both versions. How do I get them to generate different random numbers?


title: Intensity and contrast of black text

text: I noticed that the black color of the text in some PDF documents (especially products with InDesign) is more or less intense. Some PDF documents produced by TeX / LaTeX have different shades of black. How do you change the intensity of the color of the text?


title: How can \ifx\\\\ be false?

text: It appears that I have a case where `\ifx\\#2\\` is false, even though `#2` is empty. Here is the relevant excerpt from the log file, with `\tracingcommands` and `\tracingmacros` turned on:               \lastpageref ->\lastpagereftxt           \lastpagereftxt #1->\pagesLTS@@pageref #1*\END      #1<-pagesLTS.arabic          \pagesLTS@@pageref #1*#2\END ->\ifx \\#2\\\pagesLTS@@@pageref {#1}\else \expand     after \pagesLTS@@@pagerefstar \fi      #1<-pagesLTS.arabic     #2<-     {restricted horizontal mode: \ifx}     {false}      As a result, `\pagaesLTS@@@pagerefstar` is called, and mayhem results. Not least because this happens in the output routine, while typesetting a complicated page header, and the next token happens to be `\cr`. But that is all beside the point, which is that this can't happen! And yet it does. My question: How to debug something like this? Assuming it is not a bug in the TeX engine itself, there must be some natural explanation for it. I have verified (using `\show`) that `\ifx` really means `\ifx` at this point, and I assure you that there is no `\unless` lurking in the code either. And as far as I know, that exhausts the range of possible explanations. Can you come up with more possibilities I can look for? **Edit:** I managed to chop the problem files down to size. Here is my input file:               \errorcontextlines=99     \documentclass{blargh}     \begin{document}     (Dummy text to ensure we get a page.)     \end{document}      And my class file, chopped down from over 300 lines to the bare essentials for this problem, and named `blarhg.cls`:               \NeedsTeXFormat{LaTeX2e}     \LoadClass{report}     \RequirePackage[pagecontinue=false]{pageslts}          \AtBeginDocument{\thispagestyle{Eks}}          \def\PageText#1#2{Page #1 of #2}     \newtoks\firstpageupperright     \firstpageupperright{\PageText{\thepage}{\lastpageref{pagesLTS.arabic}}}          % Taken from pageslts.sty, so I could add \showtokens     \def\pagesLTS@@pageref#1*#2\END{%       \ifx\\#2\\% no star         \pagesLTS@@@pageref{#1}%       \else% star         \showtokens{"#2"}%         \expandafter\pagesLTS@@@pagerefstar%       \fi%     }          \def\ps@Eks{\let\@mkboth\@gobbletwo          \def\@oddhead{\hfill \vtop to 0pt{\let\\\cr                                 \halign{\strut\hfil####\cr                                         \relax\tracingall                                         \the\firstpageupperright\cr                                         \llap{}\cr}\vss}}          \def\@oddfoot{}\let\@evenfoot\@oddfoot          \let\@evenhead\@oddhead}


title: en-dash with half-sized space on either the left or the right

text: I am looking to produce directional variants of the en-dash. A "left en-dash" should have half of ordinary inter-word spacing on its right and allow line- breaks only on its left; a "right en-dash" should have half of ordinary inter- word spacing on its left and allow line-breaks only on its right. This is intended to aid the visual parsing of parenthetical phrases: "Here - as in his other works - the composer alludes to Italian folk dances." **What is the best way to define such commands?** Let's name them `\ldash` and `\rdash`.


title: htlatex does not give good results

text: I have a very nicely formatted file that I created using LaTeX. Now, I'm trying to embed the results into a website, and instead of embedding the resulting pdf document (which I found not to be as straightforward), I thought I could give a try to htlatex. But the results are terrible, not at all what I expected. Some symbols disappeared, sections with underline titles have the line after the titles (instead than from the beginning), space between bullets is all messed up, tables look bad (for two column tables, there are three lines, instead of only the center one), etc. I really don't know how to put a minimal sample here, as it is a whole document and I can see formatting issues all over the place. I could possibly take pictures and embed them here if you need more info. But I thought there has to be something I'm doing wrong. I'm just running               htlatex filename.tex      Is there anything else I should do besides this? Should I be careful on which packages I include in the LaTeX file?


title: Diagram editors with support for text entry as TeX?

text: I'm looking for good diagram editors with support for text entry as TeX. I have used ipe and dia in the past, but ipe does not let me change a rectangle (or any polygon) so it'll have round corners. Dia is OK, except that it won't let me enter TeX in text areas, and I can't even put superscript/subscript in text labels. Is there any other diagram editor (with a GUI -- I know of xypic and asymptote, but I'd rather be able to see the diagram as I work) that supports text entry as TeX (like ipe)?


title: Header at baseline next to an image

text: I defined the headmark over `\ihead[]{\headmark}` and an image over `\ohead[\Logo]{\Logo}` with the use of koma script. Now I´ve got the problem, that the `\headmark` is not at the baseline of the head. I helped me by defining `\ihead[]{\vphantom{\Logo}\headmark}`, but that gives different headers on scrplain and scrheadings. Here is an example:               \documentclass{scrreprt}      \usepackage[T1]{fontenc}     \usepackage{selinput}     \SelectInputMappings{         adieresis={ä},         germandbls={ß},         Euro={€},     }     \usepackage{blindtext}     \usepackage[  automark                 , headsepline                 , plainheadsepline                ]{scrpage2}          \pagestyle{scrheadings}     \clearscrheadfoot          \addtolength{\headheight}{1.2cm}     \addtolength{\textheight}{-1.2cm}          \ihead[]{\vphantom{\Logo}\\\headmark}     \ohead[\Logo]{\Logo}          \newcommand{\Logo}{\rule{3cm}{1cm}}          \begin{document}     \blinddocument     \end{document}      How can I adjust the `\ihead` to the baseline of the header?


title: How do I put card backs on my cards?

text: I have a a document that is making me sheets of cards. A stripped down, almost minimal example looks something like               \documentclass{article}     \usepackage[utf8]{inputenc} %Needed for input     \usepackage{venturis} %CM does not look right at this size     \usepackage[T1]{fontenc} %Needed for output     \usepackage[margin=0.4cm]{geometry} %The layout gets screwed up if I don't include this.          \newlength\cardheight     \newlength\cardwidth     \setlength\cardheight{0.3\textheight}     \setlength\cardwidth{0.3\textwidth}          \setlength{\fboxsep}{20pt}          \newcommand\card[2]{%     \begingroup\fboxsep=10pt%     \fbox{\begin{minipage}[t][\cardheight][t]{\dimexpr\cardwidth-2\fboxsep-2\fboxrule\relax}%     \raggedright%     \vspace{0.5 \baselineskip}%     \LARGE #1%     \vfill%     \noindent \normalsize #2%     \end{minipage}}%     \hspace{1pt}%     \endgroup}%          \makeatletter%      \newcommand{\cards}[2]{%      \@for\@c:=#1\do{%       \card{\@c}{#2}%      }%      }%     \makeatother%          \newcommand{\blank}{\hrulefill}          \pagestyle{empty}          \begin{document}     \centering          \cards{%Basic set     A big hoopla about nothing,%     A wheelchair death race%     }{Cards Against Humanity: Googling this is probably a bad idea}%     \cards{%The Canadian Expansion     Burning down the White House,%     Terry Fox's prosthetic leg,%     {The Offical Languages Act \\\vspace{\baselineskip} \noindent La Loi sur les langues officielles.},%To show you some of my cards are a bit more complex     The Front de Libération du Québec,%     Poutine,%     Killing a Moose with your bare hands%     }{Cards Against Humanity:\\ The Canadian Expansion. No really, don't google this at work.}%     \cards{%The Second Expansion     A piñata full of scorpions%     }%     {Cards Against Humanity:\\The Second Expansion. This if a card game for horrible people.}%     \end{document}      This works perfectly to lay out the front of the card, as you can see. However, I'd like to have backs on my cards. How would I go about automatically interleaving pages that contains card backs with some text of my choice? That way when I print it on a duplex printer I'll get fronts and backs to my cards. Edit: To clarify, this is one page of my document. I've got 126 pages in my actual document, with multiple \card commands, one for each set. I don't want to manually have to set up that many backgrounds, so I want one that will automatically place the text "Cards Against Humanity" on the back of each card (ie on every other page, but placed where there is a card, so pages with uneven card numbers still get proper backs.)


title: How do I document my style files?

text: I have many style files (and one or two class files) that I've written in my local texmf tree. Most were simple things that got me out of some trouble and which I put in to a style file in case I needed them again. One or two are quite complicated (probably unnecessarily). My thinking is that I should add some documentation to these files. Mainly for myself: although my reasoning for defining stuff the way I did was perfectly clear when I did it, it may not be so clear next year when I try to use it again (or, worse, try to modify it again). Also for others since I do sometimes share these files, either with collaborators or with anyone who says, "Hey, that's neat! How did you do that?". But definitely _not_ for uploading to CTAN. So I'd like to add some basic documentation to these files. As it is just for myself, I don't feel that I want to do _too_ much, so what I'd like is a system that is as close to the following parameters as possible:   1. It should be "in file": I want to be able to add the documentation for a command right where the command is defined.   2. The format should be readable when not compiled: this is a corollary of the above, since if I want to be able to read it there and then, I don't want to have to compile it first.   3. But it should be compilable so that I _can_ send it to someone else if I want to and they don't have to wade through the style/class file to find the documentation.   4. However, the compiled form doesn't have to be all that pretty. Is there such a system? Searching for 'documentation' on CTAN is like searching for snow in Norway - there's plenty of it but, to an outsider, it's hard to figure out what is the right type of snow. If there isn't a system that does what I describe, I'd be happy to hear of others' experiences in trying to do this (I'd be happy to hear them anyway, in fact).


title: Nicely recover embedded images

text: I have the latex source code and final generated PDF, but not the image files. I'd like to modify the document, so I'd like to recover the image file so that I can recompile. I can (very slowly) manually recover the images by several methods, but I'd really like to have a tool that extracts the images and saves them with _the same name_ that they were called from within the latex source. For example, on linux with the `pdfimages -j` command, I can extract all images to ppm/pbm/jpeg formats, but it does not preserve the file name, so I would have to laboriously edit the source code. I know that the output PDF retains some info about the file name, since the source document has lines like               \includegraphics{myImage}      and then if I do               grep myImage PDF_file.pdf      it says               Binary file PDF_file.pdf matches


title: Tabularx and short caption causes error

text: I'm trying to construct a multi-page, landscape table with variable column widths. It was working until I started to get a problem with the caption. If I try to include a short caption I get the error "Missing number, treated as zero \end{tabularx}" and "Illegal unit of measure (pt inserted) \end{tabularx}". Below is a minimal non-working example. I'm sure it was working earlier and I'm not sure what I've done to break it.               % New template     \documentclass[a4paper,11pt,twoside]{article}          %\usepackage{rotating}     \usepackage{tabularx} % For paragraph cells in tables     \usepackage{ltablex} % allows tabularx over multiple pages. May need to be compiled a couple of times.      \usepackage{lscape}     \usepackage{booktabs}          \newcolumntype{b}{>{\footnotesize}X}     \newcolumntype{s}{>{\footnotesize\hsize=.3\hsize}X}          \begin{document}     \begin{landscape}     %%%%%%%%%%%%%%     % May need following command to avoid problems with other tables     %\keepXColumns     %%%%%%%%%%%%%%     \begin{tabularx}{\linewidth}{ssssbbbbb}     \toprule     col1 & col2 & col3 & col4 & col5 & col6 & col7 & col8 & col9 \\     \midrule     1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 \\     \bottomrule     \caption[short caption]{long caption {\label{lit_review}}}     \end{tabularx}     \end{landscape}     \end{document}


title: beamer encapsulating video

text: I'm preparing some slides for a conference and i need to send the pdf to the steering committee. Is it possible in beamer, using multimedia, to encapsulate the video inside the pdf, i.e. avoiding to load it in the specified path, but giving only the pdf?


title: Is there some reason I can't change catcodes inside a command?

text: I have a very simple question. When I do this:               \catcode`\@=0     \catcode`\\=11     @mycommand{a}     @catcode`@\=0     \catcode`\@=11      It works perfectly and calls `\mycommand` correctly. However, when I try to define `\mycommand` with similar trickery:               \newcommand\mycommand[1]{       \catcode`\@=0       \catcode`\\=11       @textbf{Hello #1}       @catcode`@\=0       \catcode`\@=11     }      compilation stalls and gives me the `*` prompt. If I give it `Ctrl`+`D`, it terminates without producing any output. Indeed, it seems that changing the catcodes inside a command has no effect whatsoever, because the following works perfectly (whereas, from my understanding, it shouldn't):               \newcommand\mycommand[1]{       \catcode`\@=0       \catcode`\\=11       \textbf{Hello #1}     }      Can anybody please explain to me what's happening?


title: Setting tangent style in tkz-fct doesn't work

text: I tried to set the style of a tangent as in the following minimal example, but it doesn't work. Any idea why and how to fix it?               \documentclass[tikz]{standalone}          \usepackage{tkz-fct}              \begin{document}              \begin{tikzpicture}           \tikzset{tan style/.style={dashed,>=,blue}}% This doesnt'work           \tkzInit[xmax=5, ymax=5]%           \tkzAxeXY%           \tkzFct[domain=0:5]{0.5*\x**2}%           %\tkzDrawTangentLine[kl=2,kr=2,>=,color=blue,dashed](2)% This works           \tkzDrawTangentLine[kl=2,kr=2](2)%         \end{tikzpicture}              \end{document}      Output: ![output](http://i.stack.imgur.com/OIRSY.png) Desired output: ![desired output](http://i.stack.imgur.com/h7GO1.png)


title: Bibliography horizontal line to replace author's name

text: The original question of this thread (Dashed=true option in biblatex gives biblatex2.sty error), was addressed by @JosephWright below, and should be kept for future reference. As I understood better the nature of the problem, I decided to edit the original title and provide an answer to it below. I also deleted my old comments so as to clean up the thread. I use `\RequirePackage[backend=biber,sorting=nyt]{biblatex`}


title: savebox and usebox is different from original tikz image

text: The following MWE shows that the savebox/usebox image is quite different from the original tikz image (as suggested in Is it possible to reuse a part of a tikz image).               \documentclass[letterpaper]{article}     \usepackage{tikz}     \newcommand{\qtl}{\begin{tikzpicture}         \fill (1in,0in) arc(0:270:1in) -- (0,0) -- cycle;         \end{tikzpicture}}     \newsavebox{\tl}\savebox{\tl}{\qtl}     \begin{document}     \qtl\ \usebox{\tl}     \end{document}      Is this expected behaviour?


title: How can I improve this table?

text: Using MikTex/pdfLatex Question: How can I improve table? Consider Column Title: I'd like to remove table numbering? (i.e. remove 'Table 0.1') Consider Column headings: I'd like to get single line columns to appear on the 2nd line. Consider Second column: I'd like to get numbers in parenthesis on 2nd line. Consider Third column: All entries are of the style {XXXXX vs YYYYY} . I'd like to get the YYYY to appear on separate line.                       \documentclass[letterpaper,10pt]{memoir}             \usepackage{lipsum}             \usepackage{enumerate}         \usepackage{outlines}         \usepackage{booktabs}              \begin{document}         \pagenumbering{gobble}              \begin{quotation}         Isay yousay igpay atinlay modi tempora incidunt ut labore et dolore magnam aliquam quaerat.\sourceatright{Maximus Minimus }         \end{quotation}              \begin{table}[ht]         \begin{LARGE}         \caption{\textsc{\Large{          Consectetu Neque Porros ab ubi Quisu Dolo Ipsum         }}}         \centering         \end{LARGE}              \begin{tabular}%         {p{0.50in}p{0.90in}p{1.50in}p{2.75in}}         \toprule         \\         %Column Headings         \textbf{Amet} &         \textbf{Sed (quis)} &         \textbf{Cumque Voluptas} &         \textbf{Quis autem vel eum iure reprehenderit qui in ea voluptate}         \\         \midrule         %Row Entries         1 &         Culparu &         Facil vs. laborum &          Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.         \tabularnewline         \\         2 &         Laboriosame (2-3) &         Solentia vs. conse qua turti &         Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?          \tabularnewline         \\         3 &          Eaque provident (4-5) &          Solutanobi vs. animi &          Doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo         \tabularnewline         \\         \end{tabular}         \end{table}         \end{document}


title: Labels that are parallel with edges of a triangle

text: The following code is compiled to give a right triangle. The labels for the lengths of the legs and hypotenuse are present and "sloped." I would like them to be outside the triangle.               \documentclass[10pt]{amsart}     \usepackage{tikz}     \usetikzlibrary{calc,angles,positioning,intersections,quotes,decorations.markings}     \usepackage{tkz-euclide}     \usetkzobj{all}               \begin{document}          \begin{tikzpicture}     \path (135:3) coordinate (A) (45:4) coordinate (B) (0:0) coordinate (C);     \draw (A)     -- (B) node [at start, above left]{$A$} node [midway, sloped]{$m + n$}     -- (C) node [at start, above left]{$B$} node [midway, sloped] {$2\sqrt{mn}$}     -- (A) node [at start, below]{$C$} node [midway, sloped]  {$m - n$} -- cycle;     \draw pic[draw, angle radius=7.5mm,"$\theta$",angle eccentricity=1.5] {angle = C--A--B};     \tkzMarkRightAngle(A,C,B);     \end{tikzpicture}          \end{document}


title: How to allow # in \newcommand without \# or another way to defer processing of section of code

text: I am trying to defer processing of some latex code. This works,               \documentclass[a4paper,final,11pt]{article}     \usepackage{hyperref}     \begin{document}     here comes a reference     \href{http://www.example.com/doc#list}{doc}     \end{document}      but I need to move up the importing of `codeToBeDeferred` (containing the `\href`), and render/process it in the same place. So I changed it to this.               \documentclass[a4paper,final,11pt]{article}     \usepackage{hyperref}     \newcommand{\deferredCode}{         \href{http://www.example.com/doc#list}{doc}     }     \begin{document}     here comes a reference     \deferredCode     \end{document}      This works, except for the `#` in the `\href`, note the `#` was not a problem in the original code. side note: I am reading the code early and deferring processing because the code is merged together by a preprocessor, the preprocessor needs to process the deferred code early, but latex needs to do it latter. Well all this works, except when the `codeToBeDeferred` has a # in it. `\newcommand` does not like it. If I put a `\` before the `#` it fixes it, however I do not want to do this: there are a lot of historic versions of this code, I don't want to have to remember when I write new code. The code is valid latex when not part of a `\newcommand` How can I allow a `#` in a `\newcommand`? or How else can I defer the processing of this block of code? * * * The `#` is in a `\href` in the deferred code, it works outside of a `\newcommand`. What I am hoping for, is a wrapper to stop the `#` being a problem. If the `#` is only a problem when in a `\newcommand` then this may be possible.               %somePreambleCode     \newcommand{\deferredCode}{         \wrapper{             \href{http://www.example.com/doc#list}{doc}         }     }     %someOtherCode     \deferredCode      I know that I can escape the `#` with a `\` (changing it to `\#`), but am hoping for another way. I don't want to edit the code to be deferred. There is a choice of hundreds of them, I don't want them to be constrained by me doing this deferral trick to fix another problem.


title: How to make the number line?

text: ![wanna thing](http://i.stack.imgur.com/kA3vA.jpg) I want to make the number line as above. How could I make this for TeX? Thanks in advance.


title: Links to glossary items broken

text: I'm currently writing a large document, and I have two glossaries, one for acronyms, and one for a normal glossary. I have hyperref setup so that the glossary entries in the main text have links to the glossary items. At least that's the plan. Unfortunately, this does not work, and all the links point to the first page of the document. Here is my MWE:               \documentclass[a4paper]{memoir}     \usepackage[acronym,toc]{glossaries}     \usepackage{hyperref}     \makeglossaries     \pagestyle{ruled}     \newglossaryentry{UML}{name={UML},description={definition}}     \newacronym{XML}{XML}{Extensible Markup Language}     \begin{document}     \chapter{Intro}     \gls{XML}     \gls{UML}     \printglossaries     \end{document}      For building with latexmk, I'm using this .latexmkrc:               add_cus_dep('glo', 'gls', 0, 'makeglossaries');     sub makeglossaries {         system("makeglossaries '$_[0]'");     }      pdflatex outputs these warnings:               pdfTeX warning (dest): name{glo:UML} has been referenced but does not exist, replaced by a fixed one     pdfTeX warning (dest): name{glo:XML} has been referenced but does not exist, replaced by a fixed one      I'm not sure where this `glo:` prefix in the warning comes from, maybe that's the problem? And no, this is not a duplicate of How to get correct glossary links with frontmatter pages?. The back links, from glossary items to the occurrence in the text, work for me.


title: Insert Abbreviations in LyX document

text: I would like to generate the abbreviations entry in the report written in LyX. I could not find it. I would like to know 3 things :   1. Insert the abbreviations table in the TOC.    2. Insert the Abbreviation list at the end of all chapters from the abbreviations defined.    3. Define the list of abbreviations as well.


title: Migrating from tkz-2d to tkz-euclide

text: I want to use the example in http://www.texample.net/tikz/examples/morleys- triangle/. I changed the `tkz-2d` into `tkz-euclide` (as `tkz-2d` is superseeded by this package), but `tkz-euclide` doesn't know `\tkzMathLength`. How can I modify the code to get a working example?


title: TikZ: Drawing an arc between two coordinates?

text: I am up with the following: ![](http://i.stack.imgur.com/v1GTJ.png) Using the code given at the bottom. Suffice to say, I don't really like the result: I wanted to draw this picture without explicitly calculating the circle and the lines going into and out of it. However, I just don't know how to draw that part-circle to the right (with $\theta$ in it), such that I...   * get an arc which is shaped like a circle,   * have it intersect the shown without actually crossing them, and   * have $\theta$ placed between the middle of the actually drawn arc and its center. How could I achieve this?               \begin{tikzpicture}          \coordinate (a) at (-3,0.5);     \coordinate (b) at (-1,0.5);          \draw[solid,-latex] (a) -- (b) coordinate[at start] (p);          \draw[thin,solid,latex-latex] (p) -- node[left] {$p$} ++(270:0.5);          \draw[thin,dashed] (-3,0) -- (3,0) coordinate[very near end] (angleStart);          \node (interaction) [circle through=(b)                         , solid                         , draw                         , fill=lightgray                         ]  at (0,0) {interaction};          \draw[solid,-latex] (interaction.north east)  -- ++(45:2) coordinate[near end] (angleEnd);          \draw (angleStart) to[out=50,in=-20] node[below left=2pt] {$\theta$} (angleEnd);     \end{tikzpicture}


title: Curved arrow in xymatrix going over text

text: In some notes I took in a lecture, where I was using xymatrix to do the commutative diagrams, I found that a curved arrow beneath the diagram actually crossed over some text. (Ideally, the text should be lowered to accommodate the height of the "equation.") Here's a minimal working example:               \documentclass{minimal}     \usepackage{amsmath,lipsum}     \usepackage[cmtip,all]{xy}     \DeclareMathOperator{\Spec}{Spec}          \begin{document}          \[\xymatrix{     \Spec B^G \ar[r] \ar@/_2pc/[rr] & \Spec \widetilde{R} \ar[r] & \Spec R     \\ }\]          \lipsum[1]          \end{document}      Am I doing something wrong here, or is this a bug? In either case, how do I correct it, in a way simple enough to work when I am taking lecture notes in real time?


title: Using Cambria Math in XeLaTeX

text: Take a look at the following images, XeLaTeX typeset formula: ![enter image description here](http://i.stack.imgur.com/SiHdW.jpg) Word generated formula: ![enter image description here](http://i.stack.imgur.com/9TQwM.jpg) Note specifically the difference of the `\hat` implementations at `g_i` and `g_i^2` in XeLaTeX. In Word the two implementations are the same. Also note that the hats in XeLaTeX are both larger than Word's. A minimum working example is the following:               \documentclass{book}          \usepackage{unicode-math}     \setmathfont{Cambria Math}          \begin{document}     \[     V_{a_i}\left(\bar{x}_i,\hat{\theta},t\right) = -\frac{\hat{g}_i}{\hat{g}_i^2+\delta_{g_i}}V_{b_i}     \]     \end{document}      Why is this happening? Is there a way to make things better in XeLaTex?


title: How do I force a picture to be placed on a page, disregarding margins?

text: I have a picture that I would like to place on the frontpage of a student paper that I am working on, and it is being pushed on to the next page by LaTeX. I want it to be placed in a specific place, which will cause it to cross left, bottom and right margin for text. Is there any way of placing the image independently of the margins? Heres an example that looks like what I'm doing               \documentclass[10pt,a5paper]{article}     \usepackage{tikz}          \begin{document}          \begin{tikzpicture}[remember picture,overlay]     \draw (0pt,0.3\textheight) -- (0pt,-\textheight) -- (\textwidth,-\textheight) -- (\textwidth,0.3\textheight) -- cycle;     \end{tikzpicture}     {     \hspace{110pt}     \fontsize{120}{120}\selectfont Title         }          \begin{figure}[h!]     \vspace*{-50pt}     \hspace*{-15pt}     \includegraphics[width=387pt]{imagename}     \end{figure}          \end{document}      Edit: I don't know if the image width here works with this simpler example, but it's what I want in the original document.


title: Drawing a large binary matrix as colored grid in TikZ

text: I have a pretty big binary matrix of maybe 70 rows and 64 columns. For ease of viewing, I would like to draw this matrix in TikZ where e.g. a 1 is represtented by a red square and a 0 is a white square. Does anyone have any idea how I could obtain this? Ideally, I would have something where I can just load the matrix from a file and TikZ would handle everything else. Otherwise, I am also happy with a solution having to do find/replace every 0 by some string, and replace every 1 by another string. Thank you in advance! Example matrix:               10110101010     10010101010     01010111010     11110010100     01100011001     11101010111     10101010111


title: Centering does not appear to work in table

text: Hi I just can't get the text in row 3 to centre. Array package is loaded. Any help greatly appreciated.               \centering          \begin{tabular}{|c|m{5cm}|}     \hline     STATE & EVENT \\      \hline      The vase was broken &  \\      \hline      \multicolumn {2} {|c|} {The vase was \colorbox{red!50}{broken}}\\      \hline     & The vase was \colorbox{red!50}{broken} \newline by the dog \\      \hline      \end{tabular}


title: Beamer - compile only notes?

text: Is it possible to compile only beamer notes without slides? For practice I only wanted print the notes but I could not find any way to do so.


title: how to decrease the space between the \toprule and the \rowcolor

text: I have a table               \begin{tabular}{ccc}\toprule     ~&Jun-10&Jul-10\\\hline     Energy&19\%&7\% \\     LiveStock&2\%&-7\%   \\ \toprule     LiveStock&\cellcolor{red}{2\%}&\cellcolor{red}{-7\%}   \\     \hline     \end{tabular}      There is always some space between the toprule and the cellcolor, what should I do?


title: latex how to make table as the same width as the textwidth?

text: I have used `\begin{tabularx}` or `\begin{tabular*}` but neither of these two work, these two environment managed to increase the width of the table as the same as the text, while they cannot let the column contents inside the table increased associated with the table width.


title: Spacing after footnote superscript

text: I'm writing my thesis for my Computer Science degree. I have a lot of footnotes and my advisor has told me to remove the spacing generated by the superscript of the footnote. This footnotes are generated using the glossaries package using the option:               \usepackage[nonumberlist,toc,style=long3col,footnote,acronym]{glossaries}      this makes that the first time a glossary entry is mentioned it's added as a footnote. This is how it looks: Acimut1 : Explanation And this is how I want it to look: Acimut1: Explanation without the space after the superscripted 1, is there a way to achieve this. Minimal working example:               \documentclass[11pt,letterpaper]{book}     \usepackage[spanish,mexico]{babel}     \usepackage[utf8]{inputenc}     \usepackage[nonumberlist,toc,style=long3col,footnote,acronym]{glossaries}     \makeglossaries     \makeatletter     \renewcommand{\gls@main@displayfirst}[4]{       #1#4\protect\footnote{#2}     }     \makeatother               \newglossaryentry{acimut}{       name=acimut,       description={En náutica, el acimut es el ángulo o longitud de arco entre el punto cardinal norte en sentido horario de $0^\circ$ a $360^\circ$ y otro punto.}     }          \begin{document}     \Gls{acimut}, en la figura podemos ver un ejemplo.          \printglossary[type=main,toctitle={Glosario}]     \end{document}      produces: Acimut1 , en la figura 2.2 podemos ver un ejemplo. and shoud produce: Acimut1, en la figura 2.2 podemos ver un ejemplo. Answer: I figured it out, it was just a small mistake in my command to show the first appearance of a glossary entry in a footnote, it should be:               \renewcommand{\gls@main@displayfirst}[4]{       #1#4\protect\footnote{#2}}     \makeatother      without that extra line before the } Thanks


title: Typesetting straight baselines in a circular arrangement

text: I was wondering how one might go about setting the circular arrangement seen here in Figure "(2)"--i.e.,in a series of straight lines radiating from a central point. ![circular arrangement of text](http://i.stack.imgur.com/OwTc4.png) The most useful thing I've been able to find thus far is Rotating a letter (more or less an outright tutorial) on the `graphicx` package. I'm sure it would be doable with a dauntingly-arduous combination of `graphicx` and `hspace` and `vspace` commands, but I was hoping somebody might know of a more elegant solution. (I was going to ask about the other type with the circular baselines, but How to fine tune rotation of text along circular path? seems to clear that one up pretty extensively.) **UPDATE:** Many thanks to **mwibrow** for getting me mostly there and going the extra mile to do it with Hebrew characters! Just wanted to let anybody else who might want to weigh in with additional ideas know that Roman characters will suffice in further examples.


title: How to wrap web address in table?

text: All of my text in my table wraps except for line 13, which I have copied below. The website runs off to the side of the page. I'd like it to wrap the web address. Can anyone help?               \documentclass[12pt]{article}     \usepackage[english]{babel}     \usepackage{longtable}     \begin{document}     \maketitle     \begin{center}     \begin{longtable}{|l|p{13cm}|}     \caption[]{Disqus IT} \label{DisqusIT} \\     \hline \multicolumn{1}{|c|}{\textbf{ Sample }} & \multicolumn{1}{p{13cm}|}{\textbf{Text}} \\ \hline      \endfirsthead     \multicolumn{2}{c}%     {{\bfseries \tablename\ \thetable{} -- Disqus IT continued from previous page}} \\     \hline \multicolumn{1}{|c|}{\textbf{ Sample }} &     \multicolumn{1}{c|}{\textbf{Text}} \\ \hline      \endhead     \hline \multicolumn{2}{|r|}{{Continued on next page}} \\ \hline     \endfoot     \hline \hline     \endlastfoot       13 I really really really really like to think about this stuff: http://www.senate.gov/legislative/LIS/roll\_call\_lists/roll\_call\_vote\_cfm.cfm?congress=113\&session=1\&vote=00032 \\      \end{longtable}     \end{center}     \end{document}


title: Fixme incompatible with two-column?

text: I wanted to use Fixme together with my two-column layout, but the output of Fixme looks broken, as if the margins are too small or so. See example: ![enter image description here](http://i.stack.imgur.com/pp5Ol.png) Example code:               \documentclass[twocolumn]{article}     \usepackage[draft]{fixme}     \begin{document}     Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est           \fxerror{this is only Lorem ipsum}          Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.          \end{document}


title: How can I programmatically obtain the title of a LaTeX document?

text: I have a series of documents that are programmatically rendered by `pdflatex` from within a GNU Make `makefile`. I'd like to be able to write a Make target that "polls" each document for its `\title` so that I may amalgamate each one in a "document list". Can I do this? If so, how?


title: How to make nomenclature entries indent?

text: The nomenclature entries is left align without indent by default:                \printnomenclature[2.5 cm]       See e.g. ![Nom](http://i.stack.imgur.com/zTItL.png) I want to make these symbols `indent` from left margin for `1 ex` or `1 em`. But I have just lost in the package manual `nomenclature`. So how can I redefine the `indent` value? * * * `nomgroup` is redefined as:               \usepackage[intoc]{nomencl}      \makenomenclature       \renewcommand\nomgroup[1]{%        \ifthenelse{\equal{#1}{A}}{%         \item[\textbf{Acronyms}] }{% A - Acronyms          \ifthenelse{\equal{#1}{R}}{%           \item[\textbf{Roman Symbols}]}{% R - Roman            \ifthenelse{\equal{#1}{G}}{%             \item[\textbf{Greek Symbols }]}{% G - Greek              \ifthenelse{\equal{#1}{S}}{%               \item[\textbf{Superscripts  }]}{{% S - Superscripts            \ifthenelse{\equal{#1}{U}}{%             \item[\textbf{Subscripts }]}{{% U - Subscripts              \ifthenelse{\equal{#1}{X}}{%               \item[\textbf{Other Symbols }]}% X - Other Symbols                         {{}}}}}}}}}}      Examples of nomenclature input:               \nomenclature[rV]{$V$ }{Fluid control volume}     \nomenclature[ruf]{$\bm{u}_f$ }{Fluid velocity}     \nomenclature[gepsilonf]{$\epsilon_f$ }{Fluid porosity}     \nomenclature[rfb]{$\bm{f}_b$ }{Body force per unit volume}     \nomenclature[gepsilonf]{$\epsilon_f$ }{Fluid porosity}     \nomenclature[gsigma]{$\bm{\sigma} $ }{Cauchy stress tensor}


title: suppressing captions of figures but keeping list of figure captions?

text: I have very long figure captions in a book. I use: `\listoffigures` to create a listing of these captions right after the table of contents. The figures themselves are given in each chapter. Is there a way to suppress the figure captions that now appear with the figure, but keep them in the `\listoffigures` listing? The figure captions are long and so they don't fit together with figures. Since the captions are listed already in `listoffigures` near table of contents the readers can simply refer to these and there's no need for `caption{}` to appear with figure, but I want that information to still get used for the listing. Is this possible?


title: How to add optional arguments to a package I'm writing?

text: I want to build a package that can optionally typeset line in double-space. Something like this:               \ProvidePackage{mypackage}     % actual functional codes      Then I can use the package in this way:               \usepackage[doublespc=yes]{mypackage}      So that all line will be typeset in double-space. If I omit that optional argument in the preamble, then all line will be typeset in single-space.


title: How to setup XeTeX on Ubuntu?

text: I am fairly new, but have some experience with using LaTeX. I mostly use it for various mathematical and scientific documents and school papers. However, seeing as how my native language uses various characters besides the ANSI alphabet, I need to be able to type Unicode characters directly into my .tex file and have them come out right (in LaTeX some of them simply disappear and others turn into other Unicode characters). I've been told that instead of the workarounds for LaTeX (which I used in a while but did not have a pleasant experience with) I would be better off using XeTeX. I would like a beginners' guide to XeTeX (as I have seen that there are some differences between the syntax) as well as a setting-up guide, ideally for a Linux machine (as it stands right now, the respective packets are not even installed). Much appreciated, Follow-up: I installed texlive-binaries (which I found out is the package required for XeTeX), I created a basic .tex file               \documentclass{article}     \usepackage{fontspec}     \setmainfont{Palatino Linotype}     \begin{document}     Loneliness be over!     \end{document}      And I tried compiling it with XeTex but I got the following error: I can't find the format file `xetex.fmt'! Follow-up 2: I also tried the sudo fmtutil-sys --all and installing the texlive-xetex packaged (as I had originally installed a different one). The output is still different, though it still doesn't behave right. I think.               This is XeTeX, Version 3.1415926-2.2-0.9995.2 (TeX Live 2009/Debian)     entering extended mode     (./main.tex     ! Undefined control sequence.     l.1 \documentclass                      {article}     ? ! Undefined control sequence.     l.2 \usepackage                      {fontspec}     ? ! Undefined control sequence.     l.3 \setmainfont                     {Palatino Linotype}     ? ! Undefined control sequence.     l.4 \begin               {document}     ? [1] )     Output written on main.pdf (1 page).     Transcript written on main.log.      By the way, is there anyway to paste text into code format efficiently? Because after I type the four spaces and then paste the text I have to manually add 4 spaces to all the other lines. Follow-up 3: Installed texlive-full, did not help. It still doesn't work. I removed the \setmainfont line, and it now compiles in xelatex, but the unicode characters don't work. XeTeX still gives the same errors (undefined control sequence etc.) I tried LuaTeX and it worked fine (I also imported the luatextra package) but it removes the unicode characters as well. The characters I'm having issues with are ăîâĂÎÂșțȘȚ and in the final document, they come out blank or as other unicode characters.