title: Have the BibTeX styles gotten the placement of a name's "junior" part wrong?

text: It is commonly taught (e.g. in the "Guide to LaTeX" (4e), p. 235) that names with a "junior" part should be given in the form `author = "Surname, Junior, Given"` in a `BibTeX` entry. How should "junior" parts appear in bibliographies with inverted (surname- first) name order? The widely used style guide "A manual for writers of research papers, theses, and dissertations" (Kate L. Turabian; 8e (2013); 978-0-226-81638-8) has an example on page 152: > Gates, Henry Louis, Jr. _America behind the Color Line: Dialogues with > African Americans_. New York: Warner Books, 2004. While `BibTeX`'s `plain` style produces no inverted name order > [1] Given Surname, Jr. _Title_. Publisher, 1000. all of the few styles with an inverted name order produce a name-internal "junior" part: `authordate1`: > Surname, Jr, Given. 1000. _Title_. Publisher. `apa`: > Surname, Jr, G. (1000). _Title_. Publisher. `chicago`: > Surname, Jr, G. (1000). _Title_. Publisher. `kluwer`: > Surname, Jr, G.: 1000, _Title_ , Publisher. This can't be right. Turabian is just one of many prescriptive style guides, but there is also a good semantic reason to always have name-final placement of the "junior" part, as in "Surname, Given, Jr <rest of bibliographic entry>": the "junior" part modifies the entire name, not just a part of it. So it shouldn't be in the middle of a surname-given cluster, whatever the order in which it is presented. Or maybe it can be said to modify only the given name. But in this case, too, there is no good reason to have the "junior" part in the middle: The hierarchical structure of the name is something like "surname > given > junior" (which I suppose can be interpreted as "[surname > given] > junior" or "surname > [given > junior]"), and therefore any ordering that messes with this is odd. Here is the code used to generate the above results:               \documentclass{article}     \usepackage{natbib}       % this line seems to be necessary for some styles for error-free compilation;       % I welcome pointers to explanations of this unexpected dependence               \begin{document}          Text. \cite{testentry}.          \bibliographystyle{kluwer} % choose from: plain, authordate1, apa, chicago, kluwer, ...     \bibliography{testbibliography}          \end{document}      `testbibliography.bib`:               @book(testentry,       title = "Title",       author = "Surname, Jr, Given",       publisher = "Publisher",       year = 1000,     )      (Different point: On page 333, Turabian's manual states that "[i]n frequent references to a father and a son, shortened versions may be used (Holmes Sr.), but only after the full name has been presented". The styles I tried above don't attempt this either. You can see this by adding another bibliographic entry `testentry2` with `Sr` instead of `Jr` and then referring to it in the main document's body.)


title: Incompatibility between lipics and hyperref

text: I am using the lipics document class. I want to use the hyperref package with this and pass some parameters to it. When I use this code,               \documentclass[a4paper,UKenglish]{lipics}     \usepackage[pdftex,bookmarks=false,pdfstartpage=5]{hyperref}      I am getting the following error:               ! LaTeX Error: Option clash for package hyperref.      When I try the following code,               \documentclass[a4paper,UKenglish,hyperref={bookmarks=false,pdfstartpage=5}]{lipics}      I am getting 469 errors and the first one is:               ! LaTeX Error: Missing \begin{document}.      What is the right way to combine lipics and hyperref?


title: How to write additional content into bbl file?

text: How can I tell LaTeX to write additional content to `bbl` file? Background of my question (see also MWE below): The page number for the bibliography displayed in the table of contents is correct if and only if `\addcontentsline{toc}{chapter}{Bibliography}` is placed at the beginning of the `thebibliography` environment. Hence, using `bibTeX` I need to write `\addcontentsline{toc}{chapter}{Bibliography}` into the `bbl` file. If I place it before `\begin{thebibliography}` the page number is _first page of bibliography - 1_ , if I place it after `\end{thebibliography}` it is _last page of bibliography + 1_ (which in the MWE would be correct but not in general).               \documentclass{book}          \begin{document}     \tableofcontents          \begin{thebibliography}{B}     \addcontentsline{toc}{chapter}{Bibliography}     \bibitem[B]{B}     A. Brown     \newblock {\em Mathematics}.     \end{thebibliography}          \end{document}


title: table of contents in supplement - renew command causes problems?

text: I cannot get the `minitoc` package to create a mini table-of-contents for my Supplementary Material section. Note that I `renewcommand` a few things so that my Supplementary Material sections, tables, & figures have an "S" in front of them (S denotes Supplement). The `minitoc` commands work fine for other sections (before the Supplementary Material section). But when I place them after `\section{Supplementary Material}`, it doesn't do anything (no table-of-contents is created).               \documentclass[11pt]{article}     ...     \usepackage{minitoc}     \setcounter{secttocdepth}{5}     ...     % when called, the following will include an "S" in     % the numbering system to denote "Supplement".     \newcommand{\beginsupplement}{%             \renewcommand{\thetable}{S\arabic{table}}%             \renewcommand{\thefigure}{S\arabic{figure}}%         \renewcommand{\thesection}{S\arabic{section}}%         \renewcommand{\thesubsection}{S\arabic{section}.\arabic{subsection}}%            }     ...     ...     \begin{document}          \dominitoc     \dosecttoc     \dosectlof     \dosectlot          \tableofcontents   % works great.  Includes supplement in toc, as it should.     ...     ...     ...     \newpage     \beginsupplement    % renews a few commands (see above)          \section{Supplementary Material}          \secttoc  % does nothing     \sectlof  % does nothing     \sectlot  % does nothing      Clearly the `renewcommand`s for `beginsupplement` are causing issues. But how/why? And what can I do about it?


title: Engineering notation (scientific) as tick labels with pgfplots (maybe via siunitx)?

text: I would like to have numbers on the ticks labels formatted in engineering notation -- but unlike in How to control pgfplots axis scaling for engineering notation (multiple of 3 exponent)?, I would like not to have `scaled ticks` (that is, each tick should display its `10^x` exponent, if appropriate). I got to this MWE:               \documentclass{article}     \usepackage{pgfplots}     \pgfplotsset{compat=1.5.1}     \usepackage{tikz}     \usepackage{siunitx}     \usepackage[pdftex,active,tightpage]{preview}          \begin{document}          \pgfkeys{       /pgf/number format/sci generic={mantissa sep={\!\cdot\!},exponent={10^{#1}}},     }          \begin{preview}     \begin{tikzpicture}     \begin{axis}[       axis x line=bottom,       axis y line=left,       scaled ticks=false,       xmode=log,       /pgfplots/xtick={0,0.5,1,5,10,50,100,500,1000,5000,10000,50000,100000},       x tick label style={rotate=-50, anchor=west, align=center, font=\small},       xmin=0, xmax=200000,       ymin=0,       visualization depends on={rawx \as \myx},       nodes near coords={($\pgfmathprintnumber\myx$, \textcolor{black}{\num[scientific-notation = engineering,round-mode=places,round-precision=2,zero-decimal-to-integer]{\myx}}\color{blue})},     ]          \addplot[color=blue,mark=*] coordinates       { (0.5,1) (1,2) (5,3) (10,4) (50,5) (100,6) (500,7)         (1000,8) (5000,9) (10000,10) (50000,11) (100000,12)};          \end{axis}     \end{tikzpicture}     \end{preview}          \end{document}      ... which results with this rendering: ![test01.png](http://i.stack.imgur.com/qP9dh.png) So, I have:   * 0.5, 1, 5, 10, 50, 100, 500, 1000, 5000, 10000, 50000, 100000 - as the original sequence for the x ticks (and labels),   * 10-0.3, 100, 100.7, 101, ... - as the x tick labels as done by `pgfplots`   * 0.5; 1; 5; ... 50,000; 1·105 \- as output by `\pgfmathprintnumber` (left, blue)   * 500×10-3, 1, 5, ..., 50×103, 100×103 \- as output by `\num` of `siunitx` (right, black) What I'd like to have, is that instead of the current x ticks label numbers, the `siunitx` engineering notation format is rendered for the x ticks labels - but: with `\!\cdot\!` as mantissa separator, instead of `\times`; and without thousands separator. How could I achieve this?


title: Commercial use of LaTeX templates

text: I was wondering what are the licensing issues or the best way to know if certain templates allow for commercial use. I know the best way is to contact the original author but sometimes the sites don't provide contact info or the template is on a "list of best LaTeX resume templates". I'm looking specifically for resume templates. However, if I can pay for LaTeX typesetters that would be the best case. Where would be the best place to find professional typesetters?


title: How to set hyperfirst to just one glossary?

text: This is a follow up question to here. How can I set my acronyms glossary to `hyperfirst=false` and the main glossary to `hyperfirst=true`? I tried to give that as an option to `\printglossary` but that doesn't work. In the documentation I can just find a package option to disable hyper references for a particular glossary in total. Maybe the easiest way would be to set `hyperfirst=true` and just to redefine the first use of an acronym.


title: Command to find current enum depth?

text: I was wondering if there was a command to find what at what depth of the `enum` counter (i.e. `enumi`, `enumii`, etc.) a command was at compile time. I'm attempting to create a `\question` command. What I have so far:               \newcommand{\question}[2][\value{enumi}+1]{\setcounter{enumi}{#1-1} \item \textbf{#2}}      Which works great for the first level (Note: requires the `calc` package). What I'm looking for is a command (or series of commands) to replace the `\value{enumi}+1` with whatever the current depth is so that something like:               \begin{enumerate}        \question{Whatever}        \question[10]{Blah}           \begin{enumerate}              \question[2]{Stuff}           \end{enumerate}     \end{enumerate}      would produce output like:               1. Whatever     10. Blah        (b). Stuff


title: How to fix an error when using ko.TeX for typesetting Korean words?

text: I have a problem using ko.TeX for writing Korean words. I use MikTeX 2.9 with TeXworks as editor and pdfLaTeX as engine. I haven't used ko.TeX package, yet, so when I write Korean words (e.g. 남) as follows:               \documentclass{article}     \usepackage{kotex}     \begin{document}      남     \end{document}      TeXworks will install missing package (1) kotex-utf and then (2) kotex-plain during compilation but I'm getting this kind of error at the end:               ! Missing \endcsname inserted.     <to be read again>                     \dhucs@serifhangulfont      1.4 남      Are we able to solve this particular problem?


title: Pgfplots grid not showing

text: I'm having trouble with setting up a grid for this plot using `pgfplots`. ![enter image description here](http://i.stack.imgur.com/j0u4G.png) Here's my code.               \documentclass{article}     \usepackage{pgfplots}          \begin{document}     \begin{tikzpicture}[         /pgf/declare function = {             signal = 0.8 * (sin(deg(x)) + 0.7*sin(2*deg(x)) + 0.7*sin(3*deg(x)));         }     ]          \begin{axis}[         grid = minor,         height= 0.35\textwidth,         width = 0.8\textwidth,         thick,         scale=1.8,         axis lines=center,         domain=0:20*pi,         samples=500,         line join=bevel,         xlabel=t,         ymax=2.7,         ymin=-2.7,         xmax=25.9,         xmin=0,         xtick=\empty,         ytick=\empty,     ]      \addplot[ultra thick,black!40!cyan] { signal };          \end{axis}     \end{tikzpicture}     \end{document}      Is this problem related to the setting of the axis lines?


title: How to use suggestive variable names in math?

text: I want to use suggestive variable and function names in math like the in the following: > result = f(input) or > accumulator = sum(inputs) I want the formula to stand out in relation to the surrounding text. So if I use the following: `\(\mbox{result} = F(input)\)` it doesn't work because then "result" looks just like the normal surrounding text, while "F(input)" is italicized in math mode. So how can I make the "result" be also italicized correctly and consistently. Maybe I shouldn't use math mode at all but just normal mode and italicize the whole? But I intend it to be a logical unit within the text.


title: how to add word in the line?

text: I want to add the word in the line using the bellow code, now the picture is :![enter image description here](http://i.stack.imgur.com/f30Ew.jpg) I want to add the word "p1" in the line between "a" and "b" which looks like: ![enter image description here](http://i.stack.imgur.com/RcuhT.png) I try to modify the code to `\path [line] (a) -- (b){p1};` but there is an error.               \usetikzlibrary{shapes,arrows,positioning}        \usepackage{wrapfig}       \usepackage{graphicx}        \resizebox{.4\textwidth}{!}{\begin{tikzpicture}[     block/.style = {circle, draw,align=center,text width = 0.1cm, inner sep = 0.1cm},         line/.style = {draw,thick, -latex'},         node distance=0.9cm and 0.4cm         ]              % Place nodes         \node [block] (a) {a};         \node [block, below left of=a,xshift=-1.0cm, yshift=-0.3cm] (b) {b};         \node [block, below right of=a,xshift=1.0cm, yshift=-0.3cm] (c) {c};     % Draw edges     \path [line] (a) -- (b);     \path [line] (a) -- (c);          \end{tikzpicture}}


title: fancyhdr: missing section number of bibliography

text: I know there are other questions like this, but I didn't find an answer for my particular question. Please consider the MWE below. While the section number is included in the header for the first chapter, it isn't for the bibliography. I used `renewenvironment` to prevent the bibliography to create an own section becaues I need a section number and an entry in the ToC.               \documentclass{scrartcl}     \usepackage{fancyhdr}     \pagestyle{fancy}     \fancyhf{}     \fancyhead[L]{\leftmark} % 1. sectionname     \fancyfoot[C]{\thepage}     \usepackage{filecontents}     \bibliographystyle{plain}     \usepackage[english]{babel}     \begin{filecontents}{\jobname.bib}     @article{DBLP:journals/corr/abs-1008-2849,       author        = {Jan Wassenberg and Peter Sanders},       title         = {Faster Radix Sort via Virtual Memory and Write-Combining},       eprinttype    = {arxiv},       eprintclass   = {cs.DS},       eprint        = {1008.2849},       date          = {2010-09-06},       pages         = {1-8},     }     \end{filecontents}     \makeatletter     \renewenvironment{thebibliography}[1]          { %\section{\bibname}% <-- this line was commented out           \@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}%           \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     \begin{document}     \section{first section}     some content     \nocite{*}     \newpage     \section{Bibliography}     \bibliography{\jobname}     \end{document}      Do you know what I could change to include the chapter number as well in the fancyhdr title for the bibliography? It is displayed correctly in all other chapters.


title: Undefined control sequence (\email, \address) in combine class

text: I am using the combine class to merge several tex files. Each of these files has a title with the name of the article, name of the author and the author's address and email id. Here is a sample of each article:               \documentclass[12pt]{amsart}          \usepackage{amssymb,amsmath,amsthm}          \title[xxx]{xxx}          \author{yyy}          \address{Department of zzz, www}          \email{abc@gmail.com}          \begin{document}          \maketitle          \begin{abstract}          ...          \end{abstract}          ...          \end{document}      Here is the text from the main document for the combine:               \documentclass[12pt]{combine}          \begin{document}           \pagestyle{combine}           \maketitle \tableofcontents           \clearpage                \begin{papers}            \coltoctitle{xxx}            \coltocauthor{yyy}            \label{abc}            \import{abc}          \end{papers}          \end{document}      When I try to compile the main combine file, I get the following error: > ./abc.tex:Undefined control sequence \address > > ./abc.tex:Undefined control sequence \email The individual articles do not give this error. Will be grateful for help on this! Thanks.


title: Problem with optical sizes option in package MinionPro

text: I have converted the .otf files for Adobe MinionPro to PostScript Type1 files and used the auxiliary files for metrics and encodings provided with the package MinionPro. Everything works fine except for two features. The first is that in the next MWE, which I run under `pdfLaTeX`:               \documentclass[11pt]{memoir}          \usepackage[fullfamily,opticals,mathlf,minionint]{MinionPro}          \begin{document}          Testing MinionPro          \[ \phi(x)=\int_{-\infty}^{x} e^{-x^{2}/2} \]          \end{document}      the superscript and supersuperscript faces for the numerals (`2`) do not appear, only their bounding boxes. The issue remains unless I have only `opticals` and `minionint` as options. I want to have the optical sizes selection feature. Besides, although only of secondary importance to me, if I try to use the `openg` option, it happens the same thing when a have a `g` to be typeset in math mode, namely, only the bounding box appears. Is this happening to anyone else? Any possible solution? Just in case that this may come to someone's mind: yes, in the conversion to Type1 I have started up from the Adobe .otf files which include Caption, Subhead, and Display besides the Text size. Yet another strange issue is that if I use the original Adobe .otf files under `XeLaTeX`, a kerning seems to be wrong: there is a collision between the glyphs `V`or `W` (uppercase) and `i` (lowercase). Such a collision does not appear when I use the package MinionPro, even though I got the font outlines from the same .otf files. Anyone else has noticed this?


title: RGB EPS figures appear as CMYK in LaTeX

text: When I make EPS figures in Matlab and/or Illustrator, they look RGB, however, in the DVI file and in the subsequent PDF or PS file it appears CMYK. When I open up the figures outside of LaTeX, they look the way they should. How do I fix this (i.e. make my figures appear in RGB)?


title: Typesetting programming packages/libraries in LaTeX

text: When referring to programming packages/libraries (such as matplotlib for example) within a LaTeX document should one typeset it to denote it as a package/library name? Such as using `\texttt{}`?


title: Create named coordinate from extracted x/y parts

text: I can not find a way to effectively identify coordinates of the point, if used in the command let in the draw path. My example:                 \draw[gray] let \p1=(D), \p2=(intersect), \p3=(C) in (\x1,\y2)                -- +(-\x1,0) node[left, red]{$f(c)$} -- (\x1,\y2) node[above, red]{$F$}                -- (\x3,\y2) node[right, red]{$E$};      Now I would like to create named coordinate for node with text $F$:                 \coordinate (F) at (\x1,\y2);      but with error. How I could I solve it? Thanks.


title: Help Installing a Font for Latex on Mac (map file, directory structure, font naming)

text: I'm sure this sort of thing has been asked again and again, but I cannot find a guide or post anywhere that has been able to get me what need. All the online help seems to be aimed at a higher level than I can cope with (no big surprise). So any help I could get here would be greatly appreciated The font I'm trying to install is Gill Sans. Although for Windows, this guide seems to be the most hand-holdy http://www.radamir.com/tex/ttf-tex.htm, but can only take me so far I have the font files in ttf, tfm, vpl, vf, pfb and afm formats, and am happy to use any to get the desired result. I'd like to think that it would just be a case of dropping the relevant files into the appropriate directories and being done, but as I understand it there are a few things preventing me from using the font in Latex - namely making/appending? the map file, having the right directory structure for fonts, and naming the fonts appropriately. I'd be thankful for help with any of these problems. I should also add that I do not have the option of using XeTeX or any other 'non-standard' form of Latex.


title: Converted DVI to EPS is larger then the underlying graphic

text: I use this code for generating a graphic:               \documentclass[dvips]{article}     \usepackage{pst-all}     \usepackage{pst-3dplot}     \usepackage{pst-eps}     \usepackage{pst-dbicons}     \begin{document}     \pagestyle{empty}     \begin{TeXtoEPS}     \fontfamily{phv}\selectfont     \psset{xunit=1cm,yunit=1cm,runit=1cm}     \begin{pspicture}(11,11)         \psframe[linewidth=2pt,framearc=.3,fillstyle=none](0.5,0.5)(10.5,10.5)              \rput(4,10.5){\psframebox*{\Large Datenbanksystem}}              \psframe[fillstyle=solid, fillcolor=lightgray](1.5,6)(9.5,9)              \rput(5.5,7.4){\psframebox*[fillcolor=lightgray]{\Large Datenbankmanagementsystem}}              \rput(5.5,3.25){\database{3.5cm}{2cm}[fillstyle=solid, fillcolor=gray]{Datenbanken}}          \end{pspicture}          \end{TeXtoEPS}          \end{document}      when I convert it with dvips Grafik1.dvi -E -o Grafik1.eps I expect a graphic with 1:1 ratio. But it added some white Border to the left hand side: ![Image with white Border](http://i.stack.imgur.com/8haEi.jpg) Any idea what happened and what I could do to fix this?


title: how to put two pictures side by side?

text: I try to put the two pictures side by side using the following code, however, the size of the two pictures are very small like the picture. ![enter image description here](http://i.stack.imgur.com/37YN3.jpg) However, the picture looks like if I don't put them together. ![enter image description here](http://i.stack.imgur.com/4QHnT.jpg) I don't know why.               \usepackage[latin1]{inputenc}     \usetikzlibrary{trees}     \usepackage{verbatim}          \begin{figure}[htbp]     \begin{minipage}{0.5\linewidth}     \centering     \resizebox{.6\textwidth}{!}{     \tikzset{level 1/.style={level distance=0.7cm, sibling distance=4.5cm}}     \tikzset{level 2/.style={level distance=0.7cm, sibling distance=5cm}}          \tikzset{bag/.style={text width=20em, text centered,yshift=-0.2cm}}     \begin{tikzpicture}[grow=down, -stealth,  edge from parent/.style={draw,decorate,decoration={snake, post=lineto, post length=3mm}}]     {\node[bag]{$S_0{:}(A{<}a{=1}{>}B,G_{t_{i_1}},0)$}         child{ edge from parent node[right=0.1cm]{$$}; \node[bag]{$S_{n-1}{:}(stop_{good},t_{i_1}{\geq}2,0)$}         }         child{edge from parent node{$\times$}; \node[bag]{$S_n{:}(stop_{good},t_{i_3}{\geq}3,0)$}         };     }     \end{tikzpicture}}     \caption{A Circle}     \label{fig:circle}     \end{minipage}%     \begin{minipage}{0.5\linewidth}     \centering     \resizebox{.6\textwidth}{!}{     \tikzset{level 1/.style={level distance=0.7cm, sibling distance=4.5cm}}     \tikzset{level 2/.style={level distance=0.7cm, sibling distance=5cm}}          \tikzset{bag/.style={text width=20em, text centered,yshift=-0.2cm}}     \begin{tikzpicture}[grow=down, -stealth,  edge from parent/.style={draw,decorate,decoration={snake, post=lineto, post length=3mm}}]     {\node[bag]{$S_0{:}(A{<}a{=1}{>}B,G_{t_{i_1}},0)$}         child{ edge from parent node[right=0.1cm]{$$}; \node[bag]{$S_{n-1}{:}(stop_{good},t_{i_1}{\geq}2,0)$}         }         child{edge from parent node{$\times$}; \node[bag]{$S_n{:}(stop_{good},t_{i_3}{\geq}3,0)$}         };     }     \end{tikzpicture}}     \caption{A Rectangle}     \label{fig:rectangle}     \end{minipage}     \end{figure}


title: How to display text of reference

text: If I put               \usepackage{hyperref}          % ... %     \begin{align}       Label \label{lab:one}     \end{align}     Reference: \ref{lab:one}      I get a hyperlink to my label (puts "Reference: 1" with a clickable 1). Instead, I occasionally want to put the label unclickable (hence a non- clickable 1 in this case), but still use hyperref for other parts. Never figured out how to do that.


title: Is it possible to create a LaTeX preamble "header"?

text: Is it possible to create a header in LaTeX containing my usual preamble, functioning similar to a header in C? Specifically, can I write a text document (or something similar) with the preamble that I usually use, and type something in my documents' preambles that effectively pastes this document there? In particular, so that I can change this document, and have all of my TeX documents' preambles effectively updated? (I keep making small changes in one document, and updating all the others is getting rather troublesome...) Thanks!


title: UNIX timestamp (= seconds since 1/1/1970) in document?

text: I would like to include a so-called UNIX timestamp in my document. All technicalities aside, it's basically the number of seconds since 1/1/1970 0:00 UTC aka "the epoch". (At the time of me writing this, it's 1385812869.) If have not found a way to include that number in my document. Unless I have overlooked something, the obvious suspects (datetime, isodate, scrtime) seem not to provide a ready-made solution.


title: Quick introduction to memoir class

text: I'm planning to use the `memoir` class for writing a small technical book on computer programming. I just downloaded the `memoir` manual. Unfortunately it is very big and will take a long time to get started. What are some good tutorials on the `memoir` class?


title: Writing equations with fractions and greek letters

text: I'm trying to write this equation below and using the `\usepackage{amsmath}`, but I'm getting the error _! Argument of \frac has an extra }_ so I still don't know what I did wrong. And how can I make everything upright and not italic?               \begin{eqnarray}     \dot{\varepsilon} = A{\prime}{\prime}{\prime}\dot\frac{\sigma\dot\omega}{k\dotT}\dot\frac{1}{d^2}\left(1+\frac{\pi\dot\delta}{d}\dot\frac{D_{KG}}{D_v} \right)     \end{eqnarray}      ![enter image description here](http://i.stack.imgur.com/oyWSz.png)


title: List of all labels with hyperlinks

text: I'm writing a document with several `\label{}` environments and I'm looking for an opportunity to generate a list of all of them at the beginning, something like this:               Label 1 ..... 1     Label 2 ..... 2     Label 3 ..... 4      And so on. I had a look at `tocloft` but couldn't find anything.


title: How to constrain text to a rectangle in tikzpicture?

text: I have a list of _rectangular blocks_ that have a _text_ , _color_ , and size ( _y start_ , _y size_ , _x start_ , and _x size_ ). I want the text to be in the center of the rectangle, such that it does not go outside of rectangle. Currently I am using \\\ in _text_ to make sure the text fits, but this requires too much playing around, I would prefer them to fit automatically. Here is my current code:               \foreach \text/\color/\ystart/\ysize/\xstart/\xsize in \rectangularblocks {         \filldraw[fill=\color] (\xstart, \ystart) rectangle (\xstart+\xsize, \ystart+\ysize);         \draw (\xstart+\xsize/2, \ystart+\ysize/2) node[align=center] {\text};     }      Based on other answers I saw, this can be done in two ways:   1. By turning on wrapping and bounding the text to the size of the rectangle.   2. By scaling the text to fit in rectangle. But I fail to come up with code that can do either (and keeping the text in the center of my rectangle). I would prefer #1 as it means I do not have to play around with \\\ in my _text_.


title: Mysterious error message regarding missing reference

text: At the very end of my `pdflatex` compilation, I get the following error messages:               (see the transcript file for additional information)pdfTeX warning (dest): name     {theorem.10.2} has been referenced but does not exist, replaced by a fixed one          pdfTeX warning (dest): name{theorem.6.1} has been referenced but does not exist     , replaced by a fixed one      And yet there are no `undefined reference` errors. The problem may be related to the `hyperref` package, but I am not certain of that. Can someone offer advice or explanation? Code snippet:               \begin{theorem}[Type Safety]     \thmlabel{ssds}{safety} \\[-2ex]     \noindent\begin{enumerate}      \item{} If $ \IsOf{e}{\tau}$ and $e\StepsTo e'$, then $ \IsOf{e'}{\tau}$.            \item{} If $\IsOf{e}{\tau}$, then either $\IsVal{e}$, or there exists $e'$ such that $e\StepsTo e'$.     \end{enumerate}     \end{theorem}


title: problem with Tikz and Beamer

text: when i put this code on beamer i got bad figure               \documentclass[leqno,mathserif]{beamer} \usepackage{graphics,bm}     \usetheme{Luebeck} \setbeamercovered{transparent}     \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc}     \usepackage[english,french]{babel} \usepackage{tikz}     \usetikzlibrary{positioning}      \begin{document}     \begin{frame} \begin{figure}[h!] \centering \begin{tikzpicture}     \matrix [column sep=7mm, row sep=5mm] {   \node (se) [draw,     shape=rectangle] {Existence Forte}; &   \node (yw) [draw,     shape=circle] {Yamada-watanab}; &   \node (ul) [draw,     shape=rectangle] {Unicité en Loi}; \\   \node (d1) [draw,     shape=circle] {Définition}; & &   \node (d2) [draw, shape=circle]     {Définition}; \\   \node (we) [draw, shape=rectangle] {Existence     Faible}; &   \node (ec) [draw, shape=circle] {Engelbert-Cherny}; &       \node (pu) [draw, shape=rectangle] {Unicité Trajectorielle}; \\ };     \draw[->, thick] (se) -- (d1); \draw[->, thick] (d1) -- (we);     \draw[->, thick] (we) -- (yw); \draw[->, thick] (yw) -- (se);     \draw[->, thick] (se) -- (ec); \draw[->, thick] (ul) -- (ec);     \draw[->, thick] (ec) -- (pu); \draw[->, thick] (pu) -- (yw);     \draw[->, thick] (pu) -- (d2); \draw[->, thick] (d2) -- (ul);     \end{tikzpicture}  \caption{les différentes notions d'existence et     d'unicité}    \end{figure}   \end{frame}     \end{document}      ![enter image description here](http://i.stack.imgur.com/E6iIM.jpg) my purpose to have it like that: ![enter image description here](http://i.stack.imgur.com/qBTGP.jpg) Thanks to @samcarter but still looks like : ![enter image description here](http://i.stack.imgur.com/2w6wx.jpg)


title: What unit should we use when working with (La)TeX and PSTricks to minimize conversion error?

text: I want to minimize conversion error when working with PSTricks and (La)TeX. The conversion error really affects the accuracy of bounding box, the thickness of LaTeX's `\fbox` and the thickness of PSTricks stroke. When I specify a length for   1. page layout dimension: `\paperwidth`, `\paperheight`, `\voffset`, `\hoffset`, `\topskip`, `\parindent`   2. TeX box dimension: `\fboxrule`, `\fboxsep`, `\arrayrulewidth`, etc   3. PSTricks object dimension: `\unit`, `\linewidth`, etc which unit should we use to minimize the conversion? Should we use a single unit throughout the document? * * * Because the existing answers don't explain how to minimize the conversion error, I will emphasize and rephrase my questions above. Based on the existing answers, my understanding is as follows. TeX naturally works in `sp` and PostScript works naturally in `bp`. If I want to avoid conversion in TeX block, provide the lengths in `sp`. But if I work in PSTricks block, I must provide the length in `bp`. However, I have one question: If I define a `\pspicture` dimension in `bp`, how does PSTricks ask TeX to reserve the space without making a conversion error from `bp` to `sp`?


title: How to insert table in Beamer frame

text: I understand from this question that using macros within `Beamer` frames might create issues. Still I don't understand where should I place the macro definition for `\pgfplotstabletypeset`. Please consider the following MWE which generates `! Illegal parameter number in definition of \beamer@doifinframe. <to be read again>`               \documentclass{beamer}          \usepackage{filecontents}          % For tables     \usepackage{pgfplotstable}     \usepackage{booktabs}     \usepackage{array}     \usepackage{etoolbox}     \usepackage{units}          \pgfplotsset{compat=1.9}          \pgfplotstableset{         %font={\small},         empty cells with={--}, %  replace empty cells with ’--’         every head row/.style={before row=\toprule,after row=\midrule},         every last row/.style={after row=\bottomrule}     }          %Separate digits with comma (e.g. 1,000,000)     \usepackage[group-separator={,}]{siunitx}     \sisetup{       detect-all,       detect-inline-family=math,       detect-inline-weight=math,       detect-display-math=true}          \usepackage{amsmath}     \usepackage[osf,sc]{mathpazo}          \begin{filecontents}{testdata.csv}     city, theta, x, y     paris, 30.0,   0.0,    0.0     rome, 60.0,   1.9098, 5.8779     athens, 90.0,   6.9098, 9.5106     seattle, 120.0,  13.09,  9.5106     cairo, 150000,  18.09,  5.8779     jakarta, 180.0,  20.0,   0.0     \end{filecontents}          \pgfplotstableread[col sep=comma]{testdata.csv}{\testdata}          \begin{document}          \begin{frame}          \pgfplotstabletypeset[       columns/city/.style={string type},       columns/theta/.style={assign cell       content/.code={\pgfkeyssetvalue{/pgfplots/table/@cell content}{\num{##1}}}},       columns/x/.style={assign cell       content/.code={\pgfkeyssetvalue{/pgfplots/table/@cell content}{\num{##1}}}},       columns/y/.style={assign cell       content/.code={\pgfkeyssetvalue{/pgfplots/table/@cell content}{\num{##1}}}},      col sep=comma]{\testdata}          \end{frame}               \end{document}


title: two chapters on same page in memoir

text: I am writing a preface, which consists of roughly ten sentences describing my work. I have to write this in both English and Swedish. Same content, merely different languages. I have chosen to have both prefaces (or abstracts is probably the correct term) on a single page. I am having trouble making this work. Here is a MWE of my approach               \documentclass[a4paper, 10pt]{memoir}     \usepackage[ansinew]{inputenc}          \begin{document}          \chapter*{Test 1}     This is a test          \chapter*{Test 2}     This is a test          \end{document}      This creates two different chapters. Is there a way to keep both chapters on the same page?


title: Accent positioning on 'oe' character with feature file in fontspec

text: There is no accented glyph for the 'oe' character in Linux Libertine. When trying to form this character, the (acute) accent is centred over the 'e' half. I'm trying to get the accent over the centre of the whole ligature. I have tried to add a feature file to position the accent but have not got it to do anything yet. I wonder if my syntax is at fault - or anything else. This is the minimal test I am using (with 2 ways of naming the character) with lualatex:               \documentclass{article}     \usepackage{fontspec}     \setmainfont[FeatureFile=linlib.fea,RawFeature=+mlig;]{Linux Libertine O}     \begin{document}         \'{\oe}         \'œ     \end{document}      And the feature file is:               #linlib.fea     languagesystem DFLT dflt;      languagesystem latn dflt;     lookup markMarkPositioninglookup100 {       lookupflag 0;       markClass [\acutecomb \uni0341 ] <anchor -191 682> @TOP_MARK;       pos base [\oe ] <anchor 250 644> mark @TOP_MARK;     } markMarkPositioninglookup100;          feature mlig {       script DFLT;       # tested with and without these script/language lines       language latn dflt ;       lookup markMarkPositioninglookup100;     } mlig;      I have also tried the code for accenting a ligature instead:               lookup markLigPositioninglookup100 {       lookupflag 0;      markClass [\acutecomb \uni0341 ] <anchor -191 682> @TOP_MARKS;       position ligature oe            <anchor NULL>    # no mark above the 'o' half           ligComponent     # specify mark for 'e' half           <anchor 50 644> mark @TOP_MARKS    # mark above left side of 'e'           ;     } markLigPositioninglookup100;      All to no avail: the accent continues firmly centred over the 'e'. Any ideas?


title: Scale Feynman Diagrams to Poster Size

text: I am creating a poster using `beamerposter`, and I would like to include Feynman diagrams generated using `feynmp`. However, the native scaling of `feynmp` is indented for letter-size documents, and is far too small for a poster. Is there a way to scale the diagram to poster-size while keeping its features properly proportioned?


title: What to consider when naming labels to prevent errors?

text: This question is inspired by Umlauts in label and a quote from an answer to How to automatically add \\! in subscripts? > However the best is to avoid `_` in labels. I already name all my labels with a "namespace" (like `fig:`, `eq:`, `tab:` and so on) and avoid umlauts (and Unicode characters anyway), but was wondering if there are more things to consider to avoid compilation errors and conflicts with loaded packages. **What rules and advises exist for naming labels to prevent errors and conflicts?**


title: Crop ternary plot

text: I want to crop the top part of the ternary plot given below at x = 0.7 because I don't have any datapoints in that region and want to save space. How can I do this? ![enter image description here](http://i.stack.imgur.com/J8qzY.png)               \documentclass{standalone}     \usepackage{pgfplots}     \pgfplotsset{compat=1.8}     \usepgfplotslibrary{ternary}     \begin{document}     \begin{tikzpicture}     \begin{ternaryaxis}[     ternary limits relative=false,     xlabel= x,      ylabel= y,      zlabel= z,     width=9.5cm,     height=9.5cm,     xmin=0.3,     xmax=1,     ymin=0,     ymax=0.7,     zmin=0,     zmax=0.7,     clip=false,     disabledatascaling,     ]     \addplot3[only marks, mark options={black}]     table {     0.63    0.37    0     0.43    0.57    0     0.56    0   0.44     0.57    0.1 0.33     0.40    0.35    0.25     0.45    0.31    0.24     };     \end{ternaryaxis}     \end{tikzpicture}     \end{document}


title: rotatebox symbol in caption generates error

text: Following minimal example doesn't work and generates an error               \documentclass{article}     \usepackage{graphicx}     \usepackage{amssymb}     \begin{document}     \begin{figure}       FIGURE     \caption{$\blacksquare$ result of; \rotatebox[origin=c]{45}{$\blacksquare$}}%     \end{figure}     \rotatebox[origin=c]{45}{$\blacksquare$}     \end{document}      The error message says:               rotatebox-in-caption.tex|7| Argument of \@caption has an extra }.     || <inserted text>      ||                 \par      || l.7 ...; \rotatebox[origin=c]{45}{$\blacksquare$}}      Do I have to wrap the `\rotatebox` in a certain box to make it work?


title: Tikz arc angle calculation

text: I am having a serious mental block this afternoon. I have the following code to generate a shape, and I need one more arc to close it and cycle back to the original point. I can't seem to get my mind around it for some reason. Any help would be much appreciated.               \documentclass{minimal}     \usepackage{tikz}     \usetikzlibrary{positioning}          \begin{document}      \begin{tikzpicture}           \coordinate (dm1) at (0,0);     \coordinate\[right=1.5cm of dm1\] (dm2);          \draw\[thin\] (dm1) -- (dm2)     arc (0:60:1cm)      arc (0:180:0.3cm)     ;          \end{tikzpicture}     \end{document}


title: Extend box around equation to the entire line

text: My question is simple: I use `\boxed` from the `amsmath` package and so far so good. The single issue I have is that I use the boxed environment on its own line, but the box is only around the equation, not the entire line. Example code:                 \[  \boxed{ p(v,h) = \frac{1}{Z} e ^{-E(v,h)} }  \]      How can I extend the box to the entire line? Thank you!


title: Package "listings" command "morekeywords" doesn't work

text: I'm currently using the listings package to display my matlab code in Latex. However, when trying to add new keywords to the package, nothing happens. Here's a MWE:               \documentclass[a4paper,12pt,parskip,bibtotoc,liststotoc]{article}          \usepackage[usenames,dvipsnames]{color}     \usepackage{listings}          \definecolor{javaBlue}{RGB}{42,0.0,255}     \definecolor{javaGreen}{RGB}{63,127,95}     \definecolor{javaLila}{RGB}{127,0,85}          \lstloadlanguages{Matlab} % load java, needed because of option 'savemem'          \lstset{      morekeywords={classdef}     }          \lstset{     language=Matlab,     keywordstyle=\color{javaLila},     commentstyle=\color{javaGreen},     stringstyle=\color{javaGreen},     numbers=left,     stepnumber=1,     numbersep=5pt,     numberstyle=\tiny,     breaklines=true,     breakautoindent=true,     breakatwhitespace=false,     postbreak=\space,     tabsize=2,     basicstyle=\ttfamily\scriptsize,     showspaces=false,     showstringspaces=false,     extendedchars=true,     backgroundcolor=\color{white}}          \begin{document}     \lstinputlisting[language=Matlab]{"E:/Program Files/MATLAB/projects/master/classes /Customer.m"}     \end{document}      I have no idea why it doesn't work, as all respective threads in this forum just tell me to use "morekeywords". Seems like no one has my problem.


title: Expanding all arguments of a command before appending it to another macro

text: \documentclass{article}     \makeatletter     \usepackage{ltxcmds}          \newcounter{mycounter}     \setcounter{mycounter}{7}          \newcommand{\mysndc}[3]{#1 #2 #3}          \newcommand{\mycommand}{}          \newcommand{\mytrdc}[1]{\ltx@GlobalAppendToMacro{\mycommand}{%     \mysndc{\arabic{mycounter}}{#1}{\thepage}}}          \makeatother     \begin{document}     x          \mytrdc{8}          \newpage     \setcounter{mycounter}{4}          \mycommand     \end{document}      When `\mycommand` is called, it is `\mysndc{\arabic{mycounter}}{8}{\thepage}` resulting in `4 8 2`. What I would like it to be is `\mysndc{7}{8}{2}` resulting in `7 8 1`. To achieve this, the arguments of `\mysndc` must be expanded before `\mysndc` is appended to `\mycommand`. `\expandafter` should be useful, but diverse placements of it (also more than one `\expandafter`) did not yield the desired result, e.g.               \newcommand{\mytrdc}[1]{\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\ltx@GlobalAppendToMacro{\mycommand\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter}{\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\mysndc\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter\expandafter{\expandafter\expandafter\expandafter\arabic{mycounter}\expandafter\expandafter\expandafter}\expandafter\expandafter\expandafter{\expandafter#1\expandafter}\expandafter{\thepage}}}      . Where must I place how many `\expandafter`s to expand the arguments of `\mysndc` before appending it to `\mycommand` and why exactly? I found numerous similar questions and answers to them here at tex.SE, but still was not able to get it right. If possible, I prefer a solution with `expandafter`s, so that I can learn from it, and without using e-TeX/etextools/etextoolbox/LaTeX3/...


title: Group glossaries by first letter

text: I am using `glossaries` with `xindy`. It groups entries by first letter and puts a vertical space between groups. How can I change the style of output to show the starting letter for each group at the beginning of them?               \documentclass[10pt,a4paper]{report}     \usepackage[xindy]{glossaries}     \makeglossaries          \newglossaryentry{A}{name={A}, description={A is A}}     \newglossaryentry{AA}{name={AA}, description={AA is AA}}          \newglossaryentry{B}{name={B}, description={B is B}}          \newglossaryentry{C}{name={C}, description={C is C}}     \newglossaryentry{CC}{name={CC}, description={CC is CC}}               \begin{document}          Here I cite either \gls{A}, \gls{AA}, \gls{B}, \gls{C} or \gls{CC}.     I want three groups in the glossary output, indicated by \textbf{A},     \textbf{B} and \textbf{C} with entries in them according to their initial letter.          \printglossaries          \end{document}


title: Anchor a node in the corner of a tikzpicture

text: How can I position a node in, say, the top-left corner of the tikzpicture without setting the position explicitly? Are there any hooks for positioning relative to the tikzpicture "frame" itself (and that will work in the general case)?


title: color environment text is not converted in htlatex

text: I have using `pdflatex` to get the `color` environment text. But when using `htlatex` the color and the `environment content (Note)` is not converting. Please find the MWE below:               \documentclass{book}     \usepackage{xcolor}     \definecolor{midblue}{cmyk}{1,0,0.16,0.09}     \newcommand{\notefont}{\small\sffamily\color{midblue}}     \newenvironment{notelist}{%     \begin{itemize}        \item[\label={\notefont Note:}]     }{%      \end{itemize}%     }          \begin{document}          \chapter{Chapter Title Here}     \begin{notelist}     \item A template for fractions may be obtained by pressing.     \end{notelist}     \begin{notelist}     \item For all calculations you can also use the \textbf{Scratchpad}.     \item For details of the use of the Scratchpad and general use of the calculator with     operating system 3.0 refer to the Appendix Computer Algebra System (TI-Nspire).     \end{notelist}     \end{document}      How to get the `color environment` and `colored framebox` environement in `htlatex`?


title: How to print the list of packages installed on TeX Live to a file?

text: OS: Ubuntu 11.10   TeX: Tex Live 2011   List of packages originally installed with Tex Live Using the information given at the aforementioned question, I was able to see the list of packages in my current TeX Live installation. I wanted to save the list in a file. I tried using the "Edit>>Select All" option from the terminal. But using that I am able to save only a small sub-section of it. Is there a simple addition that I can make to the "list" command with "tlmgr" to make it print the output to a file?


title: ragged2e justifying - centering figures

text: I am preparing a beamer presentation and I used the ragged2e package to justify the text in my slides (I justified the itemize environment). However, this does not allow me anymore to center a figure. Any way to fix this?               \documentclass[10.5pt]{beamer}     \usepackage{beamerthemesplit}     \usetheme{Copenhagen}     \setbeamercovered{transparent}     \usepackage{ragged2e}     \let\olditem=\item%     \renewcommand{\item}{\olditem \justifying}     \begin{document}     \begin{frame}      \begin{itemize}     \item blablabla     \begin{center}     \begin{figure}     \includegraphics{.jpg}      \end{figure}        \end{center}              \end{itemize}     \end{frame}     \end{document}


title: How to position TikZ nodes

text: How can I shift the `system` node right of `control1` but vertically centered between `control1` and `control2`?               \tikzstyle{controller} = [draw, fill=blue!20, rectangle,          minimum height=3em, minimum width=6em]     \tikzstyle{block} = [draw, fill=yellow!20, rectangle,          minimum height=3em, minimum width=6em]         \tikzstyle{sum} = [draw, circle, node distance=1.5cm]     \tikzstyle{disturbance} = [draw=none, node distance=1.5cm, line width=0pt]      \tikzstyle{input} = [coordinate]     \tikzstyle{output} = [coordinate]          \node [input, name=input] {};     \node [sum, right of=input] (sum) {};         \node [controller, right of=sum] (control1){Control1};      \node [controller, above of=control1] (control2) {Control2};     \node [block, right of= control1, node distance=5cm, yshift=-1.4cm] (system) {System};


title: biblatex broken with portuguese language

text: I'm trying to compile the following LaTeX code:               % !TEX encoding = UTF-8 Unicode          \documentclass[12pt,a4paper]{memoir}          \usepackage[utf8]{inputenc}     \usepackage[english, brazil]{babel}     \usepackage{amsfonts} % for mathbb     \usepackage[T1]{fontenc}     \usepackage{graphicx}     \usepackage[backend=bibtex,style=authoryear,sorting=nyt]{biblatex}          \addbibresource{Neural_Assemblies_Report.bib}          \begin{document}          \frontmatter     \tableofcontents*          \mainmatter     \chapter{Test}     Test. \cite{Maass}.          \backmatter     \printbibliography     \end{document}      I get the following error:               (...lots of log stuff...)     ("C:\Program Files\MikTeX\tex\latex\biblatex\biblatex.cfg")))     ("C:\Program Files\MikTeX\tex\latex\biblatex\lbx\brazil.lbx"     ("C:\Program Files\MikTeX\tex\latex\biblatex\lbx\brazilian.lbx"     Runaway argument?     {bibliography = {{Bibliografia}{Bibliografia}}, references = {{Refer\^\ETC.     ! Paragraph ended before \DeclareBibliographyStrings was complete.     <to be read again>                         \par      l.454           ?       To me, it looks like biblatex is choking on the brazilian portuguese stuff, but all docs say it's fully compatible. Which config should I change to make biblatex work with brazilian portuguese? My environment is MiKTeX with TeXworks, my bibtex file is:               @article{Maass,         author = "Wolfgang Maass",             title = "Networks of Spiking Neurons: The Third Generation of Neural Network Models",         journal = "Neural Networks",         language = "english",         year = 1997,         volume = 10,         number = 9,         pages = "1659--1671"     }      * * * EDIT: Tried with all available backends for biblatex. Same error. MiKTeX version is 2.9.4196.


title: Environment begin or end in Heading definition

text: I'm trying to include an automatic `\end{multicols}` and `\begin{multicols}{2}` before and after my Chapter headings. (The document is 2 column, the chapter headings are meant to be across the page.) Here's my minimal working example: This works:               \documentclass{book}     \usepackage{multicol}     \usepackage[compact,tiny]{titlesec}     \titleformat{\chapter}{}{\thechapter}{0em}{}[]          \begin{document}     \begin{multicols}{2}     \end{multicols}     \chapter{Breaking Things}     \begin{multicols}{2}     \end{multicols}          \end{document}       However, moving the `\begin` & `\end` into the titleformat command produces errors. It's a different error for each (as I've tried each separately). \protect doesn't help. Minimal broken example:               \documentclass{book}     \usepackage{multicol}     \usepackage[compact,tiny]{titlesec}     \titleformat{\chapter}{}{\thechapter}{0em}{\end{multicols}}[\begin{multicols}{2}]          \begin{document}     \begin{multicols}{2}     \chapter{Breaking Things}     \end{multicols}     \end{document}       Putting `\end{multicols}` into the "before" part of the command as shown above creates a "Missing } inserted" problem. Putting `\begin{multicols}` into the "after" part of the command as shown above (leaving the `\end{multicols}` in the document itself) creates a "Extra }, or forgotten \endgroup." error.


title: Dotted leader does not reach the page number in TOC

text: I am writing my thesis. The grad school requirement is that in TOC the dots leading to page number should extend till the number. I can get this by defining pnumwidth = 0 but then the problem is that all page numbers are left aligned. How can I keep then right align and still get the dots to end at the number (no gaps between number and dots for all entries)


title: Use texdoc within a shell script (in Alfred.app) doesn’t work

text: I’m trying to call textoc from OS X Application Alfred as a shell script. ![alfred window](http://i.stack.imgur.com/JYI6a.jpg) And with Alfred everything seems fine—I already asked the developers but they say that the script should work. When debugging I get the message               21.9.11 17:14:12     [0x0-0x40040].com.alfredapp.Alfred[977]     env: texlua: No such file or directory      therefore I guess it’s a problem with `texdoc` and not with Alfred. I get the same error if I call `texdoc` with an apple script               do shell script "texdoc file"      But when calling `texdoc file` directly in my Terminal or in not-silent mode of Alfred (which means a terminal window opens and the command is executed) everything works. A shell script (td.sh)               #!/bin/bash     texdoc $1      called with `sh td.sh file` works too. Hope that anyone has an idea how to solve this or at least point where I can get help …


title: xy diagram: set height of a specific row

text: I'm using the `xy` package. In the diagram               $$\xymatrix@R=8mm@C=8mm{  & 1\ar@{-}[ddl]\ar@{-}[dr] &  \\                               & & c\ar@{-}[dd]\\                             a & & \\                               & & b\\                               & 0\ar@{-}[uul]\ar@{-}[ur] &  \\}$$      ![enter image description here](http://i.stack.imgur.com/ZkYnU.jpg), how can I set the row height between `c` and `a` and between `a` and `b` to be smaller. I want to create this diagram: ![enter image description here](http://i.stack.imgur.com/T1mU2.jpg) `\\[2mm]` doesn't make any change, and `\xymatrix@R=8mm@C=8mm{...` only makes global changes.


title: hyperref does not work

text: I tried to add hyperref package, but TexWorks has this error:               Runaway argument?     {\@firstoffive }\fi . \begin {figure}[h!] \centering \includegraphics \ETC.     ! Paragraph ended before \Hy@setref@link was complete.     <to be read again>                         \par      l.12      Please, can anyone see the mistake in this?               \documentclass[a4paper,11pt]{report}     \usepackage[T1]{fontenc}         \usepackage[czech,english]{babel}     \usepackage[cp1250]{inputenc}          \usepackage{amssymb, amsmath}         \usepackage{epsfig}          \usepackage[a4paper]{geometry}          \usepackage{natbib}         \usepackage{graphicx}          \usepackage{booktabs}         \usepackage{a4wide}     \usepackage{array}     \usepackage{paralist}          \usepackage{verbatim}          \usepackage{subfig}          \usepackage{natbib}         \usepackage{wrapfig}         \usepackage{xcolor}         \usepackage{index}          \usepackage[linktoc=all]{hyperref}     \hypersetup{         colorlinks,         citecolor=black,         filecolor=black,         linkcolor=black,         urlcolor=black     }


title: Customizing Index - Adding chapter heading and verse number to index entries

text: I would like to provide the chapter title and the verse number for each entry in the index. This is unusual but the book I am working on requires such formatting. In the output I want the chapter title to appear between the indexed text and the verse number. For verses I am using the `verse` environment but do not show here. In the output shown below, the first line is the header, repeated on each page of the index. Then, based on the three example verses, the desired output: Indexed text, Chapter Name, Verse Number. Fairest... First... 1 decease... Second... 1 thine... Third... 4 I would like to suppress page numbers in the index.               \documentclass[12pt,a4paper]{book}     \usepackage{index}     \usepackage{idxlayout}     \makeindex          \begin{document}     \printindex          \chapter*{First}       From \index*{fairest} creatures we desire increase,       That thereby beauty's rose might never die ... |1|          \chapter*{Second}       But as the riper should by time \index*{decease},       His tender heir might bear his memory ... |1|          \chapter*{Third}       But thou contracted to \index*{thine} own bright eyes,       Feed'st thy light's flame with self-substantial fuel ... |4|     \end{document}


title: Bleed into margins automatically to prevent orphans?

text: When I set my papers, it sometimes happens that the last line of a paragraph is very short, in extreme cases just a single word, perhaps a page number. I have set `\clubpenalty` to `10000`, of course, and tried to adjust spacing with `\looseness=-1`. Even so, I sometimes have to resort to `\rlap{}`, bleeding into the right margin, as it were. (See the line immedaitely below the image in the attached image). Is there a way to do this automatically, i.e. for a very short line? ![enter image description here](http://i.stack.imgur.com/bXy6a.jpg)


title: Using old style numerals in XeLaTeX in math mode

text: I am using XeLaTeX and the Linux Libertine font to typeset my thesis. I set it up to use old style numerals in the text by:               \setromanfont[Ligatures={Common}, Numbers={OldStyle}]{Linux Libertine O}      Sometimes I use inline math, and these numbers are in Lining format, which looks strange with other numbers in the text (e.g. referring to a figure). I didn't specify a specific math font, if I do so (e.g. `\usepackage[oldstylenums]{kpfonts}` ), I do get the old style numerals in math mode but the font is not balanced with the text, so I'd like to stick with the default math font, or something that goes well with Linux Libertine. Of course, I can put all numbers outside the `$ $`, but that just seems like a hack, not something that you're supposed to do. Am I trying to do something that is typographically incorrect? How do I use old style numerals for math mode?


title: How to display proper ranges in index using Xindy and XeLaTeX?

text: When I generate my index with XeLaTeX using `xindy` as described here: How to use xindy with XeTeX/LuaTeX? I struggle with proper ranges being displayed. Essentially, the dashes are missing and the page numbers stick to each other. _Example:_               \documentclass{article}     \usepackage{xltxtra}     \usepackage{makeidx}     \makeindex     \begin{document}     index a     \index{a}     \clearpage     index a b     \index{a}\index{b}     \clearpage     index a b ä     \index{a}\index{b}\index{ä}     \clearpage     index a b ä ü     \index{a}\index{b}\index{ä}\index{ü}          \printindex     \end{document}      This results in the following output: ![Index](http://i.stack.imgur.com/7fCey.png) As you can see, the **a** is shown with **14** instead of **1-4**. My call to `xindy` was the following:               xindy -M texindy -C utf8 -L german-duden xindy.idx      The `xindy.idx` file looks good to me:               \indexentry{a}{1}     \indexentry{a}{2}     \indexentry{b}{2}     \indexentry{a}{3}     \indexentry{b}{3}     \indexentry{ä}{3}     \indexentry{a}{4}     \indexentry{b}{4}     \indexentry{ä}{4}     \indexentry{ü}{4}      But the resulting `xindy.ind` file already shows the problem:               \begin{theindex}       \providecommand*\lettergroupDefault[1]{}       \providecommand*\lettergroup[1]{%           \par\textbf{#1}\par           \nopagebreak       }            \lettergroup{A}       \item a, 14       \item ä, 3, 4            \indexspace            \lettergroup{B}       \item b, 24            \indexspace            \lettergroup{U}       \item ü, 4          \end{theindex}      What am I missing here?


title: An unexpected outcome from PGF's \foreach

text: The following example from page 508 of PGF manual 2.40 gives me a result that I didn't expect.               \tikz[x=0.75cm,y=0.75cm]       \foreach \x [count=\xi] in {a,...,e}       \foreach \y [count=\yi] in {\x,...,e}       \node [draw, top color=white, bottom color=blue!50, minimum size=0.666cm]         at (\xi,-\yi) {$\mathstrut\x\y$};      ![enter image description here](http://i.stack.imgur.com/3TyY2.png) I expected to see `bc`, `bd`, `be`, `cd`, `ce`, `de`. The following gives the expected output:               \tikz[x=0.75cm,y=0.75cm]       \foreach \x [count=\xi] in {1,...,5}       \foreach \y [count=\yi] in {\x,...,5}       \node [draw, top color=white, bottom color=blue!50, minimum size=0.666cm]         at (\xi,-\yi) {$\mathstrut\x\y$};      ![enter image description here](http://i.stack.imgur.com/4FL8J.png) I guess there is a bug in `\foreach`. My own `\newforeach` gives ![enter image description here](http://i.stack.imgur.com/ml6sQ.png) using the code               \tikz[x=0.75cm,y=0.75cm]       \newforeach [count=\xi] \x in {a,...,e}       \newforeach [count=\yi,expand before fill] \y in {\x,...,e}       \node [draw, top color=white, bottom color=blue!50, minimum size=0.666cm]         at (\xi,-\yi) {$\mathstrut\x\y$};      This last output was what I expected from `\foreach`. Unfortunately, `\newforeach` isn't yet released because it is still being tested. You can ask for it and participate in testing it.


title: My compilation produces a result that is not the same as what the author got

text: I tried the following code               \documentclass[pstricks,border=12pt]{standalone}          \usepackage{pst-solides3d}     \begin{document}     \begin{pspicture}[solidmemory](-6.5,-3.5)(6.5,3)     \psset{viewpoint=30 0 15 rtp2xyz,Decran=30,lightsrc=viewpoint}     \psSolid[object=tore,r1=5,r0=1,ngrid=36 36,tablez=0 0.05 1 {} for,               zcolor= 1 .5 .5 .5 .5 1,action=none,name=Torus]     \pstVerb{/R1 5 def /R0 1.2 def /k 20 def /RL 0.15 def /kRL 40 def}%     \defFunction[algebraic]{helix}(t)          {(R1+R0*cos(k*t))*sin(t)+RL*sin(kRL*k*t)}          {(R1+R0*cos(k*t))*cos(t)+RL*cos(kRL*k*t)}          {R0*sin(k*t)+RL*sin(kRL*k*t)}     \psSolid[object=courbe,             resolution=7800,             fillcolor=black,incolor=black,             r=0,             range=0 6.2831853,             function=helix,action=none,name=Helix]%     \psSolid[object=fusion,base=Torus Helix,grid]     \end{pspicture}     \end{document}      hopefully to get the same result as what Herbert's did in the site he maintains. The expected result should be as follows, ![enter image description here](http://i.stack.imgur.com/XQELG.png) Unfortunately I got the following result, ![enter image description here](http://i.stack.imgur.com/kOw32.png) Note that I have tried the same code many times since the first day the code was publicly available. I also have reinstalled my operating system and the TeX Live distribution. I have just updated the installed TeX Live as well.


title: Using pgfplots, how can I make and use a colormap that has a sharp transition in the middle?

text: I wish to make a colormap where the distinction between numbers smaller than 0 and numbers greater than 0 is emphasised. So I want to make a colormap that has one sharp transition in the middle and fades to different colours on the edges. How can I do it? In the manual, I only found how to make gradual transitions.


title: Why can't I access alternate glyphs in Linux Libertine when using fontspec?

text: When I try to build Dario Taraborelli's CV example using fontspec font designations and Linux Libertine O, the ampersand glyph breaks. Here is the MWE:               %------------------------------------     % Dario Taraborelli     % Typesetting your academic CV in LaTeX     %     % URL: http://nitens.org/taraborelli/cvtex     % DISCLAIMER: This template is provided for free and without any guarantee      % that it will correctly compile on your system if you have a non-standard       % configuration.     % Some rights reserved: http://creativecommons.org/licenses/by-sa/3.0/     %------------------------------------          %!TEX TS-program = xelatex     %!TEX encoding = UTF-8 Unicode          \documentclass[10pt, a4paper]{article}     %\documentclass[10pt, a4paper]{scrartcl}          % DOCUMENT LAYOUT     \usepackage{geometry}      \geometry{a4paper, textwidth=5.5in, textheight=8.5in, marginparsep=7pt, marginparwidth=.6in}     \setlength\parindent{0in}          % FONTS     \usepackage[usenames,dvipsnames]{color}     \usepackage{xunicode}     \usepackage{xltxtra}     \defaultfontfeatures{Mapping=tex-text}     \setromanfont [Ligatures={Common}, Numbers={OldStyle}, Variant=01]{Linux Libertine O}     \setmonofont[Scale=1]{Inconsolata}          % ---- CUSTOM COMMANDS     \chardef\&="E050     \newcommand{\html}[1]{\href{#1}{\scriptsize\textsc{[html]}}}     \newcommand{\pdf}[1]{\href{#1}{\scriptsize\textsc{[pdf]}}}     \newcommand{\doi}[1]{\href{#1}{\scriptsize\textsc{[doi]}}}     % ---- MARGIN YEARS     \usepackage{marginnote}     \newcommand{\amper{}}{\chardef\amper="E0BD }     \newcommand{\years}[1]{\marginnote{\scriptsize #1}}     \renewcommand*{\raggedleftmarginnote}{}     \setlength{\marginparsep}{7pt}     \reversemarginpar          % HEADINGS     \usepackage{sectsty}      \usepackage[normalem]{ulem}      \sectionfont{\mdseries\upshape\Large}     \subsectionfont{\mdseries\scshape\normalsize}      \subsubsectionfont{\mdseries\upshape\large}           % PDF SETUP     % ---- FILL IN HERE THE DOC TITLE AND AUTHOR     %\usepackage[dvipdfm, bookmarks, colorlinks, breaklinks,      %% ---- FILL IN HERE THE TITLE AND AUTHOR     %   pdftitle={Albert Einstein - vita},     %   pdfauthor={My name},     %   pdfproducer={http://nitens.org/taraborelli/cvtex}     %]{hyperref}       \usepackage[bookmarks, colorlinks, breaklinks,      % ---- FILL IN HERE THE TITLE AND AUTHOR         pdftitle={Albert Einstein - vita},         pdfauthor={My name},         pdfproducer={http://nitens.org/taraborelli/cvtex}     ]{hyperref}       \hypersetup{linkcolor=blue,citecolor=blue,filecolor=black,urlcolor=MidnightBlue}           % DOCUMENT     \begin{document}          \section*{Grants, honors \& awards}     \noindent     \years{1921}Nobel Prize in Physics, Nobel Foundation          \section*{Publications \& talks}          \end{document}      On my system, the result looks like this: ![enter image description here](http://i.stack.imgur.com/F5hWx.png) Now, the obvious answer is that the font doesn't have the glyph, but it should be the same font! If I use `\usepackage{libertineotf}`, it works, but I would like to use Xelatex for this instead.


title: How to create columns within an itemize environment?

text: I want to generate a list of the following syntax for a resume.               * <Description of Activity> <empty space> <right aligned date>      Currently I have been using a form such as               \begin{itemize}     \item First Activity \hfill Date 1     \item Second Activity \hfill Date 2     \end{itemize}      This approach works so long as each activity is not very long. If the activity description happens to be too long, the date will wrap poorly. I would like to wrap the activity into a column of its own so that it can wrap to the next line without affecting the date essentially yielding the following               * This is a really long activity that    Date       spans multiple lines without       messing up the dates.      I tried nesting a tabular environment, but it didn't work.


title: Cyrillic sans font in beamer (LyX)

text: I am trying to use Cyrillic sans-serif font in a beamer presentation. I make it using LyX 2.0.0. The code produced by LyX (exported as plain LaTeX) is               %% LyX 2.0.0 created this file.  For more info, see http://www.lyx.org/.     %% Do not edit unless you really know what you are doing.     \documentclass[russian]{beamer}     \usepackage[T1]{fontenc}     \usepackage[koi8-r]{inputenc}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{graphicx}          \makeatletter          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.     \DeclareRobustCommand{\cyrtext}{%       \fontencoding{T2A}\selectfont\def\encodingdefault{T2A}}     \DeclareRobustCommand{\textcyr}[1]{\leavevmode{\cyrtext #1}}     \AtBeginDocument{\DeclareFontEncoding{T2A}{}{}}          %% A simple dot to overcome graphicx limitations     \newcommand{\lyxdot}{.}               %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.      % this default might be overridden by plain title style      \newcommand\makebeamertitle{\frame{\maketitle}}%      \AtBeginDocument{        \let\origtableofcontents=\tableofcontents        \def\tableofcontents{\@ifnextchar[{\origtableofcontents}{\gobbletableofcontents}}        \def\gobbletableofcontents#1{\origtableofcontents}      }      \long\def\lyxframe#1{\@lyxframe#1\@lyxframestop}%      \def\@lyxframe{\@ifnextchar<{\@@lyxframe}{\@@lyxframe<*>}}%      \def\@@lyxframe<#1>{\@ifnextchar[{\@@@lyxframe<#1>}{\@@@lyxframe<#1>[]}}      \def\@@@lyxframe<#1>[{\@ifnextchar<{\@@@@@lyxframe<#1>[}{\@@@@lyxframe<#1>[<*>][}}      \def\@@@@@lyxframe<#1>[#2]{\@ifnextchar[{\@@@@lyxframe<#1>[#2]}{\@@@@lyxframe<#1>[#2][]}}      \long\def\@@@@lyxframe<#1>[#2][#3]#4\@lyxframestop#5\lyxframeend{%        \frame<#1>[#2][#3]{\frametitle{#4}#5}}      \def\lyxframeend{} % In case there is a superfluous frame end          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.     \usepackage{listings}     \usetheme{Warsaw}     %\usepackage{helvet}     % or ...     %\usetheme{Antibes} % tree outline, neat     %\usetheme{JuanLesPins} % like Antibes, with shading     %\usetheme{Bergen}  % outline on side     %\usetheme{Luebeck} % like Warsaw, square sides     %\usetheme{Berkeley}    % interesting left bar outline     %\usetheme{Madrid}  % clean, nice.  7/12 page numbers     %\usetheme{Berlin}  % dots show slide number     %\usetheme{Malmoe}  % OK, plain, unshaded     %\usetheme{Boadilla}    % nice, white bg, no top bar     %\usetheme{Marburg} % nice, outline on right     %\usetheme{boxes}   % ???     %\usetheme{Montpellier} % tree outline on top, plainish white     %\usetheme{Copenhagen}  % like Warsaw     %\usetheme{PaloAlto}    % looks good     %\usetheme{Darmstadt}   % like Warsaw with circle outline     %\usetheme{Pittsburgh}     %\usetheme{default}     %\usetheme{Rochester}   % like boxy, unshaded warsaw     %\usetheme{Dresden} % circle outline on top     %\usetheme{Singapore}   % purple gradient top     %\usetheme{Frankfurt}   % like Warsaw with circle outline on top     %\usetheme{Szeged}     %\usetheme{Goettingen}  % light purple right bar outline     %\usetheme{Warsaw}     %\usetheme{Hannover}    % like Goett with bar on left     %\usetheme{compatibility}     %\usetheme{Ilmenau}          \setbeamercovered{transparent}     % or whatever (possibly just delete it)          %\usecolortheme{seahorse}     %\usecolortheme{rose}          % seems to fix typewriter font in outline header:     \usepackage{ae,aecompl}     \beamertemplatenavigationsymbolsempty     %\pgfdeclareimage[height=1cm]{institution-logo}{hint-logo-mn.jpg}          \makeatother          \usepackage{babel}     \begin{document}          \title[Высокогорные леса]{Историческое использование\\высокогорных лесов}               \subtitle{современное значение\\на государственном и местном уровнях}               \author[S\o{}veig; Наумов]{Robert S\o{}veig, Владимир Наумов}               \institute{Niht}               \date{5 сентября 2012}          \makebeamertitle     %\beamerdefaultoverlayspecification{<+->}               \lyxframeend{}\lyxframe{Robert S\o{}veig}          \begin{center}     \par\end{center}     \begin{block}     {}     \begin{itemize}     \item место работы:      \item специализация:     \item опыт:     \end{itemize}     \end{block}          \note[item]{Начало доклада}               \note[item]{Теперь я перейду собственно к нашему докладу.}               \lyxframeend{}     \end{document}      The problem is that the font in the output is not sans-serif, although I know that by default beamer uses sans serif font. F.ex. this code:               \documentclass[russian]{beamer}          \usepackage[T2A]{fontenc}     \usepackage[utf8]{inputenc}     \begin{document}       \begin{frame}         ПРИВЕТ! Этот текст написан шрифтом без засечек.       \end{frame}     \end{document}      works flawlessly in plain LaTeX. I suppose that the problem is in font encoding. How to force LyX to use correct font encoding, e.g. to produce beamer presentation with sans serif cyrillic fonts?


title: Multiple mysterious compilation errors

text: I cannot compile the following files. I get multiple errors that I can't explain. Can anyone help me?                \documentclass{article}      \usepackage{graphicx}           \begin{document}      \title{Project 1}      \author{Mymail@mail.com}           \section{Tools}      Text      \section{Algorithm}           Text. \newline      Text:           \[ min_{\textbf{w}} \sum_{i=1}^n (y_i - \textbf{w}^T \textbf{x_i})^2 + \lambda \|\textbf{w}\|_2^2 \]           \newline      Text:           Text          \section{Features}     \section{Parameters}     \end{document}


title: Package to run multiple iterations of a variable, with compilation?

text: I guess this is somewhat similar to Animations in LaTeX, except what I would want is something like this: Say you have a .tex document, which uses some macro `\tester` as parameter. I'd like to load a package, where I could specify some values for this `\tester`, and have the package automatically loop through those values, and generate an individual PDF for each value of `\tester`. Finally, I'd want a "post action" to run in the shell, once the loop is over. So, just by specifying a `\usepackage` like:               \documentclass{article}          ...     \usepackage[vartoken=\tester,varvals={0,1,2},postactioncode={ls *.pdf}]{repeat-build}     ...          \begin{document}     ... testing: \tester     \end{document}      ... I'd like the loop to run automatically, generating separate PDFs for `\tester` = 0, 1 and 2. Is there a package like that already?


title: Visualize data on a variable-radius graph/network

text: I am trying to visualize the output from a simulation model I have been working with. The simulation finds the steady-state solution to a system of differential equations on a variable-radius (and variable-edge-length) network/graph structure - think for example water and solute flow through a network of variable-radius pipes. The branch center lines are straight but along the axial direction the radius and other variables e.g. the area-averaged solute concentration change. I have a basic familiarity with pure `tikz` \- less/not much at all with `pgfplots`. I have tried a hacky solution so far using `tikz` and `pgfplotstable` (to read in data) and have attached the result. At the moment I draw each edge, perform the shading and then rotate/translate to its desired location. I don't care too much about whether the edges join nicely - it'd be nice but not essential. I've just left gaps for now. I note that the shading is not rotating properly at the moment - this is not my major problem as I have seen a couple of approaches to getting this working but I am a bit worried about the complexity of using canvas transforms as I also need to do a bunch of translations and different rotations for each edge. Note also that my reading in of the data is pretty hacky since I am using pure `tikz` to plot and wanted a smooth curve. There may be a better solution... The most difficult problem I have is that I want the coloring to vary according to data read in from an external file - e.g. to represent the solute concentration at the local axial coordinate along a given edge. I have seen a tikz example which uses 'functional shading' (http://www.texample.net/tikz/examples/hsv-shading/) but it looks intimidatingly complex. I was wondering whether pgfplots might be a better option for this e.g. I have seen people refer to 'colormap' plots, but I am not sure whether I would still be able to draw the network structure as easily or whether I could use it together with some pure tikz etc. So really my question is about how best to combine all the tools available from `tikz` and `pgfplots` to achieve all that I want. I can do bits with `tikz` but probably not all and I am not sure whether `pgfplots` could solve these issues or I should find another approach. Any advice would be much appreciated. [Ah I realize I cannot post images because I am new to stackexchange. I have commented out the image. Sorry if that makes my question harder to understand!] ![enter image description here](http://i.stack.imgur.com/vLHNC.png) Example code:               \documentclass[10pt]{article}          \usepackage{pgf,tikz,pgfplots,pgfplotstable}     \begin{document}          \begin{tikzpicture}[scale=5]     \pgfplotstableread[header=true,x=localcoord,y=radius]{coord2.dat}{\data}     \pgfplotstablegetrowsof{\data}     \pgfmathsetmacro{\rowindex}{\pgfplotsretval-1}     %-variables to build curves     \gdef\currentpath{}     \gdef\currentcoordlist{}     %-read data     \foreach \srowindex in {0,...,\rowindex}{         %--get first coord pair         \pgfplotstablegetelem{\srowindex}{localcoord}\of{\data}         \pgfmathsetmacro{\x}{\pgfplotsretval}         \pgfplotstablegetelem{\srowindex}{radius}\of{\data}         \pgfmathsetmacro{\y}{\pgfplotsretval}         %--concatenate         \global\edef\currentpath{\currentpath--(\x,\y)}         \global\edef\currentcoordlist{\currentcoordlist (\x,\y)}     }     \begin{scope}[rotate around = {-90:(1,1)},shift={(1,1)}]         \path[fill,top color=blue, bottom color= green] (0.85,0)--(0,0) -- plot[smooth] coordinates \currentcoordlist;         \path[fill,top color=blue, bottom color= green] (0.85,0)--(0,0) -- plot[smooth,yscale={-1}]  coordinates \currentcoordlist;         \draw plot[smooth]  coordinates  \currentcoordlist;         \draw plot[smooth,yscale={-1}]  coordinates  \currentcoordlist;     \end{scope}     \begin{scope}[rotate around = {-45:(1,0)},shift={(1,0)}]        \path[fill,top color=blue, bottom color= green] (0.85,0)--(0,0) -- plot[smooth] coordinates \currentcoordlist;         \path[fill,top color=blue, bottom color= green] (0.85,0)--(0,0) -- plot[smooth,yscale={-1}]  coordinates \currentcoordlist;         \draw plot[smooth]  coordinates  \currentcoordlist;         \draw plot[smooth,yscale={-1}]  coordinates  \currentcoordlist;     \end{scope}     \begin{scope}[rotate around = {-90:(1.707,-0.707)},shift={(1.707,-0.707)}]         \path[fill,top color=blue, bottom color= green] (0.85,0)--(0,0) -- plot[smooth] coordinates \currentcoordlist;         \path[fill,top color=blue, bottom color= green] (0.85,0)--(0,0) -- plot[smooth,yscale={-1}]  coordinates \currentcoordlist;         \draw plot[smooth]  coordinates  \currentcoordlist;         \draw plot[smooth,yscale={-1}]  coordinates  \currentcoordlist;     \end{scope}      \begin{scope}[rotate around = {-135:(2.41,0)},shift={(2.41,0)}]         \path[fill,top color=blue, bottom color= green] (0.85,0)--(0,0) -- plot[smooth] coordinates \currentcoordlist;         \path[fill,top color=blue, bottom color= green] (0.85,0)--(0,0) -- plot[smooth,yscale={-1}]  coordinates \currentcoordlist;         \draw plot[smooth]  coordinates  \currentcoordlist;         \draw plot[smooth,yscale={-1}]  coordinates  \currentcoordlist;     \end{scope}     \end{tikzpicture}     \end{document}      ## Data file: `coord2.dat`:               localcoord radius          0.0 0.1     0.1 0.1     0.2 0.15     0.3 0.1     0.4 0.2     0.5 0.1     0.6 0.05     0.7 0.15     0.8 0.1     0.85 0.1     %1.0 0.15


title: How manually mimic the bullet in the itemize environment?

text: I have created the following `tabularx` environment (using the package `tabularx`, of course) to serve as a specialized bulleted list for a resume.               \begin{tabularx}{\textwidth}{r \p{3in} X r}         $\bullet$ & This is some experience & & startdate--enddate     \end{tabularx}      I would've preferred to use the Itemize environment, but I could not figure out how to get the multiple columns for the date. While the bullet produced is not bad, it does not match the spacing used in the `itemize` environment. Is there a way that I can consistently mimic the spacing used by `itemize` to make my `tabularx` environment match? **EDIT:** As DavideCarlisle mentions in his answer, and I alluded to in my comment, I am using `tabularx` for the column X that will give me flexible white space. Using the primitive `\extracolsep`, I can rewrite my example with `tabular*` in the following way.               \begin{tabular*}{\textwidth}{r \p{3in} @{\extracolsep{\fill}} r }         $\bullet$ & This is some experience & startdate--enddate     \end{tabular*}      I mention this to emphasize that my question is really about the placement of the bullet rather than the rest of the table's configuration. I do want to say, however, that I appreciate everyone's more general feedback.


title: Is there a LaTex java .jar?

text: I'm very interested in using the Java LaTeX Report library, but one of the requirements is an installed or portable LaTeX distribution. My software would be running on various servers and it would not be possible to install any software (only uploading a .war file). Is there any LaTex distribution that runs from a java .jar? edit: or can you think of a way round my problem?


title: Changing style of unnumbered chapters in memoir

text: The MWE below illustrates that while I can center numbered chapter headings, I cannot do so for unnumbered chapter headings:               \documentclass{memoir}     \renewcommand*{\printchaptername}{\centering}     \begin{document}     \chapter*{Unnumbered chapter}     \chapter{Numbered chapter}     \end{document}      What am I doing wrong?


title: LaTeX: Beamer with \newcommand

text: I have tons of slides starting with               \bslide      I tried to rephrase my source for class Beamer by defining               \newcommand{\bslide}{\begin{frame}{xxx}}      Unfortunately LaTeX says               ===========================================     [1] (./sliBeamer.tex (./titBeamer.tex)     Runaway argument?      \par      ! File ended while scanning use of \frame.     <inserted text>                      \par      l.15 \input{titBeamer}          ? x     Output written on slidesBeamer.dvi (1 page, 22680 bytes).     Transcript written on slidesBeamer.log.     make: *** [slidesBeamer.dvi] Error 1     ======================================      Any hint?


title: LaTeX presentations like OpenOffice .odp

text: I've been reading of `beamer` to make presentations with LaTeX, so I'd like a good book to perform these tasks. Is there a good book (or website) for that?


title: Rindler coordinate chart (family of parametric curves) in TikZ

text: Is it possible to make a plot like this with TikZ or other drawing packages? ![Coordinate transformation from \(T,X\) to \(t,x\)](http://i.stack.imgur.com/Pj00M.png) This plot visualizes a two parameter family of curves, given by               T = x Sinh(t)     X = x Cosh(t)      The pink curves are curves of constant t and curves of constant x. The plot is from http://en.wikipedia.org/wiki/Rindler_space


title: customize insert citation to use \citep{key} in LyX

text: I am using LyX and would like to know if it is possible to specify which citation command should be used by default for the "Insert -> Citation" function from the menu. Specifically I am using `natbib` and would like to use `\citep{key}` when using "Insert -> citation"


title: Detecting if inside \section

text: How can I make a conditional that checks if it is currently inside a `\part`, `\chapter`, or `\section`?               IF inside sectioning = TRUE         DO "This text is inside a section."     ELSE         DO "This text is not inside a section."


title: Boolean switch for conditional statement after its definition?

text: I'd like to use conditional statements in my preamble file and then define the value of the Boolean variable _afterwards_. The reason is that I import the preamble.tex first thing in my main file where I then want to specify switches as appropriate. I've tried this with the plain tex \newif and with the etoolbox packages, yet both seem to require the value of the Boolean variable _before_ the definition of the conditional. This appears to mean that I would have to change my preamble.tex, defeating the purpose of making it a separate file. Is there an easy way of achieving this, short of splitting the preamble file in two parts? Thanks, Michael


title: Problem with continuation of TOC in Memoir Class

text: This is basically continuation of earlier questions. I managed to fix (brute force) most issues. This one effects continuation pages of TOC, TOF, and chapters pages after the first. I assume it is the same issues throughout. As you can see, the continuation pages have the header single spaced from rest of the text PLUS it is not spaced correctly. As before, all text must start 1.0" from top of page. Thanks in advance for your help.![Image shows first and continuation pages of TOC. The TOC header is very close to 1" from page top and \(unseen\) subsections are double spaced below 'CHAPTER'. Below is continuation of TOC and 'CHAPTER' is not 1" spaced and subsections not double spaced. None of the fixes for other vertical spacing issues seems to effect this whatsoever. Thanks](http://i.stack.imgur.com/Pyt3Z.jpg) .tex code:               \documentclass[oneside,12pt]{memoir}     \DoubleSpacing         % memoir's double spacing     \usepackage{mypkg}     % this package     \topmargin -0.4125in        % read Lamport p.163     \evensidemargin 0in     % same as oddsidemargin but for left-hand pages     \textheight 9.1in      \parskip 7.2pt           % sets spacing between paragraphs     \parindent 0pt          % sets leading space for paragraphs     \DoubleSpacing     \begin{document}     \maxtocdepth{subparagraph} % put everything into the ToC     \pagestyle{toc}     \tableofcontents*     \mainmatter     \pagestyle{toc}     \addtocontents{toc}{\cftpagenumbersoff{chapter}}     \addcontentsline{toc}{chapter}{CHAPTER}     \addtocontents{toc}{\cftpagenumberson{chapter}}     \pagestyle{plain}     \chapter{INTRODUCTION}      \section{Background and Motivation}     \chapter{TWO}      \section{Why ?}     \chapter{THREE}      \section{Why not ?}     \subsection{Qualitat ave Qequirements}     \chapter{THREE}      \section{Qualitat ave Qequirements}     \chapter{THREE}      \section{Qualitat ave Qequirements}     \chapter{THREE}      \section{Qualitat ave Qequirements}     \chapter{THREE}      \section{Qualitat ave Qequirements}     \chapter{THREE}      \section{Qualitat ave Qequirements}     \chapter{THREE}      \section{Qualitat ave Qequirements}     \chapter{THREE}      \section{Qualitat ave Qequirements}     \chapter{THREE}      \section{Qualitat ave Qequirements}     \chapter{THREE}      \section{Qualitat ave Qequirements}     \end{document}      My package file:               \NeedsTeXFormat{LaTeX2e}     \ProvidesPackage{mypkg}     \@ifclassloaded{memoir}{\let\endpwasu\relax}{\let\endpwasu\endinput       \PackageError{pwasu}{The pwasu package only works with the memoir class}{\@ehd}}     \endpwasu     % Some useful lengths for layout purposes     \newlength{\toptafiddle}     \newlength{\bottafiddle}     \newlength{\topfiddle}     \newlength{\botfiddle}     \newlength{\linespace}     \setlrmarginsandblock{1.375in}{1.375in}{*}     %% bottom of text at 1in, footer below     %% top of header at 1in, first text line double spaced below base of header     \setlength{\linespace}{\baselineskip} %% the current equivalent of \onelineskip     \setlength{\headheight}{\lineskip}     \setlength{\headsep}{\linespace}     \addtolength{\headsep}{-\topskip}     \setlength{\uppermargin}{1in}     \makepagestyle{asu}     %% for continuation pages of the ToC, LoF, LoT, LoS     \makepagestyle{toc}       \makeevenfoot{toc}{}{\thepage}{}       \makeoddfoot{toc}{}{\thepage}{}       \makeevenhead{toc}{CHAPTER}{}{Page}       \makeoddhead{toc}{CHAPTER}{}{Page}     %% chapter style     \makechapterstyle{asu}{%     \setlength{\beforechapskip} {-.5\topfiddle}     \setlength{\afterchapskip} {\onelineskip}       \setlength{\beforechapskip}{-0.2in}       \setlength{\afterchapskip}{3pt}       \renewcommand*{\chapnamefont}{\normalfont}       \renewcommand*{\chapnumfont}{\chapnamefont}       \renewcommand*{\printchapternum}{\centering\chapnumfont \thechapter}       \renewcommand*{\chaptitlefont}{\normalfont\centering\vspace*{-\onelineskip}}       \renewcommand*{\printchapternonum}          }     %%% (subsub)section styles     \setsecheadstyle{\centering\normalfont\vspace*{-\onelineskip}}     \setsubsecheadstyle{\centering\itshape\vspace*{-\onelineskip}}     \setsubsubsecheadstyle{\centering\vspace*{-\onelineskip}}     \setlength{\aftersecskip}{3pt}     %%%% Do the ToC     \let\oldtoc\tableofcontents     \renewcommand{\tableofcontents}{\clearpage\pagestyle{toc}\oldtoc}      \renewcommand{\contentsname}{TABLE OF CONTENTS}     \renewcommand*{\tocheadstart}{\vspace*{-.0225in}}     \renewcommand*{\aftertoctitle}{\thispagestyle{plain}%       \par\nobreak \mbox{}\hfill{\normalfont Page}\par\nobreak}     \renewcommand*{\cftchapterfont}{\normalfont}     \renewcommand*{\cftchapterpagefont}{\normalfont}     \renewcommand*{\cftchapterleader}{%       \cftchapterfont\cftdotfill{\cftchapterdotsep}}     \renewcommand*{\cftchapterdotsep}{\cftdotsep}     \setlength{\cftbeforechapterskip}{0pt plus 0pt}     \chapterstyle{asu}     \endinput


title: Intersecting planes not shown correctly with TikZ

text: I made a plot in MATLAB of a deformed and an undeformed model. I converted the figure to TikZ using matlab2tikz and added it to my .tex file. I then noticed that the two configurations, which are intersecting, are not displayed correctly. To illustrate what I mean, I've stripped down the TikZ code to make to rectangles cross in a 3D space:               \begin{tikzpicture}     \begin{axis}[%         width=5cm,height=5cm,         view={-37.5}{45},         scale only axis,         xmin=-3, xmax=23,         ymin=0, ymax=20,         zmin=-5, zmax=5,         hide axis]         \addplot3 [fill=white!80!red,opacity=0.5,draw=black] table[row sep=crcr]{         20 0 0\\         20 20 0\\         0 20 0\\         0 0 0\\         };              \addplot3 [fill=white!80!blue,opacity=0.8,draw=black] table[row sep=crcr]{         15 5 -4\\         15 15 0\\         5 15 4\\         5 5 0\\         };     \end{axis}     \end{tikzpicture}      The result looks like this: ![Two crossing planes](http://i.stack.imgur.com/CUA9f.png) As can be seen one plane lies entirely on top of the other, while in fact they intersect (i.e. about half of the blue plane lies 'underneath' the red plane). With my minimum TikZ knowledge I was hoping someone here could help me fix this problem, such that the planes indeed intersect.


title: Using \fbox inside \section

text: I want to place an `\fbox` inside of some `\part`, `\chapter`, and `\section` commands. Instead, I get this message:               Use of \@chapter doesn't match its definition.      Update:               \documentclass{article}     \usepackage{xcolor}     \begin{document}         \section{\fbox{hi}}     \end{document}


title: How to use LaTeX tables with MS Word/PowerPoint

text: I love LaTeX's modularity and that I can generate (w/ Stata) and `\input{}` tables, which makes it really easy to update my work and to keep the same analyses across papers and presentations. But not all of my collaborators use LaTeX. Is there a way to use my LaTeX tables in Word/PowerPoint? I see that I can link to a file in PowerPoint, but can I do the same with tables? That is, is there a way to have Word/PowerPoint compile my LaTeX tables? Is my only option write the LaTeX table to a pdf, then screen capture, then link this file? This seems very manual and eliminates the "always up to date" feature. Is there a better way to handle this?


title: I have a problem with installing tlmgr

text: > **Possible Duplicate:**   >  tlmgr is not accessible after installing TeX Live 2011 on a Ubuntu system My computer runs on Fedora 15 x86-64. I installed TeX Live using my package manager, but couldn't run `tlmgr`. So I downloaded the TeX Live installation file form tug.org, and still couldn't run `tlmgr` (after downloading 2400 packages for TL through it's installation file). Why is that happening?


title: tlmgr: command not found

text: > **Possible Duplicate:**   >  tlmgr is not accessible after installing TeX Live 2011 on a Ubuntu system I just installed TeXlive with the `install-tl-20120117` package. I expected to be able to use `tlmgr` after the installation but bash came up with the error `tlmgr: command not found`. I checked whether or not the file `tlmgr.pl` is in `/usr/local/texlive/2011/texmf/scripts/texlive` and it is. Can anyone tell me what I'm doing wrong? I'm still trying to learn the ropes here. **EDIT in Response:** I am running Debian Squeeze on VirtualBox.               echo PATH     /home/pjh/.rvm/gems/ruby-1.9.3-p0/bin:/home/pjh/.rvm/gems/ruby-1.9.3-p0@global/bin:/home/pjh/.rvm/rubies/ruby-1.9.3-p0/bin:/home/pjh/.rvm/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games      I think I see the problem, how do I mend this? What should I add to the path? Should I add it in my `.bashrc`?


title: Saving and reusing/combining paths in TikZ?

text: In a package using TikZ, I'm generating two paths (depending on some option values), which I now need to combine to one path that should be used for `\filldraw`. I found Programming in TikZ which really lets me save and restore a path. However, anything I do after the restore does not have any effect on the `\filldraw`. In particular, in the example the `-- cycle` is completely ignored. Any idea how to save one or two paths in TikZ and then restore and continue or even concatenate two paths? A simplified example is:               \documentclass{article}     \usepackage{tikz}          \begin{document}     \makeatletter          \begin{tikzpicture}     \path[save path=\tmppath] (0,0) -- (2,2) -- (4,1);     \path[save path=\tmppathII] (6,-2) -- (3,-2);          % Effectively, I want the following, but by using \tmppath and \tmppathII:     % \filldraw[color=red,fill=blue] (0,0) -- (2,2) -- (4,1) -- (6,-2) -- (3,-2) -- cycle;          % This properly draws/fills the \tmppath, but does NOT use the -- cycle at all...     \pgfsyssoftpath@setcurrentpath{\tmppath} -- cycle \filldraw[color=red,fill=blue];          % This only draws \tmppathII, not the whole constructed path...     % \pgfsyssoftpath@setcurrentpath{\tmppath} --      % \pgfsyssoftpath@setcurrentpath{\tmppathII} -- cycle \filldraw[color=red,fill=blue];          \end{tikzpicture}     \end{document}


title: Hyperref with answers [ntheorem]

text: I read Hyperlink with answers and have tried to apply the technique to my environments that I have defined using the `ntheorem` package. In the MWE below the answer links correctly go to the questions, but the questions do not go to the answers. How can this be fixed?               \documentclass{report}     \usepackage{answers}     \usepackage{ntheorem}     \usepackage{changepage}     \usepackage{lipsum}     \usepackage{hyperref}          \makeatletter     \newtheoremstyle{hanging}%     {\item[\theorem@headerfont \llap{\hyperlink{soln:##2}{##2}}]}%      \makeatother          % problem environment     \newlength{\problabel}     \theoremstyle{hanging}     \theoremprework{%     \hypertarget{prob:\theproblem}{}%     \settowidth{\problabel}{\textbf{\theproblem} }%     \begin{adjustwidth}{\problabel}{}}     \theorempostwork{\end{adjustwidth}}     \newtheorem{problem}{}          % solution environment     \Newassociation{sol}{Soln}{solutionfilehandle}     \renewenvironment{Soln}[1]       {\par{ \hyperlink{prob:#1}{#1}}\quad\hypertarget{soln:#1}{}}%       {}          \begin{document}          \Opensolutionfile{solutionfilehandle}[ans1]          \section{Problems}     \begin{problem}         \lipsum[1]         \begin{sol}             First solution.         \end{sol}     \end{problem}          \begin{problem}         \lipsum[2]         \begin{sol}             second solution.         \end{sol}     \end{problem}          \Closesolutionfile{solutionfilehandle}     \newpage     \section{Solutions}     \input{ans1}         \end{document}      EDIT: It also helped to have the target first:                   % solution environment     \Newassociation{sol}{Soln}{solutionfilehandle}     \renewenvironment{Soln}[1]       {\par\hypertarget{soln:#1}{}\hyperlink{prob:#1}{#1}\quad}%       {}


title: Changing line thickness of arrow

text: \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{arrows}          \begin{document}     \begin{tikzpicture}          \draw[step=1cm,color=gray] (0,0) grid (3,3);         \draw[draw=black,solid, -triangle 90,fill=black] (0,0) -- (0,3);          \end{tikzpicture}     \end{document}      I've tried changing this arrow with ultra thick and double, but the arrow head size changes too. I'm trying to only increase the width of the line. I came across a similar post, but `thick arc` doesn't seem to work even when I add all the libraries.


title: How to create better dots in continued fraction

text: Consider                $$\left( a_1, a_2, \cdots a_m \right) \mapsto a_1 + \frac{1}{a_2 + \frac{1}{\cdots + \frac{1}{a_m}}}$$      I want to change the cdots into three dots like the following > dot   >  space dot   >  space space dot (Can't find the words to describe this in English.) Question: Is there an easy way to do this?


title: Why words with accented characters can't be automatic hyphenated with the default OT1 enconding?

text: I was reading the first **answer** to this question: **Why should I use \usepackage[T1]{fontenc}?** > [...] the default font encoding (OT1) of TeX is 7-bit and uses fonts that > have 128 glyphs, and so do not include the accented characters as individual > glyphs. So a letter ö is made by adding an accent to the existing 'o' glyph. > This means, among other things, that **words containing accented characters > cannot be automatically hyphenated**. I can't see what is the relationship between the fact that a character like 'ö' has to be made from two different glyphs (the 'o' glyph and the accent glyph), and automatic hyphenation.